@stackshift-ui/navigation 7.0.0-beta.1 → 7.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-S35O64PB.mjs";import{Button as m}from"@stackshift-ui/button";import{Container as x}from"@stackshift-ui/container";import{Flex as o}from"@stackshift-ui/flex";import{Image as c}from"@stackshift-ui/image";import{Link as d}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as p}from"@stackshift-ui/text";import g from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";function w({links:e,primaryButton:l,secondaryButton:r,logo:i}){let[t,s]=g.useState(!1),b=()=>{s(f=>!f)};return n(h,{className:"bg-background",children:[a("nav",{className:"relative py-6",children:a(x,{maxWidth:1280,children:n(o,{align:"center",justify:"between",gap:4,children:[a(N,{logo:i}),a(R,{showMenu:b}),a(u,{links:e}),a(M,{primaryButton:l,secondaryButton:r})]})})}),a(z,{menu:t,showMenu:b,links:e,primaryButton:l,secondaryButton:r})]})}function N({logo:e}){var l;return e?a("div",{className:"w-full lg:w-fit",children:a(d,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(c,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function u({links:e}){return e?a(o,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((l,r)=>n(g.Fragment,{children:[a(L,{link:l},l._key),e.length!==r+1?a(k,{}):null]},r))})}):null}function L({link:e}){return e?a("li",{children:a(m,{variant:"unstyled",as:"link",link:e,"aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function k(){return a("li",{className:"text-gray-500",children:a("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function M({primaryButton:e,secondaryButton:l}){return n(o,{align:"center",gap:4,children:[(e==null?void 0:e.label)&&a(m,{as:"link",link:e,"aria-label":e==null?void 0:e.label,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&a(m,{as:"link",link:l,"aria-label":l==null?void 0:l.label,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global",children:l==null?void 0:l.label})]})}function R({showMenu:e}){return a("div",{className:"lg:hidden",children:a(m,{"aria-label":"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[a("title",{children:"Mobile menu"}),a("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function z({menu:e,showMenu:l,links:r,primaryButton:i,secondaryButton:t}){return a(g.Fragment,{children:n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[a("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),n("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[a("div",{className:"flex items-center mb-8",children:a(m,{"aria-label":"Close navigation menu",className:"navbar-close",onClick:l,children:a("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),r&&a("ul",{children:r==null?void 0:r.map((s,b)=>a("li",{className:"mb-1",children:a(m,{as:"link",link:s,"aria-label":s==null?void 0:s.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:s==null?void 0:s.label})},b))}),n("div",{className:"mt-auto",children:[n("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&a(m,{as:"link",link:i,"aria-label":i==null?void 0:i.label,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&a(m,{as:"link",link:t,"aria-label":t==null?void 0:t.label,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),a(p,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}export{w as a};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-NAXN36LA.mjs";import{a as G}from"./chunk-UZSKH6KM.mjs";import{a as H}from"./chunk-75U64ABO.mjs";import{a as x}from"./chunk-LHY7HMPK.mjs";import{a as C}from"./chunk-3IPFZ24A.mjs";import{a as F}from"./chunk-BZOQMRPS.mjs";import{a as A}from"./chunk-KKLBGZ33.mjs";import{jsx as E}from"react/jsx-runtime";var i={variant_a:x,variant_b:C,variant_c:F,variant_d:A,variant_f:D,variant_g:G,variant_h:H},q="Navigation",z=({data:n})=>{var r,s,u,l,v,p,t,m,f,g,c,L,y,b,k,M,N,R,B,h,_,K,W,w,P,S;let e=n==null?void 0:n.variant,o=e&&(i==null?void 0:i[e]),V={logo:(s=(r=n==null?void 0:n.variants)==null?void 0:r.logo)!=null?s:void 0,links:(l=(u=n==null?void 0:n.variants)==null?void 0:u.routes)!=null?l:void 0,primaryButton:(p=(v=n==null?void 0:n.variants)==null?void 0:v.primaryButton)!=null?p:void 0,secondaryButton:(m=(t=n==null?void 0:n.variants)==null?void 0:t.secondaryButton)!=null?m:void 0,banner:(g=(f=n==null?void 0:n.variants)==null?void 0:f.banner)!=null?g:void 0,multipleLinks:(L=(c=n==null?void 0:n.variants)==null?void 0:c.multipleLinks)!=null?L:void 0,title:(b=(y=n==null?void 0:n.variants)==null?void 0:y.title)!=null?b:void 0,dropdownMenu:(M=(k=n==null?void 0:n.variants)==null?void 0:k.dropdownMenu)!=null?M:void 0,logos:(R=(N=n==null?void 0:n.variants)==null?void 0:N.logos)!=null?R:void 0,socialMedia:(h=(B=n==null?void 0:n.variants)==null?void 0:B.socialMedia)!=null?h:void 0,socialLinks:(K=(_=n==null?void 0:n.variants)==null?void 0:_.socialLinks)!=null?K:void 0,iconLinks:(w=(W=n==null?void 0:n.variants)==null?void 0:W.iconLinks)!=null?w:void 0,megaMenu:(S=(P=n==null?void 0:n.variants)==null?void 0:P.megaMenu)!=null?S:void 0};return o?E(o,{...V}):null};z.displayName=q;export{z as a};
@@ -0,0 +1 @@
1
+ import{a as b}from"./chunk-S35O64PB.mjs";import{Button as w}from"@stackshift-ui/button";import{Flex as p}from"@stackshift-ui/flex";import{Grid as _}from"@stackshift-ui/grid";import{Heading as A}from"@stackshift-ui/heading";import{Image as M}from"@stackshift-ui/image";import{Link as L}from"@stackshift-ui/link";import{Section as S}from"@stackshift-ui/section";import{Text as v}from"@stackshift-ui/text";import{useClickAway as $,useWindowScroll as k}from"@uidotdev/usehooks";import g from"classnames";import f,{createContext as I,forwardRef as R,Fragment as y,useCallback as E,useEffect as B,useMemo as j,useRef as F,useState as x}from"react";import{GoPerson as G}from"react-icons/go";import{LiaSearchSolid as H}from"react-icons/lia";import{SlLocationPin as z}from"react-icons/sl";import{Fragment as D,jsx as t,jsxs as m}from"react/jsx-runtime";var P=I(void 0),O=()=>{let e=f.useContext(P);if(!e)throw new Error("useAccordion must be used within an Accordion");return e},W=({className:e,children:a,defaultValue:n=[],onValueChange:r})=>{let[s,l]=x(n),o=f.useCallback(c=>{l(d=>{let u=d.includes(c)?d.filter(h=>h!==c):[...d,c];return r==null||r(u),u})},[r]),i=f.useMemo(()=>({openItems:s,toggleItem:o}),[s,o]);return t(P.Provider,{value:i,children:t("div",{className:g("w-full",e),children:a})})},K=({value:e,className:a,children:n})=>{let{openItems:r,toggleItem:s}=O(),l=r.includes(e);return t("div",{className:g("border-b border-gray-200",a),children:f.Children.map(n,o=>f.isValidElement(o)?f.cloneElement(o,{isOpen:l,onClick:()=>s(e)}):o)})},V=f.forwardRef(({className:e,children:a,isOpen:n,onClick:r,...s},l)=>m("button",{ref:l,type:"button",onClick:r,className:g("flex w-full items-center justify-between py-4 text-left",e),...s,children:[a,t("svg",{className:g("h-5 w-5 transform transition-transform duration-200",n?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})),J=f.forwardRef(({className:e,children:a,isOpen:n},r)=>t("div",{ref:r,className:g("overflow-hidden transition-all duration-200 ease-in-out",n?"max-h-[1000px] opacity-100":"max-h-0 opacity-0",e),children:t("div",{className:"pb-4",children:a})})),U=({data:e,showMobileMenu:a,setShowMobileMenu:n})=>{let r=$(()=>{a&&n(!1)});return a?t("div",{ref:r,className:"fixed w-[75%] h-screen top-0 right-0 bg-white md:hidden z-50 py-10 px-5 overflow-y-auto",children:t(W,{children:e==null?void 0:e.map(s=>t(T,{megaMenu:s},s._key))})}):null},T=f.memo(({megaMenu:e})=>{var a,n;return e._type==="isLinkOnly"?t(L,{href:e.linkExternal||"#",target:e.linkTarget,className:"block py-4 text-base font-medium text-gray-900 hover:text-gray-700 uppercase",children:e.label}):m(K,{value:e._key,children:[t(V,{className:"text-base font-medium text-gray-900 uppercase w-full py-4",children:e.title}),m(J,{children:[(a=e.groupOfLinks)==null?void 0:a.map(r=>{var s;return m("div",{className:"mt-4 pl-4",children:[t(v,{className:"text-black font-medium leading-[30px]",children:r.title}),t(p,{direction:"col",align:"start",justify:"start",gap:1,className:"relative w-full pl-4",children:(s=r.links)==null?void 0:s.map(l=>{var o;return m("div",{className:"mb-4",children:[t(v,{className:"text-black font-medium leading-[30px] text-sm",children:l.title}),(o=l.links)==null?void 0:o.map(i=>t(w,{as:"link",variant:"ghost",link:i,className:"text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline block ml-4",children:i.label},`MobileMenuContent-Item-Group-Link-${i._key}`))]},l._key)})})]},r._key)}),(n=e.showcaseLink)==null?void 0:n.map((r,s)=>{var l,o,i,c;return t("div",{className:"mt-4 pl-4",children:t(w,{as:"link",variant:"ghost",link:r.primaryButton,className:"text-black text-sm font-normal font-heading-kb leading-[30px]",children:m(p,{direction:"col",gap:3,children:[t(M,{src:(l=r.mainImage)==null?void 0:l.image,alt:(i=(o=r.mainImage)==null?void 0:o.alt)!=null?i:"",width:200,height:150,className:"w-[188px] h-[147px] object-cover object-center"},s),(c=r.primaryButton)==null?void 0:c.label]})})},`MobileMenuContent-Item-Images-${r._key}-${s}`)})]})]})});T.displayName="MobileMenuContentItem";function q({logo:e,iconLinks:a,megaMenu:n}){let[{y:r}]=k(),[s,l]=x(!1),[o,i]=x(""),c=F(null),d=r&&r>80?"fixed w-full transition-all duration-300 ease-in-out":"sticky transition-all duration-300 ease-in-out",u=E(h=>{c.current&&clearTimeout(c.current),h===""?c.current=setTimeout(()=>{i("")},200):i(h)},[]);return B(()=>()=>{c.current&&clearTimeout(c.current)},[]),m(D,{children:[t("header",{className:g("relative top-0 left-0 border-t md:pb-3 z-50 bg-white transition-all ease-in-out duration-300",d),children:t(Q,{logo:e,iconLinks:a,megaMenu:n,setShowMobileMenu:l,currentDropdown:o,setCurrentDropdown:u})}),t(U,{data:n,showMobileMenu:s,setShowMobileMenu:l})]})}var Q=({logo:e,iconLinks:a,megaMenu:n,setShowMobileMenu:r,currentDropdown:s,setCurrentDropdown:l})=>{var d;let[{x:o,y:i}]=k(),c=i&&i>80?"md:hidden":"";return m("div",{className:"px-0 w-full h-full transition-all duration-300 ease-in-out overflow-y-auto",children:[m(_,{columns:2,align:"center",justify:"between",gap:5,className:g("lg:pt-4 py-2 grid-cols-2 md:grid-cols-3 w-full h-full transition-all ease-in-out duration-300 px-4",c),children:[(e==null?void 0:e.image)&&t("div",{className:"relative w-20 flex items-center h-20 md:w-fit md:h-full place-self-start md:place-self-center col-start-1 md:col-start-2",children:t(L,{"aria-label":`Go to ${b(e)==="/"?"home page":b(e)}`,className:"text-3xl font-bold leading-none",href:b(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:t(M,{src:e==null?void 0:e.image,width:135,height:135,className:"object-cover transition-all ease-in-out duration-300",alt:(d=e==null?void 0:e.alt)!=null?d:"navigation-logo"})})}),t("button",{onClick:()=>r(!0),className:"md:hidden h-fit self-center place-self-end",children:t(re,{className:"w-8 h-8"})}),a&&a.length>0&&t(p,{align:"center",gap:5,className:"hidden md:flex place-self-center max-w-[144px] h-32 w-full",children:t("ul",{className:"flex gap-5",children:a==null?void 0:a.map(u=>u&&u.label?t(X,{link:u,isIcon:!0},u._key):null)})})]}),t(Z,{data:n!=null?n:[],currentDropdown:s,setCurrentDropdown:l}),t(ee,{data:n!=null?n:[],currentDropdown:s,setCurrentDropdown:l})]})},X=({link:e,isIcon:a})=>{let n=Y[e==null?void 0:e.label]||null;return t("li",{children:t(w,{as:"link",link:e,variant:"unstyled",className:"text-sm font-label tracking-wide",children:a?n:e==null?void 0:e.label})})},Y={search:t(H,{className:"w-4 h-4"}),location:t(z,{className:"w-4 h-4"}),person:t(G,{className:"w-4 h-4"})},Z=({data:e,currentDropdown:a,setCurrentDropdown:n})=>{let[{x:r,y:s}]=k(),l=s&&s<80||s===0?"hidden":"";return m(p,{align:"center",justify:"between",gap:5,className:"relative w-full h-full max-w-7xl mx-auto hidden md:flex pt-4 px-4 transition-all duration-300 ease-in-out",children:[e&&e.length>0?e==null?void 0:e.slice(0,3).map(o=>t(y,{children:o._type==="dropdown"?t(C,{dropdown:o,"aria-expanded":a===o.title,onMouseEnter:()=>{var i;return n((i=o.title)!=null?i:"")},onMouseLeave:()=>n("")},`MegaMenuDropdownTrigger-${o._key}`):t(N,{link:o},`MegaMenuLink-${o._key}`)},`MegaMenuNavLink-${o._key}`)):null,e&&e.length>0?e==null?void 0:e.slice(3,6).map(o=>t(y,{children:o._type==="dropdown"?t(C,{dropdown:o,"aria-expanded":a===o.title,onMouseEnter:()=>{var i;return n((i=o.title)!=null?i:"")},onMouseLeave:()=>n("")},`MegaMenuDropdownTrigger-${o._key}`):t(N,{link:o},`MegaMenuLink-${o._key}`)},`MegaMenuNavLink-${o._key}`)):null]})},N=({link:e,className:a})=>t(w,{variant:"unstyled",className:g("relative text-black text-sm font-normal font-label uppercase tracking-widest group",a),children:e.label}),C=R((e,a)=>{let{dropdown:n,onClick:r,onMouseEnter:s,onMouseLeave:l,className:o,...i}=e;return t("button",{ref:a,onClick:r,onMouseEnter:s,onMouseLeave:l,"aria-label":`Open the ${n.title} menu`,className:g("relative text-black text-sm font-normal font-label uppercase tracking-widest group",o),...i,children:n.title})}),ee=({data:e,currentDropdown:a,setCurrentDropdown:n})=>t(D,{children:e&&e.length>0?e==null?void 0:e.map(r=>{var l,o,i;let s=a===r.title&&r.title!=="";return t(te,{label:(l=r.title)!=null?l:"",showcaseLink:(o=r.showcaseLink)!=null?o:[],groupedLinks:(i=r.groupOfLinks)!=null?i:[],currentDropdown:a,setCurrentDropdown:n},`MegaMenuDropdown-${r._key}`)}):null});function te({label:e,showcaseLink:a,groupedLinks:n,currentDropdown:r,setCurrentDropdown:s}){let l=r===e&&e!=="",o=n.length>0,i=a.length>0,c=j(()=>n.length>0?n.map(u=>{var h;return((h=u.links)==null?void 0:h.length)>2?"3fr":"1fr"}).join(" "):"1fr",[n]),d=o?`${c} ${i?"2fr":""}`:i?"2fr":"1fr";return t(S,{"data-show":l,onMouseEnter:()=>s(e),onMouseLeave:()=>s(""),className:`relative top-6 left-0 w-full overflow-hidden z-50 bg-primary/5 !transition-[max-height] !duration-300 !ease-in-out ${l?"max-h-[500px]":"max-h-0"}`,children:m("div",{style:{display:"grid",gridTemplateColumns:d,gridTemplateRows:"1fr"},className:"relative w-full h-auto max-w-[90rem] mx-auto",children:[t(ne,{groupedLinks:n}),t(oe,{hasShowcaseLinks:i,showcaseLink:a})]})})}function ne({groupedLinks:e}){return t(y,{children:e&&e.length>0&&(e==null?void 0:e.map((a,n)=>{var r;return m("div",{className:"relative py-10 pl-5 flex flex-col items-end justify-start h-full w-full border-r border-black last:border-r-0",children:[t(A,{fontSize:"sm",className:"text-black font-normal uppercase tracking-widest font-label self-start pb-4",children:a.title}),t(p,{direction:"row",align:"start",justify:"start",gap:4,className:"relative w-full h-full grid-flow-row",children:(r=a.links)==null?void 0:r.map((s,l)=>{var o;return m(p,{direction:"col",className:"h-fit w-fit",children:[t(v,{fontSize:"base",className:"text-black font-medium leading-[30px]",children:s.title}),t(p,{direction:"col",align:"start",justify:"start",gap:2,className:"w-fit h-full",children:(o=s.links)==null?void 0:o.map((i,c)=>{var d;return t(w,{as:"link",link:i,"aria-label":(d=i.label)!=null?d:"",variant:"unstyled",asChild:!0,className:"text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline",children:i==null?void 0:i.label},`MegaDropdownContent-Item-Link-${i._key}-${c}`)})})]},`MegaDropdownContent-Item-Link-${s._key}-${l}`)})})]},`MegaDropdownContent-Item-${a._key}-${n}`)}))})}function oe({hasShowcaseLinks:e,showcaseLink:a}){return e?t(p,{direction:"row",align:"start",justify:"start",className:"w-full h-full gap-6 pl-5 py-10",children:a==null?void 0:a.map((n,r)=>{var l,o,i,c,d,u;let s=(l=n.mainImage)==null?void 0:l.image;return t(w,{as:"link",link:n.primaryButton,"aria-label":(i=(o=n.primaryButton)==null?void 0:o.label)!=null?i:"",variant:"unstyled",asChild:!0,className:"text-center text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline",children:m(p,{direction:"col",align:"center",justify:"center",gap:3,children:[t(M,{src:s,alt:(d=(c=n.mainImage)==null?void 0:c.alt)!=null?d:"",width:500,height:500,className:"w-[188px] h-[147px] object-cover object-center"},r),(u=n.primaryButton)==null?void 0:u.label]})},`MegaDropdownContent-Item-Images-${n._key}-${r}`)})}):null}function re(e){return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:t("path",{fill:"currentColor",d:"M3 8V7h17v1zm17 4v1H3v-1zM3 17h17v1H3z"})})}export{q as a};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-S35O64PB.mjs";import{Button as v}from"@stackshift-ui/button";import{Container as c}from"@stackshift-ui/container";import{Flex as o}from"@stackshift-ui/flex";import{Image as d}from"@stackshift-ui/image";import{Link as x}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as p}from"@stackshift-ui/text";import g from"react";import{jsx as a,jsxs as m}from"react/jsx-runtime";function w({links:e,primaryButton:l,secondaryButton:s,logo:i}){let[t,r]=g.useState(!1),b=()=>{r(f=>!f)};return m(h,{className:"bg-background",children:[a("nav",{className:"relative py-6",children:a(c,{maxWidth:1280,children:m(o,{align:"center",justify:"between",gap:4,children:[a(N,{links:e}),a(M,{logo:i}),a(R,{primaryButton:l,secondaryButton:s}),a(k,{showMenu:b})]})})}),a(z,{menu:t,showMenu:b,links:e,primaryButton:l,secondaryButton:s})]})}function N({links:e}){return e?a(o,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-5",children:e==null?void 0:e.map((l,s)=>m(g.Fragment,{children:[(l==null?void 0:l.label)&&a(u,{link:l}),e.length!==s+1?a(L,{}):null]},s))})}):null}function u({link:e}){return e?a("li",{children:a(v,{as:"link",link:e,variant:"unstyled","aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function L(){return a("li",{className:"text-gray-500",children:a("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function M({logo:e}){var l;return e?a("div",{className:"w-full lg:w-fit items-center justify-center",children:a(x,{className:"w-20 h-14 flex justify-center items-center","aria-label":n(e)==="/"?"Go to home page":`Go to ${n(e)}`,href:n(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(d,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function R({primaryButton:e,secondaryButton:l}){return m("div",{className:"hidden lg:text-right lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&a(v,{as:"link",link:e,"aria-label":e==null?void 0:e.label,className:"px-4 py-3 text-secondary-foreground lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&a(v,{as:"link",link:l,"aria-label":l==null?void 0:l.label,className:"px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global",children:l==null?void 0:l.label})]})}function k({showMenu:e}){return a("div",{className:"ml-auto lg:hidden",children:a(v,{"aria-label":"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:m("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[a("title",{children:"Mobile menu"}),a("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function z({menu:e,showMenu:l,links:s,primaryButton:i,secondaryButton:t}){return m("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[a("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),m("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[a("div",{className:"flex items-center mb-8",children:a(v,{"aria-label":"Close navigation menu",className:"navbar-close",onClick:l,children:a("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),a("div",{children:a("ul",{children:s&&(s==null?void 0:s.map((r,b)=>a("li",{className:"mb-1",children:a(v,{as:"link",link:r,"aria-label":r==null?void 0:r.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:r==null?void 0:r.label})},b)))})}),m("div",{className:"mt-auto",children:[m("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&a(v,{as:"link",link:i,"aria-label":i==null?void 0:i.label,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&a(v,{as:"link",link:t,"aria-label":t==null?void 0:t.label,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),a(p,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}export{w as a};
@@ -0,0 +1 @@
1
+ import{a as b}from"./chunk-S35O64PB.mjs";import{Button as s}from"@stackshift-ui/button";import{Flex as v}from"@stackshift-ui/flex";import{Image as f}from"@stackshift-ui/image";import{Link as g}from"@stackshift-ui/link";import{Section as x}from"@stackshift-ui/section";import{Text as u}from"@stackshift-ui/text";import c from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";function p({links:e,primaryButton:l,secondaryButton:t,logo:i}){let[r,o]=c.useState(!1),m=()=>{o(d=>!d)};return n(x,{className:"bg-background",children:[a("nav",{className:"relative lg:px-6 py-6",children:n(v,{align:"center",justify:"between",gap:4,children:[a(h,{links:e}),a(L,{logo:i}),a(k,{primaryButton:l,secondaryButton:t}),a(M,{showMenu:m})]})}),a(R,{menu:r,showMenu:m,links:e,primaryButton:l,secondaryButton:t})]})}function h({links:e}){return e?a(v,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-3 xl:gap-5",children:e==null?void 0:e.map((l,t)=>n(c.Fragment,{children:[(l==null?void 0:l.label)&&a(w,{link:l}),e.length!==t+1?a(N,{}):null]},t))})}):null}function w({link:e}){return e?a("li",{children:a(s,{as:"link",link:e,variant:"unstyled",asChild:!0,"aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function N(){return a("li",{className:"text-gray-500",children:a("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function L({logo:e}){var l;return e?a("div",{className:"w-full lg:w-fit items-center justify-center",children:a(g,{className:"w-20 h-14 flex justify-center items-center","aria-label":b(e)==="/"?"Go to home page":`Go to ${b(e)}`,href:b(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(f,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function k({primaryButton:e,secondaryButton:l}){return n("div",{className:"hidden lg:flex lg:gap-4",children:[(e==null?void 0:e.label)&&a(s,{as:"link",link:e,variant:"unstyled","aria-label":e==null?void 0:e.label,className:"px-4 py-3 leading-loose text-center text-secondary-foreground font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&a(s,{as:"link",link:l,variant:"unstyled","aria-label":l==null?void 0:l.label,className:"px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global",children:l==null?void 0:l.label})]})}function M({showMenu:e}){return a("div",{className:"ml-auto lg:hidden",children:a(s,{"aria-label":"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[a("title",{children:"Mobile menu"}),a("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function R({menu:e,showMenu:l,links:t,primaryButton:i,secondaryButton:r}){return n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[a("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),n("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[a("div",{className:"flex items-center mb-8",children:a(s,{"aria-label":"Close navigation menu",className:"navbar-close",onClick:l,children:a("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),a("ul",{children:t&&t.map((o,m)=>a("li",{className:"mb-1",children:a(s,{as:"link",link:o,"aria-label":o.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:o.label})},m))}),n("div",{className:"mt-auto pt-6",children:[(i==null?void 0:i.label)&&a(s,{as:"link",link:i,"aria-label":i.label,className:"block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i.label}),(r==null?void 0:r.label)&&a(s,{as:"link",link:r,"aria-label":r.label,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r.label})]}),a(u,{fontSize:"xs",muted:!0,className:"my-4 text-center",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})}export{p as a};
@@ -0,0 +1 @@
1
+ import{a as m}from"./chunk-S35O64PB.mjs";import{Button as o}from"@stackshift-ui/button";import{Flex as b}from"@stackshift-ui/flex";import{Image as d}from"@stackshift-ui/image";import{Link as f}from"@stackshift-ui/link";import{Section as x}from"@stackshift-ui/section";import{Text as u}from"@stackshift-ui/text";import c from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";function h({links:e,primaryButton:a,secondaryButton:i,logo:s}){let[r,t]=c.useState(!1),v=()=>{t(g=>!g)};return n(x,{className:"bg-background",children:[n(b,{align:"center",justify:"between",className:"px-6 py-6",gap:4,children:[l(p,{logo:s}),l(N,{links:e}),l(k,{primaryButton:a,secondaryButton:i}),l(R,{showMenu:v})]}),l(M,{menu:r,showMenu:v,links:e,primaryButton:a,secondaryButton:i})]})}function p({logo:e}){var a;return e?l("div",{className:"w-full lg:w-1/5",children:l(f,{className:"w-20 h-14 flex items-center","aria-label":m(e)==="/"?"Go to home page":`Go to ${m(e)}`,href:m(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:l(d,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function w(){return l("li",{className:"text-gray-500",children:l("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function N({links:e}){return e?l(b,{children:l("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,i)=>n(c.Fragment,{children:[l(L,{link:a},a._key),e.length!==i+1?l(w,{}):null]},i))})}):null}function L({link:e}){return e!=null&&e.label?l("li",{children:l(o,{as:"link",link:e,variant:"unstyled","aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function M({menu:e,showMenu:a,links:i,primaryButton:s,secondaryButton:r}){return n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[l("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),n(b,{as:"nav",direction:"col",className:"fixed top-0 bottom-0 left-0 w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[l(z,{showMenu:a}),l("div",{className:"w-full",children:i?l("ul",{children:i==null?void 0:i.map((t,v)=>l("li",{className:"mb-1",children:l(o,{as:"link",link:t,variant:"unstyled","aria-label":t==null?void 0:t.label,className:"block w-full cursor-pointer p-4 text-sm font-semibold text-gray-900 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:t==null?void 0:t.label})},v))}):null}),n("div",{className:"w-full mt-auto",children:[n(b,{direction:"col",className:"pt-6",children:[s!=null&&s.label?l(o,{as:"link",link:s,"aria-label":s==null?void 0:s.label,variant:"unstyled",className:"block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:s==null?void 0:s.label}):null,r!=null&&r.label?l(o,{as:"link",link:r,"aria-label":r==null?void 0:r.label,variant:"unstyled",className:"block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r==null?void 0:r.label}):null]}),l(u,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:l("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}function R({showMenu:e}){return l("div",{className:"lg:hidden",children:l(o,{"aria-label":"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[l("title",{children:"Mobile menu"}),l("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function k({primaryButton:e,secondaryButton:a}){return n(b,{align:"center",gap:4,children:[e!=null&&e.label?l(o,{as:"link",link:e,"aria-label":e==null?void 0:e.label,variant:"unstyled",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}):null,a!=null&&a.label?l(o,{as:"link",link:a,"aria-label":a==null?void 0:a.label,variant:"unstyled",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global",children:a==null?void 0:a.label}):null]})}function z({showMenu:e}){return l("div",{className:"flex items-center mb-8",children:l(o,{"aria-label":"Close Navigation Menu",className:"navbar-close",onClick:e,children:l("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})})}export{h as a};
@@ -0,0 +1 @@
1
+ import{a as C,b as $}from"./chunk-S35O64PB.mjs";import{Button as g}from"@stackshift-ui/button";import{Container as T}from"@stackshift-ui/container";import{Flex as N}from"@stackshift-ui/flex";import{Image as W}from"@stackshift-ui/image";import{Link as z}from"@stackshift-ui/link";import{Section as I}from"@stackshift-ui/section";import{useEffect as D,useRef as F,useState as y}from"react";import{BiArrowBack as P,BiChevronDown as R,BiMenu as H}from"react-icons/bi";import{BsFillTelephoneFill as O,BsTelephone as _}from"react-icons/bs";import{MdClose as j}from"react-icons/md";import{Fragment as K,jsx as o,jsxs as n}from"react/jsx-runtime";var Y=({logo:e,hasScrolled:a})=>{var s;return e!=null&&e.image?o(z,{"aria-label":`Go to ${C(e)==="/"?"home page":C(e)}`,className:"text-3xl",href:C(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:o(W,{src:a?e==null?void 0:e.image:"https://cdn.sanity.io/images/9itgab5x/staging/7f9353c628ae4dd0bdd479d3b1407a3c242755e8-1963x833.png?fm=webp&w=96&q=75",width:500,height:500,alt:(s=e==null?void 0:e.alt)!=null?s:"navigation-logo",className:`transition-all duration-500 w-28 ${a?"md:w-40":"md:w-44"}`})}):null},q=({button:e,hasScrolled:a})=>e!=null&&e.label?n(g,{as:"link",link:e,variant:"unstyled",className:`font-body ml-auto p-2.5 md:p-3 transition duration-200 font-medium flex items-center space-x-2 text-left ${a?"text-white border border-white bg-transparent hover:bg-white hover:text-black":"text-white bg-secondary hover:text-secondary hover:border hover:border-black/40 hover:bg-white"}`,children:[o("span",{className:"flex-none text-3xl sm:text-xl",children:a?o(_,{className:"text-lg md:text-xl"}):o(O,{className:"text-lg md:text-xl"})}),o("span",{className:"text-sm md:text-base sm:block hidden whitespace-nowrap",children:e==null?void 0:e.label})]}):null,A=({hasScrolled:e,menu:a,showMenu:s})=>n("div",{children:[o(H,{color:e?"white":"black",size:40,onClick:s,className:`cursor-pointer hover:scale-105 transition lg:hidden block ${a?"hidden":"block"}`}),o(j,{color:e?"white":"black",size:40,onClick:s,className:`cursor-pointer hover:scale-105 transition lg:hidden block ${a?"block":"hidden"}`})]});function G({primaryButton:e,secondaryButton:a,logo:s,multipleLinks:r,title:u}){let[i,l]=y(null),c=F(null),[h,S]=y(!1),[p,M]=y(!1),E=d=>{c.current&&!c.current.contains(d.target)&&l(null)};D(()=>{let d=x=>{E(x)};return document.addEventListener("click",d),()=>{document.removeEventListener("click",d)}},[]);let f=d=>{d&&d.stopPropagation(),S(x=>!x)};return D(()=>{let d=()=>{M(window.scrollY>0)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]),o(K,{children:n(I,{className:`fixed !z-[999999] w-full left-0 transition-all top-0 ${p?"bg-black/80":"bg-background"}`,children:[o(T,{children:n("div",{className:"flex justify-between space-x-5 py-2 items-center",children:[o(Y,{logo:s,hasScrolled:p}),o(N,{direction:"row",align:"center",className:"hidden lg:flex gap-x-8",children:r==null?void 0:r.map((d,x)=>o(J,{link:d,index:x,dropdown:i,setDropdown:l,hasScrolled:p,dropdownRef:c},x))}),n(N,{direction:"row",align:"center",gap:2,children:[((e==null?void 0:e.label)||(a==null?void 0:a.label))&&o("div",{className:"flex space-x-4 sm:space-x-6 items-center",children:o(q,{button:e,hasScrolled:p})}),o(A,{hasScrolled:p,menu:h,showMenu:f})]})]})}),o(V,{links:r,open:h,showMenu:f})]})})}var J=({link:e,index:a,dropdown:s,setDropdown:r,hasScrolled:u,dropdownRef:i})=>{if(!(e!=null&&e.multipleRoutes))return o(g,{as:"link",link:e,variant:"unstyled",className:`hover:text-secondary font-body text-lg whitespace-nowrap ${u?"text-white":"text-black"}`,children:e==null?void 0:e.label});let l=c=>{r(c)};return n("div",{className:"relative",children:[e!=null&&e.internalLink||e!=null&&e.externalLink?n(N,{onMouseEnter:c=>{c.stopPropagation(),l(s===a?null:a)},children:[o(g,{as:"link",link:e,variant:"unstyled",className:`hover:text-secondary font-body text-lg cursor-pointer ${u?"text-white":"text-black"}`,children:e==null?void 0:e.label}),o(R,{size:24,className:`font-bold mt-0.5 font-body cursor-pointer hover:text-secondary hover:translate-y-0.5 transition ${u?"text-white":"text-black"} ${s===a&&"translate-y-0.5 !text-secondary"}`,onClick:c=>{c.stopPropagation(),l(a)}})]}):n("p",{className:`hover:text-secondary font-body text-lg cursor-pointer flex items-center group ${u?"text-white":"text-black"}`,onClick:c=>{c.stopPropagation(),l(s===a?null:a)},onMouseEnter:c=>{c.stopPropagation(),l(s===a?null:a)},children:[e==null?void 0:e.label,o(R,{size:24,className:`font-bold mt-0.5 group-hover:translate-y-0.5 transition ${s===a&&"translate-y-0.5 text-secondary"}`})]}),s===a&&o(Q,{link:e,dropdownRef:i,setDropdown:r,hasScrolled:u})]})},Q=({link:e,dropdownRef:a,setDropdown:s,hasScrolled:r})=>{var u;return n("div",{ref:a,className:"absolute flex flex-col top-8 bg-primary rounded rounded-tl-none",onMouseLeave:()=>s(null),children:[o("span",{className:"absolute top-0 w-0 h-0 border-x-transparent border-t-transparent border-b-primary border-[6px] transform -translate-y-3"}),(u=e==null?void 0:e.multipleRoutes)==null?void 0:u.map((i,l)=>o(U,{mLink:i,hasScrolled:r},l))]})},U=({mLink:e,hasScrolled:a})=>{var s;return e!=null&&e.multipleInnerRoutes?n("div",{className:"relative group",children:[e!=null&&e.internalLink||e!=null&&e.externalLink?n(N,{align:"center",children:[o(g,{as:"link",link:e,variant:"unstyled",className:"font-body hover:text-secondary text-lg cursor-pointer py-2 pl-4 text-white",children:e==null?void 0:e.label}),o(R,{size:24,className:"font-bold mt-0.5 cursor-pointer group-hover:translate-y-0.5 transition group-hover:text-secondary text-white"})]}):n("p",{className:"hover:text-secondary text-lg cursor-pointer flex items-center group py-2 px-4 text-white",children:[e==null?void 0:e.label,o(R,{size:24,className:"font-bold mt-0.5 group-hover:translate-y-0.5 transition"})]}),o("div",{className:"absolute hidden flex-col top-0 left-full bg-primary rounded-r rounded-r-b group-hover:flex hover:flex",children:(s=e==null?void 0:e.multipleInnerRoutes)==null?void 0:s.map((r,u)=>o($,{ariaLabel:(r==null?void 0:r.label)||"",link:r,target:r==null?void 0:r.linkTarget,className:"hover:text-secondary font-body text-lg py-2 px-4 whitespace-nowrap text-white",children:r==null?void 0:r.label},u))})]}):o($,{ariaLabel:(e==null?void 0:e.label)||"",link:e,target:e==null?void 0:e.linkTarget,className:"hover:text-secondary font-body text-lg py-2 px-4 whitespace-nowrap text-white",children:e==null?void 0:e.label})},V=({links:e,open:a,showMenu:s})=>{var E,f,d,x;let[r,u]=y(!1),i=F(null);D(()=>{let t=()=>u(window.scrollY>0);return window.addEventListener("scroll",t),()=>window.removeEventListener("scroll",t)},[]),D(()=>{let t=v=>{i.current&&!i.current.contains(v.target)&&!v.target.closest(".BiMenu")&&a&&s(v)};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[a,s]);let[l,c]=y({previous:null,index:null}),h=(t,v)=>{c({previous:t,index:v})},S=(t,v,b=!1,m)=>{let w=(t==null?void 0:t.label)==="New Construction",B=(t==null?void 0:t.label)==="Renovations"||(t==null?void 0:t.label)==="Renovation";return n("div",{className:"flex items-center py-2 px-4",children:[t!=null&&t.internalLink||t!=null&&t.externalLink?w||B?o("p",{className:`text-xl font-body ${r?"text-white":"text-black"} hover:text-secondary cursor-pointer`,onClick:()=>window.location.href=`/projects/residential?filter=${w?"new_construction":"renovations"}`,children:t==null?void 0:t.label}):o(g,{as:"link",link:t,variant:"unstyled",className:`text-xl font-body ${r?"text-white":"text-black"} hover:text-secondary`,children:o("p",{className:"w-full h-full",onClick:s,children:t==null?void 0:t.label})}):o("p",{className:`text-xl font-body peer cursor-pointer ${r?"text-white":"text-black"} hover:text-secondary`,onClick:m,children:t==null?void 0:t.label}),b&&o(R,{fontSize:24,className:`hover:-rotate-90 hover:text-secondary peer-hover:-rotate-90 peer-hover:text-secondary transition duration-200 cursor-pointer ${r?"text-white":"text-black"}`,onClick:m})]},v)},p=(t,v=!1)=>t.map((b,m)=>{let w=!!(b!=null&&b.multipleRoutes||b!=null&&b.multipleInnerRoutes);return S(b,m,w,w?()=>h(v?l.index:null,m):void 0)}),M=t=>n("p",{className:`hover:text-secondary text-xl font-body py-2 px-4 flex items-center gap-2 cursor-pointer group ${r?"text-white":"text-black"}`,onClick:t,children:[o(P,{}),"Back"]});return o(N,{className:`flex sm:block text-white overflow-hidden transition lg:hidden columns-2 ${a?"animate-curtain-down mt-5":"animate-curtain-up h-0"}`,children:o("div",{ref:i,onClick:t=>t.stopPropagation(),children:a&&n(K,{children:[e&&l.index===null&&p(e),l.previous===null&&l.index!==null&&n("div",{className:"flex flex-col",children:[M(()=>h(null,null)),p(((E=e[l.index])==null?void 0:E.multipleRoutes)||[],!0)]}),l.previous!==null&&l.index!==null&&n("div",{className:"flex flex-col",children:[M(()=>c({previous:null,index:l.previous})),p(((x=(d=(f=e[l.previous])==null?void 0:f.multipleRoutes)==null?void 0:d[l.index])==null?void 0:x.multipleInnerRoutes)||[])]})]})})})};export{G as a};
@@ -1 +1 @@
1
- import{a as y}from"./chunk-S35O64PB.mjs";import{Image as T}from"@stackshift-ui/image";import{Link as w}from"@stackshift-ui/link";import{Section as z}from"@stackshift-ui/section";import{SocialIcons as H}from"@stackshift-ui/social-icons";import P,{Fragment as j,useState as R}from"react";import{BsChevronDown as C}from"react-icons/bs";import{animated as S,useSpring as _}from"@react-spring/web";import{useWindowScroll as B}from"@uidotdev/usehooks";import{Fragment as I,jsx as a,jsxs as c}from"react/jsx-runtime";var n="small-text-style group-hover:text-white hover:text-white relative after:content-[''] after:w-0 hover:after:w-full h-5 !outline-none after:h-[0.5px] after:bg-white after:absolute after:bottom-0 after:left-0 after:transition-all after:duration-300";function D({logo:e,socialMedia:o,dropdownMenu:r}){let[t,d]=R(!1),[s,u]=P.useState(!1),[m,f]=R(null),[v,i]=R(!1),x=()=>{u(N=>!N),s?document.body.style.overflow="unset":document.body.style.overflow="hidden"},g=_({transform:s?"translate(9px, 32px) rotate(-45deg) scaleX(1.5)":"translate(17px, 17px) rotate(0deg) scaleX(1)"}),p=_({transform:s?"translate(12px, 11px) rotate(45deg)":"translate(7px, 27px) rotate(0deg)"}),[{x:A,y:h}]=B(),L=h&&h>5?"bg-black fixed top-0":"fixed bg-transparent",$=h&&h>5,b=N=>{N&&f(m===N?null:N)},M=N=>{i(N)};return a(z,{className:"!px-0 w-full flex flex-col absolute top-0 z-50",children:c("nav",{className:`w-full z-50 md:gap-2 gap-0 hover:bg-black/80 transition-colors duration-300 ${t?"!bg-black border-b-white":"border-b-transparent"} ${L}`,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[a("div",{className:"w-full z-10 px-4",children:c("div",{className:"w-full flex flex-wrap justify-between items-center py-6",children:[c("div",{className:"flex items-center space-x-[50px]",children:[a(F,{logo:e}),a(O,{dropdownMenu:r,isNavHovered:v,setShowDropdown:d})]}),a(q,{menu:s,showMenu:x,firstLine:g,secondLine:p,isNavHovered:v})]})}),a(G,{menu:s,showMenu:x,dropdownMenu:r,logo:e,openAccordion:m,toggleAccordion:b,socialMedia:o})]})})}function F({logo:e}){var o;return a("div",{className:"w-[200px] relative z-20",children:(e==null?void 0:e.image)&&a(w,{"aria-label":`Go to ${y(e)}`,className:"text-3xl font-bold leading-none",href:y(e),children:a(T,{className:"md:h-[75px]",src:e==null?void 0:e.image,alt:(o=e==null?void 0:e.alt)!=null?o:"navigation-logo",width:100,height:100})})})}function O({dropdownMenu:e,isNavHovered:o,setShowDropdown:r}){return!e||(e==null?void 0:e.length)===0?null:a(j,{children:e&&(e==null?void 0:e.length)>0&&a("ul",{className:"hidden lg:flex flex-wrap space-x-[50px] xl:min-w-max",children:e==null?void 0:e.map(t=>a(P.Fragment,{children:(t==null?void 0:t.label)&&(t==null?void 0:t._key)&&a("li",{className:"static z-20 hover:z-10",children:(t==null?void 0:t.routeType)==="singleRoute"?a(l,{link:t,style:`${n} ${o?"text-white":"text-black"}`}):(t==null?void 0:t.routeType)==="multipleRoute"?a(E,{link:t,isNavHovered:o,onHover:()=>r(!0),onLeave:()=>r(!1)}):a("span",{className:`${n} ${o?"text-white":"text-black"}`,children:t==null?void 0:t.label})})},t._key))})})}function l({link:e,style:o=n}){var r,t,d,s,u,m,f;return a(I,{children:e.linkType==="linkInternal"?a(w,{"aria-label":`Navigation ${(r=e==null?void 0:e.label)!=null?r:"Menu"} links which directs to ${(e==null?void 0:e.internalLink)===void 0?"page-not-found":e==null?void 0:e.internalLink}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",href:`${((t=e.internalLink)==null?void 0:t.toLowerCase())==="home"?"/":`${e.internalLink?e==null?void 0:e.internalLink:"page-not-found"}`}`,children:e==null?void 0:e.label}):(e==null?void 0:e.linkType)==="linkText"&&((d=e==null?void 0:e.linkText)==null?void 0:d.slice(0,1))!=="/"?a("a",{href:e!=null&&e.linkText?e==null?void 0:e.linkText:"link-not-found","aria-label":`Navigation ${(s=e==null?void 0:e.label)!=null?s:"Menu"} links which directs to ${(e==null?void 0:e.linkText)===void 0?"link-not-found":e==null?void 0:e.linkText}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:e==null?void 0:e.label}):(e==null?void 0:e.linkType)==="linkText"&&((u=e==null?void 0:e.linkText)==null?void 0:u.slice(0,1))==="/"?a(w,{"aria-label":`Navigation ${(m=e==null?void 0:e.label)!=null?m:"Menu"} links which directs to ${(e==null?void 0:e.linkText)===void 0?"link-not-found":e==null?void 0:e.linkText}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",href:e!=null&&e.linkText?e==null?void 0:e.linkText:"link-not-found",children:e==null?void 0:e.label}):a("a",{"aria-label":`Navigation ${(f=e==null?void 0:e.label)!=null?f:"Menu"} links which directs to ${(e==null?void 0:e.externalLink)===void 0?"link-not-found":e==null?void 0:e.externalLink}`,className:o,target:e==null?void 0:e.linkTarget,href:`${e.externalLink===void 0?"link-not-found":e.externalLink}`,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:e==null?void 0:e.label})})}function E({link:e,onHover:o,onLeave:r,isNavHovered:t}){var f,v,i,x,g,p,A,h,L,$;let[d,s]=R(!1);return c("div",{className:"group relative",onMouseEnter:()=>{s(!0),o()},onMouseLeave:()=>{setTimeout(()=>{s(!1),r()},100)},children:[a("button",{className:`${n} group-hover:after:!w-full flex items-center space-x-2 ${t?"text-white":"text-black"}`,children:a("span",{children:e==null?void 0:e.label})}),a("div",{className:"absolute left-0 right-0 top-full h-2 pointer-events-auto opacity-0 group-hover:pointer-events-auto"}),a("div",{className:"fixed left-0 right-0 top-[80px] pointer-events-none group-hover:pointer-events-auto opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-50",children:a("div",{className:"w-3/4 mx-auto bg-black shadow-lg",children:a("div",{className:"max-w-[1440px] mx-auto px-4",children:a("div",{className:"p-[30px]",children:c("div",{className:"grid grid-cols-5 gap-[30px]",children:[(e==null?void 0:e.featuredRoute)&&a("div",{className:"col-span-2 pr-[20px]",children:c("div",{className:"w-full h-0 pb-[75%] relative bg-obsidian",children:[((f=e==null?void 0:e.featuredRoute)==null?void 0:f.featuredLink)&&a("div",{className:"absolute w-full h-full inset-0 p-[15px] flex flex-col justify-end z-10",children:a("span",{children:a(l,{link:(v=e==null?void 0:e.featuredRoute)==null?void 0:v.featuredLink,style:"small-text-style text-white underline underline-offset-4 decoration-[0.5px] opacity-50 hover:opacity-100 h-5 !outline-none transition-all duration-300 after:absolute after:inset-0"})})}),((i=e==null?void 0:e.featuredRoute)==null?void 0:i.mainImage)&&a(T,{src:(g=(x=e==null?void 0:e.featuredRoute)==null?void 0:x.mainImage)==null?void 0:g.image,alt:(h=(A=(p=e==null?void 0:e.featuredRoute)==null?void 0:p.mainImage)==null?void 0:A.alt)!=null?h:"image",width:100,height:100,className:"object-cover absolute inset-0 w-full h-full"})]})}),(e==null?void 0:e.multipleRoutes)&&a("div",{className:"col-span-3 py-[20px]",children:c("div",{className:"flex flex-col space-y-10",children:[(e==null?void 0:e.label)&&a("p",{className:"h3 text-white",children:e==null?void 0:e.label}),a("ul",{className:`grid gap-x-[60px] gap-y-3 ${((L=e==null?void 0:e.multipleRoutes)==null?void 0:L.length)>3?"grid-cols-2":"grid-cols-1"}`,children:($=e==null?void 0:e.multipleRoutes)==null?void 0:$.map(b=>a("li",{children:(b==null?void 0:b.label)&&a(l,{link:b,style:n})},b._key))})]})})]})})})})})]})}function G({menu:e,showMenu:o,logo:r,dropdownMenu:t,openAccordion:d,toggleAccordion:s,socialMedia:u}){return c("div",{className:`${e?"block":"hidden"} navbar-menu fixed inset-0 z-50`,children:[a("div",{className:"fixed inset-0 bg-black/80",onClick:o}),a("div",{className:"fixed top-0 right-0 bottom-0 flex flex-col w-full sm:max-w-sm bg-black/80",children:c("nav",{className:"flex flex-col w-full py-6 px-6 overflow-y-auto h-screen",children:[a(X,{logo:r,showMenu:o}),a(W,{dropdownMenu:t,openAccordion:d,toggleAccordion:s}),a(Y,{socialMedia:u}),a("div",{className:"mt-auto pt-20 text-gray-400",children:a("span",{className:"text-sm text-center block",children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})})]})}function X({logo:e,showMenu:o}){var r;return e!=null&&e.image?a(w,{"aria-label":`Go to ${y(e)}`,className:"text-3xl font-bold leading-none h-[40px] w-[100px] flex items-center justify-start mt-0 md:ml-[15px]",onClick:o,href:y(e),children:a(T,{className:"h-[20px] object-contain",src:e==null?void 0:e.image,alt:(r=e==null?void 0:e.alt)!=null?r:"navigation-logo"})}):null}function W({dropdownMenu:e,openAccordion:o,toggleAccordion:r}){return a("div",{className:"mt-[70px]",children:a(J,{children:e==null?void 0:e.map(t=>{var d,s,u,m,f,v,i,x,g;return a(P.Fragment,{children:(t==null?void 0:t.label)&&(t==null?void 0:t._key)&&a(I,{children:(t==null?void 0:t.routeType)==="singleRoute"?a("span",{children:a(l,{link:t,style:`${n} !text-base !h-auto text-white`})}):(t==null?void 0:t.routeType)==="multipleRoute"?c(K,{children:[a(Q,{isOpen:o===t._key,onClick:()=>t._key&&r(t._key),className:`${n} after:!w-0 !p-0 text-white`,children:t==null?void 0:t.label}),a(U,{isOpen:o===t._key,children:c("div",{className:"py-6 flex flex-col space-y-2",children:[(t==null?void 0:t.featuredRoute)&&a("div",{children:c("div",{className:"w-full h-0 pb-[75%] relative bg-obsidian",children:[((d=t==null?void 0:t.featuredRoute)==null?void 0:d.featuredLink)&&a("div",{className:"absolute w-full h-full inset-0 p-[15px] flex flex-col justify-end z-10",children:a("span",{children:a(l,{link:(s=t==null?void 0:t.featuredRoute)==null?void 0:s.featuredLink,style:"small-text-style text-white underline underline-offset-4 decoration-[0.5px] opacity-50 hover:opacity-100 h-5 !outline-none transition-all duration-300"})})}),((u=t==null?void 0:t.featuredRoute)==null?void 0:u.mainImage)&&a(T,{src:(f=(m=t==null?void 0:t.featuredRoute)==null?void 0:m.mainImage)==null?void 0:f.image,className:"object-cover absolute inset-0 w-full h-full",alt:(x=(i=(v=t==null?void 0:t.featuredRoute)==null?void 0:v.mainImage)==null?void 0:i.alt)!=null?x:"image"})]})}),(t==null?void 0:t.multipleRoutes)&&a("ul",{className:"flex flex-col justify-center space-y-1 pl-[15px]",children:(g=t==null?void 0:t.multipleRoutes)==null?void 0:g.map(p=>a("li",{children:(p==null?void 0:p.label)&&a(l,{link:p,style:`${n} text-white`})},p._key))})]})})]}):a("span",{className:`${n} text-white`,children:t==null?void 0:t.label})})},t._key)})})})}function Y({socialMedia:e}){return e?a("div",{className:"mt-[70px] flex justify-center space-x-[50px]",children:e==null?void 0:e.map(o=>(o==null?void 0:o.socialMediaLink)&&a(w,{"aria-label":(o==null?void 0:o.socialMedia)||(o==null?void 0:o.socialMediaPlatform)||"social-media-link",className:"text-white hover:text-gray-2 leading-none transition",style:{fontSize:"24px"},target:"_blank",rel:"noopener noreferrer",href:o==null?void 0:o.socialMediaLink,children:a(H,{social:o==null?void 0:o.socialMedia})},o==null?void 0:o._key))}):null}function q({menu:e,showMenu:o,firstLine:r,secondLine:t,isNavHovered:d}){return a("div",{className:`block pr-4 lg:hidden z-[99] ${e?"fixed right-[20px] md:right-[50px]":"relative"}`,children:c("svg",{onClick:o,width:"40",height:"40",viewBox:"0 0 44 44",fill:d?"#ffffff":"#000000",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer",children:[a(S.rect,{width:"20",height:"3",style:r}),a(S.rect,{width:"30",height:"3",style:t})]})})}function J({children:e,className:o=""}){return a("div",{className:`flex flex-col space-y-6 ${o}`,children:e})}function K({children:e,className:o=""}){return a("div",{className:`border-none ${o}`,children:e})}function Q({children:e,className:o="",isOpen:r,onClick:t}){return c("button",{onClick:t,className:`${o} flex items-center justify-between w-full`,children:[e,a(C,{className:`transform transition-transform duration-200 ${r?"rotate-180":""}`})]})}function U({children:e,isOpen:o}){return a("div",{className:`overflow-hidden transition-all duration-200 ${o?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}`,children:e})}export{D as a};
1
+ import{a as y}from"./chunk-S35O64PB.mjs";import{animated as S,useSpring as _}from"@react-spring/web";import{Image as T}from"@stackshift-ui/image";import{Link as w}from"@stackshift-ui/link";import{Section as z}from"@stackshift-ui/section";import{SocialIcons as H}from"@stackshift-ui/social-icons";import{useWindowScroll as j}from"@uidotdev/usehooks";import P,{Fragment as C,useState as R}from"react";import{BsChevronDown as B}from"react-icons/bs";import{Fragment as I,jsx as a,jsxs as c}from"react/jsx-runtime";var n="small-text-style group-hover:text-white hover:text-white relative after:content-[''] after:w-0 hover:after:w-full h-5 !outline-none after:h-[0.5px] after:bg-white after:absolute after:bottom-0 after:left-0 after:transition-all after:duration-300";function D({logo:e,socialMedia:o,dropdownMenu:r}){let[t,d]=R(!1),[s,u]=P.useState(!1),[m,f]=R(null),[v,i]=R(!1),x=()=>{u(N=>!N),s?document.body.style.overflow="unset":document.body.style.overflow="hidden"},g=_({transform:s?"translate(9px, 32px) rotate(-45deg) scaleX(1.5)":"translate(17px, 17px) rotate(0deg) scaleX(1)"}),p=_({transform:s?"translate(12px, 11px) rotate(45deg)":"translate(7px, 27px) rotate(0deg)"}),[{x:A,y:h}]=j(),L=h&&h>5?"bg-black fixed top-0":"fixed bg-transparent",$=h&&h>5,b=N=>{N&&f(m===N?null:N)},M=N=>{i(N)};return a(z,{className:"!px-0 w-full flex flex-col absolute top-0 z-50",children:c("nav",{className:`w-full z-50 md:gap-2 gap-0 hover:bg-black/80 transition-colors duration-300 ${t?"!bg-black border-b-white":"border-b-transparent"} ${L}`,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[a("div",{className:"w-full z-10 px-4",children:c("div",{className:"w-full flex flex-wrap justify-between items-center py-6",children:[c("div",{className:"flex items-center space-x-[50px]",children:[a(F,{logo:e}),a(O,{dropdownMenu:r,isNavHovered:v,setShowDropdown:d})]}),a(q,{menu:s,showMenu:x,firstLine:g,secondLine:p,isNavHovered:v})]})}),a(G,{menu:s,showMenu:x,dropdownMenu:r,logo:e,openAccordion:m,toggleAccordion:b,socialMedia:o})]})})}function F({logo:e}){var o;return a("div",{className:"w-[200px] relative z-20",children:(e==null?void 0:e.image)&&a(w,{"aria-label":`Go to ${y(e)}`,className:"text-3xl font-bold leading-none",href:y(e),children:a(T,{className:"md:h-[75px]",src:e==null?void 0:e.image,alt:(o=e==null?void 0:e.alt)!=null?o:"navigation-logo",width:100,height:100})})})}function O({dropdownMenu:e,isNavHovered:o,setShowDropdown:r}){return!e||(e==null?void 0:e.length)===0?null:a(C,{children:e&&(e==null?void 0:e.length)>0&&a("ul",{className:"hidden lg:flex flex-wrap space-x-[50px] xl:min-w-max",children:e==null?void 0:e.map(t=>a(P.Fragment,{children:(t==null?void 0:t.label)&&(t==null?void 0:t._key)&&a("li",{className:"static z-20 hover:z-10",children:(t==null?void 0:t.routeType)==="singleRoute"?a(l,{link:t,style:`${n} ${o?"text-white":"text-black"}`}):(t==null?void 0:t.routeType)==="multipleRoute"?a(E,{link:t,isNavHovered:o,onHover:()=>r(!0),onLeave:()=>r(!1)}):a("span",{className:`${n} ${o?"text-white":"text-black"}`,children:t==null?void 0:t.label})})},t._key))})})}function l({link:e,style:o=n}){var r,t,d,s,u,m,f;return a(I,{children:e.linkType==="linkInternal"?a(w,{"aria-label":`Navigation ${(r=e==null?void 0:e.label)!=null?r:"Menu"} links which directs to ${(e==null?void 0:e.internalLink)===void 0?"page-not-found":e==null?void 0:e.internalLink}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",href:`${((t=e.internalLink)==null?void 0:t.toLowerCase())==="home"?"/":`${e.internalLink?e==null?void 0:e.internalLink:"page-not-found"}`}`,children:e==null?void 0:e.label}):(e==null?void 0:e.linkType)==="linkText"&&((d=e==null?void 0:e.linkText)==null?void 0:d.slice(0,1))!=="/"?a("a",{href:e!=null&&e.linkText?e==null?void 0:e.linkText:"link-not-found","aria-label":`Navigation ${(s=e==null?void 0:e.label)!=null?s:"Menu"} links which directs to ${(e==null?void 0:e.linkText)===void 0?"link-not-found":e==null?void 0:e.linkText}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:e==null?void 0:e.label}):(e==null?void 0:e.linkType)==="linkText"&&((u=e==null?void 0:e.linkText)==null?void 0:u.slice(0,1))==="/"?a(w,{"aria-label":`Navigation ${(m=e==null?void 0:e.label)!=null?m:"Menu"} links which directs to ${(e==null?void 0:e.linkText)===void 0?"link-not-found":e==null?void 0:e.linkText}`,className:o,target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",href:e!=null&&e.linkText?e==null?void 0:e.linkText:"link-not-found",children:e==null?void 0:e.label}):a("a",{"aria-label":`Navigation ${(f=e==null?void 0:e.label)!=null?f:"Menu"} links which directs to ${(e==null?void 0:e.externalLink)===void 0?"link-not-found":e==null?void 0:e.externalLink}`,className:o,target:e==null?void 0:e.linkTarget,href:`${e.externalLink===void 0?"link-not-found":e.externalLink}`,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:e==null?void 0:e.label})})}function E({link:e,onHover:o,onLeave:r,isNavHovered:t}){var f,v,i,x,g,p,A,h,L,$;let[d,s]=R(!1);return c("div",{className:"group relative",onMouseEnter:()=>{s(!0),o()},onMouseLeave:()=>{setTimeout(()=>{s(!1),r()},100)},children:[a("button",{className:`${n} group-hover:after:!w-full flex items-center space-x-2 ${t?"text-white":"text-black"}`,children:a("span",{children:e==null?void 0:e.label})}),a("div",{className:"absolute left-0 right-0 top-full h-2 pointer-events-auto opacity-0 group-hover:pointer-events-auto"}),a("div",{className:"fixed left-0 right-0 top-[80px] pointer-events-none group-hover:pointer-events-auto opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-50",children:a("div",{className:"w-3/4 mx-auto bg-black shadow-lg",children:a("div",{className:"max-w-[1440px] mx-auto px-4",children:a("div",{className:"p-[30px]",children:c("div",{className:"grid grid-cols-5 gap-[30px]",children:[(e==null?void 0:e.featuredRoute)&&a("div",{className:"col-span-2 pr-[20px]",children:c("div",{className:"w-full h-0 pb-[75%] relative bg-obsidian",children:[((f=e==null?void 0:e.featuredRoute)==null?void 0:f.featuredLink)&&a("div",{className:"absolute w-full h-full inset-0 p-[15px] flex flex-col justify-end z-10",children:a("span",{children:a(l,{link:(v=e==null?void 0:e.featuredRoute)==null?void 0:v.featuredLink,style:"small-text-style text-white underline underline-offset-4 decoration-[0.5px] opacity-50 hover:opacity-100 h-5 !outline-none transition-all duration-300 after:absolute after:inset-0"})})}),((i=e==null?void 0:e.featuredRoute)==null?void 0:i.mainImage)&&a(T,{src:(g=(x=e==null?void 0:e.featuredRoute)==null?void 0:x.mainImage)==null?void 0:g.image,alt:(h=(A=(p=e==null?void 0:e.featuredRoute)==null?void 0:p.mainImage)==null?void 0:A.alt)!=null?h:"image",width:100,height:100,className:"object-cover absolute inset-0 w-full h-full"})]})}),(e==null?void 0:e.multipleRoutes)&&a("div",{className:"col-span-3 py-[20px]",children:c("div",{className:"flex flex-col space-y-10",children:[(e==null?void 0:e.label)&&a("p",{className:"h3 text-white",children:e==null?void 0:e.label}),a("ul",{className:`grid gap-x-[60px] gap-y-3 ${((L=e==null?void 0:e.multipleRoutes)==null?void 0:L.length)>3?"grid-cols-2":"grid-cols-1"}`,children:($=e==null?void 0:e.multipleRoutes)==null?void 0:$.map(b=>a("li",{children:(b==null?void 0:b.label)&&a(l,{link:b,style:n})},b._key))})]})})]})})})})})]})}function G({menu:e,showMenu:o,logo:r,dropdownMenu:t,openAccordion:d,toggleAccordion:s,socialMedia:u}){return c("div",{className:`${e?"block":"hidden"} navbar-menu fixed inset-0 z-50`,children:[a("div",{className:"fixed inset-0 bg-black/80",onClick:o}),a("div",{className:"fixed top-0 right-0 bottom-0 flex flex-col w-full sm:max-w-sm bg-black/80",children:c("nav",{className:"flex flex-col w-full py-6 px-6 overflow-y-auto h-screen",children:[a(X,{logo:r,showMenu:o}),a(W,{dropdownMenu:t,openAccordion:d,toggleAccordion:s}),a(Y,{socialMedia:u}),a("div",{className:"mt-auto pt-20 text-gray-400",children:a("span",{className:"text-sm text-center block",children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})})]})}function X({logo:e,showMenu:o}){var r;return e!=null&&e.image?a(w,{"aria-label":`Go to ${y(e)}`,className:"text-3xl font-bold leading-none h-[40px] w-[100px] flex items-center justify-start mt-0 md:ml-[15px]",onClick:o,href:y(e),children:a(T,{className:"h-[20px] object-contain",src:e==null?void 0:e.image,alt:(r=e==null?void 0:e.alt)!=null?r:"navigation-logo"})}):null}function W({dropdownMenu:e,openAccordion:o,toggleAccordion:r}){return a("div",{className:"mt-[70px]",children:a(J,{children:e==null?void 0:e.map(t=>{var d,s,u,m,f,v,i,x,g;return a(P.Fragment,{children:(t==null?void 0:t.label)&&(t==null?void 0:t._key)&&a(I,{children:(t==null?void 0:t.routeType)==="singleRoute"?a("span",{children:a(l,{link:t,style:`${n} !text-base !h-auto text-white`})}):(t==null?void 0:t.routeType)==="multipleRoute"?c(K,{children:[a(Q,{isOpen:o===t._key,onClick:()=>t._key&&r(t._key),className:`${n} after:!w-0 !p-0 text-white`,children:t==null?void 0:t.label}),a(U,{isOpen:o===t._key,children:c("div",{className:"py-6 flex flex-col space-y-2",children:[(t==null?void 0:t.featuredRoute)&&a("div",{children:c("div",{className:"w-full h-0 pb-[75%] relative bg-obsidian",children:[((d=t==null?void 0:t.featuredRoute)==null?void 0:d.featuredLink)&&a("div",{className:"absolute w-full h-full inset-0 p-[15px] flex flex-col justify-end z-10",children:a("span",{children:a(l,{link:(s=t==null?void 0:t.featuredRoute)==null?void 0:s.featuredLink,style:"small-text-style text-white underline underline-offset-4 decoration-[0.5px] opacity-50 hover:opacity-100 h-5 !outline-none transition-all duration-300"})})}),((u=t==null?void 0:t.featuredRoute)==null?void 0:u.mainImage)&&a(T,{src:(f=(m=t==null?void 0:t.featuredRoute)==null?void 0:m.mainImage)==null?void 0:f.image,className:"object-cover absolute inset-0 w-full h-full",alt:(x=(i=(v=t==null?void 0:t.featuredRoute)==null?void 0:v.mainImage)==null?void 0:i.alt)!=null?x:"image"})]})}),(t==null?void 0:t.multipleRoutes)&&a("ul",{className:"flex flex-col justify-center space-y-1 pl-[15px]",children:(g=t==null?void 0:t.multipleRoutes)==null?void 0:g.map(p=>a("li",{children:(p==null?void 0:p.label)&&a(l,{link:p,style:`${n} text-white`})},p._key))})]})})]}):a("span",{className:`${n} text-white`,children:t==null?void 0:t.label})})},t._key)})})})}function Y({socialMedia:e}){return e?a("div",{className:"mt-[70px] flex justify-center space-x-[50px]",children:e==null?void 0:e.map(o=>(o==null?void 0:o.socialMediaLink)&&a(w,{"aria-label":(o==null?void 0:o.socialMedia)||(o==null?void 0:o.socialMediaPlatform)||"social-media-link",className:"text-white hover:text-gray-2 leading-none transition",style:{fontSize:"24px"},target:"_blank",rel:"noopener noreferrer",href:o==null?void 0:o.socialMediaLink,children:a(H,{social:o==null?void 0:o.socialMedia})},o==null?void 0:o._key))}):null}function q({menu:e,showMenu:o,firstLine:r,secondLine:t,isNavHovered:d}){return a("div",{className:`block pr-4 lg:hidden z-[99] ${e?"fixed right-[20px] md:right-[50px]":"relative"}`,children:c("svg",{onClick:o,width:"40",height:"40",viewBox:"0 0 44 44",fill:d?"#ffffff":"#000000",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer",children:[a(S.rect,{width:"20",height:"3",style:r}),a(S.rect,{width:"30",height:"3",style:t})]})})}function J({children:e,className:o=""}){return a("div",{className:`flex flex-col space-y-6 ${o}`,children:e})}function K({children:e,className:o=""}){return a("div",{className:`border-none ${o}`,children:e})}function Q({children:e,className:o="",isOpen:r,onClick:t}){return c("button",{onClick:t,className:`${o} flex items-center justify-between w-full`,children:[e,a(B,{className:`transform transition-transform duration-200 ${r?"rotate-180":""}`})]})}function U({children:e,isOpen:o}){return a("div",{className:`overflow-hidden transition-all duration-200 ${o?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}`,children:e})}export{D as a};
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a as f}from"./chunk-7PZN5XLN.mjs";import{a as m}from"./chunk-2KK4WBIF.mjs";import{a as p}from"./chunk-AYUL7QX6.mjs";import{a as x}from"./chunk-7JNLKLGB.mjs";import{a as o}from"./chunk-SMYVBKA6.mjs";import{a as r}from"./chunk-ZCDQD6XN.mjs";import{a as e}from"./chunk-5TVYK3JB.mjs";import{a as t}from"./chunk-FJRVUW5P.mjs";import"./chunk-S35O64PB.mjs";export{x as Navigation,o as Navigation_A,r as Navigation_B,e as Navigation_C,t as Navigation_D,f as Navigation_F,m as Navigation_G,p as Navigation_H};
2
+ "use strict";import{a as x}from"./chunk-4QKIS7MI.mjs";import{a as f}from"./chunk-NAXN36LA.mjs";import{a as m}from"./chunk-UZSKH6KM.mjs";import{a as p}from"./chunk-75U64ABO.mjs";import{a as o}from"./chunk-LHY7HMPK.mjs";import{a as r}from"./chunk-3IPFZ24A.mjs";import{a as e}from"./chunk-BZOQMRPS.mjs";import{a as t}from"./chunk-KKLBGZ33.mjs";import"./chunk-S35O64PB.mjs";export{x as Navigation,o as Navigation_A,r as Navigation_B,e as Navigation_C,t as Navigation_D,f as Navigation_F,m as Navigation_G,p as Navigation_H};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { LabeledRoute, LabeledRouteWithKey, Logo, Logos, MegaMenu, SectionsProps, SocialLink } from "./types";
2
3
  export interface ResponsiveNavLinksProps {
3
4
  menu: boolean;
@@ -1 +1 @@
1
- import{a}from"./chunk-7JNLKLGB.mjs";export{a as Navigation};
1
+ import{a}from"./chunk-4QKIS7MI.mjs";import"./chunk-NAXN36LA.mjs";import"./chunk-UZSKH6KM.mjs";import"./chunk-75U64ABO.mjs";import"./chunk-LHY7HMPK.mjs";import"./chunk-3IPFZ24A.mjs";import"./chunk-BZOQMRPS.mjs";import"./chunk-KKLBGZ33.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation};
@@ -1 +1 @@
1
- import{a}from"./chunk-SMYVBKA6.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_A,a as default};
1
+ import{a}from"./chunk-LHY7HMPK.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_A,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-ZCDQD6XN.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_B,a as default};
1
+ import{a}from"./chunk-3IPFZ24A.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_B,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-5TVYK3JB.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_C,a as default};
1
+ import{a}from"./chunk-BZOQMRPS.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_C,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-FJRVUW5P.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_D,a as default};
1
+ import{a}from"./chunk-KKLBGZ33.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_D,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-7PZN5XLN.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_F,a as default};
1
+ import{a}from"./chunk-NAXN36LA.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_F,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-2KK4WBIF.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_G,a as default};
1
+ import{a}from"./chunk-UZSKH6KM.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_G,a as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-AYUL7QX6.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_H,a as default};
1
+ import{a}from"./chunk-75U64ABO.mjs";import"./chunk-S35O64PB.mjs";export{a as Navigation_H,a as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/navigation",
3
3
  "description": "",
4
- "version": "7.0.0-beta.1",
4
+ "version": "7.0.0-beta.11",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "typescript": "^5.6.2",
30
30
  "vite-tsconfig-paths": "^5.0.1",
31
31
  "vitest": "^2.1.1",
32
- "@stackshift-ui/typescript-config": "6.0.10",
33
- "@stackshift-ui/eslint-config": "6.0.10"
32
+ "@stackshift-ui/eslint-config": "6.0.10",
33
+ "@stackshift-ui/typescript-config": "6.0.10"
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
@@ -38,21 +38,21 @@
38
38
  "@react-spring/web": "^10.0.1",
39
39
  "@uidotdev/usehooks": "^2.4.1",
40
40
  "react-icons": "^5.3.0",
41
- "@stackshift-ui/link": "6.0.12-beta.1",
42
- "@stackshift-ui/flex": "7.0.0-beta.1",
43
- "@stackshift-ui/button": "6.1.0-beta.1",
44
- "@stackshift-ui/system": "6.1.0-beta.1",
45
- "@stackshift-ui/grid": "7.0.0-beta.1",
46
- "@stackshift-ui/section": "7.0.0-beta.1",
47
- "@stackshift-ui/social-icons": "7.0.0-beta.1",
48
- "@stackshift-ui/container": "7.0.0-beta.1",
49
- "@stackshift-ui/text": "7.0.0-beta.1",
50
- "@stackshift-ui/heading": "7.0.0-beta.1",
51
- "@stackshift-ui/image": "6.1.0-beta.1",
52
- "@stackshift-ui/scripts": "6.1.0-beta.0"
41
+ "@stackshift-ui/container": "7.0.0-beta.7",
42
+ "@stackshift-ui/button": "7.0.0-beta.9",
43
+ "@stackshift-ui/scripts": "7.0.0-beta.6",
44
+ "@stackshift-ui/system": "7.0.0-beta.7",
45
+ "@stackshift-ui/text": "7.0.0-beta.7",
46
+ "@stackshift-ui/heading": "7.0.0-beta.7",
47
+ "@stackshift-ui/grid": "7.0.0-beta.7",
48
+ "@stackshift-ui/social-icons": "7.0.0-beta.7",
49
+ "@stackshift-ui/section": "7.0.0-beta.7",
50
+ "@stackshift-ui/flex": "7.0.0-beta.7",
51
+ "@stackshift-ui/image": "7.0.0-beta.8",
52
+ "@stackshift-ui/link": "7.0.0-beta.7"
53
53
  },
54
54
  "peerDependencies": {
55
- "@stackshift-ui/system": ">=6.1.0-beta.1",
55
+ "@stackshift-ui/system": ">=7.0.0-beta.7",
56
56
  "@types/react": "16.8 - 19",
57
57
  "next": "10 - 14",
58
58
  "react": "16.8 - 19",
@@ -1,22 +1,29 @@
1
- import { lazy } from "react";
1
+ import React from "react";
2
+ import NavigationA from "./navigation_a";
3
+ import NavigationB from "./navigation_b";
4
+ import NavigationC from "./navigation_c";
5
+ import NavigationD from "./navigation_d";
6
+ import NavigationF from "./navigation_f";
7
+ import NavigationG from "./navigation_g";
8
+ import NavigationH from "./navigation_h";
2
9
  import {
3
- LabeledRoute,
4
- LabeledRouteWithKey,
5
- Logo,
6
- Logos,
7
- MegaMenu,
8
- SectionsProps,
9
- SocialLink,
10
+ LabeledRoute,
11
+ LabeledRouteWithKey,
12
+ Logo,
13
+ Logos,
14
+ MegaMenu,
15
+ SectionsProps,
16
+ SocialLink,
10
17
  } from "./types";
11
18
 
12
19
  const Variants = {
13
- variant_a: lazy(() => import("./navigation_a")),
14
- variant_b: lazy(() => import("./navigation_b")),
15
- variant_c: lazy(() => import("./navigation_c")),
16
- variant_d: lazy(() => import("./navigation_d")),
17
- variant_f: lazy(() => import("./navigation_f")),
18
- variant_g: lazy(() => import("./navigation_g")),
19
- variant_h: lazy(() => import("./navigation_h")),
20
+ variant_a: NavigationA,
21
+ variant_b: NavigationB,
22
+ variant_c: NavigationC,
23
+ variant_d: NavigationD,
24
+ variant_f: NavigationF,
25
+ variant_g: NavigationG,
26
+ variant_h: NavigationH,
20
27
  };
21
28
 
22
29
  export interface ResponsiveNavLinksProps {
@@ -6,7 +6,7 @@ import { Section } from "@stackshift-ui/section";
6
6
  import { Text } from "@stackshift-ui/text";
7
7
  import React from "react";
8
8
  import { NavigationProps, ResponsiveNavLinksProps } from ".";
9
- import { ConditionalLink, logoLink } from "./helper";
9
+ import { logoLink } from "./helper";
10
10
  import { LabeledRoute, LabeledRouteWithKey, Logo } from "./types";
11
11
 
12
12
  export default function Navigation_A({
@@ -103,16 +103,12 @@ function NavItem({ link }: { link?: LabeledRoute }) {
103
103
  return (
104
104
  <li>
105
105
  <Button
106
- asChild
107
- variant="link"
106
+ as="link"
107
+ link={link}
108
+ variant="unstyled"
108
109
  aria-label={link?.label}
109
110
  className="text-sm text-gray-500 no-underline hover:text-gray-900">
110
- <ConditionalLink
111
- link={link}
112
- ariaLabel={link?.label}
113
- className="text-sm text-gray-500 no-underline hover:text-gray-900">
114
- {link?.label}
115
- </ConditionalLink>
111
+ {link?.label}
116
112
  </Button>
117
113
  </li>
118
114
  );
@@ -139,13 +135,12 @@ function ResponsiveNavLinks({
139
135
  {links?.map((link: any, index: number) => (
140
136
  <li className="mb-1" key={index}>
141
137
  <Button
142
- asChild
143
- variant="link"
138
+ as="link"
139
+ link={link}
140
+ variant="unstyled"
144
141
  aria-label={link?.label}
145
142
  className="block w-full cursor-pointer p-4 text-sm font-semibold text-gray-900 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
146
- <ConditionalLink link={link} ariaLabel={link?.label}>
147
- {link?.label}
148
- </ConditionalLink>
143
+ {link?.label}
149
144
  </Button>
150
145
  </li>
151
146
  ))}
@@ -156,30 +151,22 @@ function ResponsiveNavLinks({
156
151
  <Flex direction="col" className="pt-6">
157
152
  {primaryButton?.label ? (
158
153
  <Button
159
- asChild
154
+ as="link"
155
+ link={primaryButton}
160
156
  aria-label={primaryButton?.label}
161
- variant="outline"
157
+ variant="unstyled"
162
158
  className="block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50">
163
- <ConditionalLink
164
- link={primaryButton}
165
- ariaLabel={primaryButton?.label}
166
- className="block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50">
167
- {primaryButton?.label}
168
- </ConditionalLink>
159
+ {primaryButton?.label}
169
160
  </Button>
170
161
  ) : null}
171
162
  {secondaryButton?.label ? (
172
163
  <Button
173
- asChild
164
+ as="link"
165
+ link={secondaryButton}
174
166
  aria-label={secondaryButton?.label}
175
- variant="link"
167
+ variant="unstyled"
176
168
  className={`block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global`}>
177
- <ConditionalLink
178
- link={secondaryButton}
179
- ariaLabel={secondaryButton?.label}
180
- className={`block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global`}>
181
- {secondaryButton?.label}
182
- </ConditionalLink>
169
+ {secondaryButton?.label}
183
170
  </Button>
184
171
  ) : null}
185
172
  </Flex>
@@ -222,24 +209,22 @@ function Buttons({
222
209
  <Flex align="center" gap={4}>
223
210
  {primaryButton?.label ? (
224
211
  <Button
225
- asChild
212
+ as="link"
213
+ link={primaryButton}
226
214
  aria-label={primaryButton?.label}
227
- variant="outline"
215
+ variant="unstyled"
228
216
  className="hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50">
229
- <ConditionalLink link={primaryButton} ariaLabel={primaryButton?.label}>
230
- {primaryButton?.label}
231
- </ConditionalLink>
217
+ {primaryButton?.label}
232
218
  </Button>
233
219
  ) : null}
234
220
  {secondaryButton?.label ? (
235
221
  <Button
236
- asChild
222
+ as="link"
223
+ link={secondaryButton}
237
224
  aria-label={secondaryButton?.label}
238
- variant="default"
225
+ variant="unstyled"
239
226
  className="hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global">
240
- <ConditionalLink link={secondaryButton} ariaLabel={secondaryButton?.label}>
241
- {secondaryButton?.label}
242
- </ConditionalLink>
227
+ {secondaryButton?.label}
243
228
  </Button>
244
229
  ) : null}
245
230
  </Flex>
@@ -7,7 +7,7 @@ import { Section } from "@stackshift-ui/section";
7
7
  import { Text } from "@stackshift-ui/text";
8
8
  import React from "react";
9
9
  import { NavigationProps, ResponsiveNavLinksProps } from ".";
10
- import { ConditionalLink, logoLink } from "./helper";
10
+ import { logoLink } from "./helper";
11
11
  import { LabeledRoute, LabeledRouteWithKey, Logo } from "./types";
12
12
 
13
13
  export default function Navigation_B({
@@ -90,12 +90,11 @@ function NavItem({ link }: { link?: LabeledRouteWithKey }) {
90
90
  <li>
91
91
  <Button
92
92
  variant="unstyled"
93
- asChild
93
+ as="link"
94
+ link={link}
94
95
  aria-label={link?.label}
95
96
  className="text-sm text-gray-500 no-underline hover:text-gray-900">
96
- <ConditionalLink link={link} ariaLabel={link?.label || "Navigation link"}>
97
- {link?.label}
98
- </ConditionalLink>
97
+ {link?.label}
99
98
  </Button>
100
99
  </li>
101
100
  );
@@ -131,22 +130,20 @@ function Buttons({
131
130
  <Flex align="center" gap={4}>
132
131
  {primaryButton?.label && (
133
132
  <Button
134
- asChild
133
+ as="link"
134
+ link={primaryButton}
135
135
  aria-label={primaryButton?.label}
136
136
  className="hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50">
137
- <ConditionalLink link={primaryButton} ariaLabel={primaryButton?.label}>
138
- {primaryButton?.label}
139
- </ConditionalLink>
137
+ {primaryButton?.label}
140
138
  </Button>
141
139
  )}
142
140
  {secondaryButton?.label && (
143
141
  <Button
144
- asChild
142
+ as="link"
143
+ link={secondaryButton}
145
144
  aria-label={secondaryButton?.label}
146
145
  className="hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global">
147
- <ConditionalLink link={secondaryButton} ariaLabel={secondaryButton?.label}>
148
- {secondaryButton?.label}
149
- </ConditionalLink>
146
+ {secondaryButton?.label}
150
147
  </Button>
151
148
  )}
152
149
  </Flex>
@@ -206,15 +203,11 @@ function ResponsiveNavLinks({
206
203
  {links?.map((link, index) => (
207
204
  <li className="mb-1" key={index}>
208
205
  <Button
209
- asChild
206
+ as="link"
207
+ link={link}
210
208
  aria-label={link?.label}
211
209
  className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
212
- <ConditionalLink
213
- link={link}
214
- ariaLabel={link?.label || "Navigation link"}
215
- className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
216
- {link?.label}
217
- </ConditionalLink>
210
+ {link?.label}
218
211
  </Button>
219
212
  </li>
220
213
  ))}
@@ -224,28 +217,20 @@ function ResponsiveNavLinks({
224
217
  <div className="pt-6">
225
218
  {primaryButton?.label && (
226
219
  <Button
227
- asChild
220
+ as="link"
221
+ link={primaryButton}
228
222
  aria-label={primaryButton?.label}
229
223
  className="block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50">
230
- <ConditionalLink
231
- link={primaryButton}
232
- ariaLabel={primaryButton?.label}
233
- className="block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50">
234
- {primaryButton?.label}
235
- </ConditionalLink>
224
+ {primaryButton?.label}
236
225
  </Button>
237
226
  )}
238
227
  {secondaryButton?.label && (
239
228
  <Button
240
- asChild
229
+ as="link"
230
+ link={secondaryButton}
241
231
  aria-label={secondaryButton?.label}
242
232
  className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
243
- <ConditionalLink
244
- link={secondaryButton}
245
- ariaLabel={secondaryButton?.label}
246
- className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
247
- {secondaryButton?.label}
248
- </ConditionalLink>
233
+ {secondaryButton?.label}
249
234
  </Button>
250
235
  )}
251
236
  </div>