@juwel-development/design-system 3.1.0 → 3.3.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/README.md +32 -0
- package/dist/design-system.js +330 -134
- package/dist/index.css +1 -1
- package/dist/types/Arrangement/Stack/Stack.d.ts +23 -5
- package/dist/types/Display/Collection/Collection.d.ts +30 -0
- package/dist/types/Interaction/Tabs/Tabs.d.ts +79 -0
- package/dist/types/Interaction/Tabs/TabsCompositionError.d.ts +3 -0
- package/dist/types/Layout/Cover/Cover.d.ts +48 -0
- package/dist/types/Layout/Sidebar/Sidebar.d.ts +69 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/Arrangement/Stack/Stack.tsx +39 -13
- package/src/Display/Collection/Collection.tsx +58 -0
- package/src/Interaction/Tabs/Tabs.tsx +284 -0
- package/src/Interaction/Tabs/TabsCompositionError.ts +6 -0
- package/src/Layout/Cover/Cover.tsx +85 -0
- package/src/Layout/Sidebar/Sidebar.tsx +224 -0
- package/src/Theme/renderTokens.ts +50 -6
- package/src/index.ts +4 -0
- package/src/tokens.css +24 -1
- package/src/tokens.dark.css +24 -1
- package/src/tokens.light.css +24 -1
package/dist/design-system.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Children as n, createContext as r, isValidElement as i, useContext as a, useEffect as o, useId as s, useRef as c } from "react";
|
|
3
3
|
import './index.css';//#region node_modules/clsx/dist/clsx.mjs
|
|
4
|
-
function
|
|
4
|
+
function l(e) {
|
|
5
5
|
var t, n, r = "";
|
|
6
6
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
7
7
|
else if (typeof e == "object") {
|
|
8
8
|
if (Array.isArray(e)) {
|
|
9
9
|
var i = e.length;
|
|
10
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
10
|
+
for (t = 0; t < i; t++) e[t] && (n = l(e[t])) && (r && (r += " "), r += n);
|
|
11
11
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
15
|
+
function u() {
|
|
16
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = l(e)) && (r && (r += " "), r += t);
|
|
17
17
|
return r;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region node_modules/class-variance-authority/dist/index.mjs
|
|
21
|
-
var
|
|
22
|
-
if (t?.variants == null) return
|
|
21
|
+
var d = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, f = u, p = (e, t) => (n) => {
|
|
22
|
+
if (t?.variants == null) return f(e, n?.class, n?.className);
|
|
23
23
|
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
24
24
|
let t = n?.[e], a = i?.[e];
|
|
25
25
|
if (t === null) return null;
|
|
26
|
-
let o =
|
|
26
|
+
let o = d(t) || d(a);
|
|
27
27
|
return r[e][o];
|
|
28
28
|
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
29
29
|
let [n, r] = t;
|
|
30
30
|
return r === void 0 || (e[n] = r), e;
|
|
31
31
|
}, {});
|
|
32
|
-
return
|
|
32
|
+
return f(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
33
33
|
let { class: n, className: r, ...a } = t;
|
|
34
34
|
return Object.entries(a).every((e) => {
|
|
35
35
|
let [t, n] = e;
|
|
@@ -46,7 +46,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
46
46
|
r
|
|
47
47
|
] : e;
|
|
48
48
|
}, []), n?.class, n?.className);
|
|
49
|
-
},
|
|
49
|
+
}, m = p("flex flex-wrap items-baseline gap-y-[var(--space-stack)]", {
|
|
50
50
|
variants: {
|
|
51
51
|
gap: {
|
|
52
52
|
stack: "gap-x-[var(--space-stack)]",
|
|
@@ -61,14 +61,14 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
61
61
|
gap: "region",
|
|
62
62
|
justify: "start"
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
65
|
-
className:
|
|
64
|
+
}), h = ({ gap: t, justify: n, children: r, testId: i }) => /* @__PURE__ */ e("div", {
|
|
65
|
+
className: m({
|
|
66
66
|
gap: t,
|
|
67
67
|
justify: n
|
|
68
68
|
}),
|
|
69
69
|
"data-testid": i,
|
|
70
70
|
children: r
|
|
71
|
-
}),
|
|
71
|
+
}), g = p("flex", {
|
|
72
72
|
variants: {
|
|
73
73
|
gap: {
|
|
74
74
|
stack: "gap-[var(--space-stack)]",
|
|
@@ -76,7 +76,12 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
76
76
|
},
|
|
77
77
|
measure: {
|
|
78
78
|
true: "max-w-[var(--measure)]",
|
|
79
|
-
false: ""
|
|
79
|
+
false: "",
|
|
80
|
+
action: "w-[var(--measure-action)] max-w-full mx-auto"
|
|
81
|
+
},
|
|
82
|
+
align: {
|
|
83
|
+
start: "text-start",
|
|
84
|
+
center: "text-center"
|
|
80
85
|
},
|
|
81
86
|
direction: {
|
|
82
87
|
column: "flex-col",
|
|
@@ -88,69 +93,82 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
88
93
|
measure: !1,
|
|
89
94
|
direction: "column"
|
|
90
95
|
}
|
|
91
|
-
}),
|
|
92
|
-
className:
|
|
96
|
+
}), _ = ({ gap: t, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ e("div", {
|
|
97
|
+
className: g({
|
|
93
98
|
gap: t,
|
|
94
99
|
measure: n,
|
|
95
|
-
direction: r
|
|
100
|
+
direction: r,
|
|
101
|
+
align: i
|
|
96
102
|
}),
|
|
97
|
-
"data-testid":
|
|
98
|
-
children:
|
|
99
|
-
}),
|
|
103
|
+
"data-testid": o,
|
|
104
|
+
children: a
|
|
105
|
+
}), v = p("inline-flex", { variants: { cut: {
|
|
100
106
|
full: "",
|
|
101
107
|
compact: ""
|
|
102
|
-
} } }),
|
|
108
|
+
} } }), y = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
|
|
103
109
|
"aria-hidden": "true",
|
|
104
110
|
"data-cut": n,
|
|
105
|
-
className:
|
|
111
|
+
className: v({ cut: n }),
|
|
106
112
|
"data-testid": i,
|
|
107
113
|
children: r
|
|
108
114
|
}) : /* @__PURE__ */ e("span", {
|
|
109
115
|
role: "img",
|
|
110
116
|
"aria-label": t,
|
|
111
117
|
"data-cut": n,
|
|
112
|
-
className:
|
|
118
|
+
className: v({ cut: n }),
|
|
113
119
|
"data-testid": i,
|
|
114
120
|
children: r
|
|
115
|
-
}),
|
|
121
|
+
}), b = p("m-0 list-none p-0"), x = p([
|
|
116
122
|
"flex items-start gap-3 font-primary text-body leading-body text-foreground",
|
|
117
123
|
"before:mt-[0.35em] before:size-[calc(var(--tick-length)*0.7)] before:shrink-0 before:rotate-45 before:[border-top:var(--tick-thickness)_solid_var(--color-rule)] before:[border-right:var(--tick-thickness)_solid_var(--color-rule)] before:content-['']",
|
|
118
124
|
"[&: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)]"
|
|
119
|
-
].join(" ")),
|
|
125
|
+
].join(" ")), S = {
|
|
120
126
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
|
|
121
|
-
className:
|
|
127
|
+
className: b(),
|
|
122
128
|
role: "list",
|
|
123
129
|
"data-testid": n,
|
|
124
130
|
children: t
|
|
125
131
|
}),
|
|
126
132
|
Item: ({ children: t }) => /* @__PURE__ */ e("li", {
|
|
127
|
-
className:
|
|
133
|
+
className: x(),
|
|
128
134
|
children: t
|
|
129
135
|
})
|
|
130
|
-
},
|
|
136
|
+
}, C = p("m-0 list-none p-0"), w = p("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), T = {
|
|
137
|
+
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
|
|
138
|
+
className: C(),
|
|
139
|
+
role: "list",
|
|
140
|
+
"data-testid": n,
|
|
141
|
+
children: t
|
|
142
|
+
}),
|
|
143
|
+
Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("li", {
|
|
144
|
+
className: w(),
|
|
145
|
+
"data-testid": n,
|
|
146
|
+
children: t
|
|
147
|
+
})
|
|
148
|
+
}, E = p([
|
|
131
149
|
"grid gap-[var(--space-stack)] py-6",
|
|
132
150
|
"border-b border-solid border-border first:border-t",
|
|
133
151
|
"lg:grid-cols-[16rem_minmax(0,1fr)] lg:items-baseline lg:gap-x-12",
|
|
134
152
|
"lg:[&>dt]:col-start-1 lg:[&>dd]:col-start-2 lg:[&>dd]:row-start-1"
|
|
135
|
-
].join(" ")),
|
|
153
|
+
].join(" ")), ee = p("font-primary text-subtitle leading-subtitle text-foreground"), te = p("font-primary text-body leading-body text-muted max-w-[var(--measure)]"), ne = {
|
|
136
154
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("dl", {
|
|
137
155
|
"data-testid": n,
|
|
138
156
|
children: t
|
|
139
157
|
}),
|
|
140
158
|
Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
141
|
-
className:
|
|
159
|
+
className: E(),
|
|
142
160
|
"data-testid": n,
|
|
143
161
|
children: t
|
|
144
162
|
}),
|
|
145
163
|
Term: ({ children: t }) => /* @__PURE__ */ e("dt", {
|
|
146
|
-
className:
|
|
164
|
+
className: ee(),
|
|
147
165
|
children: t
|
|
148
166
|
}),
|
|
149
167
|
Description: ({ children: t }) => /* @__PURE__ */ e("dd", {
|
|
150
|
-
className:
|
|
168
|
+
className: te(),
|
|
151
169
|
children: t
|
|
152
170
|
})
|
|
153
|
-
},
|
|
171
|
+
}, re = p("block w-full object-cover bg-backing", {
|
|
154
172
|
variants: {
|
|
155
173
|
ratio: {
|
|
156
174
|
portrait: "aspect-portrait",
|
|
@@ -167,13 +185,13 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
167
185
|
}
|
|
168
186
|
},
|
|
169
187
|
defaultVariants: { focus: "center" }
|
|
170
|
-
}),
|
|
188
|
+
}), ie = ({ src: n, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
|
|
171
189
|
let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ e("img", {
|
|
172
190
|
src: n,
|
|
173
191
|
alt: r,
|
|
174
192
|
width: i,
|
|
175
193
|
height: a,
|
|
176
|
-
className:
|
|
194
|
+
className: re({
|
|
177
195
|
ratio: o,
|
|
178
196
|
focus: s
|
|
179
197
|
}),
|
|
@@ -196,21 +214,21 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
196
214
|
children: l
|
|
197
215
|
})]
|
|
198
216
|
});
|
|
199
|
-
},
|
|
217
|
+
}, ae = p(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), oe = p("lg:sticky lg:top-6"), se = p("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), ce = p("block pt-1 font-secondary text-label tracking-label text-foreground"), le = {
|
|
200
218
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
201
|
-
className:
|
|
219
|
+
className: ae(),
|
|
202
220
|
"data-testid": n,
|
|
203
221
|
children: t
|
|
204
222
|
}),
|
|
205
223
|
Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
|
|
206
|
-
className:
|
|
224
|
+
className: oe(),
|
|
207
225
|
"data-testid": i,
|
|
208
226
|
"aria-hidden": "true",
|
|
209
227
|
children: [n !== void 0 && /* @__PURE__ */ e("span", {
|
|
210
|
-
className:
|
|
228
|
+
className: se(),
|
|
211
229
|
children: n
|
|
212
230
|
}), /* @__PURE__ */ e("span", {
|
|
213
|
-
className:
|
|
231
|
+
className: ce(),
|
|
214
232
|
children: r
|
|
215
233
|
})]
|
|
216
234
|
}),
|
|
@@ -218,7 +236,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
218
236
|
"data-testid": n,
|
|
219
237
|
children: t
|
|
220
238
|
})
|
|
221
|
-
},
|
|
239
|
+
}, D = p([
|
|
222
240
|
"[&:not([data-notes])]:overflow-x-auto",
|
|
223
241
|
"[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
|
|
224
242
|
"[&_caption]:pb-3 [&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
|
|
@@ -227,7 +245,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
227
245
|
"[&[data-notes=content]>table]:max-md:block",
|
|
228
246
|
"[&[data-notes=content]_thead]:max-md:block [&[data-notes=content]_tbody]:max-md:block [&[data-notes=content]_tfoot]:max-md:block",
|
|
229
247
|
"[&[data-notes=content]_tr]:max-md:block [&[data-notes=content]_td]:max-md:block [&[data-notes=content]_th]:max-md:block"
|
|
230
|
-
].join(" ")),
|
|
248
|
+
].join(" ")), O = p("border-t border-solid border-border"), k = p("px-4 py-2 text-small first:pl-0 last:pr-0", {
|
|
231
249
|
variants: {
|
|
232
250
|
variant: {
|
|
233
251
|
value: "font-primary text-foreground tabular-nums",
|
|
@@ -243,24 +261,24 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
243
261
|
variant: "value",
|
|
244
262
|
align: "left"
|
|
245
263
|
}
|
|
246
|
-
}),
|
|
264
|
+
}), A = p("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
|
|
247
265
|
variants: { align: {
|
|
248
266
|
left: "text-left",
|
|
249
267
|
right: "text-right",
|
|
250
268
|
center: "text-center"
|
|
251
269
|
} },
|
|
252
270
|
defaultVariants: { align: "left" }
|
|
253
|
-
}),
|
|
271
|
+
}), j = {
|
|
254
272
|
Root: ({ caption: n, notes: r, children: i, testId: a }) => {
|
|
255
273
|
let o = /* @__PURE__ */ t("table", { children: [/* @__PURE__ */ e("caption", { children: n }), i] });
|
|
256
274
|
return r === void 0 ? /* @__PURE__ */ e("section", {
|
|
257
|
-
className:
|
|
275
|
+
className: D(),
|
|
258
276
|
"data-testid": a,
|
|
259
277
|
"aria-label": n,
|
|
260
278
|
tabIndex: 0,
|
|
261
279
|
children: o
|
|
262
280
|
}) : /* @__PURE__ */ e("div", {
|
|
263
|
-
className:
|
|
281
|
+
className: D(),
|
|
264
282
|
"data-notes": r,
|
|
265
283
|
"data-testid": a,
|
|
266
284
|
children: o
|
|
@@ -270,162 +288,162 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
270
288
|
Body: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
|
|
271
289
|
Footer: ({ children: t }) => /* @__PURE__ */ e("tfoot", { children: t }),
|
|
272
290
|
Row: ({ children: t, testId: n }) => /* @__PURE__ */ e("tr", {
|
|
273
|
-
className:
|
|
291
|
+
className: O(),
|
|
274
292
|
"data-testid": n,
|
|
275
293
|
children: t
|
|
276
294
|
}),
|
|
277
295
|
HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
|
|
278
296
|
scope: t,
|
|
279
|
-
className:
|
|
297
|
+
className: A({ align: n }),
|
|
280
298
|
children: r
|
|
281
299
|
}),
|
|
282
300
|
Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
|
|
283
|
-
className:
|
|
301
|
+
className: k({
|
|
284
302
|
variant: t,
|
|
285
303
|
align: n
|
|
286
304
|
}),
|
|
287
305
|
"data-variant": t ?? "value",
|
|
288
306
|
children: r
|
|
289
307
|
})
|
|
290
|
-
},
|
|
308
|
+
}, M = p("font-secondary text-label tracking-label font-medium", {
|
|
291
309
|
variants: { color: {
|
|
292
310
|
foreground: "text-foreground",
|
|
293
311
|
muted: "text-muted"
|
|
294
312
|
} },
|
|
295
313
|
defaultVariants: { color: "muted" }
|
|
296
|
-
}),
|
|
297
|
-
className:
|
|
314
|
+
}), N = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
315
|
+
className: M({ color: n }),
|
|
298
316
|
"data-testid": r,
|
|
299
317
|
children: t
|
|
300
|
-
}),
|
|
318
|
+
}), P = p("font-primary text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
301
319
|
variants: { color: {
|
|
302
320
|
foreground: "text-foreground",
|
|
303
321
|
muted: "text-muted"
|
|
304
322
|
} },
|
|
305
323
|
defaultVariants: { color: "foreground" }
|
|
306
|
-
}),
|
|
307
|
-
className:
|
|
324
|
+
}), F = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
|
|
325
|
+
className: P({ color: n }),
|
|
308
326
|
"data-testid": r,
|
|
309
327
|
children: t
|
|
310
|
-
}),
|
|
328
|
+
}), I = p("font-primary text-title leading-title tracking-optical", {
|
|
311
329
|
variants: { color: {
|
|
312
330
|
foreground: "text-foreground",
|
|
313
331
|
muted: "text-muted"
|
|
314
332
|
} },
|
|
315
333
|
defaultVariants: { color: "foreground" }
|
|
316
|
-
}),
|
|
317
|
-
className:
|
|
334
|
+
}), L = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
|
|
335
|
+
className: I({ color: n }),
|
|
318
336
|
"data-testid": r,
|
|
319
337
|
children: t
|
|
320
|
-
}),
|
|
338
|
+
}), R = p("font-primary text-subtitle leading-subtitle", {
|
|
321
339
|
variants: { color: {
|
|
322
340
|
foreground: "text-foreground",
|
|
323
341
|
muted: "text-muted"
|
|
324
342
|
} },
|
|
325
343
|
defaultVariants: { color: "foreground" }
|
|
326
|
-
}),
|
|
327
|
-
className:
|
|
344
|
+
}), z = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
|
|
345
|
+
className: R({ color: n }),
|
|
328
346
|
"data-testid": r,
|
|
329
347
|
children: t
|
|
330
|
-
}),
|
|
348
|
+
}), B = p("font-primary text-body leading-body font-bold", {
|
|
331
349
|
variants: { color: {
|
|
332
350
|
foreground: "text-foreground",
|
|
333
351
|
muted: "text-muted"
|
|
334
352
|
} },
|
|
335
353
|
defaultVariants: { color: "foreground" }
|
|
336
|
-
}),
|
|
337
|
-
className:
|
|
354
|
+
}), V = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
|
|
355
|
+
className: B({ color: n }),
|
|
338
356
|
"data-testid": r,
|
|
339
357
|
children: t
|
|
340
|
-
}),
|
|
358
|
+
}), H = p("font-primary text-body leading-body font-semibold", {
|
|
341
359
|
variants: { color: {
|
|
342
360
|
foreground: "text-foreground",
|
|
343
361
|
muted: "text-muted"
|
|
344
362
|
} },
|
|
345
363
|
defaultVariants: { color: "foreground" }
|
|
346
|
-
}),
|
|
347
|
-
className:
|
|
364
|
+
}), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
|
|
365
|
+
className: H({ color: n }),
|
|
348
366
|
"data-testid": r,
|
|
349
367
|
children: t
|
|
350
|
-
}),
|
|
368
|
+
}), W = p("font-primary text-body leading-body font-medium", {
|
|
351
369
|
variants: { color: {
|
|
352
370
|
foreground: "text-foreground",
|
|
353
371
|
muted: "text-muted"
|
|
354
372
|
} },
|
|
355
373
|
defaultVariants: { color: "foreground" }
|
|
356
|
-
}),
|
|
357
|
-
className:
|
|
374
|
+
}), ue = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
|
|
375
|
+
className: W({ color: n }),
|
|
358
376
|
"data-testid": r,
|
|
359
377
|
children: t
|
|
360
|
-
}),
|
|
378
|
+
}), de = p("font-secondary text-small", {
|
|
361
379
|
variants: { color: {
|
|
362
380
|
foreground: "text-foreground",
|
|
363
381
|
muted: "text-muted"
|
|
364
382
|
} },
|
|
365
383
|
defaultVariants: { color: "foreground" }
|
|
366
|
-
}),
|
|
367
|
-
className:
|
|
384
|
+
}), fe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
385
|
+
className: de({ color: n }),
|
|
368
386
|
"data-testid": r,
|
|
369
387
|
children: t
|
|
370
|
-
}),
|
|
388
|
+
}), pe = p("font-primary text-body leading-body", {
|
|
371
389
|
variants: { color: {
|
|
372
390
|
foreground: "text-foreground",
|
|
373
391
|
muted: "text-muted"
|
|
374
392
|
} },
|
|
375
393
|
defaultVariants: { color: "foreground" }
|
|
376
|
-
}),
|
|
377
|
-
className:
|
|
394
|
+
}), me = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
395
|
+
className: pe({ color: n }),
|
|
378
396
|
"data-testid": r,
|
|
379
397
|
children: t
|
|
380
|
-
}),
|
|
398
|
+
}), he = p("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), ge = p("font-primary text-lede leading-lede text-foreground"), _e = p("font-primary text-body leading-body", {
|
|
381
399
|
variants: { color: {
|
|
382
400
|
foreground: "text-foreground",
|
|
383
401
|
muted: "text-muted"
|
|
384
402
|
} },
|
|
385
403
|
defaultVariants: { color: "foreground" }
|
|
386
|
-
}),
|
|
404
|
+
}), ve = p("font-primary text-small text-muted"), ye = {
|
|
387
405
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
388
|
-
className:
|
|
406
|
+
className: he(),
|
|
389
407
|
"data-testid": n,
|
|
390
408
|
children: t
|
|
391
409
|
}),
|
|
392
410
|
Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
393
|
-
className:
|
|
411
|
+
className: ge(),
|
|
394
412
|
children: t
|
|
395
413
|
}),
|
|
396
414
|
Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
|
|
397
|
-
className:
|
|
415
|
+
className: _e({ color: t }),
|
|
398
416
|
children: n
|
|
399
417
|
}),
|
|
400
418
|
Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
401
|
-
className:
|
|
419
|
+
className: ve(),
|
|
402
420
|
children: t
|
|
403
421
|
})
|
|
404
|
-
},
|
|
422
|
+
}, be = p("font-primary text-body 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)]", {
|
|
405
423
|
variants: { variant: {
|
|
406
424
|
primary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
407
425
|
secondary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-secondary text-secondary-foreground hover:bg-secondary-hover",
|
|
408
426
|
ghost: "px-2 min-w-0 bg-transparent text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] hover:underline-offset-[var(--underline-offset)]"
|
|
409
427
|
} },
|
|
410
428
|
defaultVariants: { variant: "primary" }
|
|
411
|
-
}),
|
|
429
|
+
}), xe = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
|
|
412
430
|
type: s,
|
|
413
431
|
"data-testid": r,
|
|
414
|
-
className:
|
|
432
|
+
className: be({ variant: i }),
|
|
415
433
|
onClick: () => a?.next(),
|
|
416
434
|
disabled: n,
|
|
417
435
|
"aria-label": o,
|
|
418
436
|
children: t
|
|
419
|
-
}),
|
|
437
|
+
}), Se = p("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-primary text-body 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", {
|
|
420
438
|
variants: { variant: {
|
|
421
439
|
text: "",
|
|
422
440
|
email: "",
|
|
423
441
|
url: ""
|
|
424
442
|
} },
|
|
425
443
|
defaultVariants: { variant: "text" }
|
|
426
|
-
}),
|
|
427
|
-
let b =
|
|
428
|
-
return
|
|
444
|
+
}), Ce = ({ label: n, name: r, variant: i, required: a, optionalLabel: l, invalid: u, disabled: d, defaultValue: f, placeholder: p, autocomplete: m, hint: h, errorMessage: g, onInput$: _, reset$: v, testId: y }) => {
|
|
445
|
+
let b = s(), x = `${b}-control`, S = `${b}-hint`, C = `${b}-error`, w = [h ? S : void 0, u ? C : void 0].filter(Boolean).join(" ") || void 0, T = c(null);
|
|
446
|
+
return o(() => {
|
|
429
447
|
let e = v?.subscribe(() => {
|
|
430
448
|
T.current && (T.current.value = "");
|
|
431
449
|
});
|
|
@@ -436,15 +454,15 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
436
454
|
/* @__PURE__ */ e("label", {
|
|
437
455
|
htmlFor: x,
|
|
438
456
|
className: "font-secondary font-medium text-body text-foreground",
|
|
439
|
-
children:
|
|
457
|
+
children: n
|
|
440
458
|
}),
|
|
441
459
|
/* @__PURE__ */ e("input", {
|
|
442
460
|
ref: T,
|
|
443
461
|
id: x,
|
|
444
|
-
name:
|
|
445
|
-
type:
|
|
446
|
-
className:
|
|
447
|
-
required:
|
|
462
|
+
name: r,
|
|
463
|
+
type: i ?? "text",
|
|
464
|
+
className: Se({ variant: i }),
|
|
465
|
+
required: a,
|
|
448
466
|
disabled: d,
|
|
449
467
|
defaultValue: f,
|
|
450
468
|
placeholder: p,
|
|
@@ -454,7 +472,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
454
472
|
"data-testid": y,
|
|
455
473
|
onInput: (e) => _?.next(e.currentTarget.value)
|
|
456
474
|
}),
|
|
457
|
-
!
|
|
475
|
+
!a && l && /* @__PURE__ */ e("span", {
|
|
458
476
|
className: "font-secondary text-muted text-small",
|
|
459
477
|
children: l
|
|
460
478
|
}),
|
|
@@ -470,7 +488,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
470
488
|
})
|
|
471
489
|
]
|
|
472
490
|
});
|
|
473
|
-
},
|
|
491
|
+
}, we = p("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
474
492
|
variants: { treatment: {
|
|
475
493
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
476
494
|
quiet: "font-secondary 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",
|
|
@@ -478,17 +496,112 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
478
496
|
graphic: "text-inherit no-underline"
|
|
479
497
|
} },
|
|
480
498
|
defaultVariants: { treatment: "prose" }
|
|
481
|
-
}),
|
|
499
|
+
}), Te = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
|
|
482
500
|
href: t,
|
|
483
|
-
className:
|
|
501
|
+
className: we({ treatment: r }),
|
|
484
502
|
target: i ? "_blank" : void 0,
|
|
485
503
|
rel: i ? "noopener noreferrer" : void 0,
|
|
486
504
|
"aria-current": a ? "page" : void 0,
|
|
487
505
|
"data-testid": o,
|
|
488
506
|
children: n
|
|
489
|
-
}),
|
|
490
|
-
|
|
491
|
-
|
|
507
|
+
}), Ee = class extends Error {
|
|
508
|
+
constructor(e) {
|
|
509
|
+
super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
|
|
510
|
+
}
|
|
511
|
+
}, De = p([
|
|
512
|
+
"flex flex-row overflow-x-auto",
|
|
513
|
+
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
514
|
+
"m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
515
|
+
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
516
|
+
].join(" ")), Oe = p([
|
|
517
|
+
"font-secondary text-label tracking-label",
|
|
518
|
+
"text-muted hover:text-foreground aria-selected:text-foreground",
|
|
519
|
+
"border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
520
|
+
"shrink-0 cursor-pointer select-none text-nowrap px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
|
|
521
|
+
"transition-colors duration-[var(--motion-duration-color)]",
|
|
522
|
+
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
523
|
+
].join(" ")), ke = p("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), G = r(void 0), K = (e) => {
|
|
524
|
+
let t = a(G);
|
|
525
|
+
if (t === void 0) throw new Ee(e);
|
|
526
|
+
return t;
|
|
527
|
+
}, q = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), Ae = (e) => {
|
|
528
|
+
e.currentTarget.scrollIntoView({
|
|
529
|
+
block: "nearest",
|
|
530
|
+
inline: "nearest"
|
|
531
|
+
});
|
|
532
|
+
}, J = (e, t) => `${e}tab-${q(t)}`, Y = (e, t) => `${e}panel-${q(t)}`, je = (e, t) => {
|
|
533
|
+
let n = e.closest("[role=\"tablist\"]");
|
|
534
|
+
if (n === null) return;
|
|
535
|
+
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
536
|
+
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
537
|
+
}, Me = {
|
|
538
|
+
Root: ({ active: t, onSelect$: n, label: r, children: i, testId: a }) => {
|
|
539
|
+
let o = s();
|
|
540
|
+
return /* @__PURE__ */ e(G.Provider, {
|
|
541
|
+
value: {
|
|
542
|
+
active: t,
|
|
543
|
+
onSelect$: n,
|
|
544
|
+
label: r,
|
|
545
|
+
baseId: o
|
|
546
|
+
},
|
|
547
|
+
children: /* @__PURE__ */ e("div", {
|
|
548
|
+
"data-testid": a,
|
|
549
|
+
children: i
|
|
550
|
+
})
|
|
551
|
+
});
|
|
552
|
+
},
|
|
553
|
+
List: ({ children: t, testId: n }) => {
|
|
554
|
+
let { label: r } = K("List");
|
|
555
|
+
return /* @__PURE__ */ e("div", {
|
|
556
|
+
role: "tablist",
|
|
557
|
+
"aria-label": r,
|
|
558
|
+
className: De(),
|
|
559
|
+
"data-testid": n,
|
|
560
|
+
children: t
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
Tab: ({ value: t, children: n, testId: r }) => {
|
|
564
|
+
let { active: i, onSelect$: a, baseId: o } = K("Tab"), s = i === t;
|
|
565
|
+
return /* @__PURE__ */ e("button", {
|
|
566
|
+
type: "button",
|
|
567
|
+
role: "tab",
|
|
568
|
+
id: J(o, t),
|
|
569
|
+
"aria-selected": s,
|
|
570
|
+
"aria-controls": Y(o, t),
|
|
571
|
+
tabIndex: s ? 0 : -1,
|
|
572
|
+
"data-value": t,
|
|
573
|
+
"data-testid": r,
|
|
574
|
+
className: Oe(),
|
|
575
|
+
onClick: () => a.next(t),
|
|
576
|
+
onKeyDown: (e) => {
|
|
577
|
+
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
578
|
+
e.preventDefault();
|
|
579
|
+
let t = je(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
580
|
+
if (t === void 0) return;
|
|
581
|
+
t.focus();
|
|
582
|
+
let n = t.dataset.value;
|
|
583
|
+
n !== void 0 && a.next(n);
|
|
584
|
+
},
|
|
585
|
+
onFocus: Ae,
|
|
586
|
+
children: n
|
|
587
|
+
});
|
|
588
|
+
},
|
|
589
|
+
Panel: ({ value: t, children: n, testId: r }) => {
|
|
590
|
+
let { active: i, baseId: a } = K("Panel"), o = i === t;
|
|
591
|
+
return /* @__PURE__ */ e("div", {
|
|
592
|
+
role: "tabpanel",
|
|
593
|
+
id: Y(a, t),
|
|
594
|
+
"aria-labelledby": J(a, t),
|
|
595
|
+
hidden: !o,
|
|
596
|
+
tabIndex: o ? 0 : void 0,
|
|
597
|
+
className: ke(),
|
|
598
|
+
"data-testid": r,
|
|
599
|
+
children: o ? n : void 0
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
}, Ne = p("block min-h-24 w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-primary text-body 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"), Pe = ({ label: n, name: r, required: i, optionalLabel: a, invalid: l, disabled: u, defaultValue: d, placeholder: f, autocomplete: p, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
|
|
603
|
+
let y = s(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, l ? S : void 0].filter(Boolean).join(" ") || void 0, w = c(null);
|
|
604
|
+
return o(() => {
|
|
492
605
|
let e = _?.subscribe(() => {
|
|
493
606
|
w.current && (w.current.value = "");
|
|
494
607
|
});
|
|
@@ -499,14 +612,14 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
499
612
|
/* @__PURE__ */ e("label", {
|
|
500
613
|
htmlFor: b,
|
|
501
614
|
className: "font-secondary font-medium text-body text-foreground",
|
|
502
|
-
children:
|
|
615
|
+
children: n
|
|
503
616
|
}),
|
|
504
617
|
/* @__PURE__ */ e("textarea", {
|
|
505
618
|
ref: w,
|
|
506
619
|
id: b,
|
|
507
|
-
name:
|
|
508
|
-
className:
|
|
509
|
-
required:
|
|
620
|
+
name: r,
|
|
621
|
+
className: Ne(),
|
|
622
|
+
required: i,
|
|
510
623
|
disabled: u,
|
|
511
624
|
defaultValue: d,
|
|
512
625
|
placeholder: f,
|
|
@@ -516,9 +629,9 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
516
629
|
"data-testid": v,
|
|
517
630
|
onInput: (e) => g?.next(e.currentTarget.value)
|
|
518
631
|
}),
|
|
519
|
-
!
|
|
632
|
+
!i && a && /* @__PURE__ */ e("span", {
|
|
520
633
|
className: "font-secondary text-muted text-small",
|
|
521
|
-
children:
|
|
634
|
+
children: a
|
|
522
635
|
}),
|
|
523
636
|
m && /* @__PURE__ */ e("p", {
|
|
524
637
|
id: x,
|
|
@@ -532,17 +645,31 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
532
645
|
})
|
|
533
646
|
]
|
|
534
647
|
});
|
|
535
|
-
},
|
|
648
|
+
}, Fe = p([
|
|
649
|
+
"flex flex-col items-center",
|
|
650
|
+
"min-h-[var(--cover-height)]",
|
|
651
|
+
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
652
|
+
].join(" ")), Ie = "my-auto max-w-full", Le = ({ children: n, foot: r, testId: i }) => {
|
|
653
|
+
let a = r != null && typeof r != "boolean";
|
|
654
|
+
return /* @__PURE__ */ t("div", {
|
|
655
|
+
className: Fe(),
|
|
656
|
+
"data-testid": i,
|
|
657
|
+
children: [/* @__PURE__ */ e("div", {
|
|
658
|
+
className: Ie,
|
|
659
|
+
children: n
|
|
660
|
+
}), a && /* @__PURE__ */ e("div", { children: r })]
|
|
661
|
+
});
|
|
662
|
+
}, Re = p("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
536
663
|
variants: { edge: {
|
|
537
664
|
none: "",
|
|
538
665
|
rule: "border-t border-solid border-rule"
|
|
539
666
|
} },
|
|
540
667
|
defaultVariants: { edge: "rule" }
|
|
541
|
-
}),
|
|
542
|
-
className:
|
|
668
|
+
}), ze = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
|
|
669
|
+
className: Re({ edge: t }),
|
|
543
670
|
"data-testid": r,
|
|
544
671
|
children: n
|
|
545
|
-
}),
|
|
672
|
+
}), Be = p("font-secondary text-small", {
|
|
546
673
|
variants: { state: {
|
|
547
674
|
idle: "text-muted",
|
|
548
675
|
sending: "text-muted",
|
|
@@ -550,13 +677,13 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
550
677
|
failed: "text-error"
|
|
551
678
|
} },
|
|
552
679
|
defaultVariants: { state: "idle" }
|
|
553
|
-
}),
|
|
680
|
+
}), Ve = {
|
|
554
681
|
sent: "status",
|
|
555
682
|
failed: "alert"
|
|
556
|
-
},
|
|
683
|
+
}, He = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
557
684
|
let l = s != null && typeof s != "boolean";
|
|
558
685
|
if (i === "sent" && !l) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
|
|
559
|
-
let u = i !== "sent", d =
|
|
686
|
+
let u = i !== "sent", d = Ve[i];
|
|
560
687
|
return /* @__PURE__ */ t("form", {
|
|
561
688
|
action: n,
|
|
562
689
|
method: r,
|
|
@@ -574,12 +701,12 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
574
701
|
}),
|
|
575
702
|
l && /* @__PURE__ */ e("p", {
|
|
576
703
|
role: d,
|
|
577
|
-
className:
|
|
704
|
+
className: Be({ state: i }),
|
|
578
705
|
children: s
|
|
579
706
|
})
|
|
580
707
|
]
|
|
581
708
|
});
|
|
582
|
-
},
|
|
709
|
+
}, Ue = p([
|
|
583
710
|
"flex items-baseline justify-between",
|
|
584
711
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
585
712
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -590,50 +717,50 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
590
717
|
rule: "border-b border-solid border-rule"
|
|
591
718
|
} },
|
|
592
719
|
defaultVariants: { edge: "rule" }
|
|
593
|
-
}),
|
|
720
|
+
}), We = [
|
|
594
721
|
"inline-flex shrink-0 items-center",
|
|
595
722
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
596
723
|
"min-w-[var(--standing-min-width)]"
|
|
597
|
-
].join(" "),
|
|
598
|
-
className:
|
|
724
|
+
].join(" "), Ge = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
|
|
725
|
+
className: Ue({ edge: n }),
|
|
599
726
|
"data-testid": o,
|
|
600
727
|
children: [/* @__PURE__ */ e("div", {
|
|
601
|
-
className:
|
|
728
|
+
className: We,
|
|
602
729
|
children: r
|
|
603
730
|
}), /* @__PURE__ */ e("nav", {
|
|
604
731
|
"aria-label": i,
|
|
605
732
|
className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
|
|
606
733
|
children: a
|
|
607
734
|
})]
|
|
608
|
-
}),
|
|
735
|
+
}), Ke = p("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
609
736
|
variants: { place: {
|
|
610
737
|
start: "justify-start",
|
|
611
738
|
center: "justify-center",
|
|
612
739
|
between: "justify-between"
|
|
613
740
|
} },
|
|
614
741
|
defaultVariants: { place: "center" }
|
|
615
|
-
}),
|
|
616
|
-
className:
|
|
742
|
+
}), qe = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
|
|
743
|
+
className: Ke({ place: t }),
|
|
617
744
|
"data-testid": r,
|
|
618
745
|
children: n
|
|
619
|
-
}),
|
|
620
|
-
className:
|
|
746
|
+
}), Je = p("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), Ye = p("font-primary text-title leading-title tracking-optical text-foreground"), Xe = p("font-primary text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), Ze = p("font-primary text-small text-muted max-w-[var(--measure)]"), X = ({ title: n, lede: r, intro: i, testId: a }) => /* @__PURE__ */ t("header", {
|
|
747
|
+
className: Je(),
|
|
621
748
|
"data-testid": a,
|
|
622
749
|
children: [
|
|
623
750
|
/* @__PURE__ */ e("h1", {
|
|
624
|
-
className:
|
|
751
|
+
className: Ye(),
|
|
625
752
|
children: n
|
|
626
753
|
}),
|
|
627
754
|
r !== void 0 && /* @__PURE__ */ e("p", {
|
|
628
|
-
className:
|
|
755
|
+
className: Xe(),
|
|
629
756
|
children: r
|
|
630
757
|
}),
|
|
631
758
|
i !== void 0 && /* @__PURE__ */ e("p", {
|
|
632
|
-
className:
|
|
759
|
+
className: Ze(),
|
|
633
760
|
children: i
|
|
634
761
|
})
|
|
635
762
|
]
|
|
636
|
-
}),
|
|
763
|
+
}), Qe = p([
|
|
637
764
|
"relative",
|
|
638
765
|
"py-[var(--space-band)]",
|
|
639
766
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -643,13 +770,82 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
643
770
|
full: ""
|
|
644
771
|
} },
|
|
645
772
|
defaultVariants: { bleed: "inset" }
|
|
646
|
-
}),
|
|
773
|
+
}), $e = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
|
|
647
774
|
"data-section": "",
|
|
648
|
-
className:
|
|
775
|
+
className: Qe({ bleed: t }),
|
|
649
776
|
"aria-label": n,
|
|
650
777
|
"data-testid": i,
|
|
651
778
|
children: r
|
|
652
|
-
}),
|
|
779
|
+
}), et = p([
|
|
780
|
+
"grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
|
|
781
|
+
"[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
|
|
782
|
+
"lg:[&>div:first-child]:border-b-0 lg:[&>div:first-child]:border-r lg:[&>div:first-child]:pb-0 lg:[&>div:first-child]:pr-[var(--space-stack)]",
|
|
783
|
+
"lg:[&>div:first-child>nav]:sticky lg:[&>div:first-child>nav]:top-0 lg:[&>div:first-child>nav]:max-h-[min(100dvh,var(--sidebar-scrollport-height,100dvh))] lg:[&>div:first-child>nav]:overflow-y-auto",
|
|
784
|
+
"[&>div:first-child>nav]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] lg:[&>div:first-child>nav]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
785
|
+
"[&>div:first-child>nav>ul]:flex [&>div:first-child>nav>ul]:flex-col [&>div:first-child>nav>ul]:gap-[var(--space-stack)]"
|
|
786
|
+
].join(" ")), tt = (e) => {
|
|
787
|
+
if (!e) return;
|
|
788
|
+
let t = [];
|
|
789
|
+
for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
|
|
790
|
+
let n = () => {
|
|
791
|
+
let n = t.find((e) => /^(auto|scroll|hidden|overlay)$/.test(getComputedStyle(e).overflowY));
|
|
792
|
+
n ? e.style.setProperty("--sidebar-scrollport-height", `${n.clientHeight}px`) : e.style.removeProperty("--sidebar-scrollport-height");
|
|
793
|
+
};
|
|
794
|
+
n();
|
|
795
|
+
let r = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(n);
|
|
796
|
+
for (let e of t) r?.observe(e);
|
|
797
|
+
return window.addEventListener("resize", n), () => {
|
|
798
|
+
r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
|
|
799
|
+
};
|
|
800
|
+
}, nt = p([
|
|
801
|
+
"w-full text-left font-secondary text-label tracking-label",
|
|
802
|
+
"underline-offset-[var(--underline-offset)]",
|
|
803
|
+
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
804
|
+
].join(" "), {
|
|
805
|
+
variants: { state: {
|
|
806
|
+
active: "text-foreground underline decoration-[length:var(--underline-thickness)] cursor-pointer",
|
|
807
|
+
usable: "text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] cursor-pointer",
|
|
808
|
+
inert: "text-muted cursor-not-allowed"
|
|
809
|
+
} },
|
|
810
|
+
defaultVariants: { state: "usable" }
|
|
811
|
+
}), Z = r(void 0), Q = ({ entryKey: t, children: n, inert: r, testId: i }) => {
|
|
812
|
+
let o = a(Z), s = o !== void 0 && o.active === t;
|
|
813
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", {
|
|
814
|
+
type: "button",
|
|
815
|
+
className: nt({ state: r ? "inert" : s ? "active" : "usable" }),
|
|
816
|
+
disabled: r,
|
|
817
|
+
"aria-current": s ? "true" : void 0,
|
|
818
|
+
"data-testid": i,
|
|
819
|
+
onClick: () => {
|
|
820
|
+
s || o?.onSelect$.next(t);
|
|
821
|
+
},
|
|
822
|
+
children: n
|
|
823
|
+
}) });
|
|
824
|
+
}, $ = ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
825
|
+
"data-testid": n,
|
|
826
|
+
children: t
|
|
827
|
+
}), rt = {
|
|
828
|
+
Root: ({ active: r, label: a, onSelect$: o, children: s, testId: c }) => {
|
|
829
|
+
let l = n.toArray(s).filter(i);
|
|
830
|
+
return /* @__PURE__ */ t("div", {
|
|
831
|
+
className: et(),
|
|
832
|
+
"data-testid": c,
|
|
833
|
+
children: [/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("nav", {
|
|
834
|
+
ref: tt,
|
|
835
|
+
"aria-label": a,
|
|
836
|
+
children: /* @__PURE__ */ e(Z, {
|
|
837
|
+
value: {
|
|
838
|
+
active: r,
|
|
839
|
+
onSelect$: o
|
|
840
|
+
},
|
|
841
|
+
children: /* @__PURE__ */ e("ul", { children: l.filter((e) => e.type === Q) })
|
|
842
|
+
})
|
|
843
|
+
}) }), l.filter((e) => e.type === $)]
|
|
844
|
+
});
|
|
845
|
+
},
|
|
846
|
+
Item: Q,
|
|
847
|
+
Content: $
|
|
848
|
+
}, it = {
|
|
653
849
|
surface: "#ffffff",
|
|
654
850
|
foreground: "#0f172a",
|
|
655
851
|
muted: "#64748b",
|
|
@@ -671,7 +867,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
671
867
|
warning: "#f59e0b",
|
|
672
868
|
error: "#d63384",
|
|
673
869
|
info: "#06b6d4"
|
|
674
|
-
},
|
|
870
|
+
}, at = {
|
|
675
871
|
surface: "#0f172a",
|
|
676
872
|
foreground: "#f8fafc",
|
|
677
873
|
muted: "#94a3b8",
|
|
@@ -695,4 +891,4 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
695
891
|
info: "#22d3ee"
|
|
696
892
|
};
|
|
697
893
|
//#endregion
|
|
698
|
-
export {
|
|
894
|
+
export { y as Brandmark, xe as Button, S as Checklist, h as Cluster, T as Collection, Le as Cover, ne as DefinitionList, N as Eyebrow, ie as Figure, ze as Footer, He as Form, F as H1, L as H2, z as H3, V as H4, U as H5, ue as H6, Ge as Header, qe as Hero, Ce as Input, Te as Link, fe as Note, me as P, X as PageHead, ye as Prose, le as Rail, $e as Section, rt as Sidebar, _ as Stack, j as Table, Me as Tabs, Pe as TextArea, at as dark, it as light };
|