{"version":3,"file":"ReadMoreStack.BRajX1NE.mjs","names":["useState","__esmMin","window","te","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","addPropertyControls","init_framer_DKWANagr","ControlType","ReadMore","props","isExpanded","setIsExpanded","initiallyExpanded","findExpanderStack","expanderElements","expanderName","htmlElement","element","observer","toggleExpanded","shouldShowToggle","showReadLess","triggerBackground","triggerPadding","linkColor","linkFont","readLessText","readMoreText","showChevron","chevronColor","init_ReadMoreStack"],"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":"A,6MASG,SAAwBc,EAAS,EAAM,CAAC,GAAK,CAAC,eAAa,eAAa,eAAa,eAAa,YAAU,WAAS,oBAAkB,oBAAkB,iBAAe,cAAY,gBAAcC,EAAW,CAACC,EAAWC,GAAejB,EAASkB,CAAiB,EACrQR,MAAc,CAAC,GAAUR,IAAS,OAAY,OAAO,IAAMiB,MAAsB,CACjF,IAAMC,EAAiB,SAAS,iBAAiB,sBAAsBC,EAAa,GAAG,EAAKD,EAAiB,OAAO,GAAGA,EAAiB,QAAQ,GAAS,CAAC,IAAME,EAAYC,EAC5K,EAAY,MAAM,WAAW,gBAAgB,EAAY,MAAM,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