@ilo-org/react 0.20.0 → 0.21.0

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.
Files changed (76) hide show
  1. package/lib/cjs/_store/{Breadcrumb-chunk-BGt10GMr.js → Breadcrumb-chunk-DkUvpxym.js} +1 -1
  2. package/lib/cjs/_store/{Breadcrumb-entry-BcWOPogy.js → Breadcrumb-entry-PID5wRYn.js} +1 -1
  3. package/lib/cjs/_store/CardGroup-chunk-C_EtI9iK.js +1 -0
  4. package/lib/cjs/_store/{Cards-entry-Ckiqvv1d.js → Cards-entry-C_9kqjEx.js} +1 -1
  5. package/lib/cjs/_store/ContextMenu-chunk-Dl3-wUCt.js +1 -0
  6. package/lib/cjs/_store/{ContextMenu-entry-UwZc4yU3.js → ContextMenu-entry-Bzzoi_xM.js} +1 -1
  7. package/lib/cjs/_store/{Hero-chunk-CBIMDQWO.js → Hero-chunk-B3vu8ihD.js} +1 -1
  8. package/lib/cjs/_store/{Hero-entry-CeEUu88o.js → Hero-entry-CAssbp0C.js} +1 -1
  9. package/lib/cjs/_store/LanguageToggle-chunk-CrtaBUlW.js +1 -0
  10. package/lib/cjs/_store/{LanguageToggle-entry-ALUfRa_V.js → LanguageToggle-entry-CHgP8iuU.js} +1 -1
  11. package/lib/cjs/_store/Nav-entry-BxYm9ulI.js +1 -0
  12. package/lib/cjs/_store/SubsiteNav-chunk-BphCnfvs.js +1 -0
  13. package/lib/cjs/_store/components-entry-BU_6L6id.js +1 -0
  14. package/lib/cjs/_store/index.js +1 -1
  15. package/lib/cjs/_store/useBreakpoint-chunk-CBEGGRKj.js +1 -0
  16. package/lib/cjs/index.js +1 -1
  17. package/lib/esm/_store/{Breadcrumb-chunk-DcsXzPvT.js → Breadcrumb-chunk-DcupgWDR.js} +1 -1
  18. package/lib/esm/_store/Breadcrumb-entry-1SOUCUgD.js +4 -0
  19. package/lib/esm/_store/CardGroup-chunk-BykGdrCT.js +425 -0
  20. package/lib/esm/_store/{Cards-entry-DOWpgXsU.js → Cards-entry-DjtBPvwt.js} +1 -1
  21. package/lib/esm/_store/ContextMenu-chunk-D-riZIFp.js +32 -0
  22. package/lib/esm/_store/ContextMenu-entry-BN-vEJes.js +4 -0
  23. package/lib/esm/_store/{Hero-chunk-CZ6kSiY-.js → Hero-chunk-C1gFHcIP.js} +1 -1
  24. package/lib/esm/_store/Hero-entry-DWpRL6uz.js +4 -0
  25. package/lib/esm/_store/LanguageToggle-chunk-CsayoJqR.js +70 -0
  26. package/lib/esm/_store/LanguageToggle-entry-D3t_X2Qk.js +4 -0
  27. package/lib/esm/_store/Nav-entry-CsQzrNK7.js +4 -0
  28. package/lib/esm/_store/SubsiteNav-chunk-C97AqH9F.js +549 -0
  29. package/lib/esm/_store/{components-entry-C4N0L4xP.js → components-entry-COAKlxYx.js} +28 -28
  30. package/lib/esm/_store/index.js +4 -2
  31. package/lib/esm/_store/useBreakpoint-chunk-DBZTYUx9.js +54 -0
  32. package/lib/esm/index.js +42 -40
  33. package/lib/styles/components/languagetoggle.css +1 -1
  34. package/lib/styles/components/video.css +1 -1
  35. package/lib/styles/global.css +1 -1
  36. package/lib/styles/global.css.map +1 -1
  37. package/lib/styles/index.css +2 -2
  38. package/lib/styles/index.css.map +1 -1
  39. package/lib/styles/monorepo.css +2 -2
  40. package/lib/styles/monorepo.css.map +1 -1
  41. package/lib/types/components/ContextMenu/ContextMenu.d.ts +4 -0
  42. package/lib/types/components/LanguageToggle/LanguageToggle.d.ts +2 -20
  43. package/lib/types/components/Nav/Navigation.props.d.ts +112 -0
  44. package/lib/types/components/Nav/NavigationDropdown.d.ts +19 -0
  45. package/lib/types/components/Nav/NavigationLink.d.ts +4 -0
  46. package/lib/types/components/Nav/NavigationMenu.d.ts +13 -0
  47. package/lib/types/components/Nav/NavigationMenuGrid.d.ts +7 -0
  48. package/lib/types/components/Nav/Subsite/CompactNav.d.ts +4 -0
  49. package/lib/types/components/Nav/Subsite/ComplexNav.d.ts +4 -0
  50. package/lib/types/components/Nav/Subsite/SubsiteNav.d.ts +4 -0
  51. package/lib/types/components/Nav/index.d.ts +2 -0
  52. package/lib/types/components/Nav/mobile/MobileDrawer.d.ts +27 -0
  53. package/lib/types/components/Nav/mobile/MobileLanguageList.d.ts +9 -0
  54. package/lib/types/components/Nav/mobile/MobileMenuList.d.ts +8 -0
  55. package/lib/types/components/Nav/mobile/MobileNavigation.d.ts +15 -0
  56. package/lib/types/components/Nav/useNavSetup.d.ts +22 -0
  57. package/lib/types/components/index.d.ts +1 -1
  58. package/lib/types/hooks/index.d.ts +1 -0
  59. package/lib/types/hooks/useBreakpoint.d.ts +7 -0
  60. package/package.json +7 -6
  61. package/lib/cjs/_store/CardGroup-chunk-D3sPRsTS.js +0 -1
  62. package/lib/cjs/_store/ContextMenu-chunk-Ch5u_T0d.js +0 -1
  63. package/lib/cjs/_store/LanguageToggle-chunk-DsJntngZ.js +0 -1
  64. package/lib/cjs/_store/LocalNav-entry-SfLDP8BS.js +0 -1
  65. package/lib/cjs/_store/components-entry-Buq0cts7.js +0 -1
  66. package/lib/esm/_store/Breadcrumb-entry-B7kN28qm.js +0 -4
  67. package/lib/esm/_store/CardGroup-chunk-DCTJOxvx.js +0 -425
  68. package/lib/esm/_store/ContextMenu-chunk-Zy9igFLz.js +0 -30
  69. package/lib/esm/_store/ContextMenu-entry-C_rAD9kF.js +0 -4
  70. package/lib/esm/_store/Hero-entry-DILGWuC0.js +0 -4
  71. package/lib/esm/_store/LanguageToggle-chunk-BxzhPBjU.js +0 -62
  72. package/lib/esm/_store/LanguageToggle-entry-COfb1a3N.js +0 -4
  73. package/lib/esm/_store/LocalNav-entry-DydB3k67.js +0 -4
  74. package/lib/types/components/LocalNav/LocalNav.d.ts +0 -5
  75. package/lib/types/components/LocalNav/LocalNav.props.d.ts +0 -38
  76. package/lib/types/components/LocalNav/index.d.ts +0 -1
@@ -0,0 +1,32 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as i, useId as u } from "react";
3
+ import { c as a } from "./index-chunk-0LeqwHm8.js";
4
+ import { u as d } from "./useGlobalSettings-chunk-gkijV3S1.js";
5
+ import { createPortal as f } from "react-dom";
6
+ const h = i(
7
+ ({ className: n, links: r, withPortal: m = !1 }, c) => {
8
+ const { prefix: t } = d(), l = u(), s = /* @__PURE__ */ o(
9
+ "ol",
10
+ {
11
+ className: a(`${t}--context-menu`, n),
12
+ id: `${t}--context-menu-${l}`,
13
+ ref: c,
14
+ children: r.map((e) => /* @__PURE__ */ o(
15
+ "li",
16
+ {
17
+ className: a(`${t}--context-menu--item`, {
18
+ endsection: e.endsection,
19
+ className: e.className
20
+ }),
21
+ children: /* @__PURE__ */ o("a", { href: e.url, className: `${t}--context-menu--link`, children: /* @__PURE__ */ o("span", { className: `${t}--context-menu--label`, children: e.label }) })
22
+ },
23
+ `${e.label}-${e.url}`
24
+ ))
25
+ }
26
+ );
27
+ return m ? f(s, document.body) : s;
28
+ }
29
+ );
30
+ export {
31
+ h as C
32
+ };
@@ -0,0 +1,4 @@
1
+ import { C as t } from "./ContextMenu-chunk-D-riZIFp.js";
2
+ export {
3
+ t as ContextMenu
4
+ };
@@ -2,7 +2,7 @@ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as N, useMemo as v } from "react";
3
3
  import { c as k } from "./index-chunk-0LeqwHm8.js";
4
4
  import { u as x } from "./useGlobalSettings-chunk-gkijV3S1.js";
5
- import { B as w } from "./Breadcrumb-chunk-DcsXzPvT.js";
5
+ import { B as w } from "./Breadcrumb-chunk-DcupgWDR.js";
6
6
  import { T as H } from "./Tooltip-chunk-EJOnwIYn.js";
7
7
  import { H as j } from "./HeroCard-chunk-3mxIZYwU.js";
8
8
  const I = N(
@@ -0,0 +1,4 @@
1
+ import { H as e } from "./Hero-chunk-C1gFHcIP.js";
2
+ export {
3
+ e as Hero
4
+ };
@@ -0,0 +1,70 @@
1
+ import { jsxs as i, jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as R, useState as _, useRef as l, useLayoutEffect as m } from "react";
3
+ import { u as w } from "./useGlobalSettings-chunk-gkijV3S1.js";
4
+ import { c as f } from "./index-chunk-0LeqwHm8.js";
5
+ import { C as N } from "./ContextMenu-chunk-D-riZIFp.js";
6
+ const y = R(
7
+ ({ className: d, language: p, theme: g = "light", hideIcon: x, options: a, ...$ }, h) => {
8
+ const { prefix: C } = w(), [n, u] = _(!1), o = l(null), t = l(null), e = `${C}--language-toggle`;
9
+ return m(() => {
10
+ function r(s) {
11
+ !t.current || !o.current || !t.current.contains(s.target) && !o.current.contains(s.target) && u(!1);
12
+ }
13
+ return document.addEventListener("mousedown", r), () => {
14
+ document.removeEventListener("mousedown", r);
15
+ };
16
+ }), m(() => {
17
+ if (!(!o.current || !t.current) && n) {
18
+ const r = o.current.getBoundingClientRect(), s = t.current.getBoundingClientRect();
19
+ t.current.style.left = `${r.left + (r.width - s.width) / 2}px`, t.current.style.top = `${r.bottom}px`;
20
+ }
21
+ }, [n]), /* @__PURE__ */ i(
22
+ "div",
23
+ {
24
+ ref: h,
25
+ className: f(
26
+ e,
27
+ d,
28
+ `${e}__theme__${g}`,
29
+ {
30
+ [`${e}__open`]: n
31
+ }
32
+ ),
33
+ ...$,
34
+ children: [
35
+ /* @__PURE__ */ i(
36
+ "button",
37
+ {
38
+ className: `${e}--container`,
39
+ ref: o,
40
+ onClick: () => {
41
+ u(!n);
42
+ },
43
+ "aria-controls": `${e}--context-menu`,
44
+ "aria-expanded": n,
45
+ children: [
46
+ !x && /* @__PURE__ */ c("span", { className: `${e}--icon` }),
47
+ /* @__PURE__ */ c("span", { className: `${e}--action`, children: p }),
48
+ /* @__PURE__ */ c("span", { className: `${e}--arrow` })
49
+ ]
50
+ }
51
+ ),
52
+ a && /* @__PURE__ */ c(
53
+ N,
54
+ {
55
+ withPortal: !0,
56
+ ref: t,
57
+ links: a,
58
+ className: f(`${e}--context-menu`, {
59
+ [`${e}--context-menu__open`]: n
60
+ })
61
+ }
62
+ )
63
+ ]
64
+ }
65
+ );
66
+ }
67
+ );
68
+ export {
69
+ y as L
70
+ };
@@ -0,0 +1,4 @@
1
+ import { L as e } from "./LanguageToggle-chunk-CsayoJqR.js";
2
+ export {
3
+ e as LanguageToggle
4
+ };
@@ -0,0 +1,4 @@
1
+ import { S as o } from "./SubsiteNav-chunk-C97AqH9F.js";
2
+ export {
3
+ o as SubsiteNav
4
+ };
@@ -0,0 +1,549 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { memo as j, useRef as L, useCallback as S, useEffect as z, useId as G, useState as C, forwardRef as I, useImperativeHandle as A } from "react";
3
+ import { u as $ } from "./useGlobalSettings-chunk-gkijV3S1.js";
4
+ import { createPortal as B } from "react-dom";
5
+ import { c as d } from "./index-chunk-0LeqwHm8.js";
6
+ import { L as D } from "./LanguageToggle-chunk-CsayoJqR.js";
7
+ import { u as H } from "./useBreakpoint-chunk-DBZTYUx9.js";
8
+ const q = ({
9
+ isOpen: s,
10
+ className: r,
11
+ navRef: c,
12
+ children: n
13
+ }) => {
14
+ const { prefix: a } = $(), m = L(null), _ = `${a}--nav-dropdown`, u = S(() => {
15
+ if (!(m != null && m.current) || !(c != null && c.current))
16
+ return;
17
+ const i = c.current.getBoundingClientRect();
18
+ m.current.style.top = `${i.bottom}px`, m.current.style.width = `${i.width}px`;
19
+ }, [c]);
20
+ return z(() => (u(), window.addEventListener("resize", u), () => {
21
+ window.removeEventListener("resize", u);
22
+ }), [c]), B(
23
+ /* @__PURE__ */ e(
24
+ "div",
25
+ {
26
+ ref: m,
27
+ className: d({
28
+ [_]: !0,
29
+ [`${_}--open`]: s,
30
+ className: r
31
+ }),
32
+ children: /* @__PURE__ */ e("div", { className: `${_}__container`, children: n })
33
+ }
34
+ ),
35
+ document.body
36
+ );
37
+ }, P = j(q), v = (s) => {
38
+ const { label: r, component: c, isActive: n, ...a } = s;
39
+ return c ? /* @__PURE__ */ e(c, { ...a, isActive: n, children: r }) : /* @__PURE__ */ e("a", { ...a, children: r });
40
+ }, y = ({ menu: s }) => {
41
+ const { prefix: r } = $(), c = `${r}--nav-menu-grid`, n = [];
42
+ for (let a = 0; a < s.length; a += 5)
43
+ n.push(s.slice(a, a + 5));
44
+ return /* @__PURE__ */ e("div", { className: c, children: n.map((a, m) => /* @__PURE__ */ e("div", { className: `${c}__column`, children: a.map((_) => {
45
+ var u;
46
+ return /* @__PURE__ */ e(
47
+ v,
48
+ {
49
+ className: `${c}__item`,
50
+ href: _.href,
51
+ label: _.label
52
+ },
53
+ (u = _.label) == null ? void 0 : u.toString()
54
+ );
55
+ }) }, m)) });
56
+ }, x = ({
57
+ menu: s
58
+ }) => {
59
+ const { prefix: r } = $(), c = `${r}--nav-mobile-menu`;
60
+ return /* @__PURE__ */ e("ul", { className: `${c}`, children: s.map((n, a) => /* @__PURE__ */ o("li", { className: `${c}__item`, children: [
61
+ /* @__PURE__ */ e(
62
+ v,
63
+ {
64
+ label: n.label,
65
+ href: n.href,
66
+ className: `${c}__link`
67
+ }
68
+ ),
69
+ n.isActive && /* @__PURE__ */ e("span", { className: `${c}__marked` })
70
+ ] }, a)) });
71
+ }, M = ({
72
+ isOpen: s,
73
+ onClose: r,
74
+ header: c,
75
+ widgets: n,
76
+ children: a,
77
+ className: m
78
+ }) => {
79
+ const { prefix: _ } = $(), u = G(), i = `${_}--nav-mobile-drawer`;
80
+ return B(
81
+ /* @__PURE__ */ o(
82
+ "div",
83
+ {
84
+ id: `${i}__${u}`,
85
+ className: d(i, m, {
86
+ [`${i}--open`]: s
87
+ }),
88
+ children: [
89
+ /* @__PURE__ */ o("div", { className: `${i}__header`, children: [
90
+ /* @__PURE__ */ e("div", { className: `${i}__header-main`, children: c }),
91
+ /* @__PURE__ */ e(
92
+ "button",
93
+ {
94
+ className: `${i}__header-close`,
95
+ onClick: r,
96
+ "aria-label": "Close navigation",
97
+ children: /* @__PURE__ */ e("span", { className: `${i}__header-close__icon` })
98
+ }
99
+ )
100
+ ] }),
101
+ /* @__PURE__ */ o("div", { className: `${i}__container`, children: [
102
+ /* @__PURE__ */ e("div", { className: `${i}__widgets`, children: n }),
103
+ a
104
+ ] })
105
+ ]
106
+ }
107
+ ),
108
+ document.body
109
+ );
110
+ }, F = ({
111
+ options: s,
112
+ selected: r
113
+ }) => {
114
+ const c = (s == null ? void 0 : s.map((a) => ({
115
+ label: a.label,
116
+ href: a.url
117
+ }))) || [], n = [{ label: r, href: "#", isActive: !0 }, ...c];
118
+ return /* @__PURE__ */ e(x, { menu: n });
119
+ }, T = ({
120
+ isOpen: s,
121
+ navigationProps: {
122
+ branding: r,
123
+ menu: { items: c, labels: n },
124
+ widgets: a
125
+ },
126
+ onClose: m
127
+ }) => {
128
+ var f, k, O;
129
+ const { prefix: _ } = $(), [u, i] = C(!1), [b, h] = C(!1), p = S(() => {
130
+ i(!1), h(!1);
131
+ }, []), t = `${_}--nav-mobile`, N = u || b, l = c.slice(0, 5), g = c.slice(5);
132
+ return /* @__PURE__ */ o(
133
+ M,
134
+ {
135
+ isOpen: s,
136
+ onClose: m,
137
+ header: /* @__PURE__ */ o("div", { className: `${t}__branding`, children: [
138
+ /* @__PURE__ */ e("div", { className: `${t}__logo`, children: r.logo.drawer || r.logo.main }),
139
+ /* @__PURE__ */ e("h3", { className: `${t}__name`, children: r.name })
140
+ ] }),
141
+ widgets: /* @__PURE__ */ o("div", { className: `${t}__widgets`, children: [
142
+ (a == null ? void 0 : a.search) && /* @__PURE__ */ o(
143
+ "a",
144
+ {
145
+ className: `${t}__widgets-search`,
146
+ href: a.search.url,
147
+ "aria-label": "Search",
148
+ children: [
149
+ /* @__PURE__ */ e("span", { className: `${t}__widgets-search__label`, children: a.search.label }),
150
+ /* @__PURE__ */ e("span", { className: `${t}__widgets-search__icon` })
151
+ ]
152
+ }
153
+ ),
154
+ (a == null ? void 0 : a.link) && /* @__PURE__ */ e(
155
+ v,
156
+ {
157
+ className: `${t}__widgets-link`,
158
+ href: a.link.href,
159
+ "aria-label": a.link.label,
160
+ label: a.link.label
161
+ }
162
+ ),
163
+ (a == null ? void 0 : a.language) && /* @__PURE__ */ o(
164
+ "button",
165
+ {
166
+ className: `${t}__widgets-language`,
167
+ onClick: () => h(!0),
168
+ "aria-expanded": b,
169
+ "aria-controls": "language-list",
170
+ "aria-label": "Select language",
171
+ children: [
172
+ /* @__PURE__ */ o("span", { className: `${t}__widgets-language__label`, children: [
173
+ a.language.label,
174
+ ": ",
175
+ a.language.language
176
+ ] }),
177
+ /* @__PURE__ */ e("span", { className: `${t}__widgets-language__icon` })
178
+ ]
179
+ }
180
+ )
181
+ ] }),
182
+ children: [
183
+ /* @__PURE__ */ e(x, { menu: l }),
184
+ /* @__PURE__ */ o(
185
+ "button",
186
+ {
187
+ className: `${t}__more`,
188
+ onClick: () => i(!0),
189
+ "aria-expanded": u,
190
+ "aria-controls": "more-items",
191
+ "aria-label": "More items",
192
+ children: [
193
+ n.more,
194
+ /* @__PURE__ */ e("span", { className: `${t}__more__icon` })
195
+ ]
196
+ }
197
+ ),
198
+ /* @__PURE__ */ e(
199
+ M,
200
+ {
201
+ className: `${t}__nested`,
202
+ header: /* @__PURE__ */ o(
203
+ "button",
204
+ {
205
+ className: `${t}__nested__header`,
206
+ onClick: p,
207
+ "aria-label": "Back to menu",
208
+ children: [
209
+ /* @__PURE__ */ e("span", { className: `${t}__nested__header__icon` }),
210
+ n.backToMenu
211
+ ]
212
+ }
213
+ ),
214
+ widgets: /* @__PURE__ */ e("span", { className: `${t}__nested__title`, children: u ? n.more : (f = a == null ? void 0 : a.language) == null ? void 0 : f.label }),
215
+ isOpen: N,
216
+ onClose: p,
217
+ "aria-modal": "true",
218
+ children: u ? /* @__PURE__ */ e(x, { menu: g, id: "more-items" }) : /* @__PURE__ */ e(
219
+ F,
220
+ {
221
+ selected: ((k = a == null ? void 0 : a.language) == null ? void 0 : k.language) || "",
222
+ options: (O = a == null ? void 0 : a.language) == null ? void 0 : O.options,
223
+ id: "language-list"
224
+ }
225
+ )
226
+ }
227
+ )
228
+ ]
229
+ }
230
+ );
231
+ };
232
+ function E({ menu: s, split: r }) {
233
+ const { breakpoint: c } = H(), [n, a] = C(!1), [m, _] = C(!1), u = L(null), i = ["xl", "xxl"].includes(c || "md"), b = i ? r.desktop : r.mobile, h = s.slice(0, b), p = s.slice(b);
234
+ return {
235
+ menu: { facade: h, more: p },
236
+ more: [n, a],
237
+ mobile: [m, _],
238
+ isDesktop: i,
239
+ ref: u
240
+ };
241
+ }
242
+ const X = ({ className: s, menu: r, more: c }) => {
243
+ const { prefix: n } = $(), a = `${n}--nav-menu`;
244
+ return /* @__PURE__ */ o("div", { className: d(a, s), children: [
245
+ /* @__PURE__ */ e("ul", { className: `${a}__list`, children: r.map((m) => {
246
+ var _;
247
+ return /* @__PURE__ */ e("li", { className: `${a}__item`, children: /* @__PURE__ */ e(
248
+ v,
249
+ {
250
+ ...m,
251
+ className: d({
252
+ [`${a}__link`]: !0,
253
+ [`${a}__link--active`]: m.isActive,
254
+ [m.className || ""]: m.className
255
+ })
256
+ }
257
+ ) }, (_ = m.label) == null ? void 0 : _.toString());
258
+ }) }),
259
+ c && /* @__PURE__ */ o(
260
+ "button",
261
+ {
262
+ onClick: c.onClick,
263
+ className: d({
264
+ [`${a}__more`]: !0,
265
+ [`${a}__more--open`]: c.isOpen
266
+ }),
267
+ "aria-expanded": c.isOpen,
268
+ "aria-haspopup": "menu",
269
+ children: [
270
+ c.label,
271
+ /* @__PURE__ */ e("span", { className: `${a}__more-icon` })
272
+ ]
273
+ }
274
+ )
275
+ ] });
276
+ }, J = I(
277
+ ({
278
+ props: {
279
+ branding: s,
280
+ menu: { items: r, labels: c },
281
+ widgets: n
282
+ }
283
+ }, a) => {
284
+ const { prefix: m } = $(), {
285
+ menu: { facade: _, more: u },
286
+ more: [i, b],
287
+ mobile: [h, p],
288
+ isDesktop: t,
289
+ ref: N
290
+ } = E({ menu: r, split: { desktop: 4, mobile: 2 } });
291
+ A(a, () => N.current);
292
+ const l = `${m}--subsite-nav-compact`;
293
+ return /* @__PURE__ */ o("header", { ref: N, className: l, children: [
294
+ /* @__PURE__ */ o("div", { className: `${l}__container`, children: [
295
+ /* @__PURE__ */ o("nav", { className: `${l}__nav`, children: [
296
+ /* @__PURE__ */ o(
297
+ "div",
298
+ {
299
+ className: `${l}__branding`,
300
+ onClick: s == null ? void 0 : s.onClick,
301
+ role: "button",
302
+ "aria-label": "Branding",
303
+ tabIndex: 0,
304
+ children: [
305
+ /* @__PURE__ */ e("div", { className: `${l}__branding-logo`, children: s.logo.main }),
306
+ /* @__PURE__ */ e("h3", { className: `${l}__branding-name`, children: s.name })
307
+ ]
308
+ }
309
+ ),
310
+ /* @__PURE__ */ e(
311
+ X,
312
+ {
313
+ className: `${l}__menu`,
314
+ menu: _,
315
+ more: {
316
+ label: c.more,
317
+ onClick: () => b(!i),
318
+ isOpen: i
319
+ }
320
+ }
321
+ )
322
+ ] }),
323
+ n && /* @__PURE__ */ o("div", { className: `${l}__widget-bar`, children: [
324
+ /* @__PURE__ */ e("span", { className: `${l}__widget-bar-corner` }),
325
+ /* @__PURE__ */ o("div", { className: `${l}__widget-bar-content`, children: [
326
+ n.link && /* @__PURE__ */ e(
327
+ v,
328
+ {
329
+ className: `${l}__widget-bar-link`,
330
+ href: n.link.href,
331
+ label: n.link.label
332
+ }
333
+ ),
334
+ n.language && /* @__PURE__ */ e("div", { className: `${l}__widget-bar-language`, children: /* @__PURE__ */ e(
335
+ D,
336
+ {
337
+ theme: "dark",
338
+ ...n.language,
339
+ hideIcon: !t
340
+ }
341
+ ) }),
342
+ n.search && /* @__PURE__ */ e(
343
+ v,
344
+ {
345
+ href: n.search.url,
346
+ className: `${l}__widget-bar-search`,
347
+ label: "",
348
+ "aria-label": n.search.label
349
+ }
350
+ )
351
+ ] })
352
+ ] }),
353
+ /* @__PURE__ */ e(
354
+ "button",
355
+ {
356
+ className: `${l}__burger`,
357
+ "aria-label": "Toggle navigation",
358
+ "aria-expanded": h,
359
+ onClick: () => p(!h),
360
+ children: /* @__PURE__ */ e("span", { className: `${l}__burger-icon` })
361
+ }
362
+ )
363
+ ] }),
364
+ /* @__PURE__ */ e(P, { isOpen: i, navRef: N, children: /* @__PURE__ */ e(y, { menu: u }) }),
365
+ /* @__PURE__ */ e(
366
+ T,
367
+ {
368
+ isOpen: h,
369
+ onClose: () => {
370
+ p(!1);
371
+ },
372
+ navigationProps: {
373
+ widgets: n,
374
+ branding: s,
375
+ menu: {
376
+ items: r,
377
+ labels: c
378
+ }
379
+ }
380
+ }
381
+ )
382
+ ] });
383
+ }
384
+ ), K = I(
385
+ ({
386
+ props: {
387
+ branding: s,
388
+ menu: { items: r, labels: c },
389
+ widgets: n
390
+ }
391
+ }, a) => {
392
+ var g, f, k;
393
+ const { prefix: m } = $(), {
394
+ menu: { facade: _, more: u },
395
+ more: [i, b],
396
+ mobile: [h, p],
397
+ isDesktop: t,
398
+ ref: N
399
+ } = E({ menu: r, split: { desktop: 6, mobile: 5 } });
400
+ A(a, () => N.current);
401
+ const l = `${m}--subsite-nav-complex`;
402
+ return /* @__PURE__ */ o("header", { ref: N, className: l, children: [
403
+ /* @__PURE__ */ e("div", { className: d(`${l}-bg--light`), children: /* @__PURE__ */ o(
404
+ "div",
405
+ {
406
+ className: d(
407
+ `${l}__widgets`,
408
+ `${l}__container`
409
+ ),
410
+ children: [
411
+ /* @__PURE__ */ e("span", { className: `${l}__widgets-bar-corner` }),
412
+ /* @__PURE__ */ o("span", { className: `${l}__widgets-bar`, children: [
413
+ (n == null ? void 0 : n.link) && /* @__PURE__ */ e(
414
+ v,
415
+ {
416
+ href: n.link.href,
417
+ label: n.link.label,
418
+ className: `${l}__widgets-bar__link`
419
+ }
420
+ ),
421
+ (n == null ? void 0 : n.language) && /* @__PURE__ */ e(
422
+ D,
423
+ {
424
+ className: `${l}__widgets-bar__language`,
425
+ ...n.language,
426
+ hideIcon: !t
427
+ }
428
+ )
429
+ ] })
430
+ ]
431
+ }
432
+ ) }),
433
+ /* @__PURE__ */ e("div", { className: d(`${l}-bg--light`), children: /* @__PURE__ */ o(
434
+ "div",
435
+ {
436
+ className: d(
437
+ `${l}__branding`,
438
+ `${l}__container`
439
+ ),
440
+ children: [
441
+ /* @__PURE__ */ o("div", { className: `${l}__branding-main`, children: [
442
+ /* @__PURE__ */ e(
443
+ "div",
444
+ {
445
+ className: `${l}__branding-main__logo`,
446
+ onClick: s == null ? void 0 : s.onClick,
447
+ role: "button",
448
+ "aria-label": "Branding",
449
+ tabIndex: 0,
450
+ children: s.logo.main
451
+ }
452
+ ),
453
+ /* @__PURE__ */ e("h3", { className: `${l}__branding-main__name`, children: s.name })
454
+ ] }),
455
+ /* @__PURE__ */ o("div", { className: `${l}__branding-tag`, children: [
456
+ /* @__PURE__ */ e("h4", { className: `${l}__branding-tag__main`, children: (g = s.tag) == null ? void 0 : g.main }),
457
+ ((f = s.tag) == null ? void 0 : f.sub) && /* @__PURE__ */ e("span", { className: `${l}__branding-tag__sub`, children: (k = s.tag) == null ? void 0 : k.sub })
458
+ ] })
459
+ ]
460
+ }
461
+ ) }),
462
+ /* @__PURE__ */ e("div", { className: d(`${l}-bg--dark`), children: /* @__PURE__ */ o(
463
+ "nav",
464
+ {
465
+ className: d(
466
+ `${l}__nav`,
467
+ `${l}__container`
468
+ ),
469
+ children: [
470
+ /* @__PURE__ */ o("div", { className: `${l}__nav-mobile`, children: [
471
+ /* @__PURE__ */ e(
472
+ "div",
473
+ {
474
+ className: `${l}__nav-mobile__logo`,
475
+ onClick: s == null ? void 0 : s.onClick,
476
+ role: "button",
477
+ "aria-label": "Branding",
478
+ tabIndex: 0,
479
+ children: s.logo.mobile
480
+ }
481
+ ),
482
+ /* @__PURE__ */ e("h3", { className: `${l}__nav-mobile__name`, children: s.name })
483
+ ] }),
484
+ /* @__PURE__ */ e(
485
+ X,
486
+ {
487
+ className: `${l}__nav-menu`,
488
+ menu: _,
489
+ more: {
490
+ label: c.more,
491
+ onClick: () => b(!i),
492
+ isOpen: i
493
+ }
494
+ }
495
+ ),
496
+ (n == null ? void 0 : n.search) && /* @__PURE__ */ e(
497
+ "a",
498
+ {
499
+ className: `${l}__nav-search`,
500
+ href: n.search.url,
501
+ "aria-label": n.search.label,
502
+ children: /* @__PURE__ */ e("span", { className: `${l}__nav-search__icon` })
503
+ }
504
+ ),
505
+ /* @__PURE__ */ e(
506
+ "button",
507
+ {
508
+ className: `${l}__nav-burger`,
509
+ "aria-label": "Toggle navigation",
510
+ "aria-expanded": h,
511
+ onClick: () => p(!h),
512
+ children: /* @__PURE__ */ e("span", { className: `${l}__nav-burger__icon` })
513
+ }
514
+ )
515
+ ]
516
+ }
517
+ ) }),
518
+ /* @__PURE__ */ e(P, { isOpen: i, navRef: N, children: /* @__PURE__ */ e(y, { menu: u }) }),
519
+ /* @__PURE__ */ e(
520
+ T,
521
+ {
522
+ isOpen: h,
523
+ onClose: () => {
524
+ p(!1);
525
+ },
526
+ navigationProps: {
527
+ widgets: n,
528
+ branding: s,
529
+ menu: {
530
+ items: r,
531
+ labels: c
532
+ }
533
+ }
534
+ }
535
+ )
536
+ ] });
537
+ }
538
+ ), Q = {
539
+ complex: K,
540
+ compact: J
541
+ }, ee = I(
542
+ ({ type: s = "compact", props: r }, c) => {
543
+ const n = Q[s];
544
+ return /* @__PURE__ */ e(n, { ref: c, props: r });
545
+ }
546
+ );
547
+ export {
548
+ ee as S
549
+ };