quirk-ui 0.0.396 → 0.0.397
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,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),Q=require("../Modal/index.cjs"),E=require("../../../index-CF-7InbH.cjs"),Y=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-BxpV3lSS.cjs"),T=require("../../../external-link-DDShu-48.cjs"),Z=require("../../../createLucideIcon-DpotSgUx.cjs"),je=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 pe=[["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"}]],
|
|
6
|
+
*/const pe=[["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"}]],ke=Z.createLucideIcon("earth",pe);/**
|
|
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 ge=[["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"}]],$e=R.createLucideIcon("menu",ge);/**
|
|
12
|
-
* @license lucide-react v0.488.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const we=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ce=R.createLucideIcon("search",we),Le={standard:e.styles.standard,transparent:e.styles.transparent},_e={left:e.styles.left,center:e.styles.center,right:e.styles.right};function Me({title:P,logo:z,items:m,groups:y,utilityItems:a,isSticky:ee=!1,showSearch:$=!0,showLocaleSelect:A=!0,alignment:w="right",variant:se="standard",navigationType:v="default",searchComponent:ne,localeSelectComponent:le,className:ae}){const[h,q]=r.useState(!1),[B,u]=r.useState(null),[te,ie]=r.useState(0),[re,ce]=r.useState(!1),[oe,de]=r.useState(null),[c,j]=r.useState([]),[k,C]=r.useState(0),[he,F]=r.useState(null),[x,ye]=r.useState(!1),[p,L]=r.useState("forward"),_=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(Y.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",role:"menuitem",className:e.styles.search,children:s.jsx(Ce,{size:16})}),content:ne})})}),W=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(Y.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx(Ne,{size:16})}),content:le})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;ye(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const ue=()=>{j([])},be=n=>{L("forward"),j([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},D=n=>{L("forward"),j(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},xe=()=>{L("backward"),j(n=>n.slice(0,-1))},M=r.useRef(null),f=r.useRef(null),S=r.useRef(new Map),fe=()=>{q(n=>!n)},G=n=>{const l=S.current.get(n);if(l&&f.current){const o=l.getBoundingClientRect(),d=f.current.getBoundingClientRect(),t=o.left-d.left+o.width/2;de(t)}},me=n=>{u(l=>l===n?null:n)},I=r.useCallback(n=>{M.current&&!M.current.contains(n.target)&&u(null)},[]),O=r.useCallback(()=>{V(),typeof window<"u"&&window.innerWidth>768&&(q(!1),u(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),V=r.useCallback(()=>{if(f.current){const n=f.current.getBoundingClientRect().width;ie(n),ce(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",O),l&&document.addEventListener("click",I),V(),()=>{n&&window.removeEventListener("resize",O),l&&document.removeEventListener("click",I)}},[]),r.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=h?"hidden":"",()=>{document.body.style.overflow=""}},[h]);const ve=n=>n.map((l,o)=>{var X,H,U,J,K;const d=`group-${o}`,g=he===o,t=(X=l.primaryItems)==null?void 0:X[k??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{F(o),u(d),G(d)},onMouseLeave:()=>{F(null),C(0),u(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{S.current.set(d,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":g,"aria-controls":`submenu-${o}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""} `,children:[l.title,s.jsx(ke.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${o}`,className:`${e.styles.sublinks} ${g?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}),(H=l.primaryItems)==null?void 0:H.map((i,b)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${k===b?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var Q;u(null),(Q=i.onClick)==null||Q.call(i)},onMouseEnter:()=>i.sublinks?C(b):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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??b):s.jsx("button",{className:`${e.styles.sublinkToggle} ${k===b?e.styles.open:""}`,onMouseEnter:()=>C(b),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??b))]}),(t==null?void 0:t.sublinks)&&((U=t==null?void 0:t.sublinks)==null?void 0:U.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(t==null?void 0:t.description)&&s.jsx("div",{className:e.styles.sublinksDescription,children:t==null?void 0:t.description}),(t==null?void 0:t.sublinks)&&N(t.sublinks,`${d}-${k}`)]},`${t.label}-${(J=t==null?void 0:t.sublinks)==null?void 0:J.length}`),(l==null?void 0:l.secondaryItems)&&((K=l==null?void 0:l.secondaryItems)==null?void 0:K.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&N(l.secondaryItems,`${d}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:l.spotlight})]})})})]},l._key??`group-${o}`)}),N=(n,l="")=>n.map(o=>{const d=`${l}/${o.label}`;return s.jsx(e.NavLink,{link:o,path:d,parentPath:l,openPath:B,togglePath:me,updateTriangleIndicator:G,setOpenPath:u,renderLinks:N,buttonRefs:S},o._key??d)});return s.jsx("header",{ref:M,className:`${ae??""} ${_e[w]} ${Le[se]} ${e.styles.navbar} ${ee?e.styles.sticky:""} ${y&&y.length?e.styles.advanced:e.styles.default}`,role:"navigation","aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!a||a.length===0)&&w!=="center"?e.styles.twoColumn:""}`,children:[z?s.jsx("div",{className:e.styles.logo,children:z}):s.jsx("div",{className:e.styles.title,children:P}),s.jsx("nav",{ref:f,style:{left:w==="center"?`calc(50% - ${te/2}px)`:"0"},className:`${e.styles.nav} ${h?e.styles.open:""} ${re?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:`${oe}px`},className:`${e.styles.triangle} ${B?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"})}),v==="default"&&m&&s.jsxs("div",{className:e.styles.grid,children:[m&&m.length>0&&N(m),$&&!x&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(_,{})]}),A&&s.jsx(W,{})]}),!x&&v==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&ve(y),$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(_,{})]}),A&&s.jsx(W,{})]}),x&&v==="advanced"&&h&&c.length===0&&y&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:y.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${p==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>be(n),children:n.title})},n._key??l))}),x&&v==="advanced"&&h&&c.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:c.length===1?ue:xe,children:s.jsx(E.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${p==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:c[c.length-1].description}),c[c.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${p==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>D(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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${p==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>D(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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${c.length}`)]})}),a&&a.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(Z.ButtonGroup,{children:a.map((n,l)=>s.jsx(E.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))})}),a&&a.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${h?e.styles.open:""}`,children:s.jsx(Z.ButtonGroup,{alignment:"center",children:s.jsx(E.CallToAction,{as:"a",href:a[1].href??"/",variant:a[1].variant??"primary",displayType:a[1].displayType??"text",imageSrc:a[1].imageSrc,imageAlt:a[1].imageAlt,"aria-label":a[1].ariaLabel??a[1].label,icon:a[1].icon,iconAlignment:a[1].iconAlignment,children:a[1].imageSrc?s.jsx("img",{src:a[1].imageSrc,"aria-label":a[1].imageAlt??a[1].ariaLabel??a[1].label}):a[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[x&&$&&s.jsx(_,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":h?"Close menu":"Open menu","aria-expanded":h,"aria-controls":"main-menu",children:h?s.jsx(je.X,{size:24}):s.jsx($e,{size:24})})]})]})})}exports.Navbar=Me;
|
|
11
|
+
*/const ge=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ne=Z.createLucideIcon("search",ge),$e={standard:e.styles.standard,transparent:e.styles.transparent},we={left:e.styles.left,center:e.styles.center,right:e.styles.right};function Ce({title:P,logo:R,items:m,groups:u,utilityItems:a,isSticky:ee=!1,showSearch:$=!0,showLocaleSelect:A=!0,alignment:w="right",variant:se="standard",navigationType:v="default",searchComponent:ne,localeSelectComponent:le,className:ae}){const[h,z]=r.useState(!1),[q,y]=r.useState(null),[te,ie]=r.useState(0),[re,ce]=r.useState(!1),[oe,de]=r.useState(null),[c,j]=r.useState([]),[p,C]=r.useState(0),[he,B]=r.useState(null),[f,ue]=r.useState(!1),[k,L]=r.useState("forward"),M=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(Q.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",role:"menuitem",className:e.styles.search,children:s.jsx(Ne,{size:16})}),content:ne})})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(Q.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx(ke,{size:16})}),content:le})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;ue(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const ye=()=>{j([])},be=n=>{L("forward"),j([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},W=n=>{L("forward"),j(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},fe=()=>{L("backward"),j(n=>n.slice(0,-1))},_=r.useRef(null),x=r.useRef(null),S=r.useRef(new Map),xe=()=>{z(n=>!n)},D=n=>{const l=S.current.get(n);if(l&&x.current){const o=l.getBoundingClientRect(),d=x.current.getBoundingClientRect(),t=o.left-d.left+o.width/2;de(t)}},me=n=>{y(l=>l===n?null:n)},G=r.useCallback(n=>{_.current&&!_.current.contains(n.target)&&y(null)},[]),O=r.useCallback(()=>{I(),typeof window<"u"&&window.innerWidth>768&&(z(!1),y(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),I=r.useCallback(()=>{if(x.current){const n=x.current.getBoundingClientRect().width;ie(n),ce(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",O),l&&document.addEventListener("click",G),I(),()=>{n&&window.removeEventListener("resize",O),l&&document.removeEventListener("click",G)}},[]),r.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=h?"hidden":"",()=>{document.body.style.overflow=""}},[h]);const ve=n=>n.map((l,o)=>{var V,H,X,U,J;const d=`group-${o}`,N=he===o,t=(V=l.primaryItems)==null?void 0:V[p??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{B(o),y(d),D(d)},onMouseLeave:()=>{B(null),C(0),y(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{S.current.set(d,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":N,"aria-controls":`submenu-${o}`,className:`${e.styles.sublinkToggle} ${N?e.styles.open:""} `,children:[l.title,s.jsx(je.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${o}`,className:`${e.styles.sublinks} ${N?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}),(H=l.primaryItems)==null?void 0:H.map((i,b)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${p===b?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var K;y(null),(K=i.onClick)==null||K.call(i)},onMouseEnter:()=>i.sublinks?C(b):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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??b):s.jsx("button",{className:`${e.styles.sublinkToggle} ${p===b?e.styles.open:""}`,onMouseEnter:()=>C(b),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??b))]}),(t==null?void 0:t.sublinks)&&((X=t==null?void 0:t.sublinks)==null?void 0:X.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(t==null?void 0:t.description)&&s.jsx("div",{className:e.styles.sublinksDescription,children:t==null?void 0:t.description}),(t==null?void 0:t.sublinks)&&g(t.sublinks,`${d}-${p}`)]},`${t.label}-${(U=t==null?void 0:t.sublinks)==null?void 0:U.length}`),(l==null?void 0:l.secondaryItems)&&((J=l==null?void 0:l.secondaryItems)==null?void 0:J.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&g(l.secondaryItems,`${d}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:l.spotlight})]})})})]},l._key??`group-${o}`)}),g=(n,l="")=>n.map(o=>{const d=`${l}/${o.label}`;return s.jsx(e.NavLink,{link:o,path:d,parentPath:l,openPath:q,togglePath:me,updateTriangleIndicator:D,setOpenPath:y,renderLinks:g,buttonRefs:S},o._key??d)});return s.jsx("header",{ref:_,className:`${ae??""} ${we[w]} ${$e[se]} ${e.styles.navbar} ${ee?e.styles.sticky:""} ${u&&u.length?e.styles.advanced:e.styles.default}`,role:"navigation","aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!a||a.length===0)&&w!=="center"?e.styles.twoColumn:""}`,children:[R?s.jsx("div",{className:e.styles.logo,children:R}):s.jsx("div",{className:e.styles.title,children:P}),s.jsx("nav",{ref:x,style:{left:w==="center"?`calc(50% - ${te/2}px)`:"0"},className:`${e.styles.nav} ${h?e.styles.open:""} ${re?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:`${oe}px`},className:`${e.styles.triangle} ${q?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"})}),v==="default"&&m&&s.jsxs("div",{className:e.styles.grid,children:[m&&m.length>0&&g(m),$&&!f&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(M,{})]}),A&&s.jsx(F,{})]}),!f&&v==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&ve(u),$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(M,{})]}),A&&s.jsx(F,{})]}),f&&v==="advanced"&&h&&c.length===0&&u&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:u.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${k==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>be(n),children:n.title})},n._key??l))}),f&&v==="advanced"&&h&&c.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:c.length===1?ye:fe,children:s.jsx(E.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${k==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:c[c.length-1].description}),c[c.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${k==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>W(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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${k==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>W(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(T.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${c.length}`)]})}),a&&a.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(Y.ButtonGroup,{children:a.map((n,l)=>s.jsx(E.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))})}),a&&a.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${h?e.styles.open:""}`,children:s.jsx(Y.ButtonGroup,{alignment:"center",children:s.jsx(E.CallToAction,{as:"a",href:a[1].href??"/",variant:a[1].variant??"primary",displayType:a[1].displayType??"text",imageSrc:a[1].imageSrc,imageAlt:a[1].imageAlt,"aria-label":a[1].ariaLabel??a[1].label,icon:a[1].icon,iconAlignment:a[1].iconAlignment,children:a[1].imageSrc?s.jsx("img",{src:a[1].imageSrc,"aria-label":a[1].imageAlt??a[1].ariaLabel??a[1].label}):a[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[f&&$&&s.jsx(M,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:xe,"aria-label":h?"Close menu":"Open menu","aria-expanded":h,"aria-controls":"main-menu",children:"Menu"})]})]})})}exports.Navbar=Ce;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as a, jsxs as r, Fragment as
|
|
2
|
-
import { useState as h, useEffect as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { a as Ce, C as
|
|
5
|
-
import { ButtonGroup as
|
|
6
|
-
import { s as e, N as
|
|
1
|
+
import { jsx as a, jsxs as r, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as R, useRef as z, useCallback as A } from "react";
|
|
3
|
+
import { Modal as ee } from "../Modal/index.mjs";
|
|
4
|
+
import { a as Ce, C as ne } from "../../../index-FuTQRxMN.js";
|
|
5
|
+
import { ButtonGroup as ae } from "../ButtonGroup/index.mjs";
|
|
6
|
+
import { s as e, N as Me } from "../../../NavLink-RkB5XhMV.js";
|
|
7
7
|
import { E as F } from "../../../external-link-BOPobeQJ.js";
|
|
8
|
-
import {
|
|
9
|
-
import { c as W } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
8
|
+
import { c as le } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
10
9
|
import { C as Le } from "../../../chevron-down-DSUzBz9F.js";
|
|
11
10
|
/**
|
|
12
11
|
* @license lucide-react v0.488.0 - ISC
|
|
@@ -14,7 +13,7 @@ import { C as Le } from "../../../chevron-down-DSUzBz9F.js";
|
|
|
14
13
|
* This source code is licensed under the ISC license.
|
|
15
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
15
|
*/
|
|
17
|
-
const
|
|
16
|
+
const xe = [
|
|
18
17
|
["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54", key: "1djwo0" }],
|
|
19
18
|
[
|
|
20
19
|
"path",
|
|
@@ -25,7 +24,7 @@ const Ee = [
|
|
|
25
24
|
],
|
|
26
25
|
["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
26
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
28
|
-
],
|
|
27
|
+
], Ee = le("earth", xe);
|
|
29
28
|
/**
|
|
30
29
|
* @license lucide-react v0.488.0 - ISC
|
|
31
30
|
*
|
|
@@ -33,51 +32,40 @@ const Ee = [
|
|
|
33
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
33
|
*/
|
|
35
34
|
const Se = [
|
|
36
|
-
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
37
|
-
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
38
|
-
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
39
|
-
], ze = W("menu", Se);
|
|
40
|
-
/**
|
|
41
|
-
* @license lucide-react v0.488.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/
|
|
46
|
-
const Te = [
|
|
47
35
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
48
36
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
49
|
-
],
|
|
37
|
+
], _e = le("search", Se), Te = {
|
|
50
38
|
standard: e.standard,
|
|
51
39
|
transparent: e.transparent
|
|
52
|
-
},
|
|
40
|
+
}, Re = {
|
|
53
41
|
left: e.left,
|
|
54
42
|
center: e.center,
|
|
55
43
|
right: e.right
|
|
56
44
|
};
|
|
57
|
-
function
|
|
45
|
+
function Ie({
|
|
58
46
|
title: se,
|
|
59
|
-
logo:
|
|
47
|
+
logo: W,
|
|
60
48
|
items: k,
|
|
61
49
|
groups: f,
|
|
62
50
|
utilityItems: s,
|
|
63
51
|
isSticky: ie = !1,
|
|
64
|
-
showSearch:
|
|
65
|
-
showLocaleSelect:
|
|
66
|
-
alignment:
|
|
52
|
+
showSearch: M = !0,
|
|
53
|
+
showLocaleSelect: B = !0,
|
|
54
|
+
alignment: L = "right",
|
|
67
55
|
variant: re = "standard",
|
|
68
56
|
navigationType: N = "default",
|
|
69
57
|
searchComponent: te,
|
|
70
58
|
localeSelectComponent: ce,
|
|
71
59
|
className: oe
|
|
72
60
|
}) {
|
|
73
|
-
const [b, D] = h(!1), [
|
|
61
|
+
const [b, D] = h(!1), [j, m] = h(null), [de, he] = h(0), [be, fe] = h(!1), [me, ue] = h(null), [c, g] = h([]), [$, x] = h(
|
|
74
62
|
0
|
|
75
|
-
), [pe,
|
|
63
|
+
), [pe, O] = h(null), [p, ve] = h(!1), [w, E] = h("forward"), S = () => /* @__PURE__ */ a(
|
|
76
64
|
"div",
|
|
77
65
|
{
|
|
78
66
|
className: `${e.linkWrapper} ${e.parent} ${e.searchWrapper}`,
|
|
79
67
|
children: /* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ a(
|
|
80
|
-
|
|
68
|
+
ee,
|
|
81
69
|
{
|
|
82
70
|
className: e.searchModal,
|
|
83
71
|
trigger: /* @__PURE__ */ a(
|
|
@@ -87,15 +75,15 @@ function qe({
|
|
|
87
75
|
"aria-label": "Search",
|
|
88
76
|
role: "menuitem",
|
|
89
77
|
className: e.search,
|
|
90
|
-
children: /* @__PURE__ */ a(
|
|
78
|
+
children: /* @__PURE__ */ a(_e, { size: 16 })
|
|
91
79
|
}
|
|
92
80
|
),
|
|
93
81
|
content: te
|
|
94
82
|
}
|
|
95
83
|
) })
|
|
96
84
|
}
|
|
97
|
-
),
|
|
98
|
-
|
|
85
|
+
), G = () => /* @__PURE__ */ a("div", { className: `${e.linkWrapper} ${e.parent} `, children: /* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ a(
|
|
86
|
+
ee,
|
|
99
87
|
{
|
|
100
88
|
className: e.localeModal,
|
|
101
89
|
trigger: /* @__PURE__ */ a(
|
|
@@ -105,13 +93,13 @@ function qe({
|
|
|
105
93
|
"aria-label": "Locale Select",
|
|
106
94
|
role: "menuitem",
|
|
107
95
|
className: e.locale,
|
|
108
|
-
children: /* @__PURE__ */ a(
|
|
96
|
+
children: /* @__PURE__ */ a(Ee, { size: 16 })
|
|
109
97
|
}
|
|
110
98
|
),
|
|
111
99
|
content: ce
|
|
112
100
|
}
|
|
113
101
|
) }) });
|
|
114
|
-
|
|
102
|
+
R(() => {
|
|
115
103
|
if (typeof window < "u") {
|
|
116
104
|
const n = () => {
|
|
117
105
|
const l = window.innerWidth < 768;
|
|
@@ -131,7 +119,7 @@ function qe({
|
|
|
131
119
|
description: ""
|
|
132
120
|
}
|
|
133
121
|
]);
|
|
134
|
-
},
|
|
122
|
+
}, I = (n) => {
|
|
135
123
|
E("forward"), g((l) => [
|
|
136
124
|
...l,
|
|
137
125
|
{
|
|
@@ -143,10 +131,10 @@ function qe({
|
|
|
143
131
|
]);
|
|
144
132
|
}, ge = () => {
|
|
145
133
|
E("backward"), g((n) => n.slice(0, -1));
|
|
146
|
-
},
|
|
134
|
+
}, _ = z(null), v = z(null), T = z(/* @__PURE__ */ new Map()), $e = () => {
|
|
147
135
|
D((n) => !n);
|
|
148
|
-
},
|
|
149
|
-
const l =
|
|
136
|
+
}, V = (n) => {
|
|
137
|
+
const l = T.current.get(n);
|
|
150
138
|
if (l && v.current) {
|
|
151
139
|
const o = l.getBoundingClientRect(), d = v.current.getBoundingClientRect(), i = o.left - d.left + o.width / 2;
|
|
152
140
|
ue(i);
|
|
@@ -154,45 +142,45 @@ function qe({
|
|
|
154
142
|
}, we = (n) => {
|
|
155
143
|
m((l) => l === n ? null : n);
|
|
156
144
|
}, H = A((n) => {
|
|
157
|
-
|
|
145
|
+
_.current && !_.current.contains(n.target) && m(null);
|
|
146
|
+
}, []), X = A(() => {
|
|
147
|
+
q(), typeof window < "u" && window.innerWidth > 768 && (D(!1), m(null), typeof document < "u" && (document.body.style.overflow = ""));
|
|
158
148
|
}, []), q = A(() => {
|
|
159
|
-
U(), typeof window < "u" && window.innerWidth > 768 && (D(!1), m(null), typeof document < "u" && (document.body.style.overflow = ""));
|
|
160
|
-
}, []), U = A(() => {
|
|
161
149
|
if (v.current) {
|
|
162
150
|
const n = v.current.getBoundingClientRect().width;
|
|
163
151
|
he(n), fe(!0);
|
|
164
152
|
}
|
|
165
153
|
}, []);
|
|
166
|
-
|
|
154
|
+
R(() => {
|
|
167
155
|
const n = typeof window < "u", l = typeof document < "u";
|
|
168
|
-
return n && window.addEventListener("resize",
|
|
169
|
-
n && window.removeEventListener("resize",
|
|
156
|
+
return n && window.addEventListener("resize", X), l && document.addEventListener("click", H), q(), () => {
|
|
157
|
+
n && window.removeEventListener("resize", X), l && document.removeEventListener("click", H);
|
|
170
158
|
};
|
|
171
|
-
}, []),
|
|
159
|
+
}, []), R(() => {
|
|
172
160
|
if (typeof document < "u")
|
|
173
161
|
return document.body.style.overflow = b ? "hidden" : "", () => {
|
|
174
162
|
document.body.style.overflow = "";
|
|
175
163
|
};
|
|
176
164
|
}, [b]);
|
|
177
165
|
const ye = (n) => n.map((l, o) => {
|
|
178
|
-
var J, K, Q, Y
|
|
179
|
-
const d = `group-${o}`, C = pe === o, i = (
|
|
166
|
+
var U, J, K, Q, Y;
|
|
167
|
+
const d = `group-${o}`, C = pe === o, i = (U = l.primaryItems) == null ? void 0 : U[$ ?? 0];
|
|
180
168
|
return /* @__PURE__ */ r(
|
|
181
169
|
"div",
|
|
182
170
|
{
|
|
183
171
|
className: `${e.linkWrapper} ${e.parent}`,
|
|
184
172
|
onMouseEnter: () => {
|
|
185
|
-
|
|
173
|
+
O(o), m(d), V(d);
|
|
186
174
|
},
|
|
187
175
|
onMouseLeave: () => {
|
|
188
|
-
|
|
176
|
+
O(null), x(0), m(null);
|
|
189
177
|
},
|
|
190
178
|
children: [
|
|
191
179
|
/* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ r(
|
|
192
180
|
"button",
|
|
193
181
|
{
|
|
194
182
|
ref: (t) => {
|
|
195
|
-
|
|
183
|
+
T.current.set(d, t);
|
|
196
184
|
},
|
|
197
185
|
role: "menuitem",
|
|
198
186
|
"aria-haspopup": "true",
|
|
@@ -223,7 +211,7 @@ function qe({
|
|
|
223
211
|
className: `${e.sublinksColumn} ${e.primaryColumn}`,
|
|
224
212
|
children: [
|
|
225
213
|
/* @__PURE__ */ a("div", { className: e.linkItem }),
|
|
226
|
-
(
|
|
214
|
+
(J = l.primaryItems) == null ? void 0 : J.map(
|
|
227
215
|
(t, u) => t.href ? /* @__PURE__ */ r(
|
|
228
216
|
"a",
|
|
229
217
|
{
|
|
@@ -232,10 +220,10 @@ function qe({
|
|
|
232
220
|
target: t.isExternal ? "_blank" : "_self",
|
|
233
221
|
rel: t.isExternal ? "noopener noreferrer" : void 0,
|
|
234
222
|
onClick: () => {
|
|
235
|
-
var
|
|
236
|
-
m(null), (
|
|
223
|
+
var Z;
|
|
224
|
+
m(null), (Z = t.onClick) == null || Z.call(t);
|
|
237
225
|
},
|
|
238
|
-
onMouseEnter: () => t.sublinks ?
|
|
226
|
+
onMouseEnter: () => t.sublinks ? x(u) : null,
|
|
239
227
|
role: "menuitem",
|
|
240
228
|
children: [
|
|
241
229
|
/* @__PURE__ */ r("span", { className: e.linkContent, children: [
|
|
@@ -256,7 +244,7 @@ function qe({
|
|
|
256
244
|
"button",
|
|
257
245
|
{
|
|
258
246
|
className: `${e.sublinkToggle} ${$ === u ? e.open : ""}`,
|
|
259
|
-
onMouseEnter: () =>
|
|
247
|
+
onMouseEnter: () => x(u),
|
|
260
248
|
children: /* @__PURE__ */ r("span", { className: e.linkContent, children: [
|
|
261
249
|
t.label,
|
|
262
250
|
t.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: t.subtitle })
|
|
@@ -268,7 +256,7 @@ function qe({
|
|
|
268
256
|
]
|
|
269
257
|
}
|
|
270
258
|
),
|
|
271
|
-
(i == null ? void 0 : i.sublinks) && ((
|
|
259
|
+
(i == null ? void 0 : i.sublinks) && ((K = i == null ? void 0 : i.sublinks) == null ? void 0 : K.length) > 0 && /* @__PURE__ */ r(
|
|
272
260
|
"div",
|
|
273
261
|
{
|
|
274
262
|
className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
|
|
@@ -280,9 +268,9 @@ function qe({
|
|
|
280
268
|
)
|
|
281
269
|
]
|
|
282
270
|
},
|
|
283
|
-
`${i.label}-${(
|
|
271
|
+
`${i.label}-${(Q = i == null ? void 0 : i.sublinks) == null ? void 0 : Q.length}`
|
|
284
272
|
),
|
|
285
|
-
(l == null ? void 0 : l.secondaryItems) && ((
|
|
273
|
+
(l == null ? void 0 : l.secondaryItems) && ((Y = l == null ? void 0 : l.secondaryItems) == null ? void 0 : Y.length) > 0 && /* @__PURE__ */ a(
|
|
286
274
|
"div",
|
|
287
275
|
{
|
|
288
276
|
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
@@ -308,17 +296,17 @@ function qe({
|
|
|
308
296
|
}), y = (n, l = "") => n.map((o) => {
|
|
309
297
|
const d = `${l}/${o.label}`;
|
|
310
298
|
return /* @__PURE__ */ a(
|
|
311
|
-
|
|
299
|
+
Me,
|
|
312
300
|
{
|
|
313
301
|
link: o,
|
|
314
302
|
path: d,
|
|
315
303
|
parentPath: l,
|
|
316
|
-
openPath:
|
|
304
|
+
openPath: j,
|
|
317
305
|
togglePath: we,
|
|
318
|
-
updateTriangleIndicator:
|
|
306
|
+
updateTriangleIndicator: V,
|
|
319
307
|
setOpenPath: m,
|
|
320
308
|
renderLinks: y,
|
|
321
|
-
buttonRefs:
|
|
309
|
+
buttonRefs: T
|
|
322
310
|
},
|
|
323
311
|
o._key ?? d
|
|
324
312
|
);
|
|
@@ -326,22 +314,22 @@ function qe({
|
|
|
326
314
|
return /* @__PURE__ */ a(
|
|
327
315
|
"header",
|
|
328
316
|
{
|
|
329
|
-
ref:
|
|
330
|
-
className: `${oe ?? ""} ${
|
|
317
|
+
ref: _,
|
|
318
|
+
className: `${oe ?? ""} ${Re[L]} ${Te[re]} ${e.navbar} ${ie ? e.sticky : ""} ${f && f.length ? e.advanced : e.default}`,
|
|
331
319
|
role: "navigation",
|
|
332
320
|
"aria-label": "Main navigation",
|
|
333
321
|
children: /* @__PURE__ */ r(
|
|
334
322
|
"div",
|
|
335
323
|
{
|
|
336
|
-
className: `${e.container} ${(!s || s.length === 0) &&
|
|
324
|
+
className: `${e.container} ${(!s || s.length === 0) && L !== "center" ? e.twoColumn : ""}`,
|
|
337
325
|
children: [
|
|
338
|
-
|
|
326
|
+
W ? /* @__PURE__ */ a("div", { className: e.logo, children: W }) : /* @__PURE__ */ a("div", { className: e.title, children: se }),
|
|
339
327
|
/* @__PURE__ */ a(
|
|
340
328
|
"nav",
|
|
341
329
|
{
|
|
342
330
|
ref: v,
|
|
343
331
|
style: {
|
|
344
|
-
left:
|
|
332
|
+
left: L === "center" ? `calc(50% - ${de / 2}px)` : "0"
|
|
345
333
|
},
|
|
346
334
|
className: `${e.nav} ${b ? e.open : ""} ${be ? e.visible : e.hidden}`,
|
|
347
335
|
id: "main-menu",
|
|
@@ -352,7 +340,7 @@ function qe({
|
|
|
352
340
|
"svg",
|
|
353
341
|
{
|
|
354
342
|
style: { left: `${me}px` },
|
|
355
|
-
className: `${e.triangle} ${
|
|
343
|
+
className: `${e.triangle} ${j ? e.show : ""}`,
|
|
356
344
|
width: 16,
|
|
357
345
|
height: 12,
|
|
358
346
|
viewBox: "0 0 100 75",
|
|
@@ -370,19 +358,19 @@ function qe({
|
|
|
370
358
|
),
|
|
371
359
|
N === "default" && k && /* @__PURE__ */ r("div", { className: e.grid, children: [
|
|
372
360
|
k && k.length > 0 && y(k),
|
|
373
|
-
|
|
361
|
+
M && !p && /* @__PURE__ */ r(P, { children: [
|
|
374
362
|
/* @__PURE__ */ a("span", { className: e.separator }),
|
|
375
|
-
/* @__PURE__ */ a(
|
|
363
|
+
/* @__PURE__ */ a(S, {})
|
|
376
364
|
] }),
|
|
377
|
-
|
|
365
|
+
B && /* @__PURE__ */ a(G, {})
|
|
378
366
|
] }),
|
|
379
367
|
!p && N === "advanced" && f && /* @__PURE__ */ r("div", { className: e.grid, children: [
|
|
380
368
|
f.length > 0 && ye(f),
|
|
381
|
-
|
|
369
|
+
M && /* @__PURE__ */ r(P, { children: [
|
|
382
370
|
/* @__PURE__ */ a("span", { className: e.separator }),
|
|
383
|
-
/* @__PURE__ */ a(
|
|
371
|
+
/* @__PURE__ */ a(S, {})
|
|
384
372
|
] }),
|
|
385
|
-
|
|
373
|
+
B && /* @__PURE__ */ a(G, {})
|
|
386
374
|
] }),
|
|
387
375
|
p && N === "advanced" && b && c.length === 0 && f && /* @__PURE__ */ a("div", { className: `${e.mobileMenu}`, children: f.map((n, l) => /* @__PURE__ */ a(
|
|
388
376
|
"div",
|
|
@@ -434,7 +422,7 @@ function qe({
|
|
|
434
422
|
"button",
|
|
435
423
|
{
|
|
436
424
|
className: e.sublinkToggle,
|
|
437
|
-
onClick: () =>
|
|
425
|
+
onClick: () => I(n),
|
|
438
426
|
children: /* @__PURE__ */ r("span", { className: e.linkContent, children: [
|
|
439
427
|
n.label,
|
|
440
428
|
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
@@ -476,7 +464,7 @@ function qe({
|
|
|
476
464
|
"button",
|
|
477
465
|
{
|
|
478
466
|
className: e.sublinkToggle,
|
|
479
|
-
onClick: () =>
|
|
467
|
+
onClick: () => I(n),
|
|
480
468
|
children: n.label
|
|
481
469
|
}
|
|
482
470
|
) : /* @__PURE__ */ r(
|
|
@@ -510,8 +498,8 @@ function qe({
|
|
|
510
498
|
] })
|
|
511
499
|
}
|
|
512
500
|
),
|
|
513
|
-
s && s.length > 0 && /* @__PURE__ */ a("nav", { className: e.utility, "aria-label": "Utility navigation", children: /* @__PURE__ */ a(
|
|
514
|
-
|
|
501
|
+
s && s.length > 0 && /* @__PURE__ */ a("nav", { className: e.utility, "aria-label": "Utility navigation", children: /* @__PURE__ */ a(ae, { children: s.map((n, l) => /* @__PURE__ */ a(
|
|
502
|
+
ne,
|
|
515
503
|
{
|
|
516
504
|
as: "a",
|
|
517
505
|
href: n.href ?? "/",
|
|
@@ -537,8 +525,8 @@ function qe({
|
|
|
537
525
|
{
|
|
538
526
|
"aria-label": "Utility navigation",
|
|
539
527
|
className: `${e.utilityMobile} ${b ? e.open : ""}`,
|
|
540
|
-
children: /* @__PURE__ */ a(
|
|
541
|
-
|
|
528
|
+
children: /* @__PURE__ */ a(ae, { alignment: "center", children: /* @__PURE__ */ a(
|
|
529
|
+
ne,
|
|
542
530
|
{
|
|
543
531
|
as: "a",
|
|
544
532
|
href: s[1].href ?? "/",
|
|
@@ -561,7 +549,7 @@ function qe({
|
|
|
561
549
|
}
|
|
562
550
|
),
|
|
563
551
|
/* @__PURE__ */ r("div", { className: e.mobileButtons, children: [
|
|
564
|
-
p &&
|
|
552
|
+
p && M && /* @__PURE__ */ a(S, {}),
|
|
565
553
|
/* @__PURE__ */ a(
|
|
566
554
|
"button",
|
|
567
555
|
{
|
|
@@ -570,7 +558,7 @@ function qe({
|
|
|
570
558
|
"aria-label": b ? "Close menu" : "Open menu",
|
|
571
559
|
"aria-expanded": b,
|
|
572
560
|
"aria-controls": "main-menu",
|
|
573
|
-
children:
|
|
561
|
+
children: "Menu"
|
|
574
562
|
}
|
|
575
563
|
)
|
|
576
564
|
] })
|
|
@@ -581,5 +569,5 @@ function qe({
|
|
|
581
569
|
);
|
|
582
570
|
}
|
|
583
571
|
export {
|
|
584
|
-
|
|
572
|
+
Ie as Navbar
|
|
585
573
|
};
|