@juwel-development/design-system 3.10.0 → 4.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/README.md +16 -3
- package/dist/design-system.js +1038 -528
- package/dist/styles.css +2 -0
- package/dist/styles.dark.css +2 -0
- package/dist/styles.light.css +2 -0
- package/dist/types/Arrangement/ColumnLayout/ColumnLayout.d.ts +38 -18
- package/dist/types/Display/Callout/Callout.d.ts +31 -0
- package/dist/types/Display/Icon/Icon.d.ts +31 -16
- package/dist/types/Display/Meter/Meter.d.ts +5 -6
- package/dist/types/Display/Rule/Rule.d.ts +22 -0
- package/dist/types/Display/Table/Table.d.ts +57 -7
- package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +1 -1
- package/dist/types/Display/Typography/H1/H1.d.ts +1 -1
- package/dist/types/Display/Typography/H2/H2.d.ts +1 -1
- package/dist/types/Display/Typography/H3/H3.d.ts +1 -1
- package/dist/types/Display/Typography/H4/H4.d.ts +1 -1
- package/dist/types/Display/Typography/H5/H5.d.ts +1 -1
- package/dist/types/Display/Typography/H6/H6.d.ts +1 -1
- package/dist/types/Display/Typography/Note/Note.d.ts +16 -3
- package/dist/types/Display/Typography/P/P.d.ts +15 -2
- package/dist/types/Display/Typography/Prose/Prose.d.ts +14 -6
- package/dist/types/Interaction/Button/Button.d.ts +13 -5
- package/dist/types/Interaction/Slider/Slider.d.ts +3 -0
- package/dist/types/Interaction/Stepper/Stepper.d.ts +59 -0
- package/dist/types/Interaction/Stepper/StepperCompositionError.d.ts +3 -0
- package/dist/types/Interaction/Switch/Switch.d.ts +20 -0
- package/dist/types/Interaction/Tabs/Tabs.d.ts +24 -3
- package/dist/types/Layout/Dialog/Dialog.d.ts +11 -3
- package/dist/types/Layout/Form/FormConfigurationError.d.ts +3 -0
- package/dist/types/Layout/Pane/Pane.d.ts +55 -0
- package/dist/types/Layout/Shell/Shell.d.ts +39 -0
- package/dist/types/Layout/Sidebar/Sidebar.d.ts +16 -2
- package/dist/types/Theme/Palette.d.ts +11 -4
- package/dist/types/index.d.ts +21 -1
- package/package.json +18 -8
- package/src/Arrangement/ColumnLayout/ColumnLayout.tsx +86 -28
- package/src/Display/Callout/Callout.tsx +64 -0
- package/src/Display/Icon/Icon.tsx +111 -21
- package/src/Display/Meter/Meter.tsx +12 -13
- package/src/Display/Rule/Rule.tsx +31 -0
- package/src/Display/Table/Table.tsx +189 -24
- package/src/Display/Typography/Note/Note.tsx +27 -11
- package/src/Display/Typography/P/P.tsx +29 -4
- package/src/Display/Typography/Prose/Prose.tsx +44 -19
- package/src/Interaction/Button/Button.tsx +14 -5
- package/src/Interaction/Slider/Slider.tsx +3 -5
- package/src/Interaction/Stepper/Stepper.tsx +307 -0
- package/src/Interaction/Stepper/StepperCompositionError.ts +6 -0
- package/src/Interaction/Switch/Switch.tsx +64 -0
- package/src/Interaction/Tabs/Tabs.tsx +44 -10
- package/src/Layout/Dialog/Dialog.tsx +19 -6
- package/src/Layout/Form/Form.tsx +2 -1
- package/src/Layout/Form/FormConfigurationError.ts +6 -0
- package/src/Layout/Pane/Pane.tsx +159 -0
- package/src/Layout/Shell/Shell.tsx +124 -0
- package/src/Layout/Sidebar/Sidebar.tsx +31 -7
- package/src/Theme/Palette.ts +17 -6
- package/src/Theme/renderTokens.ts +61 -12
- package/src/index.ts +21 -2
- package/src/styles.css +5 -6
- package/src/styles.dark.css +5 -6
- package/src/styles.light.css +5 -6
- package/src/tokens.css +54 -9
- package/src/tokens.dark.css +51 -8
- package/src/tokens.light.css +49 -6
- package/dist/index.css +0 -2
package/dist/design-system.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
3
|
import { Children as r, Fragment as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useReducer as f, useRef as p, useState as m } from "react";
|
|
3
|
-
|
|
4
|
+
//#region node_modules/clsx/dist/clsx.mjs
|
|
4
5
|
function h(e) {
|
|
5
6
|
var t, n, r = "";
|
|
6
7
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
@@ -77,48 +78,71 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
77
78
|
super(`ColumnLayout configuration is invalid: ${e}`), this.name = "ColumnLayoutConfigurationError";
|
|
78
79
|
}
|
|
79
80
|
}, w = y("flex flex-wrap items-start", {
|
|
80
|
-
variants: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
variants: {
|
|
82
|
+
fill: {
|
|
83
|
+
false: "",
|
|
84
|
+
true: "h-full min-h-0 content-start [--column-layout-shortfall:clamp(0px,(var(--column-layout-threshold)-100cqi)*1000000,1px)] [&>div]:[@container_style(--column-layout-shortfall:0px)]:h-full [&>div]:[@container_style(--column-layout-shortfall:0px)]:min-h-0"
|
|
85
|
+
},
|
|
86
|
+
gap: {
|
|
87
|
+
stack: "gap-[var(--space-stack)] [--column-layout-gap:var(--space-stack)]",
|
|
88
|
+
region: "gap-[var(--space-region)] [--column-layout-gap:var(--space-region)]"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: {
|
|
92
|
+
gap: "region",
|
|
93
|
+
fill: !1
|
|
94
|
+
}
|
|
95
|
+
}), T = y("h-full min-h-0 min-w-0 [container-type:inline-size]"), ee = y("min-w-0 grow-[calc(var(--column-layout-weight)/var(--column-layout-growth-unit))] basis-[clamp(0px,(var(--column-layout-threshold)-100%)*1000000,100%)] max-w-[var(--column-layout-maximum)]"), E = a(!1), te = /^--[A-Za-z0-9_-]+$/, D = (e, t) => {
|
|
96
|
+
let { weight: n, minWidth: r, maxWidth: i } = e.props;
|
|
87
97
|
if (!Number.isFinite(n) || n <= 0) throw new C(`column ${t + 1} needs a positive finite weight (got ${n})`);
|
|
88
|
-
if (!
|
|
98
|
+
if (!te.test(r)) throw new C(`column ${t + 1} needs a custom-property name such as --main-column-min-width for minWidth (got ${JSON.stringify(r)})`);
|
|
99
|
+
if (i !== void 0 && !te.test(i)) throw new C(`column ${t + 1} needs a custom-property name such as --support-column-max-width for maxWidth (got ${JSON.stringify(i)})`);
|
|
89
100
|
return {
|
|
90
101
|
weight: n,
|
|
91
|
-
minWidth: r
|
|
102
|
+
minWidth: r,
|
|
103
|
+
maxWidth: i
|
|
92
104
|
};
|
|
93
|
-
},
|
|
105
|
+
}, ne = (e) => {
|
|
94
106
|
let t = e.reduce((e, t) => e + t.weight, 0), n = e.map((e) => `var(${e.minWidth}) * ${t / e.weight}`);
|
|
95
107
|
return `calc(${e.length - 1} * var(--column-layout-gap) + max(${n.join(", ")}))`;
|
|
96
|
-
},
|
|
108
|
+
}, re = (e) => e.some((e) => e.maxWidth !== void 0) ? Math.min(1, ...e.map((e) => e.weight)) : 1, ie = (e) => o(e) && e.type === i, ae = (e) => o(e) && e.type === A, O = (e) => r.toArray(e).flatMap((e) => ie(e) ? O(e.props.children) : ae(e) ? [e] : []), k = (e) => r.map(e, (e) => ie(e) ? /* @__PURE__ */ t(i, { children: k(e.props.children) }) : ae(e) ? /* @__PURE__ */ t(E.Provider, {
|
|
97
109
|
value: !0,
|
|
98
110
|
children: e
|
|
99
|
-
}) : e),
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
}) : e), oe = ({ gap: e, fill: n, children: r, testId: i }) => {
|
|
112
|
+
let a = O(r).map(D), o = a.length === 0 ? void 0 : {
|
|
113
|
+
"--column-layout-threshold": ne(a),
|
|
114
|
+
"--column-layout-growth-unit": re(a)
|
|
115
|
+
}, s = /* @__PURE__ */ t("div", {
|
|
116
|
+
className: w({
|
|
117
|
+
gap: e,
|
|
118
|
+
fill: n
|
|
119
|
+
}),
|
|
120
|
+
style: o,
|
|
121
|
+
"data-testid": i,
|
|
122
|
+
children: k(r)
|
|
106
123
|
});
|
|
107
|
-
|
|
124
|
+
return n ? /* @__PURE__ */ t("div", {
|
|
125
|
+
className: T(),
|
|
126
|
+
children: s
|
|
127
|
+
}) : s;
|
|
128
|
+
}, A = ({ weight: e, maxWidth: n, children: r, testId: i }) => {
|
|
108
129
|
if (!c(E)) throw new S();
|
|
109
|
-
let
|
|
130
|
+
let a = {
|
|
131
|
+
"--column-layout-weight": e,
|
|
132
|
+
"--column-layout-maximum": n === void 0 ? "none" : `max(var(${n}), clamp(0px, (var(--column-layout-threshold) - 100%) * 1000000, 100%))`
|
|
133
|
+
};
|
|
110
134
|
return /* @__PURE__ */ t("div", {
|
|
111
|
-
className:
|
|
112
|
-
style:
|
|
113
|
-
"data-testid":
|
|
135
|
+
className: ee(),
|
|
136
|
+
style: a,
|
|
137
|
+
"data-testid": i,
|
|
114
138
|
children: /* @__PURE__ */ t(E.Provider, {
|
|
115
139
|
value: !1,
|
|
116
|
-
children:
|
|
140
|
+
children: r
|
|
117
141
|
})
|
|
118
142
|
});
|
|
119
|
-
},
|
|
120
|
-
Root:
|
|
121
|
-
Column:
|
|
143
|
+
}, j = {
|
|
144
|
+
Root: oe,
|
|
145
|
+
Column: A
|
|
122
146
|
}, M = .5, N = (e, t) => Math.abs(e - t) <= M, P = (e) => {
|
|
123
147
|
let t = [];
|
|
124
148
|
for (let { top: n } of e) t.some((e) => N(e, n)) || t.push(n);
|
|
@@ -141,58 +165,58 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
141
165
|
region: "gap-x-[var(--space-region)]"
|
|
142
166
|
} },
|
|
143
167
|
defaultVariants: { gap: "stack" }
|
|
144
|
-
}),
|
|
168
|
+
}), R = y("shrink basis-0"), z = y("", {
|
|
145
169
|
variants: { part: {
|
|
146
170
|
item: "min-w-0 max-w-full flex-none",
|
|
147
171
|
group: "flex flex-wrap items-end gap-[var(--space-stack)]"
|
|
148
172
|
} },
|
|
149
173
|
defaultVariants: { part: "item" }
|
|
150
|
-
}),
|
|
151
|
-
let t = c(
|
|
174
|
+
}), se = /^--[A-Za-z0-9_-]+$/, B = ":scope > [data-field-row-item]", ce = a(void 0), le = (e) => {
|
|
175
|
+
let t = c(ce);
|
|
152
176
|
if (t === void 0) throw new F(e);
|
|
153
177
|
return t;
|
|
154
|
-
},
|
|
178
|
+
}, ue = (e) => {
|
|
155
179
|
if (!(Number.isFinite(e) && e > 0)) throw new I(`weight must be a positive finite number, got ${e}`);
|
|
156
|
-
},
|
|
157
|
-
if (!
|
|
158
|
-
},
|
|
180
|
+
}, de = (e) => {
|
|
181
|
+
if (!se.test(e)) throw new I(`minWidth must name a CSS custom property such as --search-field-min-width, got ${JSON.stringify(e)}`);
|
|
182
|
+
}, fe = (e) => {
|
|
159
183
|
let t = e.querySelector("label[for]")?.getAttribute("for");
|
|
160
184
|
if (!t) return;
|
|
161
185
|
let n = e.ownerDocument.getElementById(t);
|
|
162
186
|
return n !== null && e.contains(n) ? n : void 0;
|
|
163
|
-
},
|
|
187
|
+
}, pe = (e) => getComputedStyle(e).position !== "static", me = (e, t) => {
|
|
164
188
|
if (getComputedStyle(e).position !== "absolute") return e;
|
|
165
189
|
let n = e.parentElement;
|
|
166
|
-
for (; n !== null && n !== t && !
|
|
190
|
+
for (; n !== null && n !== t && !pe(n);) n = n.parentElement;
|
|
167
191
|
return n ?? e;
|
|
168
|
-
},
|
|
192
|
+
}, he = (e) => {
|
|
169
193
|
let t = e.getBoundingClientRect().top, n = e.firstElementChild;
|
|
170
194
|
if (n === null) return {
|
|
171
195
|
top: t,
|
|
172
196
|
controlEdge: 0
|
|
173
197
|
};
|
|
174
|
-
let r = n.getBoundingClientRect(), i =
|
|
198
|
+
let r = n.getBoundingClientRect(), i = fe(n);
|
|
175
199
|
return {
|
|
176
200
|
top: t,
|
|
177
|
-
controlEdge: (i === void 0 ? r.bottom :
|
|
201
|
+
controlEdge: (i === void 0 ? r.bottom : me(i, n).getBoundingClientRect().bottom) - r.top
|
|
178
202
|
};
|
|
179
|
-
},
|
|
180
|
-
let t = Array.from(e.querySelectorAll(B)), n = P(t.map(
|
|
203
|
+
}, V = (e) => {
|
|
204
|
+
let t = Array.from(e.querySelectorAll(B)), n = P(t.map(he));
|
|
181
205
|
t.forEach((e, t) => {
|
|
182
206
|
let r = n[t] ?? 0, i = Number.parseFloat(e.style.paddingTop) || 0;
|
|
183
207
|
Math.abs(i - r) > .01 && (e.style.paddingTop = r === 0 ? "" : `${r}px`);
|
|
184
208
|
});
|
|
185
|
-
},
|
|
209
|
+
}, ge = {
|
|
186
210
|
Root: ({ gap: e, children: n, testId: r }) => {
|
|
187
211
|
let i = p(null), a = p(void 0), o = p(/* @__PURE__ */ new WeakSet()), s = () => {
|
|
188
|
-
i.current &&
|
|
212
|
+
i.current && V(i.current);
|
|
189
213
|
}, c = (e) => {
|
|
190
214
|
e && a.current && !o.current.has(e) && (o.current.add(e), a.current.observe(e));
|
|
191
215
|
};
|
|
192
216
|
return d(() => {
|
|
193
217
|
let e = i.current;
|
|
194
|
-
if (e !== null && (
|
|
195
|
-
a.current ??= new ResizeObserver(() =>
|
|
218
|
+
if (e !== null && (V(e), !(typeof ResizeObserver > "u"))) {
|
|
219
|
+
a.current ??= new ResizeObserver(() => V(e));
|
|
196
220
|
for (let t of e.querySelectorAll(B)) {
|
|
197
221
|
let e = t.firstElementChild ?? void 0;
|
|
198
222
|
c(e), c(e?.querySelector("label[for]") ?? void 0);
|
|
@@ -202,17 +226,17 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
202
226
|
ref: i,
|
|
203
227
|
className: L({ gap: e }),
|
|
204
228
|
"data-testid": r,
|
|
205
|
-
children: /* @__PURE__ */ t(
|
|
229
|
+
children: /* @__PURE__ */ t(ce, {
|
|
206
230
|
value: { align: s },
|
|
207
231
|
children: n
|
|
208
232
|
})
|
|
209
233
|
});
|
|
210
234
|
},
|
|
211
235
|
Field: ({ children: e, weight: n = 1, minWidth: r, testId: i }) => {
|
|
212
|
-
let { align: a } =
|
|
213
|
-
return
|
|
236
|
+
let { align: a } = le("Field");
|
|
237
|
+
return ue(n), de(r), d(() => a()), /* @__PURE__ */ t("div", {
|
|
214
238
|
"data-field-row-item": !0,
|
|
215
|
-
className:
|
|
239
|
+
className: R(),
|
|
216
240
|
"data-testid": i,
|
|
217
241
|
style: {
|
|
218
242
|
flexGrow: n,
|
|
@@ -222,18 +246,18 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
222
246
|
});
|
|
223
247
|
},
|
|
224
248
|
Actions: ({ children: e, testId: n }) => {
|
|
225
|
-
let { align: r } =
|
|
249
|
+
let { align: r } = le("Actions");
|
|
226
250
|
return d(() => r()), /* @__PURE__ */ t("div", {
|
|
227
251
|
"data-field-row-item": !0,
|
|
228
|
-
className:
|
|
252
|
+
className: z(),
|
|
229
253
|
"data-testid": n,
|
|
230
254
|
children: /* @__PURE__ */ t("div", {
|
|
231
|
-
className:
|
|
255
|
+
className: z({ part: "group" }),
|
|
232
256
|
children: e
|
|
233
257
|
})
|
|
234
258
|
});
|
|
235
259
|
}
|
|
236
|
-
},
|
|
260
|
+
}, _e = y("flex", {
|
|
237
261
|
variants: {
|
|
238
262
|
gap: {
|
|
239
263
|
stack: "gap-[var(--space-stack)]",
|
|
@@ -258,8 +282,8 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
258
282
|
measure: !1,
|
|
259
283
|
direction: "column"
|
|
260
284
|
}
|
|
261
|
-
}),
|
|
262
|
-
className:
|
|
285
|
+
}), ve = ({ gap: e, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ t("div", {
|
|
286
|
+
className: _e({
|
|
263
287
|
gap: e,
|
|
264
288
|
measure: n,
|
|
265
289
|
direction: r,
|
|
@@ -267,70 +291,88 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
267
291
|
}),
|
|
268
292
|
"data-testid": o,
|
|
269
293
|
children: a
|
|
270
|
-
}),
|
|
271
|
-
className:
|
|
294
|
+
}), ye = y(["min-w-0 border border-solid border-border bg-surface text-foreground", "p-[var(--space-box-inset)] [overflow-wrap:anywhere]"].join(" ")), be = ({ children: e, name: n, testId: r }) => n === void 0 || n === "" ? /* @__PURE__ */ t("div", {
|
|
295
|
+
className: ye(),
|
|
272
296
|
"data-testid": r,
|
|
273
297
|
children: e
|
|
274
298
|
}) : /* @__PURE__ */ t("div", {
|
|
275
|
-
className:
|
|
299
|
+
className: ye(),
|
|
276
300
|
role: "group",
|
|
277
301
|
"aria-label": n,
|
|
278
302
|
"data-testid": r,
|
|
279
303
|
children: e
|
|
280
|
-
}),
|
|
304
|
+
}), xe = y("inline-flex", { variants: { cut: {
|
|
281
305
|
full: "",
|
|
282
306
|
compact: ""
|
|
283
|
-
} } }),
|
|
307
|
+
} } }), Se = ({ name: e, cut: n, children: r, testId: i }) => e === "" ? /* @__PURE__ */ t("span", {
|
|
284
308
|
"aria-hidden": "true",
|
|
285
309
|
"data-cut": n,
|
|
286
|
-
className:
|
|
310
|
+
className: xe({ cut: n }),
|
|
287
311
|
"data-testid": i,
|
|
288
312
|
children: r
|
|
289
313
|
}) : /* @__PURE__ */ t("span", {
|
|
290
314
|
role: "img",
|
|
291
315
|
"aria-label": e,
|
|
292
316
|
"data-cut": n,
|
|
293
|
-
className:
|
|
317
|
+
className: xe({ cut: n }),
|
|
294
318
|
"data-testid": i,
|
|
295
319
|
children: r
|
|
296
|
-
}),
|
|
320
|
+
}), Ce = y("min-w-0 border-s-[length:var(--callout-mark-width)] border-solid ps-[var(--space-callout-inset)] text-foreground [overflow-wrap:anywhere] forced-colors:border-s-[CanvasText]", {
|
|
321
|
+
variants: { tone: {
|
|
322
|
+
warning: "border-warning",
|
|
323
|
+
info: "border-info",
|
|
324
|
+
success: "border-success",
|
|
325
|
+
error: "border-error"
|
|
326
|
+
} },
|
|
327
|
+
defaultVariants: { tone: "warning" }
|
|
328
|
+
}), we = ({ children: e, tone: n, name: r, testId: i }) => r === void 0 || r === "" ? /* @__PURE__ */ t("div", {
|
|
329
|
+
className: Ce({ tone: n }),
|
|
330
|
+
"data-testid": i,
|
|
331
|
+
children: e
|
|
332
|
+
}) : /* @__PURE__ */ t("div", {
|
|
333
|
+
className: Ce({ tone: n }),
|
|
334
|
+
role: "group",
|
|
335
|
+
"aria-label": r,
|
|
336
|
+
"data-testid": i,
|
|
337
|
+
children: e
|
|
338
|
+
}), Te = y("m-0 list-none p-0"), Ee = y([
|
|
297
339
|
"flex items-start gap-3 font-body text-body leading-body text-foreground",
|
|
298
340
|
"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-['']",
|
|
299
341
|
"[&: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)]"
|
|
300
|
-
].join(" ")),
|
|
342
|
+
].join(" ")), De = {
|
|
301
343
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
|
|
302
|
-
className:
|
|
344
|
+
className: Te(),
|
|
303
345
|
role: "list",
|
|
304
346
|
"data-testid": n,
|
|
305
347
|
children: e
|
|
306
348
|
}),
|
|
307
349
|
Item: ({ children: e }) => /* @__PURE__ */ t("li", {
|
|
308
|
-
className:
|
|
350
|
+
className: Ee(),
|
|
309
351
|
children: e
|
|
310
352
|
})
|
|
311
|
-
},
|
|
353
|
+
}, Oe = y("m-0 list-none p-0"), ke = y("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), Ae = {
|
|
312
354
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
|
|
313
|
-
className:
|
|
355
|
+
className: Oe(),
|
|
314
356
|
role: "list",
|
|
315
357
|
"data-testid": n,
|
|
316
358
|
children: e
|
|
317
359
|
}),
|
|
318
360
|
Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("li", {
|
|
319
|
-
className:
|
|
361
|
+
className: ke(),
|
|
320
362
|
"data-testid": n,
|
|
321
363
|
children: e
|
|
322
364
|
})
|
|
323
|
-
},
|
|
365
|
+
}, je = class extends Error {
|
|
324
366
|
constructor(e) {
|
|
325
367
|
super(`DefinitionList configuration is invalid: ${e}`), this.name = "DefinitionListConfigurationError";
|
|
326
368
|
}
|
|
327
|
-
},
|
|
369
|
+
}, Me = y("@container", {
|
|
328
370
|
variants: { density: {
|
|
329
371
|
comfortable: "[&>div]:py-[var(--space-definition-item)]",
|
|
330
372
|
compact: "[&>div]:py-[var(--space-definition-item-compact)]"
|
|
331
373
|
} },
|
|
332
374
|
defaultVariants: { density: "comfortable" }
|
|
333
|
-
}),
|
|
375
|
+
}), Ne = y([
|
|
334
376
|
"grid grid-flow-row-dense gap-[var(--space-stack)] border-b border-solid border-border first:border-t",
|
|
335
377
|
"[--definition-stack:clamp(0px,(var(--definition-threshold)-100%)*1000000,100%)]",
|
|
336
378
|
"[--definition-shortfall:clamp(0px,(var(--definition-threshold)-100cqi)*1000000,1px)]",
|
|
@@ -338,46 +380,46 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
338
380
|
"gap-x-[max(0px,var(--space-definition-column)-var(--definition-stack))]",
|
|
339
381
|
"[&>dt]:col-start-1 [&>dt]:self-baseline [&>dd]:col-span-full [&>dd]:self-baseline",
|
|
340
382
|
"[&>dd]:col-start-[calc(2-tan(atan2(var(--definition-shortfall),1px)))]"
|
|
341
|
-
].join(" ")),
|
|
383
|
+
].join(" ")), Pe = y("font-body text-subtitle leading-subtitle text-foreground wrap-break-word"), Fe = y("font-body text-body leading-body text-muted max-w-[var(--measure)] wrap-break-word"), Ie = {
|
|
342
384
|
weight: 1,
|
|
343
385
|
minWidth: "--definition-term-min-width"
|
|
344
|
-
},
|
|
386
|
+
}, Le = {
|
|
345
387
|
weight: 2,
|
|
346
388
|
minWidth: "--definition-description-min-width"
|
|
347
|
-
},
|
|
348
|
-
if (!Number.isFinite(t.weight) || t.weight <= 0) throw new
|
|
349
|
-
if (!
|
|
389
|
+
}, Re = /^--[A-Za-z0-9_-]+$/, ze = (e, t) => {
|
|
390
|
+
if (!Number.isFinite(t.weight) || t.weight <= 0) throw new je(`${e} needs a positive finite weight (got ${t.weight})`);
|
|
391
|
+
if (!Re.test(t.minWidth)) throw new je(`${e} needs a custom-property name such as --summary-term-min-width for minWidth (got ${JSON.stringify(t.minWidth)})`);
|
|
350
392
|
return t;
|
|
351
|
-
},
|
|
393
|
+
}, Be = (e, t) => {
|
|
352
394
|
let n = e.weight + t.weight;
|
|
353
395
|
return `calc(var(--space-definition-column) + max(var(${e.minWidth}) * ${n / e.weight}, var(${t.minWidth}) * ${n / t.weight}))`;
|
|
354
|
-
},
|
|
355
|
-
Root: ({ density: e, termColumn: n =
|
|
356
|
-
let o =
|
|
357
|
-
"--definition-threshold":
|
|
396
|
+
}, Ve = {
|
|
397
|
+
Root: ({ density: e, termColumn: n = Ie, descriptionColumn: r = Le, children: i, testId: a }) => {
|
|
398
|
+
let o = ze("termColumn", n), s = ze("descriptionColumn", r), c = {
|
|
399
|
+
"--definition-threshold": Be(o, s),
|
|
358
400
|
"--definition-term-share": `calc(${o.weight} / ${o.weight + s.weight})`
|
|
359
401
|
};
|
|
360
402
|
return /* @__PURE__ */ t("dl", {
|
|
361
|
-
className:
|
|
403
|
+
className: Me({ density: e }),
|
|
362
404
|
style: c,
|
|
363
405
|
"data-testid": a,
|
|
364
406
|
children: i
|
|
365
407
|
});
|
|
366
408
|
},
|
|
367
409
|
Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
368
|
-
className:
|
|
410
|
+
className: Ne(),
|
|
369
411
|
"data-testid": n,
|
|
370
412
|
children: e
|
|
371
413
|
}),
|
|
372
414
|
Term: ({ children: e }) => /* @__PURE__ */ t("dt", {
|
|
373
|
-
className:
|
|
415
|
+
className: Pe(),
|
|
374
416
|
children: e
|
|
375
417
|
}),
|
|
376
418
|
Description: ({ children: e }) => /* @__PURE__ */ t("dd", {
|
|
377
|
-
className:
|
|
419
|
+
className: Fe(),
|
|
378
420
|
children: e
|
|
379
421
|
})
|
|
380
|
-
},
|
|
422
|
+
}, He = y("block w-full object-cover bg-backing", {
|
|
381
423
|
variants: {
|
|
382
424
|
ratio: {
|
|
383
425
|
portrait: "aspect-portrait",
|
|
@@ -394,13 +436,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
394
436
|
}
|
|
395
437
|
},
|
|
396
438
|
defaultVariants: { focus: "center" }
|
|
397
|
-
}),
|
|
439
|
+
}), Ue = ({ src: e, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
|
|
398
440
|
let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ t("img", {
|
|
399
441
|
src: e,
|
|
400
442
|
alt: r,
|
|
401
443
|
width: i,
|
|
402
444
|
height: a,
|
|
403
|
-
className:
|
|
445
|
+
className: He({
|
|
404
446
|
ratio: o,
|
|
405
447
|
focus: s
|
|
406
448
|
}),
|
|
@@ -423,7 +465,17 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
423
465
|
children: l
|
|
424
466
|
})]
|
|
425
467
|
});
|
|
426
|
-
},
|
|
468
|
+
}, We = y("inline-block shrink-0 align-[-0.125em] forced-color-adjust-auto", { variants: { color: {
|
|
469
|
+
muted: "text-muted",
|
|
470
|
+
success: "text-success",
|
|
471
|
+
warning: "text-warning",
|
|
472
|
+
error: "text-error",
|
|
473
|
+
info: "text-info"
|
|
474
|
+
} } }), Ge = "M3.5 2h9a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H7.25L4 13.75V11h-.5a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", Ke = {
|
|
475
|
+
plus: ["M3 8h10", "M8 3v10"],
|
|
476
|
+
right: ["M3 8h10", "M9 4l4 4-4 4"],
|
|
477
|
+
remove: ["M3 8h10"],
|
|
478
|
+
dot: ["M8 5a3 3 0 1 0 0 6a3 3 0 1 0 0-6z"],
|
|
427
479
|
sort: [
|
|
428
480
|
"M5.5 13V3",
|
|
429
481
|
"M3 5.5l2.5-2.5L8 5.5",
|
|
@@ -431,38 +483,68 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
431
483
|
"M8 10.5l2.5 2.5 2.5-2.5"
|
|
432
484
|
],
|
|
433
485
|
"sort-ascending": ["M8 13V3", "M4 7l4-4 4 4"],
|
|
434
|
-
"sort-descending": ["M8 3v10", "M4 9l4 4 4-4"]
|
|
435
|
-
|
|
436
|
-
|
|
486
|
+
"sort-descending": ["M8 3v10", "M4 9l4 4 4-4"],
|
|
487
|
+
bin: [
|
|
488
|
+
"M2.5 4.5h11",
|
|
489
|
+
"M6 4.5V3a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v1.5",
|
|
490
|
+
"M4 4.5l.6 8.1a1 1 0 0 0 1 .9h4.8a1 1 0 0 0 1-.9l.6-8.1",
|
|
491
|
+
"M6.75 7.25v3.5",
|
|
492
|
+
"M9.25 7.25v3.5"
|
|
493
|
+
],
|
|
494
|
+
"bubble-exclamation": [
|
|
495
|
+
Ge,
|
|
496
|
+
"M8 4.5v2",
|
|
497
|
+
"M8 8.75h.01"
|
|
498
|
+
],
|
|
499
|
+
"bubble-tick": [Ge, "M5.75 6.75l1.5 1.5 3-3.5"]
|
|
500
|
+
}, qe = ({ name: e, label: n, color: r, testId: i }) => /* @__PURE__ */ t("svg", {
|
|
501
|
+
role: n ? "img" : void 0,
|
|
502
|
+
"aria-label": n || void 0,
|
|
503
|
+
"aria-hidden": !n || void 0,
|
|
437
504
|
focusable: !1,
|
|
438
505
|
viewBox: "0 0 16 16",
|
|
439
506
|
width: "1em",
|
|
440
507
|
height: "1em",
|
|
441
|
-
className:
|
|
442
|
-
"data-testid":
|
|
443
|
-
children:
|
|
444
|
-
d:
|
|
445
|
-
fill: "none",
|
|
446
|
-
stroke: "currentColor",
|
|
508
|
+
className: We({ color: r }),
|
|
509
|
+
"data-testid": i,
|
|
510
|
+
children: Ke[e].map((n) => /* @__PURE__ */ t("path", {
|
|
511
|
+
d: n,
|
|
512
|
+
fill: e === "dot" ? "currentColor" : "none",
|
|
513
|
+
stroke: e === "dot" ? "none" : "currentColor",
|
|
447
514
|
strokeWidth: 1.5,
|
|
448
515
|
strokeLinecap: "round",
|
|
449
516
|
strokeLinejoin: "round"
|
|
450
|
-
},
|
|
451
|
-
}),
|
|
517
|
+
}, n))
|
|
518
|
+
}), H = (e) => ({ label: n, color: r, testId: i }) => /* @__PURE__ */ t(qe, {
|
|
519
|
+
name: e,
|
|
520
|
+
label: n,
|
|
521
|
+
color: r,
|
|
522
|
+
testId: i
|
|
523
|
+
}), Je = Object.assign(({ name: e, label: n, color: r, testId: i }) => /* @__PURE__ */ t(qe, {
|
|
524
|
+
name: e,
|
|
525
|
+
label: n,
|
|
526
|
+
color: r,
|
|
527
|
+
testId: i
|
|
528
|
+
}), {
|
|
529
|
+
Plus: H("plus"),
|
|
530
|
+
Up: H("sort-ascending"),
|
|
531
|
+
Down: H("sort-descending"),
|
|
532
|
+
Right: H("right"),
|
|
533
|
+
Remove: H("remove")
|
|
534
|
+
}), U = class extends Error {
|
|
452
535
|
constructor(e) {
|
|
453
536
|
super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
|
|
454
537
|
}
|
|
455
|
-
},
|
|
538
|
+
}, Ye = y("w-full h-[var(--meter-track-thickness)] bg-meter-track border border-solid border-rule"), Xe = y("h-full w-[calc(var(--meter-level)*100%)]", {
|
|
456
539
|
variants: { treatment: {
|
|
457
540
|
neutral: "bg-meter-fill",
|
|
458
541
|
depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
|
|
459
542
|
} },
|
|
460
543
|
defaultVariants: { treatment: "neutral" }
|
|
461
|
-
}),
|
|
462
|
-
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new
|
|
463
|
-
if (n >= r) throw new
|
|
464
|
-
|
|
465
|
-
let c = { "--meter-level": (e - n) / (r - n) };
|
|
544
|
+
}), Ze = (e, t, n) => e <= t ? 0 : e >= n ? 1 : (e - t) / (n - t), Qe = ({ value: e, min: n = 0, max: r, treatment: i, label: a, valueText: o, testId: s }) => {
|
|
545
|
+
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new U(`value, min and max must be finite numbers (got value=${e}, min=${n}, max=${r})`);
|
|
546
|
+
if (n >= r) throw new U(`min must be less than max (got min=${n}, max=${r})`);
|
|
547
|
+
let c = { "--meter-level": Ze(e, n, r) };
|
|
466
548
|
return /* @__PURE__ */ t("div", {
|
|
467
549
|
role: "meter",
|
|
468
550
|
"aria-valuenow": e,
|
|
@@ -471,28 +553,28 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
471
553
|
"aria-label": a,
|
|
472
554
|
"aria-valuetext": o,
|
|
473
555
|
"data-testid": s,
|
|
474
|
-
className:
|
|
556
|
+
className: Ye(),
|
|
475
557
|
style: c,
|
|
476
558
|
children: /* @__PURE__ */ t("div", {
|
|
477
559
|
"aria-hidden": "true",
|
|
478
|
-
className:
|
|
560
|
+
className: Xe({ treatment: i })
|
|
479
561
|
})
|
|
480
562
|
});
|
|
481
|
-
},
|
|
563
|
+
}, $e = y(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), et = y("lg:sticky lg:top-6"), tt = y("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), nt = y("block pt-1 font-secondary text-label tracking-label text-foreground"), rt = {
|
|
482
564
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
483
|
-
className:
|
|
565
|
+
className: $e(),
|
|
484
566
|
"data-testid": n,
|
|
485
567
|
children: e
|
|
486
568
|
}),
|
|
487
569
|
Index: ({ number: e, children: r, testId: i }) => /* @__PURE__ */ n("div", {
|
|
488
|
-
className:
|
|
570
|
+
className: et(),
|
|
489
571
|
"data-testid": i,
|
|
490
572
|
"aria-hidden": "true",
|
|
491
573
|
children: [e !== void 0 && /* @__PURE__ */ t("span", {
|
|
492
|
-
className:
|
|
574
|
+
className: tt(),
|
|
493
575
|
children: e
|
|
494
576
|
}), /* @__PURE__ */ t("span", {
|
|
495
|
-
className:
|
|
577
|
+
className: nt(),
|
|
496
578
|
children: r
|
|
497
579
|
})]
|
|
498
580
|
}),
|
|
@@ -500,20 +582,29 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
500
582
|
"data-testid": n,
|
|
501
583
|
children: e
|
|
502
584
|
})
|
|
503
|
-
},
|
|
585
|
+
}, it = y("w-full shrink-0 border-t border-solid border-border forced-colors:border-[CanvasText]"), at = ({ testId: e }) => /* @__PURE__ */ t("div", {
|
|
586
|
+
"aria-hidden": "true",
|
|
587
|
+
className: it(),
|
|
588
|
+
"data-testid": e
|
|
589
|
+
}), ot = class extends Error {
|
|
504
590
|
constructor(e) {
|
|
505
591
|
super(`Table configuration is invalid: ${e}`), this.name = "TableConfigurationError";
|
|
506
592
|
}
|
|
507
|
-
},
|
|
593
|
+
}, W = "comfortable", G = "marker", st = y([
|
|
508
594
|
"overflow-x-auto",
|
|
595
|
+
"[&[data-icon-actions]]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
596
|
+
"[&[data-icon-actions]]:m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
597
|
+
"[&[data-icon-actions]]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
598
|
+
"[&[data-icon-actions]>table>*>tr>*:first-child]:pl-[max(var(--table-cell-padding-inline),calc(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
599
|
+
"[&[data-icon-actions]>table>*>tr>*:last-child]:pr-[max(var(--table-cell-padding-inline),calc(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
509
600
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
510
601
|
"[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
|
|
511
|
-
"[&_caption]:
|
|
602
|
+
"[&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
|
|
512
603
|
"[&>table>*:nth-child(2)>tr:first-child]:border-rule",
|
|
513
|
-
"[&[data-notes=supplementary]:not([data-columns])_[data-variant=note]]:max-md:hidden",
|
|
514
|
-
"[&[data-notes=content]:not([data-columns])>table]:max-md:block",
|
|
515
|
-
"[&[data-notes=content]:not([data-columns])_thead]:max-md:block [&[data-notes=content]:not([data-columns])_tbody]:max-md:block [&[data-notes=content]:not([data-columns])_tfoot]:max-md:block",
|
|
516
|
-
"[&[data-notes=content]:not([data-columns])_tr]:max-md:block [&[data-notes=content]:not([data-columns])_td]:max-md:block [&[data-notes=content]:not([data-columns])_th]:max-md:block",
|
|
604
|
+
"[&[data-notes=supplementary]:not([data-columns]):not([data-bounded])_[data-variant=note]]:max-md:hidden",
|
|
605
|
+
"[&[data-notes=content]:not([data-columns]):not([data-bounded])>table]:max-md:block",
|
|
606
|
+
"[&[data-notes=content]:not([data-columns]):not([data-bounded])_thead]:max-md:block [&[data-notes=content]:not([data-columns]):not([data-bounded])_tbody]:max-md:block [&[data-notes=content]:not([data-columns]):not([data-bounded])_tfoot]:max-md:block",
|
|
607
|
+
"[&[data-notes=content]:not([data-columns]):not([data-bounded])_tr]:max-md:block [&[data-notes=content]:not([data-columns]):not([data-bounded])_td]:max-md:block [&[data-notes=content]:not([data-columns]):not([data-bounded])_th]:max-md:block",
|
|
517
608
|
"[&[data-columns]>table]:grid [&[data-columns]>table]:grid-cols-[var(--table-columns)]",
|
|
518
609
|
"[&[data-columns]>table>caption]:col-span-full",
|
|
519
610
|
"[&[data-columns]>table>*:not(caption)]:col-span-full [&[data-columns]>table>*:not(caption)]:grid [&[data-columns]>table>*:not(caption)]:grid-cols-subgrid",
|
|
@@ -521,15 +612,33 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
521
612
|
"[&[data-columns]>table>*>tr>td]:wrap-anywhere [&[data-columns]>table>*>tr>th]:wrap-anywhere",
|
|
522
613
|
"[&:has([aria-selected])_tr>*:first-child]:pl-[var(--table-cell-padding-inline)]",
|
|
523
614
|
"[&:has(tr[tabindex])]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
524
|
-
"[&:has(tr[tabindex])]:m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
615
|
+
"[&:not([data-bounded]):has(tr[tabindex])]:m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
525
616
|
"[&:has(tr[tabindex])]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
526
617
|
].join(" "), {
|
|
527
|
-
variants: {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
618
|
+
variants: {
|
|
619
|
+
bounded: {
|
|
620
|
+
true: "max-h-full min-h-0 min-w-0 overflow-y-auto overscroll-contain p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] [&>table>thead]:sticky [&>table>thead]:top-0 [&>table>thead]:z-10 [&>table>thead]:bg-surface [&>table>thead>tr>*]:bg-surface",
|
|
621
|
+
false: ""
|
|
622
|
+
},
|
|
623
|
+
selectionTreatment: {
|
|
624
|
+
marker: "",
|
|
625
|
+
highlight: "[&>table>*>tr[aria-selected=true]]:bg-selected-surface [&>table>*>tr[aria-selected=true]]:[--color-error:var(--color-selected-error)]"
|
|
626
|
+
},
|
|
627
|
+
captionVisibility: {
|
|
628
|
+
visible: "[&>table>caption]:pb-3",
|
|
629
|
+
hidden: "[&>table>caption]:sr-only"
|
|
630
|
+
},
|
|
631
|
+
density: {
|
|
632
|
+
comfortable: "[--table-cell-padding-inline:var(--table-cell-inset-inline)] [--table-cell-padding-block:var(--table-cell-inset-block)]",
|
|
633
|
+
compact: "[--table-cell-padding-inline:var(--table-cell-inset-inline-compact)] [--table-cell-padding-block:var(--table-cell-inset-block-compact)]"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
defaultVariants: {
|
|
637
|
+
density: W,
|
|
638
|
+
captionVisibility: "visible",
|
|
639
|
+
selectionTreatment: G
|
|
640
|
+
}
|
|
641
|
+
}), ct = y([
|
|
533
642
|
"border-t border-solid border-border",
|
|
534
643
|
"[&[aria-selected=true]>*:first-child]:relative",
|
|
535
644
|
"[&[aria-selected=true]>*:first-child]:before:absolute [&[aria-selected=true]>*:first-child]:before:inset-y-0 [&[aria-selected=true]>*:first-child]:before:left-0",
|
|
@@ -540,7 +649,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
540
649
|
false: ""
|
|
541
650
|
} },
|
|
542
651
|
defaultVariants: { interactive: !1 }
|
|
543
|
-
}),
|
|
652
|
+
}), lt = [
|
|
544
653
|
"a[href]",
|
|
545
654
|
"button",
|
|
546
655
|
"input",
|
|
@@ -566,11 +675,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
566
675
|
"[role=\"searchbox\"]",
|
|
567
676
|
"[role=\"slider\"]",
|
|
568
677
|
"[role=\"spinbutton\"]"
|
|
569
|
-
].join(", "),
|
|
678
|
+
].join(", "), ut = (e, t) => {
|
|
570
679
|
if (!(t instanceof Element)) return !1;
|
|
571
|
-
let n = t.closest(
|
|
680
|
+
let n = t.closest(lt);
|
|
572
681
|
return n !== null && n !== e && e.contains(n);
|
|
573
|
-
},
|
|
682
|
+
}, dt = /* @__PURE__ */ new Set(["Enter", " "]), ft = y("px-[var(--table-cell-padding-inline)] py-[var(--table-cell-padding-block)] text-small first:pl-0 last:pr-0", {
|
|
574
683
|
variants: {
|
|
575
684
|
variant: {
|
|
576
685
|
value: "font-body text-foreground tabular-nums",
|
|
@@ -586,70 +695,108 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
586
695
|
variant: "value",
|
|
587
696
|
align: "left"
|
|
588
697
|
}
|
|
589
|
-
}),
|
|
698
|
+
}), pt = y("px-[var(--table-cell-padding-inline)] py-[var(--table-cell-padding-block)] font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
|
|
590
699
|
variants: { align: {
|
|
591
700
|
left: "text-left",
|
|
592
701
|
right: "text-right",
|
|
593
702
|
center: "text-center"
|
|
594
703
|
} },
|
|
595
704
|
defaultVariants: { align: "left" }
|
|
596
|
-
}),
|
|
597
|
-
|
|
705
|
+
}), mt = (e) => `var(--table-column-${e})`, ht = (e, t) => {
|
|
706
|
+
if (e.width === "icon-action") return "max-content";
|
|
707
|
+
let n = e.minWidth === void 0 ? void 0 : mt(e.minWidth);
|
|
598
708
|
if (e.width !== void 0) {
|
|
599
|
-
let t =
|
|
709
|
+
let t = mt(e.width);
|
|
600
710
|
return n === void 0 ? t : `max(${n}, ${t})`;
|
|
601
711
|
}
|
|
602
|
-
if (!Number.isFinite(e.weight) || e.weight <= 0) throw new
|
|
712
|
+
if (!Number.isFinite(e.weight) || e.weight <= 0) throw new ot(`column ${t + 1} needs a positive finite weight (got ${e.weight})`);
|
|
603
713
|
return `minmax(${n ?? "0"}, ${e.weight}fr)`;
|
|
604
|
-
},
|
|
605
|
-
let [
|
|
714
|
+
}, gt = (e) => e === void 0 || e.length === 0 ? void 0 : e.map(ht).join(" "), _t = (e, t, n, r) => {
|
|
715
|
+
let [i, a] = m(!0);
|
|
606
716
|
return d(() => {
|
|
607
|
-
let
|
|
608
|
-
if (
|
|
609
|
-
let
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
717
|
+
let i = e.current;
|
|
718
|
+
if (i === null) return;
|
|
719
|
+
let o = () => {
|
|
720
|
+
if (r) {
|
|
721
|
+
let e = t.current?.querySelector("thead")?.getBoundingClientRect().height ?? 0, n = Number.parseFloat(getComputedStyle(i).paddingTop) || 0;
|
|
722
|
+
i.style.scrollPaddingTop = `${e + 2 * n}px`;
|
|
723
|
+
}
|
|
724
|
+
a(i.scrollWidth > i.clientWidth || r && i.scrollHeight > i.clientHeight || i === document.activeElement);
|
|
725
|
+
};
|
|
726
|
+
o();
|
|
727
|
+
let s = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(o);
|
|
728
|
+
s?.observe(i);
|
|
729
|
+
for (let e of [
|
|
730
|
+
t.current,
|
|
731
|
+
n.current,
|
|
732
|
+
t.current?.querySelector("thead") ?? null
|
|
733
|
+
]) e !== null && s?.observe(e);
|
|
734
|
+
let c = new MutationObserver(o);
|
|
735
|
+
return c.observe(i, {
|
|
736
|
+
childList: !0,
|
|
737
|
+
subtree: !0,
|
|
738
|
+
characterData: !0
|
|
739
|
+
}), window.addEventListener("resize", o), i.addEventListener("blur", o), () => {
|
|
740
|
+
s?.disconnect(), c.disconnect(), r && i.style.removeProperty("scroll-padding-top"), window.removeEventListener("resize", o), i.removeEventListener("blur", o);
|
|
616
741
|
};
|
|
617
742
|
}, [
|
|
618
743
|
e,
|
|
619
744
|
t,
|
|
620
|
-
n
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
745
|
+
n,
|
|
746
|
+
r
|
|
747
|
+
]), i;
|
|
748
|
+
}, vt = (e) => {
|
|
749
|
+
let t = e.currentTarget, n = e.target;
|
|
750
|
+
if (n === t) return;
|
|
751
|
+
let r = t.getBoundingClientRect(), i = t.querySelector(":scope > table > thead"), a = n.getBoundingClientRect(), o = Number.parseFloat(getComputedStyle(t).paddingTop) || 0, s = r.top + t.clientTop + (i?.getBoundingClientRect().height ?? 0) + 2 * o, c = r.top + t.clientTop + t.clientHeight - o;
|
|
752
|
+
i?.contains(n) || (a.top < s ? t.scrollTop += a.top - s : a.bottom > c && (t.scrollTop += a.bottom - c)), a.left < r.left + o ? t.scrollLeft += a.left - r.left - o : a.right > r.left + t.clientLeft + t.clientWidth - o && (t.scrollLeft += a.right - r.left - t.clientLeft - t.clientWidth + o);
|
|
753
|
+
}, yt = {
|
|
754
|
+
Root: ({ caption: e, captionVisibility: r, bounded: i, selectionTreatment: a, notes: o, columns: s, density: c, children: l, testId: u }) => {
|
|
755
|
+
let d = p(null), f = p(null), m = p(null), h = gt(s), g = _t(d, f, m, i === !0), _ = h === void 0 ? void 0 : { "--table-columns": h }, v = h === void 0 ? void 0 : s?.length, y = /* @__PURE__ */ n("table", {
|
|
756
|
+
ref: f,
|
|
626
757
|
role: "table",
|
|
627
758
|
children: [/* @__PURE__ */ t("caption", {
|
|
628
|
-
ref:
|
|
759
|
+
ref: m,
|
|
629
760
|
children: e
|
|
630
|
-
}),
|
|
761
|
+
}), l]
|
|
631
762
|
});
|
|
632
|
-
return
|
|
633
|
-
className:
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
763
|
+
return o === void 0 && !i ? /* @__PURE__ */ t("section", {
|
|
764
|
+
className: st({
|
|
765
|
+
density: c,
|
|
766
|
+
captionVisibility: r,
|
|
767
|
+
selectionTreatment: a,
|
|
768
|
+
bounded: i
|
|
769
|
+
}),
|
|
770
|
+
style: _,
|
|
771
|
+
"data-columns": v,
|
|
772
|
+
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
773
|
+
"data-density": c ?? W,
|
|
774
|
+
"data-selection-treatment": a ?? G,
|
|
775
|
+
"data-testid": u,
|
|
638
776
|
"aria-label": e,
|
|
639
777
|
tabIndex: 0,
|
|
640
|
-
children:
|
|
778
|
+
children: y
|
|
641
779
|
}) : /* @__PURE__ */ t("div", {
|
|
642
|
-
ref:
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
780
|
+
ref: d,
|
|
781
|
+
onFocus: i ? vt : void 0,
|
|
782
|
+
className: st({
|
|
783
|
+
density: c,
|
|
784
|
+
captionVisibility: r,
|
|
785
|
+
selectionTreatment: a,
|
|
786
|
+
bounded: i
|
|
787
|
+
}),
|
|
788
|
+
style: _,
|
|
789
|
+
"data-bounded": i || void 0,
|
|
790
|
+
"data-notes": o,
|
|
791
|
+
"data-columns": v,
|
|
792
|
+
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
793
|
+
"data-density": c ?? W,
|
|
794
|
+
"data-selection-treatment": a ?? G,
|
|
795
|
+
"data-testid": u,
|
|
796
|
+
role: g ? "group" : void 0,
|
|
797
|
+
"aria-label": g ? e : void 0,
|
|
798
|
+
tabIndex: g ? 0 : void 0,
|
|
799
|
+
children: y
|
|
653
800
|
});
|
|
654
801
|
},
|
|
655
802
|
Head: ({ children: e }) => /* @__PURE__ */ t("thead", {
|
|
@@ -672,13 +819,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
672
819
|
return () => e?.unsubscribe();
|
|
673
820
|
}, [i]);
|
|
674
821
|
let s = (e) => {
|
|
675
|
-
|
|
822
|
+
ut(e.currentTarget, e.target) || r?.next();
|
|
676
823
|
}, c = (e) => {
|
|
677
|
-
e.target !== e.currentTarget || !
|
|
824
|
+
e.target !== e.currentTarget || !dt.has(e.key) || (e.key === " " && e.preventDefault(), e.repeat || r?.next());
|
|
678
825
|
}, l = r !== void 0;
|
|
679
826
|
return /* @__PURE__ */ t("tr", {
|
|
680
827
|
role: "row",
|
|
681
|
-
className:
|
|
828
|
+
className: ct({ interactive: l }),
|
|
682
829
|
"data-testid": n,
|
|
683
830
|
tabIndex: l ? 0 : void 0,
|
|
684
831
|
"aria-selected": i === void 0 ? void 0 : a,
|
|
@@ -691,19 +838,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
691
838
|
role: e === "row" ? "rowheader" : "columnheader",
|
|
692
839
|
scope: e,
|
|
693
840
|
"aria-sort": r,
|
|
694
|
-
className:
|
|
841
|
+
className: pt({ align: n }),
|
|
695
842
|
children: i
|
|
696
843
|
}),
|
|
697
844
|
Cell: ({ variant: e, align: n, children: r }) => /* @__PURE__ */ t("td", {
|
|
698
845
|
role: "cell",
|
|
699
|
-
className:
|
|
846
|
+
className: ft({
|
|
700
847
|
variant: e,
|
|
701
848
|
align: n
|
|
702
849
|
}),
|
|
703
850
|
"data-variant": e ?? "value",
|
|
704
851
|
children: r
|
|
705
852
|
})
|
|
706
|
-
},
|
|
853
|
+
}, bt = y("font-secondary text-label tracking-label font-medium", {
|
|
707
854
|
variants: { color: {
|
|
708
855
|
foreground: "text-foreground",
|
|
709
856
|
muted: "text-muted",
|
|
@@ -713,11 +860,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
713
860
|
info: "text-info"
|
|
714
861
|
} },
|
|
715
862
|
defaultVariants: { color: "muted" }
|
|
716
|
-
}),
|
|
717
|
-
className:
|
|
863
|
+
}), xt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
|
|
864
|
+
className: bt({ color: n }),
|
|
718
865
|
"data-testid": r,
|
|
719
866
|
children: e
|
|
720
|
-
}),
|
|
867
|
+
}), St = y("font-heading text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
721
868
|
variants: { color: {
|
|
722
869
|
foreground: "text-foreground",
|
|
723
870
|
muted: "text-muted",
|
|
@@ -727,11 +874,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
727
874
|
info: "text-info"
|
|
728
875
|
} },
|
|
729
876
|
defaultVariants: { color: "foreground" }
|
|
730
|
-
}),
|
|
731
|
-
className:
|
|
877
|
+
}), Ct = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h1", {
|
|
878
|
+
className: St({ color: n }),
|
|
732
879
|
"data-testid": r,
|
|
733
880
|
children: e
|
|
734
|
-
}),
|
|
881
|
+
}), wt = y("font-heading text-title leading-title tracking-optical", {
|
|
735
882
|
variants: { color: {
|
|
736
883
|
foreground: "text-foreground",
|
|
737
884
|
muted: "text-muted",
|
|
@@ -741,11 +888,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
741
888
|
info: "text-info"
|
|
742
889
|
} },
|
|
743
890
|
defaultVariants: { color: "foreground" }
|
|
744
|
-
}),
|
|
745
|
-
className:
|
|
891
|
+
}), Tt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h2", {
|
|
892
|
+
className: wt({ color: n }),
|
|
746
893
|
"data-testid": r,
|
|
747
894
|
children: e
|
|
748
|
-
}),
|
|
895
|
+
}), Et = y("font-heading text-subtitle leading-subtitle", {
|
|
749
896
|
variants: { color: {
|
|
750
897
|
foreground: "text-foreground",
|
|
751
898
|
muted: "text-muted",
|
|
@@ -755,11 +902,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
755
902
|
info: "text-info"
|
|
756
903
|
} },
|
|
757
904
|
defaultVariants: { color: "foreground" }
|
|
758
|
-
}),
|
|
759
|
-
className:
|
|
905
|
+
}), Dt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h3", {
|
|
906
|
+
className: Et({ color: n }),
|
|
760
907
|
"data-testid": r,
|
|
761
908
|
children: e
|
|
762
|
-
}),
|
|
909
|
+
}), Ot = y("font-heading text-body leading-body font-bold", {
|
|
763
910
|
variants: { color: {
|
|
764
911
|
foreground: "text-foreground",
|
|
765
912
|
muted: "text-muted",
|
|
@@ -769,11 +916,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
769
916
|
info: "text-info"
|
|
770
917
|
} },
|
|
771
918
|
defaultVariants: { color: "foreground" }
|
|
772
|
-
}),
|
|
773
|
-
className:
|
|
919
|
+
}), kt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h4", {
|
|
920
|
+
className: Ot({ color: n }),
|
|
774
921
|
"data-testid": r,
|
|
775
922
|
children: e
|
|
776
|
-
}),
|
|
923
|
+
}), At = y("font-heading text-body leading-body font-semibold", {
|
|
777
924
|
variants: { color: {
|
|
778
925
|
foreground: "text-foreground",
|
|
779
926
|
muted: "text-muted",
|
|
@@ -783,11 +930,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
783
930
|
info: "text-info"
|
|
784
931
|
} },
|
|
785
932
|
defaultVariants: { color: "foreground" }
|
|
786
|
-
}),
|
|
787
|
-
className:
|
|
933
|
+
}), jt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h5", {
|
|
934
|
+
className: At({ color: n }),
|
|
788
935
|
"data-testid": r,
|
|
789
936
|
children: e
|
|
790
|
-
}),
|
|
937
|
+
}), Mt = y("font-heading text-body leading-body font-medium", {
|
|
791
938
|
variants: { color: {
|
|
792
939
|
foreground: "text-foreground",
|
|
793
940
|
muted: "text-muted",
|
|
@@ -797,111 +944,169 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
797
944
|
info: "text-info"
|
|
798
945
|
} },
|
|
799
946
|
defaultVariants: { color: "foreground" }
|
|
800
|
-
}),
|
|
801
|
-
className:
|
|
947
|
+
}), Nt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h6", {
|
|
948
|
+
className: Mt({ color: n }),
|
|
802
949
|
"data-testid": r,
|
|
803
950
|
children: e
|
|
804
|
-
}),
|
|
805
|
-
variants: {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
951
|
+
}), Pt = y("font-secondary text-small", {
|
|
952
|
+
variants: {
|
|
953
|
+
emphasis: {
|
|
954
|
+
regular: "",
|
|
955
|
+
strong: "font-strong"
|
|
956
|
+
},
|
|
957
|
+
truncate: {
|
|
958
|
+
true: "min-w-0 truncate [contain:inline-size]",
|
|
959
|
+
false: ""
|
|
960
|
+
},
|
|
961
|
+
color: {
|
|
962
|
+
foreground: "text-foreground",
|
|
963
|
+
muted: "text-muted",
|
|
964
|
+
success: "text-success",
|
|
965
|
+
warning: "text-warning",
|
|
966
|
+
error: "text-error",
|
|
967
|
+
info: "text-info"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
defaultVariants: {
|
|
971
|
+
color: "foreground",
|
|
972
|
+
truncate: !1,
|
|
973
|
+
emphasis: "regular"
|
|
974
|
+
}
|
|
975
|
+
}), Ft = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
976
|
+
className: Pt({
|
|
977
|
+
color: n,
|
|
978
|
+
emphasis: r,
|
|
979
|
+
truncate: i
|
|
980
|
+
}),
|
|
981
|
+
"data-testid": a,
|
|
817
982
|
children: e
|
|
818
|
-
}),
|
|
819
|
-
variants: {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
983
|
+
}), It = y("font-body text-body leading-body", {
|
|
984
|
+
variants: {
|
|
985
|
+
emphasis: {
|
|
986
|
+
regular: "",
|
|
987
|
+
strong: "font-strong"
|
|
988
|
+
},
|
|
989
|
+
truncate: {
|
|
990
|
+
true: "min-w-0 truncate [contain:inline-size]",
|
|
991
|
+
false: ""
|
|
992
|
+
},
|
|
993
|
+
color: {
|
|
994
|
+
foreground: "text-foreground",
|
|
995
|
+
muted: "text-muted",
|
|
996
|
+
success: "text-success",
|
|
997
|
+
warning: "text-warning",
|
|
998
|
+
error: "text-error",
|
|
999
|
+
info: "text-info"
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
defaultVariants: {
|
|
1003
|
+
color: "foreground",
|
|
1004
|
+
truncate: !1,
|
|
1005
|
+
emphasis: "regular"
|
|
1006
|
+
}
|
|
1007
|
+
}), Lt = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
1008
|
+
className: It({
|
|
1009
|
+
color: n,
|
|
1010
|
+
emphasis: r,
|
|
1011
|
+
truncate: i
|
|
1012
|
+
}),
|
|
1013
|
+
"data-testid": a,
|
|
831
1014
|
children: e
|
|
832
|
-
}),
|
|
833
|
-
variants: {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
success: "text-success",
|
|
837
|
-
warning: "text-warning",
|
|
838
|
-
error: "text-error",
|
|
839
|
-
info: "text-info"
|
|
1015
|
+
}), Rt = y("flex flex-col gap-[var(--space-stack)]", {
|
|
1016
|
+
variants: { variant: {
|
|
1017
|
+
default: "max-w-[var(--measure)]",
|
|
1018
|
+
letter: "min-w-0 max-w-[min(100%,var(--measure-letter))] font-letter text-letter"
|
|
840
1019
|
} },
|
|
841
|
-
defaultVariants: {
|
|
842
|
-
}),
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
1020
|
+
defaultVariants: { variant: "default" }
|
|
1021
|
+
}), zt = a(!1), Bt = y("font-body text-lede leading-lede text-foreground"), Vt = y("", {
|
|
1022
|
+
variants: {
|
|
1023
|
+
letter: {
|
|
1024
|
+
false: "font-body text-body leading-body",
|
|
1025
|
+
true: "font-letter text-letter leading-letter"
|
|
1026
|
+
},
|
|
1027
|
+
color: {
|
|
1028
|
+
foreground: "text-foreground",
|
|
1029
|
+
muted: "text-muted",
|
|
1030
|
+
success: "text-success",
|
|
1031
|
+
warning: "text-warning",
|
|
1032
|
+
error: "text-error",
|
|
1033
|
+
info: "text-info"
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
defaultVariants: {
|
|
1037
|
+
letter: !1,
|
|
1038
|
+
color: "foreground"
|
|
1039
|
+
}
|
|
1040
|
+
}), Ht = y("font-body text-small text-muted"), Ut = {
|
|
1041
|
+
Root: ({ children: e, testId: n, variant: r }) => /* @__PURE__ */ t(zt, {
|
|
1042
|
+
value: r === "letter",
|
|
1043
|
+
children: /* @__PURE__ */ t("div", {
|
|
1044
|
+
className: Rt({ variant: r }),
|
|
1045
|
+
"data-testid": n,
|
|
1046
|
+
children: e
|
|
1047
|
+
})
|
|
847
1048
|
}),
|
|
848
1049
|
Lede: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
849
|
-
className:
|
|
1050
|
+
className: Bt(),
|
|
850
1051
|
children: e
|
|
851
1052
|
}),
|
|
852
1053
|
Body: ({ color: e, children: n }) => /* @__PURE__ */ t("p", {
|
|
853
|
-
className:
|
|
1054
|
+
className: Vt({
|
|
1055
|
+
color: e,
|
|
1056
|
+
letter: c(zt)
|
|
1057
|
+
}),
|
|
854
1058
|
children: n
|
|
855
1059
|
}),
|
|
856
1060
|
Tail: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
857
|
-
className:
|
|
1061
|
+
className: Ht(),
|
|
858
1062
|
children: e
|
|
859
1063
|
})
|
|
860
|
-
},
|
|
1064
|
+
}, K = "font-control text-body text-balance wrap-anywhere rounded-[var(--radius-control)] select-none inline-flex flex-row items-center justify-center gap-2", Wt = y("transition-colors duration-[var(--motion-duration-color)] cursor-pointer disabled:cursor-not-allowed outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
861
1065
|
variants: { variant: {
|
|
862
|
-
primary: `${
|
|
863
|
-
secondary: `${
|
|
864
|
-
ghost: `${
|
|
865
|
-
outlined: `${
|
|
866
|
-
destructive: `${
|
|
1066
|
+
primary: `${K} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-primary text-primary-foreground hover:bg-primary-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
1067
|
+
secondary: `${K} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-secondary text-secondary-foreground hover:bg-secondary-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
1068
|
+
ghost: `${K} px-2 py-2 min-w-0 bg-transparent text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] hover:underline-offset-[var(--underline-offset)] disabled:bg-disabled disabled:hover:bg-disabled-hover`,
|
|
1069
|
+
outlined: `${K} px-[calc(1rem_-_1px)] sm:px-[calc(1.5rem_-_1px)] py-[calc(0.5rem_-_1px)] min-w-[min(var(--control-min-width),100%)] border border-solid border-secondary bg-transparent text-secondary hover:bg-backing disabled:border-disabled disabled:text-muted disabled:hover:bg-transparent`,
|
|
1070
|
+
destructive: `${K} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-error text-error-foreground hover:bg-error-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
1071
|
+
link: "inline p-0 min-w-0 max-w-full whitespace-normal wrap-anywhere bg-transparent [font:inherit] [letter-spacing:inherit] [text-align:inherit] text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] enabled:hover:decoration-[length:var(--underline-thickness-hover)] disabled:text-disabled",
|
|
867
1072
|
plain: "inline p-0 min-w-0 max-w-full whitespace-normal wrap-anywhere bg-transparent [font:inherit] [letter-spacing:inherit] [color:inherit] [text-align:inherit] disabled:text-disabled"
|
|
868
1073
|
} },
|
|
869
1074
|
defaultVariants: { variant: "primary" }
|
|
870
|
-
}),
|
|
1075
|
+
}), Gt = ({ children: e, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ t("button", {
|
|
871
1076
|
type: s,
|
|
872
1077
|
"data-testid": r,
|
|
873
|
-
className:
|
|
1078
|
+
className: Wt({ variant: i }),
|
|
874
1079
|
onClick: () => a?.next(),
|
|
875
1080
|
disabled: n,
|
|
876
1081
|
"aria-label": o,
|
|
877
1082
|
children: e
|
|
878
|
-
}),
|
|
1083
|
+
}), Kt = class extends Error {
|
|
879
1084
|
constructor(e) {
|
|
880
1085
|
super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
|
|
881
1086
|
}
|
|
882
|
-
},
|
|
1087
|
+
}, qt = y("flex flex-col gap-[var(--space-stack)]"), Jt = y([
|
|
883
1088
|
"group/choice flex w-full flex-row items-start gap-3 text-left",
|
|
884
1089
|
"rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
|
|
885
1090
|
"px-3 py-2",
|
|
886
1091
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
887
1092
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
888
1093
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
889
|
-
].join(" ")),
|
|
890
|
-
let t = c(
|
|
891
|
-
if (t === void 0) throw new
|
|
1094
|
+
].join(" ")), Yt = a(void 0), Xt = (e) => {
|
|
1095
|
+
let t = c(Yt);
|
|
1096
|
+
if (t === void 0) throw new Kt(e);
|
|
892
1097
|
return t;
|
|
893
|
-
},
|
|
1098
|
+
}, Zt = (e, t) => {
|
|
894
1099
|
let n = e.closest("[role=\"radiogroup\"]");
|
|
895
1100
|
if (n === null) return;
|
|
896
1101
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
|
|
897
1102
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
898
|
-
},
|
|
1103
|
+
}, Qt = {
|
|
899
1104
|
ArrowDown: 1,
|
|
900
1105
|
ArrowRight: 1,
|
|
901
1106
|
ArrowUp: -1,
|
|
902
1107
|
ArrowLeft: -1
|
|
903
|
-
},
|
|
904
|
-
Root: ({ selected: e, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ t(
|
|
1108
|
+
}, $t = {
|
|
1109
|
+
Root: ({ selected: e, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ t(Yt.Provider, {
|
|
905
1110
|
value: {
|
|
906
1111
|
selected: e,
|
|
907
1112
|
onSelect$: n,
|
|
@@ -911,13 +1116,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
911
1116
|
role: "radiogroup",
|
|
912
1117
|
"aria-label": r,
|
|
913
1118
|
"aria-disabled": i === !0 ? "true" : void 0,
|
|
914
|
-
className:
|
|
1119
|
+
className: qt(),
|
|
915
1120
|
"data-testid": o,
|
|
916
1121
|
children: a
|
|
917
1122
|
})
|
|
918
1123
|
}),
|
|
919
1124
|
Choice: ({ value: e, children: r, description: i, testId: a }) => {
|
|
920
|
-
let { selected: o, onSelect$: s, inert: c } =
|
|
1125
|
+
let { selected: o, onSelect$: s, inert: c } = Xt("Choice"), l = o === e, d = u(), f = `${d}-name`, p = `${d}-description`;
|
|
921
1126
|
return /* @__PURE__ */ n("button", {
|
|
922
1127
|
type: "button",
|
|
923
1128
|
role: "radio",
|
|
@@ -928,15 +1133,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
928
1133
|
disabled: c,
|
|
929
1134
|
"data-value": e,
|
|
930
1135
|
"data-testid": a,
|
|
931
|
-
className:
|
|
1136
|
+
className: Jt(),
|
|
932
1137
|
onClick: () => {
|
|
933
1138
|
l || s.next(e);
|
|
934
1139
|
},
|
|
935
1140
|
onKeyDown: (e) => {
|
|
936
|
-
let t =
|
|
1141
|
+
let t = Qt[e.key];
|
|
937
1142
|
if (t === void 0 || c) return;
|
|
938
1143
|
e.preventDefault();
|
|
939
|
-
let n =
|
|
1144
|
+
let n = Zt(e.currentTarget, t);
|
|
940
1145
|
if (n === void 0) return;
|
|
941
1146
|
n.focus();
|
|
942
1147
|
let r = n.dataset.value;
|
|
@@ -962,14 +1167,14 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
962
1167
|
})]
|
|
963
1168
|
});
|
|
964
1169
|
}
|
|
965
|
-
},
|
|
1170
|
+
}, en = y("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control 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", {
|
|
966
1171
|
variants: { variant: {
|
|
967
1172
|
text: "",
|
|
968
1173
|
email: "",
|
|
969
1174
|
url: ""
|
|
970
1175
|
} },
|
|
971
1176
|
defaultVariants: { variant: "text" }
|
|
972
|
-
}),
|
|
1177
|
+
}), tn = ({ label: e, name: r, variant: i, required: a, optionalLabel: o, invalid: s, disabled: c, defaultValue: d, placeholder: f, autocomplete: m, hint: h, errorMessage: g, onInput$: _, reset$: v, testId: y }) => {
|
|
973
1178
|
let b = u(), x = `${b}-control`, S = `${b}-hint`, C = `${b}-error`, w = [h ? S : void 0, s ? C : void 0].filter(Boolean).join(" ") || void 0, T = p(null);
|
|
974
1179
|
return l(() => {
|
|
975
1180
|
let e = v?.subscribe(() => {
|
|
@@ -989,7 +1194,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
989
1194
|
id: x,
|
|
990
1195
|
name: r,
|
|
991
1196
|
type: i ?? "text",
|
|
992
|
-
className:
|
|
1197
|
+
className: en({ variant: i }),
|
|
993
1198
|
required: a,
|
|
994
1199
|
disabled: c,
|
|
995
1200
|
defaultValue: d,
|
|
@@ -1016,7 +1221,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1016
1221
|
})
|
|
1017
1222
|
]
|
|
1018
1223
|
});
|
|
1019
|
-
},
|
|
1224
|
+
}, nn = y("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1020
1225
|
variants: { treatment: {
|
|
1021
1226
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
1022
1227
|
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",
|
|
@@ -1024,15 +1229,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1024
1229
|
graphic: "text-inherit no-underline"
|
|
1025
1230
|
} },
|
|
1026
1231
|
defaultVariants: { treatment: "prose" }
|
|
1027
|
-
}),
|
|
1232
|
+
}), rn = ({ href: e, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ t("a", {
|
|
1028
1233
|
href: e,
|
|
1029
|
-
className:
|
|
1234
|
+
className: nn({ treatment: r }),
|
|
1030
1235
|
target: i ? "_blank" : void 0,
|
|
1031
1236
|
rel: i ? "noopener noreferrer" : void 0,
|
|
1032
1237
|
"aria-current": a ? "page" : void 0,
|
|
1033
1238
|
"data-testid": o,
|
|
1034
1239
|
children: n
|
|
1035
|
-
}),
|
|
1240
|
+
}), an = (e, t, n, r) => {
|
|
1036
1241
|
let i = Math.max(e.length - 1, 0) * r;
|
|
1037
1242
|
if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
|
|
1038
1243
|
let a = 0, o = t;
|
|
@@ -1041,11 +1246,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1041
1246
|
o += t + r, a += 1;
|
|
1042
1247
|
}
|
|
1043
1248
|
return a;
|
|
1044
|
-
},
|
|
1249
|
+
}, on = class extends Error {
|
|
1045
1250
|
constructor(e) {
|
|
1046
1251
|
super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
|
|
1047
1252
|
}
|
|
1048
|
-
},
|
|
1253
|
+
}, sn = "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", cn = `relative inline-flex shrink-0 cursor-pointer items-center rounded-[var(--radius-control)] bg-backing px-2 py-0.5 font-secondary text-small text-foreground disabled:cursor-not-allowed disabled:text-muted pointer-events-auto ${sn}`, q = y("", {
|
|
1049
1254
|
variants: { part: {
|
|
1050
1255
|
root: [
|
|
1051
1256
|
"relative flex flex-col gap-[var(--space-stack)]",
|
|
@@ -1058,7 +1263,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1058
1263
|
"font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
|
|
1059
1264
|
"data-[disabled]:border-disabled data-[disabled]:text-muted"
|
|
1060
1265
|
].join(" "),
|
|
1061
|
-
trigger: `absolute inset-0 flex cursor-pointer items-center justify-end rounded-[var(--radius-control)] bg-transparent px-3 text-muted disabled:cursor-not-allowed ${
|
|
1266
|
+
trigger: `absolute inset-0 flex cursor-pointer items-center justify-end rounded-[var(--radius-control)] bg-transparent px-3 text-muted disabled:cursor-not-allowed ${sn}`,
|
|
1062
1267
|
clip: "relative min-w-0 flex-1 overflow-hidden p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] -m-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] pointer-events-none",
|
|
1063
1268
|
track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
|
|
1064
1269
|
chip: [
|
|
@@ -1066,9 +1271,9 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1066
1271
|
"rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
|
|
1067
1272
|
"group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
|
|
1068
1273
|
].join(" "),
|
|
1069
|
-
count:
|
|
1070
|
-
countMeasure: `${
|
|
1071
|
-
iconButton: `relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--radius-control)] text-muted transition-colors duration-[var(--motion-duration-color)] hover:text-foreground disabled:cursor-not-allowed disabled:hover:text-muted ${
|
|
1274
|
+
count: cn,
|
|
1275
|
+
countMeasure: `${cn} invisible absolute`,
|
|
1276
|
+
iconButton: `relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--radius-control)] text-muted transition-colors duration-[var(--motion-duration-color)] hover:text-foreground disabled:cursor-not-allowed disabled:hover:text-muted ${sn}`,
|
|
1072
1277
|
surface: [
|
|
1073
1278
|
"absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
|
|
1074
1279
|
"rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
|
|
@@ -1077,22 +1282,22 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1077
1282
|
].join(" ")
|
|
1078
1283
|
} },
|
|
1079
1284
|
defaultVariants: { part: "root" }
|
|
1080
|
-
}),
|
|
1285
|
+
}), ln = y([
|
|
1081
1286
|
"group/option flex w-full flex-row items-center gap-3 text-left",
|
|
1082
1287
|
"rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
|
|
1083
1288
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1084
1289
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1085
1290
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1086
|
-
].join(" ")),
|
|
1087
|
-
let t = c(
|
|
1088
|
-
if (t === void 0) throw new
|
|
1291
|
+
].join(" ")), un = 8, dn = a(void 0), fn = (e) => {
|
|
1292
|
+
let t = c(dn);
|
|
1293
|
+
if (t === void 0) throw new on(e);
|
|
1089
1294
|
return t;
|
|
1090
|
-
},
|
|
1295
|
+
}, J = (e) => (t) => {
|
|
1091
1296
|
e.current = t ?? void 0;
|
|
1092
|
-
},
|
|
1297
|
+
}, pn = (e) => e.getBoundingClientRect().width, mn = (e) => r.toArray(e).flatMap((e) => {
|
|
1093
1298
|
if (!o(e)) return [];
|
|
1094
|
-
if (e.type === i) return
|
|
1095
|
-
if (e.type ===
|
|
1299
|
+
if (e.type === i) return mn(e.props.children);
|
|
1300
|
+
if (e.type === Cn) {
|
|
1096
1301
|
let { value: t, children: n } = e.props;
|
|
1097
1302
|
return [{
|
|
1098
1303
|
value: t,
|
|
@@ -1100,19 +1305,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1100
1305
|
}];
|
|
1101
1306
|
}
|
|
1102
1307
|
return [];
|
|
1103
|
-
}),
|
|
1308
|
+
}), hn = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), gn = (e) => {
|
|
1104
1309
|
let t = document.activeElement;
|
|
1105
1310
|
return !e.contains(t) || t instanceof Element && t.closest("[data-overflow]") !== null;
|
|
1106
|
-
},
|
|
1311
|
+
}, _n = (e) => e.querySelector("[role=\"checkbox\"][aria-checked=\"true\"]") ?? e.querySelector("[role=\"checkbox\"]") ?? void 0, vn = (e, t) => [...new Set(e.map(({ value: e }) => e).filter((e) => t.has(e)))], yn = (e) => e.kind === "firstOption" || !e.control.isConnected, bn = (e, t, n, r) => {
|
|
1107
1312
|
switch (e.kind) {
|
|
1108
|
-
case "firstOption": return r === void 0 ? void 0 :
|
|
1313
|
+
case "firstOption": return r === void 0 ? void 0 : _n(r);
|
|
1109
1314
|
case "afterRemoval": {
|
|
1110
|
-
let r =
|
|
1315
|
+
let r = hn(t);
|
|
1111
1316
|
return r[e.index] ?? r[e.index - 1] ?? n;
|
|
1112
1317
|
}
|
|
1113
1318
|
case "afterClear": return n;
|
|
1114
1319
|
}
|
|
1115
|
-
},
|
|
1320
|
+
}, xn = () => /* @__PURE__ */ t("svg", {
|
|
1116
1321
|
"aria-hidden": !0,
|
|
1117
1322
|
focusable: !1,
|
|
1118
1323
|
viewBox: "0 0 16 16",
|
|
@@ -1124,89 +1329,89 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1124
1329
|
strokeWidth: 1.5,
|
|
1125
1330
|
strokeLinecap: "round"
|
|
1126
1331
|
})
|
|
1127
|
-
}),
|
|
1128
|
-
let y = u(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [
|
|
1332
|
+
}), Sn = ({ label: e, selected$: r, onChange$: i, emptyLabel: a, removeLabel: o, clearLabel: s, overflowLabel: c, hint: h, disabled: g, testId: _, children: v }) => {
|
|
1333
|
+
let y = u(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [ee, E] = m([]), [te, D] = m(!1), [ne, re] = m(void 0), [ie, ae] = m("below"), [, O] = f((e) => e + 1, 0), k = p(void 0), oe = p(void 0), A = p(void 0), j = p(void 0), M = p(void 0), N = p(void 0), P = p(!1), F = te && !T, I = mn(v), L = new Set(ee), R = I.filter((e) => L.has(e.value)), z = ne === void 0 ? R.length : Math.min(ne, R.length), se = R.length - z;
|
|
1129
1334
|
d(() => {
|
|
1130
|
-
|
|
1131
|
-
let e = r.subscribe((e) =>
|
|
1335
|
+
E([]);
|
|
1336
|
+
let e = r.subscribe((e) => E(e));
|
|
1132
1337
|
return () => e.unsubscribe();
|
|
1133
1338
|
}, [r]), l(() => {
|
|
1134
|
-
T &&
|
|
1339
|
+
T && D(!1);
|
|
1135
1340
|
}, [T]), d(() => {
|
|
1136
|
-
let e =
|
|
1341
|
+
let e = j.current;
|
|
1137
1342
|
if (e === void 0 || typeof ResizeObserver > "u") return;
|
|
1138
|
-
let t = new ResizeObserver(() =>
|
|
1343
|
+
let t = new ResizeObserver(() => O());
|
|
1139
1344
|
return t.observe(e), () => t.disconnect();
|
|
1140
1345
|
}, []), d(() => {
|
|
1141
|
-
let e =
|
|
1346
|
+
let e = j.current;
|
|
1142
1347
|
if (e === void 0) return;
|
|
1143
|
-
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i =
|
|
1144
|
-
|
|
1348
|
+
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i = an(t.map(pn), n === null ? 0 : pn(n), pn(e), r);
|
|
1349
|
+
re((e) => e === i ? e : i);
|
|
1145
1350
|
}), d(() => {
|
|
1146
|
-
let e =
|
|
1147
|
-
if (!
|
|
1148
|
-
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom -
|
|
1149
|
-
t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`),
|
|
1351
|
+
let e = oe.current, t = M.current;
|
|
1352
|
+
if (!F || e === void 0 || t === void 0) return;
|
|
1353
|
+
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom - un, i = n.top - un, a = t.scrollHeight > r && i > r;
|
|
1354
|
+
t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`), ae(a ? "above" : "below");
|
|
1150
1355
|
}), l(() => {
|
|
1151
|
-
if (!
|
|
1356
|
+
if (!F) return;
|
|
1152
1357
|
let e = (e) => {
|
|
1153
|
-
let t =
|
|
1154
|
-
t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (
|
|
1358
|
+
let t = k.current;
|
|
1359
|
+
t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (P.current = !1, N.current = void 0, D(!1));
|
|
1155
1360
|
};
|
|
1156
1361
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1157
|
-
}, [
|
|
1158
|
-
let e =
|
|
1362
|
+
}, [F]), d(() => {
|
|
1363
|
+
let e = k.current, t = A.current;
|
|
1159
1364
|
if (e === void 0 || t === void 0) return;
|
|
1160
|
-
let n =
|
|
1161
|
-
n !== void 0 &&
|
|
1365
|
+
let n = N.current;
|
|
1366
|
+
n !== void 0 && yn(n) ? (N.current = void 0, bn(n, e, t, F ? M.current : void 0)?.focus()) : n === void 0 && P.current && gn(e) && t.focus(), P.current = e.contains(document.activeElement);
|
|
1162
1367
|
});
|
|
1163
|
-
let
|
|
1164
|
-
i.next(
|
|
1165
|
-
},
|
|
1368
|
+
let B = (e) => {
|
|
1369
|
+
i.next(vn(I, e));
|
|
1370
|
+
}, ce = (e) => {
|
|
1166
1371
|
if (T) return;
|
|
1167
|
-
let t = new Set(
|
|
1168
|
-
t.delete(e) || t.add(e),
|
|
1169
|
-
},
|
|
1372
|
+
let t = new Set(L);
|
|
1373
|
+
t.delete(e) || t.add(e), B(t);
|
|
1374
|
+
}, le = (e, t) => (n) => {
|
|
1170
1375
|
if (T) return;
|
|
1171
|
-
document.activeElement === n.currentTarget && (
|
|
1376
|
+
document.activeElement === n.currentTarget && (N.current = {
|
|
1172
1377
|
kind: "afterRemoval",
|
|
1173
1378
|
index: t,
|
|
1174
1379
|
control: n.currentTarget
|
|
1175
1380
|
});
|
|
1176
|
-
let r = new Set(
|
|
1177
|
-
r.delete(e),
|
|
1178
|
-
},
|
|
1179
|
-
T || (document.activeElement === e.currentTarget && (
|
|
1381
|
+
let r = new Set(L);
|
|
1382
|
+
r.delete(e), B(r);
|
|
1383
|
+
}, ue = (e) => {
|
|
1384
|
+
T || (document.activeElement === e.currentTarget && (N.current = {
|
|
1180
1385
|
kind: "afterClear",
|
|
1181
1386
|
control: e.currentTarget
|
|
1182
1387
|
}), i.next([]));
|
|
1183
|
-
}, U = (e) => {
|
|
1184
|
-
T || (e.detail === 0 && (F.current = { kind: "firstOption" }), O(!0));
|
|
1185
|
-
}, le = (e) => {
|
|
1186
|
-
L ? O(!1) : U(e);
|
|
1187
|
-
}, ue = (e) => {
|
|
1188
|
-
if (e.key !== "ArrowDown" || T) return;
|
|
1189
|
-
e.preventDefault();
|
|
1190
|
-
let t = P.current;
|
|
1191
|
-
L && t !== void 0 ? tn(t)?.focus() : (F.current = { kind: "firstOption" }, O(!0));
|
|
1192
|
-
}, W = (e) => {
|
|
1193
|
-
e.key !== "Escape" || !L || (e.preventDefault(), e.stopPropagation(), O(!1), M.current?.focus());
|
|
1194
1388
|
}, de = (e) => {
|
|
1195
|
-
|
|
1196
|
-
let t = F.current;
|
|
1197
|
-
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (F.current = void 0);
|
|
1389
|
+
T || (e.detail === 0 && (N.current = { kind: "firstOption" }), D(!0));
|
|
1198
1390
|
}, fe = (e) => {
|
|
1199
|
-
|
|
1200
|
-
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (I.current = !1, F.current = void 0, O(!1));
|
|
1391
|
+
F ? D(!1) : de(e);
|
|
1201
1392
|
}, pe = (e) => {
|
|
1393
|
+
if (e.key !== "ArrowDown" || T) return;
|
|
1394
|
+
e.preventDefault();
|
|
1395
|
+
let t = M.current;
|
|
1396
|
+
F && t !== void 0 ? _n(t)?.focus() : (N.current = { kind: "firstOption" }, D(!0));
|
|
1397
|
+
}, me = (e) => {
|
|
1398
|
+
e.key !== "Escape" || !F || (e.preventDefault(), e.stopPropagation(), D(!1), A.current?.focus());
|
|
1399
|
+
}, he = (e) => {
|
|
1400
|
+
P.current = !0;
|
|
1401
|
+
let t = N.current;
|
|
1402
|
+
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (N.current = void 0);
|
|
1403
|
+
}, V = (e) => {
|
|
1404
|
+
let t = k.current, n = e.relatedTarget;
|
|
1405
|
+
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (P.current = !1, N.current = void 0, D(!1));
|
|
1406
|
+
}, ge = (e) => {
|
|
1202
1407
|
(!(e.target instanceof Element) || e.target.closest("button") === null) && e.preventDefault();
|
|
1203
|
-
},
|
|
1408
|
+
}, _e = [R.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
|
|
1204
1409
|
return /* @__PURE__ */ n("div", {
|
|
1205
|
-
ref:
|
|
1206
|
-
className:
|
|
1207
|
-
onKeyDown:
|
|
1208
|
-
onFocus:
|
|
1209
|
-
onBlur:
|
|
1410
|
+
ref: J(k),
|
|
1411
|
+
className: q(),
|
|
1412
|
+
onKeyDown: me,
|
|
1413
|
+
onFocus: he,
|
|
1414
|
+
onBlur: V,
|
|
1210
1415
|
children: [
|
|
1211
1416
|
/* @__PURE__ */ t("label", {
|
|
1212
1417
|
id: b,
|
|
@@ -1214,24 +1419,24 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1214
1419
|
children: e
|
|
1215
1420
|
}),
|
|
1216
1421
|
/* @__PURE__ */ n("div", {
|
|
1217
|
-
ref:
|
|
1422
|
+
ref: J(oe),
|
|
1218
1423
|
"data-multiselect-field": !0,
|
|
1219
1424
|
"data-disabled": T || void 0,
|
|
1220
|
-
className:
|
|
1425
|
+
className: q({ part: "field" }),
|
|
1221
1426
|
children: [
|
|
1222
1427
|
/* @__PURE__ */ t("button", {
|
|
1223
|
-
ref:
|
|
1428
|
+
ref: J(A),
|
|
1224
1429
|
id: x,
|
|
1225
1430
|
type: "button",
|
|
1226
1431
|
"aria-labelledby": b,
|
|
1227
|
-
"aria-expanded":
|
|
1228
|
-
"aria-controls":
|
|
1229
|
-
"aria-describedby":
|
|
1432
|
+
"aria-expanded": F,
|
|
1433
|
+
"aria-controls": F ? S : void 0,
|
|
1434
|
+
"aria-describedby": _e,
|
|
1230
1435
|
disabled: T,
|
|
1231
1436
|
"data-testid": _,
|
|
1232
|
-
className:
|
|
1233
|
-
onClick:
|
|
1234
|
-
onKeyDown:
|
|
1437
|
+
className: q({ part: "trigger" }),
|
|
1438
|
+
onClick: fe,
|
|
1439
|
+
onKeyDown: pe,
|
|
1235
1440
|
children: /* @__PURE__ */ t("svg", {
|
|
1236
1441
|
"aria-hidden": !0,
|
|
1237
1442
|
focusable: !1,
|
|
@@ -1248,25 +1453,25 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1248
1453
|
})
|
|
1249
1454
|
}),
|
|
1250
1455
|
/* @__PURE__ */ t("div", {
|
|
1251
|
-
className:
|
|
1456
|
+
className: q({ part: "clip" }),
|
|
1252
1457
|
children: /* @__PURE__ */ n("div", {
|
|
1253
|
-
ref:
|
|
1458
|
+
ref: J(j),
|
|
1254
1459
|
"data-multiselect-track": !0,
|
|
1255
|
-
className:
|
|
1460
|
+
className: q({ part: "track" }),
|
|
1256
1461
|
children: [
|
|
1257
|
-
|
|
1462
|
+
R.length === 0 && /* @__PURE__ */ t("span", {
|
|
1258
1463
|
id: w,
|
|
1259
1464
|
className: "truncate text-muted",
|
|
1260
1465
|
children: a
|
|
1261
1466
|
}),
|
|
1262
|
-
|
|
1263
|
-
let a = i >=
|
|
1467
|
+
R.map(({ value: e, label: r }, i) => {
|
|
1468
|
+
let a = i >= z;
|
|
1264
1469
|
return /* @__PURE__ */ n("span", {
|
|
1265
1470
|
"data-multiselect-chip": !0,
|
|
1266
1471
|
"data-overflow": a || void 0,
|
|
1267
1472
|
"aria-hidden": a || void 0,
|
|
1268
1473
|
inert: a || void 0,
|
|
1269
|
-
className:
|
|
1474
|
+
className: q({ part: "chip" }),
|
|
1270
1475
|
children: [/* @__PURE__ */ t("span", {
|
|
1271
1476
|
className: "truncate",
|
|
1272
1477
|
children: r
|
|
@@ -1275,35 +1480,35 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1275
1480
|
"aria-label": o.replaceAll("{label}", r),
|
|
1276
1481
|
disabled: T,
|
|
1277
1482
|
tabIndex: a ? -1 : void 0,
|
|
1278
|
-
className:
|
|
1279
|
-
onClick:
|
|
1280
|
-
children: /* @__PURE__ */ t(
|
|
1483
|
+
className: q({ part: "iconButton" }),
|
|
1484
|
+
onClick: le(e, i),
|
|
1485
|
+
children: /* @__PURE__ */ t(xn, {})
|
|
1281
1486
|
})]
|
|
1282
1487
|
}, e);
|
|
1283
1488
|
}),
|
|
1284
|
-
|
|
1489
|
+
se > 0 && /* @__PURE__ */ t("button", {
|
|
1285
1490
|
type: "button",
|
|
1286
1491
|
disabled: T,
|
|
1287
|
-
className:
|
|
1288
|
-
onClick:
|
|
1289
|
-
children: c.replaceAll("{count}", String(
|
|
1492
|
+
className: q({ part: "count" }),
|
|
1493
|
+
onClick: de,
|
|
1494
|
+
children: c.replaceAll("{count}", String(se))
|
|
1290
1495
|
}),
|
|
1291
|
-
|
|
1496
|
+
R.length > 0 && /* @__PURE__ */ t("span", {
|
|
1292
1497
|
"aria-hidden": !0,
|
|
1293
1498
|
"data-multiselect-count": !0,
|
|
1294
|
-
className:
|
|
1295
|
-
children: c.replaceAll("{count}", String(
|
|
1499
|
+
className: q({ part: "countMeasure" }),
|
|
1500
|
+
children: c.replaceAll("{count}", String(R.length))
|
|
1296
1501
|
})
|
|
1297
1502
|
]
|
|
1298
1503
|
})
|
|
1299
1504
|
}),
|
|
1300
|
-
|
|
1505
|
+
R.length > 0 ? /* @__PURE__ */ t("button", {
|
|
1301
1506
|
type: "button",
|
|
1302
1507
|
"aria-label": s,
|
|
1303
1508
|
disabled: T,
|
|
1304
|
-
className:
|
|
1305
|
-
onClick:
|
|
1306
|
-
children: /* @__PURE__ */ t(
|
|
1509
|
+
className: q({ part: "iconButton" }),
|
|
1510
|
+
onClick: ue,
|
|
1511
|
+
children: /* @__PURE__ */ t(xn, {})
|
|
1307
1512
|
}) : /* @__PURE__ */ t("span", {
|
|
1308
1513
|
"aria-hidden": !0,
|
|
1309
1514
|
className: "size-6 shrink-0"
|
|
@@ -1312,19 +1517,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1312
1517
|
"aria-hidden": !0,
|
|
1313
1518
|
className: "size-6 shrink-0"
|
|
1314
1519
|
}),
|
|
1315
|
-
|
|
1316
|
-
ref:
|
|
1520
|
+
F && /* @__PURE__ */ t("div", {
|
|
1521
|
+
ref: J(M),
|
|
1317
1522
|
id: S,
|
|
1318
1523
|
role: "group",
|
|
1319
1524
|
"aria-labelledby": b,
|
|
1320
|
-
"data-placement":
|
|
1321
|
-
className:
|
|
1322
|
-
onMouseDown:
|
|
1323
|
-
children: /* @__PURE__ */ t(
|
|
1525
|
+
"data-placement": ie,
|
|
1526
|
+
className: q({ part: "surface" }),
|
|
1527
|
+
onMouseDown: ge,
|
|
1528
|
+
children: /* @__PURE__ */ t(dn, {
|
|
1324
1529
|
value: {
|
|
1325
|
-
selected:
|
|
1530
|
+
selected: L,
|
|
1326
1531
|
disabled: T,
|
|
1327
|
-
toggle:
|
|
1532
|
+
toggle: ce
|
|
1328
1533
|
},
|
|
1329
1534
|
children: v
|
|
1330
1535
|
})
|
|
@@ -1337,15 +1542,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1337
1542
|
})
|
|
1338
1543
|
]
|
|
1339
1544
|
});
|
|
1340
|
-
},
|
|
1341
|
-
let { selected: a, disabled: o, toggle: s } =
|
|
1545
|
+
}, Cn = ({ value: e, children: r, testId: i }) => {
|
|
1546
|
+
let { selected: a, disabled: o, toggle: s } = fn("Option"), c = a.has(e);
|
|
1342
1547
|
return /* @__PURE__ */ n("button", {
|
|
1343
1548
|
type: "button",
|
|
1344
1549
|
role: "checkbox",
|
|
1345
1550
|
"aria-checked": c,
|
|
1346
1551
|
disabled: o,
|
|
1347
1552
|
"data-testid": i,
|
|
1348
|
-
className:
|
|
1553
|
+
className: ln(),
|
|
1349
1554
|
onClick: () => s(e),
|
|
1350
1555
|
children: [/* @__PURE__ */ t("span", {
|
|
1351
1556
|
className: "flex size-[var(--choice-marker-size)] shrink-0 items-center justify-center border border-solid border-control-border group-aria-checked/option:border-foreground",
|
|
@@ -1368,10 +1573,10 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1368
1573
|
children: r
|
|
1369
1574
|
})]
|
|
1370
1575
|
});
|
|
1371
|
-
},
|
|
1372
|
-
Root:
|
|
1373
|
-
Option:
|
|
1374
|
-
},
|
|
1576
|
+
}, wn = {
|
|
1577
|
+
Root: Sn,
|
|
1578
|
+
Option: Cn
|
|
1579
|
+
}, Tn = y("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control 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"), En = ({ label: e, name: r, required: i, optionalLabel: a, hint: o, invalid: s, errorMessage: c, disabled: d, placeholder: f, defaultValue: m, onInput$: h, reset$: g, testId: _ }) => {
|
|
1375
1580
|
let v = u(), y = `${v}-control`, b = `${v}-hint`, x = `${v}-error`, S = [o ? b : void 0, s ? x : void 0].filter(Boolean).join(" ") || void 0, C = p(null);
|
|
1376
1581
|
return l(() => {
|
|
1377
1582
|
let e = g?.subscribe(() => {
|
|
@@ -1392,7 +1597,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1392
1597
|
name: r,
|
|
1393
1598
|
type: "text",
|
|
1394
1599
|
inputMode: "decimal",
|
|
1395
|
-
className:
|
|
1600
|
+
className: Tn(),
|
|
1396
1601
|
required: i,
|
|
1397
1602
|
disabled: d,
|
|
1398
1603
|
defaultValue: m,
|
|
@@ -1418,7 +1623,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1418
1623
|
})
|
|
1419
1624
|
]
|
|
1420
1625
|
});
|
|
1421
|
-
},
|
|
1626
|
+
}, Dn = y([
|
|
1422
1627
|
"flex flex-col gap-[var(--space-stack)]",
|
|
1423
1628
|
"[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
|
|
1424
1629
|
"[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
|
|
@@ -1427,11 +1632,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1427
1632
|
"[&>select]:font-control [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
|
|
1428
1633
|
"[&>select]:outline-focus-ring [&>select]:outline-offset-[var(--focus-ring-offset)] [&>select]:focus-visible:outline [&>select]:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
1429
1634
|
"[&>select:user-invalid]:border-error [&>select]:aria-[invalid=true]:border-error [&>select]:disabled:cursor-not-allowed [&>select]:disabled:border-disabled [&>select]:disabled:text-muted"
|
|
1430
|
-
].join(" ")),
|
|
1635
|
+
].join(" ")), On = {
|
|
1431
1636
|
Root: ({ label: e, name: r, required: i, optionalLabel: a, disabled: o, invalid: s, hint: c, errorMessage: l, testId: d, defaultValue: f, onChange$: p, placeholder: m, children: h }) => {
|
|
1432
1637
|
let g = u(), _ = `${g}-control`, v = `${g}-hint`, y = `${g}-error`, b = [c ? v : void 0, s && l ? y : void 0].filter(Boolean).join(" ") || void 0;
|
|
1433
1638
|
return /* @__PURE__ */ n("div", {
|
|
1434
|
-
className:
|
|
1639
|
+
className: Dn(),
|
|
1435
1640
|
children: [
|
|
1436
1641
|
/* @__PURE__ */ t("label", {
|
|
1437
1642
|
htmlFor: _,
|
|
@@ -1470,11 +1675,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1470
1675
|
"data-testid": r,
|
|
1471
1676
|
children: n
|
|
1472
1677
|
})
|
|
1473
|
-
},
|
|
1678
|
+
}, Y = class extends Error {
|
|
1474
1679
|
constructor(e) {
|
|
1475
1680
|
super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
|
|
1476
1681
|
}
|
|
1477
|
-
},
|
|
1682
|
+
}, kn = y([
|
|
1478
1683
|
"block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
|
|
1479
1684
|
"disabled:cursor-not-allowed",
|
|
1480
1685
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1485,14 +1690,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1485
1690
|
"[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
|
|
1486
1691
|
"[&::-moz-range-thumb]:size-[var(--slider-thumb-size)] [&::-moz-range-thumb]:rounded-[var(--radius-control)] [&::-moz-range-thumb]:border-none [&::-moz-range-thumb]:bg-foreground",
|
|
1487
1692
|
"[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
|
|
1488
|
-
].join(" ")),
|
|
1489
|
-
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new
|
|
1490
|
-
if (e.min >= e.max) throw new
|
|
1491
|
-
if (e.step <= 0) throw new
|
|
1492
|
-
|
|
1493
|
-
}, gn = ({ min: e, max: r, step: i = 1, value: a, onInput$: o, label: s, valueText: c, disabled: l, testId: d }) => {
|
|
1693
|
+
].join(" ")), An = (e) => {
|
|
1694
|
+
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new Y(`\`${t}\` must be a finite number, got ${n}`);
|
|
1695
|
+
if (e.min >= e.max) throw new Y(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
|
|
1696
|
+
if (e.step <= 0) throw new Y(`\`step\` (${e.step}) must be positive`);
|
|
1697
|
+
}, jn = ({ min: e, max: r, step: i = 1, value: a, onInput$: o, label: s, valueText: c, disabled: l, testId: d }) => {
|
|
1494
1698
|
let f = `${u()}-control`;
|
|
1495
|
-
return
|
|
1699
|
+
return An({
|
|
1496
1700
|
min: e,
|
|
1497
1701
|
max: r,
|
|
1498
1702
|
step: i,
|
|
@@ -1506,7 +1710,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1506
1710
|
}), /* @__PURE__ */ t("input", {
|
|
1507
1711
|
id: f,
|
|
1508
1712
|
type: "range",
|
|
1509
|
-
className:
|
|
1713
|
+
className: kn(),
|
|
1510
1714
|
min: e,
|
|
1511
1715
|
max: r,
|
|
1512
1716
|
step: i,
|
|
@@ -1517,102 +1721,282 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1517
1721
|
onChange: (e) => o.next(e.currentTarget.valueAsNumber)
|
|
1518
1722
|
})]
|
|
1519
1723
|
});
|
|
1520
|
-
},
|
|
1724
|
+
}, Mn = class extends Error {
|
|
1725
|
+
constructor(e) {
|
|
1726
|
+
super(`Stepper.${e} must be composed inside Stepper.Root`), this.name = "StepperCompositionError";
|
|
1727
|
+
}
|
|
1728
|
+
}, Nn = y("flex h-full min-h-0 min-w-0 flex-col gap-[var(--space-stack)]"), Pn = y([
|
|
1729
|
+
"flex flex-row shrink-0 min-w-0 overflow-x-auto",
|
|
1730
|
+
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1731
|
+
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
1732
|
+
].join(" ")), Fn = y([
|
|
1733
|
+
"relative isolate flex flex-1 flex-col items-center gap-[var(--space-stack)] text-center",
|
|
1734
|
+
"font-secondary text-label text-foreground cursor-pointer select-none",
|
|
1735
|
+
"px-[var(--step-inset-inline)] py-[var(--step-inset-block)]",
|
|
1736
|
+
"border-b-[length:var(--step-selection-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
1737
|
+
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
1738
|
+
"after:content-[''] after:absolute after:-z-10 after:top-[calc(var(--step-inset-block)+var(--step-marker-size)/2)] after:start-1/2 after:w-full after:border-t-[length:var(--step-connector-thickness)] after:border-border last:after:hidden",
|
|
1739
|
+
"[&>[data-marker]]:flex [&>[data-marker]]:shrink-0 [&>[data-marker]]:items-center [&>[data-marker]]:justify-center",
|
|
1740
|
+
"[&>[data-marker]]:size-[var(--step-marker-size)] [&>[data-marker]]:border [&>[data-marker]]:border-foreground [&>[data-marker]]:bg-surface [&>[data-marker]]:rounded-[var(--radius-control)]",
|
|
1741
|
+
"[&>[data-value-text]]:text-small [&>[data-status-content]]:text-small",
|
|
1742
|
+
"forced-colors:after:border-[CanvasText] forced-colors:aria-selected:border-[Highlight]",
|
|
1743
|
+
"forced-colors:border-b-0 forced-colors:aria-selected:border-b-[length:var(--step-selection-thickness)]",
|
|
1744
|
+
"forced-colors:[&>[data-marker]]:bg-[Canvas] forced-colors:[&>[data-marker]]:text-[CanvasText] forced-colors:[&>[data-marker]]:border-[CanvasText]"
|
|
1745
|
+
]), In = y("min-h-0 min-w-0 flex-auto outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), Ln = a(void 0), Rn = (e) => r.toArray(e).flatMap((e) => o(e) && e.type === i ? Rn(e.props.children) : [e]), zn = a(void 0), Bn = (e) => {
|
|
1746
|
+
let t = c(zn);
|
|
1747
|
+
if (t === void 0) throw new Mn(e);
|
|
1748
|
+
return t;
|
|
1749
|
+
}, Vn = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), Hn = (e) => {
|
|
1750
|
+
e.currentTarget.scrollIntoView({
|
|
1751
|
+
block: "nearest",
|
|
1752
|
+
inline: "nearest"
|
|
1753
|
+
});
|
|
1754
|
+
}, X = (e, t) => `${e}tab-${Vn(t)}`, Un = (e, t) => `${e}panel-${Vn(t)}`, Wn = (e, t) => {
|
|
1755
|
+
let n = e.closest("[role=\"tablist\"]");
|
|
1756
|
+
if (n === null) return;
|
|
1757
|
+
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
1758
|
+
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1759
|
+
}, Gn = {
|
|
1760
|
+
Root: ({ active$: e, onSelect$: n, label: r, children: i, testId: a }) => {
|
|
1761
|
+
let o = u(), [s, c] = m();
|
|
1762
|
+
return l(() => {
|
|
1763
|
+
c(void 0);
|
|
1764
|
+
let t = e.subscribe(c);
|
|
1765
|
+
return () => t.unsubscribe();
|
|
1766
|
+
}, [e]), /* @__PURE__ */ t(zn.Provider, {
|
|
1767
|
+
value: {
|
|
1768
|
+
active: s,
|
|
1769
|
+
onSelect$: n,
|
|
1770
|
+
label: r,
|
|
1771
|
+
baseId: o
|
|
1772
|
+
},
|
|
1773
|
+
children: /* @__PURE__ */ t("div", {
|
|
1774
|
+
className: Nn(),
|
|
1775
|
+
"data-testid": a,
|
|
1776
|
+
children: i
|
|
1777
|
+
})
|
|
1778
|
+
});
|
|
1779
|
+
},
|
|
1780
|
+
List: ({ children: e, testId: n }) => {
|
|
1781
|
+
let { label: r } = Bn("List");
|
|
1782
|
+
return /* @__PURE__ */ t("div", {
|
|
1783
|
+
role: "tablist",
|
|
1784
|
+
"aria-label": r,
|
|
1785
|
+
className: Pn(),
|
|
1786
|
+
"data-testid": n,
|
|
1787
|
+
children: Rn(e).map((e, n) => /* @__PURE__ */ t(Ln.Provider, {
|
|
1788
|
+
value: n + 1,
|
|
1789
|
+
children: e
|
|
1790
|
+
}, o(e) ? e.props.value : n))
|
|
1791
|
+
});
|
|
1792
|
+
},
|
|
1793
|
+
Step: ({ value: e, label: r, status: i, valueText: a, statusContent: o, testId: s }) => {
|
|
1794
|
+
let { active: l, onSelect$: u, baseId: d } = Bn("Step"), f = c(Ln);
|
|
1795
|
+
if (f === void 0) throw new Mn("Step (inside List)");
|
|
1796
|
+
let p = l === e;
|
|
1797
|
+
return /* @__PURE__ */ n("button", {
|
|
1798
|
+
type: "button",
|
|
1799
|
+
role: "tab",
|
|
1800
|
+
id: X(d, e),
|
|
1801
|
+
"aria-selected": p,
|
|
1802
|
+
"aria-controls": Un(d, e),
|
|
1803
|
+
"aria-labelledby": `${X(d, e)}-label ${X(d, e)}-value`,
|
|
1804
|
+
"aria-describedby": o === void 0 ? void 0 : `${X(d, e)}-status`,
|
|
1805
|
+
tabIndex: p ? 0 : -1,
|
|
1806
|
+
"data-value": e,
|
|
1807
|
+
"data-testid": s,
|
|
1808
|
+
className: Fn(),
|
|
1809
|
+
onClick: () => u.next(e),
|
|
1810
|
+
onKeyDown: (e) => {
|
|
1811
|
+
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1812
|
+
e.preventDefault();
|
|
1813
|
+
let t = Wn(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
1814
|
+
if (t === void 0) return;
|
|
1815
|
+
t.focus();
|
|
1816
|
+
let n = t.dataset.value;
|
|
1817
|
+
n !== void 0 && u.next(n);
|
|
1818
|
+
},
|
|
1819
|
+
onFocus: Hn,
|
|
1820
|
+
children: [
|
|
1821
|
+
/* @__PURE__ */ t("span", {
|
|
1822
|
+
"data-marker": !0,
|
|
1823
|
+
"aria-hidden": "true",
|
|
1824
|
+
children: i === "done" ? "✓" : i === "blocked" ? "⊘" : f
|
|
1825
|
+
}),
|
|
1826
|
+
/* @__PURE__ */ t("span", {
|
|
1827
|
+
id: `${X(d, e)}-label`,
|
|
1828
|
+
children: r
|
|
1829
|
+
}),
|
|
1830
|
+
/* @__PURE__ */ t("span", {
|
|
1831
|
+
"data-value-text": !0,
|
|
1832
|
+
id: `${X(d, e)}-value`,
|
|
1833
|
+
children: a
|
|
1834
|
+
}),
|
|
1835
|
+
o === void 0 ? void 0 : /* @__PURE__ */ t("span", {
|
|
1836
|
+
"data-status-content": !0,
|
|
1837
|
+
id: `${X(d, e)}-status`,
|
|
1838
|
+
children: o
|
|
1839
|
+
})
|
|
1840
|
+
]
|
|
1841
|
+
});
|
|
1842
|
+
},
|
|
1843
|
+
Panel: ({ value: e, children: n, testId: r }) => {
|
|
1844
|
+
let { active: i, baseId: a } = Bn("Panel"), o = i === e;
|
|
1845
|
+
return /* @__PURE__ */ t("div", {
|
|
1846
|
+
role: "tabpanel",
|
|
1847
|
+
id: Un(a, e),
|
|
1848
|
+
"aria-labelledby": X(a, e),
|
|
1849
|
+
hidden: !o,
|
|
1850
|
+
tabIndex: o ? 0 : void 0,
|
|
1851
|
+
className: In(),
|
|
1852
|
+
"data-testid": r,
|
|
1853
|
+
children: o ? n : void 0
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
}, Kn = y([
|
|
1857
|
+
"inline-flex max-w-full items-center gap-[var(--space-stack)] rounded-[var(--radius-control)] bg-transparent p-0 text-start cursor-pointer",
|
|
1858
|
+
"font-secondary font-medium text-body text-foreground disabled:text-muted disabled:cursor-not-allowed",
|
|
1859
|
+
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
1860
|
+
"[&>[data-track]]:inline-flex [&>[data-track]]:shrink-0 [&>[data-track]]:box-content [&>[data-track]]:w-[calc(2*var(--switch-thumb-size))] [&>[data-track]]:p-[var(--switch-track-inset)]",
|
|
1861
|
+
"[&>[data-track]]:rounded-[var(--radius-control)] [&>[data-track]]:border [&>[data-track]]:border-solid [&>[data-track]]:border-control-border [&>[data-track]]:bg-surface",
|
|
1862
|
+
"[&>[data-track]::before]:content-[''] [&>[data-track]::before]:block [&>[data-track]::before]:size-[var(--switch-thumb-size)] [&>[data-track]::before]:rounded-[var(--radius-control)] [&>[data-track]::before]:bg-foreground",
|
|
1863
|
+
"aria-checked:[&>[data-track]]:justify-end",
|
|
1864
|
+
"disabled:[&>[data-track]]:border-disabled disabled:[&>[data-track]::before]:bg-disabled",
|
|
1865
|
+
"forced-colors:[&>[data-track]]:[forced-color-adjust:none] forced-colors:[&>[data-track]]:border-[ButtonText] forced-colors:[&>[data-track]]:bg-[Canvas] forced-colors:[&>[data-track]::before]:bg-[ButtonText]",
|
|
1866
|
+
"forced-colors:disabled:text-[GrayText] forced-colors:disabled:[&>[data-track]]:border-[GrayText] forced-colors:disabled:[&>[data-track]::before]:bg-[GrayText]",
|
|
1867
|
+
"[&>[data-label]]:min-w-0 [&>[data-label]]:wrap-anywhere"
|
|
1868
|
+
]), qn = ({ label: e, checked$: r, onChange$: i, disabled: a, testId: o }) => {
|
|
1869
|
+
let [s, c] = m(!1);
|
|
1870
|
+
return l(() => {
|
|
1871
|
+
c(!1);
|
|
1872
|
+
let e = r.subscribe(c);
|
|
1873
|
+
return () => e.unsubscribe();
|
|
1874
|
+
}, [r]), /* @__PURE__ */ n("button", {
|
|
1875
|
+
type: "button",
|
|
1876
|
+
role: "switch",
|
|
1877
|
+
"aria-checked": s,
|
|
1878
|
+
disabled: a,
|
|
1879
|
+
"data-testid": o,
|
|
1880
|
+
className: Kn(),
|
|
1881
|
+
onClick: () => i.next(!s),
|
|
1882
|
+
children: [/* @__PURE__ */ t("span", {
|
|
1883
|
+
"data-track": !0,
|
|
1884
|
+
"aria-hidden": "true"
|
|
1885
|
+
}), /* @__PURE__ */ t("span", {
|
|
1886
|
+
"data-label": !0,
|
|
1887
|
+
children: e
|
|
1888
|
+
})]
|
|
1889
|
+
});
|
|
1890
|
+
}, Jn = class extends Error {
|
|
1521
1891
|
constructor(e) {
|
|
1522
1892
|
super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
|
|
1523
1893
|
}
|
|
1524
|
-
},
|
|
1894
|
+
}, Yn = y("", {
|
|
1895
|
+
variants: { fill: {
|
|
1896
|
+
true: "flex h-full min-h-0 min-w-0 flex-col",
|
|
1897
|
+
false: ""
|
|
1898
|
+
} },
|
|
1899
|
+
defaultVariants: { fill: !1 }
|
|
1900
|
+
}), Xn = y([
|
|
1525
1901
|
"flex flex-row overflow-x-auto",
|
|
1526
1902
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1527
1903
|
"m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
1528
1904
|
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
1529
|
-
].join(" ")
|
|
1905
|
+
].join(" "), { variants: { fill: {
|
|
1906
|
+
true: "shrink-0",
|
|
1907
|
+
false: ""
|
|
1908
|
+
} } }), Zn = y([
|
|
1530
1909
|
"font-secondary text-label tracking-label",
|
|
1531
1910
|
"text-muted hover:text-foreground aria-selected:text-foreground",
|
|
1532
1911
|
"border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
1533
1912
|
"cursor-pointer select-none px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
|
|
1534
1913
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1535
1914
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1536
|
-
].join(" ")),
|
|
1537
|
-
|
|
1538
|
-
|
|
1915
|
+
].join(" ")), Qn = y("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", { variants: { fill: {
|
|
1916
|
+
true: "min-h-0 min-w-0 flex-auto",
|
|
1917
|
+
false: ""
|
|
1918
|
+
} } }), $n = a(void 0), Z = (e) => {
|
|
1919
|
+
let t = c($n);
|
|
1920
|
+
if (t === void 0) throw new Jn(e);
|
|
1539
1921
|
return t;
|
|
1540
|
-
},
|
|
1922
|
+
}, er = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), tr = (e) => {
|
|
1541
1923
|
e.currentTarget.scrollIntoView({
|
|
1542
1924
|
block: "nearest",
|
|
1543
1925
|
inline: "nearest"
|
|
1544
1926
|
});
|
|
1545
|
-
},
|
|
1927
|
+
}, nr = (e, t) => `${e}tab-${er(t)}`, rr = (e, t) => `${e}panel-${er(t)}`, ir = (e, t) => {
|
|
1546
1928
|
let n = e.closest("[role=\"tablist\"]");
|
|
1547
1929
|
if (n === null) return;
|
|
1548
1930
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
1549
1931
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1550
|
-
},
|
|
1551
|
-
Root: ({ active: e, onSelect$: n, label: r,
|
|
1552
|
-
let
|
|
1553
|
-
return /* @__PURE__ */ t(
|
|
1932
|
+
}, ar = {
|
|
1933
|
+
Root: ({ active: e, onSelect$: n, label: r, fill: i, children: a, testId: o }) => {
|
|
1934
|
+
let s = u();
|
|
1935
|
+
return /* @__PURE__ */ t($n.Provider, {
|
|
1554
1936
|
value: {
|
|
1555
1937
|
active: e,
|
|
1556
1938
|
onSelect$: n,
|
|
1557
1939
|
label: r,
|
|
1558
|
-
baseId:
|
|
1940
|
+
baseId: s,
|
|
1941
|
+
fill: i === !0
|
|
1559
1942
|
},
|
|
1560
1943
|
children: /* @__PURE__ */ t("div", {
|
|
1561
|
-
|
|
1562
|
-
|
|
1944
|
+
className: Yn({ fill: i }),
|
|
1945
|
+
"data-testid": o,
|
|
1946
|
+
children: a
|
|
1563
1947
|
})
|
|
1564
1948
|
});
|
|
1565
1949
|
},
|
|
1566
1950
|
List: ({ children: e, testId: n }) => {
|
|
1567
|
-
let { label: r } =
|
|
1951
|
+
let { label: r, fill: i } = Z("List");
|
|
1568
1952
|
return /* @__PURE__ */ t("div", {
|
|
1569
1953
|
role: "tablist",
|
|
1570
1954
|
"aria-label": r,
|
|
1571
|
-
className:
|
|
1955
|
+
className: Xn({ fill: i }),
|
|
1572
1956
|
"data-testid": n,
|
|
1573
1957
|
children: e
|
|
1574
1958
|
});
|
|
1575
1959
|
},
|
|
1576
1960
|
Tab: ({ value: e, children: n, testId: r }) => {
|
|
1577
|
-
let { active: i, onSelect$: a, baseId: o } =
|
|
1961
|
+
let { active: i, onSelect$: a, baseId: o } = Z("Tab"), s = i === e;
|
|
1578
1962
|
return /* @__PURE__ */ t("button", {
|
|
1579
1963
|
type: "button",
|
|
1580
1964
|
role: "tab",
|
|
1581
|
-
id:
|
|
1965
|
+
id: nr(o, e),
|
|
1582
1966
|
"aria-selected": s,
|
|
1583
|
-
"aria-controls":
|
|
1967
|
+
"aria-controls": rr(o, e),
|
|
1584
1968
|
tabIndex: s ? 0 : -1,
|
|
1585
1969
|
"data-value": e,
|
|
1586
1970
|
"data-testid": r,
|
|
1587
|
-
className:
|
|
1971
|
+
className: Zn(),
|
|
1588
1972
|
onClick: () => a.next(e),
|
|
1589
1973
|
onKeyDown: (e) => {
|
|
1590
1974
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1591
1975
|
e.preventDefault();
|
|
1592
|
-
let t =
|
|
1976
|
+
let t = ir(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
1593
1977
|
if (t === void 0) return;
|
|
1594
1978
|
t.focus();
|
|
1595
1979
|
let n = t.dataset.value;
|
|
1596
1980
|
n !== void 0 && a.next(n);
|
|
1597
1981
|
},
|
|
1598
|
-
onFocus:
|
|
1982
|
+
onFocus: tr,
|
|
1599
1983
|
children: n
|
|
1600
1984
|
});
|
|
1601
1985
|
},
|
|
1602
1986
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
1603
|
-
let { active: i, baseId: a } =
|
|
1987
|
+
let { active: i, baseId: a, fill: o } = Z("Panel"), s = i === e;
|
|
1604
1988
|
return /* @__PURE__ */ t("div", {
|
|
1605
1989
|
role: "tabpanel",
|
|
1606
|
-
id:
|
|
1607
|
-
"aria-labelledby":
|
|
1608
|
-
hidden: !
|
|
1609
|
-
tabIndex:
|
|
1610
|
-
className:
|
|
1990
|
+
id: rr(a, e),
|
|
1991
|
+
"aria-labelledby": nr(a, e),
|
|
1992
|
+
hidden: !s,
|
|
1993
|
+
tabIndex: s ? 0 : void 0,
|
|
1994
|
+
className: Qn({ fill: o }),
|
|
1611
1995
|
"data-testid": r,
|
|
1612
|
-
children:
|
|
1996
|
+
children: s ? n : void 0
|
|
1613
1997
|
});
|
|
1614
1998
|
}
|
|
1615
|
-
},
|
|
1999
|
+
}, or = y("block min-h-24 w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control 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"), sr = ({ label: e, name: r, required: i, optionalLabel: a, invalid: o, disabled: s, defaultValue: c, placeholder: d, autocomplete: f, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
|
|
1616
2000
|
let y = u(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, o ? S : void 0].filter(Boolean).join(" ") || void 0, w = p(null);
|
|
1617
2001
|
return l(() => {
|
|
1618
2002
|
let e = _?.subscribe(() => {
|
|
@@ -1631,7 +2015,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1631
2015
|
ref: w,
|
|
1632
2016
|
id: b,
|
|
1633
2017
|
name: r,
|
|
1634
|
-
className:
|
|
2018
|
+
className: or(),
|
|
1635
2019
|
required: i,
|
|
1636
2020
|
disabled: s,
|
|
1637
2021
|
defaultValue: c,
|
|
@@ -1658,29 +2042,29 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1658
2042
|
})
|
|
1659
2043
|
]
|
|
1660
2044
|
});
|
|
1661
|
-
},
|
|
2045
|
+
}, cr = y([
|
|
1662
2046
|
"flex flex-col items-center",
|
|
1663
2047
|
"min-h-[var(--cover-height)]",
|
|
1664
2048
|
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
1665
|
-
].join(" ")),
|
|
2049
|
+
].join(" ")), lr = "my-auto max-w-full", ur = ({ children: e, foot: r, testId: i }) => {
|
|
1666
2050
|
let a = r != null && typeof r != "boolean";
|
|
1667
2051
|
return /* @__PURE__ */ n("div", {
|
|
1668
|
-
className:
|
|
2052
|
+
className: cr(),
|
|
1669
2053
|
"data-testid": i,
|
|
1670
2054
|
children: [/* @__PURE__ */ t("div", {
|
|
1671
|
-
className:
|
|
2055
|
+
className: lr,
|
|
1672
2056
|
children: e
|
|
1673
2057
|
}), a && /* @__PURE__ */ t("div", { children: r })]
|
|
1674
2058
|
});
|
|
1675
|
-
},
|
|
2059
|
+
}, dr = class extends Error {
|
|
1676
2060
|
constructor(e) {
|
|
1677
2061
|
super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
|
|
1678
2062
|
}
|
|
1679
|
-
},
|
|
2063
|
+
}, fr = class extends Error {
|
|
1680
2064
|
constructor() {
|
|
1681
2065
|
super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
|
|
1682
2066
|
}
|
|
1683
|
-
},
|
|
2067
|
+
}, pr = y([
|
|
1684
2068
|
"open:flex open:flex-col m-auto p-0 overflow-hidden",
|
|
1685
2069
|
"bg-surface text-foreground",
|
|
1686
2070
|
"rounded-[var(--radius-dialog)] shadow-[var(--elevation-floating)]",
|
|
@@ -1691,25 +2075,31 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1691
2075
|
content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
|
|
1692
2076
|
} },
|
|
1693
2077
|
defaultVariants: { extent: "screen" }
|
|
1694
|
-
}),
|
|
1695
|
-
"grow shrink min-h-0
|
|
2078
|
+
}), mr = y(["px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[&:has(+[data-dialog-member=description])]:pb-0"].join(" ")), hr = y(["px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[[data-dialog-member=title]+&]:mt-[var(--space-stack)] [[data-dialog-member=title]+&]:pt-0"].join(" ")), gr = y([
|
|
2079
|
+
"grow shrink min-h-0 min-w-0",
|
|
1696
2080
|
"px-[var(--space-region)] py-[var(--space-region)]",
|
|
1697
2081
|
"[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
|
|
1698
|
-
].join(" ")
|
|
2082
|
+
].join(" "), {
|
|
2083
|
+
variants: { scrollOwner: {
|
|
2084
|
+
body: "overflow-y-auto",
|
|
2085
|
+
child: "flex flex-col"
|
|
2086
|
+
} },
|
|
2087
|
+
defaultVariants: { scrollOwner: "body" }
|
|
2088
|
+
}), _r = y([
|
|
1699
2089
|
"flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
|
|
1700
2090
|
"px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
|
|
1701
2091
|
"[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
|
|
1702
|
-
].join(" ")),
|
|
1703
|
-
let t = c(
|
|
1704
|
-
if (t === void 0) throw new
|
|
2092
|
+
].join(" ")), vr = a(void 0), Q = (e) => {
|
|
2093
|
+
let t = c(vr);
|
|
2094
|
+
if (t === void 0) throw new dr(e);
|
|
1705
2095
|
return t;
|
|
1706
|
-
},
|
|
2096
|
+
}, yr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", br = (e, { presented: t, opener: n }) => {
|
|
1707
2097
|
if (e === void 0 || e.open) return;
|
|
1708
2098
|
let r = document.activeElement;
|
|
1709
|
-
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(
|
|
2099
|
+
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(yr)?.focus();
|
|
1710
2100
|
}, $ = (e, { presented: t }) => {
|
|
1711
2101
|
t.current = !1, e?.open && e.close();
|
|
1712
|
-
},
|
|
2102
|
+
}, xr = {
|
|
1713
2103
|
Root: ({ children: e, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: o }) => {
|
|
1714
2104
|
let c = u(), d = p(void 0), f = p(!1), h = p(void 0), [g] = m(() => ({
|
|
1715
2105
|
presented: f,
|
|
@@ -1732,20 +2122,20 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1732
2122
|
n.next(), r === void 0 ? $(d.current, g) : r.next(!1);
|
|
1733
2123
|
};
|
|
1734
2124
|
return l(() => {
|
|
1735
|
-
if (r === void 0) return
|
|
2125
|
+
if (r === void 0) return br(d.current, g), () => $(d.current, g);
|
|
1736
2126
|
let e = r.subscribe((e) => {
|
|
1737
|
-
e ?
|
|
2127
|
+
e ? br(d.current, g) : $(d.current, g);
|
|
1738
2128
|
});
|
|
1739
2129
|
return () => {
|
|
1740
2130
|
e.unsubscribe(), $(d.current, g);
|
|
1741
2131
|
};
|
|
1742
|
-
}, [r, g]), /* @__PURE__ */ t(
|
|
2132
|
+
}, [r, g]), /* @__PURE__ */ t(vr.Provider, {
|
|
1743
2133
|
value: b,
|
|
1744
2134
|
children: /* @__PURE__ */ t("dialog", {
|
|
1745
2135
|
ref: (e) => {
|
|
1746
2136
|
d.current = e ?? void 0, e?.setAttribute("headingreset", "");
|
|
1747
2137
|
},
|
|
1748
|
-
className:
|
|
2138
|
+
className: pr({ extent: i }),
|
|
1749
2139
|
"aria-label": a,
|
|
1750
2140
|
"aria-labelledby": a === void 0 && _.title ? b.titleId : void 0,
|
|
1751
2141
|
"aria-describedby": _.description ? b.descriptionId : void 0,
|
|
@@ -1761,7 +2151,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1761
2151
|
let e = f.current;
|
|
1762
2152
|
f.current = !1;
|
|
1763
2153
|
let t = h.current;
|
|
1764
|
-
h.current = void 0, t?.isConnected && (t.matches(
|
|
2154
|
+
h.current = void 0, t?.isConnected && (t.matches(yr) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
|
|
1765
2155
|
},
|
|
1766
2156
|
"data-testid": o,
|
|
1767
2157
|
children: e
|
|
@@ -1770,10 +2160,10 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1770
2160
|
},
|
|
1771
2161
|
Title: ({ children: e, testId: n }) => {
|
|
1772
2162
|
let { titleId: r, isLabelled: i, registerNamePart: a } = Q("Title");
|
|
1773
|
-
if (l(() => a("title"), [a]), i) throw new
|
|
2163
|
+
if (l(() => a("title"), [a]), i) throw new fr();
|
|
1774
2164
|
return /* @__PURE__ */ t("div", {
|
|
1775
2165
|
"data-dialog-member": "title",
|
|
1776
|
-
className:
|
|
2166
|
+
className: mr(),
|
|
1777
2167
|
"data-testid": n,
|
|
1778
2168
|
children: /* @__PURE__ */ t("h1", {
|
|
1779
2169
|
id: r,
|
|
@@ -1786,7 +2176,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1786
2176
|
let { descriptionId: r, registerNamePart: i } = Q("Description");
|
|
1787
2177
|
return l(() => i("description"), [i]), /* @__PURE__ */ t("div", {
|
|
1788
2178
|
"data-dialog-member": "description",
|
|
1789
|
-
className:
|
|
2179
|
+
className: hr(),
|
|
1790
2180
|
"data-testid": n,
|
|
1791
2181
|
children: /* @__PURE__ */ t("p", {
|
|
1792
2182
|
id: r,
|
|
@@ -1795,29 +2185,33 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1795
2185
|
})
|
|
1796
2186
|
});
|
|
1797
2187
|
},
|
|
1798
|
-
Content: ({ children: e,
|
|
2188
|
+
Content: ({ children: e, scrollOwner: n, testId: r }) => (Q("Content"), /* @__PURE__ */ t("div", {
|
|
1799
2189
|
"data-dialog-member": "content",
|
|
1800
|
-
className:
|
|
1801
|
-
"data-testid":
|
|
2190
|
+
className: gr({ scrollOwner: n }),
|
|
2191
|
+
"data-testid": r,
|
|
1802
2192
|
children: e
|
|
1803
2193
|
})),
|
|
1804
2194
|
Actions: ({ children: e, testId: n }) => (Q("Actions"), /* @__PURE__ */ t("div", {
|
|
1805
2195
|
"data-dialog-member": "actions",
|
|
1806
|
-
className:
|
|
2196
|
+
className: _r(),
|
|
1807
2197
|
"data-testid": n,
|
|
1808
2198
|
children: e
|
|
1809
2199
|
}))
|
|
1810
|
-
},
|
|
2200
|
+
}, Sr = y("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
1811
2201
|
variants: { edge: {
|
|
1812
2202
|
none: "",
|
|
1813
2203
|
rule: "border-t border-solid border-rule"
|
|
1814
2204
|
} },
|
|
1815
2205
|
defaultVariants: { edge: "rule" }
|
|
1816
|
-
}),
|
|
1817
|
-
className:
|
|
2206
|
+
}), Cr = ({ edge: e, children: n, testId: r }) => /* @__PURE__ */ t("footer", {
|
|
2207
|
+
className: Sr({ edge: e }),
|
|
1818
2208
|
"data-testid": r,
|
|
1819
2209
|
children: n
|
|
1820
|
-
}),
|
|
2210
|
+
}), wr = class extends Error {
|
|
2211
|
+
constructor(e) {
|
|
2212
|
+
super(`Form configuration is invalid: ${e}`), this.name = "FormConfigurationError";
|
|
2213
|
+
}
|
|
2214
|
+
}, Tr = y("font-secondary text-small", {
|
|
1821
2215
|
variants: { state: {
|
|
1822
2216
|
idle: "text-muted",
|
|
1823
2217
|
sending: "text-muted",
|
|
@@ -1825,13 +2219,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1825
2219
|
failed: "text-error"
|
|
1826
2220
|
} },
|
|
1827
2221
|
defaultVariants: { state: "idle" }
|
|
1828
|
-
}),
|
|
2222
|
+
}), Er = {
|
|
1829
2223
|
sent: "status",
|
|
1830
2224
|
failed: "alert"
|
|
1831
|
-
},
|
|
2225
|
+
}, Dr = ({ action: e, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
1832
2226
|
let l = s != null && typeof s != "boolean";
|
|
1833
|
-
if (i === "sent" && !l) throw
|
|
1834
|
-
let u = i !== "sent", d =
|
|
2227
|
+
if (i === "sent" && !l) throw new wr("Form in the `sent` state must be given a `note` - it is the outcome message.");
|
|
2228
|
+
let u = i !== "sent", d = Er[i];
|
|
1835
2229
|
return /* @__PURE__ */ n("form", {
|
|
1836
2230
|
action: e,
|
|
1837
2231
|
method: r,
|
|
@@ -1849,12 +2243,12 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1849
2243
|
}),
|
|
1850
2244
|
l && /* @__PURE__ */ t("p", {
|
|
1851
2245
|
role: d,
|
|
1852
|
-
className:
|
|
2246
|
+
className: Tr({ state: i }),
|
|
1853
2247
|
children: s
|
|
1854
2248
|
})
|
|
1855
2249
|
]
|
|
1856
2250
|
});
|
|
1857
|
-
},
|
|
2251
|
+
}, Or = y([
|
|
1858
2252
|
"flex items-baseline",
|
|
1859
2253
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
1860
2254
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -1874,84 +2268,145 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1874
2268
|
edge: "rule",
|
|
1875
2269
|
mode: "navigation"
|
|
1876
2270
|
}
|
|
1877
|
-
}),
|
|
2271
|
+
}), kr = [
|
|
1878
2272
|
"inline-flex shrink-0 items-center",
|
|
1879
2273
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
1880
2274
|
"min-w-[var(--standing-min-width)]"
|
|
1881
|
-
].join(" "),
|
|
2275
|
+
].join(" "), Ar = "flex flex-wrap items-baseline gap-[var(--space-region)]", jr = "min-w-0 wrap-anywhere", Mr = "ms-auto", Nr = (e) => e != null && typeof e != "boolean" && e !== "", Pr = ({ edge: r, testId: i, standing: a, navName: o, children: s, status: c, action: l }) => {
|
|
1882
2276
|
let u = c !== void 0 || l !== void 0;
|
|
1883
2277
|
return /* @__PURE__ */ t("header", {
|
|
1884
|
-
className:
|
|
2278
|
+
className: Or({
|
|
1885
2279
|
edge: r,
|
|
1886
2280
|
mode: u ? "statusAction" : "navigation"
|
|
1887
2281
|
}),
|
|
1888
2282
|
"data-testid": i,
|
|
1889
|
-
children: u ? /* @__PURE__ */ n(e, { children: [
|
|
1890
|
-
className:
|
|
2283
|
+
children: u ? /* @__PURE__ */ n(e, { children: [Nr(c) && /* @__PURE__ */ t("div", {
|
|
2284
|
+
className: jr,
|
|
1891
2285
|
children: c
|
|
1892
|
-
}),
|
|
1893
|
-
className:
|
|
2286
|
+
}), Nr(l) && /* @__PURE__ */ t("div", {
|
|
2287
|
+
className: Mr,
|
|
1894
2288
|
children: l
|
|
1895
2289
|
})] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
1896
|
-
className:
|
|
2290
|
+
className: kr,
|
|
1897
2291
|
children: a
|
|
1898
2292
|
}), /* @__PURE__ */ t("nav", {
|
|
1899
2293
|
"aria-label": o,
|
|
1900
|
-
className:
|
|
2294
|
+
className: Ar,
|
|
1901
2295
|
children: s
|
|
1902
2296
|
})] })
|
|
1903
2297
|
});
|
|
1904
|
-
},
|
|
2298
|
+
}, Fr = y("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
1905
2299
|
variants: { place: {
|
|
1906
2300
|
start: "justify-start",
|
|
1907
2301
|
center: "justify-center",
|
|
1908
2302
|
between: "justify-between"
|
|
1909
2303
|
} },
|
|
1910
2304
|
defaultVariants: { place: "center" }
|
|
1911
|
-
}),
|
|
1912
|
-
className:
|
|
2305
|
+
}), Ir = ({ place: e, children: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2306
|
+
className: Fr({ place: e }),
|
|
1913
2307
|
"data-testid": r,
|
|
1914
2308
|
children: n
|
|
1915
|
-
}),
|
|
1916
|
-
className:
|
|
2309
|
+
}), Lr = y("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), Rr = y("font-heading text-title leading-title tracking-optical text-foreground"), zr = y("font-body text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), Br = y("font-body text-small text-muted max-w-[var(--measure)]"), Vr = ({ title: e, lede: r, intro: i, testId: a }) => /* @__PURE__ */ n("header", {
|
|
2310
|
+
className: Lr(),
|
|
1917
2311
|
"data-testid": a,
|
|
1918
2312
|
children: [
|
|
1919
2313
|
/* @__PURE__ */ t("h1", {
|
|
1920
|
-
className:
|
|
2314
|
+
className: Rr(),
|
|
1921
2315
|
children: e
|
|
1922
2316
|
}),
|
|
1923
2317
|
r !== void 0 && /* @__PURE__ */ t("p", {
|
|
1924
|
-
className:
|
|
2318
|
+
className: zr(),
|
|
1925
2319
|
children: r
|
|
1926
2320
|
}),
|
|
1927
2321
|
i !== void 0 && /* @__PURE__ */ t("p", {
|
|
1928
|
-
className:
|
|
2322
|
+
className: Br(),
|
|
1929
2323
|
children: i
|
|
1930
2324
|
})
|
|
1931
2325
|
]
|
|
1932
|
-
}),
|
|
2326
|
+
}), Hr = y("box-border flex h-full min-h-0 min-w-0 flex-col gap-[var(--space-stack)] border border-solid border-border bg-surface text-foreground p-[var(--space-box-inset)] [overflow-wrap:anywhere]"), Ur = y("min-w-0 shrink-0"), Wr = y("min-h-0 min-w-0 flex-[0_1_auto]", {
|
|
2327
|
+
variants: { scrollOwner: {
|
|
2328
|
+
body: "[&>div]:flow-root [&>div]:w-fit [&>div]:min-w-full [&>div]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] overflow-auto overscroll-contain outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
2329
|
+
child: ""
|
|
2330
|
+
} },
|
|
2331
|
+
defaultVariants: { scrollOwner: "body" }
|
|
2332
|
+
}), Gr = (e, t, n) => {
|
|
2333
|
+
let [r, i] = m(!0);
|
|
2334
|
+
return d(() => {
|
|
2335
|
+
let r = e.current;
|
|
2336
|
+
if (!r || !n) return;
|
|
2337
|
+
let a = () => i(r.scrollHeight > r.clientHeight || r.scrollWidth > r.clientWidth || r === r.ownerDocument.activeElement);
|
|
2338
|
+
a();
|
|
2339
|
+
let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
|
|
2340
|
+
o?.observe(r), t.current && o?.observe(t.current);
|
|
2341
|
+
let s = new MutationObserver(a);
|
|
2342
|
+
return s.observe(r, {
|
|
2343
|
+
childList: !0,
|
|
2344
|
+
subtree: !0,
|
|
2345
|
+
characterData: !0
|
|
2346
|
+
}), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
|
|
2347
|
+
o?.disconnect(), s.disconnect(), window.removeEventListener("resize", a), r.removeEventListener("blur", a);
|
|
2348
|
+
};
|
|
2349
|
+
}, [
|
|
2350
|
+
e,
|
|
2351
|
+
t,
|
|
2352
|
+
n
|
|
2353
|
+
]), r;
|
|
2354
|
+
}, Kr = {
|
|
2355
|
+
Root: ({ children: e, name: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2356
|
+
className: Hr(),
|
|
2357
|
+
role: n ? "group" : void 0,
|
|
2358
|
+
"aria-label": n || void 0,
|
|
2359
|
+
"data-testid": r,
|
|
2360
|
+
children: e
|
|
2361
|
+
}),
|
|
2362
|
+
Head: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2363
|
+
className: Ur(),
|
|
2364
|
+
"data-testid": n,
|
|
2365
|
+
children: e
|
|
2366
|
+
}),
|
|
2367
|
+
Body: ({ children: e, ariaLabel: n, scrollOwner: r, testId: i }) => {
|
|
2368
|
+
let a = p(null), o = p(null), s = r !== "child", c = Gr(a, o, s) && s;
|
|
2369
|
+
return /* @__PURE__ */ t("div", {
|
|
2370
|
+
ref: a,
|
|
2371
|
+
className: Wr({ scrollOwner: r ?? "body" }),
|
|
2372
|
+
role: c ? "group" : void 0,
|
|
2373
|
+
"aria-label": c ? n : void 0,
|
|
2374
|
+
tabIndex: c ? 0 : void 0,
|
|
2375
|
+
"data-testid": i,
|
|
2376
|
+
children: s ? /* @__PURE__ */ t("div", {
|
|
2377
|
+
ref: o,
|
|
2378
|
+
children: e
|
|
2379
|
+
}) : e
|
|
2380
|
+
});
|
|
2381
|
+
},
|
|
2382
|
+
Foot: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2383
|
+
className: Ur(),
|
|
2384
|
+
"data-testid": n,
|
|
2385
|
+
children: e
|
|
2386
|
+
})
|
|
2387
|
+
}, qr = y("max-h-full max-w-full min-h-0 min-w-0 outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1933
2388
|
variants: { axis: {
|
|
1934
2389
|
both: "overflow-auto",
|
|
1935
2390
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
1936
2391
|
vertical: "overflow-y-auto overflow-x-hidden"
|
|
1937
2392
|
} },
|
|
1938
2393
|
defaultVariants: { axis: "both" }
|
|
1939
|
-
}),
|
|
2394
|
+
}), Jr = y("p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]", {
|
|
1940
2395
|
variants: { axis: {
|
|
1941
2396
|
both: "w-fit min-w-full",
|
|
1942
2397
|
horizontal: "w-fit min-w-full",
|
|
1943
2398
|
vertical: "w-full"
|
|
1944
2399
|
} },
|
|
1945
2400
|
defaultVariants: { axis: "both" }
|
|
1946
|
-
}),
|
|
2401
|
+
}), Yr = (e, t) => {
|
|
1947
2402
|
let n = e.scrollWidth > e.clientWidth, r = e.scrollHeight > e.clientHeight;
|
|
1948
2403
|
return t !== "vertical" && n || t !== "horizontal" && r;
|
|
1949
|
-
},
|
|
2404
|
+
}, Xr = (e, t, n) => {
|
|
1950
2405
|
let [r, i] = m(!0);
|
|
1951
2406
|
return d(() => {
|
|
1952
2407
|
let r = e.current;
|
|
1953
2408
|
if (r === null) return;
|
|
1954
|
-
let a = () => i(
|
|
2409
|
+
let a = () => i(Yr(r, n) || r === document.activeElement);
|
|
1955
2410
|
a();
|
|
1956
2411
|
let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
|
|
1957
2412
|
return o?.observe(r), t.current !== null && o?.observe(t.current), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
|
|
@@ -1962,22 +2417,22 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1962
2417
|
t,
|
|
1963
2418
|
n
|
|
1964
2419
|
]), r;
|
|
1965
|
-
},
|
|
1966
|
-
let a = p(null), o = p(null), s =
|
|
2420
|
+
}, Zr = ({ axis: e, ariaLabel: n, children: r, testId: i }) => {
|
|
2421
|
+
let a = p(null), o = p(null), s = Xr(a, o, e ?? "both");
|
|
1967
2422
|
return /* @__PURE__ */ t("div", {
|
|
1968
2423
|
ref: a,
|
|
1969
|
-
className:
|
|
2424
|
+
className: qr({ axis: e }),
|
|
1970
2425
|
"data-testid": i,
|
|
1971
2426
|
role: s ? "group" : void 0,
|
|
1972
2427
|
"aria-label": s ? n : void 0,
|
|
1973
2428
|
tabIndex: s ? 0 : void 0,
|
|
1974
2429
|
children: /* @__PURE__ */ t("div", {
|
|
1975
2430
|
ref: o,
|
|
1976
|
-
className:
|
|
2431
|
+
className: Jr({ axis: e }),
|
|
1977
2432
|
children: r
|
|
1978
2433
|
})
|
|
1979
2434
|
});
|
|
1980
|
-
},
|
|
2435
|
+
}, Qr = y([
|
|
1981
2436
|
"relative",
|
|
1982
2437
|
"py-[var(--space-band)]",
|
|
1983
2438
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -1987,26 +2442,77 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1987
2442
|
full: ""
|
|
1988
2443
|
} },
|
|
1989
2444
|
defaultVariants: { bleed: "inset" }
|
|
1990
|
-
}),
|
|
2445
|
+
}), $r = ({ bleed: e, name: n, children: r, testId: i }) => /* @__PURE__ */ t("section", {
|
|
1991
2446
|
"data-section": "",
|
|
1992
|
-
className:
|
|
2447
|
+
className: Qr({ bleed: e }),
|
|
1993
2448
|
"aria-label": n,
|
|
1994
2449
|
"data-testid": i,
|
|
1995
2450
|
children: r
|
|
1996
|
-
}),
|
|
2451
|
+
}), ei = y("h-dvh min-w-0 overflow-clip grid grid-rows-[auto_minmax(0,1fr)]"), ti = y("min-h-0 min-w-0 overflow-auto overscroll-contain p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] outline-focus-ring focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-offset-[calc(-1*var(--focus-ring-width))]", {
|
|
2452
|
+
variants: { mode: {
|
|
2453
|
+
console: "[&>div]:h-full",
|
|
2454
|
+
page: "[&>div]:min-h-full"
|
|
2455
|
+
} },
|
|
2456
|
+
defaultVariants: { mode: "console" }
|
|
2457
|
+
}), ni = (e) => {
|
|
2458
|
+
let [t, n] = m(!0);
|
|
2459
|
+
return d(() => {
|
|
2460
|
+
let t = e.current;
|
|
2461
|
+
if (!t) return;
|
|
2462
|
+
let r = () => n(t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth || t === t.ownerDocument.activeElement);
|
|
2463
|
+
r();
|
|
2464
|
+
let i = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(r), a = () => {
|
|
2465
|
+
i?.disconnect(), i?.observe(t);
|
|
2466
|
+
for (let e of t.querySelectorAll("*")) i?.observe(e);
|
|
2467
|
+
r();
|
|
2468
|
+
};
|
|
2469
|
+
a();
|
|
2470
|
+
let o = new MutationObserver(a);
|
|
2471
|
+
return o.observe(t, {
|
|
2472
|
+
childList: !0,
|
|
2473
|
+
subtree: !0,
|
|
2474
|
+
characterData: !0
|
|
2475
|
+
}), window.addEventListener("resize", r), t.addEventListener("blur", r), () => {
|
|
2476
|
+
i?.disconnect(), o.disconnect(), window.removeEventListener("resize", r), t.removeEventListener("blur", r);
|
|
2477
|
+
};
|
|
2478
|
+
}, [e]), t;
|
|
2479
|
+
}, ri = ({ bar: e, children: r, ariaLabel: i, mode: a, testId: o }) => {
|
|
2480
|
+
let s = p(null), c = ni(s);
|
|
2481
|
+
return /* @__PURE__ */ n("div", {
|
|
2482
|
+
className: ei(),
|
|
2483
|
+
"data-testid": o,
|
|
2484
|
+
children: [/* @__PURE__ */ t("div", { children: e }), /* @__PURE__ */ t("div", {
|
|
2485
|
+
ref: s,
|
|
2486
|
+
className: ti({ mode: a }),
|
|
2487
|
+
role: c ? "group" : void 0,
|
|
2488
|
+
"aria-label": c ? i : void 0,
|
|
2489
|
+
tabIndex: c ? 0 : void 0,
|
|
2490
|
+
children: /* @__PURE__ */ t("div", { children: r })
|
|
2491
|
+
})]
|
|
2492
|
+
});
|
|
2493
|
+
}, ii = y([
|
|
1997
2494
|
"grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
|
|
1998
2495
|
"[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
|
|
1999
2496
|
"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)]",
|
|
2000
|
-
"lg:[&>div:first-child>nav]:sticky lg:[&>div:first-child>nav]:top-0 lg:[&>div:first-child>nav]:
|
|
2497
|
+
"lg:[&>div:first-child>nav]:sticky lg:[&>div:first-child>nav]:top-0 lg:[&>div:first-child>nav]:overflow-y-auto",
|
|
2001
2498
|
"[&>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))]",
|
|
2002
2499
|
"[&>div:first-child>nav>ul]:flex [&>div:first-child>nav>ul]:flex-col [&>div:first-child>nav>ul]:gap-[var(--space-stack)]"
|
|
2003
|
-
].join(" ")
|
|
2500
|
+
].join(" "), {
|
|
2501
|
+
variants: { fill: {
|
|
2502
|
+
false: "lg:[&>div:first-child>nav]:max-h-[min(100dvh,var(--sidebar-scrollport-height,100dvh))]",
|
|
2503
|
+
true: "min-h-full lg:h-full lg:min-h-0 lg:grid-rows-[minmax(0,1fr)] lg:[&>div]:min-h-0 lg:[&>div]:h-full lg:[&>div:first-child>nav]:max-h-full"
|
|
2504
|
+
} },
|
|
2505
|
+
defaultVariants: { fill: !1 }
|
|
2506
|
+
}), ai = (e) => {
|
|
2004
2507
|
if (!e) return;
|
|
2005
2508
|
let t = [];
|
|
2006
2509
|
for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
|
|
2007
2510
|
let n = () => {
|
|
2008
2511
|
let n = t.find((e) => /^(auto|scroll|hidden|overlay)$/.test(getComputedStyle(e).overflowY));
|
|
2009
|
-
|
|
2512
|
+
if (n) {
|
|
2513
|
+
let t = getComputedStyle(n), r = (Number.parseFloat(t.paddingTop) || 0) + (Number.parseFloat(t.paddingBottom) || 0);
|
|
2514
|
+
e.style.setProperty("--sidebar-scrollport-height", `${Math.max(0, n.clientHeight - r)}px`);
|
|
2515
|
+
} else e.style.removeProperty("--sidebar-scrollport-height");
|
|
2010
2516
|
};
|
|
2011
2517
|
n();
|
|
2012
2518
|
let r = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(n);
|
|
@@ -2014,7 +2520,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2014
2520
|
return window.addEventListener("resize", n), () => {
|
|
2015
2521
|
r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
|
|
2016
2522
|
};
|
|
2017
|
-
},
|
|
2523
|
+
}, oi = y([
|
|
2018
2524
|
"w-full text-left font-secondary text-label tracking-label wrap-anywhere",
|
|
2019
2525
|
"underline-offset-[var(--underline-offset)]",
|
|
2020
2526
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
@@ -2025,11 +2531,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2025
2531
|
inert: "text-muted cursor-not-allowed"
|
|
2026
2532
|
} },
|
|
2027
2533
|
defaultVariants: { state: "usable" }
|
|
2028
|
-
}),
|
|
2029
|
-
let a = c(
|
|
2534
|
+
}), si = a(void 0), ci = ({ entryKey: e, children: n, inert: r, testId: i }) => {
|
|
2535
|
+
let a = c(si), o = a !== void 0 && a.active === e;
|
|
2030
2536
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", {
|
|
2031
2537
|
type: "button",
|
|
2032
|
-
className:
|
|
2538
|
+
className: oi({ state: r ? "inert" : o ? "active" : "usable" }),
|
|
2033
2539
|
disabled: r,
|
|
2034
2540
|
"aria-current": o ? "true" : void 0,
|
|
2035
2541
|
"data-testid": i,
|
|
@@ -2038,32 +2544,34 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2038
2544
|
},
|
|
2039
2545
|
children: n
|
|
2040
2546
|
}) });
|
|
2041
|
-
},
|
|
2547
|
+
}, li = ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2042
2548
|
"data-testid": n,
|
|
2043
2549
|
children: e
|
|
2044
|
-
}),
|
|
2045
|
-
Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c }) => {
|
|
2046
|
-
let
|
|
2550
|
+
}), ui = {
|
|
2551
|
+
Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c, fill: l }) => {
|
|
2552
|
+
let u = r.toArray(s).filter(o);
|
|
2047
2553
|
return /* @__PURE__ */ n("div", {
|
|
2048
|
-
className:
|
|
2554
|
+
className: ii({ fill: l }),
|
|
2049
2555
|
"data-testid": c,
|
|
2050
2556
|
children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("nav", {
|
|
2051
|
-
ref:
|
|
2557
|
+
ref: l ? void 0 : ai,
|
|
2052
2558
|
"aria-label": i,
|
|
2053
|
-
children: /* @__PURE__ */ t(
|
|
2559
|
+
children: /* @__PURE__ */ t(si, {
|
|
2054
2560
|
value: {
|
|
2055
2561
|
active: e,
|
|
2056
2562
|
onSelect$: a
|
|
2057
2563
|
},
|
|
2058
|
-
children: /* @__PURE__ */ t("ul", { children:
|
|
2564
|
+
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type === ci) })
|
|
2059
2565
|
})
|
|
2060
|
-
}) }),
|
|
2566
|
+
}) }), u.filter((e) => e.type === li)]
|
|
2061
2567
|
});
|
|
2062
2568
|
},
|
|
2063
|
-
Item:
|
|
2064
|
-
Content:
|
|
2065
|
-
},
|
|
2569
|
+
Item: ci,
|
|
2570
|
+
Content: li
|
|
2571
|
+
}, di = {
|
|
2066
2572
|
surface: "#ffffff",
|
|
2573
|
+
selectedSurface: "#f8fafc",
|
|
2574
|
+
selectedError: "#cd2d7d",
|
|
2067
2575
|
foreground: "#0f172a",
|
|
2068
2576
|
muted: "#64748b",
|
|
2069
2577
|
border: "#e2e8f0",
|
|
@@ -2089,15 +2597,17 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2089
2597
|
errorHover: "#be185d",
|
|
2090
2598
|
errorForeground: "#ffffff",
|
|
2091
2599
|
info: "#0e7490"
|
|
2092
|
-
},
|
|
2600
|
+
}, fi = {
|
|
2093
2601
|
surface: "#0f172a",
|
|
2602
|
+
selectedSurface: "#151e30",
|
|
2603
|
+
selectedError: "#f48fb1",
|
|
2094
2604
|
foreground: "#f8fafc",
|
|
2095
2605
|
muted: "#94a3b8",
|
|
2096
2606
|
border: "#334155",
|
|
2097
2607
|
controlBorder: "#94a3b8",
|
|
2098
2608
|
rule: "#5b6a80",
|
|
2099
2609
|
backing: "#1e293b",
|
|
2100
|
-
scrim: "rgb(
|
|
2610
|
+
scrim: "rgb(0 0 0 / 0.6)",
|
|
2101
2611
|
meterFill: "#f8fafc",
|
|
2102
2612
|
meterTrack: "#334155",
|
|
2103
2613
|
primary: "#8b5cf6",
|
|
@@ -2107,7 +2617,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2107
2617
|
secondaryHover: "#38bdf8",
|
|
2108
2618
|
secondaryForeground: "#020617",
|
|
2109
2619
|
disabled: "#475569",
|
|
2110
|
-
disabledHover: "#
|
|
2620
|
+
disabledHover: "#64748b",
|
|
2111
2621
|
focusRing: "#cbd5e1",
|
|
2112
2622
|
link: "#60a5fa",
|
|
2113
2623
|
success: "#34d399",
|
|
@@ -2118,4 +2628,4 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2118
2628
|
info: "#22d3ee"
|
|
2119
2629
|
};
|
|
2120
2630
|
//#endregion
|
|
2121
|
-
export {
|
|
2631
|
+
export { be as Box, Se as Brandmark, Gt as Button, we as Callout, De as Checklist, $t as Choices, Kt as ChoicesCompositionError, x as Cluster, Ae as Collection, j as ColumnLayout, S as ColumnLayoutCompositionError, C as ColumnLayoutConfigurationError, ur as Cover, Ve as DefinitionList, je as DefinitionListConfigurationError, xr as Dialog, dr as DialogCompositionError, fr as DialogNamingError, xt as Eyebrow, ge as FieldRow, F as FieldRowCompositionError, I as FieldRowConfigurationError, Ue as Figure, Cr as Footer, Dr as Form, wr as FormConfigurationError, Ct as H1, Tt as H2, Dt as H3, kt as H4, jt as H5, Nt as H6, Pr as Header, Ir as Hero, Je as Icon, tn as Input, rn as Link, Qe as Meter, U as MeterConfigurationError, wn as MultiSelect, on as MultiSelectCompositionError, Ft as Note, En as NumberInput, Lt as P, Vr as PageHead, Kr as Pane, Ut as Prose, rt as Rail, at as Rule, Zr as ScrollContainer, $r as Section, On as Select, ri as Shell, ui as Sidebar, jn as Slider, Y as SliderConfigurationError, ve as Stack, Gn as Stepper, Mn as StepperCompositionError, qn as Switch, yt as Table, ot as TableConfigurationError, ar as Tabs, Jn as TabsCompositionError, sr as TextArea, fi as dark, di as light };
|