quirk-ui 0.0.462 → 0.0.463
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.
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),ie=require("../Modal/index.cjs"),q=require("../../../index-DpYgzTme.cjs"),ce=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-By_lBPb-.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),ie=require("../Modal/index.cjs"),q=require("../../../index-DpYgzTme.cjs"),ce=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-By_lBPb-.cjs"),G=require("../../../external-link-DDShu-48.cjs"),Ne=require("../../../x-Dft9NVe_.cjs"),U=require("../../../createLucideIcon-DpotSgUx.cjs"),$e=require("../../../chevron-down-DfK1XBl3.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ge=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],we=
|
|
6
|
+
*/const ge=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],we=U.createLucideIcon("earth",ge);/**
|
|
7
7
|
* @license lucide-react v0.488.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ce=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Le=
|
|
11
|
+
*/const Ce=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Le=U.createLucideIcon("menu",Ce);/**
|
|
12
12
|
* @license lucide-react v0.488.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const _e=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Se=G.createLucideIcon("search",_e),Me={standard:e.styles.standard,transparent:e.styles.transparent},Ee={left:e.styles.left,center:e.styles.center,right:e.styles.right},Ae=({spotlight:a,renderText:b})=>{var t,C,j,p,v,L,m,_,S,M,y;const w=(t=a.image)==null?void 0:t.asset.altText,x=((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="external";let u="#";return((j=a.callToAction.linkOptions)==null?void 0:j.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?u=(v=a.callToAction.linkOptions)==null?void 0:v.externalUrl:((L=a.callToAction.linkOptions)==null?void 0:L.linkType)==="internal"&&((_=(m=a.callToAction.linkOptions)==null?void 0:m.internalUrl)!=null&&_.slug.current)&&(u=`/${(M=(S=a.callToAction.linkOptions)==null?void 0:S.internalUrl)==null?void 0:M.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:w||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{className:e.styles.title,children:b==null?void 0:b(a.title,e.styles.title)}),a.description&&s.jsx("div",{className:e.styles.description,children:b==null?void 0:b(a.description,e.styles.description)})]}),((y=a.callToAction)==null?void 0:y.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(q.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:u,target:x?"_blank":"_self",rel:x?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Te({renderText:a,title:b,logo:w,items:x,groups:u,utilityItems:t,isSticky:C=!1,showSearch:j=!0,showLocaleSelect:p=!0,alignment:v="right",variant:L="standard",navigationType:m="default",searchComponent:_,localeSelectComponent:S,className:M}){const[y,U]=r.useState(!1),[X,E]=r.useState(!1),[H,f]=r.useState(null),[re,oe]=r.useState(0),[de,ye]=r.useState(!1),[ue,he]=r.useState(null),[o,N]=r.useState([]),[A,B]=r.useState(0),[be,V]=r.useState(null),[$,fe]=r.useState(!1),[T,O]=r.useState("forward"),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ie.Modal,{className:e.styles.searchModal,onOpen:()=>E(!0),onClose:()=>E(!1),trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Se,{size:16})}),content:_})})}),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ie.Modal,{className:e.styles.localeModal,onOpen:()=>E(!0),onClose:()=>E(!1),trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx(we,{size:16})}),content:S})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;fe(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const xe=()=>{N([])},me=n=>{O("forward"),N([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},K=n=>{O("forward"),N(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},je=()=>{O("backward"),N(n=>n.slice(0,-1))},W=r.useRef(null),g=r.useRef(null),I=r.useRef(new Map),ve=()=>{U(n=>{const l=!n;return l||(N([]),O("forward"),f(null)),l})},Q=n=>{const l=I.current.get(n);if(l&&g.current){const d=l.getBoundingClientRect(),h=g.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;he(c)}},ke=n=>{f(l=>l===n?null:n)},Y=r.useCallback(n=>{W.current&&!W.current.contains(n.target)&&f(null)},[]),Z=r.useCallback(()=>{P(),typeof window<"u"&&window.innerWidth>768&&(U(!1),f(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),P=r.useCallback(()=>{if(g.current){const n=g.current.getBoundingClientRect().width;oe(n),ye(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",Z),l&&document.addEventListener("click",Y),P(),()=>{n&&window.removeEventListener("resize",Z),l&&document.removeEventListener("click",Y)}},[]),r.useEffect(()=>{if(typeof document<"u"){const n=document.documentElement;return y||X?(n.style.overflow="hidden",n.style.height="100%"):(n.style.overflow="",n.style.height=""),()=>{n.style.overflow="",n.style.height=""}}},[y,X]);const pe=n=>n.map((l,d)=>{var ee,se,ne,le,ae;const h=`group-${d}`,z=be===d,c=(ee=l.primaryItems)==null?void 0:ee[A??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{V(d),f(h),Q(h)},onMouseLeave:()=>{V(null),B(0),f(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{I.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":z,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${z?e.styles.open:""} `,children:[l.title,s.jsx($e.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${z?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${l.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(se=l.primaryItems)==null?void 0:se.map((i,k)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${A===k?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var te;f(null),(te=i.onClick)==null||te.call(i)},onMouseEnter:()=>i.sublinks?B(k):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??k):s.jsx("button",{className:`${e.styles.sublinkToggle} ${A===k?e.styles.open:""}`,onMouseEnter:()=>B(k),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??k))]}),(c==null?void 0:c.sublinks)&&((ne=c==null?void 0:c.sublinks)==null?void 0:ne.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsxs("div",{className:e.styles.sublinksDescription,children:[s.jsx("p",{children:"TEXT HERE"}),a==null?void 0:a(c.description)]}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${A}`)]},`${c.label}-${(le=c==null?void 0:c.sublinks)==null?void 0:le.length}`),(l==null?void 0:l.secondaryItems)&&((ae=l==null?void 0:l.secondaryItems)==null?void 0:ae.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&R(l.secondaryItems,`${h}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Ae,{spotlight:l.spotlight,renderText:a??(i=>String(i))})})]})})})]},l._key??`group-${d}`)}),R=(n,l="")=>n.map(d=>{const h=`${l}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:l,openPath:H,togglePath:ke,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:I},d._key??h)});return s.jsx("header",{ref:W,className:`${M??""} ${Ee[v]} ${Me[L]} ${e.styles.navbar} ${C?e.styles.sticky:""} ${u&&u.length?e.styles.advanced:e.styles.default}`,"aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&v!=="center"?e.styles.twoColumn:""}`,children:[w?s.jsx("div",{className:e.styles.logo,children:w}):s.jsx("div",{className:e.styles.title,children:b}),s.jsx("nav",{ref:g,style:{left:v==="center"?`calc(50% - ${re/2}px)`:"0"},className:`${e.styles.nav} ${y?e.styles.open:""} ${de?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${ue}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),m==="default"&&x&&s.jsxs("div",{className:e.styles.grid,children:[x&&x.length>0&&R(x),j&&!$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(F,{})]}),p&&s.jsx(J,{})]}),!$&&m==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&pe(u),j&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(F,{})]}),p&&s.jsx(J,{})]}),$&&m==="advanced"&&y&&o.length===0&&u&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:u.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${T==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>me(n),children:n.title})},n._key??l))}),$&&m==="advanced"&&y&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:o.length===1?xe:je,children:s.jsx(q.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${T==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:a==null?void 0:a(o[o.length-1].description)}),o[o.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${T==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>K(n),children:s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]})}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]}),n.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${T==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>K(n),children:n.label}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[n.label,n.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(ce.ButtonGroup,{children:t.map((n,l)=>s.jsx(q.CallToAction,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel??n.label,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel??n.label}):n.label},n._key||l))})}),t&&t.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${y?e.styles.open:""}`,children:s.jsx(ce.ButtonGroup,{alignment:"center",children:s.jsx(q.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[$&&j&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:ve,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":"main-menu",children:y?s.jsx(Ne.X,{size:24}):s.jsx(Le,{size:24})})]})]})})}exports.Navbar=Te;
|
|
16
|
+
*/const _e=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=U.createLucideIcon("search",_e),Se={standard:e.styles.standard,transparent:e.styles.transparent},Ee={left:e.styles.left,center:e.styles.center,right:e.styles.right},Ae=({spotlight:a,renderText:b})=>{var t,C,j,p,v,L,m,_,M,S,y;const w=(t=a.image)==null?void 0:t.asset.altText,x=((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="external";let u="#";return((j=a.callToAction.linkOptions)==null?void 0:j.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?u=(v=a.callToAction.linkOptions)==null?void 0:v.externalUrl:((L=a.callToAction.linkOptions)==null?void 0:L.linkType)==="internal"&&((_=(m=a.callToAction.linkOptions)==null?void 0:m.internalUrl)!=null&&_.slug.current)&&(u=`/${(S=(M=a.callToAction.linkOptions)==null?void 0:M.internalUrl)==null?void 0:S.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:w||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{className:e.styles.title,children:b==null?void 0:b(a.title,e.styles.title)}),a.description&&s.jsx("div",{className:e.styles.description,children:b==null?void 0:b(a.description,e.styles.description)})]}),((y=a.callToAction)==null?void 0:y.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(q.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:u,target:x?"_blank":"_self",rel:x?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Oe({renderText:a,title:b,logo:w,items:x,groups:u,utilityItems:t,isSticky:C=!1,showSearch:j=!0,showLocaleSelect:p=!0,alignment:v="right",variant:L="standard",navigationType:m="default",searchComponent:_,localeSelectComponent:M,className:S}){const[y,X]=r.useState(!1),[B,E]=r.useState(!1),[H,f]=r.useState(null),[re,oe]=r.useState(0),[de,ye]=r.useState(!1),[ue,he]=r.useState(null),[o,N]=r.useState([]),[A,F]=r.useState(0),[be,V]=r.useState(null),[$,fe]=r.useState(!1),[O,T]=r.useState("forward"),W=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ie.Modal,{className:e.styles.searchModal,onOpen:()=>E(!0),onClose:()=>E(!1),trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16})}),content:_})})}),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ie.Modal,{className:e.styles.localeModal,onOpen:()=>E(!0),onClose:()=>E(!1),trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx(we,{size:16})}),content:M})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;fe(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const xe=()=>{N([])},me=n=>{T("forward"),N([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},K=n=>{T("forward"),N(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},je=()=>{T("backward"),N(n=>n.slice(0,-1))},I=r.useRef(null),g=r.useRef(null),D=r.useRef(new Map),ve=()=>{X(n=>{const l=!n;return l||(N([]),T("forward"),f(null)),l})},Q=n=>{const l=D.current.get(n);if(l&&g.current){const d=l.getBoundingClientRect(),h=g.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;he(c)}},ke=n=>{f(l=>l===n?null:n)},Y=r.useCallback(n=>{I.current&&!I.current.contains(n.target)&&f(null)},[]),Z=r.useCallback(()=>{P(),typeof window<"u"&&window.innerWidth>768&&(X(!1),f(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),P=r.useCallback(()=>{if(g.current){const n=g.current.getBoundingClientRect().width;oe(n),ye(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",Z),l&&document.addEventListener("click",Y),P(),()=>{n&&window.removeEventListener("resize",Z),l&&document.removeEventListener("click",Y)}},[]),r.useEffect(()=>{if(console.log("MODAL",B),typeof document<"u"){const n=document.documentElement;return y||B?(n.style.overflow="hidden",n.style.height="100%"):(n.style.overflow="",n.style.height=""),()=>{n.style.overflow="",n.style.height=""}}},[y,B]);const pe=n=>n.map((l,d)=>{var ee,se,ne,le,ae;const h=`group-${d}`,z=be===d,c=(ee=l.primaryItems)==null?void 0:ee[A??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{V(d),f(h),Q(h)},onMouseLeave:()=>{V(null),F(0),f(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{D.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":z,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${z?e.styles.open:""} `,children:[l.title,s.jsx($e.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${z?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${l.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(se=l.primaryItems)==null?void 0:se.map((i,k)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${A===k?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var te;f(null),(te=i.onClick)==null||te.call(i)},onMouseEnter:()=>i.sublinks?F(k):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(G.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??k):s.jsx("button",{className:`${e.styles.sublinkToggle} ${A===k?e.styles.open:""}`,onMouseEnter:()=>F(k),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??k))]}),(c==null?void 0:c.sublinks)&&((ne=c==null?void 0:c.sublinks)==null?void 0:ne.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsxs("div",{className:e.styles.sublinksDescription,children:[s.jsx("p",{children:"TEXT HERE"}),a==null?void 0:a(c.description)]}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${A}`)]},`${c.label}-${(le=c==null?void 0:c.sublinks)==null?void 0:le.length}`),(l==null?void 0:l.secondaryItems)&&((ae=l==null?void 0:l.secondaryItems)==null?void 0:ae.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&R(l.secondaryItems,`${h}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Ae,{spotlight:l.spotlight,renderText:a??(i=>String(i))})})]})})})]},l._key??`group-${d}`)}),R=(n,l="")=>n.map(d=>{const h=`${l}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:l,openPath:H,togglePath:ke,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:D},d._key??h)});return s.jsx("header",{ref:I,className:`${S??""} ${Ee[v]} ${Se[L]} ${e.styles.navbar} ${C?e.styles.sticky:""} ${u&&u.length?e.styles.advanced:e.styles.default}`,"aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&v!=="center"?e.styles.twoColumn:""}`,children:[w?s.jsx("div",{className:e.styles.logo,children:w}):s.jsx("div",{className:e.styles.title,children:b}),s.jsx("nav",{ref:g,style:{left:v==="center"?`calc(50% - ${re/2}px)`:"0"},className:`${e.styles.nav} ${y?e.styles.open:""} ${de?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${ue}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),m==="default"&&x&&s.jsxs("div",{className:e.styles.grid,children:[x&&x.length>0&&R(x),j&&!$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(W,{})]}),p&&s.jsx(J,{})]}),!$&&m==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&pe(u),j&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(W,{})]}),p&&s.jsx(J,{})]}),$&&m==="advanced"&&y&&o.length===0&&u&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:u.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${O==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>me(n),children:n.title})},n._key??l))}),$&&m==="advanced"&&y&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:o.length===1?xe:je,children:s.jsx(q.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${O==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:a==null?void 0:a(o[o.length-1].description)}),o[o.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${O==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>K(n),children:s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]})}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]}),n.isExternal&&s.jsx(G.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${O==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>K(n),children:n.label}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[n.label,n.isExternal&&s.jsx(G.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(ce.ButtonGroup,{children:t.map((n,l)=>s.jsx(q.CallToAction,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel??n.label,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel??n.label}):n.label},n._key||l))})}),t&&t.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${y?e.styles.open:""}`,children:s.jsx(ce.ButtonGroup,{alignment:"center",children:s.jsx(q.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[$&&j&&s.jsx(W,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:ve,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":"main-menu",children:y?s.jsx(Ne.X,{size:24}):s.jsx(Le,{size:24})})]})]})})}exports.Navbar=Oe;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as c, Fragment as de } from "react/jsx-runtime";
|
|
2
|
-
import { useState as f, useEffect as
|
|
2
|
+
import { useState as f, useEffect as G, useRef as X, useCallback as H } from "react";
|
|
3
3
|
import { Modal as he } from "../Modal/index.mjs";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as Ee, C as q } from "../../../index-CIb65n0z.js";
|
|
5
5
|
import { ButtonGroup as me } from "../ButtonGroup/index.mjs";
|
|
6
6
|
import { s as e, N as Ae } from "../../../NavLink-CQpDLYjg.js";
|
|
7
|
-
import { E as
|
|
7
|
+
import { E as V } from "../../../external-link-BOPobeQJ.js";
|
|
8
8
|
import { X as _e } from "../../../x-CnsEH4Ox.js";
|
|
9
|
-
import { c as
|
|
9
|
+
import { c as J } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
10
10
|
import { C as Se } from "../../../chevron-down-DSUzBz9F.js";
|
|
11
11
|
/**
|
|
12
12
|
* @license lucide-react v0.488.0 - ISC
|
|
@@ -25,7 +25,7 @@ const Oe = [
|
|
|
25
25
|
],
|
|
26
26
|
["path", { d: "M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05", key: "14pb5j" }],
|
|
27
27
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
28
|
-
], ze =
|
|
28
|
+
], ze = J("earth", Oe);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.488.0 - ISC
|
|
31
31
|
*
|
|
@@ -36,7 +36,7 @@ const xe = [
|
|
|
36
36
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
37
37
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
38
38
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
39
|
-
], Re =
|
|
39
|
+
], Re = J("menu", xe);
|
|
40
40
|
/**
|
|
41
41
|
* @license lucide-react v0.488.0 - ISC
|
|
42
42
|
*
|
|
@@ -46,26 +46,26 @@ const xe = [
|
|
|
46
46
|
const Te = [
|
|
47
47
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
48
48
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
49
|
-
], We =
|
|
49
|
+
], We = J("search", Te), Fe = {
|
|
50
50
|
standard: e.standard,
|
|
51
51
|
transparent: e.transparent
|
|
52
52
|
}, Be = {
|
|
53
53
|
left: e.left,
|
|
54
54
|
center: e.center,
|
|
55
55
|
right: e.right
|
|
56
|
-
},
|
|
56
|
+
}, De = ({
|
|
57
57
|
spotlight: s,
|
|
58
58
|
renderText: u
|
|
59
59
|
}) => {
|
|
60
|
-
var i,
|
|
61
|
-
const
|
|
60
|
+
var i, E, N, y, $, A, p, _, S, O, h;
|
|
61
|
+
const L = (i = s.image) == null ? void 0 : i.asset.altText, k = ((E = s.callToAction.linkOptions) == null ? void 0 : E.linkType) === "external";
|
|
62
62
|
let m = "#";
|
|
63
63
|
return ((N = s.callToAction.linkOptions) == null ? void 0 : N.linkType) === "external" && ((y = s.callToAction.linkOptions) != null && y.externalUrl) ? m = ($ = s.callToAction.linkOptions) == null ? void 0 : $.externalUrl : ((A = s.callToAction.linkOptions) == null ? void 0 : A.linkType) === "internal" && ((_ = (p = s.callToAction.linkOptions) == null ? void 0 : p.internalUrl) != null && _.slug.current) && (m = `/${(O = (S = s.callToAction.linkOptions) == null ? void 0 : S.internalUrl) == null ? void 0 : O.slug.current}`), /* @__PURE__ */ c("div", { className: e.spotlight, children: [
|
|
64
64
|
s.image && /* @__PURE__ */ a("div", { className: e.imageWrapper, children: /* @__PURE__ */ a(
|
|
65
65
|
"img",
|
|
66
66
|
{
|
|
67
67
|
src: (s == null ? void 0 : s.image.imageUrl) ?? "",
|
|
68
|
-
alt:
|
|
68
|
+
alt: L || s.image.asset.description || "Content image",
|
|
69
69
|
width: 600,
|
|
70
70
|
height: 400
|
|
71
71
|
}
|
|
@@ -75,7 +75,7 @@ const Te = [
|
|
|
75
75
|
s.description && /* @__PURE__ */ a("div", { className: e.description, children: u == null ? void 0 : u(s.description, e.description) })
|
|
76
76
|
] }),
|
|
77
77
|
((h = s.callToAction) == null ? void 0 : h.linkOptions) && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
78
|
-
|
|
78
|
+
q,
|
|
79
79
|
{
|
|
80
80
|
as: "a",
|
|
81
81
|
variant: s.callToAction.variant ?? "primary",
|
|
@@ -91,11 +91,11 @@ const Te = [
|
|
|
91
91
|
function Qe({
|
|
92
92
|
renderText: s,
|
|
93
93
|
title: u,
|
|
94
|
-
logo:
|
|
94
|
+
logo: L,
|
|
95
95
|
items: k,
|
|
96
96
|
groups: m,
|
|
97
97
|
utilityItems: i,
|
|
98
|
-
isSticky:
|
|
98
|
+
isSticky: E = !1,
|
|
99
99
|
showSearch: N = !0,
|
|
100
100
|
showLocaleSelect: y = !0,
|
|
101
101
|
alignment: $ = "right",
|
|
@@ -105,7 +105,7 @@ function Qe({
|
|
|
105
105
|
localeSelectComponent: S,
|
|
106
106
|
className: O
|
|
107
107
|
}) {
|
|
108
|
-
const [h,
|
|
108
|
+
const [h, K] = f(!1), [B, z] = f(!1), [Q, v] = f(null), [fe, be] = f(0), [ue, ve] = f(!1), [ke, pe] = f(null), [t, w] = f([]), [x, D] = f(
|
|
109
109
|
0
|
|
110
110
|
), [Ne, Y] = f(null), [C, $e] = f(!1), [R, T] = f("forward"), j = () => /* @__PURE__ */ a(
|
|
111
111
|
"div",
|
|
@@ -149,7 +149,7 @@ function Qe({
|
|
|
149
149
|
content: S
|
|
150
150
|
}
|
|
151
151
|
) }) });
|
|
152
|
-
|
|
152
|
+
G(() => {
|
|
153
153
|
if (typeof window < "u") {
|
|
154
154
|
const n = () => {
|
|
155
155
|
const l = window.innerWidth < 768;
|
|
@@ -181,45 +181,45 @@ function Qe({
|
|
|
181
181
|
]);
|
|
182
182
|
}, we = () => {
|
|
183
183
|
T("backward"), w((n) => n.slice(0, -1));
|
|
184
|
-
},
|
|
185
|
-
|
|
184
|
+
}, I = X(null), M = X(null), U = X(/* @__PURE__ */ new Map()), Ce = () => {
|
|
185
|
+
K((n) => {
|
|
186
186
|
const l = !n;
|
|
187
187
|
return l || (w([]), T("forward"), v(null)), l;
|
|
188
188
|
});
|
|
189
189
|
}, ee = (n) => {
|
|
190
|
-
const l =
|
|
190
|
+
const l = U.current.get(n);
|
|
191
191
|
if (l && M.current) {
|
|
192
|
-
const d = l.getBoundingClientRect(), b = M.current.getBoundingClientRect(),
|
|
193
|
-
pe(
|
|
192
|
+
const d = l.getBoundingClientRect(), b = M.current.getBoundingClientRect(), o = d.left - b.left + d.width / 2;
|
|
193
|
+
pe(o);
|
|
194
194
|
}
|
|
195
195
|
}, Me = (n) => {
|
|
196
196
|
v((l) => l === n ? null : n);
|
|
197
|
-
}, ne =
|
|
198
|
-
|
|
199
|
-
}, []), ae =
|
|
200
|
-
le(), typeof window < "u" && window.innerWidth > 768 && (
|
|
201
|
-
}, []), le =
|
|
197
|
+
}, ne = H((n) => {
|
|
198
|
+
I.current && !I.current.contains(n.target) && v(null);
|
|
199
|
+
}, []), ae = H(() => {
|
|
200
|
+
le(), typeof window < "u" && window.innerWidth > 768 && (K(!1), v(null), typeof document < "u" && (document.body.style.overflow = ""));
|
|
201
|
+
}, []), le = H(() => {
|
|
202
202
|
if (M.current) {
|
|
203
203
|
const n = M.current.getBoundingClientRect().width;
|
|
204
204
|
be(n), ve(!0);
|
|
205
205
|
}
|
|
206
206
|
}, []);
|
|
207
|
-
|
|
207
|
+
G(() => {
|
|
208
208
|
const n = typeof window < "u", l = typeof document < "u";
|
|
209
209
|
return n && window.addEventListener("resize", ae), l && document.addEventListener("click", ne), le(), () => {
|
|
210
210
|
n && window.removeEventListener("resize", ae), l && document.removeEventListener("click", ne);
|
|
211
211
|
};
|
|
212
|
-
}, []),
|
|
213
|
-
if (typeof document < "u") {
|
|
212
|
+
}, []), G(() => {
|
|
213
|
+
if (console.log("MODAL", B), typeof document < "u") {
|
|
214
214
|
const n = document.documentElement;
|
|
215
|
-
return h ||
|
|
215
|
+
return h || B ? (n.style.overflow = "hidden", n.style.height = "100%") : (n.style.overflow = "", n.style.height = ""), () => {
|
|
216
216
|
n.style.overflow = "", n.style.height = "";
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
}, [h,
|
|
220
|
-
const
|
|
221
|
-
var se, ie, ce, re,
|
|
222
|
-
const b = `group-${d}`, F = Ne === d,
|
|
219
|
+
}, [h, B]);
|
|
220
|
+
const Le = (n) => n.map((l, d) => {
|
|
221
|
+
var se, ie, ce, re, oe;
|
|
222
|
+
const b = `group-${d}`, F = Ne === d, o = (se = l.primaryItems) == null ? void 0 : se[x ?? 0];
|
|
223
223
|
return /* @__PURE__ */ c(
|
|
224
224
|
"div",
|
|
225
225
|
{
|
|
@@ -228,14 +228,14 @@ function Qe({
|
|
|
228
228
|
Y(d), v(b), ee(b);
|
|
229
229
|
},
|
|
230
230
|
onMouseLeave: () => {
|
|
231
|
-
Y(null),
|
|
231
|
+
Y(null), D(0), v(null);
|
|
232
232
|
},
|
|
233
233
|
children: [
|
|
234
234
|
/* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ c(
|
|
235
235
|
"button",
|
|
236
236
|
{
|
|
237
237
|
ref: (r) => {
|
|
238
|
-
|
|
238
|
+
U.current.set(b, r);
|
|
239
239
|
},
|
|
240
240
|
role: "menuitem",
|
|
241
241
|
"aria-haspopup": "true",
|
|
@@ -275,10 +275,10 @@ function Qe({
|
|
|
275
275
|
target: r.isExternal ? "_blank" : "_self",
|
|
276
276
|
rel: r.isExternal ? "noopener noreferrer" : void 0,
|
|
277
277
|
onClick: () => {
|
|
278
|
-
var
|
|
279
|
-
v(null), (
|
|
278
|
+
var te;
|
|
279
|
+
v(null), (te = r.onClick) == null || te.call(r);
|
|
280
280
|
},
|
|
281
|
-
onMouseEnter: () => r.sublinks ?
|
|
281
|
+
onMouseEnter: () => r.sublinks ? D(g) : null,
|
|
282
282
|
role: "menuitem",
|
|
283
283
|
children: [
|
|
284
284
|
/* @__PURE__ */ c("span", { className: e.linkContent, children: [
|
|
@@ -286,7 +286,7 @@ function Qe({
|
|
|
286
286
|
r.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: r.subtitle })
|
|
287
287
|
] }),
|
|
288
288
|
r.isExternal && /* @__PURE__ */ a(
|
|
289
|
-
|
|
289
|
+
V,
|
|
290
290
|
{
|
|
291
291
|
className: e.newTabIcon,
|
|
292
292
|
size: 16
|
|
@@ -299,7 +299,7 @@ function Qe({
|
|
|
299
299
|
"button",
|
|
300
300
|
{
|
|
301
301
|
className: `${e.sublinkToggle} ${x === g ? e.open : ""}`,
|
|
302
|
-
onMouseEnter: () =>
|
|
302
|
+
onMouseEnter: () => D(g),
|
|
303
303
|
children: /* @__PURE__ */ c("span", { className: e.linkContent, children: [
|
|
304
304
|
r.label,
|
|
305
305
|
r.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: r.subtitle })
|
|
@@ -311,24 +311,24 @@ function Qe({
|
|
|
311
311
|
]
|
|
312
312
|
}
|
|
313
313
|
),
|
|
314
|
-
(
|
|
314
|
+
(o == null ? void 0 : o.sublinks) && ((ce = o == null ? void 0 : o.sublinks) == null ? void 0 : ce.length) > 0 && /* @__PURE__ */ c(
|
|
315
315
|
"div",
|
|
316
316
|
{
|
|
317
317
|
className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
|
|
318
318
|
children: [
|
|
319
|
-
(
|
|
319
|
+
(o == null ? void 0 : o.description) && /* @__PURE__ */ c("div", { className: e.sublinksDescription, children: [
|
|
320
320
|
/* @__PURE__ */ a("p", { children: "TEXT HERE" }),
|
|
321
|
-
s == null ? void 0 : s(
|
|
321
|
+
s == null ? void 0 : s(o.description)
|
|
322
322
|
] }),
|
|
323
|
-
(
|
|
324
|
-
|
|
323
|
+
(o == null ? void 0 : o.sublinks) && W(
|
|
324
|
+
o.sublinks,
|
|
325
325
|
`${b}-${x}`
|
|
326
326
|
)
|
|
327
327
|
]
|
|
328
328
|
},
|
|
329
|
-
`${
|
|
329
|
+
`${o.label}-${(re = o == null ? void 0 : o.sublinks) == null ? void 0 : re.length}`
|
|
330
330
|
),
|
|
331
|
-
(l == null ? void 0 : l.secondaryItems) && ((
|
|
331
|
+
(l == null ? void 0 : l.secondaryItems) && ((oe = l == null ? void 0 : l.secondaryItems) == null ? void 0 : oe.length) > 0 && /* @__PURE__ */ a(
|
|
332
332
|
"div",
|
|
333
333
|
{
|
|
334
334
|
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
@@ -340,7 +340,7 @@ function Qe({
|
|
|
340
340
|
{
|
|
341
341
|
className: `${e.sublinksColumn} ${e.spotlightColumn}`,
|
|
342
342
|
children: /* @__PURE__ */ a(
|
|
343
|
-
|
|
343
|
+
De,
|
|
344
344
|
{
|
|
345
345
|
spotlight: l.spotlight,
|
|
346
346
|
renderText: s ?? ((r) => String(r))
|
|
@@ -370,7 +370,7 @@ function Qe({
|
|
|
370
370
|
updateTriangleIndicator: ee,
|
|
371
371
|
setOpenPath: v,
|
|
372
372
|
renderLinks: W,
|
|
373
|
-
buttonRefs:
|
|
373
|
+
buttonRefs: U
|
|
374
374
|
},
|
|
375
375
|
d._key ?? b
|
|
376
376
|
);
|
|
@@ -378,15 +378,15 @@ function Qe({
|
|
|
378
378
|
return /* @__PURE__ */ a(
|
|
379
379
|
"header",
|
|
380
380
|
{
|
|
381
|
-
ref:
|
|
382
|
-
className: `${O ?? ""} ${Be[$]} ${Fe[A]} ${e.navbar} ${
|
|
381
|
+
ref: I,
|
|
382
|
+
className: `${O ?? ""} ${Be[$]} ${Fe[A]} ${e.navbar} ${E ? e.sticky : ""} ${m && m.length ? e.advanced : e.default}`,
|
|
383
383
|
"aria-label": "Main navigation",
|
|
384
384
|
children: /* @__PURE__ */ c(
|
|
385
385
|
"div",
|
|
386
386
|
{
|
|
387
387
|
className: `${e.container} ${(!i || i.length === 0) && $ !== "center" ? e.twoColumn : ""}`,
|
|
388
388
|
children: [
|
|
389
|
-
|
|
389
|
+
L ? /* @__PURE__ */ a("div", { className: e.logo, children: L }) : /* @__PURE__ */ a("div", { className: e.title, children: u }),
|
|
390
390
|
/* @__PURE__ */ a(
|
|
391
391
|
"nav",
|
|
392
392
|
{
|
|
@@ -428,14 +428,14 @@ function Qe({
|
|
|
428
428
|
y && /* @__PURE__ */ a(Z, {})
|
|
429
429
|
] }),
|
|
430
430
|
!C && p === "advanced" && m && /* @__PURE__ */ c("div", { className: e.grid, children: [
|
|
431
|
-
m.length > 0 &&
|
|
431
|
+
m.length > 0 && Le(m),
|
|
432
432
|
N && /* @__PURE__ */ c(de, { children: [
|
|
433
433
|
/* @__PURE__ */ a("span", { className: e.separator }),
|
|
434
434
|
/* @__PURE__ */ a(j, {})
|
|
435
435
|
] }),
|
|
436
436
|
y && /* @__PURE__ */ a(Z, {})
|
|
437
437
|
] }),
|
|
438
|
-
C && p === "advanced" && h &&
|
|
438
|
+
C && p === "advanced" && h && t.length === 0 && m && /* @__PURE__ */ a("div", { className: `${e.mobileMenu}`, children: m.map((n, l) => /* @__PURE__ */ a(
|
|
439
439
|
"div",
|
|
440
440
|
{
|
|
441
441
|
className: `${e.mobileMenuItem} ${R === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
@@ -450,7 +450,7 @@ function Qe({
|
|
|
450
450
|
},
|
|
451
451
|
n._key ?? l
|
|
452
452
|
)) }),
|
|
453
|
-
C && p === "advanced" && h &&
|
|
453
|
+
C && p === "advanced" && h && t.length > 0 && /* @__PURE__ */ c(
|
|
454
454
|
"div",
|
|
455
455
|
{
|
|
456
456
|
className: `${e.mobileMenuSlide} `,
|
|
@@ -459,9 +459,9 @@ function Qe({
|
|
|
459
459
|
"button",
|
|
460
460
|
{
|
|
461
461
|
className: e.back,
|
|
462
|
-
onClick:
|
|
462
|
+
onClick: t.length === 1 ? ge : we,
|
|
463
463
|
children: /* @__PURE__ */ a(
|
|
464
|
-
|
|
464
|
+
Ee,
|
|
465
465
|
{
|
|
466
466
|
size: 18,
|
|
467
467
|
"aria-hidden": "true",
|
|
@@ -470,16 +470,16 @@ function Qe({
|
|
|
470
470
|
)
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
|
-
|
|
473
|
+
t[t.length - 1].description && /* @__PURE__ */ a(
|
|
474
474
|
"div",
|
|
475
475
|
{
|
|
476
476
|
className: `${e.sublinksDescription} ${R === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
477
477
|
children: s == null ? void 0 : s(
|
|
478
|
-
|
|
478
|
+
t[t.length - 1].description
|
|
479
479
|
)
|
|
480
480
|
}
|
|
481
481
|
),
|
|
482
|
-
|
|
482
|
+
t[t.length - 1].primary.map((n, l) => /* @__PURE__ */ a(
|
|
483
483
|
"div",
|
|
484
484
|
{
|
|
485
485
|
className: `${e.mobileMenuItem} ${R === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
@@ -507,7 +507,7 @@ function Qe({
|
|
|
507
507
|
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
508
508
|
] }),
|
|
509
509
|
n.isExternal && /* @__PURE__ */ a(
|
|
510
|
-
|
|
510
|
+
V,
|
|
511
511
|
{
|
|
512
512
|
className: e.newTabIcon,
|
|
513
513
|
size: 16
|
|
@@ -519,8 +519,8 @@ function Qe({
|
|
|
519
519
|
},
|
|
520
520
|
n._key ?? `primary-${l}`
|
|
521
521
|
)),
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
t[t.length - 1].secondary.length > 0 && /* @__PURE__ */ a("hr", { className: e.groupDivider }),
|
|
523
|
+
t[t.length - 1].secondary.map(
|
|
524
524
|
(n, l) => /* @__PURE__ */ a(
|
|
525
525
|
"div",
|
|
526
526
|
{
|
|
@@ -543,7 +543,7 @@ function Qe({
|
|
|
543
543
|
children: [
|
|
544
544
|
n.label,
|
|
545
545
|
n.isExternal && /* @__PURE__ */ a(
|
|
546
|
-
|
|
546
|
+
V,
|
|
547
547
|
{
|
|
548
548
|
className: e.newTabIcon,
|
|
549
549
|
size: 16
|
|
@@ -558,13 +558,13 @@ function Qe({
|
|
|
558
558
|
)
|
|
559
559
|
]
|
|
560
560
|
},
|
|
561
|
-
`stack-${
|
|
561
|
+
`stack-${t.length}`
|
|
562
562
|
)
|
|
563
563
|
] })
|
|
564
564
|
}
|
|
565
565
|
),
|
|
566
566
|
i && i.length > 0 && /* @__PURE__ */ a("nav", { className: e.utility, "aria-label": "Utility navigation", children: /* @__PURE__ */ a(me, { children: i.map((n, l) => /* @__PURE__ */ a(
|
|
567
|
-
|
|
567
|
+
q,
|
|
568
568
|
{
|
|
569
569
|
as: "a",
|
|
570
570
|
href: n.href ?? "/",
|
|
@@ -591,7 +591,7 @@ function Qe({
|
|
|
591
591
|
"aria-label": "Utility navigation",
|
|
592
592
|
className: `${e.utilityMobile} ${h ? e.open : ""}`,
|
|
593
593
|
children: /* @__PURE__ */ a(me, { alignment: "center", children: /* @__PURE__ */ a(
|
|
594
|
-
|
|
594
|
+
q,
|
|
595
595
|
{
|
|
596
596
|
as: "a",
|
|
597
597
|
href: i[1].href ?? "/",
|