@juwel-development/design-system 1.1.0 → 2.1.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 (67) hide show
  1. package/README.md +19 -3
  2. package/dist/design-system.js +560 -43
  3. package/dist/index.css +1 -1
  4. package/dist/types/Display/Brandmark/Brandmark.d.ts +50 -0
  5. package/dist/types/Display/Checklist/Checklist.d.ts +26 -0
  6. package/dist/types/Display/DefinitionList/DefinitionList.d.ts +41 -0
  7. package/dist/types/Display/Figure/Figure.d.ts +52 -0
  8. package/dist/types/Display/Rail/Rail.d.ts +54 -0
  9. package/dist/types/Display/Table/Table.d.ts +61 -0
  10. package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +26 -0
  11. package/dist/types/Display/Typography/H1/H1.d.ts +27 -0
  12. package/dist/types/Display/Typography/H2/H2.d.ts +24 -0
  13. package/dist/types/Display/Typography/H3/H3.d.ts +23 -0
  14. package/dist/types/Display/Typography/H4/H4.d.ts +22 -0
  15. package/dist/types/Display/Typography/H5/H5.d.ts +23 -0
  16. package/dist/types/Display/Typography/H6/H6.d.ts +23 -0
  17. package/dist/types/Display/Typography/P/P.d.ts +25 -0
  18. package/dist/types/Display/Typography/Prose/Prose.d.ts +42 -0
  19. package/dist/types/Interaction/Button/Button.d.ts +7 -3
  20. package/dist/types/Interaction/Input/Input.d.ts +31 -0
  21. package/dist/types/Interaction/Link/Link.d.ts +27 -0
  22. package/dist/types/Interaction/TextArea/TextArea.d.ts +27 -0
  23. package/dist/types/Layout/Footer/Footer.d.ts +34 -0
  24. package/dist/types/Layout/Form/Form.d.ts +31 -0
  25. package/dist/types/Layout/Header/Header.d.ts +41 -0
  26. package/dist/types/Layout/Hero/Hero.d.ts +46 -0
  27. package/dist/types/Layout/PageHead/PageHead.d.ts +36 -0
  28. package/dist/types/Layout/Section/Section.d.ts +38 -0
  29. package/dist/types/Theme/Palette.d.ts +25 -6
  30. package/dist/types/Theme/renderTokens.d.ts +16 -3
  31. package/dist/types/index.d.ts +25 -1
  32. package/package.json +5 -1
  33. package/src/Display/.gitkeep +0 -0
  34. package/src/Display/Brandmark/Brandmark.tsx +97 -0
  35. package/src/Display/Checklist/Checklist.tsx +75 -0
  36. package/src/Display/DefinitionList/DefinitionList.tsx +90 -0
  37. package/src/Display/Figure/Figure.tsx +116 -0
  38. package/src/Display/Rail/Rail.tsx +108 -0
  39. package/src/Display/Table/Table.tsx +191 -0
  40. package/src/Display/Typography/Eyebrow/Eyebrow.tsx +46 -0
  41. package/src/Display/Typography/H1/H1.tsx +46 -0
  42. package/src/Display/Typography/H2/H2.tsx +43 -0
  43. package/src/Display/Typography/H3/H3.tsx +41 -0
  44. package/src/Display/Typography/H4/H4.tsx +40 -0
  45. package/src/Display/Typography/H5/H5.tsx +41 -0
  46. package/src/Display/Typography/H6/H6.tsx +41 -0
  47. package/src/Display/Typography/P/P.tsx +38 -0
  48. package/src/Display/Typography/Prose/Prose.tsx +91 -0
  49. package/src/Interaction/Button/Button.tsx +15 -10
  50. package/src/Interaction/Input/Input.tsx +120 -0
  51. package/src/Interaction/Link/Link.tsx +70 -0
  52. package/src/Interaction/TextArea/TextArea.tsx +110 -0
  53. package/src/Layout/.gitkeep +0 -0
  54. package/src/Layout/Footer/Footer.tsx +60 -0
  55. package/src/Layout/Form/Form.tsx +102 -0
  56. package/src/Layout/Header/Header.tsx +84 -0
  57. package/src/Layout/Hero/Hero.tsx +73 -0
  58. package/src/Layout/PageHead/PageHead.tsx +79 -0
  59. package/src/Layout/Section/Section.tsx +79 -0
  60. package/src/Theme/Palette.ts +38 -12
  61. package/src/Theme/renderTokens.ts +255 -18
  62. package/src/index.ts +25 -1
  63. package/src/styles.dark.css +9 -0
  64. package/src/styles.light.css +9 -0
  65. package/src/tokens.css +118 -9
  66. package/src/tokens.dark.css +169 -0
  67. package/src/tokens.light.css +169 -0
@@ -1,43 +1,44 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { useEffect as n, useId as r, useRef as i } from "react";
2
3
  import './index.css';//#region node_modules/clsx/dist/clsx.mjs
3
- function t(e) {
4
- var n, r, i = "";
5
- if (typeof e == "string" || typeof e == "number") i += e;
4
+ function a(e) {
5
+ var t, n, r = "";
6
+ if (typeof e == "string" || typeof e == "number") r += e;
6
7
  else if (typeof e == "object") {
7
8
  if (Array.isArray(e)) {
8
- var a = e.length;
9
- for (n = 0; n < a; n++) e[n] && (r = t(e[n])) && (i && (i += " "), i += r);
10
- } else for (r in e) e[r] && (i && (i += " "), i += r);
9
+ var i = e.length;
10
+ for (t = 0; t < i; t++) e[t] && (n = a(e[t])) && (r && (r += " "), r += n);
11
+ } else for (n in e) e[n] && (r && (r += " "), r += n);
11
12
  }
12
- return i;
13
+ return r;
13
14
  }
14
- function n() {
15
- for (var e, n, r = 0, i = "", a = arguments.length; r < a; r++) (e = arguments[r]) && (n = t(e)) && (i && (i += " "), i += n);
16
- return i;
15
+ function o() {
16
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = a(e)) && (r && (r += " "), r += t);
17
+ return r;
17
18
  }
18
19
  //#endregion
19
20
  //#region node_modules/class-variance-authority/dist/index.mjs
20
- var r = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, i = n, a = ((e, t) => (n) => {
21
- if (t?.variants == null) return i(e, n?.class, n?.className);
22
- let { variants: a, defaultVariants: o } = t, s = Object.keys(a).map((e) => {
23
- let t = n?.[e], i = o?.[e];
21
+ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e, t) => (n) => {
22
+ if (t?.variants == null) return c(e, n?.class, n?.className);
23
+ let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
24
+ let t = n?.[e], a = i?.[e];
24
25
  if (t === null) return null;
25
- let s = r(t) || r(i);
26
- return a[e][s];
27
- }), c = n && Object.entries(n).reduce((e, t) => {
26
+ let o = s(t) || s(a);
27
+ return r[e][o];
28
+ }), o = n && Object.entries(n).reduce((e, t) => {
28
29
  let [n, r] = t;
29
30
  return r === void 0 || (e[n] = r), e;
30
31
  }, {});
31
- return i(e, s, t?.compoundVariants?.reduce((e, t) => {
32
- let { class: n, className: r, ...i } = t;
33
- return Object.entries(i).every((e) => {
32
+ return c(e, a, t?.compoundVariants?.reduce((e, t) => {
33
+ let { class: n, className: r, ...a } = t;
34
+ return Object.entries(a).every((e) => {
34
35
  let [t, n] = e;
35
36
  return Array.isArray(n) ? n.includes({
36
- ...o,
37
- ...c
37
+ ...i,
38
+ ...o
38
39
  }[t]) : {
39
- ...o,
40
- ...c
40
+ ...i,
41
+ ...o
41
42
  }[t] === n;
42
43
  }) ? [
43
44
  ...e,
@@ -45,61 +46,577 @@ var r = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, i = n, a = ((
45
46
  r
46
47
  ] : e;
47
48
  }, []), n?.class, n?.className);
48
- })("transition-colors duration-[var(--motion-duration-color)] py-2 sm:py-2 disabled:bg-disabled disabled:hover:bg-disabled-hover cursor-pointer disabled:cursor-not-allowed select-none text-nowrap inline-flex flex-row items-center justify-center gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-surface", {
49
+ }, u = l("inline-flex", { variants: { cut: {
50
+ full: "",
51
+ compact: ""
52
+ } } }), d = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
53
+ "aria-hidden": "true",
54
+ "data-cut": n,
55
+ className: u({ cut: n }),
56
+ "data-testid": i,
57
+ children: r
58
+ }) : /* @__PURE__ */ e("span", {
59
+ role: "img",
60
+ "aria-label": t,
61
+ "data-cut": n,
62
+ className: u({ cut: n }),
63
+ "data-testid": i,
64
+ children: r
65
+ }), f = l("m-0 list-none p-0"), p = l([
66
+ "flex items-start gap-3 font-primary text-body leading-body text-foreground",
67
+ "before:mt-[0.7em] before:h-[var(--tick-thickness)] before:w-[var(--tick-length)] before:shrink-0 before:bg-[var(--color-rule)] before:content-['']",
68
+ "[&:not(:first-child)]:mt-[var(--space-stack)] [&:not(:first-child)]:border-border [&:not(:first-child)]:border-t [&:not(:first-child)]:border-solid [&:not(:first-child)]:pt-[var(--space-stack)]"
69
+ ].join(" ")), m = {
70
+ Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
71
+ className: f(),
72
+ role: "list",
73
+ "data-testid": n,
74
+ children: t
75
+ }),
76
+ Item: ({ children: t }) => /* @__PURE__ */ e("li", {
77
+ className: p(),
78
+ children: t
79
+ })
80
+ }, h = l([
81
+ "grid gap-[var(--space-stack)] py-6",
82
+ "border-b border-solid border-border first:border-t",
83
+ "lg:grid-cols-[16rem_minmax(0,1fr)] lg:items-baseline lg:gap-x-12",
84
+ "lg:[&>dt]:col-start-1 lg:[&>dd]:col-start-2 lg:[&>dd]:row-start-1"
85
+ ].join(" ")), g = l("font-primary text-subtitle leading-subtitle text-foreground"), _ = l("font-primary text-body leading-body text-muted max-w-[var(--measure)]"), v = {
86
+ Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("dl", {
87
+ "data-testid": n,
88
+ children: t
89
+ }),
90
+ Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
91
+ className: h(),
92
+ "data-testid": n,
93
+ children: t
94
+ }),
95
+ Term: ({ children: t }) => /* @__PURE__ */ e("dt", {
96
+ className: g(),
97
+ children: t
98
+ }),
99
+ Description: ({ children: t }) => /* @__PURE__ */ e("dd", {
100
+ className: _(),
101
+ children: t
102
+ })
103
+ }, y = l("block w-full object-cover bg-backing", {
104
+ variants: {
105
+ ratio: {
106
+ portrait: "aspect-portrait",
107
+ square: "aspect-square",
108
+ landscape: "aspect-landscape",
109
+ wide: "aspect-wide"
110
+ },
111
+ focus: {
112
+ center: "object-center",
113
+ top: "object-top",
114
+ bottom: "object-bottom",
115
+ left: "object-left",
116
+ right: "object-right"
117
+ }
118
+ },
119
+ defaultVariants: { focus: "center" }
120
+ }), b = ({ src: n, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, priority: u, testId: d }) => {
121
+ let f = /* @__PURE__ */ e("img", {
122
+ src: n,
123
+ alt: r,
124
+ width: i,
125
+ height: a,
126
+ className: y({
127
+ ratio: o,
128
+ focus: s
129
+ }),
130
+ srcSet: c?.srcSet,
131
+ sizes: c?.sizes,
132
+ loading: u ? "eager" : "lazy",
133
+ fetchPriority: u ? "high" : void 0,
134
+ decoding: "async",
135
+ "data-testid": l === void 0 ? d : void 0
136
+ });
137
+ return l === void 0 ? f : /* @__PURE__ */ t("figure", {
138
+ className: "flex flex-col gap-[var(--space-stack)]",
139
+ "data-testid": d,
140
+ children: [f, /* @__PURE__ */ e("figcaption", {
141
+ className: "font-secondary text-label tracking-label text-muted",
142
+ children: l
143
+ })]
144
+ });
145
+ }, x = l(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), S = l("lg:sticky lg:top-6"), C = l("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), w = l("block pt-1 font-secondary text-label tracking-label text-foreground"), ee = {
146
+ Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
147
+ className: x(),
148
+ "data-testid": n,
149
+ children: t
150
+ }),
151
+ Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
152
+ className: S(),
153
+ "data-testid": i,
154
+ "aria-hidden": "true",
155
+ children: [n !== void 0 && /* @__PURE__ */ e("span", {
156
+ className: C(),
157
+ children: n
158
+ }), /* @__PURE__ */ e("span", {
159
+ className: w(),
160
+ children: r
161
+ })]
162
+ }),
163
+ Content: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
164
+ "data-testid": n,
165
+ children: t
166
+ })
167
+ }, T = l([
168
+ "[&:not([data-notes])]:overflow-x-auto",
169
+ "[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
170
+ "[&_caption]:pb-3 [&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
171
+ "[&>table>*:nth-child(2)>tr:first-child]:border-rule",
172
+ "[&[data-notes=supplementary]_[data-variant=note]]:max-md:hidden",
173
+ "[&[data-notes=content]>table]:max-md:block",
174
+ "[&[data-notes=content]_thead]:max-md:block [&[data-notes=content]_tbody]:max-md:block [&[data-notes=content]_tfoot]:max-md:block",
175
+ "[&[data-notes=content]_tr]:max-md:block [&[data-notes=content]_td]:max-md:block [&[data-notes=content]_th]:max-md:block"
176
+ ].join(" ")), E = l("border-t border-solid border-border"), D = l("px-4 py-2 text-small first:pl-0 last:pr-0", {
177
+ variants: {
178
+ variant: {
179
+ value: "font-primary text-foreground tabular-nums",
180
+ note: "font-secondary text-muted"
181
+ },
182
+ align: {
183
+ left: "text-left",
184
+ right: "text-right",
185
+ center: "text-center"
186
+ }
187
+ },
188
+ defaultVariants: {
189
+ variant: "value",
190
+ align: "left"
191
+ }
192
+ }), O = l("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
193
+ variants: { align: {
194
+ left: "text-left",
195
+ right: "text-right",
196
+ center: "text-center"
197
+ } },
198
+ defaultVariants: { align: "left" }
199
+ }), k = {
200
+ Root: ({ caption: n, notes: r, children: i, testId: a }) => {
201
+ let o = /* @__PURE__ */ t("table", { children: [/* @__PURE__ */ e("caption", { children: n }), i] });
202
+ return r === void 0 ? /* @__PURE__ */ e("section", {
203
+ className: T(),
204
+ "data-testid": a,
205
+ "aria-label": n,
206
+ tabIndex: 0,
207
+ children: o
208
+ }) : /* @__PURE__ */ e("div", {
209
+ className: T(),
210
+ "data-notes": r,
211
+ "data-testid": a,
212
+ children: o
213
+ });
214
+ },
215
+ Head: ({ children: t }) => /* @__PURE__ */ e("thead", { children: t }),
216
+ Body: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
217
+ Footer: ({ children: t }) => /* @__PURE__ */ e("tfoot", { children: t }),
218
+ Row: ({ children: t, testId: n }) => /* @__PURE__ */ e("tr", {
219
+ className: E(),
220
+ "data-testid": n,
221
+ children: t
222
+ }),
223
+ HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
224
+ scope: t,
225
+ className: O({ align: n }),
226
+ children: r
227
+ }),
228
+ Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
229
+ className: D({
230
+ variant: t,
231
+ align: n
232
+ }),
233
+ "data-variant": t ?? "value",
234
+ children: r
235
+ })
236
+ }, A = l("font-secondary text-label tracking-label font-medium", {
237
+ variants: { color: {
238
+ foreground: "text-foreground",
239
+ muted: "text-muted"
240
+ } },
241
+ defaultVariants: { color: "muted" }
242
+ }), j = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
243
+ className: A({ color: n }),
244
+ "data-testid": r,
245
+ children: t
246
+ }), M = l("font-primary text-display leading-display tracking-optical", {
247
+ variants: { color: {
248
+ foreground: "text-foreground",
249
+ muted: "text-muted"
250
+ } },
251
+ defaultVariants: { color: "foreground" }
252
+ }), N = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
253
+ className: M({ color: n }),
254
+ "data-testid": r,
255
+ children: t
256
+ }), P = l("font-primary text-title leading-title tracking-optical", {
257
+ variants: { color: {
258
+ foreground: "text-foreground",
259
+ muted: "text-muted"
260
+ } },
261
+ defaultVariants: { color: "foreground" }
262
+ }), F = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
263
+ className: P({ color: n }),
264
+ "data-testid": r,
265
+ children: t
266
+ }), I = l("font-primary text-subtitle leading-subtitle", {
267
+ variants: { color: {
268
+ foreground: "text-foreground",
269
+ muted: "text-muted"
270
+ } },
271
+ defaultVariants: { color: "foreground" }
272
+ }), L = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
273
+ className: I({ color: n }),
274
+ "data-testid": r,
275
+ children: t
276
+ }), R = l("font-primary text-body leading-body font-bold", {
277
+ variants: { color: {
278
+ foreground: "text-foreground",
279
+ muted: "text-muted"
280
+ } },
281
+ defaultVariants: { color: "foreground" }
282
+ }), z = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
283
+ className: R({ color: n }),
284
+ "data-testid": r,
285
+ children: t
286
+ }), B = l("font-primary text-body leading-body font-semibold", {
287
+ variants: { color: {
288
+ foreground: "text-foreground",
289
+ muted: "text-muted"
290
+ } },
291
+ defaultVariants: { color: "foreground" }
292
+ }), V = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
293
+ className: B({ color: n }),
294
+ "data-testid": r,
295
+ children: t
296
+ }), H = l("font-primary text-body leading-body font-medium", {
297
+ variants: { color: {
298
+ foreground: "text-foreground",
299
+ muted: "text-muted"
300
+ } },
301
+ defaultVariants: { color: "foreground" }
302
+ }), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
303
+ className: H({ color: n }),
304
+ "data-testid": r,
305
+ children: t
306
+ }), W = l("font-primary text-body leading-body", {
307
+ variants: { color: {
308
+ foreground: "text-foreground",
309
+ muted: "text-muted"
310
+ } },
311
+ defaultVariants: { color: "foreground" }
312
+ }), G = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
313
+ className: W({ color: n }),
314
+ "data-testid": r,
315
+ children: t
316
+ }), K = l("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), q = l("font-primary text-lede leading-lede text-foreground"), J = l("font-primary text-body leading-body", {
317
+ variants: { color: {
318
+ foreground: "text-foreground",
319
+ muted: "text-muted"
320
+ } },
321
+ defaultVariants: { color: "foreground" }
322
+ }), Y = l("font-primary text-small text-muted"), te = {
323
+ Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
324
+ className: K(),
325
+ "data-testid": n,
326
+ children: t
327
+ }),
328
+ Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
329
+ className: q(),
330
+ children: t
331
+ }),
332
+ Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
333
+ className: J({ color: t }),
334
+ children: n
335
+ }),
336
+ Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
337
+ className: Y(),
338
+ children: t
339
+ })
340
+ }, X = l("transition-colors duration-[var(--motion-duration-color)] rounded-[var(--radius-control)] py-2 sm:py-2 disabled:bg-disabled disabled:hover:bg-disabled-hover cursor-pointer disabled:cursor-not-allowed select-none text-nowrap inline-flex flex-row items-center justify-center gap-2 outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
49
341
  variants: { variant: {
50
- primary: "px-4 sm:px-6 min-w-42 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover focus-visible:ring-primary-ring",
51
- secondary: "px-4 sm:px-6 min-w-42 bg-secondary text-secondary-foreground rounded-lg hover:bg-secondary-hover focus-visible:ring-secondary-ring",
52
- ghost: "px-2 min-w-0 bg-transparent text-foreground hover:underline focus-visible:ring-ring"
342
+ primary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-primary text-primary-foreground hover:bg-primary-hover",
343
+ secondary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-secondary text-secondary-foreground hover:bg-secondary-hover",
344
+ ghost: "px-2 min-w-0 bg-transparent text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] hover:underline-offset-[var(--underline-offset)]"
53
345
  } },
54
346
  defaultVariants: { variant: "primary" }
55
- }), o = ({ children: t, disabled: n, testId: r, variant: i, onClick$: o, ariaLabel: s, type: c = "button" }) => /* @__PURE__ */ e("button", {
56
- type: c,
347
+ }), Z = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
348
+ type: s,
57
349
  "data-testid": r,
58
- className: a({ variant: i }),
59
- onClick: () => o?.next(),
350
+ className: X({ variant: i }),
351
+ onClick: () => a?.next(),
60
352
  disabled: n,
61
- "aria-label": s,
353
+ "aria-label": o,
62
354
  children: t
63
- }), s = {
355
+ }), Q = l("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted", {
356
+ variants: { variant: {
357
+ text: "",
358
+ email: "",
359
+ url: ""
360
+ } },
361
+ defaultVariants: { variant: "text" }
362
+ }), ne = ({ label: a, name: o, variant: s, required: c, invalid: l, disabled: u, defaultValue: d, placeholder: f, autocomplete: p, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
363
+ let y = r(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, l ? S : void 0].filter(Boolean).join(" ") || void 0, w = i(null);
364
+ return n(() => {
365
+ let e = _?.subscribe(() => {
366
+ w.current && (w.current.value = "");
367
+ });
368
+ return () => e?.unsubscribe();
369
+ }, [_]), /* @__PURE__ */ t("div", {
370
+ className: "flex flex-col gap-[var(--space-stack)]",
371
+ children: [
372
+ /* @__PURE__ */ e("label", {
373
+ htmlFor: b,
374
+ className: "font-medium text-foreground",
375
+ children: a
376
+ }),
377
+ /* @__PURE__ */ e("input", {
378
+ ref: w,
379
+ id: b,
380
+ name: o,
381
+ type: s ?? "text",
382
+ className: Q({ variant: s }),
383
+ required: c,
384
+ disabled: u,
385
+ defaultValue: d,
386
+ placeholder: f,
387
+ autoComplete: p,
388
+ "aria-invalid": l || void 0,
389
+ "aria-describedby": C,
390
+ "data-testid": v,
391
+ onInput: (e) => g?.next(e.currentTarget.value)
392
+ }),
393
+ !c && /* @__PURE__ */ e("span", {
394
+ className: "text-muted text-sm",
395
+ children: "optional"
396
+ }),
397
+ m && /* @__PURE__ */ e("p", {
398
+ id: x,
399
+ className: "text-muted text-sm",
400
+ children: m
401
+ }),
402
+ l && /* @__PURE__ */ e("p", {
403
+ id: S,
404
+ className: "text-error text-sm",
405
+ children: h
406
+ })
407
+ ]
408
+ });
409
+ }, re = l("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
410
+ variants: { treatment: {
411
+ prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
412
+ quiet: "text-muted no-underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] transition-colors duration-[var(--motion-duration-color)] hover:text-foreground hover:underline",
413
+ "label-link": "text-inherit no-underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:underline",
414
+ graphic: "text-inherit no-underline"
415
+ } },
416
+ defaultVariants: { treatment: "prose" }
417
+ }), ie = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
418
+ href: t,
419
+ className: re({ treatment: r }),
420
+ target: i ? "_blank" : void 0,
421
+ rel: i ? "noopener noreferrer" : void 0,
422
+ "aria-current": a ? "page" : void 0,
423
+ "data-testid": o,
424
+ children: n
425
+ }), ae = l("block min-h-24 w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted"), oe = ({ label: a, name: o, required: s, invalid: c, disabled: l, defaultValue: u, placeholder: d, autocomplete: f, hint: p, errorMessage: m, onInput$: h, reset$: g, testId: _ }) => {
426
+ let v = r(), y = `${v}-control`, b = `${v}-hint`, x = `${v}-error`, S = [p ? b : void 0, c ? x : void 0].filter(Boolean).join(" ") || void 0, C = i(null);
427
+ return n(() => {
428
+ let e = g?.subscribe(() => {
429
+ C.current && (C.current.value = "");
430
+ });
431
+ return () => e?.unsubscribe();
432
+ }, [g]), /* @__PURE__ */ t("div", {
433
+ className: "flex flex-col gap-[var(--space-stack)]",
434
+ children: [
435
+ /* @__PURE__ */ e("label", {
436
+ htmlFor: y,
437
+ className: "font-medium text-foreground",
438
+ children: a
439
+ }),
440
+ /* @__PURE__ */ e("textarea", {
441
+ ref: C,
442
+ id: y,
443
+ name: o,
444
+ className: ae(),
445
+ required: s,
446
+ disabled: l,
447
+ defaultValue: u,
448
+ placeholder: d,
449
+ autoComplete: f,
450
+ "aria-invalid": c || void 0,
451
+ "aria-describedby": S,
452
+ "data-testid": _,
453
+ onInput: (e) => h?.next(e.currentTarget.value)
454
+ }),
455
+ !s && /* @__PURE__ */ e("span", {
456
+ className: "text-muted text-sm",
457
+ children: "optional"
458
+ }),
459
+ p && /* @__PURE__ */ e("p", {
460
+ id: b,
461
+ className: "text-muted text-sm",
462
+ children: p
463
+ }),
464
+ c && /* @__PURE__ */ e("p", {
465
+ id: x,
466
+ className: "text-error text-sm",
467
+ children: m
468
+ })
469
+ ]
470
+ });
471
+ }, se = l("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
472
+ variants: { edge: {
473
+ none: "",
474
+ rule: "border-t border-solid border-rule"
475
+ } },
476
+ defaultVariants: { edge: "rule" }
477
+ }), ce = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
478
+ className: se({ edge: t }),
479
+ "data-testid": r,
480
+ children: n
481
+ }), le = l("text-sm", {
482
+ variants: { state: {
483
+ idle: "text-muted",
484
+ sending: "text-muted",
485
+ sent: "text-success",
486
+ failed: "text-error"
487
+ } },
488
+ defaultVariants: { state: "idle" }
489
+ }), ue = {
490
+ sent: "status",
491
+ failed: "alert"
492
+ }, de = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
493
+ if (i === "sent" && !s) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
494
+ let l = i !== "sent", u = ue[i];
495
+ return /* @__PURE__ */ t("form", {
496
+ action: n,
497
+ method: r,
498
+ "aria-busy": i === "sending" || void 0,
499
+ "data-testid": c,
500
+ className: "flex max-w-[var(--measure)] flex-col gap-[var(--space-region)]",
501
+ children: [
502
+ l && /* @__PURE__ */ e("div", {
503
+ className: "flex flex-col gap-[var(--space-stack)]",
504
+ children: a
505
+ }),
506
+ l && o && /* @__PURE__ */ e("div", {
507
+ className: "flex flex-row gap-[var(--space-stack)]",
508
+ children: o
509
+ }),
510
+ s && /* @__PURE__ */ e("p", {
511
+ role: u,
512
+ className: le({ state: i }),
513
+ children: s
514
+ })
515
+ ]
516
+ });
517
+ }, fe = l([
518
+ "flex items-baseline justify-between",
519
+ "font-secondary text-label tracking-label text-muted",
520
+ "py-[var(--space-region)] px-[var(--gutter)]",
521
+ "[&_[aria-current=page]]:text-foreground"
522
+ ].join(" "), {
523
+ variants: { edge: {
524
+ none: "",
525
+ rule: "border-b border-solid border-rule"
526
+ } },
527
+ defaultVariants: { edge: "rule" }
528
+ }), pe = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
529
+ className: fe({ edge: n }),
530
+ "data-testid": o,
531
+ children: [/* @__PURE__ */ e("div", { children: r }), /* @__PURE__ */ e("nav", {
532
+ "aria-label": i,
533
+ className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
534
+ children: a
535
+ })]
536
+ }), $ = l("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
537
+ variants: { place: {
538
+ start: "justify-start",
539
+ center: "justify-center",
540
+ between: "justify-between"
541
+ } },
542
+ defaultVariants: { place: "center" }
543
+ }), me = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
544
+ className: $({ place: t }),
545
+ "data-testid": r,
546
+ children: n
547
+ }), he = l("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), ge = l("font-primary text-title leading-title tracking-optical text-foreground"), _e = l("font-primary text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), ve = l("font-primary text-small text-muted max-w-[var(--measure)]"), ye = ({ title: n, lede: r, intro: i, testId: a }) => /* @__PURE__ */ t("header", {
548
+ className: he(),
549
+ "data-testid": a,
550
+ children: [
551
+ /* @__PURE__ */ e("h1", {
552
+ className: ge(),
553
+ children: n
554
+ }),
555
+ r !== void 0 && /* @__PURE__ */ e("p", {
556
+ className: _e(),
557
+ children: r
558
+ }),
559
+ i !== void 0 && /* @__PURE__ */ e("p", {
560
+ className: ve(),
561
+ children: i
562
+ })
563
+ ]
564
+ }), be = l(["py-[var(--space-band)]", "[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"].join(" "), {
565
+ variants: { bleed: {
566
+ inset: "px-[var(--gutter)]",
567
+ full: ""
568
+ } },
569
+ defaultVariants: { bleed: "inset" }
570
+ }), xe = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
571
+ "data-section": "",
572
+ className: be({ bleed: t }),
573
+ "aria-label": n,
574
+ "data-testid": i,
575
+ children: r
576
+ }), Se = {
64
577
  surface: "#ffffff",
65
578
  foreground: "#0f172a",
66
579
  muted: "#64748b",
67
580
  border: "#e2e8f0",
581
+ controlBorder: "#64748b",
582
+ rule: "#808fa3",
583
+ backing: "#f1f5f9",
68
584
  primary: "#8b5cf6",
69
585
  primaryHover: "#7c3aed",
70
586
  primaryForeground: "#f8fafc",
71
- primaryRing: "#a78bfa",
72
587
  secondary: "#0ea5e9",
73
588
  secondaryHover: "#0284c7",
74
589
  secondaryForeground: "#f8fafc",
75
- secondaryRing: "#38bdf8",
76
590
  disabled: "#94a3b8",
77
591
  disabledHover: "#64748b",
78
- ring: "#94a3b8",
592
+ focusRing: "#475569",
593
+ link: "#2563eb",
79
594
  success: "#10b981",
80
595
  warning: "#f59e0b",
81
596
  error: "#d63384",
82
597
  info: "#06b6d4"
83
- }, c = {
598
+ }, Ce = {
84
599
  surface: "#0f172a",
85
600
  foreground: "#f8fafc",
86
601
  muted: "#94a3b8",
87
602
  border: "#334155",
603
+ controlBorder: "#94a3b8",
604
+ rule: "#5b6a80",
605
+ backing: "#1e293b",
88
606
  primary: "#7c3aed",
89
607
  primaryHover: "#8b5cf6",
90
608
  primaryForeground: "#f8fafc",
91
- primaryRing: "#a78bfa",
92
609
  secondary: "#0284c7",
93
610
  secondaryHover: "#0ea5e9",
94
611
  secondaryForeground: "#f8fafc",
95
- secondaryRing: "#38bdf8",
96
612
  disabled: "#475569",
97
613
  disabledHover: "#334155",
98
- ring: "#64748b",
614
+ focusRing: "#cbd5e1",
615
+ link: "#60a5fa",
99
616
  success: "#34d399",
100
617
  warning: "#fbbf24",
101
618
  error: "#f48fb1",
102
619
  info: "#22d3ee"
103
620
  };
104
621
  //#endregion
105
- export { o as Button, c as dark, s as light };
622
+ export { d as Brandmark, Z as Button, m as Checklist, v as DefinitionList, j as Eyebrow, b as Figure, ce as Footer, de as Form, N as H1, F as H2, L as H3, z as H4, V as H5, U as H6, pe as Header, me as Hero, ne as Input, ie as Link, G as P, ye as PageHead, te as Prose, ee as Rail, xe as Section, k as Table, oe as TextArea, Ce as dark, Se as light };