@juwel-development/design-system 3.11.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 +1029 -540
- 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 +20 -24
- 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 +10 -4
- 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 +53 -13
- 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 +11 -4
- 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,142 +78,165 @@ 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:
|
|
122
|
-
},
|
|
143
|
+
}, j = {
|
|
144
|
+
Root: oe,
|
|
145
|
+
Column: A
|
|
146
|
+
}, M = .5, N = (e, t) => Math.abs(e - t) <= M, P = (e) => {
|
|
123
147
|
let t = [];
|
|
124
|
-
for (let { top: n } of e) t.some((e) =>
|
|
125
|
-
let n = t.map((t) => Math.max(...e.filter((e) =>
|
|
148
|
+
for (let { top: n } of e) t.some((e) => N(e, n)) || t.push(n);
|
|
149
|
+
let n = t.map((t) => Math.max(...e.filter((e) => N(t, e.top)).map((e) => e.controlEdge)));
|
|
126
150
|
return e.map(({ top: e, controlEdge: r }) => {
|
|
127
|
-
let i = t.findIndex((t) =>
|
|
151
|
+
let i = t.findIndex((t) => N(t, e));
|
|
128
152
|
return (n[i] ?? r) - r;
|
|
129
153
|
});
|
|
130
|
-
},
|
|
154
|
+
}, F = class extends Error {
|
|
131
155
|
constructor(e) {
|
|
132
156
|
super(`FieldRow.${e} must be composed inside FieldRow.Root`), this.name = "FieldRowCompositionError";
|
|
133
157
|
}
|
|
134
|
-
},
|
|
158
|
+
}, I = class extends Error {
|
|
135
159
|
constructor(e) {
|
|
136
160
|
super(`FieldRow configuration: ${e}`), this.name = "FieldRowConfigurationError";
|
|
137
161
|
}
|
|
138
|
-
},
|
|
162
|
+
}, L = y("flex flex-wrap items-start gap-y-[var(--space-stack)]", {
|
|
139
163
|
variants: { gap: {
|
|
140
164
|
stack: "gap-x-[var(--space-stack)]",
|
|
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(
|
|
152
|
-
if (t === void 0) throw new
|
|
174
|
+
}), se = /^--[A-Za-z0-9_-]+$/, B = ":scope > [data-field-row-item]", ce = a(void 0), le = (e) => {
|
|
175
|
+
let t = c(ce);
|
|
176
|
+
if (t === void 0) throw new F(e);
|
|
153
177
|
return t;
|
|
154
|
-
},
|
|
155
|
-
if (!(Number.isFinite(e) && e > 0)) throw new
|
|
156
|
-
},
|
|
157
|
-
if (!
|
|
158
|
-
},
|
|
178
|
+
}, ue = (e) => {
|
|
179
|
+
if (!(Number.isFinite(e) && e > 0)) throw new I(`weight must be a positive finite number, got ${e}`);
|
|
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(
|
|
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(() =>
|
|
196
|
-
for (let t of e.querySelectorAll(
|
|
218
|
+
if (e !== null && (V(e), !(typeof ResizeObserver > "u"))) {
|
|
219
|
+
a.current ??= new ResizeObserver(() => V(e));
|
|
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);
|
|
199
223
|
}
|
|
200
224
|
}
|
|
201
225
|
}), d(() => () => a.current?.disconnect(), []), /* @__PURE__ */ t("div", {
|
|
202
226
|
ref: i,
|
|
203
|
-
className:
|
|
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,13 +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: {
|
|
427
469
|
muted: "text-muted",
|
|
428
470
|
success: "text-success",
|
|
429
471
|
warning: "text-warning",
|
|
430
472
|
error: "text-error",
|
|
431
473
|
info: "text-info"
|
|
432
|
-
} } }),
|
|
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"],
|
|
433
479
|
sort: [
|
|
434
480
|
"M5.5 13V3",
|
|
435
481
|
"M3 5.5l2.5-2.5L8 5.5",
|
|
@@ -446,12 +492,12 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
446
492
|
"M9.25 7.25v3.5"
|
|
447
493
|
],
|
|
448
494
|
"bubble-exclamation": [
|
|
449
|
-
|
|
495
|
+
Ge,
|
|
450
496
|
"M8 4.5v2",
|
|
451
497
|
"M8 8.75h.01"
|
|
452
498
|
],
|
|
453
|
-
"bubble-tick": [
|
|
454
|
-
},
|
|
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", {
|
|
455
501
|
role: n ? "img" : void 0,
|
|
456
502
|
"aria-label": n || void 0,
|
|
457
503
|
"aria-hidden": !n || void 0,
|
|
@@ -459,31 +505,46 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
459
505
|
viewBox: "0 0 16 16",
|
|
460
506
|
width: "1em",
|
|
461
507
|
height: "1em",
|
|
462
|
-
className:
|
|
508
|
+
className: We({ color: r }),
|
|
463
509
|
"data-testid": i,
|
|
464
|
-
children:
|
|
465
|
-
d:
|
|
466
|
-
fill: "none",
|
|
467
|
-
stroke: "currentColor",
|
|
510
|
+
children: Ke[e].map((n) => /* @__PURE__ */ t("path", {
|
|
511
|
+
d: n,
|
|
512
|
+
fill: e === "dot" ? "currentColor" : "none",
|
|
513
|
+
stroke: e === "dot" ? "none" : "currentColor",
|
|
468
514
|
strokeWidth: 1.5,
|
|
469
515
|
strokeLinecap: "round",
|
|
470
516
|
strokeLinejoin: "round"
|
|
471
|
-
},
|
|
472
|
-
}),
|
|
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 {
|
|
473
535
|
constructor(e) {
|
|
474
536
|
super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
|
|
475
537
|
}
|
|
476
|
-
},
|
|
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%)]", {
|
|
477
539
|
variants: { treatment: {
|
|
478
540
|
neutral: "bg-meter-fill",
|
|
479
541
|
depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
|
|
480
542
|
} },
|
|
481
543
|
defaultVariants: { treatment: "neutral" }
|
|
482
|
-
}),
|
|
483
|
-
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new
|
|
484
|
-
if (n >= r) throw new
|
|
485
|
-
|
|
486
|
-
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) };
|
|
487
548
|
return /* @__PURE__ */ t("div", {
|
|
488
549
|
role: "meter",
|
|
489
550
|
"aria-valuenow": e,
|
|
@@ -492,28 +553,28 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
492
553
|
"aria-label": a,
|
|
493
554
|
"aria-valuetext": o,
|
|
494
555
|
"data-testid": s,
|
|
495
|
-
className:
|
|
556
|
+
className: Ye(),
|
|
496
557
|
style: c,
|
|
497
558
|
children: /* @__PURE__ */ t("div", {
|
|
498
559
|
"aria-hidden": "true",
|
|
499
|
-
className:
|
|
560
|
+
className: Xe({ treatment: i })
|
|
500
561
|
})
|
|
501
562
|
});
|
|
502
|
-
},
|
|
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 = {
|
|
503
564
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
504
|
-
className:
|
|
565
|
+
className: $e(),
|
|
505
566
|
"data-testid": n,
|
|
506
567
|
children: e
|
|
507
568
|
}),
|
|
508
569
|
Index: ({ number: e, children: r, testId: i }) => /* @__PURE__ */ n("div", {
|
|
509
|
-
className:
|
|
570
|
+
className: et(),
|
|
510
571
|
"data-testid": i,
|
|
511
572
|
"aria-hidden": "true",
|
|
512
573
|
children: [e !== void 0 && /* @__PURE__ */ t("span", {
|
|
513
|
-
className:
|
|
574
|
+
className: tt(),
|
|
514
575
|
children: e
|
|
515
576
|
}), /* @__PURE__ */ t("span", {
|
|
516
|
-
className:
|
|
577
|
+
className: nt(),
|
|
517
578
|
children: r
|
|
518
579
|
})]
|
|
519
580
|
}),
|
|
@@ -521,20 +582,29 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
521
582
|
"data-testid": n,
|
|
522
583
|
children: e
|
|
523
584
|
})
|
|
524
|
-
},
|
|
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 {
|
|
525
590
|
constructor(e) {
|
|
526
591
|
super(`Table configuration is invalid: ${e}`), this.name = "TableConfigurationError";
|
|
527
592
|
}
|
|
528
|
-
},
|
|
593
|
+
}, W = "comfortable", G = "marker", st = y([
|
|
529
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)))]",
|
|
530
600
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
531
601
|
"[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
|
|
532
|
-
"[&_caption]:
|
|
602
|
+
"[&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
|
|
533
603
|
"[&>table>*:nth-child(2)>tr:first-child]:border-rule",
|
|
534
|
-
"[&[data-notes=supplementary]:not([data-columns])_[data-variant=note]]:max-md:hidden",
|
|
535
|
-
"[&[data-notes=content]:not([data-columns])>table]:max-md:block",
|
|
536
|
-
"[&[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",
|
|
537
|
-
"[&[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",
|
|
538
608
|
"[&[data-columns]>table]:grid [&[data-columns]>table]:grid-cols-[var(--table-columns)]",
|
|
539
609
|
"[&[data-columns]>table>caption]:col-span-full",
|
|
540
610
|
"[&[data-columns]>table>*:not(caption)]:col-span-full [&[data-columns]>table>*:not(caption)]:grid [&[data-columns]>table>*:not(caption)]:grid-cols-subgrid",
|
|
@@ -542,15 +612,33 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
542
612
|
"[&[data-columns]>table>*>tr>td]:wrap-anywhere [&[data-columns]>table>*>tr>th]:wrap-anywhere",
|
|
543
613
|
"[&:has([aria-selected])_tr>*:first-child]:pl-[var(--table-cell-padding-inline)]",
|
|
544
614
|
"[&:has(tr[tabindex])]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
545
|
-
"[&: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)))]",
|
|
546
616
|
"[&:has(tr[tabindex])]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
547
617
|
].join(" "), {
|
|
548
|
-
variants: {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
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([
|
|
554
642
|
"border-t border-solid border-border",
|
|
555
643
|
"[&[aria-selected=true]>*:first-child]:relative",
|
|
556
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",
|
|
@@ -561,7 +649,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
561
649
|
false: ""
|
|
562
650
|
} },
|
|
563
651
|
defaultVariants: { interactive: !1 }
|
|
564
|
-
}),
|
|
652
|
+
}), lt = [
|
|
565
653
|
"a[href]",
|
|
566
654
|
"button",
|
|
567
655
|
"input",
|
|
@@ -587,11 +675,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
587
675
|
"[role=\"searchbox\"]",
|
|
588
676
|
"[role=\"slider\"]",
|
|
589
677
|
"[role=\"spinbutton\"]"
|
|
590
|
-
].join(", "),
|
|
678
|
+
].join(", "), ut = (e, t) => {
|
|
591
679
|
if (!(t instanceof Element)) return !1;
|
|
592
|
-
let n = t.closest(
|
|
680
|
+
let n = t.closest(lt);
|
|
593
681
|
return n !== null && n !== e && e.contains(n);
|
|
594
|
-
},
|
|
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", {
|
|
595
683
|
variants: {
|
|
596
684
|
variant: {
|
|
597
685
|
value: "font-body text-foreground tabular-nums",
|
|
@@ -607,70 +695,108 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
607
695
|
variant: "value",
|
|
608
696
|
align: "left"
|
|
609
697
|
}
|
|
610
|
-
}),
|
|
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", {
|
|
611
699
|
variants: { align: {
|
|
612
700
|
left: "text-left",
|
|
613
701
|
right: "text-right",
|
|
614
702
|
center: "text-center"
|
|
615
703
|
} },
|
|
616
704
|
defaultVariants: { align: "left" }
|
|
617
|
-
}),
|
|
618
|
-
|
|
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);
|
|
619
708
|
if (e.width !== void 0) {
|
|
620
|
-
let t =
|
|
709
|
+
let t = mt(e.width);
|
|
621
710
|
return n === void 0 ? t : `max(${n}, ${t})`;
|
|
622
711
|
}
|
|
623
|
-
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})`);
|
|
624
713
|
return `minmax(${n ?? "0"}, ${e.weight}fr)`;
|
|
625
|
-
},
|
|
626
|
-
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);
|
|
627
716
|
return d(() => {
|
|
628
|
-
let
|
|
629
|
-
if (
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
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);
|
|
637
741
|
};
|
|
638
742
|
}, [
|
|
639
743
|
e,
|
|
640
744
|
t,
|
|
641
|
-
n
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
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,
|
|
647
757
|
role: "table",
|
|
648
758
|
children: [/* @__PURE__ */ t("caption", {
|
|
649
|
-
ref:
|
|
759
|
+
ref: m,
|
|
650
760
|
children: e
|
|
651
|
-
}),
|
|
761
|
+
}), l]
|
|
652
762
|
});
|
|
653
|
-
return
|
|
654
|
-
className:
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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,
|
|
659
776
|
"aria-label": e,
|
|
660
777
|
tabIndex: 0,
|
|
661
|
-
children:
|
|
778
|
+
children: y
|
|
662
779
|
}) : /* @__PURE__ */ t("div", {
|
|
663
|
-
ref:
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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
|
|
674
800
|
});
|
|
675
801
|
},
|
|
676
802
|
Head: ({ children: e }) => /* @__PURE__ */ t("thead", {
|
|
@@ -693,13 +819,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
693
819
|
return () => e?.unsubscribe();
|
|
694
820
|
}, [i]);
|
|
695
821
|
let s = (e) => {
|
|
696
|
-
|
|
822
|
+
ut(e.currentTarget, e.target) || r?.next();
|
|
697
823
|
}, c = (e) => {
|
|
698
|
-
e.target !== e.currentTarget || !
|
|
824
|
+
e.target !== e.currentTarget || !dt.has(e.key) || (e.key === " " && e.preventDefault(), e.repeat || r?.next());
|
|
699
825
|
}, l = r !== void 0;
|
|
700
826
|
return /* @__PURE__ */ t("tr", {
|
|
701
827
|
role: "row",
|
|
702
|
-
className:
|
|
828
|
+
className: ct({ interactive: l }),
|
|
703
829
|
"data-testid": n,
|
|
704
830
|
tabIndex: l ? 0 : void 0,
|
|
705
831
|
"aria-selected": i === void 0 ? void 0 : a,
|
|
@@ -712,19 +838,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
712
838
|
role: e === "row" ? "rowheader" : "columnheader",
|
|
713
839
|
scope: e,
|
|
714
840
|
"aria-sort": r,
|
|
715
|
-
className:
|
|
841
|
+
className: pt({ align: n }),
|
|
716
842
|
children: i
|
|
717
843
|
}),
|
|
718
844
|
Cell: ({ variant: e, align: n, children: r }) => /* @__PURE__ */ t("td", {
|
|
719
845
|
role: "cell",
|
|
720
|
-
className:
|
|
846
|
+
className: ft({
|
|
721
847
|
variant: e,
|
|
722
848
|
align: n
|
|
723
849
|
}),
|
|
724
850
|
"data-variant": e ?? "value",
|
|
725
851
|
children: r
|
|
726
852
|
})
|
|
727
|
-
},
|
|
853
|
+
}, bt = y("font-secondary text-label tracking-label font-medium", {
|
|
728
854
|
variants: { color: {
|
|
729
855
|
foreground: "text-foreground",
|
|
730
856
|
muted: "text-muted",
|
|
@@ -734,11 +860,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
734
860
|
info: "text-info"
|
|
735
861
|
} },
|
|
736
862
|
defaultVariants: { color: "muted" }
|
|
737
|
-
}),
|
|
738
|
-
className:
|
|
863
|
+
}), xt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
|
|
864
|
+
className: bt({ color: n }),
|
|
739
865
|
"data-testid": r,
|
|
740
866
|
children: e
|
|
741
|
-
}),
|
|
867
|
+
}), St = y("font-heading text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
742
868
|
variants: { color: {
|
|
743
869
|
foreground: "text-foreground",
|
|
744
870
|
muted: "text-muted",
|
|
@@ -748,11 +874,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
748
874
|
info: "text-info"
|
|
749
875
|
} },
|
|
750
876
|
defaultVariants: { color: "foreground" }
|
|
751
|
-
}),
|
|
752
|
-
className:
|
|
877
|
+
}), Ct = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h1", {
|
|
878
|
+
className: St({ color: n }),
|
|
753
879
|
"data-testid": r,
|
|
754
880
|
children: e
|
|
755
|
-
}),
|
|
881
|
+
}), wt = y("font-heading text-title leading-title tracking-optical", {
|
|
756
882
|
variants: { color: {
|
|
757
883
|
foreground: "text-foreground",
|
|
758
884
|
muted: "text-muted",
|
|
@@ -762,11 +888,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
762
888
|
info: "text-info"
|
|
763
889
|
} },
|
|
764
890
|
defaultVariants: { color: "foreground" }
|
|
765
|
-
}),
|
|
766
|
-
className:
|
|
891
|
+
}), Tt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h2", {
|
|
892
|
+
className: wt({ color: n }),
|
|
767
893
|
"data-testid": r,
|
|
768
894
|
children: e
|
|
769
|
-
}),
|
|
895
|
+
}), Et = y("font-heading text-subtitle leading-subtitle", {
|
|
770
896
|
variants: { color: {
|
|
771
897
|
foreground: "text-foreground",
|
|
772
898
|
muted: "text-muted",
|
|
@@ -776,11 +902,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
776
902
|
info: "text-info"
|
|
777
903
|
} },
|
|
778
904
|
defaultVariants: { color: "foreground" }
|
|
779
|
-
}),
|
|
780
|
-
className:
|
|
905
|
+
}), Dt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h3", {
|
|
906
|
+
className: Et({ color: n }),
|
|
781
907
|
"data-testid": r,
|
|
782
908
|
children: e
|
|
783
|
-
}),
|
|
909
|
+
}), Ot = y("font-heading text-body leading-body font-bold", {
|
|
784
910
|
variants: { color: {
|
|
785
911
|
foreground: "text-foreground",
|
|
786
912
|
muted: "text-muted",
|
|
@@ -790,11 +916,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
790
916
|
info: "text-info"
|
|
791
917
|
} },
|
|
792
918
|
defaultVariants: { color: "foreground" }
|
|
793
|
-
}),
|
|
794
|
-
className:
|
|
919
|
+
}), kt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h4", {
|
|
920
|
+
className: Ot({ color: n }),
|
|
795
921
|
"data-testid": r,
|
|
796
922
|
children: e
|
|
797
|
-
}),
|
|
923
|
+
}), At = y("font-heading text-body leading-body font-semibold", {
|
|
798
924
|
variants: { color: {
|
|
799
925
|
foreground: "text-foreground",
|
|
800
926
|
muted: "text-muted",
|
|
@@ -804,11 +930,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
804
930
|
info: "text-info"
|
|
805
931
|
} },
|
|
806
932
|
defaultVariants: { color: "foreground" }
|
|
807
|
-
}),
|
|
808
|
-
className:
|
|
933
|
+
}), jt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h5", {
|
|
934
|
+
className: At({ color: n }),
|
|
809
935
|
"data-testid": r,
|
|
810
936
|
children: e
|
|
811
|
-
}),
|
|
937
|
+
}), Mt = y("font-heading text-body leading-body font-medium", {
|
|
812
938
|
variants: { color: {
|
|
813
939
|
foreground: "text-foreground",
|
|
814
940
|
muted: "text-muted",
|
|
@@ -818,111 +944,169 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
818
944
|
info: "text-info"
|
|
819
945
|
} },
|
|
820
946
|
defaultVariants: { color: "foreground" }
|
|
821
|
-
}),
|
|
822
|
-
className:
|
|
947
|
+
}), Nt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h6", {
|
|
948
|
+
className: Mt({ color: n }),
|
|
823
949
|
"data-testid": r,
|
|
824
950
|
children: e
|
|
825
|
-
}),
|
|
826
|
-
variants: {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
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,
|
|
838
982
|
children: e
|
|
839
|
-
}),
|
|
840
|
-
variants: {
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
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,
|
|
852
1014
|
children: e
|
|
853
|
-
}),
|
|
854
|
-
variants: {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
success: "text-success",
|
|
858
|
-
warning: "text-warning",
|
|
859
|
-
error: "text-error",
|
|
860
|
-
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"
|
|
861
1019
|
} },
|
|
862
|
-
defaultVariants: {
|
|
863
|
-
}),
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
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
|
+
})
|
|
868
1048
|
}),
|
|
869
1049
|
Lede: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
870
|
-
className:
|
|
1050
|
+
className: Bt(),
|
|
871
1051
|
children: e
|
|
872
1052
|
}),
|
|
873
1053
|
Body: ({ color: e, children: n }) => /* @__PURE__ */ t("p", {
|
|
874
|
-
className:
|
|
1054
|
+
className: Vt({
|
|
1055
|
+
color: e,
|
|
1056
|
+
letter: c(zt)
|
|
1057
|
+
}),
|
|
875
1058
|
children: n
|
|
876
1059
|
}),
|
|
877
1060
|
Tail: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
878
|
-
className:
|
|
1061
|
+
className: Ht(),
|
|
879
1062
|
children: e
|
|
880
1063
|
})
|
|
881
|
-
},
|
|
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)]", {
|
|
882
1065
|
variants: { variant: {
|
|
883
|
-
primary: `${
|
|
884
|
-
secondary: `${
|
|
885
|
-
ghost: `${
|
|
886
|
-
outlined: `${
|
|
887
|
-
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",
|
|
888
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"
|
|
889
1073
|
} },
|
|
890
1074
|
defaultVariants: { variant: "primary" }
|
|
891
|
-
}),
|
|
1075
|
+
}), Gt = ({ children: e, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ t("button", {
|
|
892
1076
|
type: s,
|
|
893
1077
|
"data-testid": r,
|
|
894
|
-
className:
|
|
1078
|
+
className: Wt({ variant: i }),
|
|
895
1079
|
onClick: () => a?.next(),
|
|
896
1080
|
disabled: n,
|
|
897
1081
|
"aria-label": o,
|
|
898
1082
|
children: e
|
|
899
|
-
}),
|
|
1083
|
+
}), Kt = class extends Error {
|
|
900
1084
|
constructor(e) {
|
|
901
1085
|
super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
|
|
902
1086
|
}
|
|
903
|
-
},
|
|
1087
|
+
}, qt = y("flex flex-col gap-[var(--space-stack)]"), Jt = y([
|
|
904
1088
|
"group/choice flex w-full flex-row items-start gap-3 text-left",
|
|
905
1089
|
"rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
|
|
906
1090
|
"px-3 py-2",
|
|
907
1091
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
908
1092
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
909
1093
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
910
|
-
].join(" ")),
|
|
911
|
-
let t = c(
|
|
912
|
-
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);
|
|
913
1097
|
return t;
|
|
914
|
-
},
|
|
1098
|
+
}, Zt = (e, t) => {
|
|
915
1099
|
let n = e.closest("[role=\"radiogroup\"]");
|
|
916
1100
|
if (n === null) return;
|
|
917
1101
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
|
|
918
1102
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
919
|
-
},
|
|
1103
|
+
}, Qt = {
|
|
920
1104
|
ArrowDown: 1,
|
|
921
1105
|
ArrowRight: 1,
|
|
922
1106
|
ArrowUp: -1,
|
|
923
1107
|
ArrowLeft: -1
|
|
924
|
-
},
|
|
925
|
-
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, {
|
|
926
1110
|
value: {
|
|
927
1111
|
selected: e,
|
|
928
1112
|
onSelect$: n,
|
|
@@ -932,13 +1116,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
932
1116
|
role: "radiogroup",
|
|
933
1117
|
"aria-label": r,
|
|
934
1118
|
"aria-disabled": i === !0 ? "true" : void 0,
|
|
935
|
-
className:
|
|
1119
|
+
className: qt(),
|
|
936
1120
|
"data-testid": o,
|
|
937
1121
|
children: a
|
|
938
1122
|
})
|
|
939
1123
|
}),
|
|
940
1124
|
Choice: ({ value: e, children: r, description: i, testId: a }) => {
|
|
941
|
-
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`;
|
|
942
1126
|
return /* @__PURE__ */ n("button", {
|
|
943
1127
|
type: "button",
|
|
944
1128
|
role: "radio",
|
|
@@ -949,15 +1133,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
949
1133
|
disabled: c,
|
|
950
1134
|
"data-value": e,
|
|
951
1135
|
"data-testid": a,
|
|
952
|
-
className:
|
|
1136
|
+
className: Jt(),
|
|
953
1137
|
onClick: () => {
|
|
954
1138
|
l || s.next(e);
|
|
955
1139
|
},
|
|
956
1140
|
onKeyDown: (e) => {
|
|
957
|
-
let t =
|
|
1141
|
+
let t = Qt[e.key];
|
|
958
1142
|
if (t === void 0 || c) return;
|
|
959
1143
|
e.preventDefault();
|
|
960
|
-
let n =
|
|
1144
|
+
let n = Zt(e.currentTarget, t);
|
|
961
1145
|
if (n === void 0) return;
|
|
962
1146
|
n.focus();
|
|
963
1147
|
let r = n.dataset.value;
|
|
@@ -983,14 +1167,14 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
983
1167
|
})]
|
|
984
1168
|
});
|
|
985
1169
|
}
|
|
986
|
-
},
|
|
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", {
|
|
987
1171
|
variants: { variant: {
|
|
988
1172
|
text: "",
|
|
989
1173
|
email: "",
|
|
990
1174
|
url: ""
|
|
991
1175
|
} },
|
|
992
1176
|
defaultVariants: { variant: "text" }
|
|
993
|
-
}),
|
|
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 }) => {
|
|
994
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);
|
|
995
1179
|
return l(() => {
|
|
996
1180
|
let e = v?.subscribe(() => {
|
|
@@ -1010,7 +1194,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1010
1194
|
id: x,
|
|
1011
1195
|
name: r,
|
|
1012
1196
|
type: i ?? "text",
|
|
1013
|
-
className:
|
|
1197
|
+
className: en({ variant: i }),
|
|
1014
1198
|
required: a,
|
|
1015
1199
|
disabled: c,
|
|
1016
1200
|
defaultValue: d,
|
|
@@ -1037,7 +1221,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1037
1221
|
})
|
|
1038
1222
|
]
|
|
1039
1223
|
});
|
|
1040
|
-
},
|
|
1224
|
+
}, nn = y("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1041
1225
|
variants: { treatment: {
|
|
1042
1226
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
1043
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",
|
|
@@ -1045,15 +1229,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1045
1229
|
graphic: "text-inherit no-underline"
|
|
1046
1230
|
} },
|
|
1047
1231
|
defaultVariants: { treatment: "prose" }
|
|
1048
|
-
}),
|
|
1232
|
+
}), rn = ({ href: e, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ t("a", {
|
|
1049
1233
|
href: e,
|
|
1050
|
-
className:
|
|
1234
|
+
className: nn({ treatment: r }),
|
|
1051
1235
|
target: i ? "_blank" : void 0,
|
|
1052
1236
|
rel: i ? "noopener noreferrer" : void 0,
|
|
1053
1237
|
"aria-current": a ? "page" : void 0,
|
|
1054
1238
|
"data-testid": o,
|
|
1055
1239
|
children: n
|
|
1056
|
-
}),
|
|
1240
|
+
}), an = (e, t, n, r) => {
|
|
1057
1241
|
let i = Math.max(e.length - 1, 0) * r;
|
|
1058
1242
|
if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
|
|
1059
1243
|
let a = 0, o = t;
|
|
@@ -1062,11 +1246,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1062
1246
|
o += t + r, a += 1;
|
|
1063
1247
|
}
|
|
1064
1248
|
return a;
|
|
1065
|
-
},
|
|
1249
|
+
}, on = class extends Error {
|
|
1066
1250
|
constructor(e) {
|
|
1067
1251
|
super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
|
|
1068
1252
|
}
|
|
1069
|
-
},
|
|
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("", {
|
|
1070
1254
|
variants: { part: {
|
|
1071
1255
|
root: [
|
|
1072
1256
|
"relative flex flex-col gap-[var(--space-stack)]",
|
|
@@ -1079,7 +1263,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1079
1263
|
"font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
|
|
1080
1264
|
"data-[disabled]:border-disabled data-[disabled]:text-muted"
|
|
1081
1265
|
].join(" "),
|
|
1082
|
-
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}`,
|
|
1083
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",
|
|
1084
1268
|
track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
|
|
1085
1269
|
chip: [
|
|
@@ -1087,9 +1271,9 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1087
1271
|
"rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
|
|
1088
1272
|
"group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
|
|
1089
1273
|
].join(" "),
|
|
1090
|
-
count:
|
|
1091
|
-
countMeasure: `${
|
|
1092
|
-
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}`,
|
|
1093
1277
|
surface: [
|
|
1094
1278
|
"absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
|
|
1095
1279
|
"rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
|
|
@@ -1098,22 +1282,22 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1098
1282
|
].join(" ")
|
|
1099
1283
|
} },
|
|
1100
1284
|
defaultVariants: { part: "root" }
|
|
1101
|
-
}),
|
|
1285
|
+
}), ln = y([
|
|
1102
1286
|
"group/option flex w-full flex-row items-center gap-3 text-left",
|
|
1103
1287
|
"rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
|
|
1104
1288
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1105
1289
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1106
1290
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1107
|
-
].join(" ")),
|
|
1108
|
-
let t = c(
|
|
1109
|
-
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);
|
|
1110
1294
|
return t;
|
|
1111
|
-
},
|
|
1295
|
+
}, J = (e) => (t) => {
|
|
1112
1296
|
e.current = t ?? void 0;
|
|
1113
|
-
},
|
|
1297
|
+
}, pn = (e) => e.getBoundingClientRect().width, mn = (e) => r.toArray(e).flatMap((e) => {
|
|
1114
1298
|
if (!o(e)) return [];
|
|
1115
|
-
if (e.type === i) return
|
|
1116
|
-
if (e.type ===
|
|
1299
|
+
if (e.type === i) return mn(e.props.children);
|
|
1300
|
+
if (e.type === Cn) {
|
|
1117
1301
|
let { value: t, children: n } = e.props;
|
|
1118
1302
|
return [{
|
|
1119
1303
|
value: t,
|
|
@@ -1121,19 +1305,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1121
1305
|
}];
|
|
1122
1306
|
}
|
|
1123
1307
|
return [];
|
|
1124
|
-
}),
|
|
1308
|
+
}), hn = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), gn = (e) => {
|
|
1125
1309
|
let t = document.activeElement;
|
|
1126
1310
|
return !e.contains(t) || t instanceof Element && t.closest("[data-overflow]") !== null;
|
|
1127
|
-
},
|
|
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) => {
|
|
1128
1312
|
switch (e.kind) {
|
|
1129
|
-
case "firstOption": return r === void 0 ? void 0 :
|
|
1313
|
+
case "firstOption": return r === void 0 ? void 0 : _n(r);
|
|
1130
1314
|
case "afterRemoval": {
|
|
1131
|
-
let r =
|
|
1315
|
+
let r = hn(t);
|
|
1132
1316
|
return r[e.index] ?? r[e.index - 1] ?? n;
|
|
1133
1317
|
}
|
|
1134
1318
|
case "afterClear": return n;
|
|
1135
1319
|
}
|
|
1136
|
-
},
|
|
1320
|
+
}, xn = () => /* @__PURE__ */ t("svg", {
|
|
1137
1321
|
"aria-hidden": !0,
|
|
1138
1322
|
focusable: !1,
|
|
1139
1323
|
viewBox: "0 0 16 16",
|
|
@@ -1145,89 +1329,89 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1145
1329
|
strokeWidth: 1.5,
|
|
1146
1330
|
strokeLinecap: "round"
|
|
1147
1331
|
})
|
|
1148
|
-
}),
|
|
1149
|
-
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;
|
|
1150
1334
|
d(() => {
|
|
1151
|
-
|
|
1152
|
-
let e = r.subscribe((e) =>
|
|
1335
|
+
E([]);
|
|
1336
|
+
let e = r.subscribe((e) => E(e));
|
|
1153
1337
|
return () => e.unsubscribe();
|
|
1154
1338
|
}, [r]), l(() => {
|
|
1155
|
-
T &&
|
|
1339
|
+
T && D(!1);
|
|
1156
1340
|
}, [T]), d(() => {
|
|
1157
|
-
let e =
|
|
1341
|
+
let e = j.current;
|
|
1158
1342
|
if (e === void 0 || typeof ResizeObserver > "u") return;
|
|
1159
|
-
let t = new ResizeObserver(() =>
|
|
1343
|
+
let t = new ResizeObserver(() => O());
|
|
1160
1344
|
return t.observe(e), () => t.disconnect();
|
|
1161
1345
|
}, []), d(() => {
|
|
1162
|
-
let e =
|
|
1346
|
+
let e = j.current;
|
|
1163
1347
|
if (e === void 0) return;
|
|
1164
|
-
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i =
|
|
1165
|
-
|
|
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);
|
|
1166
1350
|
}), d(() => {
|
|
1167
|
-
let e =
|
|
1168
|
-
if (!
|
|
1169
|
-
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom -
|
|
1170
|
-
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");
|
|
1171
1355
|
}), l(() => {
|
|
1172
|
-
if (!
|
|
1356
|
+
if (!F) return;
|
|
1173
1357
|
let e = (e) => {
|
|
1174
|
-
let t =
|
|
1175
|
-
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));
|
|
1176
1360
|
};
|
|
1177
1361
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1178
|
-
}, [
|
|
1179
|
-
let e =
|
|
1362
|
+
}, [F]), d(() => {
|
|
1363
|
+
let e = k.current, t = A.current;
|
|
1180
1364
|
if (e === void 0 || t === void 0) return;
|
|
1181
|
-
let n =
|
|
1182
|
-
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);
|
|
1183
1367
|
});
|
|
1184
|
-
let
|
|
1185
|
-
i.next(
|
|
1186
|
-
},
|
|
1368
|
+
let B = (e) => {
|
|
1369
|
+
i.next(vn(I, e));
|
|
1370
|
+
}, ce = (e) => {
|
|
1187
1371
|
if (T) return;
|
|
1188
|
-
let t = new Set(
|
|
1189
|
-
t.delete(e) || t.add(e),
|
|
1190
|
-
},
|
|
1372
|
+
let t = new Set(L);
|
|
1373
|
+
t.delete(e) || t.add(e), B(t);
|
|
1374
|
+
}, le = (e, t) => (n) => {
|
|
1191
1375
|
if (T) return;
|
|
1192
|
-
document.activeElement === n.currentTarget && (
|
|
1376
|
+
document.activeElement === n.currentTarget && (N.current = {
|
|
1193
1377
|
kind: "afterRemoval",
|
|
1194
1378
|
index: t,
|
|
1195
1379
|
control: n.currentTarget
|
|
1196
1380
|
});
|
|
1197
|
-
let r = new Set(
|
|
1198
|
-
r.delete(e),
|
|
1199
|
-
},
|
|
1200
|
-
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 = {
|
|
1201
1385
|
kind: "afterClear",
|
|
1202
1386
|
control: e.currentTarget
|
|
1203
1387
|
}), i.next([]));
|
|
1204
|
-
}, se = (e) => {
|
|
1205
|
-
T || (e.detail === 0 && (L.current = { kind: "firstOption" }), O(!0));
|
|
1206
|
-
}, ce = (e) => {
|
|
1207
|
-
z ? O(!1) : se(e);
|
|
1208
|
-
}, le = (e) => {
|
|
1209
|
-
if (e.key !== "ArrowDown" || T) return;
|
|
1210
|
-
e.preventDefault();
|
|
1211
|
-
let t = I.current;
|
|
1212
|
-
z && t !== void 0 ? nn(t)?.focus() : (L.current = { kind: "firstOption" }, O(!0));
|
|
1213
|
-
}, G = (e) => {
|
|
1214
|
-
e.key !== "Escape" || !z || (e.preventDefault(), e.stopPropagation(), O(!1), P.current?.focus());
|
|
1215
|
-
}, ue = (e) => {
|
|
1216
|
-
R.current = !0;
|
|
1217
|
-
let t = L.current;
|
|
1218
|
-
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (L.current = void 0);
|
|
1219
1388
|
}, de = (e) => {
|
|
1220
|
-
|
|
1221
|
-
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (R.current = !1, L.current = void 0, O(!1));
|
|
1389
|
+
T || (e.detail === 0 && (N.current = { kind: "firstOption" }), D(!0));
|
|
1222
1390
|
}, fe = (e) => {
|
|
1391
|
+
F ? D(!1) : de(e);
|
|
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) => {
|
|
1223
1407
|
(!(e.target instanceof Element) || e.target.closest("button") === null) && e.preventDefault();
|
|
1224
|
-
},
|
|
1408
|
+
}, _e = [R.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
|
|
1225
1409
|
return /* @__PURE__ */ n("div", {
|
|
1226
|
-
ref:
|
|
1227
|
-
className:
|
|
1228
|
-
onKeyDown:
|
|
1229
|
-
onFocus:
|
|
1230
|
-
onBlur:
|
|
1410
|
+
ref: J(k),
|
|
1411
|
+
className: q(),
|
|
1412
|
+
onKeyDown: me,
|
|
1413
|
+
onFocus: he,
|
|
1414
|
+
onBlur: V,
|
|
1231
1415
|
children: [
|
|
1232
1416
|
/* @__PURE__ */ t("label", {
|
|
1233
1417
|
id: b,
|
|
@@ -1235,24 +1419,24 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1235
1419
|
children: e
|
|
1236
1420
|
}),
|
|
1237
1421
|
/* @__PURE__ */ n("div", {
|
|
1238
|
-
ref:
|
|
1422
|
+
ref: J(oe),
|
|
1239
1423
|
"data-multiselect-field": !0,
|
|
1240
1424
|
"data-disabled": T || void 0,
|
|
1241
|
-
className:
|
|
1425
|
+
className: q({ part: "field" }),
|
|
1242
1426
|
children: [
|
|
1243
1427
|
/* @__PURE__ */ t("button", {
|
|
1244
|
-
ref:
|
|
1428
|
+
ref: J(A),
|
|
1245
1429
|
id: x,
|
|
1246
1430
|
type: "button",
|
|
1247
1431
|
"aria-labelledby": b,
|
|
1248
|
-
"aria-expanded":
|
|
1249
|
-
"aria-controls":
|
|
1250
|
-
"aria-describedby":
|
|
1432
|
+
"aria-expanded": F,
|
|
1433
|
+
"aria-controls": F ? S : void 0,
|
|
1434
|
+
"aria-describedby": _e,
|
|
1251
1435
|
disabled: T,
|
|
1252
1436
|
"data-testid": _,
|
|
1253
|
-
className:
|
|
1254
|
-
onClick:
|
|
1255
|
-
onKeyDown:
|
|
1437
|
+
className: q({ part: "trigger" }),
|
|
1438
|
+
onClick: fe,
|
|
1439
|
+
onKeyDown: pe,
|
|
1256
1440
|
children: /* @__PURE__ */ t("svg", {
|
|
1257
1441
|
"aria-hidden": !0,
|
|
1258
1442
|
focusable: !1,
|
|
@@ -1269,25 +1453,25 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1269
1453
|
})
|
|
1270
1454
|
}),
|
|
1271
1455
|
/* @__PURE__ */ t("div", {
|
|
1272
|
-
className:
|
|
1456
|
+
className: q({ part: "clip" }),
|
|
1273
1457
|
children: /* @__PURE__ */ n("div", {
|
|
1274
|
-
ref:
|
|
1458
|
+
ref: J(j),
|
|
1275
1459
|
"data-multiselect-track": !0,
|
|
1276
|
-
className:
|
|
1460
|
+
className: q({ part: "track" }),
|
|
1277
1461
|
children: [
|
|
1278
|
-
|
|
1462
|
+
R.length === 0 && /* @__PURE__ */ t("span", {
|
|
1279
1463
|
id: w,
|
|
1280
1464
|
className: "truncate text-muted",
|
|
1281
1465
|
children: a
|
|
1282
1466
|
}),
|
|
1283
|
-
|
|
1284
|
-
let a = i >=
|
|
1467
|
+
R.map(({ value: e, label: r }, i) => {
|
|
1468
|
+
let a = i >= z;
|
|
1285
1469
|
return /* @__PURE__ */ n("span", {
|
|
1286
1470
|
"data-multiselect-chip": !0,
|
|
1287
1471
|
"data-overflow": a || void 0,
|
|
1288
1472
|
"aria-hidden": a || void 0,
|
|
1289
1473
|
inert: a || void 0,
|
|
1290
|
-
className:
|
|
1474
|
+
className: q({ part: "chip" }),
|
|
1291
1475
|
children: [/* @__PURE__ */ t("span", {
|
|
1292
1476
|
className: "truncate",
|
|
1293
1477
|
children: r
|
|
@@ -1296,35 +1480,35 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1296
1480
|
"aria-label": o.replaceAll("{label}", r),
|
|
1297
1481
|
disabled: T,
|
|
1298
1482
|
tabIndex: a ? -1 : void 0,
|
|
1299
|
-
className:
|
|
1300
|
-
onClick:
|
|
1301
|
-
children: /* @__PURE__ */ t(
|
|
1483
|
+
className: q({ part: "iconButton" }),
|
|
1484
|
+
onClick: le(e, i),
|
|
1485
|
+
children: /* @__PURE__ */ t(xn, {})
|
|
1302
1486
|
})]
|
|
1303
1487
|
}, e);
|
|
1304
1488
|
}),
|
|
1305
|
-
|
|
1489
|
+
se > 0 && /* @__PURE__ */ t("button", {
|
|
1306
1490
|
type: "button",
|
|
1307
1491
|
disabled: T,
|
|
1308
|
-
className:
|
|
1309
|
-
onClick:
|
|
1310
|
-
children: c.replaceAll("{count}", String(
|
|
1492
|
+
className: q({ part: "count" }),
|
|
1493
|
+
onClick: de,
|
|
1494
|
+
children: c.replaceAll("{count}", String(se))
|
|
1311
1495
|
}),
|
|
1312
|
-
|
|
1496
|
+
R.length > 0 && /* @__PURE__ */ t("span", {
|
|
1313
1497
|
"aria-hidden": !0,
|
|
1314
1498
|
"data-multiselect-count": !0,
|
|
1315
|
-
className:
|
|
1316
|
-
children: c.replaceAll("{count}", String(
|
|
1499
|
+
className: q({ part: "countMeasure" }),
|
|
1500
|
+
children: c.replaceAll("{count}", String(R.length))
|
|
1317
1501
|
})
|
|
1318
1502
|
]
|
|
1319
1503
|
})
|
|
1320
1504
|
}),
|
|
1321
|
-
|
|
1505
|
+
R.length > 0 ? /* @__PURE__ */ t("button", {
|
|
1322
1506
|
type: "button",
|
|
1323
1507
|
"aria-label": s,
|
|
1324
1508
|
disabled: T,
|
|
1325
|
-
className:
|
|
1326
|
-
onClick:
|
|
1327
|
-
children: /* @__PURE__ */ t(
|
|
1509
|
+
className: q({ part: "iconButton" }),
|
|
1510
|
+
onClick: ue,
|
|
1511
|
+
children: /* @__PURE__ */ t(xn, {})
|
|
1328
1512
|
}) : /* @__PURE__ */ t("span", {
|
|
1329
1513
|
"aria-hidden": !0,
|
|
1330
1514
|
className: "size-6 shrink-0"
|
|
@@ -1333,19 +1517,19 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1333
1517
|
"aria-hidden": !0,
|
|
1334
1518
|
className: "size-6 shrink-0"
|
|
1335
1519
|
}),
|
|
1336
|
-
|
|
1337
|
-
ref:
|
|
1520
|
+
F && /* @__PURE__ */ t("div", {
|
|
1521
|
+
ref: J(M),
|
|
1338
1522
|
id: S,
|
|
1339
1523
|
role: "group",
|
|
1340
1524
|
"aria-labelledby": b,
|
|
1341
|
-
"data-placement":
|
|
1342
|
-
className:
|
|
1343
|
-
onMouseDown:
|
|
1344
|
-
children: /* @__PURE__ */ t(
|
|
1525
|
+
"data-placement": ie,
|
|
1526
|
+
className: q({ part: "surface" }),
|
|
1527
|
+
onMouseDown: ge,
|
|
1528
|
+
children: /* @__PURE__ */ t(dn, {
|
|
1345
1529
|
value: {
|
|
1346
|
-
selected:
|
|
1530
|
+
selected: L,
|
|
1347
1531
|
disabled: T,
|
|
1348
|
-
toggle:
|
|
1532
|
+
toggle: ce
|
|
1349
1533
|
},
|
|
1350
1534
|
children: v
|
|
1351
1535
|
})
|
|
@@ -1358,15 +1542,15 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1358
1542
|
})
|
|
1359
1543
|
]
|
|
1360
1544
|
});
|
|
1361
|
-
},
|
|
1362
|
-
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);
|
|
1363
1547
|
return /* @__PURE__ */ n("button", {
|
|
1364
1548
|
type: "button",
|
|
1365
1549
|
role: "checkbox",
|
|
1366
1550
|
"aria-checked": c,
|
|
1367
1551
|
disabled: o,
|
|
1368
1552
|
"data-testid": i,
|
|
1369
|
-
className:
|
|
1553
|
+
className: ln(),
|
|
1370
1554
|
onClick: () => s(e),
|
|
1371
1555
|
children: [/* @__PURE__ */ t("span", {
|
|
1372
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",
|
|
@@ -1389,10 +1573,10 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1389
1573
|
children: r
|
|
1390
1574
|
})]
|
|
1391
1575
|
});
|
|
1392
|
-
},
|
|
1393
|
-
Root:
|
|
1394
|
-
Option:
|
|
1395
|
-
},
|
|
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: _ }) => {
|
|
1396
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);
|
|
1397
1581
|
return l(() => {
|
|
1398
1582
|
let e = g?.subscribe(() => {
|
|
@@ -1413,7 +1597,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1413
1597
|
name: r,
|
|
1414
1598
|
type: "text",
|
|
1415
1599
|
inputMode: "decimal",
|
|
1416
|
-
className:
|
|
1600
|
+
className: Tn(),
|
|
1417
1601
|
required: i,
|
|
1418
1602
|
disabled: d,
|
|
1419
1603
|
defaultValue: m,
|
|
@@ -1439,7 +1623,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1439
1623
|
})
|
|
1440
1624
|
]
|
|
1441
1625
|
});
|
|
1442
|
-
},
|
|
1626
|
+
}, Dn = y([
|
|
1443
1627
|
"flex flex-col gap-[var(--space-stack)]",
|
|
1444
1628
|
"[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
|
|
1445
1629
|
"[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
|
|
@@ -1448,11 +1632,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1448
1632
|
"[&>select]:font-control [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
|
|
1449
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)]",
|
|
1450
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"
|
|
1451
|
-
].join(" ")),
|
|
1635
|
+
].join(" ")), On = {
|
|
1452
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 }) => {
|
|
1453
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;
|
|
1454
1638
|
return /* @__PURE__ */ n("div", {
|
|
1455
|
-
className:
|
|
1639
|
+
className: Dn(),
|
|
1456
1640
|
children: [
|
|
1457
1641
|
/* @__PURE__ */ t("label", {
|
|
1458
1642
|
htmlFor: _,
|
|
@@ -1491,11 +1675,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1491
1675
|
"data-testid": r,
|
|
1492
1676
|
children: n
|
|
1493
1677
|
})
|
|
1494
|
-
},
|
|
1678
|
+
}, Y = class extends Error {
|
|
1495
1679
|
constructor(e) {
|
|
1496
1680
|
super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
|
|
1497
1681
|
}
|
|
1498
|
-
},
|
|
1682
|
+
}, kn = y([
|
|
1499
1683
|
"block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
|
|
1500
1684
|
"disabled:cursor-not-allowed",
|
|
1501
1685
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1506,14 +1690,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1506
1690
|
"[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
|
|
1507
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",
|
|
1508
1692
|
"[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
|
|
1509
|
-
].join(" ")),
|
|
1510
|
-
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new
|
|
1511
|
-
if (e.min >= e.max) throw new
|
|
1512
|
-
if (e.step <= 0) throw new
|
|
1513
|
-
|
|
1514
|
-
}, _n = ({ 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 }) => {
|
|
1515
1698
|
let f = `${u()}-control`;
|
|
1516
|
-
return
|
|
1699
|
+
return An({
|
|
1517
1700
|
min: e,
|
|
1518
1701
|
max: r,
|
|
1519
1702
|
step: i,
|
|
@@ -1527,7 +1710,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1527
1710
|
}), /* @__PURE__ */ t("input", {
|
|
1528
1711
|
id: f,
|
|
1529
1712
|
type: "range",
|
|
1530
|
-
className:
|
|
1713
|
+
className: kn(),
|
|
1531
1714
|
min: e,
|
|
1532
1715
|
max: r,
|
|
1533
1716
|
step: i,
|
|
@@ -1538,102 +1721,282 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1538
1721
|
onChange: (e) => o.next(e.currentTarget.valueAsNumber)
|
|
1539
1722
|
})]
|
|
1540
1723
|
});
|
|
1541
|
-
},
|
|
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 {
|
|
1542
1891
|
constructor(e) {
|
|
1543
1892
|
super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
|
|
1544
1893
|
}
|
|
1545
|
-
},
|
|
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([
|
|
1546
1901
|
"flex flex-row overflow-x-auto",
|
|
1547
1902
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1548
1903
|
"m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
1549
1904
|
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
1550
|
-
].join(" ")
|
|
1905
|
+
].join(" "), { variants: { fill: {
|
|
1906
|
+
true: "shrink-0",
|
|
1907
|
+
false: ""
|
|
1908
|
+
} } }), Zn = y([
|
|
1551
1909
|
"font-secondary text-label tracking-label",
|
|
1552
1910
|
"text-muted hover:text-foreground aria-selected:text-foreground",
|
|
1553
1911
|
"border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
1554
1912
|
"cursor-pointer select-none px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
|
|
1555
1913
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1556
1914
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1557
|
-
].join(" ")),
|
|
1558
|
-
|
|
1559
|
-
|
|
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);
|
|
1560
1921
|
return t;
|
|
1561
|
-
},
|
|
1922
|
+
}, er = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), tr = (e) => {
|
|
1562
1923
|
e.currentTarget.scrollIntoView({
|
|
1563
1924
|
block: "nearest",
|
|
1564
1925
|
inline: "nearest"
|
|
1565
1926
|
});
|
|
1566
|
-
},
|
|
1927
|
+
}, nr = (e, t) => `${e}tab-${er(t)}`, rr = (e, t) => `${e}panel-${er(t)}`, ir = (e, t) => {
|
|
1567
1928
|
let n = e.closest("[role=\"tablist\"]");
|
|
1568
1929
|
if (n === null) return;
|
|
1569
1930
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
1570
1931
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1571
|
-
},
|
|
1572
|
-
Root: ({ active: e, onSelect$: n, label: r,
|
|
1573
|
-
let
|
|
1574
|
-
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, {
|
|
1575
1936
|
value: {
|
|
1576
1937
|
active: e,
|
|
1577
1938
|
onSelect$: n,
|
|
1578
1939
|
label: r,
|
|
1579
|
-
baseId:
|
|
1940
|
+
baseId: s,
|
|
1941
|
+
fill: i === !0
|
|
1580
1942
|
},
|
|
1581
1943
|
children: /* @__PURE__ */ t("div", {
|
|
1582
|
-
|
|
1583
|
-
|
|
1944
|
+
className: Yn({ fill: i }),
|
|
1945
|
+
"data-testid": o,
|
|
1946
|
+
children: a
|
|
1584
1947
|
})
|
|
1585
1948
|
});
|
|
1586
1949
|
},
|
|
1587
1950
|
List: ({ children: e, testId: n }) => {
|
|
1588
|
-
let { label: r } =
|
|
1951
|
+
let { label: r, fill: i } = Z("List");
|
|
1589
1952
|
return /* @__PURE__ */ t("div", {
|
|
1590
1953
|
role: "tablist",
|
|
1591
1954
|
"aria-label": r,
|
|
1592
|
-
className:
|
|
1955
|
+
className: Xn({ fill: i }),
|
|
1593
1956
|
"data-testid": n,
|
|
1594
1957
|
children: e
|
|
1595
1958
|
});
|
|
1596
1959
|
},
|
|
1597
1960
|
Tab: ({ value: e, children: n, testId: r }) => {
|
|
1598
|
-
let { active: i, onSelect$: a, baseId: o } =
|
|
1961
|
+
let { active: i, onSelect$: a, baseId: o } = Z("Tab"), s = i === e;
|
|
1599
1962
|
return /* @__PURE__ */ t("button", {
|
|
1600
1963
|
type: "button",
|
|
1601
1964
|
role: "tab",
|
|
1602
|
-
id:
|
|
1965
|
+
id: nr(o, e),
|
|
1603
1966
|
"aria-selected": s,
|
|
1604
|
-
"aria-controls":
|
|
1967
|
+
"aria-controls": rr(o, e),
|
|
1605
1968
|
tabIndex: s ? 0 : -1,
|
|
1606
1969
|
"data-value": e,
|
|
1607
1970
|
"data-testid": r,
|
|
1608
|
-
className:
|
|
1971
|
+
className: Zn(),
|
|
1609
1972
|
onClick: () => a.next(e),
|
|
1610
1973
|
onKeyDown: (e) => {
|
|
1611
1974
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1612
1975
|
e.preventDefault();
|
|
1613
|
-
let t =
|
|
1976
|
+
let t = ir(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
1614
1977
|
if (t === void 0) return;
|
|
1615
1978
|
t.focus();
|
|
1616
1979
|
let n = t.dataset.value;
|
|
1617
1980
|
n !== void 0 && a.next(n);
|
|
1618
1981
|
},
|
|
1619
|
-
onFocus:
|
|
1982
|
+
onFocus: tr,
|
|
1620
1983
|
children: n
|
|
1621
1984
|
});
|
|
1622
1985
|
},
|
|
1623
1986
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
1624
|
-
let { active: i, baseId: a } =
|
|
1987
|
+
let { active: i, baseId: a, fill: o } = Z("Panel"), s = i === e;
|
|
1625
1988
|
return /* @__PURE__ */ t("div", {
|
|
1626
1989
|
role: "tabpanel",
|
|
1627
|
-
id:
|
|
1628
|
-
"aria-labelledby":
|
|
1629
|
-
hidden: !
|
|
1630
|
-
tabIndex:
|
|
1631
|
-
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 }),
|
|
1632
1995
|
"data-testid": r,
|
|
1633
|
-
children:
|
|
1996
|
+
children: s ? n : void 0
|
|
1634
1997
|
});
|
|
1635
1998
|
}
|
|
1636
|
-
},
|
|
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 }) => {
|
|
1637
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);
|
|
1638
2001
|
return l(() => {
|
|
1639
2002
|
let e = _?.subscribe(() => {
|
|
@@ -1652,7 +2015,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1652
2015
|
ref: w,
|
|
1653
2016
|
id: b,
|
|
1654
2017
|
name: r,
|
|
1655
|
-
className:
|
|
2018
|
+
className: or(),
|
|
1656
2019
|
required: i,
|
|
1657
2020
|
disabled: s,
|
|
1658
2021
|
defaultValue: c,
|
|
@@ -1679,29 +2042,29 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1679
2042
|
})
|
|
1680
2043
|
]
|
|
1681
2044
|
});
|
|
1682
|
-
},
|
|
2045
|
+
}, cr = y([
|
|
1683
2046
|
"flex flex-col items-center",
|
|
1684
2047
|
"min-h-[var(--cover-height)]",
|
|
1685
2048
|
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
1686
|
-
].join(" ")),
|
|
2049
|
+
].join(" ")), lr = "my-auto max-w-full", ur = ({ children: e, foot: r, testId: i }) => {
|
|
1687
2050
|
let a = r != null && typeof r != "boolean";
|
|
1688
2051
|
return /* @__PURE__ */ n("div", {
|
|
1689
|
-
className:
|
|
2052
|
+
className: cr(),
|
|
1690
2053
|
"data-testid": i,
|
|
1691
2054
|
children: [/* @__PURE__ */ t("div", {
|
|
1692
|
-
className:
|
|
2055
|
+
className: lr,
|
|
1693
2056
|
children: e
|
|
1694
2057
|
}), a && /* @__PURE__ */ t("div", { children: r })]
|
|
1695
2058
|
});
|
|
1696
|
-
},
|
|
2059
|
+
}, dr = class extends Error {
|
|
1697
2060
|
constructor(e) {
|
|
1698
2061
|
super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
|
|
1699
2062
|
}
|
|
1700
|
-
},
|
|
2063
|
+
}, fr = class extends Error {
|
|
1701
2064
|
constructor() {
|
|
1702
2065
|
super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
|
|
1703
2066
|
}
|
|
1704
|
-
},
|
|
2067
|
+
}, pr = y([
|
|
1705
2068
|
"open:flex open:flex-col m-auto p-0 overflow-hidden",
|
|
1706
2069
|
"bg-surface text-foreground",
|
|
1707
2070
|
"rounded-[var(--radius-dialog)] shadow-[var(--elevation-floating)]",
|
|
@@ -1712,25 +2075,31 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1712
2075
|
content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
|
|
1713
2076
|
} },
|
|
1714
2077
|
defaultVariants: { extent: "screen" }
|
|
1715
|
-
}),
|
|
1716
|
-
"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",
|
|
1717
2080
|
"px-[var(--space-region)] py-[var(--space-region)]",
|
|
1718
2081
|
"[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
|
|
1719
|
-
].join(" ")
|
|
2082
|
+
].join(" "), {
|
|
2083
|
+
variants: { scrollOwner: {
|
|
2084
|
+
body: "overflow-y-auto",
|
|
2085
|
+
child: "flex flex-col"
|
|
2086
|
+
} },
|
|
2087
|
+
defaultVariants: { scrollOwner: "body" }
|
|
2088
|
+
}), _r = y([
|
|
1720
2089
|
"flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
|
|
1721
2090
|
"px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
|
|
1722
2091
|
"[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
|
|
1723
|
-
].join(" ")),
|
|
1724
|
-
let t = c(
|
|
1725
|
-
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);
|
|
1726
2095
|
return t;
|
|
1727
|
-
},
|
|
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 }) => {
|
|
1728
2097
|
if (e === void 0 || e.open) return;
|
|
1729
2098
|
let r = document.activeElement;
|
|
1730
|
-
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();
|
|
1731
2100
|
}, $ = (e, { presented: t }) => {
|
|
1732
2101
|
t.current = !1, e?.open && e.close();
|
|
1733
|
-
},
|
|
2102
|
+
}, xr = {
|
|
1734
2103
|
Root: ({ children: e, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: o }) => {
|
|
1735
2104
|
let c = u(), d = p(void 0), f = p(!1), h = p(void 0), [g] = m(() => ({
|
|
1736
2105
|
presented: f,
|
|
@@ -1753,20 +2122,20 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1753
2122
|
n.next(), r === void 0 ? $(d.current, g) : r.next(!1);
|
|
1754
2123
|
};
|
|
1755
2124
|
return l(() => {
|
|
1756
|
-
if (r === void 0) return
|
|
2125
|
+
if (r === void 0) return br(d.current, g), () => $(d.current, g);
|
|
1757
2126
|
let e = r.subscribe((e) => {
|
|
1758
|
-
e ?
|
|
2127
|
+
e ? br(d.current, g) : $(d.current, g);
|
|
1759
2128
|
});
|
|
1760
2129
|
return () => {
|
|
1761
2130
|
e.unsubscribe(), $(d.current, g);
|
|
1762
2131
|
};
|
|
1763
|
-
}, [r, g]), /* @__PURE__ */ t(
|
|
2132
|
+
}, [r, g]), /* @__PURE__ */ t(vr.Provider, {
|
|
1764
2133
|
value: b,
|
|
1765
2134
|
children: /* @__PURE__ */ t("dialog", {
|
|
1766
2135
|
ref: (e) => {
|
|
1767
2136
|
d.current = e ?? void 0, e?.setAttribute("headingreset", "");
|
|
1768
2137
|
},
|
|
1769
|
-
className:
|
|
2138
|
+
className: pr({ extent: i }),
|
|
1770
2139
|
"aria-label": a,
|
|
1771
2140
|
"aria-labelledby": a === void 0 && _.title ? b.titleId : void 0,
|
|
1772
2141
|
"aria-describedby": _.description ? b.descriptionId : void 0,
|
|
@@ -1782,7 +2151,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1782
2151
|
let e = f.current;
|
|
1783
2152
|
f.current = !1;
|
|
1784
2153
|
let t = h.current;
|
|
1785
|
-
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);
|
|
1786
2155
|
},
|
|
1787
2156
|
"data-testid": o,
|
|
1788
2157
|
children: e
|
|
@@ -1791,10 +2160,10 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1791
2160
|
},
|
|
1792
2161
|
Title: ({ children: e, testId: n }) => {
|
|
1793
2162
|
let { titleId: r, isLabelled: i, registerNamePart: a } = Q("Title");
|
|
1794
|
-
if (l(() => a("title"), [a]), i) throw new
|
|
2163
|
+
if (l(() => a("title"), [a]), i) throw new fr();
|
|
1795
2164
|
return /* @__PURE__ */ t("div", {
|
|
1796
2165
|
"data-dialog-member": "title",
|
|
1797
|
-
className:
|
|
2166
|
+
className: mr(),
|
|
1798
2167
|
"data-testid": n,
|
|
1799
2168
|
children: /* @__PURE__ */ t("h1", {
|
|
1800
2169
|
id: r,
|
|
@@ -1807,7 +2176,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1807
2176
|
let { descriptionId: r, registerNamePart: i } = Q("Description");
|
|
1808
2177
|
return l(() => i("description"), [i]), /* @__PURE__ */ t("div", {
|
|
1809
2178
|
"data-dialog-member": "description",
|
|
1810
|
-
className:
|
|
2179
|
+
className: hr(),
|
|
1811
2180
|
"data-testid": n,
|
|
1812
2181
|
children: /* @__PURE__ */ t("p", {
|
|
1813
2182
|
id: r,
|
|
@@ -1816,29 +2185,33 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1816
2185
|
})
|
|
1817
2186
|
});
|
|
1818
2187
|
},
|
|
1819
|
-
Content: ({ children: e,
|
|
2188
|
+
Content: ({ children: e, scrollOwner: n, testId: r }) => (Q("Content"), /* @__PURE__ */ t("div", {
|
|
1820
2189
|
"data-dialog-member": "content",
|
|
1821
|
-
className:
|
|
1822
|
-
"data-testid":
|
|
2190
|
+
className: gr({ scrollOwner: n }),
|
|
2191
|
+
"data-testid": r,
|
|
1823
2192
|
children: e
|
|
1824
2193
|
})),
|
|
1825
2194
|
Actions: ({ children: e, testId: n }) => (Q("Actions"), /* @__PURE__ */ t("div", {
|
|
1826
2195
|
"data-dialog-member": "actions",
|
|
1827
|
-
className:
|
|
2196
|
+
className: _r(),
|
|
1828
2197
|
"data-testid": n,
|
|
1829
2198
|
children: e
|
|
1830
2199
|
}))
|
|
1831
|
-
},
|
|
2200
|
+
}, Sr = y("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
1832
2201
|
variants: { edge: {
|
|
1833
2202
|
none: "",
|
|
1834
2203
|
rule: "border-t border-solid border-rule"
|
|
1835
2204
|
} },
|
|
1836
2205
|
defaultVariants: { edge: "rule" }
|
|
1837
|
-
}),
|
|
1838
|
-
className:
|
|
2206
|
+
}), Cr = ({ edge: e, children: n, testId: r }) => /* @__PURE__ */ t("footer", {
|
|
2207
|
+
className: Sr({ edge: e }),
|
|
1839
2208
|
"data-testid": r,
|
|
1840
2209
|
children: n
|
|
1841
|
-
}),
|
|
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", {
|
|
1842
2215
|
variants: { state: {
|
|
1843
2216
|
idle: "text-muted",
|
|
1844
2217
|
sending: "text-muted",
|
|
@@ -1846,13 +2219,13 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1846
2219
|
failed: "text-error"
|
|
1847
2220
|
} },
|
|
1848
2221
|
defaultVariants: { state: "idle" }
|
|
1849
|
-
}),
|
|
2222
|
+
}), Er = {
|
|
1850
2223
|
sent: "status",
|
|
1851
2224
|
failed: "alert"
|
|
1852
|
-
},
|
|
2225
|
+
}, Dr = ({ action: e, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
1853
2226
|
let l = s != null && typeof s != "boolean";
|
|
1854
|
-
if (i === "sent" && !l) throw
|
|
1855
|
-
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];
|
|
1856
2229
|
return /* @__PURE__ */ n("form", {
|
|
1857
2230
|
action: e,
|
|
1858
2231
|
method: r,
|
|
@@ -1870,12 +2243,12 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1870
2243
|
}),
|
|
1871
2244
|
l && /* @__PURE__ */ t("p", {
|
|
1872
2245
|
role: d,
|
|
1873
|
-
className:
|
|
2246
|
+
className: Tr({ state: i }),
|
|
1874
2247
|
children: s
|
|
1875
2248
|
})
|
|
1876
2249
|
]
|
|
1877
2250
|
});
|
|
1878
|
-
},
|
|
2251
|
+
}, Or = y([
|
|
1879
2252
|
"flex items-baseline",
|
|
1880
2253
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
1881
2254
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -1895,84 +2268,145 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1895
2268
|
edge: "rule",
|
|
1896
2269
|
mode: "navigation"
|
|
1897
2270
|
}
|
|
1898
|
-
}),
|
|
2271
|
+
}), kr = [
|
|
1899
2272
|
"inline-flex shrink-0 items-center",
|
|
1900
2273
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
1901
2274
|
"min-w-[var(--standing-min-width)]"
|
|
1902
|
-
].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 }) => {
|
|
1903
2276
|
let u = c !== void 0 || l !== void 0;
|
|
1904
2277
|
return /* @__PURE__ */ t("header", {
|
|
1905
|
-
className:
|
|
2278
|
+
className: Or({
|
|
1906
2279
|
edge: r,
|
|
1907
2280
|
mode: u ? "statusAction" : "navigation"
|
|
1908
2281
|
}),
|
|
1909
2282
|
"data-testid": i,
|
|
1910
|
-
children: u ? /* @__PURE__ */ n(e, { children: [
|
|
1911
|
-
className:
|
|
2283
|
+
children: u ? /* @__PURE__ */ n(e, { children: [Nr(c) && /* @__PURE__ */ t("div", {
|
|
2284
|
+
className: jr,
|
|
1912
2285
|
children: c
|
|
1913
|
-
}),
|
|
1914
|
-
className:
|
|
2286
|
+
}), Nr(l) && /* @__PURE__ */ t("div", {
|
|
2287
|
+
className: Mr,
|
|
1915
2288
|
children: l
|
|
1916
2289
|
})] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
1917
|
-
className:
|
|
2290
|
+
className: kr,
|
|
1918
2291
|
children: a
|
|
1919
2292
|
}), /* @__PURE__ */ t("nav", {
|
|
1920
2293
|
"aria-label": o,
|
|
1921
|
-
className:
|
|
2294
|
+
className: Ar,
|
|
1922
2295
|
children: s
|
|
1923
2296
|
})] })
|
|
1924
2297
|
});
|
|
1925
|
-
},
|
|
2298
|
+
}, Fr = y("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
1926
2299
|
variants: { place: {
|
|
1927
2300
|
start: "justify-start",
|
|
1928
2301
|
center: "justify-center",
|
|
1929
2302
|
between: "justify-between"
|
|
1930
2303
|
} },
|
|
1931
2304
|
defaultVariants: { place: "center" }
|
|
1932
|
-
}),
|
|
1933
|
-
className:
|
|
2305
|
+
}), Ir = ({ place: e, children: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2306
|
+
className: Fr({ place: e }),
|
|
1934
2307
|
"data-testid": r,
|
|
1935
2308
|
children: n
|
|
1936
|
-
}),
|
|
1937
|
-
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(),
|
|
1938
2311
|
"data-testid": a,
|
|
1939
2312
|
children: [
|
|
1940
2313
|
/* @__PURE__ */ t("h1", {
|
|
1941
|
-
className:
|
|
2314
|
+
className: Rr(),
|
|
1942
2315
|
children: e
|
|
1943
2316
|
}),
|
|
1944
2317
|
r !== void 0 && /* @__PURE__ */ t("p", {
|
|
1945
|
-
className:
|
|
2318
|
+
className: zr(),
|
|
1946
2319
|
children: r
|
|
1947
2320
|
}),
|
|
1948
2321
|
i !== void 0 && /* @__PURE__ */ t("p", {
|
|
1949
|
-
className:
|
|
2322
|
+
className: Br(),
|
|
1950
2323
|
children: i
|
|
1951
2324
|
})
|
|
1952
2325
|
]
|
|
1953
|
-
}),
|
|
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)]", {
|
|
1954
2388
|
variants: { axis: {
|
|
1955
2389
|
both: "overflow-auto",
|
|
1956
2390
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
1957
2391
|
vertical: "overflow-y-auto overflow-x-hidden"
|
|
1958
2392
|
} },
|
|
1959
2393
|
defaultVariants: { axis: "both" }
|
|
1960
|
-
}),
|
|
2394
|
+
}), Jr = y("p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]", {
|
|
1961
2395
|
variants: { axis: {
|
|
1962
2396
|
both: "w-fit min-w-full",
|
|
1963
2397
|
horizontal: "w-fit min-w-full",
|
|
1964
2398
|
vertical: "w-full"
|
|
1965
2399
|
} },
|
|
1966
2400
|
defaultVariants: { axis: "both" }
|
|
1967
|
-
}),
|
|
2401
|
+
}), Yr = (e, t) => {
|
|
1968
2402
|
let n = e.scrollWidth > e.clientWidth, r = e.scrollHeight > e.clientHeight;
|
|
1969
2403
|
return t !== "vertical" && n || t !== "horizontal" && r;
|
|
1970
|
-
},
|
|
2404
|
+
}, Xr = (e, t, n) => {
|
|
1971
2405
|
let [r, i] = m(!0);
|
|
1972
2406
|
return d(() => {
|
|
1973
2407
|
let r = e.current;
|
|
1974
2408
|
if (r === null) return;
|
|
1975
|
-
let a = () => i(
|
|
2409
|
+
let a = () => i(Yr(r, n) || r === document.activeElement);
|
|
1976
2410
|
a();
|
|
1977
2411
|
let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
|
|
1978
2412
|
return o?.observe(r), t.current !== null && o?.observe(t.current), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
|
|
@@ -1983,22 +2417,22 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
1983
2417
|
t,
|
|
1984
2418
|
n
|
|
1985
2419
|
]), r;
|
|
1986
|
-
},
|
|
1987
|
-
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");
|
|
1988
2422
|
return /* @__PURE__ */ t("div", {
|
|
1989
2423
|
ref: a,
|
|
1990
|
-
className:
|
|
2424
|
+
className: qr({ axis: e }),
|
|
1991
2425
|
"data-testid": i,
|
|
1992
2426
|
role: s ? "group" : void 0,
|
|
1993
2427
|
"aria-label": s ? n : void 0,
|
|
1994
2428
|
tabIndex: s ? 0 : void 0,
|
|
1995
2429
|
children: /* @__PURE__ */ t("div", {
|
|
1996
2430
|
ref: o,
|
|
1997
|
-
className:
|
|
2431
|
+
className: Jr({ axis: e }),
|
|
1998
2432
|
children: r
|
|
1999
2433
|
})
|
|
2000
2434
|
});
|
|
2001
|
-
},
|
|
2435
|
+
}, Qr = y([
|
|
2002
2436
|
"relative",
|
|
2003
2437
|
"py-[var(--space-band)]",
|
|
2004
2438
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -2008,26 +2442,77 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2008
2442
|
full: ""
|
|
2009
2443
|
} },
|
|
2010
2444
|
defaultVariants: { bleed: "inset" }
|
|
2011
|
-
}),
|
|
2445
|
+
}), $r = ({ bleed: e, name: n, children: r, testId: i }) => /* @__PURE__ */ t("section", {
|
|
2012
2446
|
"data-section": "",
|
|
2013
|
-
className:
|
|
2447
|
+
className: Qr({ bleed: e }),
|
|
2014
2448
|
"aria-label": n,
|
|
2015
2449
|
"data-testid": i,
|
|
2016
2450
|
children: r
|
|
2017
|
-
}),
|
|
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([
|
|
2018
2494
|
"grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
|
|
2019
2495
|
"[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
|
|
2020
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)]",
|
|
2021
|
-
"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",
|
|
2022
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))]",
|
|
2023
2499
|
"[&>div:first-child>nav>ul]:flex [&>div:first-child>nav>ul]:flex-col [&>div:first-child>nav>ul]:gap-[var(--space-stack)]"
|
|
2024
|
-
].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) => {
|
|
2025
2507
|
if (!e) return;
|
|
2026
2508
|
let t = [];
|
|
2027
2509
|
for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
|
|
2028
2510
|
let n = () => {
|
|
2029
2511
|
let n = t.find((e) => /^(auto|scroll|hidden|overlay)$/.test(getComputedStyle(e).overflowY));
|
|
2030
|
-
|
|
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");
|
|
2031
2516
|
};
|
|
2032
2517
|
n();
|
|
2033
2518
|
let r = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(n);
|
|
@@ -2035,7 +2520,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2035
2520
|
return window.addEventListener("resize", n), () => {
|
|
2036
2521
|
r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
|
|
2037
2522
|
};
|
|
2038
|
-
},
|
|
2523
|
+
}, oi = y([
|
|
2039
2524
|
"w-full text-left font-secondary text-label tracking-label wrap-anywhere",
|
|
2040
2525
|
"underline-offset-[var(--underline-offset)]",
|
|
2041
2526
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
@@ -2046,11 +2531,11 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2046
2531
|
inert: "text-muted cursor-not-allowed"
|
|
2047
2532
|
} },
|
|
2048
2533
|
defaultVariants: { state: "usable" }
|
|
2049
|
-
}),
|
|
2050
|
-
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;
|
|
2051
2536
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", {
|
|
2052
2537
|
type: "button",
|
|
2053
|
-
className:
|
|
2538
|
+
className: oi({ state: r ? "inert" : o ? "active" : "usable" }),
|
|
2054
2539
|
disabled: r,
|
|
2055
2540
|
"aria-current": o ? "true" : void 0,
|
|
2056
2541
|
"data-testid": i,
|
|
@@ -2059,32 +2544,34 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2059
2544
|
},
|
|
2060
2545
|
children: n
|
|
2061
2546
|
}) });
|
|
2062
|
-
},
|
|
2547
|
+
}, li = ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2063
2548
|
"data-testid": n,
|
|
2064
2549
|
children: e
|
|
2065
|
-
}),
|
|
2066
|
-
Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c }) => {
|
|
2067
|
-
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);
|
|
2068
2553
|
return /* @__PURE__ */ n("div", {
|
|
2069
|
-
className:
|
|
2554
|
+
className: ii({ fill: l }),
|
|
2070
2555
|
"data-testid": c,
|
|
2071
2556
|
children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("nav", {
|
|
2072
|
-
ref:
|
|
2557
|
+
ref: l ? void 0 : ai,
|
|
2073
2558
|
"aria-label": i,
|
|
2074
|
-
children: /* @__PURE__ */ t(
|
|
2559
|
+
children: /* @__PURE__ */ t(si, {
|
|
2075
2560
|
value: {
|
|
2076
2561
|
active: e,
|
|
2077
2562
|
onSelect$: a
|
|
2078
2563
|
},
|
|
2079
|
-
children: /* @__PURE__ */ t("ul", { children:
|
|
2564
|
+
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type === ci) })
|
|
2080
2565
|
})
|
|
2081
|
-
}) }),
|
|
2566
|
+
}) }), u.filter((e) => e.type === li)]
|
|
2082
2567
|
});
|
|
2083
2568
|
},
|
|
2084
|
-
Item:
|
|
2085
|
-
Content:
|
|
2086
|
-
},
|
|
2569
|
+
Item: ci,
|
|
2570
|
+
Content: li
|
|
2571
|
+
}, di = {
|
|
2087
2572
|
surface: "#ffffff",
|
|
2573
|
+
selectedSurface: "#f8fafc",
|
|
2574
|
+
selectedError: "#cd2d7d",
|
|
2088
2575
|
foreground: "#0f172a",
|
|
2089
2576
|
muted: "#64748b",
|
|
2090
2577
|
border: "#e2e8f0",
|
|
@@ -2110,15 +2597,17 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2110
2597
|
errorHover: "#be185d",
|
|
2111
2598
|
errorForeground: "#ffffff",
|
|
2112
2599
|
info: "#0e7490"
|
|
2113
|
-
},
|
|
2600
|
+
}, fi = {
|
|
2114
2601
|
surface: "#0f172a",
|
|
2602
|
+
selectedSurface: "#151e30",
|
|
2603
|
+
selectedError: "#f48fb1",
|
|
2115
2604
|
foreground: "#f8fafc",
|
|
2116
2605
|
muted: "#94a3b8",
|
|
2117
2606
|
border: "#334155",
|
|
2118
2607
|
controlBorder: "#94a3b8",
|
|
2119
2608
|
rule: "#5b6a80",
|
|
2120
2609
|
backing: "#1e293b",
|
|
2121
|
-
scrim: "rgb(
|
|
2610
|
+
scrim: "rgb(0 0 0 / 0.6)",
|
|
2122
2611
|
meterFill: "#f8fafc",
|
|
2123
2612
|
meterTrack: "#334155",
|
|
2124
2613
|
primary: "#8b5cf6",
|
|
@@ -2128,7 +2617,7 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2128
2617
|
secondaryHover: "#38bdf8",
|
|
2129
2618
|
secondaryForeground: "#020617",
|
|
2130
2619
|
disabled: "#475569",
|
|
2131
|
-
disabledHover: "#
|
|
2620
|
+
disabledHover: "#64748b",
|
|
2132
2621
|
focusRing: "#cbd5e1",
|
|
2133
2622
|
link: "#60a5fa",
|
|
2134
2623
|
success: "#34d399",
|
|
@@ -2139,4 +2628,4 @@ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e
|
|
|
2139
2628
|
info: "#22d3ee"
|
|
2140
2629
|
};
|
|
2141
2630
|
//#endregion
|
|
2142
|
-
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 };
|