{"version":3,"file":"FAQ.CIoIRPWV.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","p","_e","motion","AnimatePresence","init_framer_motion_DhsWWWsN","init_framer_BisrWwwE","addPropertyControls","ControlType","FAQ","passedItems","props","items","openIndex","setOpenIndex","toggle","index","FAQItem","item","init_FAQ","containerStyle","faqStyles","isLastItem","questionStyle","questionStyles","answerContainerStyle","answerStyle","answerStyles","iconStyle","linkStyle","linkStyles","question","isOpen","answer"],"sources":["https:/framerusercontent.com/modules/HEy6TGlaFtuIhdCIDisp/TJJebWPn7MCss3aFZCde/FAQ.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";import{useState}from\"react\";// Code component provided by Eleveight Supply™. All rights reserved 2024.\n/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight 100%\n */export default function FAQ(props){const{items:passedItems,questionStyles,answerStyles,faqStyles,linkStyles,transition}=props;// Fallback to default items if passed-in items is empty or undefined\nconst items=passedItems&&passedItems.length>0?passedItems:FAQ.defaultProps.items;const[openIndex,setOpenIndex]=useState(null);const toggle=index=>{setOpenIndex(openIndex===index?null:index);};return /*#__PURE__*/_jsx(\"div\",{children:items.map((item,index)=>/*#__PURE__*/_jsx(FAQItem,{question:item.question,answer:item.answer,isOpen:openIndex===index,toggle:()=>toggle(index),questionStyles:questionStyles,answerStyles:answerStyles,linkStyles:linkStyles,isLastItem:index===items.length-1,faqStyles:faqStyles,transition:transition},index))});}const FAQItem=({question,answer,isOpen,toggle,questionStyles,answerStyles,linkStyles,isLastItem,faqStyles,transition})=>{const containerStyle={padding:`${faqStyles.faqPaddingTop}px ${faqStyles.faqPaddingRight}px ${faqStyles.faqPaddingBottom}px ${faqStyles.faqPaddingLeft}px`,backgroundColor:faqStyles.faqFill,borderTopLeftRadius:`${faqStyles.faqBorderRadiusTopLeft}px`,borderTopRightRadius:`${faqStyles.faqBorderRadiusTopRight}px`,borderBottomRightRadius:`${faqStyles.faqBorderRadiusBottomRight}px`,borderBottomLeftRadius:`${faqStyles.faqBorderRadiusBottomLeft}px`,border:`${faqStyles.faqBorder.width}px ${faqStyles.faqBorder.style} ${faqStyles.faqBorder.color}`,marginBottom:isLastItem?\"0\":`${faqStyles.containerSpacing}px`,cursor:\"pointer\",userSelect:\"none\",boxSizing:\"border-box\"};const questionStyle={color:questionStyles.questionColor,...questionStyles.questionFont,display:\"flex\",justifyContent:\"space-between\",alignItems:\"flex-start\",userSelect:\"none\",margin:0};const answerContainerStyle={overflow:\"hidden\"};const answerStyle={color:answerStyles.answerColor,...answerStyles.answerFont,marginTop:`${questionStyles.questionAnswerSpacing}px`,userSelect:\"none\"};const iconStyle={display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:0,padding:0,marginLeft:\"12px\"};// Link styling and adding `onClick=\"event.stopPropagation()\"`\nconst linkStyle={color:linkStyles.linkColor,textDecoration:linkStyles.underline?\"underline\":\"none\"};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,onClick:toggle,children:[/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:1},animate:{opacity:1},transition:transition,style:questionStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:{margin:0,flex:1},children:question}),/*#__PURE__*/_jsx(motion.div,{initial:{rotate:0,opacity:1},animate:{rotate:isOpen?180:0,opacity:isOpen?.5:1},transition:transition,style:iconStyle,children:/*#__PURE__*/_jsx(\"svg\",{width:faqStyles.chevronSize,viewBox:\"6 1 12 20\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{fill:\"none\",stroke:\"currentColor\",strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:\"2\",d:\"M17 10l-5 5-5-5\"})})})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:isOpen&&/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:{height:\"auto\",opacity:1},exit:{height:0,opacity:0},transition:transition,style:answerContainerStyle,children:/*#__PURE__*/_jsx(\"div\",{style:answerStyle,dangerouslySetInnerHTML:{__html:answer.replace(/<a\\b([^>]*)>/gi,`<a onclick=\"event.stopPropagation()\" style=\"color: ${linkStyle.color}; text-decoration: ${linkStyle.textDecoration};\" $1>`)}})})})]});};FAQ.defaultProps={items:[{question:\"How do I set it up, is it easy?\",answer:\"It's pretty simple, just go to the property controls, start adding your questions, then play around with the font styling.\"},{question:\"Oh it also uses Framer's native transitions?\",answer:\"Yes, this uses Framer's native transition library, Framer motion, so you won't miss anything.\"},{question:\"Thank you for using Eleveight Supply!\",answer:\"Enjoy your new components, keep saving precious time and continue creating amazing stuff\"}],questionStyles:{questionFont:{family:\"Inter\",size:16,weight:400,letterSpacing:\"normal\",lineHeight:\"normal\"},questionColor:\"#ffffff\",questionAnswerSpacing:10},answerStyles:{answerFont:{family:\"Inter\",size:16,weight:400,letterSpacing:\"normal\",lineHeight:\"normal\"},answerColor:\"#ffffff\"},linkStyles:{linkColor:\"#007aff\",underline:true},faqStyles:{faqFill:\"#0d0d0d\",faqBorder:{color:\"#171717\",width:1,style:\"solid\"},containerSpacing:8,faqBorderRadiusTopLeft:10,faqBorderRadiusTopRight:10,faqBorderRadiusBottomRight:10,faqBorderRadiusBottomLeft:10,faqPaddingTop:16,faqPaddingRight:16,faqPaddingBottom:16,faqPaddingLeft:16,chevronSize:12},transition:{type:\"spring\",stiffness:400,damping:50}};addPropertyControls(FAQ,{items:{type:ControlType.Array,defaultValue:[{question:\"How do I set it up, is it easy?\",answer:\"It's pretty simple, just go to the property controls, start adding your questions, then play around with the font styling.\"},{question:\"Oh it also uses Framer's native transitions?\",answer:\"Yes, this uses Framer's native transition library, Framer motion, so you won't miss anything.\"},{question:\"Thank you for using Eleveight Supply!\",answer:\"Enjoy your new components, keep saving precious time and continue creating amazing stuff\"}],propertyControl:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",control:ControlType.StringArea,defaultValue:\"\",description:\"For links use: <a href='yourlink'>text</a>\"}}},title:\"FAQ Items\"},questionStyles:{type:ControlType.Object,title:\"[Q] Font\",controls:{questionFont:{type:ControlType.Font,title:\"Font\",defaultValue:\"Inter\",controls:\"extended\"},questionColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},questionAnswerSpacing:{type:ControlType.Number,title:\"Gap\",defaultValue:10,displayStepper:true,unit:\"px\",description:\"Gap between the Question and answer\"}}},answerStyles:{type:ControlType.Object,title:\"[A] Font\",controls:{answerFont:{type:ControlType.Font,title:\"Font\",defaultValue:\"Inter\",controls:\"extended\"},answerColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"}}},linkStyles:{type:ControlType.Object,title:\"[Link] Style\",controls:{linkColor:{type:ControlType.Color,title:\"Link Color\",defaultValue:\"#007aff\"},underline:{type:ControlType.Boolean,title:\"Underline\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}}},faqStyles:{type:ControlType.Object,title:\"Styles\",controls:{faqFill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#fff\"},faqBorder:{type:ControlType.Object,title:\"Border\",controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#171717\"},width:{type:ControlType.Number,title:\"Width\",min:0,max:10,defaultValue:1,unit:\"px\"},style:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\"],defaultValue:\"solid\"}}},containerSpacing:{type:ControlType.Number,title:\"Rows Gap\",defaultValue:16,unit:\"px\"},faqBorderRadius:{type:ControlType.FusedNumber,title:\"Radius\",defaultValue:10,toggleKey:\"uniformBorderRadius\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"faqBorderRadiusTopLeft\",\"faqBorderRadiusTopRight\",\"faqBorderRadiusBottomRight\",\"faqBorderRadiusBottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0},faqPadding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:16,toggleKey:\"uniformPadding\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"faqPaddingTop\",\"faqPaddingRight\",\"faqPaddingBottom\",\"faqPaddingLeft\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0},chevronSize:{type:ControlType.Number,title:\"Chevron Size\",defaultValue:12,unit:\"px\",min:1,max:30,displayStepper:true}}},transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"spring\",stiffness:400,damping:50}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQ\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"100%\",\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"300\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ.map"],"mappings":"A,yOASG,SAAwBa,EAAI,EAAM,CAAC,GAAK,CAAC,MAAMC,EAAY,iBAAe,eAAa,YAAU,aAAW,cAAYC,EACrHC,EAAMF,GAAaA,EAAY,OAAO,EAAEA,EAAYD,EAAI,aAAa,MAAW,CAACI,EAAUC,GAAclB,EAAS,IAAI,EAAQmB,EAAO,GAAO,CAACD,EAAaD,IAAYG,EAAM,KAAKA,CAAK,CAAE,EAAE,MAAoB,gBAAK,MAAM,CAAC,SAASJ,EAAM,KAAK,EAAK,IAAqB,gBAAKK,EAAQ,CAAC,SAASC,EAAK,SAAS,OAAOA,EAAK,OAAO,OAAOL,IAAYG,EAAM,WAAWD,EAAOC,CAAK,EAAiB,iBAA4B,eAAwB,aAAW,WAAWA,IAAQJ,EAAM,OAAO,EAAY,YAAqB,Y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