quirk-ui 0.1.149 → 0.1.151
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/NavBar/NavBar.test.cjs +1 -1
- package/dist/core/components/NavBar/NavBar.test.mjs +149 -89
- package/dist/core/components/NavBar/index.cjs +2 -2
- package/dist/core/components/NavBar/index.mjs +183 -154
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +12 -0
- package/dist/core.mjs +12 -11
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +12 -0
- package/dist/main.mjs +78 -77
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as i, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useRef as F, useCallback as _, useEffect as z } from "react";
|
|
3
3
|
import { Modal as oe } from "../Modal/index.mjs";
|
|
4
|
-
import { B as
|
|
4
|
+
import { B as A, M as Re } from "../../../index-aWdsapYP.js";
|
|
5
5
|
import { ButtonGroup as de } from "../ButtonGroup/index.mjs";
|
|
6
|
-
import { s as e, N as
|
|
6
|
+
import { s as e, N as xe } from "../../../NavLink-u4KvVgDl.js";
|
|
7
7
|
import { lockScroll as Be, unlockScroll as ue } from "../../utils/NoScroll/noScroll.mjs";
|
|
8
8
|
import { C as Oe } from "../../../chevron-right-Cim1KPuL.js";
|
|
9
|
-
import { E as
|
|
9
|
+
import { E as Y } from "../../../external-link-BOPobeQJ.js";
|
|
10
10
|
import { X as We } from "../../../x-CnsEH4Ox.js";
|
|
11
11
|
import { c as me } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
12
12
|
import { C as De } from "../../../chevron-down-DSUzBz9F.js";
|
|
@@ -16,7 +16,7 @@ import { C as De } from "../../../chevron-down-DSUzBz9F.js";
|
|
|
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 Pe = [
|
|
20
20
|
["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54", key: "1djwo0" }],
|
|
21
21
|
[
|
|
22
22
|
"path",
|
|
@@ -27,17 +27,17 @@ const Ue = [
|
|
|
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
|
+
], Ue = me("earth", Pe);
|
|
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 Fe = [
|
|
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
|
+
], je = me("search", Fe), Ge = {
|
|
41
41
|
standard: e.standard,
|
|
42
42
|
transparent: e.transparent
|
|
43
43
|
}, qe = {
|
|
@@ -45,66 +45,66 @@ const je = [
|
|
|
45
45
|
center: e.center,
|
|
46
46
|
right: e.right
|
|
47
47
|
}, Ke = ({
|
|
48
|
-
spotlight:
|
|
48
|
+
spotlight: o,
|
|
49
49
|
renderText: k
|
|
50
50
|
}) => {
|
|
51
|
-
var h,
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
54
|
-
const $ = ((h =
|
|
51
|
+
var h, R, g, w, C, x;
|
|
52
|
+
const d = o.callToAction;
|
|
53
|
+
if (!d) return null;
|
|
54
|
+
const $ = ((h = d.linkOptions) == null ? void 0 : h.linkType) === "external";
|
|
55
55
|
let m = "#";
|
|
56
|
-
return $ && ((
|
|
57
|
-
|
|
56
|
+
return $ && ((R = d.linkOptions) != null && R.externalUrl) ? m = d.linkOptions.externalUrl : ((g = d.linkOptions) == null ? void 0 : g.linkType) === "internal" && ((C = (w = d.linkOptions) == null ? void 0 : w.internalUrl) != null && C.slug.current) && (m = `/${d.linkOptions.internalUrl.slug.current}`), /* @__PURE__ */ i("div", { className: e.spotlight, children: [
|
|
57
|
+
o.image && /* @__PURE__ */ a("div", { className: e.imageWrapper, children: /* @__PURE__ */ a(
|
|
58
58
|
"img",
|
|
59
59
|
{
|
|
60
|
-
src: ((
|
|
61
|
-
alt:
|
|
60
|
+
src: ((x = o.image.imageUrls) == null ? void 0 : x.medium) ?? "",
|
|
61
|
+
alt: o.image.asset.altText || o.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
|
-
|
|
68
|
-
|
|
67
|
+
o.title && /* @__PURE__ */ a("div", { className: e.title, children: k == null ? void 0 : k(o.title, e.title) }),
|
|
68
|
+
o.description && /* @__PURE__ */ a("div", { className: e.description, children: k == null ? void 0 : k(o.description, e.description) })
|
|
69
69
|
] }),
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
d.linkOptions && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
71
|
+
A,
|
|
72
72
|
{
|
|
73
73
|
as: "a",
|
|
74
|
-
variant:
|
|
74
|
+
variant: d.variant ?? "primary",
|
|
75
75
|
href: m,
|
|
76
76
|
target: $ ? "_blank" : "_self",
|
|
77
77
|
rel: $ ? "noopener noreferrer" : void 0,
|
|
78
|
-
"aria-label":
|
|
79
|
-
children:
|
|
78
|
+
"aria-label": d.ariaLabel || d.label,
|
|
79
|
+
children: d.label
|
|
80
80
|
}
|
|
81
81
|
) })
|
|
82
82
|
] });
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
renderText:
|
|
84
|
+
function rn({
|
|
85
|
+
renderText: o,
|
|
86
86
|
title: k,
|
|
87
|
-
logo:
|
|
87
|
+
logo: d,
|
|
88
88
|
items: $,
|
|
89
89
|
groups: m,
|
|
90
90
|
utilityItems: h,
|
|
91
|
-
isSticky:
|
|
91
|
+
isSticky: R = !1,
|
|
92
92
|
showSearch: g = !0,
|
|
93
93
|
showLocaleSelect: w = !0,
|
|
94
94
|
showThemeToggle: C = !0,
|
|
95
|
-
themeToggleComponent:
|
|
95
|
+
themeToggleComponent: x,
|
|
96
96
|
alignment: j = "right",
|
|
97
97
|
variant: J = "standard",
|
|
98
|
-
navigationType:
|
|
98
|
+
navigationType: B = "default",
|
|
99
99
|
searchComponent: he,
|
|
100
100
|
localeSelectComponent: fe,
|
|
101
101
|
className: be,
|
|
102
102
|
style: pe,
|
|
103
103
|
...ve
|
|
104
104
|
}) {
|
|
105
|
-
const [f, Q] = v(!1), [Z, N] = v(null), [ke, ge] = v(0), [Ne, ye] = v(!1), [T, $e] = v(!1), [we, Ce] = v(null), [
|
|
105
|
+
const [f, Q] = v(!1), [Z, N] = v(null), [ke, ge] = v(0), [Ne, ye] = v(!1), [T, $e] = v(!1), [we, Ce] = v(null), [u, L] = v([]), [O, G] = v(
|
|
106
106
|
0
|
|
107
|
-
), [Ee, ee] = v(null), [
|
|
107
|
+
), [Ee, ee] = v(null), [M, Le] = v(!1), [W, D] = v("forward"), q = F(null), y = F(null), ne = F(null), K = F(/* @__PURE__ */ new Map()), ae = () => /* @__PURE__ */ a(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
110
|
className: `${e.linkWrapper} ${e.parent}`,
|
|
@@ -114,11 +114,11 @@ function tn({
|
|
|
114
114
|
{
|
|
115
115
|
className: `${e.linkItem} ${e.themeToggle}`,
|
|
116
116
|
role: "presentation",
|
|
117
|
-
children:
|
|
117
|
+
children: x
|
|
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}`,
|
|
@@ -133,7 +133,7 @@ function tn({
|
|
|
133
133
|
title: "Search",
|
|
134
134
|
"aria-label": "Search",
|
|
135
135
|
className: e.search,
|
|
136
|
-
children: /* @__PURE__ */ a(
|
|
136
|
+
children: /* @__PURE__ */ a(je, { size: 16, "aria-hidden": "true" })
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
content: he
|
|
@@ -150,32 +150,32 @@ function tn({
|
|
|
150
150
|
title: "Locale Select",
|
|
151
151
|
"aria-label": "Locale Select",
|
|
152
152
|
className: e.locale,
|
|
153
|
-
children: /* @__PURE__ */ a(
|
|
153
|
+
children: /* @__PURE__ */ a(Ue, { size: 16, "aria-hidden": "true" })
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
156
|
content: fe
|
|
157
157
|
}
|
|
158
|
-
) }) }),
|
|
158
|
+
) }) }), P = _(() => {
|
|
159
159
|
y.current && ge(y.current.getBoundingClientRect().width);
|
|
160
160
|
}, []), ie = () => {
|
|
161
161
|
Q((n) => {
|
|
162
162
|
const l = !n;
|
|
163
|
-
return l || (
|
|
163
|
+
return l || (L([]), D("forward"), N(null)), l;
|
|
164
164
|
});
|
|
165
|
-
},
|
|
166
|
-
const l =
|
|
165
|
+
}, re = _((n) => {
|
|
166
|
+
const l = K.current.get(n);
|
|
167
167
|
if (l && y.current) {
|
|
168
168
|
const c = l.getBoundingClientRect(), r = y.current.getBoundingClientRect();
|
|
169
169
|
Ce(c.left - r.left + c.width / 2);
|
|
170
170
|
}
|
|
171
|
-
}, []),
|
|
171
|
+
}, []), Me = _((n) => {
|
|
172
172
|
N((l) => l === n ? null : n);
|
|
173
|
-
}, []),
|
|
174
|
-
|
|
175
|
-
}, []),
|
|
176
|
-
|
|
177
|
-
}, [
|
|
178
|
-
|
|
173
|
+
}, []), H = _((n) => {
|
|
174
|
+
q.current && !q.current.contains(n.target) && N(null);
|
|
175
|
+
}, []), X = _(() => {
|
|
176
|
+
P(), typeof window < "u" && window.innerWidth > 768 && (Q(!1), N(null));
|
|
177
|
+
}, [P]), Ie = () => L([]), Se = (n) => {
|
|
178
|
+
D("forward"), L([
|
|
179
179
|
{
|
|
180
180
|
title: n.title,
|
|
181
181
|
primary: n.primaryItems ?? [],
|
|
@@ -183,8 +183,8 @@ function tn({
|
|
|
183
183
|
description: ""
|
|
184
184
|
}
|
|
185
185
|
]);
|
|
186
|
-
},
|
|
187
|
-
|
|
186
|
+
}, te = (n) => {
|
|
187
|
+
D("forward"), L((l) => [
|
|
188
188
|
...l,
|
|
189
189
|
{
|
|
190
190
|
title: n.label,
|
|
@@ -194,11 +194,11 @@ function tn({
|
|
|
194
194
|
}
|
|
195
195
|
]);
|
|
196
196
|
}, _e = () => {
|
|
197
|
-
|
|
197
|
+
D("backward"), L((n) => n.slice(0, -1));
|
|
198
198
|
};
|
|
199
199
|
z(() => {
|
|
200
200
|
if (typeof window > "u") return;
|
|
201
|
-
const n = () =>
|
|
201
|
+
const n = () => Le(window.innerWidth < 768);
|
|
202
202
|
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
203
203
|
}, []), z(() => {
|
|
204
204
|
if (typeof window > "u") return;
|
|
@@ -206,10 +206,10 @@ function tn({
|
|
|
206
206
|
return n(), window.addEventListener("scroll", n, { passive: !0 }), () => window.removeEventListener("scroll", n);
|
|
207
207
|
}, []), z(() => {
|
|
208
208
|
const n = typeof window < "u", l = typeof document < "u";
|
|
209
|
-
return n && window.addEventListener("resize",
|
|
210
|
-
n && window.removeEventListener("resize",
|
|
209
|
+
return n && window.addEventListener("resize", X), l && document.addEventListener("click", H), P(), ye(!0), () => {
|
|
210
|
+
n && window.removeEventListener("resize", X), l && document.removeEventListener("click", H);
|
|
211
211
|
};
|
|
212
|
-
}, [
|
|
212
|
+
}, [X, H, P]), z(() => {
|
|
213
213
|
if (!(typeof document > "u"))
|
|
214
214
|
return f ? setTimeout(() => Be(), 0) : ue(), () => ue();
|
|
215
215
|
}, [f]), z(() => {
|
|
@@ -232,46 +232,46 @@ function tn({
|
|
|
232
232
|
y.current.querySelectorAll(
|
|
233
233
|
'a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
234
234
|
)
|
|
235
|
-
).filter((
|
|
235
|
+
).filter((s) => !s.closest("[aria-hidden=true]"));
|
|
236
236
|
if (p.length === 0) return;
|
|
237
|
-
const b = p[0],
|
|
238
|
-
r.shiftKey ? document.activeElement === b && (r.preventDefault(),
|
|
237
|
+
const b = p[0], I = p[p.length - 1];
|
|
238
|
+
r.shiftKey ? document.activeElement === b && (r.preventDefault(), I.focus()) : document.activeElement === I && (r.preventDefault(), b.focus());
|
|
239
239
|
};
|
|
240
240
|
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
241
241
|
}, [f]);
|
|
242
242
|
const U = (n, l = "") => n.map((c, r) => {
|
|
243
243
|
const p = `${l}/${c._key ?? c.label}-${r}`;
|
|
244
244
|
return /* @__PURE__ */ a(
|
|
245
|
-
|
|
245
|
+
xe,
|
|
246
246
|
{
|
|
247
247
|
link: c,
|
|
248
248
|
path: p,
|
|
249
249
|
parentPath: l,
|
|
250
250
|
openPath: Z,
|
|
251
|
-
togglePath:
|
|
252
|
-
updateTriangleIndicator:
|
|
251
|
+
togglePath: Me,
|
|
252
|
+
updateTriangleIndicator: re,
|
|
253
253
|
setOpenPath: N,
|
|
254
254
|
renderLinks: U,
|
|
255
|
-
buttonRefs:
|
|
255
|
+
buttonRefs: K
|
|
256
256
|
},
|
|
257
257
|
p
|
|
258
258
|
);
|
|
259
259
|
}), ze = (n) => n.map((l, c) => {
|
|
260
|
-
var
|
|
261
|
-
const r = `group-${c}`, p = Ee === c, b = (
|
|
260
|
+
var I, S;
|
|
261
|
+
const r = `group-${c}`, p = Ee === c, b = (I = l.primaryItems) == null ? void 0 : I[O ?? 0];
|
|
262
262
|
return /* @__PURE__ */ i(
|
|
263
263
|
"div",
|
|
264
264
|
{
|
|
265
265
|
className: `${e.linkWrapper} ${e.parent}`,
|
|
266
266
|
onMouseEnter: () => {
|
|
267
|
-
ee(c), N(r),
|
|
267
|
+
ee(c), N(r), re(r);
|
|
268
268
|
},
|
|
269
269
|
children: [
|
|
270
270
|
/* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ i(
|
|
271
271
|
"button",
|
|
272
272
|
{
|
|
273
|
-
ref: (
|
|
274
|
-
|
|
273
|
+
ref: (s) => {
|
|
274
|
+
K.current.set(r, s);
|
|
275
275
|
},
|
|
276
276
|
"aria-haspopup": !0,
|
|
277
277
|
"aria-expanded": p,
|
|
@@ -312,25 +312,25 @@ function tn({
|
|
|
312
312
|
children: [
|
|
313
313
|
/* @__PURE__ */ a("div", { className: e.linkItem }),
|
|
314
314
|
(S = l.primaryItems) == null ? void 0 : S.map(
|
|
315
|
-
(
|
|
315
|
+
(s, E) => s.href ? /* @__PURE__ */ a("div", { role: "menuitem", children: /* @__PURE__ */ i(
|
|
316
316
|
"a",
|
|
317
317
|
{
|
|
318
|
-
href:
|
|
319
|
-
className: `${e.link} ${
|
|
320
|
-
target:
|
|
321
|
-
rel:
|
|
318
|
+
href: s.href,
|
|
319
|
+
className: `${e.link} ${O === E ? e.open : ""}`,
|
|
320
|
+
target: s.isExternal ? "_blank" : "_self",
|
|
321
|
+
rel: s.isExternal ? "noopener noreferrer" : void 0,
|
|
322
322
|
onClick: () => {
|
|
323
323
|
var se;
|
|
324
|
-
N(null), (se =
|
|
324
|
+
N(null), (se = s.onClick) == null || se.call(s);
|
|
325
325
|
},
|
|
326
326
|
onMouseEnter: () => G(E),
|
|
327
327
|
children: [
|
|
328
328
|
/* @__PURE__ */ i("span", { className: e.linkContent, children: [
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
s.label,
|
|
330
|
+
s.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: s.subtitle })
|
|
331
331
|
] }),
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
s.isExternal && /* @__PURE__ */ a(
|
|
333
|
+
Y,
|
|
334
334
|
{
|
|
335
335
|
className: e.newTabIcon,
|
|
336
336
|
size: 16,
|
|
@@ -339,17 +339,17 @@ function tn({
|
|
|
339
339
|
)
|
|
340
340
|
]
|
|
341
341
|
}
|
|
342
|
-
) },
|
|
342
|
+
) }, s._key ?? E) : /* @__PURE__ */ a("div", { role: "menuitem", children: /* @__PURE__ */ a(
|
|
343
343
|
"button",
|
|
344
344
|
{
|
|
345
|
-
className: `${e.sublinkToggle} ${
|
|
345
|
+
className: `${e.sublinkToggle} ${O === E ? e.open : ""}`,
|
|
346
346
|
onMouseEnter: () => G(E),
|
|
347
347
|
children: /* @__PURE__ */ i("span", { className: e.linkContent, children: [
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
s.label,
|
|
349
|
+
s.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: s.subtitle })
|
|
350
350
|
] })
|
|
351
351
|
}
|
|
352
|
-
) },
|
|
352
|
+
) }, s._key ?? E)
|
|
353
353
|
)
|
|
354
354
|
]
|
|
355
355
|
}
|
|
@@ -359,10 +359,10 @@ function tn({
|
|
|
359
359
|
{
|
|
360
360
|
className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
|
|
361
361
|
children: [
|
|
362
|
-
b.description && /* @__PURE__ */ a("div", { className: e.sublinksDescription, children:
|
|
362
|
+
b.description && /* @__PURE__ */ a("div", { className: e.sublinksDescription, children: o == null ? void 0 : o(b.description) }),
|
|
363
363
|
U(
|
|
364
364
|
b.sublinks,
|
|
365
|
-
`${r}-${
|
|
365
|
+
`${r}-${O}`
|
|
366
366
|
)
|
|
367
367
|
]
|
|
368
368
|
},
|
|
@@ -383,7 +383,7 @@ function tn({
|
|
|
383
383
|
Ke,
|
|
384
384
|
{
|
|
385
385
|
spotlight: l.spotlight,
|
|
386
|
-
renderText:
|
|
386
|
+
renderText: o
|
|
387
387
|
}
|
|
388
388
|
)
|
|
389
389
|
}
|
|
@@ -397,20 +397,20 @@ function tn({
|
|
|
397
397
|
},
|
|
398
398
|
l._key ?? `group-${c}`
|
|
399
399
|
);
|
|
400
|
-
}),
|
|
400
|
+
}), Ae = [
|
|
401
401
|
e.navbar,
|
|
402
402
|
qe[j],
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
Ge[J],
|
|
404
|
+
R ? e.sticky : "",
|
|
405
405
|
// isScrolled ? styles.scrolled : "",
|
|
406
406
|
m != null && m.length ? e.advanced : e.default,
|
|
407
407
|
be ?? ""
|
|
408
|
-
].filter(Boolean).join(" "),
|
|
408
|
+
].filter(Boolean).join(" "), t = h && h.length > 0 ? h[Math.min(1, h.length - 1)] : null;
|
|
409
409
|
return /* @__PURE__ */ a(
|
|
410
410
|
"header",
|
|
411
411
|
{
|
|
412
|
-
ref:
|
|
413
|
-
className:
|
|
412
|
+
ref: q,
|
|
413
|
+
className: Ae,
|
|
414
414
|
style: pe,
|
|
415
415
|
"aria-label": "Site header",
|
|
416
416
|
...ve,
|
|
@@ -419,7 +419,7 @@ function tn({
|
|
|
419
419
|
{
|
|
420
420
|
className: `${e.container} ${(!h || h.length === 0) && j !== "center" ? e.twoColumn : ""}`,
|
|
421
421
|
children: [
|
|
422
|
-
|
|
422
|
+
d ? /* @__PURE__ */ a("div", { className: e.logo, children: d }) : k ? /* @__PURE__ */ a("div", { className: e.title, children: k }) : null,
|
|
423
423
|
/* @__PURE__ */ a(
|
|
424
424
|
"nav",
|
|
425
425
|
{
|
|
@@ -453,7 +453,7 @@ function tn({
|
|
|
453
453
|
)
|
|
454
454
|
}
|
|
455
455
|
),
|
|
456
|
-
|
|
456
|
+
B === "default" && $ && /* @__PURE__ */ i("div", { className: e.grid, children: [
|
|
457
457
|
$.length > 0 && /* @__PURE__ */ a("div", { role: "menubar", className: e.menubar, children: U($) }),
|
|
458
458
|
(g || w || C) && /* @__PURE__ */ i(ce, { children: [
|
|
459
459
|
/* @__PURE__ */ a("span", { className: e.separator, "aria-hidden": "true" }),
|
|
@@ -465,14 +465,14 @@ function tn({
|
|
|
465
465
|
className: e.toolbar,
|
|
466
466
|
children: [
|
|
467
467
|
C && /* @__PURE__ */ a(ae, {}),
|
|
468
|
-
g && !
|
|
468
|
+
g && !M && /* @__PURE__ */ a(V, {}),
|
|
469
469
|
w && /* @__PURE__ */ a(le, {})
|
|
470
470
|
]
|
|
471
471
|
}
|
|
472
472
|
)
|
|
473
473
|
] })
|
|
474
474
|
] }),
|
|
475
|
-
!
|
|
475
|
+
!M && B === "advanced" && m && /* @__PURE__ */ i("div", { className: e.grid, children: [
|
|
476
476
|
m.length > 0 && /* @__PURE__ */ a("div", { role: "menubar", className: e.menubar, children: ze(m) }),
|
|
477
477
|
(g || w || C) && /* @__PURE__ */ i(ce, { children: [
|
|
478
478
|
/* @__PURE__ */ a("span", { className: e.separator, "aria-hidden": "true" }),
|
|
@@ -484,17 +484,17 @@ function tn({
|
|
|
484
484
|
className: e.toolbar,
|
|
485
485
|
children: [
|
|
486
486
|
C && /* @__PURE__ */ a(ae, {}),
|
|
487
|
-
g && /* @__PURE__ */ a(
|
|
487
|
+
g && /* @__PURE__ */ a(V, {}),
|
|
488
488
|
w && /* @__PURE__ */ a(le, {})
|
|
489
489
|
]
|
|
490
490
|
}
|
|
491
491
|
)
|
|
492
492
|
] })
|
|
493
493
|
] }),
|
|
494
|
-
|
|
494
|
+
M && B === "advanced" && f && u.length === 0 && m && /* @__PURE__ */ a("div", { className: e.mobileMenu, children: m.map((n, l) => /* @__PURE__ */ a(
|
|
495
495
|
"div",
|
|
496
496
|
{
|
|
497
|
-
className: `${e.mobileMenuItem} ${
|
|
497
|
+
className: `${e.mobileMenuItem} ${W === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
498
498
|
children: /* @__PURE__ */ a(
|
|
499
499
|
"button",
|
|
500
500
|
{
|
|
@@ -506,7 +506,7 @@ function tn({
|
|
|
506
506
|
},
|
|
507
507
|
n._key ?? l
|
|
508
508
|
)) }),
|
|
509
|
-
|
|
509
|
+
M && B === "advanced" && f && u.length > 0 && /* @__PURE__ */ i(
|
|
510
510
|
"div",
|
|
511
511
|
{
|
|
512
512
|
className: e.mobileMenuSlide,
|
|
@@ -516,29 +516,29 @@ function tn({
|
|
|
516
516
|
{
|
|
517
517
|
className: e.back,
|
|
518
518
|
"aria-label": "Go back",
|
|
519
|
-
onClick:
|
|
519
|
+
onClick: u.length === 1 ? Ie : _e,
|
|
520
520
|
children: /* @__PURE__ */ a(Oe, { size: 18, "aria-hidden": "true" })
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
|
-
|
|
523
|
+
u[u.length - 1].description && /* @__PURE__ */ a(
|
|
524
524
|
"div",
|
|
525
525
|
{
|
|
526
|
-
className: `${e.sublinksDescription} ${
|
|
527
|
-
children:
|
|
528
|
-
|
|
526
|
+
className: `${e.sublinksDescription} ${W === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
527
|
+
children: o == null ? void 0 : o(
|
|
528
|
+
u[u.length - 1].description
|
|
529
529
|
)
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
|
-
|
|
532
|
+
u[u.length - 1].primary.map((n, l) => /* @__PURE__ */ a(
|
|
533
533
|
"div",
|
|
534
534
|
{
|
|
535
535
|
role: "menuitem",
|
|
536
|
-
className: `${e.mobileMenuItem} ${
|
|
536
|
+
className: `${e.mobileMenuItem} ${W === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
537
537
|
children: n.sublinks ? /* @__PURE__ */ a(
|
|
538
538
|
"button",
|
|
539
539
|
{
|
|
540
540
|
className: e.sublinkToggle,
|
|
541
|
-
onClick: () =>
|
|
541
|
+
onClick: () => te(n),
|
|
542
542
|
children: /* @__PURE__ */ i("span", { className: e.linkContent, children: [
|
|
543
543
|
n.label,
|
|
544
544
|
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
@@ -557,7 +557,7 @@ function tn({
|
|
|
557
557
|
n.subtitle && /* @__PURE__ */ a("span", { className: e.subtitle, children: n.subtitle })
|
|
558
558
|
] }),
|
|
559
559
|
n.isExternal && /* @__PURE__ */ a(
|
|
560
|
-
|
|
560
|
+
Y,
|
|
561
561
|
{
|
|
562
562
|
className: e.newTabIcon,
|
|
563
563
|
size: 16,
|
|
@@ -570,18 +570,18 @@ function tn({
|
|
|
570
570
|
},
|
|
571
571
|
n._key ?? `primary-${l}`
|
|
572
572
|
)),
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
u[u.length - 1].secondary.length > 0 && /* @__PURE__ */ a("hr", { className: e.groupDivider }),
|
|
574
|
+
u[u.length - 1].secondary.map(
|
|
575
575
|
(n, l) => /* @__PURE__ */ a(
|
|
576
576
|
"div",
|
|
577
577
|
{
|
|
578
578
|
role: "menuitem",
|
|
579
|
-
className: `${e.mobileMenuItem} ${
|
|
579
|
+
className: `${e.mobileMenuItem} ${W === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
580
580
|
children: n.sublinks ? /* @__PURE__ */ a(
|
|
581
581
|
"button",
|
|
582
582
|
{
|
|
583
583
|
className: e.sublinkToggle,
|
|
584
|
-
onClick: () =>
|
|
584
|
+
onClick: () => te(n),
|
|
585
585
|
children: n.label
|
|
586
586
|
}
|
|
587
587
|
) : /* @__PURE__ */ i(
|
|
@@ -594,7 +594,7 @@ function tn({
|
|
|
594
594
|
children: [
|
|
595
595
|
n.label,
|
|
596
596
|
n.isExternal && /* @__PURE__ */ a(
|
|
597
|
-
|
|
597
|
+
Y,
|
|
598
598
|
{
|
|
599
599
|
className: e.newTabIcon,
|
|
600
600
|
size: 16,
|
|
@@ -610,7 +610,7 @@ function tn({
|
|
|
610
610
|
)
|
|
611
611
|
]
|
|
612
612
|
},
|
|
613
|
-
`stack-${
|
|
613
|
+
`stack-${u.length}`
|
|
614
614
|
)
|
|
615
615
|
] })
|
|
616
616
|
}
|
|
@@ -621,63 +621,92 @@ function tn({
|
|
|
621
621
|
className: e.utility,
|
|
622
622
|
"data-scrolled": T,
|
|
623
623
|
"aria-label": "Utility navigation",
|
|
624
|
-
children: /* @__PURE__ */ a(de, { spacing: "sm", children: h.map((n, l) =>
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
"
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
624
|
+
children: /* @__PURE__ */ a(de, { spacing: "sm", children: h.map((n, l) => {
|
|
625
|
+
const c = J == "transparent" && n.variant === "link" && T ? e.utilityScrolled : e.utilityDefault, r = n.imageSrc ? /* @__PURE__ */ a(
|
|
626
|
+
"img",
|
|
627
|
+
{
|
|
628
|
+
src: n.imageSrc,
|
|
629
|
+
alt: n.imageAlt ?? n.ariaLabel
|
|
630
|
+
}
|
|
631
|
+
) : n.label;
|
|
632
|
+
return n.modalPayload ? /* @__PURE__ */ a(
|
|
633
|
+
A,
|
|
634
|
+
{
|
|
635
|
+
as: "modal",
|
|
636
|
+
size: "sm",
|
|
637
|
+
modalPayload: n.modalPayload,
|
|
638
|
+
variant: n.variant ?? "primary",
|
|
639
|
+
"aria-label": n.ariaLabel,
|
|
640
|
+
icon: n.icon,
|
|
641
|
+
iconAlignment: n.iconAlignment,
|
|
642
|
+
className: c,
|
|
643
|
+
children: r
|
|
644
|
+
},
|
|
645
|
+
n._key ?? l
|
|
646
|
+
) : /* @__PURE__ */ a(
|
|
647
|
+
A,
|
|
648
|
+
{
|
|
649
|
+
as: "a",
|
|
650
|
+
size: "sm",
|
|
651
|
+
href: n.href ?? "/",
|
|
652
|
+
variant: n.variant ?? "primary",
|
|
653
|
+
displayType: n.displayType ?? "text",
|
|
654
|
+
imageSrc: n.imageSrc,
|
|
655
|
+
imageAlt: n.imageAlt,
|
|
656
|
+
"aria-label": n.ariaLabel,
|
|
657
|
+
icon: n.icon,
|
|
658
|
+
iconAlignment: n.iconAlignment,
|
|
659
|
+
className: c,
|
|
660
|
+
children: r
|
|
661
|
+
},
|
|
662
|
+
n._key ?? l
|
|
663
|
+
);
|
|
664
|
+
}) })
|
|
648
665
|
}
|
|
649
666
|
),
|
|
650
|
-
|
|
667
|
+
t && /* @__PURE__ */ a(
|
|
651
668
|
"nav",
|
|
652
669
|
{
|
|
653
670
|
"aria-label": "Utility navigation",
|
|
654
671
|
className: `${e.utilityMobile} ${f ? e.open : ""}`,
|
|
655
|
-
children: /* @__PURE__ */ a(de, { alignment: "center", children: /* @__PURE__ */ a(
|
|
656
|
-
|
|
672
|
+
children: /* @__PURE__ */ a(de, { alignment: "center", children: t.modalPayload ? /* @__PURE__ */ a(
|
|
673
|
+
A,
|
|
674
|
+
{
|
|
675
|
+
as: "modal",
|
|
676
|
+
size: "sm",
|
|
677
|
+
modalPayload: t.modalPayload,
|
|
678
|
+
variant: t.variant ?? "primary",
|
|
679
|
+
"aria-label": t.ariaLabel,
|
|
680
|
+
icon: t.icon,
|
|
681
|
+
iconAlignment: t.iconAlignment,
|
|
682
|
+
children: t.label
|
|
683
|
+
}
|
|
684
|
+
) : /* @__PURE__ */ a(
|
|
685
|
+
A,
|
|
657
686
|
{
|
|
658
687
|
as: "a",
|
|
659
688
|
size: "sm",
|
|
660
|
-
href:
|
|
661
|
-
variant:
|
|
662
|
-
displayType:
|
|
663
|
-
imageSrc:
|
|
664
|
-
imageAlt:
|
|
665
|
-
"aria-label":
|
|
666
|
-
icon:
|
|
667
|
-
iconAlignment:
|
|
668
|
-
children:
|
|
689
|
+
href: t.href ?? "/",
|
|
690
|
+
variant: t.variant ?? "primary",
|
|
691
|
+
displayType: t.displayType ?? "text",
|
|
692
|
+
imageSrc: t.imageSrc,
|
|
693
|
+
imageAlt: t.imageAlt,
|
|
694
|
+
"aria-label": t.ariaLabel,
|
|
695
|
+
icon: t.icon,
|
|
696
|
+
iconAlignment: t.iconAlignment,
|
|
697
|
+
children: t.imageSrc ? /* @__PURE__ */ a(
|
|
669
698
|
"img",
|
|
670
699
|
{
|
|
671
|
-
src:
|
|
672
|
-
alt:
|
|
700
|
+
src: t.imageSrc,
|
|
701
|
+
alt: t.imageAlt ?? t.ariaLabel
|
|
673
702
|
}
|
|
674
|
-
) :
|
|
703
|
+
) : t.label
|
|
675
704
|
}
|
|
676
705
|
) })
|
|
677
706
|
}
|
|
678
707
|
),
|
|
679
708
|
/* @__PURE__ */ i("div", { className: e.mobileButtons, children: [
|
|
680
|
-
|
|
709
|
+
M && g && /* @__PURE__ */ a(V, {}),
|
|
681
710
|
/* @__PURE__ */ a(
|
|
682
711
|
"button",
|
|
683
712
|
{
|
|
@@ -687,7 +716,7 @@ function tn({
|
|
|
687
716
|
"aria-label": f ? "Close menu" : "Open menu",
|
|
688
717
|
"aria-expanded": f,
|
|
689
718
|
"aria-controls": "main-menu",
|
|
690
|
-
children: f ? /* @__PURE__ */ a(We, { size: 24, "aria-hidden": "true" }) : /* @__PURE__ */ a(
|
|
719
|
+
children: f ? /* @__PURE__ */ a(We, { size: 24, "aria-hidden": "true" }) : /* @__PURE__ */ a(Re, { size: 24, "aria-hidden": "true" })
|
|
691
720
|
}
|
|
692
721
|
)
|
|
693
722
|
] })
|
|
@@ -698,5 +727,5 @@ function tn({
|
|
|
698
727
|
);
|
|
699
728
|
}
|
|
700
729
|
export {
|
|
701
|
-
|
|
730
|
+
rn as Navbar
|
|
702
731
|
};
|