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