quirk-ui 0.1.78 → 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/DatePicker/index.cjs +2 -2
- package/dist/core/components/DatePicker/index.mjs +25 -25
- package/dist/core/components/Fieldset/index.cjs +1 -1
- package/dist/core/components/Fieldset/index.mjs +17 -17
- package/dist/core/components/NavBar/index.cjs +3 -3
- package/dist/core/components/NavBar/index.mjs +310 -284
- package/dist/core/components/Radio/index.cjs +1 -1
- package/dist/core/components/Radio/index.mjs +49 -49
- package/dist/core/components/Select/index.cjs +1 -1
- package/dist/core/components/Select/index.mjs +61 -61
- package/dist/core/components/Textarea/index.cjs +1 -1
- package/dist/core/components/Textarea/index.mjs +62 -62
- package/dist/index25.css +1 -1
- package/dist/index39.css +1 -1
- package/dist/index40.css +1 -1
- package/dist/index41.css +1 -1
- package/dist/index60.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { B as
|
|
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
|
|
7
|
-
import { lockScroll as
|
|
8
|
-
import { C as
|
|
9
|
-
import { E as
|
|
10
|
-
import { X as
|
|
11
|
-
import { c as
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
-
},
|
|
47
|
+
}, Ge = ({
|
|
48
48
|
spotlight: r,
|
|
49
|
-
renderText:
|
|
49
|
+
renderText: k
|
|
50
50
|
}) => {
|
|
51
|
-
var h,
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
54
|
-
const
|
|
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
|
|
57
|
-
r.image && /* @__PURE__ */
|
|
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: ((
|
|
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__ */
|
|
67
|
-
r.title && /* @__PURE__ */
|
|
68
|
-
r.description && /* @__PURE__ */
|
|
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
|
-
|
|
71
|
-
|
|
70
|
+
c.linkOptions && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
71
|
+
J,
|
|
72
72
|
{
|
|
73
73
|
as: "a",
|
|
74
|
-
variant:
|
|
74
|
+
variant: c.variant ?? "primary",
|
|
75
75
|
href: m,
|
|
76
|
-
target:
|
|
77
|
-
rel:
|
|
78
|
-
"aria-label":
|
|
79
|
-
children:
|
|
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
|
|
84
|
+
function nn({
|
|
85
85
|
renderText: r,
|
|
86
|
-
title:
|
|
87
|
-
logo:
|
|
88
|
-
items:
|
|
86
|
+
title: k,
|
|
87
|
+
logo: c,
|
|
88
|
+
items: $,
|
|
89
89
|
groups: m,
|
|
90
90
|
utilityItems: h,
|
|
91
|
-
isSticky:
|
|
92
|
-
showSearch:
|
|
93
|
-
showLocaleSelect:
|
|
94
|
-
showThemeToggle:
|
|
95
|
-
themeToggleComponent:
|
|
96
|
-
alignment:
|
|
97
|
-
variant:
|
|
98
|
-
navigationType:
|
|
99
|
-
searchComponent:
|
|
100
|
-
localeSelectComponent:
|
|
101
|
-
className:
|
|
102
|
-
style:
|
|
103
|
-
...
|
|
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 [
|
|
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
|
-
), [
|
|
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__ */
|
|
112
|
-
|
|
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__ */
|
|
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__ */
|
|
122
|
+
children: /* @__PURE__ */ a(Fe, { size: 16, "aria-hidden": "true" })
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
content:
|
|
125
|
+
content: ue
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
}
|
|
129
|
-
),
|
|
130
|
-
|
|
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__ */
|
|
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__ */
|
|
139
|
+
children: /* @__PURE__ */ a(We, { size: 16, "aria-hidden": "true" })
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
content:
|
|
142
|
+
content: me
|
|
143
143
|
}
|
|
144
|
-
) }) }),
|
|
145
|
-
|
|
146
|
-
}, []),
|
|
147
|
-
|
|
148
|
-
const l = !
|
|
149
|
-
return l || (I([]),
|
|
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
|
-
},
|
|
152
|
-
const l =
|
|
153
|
-
if (l &&
|
|
154
|
-
const
|
|
155
|
-
|
|
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
|
-
}, []),
|
|
158
|
-
|
|
159
|
-
}, []),
|
|
160
|
-
|
|
161
|
-
}, []),
|
|
162
|
-
|
|
163
|
-
}, [
|
|
164
|
-
|
|
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:
|
|
167
|
-
primary:
|
|
168
|
-
secondary:
|
|
166
|
+
title: n.title,
|
|
167
|
+
primary: n.primaryItems ?? [],
|
|
168
|
+
secondary: n.secondaryItems ?? [],
|
|
169
169
|
description: ""
|
|
170
170
|
}
|
|
171
171
|
]);
|
|
172
|
-
},
|
|
173
|
-
|
|
172
|
+
}, ie = (n) => {
|
|
173
|
+
O("forward"), I((l) => [
|
|
174
174
|
...l,
|
|
175
175
|
{
|
|
176
|
-
title:
|
|
177
|
-
primary:
|
|
176
|
+
title: n.label,
|
|
177
|
+
primary: n.sublinks ?? [],
|
|
178
178
|
secondary: [],
|
|
179
|
-
description:
|
|
179
|
+
description: n.description
|
|
180
180
|
}
|
|
181
181
|
]);
|
|
182
182
|
}, Me = () => {
|
|
183
|
-
|
|
183
|
+
O("backward"), I((n) => n.slice(0, -1));
|
|
184
184
|
};
|
|
185
|
-
|
|
185
|
+
U(() => {
|
|
186
186
|
if (typeof window > "u") return;
|
|
187
|
-
const
|
|
188
|
-
return
|
|
189
|
-
}, []),
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
|
|
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
|
-
}, [
|
|
194
|
+
}, [X, H, W]), U(() => {
|
|
195
195
|
if (!(typeof document > "u"))
|
|
196
|
-
return
|
|
197
|
-
}, [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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:
|
|
204
|
-
path:
|
|
227
|
+
link: s,
|
|
228
|
+
path: p,
|
|
205
229
|
parentPath: l,
|
|
206
|
-
openPath:
|
|
207
|
-
togglePath:
|
|
208
|
-
updateTriangleIndicator:
|
|
209
|
-
setOpenPath:
|
|
210
|
-
renderLinks:
|
|
211
|
-
buttonRefs:
|
|
230
|
+
openPath: Y,
|
|
231
|
+
togglePath: Ce,
|
|
232
|
+
updateTriangleIndicator: le,
|
|
233
|
+
setOpenPath: N,
|
|
234
|
+
renderLinks: D,
|
|
235
|
+
buttonRefs: q
|
|
212
236
|
},
|
|
213
|
-
|
|
237
|
+
p
|
|
214
238
|
);
|
|
215
|
-
}),
|
|
216
|
-
var
|
|
217
|
-
const
|
|
218
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
247
|
+
Z(s), N(o), le(o);
|
|
224
248
|
},
|
|
225
249
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ a("div", { className: e.linkItem, children: /* @__PURE__ */ t(
|
|
227
251
|
"button",
|
|
228
252
|
{
|
|
229
|
-
ref: (
|
|
230
|
-
|
|
253
|
+
ref: (i) => {
|
|
254
|
+
q.current.set(o, i);
|
|
231
255
|
},
|
|
232
256
|
"aria-haspopup": !0,
|
|
233
|
-
"aria-expanded":
|
|
234
|
-
"aria-controls": `submenu-${
|
|
235
|
-
className: `${e.sublinkToggle} ${
|
|
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__ */
|
|
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__ */
|
|
273
|
+
/* @__PURE__ */ a(
|
|
250
274
|
"div",
|
|
251
275
|
{
|
|
252
|
-
id: `submenu-${
|
|
253
|
-
className: `${e.sublinks} ${
|
|
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
|
-
|
|
281
|
+
Z(null), G(0), N(null);
|
|
258
282
|
},
|
|
259
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
288
|
+
/* @__PURE__ */ t(
|
|
265
289
|
"div",
|
|
266
290
|
{
|
|
267
291
|
className: `${e.sublinksColumn} ${e.primaryColumn}`,
|
|
268
292
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
(
|
|
271
|
-
(
|
|
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:
|
|
275
|
-
className: `${e.link} ${R ===
|
|
276
|
-
target:
|
|
277
|
-
rel:
|
|
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
|
|
280
|
-
|
|
303
|
+
var te;
|
|
304
|
+
N(null), (te = i.onClick) == null || te.call(i);
|
|
281
305
|
},
|
|
282
|
-
onMouseEnter: () =>
|
|
306
|
+
onMouseEnter: () => G(E),
|
|
283
307
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
|
|
289
|
-
|
|
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
|
-
) },
|
|
322
|
+
) }, i._key ?? E) : /* @__PURE__ */ a("div", { role: "menuitem", children: /* @__PURE__ */ a(
|
|
299
323
|
"button",
|
|
300
324
|
{
|
|
301
|
-
className: `${e.sublinkToggle} ${R ===
|
|
302
|
-
onMouseEnter: () =>
|
|
303
|
-
children: /* @__PURE__ */
|
|
304
|
-
|
|
305
|
-
|
|
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
|
-
) },
|
|
332
|
+
) }, i._key ?? E)
|
|
309
333
|
)
|
|
310
334
|
]
|
|
311
335
|
}
|
|
312
336
|
),
|
|
313
|
-
(
|
|
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
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
`${
|
|
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
|
-
`${
|
|
349
|
+
`${b.label}-${b.sublinks.length}`
|
|
326
350
|
),
|
|
327
|
-
l.secondaryItems && l.secondaryItems.length > 0 && /* @__PURE__ */
|
|
351
|
+
l.secondaryItems && l.secondaryItems.length > 0 && /* @__PURE__ */ a(
|
|
328
352
|
"div",
|
|
329
353
|
{
|
|
330
354
|
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
331
|
-
children:
|
|
355
|
+
children: D(l.secondaryItems, `${o}-secondary`)
|
|
332
356
|
}
|
|
333
357
|
),
|
|
334
|
-
l.spotlight && /* @__PURE__ */
|
|
358
|
+
l.spotlight && /* @__PURE__ */ a(
|
|
335
359
|
"div",
|
|
336
360
|
{
|
|
337
361
|
className: `${e.sublinksColumn} ${e.spotlightColumn}`,
|
|
338
|
-
children: /* @__PURE__ */
|
|
339
|
-
|
|
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-${
|
|
378
|
+
l._key ?? `group-${s}`
|
|
355
379
|
);
|
|
356
|
-
}),
|
|
380
|
+
}), Se = [
|
|
357
381
|
e.navbar,
|
|
358
|
-
je[
|
|
359
|
-
Ue[
|
|
360
|
-
|
|
382
|
+
je[j],
|
|
383
|
+
Ue[de],
|
|
384
|
+
z ? e.sticky : "",
|
|
361
385
|
m != null && m.length ? e.advanced : e.default,
|
|
362
|
-
|
|
363
|
-
].filter(Boolean).join(" "),
|
|
364
|
-
return /* @__PURE__ */
|
|
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:
|
|
368
|
-
className:
|
|
369
|
-
style:
|
|
391
|
+
ref: P,
|
|
392
|
+
className: Se,
|
|
393
|
+
style: fe,
|
|
370
394
|
"aria-label": "Site header",
|
|
371
|
-
...
|
|
372
|
-
children: /* @__PURE__ */
|
|
395
|
+
...be,
|
|
396
|
+
children: /* @__PURE__ */ t(
|
|
373
397
|
"div",
|
|
374
398
|
{
|
|
375
|
-
className: `${e.container} ${(!h || h.length === 0) &&
|
|
399
|
+
className: `${e.container} ${(!h || h.length === 0) && j !== "center" ? e.twoColumn : ""}`,
|
|
376
400
|
children: [
|
|
377
|
-
|
|
378
|
-
/* @__PURE__ */
|
|
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:
|
|
405
|
+
ref: y,
|
|
382
406
|
style: {
|
|
383
|
-
left:
|
|
407
|
+
left: j === "center" ? `calc(50% - ${pe / 2}px)` : "0"
|
|
384
408
|
},
|
|
385
|
-
|
|
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__ */
|
|
389
|
-
/* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ t("div", { className: e.navInner, children: [
|
|
414
|
+
/* @__PURE__ */ a(
|
|
390
415
|
"svg",
|
|
391
416
|
{
|
|
392
|
-
style: { left: `${
|
|
393
|
-
className: `${e.triangle} ${
|
|
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__ */
|
|
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
|
-
|
|
411
|
-
|
|
412
|
-
(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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 &&
|
|
418
|
-
m.length > 0 &&
|
|
419
|
-
(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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 &&
|
|
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} ${
|
|
428
|
-
children: /* @__PURE__ */
|
|
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(
|
|
433
|
-
children:
|
|
457
|
+
onClick: () => Ie(n),
|
|
458
|
+
children: n.title
|
|
434
459
|
}
|
|
435
460
|
)
|
|
436
461
|
},
|
|
437
|
-
|
|
462
|
+
n._key ?? l
|
|
438
463
|
)) }),
|
|
439
|
-
M &&
|
|
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__ */
|
|
469
|
+
/* @__PURE__ */ a(
|
|
445
470
|
"button",
|
|
446
471
|
{
|
|
447
472
|
className: e.back,
|
|
448
473
|
"aria-label": "Go back",
|
|
449
|
-
onClick:
|
|
450
|
-
children: /* @__PURE__ */
|
|
474
|
+
onClick: d.length === 1 ? Ee : Me,
|
|
475
|
+
children: /* @__PURE__ */ a(Ae, { size: 18, "aria-hidden": "true" })
|
|
451
476
|
}
|
|
452
477
|
),
|
|
453
|
-
|
|
478
|
+
d[d.length - 1].description && /* @__PURE__ */ a(
|
|
454
479
|
"div",
|
|
455
480
|
{
|
|
456
|
-
className: `${e.sublinksDescription} ${
|
|
481
|
+
className: `${e.sublinksDescription} ${B === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
457
482
|
children: r == null ? void 0 : r(
|
|
458
|
-
|
|
483
|
+
d[d.length - 1].description
|
|
459
484
|
)
|
|
460
485
|
}
|
|
461
486
|
),
|
|
462
|
-
|
|
487
|
+
d[d.length - 1].primary.map((n, l) => /* @__PURE__ */ a(
|
|
463
488
|
"div",
|
|
464
489
|
{
|
|
465
490
|
role: "menuitem",
|
|
466
|
-
className: `${e.mobileMenuItem} ${
|
|
467
|
-
children:
|
|
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: () =>
|
|
472
|
-
children: /* @__PURE__ */
|
|
473
|
-
|
|
474
|
-
|
|
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__ */
|
|
502
|
+
) : /* @__PURE__ */ t(
|
|
478
503
|
"a",
|
|
479
504
|
{
|
|
480
|
-
href:
|
|
505
|
+
href: n.href,
|
|
481
506
|
className: e.link,
|
|
482
|
-
target:
|
|
483
|
-
rel:
|
|
507
|
+
target: n.isExternal ? "_blank" : "_self",
|
|
508
|
+
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
484
509
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
|
|
487
|
-
|
|
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
|
-
|
|
490
|
-
|
|
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
|
-
|
|
526
|
+
n._key ?? `primary-${l}`
|
|
502
527
|
)),
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
(
|
|
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} ${
|
|
510
|
-
children:
|
|
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: () =>
|
|
515
|
-
children:
|
|
539
|
+
onClick: () => ie(n),
|
|
540
|
+
children: n.label
|
|
516
541
|
}
|
|
517
|
-
) : /* @__PURE__ */
|
|
542
|
+
) : /* @__PURE__ */ t(
|
|
518
543
|
"a",
|
|
519
544
|
{
|
|
520
|
-
href:
|
|
545
|
+
href: n.href,
|
|
521
546
|
className: e.link,
|
|
522
|
-
target:
|
|
523
|
-
rel:
|
|
547
|
+
target: n.isExternal ? "_blank" : "_self",
|
|
548
|
+
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
524
549
|
children: [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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
|
-
|
|
563
|
+
n._key ?? `secondary-${l}`
|
|
539
564
|
)
|
|
540
565
|
)
|
|
541
566
|
]
|
|
542
567
|
},
|
|
543
|
-
`stack-${
|
|
568
|
+
`stack-${d.length}`
|
|
544
569
|
)
|
|
545
570
|
] })
|
|
546
571
|
}
|
|
547
572
|
),
|
|
548
|
-
h && h.length > 0 && /* @__PURE__ */
|
|
549
|
-
|
|
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:
|
|
553
|
-
variant:
|
|
554
|
-
displayType:
|
|
555
|
-
imageSrc:
|
|
556
|
-
imageAlt:
|
|
557
|
-
"aria-label":
|
|
558
|
-
icon:
|
|
559
|
-
iconAlignment:
|
|
560
|
-
children:
|
|
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:
|
|
564
|
-
alt:
|
|
588
|
+
src: n.imageSrc,
|
|
589
|
+
alt: n.imageAlt ?? n.ariaLabel
|
|
565
590
|
}
|
|
566
|
-
) :
|
|
591
|
+
) : n.label
|
|
567
592
|
},
|
|
568
|
-
|
|
593
|
+
n._key ?? l
|
|
569
594
|
)) }) }),
|
|
570
|
-
|
|
595
|
+
u && /* @__PURE__ */ a(
|
|
571
596
|
"nav",
|
|
572
597
|
{
|
|
573
598
|
"aria-label": "Utility navigation",
|
|
574
|
-
className: `${e.utilityMobile} ${
|
|
575
|
-
children: /* @__PURE__ */
|
|
576
|
-
|
|
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:
|
|
580
|
-
variant:
|
|
581
|
-
displayType:
|
|
582
|
-
imageSrc:
|
|
583
|
-
imageAlt:
|
|
584
|
-
"aria-label":
|
|
585
|
-
icon:
|
|
586
|
-
iconAlignment:
|
|
587
|
-
children:
|
|
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:
|
|
591
|
-
alt:
|
|
615
|
+
src: u.imageSrc,
|
|
616
|
+
alt: u.imageAlt ?? u.ariaLabel
|
|
592
617
|
}
|
|
593
|
-
) :
|
|
618
|
+
) : u.label
|
|
594
619
|
}
|
|
595
620
|
) })
|
|
596
621
|
}
|
|
597
622
|
),
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
M &&
|
|
600
|
-
/* @__PURE__ */
|
|
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:
|
|
605
|
-
"aria-label":
|
|
606
|
-
"aria-expanded":
|
|
630
|
+
onClick: ae,
|
|
631
|
+
"aria-label": f ? "Close menu" : "Open menu",
|
|
632
|
+
"aria-expanded": f,
|
|
607
633
|
"aria-controls": "main-menu",
|
|
608
|
-
children:
|
|
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
|
-
|
|
645
|
+
nn as Navbar
|
|
620
646
|
};
|