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