quirk-ui 0.1.78 → 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/DatePicker/index.cjs +2 -2
- package/dist/core/components/DatePicker/index.mjs +25 -25
- package/dist/core/components/Fieldset/index.cjs +1 -1
- package/dist/core/components/Fieldset/index.mjs +17 -17
- package/dist/core/components/NavBar/index.cjs +3 -3
- package/dist/core/components/NavBar/index.mjs +310 -284
- package/dist/core/components/Radio/index.cjs +1 -1
- package/dist/core/components/Radio/index.mjs +49 -49
- package/dist/core/components/Select/index.cjs +1 -1
- package/dist/core/components/Select/index.mjs +61 -61
- package/dist/core/components/Textarea/index.cjs +1 -1
- package/dist/core/components/Textarea/index.mjs +62 -62
- package/dist/index25.css +1 -1
- package/dist/index39.css +1 -1
- package/dist/index40.css +1 -1
- package/dist/index41.css +1 -1
- package/dist/index60.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index60.css');const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index60.css');const r=require("react/jsx-runtime"),i=require("react"),E=require("../../../index-rFLvzU5A.cjs"),O=require("../Label/index.cjs"),B=require("../../../x-Dft9NVe_.cjs"),P=require("../../../createLucideIcon-DpotSgUx.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 W=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],z=P.createLucideIcon("calendar",W),R="
|
|
6
|
+
*/const W=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],z=P.createLucideIcon("calendar",W),R="_wrapper_15mos_1",F="_inputWrapper_15mos_28",X="_input_15mos_28",A="_inputDisabled_15mos_61",G="_inputError_15mos_68",H="_icons_15mos_77",J="_calendarIcon_15mos_86",K="_iconDisabled_15mos_91",Q="_clearButton_15mos_100",U="_helperText_15mos_128",Y="_helperTextError_15mos_133",Z="_popover_15mos_138",e={wrapper:R,inputWrapper:F,input:X,inputDisabled:A,inputError:G,icons:H,calendarIcon:J,iconDisabled:K,clearButton:Q,helperText:U,helperTextError:Y,popover:Z};function V({id:k,name:D,label:y,value:a,defaultValue:$,placeholder:b="Select date",required:v=!1,disabled:s=!1,error:l=!1,helperText:_,minDate:h,maxDate:j,disabledDates:w,formatStr:I="yyyy-MM-dd",className:N,onChange:c,onValueChange:n,...S}){const[p,m]=i.useState($||a||null),[o,d]=i.useState(!1),f=i.useRef(null),u=k||`datepicker-${Math.random().toString(36).substr(2,9)}`;i.useEffect(()=>{a!==void 0&&m(a)},[a]),i.useEffect(()=>{const t=x=>{f.current&&!f.current.contains(x.target)&&d(!1)};return o&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[o]),i.useEffect(()=>{const t=x=>{x.key==="Escape"&&o&&d(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[o]);const L=t=>{m(t),d(!1),c==null||c(t),n==null||n(t)},T=t=>{t.stopPropagation(),m(null),c==null||c(null),n==null||n(null)},M=()=>{s||d(!o)},q=p?E.format(p,I):"";return r.jsxs("div",{ref:f,className:`${e.wrapper} ${N??""}`.trim(),children:[y&&r.jsx(O.Label,{htmlFor:u,intent:l?"error":s?"disabled":"default",required:v,disabled:s,size:"md",children:y}),r.jsxs("div",{className:e.inputWrapper,children:[r.jsx("input",{id:u,name:D,type:"text",readOnly:!0,value:q,onClick:M,placeholder:b,required:v,disabled:s,className:`${e.input} ${l?e.inputError:""} ${s?e.inputDisabled:""}`.trim(),"aria-invalid":l,"aria-describedby":_?`${u}-helper`:void 0,...S}),r.jsxs("div",{className:e.icons,children:[p&&!s&&r.jsx("button",{type:"button",onClick:T,className:e.clearButton,"aria-label":"Clear date",tabIndex:-1,children:r.jsx(B.X,{size:14})}),r.jsx(z,{size:18,className:`${e.calendarIcon} ${s?e.iconDisabled:""}`.trim()})]})]}),_&&r.jsx("div",{id:`${u}-helper`,className:`${e.helperText} ${l?e.helperTextError:""}`.trim(),children:_}),o&&r.jsx("div",{className:e.popover,children:r.jsx(E.Calendar,{selectedDate:p,onSelectDate:L,minDate:h,maxDate:j,disabledDates:w})})]})}exports.DatePicker=V;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useRef as z, useEffect as v } from "react";
|
|
3
3
|
import { f as j, C as P } from "../../../index-DTDGFsW8.js";
|
|
4
4
|
import { Label as R } from "../Label/index.mjs";
|
|
@@ -15,7 +15,7 @@ const A = [
|
|
|
15
15
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
16
16
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
17
17
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
18
|
-
], G = X("calendar", A), H = "
|
|
18
|
+
], G = X("calendar", A), H = "_wrapper_15mos_1", J = "_inputWrapper_15mos_28", K = "_input_15mos_28", Q = "_inputDisabled_15mos_61", U = "_inputError_15mos_68", Y = "_icons_15mos_77", Z = "_calendarIcon_15mos_86", q = "_iconDisabled_15mos_91", V = "_clearButton_15mos_100", C = "_helperText_15mos_128", g = "_helperTextError_15mos_133", ee = "_popover_15mos_138", e = {
|
|
19
19
|
wrapper: H,
|
|
20
20
|
inputWrapper: J,
|
|
21
21
|
input: K,
|
|
@@ -29,11 +29,11 @@ const A = [
|
|
|
29
29
|
helperTextError: g,
|
|
30
30
|
popover: ee
|
|
31
31
|
};
|
|
32
|
-
function
|
|
32
|
+
function ie({
|
|
33
33
|
id: D,
|
|
34
34
|
name: $,
|
|
35
35
|
label: E,
|
|
36
|
-
value:
|
|
36
|
+
value: i,
|
|
37
37
|
defaultValue: h,
|
|
38
38
|
placeholder: b = "Select date",
|
|
39
39
|
required: k = !1,
|
|
@@ -45,36 +45,36 @@ function oe({
|
|
|
45
45
|
disabledDates: I,
|
|
46
46
|
formatStr: T = "yyyy-MM-dd",
|
|
47
47
|
className: L,
|
|
48
|
-
onChange:
|
|
49
|
-
onValueChange:
|
|
48
|
+
onChange: o,
|
|
49
|
+
onValueChange: c,
|
|
50
50
|
...M
|
|
51
51
|
}) {
|
|
52
52
|
const [a, _] = x(
|
|
53
|
-
h ||
|
|
54
|
-
), [
|
|
53
|
+
h || i || null
|
|
54
|
+
), [n, l] = x(!1), u = z(null), d = D || `datepicker-${Math.random().toString(36).substr(2, 9)}`;
|
|
55
55
|
v(() => {
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
const t = (
|
|
59
|
-
u.current && !u.current.contains(
|
|
56
|
+
i !== void 0 && _(i);
|
|
57
|
+
}, [i]), v(() => {
|
|
58
|
+
const t = (f) => {
|
|
59
|
+
u.current && !u.current.contains(f.target) && l(!1);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return n && document.addEventListener("mousedown", t), () => {
|
|
62
62
|
document.removeEventListener("mousedown", t);
|
|
63
63
|
};
|
|
64
|
-
}, [
|
|
65
|
-
const t = (
|
|
66
|
-
|
|
64
|
+
}, [n]), v(() => {
|
|
65
|
+
const t = (f) => {
|
|
66
|
+
f.key === "Escape" && n && l(!1);
|
|
67
67
|
};
|
|
68
68
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
69
|
-
}, [
|
|
69
|
+
}, [n]);
|
|
70
70
|
const S = (t) => {
|
|
71
|
-
_(t), l(!1),
|
|
71
|
+
_(t), l(!1), o == null || o(t), c == null || c(t);
|
|
72
72
|
}, B = (t) => {
|
|
73
|
-
t.stopPropagation(), _(null),
|
|
73
|
+
t.stopPropagation(), _(null), o == null || o(null), c == null || c(null);
|
|
74
74
|
}, O = () => {
|
|
75
|
-
s || l(!
|
|
75
|
+
s || l(!n);
|
|
76
76
|
}, W = a ? j(a, T) : "";
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ y(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
ref: u,
|
|
@@ -91,7 +91,7 @@ function oe({
|
|
|
91
91
|
children: E
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ y("div", { className: e.inputWrapper, children: [
|
|
95
95
|
/* @__PURE__ */ r(
|
|
96
96
|
"input",
|
|
97
97
|
{
|
|
@@ -110,7 +110,7 @@ function oe({
|
|
|
110
110
|
...M
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ y("div", { className: e.icons, children: [
|
|
114
114
|
a && !s && /* @__PURE__ */ r(
|
|
115
115
|
"button",
|
|
116
116
|
{
|
|
@@ -139,7 +139,7 @@ function oe({
|
|
|
139
139
|
children: m
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
|
|
142
|
+
n && /* @__PURE__ */ r("div", { className: e.popover, children: /* @__PURE__ */ r(
|
|
143
143
|
P,
|
|
144
144
|
{
|
|
145
145
|
selectedDate: a,
|
|
@@ -154,5 +154,5 @@ function oe({
|
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
156
|
export {
|
|
157
|
-
|
|
157
|
+
ie as DatePicker
|
|
158
158
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index41.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index41.css');const l=require("react/jsx-runtime"),a=require("../Text/index.cjs"),f="_fieldset_l9gdh_1",u="_legend_l9gdh_12",g="_content_l9gdh_19",h="_helperText_l9gdh_25",x="_outlined_l9gdh_37",m="_filled_l9gdh_44",$="_disabled_l9gdh_50",T="_error_l9gdh_59",e={fieldset:f,legend:u,content:g,helperText:h,default:"_default_l9gdh_32",outlined:x,filled:m,disabled:$,error:T};function b({legend:t,variant:n="default",disabled:d=!1,error:i=!1,helperText:s,className:r,children:o,..._}){const c={default:e.default,outlined:e.outlined,filled:e.filled}[n];return l.jsxs("fieldset",{className:`${r??""} ${e.fieldset} ${c} ${d?e.disabled:""} ${i?e.error:""}`.trim(),disabled:d,..._,children:[t&&l.jsx("legend",{className:e.legend,children:t}),l.jsx("div",{className:e.content,children:o}),s&&l.jsx(a.Text,{variant:"small",className:e.helperText,children:s})]})}exports.Fieldset=b;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { Text as f } from "../Text/index.mjs";
|
|
3
|
-
import '../../../index41.css';const
|
|
4
|
-
fieldset:
|
|
5
|
-
legend:
|
|
6
|
-
content:
|
|
3
|
+
import '../../../index41.css';const h = "_fieldset_l9gdh_1", g = "_legend_l9gdh_12", u = "_content_l9gdh_19", m = "_helperText_l9gdh_25", x = "_outlined_l9gdh_37", p = "_filled_l9gdh_44", $ = "_disabled_l9gdh_50", N = "_error_l9gdh_59", e = {
|
|
4
|
+
fieldset: h,
|
|
5
|
+
legend: g,
|
|
6
|
+
content: u,
|
|
7
7
|
helperText: m,
|
|
8
|
-
default: "
|
|
9
|
-
outlined:
|
|
10
|
-
filled:
|
|
11
|
-
disabled:
|
|
12
|
-
error:
|
|
8
|
+
default: "_default_l9gdh_32",
|
|
9
|
+
outlined: x,
|
|
10
|
+
filled: p,
|
|
11
|
+
disabled: $,
|
|
12
|
+
error: N
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function v({
|
|
15
15
|
legend: t,
|
|
16
|
-
variant:
|
|
17
|
-
disabled:
|
|
18
|
-
error:
|
|
16
|
+
variant: n = "default",
|
|
17
|
+
disabled: d = !1,
|
|
18
|
+
error: i = !1,
|
|
19
19
|
helperText: s,
|
|
20
20
|
className: o,
|
|
21
21
|
children: r,
|
|
@@ -25,12 +25,12 @@ function N({
|
|
|
25
25
|
default: e.default,
|
|
26
26
|
outlined: e.outlined,
|
|
27
27
|
filled: e.filled
|
|
28
|
-
}[
|
|
28
|
+
}[n];
|
|
29
29
|
return /* @__PURE__ */ c(
|
|
30
30
|
"fieldset",
|
|
31
31
|
{
|
|
32
|
-
className: `${o ?? ""} ${e.fieldset} ${a} ${
|
|
33
|
-
disabled:
|
|
32
|
+
className: `${o ?? ""} ${e.fieldset} ${a} ${d ? e.disabled : ""} ${i ? e.error : ""}`.trim(),
|
|
33
|
+
disabled: d,
|
|
34
34
|
..._,
|
|
35
35
|
children: [
|
|
36
36
|
t && /* @__PURE__ */ l("legend", { className: e.legend, children: t }),
|
|
@@ -41,5 +41,5 @@ function N({
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
v as Fieldset
|
|
45
45
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),le=require("../Modal/index.cjs"),A=require("../../../index-hPJqlEOh.cjs"),te=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-BaEzx3t5.cjs"),V=require("../../utils/NoScroll/noScroll.cjs"),Ce=require("../../../chevron-right-motlyADs.cjs"),H=require("../../../external-link-DDShu-48.cjs"),_e=require("../../../x-Dft9NVe_.cjs"),ae=require("../../../createLucideIcon-DpotSgUx.cjs"),Se=require("../../../chevron-down-DfK1XBl3.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const Ee=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Le=ae.createLucideIcon("earth",Ee);/**
|
|
7
7
|
* @license lucide-react v0.488.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Le=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ne.createLucideIcon("search",Le),Ee={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},Re=({spotlight:i,renderText:h})=>{var y,_,p,v,k,S;const r=i.callToAction;if(!r)return null;const j=((y=r.linkOptions)==null?void 0:y.linkType)==="external";let u="#";return j&&((_=r.linkOptions)!=null&&_.externalUrl)?u=r.linkOptions.externalUrl:((p=r.linkOptions)==null?void 0:p.linkType)==="internal"&&((k=(v=r.linkOptions)==null?void 0:v.internalUrl)!=null&&k.slug.current)&&(u=`/${r.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((S=i.image.imageUrls)==null?void 0:S.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:h==null?void 0:h(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:h==null?void 0:h(i.description,e.styles.description)})]}),r.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(z.Button,{as:"a",variant:r.variant??"primary",href:u,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":r.ariaLabel||r.label,children:r.label})})]})};function ze({renderText:i,title:h,logo:r,items:j,groups:u,utilityItems:y,isSticky:_=!1,showSearch:p=!0,showLocaleSelect:v=!0,showThemeToggle:k=!0,themeToggleComponent:S,alignment:q="right",variant:ae="standard",navigationType:I="default",searchComponent:te,localeSelectComponent:ie,className:re,style:ce,...oe}){const[m,V]=a.useState(!1),[H,f]=a.useState(null),[de,ue]=a.useState(0),[ye,he]=a.useState(!1),[me,be]=a.useState(null),[c,$]=a.useState([]),[L,O]=a.useState(0),[xe,X]=a.useState(null),[w,pe]=a.useState(!1),[M,E]=a.useState("forward"),A=a.useRef(null),C=a.useRef(null),W=a.useRef(new Map),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:S})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:te})})}),K=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Ie,{size:16,"aria-hidden":"true"})}),content:ie})})}),B=a.useCallback(()=>{C.current&&ue(C.current.getBoundingClientRect().width)},[]),fe=()=>{V(l=>{const n=!l;return n||($([]),E("forward"),f(null)),n})},Q=a.useCallback(l=>{const n=W.current.get(l);if(n&&C.current){const d=n.getBoundingClientRect(),b=C.current.getBoundingClientRect();be(d.left-b.left+d.width/2)}},[]),je=a.useCallback(l=>{f(n=>n===l?null:l)},[]),G=a.useCallback(l=>{A.current&&!A.current.contains(l.target)&&f(null)},[]),D=a.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(V(!1),f(null))},[B]),ve=()=>$([]),ke=l=>{E("forward"),$([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},Y=l=>{E("forward"),$(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},ge=()=>{E("backward"),$(l=>l.slice(0,-1))};a.useEffect(()=>{if(typeof window>"u")return;const l=()=>pe(window.innerWidth<768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),a.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",D),n&&document.addEventListener("click",G),B(),he(!0),()=>{l&&window.removeEventListener("resize",D),n&&document.removeEventListener("click",G)}},[D,G,B]),a.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>U.lockScroll(),0):U.unlockScroll(),()=>U.unlockScroll()},[m]);const R=(l,n="")=>l.map((d,b)=>{const g=`${n}/${d._key??d.label}-${b}`;return s.jsx(e.NavLink,{link:d,path:g,parentPath:n,openPath:H,togglePath:je,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:W},g)}),Ne=l=>l.map((n,d)=>{var Z,T;const b=`group-${d}`,g=xe===d,x=(Z=n.primaryItems)==null?void 0:Z[L??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{X(d),f(b),Q(b)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:t=>{W.current.set(b,t)},"aria-haspopup":!0,"aria-expanded":g,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""}`,children:[n.title,s.jsx(_e.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${g?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,onMouseLeave:()=>{X(null),O(0),f(null)},children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${n.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(T=n.primaryItems)==null?void 0:T.map((t,N)=>t.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:t.href,className:`${e.styles.link} ${L===N?e.styles.open:""}`,target:t.isExternal?"_blank":"_self",rel:t.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ee;f(null),(ee=t.onClick)==null||ee.call(t)},onMouseEnter:()=>O(N),children:[s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]}),t.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},t._key??N):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${L===N?e.styles.open:""}`,onMouseEnter:()=>O(N),children:s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]})})},t._key??N))]}),(x==null?void 0:x.sublinks)&&x.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[x.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(x.description)}),R(x.sublinks,`${b}-${L}`)]},`${x.label}-${x.sublinks.length}`),n.secondaryItems&&n.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:R(n.secondaryItems,`${b}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Re,{spotlight:n.spotlight,renderText:i})})]})})})]},n._key??`group-${d}`)}),$e=[e.styles.navbar,Be[q],Ee[ae],_?e.styles.sticky:"",u!=null&&u.length?e.styles.advanced:e.styles.default,re??""].filter(Boolean).join(" "),o=y&&y.length>0?y[Math.min(1,y.length-1)]:null;return s.jsx("header",{ref:A,className:$e,style:ce,"aria-label":"Site header",...oe,children:s.jsxs("div",{className:`${e.styles.container} ${(!y||y.length===0)&&q!=="center"?e.styles.twoColumn:""}`,children:[r?s.jsx("div",{className:e.styles.logo,children:r}):h?s.jsx("div",{className:e.styles.title,children:h}):null,s.jsx("nav",{ref:C,style:{left:q==="center"?`calc(50% - ${de/2}px)`:"0"},className:`${e.styles.nav} ${m?e.styles.open:""} ${ye?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${me}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&R(j),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&!w&&s.jsx(F,{}),v&&s.jsx(K,{})]}),!w&&I==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&Ne(u),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&s.jsx(F,{}),v&&s.jsx(K,{})]}),w&&I==="advanced"&&m&&c.length===0&&u&&s.jsx("div",{className:e.styles.mobileMenu,children:u.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ke(l),children:l.title})},l._key??n))}),w&&I==="advanced"&&m&&c.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:c.length===1?ve:ge,children:s.jsx(we.ChevronLeft,{size:18,"aria-hidden":"true"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(c[c.length-1].description)}),c[c.length-1].primary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]}),l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`primary-${n}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:l.label}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[l.label,l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`secondary-${n}`))]},`stack-${c.length}`)]})}),y&&y.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(le.ButtonGroup,{children:y.map((l,n)=>s.jsx(z.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel,icon:l.icon,iconAlignment:l.iconAlignment,children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel}):l.label},l._key??n))})}),o&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(le.ButtonGroup,{alignment:"center",children:s.jsx(z.Button,{as:"a",href:o.href??"/",variant:o.variant??"primary",displayType:o.displayType??"text",imageSrc:o.imageSrc,imageAlt:o.imageAlt,"aria-label":o.ariaLabel,icon:o.icon,iconAlignment:o.iconAlignment,children:o.imageSrc?s.jsx("img",{src:o.imageSrc,alt:o.imageAlt??o.ariaLabel}):o.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[w&&p&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(Ce.X,{size:24,"aria-hidden":"true"}):s.jsx(z.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|
|
11
|
+
*/const Ie=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ae.createLucideIcon("search",Ie),Re={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},qe=({spotlight:i,renderText:x})=>{var h,E,p,g,N,L;const c=i.callToAction;if(!c)return null;const j=((h=c.linkOptions)==null?void 0:h.linkType)==="external";let y="#";return j&&((E=c.linkOptions)!=null&&E.externalUrl)?y=c.linkOptions.externalUrl:((p=c.linkOptions)==null?void 0:p.linkType)==="internal"&&((N=(g=c.linkOptions)==null?void 0:g.internalUrl)!=null&&N.slug.current)&&(y=`/${c.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((L=i.image.imageUrls)==null?void 0:L.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:x==null?void 0:x(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:x==null?void 0:x(i.description,e.styles.description)})]}),c.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(A.Button,{as:"a",variant:c.variant??"primary",href:y,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":c.ariaLabel||c.label,children:c.label})})]})};function ze({renderText:i,title:x,logo:c,items:j,groups:y,utilityItems:h,isSticky:E=!1,showSearch:p=!0,showLocaleSelect:g=!0,showThemeToggle:N=!0,themeToggleComponent:L,alignment:O="right",variant:ie="standard",navigationType:I="default",searchComponent:re,localeSelectComponent:ce,className:oe,style:de,...ue}){const[m,X]=t.useState(!1),[K,v]=t.useState(null),[ye,he]=t.useState(0),[me,fe]=t.useState(!1),[be,xe]=t.useState(null),[d,w]=t.useState([]),[M,W]=t.useState(0),[pe,J]=t.useState(null),[C,ve]=t.useState(!1),[R,B]=t.useState("forward"),D=t.useRef(null),k=t.useRef(null),Q=t.useRef(null),G=t.useRef(new Map),T=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:L})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(le.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:re})})}),Y=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(le.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Le,{size:16,"aria-hidden":"true"})}),content:ce})})}),q=t.useCallback(()=>{k.current&&he(k.current.getBoundingClientRect().width)},[]),Z=()=>{X(n=>{const l=!n;return l||(w([]),B("forward"),v(null)),l})},ee=t.useCallback(n=>{const l=G.current.get(n);if(l&&k.current){const r=l.getBoundingClientRect(),o=k.current.getBoundingClientRect();xe(r.left-o.left+r.width/2)}},[]),ke=t.useCallback(n=>{v(l=>l===n?null:n)},[]),U=t.useCallback(n=>{D.current&&!D.current.contains(n.target)&&v(null)},[]),P=t.useCallback(()=>{q(),typeof window<"u"&&window.innerWidth>768&&(X(!1),v(null))},[q]),je=()=>w([]),ge=n=>{B("forward"),w([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},se=n=>{B("forward"),w(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},Ne=()=>{B("backward"),w(n=>n.slice(0,-1))};t.useEffect(()=>{if(typeof window>"u")return;const n=()=>ve(window.innerWidth<768);return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",P),l&&document.addEventListener("click",U),q(),fe(!0),()=>{n&&window.removeEventListener("resize",P),l&&document.removeEventListener("click",U)}},[P,U,q]),t.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>V.lockScroll(),0):V.unlockScroll(),()=>V.unlockScroll()},[m]),t.useEffect(()=>{var r;if(!m)return;const n=(r=k.current)==null?void 0:r.querySelector('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus();const l=o=>{var S;if(o.key==="Escape"){Z(),(S=Q.current)==null||S.focus();return}if(o.key!=="Tab"||!k.current)return;const b=Array.from(k.current.querySelectorAll('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(a=>!a.closest("[aria-hidden=true]"));if(b.length===0)return;const f=b[0],_=b[b.length-1];o.shiftKey?document.activeElement===f&&(o.preventDefault(),_.focus()):document.activeElement===_&&(o.preventDefault(),f.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[m]);const z=(n,l="")=>n.map((r,o)=>{const b=`${l}/${r._key??r.label}-${o}`;return s.jsx(e.NavLink,{link:r,path:b,parentPath:l,openPath:K,togglePath:ke,updateTriangleIndicator:ee,setOpenPath:v,renderLinks:z,buttonRefs:G},b)}),$e=n=>n.map((l,r)=>{var _,S;const o=`group-${r}`,b=pe===r,f=(_=l.primaryItems)==null?void 0:_[M??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{J(r),v(o),ee(o)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:a=>{G.current.set(o,a)},"aria-haspopup":!0,"aria-expanded":b,"aria-controls":`submenu-${r}`,className:`${e.styles.sublinkToggle} ${b?e.styles.open:""}`,children:[l.title,s.jsx(Se.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${r}`,className:`${e.styles.sublinks} ${b?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,onMouseLeave:()=>{J(null),W(0),v(null)},children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${l.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(S=l.primaryItems)==null?void 0:S.map((a,$)=>a.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:a.href,className:`${e.styles.link} ${M===$?e.styles.open:""}`,target:a.isExternal?"_blank":"_self",rel:a.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ne;v(null),(ne=a.onClick)==null||ne.call(a)},onMouseEnter:()=>W($),children:[s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]}),a.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},a._key??$):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${M===$?e.styles.open:""}`,onMouseEnter:()=>W($),children:s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]})})},a._key??$))]}),(f==null?void 0:f.sublinks)&&f.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[f.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(f.description)}),z(f.sublinks,`${o}-${M}`)]},`${f.label}-${f.sublinks.length}`),l.secondaryItems&&l.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:z(l.secondaryItems,`${o}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(qe,{spotlight:l.spotlight,renderText:i})})]})})})]},l._key??`group-${r}`)}),we=[e.styles.navbar,Be[O],Re[ie],E?e.styles.sticky:"",y!=null&&y.length?e.styles.advanced:e.styles.default,oe??""].filter(Boolean).join(" "),u=h&&h.length>0?h[Math.min(1,h.length-1)]:null;return s.jsx("header",{ref:D,className:we,style:de,"aria-label":"Site header",...ue,children:s.jsxs("div",{className:`${e.styles.container} ${(!h||h.length===0)&&O!=="center"?e.styles.twoColumn:""}`,children:[c?s.jsx("div",{className:e.styles.logo,children:c}):x?s.jsx("div",{className:e.styles.title,children:x}):null,s.jsx("nav",{ref:k,style:{left:O==="center"?`calc(50% - ${ye/2}px)`:"0"},"aria-modal":m?"true":void 0,className:`${e.styles.nav} ${m?e.styles.open:""} ${me?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${be}px`},className:`${e.styles.triangle} ${K?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&z(j),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&!C&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),!C&&I==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&$e(y),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),C&&I==="advanced"&&m&&d.length===0&&y&&s.jsx("div",{className:e.styles.mobileMenu,children:y.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ge(n),children:n.title})},n._key??l))}),C&&I==="advanced"&&m&&d.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:d.length===1?je:Ne,children:s.jsx(Ce.ChevronLeft,{size:18,"aria-hidden":"true"})}),d[d.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(d[d.length-1].description)}),d[d.length-1].primary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(n),children:s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]})}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,children:[s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]}),n.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`primary-${l}`)),d[d.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),d[d.length-1].secondary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(n),children:n.label}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,children:[n.label,n.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`secondary-${l}`))]},`stack-${d.length}`)]})}),h&&h.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(te.ButtonGroup,{children:h.map((n,l)=>s.jsx(A.Button,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel}):n.label},n._key??l))})}),u&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(te.ButtonGroup,{alignment:"center",children:s.jsx(A.Button,{as:"a",href:u.href??"/",variant:u.variant??"primary",displayType:u.displayType??"text",imageSrc:u.imageSrc,imageAlt:u.imageAlt,"aria-label":u.ariaLabel,icon:u.icon,iconAlignment:u.iconAlignment,children:u.imageSrc?s.jsx("img",{src:u.imageSrc,alt:u.imageAlt??u.ariaLabel}):u.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[C&&p&&s.jsx(F,{}),s.jsx("button",{ref:Q,className:e.styles.menuToggle,onClick:Z,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(_e.X,{size:24,"aria-hidden":"true"}):s.jsx(A.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|