{"version":3,"file":"FAQ.Cq2eOsSQ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/ARYVs67mpiqAN1scbmWg/5VXEyF99gYiz08EEUaqL/FAQ.js"],"sourcesContent":["// Frequently Asked Questions component with unlimited questions and answers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition,useEffect,useState}from\"react\";/**\n * Frequently Asked Questions\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function sanitizeAnswer(answer){// Allow only basic tags: b, strong, i, em, a, br, p, ul, ol, li\nreturn answer.replace(/<(?!\\/?(b|strong|i|em|a|br|p|ul|ol|li)(\\s|>|\\/))/gi,\"&lt;\").replace(/<a ([^>]+)>/gi,(m,attrs)=>{// Only allow href attribute\nconst hrefMatch=attrs.match(/href\\s*=\\s*['\\\"]([^'\\\"]+)['\\\"]/i);if(hrefMatch){return`<a href=\"${hrefMatch[1]}\" target=\"_blank\" rel=\"noopener noreferrer\">`;}return\"<a>\";});}export default function FAQ(props){const{faqs=[{question:\"What is Framer?\",answer:\"Framer is a visual web design tool.\"},{question:\"Is Framer free?\",answer:\"Framer offers both free and paid plans.\"},{question:\"Can I export code?\",answer:\"You can export production-ready code from Framer.\"}],background,textColor,borderRadius,questionFont,answerFont,style,expandIconType=\"plus-minus\",customIcon=\"\",animationType=\"fade\",animationDuration=.3,animationEasing=\"ease\",openBehavior=\"multiple\",separatorColor=\"#eeeeee\",separatorHeight=1,questionFontSizeMobile=15,answerFontSizeMobile=13,questionPaddingClosed=16,questionPaddingOpen=16,answerPaddingClosed=16,answerPaddingOpen=16}=props;const[openIndexes,setOpenIndexes]=useState(openBehavior===\"always\"?faqs.map((_,i)=>i):[]);useEffect(()=>{if(openBehavior===\"always\"){startTransition(()=>setOpenIndexes(faqs.map((_,i)=>i)));}else{startTransition(()=>setOpenIndexes([]));}},[openBehavior,faqs]);function getIcon(open){if(expandIconType===\"plus-minus\"){return open?\"−\":\"+\";}if(expandIconType===\"chevron\"){return /*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 18 18\",style:{display:\"inline\",verticalAlign:\"middle\"},children:/*#__PURE__*/_jsx(\"polyline\",{points:open?\"4,11 9,6 14,11\":\"4,7 9,12 14,7\",fill:\"none\",stroke:\"#888\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}if(expandIconType===\"arrow\"){return /*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 18 18\",style:{display:\"inline\",verticalAlign:\"middle\"},children:/*#__PURE__*/_jsx(\"path\",{d:open?\"M5 11l4-4 4 4\":\"M7 5l4 4-4 4\",fill:\"none\",stroke:\"#888\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}if(expandIconType===\"custom\"&&customIcon){return /*#__PURE__*/_jsx(\"img\",{src:customIcon,alt:\"icon\",style:{width:18,height:18,objectFit:\"contain\"}});}return open?\"−\":\"+\";}function toggleIndex(idx){if(openBehavior===\"always\")return;if(openBehavior===\"single\"){startTransition(()=>{setOpenIndexes(prev=>prev.includes(idx)?[]:[idx]);});}else{startTransition(()=>{setOpenIndexes(prev=>prev.includes(idx)?prev.filter(i=>i!==idx):[...prev,idx]);});}}return /*#__PURE__*/_jsxs(\"div\",{style:{...style,background,color:textColor,borderRadius,padding:0,display:\"flex\",flexDirection:\"column\",gap:12},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 600px) {\n                    .faq-question {\n                        font-size: ${questionFontSizeMobile}px !important;\n                    }\n                    .faq-answer {\n                        font-size: ${answerFontSizeMobile}px !important;\n                    }\n                }\n            `}),faqs.map((faq,i)=>{const open=openBehavior===\"always\"?true:openIndexes.includes(i);return /*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:4,borderBottom:`${separatorHeight}px solid ${separatorColor}`,paddingBottom:8},children:[/*#__PURE__*/_jsxs(\"button\",{id:`faq-question-${i}`,type:\"button\",\"aria-expanded\":open,\"aria-controls\":`faq-answer-${i}`,onClick:()=>toggleIndex(i),disabled:openBehavior===\"always\",className:\"faq-question\",style:{background:\"none\",border:\"none\",padding:0,paddingTop:open?questionPaddingOpen:questionPaddingClosed,margin:0,width:\"100%\",textAlign:\"left\",fontWeight:questionFont?.fontWeight||600,cursor:openBehavior===\"always\"?\"default\":\"pointer\",color:open?\"white\":textColor,fontSize:questionFont?.fontSize||17,outline:\"none\",display:\"flex\",alignItems:\"center\",gap:8,letterSpacing:questionFont?.letterSpacing,lineHeight:questionFont?.lineHeight,fontStyle:questionFont?.fontStyle,transition:\"color 0.2s ease\",...questionFont},onMouseEnter:e=>{if(openBehavior!==\"always\"){e.currentTarget.style.color=\"white\";}},onMouseLeave:e=>{if(openBehavior!==\"always\"&&!open){e.currentTarget.style.color=textColor;}},children:[/*#__PURE__*/_jsx(\"span\",{children:faq.question}),/*#__PURE__*/_jsx(\"span\",{style:{marginLeft:\"auto\",fontSize:18,color:\"#888\"},children:getIcon(open)})]}),/*#__PURE__*/_jsx(\"div\",{id:`faq-answer-${i}`,className:\"faq-answer\",style:{marginTop:open?6:0,paddingBottom:open?answerPaddingOpen:answerPaddingClosed,color:textColor,fontWeight:answerFont?.fontWeight||400,fontSize:answerFont?.fontSize||15,letterSpacing:answerFont?.letterSpacing,lineHeight:answerFont?.lineHeight,fontStyle:answerFont?.fontStyle,maxHeight:open?500:0,opacity:open?1:0,overflow:\"hidden\",transition:animationType===\"fade\"?`opacity ${animationDuration}s ${animationEasing}`:animationType===\"slide\"?`max-height ${animationDuration}s ${animationEasing}`:animationType===\"scale\"?`transform ${animationDuration}s ${animationEasing}, opacity ${animationDuration}s ${animationEasing}`:undefined,transform:animationType===\"scale\"?open?\"scaleY(1)\":\"scaleY(0.95)\":undefined,display:open||animationType!==\"slide\"?\"block\":\"none\",...answerFont},role:\"region\",\"aria-labelledby\":`faq-question-${i}`,children:/*#__PURE__*/_jsx(\"span\",{dangerouslySetInnerHTML:{__html:sanitizeAnswer(faq.answer)}})})]},i);})]});}addPropertyControls(FAQ,{openBehavior:{type:ControlType.Enum,title:\"Open Behavior\",options:[\"multiple\",\"single\",\"always\"],optionTitles:[\"Multiple\",\"One at a time\",\"Always open\"],defaultValue:\"multiple\"},faqs:{type:ControlType.Array,title:\"FAQs\",maxCount:50,control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"What is Framer?\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"Framer is a visual web design tool.\",displayTextArea:true}}},defaultValue:[{question:\"What is Framer?\",answer:\"Framer is a visual web design tool.\"},{question:\"Is Framer free?\",answer:\"Framer offers both free and paid plans.\"},{question:\"Can I export code?\",answer:\"You can export production-ready code from Framer.\"}]},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"17px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},questionFontSizeMobile:{type:ControlType.Number,title:\"Q Font Size Mobile\",defaultValue:15,min:10,max:30,step:1,unit:\"px\"},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},answerFontSizeMobile:{type:ControlType.Number,title:\"A Font Size Mobile\",defaultValue:13,min:8,max:30,step:1,unit:\"px\"},questionPaddingClosed:{type:ControlType.Number,title:\"Question Padding (Closed)\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},questionPaddingOpen:{type:ControlType.Number,title:\"Question Padding (Open)\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},answerPaddingClosed:{type:ControlType.Number,title:\"Answer Padding (Closed)\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},answerPaddingOpen:{type:ControlType.Number,title:\"Answer Padding (Open)\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},separatorColor:{type:ControlType.Color,title:\"Separator Color\",defaultValue:\"#eeeeee\"},separatorHeight:{type:ControlType.Number,title:\"Separator Height\",defaultValue:1,min:1,max:8,step:1,unit:\"px\"},expandIconType:{type:ControlType.Enum,title:\"Icon\",options:[\"plus-minus\",\"chevron\",\"arrow\",\"custom\"],optionTitles:[\"Plus/Minus\",\"Chevron\",\"Arrow\",\"Custom\"],defaultValue:\"plus-minus\"},customIcon:{type:ControlType.String,title:\"Custom Icon URL\",defaultValue:\"\",hidden:({expandIconType})=>expandIconType!==\"custom\"},animationType:{type:ControlType.Enum,title:\"Animation\",options:[\"fade\",\"slide\",\"scale\"],optionTitles:[\"Fade\",\"Slide\",\"Scale\"],defaultValue:\"fade\"},animationDuration:{type:ControlType.Number,title:\"Anim Duration\",defaultValue:.3,min:0,max:2,step:.05,unit:\"s\"},animationEasing:{type:ControlType.String,title:\"Anim Easing\",defaultValue:\"ease\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ.map"],"mappings":"gMASG,SAAS,EAAe,EAAO,CAClC,OAAO,EAAO,QAAQ,qDAAqD,MAAM,CAAC,CAAC,QAAQ,iBAAiB,EAAE,IAAQ,CACtH,IAAM,EAAU,EAAM,MAAM,iCAAiC,EAA8F,OAAzF,EAAiB,YAAY,EAAU,GAAG,8CAAqD,KAAM,CAAC,CAAE,CAAC,SAAwB,EAAI,EAAM,CAAC,GAAK,CAAC,OAAK,CAAC,C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