{
  "version": 3,
  "sources": ["ssg: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\u2122. 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": "qHASkB,SAARA,EAAqBC,EAAM,CAAC,GAAK,CAAC,MAAMC,EAAY,eAAAC,EAAe,aAAAC,EAAa,UAAAC,EAAU,WAAAC,EAAW,WAAAC,CAAU,EAAEN,EACrHO,EAAMN,GAAaA,EAAY,OAAO,EAAEA,EAAYF,EAAI,aAAa,MAAW,CAACS,EAAUC,CAAY,EAAEC,EAAS,IAAI,EAAQC,EAAOC,GAAO,CAACH,EAAaD,IAAYI,EAAM,KAAKA,CAAK,CAAE,EAAE,OAAoBC,EAAK,MAAM,CAAC,SAASN,EAAM,IAAI,CAACO,EAAKF,IAAqBC,EAAKE,EAAQ,CAAC,SAASD,EAAK,SAAS,OAAOA,EAAK,OAAO,OAAON,IAAYI,EAAM,OAAO,IAAID,EAAOC,CAAK,EAAE,eAAeV,EAAe,aAAaC,EAAa,WAAWE,EAAW,WAAWO,IAAQL,EAAM,OAAO,EAAE,UAAUH,EAAU,WAAWE,CAAU,EAAEM,CAAK,CAAC,CAAC,CAAC,CAAE,CAAC,IAAMG,EAAQ,CAAC,CAAC,SAAAC,EAAS,OAAAC,EAAO,OAAAC,EAAO,OAAAP,EAAO,eAAAT,EAAe,aAAAC,EAAa,WAAAE,EAAW,WAAAc,EAAW,UAAAf,EAA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C,EAAE,WAAW,CAAC,KAAKA,EAAY,WAAW,MAAM,aAAa,aAAa,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC",
  "names": ["FAQ", "props", "passedItems", "questionStyles", "answerStyles", "faqStyles", "linkStyles", "transition", "items", "openIndex", "setOpenIndex", "ye", "toggle", "index", "p", "item", "FAQItem", "question", "answer", "isOpen", "isLastItem", "containerStyle", "questionStyle", "answerContainerStyle", "answerStyle", "iconStyle", "linkStyle", "u", "motion", "AnimatePresence", "addPropertyControls", "ControlType"]
}
