@juwel-development/design-system 3.2.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 +319 -138
- package/dist/index.css +1 -1
- package/dist/types/Arrangement/Stack/Stack.d.ts +19 -6
- 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/Sidebar/Sidebar.d.ts +69 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/Arrangement/Stack/Stack.tsx +30 -10
- 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 +3 -3
- package/src/Layout/Sidebar/Sidebar.tsx +224 -0
- package/src/Theme/renderTokens.ts +31 -0
- package/src/index.ts +3 -0
- package/src/tokens.css +15 -0
- package/src/tokens.dark.css +15 -0
- package/src/tokens.light.css +15 -0
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)]",
|
|
@@ -77,7 +77,11 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
77
77
|
measure: {
|
|
78
78
|
true: "max-w-[var(--measure)]",
|
|
79
79
|
false: "",
|
|
80
|
-
action: "w-
|
|
80
|
+
action: "w-[var(--measure-action)] max-w-full mx-auto"
|
|
81
|
+
},
|
|
82
|
+
align: {
|
|
83
|
+
start: "text-start",
|
|
84
|
+
center: "text-center"
|
|
81
85
|
},
|
|
82
86
|
direction: {
|
|
83
87
|
column: "flex-col",
|
|
@@ -89,69 +93,82 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
89
93
|
measure: !1,
|
|
90
94
|
direction: "column"
|
|
91
95
|
}
|
|
92
|
-
}),
|
|
93
|
-
className:
|
|
96
|
+
}), _ = ({ gap: t, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ e("div", {
|
|
97
|
+
className: g({
|
|
94
98
|
gap: t,
|
|
95
99
|
measure: n,
|
|
96
|
-
direction: r
|
|
100
|
+
direction: r,
|
|
101
|
+
align: i
|
|
97
102
|
}),
|
|
98
|
-
"data-testid":
|
|
99
|
-
children:
|
|
100
|
-
}),
|
|
103
|
+
"data-testid": o,
|
|
104
|
+
children: a
|
|
105
|
+
}), v = p("inline-flex", { variants: { cut: {
|
|
101
106
|
full: "",
|
|
102
107
|
compact: ""
|
|
103
|
-
} } }),
|
|
108
|
+
} } }), y = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
|
|
104
109
|
"aria-hidden": "true",
|
|
105
110
|
"data-cut": n,
|
|
106
|
-
className:
|
|
111
|
+
className: v({ cut: n }),
|
|
107
112
|
"data-testid": i,
|
|
108
113
|
children: r
|
|
109
114
|
}) : /* @__PURE__ */ e("span", {
|
|
110
115
|
role: "img",
|
|
111
116
|
"aria-label": t,
|
|
112
117
|
"data-cut": n,
|
|
113
|
-
className:
|
|
118
|
+
className: v({ cut: n }),
|
|
114
119
|
"data-testid": i,
|
|
115
120
|
children: r
|
|
116
|
-
}),
|
|
121
|
+
}), b = p("m-0 list-none p-0"), x = p([
|
|
117
122
|
"flex items-start gap-3 font-primary text-body leading-body text-foreground",
|
|
118
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-['']",
|
|
119
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)]"
|
|
120
|
-
].join(" ")),
|
|
125
|
+
].join(" ")), S = {
|
|
121
126
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
|
|
122
|
-
className:
|
|
127
|
+
className: b(),
|
|
123
128
|
role: "list",
|
|
124
129
|
"data-testid": n,
|
|
125
130
|
children: t
|
|
126
131
|
}),
|
|
127
132
|
Item: ({ children: t }) => /* @__PURE__ */ e("li", {
|
|
128
|
-
className:
|
|
133
|
+
className: x(),
|
|
134
|
+
children: t
|
|
135
|
+
})
|
|
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,
|
|
129
146
|
children: t
|
|
130
147
|
})
|
|
131
|
-
},
|
|
148
|
+
}, E = p([
|
|
132
149
|
"grid gap-[var(--space-stack)] py-6",
|
|
133
150
|
"border-b border-solid border-border first:border-t",
|
|
134
151
|
"lg:grid-cols-[16rem_minmax(0,1fr)] lg:items-baseline lg:gap-x-12",
|
|
135
152
|
"lg:[&>dt]:col-start-1 lg:[&>dd]:col-start-2 lg:[&>dd]:row-start-1"
|
|
136
|
-
].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 = {
|
|
137
154
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("dl", {
|
|
138
155
|
"data-testid": n,
|
|
139
156
|
children: t
|
|
140
157
|
}),
|
|
141
158
|
Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
142
|
-
className:
|
|
159
|
+
className: E(),
|
|
143
160
|
"data-testid": n,
|
|
144
161
|
children: t
|
|
145
162
|
}),
|
|
146
163
|
Term: ({ children: t }) => /* @__PURE__ */ e("dt", {
|
|
147
|
-
className:
|
|
164
|
+
className: ee(),
|
|
148
165
|
children: t
|
|
149
166
|
}),
|
|
150
167
|
Description: ({ children: t }) => /* @__PURE__ */ e("dd", {
|
|
151
|
-
className:
|
|
168
|
+
className: te(),
|
|
152
169
|
children: t
|
|
153
170
|
})
|
|
154
|
-
},
|
|
171
|
+
}, re = p("block w-full object-cover bg-backing", {
|
|
155
172
|
variants: {
|
|
156
173
|
ratio: {
|
|
157
174
|
portrait: "aspect-portrait",
|
|
@@ -168,13 +185,13 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
168
185
|
}
|
|
169
186
|
},
|
|
170
187
|
defaultVariants: { focus: "center" }
|
|
171
|
-
}),
|
|
188
|
+
}), ie = ({ src: n, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
|
|
172
189
|
let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ e("img", {
|
|
173
190
|
src: n,
|
|
174
191
|
alt: r,
|
|
175
192
|
width: i,
|
|
176
193
|
height: a,
|
|
177
|
-
className:
|
|
194
|
+
className: re({
|
|
178
195
|
ratio: o,
|
|
179
196
|
focus: s
|
|
180
197
|
}),
|
|
@@ -197,21 +214,21 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
197
214
|
children: l
|
|
198
215
|
})]
|
|
199
216
|
});
|
|
200
|
-
},
|
|
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 = {
|
|
201
218
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
202
|
-
className:
|
|
219
|
+
className: ae(),
|
|
203
220
|
"data-testid": n,
|
|
204
221
|
children: t
|
|
205
222
|
}),
|
|
206
223
|
Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
|
|
207
|
-
className:
|
|
224
|
+
className: oe(),
|
|
208
225
|
"data-testid": i,
|
|
209
226
|
"aria-hidden": "true",
|
|
210
227
|
children: [n !== void 0 && /* @__PURE__ */ e("span", {
|
|
211
|
-
className:
|
|
228
|
+
className: se(),
|
|
212
229
|
children: n
|
|
213
230
|
}), /* @__PURE__ */ e("span", {
|
|
214
|
-
className:
|
|
231
|
+
className: ce(),
|
|
215
232
|
children: r
|
|
216
233
|
})]
|
|
217
234
|
}),
|
|
@@ -219,7 +236,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
219
236
|
"data-testid": n,
|
|
220
237
|
children: t
|
|
221
238
|
})
|
|
222
|
-
},
|
|
239
|
+
}, D = p([
|
|
223
240
|
"[&:not([data-notes])]:overflow-x-auto",
|
|
224
241
|
"[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
|
|
225
242
|
"[&_caption]:pb-3 [&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
|
|
@@ -228,7 +245,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
228
245
|
"[&[data-notes=content]>table]:max-md:block",
|
|
229
246
|
"[&[data-notes=content]_thead]:max-md:block [&[data-notes=content]_tbody]:max-md:block [&[data-notes=content]_tfoot]:max-md:block",
|
|
230
247
|
"[&[data-notes=content]_tr]:max-md:block [&[data-notes=content]_td]:max-md:block [&[data-notes=content]_th]:max-md:block"
|
|
231
|
-
].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", {
|
|
232
249
|
variants: {
|
|
233
250
|
variant: {
|
|
234
251
|
value: "font-primary text-foreground tabular-nums",
|
|
@@ -244,24 +261,24 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
244
261
|
variant: "value",
|
|
245
262
|
align: "left"
|
|
246
263
|
}
|
|
247
|
-
}),
|
|
264
|
+
}), A = p("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
|
|
248
265
|
variants: { align: {
|
|
249
266
|
left: "text-left",
|
|
250
267
|
right: "text-right",
|
|
251
268
|
center: "text-center"
|
|
252
269
|
} },
|
|
253
270
|
defaultVariants: { align: "left" }
|
|
254
|
-
}),
|
|
271
|
+
}), j = {
|
|
255
272
|
Root: ({ caption: n, notes: r, children: i, testId: a }) => {
|
|
256
273
|
let o = /* @__PURE__ */ t("table", { children: [/* @__PURE__ */ e("caption", { children: n }), i] });
|
|
257
274
|
return r === void 0 ? /* @__PURE__ */ e("section", {
|
|
258
|
-
className:
|
|
275
|
+
className: D(),
|
|
259
276
|
"data-testid": a,
|
|
260
277
|
"aria-label": n,
|
|
261
278
|
tabIndex: 0,
|
|
262
279
|
children: o
|
|
263
280
|
}) : /* @__PURE__ */ e("div", {
|
|
264
|
-
className:
|
|
281
|
+
className: D(),
|
|
265
282
|
"data-notes": r,
|
|
266
283
|
"data-testid": a,
|
|
267
284
|
children: o
|
|
@@ -271,162 +288,162 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
271
288
|
Body: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
|
|
272
289
|
Footer: ({ children: t }) => /* @__PURE__ */ e("tfoot", { children: t }),
|
|
273
290
|
Row: ({ children: t, testId: n }) => /* @__PURE__ */ e("tr", {
|
|
274
|
-
className:
|
|
291
|
+
className: O(),
|
|
275
292
|
"data-testid": n,
|
|
276
293
|
children: t
|
|
277
294
|
}),
|
|
278
295
|
HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
|
|
279
296
|
scope: t,
|
|
280
|
-
className:
|
|
297
|
+
className: A({ align: n }),
|
|
281
298
|
children: r
|
|
282
299
|
}),
|
|
283
300
|
Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
|
|
284
|
-
className:
|
|
301
|
+
className: k({
|
|
285
302
|
variant: t,
|
|
286
303
|
align: n
|
|
287
304
|
}),
|
|
288
305
|
"data-variant": t ?? "value",
|
|
289
306
|
children: r
|
|
290
307
|
})
|
|
291
|
-
},
|
|
308
|
+
}, M = p("font-secondary text-label tracking-label font-medium", {
|
|
292
309
|
variants: { color: {
|
|
293
310
|
foreground: "text-foreground",
|
|
294
311
|
muted: "text-muted"
|
|
295
312
|
} },
|
|
296
313
|
defaultVariants: { color: "muted" }
|
|
297
|
-
}),
|
|
298
|
-
className:
|
|
314
|
+
}), N = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
315
|
+
className: M({ color: n }),
|
|
299
316
|
"data-testid": r,
|
|
300
317
|
children: t
|
|
301
|
-
}),
|
|
318
|
+
}), P = p("font-primary text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
302
319
|
variants: { color: {
|
|
303
320
|
foreground: "text-foreground",
|
|
304
321
|
muted: "text-muted"
|
|
305
322
|
} },
|
|
306
323
|
defaultVariants: { color: "foreground" }
|
|
307
|
-
}),
|
|
308
|
-
className:
|
|
324
|
+
}), F = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
|
|
325
|
+
className: P({ color: n }),
|
|
309
326
|
"data-testid": r,
|
|
310
327
|
children: t
|
|
311
|
-
}),
|
|
328
|
+
}), I = p("font-primary text-title leading-title tracking-optical", {
|
|
312
329
|
variants: { color: {
|
|
313
330
|
foreground: "text-foreground",
|
|
314
331
|
muted: "text-muted"
|
|
315
332
|
} },
|
|
316
333
|
defaultVariants: { color: "foreground" }
|
|
317
|
-
}),
|
|
318
|
-
className:
|
|
334
|
+
}), L = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
|
|
335
|
+
className: I({ color: n }),
|
|
319
336
|
"data-testid": r,
|
|
320
337
|
children: t
|
|
321
|
-
}),
|
|
338
|
+
}), R = p("font-primary text-subtitle leading-subtitle", {
|
|
322
339
|
variants: { color: {
|
|
323
340
|
foreground: "text-foreground",
|
|
324
341
|
muted: "text-muted"
|
|
325
342
|
} },
|
|
326
343
|
defaultVariants: { color: "foreground" }
|
|
327
|
-
}),
|
|
328
|
-
className:
|
|
344
|
+
}), z = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
|
|
345
|
+
className: R({ color: n }),
|
|
329
346
|
"data-testid": r,
|
|
330
347
|
children: t
|
|
331
|
-
}),
|
|
348
|
+
}), B = p("font-primary text-body leading-body font-bold", {
|
|
332
349
|
variants: { color: {
|
|
333
350
|
foreground: "text-foreground",
|
|
334
351
|
muted: "text-muted"
|
|
335
352
|
} },
|
|
336
353
|
defaultVariants: { color: "foreground" }
|
|
337
|
-
}),
|
|
338
|
-
className:
|
|
354
|
+
}), V = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
|
|
355
|
+
className: B({ color: n }),
|
|
339
356
|
"data-testid": r,
|
|
340
357
|
children: t
|
|
341
|
-
}),
|
|
358
|
+
}), H = p("font-primary text-body leading-body font-semibold", {
|
|
342
359
|
variants: { color: {
|
|
343
360
|
foreground: "text-foreground",
|
|
344
361
|
muted: "text-muted"
|
|
345
362
|
} },
|
|
346
363
|
defaultVariants: { color: "foreground" }
|
|
347
|
-
}),
|
|
348
|
-
className:
|
|
364
|
+
}), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
|
|
365
|
+
className: H({ color: n }),
|
|
349
366
|
"data-testid": r,
|
|
350
367
|
children: t
|
|
351
|
-
}),
|
|
368
|
+
}), W = p("font-primary text-body leading-body font-medium", {
|
|
352
369
|
variants: { color: {
|
|
353
370
|
foreground: "text-foreground",
|
|
354
371
|
muted: "text-muted"
|
|
355
372
|
} },
|
|
356
373
|
defaultVariants: { color: "foreground" }
|
|
357
|
-
}),
|
|
358
|
-
className:
|
|
374
|
+
}), ue = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
|
|
375
|
+
className: W({ color: n }),
|
|
359
376
|
"data-testid": r,
|
|
360
377
|
children: t
|
|
361
|
-
}),
|
|
378
|
+
}), de = p("font-secondary text-small", {
|
|
362
379
|
variants: { color: {
|
|
363
380
|
foreground: "text-foreground",
|
|
364
381
|
muted: "text-muted"
|
|
365
382
|
} },
|
|
366
383
|
defaultVariants: { color: "foreground" }
|
|
367
|
-
}),
|
|
368
|
-
className:
|
|
384
|
+
}), fe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
385
|
+
className: de({ color: n }),
|
|
369
386
|
"data-testid": r,
|
|
370
387
|
children: t
|
|
371
|
-
}),
|
|
388
|
+
}), pe = p("font-primary text-body leading-body", {
|
|
372
389
|
variants: { color: {
|
|
373
390
|
foreground: "text-foreground",
|
|
374
391
|
muted: "text-muted"
|
|
375
392
|
} },
|
|
376
393
|
defaultVariants: { color: "foreground" }
|
|
377
|
-
}),
|
|
378
|
-
className:
|
|
394
|
+
}), me = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
|
|
395
|
+
className: pe({ color: n }),
|
|
379
396
|
"data-testid": r,
|
|
380
397
|
children: t
|
|
381
|
-
}),
|
|
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", {
|
|
382
399
|
variants: { color: {
|
|
383
400
|
foreground: "text-foreground",
|
|
384
401
|
muted: "text-muted"
|
|
385
402
|
} },
|
|
386
403
|
defaultVariants: { color: "foreground" }
|
|
387
|
-
}),
|
|
404
|
+
}), ve = p("font-primary text-small text-muted"), ye = {
|
|
388
405
|
Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
|
|
389
|
-
className:
|
|
406
|
+
className: he(),
|
|
390
407
|
"data-testid": n,
|
|
391
408
|
children: t
|
|
392
409
|
}),
|
|
393
410
|
Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
394
|
-
className:
|
|
411
|
+
className: ge(),
|
|
395
412
|
children: t
|
|
396
413
|
}),
|
|
397
414
|
Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
|
|
398
|
-
className:
|
|
415
|
+
className: _e({ color: t }),
|
|
399
416
|
children: n
|
|
400
417
|
}),
|
|
401
418
|
Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
|
|
402
|
-
className:
|
|
419
|
+
className: ve(),
|
|
403
420
|
children: t
|
|
404
421
|
})
|
|
405
|
-
},
|
|
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)]", {
|
|
406
423
|
variants: { variant: {
|
|
407
424
|
primary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
408
425
|
secondary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-secondary text-secondary-foreground hover:bg-secondary-hover",
|
|
409
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)]"
|
|
410
427
|
} },
|
|
411
428
|
defaultVariants: { variant: "primary" }
|
|
412
|
-
}),
|
|
429
|
+
}), xe = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
|
|
413
430
|
type: s,
|
|
414
431
|
"data-testid": r,
|
|
415
|
-
className:
|
|
432
|
+
className: be({ variant: i }),
|
|
416
433
|
onClick: () => a?.next(),
|
|
417
434
|
disabled: n,
|
|
418
435
|
"aria-label": o,
|
|
419
436
|
children: t
|
|
420
|
-
}),
|
|
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", {
|
|
421
438
|
variants: { variant: {
|
|
422
439
|
text: "",
|
|
423
440
|
email: "",
|
|
424
441
|
url: ""
|
|
425
442
|
} },
|
|
426
443
|
defaultVariants: { variant: "text" }
|
|
427
|
-
}),
|
|
428
|
-
let b =
|
|
429
|
-
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(() => {
|
|
430
447
|
let e = v?.subscribe(() => {
|
|
431
448
|
T.current && (T.current.value = "");
|
|
432
449
|
});
|
|
@@ -437,15 +454,15 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
437
454
|
/* @__PURE__ */ e("label", {
|
|
438
455
|
htmlFor: x,
|
|
439
456
|
className: "font-secondary font-medium text-body text-foreground",
|
|
440
|
-
children:
|
|
457
|
+
children: n
|
|
441
458
|
}),
|
|
442
459
|
/* @__PURE__ */ e("input", {
|
|
443
460
|
ref: T,
|
|
444
461
|
id: x,
|
|
445
|
-
name:
|
|
446
|
-
type:
|
|
447
|
-
className:
|
|
448
|
-
required:
|
|
462
|
+
name: r,
|
|
463
|
+
type: i ?? "text",
|
|
464
|
+
className: Se({ variant: i }),
|
|
465
|
+
required: a,
|
|
449
466
|
disabled: d,
|
|
450
467
|
defaultValue: f,
|
|
451
468
|
placeholder: p,
|
|
@@ -455,7 +472,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
455
472
|
"data-testid": y,
|
|
456
473
|
onInput: (e) => _?.next(e.currentTarget.value)
|
|
457
474
|
}),
|
|
458
|
-
!
|
|
475
|
+
!a && l && /* @__PURE__ */ e("span", {
|
|
459
476
|
className: "font-secondary text-muted text-small",
|
|
460
477
|
children: l
|
|
461
478
|
}),
|
|
@@ -471,7 +488,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
471
488
|
})
|
|
472
489
|
]
|
|
473
490
|
});
|
|
474
|
-
},
|
|
491
|
+
}, we = p("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
475
492
|
variants: { treatment: {
|
|
476
493
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
477
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",
|
|
@@ -479,17 +496,112 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
479
496
|
graphic: "text-inherit no-underline"
|
|
480
497
|
} },
|
|
481
498
|
defaultVariants: { treatment: "prose" }
|
|
482
|
-
}),
|
|
499
|
+
}), Te = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
|
|
483
500
|
href: t,
|
|
484
|
-
className:
|
|
501
|
+
className: we({ treatment: r }),
|
|
485
502
|
target: i ? "_blank" : void 0,
|
|
486
503
|
rel: i ? "noopener noreferrer" : void 0,
|
|
487
504
|
"aria-current": a ? "page" : void 0,
|
|
488
505
|
"data-testid": o,
|
|
489
506
|
children: n
|
|
490
|
-
}),
|
|
491
|
-
|
|
492
|
-
|
|
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(() => {
|
|
493
605
|
let e = _?.subscribe(() => {
|
|
494
606
|
w.current && (w.current.value = "");
|
|
495
607
|
});
|
|
@@ -500,14 +612,14 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
500
612
|
/* @__PURE__ */ e("label", {
|
|
501
613
|
htmlFor: b,
|
|
502
614
|
className: "font-secondary font-medium text-body text-foreground",
|
|
503
|
-
children:
|
|
615
|
+
children: n
|
|
504
616
|
}),
|
|
505
617
|
/* @__PURE__ */ e("textarea", {
|
|
506
618
|
ref: w,
|
|
507
619
|
id: b,
|
|
508
|
-
name:
|
|
509
|
-
className:
|
|
510
|
-
required:
|
|
620
|
+
name: r,
|
|
621
|
+
className: Ne(),
|
|
622
|
+
required: i,
|
|
511
623
|
disabled: u,
|
|
512
624
|
defaultValue: d,
|
|
513
625
|
placeholder: f,
|
|
@@ -517,9 +629,9 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
517
629
|
"data-testid": v,
|
|
518
630
|
onInput: (e) => g?.next(e.currentTarget.value)
|
|
519
631
|
}),
|
|
520
|
-
!
|
|
632
|
+
!i && a && /* @__PURE__ */ e("span", {
|
|
521
633
|
className: "font-secondary text-muted text-small",
|
|
522
|
-
children:
|
|
634
|
+
children: a
|
|
523
635
|
}),
|
|
524
636
|
m && /* @__PURE__ */ e("p", {
|
|
525
637
|
id: x,
|
|
@@ -533,31 +645,31 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
533
645
|
})
|
|
534
646
|
]
|
|
535
647
|
});
|
|
536
|
-
},
|
|
648
|
+
}, Fe = p([
|
|
537
649
|
"flex flex-col items-center",
|
|
538
650
|
"min-h-[var(--cover-height)]",
|
|
539
651
|
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
540
|
-
].join(" ")),
|
|
652
|
+
].join(" ")), Ie = "my-auto max-w-full", Le = ({ children: n, foot: r, testId: i }) => {
|
|
541
653
|
let a = r != null && typeof r != "boolean";
|
|
542
654
|
return /* @__PURE__ */ t("div", {
|
|
543
|
-
className:
|
|
655
|
+
className: Fe(),
|
|
544
656
|
"data-testid": i,
|
|
545
657
|
children: [/* @__PURE__ */ e("div", {
|
|
546
|
-
className:
|
|
658
|
+
className: Ie,
|
|
547
659
|
children: n
|
|
548
660
|
}), a && /* @__PURE__ */ e("div", { children: r })]
|
|
549
661
|
});
|
|
550
|
-
},
|
|
662
|
+
}, Re = p("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
551
663
|
variants: { edge: {
|
|
552
664
|
none: "",
|
|
553
665
|
rule: "border-t border-solid border-rule"
|
|
554
666
|
} },
|
|
555
667
|
defaultVariants: { edge: "rule" }
|
|
556
|
-
}),
|
|
557
|
-
className:
|
|
668
|
+
}), ze = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
|
|
669
|
+
className: Re({ edge: t }),
|
|
558
670
|
"data-testid": r,
|
|
559
671
|
children: n
|
|
560
|
-
}),
|
|
672
|
+
}), Be = p("font-secondary text-small", {
|
|
561
673
|
variants: { state: {
|
|
562
674
|
idle: "text-muted",
|
|
563
675
|
sending: "text-muted",
|
|
@@ -565,13 +677,13 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
565
677
|
failed: "text-error"
|
|
566
678
|
} },
|
|
567
679
|
defaultVariants: { state: "idle" }
|
|
568
|
-
}),
|
|
680
|
+
}), Ve = {
|
|
569
681
|
sent: "status",
|
|
570
682
|
failed: "alert"
|
|
571
|
-
},
|
|
683
|
+
}, He = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
572
684
|
let l = s != null && typeof s != "boolean";
|
|
573
685
|
if (i === "sent" && !l) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
|
|
574
|
-
let u = i !== "sent", d =
|
|
686
|
+
let u = i !== "sent", d = Ve[i];
|
|
575
687
|
return /* @__PURE__ */ t("form", {
|
|
576
688
|
action: n,
|
|
577
689
|
method: r,
|
|
@@ -589,12 +701,12 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
589
701
|
}),
|
|
590
702
|
l && /* @__PURE__ */ e("p", {
|
|
591
703
|
role: d,
|
|
592
|
-
className:
|
|
704
|
+
className: Be({ state: i }),
|
|
593
705
|
children: s
|
|
594
706
|
})
|
|
595
707
|
]
|
|
596
708
|
});
|
|
597
|
-
},
|
|
709
|
+
}, Ue = p([
|
|
598
710
|
"flex items-baseline justify-between",
|
|
599
711
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
600
712
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -605,50 +717,50 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
605
717
|
rule: "border-b border-solid border-rule"
|
|
606
718
|
} },
|
|
607
719
|
defaultVariants: { edge: "rule" }
|
|
608
|
-
}),
|
|
720
|
+
}), We = [
|
|
609
721
|
"inline-flex shrink-0 items-center",
|
|
610
722
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
611
723
|
"min-w-[var(--standing-min-width)]"
|
|
612
|
-
].join(" "),
|
|
613
|
-
className:
|
|
724
|
+
].join(" "), Ge = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
|
|
725
|
+
className: Ue({ edge: n }),
|
|
614
726
|
"data-testid": o,
|
|
615
727
|
children: [/* @__PURE__ */ e("div", {
|
|
616
|
-
className:
|
|
728
|
+
className: We,
|
|
617
729
|
children: r
|
|
618
730
|
}), /* @__PURE__ */ e("nav", {
|
|
619
731
|
"aria-label": i,
|
|
620
732
|
className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
|
|
621
733
|
children: a
|
|
622
734
|
})]
|
|
623
|
-
}),
|
|
735
|
+
}), Ke = p("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
624
736
|
variants: { place: {
|
|
625
737
|
start: "justify-start",
|
|
626
738
|
center: "justify-center",
|
|
627
739
|
between: "justify-between"
|
|
628
740
|
} },
|
|
629
741
|
defaultVariants: { place: "center" }
|
|
630
|
-
}),
|
|
631
|
-
className:
|
|
742
|
+
}), qe = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
|
|
743
|
+
className: Ke({ place: t }),
|
|
632
744
|
"data-testid": r,
|
|
633
745
|
children: n
|
|
634
|
-
}),
|
|
635
|
-
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(),
|
|
636
748
|
"data-testid": a,
|
|
637
749
|
children: [
|
|
638
750
|
/* @__PURE__ */ e("h1", {
|
|
639
|
-
className:
|
|
751
|
+
className: Ye(),
|
|
640
752
|
children: n
|
|
641
753
|
}),
|
|
642
754
|
r !== void 0 && /* @__PURE__ */ e("p", {
|
|
643
|
-
className:
|
|
755
|
+
className: Xe(),
|
|
644
756
|
children: r
|
|
645
757
|
}),
|
|
646
758
|
i !== void 0 && /* @__PURE__ */ e("p", {
|
|
647
|
-
className:
|
|
759
|
+
className: Ze(),
|
|
648
760
|
children: i
|
|
649
761
|
})
|
|
650
762
|
]
|
|
651
|
-
}),
|
|
763
|
+
}), Qe = p([
|
|
652
764
|
"relative",
|
|
653
765
|
"py-[var(--space-band)]",
|
|
654
766
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -658,13 +770,82 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
658
770
|
full: ""
|
|
659
771
|
} },
|
|
660
772
|
defaultVariants: { bleed: "inset" }
|
|
661
|
-
}),
|
|
773
|
+
}), $e = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
|
|
662
774
|
"data-section": "",
|
|
663
|
-
className:
|
|
775
|
+
className: Qe({ bleed: t }),
|
|
664
776
|
"aria-label": n,
|
|
665
777
|
"data-testid": i,
|
|
666
778
|
children: r
|
|
667
|
-
}),
|
|
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 = {
|
|
668
849
|
surface: "#ffffff",
|
|
669
850
|
foreground: "#0f172a",
|
|
670
851
|
muted: "#64748b",
|
|
@@ -686,7 +867,7 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
686
867
|
warning: "#f59e0b",
|
|
687
868
|
error: "#d63384",
|
|
688
869
|
info: "#06b6d4"
|
|
689
|
-
},
|
|
870
|
+
}, at = {
|
|
690
871
|
surface: "#0f172a",
|
|
691
872
|
foreground: "#f8fafc",
|
|
692
873
|
muted: "#94a3b8",
|
|
@@ -710,4 +891,4 @@ var s = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, c = o, l = (e
|
|
|
710
891
|
info: "#22d3ee"
|
|
711
892
|
};
|
|
712
893
|
//#endregion
|
|
713
|
-
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 };
|