{"version":3,"file":"WeeeeHeader.DSLJU7P-.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/issqvrt5C1GdDQyzzcXE/kKjorP2V8COGXCVy8BHM/WeeeeHeader.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useState,useEffect}from\"react\";import{createPortal}from\"react-dom\";/**\n * WEEEE Header Component v5.1\n *\n * v5.1 dual-render strategy — works in BOTH Framer canvas AND runtime:\n *  - In Framer canvas (editor design view): render header in-flow so the\n *    designer can see it. No fixed positioning, no Portal.\n *  - In Framer preview / published runtime: Portal the header to\n *    document.body with position: fixed to escape Framer Frame's\n *    stacking context (which would otherwise trap z-index and let\n *    content scroll over the header).\n *  - Branch chosen via RenderTarget.current() from \"framer\".\n *  - A spacer div is rendered in flow during runtime to reserve the\n *    header height (since the fixed header is out of normal flow).\n *  - Mobile menu also via Portal (kept from v4).\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 80\n */export default function WeeeeHeader(props){const{logoUrl,menuLink,reserveLink,memberHubLink,orderLink,backgroundColor,textColor,accentColor}=props;const[menuOpen,setMenuOpen]=useState(false);const[mounted,setMounted]=useState(false);// Portal 需要 document，SSR/Framer 预览阶段不可用，等挂载后再渲染\nuseEffect(()=>{setMounted(true);},[]);// 菜单打开时锁住 body 滚动\nuseEffect(()=>{if(typeof document===\"undefined\")return;if(menuOpen){const prev=document.body.style.overflow;document.body.style.overflow=\"hidden\";return()=>{document.body.style.overflow=prev;};}},[menuOpen]);// ESC 关闭\nuseEffect(()=>{if(!menuOpen)return;const onKey=e=>{if(e.key===\"Escape\")setMenuOpen(false);};window.addEventListener(\"keydown\",onKey);return()=>window.removeEventListener(\"keydown\",onKey);},[menuOpen]);const menuItems=[{label:\"WEEEE MENU\",url:menuLink},{label:\"RESERVE\",url:reserveLink},{label:\"MEMBER HUB\",url:memberHubLink},{label:\"ORDER NOW\",url:orderLink}];const id=\"weeee-hdr-v4\";const overlay=/*#__PURE__*/_jsxs(\"div\",{className:`${id}-overlay ${menuOpen?\"open\":\"\"}`,role:\"dialog\",\"aria-modal\":\"true\",\"aria-hidden\":!menuOpen,children:[/*#__PURE__*/_jsxs(\"div\",{className:`${id}-overlay-top`,children:[/*#__PURE__*/_jsx(\"a\",{href:\"/\",className:`${id}-overlay-logo`,onClick:()=>setMenuOpen(false),children:logoUrl?/*#__PURE__*/_jsx(\"img\",{src:logoUrl,alt:\"WEEEE\"}):/*#__PURE__*/_jsxs(\"span\",{className:\"text\",children:[\"w\",/*#__PURE__*/_jsx(\"span\",{children:\"eeee\"})]})}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:`${id}-close`,onClick:()=>setMenuOpen(false),\"aria-label\":\"Close menu\",children:[/*#__PURE__*/_jsx(\"span\",{}),/*#__PURE__*/_jsx(\"span\",{})]})]}),/*#__PURE__*/_jsx(\"nav\",{className:`${id}-overlay-nav`,children:menuItems.map((item,i)=>/*#__PURE__*/_jsxs(\"a\",{href:item.url,onClick:()=>setMenuOpen(false),style:{transitionDelay:`${.05+i*.05}s`},children:[/*#__PURE__*/_jsx(\"span\",{className:\"num\",children:String(i+1).padStart(2,\"0\")}),/*#__PURE__*/_jsx(\"span\",{className:\"label\",children:item.label})]},item.label))}),/*#__PURE__*/_jsxs(\"div\",{className:`${id}-overlay-foot`,children:[/*#__PURE__*/_jsx(\"span\",{children:\"WEEEE BY WELEMON\"}),/*#__PURE__*/_jsx(\"span\",{children:\"\\xb7 KL \\xb7\"})]})]});const renderTarget=RenderTarget.current();const isCanvas=renderTarget===RenderTarget.canvas;const headerInner=/*#__PURE__*/_jsxs(\"div\",{className:`${id}-row`,children:[/*#__PURE__*/_jsx(\"a\",{href:\"/\",className:`${id}-logo`,children:logoUrl?/*#__PURE__*/_jsx(\"img\",{src:logoUrl,alt:\"WEEEE\"}):/*#__PURE__*/_jsxs(\"span\",{className:\"text\",children:[\"w\",/*#__PURE__*/_jsx(\"span\",{children:\"eeee\"})]})}),/*#__PURE__*/_jsx(\"nav\",{className:`${id}-nav-desktop`,children:menuItems.map(item=>/*#__PURE__*/_jsx(\"a\",{href:item.url,children:item.label},item.label))}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:`${id}-burger`,onClick:()=>setMenuOpen(true),\"aria-label\":\"Open menu\",\"aria-expanded\":menuOpen,children:[/*#__PURE__*/_jsx(\"span\",{}),/*#__PURE__*/_jsx(\"span\",{}),/*#__PURE__*/_jsx(\"span\",{})]})]});const headerFixed=/*#__PURE__*/_jsx(\"div\",{className:`${id}-fixed`,children:headerInner});const headerCanvas=/*#__PURE__*/_jsx(\"div\",{className:`${id}-canvas-wrap`,children:headerInner});return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                /* fixed wrapper — Portaled to document.body so z-index escapes Framer Frames */\n                .${id}-fixed {\n                    position: fixed;\n                    top: 0;\n                    left: 0;\n                    right: 0;\n                    width: 100vw;\n                    background: ${backgroundColor};\n                    z-index: 2147483646;\n                    box-sizing: border-box;\n                    font-family: Inter, -apple-system, sans-serif;\n                }\n                /* spacer in original placement — reserves the header height in flow (runtime only) */\n                .${id}-spacer {\n                    width: 100%;\n                    height: 80px;\n                }\n                @media (max-width: 809px) {\n                    .${id}-spacer { height: 64px; }\n                }\n                /* canvas wrapper — header rendered in-flow inside Framer editor */\n                .${id}-canvas-wrap {\n                    width: 100vw;\n                    max-width: 100vw;\n                    background: ${backgroundColor};\n                    box-sizing: border-box;\n                    font-family: Inter, -apple-system, sans-serif;\n                }\n\n                .${id}-row {\n                    display: flex;\n                    justify-content: space-between;\n                    align-items: center;\n                    padding: 20px 40px;\n                    max-width: 1400px;\n                    margin: 0 auto;\n                    box-sizing: border-box;\n                }\n                .${id}-logo {\n                    display: flex;\n                    align-items: center;\n                    text-decoration: none;\n                }\n                .${id}-logo img { height: 40px; width: auto; display: block; }\n                .${id}-logo .text { font-weight: 900; font-size: 26px; letter-spacing: -1px; color: ${textColor}; }\n                .${id}-logo .text span { color: ${accentColor}; }\n\n                .${id}-nav-desktop {\n                    display: flex;\n                    gap: 32px;\n                    align-items: center;\n                }\n                .${id}-nav-desktop a {\n                    color: ${accentColor};\n                    text-decoration: underline;\n                    text-decoration-thickness: 2px;\n                    text-underline-offset: 4px;\n                    font-size: 13px;\n                    font-weight: 600;\n                    letter-spacing: 1.2px;\n                    transition: opacity 0.2s;\n                }\n                .${id}-nav-desktop a:hover { opacity: 0.7; }\n\n                .${id}-burger {\n                    display: none;\n                    background: transparent;\n                    border: none;\n                    cursor: pointer;\n                    padding: 8px;\n                    flex-direction: column;\n                    gap: 5px;\n                }\n                .${id}-burger span {\n                    display: block;\n                    width: 24px;\n                    height: 2.5px;\n                    background-color: ${textColor};\n                    border-radius: 2px;\n                }\n\n                @media (max-width: 809px) {\n                    .${id}-row { padding: 16px 20px; }\n                    .${id}-logo img { height: 32px; }\n                    .${id}-logo .text { font-size: 22px; }\n                    .${id}-nav-desktop { display: none; }\n                    .${id}-burger { display: flex; }\n                }\n\n                /* ===== 全屏 overlay 菜单（手机）===== */\n                .${id}-overlay {\n                    position: fixed;\n                    inset: 0;\n                    z-index: 2147483647;\n                    background-color: ${textColor};\n                    color: ${accentColor};\n                    display: flex;\n                    flex-direction: column;\n                    padding: 20px;\n                    box-sizing: border-box;\n                    opacity: 0;\n                    pointer-events: none;\n                    transform: translateY(-12px);\n                    transition: opacity 0.25s ease, transform 0.25s ease;\n                    font-family: Inter, -apple-system, sans-serif;\n                }\n                .${id}-overlay.open {\n                    opacity: 1;\n                    pointer-events: auto;\n                    transform: translateY(0);\n                }\n                /* desktop 永远不显示 overlay，桌面用 nav-desktop */\n                @media (min-width: 810px) {\n                    .${id}-overlay { display: none !important; }\n                }\n\n                .${id}-overlay-top {\n                    display: flex;\n                    justify-content: space-between;\n                    align-items: center;\n                    padding: 0 4px;\n                }\n                .${id}-overlay-logo { display: flex; align-items: center; text-decoration: none; }\n                .${id}-overlay-logo img { height: 32px; width: auto; display: block; filter: brightness(0) invert(1); }\n                .${id}-overlay-logo .text { font-weight: 900; font-size: 22px; letter-spacing: -1px; color: ${backgroundColor}; }\n                .${id}-overlay-logo .text span { color: ${accentColor}; }\n\n                .${id}-close {\n                    position: relative;\n                    width: 40px;\n                    height: 40px;\n                    background: transparent;\n                    border: none;\n                    cursor: pointer;\n                    padding: 0;\n                }\n                .${id}-close span {\n                    position: absolute;\n                    left: 8px;\n                    right: 8px;\n                    top: 50%;\n                    height: 2.5px;\n                    background-color: ${accentColor};\n                    border-radius: 2px;\n                }\n                .${id}-close span:nth-child(1) { transform: rotate(45deg); }\n                .${id}-close span:nth-child(2) { transform: rotate(-45deg); }\n\n                .${id}-overlay-nav {\n                    flex: 1;\n                    display: flex;\n                    flex-direction: column;\n                    justify-content: center;\n                    gap: 4px;\n                    padding: 0 4px;\n                }\n                .${id}-overlay-nav a {\n                    display: flex;\n                    align-items: baseline;\n                    gap: 16px;\n                    color: ${accentColor};\n                    text-decoration: none;\n                    padding: 14px 0;\n                    border-bottom: 1px solid ${accentColor}33;\n                    opacity: 0;\n                    transform: translateX(-12px);\n                    transition: opacity 0.3s ease, transform 0.3s ease;\n                }\n                .${id}-overlay.open .${id}-overlay-nav a {\n                    opacity: 1;\n                    transform: translateX(0);\n                }\n                .${id}-overlay-nav .num {\n                    font-size: 12px;\n                    font-weight: 600;\n                    letter-spacing: 1.5px;\n                    opacity: 0.55;\n                    min-width: 28px;\n                }\n                .${id}-overlay-nav .label {\n                    font-size: clamp(28px, 9vw, 48px);\n                    font-weight: 900;\n                    letter-spacing: -0.5px;\n                    line-height: 1;\n                }\n\n                .${id}-overlay-foot {\n                    display: flex;\n                    justify-content: space-between;\n                    align-items: center;\n                    padding: 16px 4px 4px;\n                    font-size: 11px;\n                    font-weight: 600;\n                    letter-spacing: 2px;\n                    color: ${accentColor};\n                    opacity: 0.55;\n                }\n            `}),isCanvas?headerCanvas:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{className:`${id}-spacer`}),mounted&&typeof document!==\"undefined\"&&/*#__PURE__*/createPortal(headerFixed,document.body)]}),mounted&&typeof document!==\"undefined\"&&/*#__PURE__*/createPortal(overlay,document.body)]});}addPropertyControls(WeeeeHeader,{logoUrl:{type:ControlType.Image,title:\"Logo\"},menuLink:{type:ControlType.Link,title:\"Menu link\",defaultValue:\"/menu\"},reserveLink:{type:ControlType.Link,title:\"Reserve link\",defaultValue:\"/reserve\"},memberHubLink:{type:ControlType.Link,title:\"Member hub link\",defaultValue:\"/loyalty\"},orderLink:{type:ControlType.Link,title:\"Order link\",defaultValue:\"/\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text color\",defaultValue:\"#1A1A1A\"},accentColor:{type:ControlType.Color,title:\"Accent color\",defaultValue:\"#FFD400\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WeeeeHeader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"80\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"1200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WeeeeHeader.map"],"mappings":"6NAmBG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,UAAQ,WAAS,cAAY,gBAAc,YAAU,kBAAgB,YAAU,eAAa,EAAW,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAC3O,MAAc,CAAC,EAAW,GAAK,EAAG,EAAE,CAAC,CACrC,MAAc,CAAI,YAAO,SAAW,MAAsB,EAAS,CAAC,IAAM,EAAK,SAAS,KAAK,MAAM,SAA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