{"version":3,"file":"FaqComponent.isWIky2t.mjs","names":["useState","useId","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/qC727YMEt2aM15Js1EY3/5ScVPADIVdzAhvnOYN3v/FaqComponent.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useCallback,useMemo,useId}from\"react\";/** px -> rem (16px root) */const rem=px=>`${px/16}rem`;/**\n * FAQ\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 400\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FaqComponent({faqs=[],columns=2,gap=24,duration=.3,borderColor=\"#1d1c1c\",borderColorOpen=\"#1d1c1c\",borderWidth=1,iconSize=16,iconColor=\"#1d1c1c\",iconStrokeWidth=1.5,questionFont=\"Milling Duplex 1 mm\",questionSize=16,questionWeight=400,questionLineHeight=1.5,questionColor=\"#1d1c1c\",questionMaxWidth=0,answerFont=\"Milling Duplex 1 mm\",answerSize=16,answerWeight=400,answerLineHeight=1.5,answerColor=\"#1d1c1c\",answerMaxWidth=0,linkColor=\"#1d1c1c\",linkHoverColor=\"#1d1c1c\",linkUnderline=true}){const[openIndex,setOpenIndex]=useState(null);// Unique, stable scope so multiple instances never collide\nconst scope=`faq-${useId().replace(/[^a-zA-Z0-9]/g,\"\")}`;const toggleFaq=useCallback(index=>{setOpenIndex(prev=>prev===index?null:index);},[]);const rows=useMemo(()=>{const out=[];for(let i=0;i<faqs.length;i+=columns){out.push(faqs.slice(i,i+columns));}return out;},[faqs,columns]);// All theming lives in CSS custom properties -> one small inline object,\n// instead of ~8 new style objects per FAQ item on every render.\nconst vars=useMemo(()=>({\"--faq-gap\":rem(gap),\"--faq-dur\":`${duration}s`,\"--faq-border-c\":borderColor,\"--faq-border-c-open\":borderColorOpen,\"--faq-border-w\":rem(borderWidth),\"--faq-icon-size\":rem(iconSize),\"--faq-icon-c\":iconColor,\"--faq-icon-sw\":String(iconStrokeWidth),\"--faq-q-font\":questionFont,\"--faq-q-size\":rem(questionSize),\"--faq-q-weight\":String(questionWeight),\"--faq-q-lh\":String(questionLineHeight),\"--faq-q-color\":questionColor,\"--faq-q-max\":questionMaxWidth>0?rem(questionMaxWidth):\"none\",\"--faq-a-font\":answerFont,\"--faq-a-size\":rem(answerSize),\"--faq-a-weight\":String(answerWeight),\"--faq-a-lh\":String(answerLineHeight),\"--faq-a-color\":answerColor,\"--faq-a-max\":answerMaxWidth>0?rem(answerMaxWidth):\"none\",\"--faq-link\":linkColor,\"--faq-link-hover\":linkHoverColor,\"--faq-link-dec\":linkUnderline?\"underline\":\"none\"}),[gap,duration,borderColor,borderColorOpen,borderWidth,iconSize,iconColor,iconStrokeWidth,questionFont,questionSize,questionWeight,questionLineHeight,questionColor,questionMaxWidth,answerFont,answerSize,answerWeight,answerLineHeight,answerColor,answerMaxWidth,linkColor,linkHoverColor,linkUnderline]);// Only recomputed when the scope or column count changes\nconst css=useMemo(()=>`\n.${scope}{width:100%;display:flex;flex-direction:column;gap:var(--faq-gap);}\n.${scope} .faq-row{display:grid;grid-template-columns:repeat(${columns},minmax(0,1fr));gap:var(--faq-gap);}\n.${scope} .faq-item{display:flex;flex-direction:column;padding-bottom:var(--faq-gap);border-bottom:var(--faq-border-w) solid var(--faq-border-c);transition:border-color var(--faq-dur) ease;}\n.${scope} .faq-item[data-open=\"true\"]{border-bottom-color:var(--faq-border-c-open);}\n.${scope} .faq-q{display:flex;justify-content:space-between;align-items:flex-start;width:100%;margin:0;padding:0;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;}\n.${scope} .faq-q-text{flex:1;font-family:var(--faq-q-font);font-weight:var(--faq-q-weight);font-size:var(--faq-q-size);line-height:var(--faq-q-lh);color:var(--faq-q-color);max-width:var(--faq-q-max);}\n.${scope} .faq-icon{flex:0 0 auto;width:var(--faq-icon-size);height:var(--faq-icon-size);margin-left:0.75rem;margin-top:0.25rem;transform:rotate(0deg);transition:transform var(--faq-dur) ease;}\n.${scope} .faq-item[data-open=\"true\"] .faq-icon{transform:rotate(45deg);}\n.${scope} .faq-icon line{stroke:var(--faq-icon-c);stroke-width:var(--faq-icon-sw);}\n.${scope} .faq-a-wrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--faq-dur) ease;}\n.${scope} .faq-item[data-open=\"true\"] .faq-a-wrap{grid-template-rows:1fr;}\n.${scope} .faq-a-clip{overflow:hidden;visibility:hidden;transition:visibility 0s linear var(--faq-dur);}\n.${scope} .faq-item[data-open=\"true\"] .faq-a-clip{visibility:visible;transition-delay:0s;}\n.${scope} .faq-a{margin-top:1rem;font-family:var(--faq-a-font);font-weight:var(--faq-a-weight);font-size:var(--faq-a-size);line-height:var(--faq-a-lh);color:var(--faq-a-color);max-width:var(--faq-a-max);}\n.${scope} .faq-a > *:first-child{margin-top:0;}\n.${scope} .faq-a > *:last-child{margin-bottom:0;}\n.${scope} .faq-a p{margin:0 0 0.75em;}\n.${scope} .faq-a ul,.${scope} .faq-a ol{margin:0 0 0.75em;padding-left:1.25em;}\n.${scope} .faq-a li{margin-bottom:0.25em;}\n.${scope} .faq-a a{color:var(--faq-link);text-decoration:var(--faq-link-dec);text-underline-offset:0.15em;transition:color 0.2s ease;}\n.${scope} .faq-a a:hover{color:var(--faq-link-hover);}\n@media (max-width:809px){.${scope} .faq-row{grid-template-columns:minmax(0,1fr);}}\n@media (prefers-reduced-motion:reduce){.${scope} .faq-icon,.${scope} .faq-a-wrap,.${scope} .faq-item{transition-duration:1ms;}}\n`,[scope,columns]);return /*#__PURE__*/_jsxs(\"div\",{className:scope,style:vars,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:css}}),rows.map((row,rowIndex)=>/*#__PURE__*/_jsx(\"div\",{className:\"faq-row\",children:row.map((faq,colIndex)=>{const index=rowIndex*columns+colIndex;const isOpen=openIndex===index;const panelId=`${scope}-panel-${index}`;const buttonId=`${scope}-button-${index}`;return /*#__PURE__*/_jsxs(\"div\",{className:\"faq-item\",\"data-open\":isOpen,children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",id:buttonId,className:\"faq-q\",\"aria-expanded\":isOpen,\"aria-controls\":panelId,onClick:()=>toggleFaq(index),children:[/*#__PURE__*/_jsx(\"span\",{className:\"faq-q-text\",children:faq.question}),/*#__PURE__*/_jsxs(\"svg\",{className:\"faq-icon\",viewBox:\"0 0 16 16\",\"aria-hidden\":\"true\",focusable:\"false\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"8\",y1:\"3\",x2:\"8\",y2:\"13\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"3\",y1:\"8\",x2:\"13\",y2:\"8\"})]})]}),/*#__PURE__*/_jsx(\"div\",{className:\"faq-a-wrap\",children:/*#__PURE__*/_jsx(\"div\",{className:\"faq-a-clip\",children:/*#__PURE__*/_jsx(\"div\",{id:panelId,role:\"region\",\"aria-labelledby\":buttonId,className:\"faq-a\",dangerouslySetInnerHTML:{__html:faq.answer??\"\"}})})})]},index);})},rowIndex))]});}addPropertyControls(FaqComponent,{columns:{type:ControlType.Enum,title:\"Columns\",options:[1,2],optionTitles:[\"One\",\"Two\"],defaultValue:2},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:24,min:0,max:120,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:0,max:2,step:.05,unit:\"s\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#1d1c1c\"},borderColorOpen:{type:ControlType.Color,title:\"Border Open\",defaultValue:\"#1d1c1c\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:8,step:.5,unit:\"px\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:16,min:8,max:64,step:1},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#1d1c1c\"},iconStrokeWidth:{type:ControlType.Number,title:\"Icon Stroke\",defaultValue:1.5,min:.5,max:4,step:.1},questionFont:{type:ControlType.String,title:\"Font\",defaultValue:\"Milling Duplex 1 mm\"},questionSize:{type:ControlType.Number,title:\"Size\",defaultValue:16,min:8,max:72,step:1,unit:\"px\",description:\"Rendered in rem (\\xf716)\"},questionWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:400,min:100,max:900,step:100},questionLineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.5,min:.8,max:3,step:.1},questionColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#1d1c1c\"},questionMaxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:0,min:0,max:1200,step:10,description:\"0 = no limit\"},answerFont:{type:ControlType.String,title:\"Font\",defaultValue:\"Milling Duplex 1 mm\"},answerSize:{type:ControlType.Number,title:\"Size\",defaultValue:16,min:8,max:72,step:1,unit:\"px\",description:\"Rendered in rem (\\xf716)\"},answerWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:400,min:100,max:900,step:100},answerLineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.5,min:.8,max:3,step:.1},answerColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#1d1c1c\"},answerMaxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:0,min:0,max:1200,step:10,description:\"0 = no limit\"},linkColor:{type:ControlType.Color,title:\"Link\",defaultValue:\"#1d1c1c\"},linkHoverColor:{type:ControlType.Color,title:\"Link Hover\",defaultValue:\"#1d1c1c\"},linkUnderline:{type:ControlType.Boolean,title:\"Underline\",defaultValue:true},faqs:{type:ControlType.Array,title:\"FAQs\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true,description:'HTML allowed: <a href=\"/page\">link</a>, <strong>, <em>, <br>, <p>, <ul><li>'}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FaqComponent\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\",\"framerIntrinsicHeight\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FaqComponent.map"],"mappings":"kMAMG,SAAwB,EAAa,CAAC,OAAK,CAAC,EAAE,UAAQ,EAAE,MAAI,GAAG,WAAS,GAAG,cAAY,UAAU,kBAAgB,UAAU,cAAY,EAAE,WAAS,GAAG,YAAU,UAAU,kBAAgB,IAAI,eAAa,sBAAsB,eAAa,GAAG,iBAAe,IAAI,qBAAmB,IAAI,gBAAc,UAAU,mBAAiB,EAAE,aAAW,sBAAsB,aAAW,GAAG,eAAa,IAAI,mBAAiB,IAAI,cAAY,UAAU,iBAAe,EAAE,YAAU,UAAU,iBAAe,UAAU,gBAAc,IAAM,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,IAAI,EAC3iB,EAAM,OAAOC,EAAM,CAAC,CAAC,QAAQ,gBAAgB,EAAE,IAAU,EAAUC,EAAY,GAAO,CAAC,EAAa,GAAM,IAAO,EAAM,KAAK,CAAK,CAAE,EAAE,CAAC,CAAC,EAAQ,EAAKC,MAAY,CAAC,IAAM,EAAI,CAAC,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EAAK,OAAO,GAAG,EAAS,EAAI,KAAK,EAAK,MAAM,EAAE,EAAE,CAAO,CAAC,EAAG,OAAO,CAAI,EAAE,CAAC,EAAK,CAAO,CAAC,EA2BrQ,OAAoB,EAAM,MAAM,CAAC,UAAU,EAAM,MAzBzDA,OAAa,CAAC,YAAY,EAAI,CAAG,EAAE,YAAY,GAAG,EAAS,GAAG,iBAAiB,EAAY,sBAAsB,EAAgB,iBAAiB,EAAI,CAAW,EAAE,kBAAkB,EAAI,CAAQ,EAAE,eAAe,EAAU,gBAAgB,OAAO,CAAe,EAAE,eAAe,EAAa,eAAe,EAAI,CAAY,EAAE,iBAAiB,OAAO,CAAc,EAAE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