{"version":3,"file":"ResponsiveStack.DSKawPBN.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/N0h7kN9hQBHvw9gGFBE4/f1nPnb2uUAXrw6AGiwrm/ResponsiveStack.js"],"sourcesContent":["// Stack component with dynamic left padding based on max-width of 1440px\n// Height is fit content (auto)\n// Left padding aligns with left edge of centered container with max-width\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function ResponsiveStack(props){const{children,gap,backgroundColor,paddingTop,paddingBottom,paddingRight,style}=props;const containerRef=useRef(null);const[leftPadding,setLeftPadding]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const updatePadding=()=>{// Calculate padding to align with left edge of centered max-width container\n// Formula: (viewport width - max width) / 2 + 20px extra\nconst viewportWidth=window.innerWidth;const calculatedPadding=Math.max(0,(viewportWidth-1440)/2)+20;startTransition(()=>{setLeftPadding(calculatedPadding);});};updatePadding();window.addEventListener(\"resize\",updatePadding);return()=>{window.removeEventListener(\"resize\",updatePadding);};},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...style,width:\"100vw\",height:\"auto\",display:\"flex\",flexDirection:\"column\",gap:`${gap}px`,backgroundColor,paddingLeft:`${leftPadding}px`,paddingTop:`${paddingTop}px`,paddingBottom:`${paddingBottom}px`,paddingRight:`${paddingRight}px`,boxSizing:\"border-box\",position:\"relative\"},children:[leftPadding>0&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:`${leftPadding}px`,height:\"100%\",backgroundColor:\"#FFFFFF\",zIndex:1,pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"contents\"},children:children})]});}addPropertyControls(ResponsiveStack,{children:{type:ControlType.Slot,title:\"Children\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},paddingTop:{type:ControlType.Number,title:\"Padding Top\",defaultValue:20,min:0,max:200,step:1,unit:\"px\"},paddingBottom:{type:ControlType.Number,title:\"Padding Bottom\",defaultValue:20,min:0,max:200,step:1,unit:\"px\"},paddingRight:{type:ControlType.Number,title:\"Padding Right\",defaultValue:20,min:0,max:200,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ResponsiveStack\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ResponsiveStack.map"],"mappings":"oNAMG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,WAAS,MAAI,kBAAgB,aAAW,gBAAc,eAAa,SAAO,EAAY,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAY,GAAgBC,EAAS,EAAE,CAEiF,OAFhF,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAkB,CAEnS,IAAM,EAAc,EAAO,WAAiB,EAAkB,KAAK,IAAI,GAAG,EAAc,MAAM,EAAE,CAAC,GAAG,MAAoB,CAAC,EAAe,EAAkB,EAAG,EAAmE,OAAhE,GAAe,CAAC,EAAO,iBAAiB,SAAS,EAAc,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAc,GAAK,EAAE,CAAC,CAAqB,EAAM,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,GAAG,EAAI,IAAI,kBAAgB,YAAY,GAAG,EAAY,IAAI,WAAW,GAAG,EAAW,IAAI,cAAc,GAAG,EAAc,IAAI,aAAa,GAAG,EAAa,IA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