@devslab/site-kit 0.29.2 → 0.31.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 (45) hide show
  1. package/README.ko.md +65 -1
  2. package/README.md +69 -1
  3. package/dist/react/chrome.d.ts +66 -0
  4. package/dist/react/chrome.d.ts.map +1 -0
  5. package/dist/react/chunks/flag-bodies.js +84 -0
  6. package/dist/react/chunks/flag-bodies.js.map +1 -0
  7. package/dist/react/consent.d.ts +15 -0
  8. package/dist/react/consent.d.ts.map +1 -0
  9. package/dist/react/flag-bodies.d.ts +21 -0
  10. package/dist/react/flag-bodies.d.ts.map +1 -0
  11. package/dist/react/flag-bodies.js +6 -0
  12. package/dist/react/flag-bodies.js.map +1 -0
  13. package/dist/react/flag-bodies.server.d.ts +4 -0
  14. package/dist/react/flag-bodies.server.d.ts.map +1 -0
  15. package/dist/react/flag-bodies.server.js +7 -0
  16. package/dist/react/flag-bodies.server.js.map +1 -0
  17. package/dist/react/index.d.ts +29 -0
  18. package/dist/react/index.d.ts.map +1 -0
  19. package/dist/react/index.js +817 -0
  20. package/dist/react/index.js.map +1 -0
  21. package/dist/react/layouts.d.ts +51 -0
  22. package/dist/react/layouts.d.ts.map +1 -0
  23. package/dist/react/locale-menu.d.ts +24 -0
  24. package/dist/react/locale-menu.d.ts.map +1 -0
  25. package/dist/react/locale-state.d.ts +10 -0
  26. package/dist/react/locale-state.d.ts.map +1 -0
  27. package/dist/react/oss-product-mark.d.ts +9 -0
  28. package/dist/react/oss-product-mark.d.ts.map +1 -0
  29. package/dist/react/primitives.d.ts +18 -0
  30. package/dist/react/primitives.d.ts.map +1 -0
  31. package/dist/react/sections.d.ts +63 -0
  32. package/dist/react/sections.d.ts.map +1 -0
  33. package/dist/react/types.d.ts +82 -0
  34. package/dist/react/types.d.ts.map +1 -0
  35. package/dist/solid.js.map +1 -1
  36. package/dist/solid.server.js.map +1 -1
  37. package/fonts/manifest.json +7 -1
  38. package/fonts/pretendard/PretendardVariable.woff2 +0 -0
  39. package/fonts-atomic.css +116 -0
  40. package/package.json +48 -13
  41. package/src/core/fonts.d.mts +5 -0
  42. package/src/core/fonts.mjs +5 -0
  43. package/src/core/locales.d.mts +10 -0
  44. package/src/core/locales.mjs +18 -0
  45. package/styles.css +4 -0
@@ -0,0 +1,817 @@
1
+ "use client";
2
+ import { Fragment as e, useEffect as t, useId as n, useRef as r, useState as i } from "react";
3
+ import { flagBodiesNow as a, loadFlagBodies as o } from "@devslab/site-kit/react/flag-bodies";
4
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
+ import { directionPolicy as l, icons as u } from "@devslab/dds-icons";
6
+ //#region src/core/locales.mjs
7
+ var d = Object.freeze([
8
+ {
9
+ code: "ko",
10
+ language: "Korean",
11
+ nativeName: "한국어",
12
+ dir: "ltr"
13
+ },
14
+ {
15
+ code: "en",
16
+ language: "English",
17
+ nativeName: "English",
18
+ dir: "ltr"
19
+ },
20
+ {
21
+ code: "ja",
22
+ language: "Japanese",
23
+ nativeName: "日本語",
24
+ dir: "ltr"
25
+ },
26
+ {
27
+ code: "zh-HK",
28
+ language: "Chinese (Hong Kong)",
29
+ nativeName: "繁體中文(香港)",
30
+ dir: "ltr"
31
+ },
32
+ {
33
+ code: "zh-TW",
34
+ language: "Chinese (Taiwan)",
35
+ nativeName: "繁體中文(台灣)",
36
+ dir: "ltr"
37
+ },
38
+ {
39
+ code: "hi",
40
+ language: "Hindi",
41
+ nativeName: "हिन्दी",
42
+ dir: "ltr"
43
+ },
44
+ {
45
+ code: "vi",
46
+ language: "Vietnamese",
47
+ nativeName: "Tiếng Việt",
48
+ dir: "ltr"
49
+ },
50
+ {
51
+ code: "id",
52
+ language: "Indonesian",
53
+ nativeName: "Bahasa Indonesia",
54
+ dir: "ltr"
55
+ },
56
+ {
57
+ code: "th",
58
+ language: "Thai",
59
+ nativeName: "ไทย",
60
+ dir: "ltr"
61
+ },
62
+ {
63
+ code: "pt-BR",
64
+ language: "Portuguese (Brazil)",
65
+ nativeName: "Português (Brasil)",
66
+ dir: "ltr"
67
+ },
68
+ {
69
+ code: "fr",
70
+ language: "French",
71
+ nativeName: "Français",
72
+ dir: "ltr"
73
+ },
74
+ {
75
+ code: "de",
76
+ language: "German",
77
+ nativeName: "Deutsch",
78
+ dir: "ltr"
79
+ },
80
+ {
81
+ code: "es",
82
+ language: "Spanish",
83
+ nativeName: "Español",
84
+ dir: "ltr"
85
+ },
86
+ {
87
+ code: "ar",
88
+ language: "Arabic",
89
+ nativeName: "العربية",
90
+ dir: "rtl"
91
+ }
92
+ ]), f = Object.freeze([["zh", "zh-TW"], ["pt", "pt-BR"]]);
93
+ function p(e = {}) {
94
+ let t = e.extra ?? [], n = d;
95
+ if (e.only !== void 0) {
96
+ if (e.only.length === 0) throw RangeError("`only` needs at least one locale — a registry with none is a bug, not a choice");
97
+ let t = new Set(e.only);
98
+ for (let e of t) if (!d.some((t) => t.code === e)) throw RangeError(`${e} is not a family locale — \`only\` selects from the family list; use \`extra\` for a product's own`);
99
+ n = Object.freeze(d.filter((e) => t.has(e.code)));
100
+ }
101
+ let r = new Set(n.map(({ code: e }) => e));
102
+ for (let e of t) {
103
+ if (!e?.code) throw TypeError("every extra locale needs a code");
104
+ if (d.some((t) => t.code === e.code)) throw RangeError(`${e.code} is already a family locale — remove it from \`extra\``);
105
+ if (r.has(e.code)) throw RangeError(`${e.code} appears twice in \`extra\``);
106
+ if (!e.nativeName) throw TypeError(`${e.code} needs a nativeName — it is what the picker shows`);
107
+ if (e.dir !== "ltr" && e.dir !== "rtl") throw RangeError(`${e.code} needs dir "ltr" or "rtl"`);
108
+ r.add(e.code);
109
+ }
110
+ let i = Object.freeze([...n, ...t.map((e) => Object.freeze({ ...e }))]), a = new Map(i.map((e) => [e.code.toLowerCase(), e])), o = new Map([...f, ...e.aliases ?? []]);
111
+ function s(e) {
112
+ if (!e) return;
113
+ let t = a.get(String(e).trim().toLowerCase());
114
+ if (t) return t.code;
115
+ let n = String(e).trim().toLowerCase().split("-")[0];
116
+ if (o.has(n)) {
117
+ let e = o.get(n);
118
+ return a.has(e.toLowerCase()) ? e : void 0;
119
+ }
120
+ return a.get(n)?.code;
121
+ }
122
+ function c(e) {
123
+ let t = s(e);
124
+ if (!t) throw RangeError(`Unsupported locale: ${e}`);
125
+ return a.get(t.toLowerCase());
126
+ }
127
+ function l(e) {
128
+ let t = c(e);
129
+ return {
130
+ lang: t.code,
131
+ dir: t.dir
132
+ };
133
+ }
134
+ function u({ pathname: e = "/", cookie: t = "", acceptLanguage: n = "", defaultLocale: r }) {
135
+ let i = s(e.split("/").filter(Boolean)[0]);
136
+ if (i) return {
137
+ locale: i,
138
+ source: "route"
139
+ };
140
+ let a = s(m(t, "locale"));
141
+ if (a) return {
142
+ locale: a,
143
+ source: "cookie"
144
+ };
145
+ let o = h(n, s)[0]?.locale;
146
+ if (o) return {
147
+ locale: o,
148
+ source: "accept-language"
149
+ };
150
+ let c = s(r);
151
+ if (!c) throw RangeError(`Unsupported default locale: ${r}`);
152
+ return {
153
+ locale: c,
154
+ source: "default"
155
+ };
156
+ }
157
+ return Object.freeze({
158
+ LOCALES: i,
159
+ canonicalLocale: s,
160
+ localeAttributes: l,
161
+ resolveLocale: u,
162
+ definitionFor: c
163
+ });
164
+ }
165
+ function m(e, t) {
166
+ for (let n of String(e ?? "").split(";")) {
167
+ let e = n.indexOf("=");
168
+ if (!(e < 0) && n.slice(0, e).trim() === t) try {
169
+ return decodeURIComponent(n.slice(e + 1).trim());
170
+ } catch {
171
+ return;
172
+ }
173
+ }
174
+ }
175
+ function h(e, t) {
176
+ return String(e ?? "").split(",").map((e, n) => {
177
+ let [r, ...i] = e.trim().split(";"), a = Number(i.find((e) => e.trim().startsWith("q="))?.split("=")[1] ?? 1);
178
+ return {
179
+ locale: t(r),
180
+ q: Number.isFinite(a) ? a : 0,
181
+ order: n
182
+ };
183
+ }).filter(({ locale: e, q: t }) => e && t > 0).sort((e, t) => t.q - e.q || e.order - t.order);
184
+ }
185
+ var g = p(), { canonicalLocale: ee, localeAttributes: te, resolveLocale: ne } = g, _ = Object.freeze({
186
+ ko: "kr",
187
+ en: "us",
188
+ ja: "jp",
189
+ "zh-HK": "hk",
190
+ "zh-TW": "tw",
191
+ hi: "in",
192
+ vi: "vn",
193
+ id: "id",
194
+ th: "th",
195
+ "pt-BR": "br",
196
+ fr: "fr",
197
+ de: "de",
198
+ es: "es",
199
+ ar: "sa"
200
+ }), v = "0 0 640 480", y = new Set(Object.values(_));
201
+ function b(e, t) {
202
+ let n = _[e];
203
+ if (n) return n;
204
+ let r = t?.LOCALES?.find((t) => t.code === e);
205
+ if (r?.flagCountry) {
206
+ if (y.has(r.flagCountry)) return r.flagCountry;
207
+ throw RangeError(`No vendored flag for country: ${r.flagCountry} (locale ${e})`);
208
+ }
209
+ throw RangeError(`No flag for locale: ${e}`);
210
+ }
211
+ //#endregion
212
+ //#region src/react/locale-state.ts
213
+ function x(e, t) {
214
+ if (e.hrefForLocale) return e.hrefForLocale(t);
215
+ let n = e.hrefs?.[t];
216
+ if (typeof n != "string") throw RangeError(`LocaleState.hrefs has no href for locale: ${t}`);
217
+ return n;
218
+ }
219
+ //#endregion
220
+ //#region src/react/locale-menu.tsx
221
+ var S = (e) => e.registry ?? g, C = (e, t) => b(e, t), w = () => `rx${n().replace(/[^A-Za-z0-9_-]/g, "")}`;
222
+ function T(e, t) {
223
+ let n = [...e.matchAll(/\bid="([^"]+)"/g)].map((e) => e[1]);
224
+ if (n.length === 0) return e;
225
+ let r = e;
226
+ for (let e of n) {
227
+ let n = `${e}-${t}`;
228
+ r = r.replaceAll(`id="${e}"`, `id="${n}"`).replaceAll(`href="#${e}"`, `href="#${n}"`).replaceAll(`url(#${e})`, `url(#${n})`);
229
+ }
230
+ return r;
231
+ }
232
+ var E = (e, t) => `site-flag-${e}-${t}`;
233
+ function D(e, t, n) {
234
+ return e.map((e) => {
235
+ let r = t[e];
236
+ if (!r) throw RangeError(`No vendored flag for country: ${e}`);
237
+ return `<symbol id="${E(e, n)}" viewBox="${r.viewBox}">${T(r.body, n)}</symbol>`;
238
+ }).join("");
239
+ }
240
+ function O({ countries: e, uid: n }) {
241
+ let r = e.join(","), [c, l] = i(() => {
242
+ let t = a();
243
+ if (t) return D(e, t, n);
244
+ if (typeof document > "u") return null;
245
+ let r = document.querySelector(`svg.site-flag-sprite[data-flag-sprite="${n}"]`);
246
+ return r && r.childElementCount > 0 ? r.innerHTML : null;
247
+ });
248
+ return t(() => {
249
+ if (c !== null) return;
250
+ let t = !0;
251
+ return o().then((r) => {
252
+ t && l(D(e, r, n));
253
+ }), () => {
254
+ t = !1;
255
+ };
256
+ }, [
257
+ c,
258
+ r,
259
+ n
260
+ ]), /* @__PURE__ */ s("svg", {
261
+ className: "site-flag-sprite",
262
+ "aria-hidden": "true",
263
+ "data-flag-sprite": n,
264
+ ...c === null ? {} : { dangerouslySetInnerHTML: { __html: c } }
265
+ });
266
+ }
267
+ function k({ locale: e, className: t, registry: n, uid: r }) {
268
+ let i = C(e, n);
269
+ return /* @__PURE__ */ s("svg", {
270
+ className: t,
271
+ viewBox: v,
272
+ "aria-hidden": "true",
273
+ children: /* @__PURE__ */ s("use", { href: `#${E(i, r)}` })
274
+ });
275
+ }
276
+ function A(e) {
277
+ let t = S(e);
278
+ return /* @__PURE__ */ c("label", { children: [/* @__PURE__ */ s("span", {
279
+ className: "dds-sr-only",
280
+ children: e.messages.localeLabel
281
+ }), /* @__PURE__ */ s("span", {
282
+ className: "dds-select site-locale",
283
+ children: /* @__PURE__ */ s("select", {
284
+ className: "dds-select__input",
285
+ "aria-label": e.messages.localeLabel,
286
+ value: e.state.locale,
287
+ onChange: (t) => {
288
+ let n = t.currentTarget.value, r = x(e.state, n);
289
+ e.onLocaleChange ? e.onLocaleChange(n, r) : window.location.assign(r);
290
+ },
291
+ children: t.LOCALES.map((e) => /* @__PURE__ */ s("option", {
292
+ value: e.code,
293
+ lang: e.code,
294
+ dir: e.dir,
295
+ children: e.nativeName
296
+ }, e.code))
297
+ })
298
+ })] });
299
+ }
300
+ function j(e) {
301
+ let t = r(null), n = r(null), i = w(), a = S(e), o = [...new Set(a.LOCALES.map((e) => C(e.code, a)))], l = a.LOCALES.find((t) => t.code === e.state.locale), u = () => {
302
+ t.current && (t.current.open = !1);
303
+ }, d = (e) => {
304
+ e.key !== "Escape" || !t.current?.open || (e.preventDefault(), u(), n.current?.focus());
305
+ }, f = l?.nativeName, p = f ? `${e.messages.localeLabel}: ${f}` : e.messages.localeLabel;
306
+ return /* @__PURE__ */ c("details", {
307
+ ref: t,
308
+ className: "site-locale-flag",
309
+ onKeyDown: d,
310
+ children: [/* @__PURE__ */ c("summary", {
311
+ ref: n,
312
+ className: "site-locale-flag__trigger",
313
+ "aria-label": p,
314
+ title: e.messages.localeLabel,
315
+ children: [/* @__PURE__ */ s(O, {
316
+ countries: o,
317
+ uid: i
318
+ }), /* @__PURE__ */ s(k, {
319
+ locale: e.state.locale,
320
+ className: "site-locale-flag__svg",
321
+ registry: a,
322
+ uid: i
323
+ })]
324
+ }), /* @__PURE__ */ s("ul", {
325
+ className: "site-locale-flag__list",
326
+ role: "list",
327
+ children: a.LOCALES.map((t) => {
328
+ let n = x(e.state, t.code);
329
+ return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c("a", {
330
+ className: "site-locale-flag__option",
331
+ href: n,
332
+ lang: t.code,
333
+ hrefLang: t.code,
334
+ dir: t.dir,
335
+ "aria-current": t.code === e.state.locale ? "true" : void 0,
336
+ onClick: (r) => {
337
+ e.onLocaleChange && (r.preventDefault(), u(), e.onLocaleChange(t.code, n));
338
+ },
339
+ children: [/* @__PURE__ */ s(k, {
340
+ locale: t.code,
341
+ className: "site-locale-flag__svg",
342
+ registry: a,
343
+ uid: i
344
+ }), /* @__PURE__ */ s("span", { children: t.nativeName })]
345
+ }) }, t.code);
346
+ })
347
+ })]
348
+ });
349
+ }
350
+ function M(e) {
351
+ return e.variant === "flag" ? /* @__PURE__ */ s(j, { ...e }) : /* @__PURE__ */ s(A, { ...e });
352
+ }
353
+ //#endregion
354
+ //#region src/react/consent.tsx
355
+ function N(e) {
356
+ return /* @__PURE__ */ s("button", {
357
+ type: "button",
358
+ className: e.className ? `site-consent-trigger ${e.className}` : "site-consent-trigger",
359
+ "aria-haspopup": "dialog",
360
+ onClick: () => e.controller.openSettings(),
361
+ children: e.children
362
+ });
363
+ }
364
+ //#endregion
365
+ //#region src/react/primitives.tsx
366
+ var P = (...e) => e.filter(Boolean).join(" ");
367
+ function F({ tone: e = "primary", type: t = "button", className: n, ...r }) {
368
+ return /* @__PURE__ */ s("button", {
369
+ ...r,
370
+ type: t,
371
+ className: P("dds-btn", `dds-btn--${e}`, n)
372
+ });
373
+ }
374
+ function I({ tone: e = "ghost", type: t = "button", className: n, ...r }) {
375
+ return /* @__PURE__ */ s("button", {
376
+ ...r,
377
+ type: t,
378
+ className: P("dds-iconbtn", e !== "ghost" && `dds-iconbtn--${e}`, n)
379
+ });
380
+ }
381
+ function L({ name: e, size: t = 24, className: n, ...r }) {
382
+ let i = u[e];
383
+ return /* @__PURE__ */ s("svg", {
384
+ ...r,
385
+ viewBox: i.viewBox,
386
+ width: t,
387
+ height: t,
388
+ fill: "none",
389
+ stroke: "currentColor",
390
+ strokeWidth: i.strokeWidth,
391
+ strokeLinecap: "round",
392
+ strokeLinejoin: "round",
393
+ "aria-hidden": "true",
394
+ className: P(l.mirrorInRtl.includes(e) && l.cssClass, n) || void 0,
395
+ children: /* @__PURE__ */ s("g", { dangerouslySetInnerHTML: { __html: i.body } })
396
+ });
397
+ }
398
+ //#endregion
399
+ //#region src/react/chrome.tsx
400
+ var R = [
401
+ "system",
402
+ "light",
403
+ "dark"
404
+ ];
405
+ function z(e) {
406
+ let n = e.storageKey ?? "site-theme", [r, a] = i(e.defaultValue ?? "system"), [o, c] = i("light"), l = o === "dark" ? "light" : "dark", u = l === "dark" ? e.messages.themeDark : e.messages.themeLight, d = (e) => {
407
+ let t = e === "system" ? matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
408
+ c(t), document.documentElement.dataset.theme = t, document.documentElement.dataset.themePreference = e;
409
+ }, f = (t) => {
410
+ e.value === void 0 && a(t), e.onValueChange?.(t), d(t), localStorage.setItem(n, t);
411
+ };
412
+ t(() => {
413
+ let t = localStorage.getItem(n), i = t && R.includes(t) ? t : null;
414
+ e.value === void 0 && i && a(i), d(e.value ?? i ?? r);
415
+ }, []);
416
+ let p = l === "dark" ? "site-moon" : "site-sun";
417
+ return /* @__PURE__ */ s(I, {
418
+ className: "site-theme-toggle",
419
+ tone: "ghost",
420
+ "aria-label": `${e.messages.themeLabel}: ${u}`,
421
+ title: `${e.messages.themeLabel}: ${u}`,
422
+ onClick: () => f(l),
423
+ children: /* @__PURE__ */ s(L, {
424
+ className: "site-theme-toggle__icon",
425
+ name: p,
426
+ "data-icon": p,
427
+ size: 20
428
+ })
429
+ });
430
+ }
431
+ var B = (e) => e.emphasis ? "site-link--emphasis" : void 0;
432
+ function V(e) {
433
+ let [t, n] = i(!1), r = (e) => {
434
+ e.key !== "Escape" || e.defaultPrevented || !t || e.target?.closest("[aria-modal=\"true\"]") || (e.preventDefault(), n(!1), e.currentTarget.querySelector(".site-menu-button")?.focus());
435
+ }, a = (e) => {
436
+ let r = e.target?.closest("a");
437
+ !t || !r || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || r.target && r.target !== "_self" || n(!1);
438
+ }, o = String(t);
439
+ return /* @__PURE__ */ c("header", {
440
+ className: "site-header",
441
+ onKeyDown: r,
442
+ children: [/* @__PURE__ */ s("a", {
443
+ className: "dds-sr-only",
444
+ href: "#main-content",
445
+ children: e.messages.skipToContent
446
+ }), /* @__PURE__ */ c("div", {
447
+ className: "site-header__inner",
448
+ children: [
449
+ /* @__PURE__ */ c("a", {
450
+ className: "site-brand",
451
+ href: e.brand.href,
452
+ "aria-label": e.brand.label,
453
+ children: [e.brand.logo, e.brand.name]
454
+ }),
455
+ /* @__PURE__ */ s(F, {
456
+ className: "site-menu-button",
457
+ tone: "ghost",
458
+ "aria-expanded": t,
459
+ "aria-controls": "site-navigation",
460
+ onClick: () => n((e) => !e),
461
+ children: t ? e.messages.menuClose : e.messages.menuOpen
462
+ }),
463
+ /* @__PURE__ */ s("nav", {
464
+ id: "site-navigation",
465
+ className: "site-nav",
466
+ "data-open": o,
467
+ "aria-label": e.messages.navigationLabel,
468
+ onClick: a,
469
+ children: /* @__PURE__ */ s("ul", {
470
+ className: "site-nav__list",
471
+ children: e.navigation.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s("a", {
472
+ className: B(e),
473
+ href: e.href,
474
+ target: e.external ? "_blank" : void 0,
475
+ rel: e.external ? "noreferrer" : void 0,
476
+ children: e.label
477
+ }) }, e.href))
478
+ })
479
+ }),
480
+ /* @__PURE__ */ c("div", {
481
+ className: "site-header__controls",
482
+ "data-open": o,
483
+ onClick: a,
484
+ children: [
485
+ e.locale && /* @__PURE__ */ s(M, {
486
+ state: e.locale,
487
+ messages: e.messages,
488
+ ...e.localeVariant ? { variant: e.localeVariant } : {},
489
+ ...e.localeRegistry ? { registry: e.localeRegistry } : {},
490
+ ...e.onLocaleChange ? { onLocaleChange: e.onLocaleChange } : {}
491
+ }),
492
+ e.theme && /* @__PURE__ */ s(z, {
493
+ ...e.theme,
494
+ messages: e.messages
495
+ }),
496
+ e.actions
497
+ ]
498
+ })
499
+ ]
500
+ })]
501
+ });
502
+ }
503
+ function H(e) {
504
+ let t = r(null), n = r(null), i = e.registry.LOCALES.find((t) => t.code === e.state.locale), a = (e) => {
505
+ e.key !== "Escape" || !t.current?.open || (e.preventDefault(), t.current.open = !1, n.current?.focus());
506
+ }, o = i?.nativeName ?? e.state.locale;
507
+ return /* @__PURE__ */ s("nav", {
508
+ className: "site-footer__langs",
509
+ "aria-label": e.label,
510
+ children: /* @__PURE__ */ c("details", {
511
+ ref: t,
512
+ className: "site-footer__langs-menu",
513
+ onKeyDown: a,
514
+ children: [/* @__PURE__ */ s("summary", {
515
+ ref: n,
516
+ className: "site-footer__langs-trigger",
517
+ "aria-label": `${e.label}: ${o}`,
518
+ children: /* @__PURE__ */ s("span", {
519
+ lang: i?.code,
520
+ dir: i?.dir,
521
+ children: o
522
+ })
523
+ }), /* @__PURE__ */ s("ul", {
524
+ className: "site-footer__langs-list",
525
+ role: "list",
526
+ children: e.registry.LOCALES.map((t) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s("a", {
527
+ href: x(e.state, t.code),
528
+ hrefLang: t.code,
529
+ lang: t.code,
530
+ dir: t.dir,
531
+ "aria-current": t.code === e.state.locale ? "page" : void 0,
532
+ onClick: () => e.onSelect?.(t.code),
533
+ children: t.nativeName
534
+ }) }, t.code))
535
+ })]
536
+ })
537
+ });
538
+ }
539
+ function U(t) {
540
+ let n = t.localeRegistry ?? g, r = /* @__PURE__ */ c("p", {
541
+ className: "site-footer__brand",
542
+ children: [
543
+ t.brand.logo,
544
+ t.brand.name ? /* @__PURE__ */ s("strong", { children: t.brand.name }) : null,
545
+ (t.family ?? []).map((t) => /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ s("span", {
546
+ "aria-hidden": "true",
547
+ children: "·"
548
+ }), /* @__PURE__ */ s("a", {
549
+ className: B(t),
550
+ href: t.href,
551
+ children: t.label
552
+ })] }, t.href))
553
+ ]
554
+ }), i = /* @__PURE__ */ c("ul", {
555
+ className: "site-footer__links",
556
+ children: [
557
+ t.links.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s("a", {
558
+ className: B(e),
559
+ href: e.href,
560
+ children: e.label
561
+ }) }, e.href)),
562
+ t.consentSettings && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(N, {
563
+ controller: t.consentSettings.controller,
564
+ children: t.consentSettings.label
565
+ }) }),
566
+ /* @__PURE__ */ s("li", { children: t.copyrightHref ? /* @__PURE__ */ s("a", {
567
+ href: t.copyrightHref,
568
+ children: /* @__PURE__ */ s("bdi", { children: t.copyright })
569
+ }) : /* @__PURE__ */ s("bdi", { children: t.copyright }) })
570
+ ]
571
+ });
572
+ return /* @__PURE__ */ s("footer", {
573
+ className: "site-footer",
574
+ "aria-label": t.messages.footerLabel,
575
+ children: /* @__PURE__ */ c("div", {
576
+ className: "site-footer__inner",
577
+ children: [t.locale && /* @__PURE__ */ s(H, {
578
+ state: t.locale,
579
+ registry: n,
580
+ label: t.messages.localeLabel,
581
+ onSelect: t.onLocaleSelect
582
+ }), /* @__PURE__ */ c("div", {
583
+ className: "site-footer__row",
584
+ children: [t.details ? /* @__PURE__ */ c("div", {
585
+ className: "site-footer__identity",
586
+ children: [r, /* @__PURE__ */ s("div", {
587
+ className: "site-footer__details",
588
+ children: t.details
589
+ })]
590
+ }) : r, t.linksLabel ? /* @__PURE__ */ s("nav", {
591
+ className: "site-footer__nav",
592
+ "aria-label": t.linksLabel,
593
+ children: i
594
+ }) : i]
595
+ })]
596
+ })
597
+ });
598
+ }
599
+ //#endregion
600
+ //#region src/react/layouts.tsx
601
+ function W(e) {
602
+ let t = e.mainWidth === "bleed" ? "site-main site-main--bleed" : "site-main";
603
+ return /* @__PURE__ */ c("div", {
604
+ className: "site-shell",
605
+ children: [
606
+ /* @__PURE__ */ s(V, { ...e.header }),
607
+ /* @__PURE__ */ s("main", {
608
+ id: "main-content",
609
+ className: t,
610
+ tabIndex: -1,
611
+ children: e.children
612
+ }),
613
+ /* @__PURE__ */ s(U, { ...e.footer })
614
+ ]
615
+ });
616
+ }
617
+ function G(e) {
618
+ return /* @__PURE__ */ c("article", {
619
+ className: "site-legal",
620
+ children: [/* @__PURE__ */ c("header", { children: [/* @__PURE__ */ s("h1", { children: e.title }), /* @__PURE__ */ c("p", { children: [
621
+ e.messages.updatedLabel,
622
+ ": ",
623
+ /* @__PURE__ */ s("time", {
624
+ dateTime: e.updatedAt,
625
+ children: e.updatedAt
626
+ })
627
+ ] })] }), e.children]
628
+ });
629
+ }
630
+ function K(e) {
631
+ return /* @__PURE__ */ c("section", {
632
+ className: `site-status site-status--${e.tone}`,
633
+ role: e.tone === "danger" ? "alert" : "status",
634
+ "aria-live": e.tone === "danger" ? "assertive" : "polite",
635
+ children: [
636
+ /* @__PURE__ */ s("strong", { children: e.title }),
637
+ e.children ? /* @__PURE__ */ s("div", { children: e.children }) : null,
638
+ e.action && /* @__PURE__ */ s(F, {
639
+ tone: e.action.tone ?? "secondary",
640
+ onClick: e.action.onClick,
641
+ children: e.action.label
642
+ })
643
+ ]
644
+ });
645
+ }
646
+ function q(e) {
647
+ return /* @__PURE__ */ c("main", {
648
+ className: "site-main site-centered-layout",
649
+ children: [
650
+ /* @__PURE__ */ s("h1", { children: e.messages.notFoundTitle }),
651
+ /* @__PURE__ */ s("p", { children: e.messages.notFoundDescription }),
652
+ e.children,
653
+ /* @__PURE__ */ s("a", {
654
+ className: "dds-btn dds-btn--primary",
655
+ href: e.homeHref,
656
+ children: e.messages.backHome
657
+ })
658
+ ]
659
+ });
660
+ }
661
+ function J(e) {
662
+ return /* @__PURE__ */ c("main", {
663
+ className: "site-main site-centered-layout",
664
+ children: [
665
+ /* @__PURE__ */ s("h1", { children: e.messages.errorTitle }),
666
+ /* @__PURE__ */ s("p", { children: e.messages.errorDescription }),
667
+ e.errorId && /* @__PURE__ */ s("code", { children: e.errorId }),
668
+ e.children,
669
+ /* @__PURE__ */ s(F, {
670
+ tone: "primary",
671
+ onClick: e.onRetry,
672
+ children: e.messages.retry
673
+ })
674
+ ]
675
+ });
676
+ }
677
+ //#endregion
678
+ //#region src/react/oss-product-mark.tsx
679
+ var Y = {
680
+ sm: 24,
681
+ md: 32,
682
+ lg: 48
683
+ };
684
+ function X(e) {
685
+ let t = e.size ?? "md", n = Y[t];
686
+ return /* @__PURE__ */ s("img", {
687
+ className: `oss-product-mark oss-product-mark--${t}${e.className ? ` ${e.className}` : ""}`,
688
+ src: e.src,
689
+ alt: e.decorative ? "" : e.name,
690
+ "aria-hidden": e.decorative ? "true" : void 0,
691
+ width: n,
692
+ height: n,
693
+ decoding: "async"
694
+ });
695
+ }
696
+ //#endregion
697
+ //#region src/react/sections.tsx
698
+ function Z(e) {
699
+ return /* @__PURE__ */ s("section", {
700
+ className: "site-section",
701
+ id: e.id,
702
+ "data-tone": e.tone ?? "default",
703
+ "aria-labelledby": e.labelledBy,
704
+ children: /* @__PURE__ */ s("div", {
705
+ className: "site-section__shell",
706
+ children: e.children
707
+ })
708
+ });
709
+ }
710
+ function Q(e) {
711
+ return /* @__PURE__ */ c("header", {
712
+ className: "site-section__head",
713
+ children: [
714
+ /* @__PURE__ */ s("p", {
715
+ className: "site-section__index",
716
+ "aria-hidden": "true",
717
+ children: e.index
718
+ }),
719
+ /* @__PURE__ */ s("h2", {
720
+ id: e.titleId,
721
+ children: e.title
722
+ }),
723
+ e.lede ? /* @__PURE__ */ s("p", {
724
+ className: "site-section__lede",
725
+ children: e.lede
726
+ }) : null
727
+ ]
728
+ });
729
+ }
730
+ function $(e) {
731
+ return /* @__PURE__ */ s("section", {
732
+ id: e.id,
733
+ className: "site-hero",
734
+ "aria-labelledby": e.titleId,
735
+ children: /* @__PURE__ */ c("div", {
736
+ className: "site-hero__shell",
737
+ children: [/* @__PURE__ */ c("div", {
738
+ className: "site-hero__copy",
739
+ children: [
740
+ e.eyebrow ? /* @__PURE__ */ s("p", {
741
+ className: "site-hero__eyebrow",
742
+ children: e.eyebrow
743
+ }) : null,
744
+ /* @__PURE__ */ s("h1", {
745
+ id: e.titleId,
746
+ children: e.title
747
+ }),
748
+ /* @__PURE__ */ s("p", {
749
+ className: "site-hero__lede",
750
+ children: e.lede
751
+ }),
752
+ /* @__PURE__ */ s("div", {
753
+ className: "site-hero__actions",
754
+ children: e.actions
755
+ })
756
+ ]
757
+ }), /* @__PURE__ */ s("figure", {
758
+ className: "site-hero__aside",
759
+ "aria-label": e.asideLabel,
760
+ children: e.aside
761
+ })]
762
+ })
763
+ });
764
+ }
765
+ function re(e) {
766
+ return /* @__PURE__ */ s("ol", {
767
+ className: "site-steps",
768
+ "aria-label": e.label,
769
+ children: e.steps.map((e, t) => /* @__PURE__ */ c("li", {
770
+ className: "site-steps__step",
771
+ children: [
772
+ /* @__PURE__ */ s("span", {
773
+ className: "site-steps__marker",
774
+ "aria-hidden": "true",
775
+ children: t + 1
776
+ }),
777
+ /* @__PURE__ */ s("h3", { children: e.title }),
778
+ /* @__PURE__ */ s("p", { children: e.body })
779
+ ]
780
+ }, t))
781
+ });
782
+ }
783
+ function ie(e) {
784
+ return /* @__PURE__ */ s("ul", {
785
+ className: "site-rows",
786
+ "aria-label": e.label,
787
+ children: e.rows.map((e, t) => /* @__PURE__ */ c("li", {
788
+ className: "site-rows__row",
789
+ children: [/* @__PURE__ */ c("div", {
790
+ className: "site-rows__title",
791
+ children: [/* @__PURE__ */ s("h3", { children: e.title }), e.badge ? /* @__PURE__ */ s("span", {
792
+ className: "dds-badge dds-badge--brand",
793
+ children: e.badge
794
+ }) : null]
795
+ }), /* @__PURE__ */ s("p", {
796
+ className: "site-rows__body",
797
+ children: e.body
798
+ })]
799
+ }, t))
800
+ });
801
+ }
802
+ function ae(e) {
803
+ return /* @__PURE__ */ c("div", {
804
+ className: "site-pricing",
805
+ children: [/* @__PURE__ */ s("div", {
806
+ className: "site-pricing__note",
807
+ children: e.children
808
+ }), /* @__PURE__ */ s("div", {
809
+ className: "site-pricing__action",
810
+ children: e.action
811
+ })]
812
+ });
813
+ }
814
+ //#endregion
815
+ export { N as ConsentSettingsButton, J as ErrorLayout, ie as FeatureRows, $ as HeroSplit, G as LegalLayout, M as LocaleMenu, W as MarketingShell, q as NotFoundLayout, X as OssProductMark, ae as PricingNote, Z as SectionBlock, Q as SectionHead, U as SiteFooter, V as SiteHeader, K as StatusBanner, re as StepFlow, z as ThemeToggle };
816
+
817
+ //# sourceMappingURL=index.js.map