{"version":3,"file":"FAQAccordion.Wo-5VN-R.mjs","names":["useState","__esmMin","_e","p","c","init_jsx_runtime","init_npm_react_18_3_1","init_framer_BpuvUAiZ","addPropertyControls","ControlType","FAQAccordion","CREAM","LINE","INK","MUTED","props","open","setOpen","firstOpen","toggle","cur","i","x","oneAtATime","items","on","id","headFont","questionSize","EASE","item","bodyFont","init_FAQAccordion"],"sources":["https:/framerusercontent.com/modules/OaeOvvYnJe7CfovEBmpN/EOrlqThLRVJCtvAZjbLd/FAQAccordion.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Krea-style FAQ: separate rounded cards, question on the left, a plus that turns into a cross when open.\n// The answer opens with a grid-rows 0fr → 1fr transition, so its height animates without measuring.\n// Colours and fonts are property controls: pick your colour styles in the Framer panel so they follow the design system.\nconst EASE=\"cubic-bezier(0.22, 1, 0.36, 1)\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FAQAccordion(props){const{items,firstOpen,oneAtATime,card:CREAM,line:LINE,text:INK,muted:MUTED,headFont,bodyFont,questionSize}=props;const[open,setOpen]=useState(firstOpen?[0]:[]);const toggle=i=>setOpen(cur=>cur.includes(i)?cur.filter(x=>x!==i):oneAtATime?[i]:[...cur,i]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:10},children:items.map((item,i)=>{const on=open.includes(i);const id=`faq-${i}`;return /*#__PURE__*/_jsxs(\"div\",{style:{background:CREAM,borderRadius:16,padding:\"0 24px\"},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-expanded\":on,\"aria-controls\":id,onClick:()=>toggle(i),style:{all:\"unset\",boxSizing:\"border-box\",width:\"100%\",minHeight:68,padding:\"18px 0\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:24,cursor:\"pointer\",fontFamily:headFont,fontSize:questionSize,lineHeight:1.3,letterSpacing:\"-0.01em\",color:INK,transition:`color .3s ${EASE}`},children:[/*#__PURE__*/_jsx(\"span\",{children:item.question}),/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",\"aria-hidden\":\"true\",style:{flex:\"none\",transform:`rotate(${on?45:0}deg)`,transition:`transform .4s ${EASE}`},children:/*#__PURE__*/_jsx(\"path\",{d:\"M8 1.5v13M1.5 8h13\",stroke:INK,strokeWidth:\"1.4\",strokeLinecap:\"round\",fill:\"none\"})})]}),/*#__PURE__*/_jsx(\"div\",{id:id,role:\"region\",style:{display:\"grid\",gridTemplateRows:on?\"1fr\":\"0fr\",transition:`grid-template-rows .45s ${EASE}`},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,padding:\"0 40px 22px 0\",maxWidth:640,fontFamily:bodyFont,fontSize:14,lineHeight:1.57,color:MUTED,opacity:on?1:0,transition:`opacity .35s ${EASE} ${on?\".08s\":\"0s\"}`},children:item.answer})})})]},i);})});}FAQAccordion.defaultProps={card:\"var(--token-555c10eb-06f3-4f37-96c2-86e3e033a50c, #F6F5FB)\",line:\"var(--token-445028e6-3607-4e33-8bb1-c2bedc9eaf5b, rgba(34, 29, 58, 0.1))\",text:\"var(--token-3d9be07e-63ce-4bc5-9dc1-15a84a38a660, #221D3A)\",muted:\"var(--token-435fc015-8f95-48cc-9937-d2f38dab335f, rgba(34, 29, 58, 0.68))\",headFont:\"Inter Tight, sans-serif\",bodyFont:\"Inter Tight, sans-serif\",questionSize:16,firstOpen:true,oneAtATime:true,items:[{question:\"Replace this with your first question?\",answer:\"Keep answers to two or three short sentences.\"},{question:\"A second common question?\",answer:\"Answer it plainly, the way you would on a call.\"},{question:\"A third question?\",answer:\"Add or remove items in the Questions list.\"}]};addPropertyControls(FAQAccordion,{items:{type:ControlType.Array,title:\"Questions\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true}}}},firstOpen:{type:ControlType.Boolean,title:\"First Open\",defaultValue:true},oneAtATime:{type:ControlType.Boolean,title:\"One at a Time\",defaultValue:true},card:{type:ControlType.Color,title:\"Card\",defaultValue:\"#FFFFFF\"},line:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(34, 29, 58, 0.1)\"},text:{type:ControlType.Color,title:\"Question\",defaultValue:\"#221D3A\"},muted:{type:ControlType.Color,title:\"Answer\",defaultValue:\"#6B6785\"},headFont:{type:ControlType.String,title:\"Question Font\",defaultValue:\"Inter Tight, sans-serif\"},bodyFont:{type:ControlType.String,title:\"Answer Font\",defaultValue:\"Inter Tight, sans-serif\"},questionSize:{type:ControlType.Number,title:\"Question Size\",min:14,max:32,defaultValue:21}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccordion.map"],"mappings":"A,iLAMG,SAAwBU,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,YAAU,aAAW,KAAKC,EAAM,KAAKC,EAAK,KAAKC,EAAI,MAAMC,EAAM,WAAS,WAAS,gBAAcC,EAAW,CAACC,EAAKC,GAASjB,EAASkB,EAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAQC,EAAO,GAAGF,EAAQ,GAAKG,EAAI,SAASC,CAAC,EAAED,EAAI,OAAO,GAAGE,IAAID,CAAC,EAAEE,EAAW,CAACF,CAAC,EAAE,CAAC,GAAGD,EAAIC,CAAC,CAAC,EAAE,MAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,EAAE,EAAE,SAASG,EAAM,KAAK,E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