{"version":3,"file":"ResponsiveHeader.BPoRKC-j.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/h2Cz4JPb8mHp3ykt4yuC/gYpPyoq83hNAbgHYVPXG/ResponsiveHeader.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * RESPONSIVE HEADER with hamburger\n *\n * Collapses to a hamburger + full-screen overlay menu below the\n * `breakpoint` width. Above it, shows the horizontal nav.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */// Hardcoded fallback so links always work even if a placed instance\n// baked an older `links` array without usable urls. Edit here to change nav.\nconst NAV_FALLBACK=[{label:\"Work\",url:\"/available-work\"},{label:\"About\",url:\"/about\"},{label:\"Contact\",url:\"/contact\"},{label:\"Portfolio\",url:\"/portfolio\"}];export default function ResponsiveHeader(props){const{logoText,logoLink,links,accentText,textColor,overlayBg,breakpoint,fontFamily,navFontSize,logoFontSize,letterSpacing,paddingX,height}=props;// Use the prop links only if every item has a usable url; otherwise\n// fall back. This fixes placed instances whose baked array lost its urls.\nconst navLinks=Array.isArray(links)&&links.length&&links.every(l=>l&&l.url)?links:NAV_FALLBACK;const containerRef=useRef(null);const[isMobile,setIsMobile]=useState(false);const[open,setOpen]=useState(false);// Decide layout from the component's own rendered width so it works\n// both on the live site and inside Framer's breakpoint frames.\nuseEffect(()=>{const el=containerRef.current;if(!el)return;const measure=()=>{const w=el.getBoundingClientRect().width;setIsMobile(w>0&&w<breakpoint);};measure();const ro=new ResizeObserver(measure);ro.observe(el);// Fallback for environments without ResizeObserver width changes\nwindow.addEventListener(\"resize\",measure);return()=>{ro.disconnect();window.removeEventListener(\"resize\",measure);};},[breakpoint]);// Lock body scroll while the overlay is open.\nuseEffect(()=>{if(!open)return;const prev=document.body.style.overflow;document.body.style.overflow=\"hidden\";return()=>{document.body.style.overflow=prev;};},[open]);// Close the overlay automatically if we grow back to desktop width.\nuseEffect(()=>{if(!isMobile&&open)setOpen(false);},[isMobile,open]);const fontStack=fontFamily&&fontFamily!==\"inherit\"?fontFamily:'Switzer, \"Switzer Placeholder\", sans-serif';const baseText={fontFamily:fontStack,color:textColor,textDecoration:\"none\",letterSpacing,textTransform:\"uppercase\"};const linkStyle={...baseText,fontSize:navFontSize,fontWeight:500,whiteSpace:\"nowrap\"};const logoStyle={...baseText,fontSize:logoFontSize,fontWeight:600,whiteSpace:\"nowrap\"};const container={ref:containerRef,style:{width:\"100%\",height,boxSizing:\"border-box\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",padding:`0 ${paddingX}px`,position:\"relative\",background:\"transparent\"}};// ----- Hamburger / close button -----\nconst burgerLine=(rotate,translate)=>({position:\"absolute\",left:0,width:24,height:2,background:textColor,borderRadius:2,transition:\"transform 0.3s ease, opacity 0.2s ease\",transform:open?rotate:translate,opacity:1});const burger=/*#__PURE__*/_jsxs(\"button\",{\"aria-label\":open?\"Close menu\":\"Open menu\",onClick:()=>setOpen(o=>!o),style:{position:\"relative\",width:24,height:18,border:\"none\",background:\"transparent\",cursor:\"pointer\",padding:0,zIndex:1001},children:[/*#__PURE__*/_jsx(\"span\",{style:burgerLine(\"rotate(45deg)\",\"translateY(0px)\")}),/*#__PURE__*/_jsx(\"span\",{style:{...burgerLine(\"\",\"translateY(8px)\"),transform:open?\"scaleX(0)\":\"translateY(8px)\",opacity:open?0:1}}),/*#__PURE__*/_jsx(\"span\",{style:burgerLine(\"rotate(-45deg)\",\"translateY(16px)\")})]});return /*#__PURE__*/_jsxs(\"div\",{...container,children:[/*#__PURE__*/_jsx(\"a\",{href:logoLink,style:logoStyle,children:logoText}),!isMobile&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:24},children:[navLinks.map((l,i)=>/*#__PURE__*/_jsx(\"a\",{href:l.url,style:linkStyle,children:l.label},i)),accentText?/*#__PURE__*/_jsx(\"span\",{style:{...linkStyle,marginLeft:16},children:accentText}):null]}),isMobile&&burger,isMobile&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",inset:0,background:overlayBg,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:28,zIndex:1e3,transition:\"opacity 0.3s ease, transform 0.3s ease\",opacity:open?1:0,transform:open?\"translateY(0)\":\"translateY(-8px)\",pointerEvents:open?\"auto\":\"none\"},children:[navLinks.map((l,i)=>/*#__PURE__*/_jsx(\"a\",{href:l.url,onClick:()=>setOpen(false),style:{...linkStyle,fontSize:Math.max(navFontSize+8,20)},children:l.label},i)),accentText?/*#__PURE__*/_jsx(\"span\",{style:{...linkStyle,marginTop:12,opacity:.6},children:accentText}):null]})]});}ResponsiveHeader.defaultProps={logoText:\"ANNA SAGAN\",logoLink:\"/\",accentText:\"\\xae2026\",textColor:\"#1A1A1A\",overlayBg:\"#F4F3EE\",breakpoint:810,fontFamily:\"inherit\",navFontSize:13,logoFontSize:14,letterSpacing:\"0.12em\",paddingX:40,height:60,links:[{label:\"Work\",url:\"/available-work\"},{label:\"About\",url:\"/about\"},{label:\"Contact\",url:\"/contact\"},{label:\"Portfolio\",url:\"/portfolio\"}]};addPropertyControls(ResponsiveHeader,{logoText:{type:ControlType.String,title:\"Logo\"},logoLink:{type:ControlType.Link,title:\"Logo Link\"},links:{type:ControlType.Array,title:\"Links\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Label\"},url:{type:ControlType.String,title:\"URL\"}}},defaultValue:[{label:\"Work\",url:\"/available-work\"},{label:\"About\",url:\"/about\"},{label:\"Contact\",url:\"/contact\"},{label:\"Portfolio\",url:\"/portfolio\"}]},accentText:{type:ControlType.String,title:\"Accent\"},textColor:{type:ControlType.Color,title:\"Text\"},overlayBg:{type:ControlType.Color,title:\"Menu BG\"},breakpoint:{type:ControlType.Number,title:\"Mobile <\",min:320,max:1200,step:10,unit:\"px\"},fontFamily:{type:ControlType.String,title:\"Font\"},navFontSize:{type:ControlType.Number,title:\"Nav Size\",min:8,max:32,unit:\"px\"},logoFontSize:{type:ControlType.Number,title:\"Logo Size\",min:8,max:40,unit:\"px\"},letterSpacing:{type:ControlType.String,title:\"Tracking\"},paddingX:{type:ControlType.Number,title:\"Side Pad\",min:0,max:120,unit:\"px\"},height:{type:ControlType.Number,title:\"Height\",min:40,max:120,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ResponsiveHeader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ResponsiveHeader.map"],"mappings":"6MAU6J,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,WAAS,WAAS,QAAM,aAAW,YAAU,YAAU,aAAW,aAAW,cAAY,eAAa,gBAAc,WAAS,UAAQ,EAElV,EAAS,MAAM,QAAQ,EAAM,EAAE,EAAM,QAAQ,EAAM,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,EAAM,EAAmB,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAS,GAAaC,EAAS,GAAM,CAAM,CAAC,EAAK,GAASA,EAAS,GAAM,CAE9M,MAAc,CAAC,IAAM,EAAG,EAAa,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAM,MAAY,CAAC,IAAM,EAAE,EAAG,uBAAuB,CAAC,MAAM,EAAY,EAAE,GAAG,EAAE,EAAW,EAAG,GAAS,CAAC,IAAM,EAAG,IAAI,eAAe,EAAQ,CAC5J,OAD6J,EAAG,QAAQ,EAAG,CACrN,EAAO,iBAAiB,SAAS,EAAQ,KAAW,CAAC,EAAG,YAAY,CAAC,EAAO,oBAAoB,SAAS,EAAQ,GAAK,CAAC,EAAW,CAAC,CACnI,MAAc,CAAC,GAAG,CAAC,EAAK,OAAO,IAAM,EAAK,SAAS,KAAK,MAAM,SAA+C,MAAtC,UAAS,KAAK,MAAM,SAAS,aAAmB,C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