@juwel-development/design-system 1.0.0 → 2.0.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.
- package/dist/design-system.js +541 -36
- package/dist/index.css +1 -1
- package/dist/types/Display/Brandmark/Brandmark.d.ts +50 -0
- package/dist/types/Display/Checklist/Checklist.d.ts +26 -0
- package/dist/types/Display/DefinitionList/DefinitionList.d.ts +41 -0
- package/dist/types/Display/Figure/Figure.d.ts +52 -0
- package/dist/types/Display/Rail/Rail.d.ts +54 -0
- package/dist/types/Display/Table/Table.d.ts +61 -0
- package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +26 -0
- package/dist/types/Display/Typography/H1/H1.d.ts +27 -0
- package/dist/types/Display/Typography/H2/H2.d.ts +24 -0
- package/dist/types/Display/Typography/H3/H3.d.ts +23 -0
- package/dist/types/Display/Typography/H4/H4.d.ts +22 -0
- package/dist/types/Display/Typography/H5/H5.d.ts +23 -0
- package/dist/types/Display/Typography/H6/H6.d.ts +23 -0
- package/dist/types/Display/Typography/P/P.d.ts +25 -0
- package/dist/types/Display/Typography/Prose/Prose.d.ts +42 -0
- package/dist/types/Interaction/Button/Button.d.ts +7 -3
- package/dist/types/Interaction/Input/Input.d.ts +29 -0
- package/dist/types/Interaction/Link/Link.d.ts +27 -0
- package/dist/types/Interaction/TextArea/TextArea.d.ts +25 -0
- package/dist/types/Layout/Footer/Footer.d.ts +34 -0
- package/dist/types/Layout/Form/Form.d.ts +31 -0
- package/dist/types/Layout/Header/Header.d.ts +41 -0
- package/dist/types/Layout/Hero/Hero.d.ts +46 -0
- package/dist/types/Layout/PageHead/PageHead.d.ts +36 -0
- package/dist/types/Layout/Section/Section.d.ts +38 -0
- package/dist/types/Theme/Palette.d.ts +25 -6
- package/dist/types/index.d.ts +25 -1
- package/package.json +1 -1
- package/src/Display/.gitkeep +0 -0
- package/src/Display/Brandmark/Brandmark.tsx +97 -0
- package/src/Display/Checklist/Checklist.tsx +75 -0
- package/src/Display/DefinitionList/DefinitionList.tsx +90 -0
- package/src/Display/Figure/Figure.tsx +116 -0
- package/src/Display/Rail/Rail.tsx +108 -0
- package/src/Display/Table/Table.tsx +191 -0
- package/src/Display/Typography/Eyebrow/Eyebrow.tsx +46 -0
- package/src/Display/Typography/H1/H1.tsx +46 -0
- package/src/Display/Typography/H2/H2.tsx +43 -0
- package/src/Display/Typography/H3/H3.tsx +41 -0
- package/src/Display/Typography/H4/H4.tsx +40 -0
- package/src/Display/Typography/H5/H5.tsx +41 -0
- package/src/Display/Typography/H6/H6.tsx +41 -0
- package/src/Display/Typography/P/P.tsx +38 -0
- package/src/Display/Typography/Prose/Prose.tsx +91 -0
- package/src/Interaction/Button/Button.tsx +16 -9
- package/src/Interaction/Input/Input.tsx +103 -0
- package/src/Interaction/Link/Link.tsx +70 -0
- package/src/Interaction/TextArea/TextArea.tsx +93 -0
- package/src/Layout/.gitkeep +0 -0
- package/src/Layout/Footer/Footer.tsx +60 -0
- package/src/Layout/Form/Form.tsx +102 -0
- package/src/Layout/Header/Header.tsx +84 -0
- package/src/Layout/Hero/Hero.tsx +73 -0
- package/src/Layout/PageHead/PageHead.tsx +79 -0
- package/src/Layout/Section/Section.tsx +79 -0
- package/src/Theme/Palette.ts +38 -12
- package/src/Theme/renderTokens.ts +198 -2
- package/src/index.ts +25 -1
- package/src/tokens.css +126 -9
package/dist/design-system.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useId as n } from "react";
|
|
2
3
|
import './index.css';//#region node_modules/clsx/dist/clsx.mjs
|
|
3
|
-
function
|
|
4
|
-
var
|
|
4
|
+
function r(e) {
|
|
5
|
+
var t, n, i = "";
|
|
5
6
|
if (typeof e == "string" || typeof e == "number") i += e;
|
|
6
7
|
else if (typeof e == "object") {
|
|
7
8
|
if (Array.isArray(e)) {
|
|
8
9
|
var a = e.length;
|
|
9
|
-
for (
|
|
10
|
-
} else for (
|
|
10
|
+
for (t = 0; t < a; t++) e[t] && (n = r(e[t])) && (i && (i += " "), i += n);
|
|
11
|
+
} else for (n in e) e[n] && (i && (i += " "), i += n);
|
|
11
12
|
}
|
|
12
13
|
return i;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
for (var e,
|
|
15
|
+
function i() {
|
|
16
|
+
for (var e, t, n = 0, i = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = r(e)) && (i && (i += " "), i += t);
|
|
16
17
|
return i;
|
|
17
18
|
}
|
|
18
19
|
//#endregion
|
|
19
20
|
//#region node_modules/class-variance-authority/dist/index.mjs
|
|
20
|
-
var
|
|
21
|
-
if (t?.variants == null) return
|
|
22
|
-
let { variants:
|
|
23
|
-
let t = n?.[e],
|
|
21
|
+
var a = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, o = i, s = (e, t) => (n) => {
|
|
22
|
+
if (t?.variants == null) return o(e, n?.class, n?.className);
|
|
23
|
+
let { variants: r, defaultVariants: i } = t, s = Object.keys(r).map((e) => {
|
|
24
|
+
let t = n?.[e], o = i?.[e];
|
|
24
25
|
if (t === null) return null;
|
|
25
|
-
let s =
|
|
26
|
-
return
|
|
26
|
+
let s = a(t) || a(o);
|
|
27
|
+
return r[e][s];
|
|
27
28
|
}), c = 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
|
|
32
|
-
let { class: n, className: r, ...
|
|
33
|
-
return Object.entries(
|
|
32
|
+
return o(e, s, 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
|
-
...
|
|
37
|
+
...i,
|
|
37
38
|
...c
|
|
38
39
|
}[t]) : {
|
|
39
|
-
...
|
|
40
|
+
...i,
|
|
40
41
|
...c
|
|
41
42
|
}[t] === n;
|
|
42
43
|
}) ? [
|
|
@@ -45,61 +46,565 @@ 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
|
-
}
|
|
49
|
+
}, c = s("inline-flex", { variants: { cut: {
|
|
50
|
+
full: "",
|
|
51
|
+
compact: ""
|
|
52
|
+
} } }), l = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
|
|
53
|
+
"aria-hidden": "true",
|
|
54
|
+
"data-cut": n,
|
|
55
|
+
className: c({ 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: c({ cut: n }),
|
|
63
|
+
"data-testid": i,
|
|
64
|
+
children: r
|
|
65
|
+
}), u = s("m-0 list-none p-0"), d = s([
|
|
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(" ")), f = {
|
|
70
|
+
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
|
|
71
|
+
className: u(),
|
|
72
|
+
role: "list",
|
|
73
|
+
"data-testid": n,
|
|
74
|
+
children: t
|
|
75
|
+
}),
|
|
76
|
+
Item: ({ children: t }) => /* @__PURE__ */ e("li", {
|
|
77
|
+
className: d(),
|
|
78
|
+
children: t
|
|
79
|
+
})
|
|
80
|
+
}, p = s([
|
|
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(" ")), m = s("font-primary text-subtitle leading-subtitle text-foreground"), h = s("font-primary text-body leading-body text-muted max-w-[var(--measure)]"), g = {
|
|
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: p(),
|
|
92
|
+
"data-testid": n,
|
|
93
|
+
children: t
|
|
94
|
+
}),
|
|
95
|
+
Term: ({ children: t }) => /* @__PURE__ */ e("dt", {
|
|
96
|
+
className: m(),
|
|
97
|
+
children: t
|
|
98
|
+
}),
|
|
99
|
+
Description: ({ children: t }) => /* @__PURE__ */ e("dd", {
|
|
100
|
+
className: h(),
|
|
101
|
+
children: t
|
|
102
|
+
})
|
|
103
|
+
}, _ = s("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
|
+
}), v = ({ 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: _({
|
|
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
|
+
}, y = s(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), b = s("lg:sticky lg:top-6"), x = s("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), ee = s("block pt-1 font-secondary text-label tracking-label text-foreground"), S = {
|
|
146
|
+
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
147
|
+
className: y(),
|
|
148
|
+
"data-testid": n,
|
|
149
|
+
children: t
|
|
150
|
+
}),
|
|
151
|
+
Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
|
|
152
|
+
className: b(),
|
|
153
|
+
"data-testid": i,
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
children: [n !== void 0 && /* @__PURE__ */ e("span", {
|
|
156
|
+
className: x(),
|
|
157
|
+
children: n
|
|
158
|
+
}), /* @__PURE__ */ e("span", {
|
|
159
|
+
className: ee(),
|
|
160
|
+
children: r
|
|
161
|
+
})]
|
|
162
|
+
}),
|
|
163
|
+
Content: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
164
|
+
"data-testid": n,
|
|
165
|
+
children: t
|
|
166
|
+
})
|
|
167
|
+
}, C = s([
|
|
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(" ")), w = s("border-t border-solid border-border"), T = s("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
|
+
}), E = s("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
|
+
}), D = {
|
|
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: C(),
|
|
204
|
+
"data-testid": a,
|
|
205
|
+
"aria-label": n,
|
|
206
|
+
tabIndex: 0,
|
|
207
|
+
children: o
|
|
208
|
+
}) : /* @__PURE__ */ e("div", {
|
|
209
|
+
className: C(),
|
|
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: w(),
|
|
220
|
+
"data-testid": n,
|
|
221
|
+
children: t
|
|
222
|
+
}),
|
|
223
|
+
HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
|
|
224
|
+
scope: t,
|
|
225
|
+
className: E({ align: n }),
|
|
226
|
+
children: r
|
|
227
|
+
}),
|
|
228
|
+
Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
|
|
229
|
+
className: T({
|
|
230
|
+
variant: t,
|
|
231
|
+
align: n
|
|
232
|
+
}),
|
|
233
|
+
"data-variant": t ?? "value",
|
|
234
|
+
children: r
|
|
235
|
+
})
|
|
236
|
+
}, O = s("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
|
+
}), k = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
243
|
+
className: O({ color: n }),
|
|
244
|
+
"data-testid": r,
|
|
245
|
+
children: t
|
|
246
|
+
}), A = s("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
|
+
}), j = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
|
|
253
|
+
className: A({ color: n }),
|
|
254
|
+
"data-testid": r,
|
|
255
|
+
children: t
|
|
256
|
+
}), M = s("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
|
+
}), N = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
|
|
263
|
+
className: M({ color: n }),
|
|
264
|
+
"data-testid": r,
|
|
265
|
+
children: t
|
|
266
|
+
}), P = s("font-primary text-subtitle leading-subtitle", {
|
|
267
|
+
variants: { color: {
|
|
268
|
+
foreground: "text-foreground",
|
|
269
|
+
muted: "text-muted"
|
|
270
|
+
} },
|
|
271
|
+
defaultVariants: { color: "foreground" }
|
|
272
|
+
}), F = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
|
|
273
|
+
className: P({ color: n }),
|
|
274
|
+
"data-testid": r,
|
|
275
|
+
children: t
|
|
276
|
+
}), I = s("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
|
+
}), L = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
|
|
283
|
+
className: I({ color: n }),
|
|
284
|
+
"data-testid": r,
|
|
285
|
+
children: t
|
|
286
|
+
}), R = s("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
|
+
}), z = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
|
|
293
|
+
className: R({ color: n }),
|
|
294
|
+
"data-testid": r,
|
|
295
|
+
children: t
|
|
296
|
+
}), B = s("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
|
+
}), V = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
|
|
303
|
+
className: B({ color: n }),
|
|
304
|
+
"data-testid": r,
|
|
305
|
+
children: t
|
|
306
|
+
}), H = s("font-primary text-body leading-body", {
|
|
307
|
+
variants: { color: {
|
|
308
|
+
foreground: "text-foreground",
|
|
309
|
+
muted: "text-muted"
|
|
310
|
+
} },
|
|
311
|
+
defaultVariants: { color: "foreground" }
|
|
312
|
+
}), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
313
|
+
className: H({ color: n }),
|
|
314
|
+
"data-testid": r,
|
|
315
|
+
children: t
|
|
316
|
+
}), W = s("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), G = s("font-primary text-lede leading-lede text-foreground"), te = s("font-primary text-body leading-body", {
|
|
317
|
+
variants: { color: {
|
|
318
|
+
foreground: "text-foreground",
|
|
319
|
+
muted: "text-muted"
|
|
320
|
+
} },
|
|
321
|
+
defaultVariants: { color: "foreground" }
|
|
322
|
+
}), K = s("font-primary text-small text-muted"), q = {
|
|
323
|
+
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
324
|
+
className: W(),
|
|
325
|
+
"data-testid": n,
|
|
326
|
+
children: t
|
|
327
|
+
}),
|
|
328
|
+
Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
329
|
+
className: G(),
|
|
330
|
+
children: t
|
|
331
|
+
}),
|
|
332
|
+
Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
|
|
333
|
+
className: te({ color: t }),
|
|
334
|
+
children: n
|
|
335
|
+
}),
|
|
336
|
+
Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
337
|
+
className: K(),
|
|
338
|
+
children: t
|
|
339
|
+
})
|
|
340
|
+
}, J = s("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
|
|
51
|
-
secondary: "px-4 sm:px-6 min-w-42 bg-secondary text-secondary-foreground
|
|
52
|
-
ghost: "px-2 min-w-0 bg-transparent text-foreground hover:underline
|
|
342
|
+
primary: "px-4 sm:px-6 min-w-42 bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
343
|
+
secondary: "px-4 sm:px-6 min-w-42 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
|
-
}),
|
|
56
|
-
type:
|
|
347
|
+
}), Y = ({ 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:
|
|
59
|
-
onClick: () =>
|
|
350
|
+
className: J({ variant: i }),
|
|
351
|
+
onClick: () => a?.next(),
|
|
60
352
|
disabled: n,
|
|
61
|
-
"aria-label":
|
|
353
|
+
"aria-label": o,
|
|
62
354
|
children: t
|
|
63
|
-
}), s = {
|
|
355
|
+
}), X = s("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
|
+
}), Z = ({ label: r, name: i, variant: a, required: o, invalid: s, disabled: c, defaultValue: l, placeholder: u, autocomplete: d, hint: f, errorMessage: p, onInput$: m, testId: h }) => {
|
|
363
|
+
let g = n(), _ = `${g}-control`, v = `${g}-hint`, y = `${g}-error`, b = [f ? v : void 0, s ? y : void 0].filter(Boolean).join(" ") || void 0;
|
|
364
|
+
return /* @__PURE__ */ t("div", {
|
|
365
|
+
className: "flex flex-col gap-[var(--space-stack)]",
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ e("label", {
|
|
368
|
+
htmlFor: _,
|
|
369
|
+
className: "font-medium text-foreground",
|
|
370
|
+
children: r
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ e("input", {
|
|
373
|
+
id: _,
|
|
374
|
+
name: i,
|
|
375
|
+
type: a ?? "text",
|
|
376
|
+
className: X({ variant: a }),
|
|
377
|
+
required: o,
|
|
378
|
+
disabled: c,
|
|
379
|
+
defaultValue: l,
|
|
380
|
+
placeholder: u,
|
|
381
|
+
autoComplete: d,
|
|
382
|
+
"aria-invalid": s || void 0,
|
|
383
|
+
"aria-describedby": b,
|
|
384
|
+
"data-testid": h,
|
|
385
|
+
onInput: (e) => m?.next(e.currentTarget.value)
|
|
386
|
+
}),
|
|
387
|
+
!o && /* @__PURE__ */ e("span", {
|
|
388
|
+
className: "text-muted text-sm",
|
|
389
|
+
children: "optional"
|
|
390
|
+
}),
|
|
391
|
+
f && /* @__PURE__ */ e("p", {
|
|
392
|
+
id: v,
|
|
393
|
+
className: "text-muted text-sm",
|
|
394
|
+
children: f
|
|
395
|
+
}),
|
|
396
|
+
s && /* @__PURE__ */ e("p", {
|
|
397
|
+
id: y,
|
|
398
|
+
className: "text-error text-sm",
|
|
399
|
+
children: p
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
});
|
|
403
|
+
}, Q = s("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
404
|
+
variants: { treatment: {
|
|
405
|
+
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
406
|
+
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",
|
|
407
|
+
"label-link": "text-inherit no-underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:underline",
|
|
408
|
+
graphic: "text-inherit no-underline"
|
|
409
|
+
} },
|
|
410
|
+
defaultVariants: { treatment: "prose" }
|
|
411
|
+
}), ne = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
|
|
412
|
+
href: t,
|
|
413
|
+
className: Q({ treatment: r }),
|
|
414
|
+
target: i ? "_blank" : void 0,
|
|
415
|
+
rel: i ? "noopener noreferrer" : void 0,
|
|
416
|
+
"aria-current": a ? "page" : void 0,
|
|
417
|
+
"data-testid": o,
|
|
418
|
+
children: n
|
|
419
|
+
}), re = s("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"), ie = ({ label: r, name: i, required: a, invalid: o, disabled: s, defaultValue: c, placeholder: l, autocomplete: u, hint: d, errorMessage: f, onInput$: p, testId: m }) => {
|
|
420
|
+
let h = n(), g = `${h}-control`, _ = `${h}-hint`, v = `${h}-error`, y = [d ? _ : void 0, o ? v : void 0].filter(Boolean).join(" ") || void 0;
|
|
421
|
+
return /* @__PURE__ */ t("div", {
|
|
422
|
+
className: "flex flex-col gap-[var(--space-stack)]",
|
|
423
|
+
children: [
|
|
424
|
+
/* @__PURE__ */ e("label", {
|
|
425
|
+
htmlFor: g,
|
|
426
|
+
className: "font-medium text-foreground",
|
|
427
|
+
children: r
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ e("textarea", {
|
|
430
|
+
id: g,
|
|
431
|
+
name: i,
|
|
432
|
+
className: re(),
|
|
433
|
+
required: a,
|
|
434
|
+
disabled: s,
|
|
435
|
+
defaultValue: c,
|
|
436
|
+
placeholder: l,
|
|
437
|
+
autoComplete: u,
|
|
438
|
+
"aria-invalid": o || void 0,
|
|
439
|
+
"aria-describedby": y,
|
|
440
|
+
"data-testid": m,
|
|
441
|
+
onInput: (e) => p?.next(e.currentTarget.value)
|
|
442
|
+
}),
|
|
443
|
+
!a && /* @__PURE__ */ e("span", {
|
|
444
|
+
className: "text-muted text-sm",
|
|
445
|
+
children: "optional"
|
|
446
|
+
}),
|
|
447
|
+
d && /* @__PURE__ */ e("p", {
|
|
448
|
+
id: _,
|
|
449
|
+
className: "text-muted text-sm",
|
|
450
|
+
children: d
|
|
451
|
+
}),
|
|
452
|
+
o && /* @__PURE__ */ e("p", {
|
|
453
|
+
id: v,
|
|
454
|
+
className: "text-error text-sm",
|
|
455
|
+
children: f
|
|
456
|
+
})
|
|
457
|
+
]
|
|
458
|
+
});
|
|
459
|
+
}, ae = s("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
460
|
+
variants: { edge: {
|
|
461
|
+
none: "",
|
|
462
|
+
rule: "border-t border-solid border-rule"
|
|
463
|
+
} },
|
|
464
|
+
defaultVariants: { edge: "rule" }
|
|
465
|
+
}), oe = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
|
|
466
|
+
className: ae({ edge: t }),
|
|
467
|
+
"data-testid": r,
|
|
468
|
+
children: n
|
|
469
|
+
}), se = s("text-sm", {
|
|
470
|
+
variants: { state: {
|
|
471
|
+
idle: "text-muted",
|
|
472
|
+
sending: "text-muted",
|
|
473
|
+
sent: "text-success",
|
|
474
|
+
failed: "text-error"
|
|
475
|
+
} },
|
|
476
|
+
defaultVariants: { state: "idle" }
|
|
477
|
+
}), ce = {
|
|
478
|
+
sent: "status",
|
|
479
|
+
failed: "alert"
|
|
480
|
+
}, le = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
481
|
+
if (i === "sent" && !s) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
|
|
482
|
+
let l = i !== "sent", u = ce[i];
|
|
483
|
+
return /* @__PURE__ */ t("form", {
|
|
484
|
+
action: n,
|
|
485
|
+
method: r,
|
|
486
|
+
"aria-busy": i === "sending" || void 0,
|
|
487
|
+
"data-testid": c,
|
|
488
|
+
className: "flex max-w-[var(--measure)] flex-col gap-[var(--space-region)]",
|
|
489
|
+
children: [
|
|
490
|
+
l && /* @__PURE__ */ e("div", {
|
|
491
|
+
className: "flex flex-col gap-[var(--space-stack)]",
|
|
492
|
+
children: a
|
|
493
|
+
}),
|
|
494
|
+
l && o && /* @__PURE__ */ e("div", {
|
|
495
|
+
className: "flex flex-row gap-[var(--space-stack)]",
|
|
496
|
+
children: o
|
|
497
|
+
}),
|
|
498
|
+
s && /* @__PURE__ */ e("p", {
|
|
499
|
+
role: u,
|
|
500
|
+
className: se({ state: i }),
|
|
501
|
+
children: s
|
|
502
|
+
})
|
|
503
|
+
]
|
|
504
|
+
});
|
|
505
|
+
}, ue = s([
|
|
506
|
+
"flex items-baseline justify-between",
|
|
507
|
+
"font-secondary text-label tracking-label text-muted",
|
|
508
|
+
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
509
|
+
"[&_[aria-current=page]]:text-foreground"
|
|
510
|
+
].join(" "), {
|
|
511
|
+
variants: { edge: {
|
|
512
|
+
none: "",
|
|
513
|
+
rule: "border-b border-solid border-rule"
|
|
514
|
+
} },
|
|
515
|
+
defaultVariants: { edge: "rule" }
|
|
516
|
+
}), de = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
|
|
517
|
+
className: ue({ edge: n }),
|
|
518
|
+
"data-testid": o,
|
|
519
|
+
children: [/* @__PURE__ */ e("div", { children: r }), /* @__PURE__ */ e("nav", {
|
|
520
|
+
"aria-label": i,
|
|
521
|
+
className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
|
|
522
|
+
children: a
|
|
523
|
+
})]
|
|
524
|
+
}), fe = s("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
525
|
+
variants: { place: {
|
|
526
|
+
start: "justify-start",
|
|
527
|
+
center: "justify-center",
|
|
528
|
+
between: "justify-between"
|
|
529
|
+
} },
|
|
530
|
+
defaultVariants: { place: "center" }
|
|
531
|
+
}), pe = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
|
|
532
|
+
className: fe({ place: t }),
|
|
533
|
+
"data-testid": r,
|
|
534
|
+
children: n
|
|
535
|
+
}), $ = s("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), me = s("font-primary text-title leading-title tracking-optical text-foreground"), he = s("font-primary text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), ge = s("font-primary text-small text-muted max-w-[var(--measure)]"), _e = ({ title: n, lede: r, intro: i, testId: a }) => /* @__PURE__ */ t("header", {
|
|
536
|
+
className: $(),
|
|
537
|
+
"data-testid": a,
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ e("h1", {
|
|
540
|
+
className: me(),
|
|
541
|
+
children: n
|
|
542
|
+
}),
|
|
543
|
+
r !== void 0 && /* @__PURE__ */ e("p", {
|
|
544
|
+
className: he(),
|
|
545
|
+
children: r
|
|
546
|
+
}),
|
|
547
|
+
i !== void 0 && /* @__PURE__ */ e("p", {
|
|
548
|
+
className: ge(),
|
|
549
|
+
children: i
|
|
550
|
+
})
|
|
551
|
+
]
|
|
552
|
+
}), ve = s(["py-[var(--space-band)]", "[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"].join(" "), {
|
|
553
|
+
variants: { bleed: {
|
|
554
|
+
inset: "px-[var(--gutter)]",
|
|
555
|
+
full: ""
|
|
556
|
+
} },
|
|
557
|
+
defaultVariants: { bleed: "inset" }
|
|
558
|
+
}), ye = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
|
|
559
|
+
"data-section": "",
|
|
560
|
+
className: ve({ bleed: t }),
|
|
561
|
+
"aria-label": n,
|
|
562
|
+
"data-testid": i,
|
|
563
|
+
children: r
|
|
564
|
+
}), be = {
|
|
64
565
|
surface: "#ffffff",
|
|
65
566
|
foreground: "#0f172a",
|
|
66
567
|
muted: "#64748b",
|
|
67
568
|
border: "#e2e8f0",
|
|
569
|
+
controlBorder: "#64748b",
|
|
570
|
+
rule: "#808fa3",
|
|
571
|
+
backing: "#f1f5f9",
|
|
68
572
|
primary: "#8b5cf6",
|
|
69
573
|
primaryHover: "#7c3aed",
|
|
70
574
|
primaryForeground: "#f8fafc",
|
|
71
|
-
primaryRing: "#a78bfa",
|
|
72
575
|
secondary: "#0ea5e9",
|
|
73
576
|
secondaryHover: "#0284c7",
|
|
74
577
|
secondaryForeground: "#f8fafc",
|
|
75
|
-
secondaryRing: "#38bdf8",
|
|
76
578
|
disabled: "#94a3b8",
|
|
77
579
|
disabledHover: "#64748b",
|
|
78
|
-
|
|
580
|
+
focusRing: "#475569",
|
|
581
|
+
link: "#2563eb",
|
|
79
582
|
success: "#10b981",
|
|
80
583
|
warning: "#f59e0b",
|
|
81
584
|
error: "#d63384",
|
|
82
585
|
info: "#06b6d4"
|
|
83
|
-
},
|
|
586
|
+
}, xe = {
|
|
84
587
|
surface: "#0f172a",
|
|
85
588
|
foreground: "#f8fafc",
|
|
86
589
|
muted: "#94a3b8",
|
|
87
590
|
border: "#334155",
|
|
591
|
+
controlBorder: "#94a3b8",
|
|
592
|
+
rule: "#5b6a80",
|
|
593
|
+
backing: "#1e293b",
|
|
88
594
|
primary: "#7c3aed",
|
|
89
595
|
primaryHover: "#8b5cf6",
|
|
90
596
|
primaryForeground: "#f8fafc",
|
|
91
|
-
primaryRing: "#a78bfa",
|
|
92
597
|
secondary: "#0284c7",
|
|
93
598
|
secondaryHover: "#0ea5e9",
|
|
94
599
|
secondaryForeground: "#f8fafc",
|
|
95
|
-
secondaryRing: "#38bdf8",
|
|
96
600
|
disabled: "#475569",
|
|
97
601
|
disabledHover: "#334155",
|
|
98
|
-
|
|
602
|
+
focusRing: "#cbd5e1",
|
|
603
|
+
link: "#60a5fa",
|
|
99
604
|
success: "#34d399",
|
|
100
605
|
warning: "#fbbf24",
|
|
101
606
|
error: "#f48fb1",
|
|
102
607
|
info: "#22d3ee"
|
|
103
608
|
};
|
|
104
609
|
//#endregion
|
|
105
|
-
export {
|
|
610
|
+
export { l as Brandmark, Y as Button, f as Checklist, g as DefinitionList, k as Eyebrow, v as Figure, oe as Footer, le as Form, j as H1, N as H2, F as H3, L as H4, z as H5, V as H6, de as Header, pe as Hero, Z as Input, ne as Link, U as P, _e as PageHead, q as Prose, S as Rail, ye as Section, D as Table, ie as TextArea, xe as dark, be as light };
|