quirk-ui 0.1.79 → 0.1.80
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,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),le=require("../Modal/index.cjs"),A=require("../../../index-hPJqlEOh.cjs"),te=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-BaEzx3t5.cjs"),V=require("../../utils/NoScroll/noScroll.cjs"),Ce=require("../../../chevron-right-motlyADs.cjs"),H=require("../../../external-link-DDShu-48.cjs"),_e=require("../../../x-Dft9NVe_.cjs"),ae=require("../../../createLucideIcon-DpotSgUx.cjs"),Se=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
|
|
6
|
+
*/const Ee=[["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"}]],Le=ae.createLucideIcon("earth",Ee);/**
|
|
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 Le=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ne.createLucideIcon("search",Le),Ee={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},Re=({spotlight:i,renderText:h})=>{var y,_,p,v,k,S;const r=i.callToAction;if(!r)return null;const j=((y=r.linkOptions)==null?void 0:y.linkType)==="external";let u="#";return j&&((_=r.linkOptions)!=null&&_.externalUrl)?u=r.linkOptions.externalUrl:((p=r.linkOptions)==null?void 0:p.linkType)==="internal"&&((k=(v=r.linkOptions)==null?void 0:v.internalUrl)!=null&&k.slug.current)&&(u=`/${r.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((S=i.image.imageUrls)==null?void 0:S.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:h==null?void 0:h(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:h==null?void 0:h(i.description,e.styles.description)})]}),r.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(z.Button,{as:"a",variant:r.variant??"primary",href:u,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":r.ariaLabel||r.label,children:r.label})})]})};function ze({renderText:i,title:h,logo:r,items:j,groups:u,utilityItems:y,isSticky:_=!1,showSearch:p=!0,showLocaleSelect:v=!0,showThemeToggle:k=!0,themeToggleComponent:S,alignment:q="right",variant:ae="standard",navigationType:I="default",searchComponent:te,localeSelectComponent:ie,className:re,style:ce,...oe}){const[m,V]=a.useState(!1),[H,f]=a.useState(null),[de,ue]=a.useState(0),[ye,he]=a.useState(!1),[me,be]=a.useState(null),[c,$]=a.useState([]),[L,O]=a.useState(0),[xe,X]=a.useState(null),[w,pe]=a.useState(!1),[M,E]=a.useState("forward"),A=a.useRef(null),C=a.useRef(null),W=a.useRef(new Map),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:S})}),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(se.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:te})})}),K=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Ie,{size:16,"aria-hidden":"true"})}),content:ie})})}),B=a.useCallback(()=>{C.current&&ue(C.current.getBoundingClientRect().width)},[]),fe=()=>{V(l=>{const n=!l;return n||($([]),E("forward"),f(null)),n})},Q=a.useCallback(l=>{const n=W.current.get(l);if(n&&C.current){const d=n.getBoundingClientRect(),b=C.current.getBoundingClientRect();be(d.left-b.left+d.width/2)}},[]),je=a.useCallback(l=>{f(n=>n===l?null:l)},[]),G=a.useCallback(l=>{A.current&&!A.current.contains(l.target)&&f(null)},[]),D=a.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(V(!1),f(null))},[B]),ve=()=>$([]),ke=l=>{E("forward"),$([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},Y=l=>{E("forward"),$(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},ge=()=>{E("backward"),$(l=>l.slice(0,-1))};a.useEffect(()=>{if(typeof window>"u")return;const l=()=>pe(window.innerWidth<768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),a.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",D),n&&document.addEventListener("click",G),B(),he(!0),()=>{l&&window.removeEventListener("resize",D),n&&document.removeEventListener("click",G)}},[D,G,B]),a.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>U.lockScroll(),0):U.unlockScroll(),()=>U.unlockScroll()},[m]);const R=(l,n="")=>l.map((d,b)=>{const g=`${n}/${d._key??d.label}-${b}`;return s.jsx(e.NavLink,{link:d,path:g,parentPath:n,openPath:H,togglePath:je,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:W},g)}),Ne=l=>l.map((n,d)=>{var Z,T;const b=`group-${d}`,g=xe===d,x=(Z=n.primaryItems)==null?void 0:Z[L??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{X(d),f(b),Q(b)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:t=>{W.current.set(b,t)},"aria-haspopup":!0,"aria-expanded":g,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""}`,children:[n.title,s.jsx(_e.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${g?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,onMouseLeave:()=>{X(null),O(0),f(null)},children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${n.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}),(T=n.primaryItems)==null?void 0:T.map((t,N)=>t.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:t.href,className:`${e.styles.link} ${L===N?e.styles.open:""}`,target:t.isExternal?"_blank":"_self",rel:t.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ee;f(null),(ee=t.onClick)==null||ee.call(t)},onMouseEnter:()=>O(N),children:[s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]}),t.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},t._key??N):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${L===N?e.styles.open:""}`,onMouseEnter:()=>O(N),children:s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]})})},t._key??N))]}),(x==null?void 0:x.sublinks)&&x.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[x.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(x.description)}),R(x.sublinks,`${b}-${L}`)]},`${x.label}-${x.sublinks.length}`),n.secondaryItems&&n.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:R(n.secondaryItems,`${b}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Re,{spotlight:n.spotlight,renderText:i})})]})})})]},n._key??`group-${d}`)}),$e=[e.styles.navbar,Be[q],Ee[ae],_?e.styles.sticky:"",u!=null&&u.length?e.styles.advanced:e.styles.default,re??""].filter(Boolean).join(" "),o=y&&y.length>0?y[Math.min(1,y.length-1)]:null;return s.jsx("header",{ref:A,className:$e,style:ce,"aria-label":"Site header",...oe,children:s.jsxs("div",{className:`${e.styles.container} ${(!y||y.length===0)&&q!=="center"?e.styles.twoColumn:""}`,children:[r?s.jsx("div",{className:e.styles.logo,children:r}):h?s.jsx("div",{className:e.styles.title,children:h}):null,s.jsx("nav",{ref:C,style:{left:q==="center"?`calc(50% - ${de/2}px)`:"0"},className:`${e.styles.nav} ${m?e.styles.open:""} ${ye?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${me}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","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&R(j),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&!w&&s.jsx(F,{}),v&&s.jsx(K,{})]}),!w&&I==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&Ne(u),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&s.jsx(F,{}),v&&s.jsx(K,{})]}),w&&I==="advanced"&&m&&c.length===0&&u&&s.jsx("div",{className:e.styles.mobileMenu,children:u.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ke(l),children:l.title})},l._key??n))}),w&&I==="advanced"&&m&&c.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:c.length===1?ve:ge,children:s.jsx(we.ChevronLeft,{size:18,"aria-hidden":"true"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(c[c.length-1].description)}),c[c.length-1].primary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]}),l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`primary-${n}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:l.label}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[l.label,l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`secondary-${n}`))]},`stack-${c.length}`)]})}),y&&y.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(le.ButtonGroup,{children:y.map((l,n)=>s.jsx(z.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel,icon:l.icon,iconAlignment:l.iconAlignment,children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel}):l.label},l._key??n))})}),o&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(le.ButtonGroup,{alignment:"center",children:s.jsx(z.Button,{as:"a",href:o.href??"/",variant:o.variant??"primary",displayType:o.displayType??"text",imageSrc:o.imageSrc,imageAlt:o.imageAlt,"aria-label":o.ariaLabel,icon:o.icon,iconAlignment:o.iconAlignment,children:o.imageSrc?s.jsx("img",{src:o.imageSrc,alt:o.imageAlt??o.ariaLabel}):o.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[w&&p&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(Ce.X,{size:24,"aria-hidden":"true"}):s.jsx(z.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|
|
11
|
+
*/const Ie=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ae.createLucideIcon("search",Ie),Re={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},qe=({spotlight:i,renderText:x})=>{var h,E,p,g,N,L;const c=i.callToAction;if(!c)return null;const j=((h=c.linkOptions)==null?void 0:h.linkType)==="external";let y="#";return j&&((E=c.linkOptions)!=null&&E.externalUrl)?y=c.linkOptions.externalUrl:((p=c.linkOptions)==null?void 0:p.linkType)==="internal"&&((N=(g=c.linkOptions)==null?void 0:g.internalUrl)!=null&&N.slug.current)&&(y=`/${c.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((L=i.image.imageUrls)==null?void 0:L.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:x==null?void 0:x(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:x==null?void 0:x(i.description,e.styles.description)})]}),c.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(A.Button,{as:"a",variant:c.variant??"primary",href:y,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":c.ariaLabel||c.label,children:c.label})})]})};function ze({renderText:i,title:x,logo:c,items:j,groups:y,utilityItems:h,isSticky:E=!1,showSearch:p=!0,showLocaleSelect:g=!0,showThemeToggle:N=!0,themeToggleComponent:L,alignment:O="right",variant:ie="standard",navigationType:I="default",searchComponent:re,localeSelectComponent:ce,className:oe,style:de,...ue}){const[m,X]=t.useState(!1),[K,v]=t.useState(null),[ye,he]=t.useState(0),[me,fe]=t.useState(!1),[be,xe]=t.useState(null),[d,w]=t.useState([]),[M,W]=t.useState(0),[pe,J]=t.useState(null),[C,ve]=t.useState(!1),[R,B]=t.useState("forward"),D=t.useRef(null),k=t.useRef(null),Q=t.useRef(null),G=t.useRef(new Map),T=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:L})}),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(le.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:re})})}),Y=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(le.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Le,{size:16,"aria-hidden":"true"})}),content:ce})})}),q=t.useCallback(()=>{k.current&&he(k.current.getBoundingClientRect().width)},[]),Z=()=>{X(n=>{const l=!n;return l||(w([]),B("forward"),v(null)),l})},ee=t.useCallback(n=>{const l=G.current.get(n);if(l&&k.current){const r=l.getBoundingClientRect(),o=k.current.getBoundingClientRect();xe(r.left-o.left+r.width/2)}},[]),ke=t.useCallback(n=>{v(l=>l===n?null:n)},[]),U=t.useCallback(n=>{D.current&&!D.current.contains(n.target)&&v(null)},[]),P=t.useCallback(()=>{q(),typeof window<"u"&&window.innerWidth>768&&(X(!1),v(null))},[q]),je=()=>w([]),ge=n=>{B("forward"),w([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},se=n=>{B("forward"),w(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},Ne=()=>{B("backward"),w(n=>n.slice(0,-1))};t.useEffect(()=>{if(typeof window>"u")return;const n=()=>ve(window.innerWidth<768);return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",P),l&&document.addEventListener("click",U),q(),fe(!0),()=>{n&&window.removeEventListener("resize",P),l&&document.removeEventListener("click",U)}},[P,U,q]),t.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>V.lockScroll(),0):V.unlockScroll(),()=>V.unlockScroll()},[m]),t.useEffect(()=>{var r;if(!m)return;const n=(r=k.current)==null?void 0:r.querySelector('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus();const l=o=>{var S;if(o.key==="Escape"){Z(),(S=Q.current)==null||S.focus();return}if(o.key!=="Tab"||!k.current)return;const b=Array.from(k.current.querySelectorAll('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(a=>!a.closest("[aria-hidden=true]"));if(b.length===0)return;const f=b[0],_=b[b.length-1];o.shiftKey?document.activeElement===f&&(o.preventDefault(),_.focus()):document.activeElement===_&&(o.preventDefault(),f.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[m]);const z=(n,l="")=>n.map((r,o)=>{const b=`${l}/${r._key??r.label}-${o}`;return s.jsx(e.NavLink,{link:r,path:b,parentPath:l,openPath:K,togglePath:ke,updateTriangleIndicator:ee,setOpenPath:v,renderLinks:z,buttonRefs:G},b)}),$e=n=>n.map((l,r)=>{var _,S;const o=`group-${r}`,b=pe===r,f=(_=l.primaryItems)==null?void 0:_[M??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{J(r),v(o),ee(o)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:a=>{G.current.set(o,a)},"aria-haspopup":!0,"aria-expanded":b,"aria-controls":`submenu-${r}`,className:`${e.styles.sublinkToggle} ${b?e.styles.open:""}`,children:[l.title,s.jsx(Se.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${r}`,className:`${e.styles.sublinks} ${b?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,onMouseLeave:()=>{J(null),W(0),v(null)},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}),(S=l.primaryItems)==null?void 0:S.map((a,$)=>a.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:a.href,className:`${e.styles.link} ${M===$?e.styles.open:""}`,target:a.isExternal?"_blank":"_self",rel:a.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ne;v(null),(ne=a.onClick)==null||ne.call(a)},onMouseEnter:()=>W($),children:[s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]}),a.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},a._key??$):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${M===$?e.styles.open:""}`,onMouseEnter:()=>W($),children:s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]})})},a._key??$))]}),(f==null?void 0:f.sublinks)&&f.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[f.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(f.description)}),z(f.sublinks,`${o}-${M}`)]},`${f.label}-${f.sublinks.length}`),l.secondaryItems&&l.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:z(l.secondaryItems,`${o}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(qe,{spotlight:l.spotlight,renderText:i})})]})})})]},l._key??`group-${r}`)}),we=[e.styles.navbar,Be[O],Re[ie],E?e.styles.sticky:"",y!=null&&y.length?e.styles.advanced:e.styles.default,oe??""].filter(Boolean).join(" "),u=h&&h.length>0?h[Math.min(1,h.length-1)]:null;return s.jsx("header",{ref:D,className:we,style:de,"aria-label":"Site header",...ue,children:s.jsxs("div",{className:`${e.styles.container} ${(!h||h.length===0)&&O!=="center"?e.styles.twoColumn:""}`,children:[c?s.jsx("div",{className:e.styles.logo,children:c}):x?s.jsx("div",{className:e.styles.title,children:x}):null,s.jsx("nav",{ref:k,style:{left:O==="center"?`calc(50% - ${ye/2}px)`:"0"},"aria-modal":m?"true":void 0,className:`${e.styles.nav} ${m?e.styles.open:""} ${me?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${be}px`},className:`${e.styles.triangle} ${K?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&z(j),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&!C&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),!C&&I==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&$e(y),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),C&&I==="advanced"&&m&&d.length===0&&y&&s.jsx("div",{className:e.styles.mobileMenu,children:y.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ge(n),children:n.title})},n._key??l))}),C&&I==="advanced"&&m&&d.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:d.length===1?je:Ne,children:s.jsx(Ce.ChevronLeft,{size:18,"aria-hidden":"true"})}),d[d.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(d[d.length-1].description)}),d[d.length-1].primary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(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,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(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`primary-${l}`)),d[d.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),d[d.length-1].secondary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(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,children:[n.label,n.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`secondary-${l}`))]},`stack-${d.length}`)]})}),h&&h.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(te.ButtonGroup,{children:h.map((n,l)=>s.jsx(A.Button,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel}):n.label},n._key??l))})}),u&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(te.ButtonGroup,{alignment:"center",children:s.jsx(A.Button,{as:"a",href:u.href??"/",variant:u.variant??"primary",displayType:u.displayType??"text",imageSrc:u.imageSrc,imageAlt:u.imageAlt,"aria-label":u.ariaLabel,icon:u.icon,iconAlignment:u.iconAlignment,children:u.imageSrc?s.jsx("img",{src:u.imageSrc,alt:u.imageAlt??u.ariaLabel}):u.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[C&&p&&s.jsx(F,{}),s.jsx("button",{ref:Q,className:e.styles.menuToggle,onClick:Z,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(_e.X,{size:24,"aria-hidden":"true"}):s.jsx(A.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { B as
|
|
1
|
+
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as F, useCallback as _, useEffect as U } from "react";
|
|
3
|
+
import { Modal as re } from "../Modal/index.mjs";
|
|
4
|
+
import { B as J, M as _e } from "../../../index-paelIj6o.js";
|
|
5
5
|
import { ButtonGroup as se } from "../ButtonGroup/index.mjs";
|
|
6
|
-
import { s as e, N as
|
|
7
|
-
import { lockScroll as
|
|
8
|
-
import { C as
|
|
9
|
-
import { E as
|
|
10
|
-
import { X as
|
|
11
|
-
import { c as
|
|
6
|
+
import { s as e, N as ze } from "../../../NavLink-BbTShlLw.js";
|
|
7
|
+
import { lockScroll as xe, unlockScroll as ce } from "../../utils/NoScroll/noScroll.mjs";
|
|
8
|
+
import { C as Ae } from "../../../chevron-right-Cim1KPuL.js";
|
|
9
|
+
import { E as K } from "../../../external-link-BOPobeQJ.js";
|
|
10
|
+
import { X as Re } from "../../../x-CnsEH4Ox.js";
|
|
11
|
+
import { c as oe } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
12
12
|
import { C as Be } from "../../../chevron-down-DSUzBz9F.js";
|
|
13
13
|
/**
|
|
14
14
|
* @license lucide-react v0.488.0 - ISC
|
|
@@ -27,215 +27,239 @@ const Oe = [
|
|
|
27
27
|
],
|
|
28
28
|
["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" }],
|
|
29
29
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
30
|
-
], We =
|
|
30
|
+
], We = oe("earth", Oe);
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v0.488.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
const
|
|
37
|
+
const De = [
|
|
38
38
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
39
39
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
40
|
-
], Fe =
|
|
40
|
+
], Fe = oe("search", De), Ue = {
|
|
41
41
|
standard: e.standard,
|
|
42
42
|
transparent: e.transparent
|
|
43
43
|
}, je = {
|
|
44
44
|
left: e.left,
|
|
45
45
|
center: e.center,
|
|
46
46
|
right: e.right
|
|
47
|
-
},
|
|
47
|
+
}, Ge = ({
|
|
48
48
|
spotlight: r,
|
|
49
|
-
renderText:
|
|
49
|
+
renderText: k
|
|
50
50
|
}) => {
|
|
51
|
-
var h,
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
54
|
-
const
|
|
51
|
+
var h, z, g, w, C, x;
|
|
52
|
+
const c = r.callToAction;
|
|
53
|
+
if (!c) return null;
|
|
54
|
+
const $ = ((h = c.linkOptions) == null ? void 0 : h.linkType) === "external";
|
|
55
55
|
let m = "#";
|
|
56
|
-
return
|
|
57
|
-
r.image && /* @__PURE__ */
|
|
56
|
+
return $ && ((z = c.linkOptions) != null && z.externalUrl) ? m = c.linkOptions.externalUrl : ((g = c.linkOptions) == null ? void 0 : g.linkType) === "internal" && ((C = (w = c.linkOptions) == null ? void 0 : w.internalUrl) != null && C.slug.current) && (m = `/${c.linkOptions.internalUrl.slug.current}`), /* @__PURE__ */ t("div", { className: e.spotlight, children: [
|
|
57
|
+
r.image && /* @__PURE__ */ a("div", { className: e.imageWrapper, children: /* @__PURE__ */ a(
|
|
58
58
|
"img",
|
|
59
59
|
{
|
|
60
|
-
src: ((
|
|
60
|
+
src: ((x = r.image.imageUrls) == null ? void 0 : x.medium) ?? "",
|
|
61
61
|
alt: r.image.asset.altText || r.image.asset.description || "Content image",
|
|
62
62
|
width: 600,
|
|
63
63
|
height: 400
|
|
64
64
|
}
|
|
65
65
|
) }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
r.title && /* @__PURE__ */
|
|
68
|
-
r.description && /* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ t("div", { className: e.content, children: [
|
|
67
|
+
r.title && /* @__PURE__ */ a("div", { className: e.title, children: k == null ? void 0 : k(r.title, e.title) }),
|
|
68
|
+
r.description && /* @__PURE__ */ a("div", { className: e.description, children: k == null ? void 0 : k(r.description, e.description) })
|
|
69
69
|
] }),
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
c.linkOptions && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
71
|
+
J,
|
|
72
72
|
{
|
|
73
73
|
as: "a",
|
|
74
|
-
variant:
|
|
74
|
+
variant: c.variant ?? "primary",
|
|
75
75
|
href: m,
|
|
76
|
-
target:
|
|
77
|
-
rel:
|
|
78
|
-
"aria-label":
|
|
79
|
-
children:
|
|
76
|
+
target: $ ? "_blank" : "_self",
|
|
77
|
+
rel: $ ? "noopener noreferrer" : void 0,
|
|
78
|
+
"aria-label": c.ariaLabel || c.label,
|
|
79
|
+
children: c.label
|
|
80
80
|
}
|
|
81
81
|
) })
|
|
82
82
|
] });
|
|
83
83
|
};
|
|
84
|
-
function
|
|
84
|
+
function nn({
|
|
85
85
|
renderText: r,
|
|
86
|
-
title:
|
|
87
|
-
logo:
|
|
88
|
-
items:
|
|
86
|
+
title: k,
|
|
87
|
+
logo: c,
|
|
88
|
+
items: $,
|
|
89
89
|
groups: m,
|
|
90
90
|
utilityItems: h,
|
|
91
|
-
isSticky:
|
|
92
|
-
showSearch:
|
|
93
|
-
showLocaleSelect:
|
|
94
|
-
showThemeToggle:
|
|
95
|
-
themeToggleComponent:
|
|
96
|
-
alignment:
|
|
97
|
-
variant:
|
|
98
|
-
navigationType:
|
|
99
|
-
searchComponent:
|
|
100
|
-
localeSelectComponent:
|
|
101
|
-
className:
|
|
102
|
-
style:
|
|
103
|
-
...
|
|
91
|
+
isSticky: z = !1,
|
|
92
|
+
showSearch: g = !0,
|
|
93
|
+
showLocaleSelect: w = !0,
|
|
94
|
+
showThemeToggle: C = !0,
|
|
95
|
+
themeToggleComponent: x,
|
|
96
|
+
alignment: j = "right",
|
|
97
|
+
variant: de = "standard",
|
|
98
|
+
navigationType: A = "default",
|
|
99
|
+
searchComponent: ue,
|
|
100
|
+
localeSelectComponent: me,
|
|
101
|
+
className: he,
|
|
102
|
+
style: fe,
|
|
103
|
+
...be
|
|
104
104
|
}) {
|
|
105
|
-
const [
|
|
105
|
+
const [f, Q] = v(!1), [Y, N] = v(null), [pe, ve] = v(0), [ke, ge] = v(!1), [Ne, ye] = v(null), [d, I] = v([]), [R, G] = v(
|
|
106
106
|
0
|
|
107
|
-
), [
|
|
107
|
+
), [$e, Z] = v(null), [M, we] = v(!1), [B, O] = v("forward"), P = F(null), y = F(null), T = F(null), q = F(/* @__PURE__ */ new Map()), ee = () => /* @__PURE__ */ a("div", { className: `${e.linkWrapper} ${e.parent}`, children: /* @__PURE__ */ a("div", { className: `${e.linkItem} ${e.themeToggle}`, children: x }) }), V = () => /* @__PURE__ */ a(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
110
|
className: `${e.linkWrapper} ${e.parent} ${e.searchWrapper}`,
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
|
|
111
|
+
children: /* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ a(
|
|
112
|
+
re,
|
|
113
113
|
{
|
|
114
114
|
size: "lg",
|
|
115
115
|
className: e.searchModal,
|
|
116
|
-
trigger: /* @__PURE__ */
|
|
116
|
+
trigger: /* @__PURE__ */ a(
|
|
117
117
|
"button",
|
|
118
118
|
{
|
|
119
119
|
title: "Search",
|
|
120
120
|
"aria-label": "Search",
|
|
121
121
|
className: e.search,
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ a(Fe, { size: 16, "aria-hidden": "true" })
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
content:
|
|
125
|
+
content: ue
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
}
|
|
129
|
-
),
|
|
130
|
-
|
|
129
|
+
), ne = () => /* @__PURE__ */ a("div", { className: `${e.linkWrapper} ${e.parent}`, children: /* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ a(
|
|
130
|
+
re,
|
|
131
131
|
{
|
|
132
132
|
className: e.localeModal,
|
|
133
|
-
trigger: /* @__PURE__ */
|
|
133
|
+
trigger: /* @__PURE__ */ a(
|
|
134
134
|
"button",
|
|
135
135
|
{
|
|
136
136
|
title: "Locale Select",
|
|
137
137
|
"aria-label": "Locale Select",
|
|
138
138
|
className: e.locale,
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ a(We, { size: 16, "aria-hidden": "true" })
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
content:
|
|
142
|
+
content: me
|
|
143
143
|
}
|
|
144
|
-
) }) }),
|
|
145
|
-
|
|
146
|
-
}, []),
|
|
147
|
-
|
|
148
|
-
const l = !
|
|
149
|
-
return l || (I([]),
|
|
144
|
+
) }) }), W = _(() => {
|
|
145
|
+
y.current && ve(y.current.getBoundingClientRect().width);
|
|
146
|
+
}, []), ae = () => {
|
|
147
|
+
Q((n) => {
|
|
148
|
+
const l = !n;
|
|
149
|
+
return l || (I([]), O("forward"), N(null)), l;
|
|
150
150
|
});
|
|
151
|
-
},
|
|
152
|
-
const l =
|
|
153
|
-
if (l &&
|
|
154
|
-
const
|
|
155
|
-
|
|
151
|
+
}, le = _((n) => {
|
|
152
|
+
const l = q.current.get(n);
|
|
153
|
+
if (l && y.current) {
|
|
154
|
+
const s = l.getBoundingClientRect(), o = y.current.getBoundingClientRect();
|
|
155
|
+
ye(s.left - o.left + s.width / 2);
|
|
156
156
|
}
|
|
157
|
-
}, []),
|
|
158
|
-
|
|
159
|
-
}, []),
|
|
160
|
-
|
|
161
|
-
}, []),
|
|
162
|
-
|
|
163
|
-
}, [
|
|
164
|
-
|
|
157
|
+
}, []), Ce = _((n) => {
|
|
158
|
+
N((l) => l === n ? null : n);
|
|
159
|
+
}, []), H = _((n) => {
|
|
160
|
+
P.current && !P.current.contains(n.target) && N(null);
|
|
161
|
+
}, []), X = _(() => {
|
|
162
|
+
W(), typeof window < "u" && window.innerWidth > 768 && (Q(!1), N(null));
|
|
163
|
+
}, [W]), Ee = () => I([]), Ie = (n) => {
|
|
164
|
+
O("forward"), I([
|
|
165
165
|
{
|
|
166
|
-
title:
|
|
167
|
-
primary:
|
|
168
|
-
secondary:
|
|
166
|
+
title: n.title,
|
|
167
|
+
primary: n.primaryItems ?? [],
|
|
168
|
+
secondary: n.secondaryItems ?? [],
|
|
169
169
|
description: ""
|
|
170
170
|
}
|
|
171
171
|
]);
|
|
172
|
-
},
|
|
173
|
-
|
|
172
|
+
}, ie = (n) => {
|
|
173
|
+
O("forward"), I((l) => [
|
|
174
174
|
...l,
|
|
175
175
|
{
|
|
176
|
-
title:
|
|
177
|
-
primary:
|
|
176
|
+
title: n.label,
|
|
177
|
+
primary: n.sublinks ?? [],
|
|
178
178
|
secondary: [],
|
|
179
|
-
description:
|
|
179
|
+
description: n.description
|
|
180
180
|
}
|
|
181
181
|
]);
|
|
182
182
|
}, Me = () => {
|
|
183
|
-
|
|
183
|
+
O("backward"), I((n) => n.slice(0, -1));
|
|
184
184
|
};
|
|
185
|
-
|
|
185
|
+
U(() => {
|
|
186
186
|
if (typeof window > "u") return;
|
|
187
|
-
const
|
|
188
|
-
return
|
|
189
|
-
}, []),
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
|
|
187
|
+
const n = () => we(window.innerWidth < 768);
|
|
188
|
+
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
189
|
+
}, []), U(() => {
|
|
190
|
+
const n = typeof window < "u", l = typeof document < "u";
|
|
191
|
+
return n && window.addEventListener("resize", X), l && document.addEventListener("click", H), W(), ge(!0), () => {
|
|
192
|
+
n && window.removeEventListener("resize", X), l && document.removeEventListener("click", H);
|
|
193
193
|
};
|
|
194
|
-
}, [
|
|
194
|
+
}, [X, H, W]), U(() => {
|
|
195
195
|
if (!(typeof document > "u"))
|
|
196
|
-
return
|
|
197
|
-
}, [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
return f ? setTimeout(() => xe(), 0) : ce(), () => ce();
|
|
197
|
+
}, [f]), U(() => {
|
|
198
|
+
var s;
|
|
199
|
+
if (!f) return;
|
|
200
|
+
const n = (s = y.current) == null ? void 0 : s.querySelector(
|
|
201
|
+
'a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
202
|
+
);
|
|
203
|
+
n == null || n.focus();
|
|
204
|
+
const l = (o) => {
|
|
205
|
+
var S;
|
|
206
|
+
if (o.key === "Escape") {
|
|
207
|
+
ae(), (S = T.current) == null || S.focus();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (o.key !== "Tab" || !y.current) return;
|
|
211
|
+
const p = Array.from(
|
|
212
|
+
y.current.querySelectorAll(
|
|
213
|
+
'a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
214
|
+
)
|
|
215
|
+
).filter((i) => !i.closest("[aria-hidden=true]"));
|
|
216
|
+
if (p.length === 0) return;
|
|
217
|
+
const b = p[0], L = p[p.length - 1];
|
|
218
|
+
o.shiftKey ? document.activeElement === b && (o.preventDefault(), L.focus()) : document.activeElement === L && (o.preventDefault(), b.focus());
|
|
219
|
+
};
|
|
220
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
221
|
+
}, [f]);
|
|
222
|
+
const D = (n, l = "") => n.map((s, o) => {
|
|
223
|
+
const p = `${l}/${s._key ?? s.label}-${o}`;
|
|
224
|
+
return /* @__PURE__ */ a(
|
|
225
|
+
ze,
|
|
202
226
|
{
|
|
203
|
-
link:
|
|
204
|
-
path:
|
|
227
|
+
link: s,
|
|
228
|
+
path: p,
|
|
205
229
|
parentPath: l,
|
|
206
|
-
openPath:
|
|
207
|
-
togglePath:
|
|
208
|
-
updateTriangleIndicator:
|
|
209
|
-
setOpenPath:
|
|
210
|
-
renderLinks:
|
|
211
|
-
buttonRefs:
|
|
230
|
+
openPath: Y,
|
|
231
|
+
togglePath: Ce,
|
|
232
|
+
updateTriangleIndicator: le,
|
|
233
|
+
setOpenPath: N,
|
|
234
|
+
renderLinks: D,
|
|
235
|
+
buttonRefs: q
|
|
212
236
|
},
|
|
213
|
-
|
|
237
|
+
p
|
|
214
238
|
);
|
|
215
|
-
}),
|
|
216
|
-
var
|
|
217
|
-
const
|
|
218
|
-
return /* @__PURE__ */
|
|
239
|
+
}), Le = (n) => n.map((l, s) => {
|
|
240
|
+
var L, S;
|
|
241
|
+
const o = `group-${s}`, p = $e === s, b = (L = l.primaryItems) == null ? void 0 : L[R ?? 0];
|
|
242
|
+
return /* @__PURE__ */ t(
|
|
219
243
|
"div",
|
|
220
244
|
{
|
|
221
245
|
className: `${e.linkWrapper} ${e.parent}`,
|
|
222
246
|
onMouseEnter: () => {
|
|
223
|
-
|
|
247
|
+
Z(s), N(o), le(o);
|
|
224
248
|
},
|
|
225
249
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ t(
|
|
227
251
|
"button",
|
|
228
252
|
{
|
|
229
|
-
ref: (
|
|
230
|
-
|
|
253
|
+
ref: (i) => {
|
|
254
|
+
q.current.set(o, i);
|
|
231
255
|
},
|
|
232
256
|
"aria-haspopup": !0,
|
|
233
|
-
"aria-expanded":
|
|
234
|
-
"aria-controls": `submenu-${
|
|
235
|
-
className: `${e.sublinkToggle} ${
|
|
257
|
+
"aria-expanded": p,
|
|
258
|
+
"aria-controls": `submenu-${s}`,
|
|
259
|
+
className: `${e.sublinkToggle} ${p ? e.open : ""}`,
|
|
236
260
|
children: [
|
|
237
261
|
l.title,
|
|
238
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ a(
|
|
239
263
|
Be,
|
|
240
264
|
{
|
|
241
265
|
size: 18,
|
|
@@ -246,47 +270,47 @@ function en({
|
|
|
246
270
|
]
|
|
247
271
|
}
|
|
248
272
|
) }),
|
|
249
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ a(
|
|
250
274
|
"div",
|
|
251
275
|
{
|
|
252
|
-
id: `submenu-${
|
|
253
|
-
className: `${e.sublinks} ${
|
|
276
|
+
id: `submenu-${s}`,
|
|
277
|
+
className: `${e.sublinks} ${p ? e.show : ""}`,
|
|
254
278
|
role: "menu",
|
|
255
279
|
"aria-label": `${l.title} submenu`,
|
|
256
280
|
onMouseLeave: () => {
|
|
257
|
-
|
|
281
|
+
Z(null), G(0), N(null);
|
|
258
282
|
},
|
|
259
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ a("div", { children: /* @__PURE__ */ t(
|
|
260
284
|
"div",
|
|
261
285
|
{
|
|
262
286
|
className: `${e.sublinksInner} ${l.spotlight ? e.withSpotlight : e.withoutSpotlight}`,
|
|
263
287
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ t(
|
|
265
289
|
"div",
|
|
266
290
|
{
|
|
267
291
|
className: `${e.sublinksColumn} ${e.primaryColumn}`,
|
|
268
292
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
(
|
|
271
|
-
(
|
|
293
|
+
/* @__PURE__ */ a("div", { className: e.linkItem }),
|
|
294
|
+
(S = l.primaryItems) == null ? void 0 : S.map(
|
|
295
|
+
(i, E) => i.href ? /* @__PURE__ */ a("div", { role: "menuitem", children: /* @__PURE__ */ t(
|
|
272
296
|
"a",
|
|
273
297
|
{
|
|
274
|
-
href:
|
|
275
|
-
className: `${e.link} ${R ===
|
|
276
|
-
target:
|
|
277
|
-
rel:
|
|
298
|
+
href: i.href,
|
|
299
|
+
className: `${e.link} ${R === E ? e.open : ""}`,
|
|
300
|
+
target: i.isExternal ? "_blank" : "_self",
|
|
301
|
+
rel: i.isExternal ? "noopener noreferrer" : void 0,
|
|
278
302
|
onClick: () => {
|
|
279
|
-
var
|
|
280
|
-
|
|
303
|
+
var te;
|
|
304
|
+
N(null), (te = i.onClick) == null || te.call(i);
|
|
281
305
|
},
|
|
282
|
-
onMouseEnter: () =>
|
|
306
|
+
onMouseEnter: () => G(E),
|
|
283
307
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
286
|
-
|
|
308
|
+
/* @__PURE__ */ t("span", { className: e.linkContent, children: [
|
|
309
|
+
i.label,
|
|
310
|
+
i.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: i.subtitle })
|
|
287
311
|
] }),
|
|
288
|
-
|
|
289
|
-
|
|
312
|
+
i.isExternal && /* @__PURE__ */ a(
|
|
313
|
+
K,
|
|
290
314
|
{
|
|
291
315
|
className: e.newTabIcon,
|
|
292
316
|
size: 16,
|
|
@@ -295,48 +319,48 @@ function en({
|
|
|
295
319
|
)
|
|
296
320
|
]
|
|
297
321
|
}
|
|
298
|
-
) },
|
|
322
|
+
) }, i._key ?? E) : /* @__PURE__ */ a("div", { role: "menuitem", children: /* @__PURE__ */ a(
|
|
299
323
|
"button",
|
|
300
324
|
{
|
|
301
|
-
className: `${e.sublinkToggle} ${R ===
|
|
302
|
-
onMouseEnter: () =>
|
|
303
|
-
children: /* @__PURE__ */
|
|
304
|
-
|
|
305
|
-
|
|
325
|
+
className: `${e.sublinkToggle} ${R === E ? e.open : ""}`,
|
|
326
|
+
onMouseEnter: () => G(E),
|
|
327
|
+
children: /* @__PURE__ */ t("span", { className: e.linkContent, children: [
|
|
328
|
+
i.label,
|
|
329
|
+
i.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: i.subtitle })
|
|
306
330
|
] })
|
|
307
331
|
}
|
|
308
|
-
) },
|
|
332
|
+
) }, i._key ?? E)
|
|
309
333
|
)
|
|
310
334
|
]
|
|
311
335
|
}
|
|
312
336
|
),
|
|
313
|
-
(
|
|
337
|
+
(b == null ? void 0 : b.sublinks) && b.sublinks.length > 0 && /* @__PURE__ */ t(
|
|
314
338
|
"div",
|
|
315
339
|
{
|
|
316
340
|
className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
|
|
317
341
|
children: [
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
`${
|
|
342
|
+
b.description && /* @__PURE__ */ a("div", { className: e.sublinksDescription, children: r == null ? void 0 : r(b.description) }),
|
|
343
|
+
D(
|
|
344
|
+
b.sublinks,
|
|
345
|
+
`${o}-${R}`
|
|
322
346
|
)
|
|
323
347
|
]
|
|
324
348
|
},
|
|
325
|
-
`${
|
|
349
|
+
`${b.label}-${b.sublinks.length}`
|
|
326
350
|
),
|
|
327
|
-
l.secondaryItems && l.secondaryItems.length > 0 && /* @__PURE__ */
|
|
351
|
+
l.secondaryItems && l.secondaryItems.length > 0 && /* @__PURE__ */ a(
|
|
328
352
|
"div",
|
|
329
353
|
{
|
|
330
354
|
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
331
|
-
children:
|
|
355
|
+
children: D(l.secondaryItems, `${o}-secondary`)
|
|
332
356
|
}
|
|
333
357
|
),
|
|
334
|
-
l.spotlight && /* @__PURE__ */
|
|
358
|
+
l.spotlight && /* @__PURE__ */ a(
|
|
335
359
|
"div",
|
|
336
360
|
{
|
|
337
361
|
className: `${e.sublinksColumn} ${e.spotlightColumn}`,
|
|
338
|
-
children: /* @__PURE__ */
|
|
339
|
-
|
|
362
|
+
children: /* @__PURE__ */ a(
|
|
363
|
+
Ge,
|
|
340
364
|
{
|
|
341
365
|
spotlight: l.spotlight,
|
|
342
366
|
renderText: r
|
|
@@ -351,52 +375,53 @@ function en({
|
|
|
351
375
|
)
|
|
352
376
|
]
|
|
353
377
|
},
|
|
354
|
-
l._key ?? `group-${
|
|
378
|
+
l._key ?? `group-${s}`
|
|
355
379
|
);
|
|
356
|
-
}),
|
|
380
|
+
}), Se = [
|
|
357
381
|
e.navbar,
|
|
358
|
-
je[
|
|
359
|
-
Ue[
|
|
360
|
-
|
|
382
|
+
je[j],
|
|
383
|
+
Ue[de],
|
|
384
|
+
z ? e.sticky : "",
|
|
361
385
|
m != null && m.length ? e.advanced : e.default,
|
|
362
|
-
|
|
363
|
-
].filter(Boolean).join(" "),
|
|
364
|
-
return /* @__PURE__ */
|
|
386
|
+
he ?? ""
|
|
387
|
+
].filter(Boolean).join(" "), u = h && h.length > 0 ? h[Math.min(1, h.length - 1)] : null;
|
|
388
|
+
return /* @__PURE__ */ a(
|
|
365
389
|
"header",
|
|
366
390
|
{
|
|
367
|
-
ref:
|
|
368
|
-
className:
|
|
369
|
-
style:
|
|
391
|
+
ref: P,
|
|
392
|
+
className: Se,
|
|
393
|
+
style: fe,
|
|
370
394
|
"aria-label": "Site header",
|
|
371
|
-
...
|
|
372
|
-
children: /* @__PURE__ */
|
|
395
|
+
...be,
|
|
396
|
+
children: /* @__PURE__ */ t(
|
|
373
397
|
"div",
|
|
374
398
|
{
|
|
375
|
-
className: `${e.container} ${(!h || h.length === 0) &&
|
|
399
|
+
className: `${e.container} ${(!h || h.length === 0) && j !== "center" ? e.twoColumn : ""}`,
|
|
376
400
|
children: [
|
|
377
|
-
|
|
378
|
-
/* @__PURE__ */
|
|
401
|
+
c ? /* @__PURE__ */ a("div", { className: e.logo, children: c }) : k ? /* @__PURE__ */ a("div", { className: e.title, children: k }) : null,
|
|
402
|
+
/* @__PURE__ */ a(
|
|
379
403
|
"nav",
|
|
380
404
|
{
|
|
381
|
-
ref:
|
|
405
|
+
ref: y,
|
|
382
406
|
style: {
|
|
383
|
-
left:
|
|
407
|
+
left: j === "center" ? `calc(50% - ${pe / 2}px)` : "0"
|
|
384
408
|
},
|
|
385
|
-
|
|
409
|
+
"aria-modal": f ? "true" : void 0,
|
|
410
|
+
className: `${e.nav} ${f ? e.open : ""} ${ke ? e.visible : e.hidden}`,
|
|
386
411
|
id: "main-menu",
|
|
387
412
|
"aria-label": "Primary navigation",
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ t("div", { className: e.navInner, children: [
|
|
414
|
+
/* @__PURE__ */ a(
|
|
390
415
|
"svg",
|
|
391
416
|
{
|
|
392
|
-
style: { left: `${
|
|
393
|
-
className: `${e.triangle} ${
|
|
417
|
+
style: { left: `${Ne}px` },
|
|
418
|
+
className: `${e.triangle} ${Y ? e.show : ""}`,
|
|
394
419
|
width: 16,
|
|
395
420
|
height: 12,
|
|
396
421
|
viewBox: "0 0 100 75",
|
|
397
422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
398
423
|
"aria-hidden": "true",
|
|
399
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ a(
|
|
400
425
|
"polygon",
|
|
401
426
|
{
|
|
402
427
|
points: "50,5 95,70 5,70",
|
|
@@ -407,87 +432,87 @@ function en({
|
|
|
407
432
|
)
|
|
408
433
|
}
|
|
409
434
|
),
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
435
|
+
A === "default" && $ && /* @__PURE__ */ t("div", { className: e.grid, role: "menubar", children: [
|
|
436
|
+
$.length > 0 && D($),
|
|
437
|
+
(g || w || C) && /* @__PURE__ */ a("span", { className: e.separator, "aria-hidden": "true" }),
|
|
438
|
+
C && /* @__PURE__ */ a(ee, {}),
|
|
439
|
+
g && !M && /* @__PURE__ */ a(V, {}),
|
|
440
|
+
w && /* @__PURE__ */ a(ne, {})
|
|
416
441
|
] }),
|
|
417
|
-
!M &&
|
|
418
|
-
m.length > 0 &&
|
|
419
|
-
(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
442
|
+
!M && A === "advanced" && m && /* @__PURE__ */ t("div", { className: e.grid, children: [
|
|
443
|
+
m.length > 0 && Le(m),
|
|
444
|
+
(g || w || C) && /* @__PURE__ */ a("span", { className: e.separator, "aria-hidden": "true" }),
|
|
445
|
+
C && /* @__PURE__ */ a(ee, {}),
|
|
446
|
+
g && /* @__PURE__ */ a(V, {}),
|
|
447
|
+
w && /* @__PURE__ */ a(ne, {})
|
|
423
448
|
] }),
|
|
424
|
-
M &&
|
|
449
|
+
M && A === "advanced" && f && d.length === 0 && m && /* @__PURE__ */ a("div", { className: e.mobileMenu, children: m.map((n, l) => /* @__PURE__ */ a(
|
|
425
450
|
"div",
|
|
426
451
|
{
|
|
427
|
-
className: `${e.mobileMenuItem} ${
|
|
428
|
-
children: /* @__PURE__ */
|
|
452
|
+
className: `${e.mobileMenuItem} ${B === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
453
|
+
children: /* @__PURE__ */ a(
|
|
429
454
|
"button",
|
|
430
455
|
{
|
|
431
456
|
className: e.sublinkToggle,
|
|
432
|
-
onClick: () => Ie(
|
|
433
|
-
children:
|
|
457
|
+
onClick: () => Ie(n),
|
|
458
|
+
children: n.title
|
|
434
459
|
}
|
|
435
460
|
)
|
|
436
461
|
},
|
|
437
|
-
|
|
462
|
+
n._key ?? l
|
|
438
463
|
)) }),
|
|
439
|
-
M &&
|
|
464
|
+
M && A === "advanced" && f && d.length > 0 && /* @__PURE__ */ t(
|
|
440
465
|
"div",
|
|
441
466
|
{
|
|
442
467
|
className: e.mobileMenuSlide,
|
|
443
468
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ a(
|
|
445
470
|
"button",
|
|
446
471
|
{
|
|
447
472
|
className: e.back,
|
|
448
473
|
"aria-label": "Go back",
|
|
449
|
-
onClick:
|
|
450
|
-
children: /* @__PURE__ */
|
|
474
|
+
onClick: d.length === 1 ? Ee : Me,
|
|
475
|
+
children: /* @__PURE__ */ a(Ae, { size: 18, "aria-hidden": "true" })
|
|
451
476
|
}
|
|
452
477
|
),
|
|
453
|
-
|
|
478
|
+
d[d.length - 1].description && /* @__PURE__ */ a(
|
|
454
479
|
"div",
|
|
455
480
|
{
|
|
456
|
-
className: `${e.sublinksDescription} ${
|
|
481
|
+
className: `${e.sublinksDescription} ${B === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
457
482
|
children: r == null ? void 0 : r(
|
|
458
|
-
|
|
483
|
+
d[d.length - 1].description
|
|
459
484
|
)
|
|
460
485
|
}
|
|
461
486
|
),
|
|
462
|
-
|
|
487
|
+
d[d.length - 1].primary.map((n, l) => /* @__PURE__ */ a(
|
|
463
488
|
"div",
|
|
464
489
|
{
|
|
465
490
|
role: "menuitem",
|
|
466
|
-
className: `${e.mobileMenuItem} ${
|
|
467
|
-
children:
|
|
491
|
+
className: `${e.mobileMenuItem} ${B === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
492
|
+
children: n.sublinks ? /* @__PURE__ */ a(
|
|
468
493
|
"button",
|
|
469
494
|
{
|
|
470
495
|
className: e.sublinkToggle,
|
|
471
|
-
onClick: () =>
|
|
472
|
-
children: /* @__PURE__ */
|
|
473
|
-
|
|
474
|
-
|
|
496
|
+
onClick: () => ie(n),
|
|
497
|
+
children: /* @__PURE__ */ t("span", { className: e.linkContent, children: [
|
|
498
|
+
n.label,
|
|
499
|
+
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
475
500
|
] })
|
|
476
501
|
}
|
|
477
|
-
) : /* @__PURE__ */
|
|
502
|
+
) : /* @__PURE__ */ t(
|
|
478
503
|
"a",
|
|
479
504
|
{
|
|
480
|
-
href:
|
|
505
|
+
href: n.href,
|
|
481
506
|
className: e.link,
|
|
482
|
-
target:
|
|
483
|
-
rel:
|
|
507
|
+
target: n.isExternal ? "_blank" : "_self",
|
|
508
|
+
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
484
509
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
|
|
487
|
-
|
|
510
|
+
/* @__PURE__ */ t("span", { className: e.linkContent, children: [
|
|
511
|
+
n.label,
|
|
512
|
+
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
488
513
|
] }),
|
|
489
|
-
|
|
490
|
-
|
|
514
|
+
n.isExternal && /* @__PURE__ */ a(
|
|
515
|
+
K,
|
|
491
516
|
{
|
|
492
517
|
className: e.newTabIcon,
|
|
493
518
|
size: 16,
|
|
@@ -498,33 +523,33 @@ function en({
|
|
|
498
523
|
}
|
|
499
524
|
)
|
|
500
525
|
},
|
|
501
|
-
|
|
526
|
+
n._key ?? `primary-${l}`
|
|
502
527
|
)),
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
(
|
|
528
|
+
d[d.length - 1].secondary.length > 0 && /* @__PURE__ */ a("hr", { className: e.groupDivider }),
|
|
529
|
+
d[d.length - 1].secondary.map(
|
|
530
|
+
(n, l) => /* @__PURE__ */ a(
|
|
506
531
|
"div",
|
|
507
532
|
{
|
|
508
533
|
role: "menuitem",
|
|
509
|
-
className: `${e.mobileMenuItem} ${
|
|
510
|
-
children:
|
|
534
|
+
className: `${e.mobileMenuItem} ${B === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
535
|
+
children: n.sublinks ? /* @__PURE__ */ a(
|
|
511
536
|
"button",
|
|
512
537
|
{
|
|
513
538
|
className: e.sublinkToggle,
|
|
514
|
-
onClick: () =>
|
|
515
|
-
children:
|
|
539
|
+
onClick: () => ie(n),
|
|
540
|
+
children: n.label
|
|
516
541
|
}
|
|
517
|
-
) : /* @__PURE__ */
|
|
542
|
+
) : /* @__PURE__ */ t(
|
|
518
543
|
"a",
|
|
519
544
|
{
|
|
520
|
-
href:
|
|
545
|
+
href: n.href,
|
|
521
546
|
className: e.link,
|
|
522
|
-
target:
|
|
523
|
-
rel:
|
|
547
|
+
target: n.isExternal ? "_blank" : "_self",
|
|
548
|
+
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
524
549
|
children: [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
550
|
+
n.label,
|
|
551
|
+
n.isExternal && /* @__PURE__ */ a(
|
|
552
|
+
K,
|
|
528
553
|
{
|
|
529
554
|
className: e.newTabIcon,
|
|
530
555
|
size: 16,
|
|
@@ -535,77 +560,78 @@ function en({
|
|
|
535
560
|
}
|
|
536
561
|
)
|
|
537
562
|
},
|
|
538
|
-
|
|
563
|
+
n._key ?? `secondary-${l}`
|
|
539
564
|
)
|
|
540
565
|
)
|
|
541
566
|
]
|
|
542
567
|
},
|
|
543
|
-
`stack-${
|
|
568
|
+
`stack-${d.length}`
|
|
544
569
|
)
|
|
545
570
|
] })
|
|
546
571
|
}
|
|
547
572
|
),
|
|
548
|
-
h && h.length > 0 && /* @__PURE__ */
|
|
549
|
-
|
|
573
|
+
h && h.length > 0 && /* @__PURE__ */ a("nav", { className: e.utility, "aria-label": "Utility navigation", children: /* @__PURE__ */ a(se, { children: h.map((n, l) => /* @__PURE__ */ a(
|
|
574
|
+
J,
|
|
550
575
|
{
|
|
551
576
|
as: "a",
|
|
552
|
-
href:
|
|
553
|
-
variant:
|
|
554
|
-
displayType:
|
|
555
|
-
imageSrc:
|
|
556
|
-
imageAlt:
|
|
557
|
-
"aria-label":
|
|
558
|
-
icon:
|
|
559
|
-
iconAlignment:
|
|
560
|
-
children:
|
|
577
|
+
href: n.href ?? "/",
|
|
578
|
+
variant: n.variant ?? "primary",
|
|
579
|
+
displayType: n.displayType ?? "text",
|
|
580
|
+
imageSrc: n.imageSrc,
|
|
581
|
+
imageAlt: n.imageAlt,
|
|
582
|
+
"aria-label": n.ariaLabel,
|
|
583
|
+
icon: n.icon,
|
|
584
|
+
iconAlignment: n.iconAlignment,
|
|
585
|
+
children: n.imageSrc ? /* @__PURE__ */ a(
|
|
561
586
|
"img",
|
|
562
587
|
{
|
|
563
|
-
src:
|
|
564
|
-
alt:
|
|
588
|
+
src: n.imageSrc,
|
|
589
|
+
alt: n.imageAlt ?? n.ariaLabel
|
|
565
590
|
}
|
|
566
|
-
) :
|
|
591
|
+
) : n.label
|
|
567
592
|
},
|
|
568
|
-
|
|
593
|
+
n._key ?? l
|
|
569
594
|
)) }) }),
|
|
570
|
-
|
|
595
|
+
u && /* @__PURE__ */ a(
|
|
571
596
|
"nav",
|
|
572
597
|
{
|
|
573
598
|
"aria-label": "Utility navigation",
|
|
574
|
-
className: `${e.utilityMobile} ${
|
|
575
|
-
children: /* @__PURE__ */
|
|
576
|
-
|
|
599
|
+
className: `${e.utilityMobile} ${f ? e.open : ""}`,
|
|
600
|
+
children: /* @__PURE__ */ a(se, { alignment: "center", children: /* @__PURE__ */ a(
|
|
601
|
+
J,
|
|
577
602
|
{
|
|
578
603
|
as: "a",
|
|
579
|
-
href:
|
|
580
|
-
variant:
|
|
581
|
-
displayType:
|
|
582
|
-
imageSrc:
|
|
583
|
-
imageAlt:
|
|
584
|
-
"aria-label":
|
|
585
|
-
icon:
|
|
586
|
-
iconAlignment:
|
|
587
|
-
children:
|
|
604
|
+
href: u.href ?? "/",
|
|
605
|
+
variant: u.variant ?? "primary",
|
|
606
|
+
displayType: u.displayType ?? "text",
|
|
607
|
+
imageSrc: u.imageSrc,
|
|
608
|
+
imageAlt: u.imageAlt,
|
|
609
|
+
"aria-label": u.ariaLabel,
|
|
610
|
+
icon: u.icon,
|
|
611
|
+
iconAlignment: u.iconAlignment,
|
|
612
|
+
children: u.imageSrc ? /* @__PURE__ */ a(
|
|
588
613
|
"img",
|
|
589
614
|
{
|
|
590
|
-
src:
|
|
591
|
-
alt:
|
|
615
|
+
src: u.imageSrc,
|
|
616
|
+
alt: u.imageAlt ?? u.ariaLabel
|
|
592
617
|
}
|
|
593
|
-
) :
|
|
618
|
+
) : u.label
|
|
594
619
|
}
|
|
595
620
|
) })
|
|
596
621
|
}
|
|
597
622
|
),
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
M &&
|
|
600
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ t("div", { className: e.mobileButtons, children: [
|
|
624
|
+
M && g && /* @__PURE__ */ a(V, {}),
|
|
625
|
+
/* @__PURE__ */ a(
|
|
601
626
|
"button",
|
|
602
627
|
{
|
|
628
|
+
ref: T,
|
|
603
629
|
className: e.menuToggle,
|
|
604
|
-
onClick:
|
|
605
|
-
"aria-label":
|
|
606
|
-
"aria-expanded":
|
|
630
|
+
onClick: ae,
|
|
631
|
+
"aria-label": f ? "Close menu" : "Open menu",
|
|
632
|
+
"aria-expanded": f,
|
|
607
633
|
"aria-controls": "main-menu",
|
|
608
|
-
children:
|
|
634
|
+
children: f ? /* @__PURE__ */ a(Re, { size: 24, "aria-hidden": "true" }) : /* @__PURE__ */ a(_e, { size: 24, "aria-hidden": "true" })
|
|
609
635
|
}
|
|
610
636
|
)
|
|
611
637
|
] })
|
|
@@ -616,5 +642,5 @@ function en({
|
|
|
616
642
|
);
|
|
617
643
|
}
|
|
618
644
|
export {
|
|
619
|
-
|
|
645
|
+
nn as Navbar
|
|
620
646
|
};
|