{"version":3,"file":"ExpandableWrapper.Dc-HgU6v.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/6fMU7j0zeLvnVd8l0OfS/tLOMicXlfYLVMBWl0TDZ/ExpandableWrapper.js"],"sourcesContent":["// Expandable wrapper component with configurable heading and body text elements\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Expandable Wrapper Component\n * \n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ExpandableWrapper(props){const{items,expandButtonText,collapseButtonText,backgroundColor,textColor,buttonColor,buttonTextColor,buttonHoverColor,buttonHoverTextColor,buttonBorderWidth,buttonBorderColor,buttonBorderRadius,headingFont,bodyFont,buttonFont,borderRadius,padding,gap,itemGap,showInPreview}=props;const[isExpanded,setIsExpanded]=useState(false);const[isHovered,setIsHovered]=useState(false);const handleToggle=()=>{startTransition(()=>{setIsExpanded(!isExpanded);});};// Show first item when collapsed, all items when expanded\nconst visibleItems=isExpanded?items:items.slice(0,1);const hasMoreItems=items.length>1;return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,width:\"100%\",backgroundColor,borderRadius,padding,display:\"flex\",flexDirection:\"column\",gap,boxSizing:\"border-box\"},children:[visibleItems.map((item,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:itemGap},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:textColor,...headingFont},children:item.heading}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:textColor,whiteSpace:\"pre-wrap\",...bodyFont},children:item.body})]},index)),hasMoreItems&&/*#__PURE__*/_jsx(\"button\",{onClick:handleToggle,style:{backgroundColor:isHovered?buttonHoverColor:buttonColor,color:isHovered?buttonHoverTextColor:buttonTextColor,border:`${buttonBorderWidth}px solid ${buttonBorderColor}`,borderRadius:buttonBorderRadius,padding:\"12px 24px\",cursor:\"pointer\",alignSelf:\"flex-start\",...buttonFont,transition:\"background-color 0.2s ease, color 0.2s ease, transform 0.2s ease\",transform:isHovered?\"scale(1.05)\":\"scale(1)\"},onMouseEnter:()=>{startTransition(()=>{setIsHovered(true);});},onMouseLeave:()=>{startTransition(()=>{setIsHovered(false);});},children:isExpanded?collapseButtonText:expandButtonText})]});}addPropertyControls(ExpandableWrapper,{items:{type:ControlType.Array,title:\"Text Items\",control:{type:ControlType.Object,controls:{heading:{type:ControlType.String,title:\"Heading\",defaultValue:\"Heading\"},body:{type:ControlType.String,title:\"Body\",defaultValue:\"Body text goes here.\",displayTextArea:true}}},defaultValue:[{heading:\"First Section\",body:\"This is the first section that's always visible. It provides an overview of the content.\"},{heading:\"Additional Details\",body:\"This section is hidden by default and appears when you click 'More Info'.\"},{heading:\"More Information\",body:\"You can add as many sections as you need. They will all be revealed when expanded.\"}]},expandButtonText:{type:ControlType.String,title:\"Expand Text\",defaultValue:\"More Info\"},collapseButtonText:{type:ControlType.String,title:\"Collapse Text\",defaultValue:\"Less Info\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#000000\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},buttonHoverColor:{type:ControlType.Color,title:\"Button Hover\",defaultValue:\"#333333\"},buttonHoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#FFFFFF\"},buttonBorderWidth:{type:ControlType.Number,title:\"Button Border\",defaultValue:0,min:0,max:10,step:1,unit:\"px\"},buttonBorderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},buttonBorderRadius:{type:ControlType.Number,title:\"Button Radius\",defaultValue:6,min:0,max:50,step:1,unit:\"px\"},headingFont:{type:ControlType.Font,title:\"Heading Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},bodyFont:{type:ControlType.Font,title:\"Body Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:24,min:0,max:100,step:1,unit:\"px\"},gap:{type:ControlType.Number,title:\"Section Gap\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},itemGap:{type:ControlType.Number,title:\"Item Gap\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ExpandableWrapper\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ExpandableWrapper.map"],"mappings":"mLAMG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,mBAAiB,qBAAmB,kBAAgB,YAAU,cAAY,kBAAgB,mBAAiB,uBAAqB,oBAAkB,oBAAkB,qBAAmB,cAAY,WAAS,aAAW,eAAa,UAAQ,MAAI,UAAQ,iBAAe,EAAW,CAAC,EAAW,GAAeA,EAAS,EAAK,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,MAAiB,CAAC,MAAoB,CAAC,EAAc,CAAC,CAAU,CAAE,CAAC,CAAE,EAChf,EAAa,EAAW,EAAM,EAAM,MAAM,EA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