{"version":3,"file":"ReadMoreStack.BAzUm-ON.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/4DYUihjlqIPCDdvKHXfD/NBzeFO6NO5XetBoUo482/ReadMoreStack.js"],"sourcesContent":["// Read More component that can expand/collapse external Stack content\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Read More Component\n *\n * A component that shows a \"Read More\" link and expands to reveal external Stack content when clicked.\n * Place this component in the same Stack as a Stack named \"Expander\" (or custom name) to control its visibility.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function ReadMore(props){const{expanderName,readMoreText,readLessText,showReadLess,linkColor,linkFont,initiallyExpanded,triggerBackground,triggerPadding,showChevron,chevronColor}=props;const[isExpanded,setIsExpanded]=useState(initiallyExpanded);// Find and control the external Stack\nuseEffect(()=>{if(typeof window===\"undefined\")return;const findExpanderStack=()=>{// Look for elements with data-framer-name attribute matching our target\nconst expanderElements=document.querySelectorAll(`[data-framer-name=\"${expanderName}\"]`);if(expanderElements.length>0){expanderElements.forEach(element=>{const htmlElement=element;// Add transition styles for smooth animation\nhtmlElement.style.transition=\"all 0.3s ease\";htmlElement.style.overflow=\"hidden\";if(isExpanded){// Show and animate in\nhtmlElement.style.display=\"flex\";htmlElement.style.opacity=\"0\";htmlElement.style.maxHeight=\"0px\";// Force reflow then animate\nrequestAnimationFrame(()=>{htmlElement.style.opacity=\"1\";htmlElement.style.maxHeight=\"8000px\"// Large enough value\n;});}else{// Animate out then hide\nhtmlElement.style.opacity=\"0\";htmlElement.style.maxHeight=\"0px\";// Hide after animation completes\nsetTimeout(()=>{if(htmlElement.style.opacity===\"0\"){htmlElement.style.display=\"none\";}},300);}});}};// Initial setup\nfindExpanderStack();// Set up observer to handle dynamic content\nconst observer=new MutationObserver(()=>{findExpanderStack();});observer.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:[\"data-framer-name\"]});return()=>observer.disconnect();},[isExpanded,expanderName]);const toggleExpanded=()=>{startTransition(()=>{setIsExpanded(!isExpanded);});};const shouldShowToggle=!isExpanded||isExpanded&&showReadLess;return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",display:\"flex\",flexDirection:\"column\"},children:shouldShowToggle&&/*#__PURE__*/_jsxs(\"button\",{onClick:toggleExpanded,style:{background:triggerBackground,border:\"none\",padding:triggerPadding,margin:0,cursor:\"pointer\",color:linkColor,alignSelf:\"flex-start\",borderRadius:\"4px\",display:\"flex\",alignItems:\"center\",gap:\"8px\",transition:\"all 0.2s ease\",...linkFont},onMouseEnter:e=>{e.currentTarget.style.opacity=\"0.7\";},onMouseLeave:e=>{e.currentTarget.style.opacity=\"1\";},children:[isExpanded?readLessText:readMoreText,showChevron&&/*#__PURE__*/_jsx(\"svg\",{width:\"12\",height:\"12\",viewBox:\"0 0 24 24\",fill:\"none\",style:{transform:isExpanded?\"rotate(180deg)\":\"rotate(0deg)\",transition:\"transform 0.2s ease\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9L12 15L18 9\",stroke:chevronColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]})});}addPropertyControls(ReadMore,{expanderName:{type:ControlType.String,title:\"Stack Name\",defaultValue:\"Expander\",placeholder:\"Enter Stack name to control\"},readMoreText:{type:ControlType.String,title:\"Read More Text\",defaultValue:\"Read More\"},readLessText:{type:ControlType.String,title:\"Read Less Text\",defaultValue:\"Read Less\"},showReadLess:{type:ControlType.Boolean,title:\"Show Read Less\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},linkColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#0066FF\"},linkFont:{type:ControlType.Font,title:\"Link Font\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},triggerBackground:{type:ControlType.Color,title:\"Background\",defaultValue:\"transparent\"},triggerPadding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"},showChevron:{type:ControlType.Boolean,title:\"Show Chevron\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},chevronColor:{type:ControlType.Color,title:\"Chevron Color\",defaultValue:\"#0066FF\",hidden:({showChevron})=>!showChevron},initiallyExpanded:{type:ControlType.Boolean,title:\"Initially Expanded\",defaultValue:false,enabledTitle:\"Expanded\",disabledTitle:\"Collapsed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReadMore\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReadMoreStack.map"],"mappings":"6MASG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,eAAa,eAAa,eAAa,eAAa,YAAU,WAAS,oBAAkB,oBAAkB,iBAAe,cAAY,gBAAc,EAAW,CAAC,EAAW,GAAeA,EAAS,CAAiB,EACrQ,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAsB,CACjF,IAAM,EAAiB,SAAS,iBAAiB,sBAAsB,EAAa,GAAG,EAAK,EAAiB,OAAO,GAAG,EAAiB,QAAQ,GAAS,CAAC,IAAM,EAAY,EAC5K,EAAY,MAAM,WAAW,gBAAgB,EAAY,MAAM,SAAS,SAAY,GACpF,EAAY,MAAM,QAAQ,OAAO,EAAY,MAAM,QAAQ,IAAI,EAAY,MAAM,UAAU,MAC3F,0BAA0B,CAAC,EAAY,MAAM,QAAQ,IAAI,EAAY,MAAM,UAAU,QACpF,CAAC,IACF,EAAY,MAAM,QAAQ,IAAI,EAAY,MAAM,UAAU,MAC1D,eAAe,CAAI,EAAY,MAAM,UAAU,MAAK,EAAY,MAAM,QAAQ,OAAQ,EA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