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