@juwel-development/design-system 3.9.1 → 3.11.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.
Files changed (79) hide show
  1. package/README.md +9 -298
  2. package/dist/design-system.js +1070 -605
  3. package/dist/index.css +1 -1
  4. package/dist/types/Arrangement/ColumnLayout/ColumnLayout.d.ts +92 -0
  5. package/dist/types/Arrangement/ColumnLayout/ColumnLayoutCompositionError.d.ts +3 -0
  6. package/dist/types/Arrangement/ColumnLayout/ColumnLayoutConfigurationError.d.ts +3 -0
  7. package/dist/types/Arrangement/FieldRow/FieldRow.d.ts +87 -0
  8. package/dist/types/Arrangement/FieldRow/FieldRowCompositionError.d.ts +3 -0
  9. package/dist/types/Arrangement/FieldRow/FieldRowConfigurationError.d.ts +3 -0
  10. package/dist/types/Arrangement/FieldRow/IControlEdge.d.ts +6 -0
  11. package/dist/types/Arrangement/FieldRow/alignControlEdges.d.ts +7 -0
  12. package/dist/types/Display/Box/Box.d.ts +41 -0
  13. package/dist/types/Display/Brandmark/Brandmark.d.ts +1 -1
  14. package/dist/types/Display/DefinitionList/DefinitionList.d.ts +59 -9
  15. package/dist/types/Display/DefinitionList/DefinitionListConfigurationError.d.ts +3 -0
  16. package/dist/types/Display/Figure/Figure.d.ts +2 -2
  17. package/dist/types/Display/Icon/Icon.d.ts +45 -0
  18. package/dist/types/Display/Table/Table.d.ts +118 -8
  19. package/dist/types/Display/Table/TableConfigurationError.d.ts +3 -0
  20. package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +1 -1
  21. package/dist/types/Display/Typography/H1/H1.d.ts +3 -2
  22. package/dist/types/Display/Typography/H2/H2.d.ts +3 -2
  23. package/dist/types/Display/Typography/H3/H3.d.ts +3 -2
  24. package/dist/types/Display/Typography/H4/H4.d.ts +3 -2
  25. package/dist/types/Display/Typography/H5/H5.d.ts +3 -2
  26. package/dist/types/Display/Typography/H6/H6.d.ts +3 -2
  27. package/dist/types/Display/Typography/Note/Note.d.ts +1 -1
  28. package/dist/types/Display/Typography/P/P.d.ts +3 -2
  29. package/dist/types/Display/Typography/Prose/Prose.d.ts +1 -1
  30. package/dist/types/Interaction/Button/Button.d.ts +25 -3
  31. package/dist/types/Interaction/Tabs/Tabs.d.ts +31 -6
  32. package/dist/types/Layout/Header/Header.d.ts +67 -8
  33. package/dist/types/Layout/ScrollContainer/ScrollContainer.d.ts +37 -0
  34. package/dist/types/Layout/Section/Section.d.ts +1 -1
  35. package/dist/types/Layout/Sidebar/Sidebar.d.ts +4 -0
  36. package/dist/types/Theme/Palette.d.ts +31 -7
  37. package/dist/types/index.d.ts +6 -0
  38. package/package.json +1 -1
  39. package/src/Arrangement/ColumnLayout/ColumnLayout.tsx +249 -0
  40. package/src/Arrangement/ColumnLayout/ColumnLayoutCompositionError.ts +8 -0
  41. package/src/Arrangement/ColumnLayout/ColumnLayoutConfigurationError.ts +6 -0
  42. package/src/Arrangement/FieldRow/FieldRow.tsx +313 -0
  43. package/src/Arrangement/FieldRow/FieldRowCompositionError.ts +6 -0
  44. package/src/Arrangement/FieldRow/FieldRowConfigurationError.ts +6 -0
  45. package/src/Arrangement/FieldRow/IControlEdge.ts +6 -0
  46. package/src/Arrangement/FieldRow/alignControlEdges.ts +35 -0
  47. package/src/Display/Box/Box.tsx +77 -0
  48. package/src/Display/Checklist/Checklist.tsx +1 -1
  49. package/src/Display/DefinitionList/DefinitionList.tsx +164 -22
  50. package/src/Display/DefinitionList/DefinitionListConfigurationError.ts +6 -0
  51. package/src/Display/Icon/Icon.tsx +113 -0
  52. package/src/Display/Table/Table.tsx +434 -44
  53. package/src/Display/Table/TableConfigurationError.ts +6 -0
  54. package/src/Display/Typography/H1/H1.tsx +3 -2
  55. package/src/Display/Typography/H2/H2.tsx +3 -2
  56. package/src/Display/Typography/H3/H3.tsx +3 -2
  57. package/src/Display/Typography/H4/H4.tsx +3 -2
  58. package/src/Display/Typography/H5/H5.tsx +3 -2
  59. package/src/Display/Typography/H6/H6.tsx +3 -2
  60. package/src/Display/Typography/P/P.tsx +3 -2
  61. package/src/Display/Typography/Prose/Prose.tsx +3 -3
  62. package/src/Interaction/Button/Button.tsx +47 -17
  63. package/src/Interaction/Input/Input.tsx +1 -1
  64. package/src/Interaction/MultiSelect/MultiSelect.tsx +1 -1
  65. package/src/Interaction/NumberInput/NumberInput.tsx +1 -1
  66. package/src/Interaction/Select/Select.tsx +1 -1
  67. package/src/Interaction/Tabs/Tabs.tsx +38 -11
  68. package/src/Interaction/TextArea/TextArea.tsx +1 -1
  69. package/src/Layout/Dialog/Dialog.tsx +4 -3
  70. package/src/Layout/Header/Header.tsx +139 -39
  71. package/src/Layout/PageHead/PageHead.tsx +6 -5
  72. package/src/Layout/ScrollContainer/ScrollContainer.tsx +149 -0
  73. package/src/Layout/Sidebar/Sidebar.tsx +8 -4
  74. package/src/Theme/Palette.ts +37 -9
  75. package/src/Theme/renderTokens.ts +101 -5
  76. package/src/index.ts +6 -0
  77. package/src/tokens.css +68 -4
  78. package/src/tokens.dark.css +66 -4
  79. package/src/tokens.light.css +64 -2
@@ -1,35 +1,35 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { Children as n, Fragment as r, createContext as i, isValidElement as a, useCallback as o, useContext as s, useEffect as c, useId as l, useLayoutEffect as u, useReducer as d, useRef as f, useState as p } from "react";
1
+ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ 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
3
  import './index.css';//#region node_modules/clsx/dist/clsx.mjs
4
- function m(e) {
4
+ function h(e) {
5
5
  var t, n, r = "";
6
6
  if (typeof e == "string" || typeof e == "number") r += e;
7
7
  else if (typeof e == "object") {
8
8
  if (Array.isArray(e)) {
9
9
  var i = e.length;
10
- for (t = 0; t < i; t++) e[t] && (n = m(e[t])) && (r && (r += " "), r += n);
10
+ for (t = 0; t < i; t++) e[t] && (n = h(e[t])) && (r && (r += " "), r += n);
11
11
  } else for (n in e) e[n] && (r && (r += " "), r += n);
12
12
  }
13
13
  return r;
14
14
  }
15
- function h() {
16
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = m(e)) && (r && (r += " "), r += t);
15
+ function g() {
16
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = h(e)) && (r && (r += " "), r += t);
17
17
  return r;
18
18
  }
19
19
  //#endregion
20
20
  //#region node_modules/class-variance-authority/dist/index.mjs
21
- var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e, t) => (n) => {
22
- if (t?.variants == null) return _(e, n?.class, n?.className);
21
+ var _ = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, v = g, y = (e, t) => (n) => {
22
+ if (t?.variants == null) return v(e, n?.class, n?.className);
23
23
  let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
24
24
  let t = n?.[e], a = i?.[e];
25
25
  if (t === null) return null;
26
- let o = g(t) || g(a);
26
+ let o = _(t) || _(a);
27
27
  return r[e][o];
28
28
  }), o = n && Object.entries(n).reduce((e, t) => {
29
29
  let [n, r] = t;
30
30
  return r === void 0 || (e[n] = r), e;
31
31
  }, {});
32
- return _(e, a, t?.compoundVariants?.reduce((e, t) => {
32
+ return v(e, a, t?.compoundVariants?.reduce((e, t) => {
33
33
  let { class: n, className: r, ...a } = t;
34
34
  return Object.entries(a).every((e) => {
35
35
  let [t, n] = e;
@@ -46,7 +46,7 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
46
46
  r
47
47
  ] : e;
48
48
  }, []), n?.class, n?.className);
49
- }, y = v("flex flex-wrap items-baseline gap-y-[var(--space-stack)]", {
49
+ }, b = y("flex flex-wrap items-baseline gap-y-[var(--space-stack)]", {
50
50
  variants: {
51
51
  gap: {
52
52
  stack: "gap-x-[var(--space-stack)]",
@@ -61,14 +61,179 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
61
61
  gap: "region",
62
62
  justify: "start"
63
63
  }
64
- }), b = ({ gap: t, justify: n, children: r, testId: i }) => /* @__PURE__ */ e("div", {
65
- className: y({
66
- gap: t,
64
+ }), x = ({ gap: e, justify: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
65
+ className: b({
66
+ gap: e,
67
67
  justify: n
68
68
  }),
69
69
  "data-testid": i,
70
70
  children: r
71
- }), x = v("flex", {
71
+ }), S = class extends Error {
72
+ constructor() {
73
+ super("ColumnLayout.Column must be a direct child of ColumnLayout.Root (arrays and fragments are fine; a wrapping component or a nested Column is not)"), this.name = "ColumnLayoutCompositionError";
74
+ }
75
+ }, C = class extends Error {
76
+ constructor(e) {
77
+ super(`ColumnLayout configuration is invalid: ${e}`), this.name = "ColumnLayoutConfigurationError";
78
+ }
79
+ }, w = y("flex flex-wrap items-start", {
80
+ variants: { gap: {
81
+ stack: "gap-[var(--space-stack)] [--column-layout-gap:var(--space-stack)]",
82
+ region: "gap-[var(--space-region)] [--column-layout-gap:var(--space-region)]"
83
+ } },
84
+ defaultVariants: { gap: "region" }
85
+ }), T = y("min-w-0 grow-[var(--column-layout-weight)] basis-[clamp(0px,(var(--column-layout-threshold)-100%)*1000000,100%)]"), E = a(!1), D = /^--[A-Za-z0-9_-]+$/, ee = (e, t) => {
86
+ let { weight: n, minWidth: r } = e.props;
87
+ if (!Number.isFinite(n) || n <= 0) throw new C(`column ${t + 1} needs a positive finite weight (got ${n})`);
88
+ if (!D.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)})`);
89
+ return {
90
+ weight: n,
91
+ minWidth: r
92
+ };
93
+ }, O = (e) => {
94
+ let t = e.reduce((e, t) => e + t.weight, 0), n = e.map((e) => `var(${e.minWidth}) * ${t / e.weight}`);
95
+ return `calc(${e.length - 1} * var(--column-layout-gap) + max(${n.join(", ")}))`;
96
+ }, k = (e) => o(e) && e.type === i, te = (e) => o(e) && e.type === M, A = (e) => r.toArray(e).flatMap((e) => k(e) ? A(e.props.children) : te(e) ? [e] : []), j = (e) => r.map(e, (e) => k(e) ? /* @__PURE__ */ t(i, { children: j(e.props.children) }) : te(e) ? /* @__PURE__ */ t(E.Provider, {
97
+ value: !0,
98
+ children: e
99
+ }) : e), ne = ({ gap: e, children: n, testId: r }) => {
100
+ let i = A(n).map(ee), a = i.length === 0 ? void 0 : { "--column-layout-threshold": O(i) };
101
+ return /* @__PURE__ */ t("div", {
102
+ className: w({ gap: e }),
103
+ style: a,
104
+ "data-testid": r,
105
+ children: j(n)
106
+ });
107
+ }, M = ({ weight: e, children: n, testId: r }) => {
108
+ if (!c(E)) throw new S();
109
+ let i = { "--column-layout-weight": e };
110
+ return /* @__PURE__ */ t("div", {
111
+ className: T(),
112
+ style: i,
113
+ "data-testid": r,
114
+ children: /* @__PURE__ */ t(E.Provider, {
115
+ value: !1,
116
+ children: n
117
+ })
118
+ });
119
+ }, N = {
120
+ Root: ne,
121
+ Column: M
122
+ }, P = .5, F = (e, t) => Math.abs(e - t) <= P, I = (e) => {
123
+ let t = [];
124
+ for (let { top: n } of e) t.some((e) => F(e, n)) || t.push(n);
125
+ let n = t.map((t) => Math.max(...e.filter((e) => F(t, e.top)).map((e) => e.controlEdge)));
126
+ return e.map(({ top: e, controlEdge: r }) => {
127
+ let i = t.findIndex((t) => F(t, e));
128
+ return (n[i] ?? r) - r;
129
+ });
130
+ }, L = class extends Error {
131
+ constructor(e) {
132
+ super(`FieldRow.${e} must be composed inside FieldRow.Root`), this.name = "FieldRowCompositionError";
133
+ }
134
+ }, R = class extends Error {
135
+ constructor(e) {
136
+ super(`FieldRow configuration: ${e}`), this.name = "FieldRowConfigurationError";
137
+ }
138
+ }, z = y("flex flex-wrap items-start gap-y-[var(--space-stack)]", {
139
+ variants: { gap: {
140
+ stack: "gap-x-[var(--space-stack)]",
141
+ region: "gap-x-[var(--space-region)]"
142
+ } },
143
+ defaultVariants: { gap: "stack" }
144
+ }), re = y("shrink basis-0"), B = y("", {
145
+ variants: { part: {
146
+ item: "min-w-0 max-w-full flex-none",
147
+ group: "flex flex-wrap items-end gap-[var(--space-stack)]"
148
+ } },
149
+ defaultVariants: { part: "item" }
150
+ }), V = /^--[A-Za-z0-9_-]+$/, H = ":scope > [data-field-row-item]", U = a(void 0), W = (e) => {
151
+ let t = c(U);
152
+ if (t === void 0) throw new L(e);
153
+ return t;
154
+ }, ie = (e) => {
155
+ if (!(Number.isFinite(e) && e > 0)) throw new R(`weight must be a positive finite number, got ${e}`);
156
+ }, ae = (e) => {
157
+ if (!V.test(e)) throw new R(`minWidth must name a CSS custom property such as --search-field-min-width, got ${JSON.stringify(e)}`);
158
+ }, oe = (e) => {
159
+ let t = e.querySelector("label[for]")?.getAttribute("for");
160
+ if (!t) return;
161
+ let n = e.ownerDocument.getElementById(t);
162
+ return n !== null && e.contains(n) ? n : void 0;
163
+ }, se = (e) => getComputedStyle(e).position !== "static", ce = (e, t) => {
164
+ if (getComputedStyle(e).position !== "absolute") return e;
165
+ let n = e.parentElement;
166
+ for (; n !== null && n !== t && !se(n);) n = n.parentElement;
167
+ return n ?? e;
168
+ }, le = (e) => {
169
+ let t = e.getBoundingClientRect().top, n = e.firstElementChild;
170
+ if (n === null) return {
171
+ top: t,
172
+ controlEdge: 0
173
+ };
174
+ let r = n.getBoundingClientRect(), i = oe(n);
175
+ return {
176
+ top: t,
177
+ controlEdge: (i === void 0 ? r.bottom : ce(i, n).getBoundingClientRect().bottom) - r.top
178
+ };
179
+ }, G = (e) => {
180
+ let t = Array.from(e.querySelectorAll(H)), n = I(t.map(le));
181
+ t.forEach((e, t) => {
182
+ let r = n[t] ?? 0, i = Number.parseFloat(e.style.paddingTop) || 0;
183
+ Math.abs(i - r) > .01 && (e.style.paddingTop = r === 0 ? "" : `${r}px`);
184
+ });
185
+ }, ue = {
186
+ Root: ({ gap: e, children: n, testId: r }) => {
187
+ let i = p(null), a = p(void 0), o = p(/* @__PURE__ */ new WeakSet()), s = () => {
188
+ i.current && G(i.current);
189
+ }, c = (e) => {
190
+ e && a.current && !o.current.has(e) && (o.current.add(e), a.current.observe(e));
191
+ };
192
+ return d(() => {
193
+ let e = i.current;
194
+ if (e !== null && (G(e), !(typeof ResizeObserver > "u"))) {
195
+ a.current ??= new ResizeObserver(() => G(e));
196
+ for (let t of e.querySelectorAll(H)) {
197
+ let e = t.firstElementChild ?? void 0;
198
+ c(e), c(e?.querySelector("label[for]") ?? void 0);
199
+ }
200
+ }
201
+ }), d(() => () => a.current?.disconnect(), []), /* @__PURE__ */ t("div", {
202
+ ref: i,
203
+ className: z({ gap: e }),
204
+ "data-testid": r,
205
+ children: /* @__PURE__ */ t(U, {
206
+ value: { align: s },
207
+ children: n
208
+ })
209
+ });
210
+ },
211
+ Field: ({ children: e, weight: n = 1, minWidth: r, testId: i }) => {
212
+ let { align: a } = W("Field");
213
+ return ie(n), ae(r), d(() => a()), /* @__PURE__ */ t("div", {
214
+ "data-field-row-item": !0,
215
+ className: re(),
216
+ "data-testid": i,
217
+ style: {
218
+ flexGrow: n,
219
+ minWidth: `min(var(${r}), 100%)`
220
+ },
221
+ children: /* @__PURE__ */ t("div", { children: e })
222
+ });
223
+ },
224
+ Actions: ({ children: e, testId: n }) => {
225
+ let { align: r } = W("Actions");
226
+ return d(() => r()), /* @__PURE__ */ t("div", {
227
+ "data-field-row-item": !0,
228
+ className: B(),
229
+ "data-testid": n,
230
+ children: /* @__PURE__ */ t("div", {
231
+ className: B({ part: "group" }),
232
+ children: e
233
+ })
234
+ });
235
+ }
236
+ }, de = y("flex", {
72
237
  variants: {
73
238
  gap: {
74
239
  stack: "gap-[var(--space-stack)]",
@@ -93,82 +258,126 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
93
258
  measure: !1,
94
259
  direction: "column"
95
260
  }
96
- }), S = ({ gap: t, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ e("div", {
97
- className: x({
98
- gap: t,
261
+ }), fe = ({ gap: e, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ t("div", {
262
+ className: de({
263
+ gap: e,
99
264
  measure: n,
100
265
  direction: r,
101
266
  align: i
102
267
  }),
103
268
  "data-testid": o,
104
269
  children: a
105
- }), C = v("inline-flex", { variants: { cut: {
270
+ }), pe = y(["min-w-0 border border-solid border-border bg-surface text-foreground", "p-[var(--space-box-inset)] [overflow-wrap:anywhere]"].join(" ")), me = ({ children: e, name: n, testId: r }) => n === void 0 || n === "" ? /* @__PURE__ */ t("div", {
271
+ className: pe(),
272
+ "data-testid": r,
273
+ children: e
274
+ }) : /* @__PURE__ */ t("div", {
275
+ className: pe(),
276
+ role: "group",
277
+ "aria-label": n,
278
+ "data-testid": r,
279
+ children: e
280
+ }), he = y("inline-flex", { variants: { cut: {
106
281
  full: "",
107
282
  compact: ""
108
- } } }), w = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
283
+ } } }), ge = ({ name: e, cut: n, children: r, testId: i }) => e === "" ? /* @__PURE__ */ t("span", {
109
284
  "aria-hidden": "true",
110
285
  "data-cut": n,
111
- className: C({ cut: n }),
286
+ className: he({ cut: n }),
112
287
  "data-testid": i,
113
288
  children: r
114
- }) : /* @__PURE__ */ e("span", {
289
+ }) : /* @__PURE__ */ t("span", {
115
290
  role: "img",
116
- "aria-label": t,
291
+ "aria-label": e,
117
292
  "data-cut": n,
118
- className: C({ cut: n }),
293
+ className: he({ cut: n }),
119
294
  "data-testid": i,
120
295
  children: r
121
- }), T = v("m-0 list-none p-0"), ee = v([
122
- "flex items-start gap-3 font-primary text-body leading-body text-foreground",
296
+ }), _e = y("m-0 list-none p-0"), ve = y([
297
+ "flex items-start gap-3 font-body text-body leading-body text-foreground",
123
298
  "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-['']",
124
299
  "[&: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)]"
125
- ].join(" ")), E = {
126
- Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
127
- className: T(),
300
+ ].join(" ")), ye = {
301
+ Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
302
+ className: _e(),
128
303
  role: "list",
129
304
  "data-testid": n,
130
- children: t
305
+ children: e
131
306
  }),
132
- Item: ({ children: t }) => /* @__PURE__ */ e("li", {
133
- className: ee(),
134
- children: t
307
+ Item: ({ children: e }) => /* @__PURE__ */ t("li", {
308
+ className: ve(),
309
+ children: e
135
310
  })
136
- }, te = v("m-0 list-none p-0"), D = v("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), O = {
137
- Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
138
- className: te(),
311
+ }, be = y("m-0 list-none p-0"), xe = y("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), Se = {
312
+ Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
313
+ className: be(),
139
314
  role: "list",
140
315
  "data-testid": n,
141
- children: t
316
+ children: e
142
317
  }),
143
- Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("li", {
144
- className: D(),
318
+ Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("li", {
319
+ className: xe(),
145
320
  "data-testid": n,
146
- children: t
321
+ children: e
147
322
  })
148
- }, ne = v([
149
- "grid gap-[var(--space-stack)] py-6",
150
- "border-b border-solid border-border first:border-t",
151
- "lg:grid-cols-[16rem_minmax(0,1fr)] lg:items-baseline lg:gap-x-12",
152
- "lg:[&>dt]:col-start-1 lg:[&>dd]:col-start-2 lg:[&>dd]:row-start-1"
153
- ].join(" ")), re = v("font-primary text-subtitle leading-subtitle text-foreground"), ie = v("font-primary text-body leading-body text-muted max-w-[var(--measure)]"), ae = {
154
- Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("dl", {
155
- "data-testid": n,
156
- children: t
157
- }),
158
- Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
159
- className: ne(),
323
+ }, Ce = class extends Error {
324
+ constructor(e) {
325
+ super(`DefinitionList configuration is invalid: ${e}`), this.name = "DefinitionListConfigurationError";
326
+ }
327
+ }, we = y("@container", {
328
+ variants: { density: {
329
+ comfortable: "[&>div]:py-[var(--space-definition-item)]",
330
+ compact: "[&>div]:py-[var(--space-definition-item-compact)]"
331
+ } },
332
+ defaultVariants: { density: "comfortable" }
333
+ }), Te = y([
334
+ "grid grid-flow-row-dense gap-[var(--space-stack)] border-b border-solid border-border first:border-t",
335
+ "[--definition-stack:clamp(0px,(var(--definition-threshold)-100%)*1000000,100%)]",
336
+ "[--definition-shortfall:clamp(0px,(var(--definition-threshold)-100cqi)*1000000,1px)]",
337
+ "grid-cols-[max(calc((100%-var(--space-definition-column))*var(--definition-term-share)),var(--definition-stack))_minmax(0,1fr)]",
338
+ "gap-x-[max(0px,var(--space-definition-column)-var(--definition-stack))]",
339
+ "[&>dt]:col-start-1 [&>dt]:self-baseline [&>dd]:col-span-full [&>dd]:self-baseline",
340
+ "[&>dd]:col-start-[calc(2-tan(atan2(var(--definition-shortfall),1px)))]"
341
+ ].join(" ")), Ee = y("font-body text-subtitle leading-subtitle text-foreground wrap-break-word"), De = y("font-body text-body leading-body text-muted max-w-[var(--measure)] wrap-break-word"), Oe = {
342
+ weight: 1,
343
+ minWidth: "--definition-term-min-width"
344
+ }, ke = {
345
+ weight: 2,
346
+ minWidth: "--definition-description-min-width"
347
+ }, Ae = /^--[A-Za-z0-9_-]+$/, je = (e, t) => {
348
+ if (!Number.isFinite(t.weight) || t.weight <= 0) throw new Ce(`${e} needs a positive finite weight (got ${t.weight})`);
349
+ if (!Ae.test(t.minWidth)) throw new Ce(`${e} needs a custom-property name such as --summary-term-min-width for minWidth (got ${JSON.stringify(t.minWidth)})`);
350
+ return t;
351
+ }, Me = (e, t) => {
352
+ let n = e.weight + t.weight;
353
+ return `calc(var(--space-definition-column) + max(var(${e.minWidth}) * ${n / e.weight}, var(${t.minWidth}) * ${n / t.weight}))`;
354
+ }, Ne = {
355
+ Root: ({ density: e, termColumn: n = Oe, descriptionColumn: r = ke, children: i, testId: a }) => {
356
+ let o = je("termColumn", n), s = je("descriptionColumn", r), c = {
357
+ "--definition-threshold": Me(o, s),
358
+ "--definition-term-share": `calc(${o.weight} / ${o.weight + s.weight})`
359
+ };
360
+ return /* @__PURE__ */ t("dl", {
361
+ className: we({ density: e }),
362
+ style: c,
363
+ "data-testid": a,
364
+ children: i
365
+ });
366
+ },
367
+ Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
368
+ className: Te(),
160
369
  "data-testid": n,
161
- children: t
370
+ children: e
162
371
  }),
163
- Term: ({ children: t }) => /* @__PURE__ */ e("dt", {
164
- className: re(),
165
- children: t
372
+ Term: ({ children: e }) => /* @__PURE__ */ t("dt", {
373
+ className: Ee(),
374
+ children: e
166
375
  }),
167
- Description: ({ children: t }) => /* @__PURE__ */ e("dd", {
168
- className: ie(),
169
- children: t
376
+ Description: ({ children: e }) => /* @__PURE__ */ t("dd", {
377
+ className: De(),
378
+ children: e
170
379
  })
171
- }, k = v("block w-full object-cover bg-backing", {
380
+ }, Pe = y("block w-full object-cover bg-backing", {
172
381
  variants: {
173
382
  ratio: {
174
383
  portrait: "aspect-portrait",
@@ -185,13 +394,13 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
185
394
  }
186
395
  },
187
396
  defaultVariants: { focus: "center" }
188
- }), A = ({ src: n, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
189
- let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ e("img", {
190
- src: n,
397
+ }), Fe = ({ src: e, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
398
+ let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ t("img", {
399
+ src: e,
191
400
  alt: r,
192
401
  width: i,
193
402
  height: a,
194
- className: k({
403
+ className: Pe({
195
404
  ratio: o,
196
405
  focus: s
197
406
  }),
@@ -201,84 +410,191 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
201
410
  fetchPriority: d ? "high" : void 0,
202
411
  decoding: "async",
203
412
  "data-testid": l === void 0 && !p ? f : void 0
204
- }), h = p ? /* @__PURE__ */ t("div", {
413
+ }), h = p ? /* @__PURE__ */ n("div", {
205
414
  className: "relative",
206
415
  "data-testid": l === void 0 ? f : void 0,
207
416
  children: [m, u]
208
417
  }) : m;
209
- return l === void 0 ? h : /* @__PURE__ */ t("figure", {
418
+ return l === void 0 ? h : /* @__PURE__ */ n("figure", {
210
419
  className: "flex flex-col gap-[var(--space-stack)]",
211
420
  "data-testid": f,
212
- children: [h, /* @__PURE__ */ e("figcaption", {
421
+ children: [h, /* @__PURE__ */ t("figcaption", {
213
422
  className: "font-secondary text-label tracking-label text-muted",
214
423
  children: l
215
424
  })]
216
425
  });
217
- }, j = class extends Error {
426
+ }, Ie = y("inline-block shrink-0 align-[-0.125em] forced-color-adjust-auto", { variants: { color: {
427
+ muted: "text-muted",
428
+ success: "text-success",
429
+ warning: "text-warning",
430
+ error: "text-error",
431
+ info: "text-info"
432
+ } } }), Le = "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", Re = {
433
+ sort: [
434
+ "M5.5 13V3",
435
+ "M3 5.5l2.5-2.5L8 5.5",
436
+ "M10.5 3v10",
437
+ "M8 10.5l2.5 2.5 2.5-2.5"
438
+ ],
439
+ "sort-ascending": ["M8 13V3", "M4 7l4-4 4 4"],
440
+ "sort-descending": ["M8 3v10", "M4 9l4 4 4-4"],
441
+ bin: [
442
+ "M2.5 4.5h11",
443
+ "M6 4.5V3a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v1.5",
444
+ "M4 4.5l.6 8.1a1 1 0 0 0 1 .9h4.8a1 1 0 0 0 1-.9l.6-8.1",
445
+ "M6.75 7.25v3.5",
446
+ "M9.25 7.25v3.5"
447
+ ],
448
+ "bubble-exclamation": [
449
+ Le,
450
+ "M8 4.5v2",
451
+ "M8 8.75h.01"
452
+ ],
453
+ "bubble-tick": [Le, "M5.75 6.75l1.5 1.5 3-3.5"]
454
+ }, ze = ({ name: e, label: n, color: r, testId: i }) => /* @__PURE__ */ t("svg", {
455
+ role: n ? "img" : void 0,
456
+ "aria-label": n || void 0,
457
+ "aria-hidden": !n || void 0,
458
+ focusable: !1,
459
+ viewBox: "0 0 16 16",
460
+ width: "1em",
461
+ height: "1em",
462
+ className: Ie({ color: r }),
463
+ "data-testid": i,
464
+ children: Re[e].map((e) => /* @__PURE__ */ t("path", {
465
+ d: e,
466
+ fill: "none",
467
+ stroke: "currentColor",
468
+ strokeWidth: 1.5,
469
+ strokeLinecap: "round",
470
+ strokeLinejoin: "round"
471
+ }, e))
472
+ }), Be = class extends Error {
218
473
  constructor(e) {
219
474
  super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
220
475
  }
221
- }, M = v("w-full h-[var(--meter-track-thickness)] bg-meter-track border border-solid border-rule"), N = v("h-full w-[calc(var(--meter-level)*100%)]", {
476
+ }, Ve = y("w-full h-[var(--meter-track-thickness)] bg-meter-track border border-solid border-rule"), He = y("h-full w-[calc(var(--meter-level)*100%)]", {
222
477
  variants: { treatment: {
223
478
  neutral: "bg-meter-fill",
224
479
  depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
225
480
  } },
226
481
  defaultVariants: { treatment: "neutral" }
227
- }), P = ({ value: t, min: n = 0, max: r, treatment: i, label: a, valueText: o, testId: s }) => {
228
- if (!Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r)) throw new j(`value, min and max must be finite numbers (got value=${t}, min=${n}, max=${r})`);
229
- if (n >= r) throw new j(`min must be less than max (got min=${n}, max=${r})`);
230
- if (t < n || t > r) throw new j(`value must lie within [min, max] (got value=${t}, min=${n}, max=${r})`);
231
- let c = { "--meter-level": (t - n) / (r - n) };
232
- return /* @__PURE__ */ e("div", {
482
+ }), Ue = ({ value: e, min: n = 0, max: r, treatment: i, label: a, valueText: o, testId: s }) => {
483
+ if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new Be(`value, min and max must be finite numbers (got value=${e}, min=${n}, max=${r})`);
484
+ if (n >= r) throw new Be(`min must be less than max (got min=${n}, max=${r})`);
485
+ if (e < n || e > r) throw new Be(`value must lie within [min, max] (got value=${e}, min=${n}, max=${r})`);
486
+ let c = { "--meter-level": (e - n) / (r - n) };
487
+ return /* @__PURE__ */ t("div", {
233
488
  role: "meter",
234
- "aria-valuenow": t,
489
+ "aria-valuenow": e,
235
490
  "aria-valuemin": n,
236
491
  "aria-valuemax": r,
237
492
  "aria-label": a,
238
493
  "aria-valuetext": o,
239
494
  "data-testid": s,
240
- className: M(),
495
+ className: Ve(),
241
496
  style: c,
242
- children: /* @__PURE__ */ e("div", {
497
+ children: /* @__PURE__ */ t("div", {
243
498
  "aria-hidden": "true",
244
- className: N({ treatment: i })
499
+ className: He({ treatment: i })
245
500
  })
246
501
  });
247
- }, F = v(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), I = v("lg:sticky lg:top-6"), L = v("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), R = v("block pt-1 font-secondary text-label tracking-label text-foreground"), z = {
248
- Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
249
- className: F(),
502
+ }, We = y(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), Ge = y("lg:sticky lg:top-6"), Ke = y("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), qe = y("block pt-1 font-secondary text-label tracking-label text-foreground"), Je = {
503
+ Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
504
+ className: We(),
250
505
  "data-testid": n,
251
- children: t
506
+ children: e
252
507
  }),
253
- Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
254
- className: I(),
508
+ Index: ({ number: e, children: r, testId: i }) => /* @__PURE__ */ n("div", {
509
+ className: Ge(),
255
510
  "data-testid": i,
256
511
  "aria-hidden": "true",
257
- children: [n !== void 0 && /* @__PURE__ */ e("span", {
258
- className: L(),
259
- children: n
260
- }), /* @__PURE__ */ e("span", {
261
- className: R(),
512
+ children: [e !== void 0 && /* @__PURE__ */ t("span", {
513
+ className: Ke(),
514
+ children: e
515
+ }), /* @__PURE__ */ t("span", {
516
+ className: qe(),
262
517
  children: r
263
518
  })]
264
519
  }),
265
- Content: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
520
+ Content: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
266
521
  "data-testid": n,
267
- children: t
522
+ children: e
268
523
  })
269
- }, B = v([
270
- "[&:not([data-notes])]:overflow-x-auto",
524
+ }, Ye = class extends Error {
525
+ constructor(e) {
526
+ super(`Table configuration is invalid: ${e}`), this.name = "TableConfigurationError";
527
+ }
528
+ }, K = "comfortable", Xe = y([
529
+ "overflow-x-auto",
530
+ "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
271
531
  "[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
272
532
  "[&_caption]:pb-3 [&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
273
533
  "[&>table>*:nth-child(2)>tr:first-child]:border-rule",
274
- "[&[data-notes=supplementary]_[data-variant=note]]:max-md:hidden",
275
- "[&[data-notes=content]>table]:max-md:block",
276
- "[&[data-notes=content]_thead]:max-md:block [&[data-notes=content]_tbody]:max-md:block [&[data-notes=content]_tfoot]:max-md:block",
277
- "[&[data-notes=content]_tr]:max-md:block [&[data-notes=content]_td]:max-md:block [&[data-notes=content]_th]:max-md:block"
278
- ].join(" ")), V = v("border-t border-solid border-border"), H = v("px-4 py-2 text-small first:pl-0 last:pr-0", {
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",
538
+ "[&[data-columns]>table]:grid [&[data-columns]>table]:grid-cols-[var(--table-columns)]",
539
+ "[&[data-columns]>table>caption]:col-span-full",
540
+ "[&[data-columns]>table>*:not(caption)]:col-span-full [&[data-columns]>table>*:not(caption)]:grid [&[data-columns]>table>*:not(caption)]:grid-cols-subgrid",
541
+ "[&[data-columns]>table>*>tr]:col-span-full [&[data-columns]>table>*>tr]:grid [&[data-columns]>table>*>tr]:grid-cols-subgrid",
542
+ "[&[data-columns]>table>*>tr>td]:wrap-anywhere [&[data-columns]>table>*>tr>th]:wrap-anywhere",
543
+ "[&:has([aria-selected])_tr>*:first-child]:pl-[var(--table-cell-padding-inline)]",
544
+ "[&: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)))]",
546
+ "[&:has(tr[tabindex])]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
547
+ ].join(" "), {
548
+ variants: { density: {
549
+ comfortable: "[--table-cell-padding-inline:var(--table-cell-inset-inline)] [--table-cell-padding-block:var(--table-cell-inset-block)]",
550
+ compact: "[--table-cell-padding-inline:var(--table-cell-inset-inline-compact)] [--table-cell-padding-block:var(--table-cell-inset-block-compact)]"
551
+ } },
552
+ defaultVariants: { density: K }
553
+ }), Ze = y([
554
+ "border-t border-solid border-border",
555
+ "[&[aria-selected=true]>*:first-child]:relative",
556
+ "[&[aria-selected=true]>*:first-child]:before:absolute [&[aria-selected=true]>*:first-child]:before:inset-y-0 [&[aria-selected=true]>*:first-child]:before:left-0",
557
+ "[&[aria-selected=true]>*:first-child]:before:border-l-[length:var(--table-selection-marker-thickness)] [&[aria-selected=true]>*:first-child]:before:border-solid [&[aria-selected=true]>*:first-child]:before:border-foreground"
558
+ ].join(" "), {
559
+ variants: { interactive: {
560
+ true: "cursor-pointer outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
561
+ false: ""
562
+ } },
563
+ defaultVariants: { interactive: !1 }
564
+ }), Qe = [
565
+ "a[href]",
566
+ "button",
567
+ "input",
568
+ "select",
569
+ "textarea",
570
+ "summary",
571
+ "label",
572
+ "[contenteditable]",
573
+ "[tabindex]",
574
+ "[role=\"button\"]",
575
+ "[role=\"link\"]",
576
+ "[role=\"checkbox\"]",
577
+ "[role=\"radio\"]",
578
+ "[role=\"switch\"]",
579
+ "[role=\"menuitem\"]",
580
+ "[role=\"menuitemcheckbox\"]",
581
+ "[role=\"menuitemradio\"]",
582
+ "[role=\"tab\"]",
583
+ "[role=\"option\"]",
584
+ "[role=\"treeitem\"]",
585
+ "[role=\"combobox\"]",
586
+ "[role=\"textbox\"]",
587
+ "[role=\"searchbox\"]",
588
+ "[role=\"slider\"]",
589
+ "[role=\"spinbutton\"]"
590
+ ].join(", "), $e = (e, t) => {
591
+ if (!(t instanceof Element)) return !1;
592
+ let n = t.closest(Qe);
593
+ return n !== null && n !== e && e.contains(n);
594
+ }, et = /* @__PURE__ */ new Set(["Enter", " "]), tt = y("px-[var(--table-cell-padding-inline)] py-[var(--table-cell-padding-block)] text-small first:pl-0 last:pr-0", {
279
595
  variants: {
280
596
  variant: {
281
- value: "font-primary text-foreground tabular-nums",
597
+ value: "font-body text-foreground tabular-nums",
282
598
  note: "font-secondary text-muted"
283
599
  },
284
600
  align: {
@@ -291,51 +607,124 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
291
607
  variant: "value",
292
608
  align: "left"
293
609
  }
294
- }), oe = v("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
610
+ }), nt = 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", {
295
611
  variants: { align: {
296
612
  left: "text-left",
297
613
  right: "text-right",
298
614
  center: "text-center"
299
615
  } },
300
616
  defaultVariants: { align: "left" }
301
- }), se = {
302
- Root: ({ caption: n, notes: r, children: i, testId: a }) => {
303
- let o = /* @__PURE__ */ t("table", { children: [/* @__PURE__ */ e("caption", { children: n }), i] });
304
- return r === void 0 ? /* @__PURE__ */ e("section", {
305
- className: B(),
306
- "data-testid": a,
307
- "aria-label": n,
617
+ }), rt = (e) => `var(--table-column-${e})`, it = (e, t) => {
618
+ let n = e.minWidth === void 0 ? void 0 : rt(e.minWidth);
619
+ if (e.width !== void 0) {
620
+ let t = rt(e.width);
621
+ return n === void 0 ? t : `max(${n}, ${t})`;
622
+ }
623
+ if (!Number.isFinite(e.weight) || e.weight <= 0) throw new Ye(`column ${t + 1} needs a positive finite weight (got ${e.weight})`);
624
+ return `minmax(${n ?? "0"}, ${e.weight}fr)`;
625
+ }, at = (e) => e === void 0 || e.length === 0 ? void 0 : e.map(it).join(" "), ot = (e, t, n) => {
626
+ let [r, i] = m(!0);
627
+ return d(() => {
628
+ let r = e.current;
629
+ if (r === null) return;
630
+ let a = () => i(r.scrollWidth > r.clientWidth || r === document.activeElement);
631
+ a();
632
+ let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
633
+ o?.observe(r);
634
+ for (let e of [t.current, n.current]) e !== null && o?.observe(e);
635
+ return window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
636
+ o?.disconnect(), window.removeEventListener("resize", a), r.removeEventListener("blur", a);
637
+ };
638
+ }, [
639
+ e,
640
+ t,
641
+ n
642
+ ]), r;
643
+ }, st = {
644
+ Root: ({ caption: e, notes: r, columns: i, density: a, children: o, testId: s }) => {
645
+ let c = p(null), l = p(null), u = p(null), d = at(i), f = ot(c, l, u), m = d === void 0 ? void 0 : { "--table-columns": d }, h = d === void 0 ? void 0 : i?.length, g = /* @__PURE__ */ n("table", {
646
+ ref: l,
647
+ role: "table",
648
+ children: [/* @__PURE__ */ t("caption", {
649
+ ref: u,
650
+ children: e
651
+ }), o]
652
+ });
653
+ return r === void 0 ? /* @__PURE__ */ t("section", {
654
+ className: Xe({ density: a }),
655
+ style: m,
656
+ "data-columns": h,
657
+ "data-density": a ?? K,
658
+ "data-testid": s,
659
+ "aria-label": e,
308
660
  tabIndex: 0,
309
- children: o
310
- }) : /* @__PURE__ */ e("div", {
311
- className: B(),
661
+ children: g
662
+ }) : /* @__PURE__ */ t("div", {
663
+ ref: c,
664
+ className: Xe({ density: a }),
665
+ style: m,
312
666
  "data-notes": r,
313
- "data-testid": a,
314
- children: o
667
+ "data-columns": h,
668
+ "data-density": a ?? K,
669
+ "data-testid": s,
670
+ role: f ? "group" : void 0,
671
+ "aria-label": f ? e : void 0,
672
+ tabIndex: f ? 0 : void 0,
673
+ children: g
315
674
  });
316
675
  },
317
- Head: ({ children: t }) => /* @__PURE__ */ e("thead", { children: t }),
318
- Body: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
319
- Footer: ({ children: t }) => /* @__PURE__ */ e("tfoot", { children: t }),
320
- Row: ({ children: t, testId: n }) => /* @__PURE__ */ e("tr", {
321
- className: V(),
322
- "data-testid": n,
323
- children: t
676
+ Head: ({ children: e }) => /* @__PURE__ */ t("thead", {
677
+ role: "rowgroup",
678
+ children: e
324
679
  }),
325
- HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
326
- scope: t,
327
- className: oe({ align: n }),
328
- children: r
680
+ Body: ({ children: e }) => /* @__PURE__ */ t("tbody", {
681
+ role: "rowgroup",
682
+ children: e
683
+ }),
684
+ Footer: ({ children: e }) => /* @__PURE__ */ t("tfoot", {
685
+ role: "rowgroup",
686
+ children: e
329
687
  }),
330
- Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
331
- className: H({
332
- variant: t,
688
+ Row: ({ children: e, testId: n, onClick$: r, isSelected$: i }) => {
689
+ let [a, o] = m(!1);
690
+ d(() => {
691
+ o(!1);
692
+ let e = i?.subscribe((e) => o(e));
693
+ return () => e?.unsubscribe();
694
+ }, [i]);
695
+ let s = (e) => {
696
+ $e(e.currentTarget, e.target) || r?.next();
697
+ }, c = (e) => {
698
+ e.target !== e.currentTarget || !et.has(e.key) || (e.key === " " && e.preventDefault(), e.repeat || r?.next());
699
+ }, l = r !== void 0;
700
+ return /* @__PURE__ */ t("tr", {
701
+ role: "row",
702
+ className: Ze({ interactive: l }),
703
+ "data-testid": n,
704
+ tabIndex: l ? 0 : void 0,
705
+ "aria-selected": i === void 0 ? void 0 : a,
706
+ onClick: l ? s : void 0,
707
+ onKeyDown: l ? c : void 0,
708
+ children: e
709
+ });
710
+ },
711
+ HeaderCell: ({ scope: e, align: n, ariaSort: r, children: i }) => /* @__PURE__ */ t("th", {
712
+ role: e === "row" ? "rowheader" : "columnheader",
713
+ scope: e,
714
+ "aria-sort": r,
715
+ className: nt({ align: n }),
716
+ children: i
717
+ }),
718
+ Cell: ({ variant: e, align: n, children: r }) => /* @__PURE__ */ t("td", {
719
+ role: "cell",
720
+ className: tt({
721
+ variant: e,
333
722
  align: n
334
723
  }),
335
- "data-variant": t ?? "value",
724
+ "data-variant": e ?? "value",
336
725
  children: r
337
726
  })
338
- }, ce = v("font-secondary text-label tracking-label font-medium", {
727
+ }, ct = y("font-secondary text-label tracking-label font-medium", {
339
728
  variants: { color: {
340
729
  foreground: "text-foreground",
341
730
  muted: "text-muted",
@@ -345,11 +734,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
345
734
  info: "text-info"
346
735
  } },
347
736
  defaultVariants: { color: "muted" }
348
- }), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
349
- className: ce({ color: n }),
737
+ }), lt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
738
+ className: ct({ color: n }),
350
739
  "data-testid": r,
351
- children: t
352
- }), le = v("font-primary text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
740
+ children: e
741
+ }), ut = y("font-heading text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
353
742
  variants: { color: {
354
743
  foreground: "text-foreground",
355
744
  muted: "text-muted",
@@ -359,11 +748,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
359
748
  info: "text-info"
360
749
  } },
361
750
  defaultVariants: { color: "foreground" }
362
- }), ue = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
363
- className: le({ color: n }),
751
+ }), dt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h1", {
752
+ className: ut({ color: n }),
364
753
  "data-testid": r,
365
- children: t
366
- }), W = v("font-primary text-title leading-title tracking-optical", {
754
+ children: e
755
+ }), ft = y("font-heading text-title leading-title tracking-optical", {
367
756
  variants: { color: {
368
757
  foreground: "text-foreground",
369
758
  muted: "text-muted",
@@ -373,11 +762,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
373
762
  info: "text-info"
374
763
  } },
375
764
  defaultVariants: { color: "foreground" }
376
- }), de = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
377
- className: W({ color: n }),
765
+ }), pt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h2", {
766
+ className: ft({ color: n }),
378
767
  "data-testid": r,
379
- children: t
380
- }), fe = v("font-primary text-subtitle leading-subtitle", {
768
+ children: e
769
+ }), mt = y("font-heading text-subtitle leading-subtitle", {
381
770
  variants: { color: {
382
771
  foreground: "text-foreground",
383
772
  muted: "text-muted",
@@ -387,11 +776,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
387
776
  info: "text-info"
388
777
  } },
389
778
  defaultVariants: { color: "foreground" }
390
- }), pe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
391
- className: fe({ color: n }),
779
+ }), ht = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h3", {
780
+ className: mt({ color: n }),
392
781
  "data-testid": r,
393
- children: t
394
- }), me = v("font-primary text-body leading-body font-bold", {
782
+ children: e
783
+ }), gt = y("font-heading text-body leading-body font-bold", {
395
784
  variants: { color: {
396
785
  foreground: "text-foreground",
397
786
  muted: "text-muted",
@@ -401,11 +790,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
401
790
  info: "text-info"
402
791
  } },
403
792
  defaultVariants: { color: "foreground" }
404
- }), he = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
405
- className: me({ color: n }),
793
+ }), _t = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h4", {
794
+ className: gt({ color: n }),
406
795
  "data-testid": r,
407
- children: t
408
- }), ge = v("font-primary text-body leading-body font-semibold", {
796
+ children: e
797
+ }), vt = y("font-heading text-body leading-body font-semibold", {
409
798
  variants: { color: {
410
799
  foreground: "text-foreground",
411
800
  muted: "text-muted",
@@ -415,11 +804,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
415
804
  info: "text-info"
416
805
  } },
417
806
  defaultVariants: { color: "foreground" }
418
- }), _e = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
419
- className: ge({ color: n }),
807
+ }), yt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h5", {
808
+ className: vt({ color: n }),
420
809
  "data-testid": r,
421
- children: t
422
- }), ve = v("font-primary text-body leading-body font-medium", {
810
+ children: e
811
+ }), bt = y("font-heading text-body leading-body font-medium", {
423
812
  variants: { color: {
424
813
  foreground: "text-foreground",
425
814
  muted: "text-muted",
@@ -429,11 +818,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
429
818
  info: "text-info"
430
819
  } },
431
820
  defaultVariants: { color: "foreground" }
432
- }), ye = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
433
- className: ve({ color: n }),
821
+ }), xt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h6", {
822
+ className: bt({ color: n }),
434
823
  "data-testid": r,
435
- children: t
436
- }), be = v("font-secondary text-small", {
824
+ children: e
825
+ }), St = y("font-secondary text-small", {
437
826
  variants: { color: {
438
827
  foreground: "text-foreground",
439
828
  muted: "text-muted",
@@ -443,11 +832,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
443
832
  info: "text-info"
444
833
  } },
445
834
  defaultVariants: { color: "foreground" }
446
- }), xe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
447
- className: be({ color: n }),
835
+ }), Ct = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
836
+ className: St({ color: n }),
448
837
  "data-testid": r,
449
- children: t
450
- }), Se = v("font-primary text-body leading-body", {
838
+ children: e
839
+ }), wt = y("font-body text-body leading-body", {
451
840
  variants: { color: {
452
841
  foreground: "text-foreground",
453
842
  muted: "text-muted",
@@ -457,11 +846,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
457
846
  info: "text-info"
458
847
  } },
459
848
  defaultVariants: { color: "foreground" }
460
- }), Ce = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
461
- className: Se({ color: n }),
849
+ }), Tt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
850
+ className: wt({ color: n }),
462
851
  "data-testid": r,
463
- children: t
464
- }), we = v("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), Te = v("font-primary text-lede leading-lede text-foreground"), Ee = v("font-primary text-body leading-body", {
852
+ children: e
853
+ }), Et = y("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), Dt = y("font-body text-lede leading-lede text-foreground"), Ot = y("font-body text-body leading-body", {
465
854
  variants: { color: {
466
855
  foreground: "text-foreground",
467
856
  muted: "text-muted",
@@ -471,119 +860,122 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
471
860
  info: "text-info"
472
861
  } },
473
862
  defaultVariants: { color: "foreground" }
474
- }), De = v("font-primary text-small text-muted"), Oe = {
475
- Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
476
- className: we(),
863
+ }), kt = y("font-body text-small text-muted"), At = {
864
+ Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
865
+ className: Et(),
477
866
  "data-testid": n,
478
- children: t
867
+ children: e
479
868
  }),
480
- Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
481
- className: Te(),
482
- children: t
869
+ Lede: ({ children: e }) => /* @__PURE__ */ t("p", {
870
+ className: Dt(),
871
+ children: e
483
872
  }),
484
- Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
485
- className: Ee({ color: t }),
873
+ Body: ({ color: e, children: n }) => /* @__PURE__ */ t("p", {
874
+ className: Ot({ color: e }),
486
875
  children: n
487
876
  }),
488
- Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
489
- className: De(),
490
- children: t
877
+ Tail: ({ children: e }) => /* @__PURE__ */ t("p", {
878
+ className: kt(),
879
+ children: e
491
880
  })
492
- }, ke = v("font-primary text-body transition-colors duration-[var(--motion-duration-color)] rounded-[var(--radius-control)] py-2 sm:py-2 disabled:bg-disabled disabled:hover:bg-disabled-hover cursor-pointer disabled:cursor-not-allowed select-none text-nowrap inline-flex flex-row items-center justify-center gap-2 outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
881
+ }, q = "font-control text-body text-balance wrap-anywhere rounded-[var(--radius-control)] select-none inline-flex flex-row items-center justify-center gap-2", jt = 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)]", {
493
882
  variants: { variant: {
494
- primary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-primary text-primary-foreground hover:bg-primary-hover",
495
- secondary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-secondary text-secondary-foreground hover:bg-secondary-hover",
496
- ghost: "px-2 min-w-0 bg-transparent text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] hover:underline-offset-[var(--underline-offset)]"
883
+ primary: `${q} 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`,
884
+ secondary: `${q} 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`,
885
+ ghost: `${q} 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`,
886
+ outlined: `${q} 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`,
887
+ destructive: `${q} 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`,
888
+ 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"
497
889
  } },
498
890
  defaultVariants: { variant: "primary" }
499
- }), Ae = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
891
+ }), Mt = ({ children: e, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ t("button", {
500
892
  type: s,
501
893
  "data-testid": r,
502
- className: ke({ variant: i }),
894
+ className: jt({ variant: i }),
503
895
  onClick: () => a?.next(),
504
896
  disabled: n,
505
897
  "aria-label": o,
506
- children: t
507
- }), je = class extends Error {
898
+ children: e
899
+ }), Nt = class extends Error {
508
900
  constructor(e) {
509
901
  super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
510
902
  }
511
- }, Me = v("flex flex-col gap-[var(--space-stack)]"), Ne = v([
903
+ }, Pt = y("flex flex-col gap-[var(--space-stack)]"), Ft = y([
512
904
  "group/choice flex w-full flex-row items-start gap-3 text-left",
513
905
  "rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
514
906
  "px-3 py-2",
515
907
  "cursor-pointer disabled:cursor-not-allowed",
516
908
  "transition-colors duration-[var(--motion-duration-color)]",
517
909
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
518
- ].join(" ")), Pe = i(void 0), Fe = (e) => {
519
- let t = s(Pe);
520
- if (t === void 0) throw new je(e);
910
+ ].join(" ")), It = a(void 0), Lt = (e) => {
911
+ let t = c(It);
912
+ if (t === void 0) throw new Nt(e);
521
913
  return t;
522
- }, Ie = (e, t) => {
914
+ }, Rt = (e, t) => {
523
915
  let n = e.closest("[role=\"radiogroup\"]");
524
916
  if (n === null) return;
525
917
  let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
526
918
  return r[(r.indexOf(e) + t + r.length) % r.length];
527
- }, Le = {
919
+ }, zt = {
528
920
  ArrowDown: 1,
529
921
  ArrowRight: 1,
530
922
  ArrowUp: -1,
531
923
  ArrowLeft: -1
532
- }, Re = {
533
- Root: ({ selected: t, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ e(Pe.Provider, {
924
+ }, Bt = {
925
+ Root: ({ selected: e, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ t(It.Provider, {
534
926
  value: {
535
- selected: t,
927
+ selected: e,
536
928
  onSelect$: n,
537
929
  inert: i === !0
538
930
  },
539
- children: /* @__PURE__ */ e("div", {
931
+ children: /* @__PURE__ */ t("div", {
540
932
  role: "radiogroup",
541
933
  "aria-label": r,
542
934
  "aria-disabled": i === !0 ? "true" : void 0,
543
- className: Me(),
935
+ className: Pt(),
544
936
  "data-testid": o,
545
937
  children: a
546
938
  })
547
939
  }),
548
- Choice: ({ value: n, children: r, description: i, testId: a }) => {
549
- let { selected: o, onSelect$: s, inert: c } = Fe("Choice"), u = o === n, d = l(), f = `${d}-name`, p = `${d}-description`;
550
- return /* @__PURE__ */ t("button", {
940
+ Choice: ({ value: e, children: r, description: i, testId: a }) => {
941
+ let { selected: o, onSelect$: s, inert: c } = Lt("Choice"), l = o === e, d = u(), f = `${d}-name`, p = `${d}-description`;
942
+ return /* @__PURE__ */ n("button", {
551
943
  type: "button",
552
944
  role: "radio",
553
- "aria-checked": u,
945
+ "aria-checked": l,
554
946
  "aria-labelledby": f,
555
947
  "aria-describedby": p,
556
- tabIndex: u && !c ? 0 : -1,
948
+ tabIndex: l && !c ? 0 : -1,
557
949
  disabled: c,
558
- "data-value": n,
950
+ "data-value": e,
559
951
  "data-testid": a,
560
- className: Ne(),
952
+ className: Ft(),
561
953
  onClick: () => {
562
- u || s.next(n);
954
+ l || s.next(e);
563
955
  },
564
956
  onKeyDown: (e) => {
565
- let t = Le[e.key];
957
+ let t = zt[e.key];
566
958
  if (t === void 0 || c) return;
567
959
  e.preventDefault();
568
- let n = Ie(e.currentTarget, t);
960
+ let n = Rt(e.currentTarget, t);
569
961
  if (n === void 0) return;
570
962
  n.focus();
571
963
  let r = n.dataset.value;
572
964
  r !== void 0 && r !== o && s.next(r);
573
965
  },
574
- children: [/* @__PURE__ */ e("span", {
966
+ children: [/* @__PURE__ */ t("span", {
575
967
  className: "mt-[0.3rem] flex size-[var(--choice-marker-size)] shrink-0 items-center justify-center rounded-[var(--radius-control)] border border-solid border-control-border",
576
- children: u && /* @__PURE__ */ e("span", {
968
+ children: l && /* @__PURE__ */ t("span", {
577
969
  "data-choice-marker-dot": !0,
578
970
  className: "size-[var(--choice-marker-dot-size)] rounded-[var(--radius-control)] bg-foreground"
579
971
  })
580
- }), /* @__PURE__ */ t("span", {
972
+ }), /* @__PURE__ */ n("span", {
581
973
  className: "flex min-w-0 flex-col",
582
- children: [/* @__PURE__ */ e("span", {
974
+ children: [/* @__PURE__ */ t("span", {
583
975
  id: f,
584
976
  className: "font-secondary font-medium text-body text-foreground group-disabled/choice:text-muted",
585
977
  children: r
586
- }), /* @__PURE__ */ e("span", {
978
+ }), /* @__PURE__ */ t("span", {
587
979
  id: p,
588
980
  className: "font-secondary text-muted text-small",
589
981
  children: i
@@ -591,61 +983,61 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
591
983
  })]
592
984
  });
593
985
  }
594
- }, ze = v("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-primary text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted", {
986
+ }, Vt = 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", {
595
987
  variants: { variant: {
596
988
  text: "",
597
989
  email: "",
598
990
  url: ""
599
991
  } },
600
992
  defaultVariants: { variant: "text" }
601
- }), Be = ({ label: n, name: r, variant: i, required: a, optionalLabel: o, invalid: s, disabled: u, defaultValue: d, placeholder: p, autocomplete: m, hint: h, errorMessage: g, onInput$: _, reset$: v, testId: y }) => {
602
- let b = l(), x = `${b}-control`, S = `${b}-hint`, C = `${b}-error`, w = [h ? S : void 0, s ? C : void 0].filter(Boolean).join(" ") || void 0, T = f(null);
603
- return c(() => {
993
+ }), Ht = ({ 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
+ 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
+ return l(() => {
604
996
  let e = v?.subscribe(() => {
605
997
  T.current && (T.current.value = "");
606
998
  });
607
999
  return () => e?.unsubscribe();
608
- }, [v]), /* @__PURE__ */ t("div", {
1000
+ }, [v]), /* @__PURE__ */ n("div", {
609
1001
  className: "flex flex-col gap-[var(--space-stack)]",
610
1002
  children: [
611
- /* @__PURE__ */ e("label", {
1003
+ /* @__PURE__ */ t("label", {
612
1004
  htmlFor: x,
613
1005
  className: "font-secondary font-medium text-body text-foreground",
614
- children: n
1006
+ children: e
615
1007
  }),
616
- /* @__PURE__ */ e("input", {
1008
+ /* @__PURE__ */ t("input", {
617
1009
  ref: T,
618
1010
  id: x,
619
1011
  name: r,
620
1012
  type: i ?? "text",
621
- className: ze({ variant: i }),
1013
+ className: Vt({ variant: i }),
622
1014
  required: a,
623
- disabled: u,
1015
+ disabled: c,
624
1016
  defaultValue: d,
625
- placeholder: p,
1017
+ placeholder: f,
626
1018
  autoComplete: m,
627
1019
  "aria-invalid": s || void 0,
628
1020
  "aria-describedby": w,
629
1021
  "data-testid": y,
630
1022
  onInput: (e) => _?.next(e.currentTarget.value)
631
1023
  }),
632
- !a && o && /* @__PURE__ */ e("span", {
1024
+ !a && o && /* @__PURE__ */ t("span", {
633
1025
  className: "font-secondary text-muted text-small",
634
1026
  children: o
635
1027
  }),
636
- h && /* @__PURE__ */ e("p", {
1028
+ h && /* @__PURE__ */ t("p", {
637
1029
  id: S,
638
1030
  className: "font-secondary text-muted text-small",
639
1031
  children: h
640
1032
  }),
641
- s && /* @__PURE__ */ e("p", {
1033
+ s && /* @__PURE__ */ t("p", {
642
1034
  id: C,
643
1035
  className: "font-secondary text-error text-small",
644
1036
  children: g
645
1037
  })
646
1038
  ]
647
1039
  });
648
- }, Ve = v("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
1040
+ }, Ut = y("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
649
1041
  variants: { treatment: {
650
1042
  prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
651
1043
  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",
@@ -653,15 +1045,15 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
653
1045
  graphic: "text-inherit no-underline"
654
1046
  } },
655
1047
  defaultVariants: { treatment: "prose" }
656
- }), He = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
657
- href: t,
658
- className: Ve({ treatment: r }),
1048
+ }), Wt = ({ href: e, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ t("a", {
1049
+ href: e,
1050
+ className: Ut({ treatment: r }),
659
1051
  target: i ? "_blank" : void 0,
660
1052
  rel: i ? "noopener noreferrer" : void 0,
661
1053
  "aria-current": a ? "page" : void 0,
662
1054
  "data-testid": o,
663
1055
  children: n
664
- }), Ue = (e, t, n, r) => {
1056
+ }), Gt = (e, t, n, r) => {
665
1057
  let i = Math.max(e.length - 1, 0) * r;
666
1058
  if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
667
1059
  let a = 0, o = t;
@@ -670,11 +1062,11 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
670
1062
  o += t + r, a += 1;
671
1063
  }
672
1064
  return a;
673
- }, We = class extends Error {
1065
+ }, Kt = class extends Error {
674
1066
  constructor(e) {
675
1067
  super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
676
1068
  }
677
- }, G = "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", Ge = `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 ${G}`, K = v("", {
1069
+ }, J = "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", qt = `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 ${J}`, Y = y("", {
678
1070
  variants: { part: {
679
1071
  root: [
680
1072
  "relative flex flex-col gap-[var(--space-stack)]",
@@ -684,10 +1076,10 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
684
1076
  field: [
685
1077
  "group/field relative flex items-center gap-1",
686
1078
  "rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2",
687
- "font-primary text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
1079
+ "font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
688
1080
  "data-[disabled]:border-disabled data-[disabled]:text-muted"
689
1081
  ].join(" "),
690
- 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 ${G}`,
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 ${J}`,
691
1083
  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",
692
1084
  track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
693
1085
  chip: [
@@ -695,9 +1087,9 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
695
1087
  "rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
696
1088
  "group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
697
1089
  ].join(" "),
698
- count: Ge,
699
- countMeasure: `${Ge} invisible absolute`,
700
- 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 ${G}`,
1090
+ count: qt,
1091
+ countMeasure: `${qt} invisible absolute`,
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 ${J}`,
701
1093
  surface: [
702
1094
  "absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
703
1095
  "rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
@@ -706,22 +1098,22 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
706
1098
  ].join(" ")
707
1099
  } },
708
1100
  defaultVariants: { part: "root" }
709
- }), Ke = v([
1101
+ }), Jt = y([
710
1102
  "group/option flex w-full flex-row items-center gap-3 text-left",
711
1103
  "rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
712
1104
  "cursor-pointer disabled:cursor-not-allowed",
713
1105
  "transition-colors duration-[var(--motion-duration-color)]",
714
1106
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
715
- ].join(" ")), q = 8, qe = i(void 0), Je = (e) => {
716
- let t = s(qe);
717
- if (t === void 0) throw new We(e);
1107
+ ].join(" ")), Yt = 8, Xt = a(void 0), Zt = (e) => {
1108
+ let t = c(Xt);
1109
+ if (t === void 0) throw new Kt(e);
718
1110
  return t;
719
- }, J = (e) => (t) => {
1111
+ }, X = (e) => (t) => {
720
1112
  e.current = t ?? void 0;
721
- }, Y = (e) => e.getBoundingClientRect().width, Ye = (e) => n.toArray(e).flatMap((e) => {
722
- if (!a(e)) return [];
723
- if (e.type === r) return Ye(e.props.children);
724
- if (e.type === it) {
1113
+ }, Qt = (e) => e.getBoundingClientRect().width, $t = (e) => r.toArray(e).flatMap((e) => {
1114
+ if (!o(e)) return [];
1115
+ if (e.type === i) return $t(e.props.children);
1116
+ if (e.type === ln) {
725
1117
  let { value: t, children: n } = e.props;
726
1118
  return [{
727
1119
  value: t,
@@ -729,144 +1121,144 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
729
1121
  }];
730
1122
  }
731
1123
  return [];
732
- }), Xe = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), Ze = (e) => {
1124
+ }), en = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), tn = (e) => {
733
1125
  let t = document.activeElement;
734
1126
  return !e.contains(t) || t instanceof Element && t.closest("[data-overflow]") !== null;
735
- }, Qe = (e) => e.querySelector("[role=\"checkbox\"][aria-checked=\"true\"]") ?? e.querySelector("[role=\"checkbox\"]") ?? void 0, $e = (e, t) => [...new Set(e.map(({ value: e }) => e).filter((e) => t.has(e)))], et = (e) => e.kind === "firstOption" || !e.control.isConnected, tt = (e, t, n, r) => {
1127
+ }, nn = (e) => e.querySelector("[role=\"checkbox\"][aria-checked=\"true\"]") ?? e.querySelector("[role=\"checkbox\"]") ?? void 0, rn = (e, t) => [...new Set(e.map(({ value: e }) => e).filter((e) => t.has(e)))], an = (e) => e.kind === "firstOption" || !e.control.isConnected, on = (e, t, n, r) => {
736
1128
  switch (e.kind) {
737
- case "firstOption": return r === void 0 ? void 0 : Qe(r);
1129
+ case "firstOption": return r === void 0 ? void 0 : nn(r);
738
1130
  case "afterRemoval": {
739
- let r = Xe(t);
1131
+ let r = en(t);
740
1132
  return r[e.index] ?? r[e.index - 1] ?? n;
741
1133
  }
742
1134
  case "afterClear": return n;
743
1135
  }
744
- }, nt = () => /* @__PURE__ */ e("svg", {
1136
+ }, sn = () => /* @__PURE__ */ t("svg", {
745
1137
  "aria-hidden": !0,
746
1138
  focusable: !1,
747
1139
  viewBox: "0 0 16 16",
748
1140
  className: "size-3",
749
- children: /* @__PURE__ */ e("path", {
1141
+ children: /* @__PURE__ */ t("path", {
750
1142
  d: "M4 4l8 8M12 4l-8 8",
751
1143
  fill: "none",
752
1144
  stroke: "currentColor",
753
1145
  strokeWidth: 1.5,
754
1146
  strokeLinecap: "round"
755
1147
  })
756
- }), rt = ({ label: n, selected$: r, onChange$: i, emptyLabel: a, removeLabel: o, clearLabel: s, overflowLabel: m, hint: h, disabled: g, testId: _, children: v }) => {
757
- let y = l(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [ee, E] = p([]), [te, D] = p(!1), [O, ne] = p(void 0), [re, ie] = p("below"), [, ae] = d((e) => e + 1, 0), k = f(void 0), A = f(void 0), j = f(void 0), M = f(void 0), N = f(void 0), P = f(void 0), F = f(!1), I = te && !T, L = Ye(v), R = new Set(ee), z = L.filter((e) => R.has(e.value)), B = O === void 0 ? z.length : Math.min(O, z.length), V = z.length - B;
758
- u(() => {
759
- E([]);
760
- let e = r.subscribe((e) => E(e));
1148
+ }), cn = ({ label: e, selected$: r, onChange$: i, emptyLabel: a, removeLabel: o, clearLabel: s, overflowLabel: c, hint: h, disabled: g, testId: _, children: v }) => {
1149
+ let y = u(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [E, D] = m([]), [ee, O] = m(!1), [k, te] = m(void 0), [A, j] = m("below"), [, ne] = f((e) => e + 1, 0), M = p(void 0), N = p(void 0), P = p(void 0), F = p(void 0), I = p(void 0), L = p(void 0), R = p(!1), z = ee && !T, re = $t(v), B = new Set(E), V = re.filter((e) => B.has(e.value)), H = k === void 0 ? V.length : Math.min(k, V.length), U = V.length - H;
1150
+ d(() => {
1151
+ D([]);
1152
+ let e = r.subscribe((e) => D(e));
761
1153
  return () => e.unsubscribe();
762
- }, [r]), c(() => {
763
- T && D(!1);
764
- }, [T]), u(() => {
765
- let e = M.current;
1154
+ }, [r]), l(() => {
1155
+ T && O(!1);
1156
+ }, [T]), d(() => {
1157
+ let e = F.current;
766
1158
  if (e === void 0 || typeof ResizeObserver > "u") return;
767
- let t = new ResizeObserver(() => ae());
1159
+ let t = new ResizeObserver(() => ne());
768
1160
  return t.observe(e), () => t.disconnect();
769
- }, []), u(() => {
770
- let e = M.current;
1161
+ }, []), d(() => {
1162
+ let e = F.current;
771
1163
  if (e === void 0) return;
772
- let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i = Ue(t.map(Y), n === null ? 0 : Y(n), Y(e), r);
773
- ne((e) => e === i ? e : i);
774
- }), u(() => {
775
- let e = A.current, t = N.current;
776
- if (!I || e === void 0 || t === void 0) return;
777
- let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom - q, i = n.top - q, a = t.scrollHeight > r && i > r;
778
- t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`), ie(a ? "above" : "below");
779
- }), c(() => {
780
- if (!I) 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 = Gt(t.map(Qt), n === null ? 0 : Qt(n), Qt(e), r);
1165
+ te((e) => e === i ? e : i);
1166
+ }), d(() => {
1167
+ let e = N.current, t = I.current;
1168
+ if (!z || e === void 0 || t === void 0) return;
1169
+ let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom - Yt, i = n.top - Yt, a = t.scrollHeight > r && i > r;
1170
+ t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`), j(a ? "above" : "below");
1171
+ }), l(() => {
1172
+ if (!z) return;
781
1173
  let e = (e) => {
782
- let t = k.current;
783
- t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (F.current = !1, P.current = void 0, D(!1));
1174
+ let t = M.current;
1175
+ t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (R.current = !1, L.current = void 0, O(!1));
784
1176
  };
785
1177
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
786
- }, [I]), u(() => {
787
- let e = k.current, t = j.current;
1178
+ }, [z]), d(() => {
1179
+ let e = M.current, t = P.current;
788
1180
  if (e === void 0 || t === void 0) return;
789
- let n = P.current;
790
- n !== void 0 && et(n) ? (P.current = void 0, tt(n, e, t, I ? N.current : void 0)?.focus()) : n === void 0 && F.current && Ze(e) && t.focus(), F.current = e.contains(document.activeElement);
1181
+ let n = L.current;
1182
+ n !== void 0 && an(n) ? (L.current = void 0, on(n, e, t, z ? I.current : void 0)?.focus()) : n === void 0 && R.current && tn(e) && t.focus(), R.current = e.contains(document.activeElement);
791
1183
  });
792
- let H = (e) => {
793
- i.next($e(L, e));
794
- }, oe = (e) => {
1184
+ let W = (e) => {
1185
+ i.next(rn(re, e));
1186
+ }, ie = (e) => {
795
1187
  if (T) return;
796
- let t = new Set(R);
797
- t.delete(e) || t.add(e), H(t);
798
- }, se = (e, t) => (n) => {
1188
+ let t = new Set(B);
1189
+ t.delete(e) || t.add(e), W(t);
1190
+ }, ae = (e, t) => (n) => {
799
1191
  if (T) return;
800
- document.activeElement === n.currentTarget && (P.current = {
1192
+ document.activeElement === n.currentTarget && (L.current = {
801
1193
  kind: "afterRemoval",
802
1194
  index: t,
803
1195
  control: n.currentTarget
804
1196
  });
805
- let r = new Set(R);
806
- r.delete(e), H(r);
807
- }, ce = (e) => {
808
- T || (document.activeElement === e.currentTarget && (P.current = {
1197
+ let r = new Set(B);
1198
+ r.delete(e), W(r);
1199
+ }, oe = (e) => {
1200
+ T || (document.activeElement === e.currentTarget && (L.current = {
809
1201
  kind: "afterClear",
810
1202
  control: e.currentTarget
811
1203
  }), i.next([]));
812
- }, U = (e) => {
813
- T || (e.detail === 0 && (P.current = { kind: "firstOption" }), D(!0));
1204
+ }, se = (e) => {
1205
+ T || (e.detail === 0 && (L.current = { kind: "firstOption" }), O(!0));
1206
+ }, ce = (e) => {
1207
+ z ? O(!1) : se(e);
814
1208
  }, le = (e) => {
815
- I ? D(!1) : U(e);
816
- }, ue = (e) => {
817
1209
  if (e.key !== "ArrowDown" || T) return;
818
1210
  e.preventDefault();
819
- let t = N.current;
820
- I && t !== void 0 ? Qe(t)?.focus() : (P.current = { kind: "firstOption" }, D(!0));
821
- }, W = (e) => {
822
- e.key !== "Escape" || !I || (e.preventDefault(), e.stopPropagation(), D(!1), j.current?.focus());
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);
823
1219
  }, de = (e) => {
824
- F.current = !0;
825
- let t = P.current;
826
- t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (P.current = void 0);
1220
+ let t = M.current, n = e.relatedTarget;
1221
+ t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (R.current = !1, L.current = void 0, O(!1));
827
1222
  }, fe = (e) => {
828
- let t = k.current, n = e.relatedTarget;
829
- t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (F.current = !1, P.current = void 0, D(!1));
830
- }, pe = (e) => {
831
1223
  (!(e.target instanceof Element) || e.target.closest("button") === null) && e.preventDefault();
832
- }, me = [z.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
833
- return /* @__PURE__ */ t("div", {
834
- ref: J(k),
835
- className: K(),
836
- onKeyDown: W,
837
- onFocus: de,
838
- onBlur: fe,
1224
+ }, pe = [V.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
1225
+ return /* @__PURE__ */ n("div", {
1226
+ ref: X(M),
1227
+ className: Y(),
1228
+ onKeyDown: G,
1229
+ onFocus: ue,
1230
+ onBlur: de,
839
1231
  children: [
840
- /* @__PURE__ */ e("label", {
1232
+ /* @__PURE__ */ t("label", {
841
1233
  id: b,
842
1234
  htmlFor: x,
843
- children: n
1235
+ children: e
844
1236
  }),
845
- /* @__PURE__ */ t("div", {
846
- ref: J(A),
1237
+ /* @__PURE__ */ n("div", {
1238
+ ref: X(N),
847
1239
  "data-multiselect-field": !0,
848
1240
  "data-disabled": T || void 0,
849
- className: K({ part: "field" }),
1241
+ className: Y({ part: "field" }),
850
1242
  children: [
851
- /* @__PURE__ */ e("button", {
852
- ref: J(j),
1243
+ /* @__PURE__ */ t("button", {
1244
+ ref: X(P),
853
1245
  id: x,
854
1246
  type: "button",
855
1247
  "aria-labelledby": b,
856
- "aria-expanded": I,
857
- "aria-controls": I ? S : void 0,
858
- "aria-describedby": me,
1248
+ "aria-expanded": z,
1249
+ "aria-controls": z ? S : void 0,
1250
+ "aria-describedby": pe,
859
1251
  disabled: T,
860
1252
  "data-testid": _,
861
- className: K({ part: "trigger" }),
862
- onClick: le,
863
- onKeyDown: ue,
864
- children: /* @__PURE__ */ e("svg", {
1253
+ className: Y({ part: "trigger" }),
1254
+ onClick: ce,
1255
+ onKeyDown: le,
1256
+ children: /* @__PURE__ */ t("svg", {
865
1257
  "aria-hidden": !0,
866
1258
  focusable: !1,
867
1259
  viewBox: "0 0 16 16",
868
1260
  className: "size-4",
869
- children: /* @__PURE__ */ e("path", {
1261
+ children: /* @__PURE__ */ t("path", {
870
1262
  d: "M3 6l5 5 5-5",
871
1263
  fill: "none",
872
1264
  stroke: "currentColor",
@@ -876,114 +1268,114 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
876
1268
  })
877
1269
  })
878
1270
  }),
879
- /* @__PURE__ */ e("div", {
880
- className: K({ part: "clip" }),
881
- children: /* @__PURE__ */ t("div", {
882
- ref: J(M),
1271
+ /* @__PURE__ */ t("div", {
1272
+ className: Y({ part: "clip" }),
1273
+ children: /* @__PURE__ */ n("div", {
1274
+ ref: X(F),
883
1275
  "data-multiselect-track": !0,
884
- className: K({ part: "track" }),
1276
+ className: Y({ part: "track" }),
885
1277
  children: [
886
- z.length === 0 && /* @__PURE__ */ e("span", {
1278
+ V.length === 0 && /* @__PURE__ */ t("span", {
887
1279
  id: w,
888
1280
  className: "truncate text-muted",
889
1281
  children: a
890
1282
  }),
891
- z.map(({ value: n, label: r }, i) => {
892
- let a = i >= B;
893
- return /* @__PURE__ */ t("span", {
1283
+ V.map(({ value: e, label: r }, i) => {
1284
+ let a = i >= H;
1285
+ return /* @__PURE__ */ n("span", {
894
1286
  "data-multiselect-chip": !0,
895
1287
  "data-overflow": a || void 0,
896
1288
  "aria-hidden": a || void 0,
897
1289
  inert: a || void 0,
898
- className: K({ part: "chip" }),
899
- children: [/* @__PURE__ */ e("span", {
1290
+ className: Y({ part: "chip" }),
1291
+ children: [/* @__PURE__ */ t("span", {
900
1292
  className: "truncate",
901
1293
  children: r
902
- }), /* @__PURE__ */ e("button", {
1294
+ }), /* @__PURE__ */ t("button", {
903
1295
  type: "button",
904
1296
  "aria-label": o.replaceAll("{label}", r),
905
1297
  disabled: T,
906
1298
  tabIndex: a ? -1 : void 0,
907
- className: K({ part: "iconButton" }),
908
- onClick: se(n, i),
909
- children: /* @__PURE__ */ e(nt, {})
1299
+ className: Y({ part: "iconButton" }),
1300
+ onClick: ae(e, i),
1301
+ children: /* @__PURE__ */ t(sn, {})
910
1302
  })]
911
- }, n);
1303
+ }, e);
912
1304
  }),
913
- V > 0 && /* @__PURE__ */ e("button", {
1305
+ U > 0 && /* @__PURE__ */ t("button", {
914
1306
  type: "button",
915
1307
  disabled: T,
916
- className: K({ part: "count" }),
917
- onClick: U,
918
- children: m.replaceAll("{count}", String(V))
1308
+ className: Y({ part: "count" }),
1309
+ onClick: se,
1310
+ children: c.replaceAll("{count}", String(U))
919
1311
  }),
920
- z.length > 0 && /* @__PURE__ */ e("span", {
1312
+ V.length > 0 && /* @__PURE__ */ t("span", {
921
1313
  "aria-hidden": !0,
922
1314
  "data-multiselect-count": !0,
923
- className: K({ part: "countMeasure" }),
924
- children: m.replaceAll("{count}", String(z.length))
1315
+ className: Y({ part: "countMeasure" }),
1316
+ children: c.replaceAll("{count}", String(V.length))
925
1317
  })
926
1318
  ]
927
1319
  })
928
1320
  }),
929
- z.length > 0 ? /* @__PURE__ */ e("button", {
1321
+ V.length > 0 ? /* @__PURE__ */ t("button", {
930
1322
  type: "button",
931
1323
  "aria-label": s,
932
1324
  disabled: T,
933
- className: K({ part: "iconButton" }),
934
- onClick: ce,
935
- children: /* @__PURE__ */ e(nt, {})
936
- }) : /* @__PURE__ */ e("span", {
1325
+ className: Y({ part: "iconButton" }),
1326
+ onClick: oe,
1327
+ children: /* @__PURE__ */ t(sn, {})
1328
+ }) : /* @__PURE__ */ t("span", {
937
1329
  "aria-hidden": !0,
938
1330
  className: "size-6 shrink-0"
939
1331
  }),
940
- /* @__PURE__ */ e("span", {
1332
+ /* @__PURE__ */ t("span", {
941
1333
  "aria-hidden": !0,
942
1334
  className: "size-6 shrink-0"
943
1335
  }),
944
- I && /* @__PURE__ */ e("div", {
945
- ref: J(N),
1336
+ z && /* @__PURE__ */ t("div", {
1337
+ ref: X(I),
946
1338
  id: S,
947
1339
  role: "group",
948
1340
  "aria-labelledby": b,
949
- "data-placement": re,
950
- className: K({ part: "surface" }),
951
- onMouseDown: pe,
952
- children: /* @__PURE__ */ e(qe, {
1341
+ "data-placement": A,
1342
+ className: Y({ part: "surface" }),
1343
+ onMouseDown: fe,
1344
+ children: /* @__PURE__ */ t(Xt, {
953
1345
  value: {
954
- selected: R,
1346
+ selected: B,
955
1347
  disabled: T,
956
- toggle: oe
1348
+ toggle: ie
957
1349
  },
958
1350
  children: v
959
1351
  })
960
1352
  })
961
1353
  ]
962
1354
  }),
963
- h && /* @__PURE__ */ e("p", {
1355
+ h && /* @__PURE__ */ t("p", {
964
1356
  id: C,
965
1357
  children: h
966
1358
  })
967
1359
  ]
968
1360
  });
969
- }, it = ({ value: n, children: r, testId: i }) => {
970
- let { selected: a, disabled: o, toggle: s } = Je("Option"), c = a.has(n);
971
- return /* @__PURE__ */ t("button", {
1361
+ }, ln = ({ value: e, children: r, testId: i }) => {
1362
+ let { selected: a, disabled: o, toggle: s } = Zt("Option"), c = a.has(e);
1363
+ return /* @__PURE__ */ n("button", {
972
1364
  type: "button",
973
1365
  role: "checkbox",
974
1366
  "aria-checked": c,
975
1367
  disabled: o,
976
1368
  "data-testid": i,
977
- className: Ke(),
978
- onClick: () => s(n),
979
- children: [/* @__PURE__ */ e("span", {
1369
+ className: Jt(),
1370
+ onClick: () => s(e),
1371
+ children: [/* @__PURE__ */ t("span", {
980
1372
  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",
981
- children: c && /* @__PURE__ */ e("svg", {
1373
+ children: c && /* @__PURE__ */ t("svg", {
982
1374
  "aria-hidden": !0,
983
1375
  focusable: !1,
984
1376
  viewBox: "0 0 16 16",
985
1377
  className: "size-3 text-foreground",
986
- children: /* @__PURE__ */ e("path", {
1378
+ children: /* @__PURE__ */ t("path", {
987
1379
  d: "M3 8.5l3 3 7-7",
988
1380
  fill: "none",
989
1381
  stroke: "currentColor",
@@ -992,81 +1384,81 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
992
1384
  strokeLinejoin: "round"
993
1385
  })
994
1386
  })
995
- }), /* @__PURE__ */ e("span", {
1387
+ }), /* @__PURE__ */ t("span", {
996
1388
  className: "min-w-0 flex-1 font-secondary text-body text-foreground [overflow-wrap:anywhere]",
997
1389
  children: r
998
1390
  })]
999
1391
  });
1000
- }, at = {
1001
- Root: rt,
1002
- Option: it
1003
- }, ot = v("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-primary text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted"), st = ({ label: n, name: r, required: i, optionalLabel: a, hint: o, invalid: s, errorMessage: u, disabled: d, placeholder: p, defaultValue: m, onInput$: h, reset$: g, testId: _ }) => {
1004
- let v = l(), y = `${v}-control`, b = `${v}-hint`, x = `${v}-error`, S = [o ? b : void 0, s ? x : void 0].filter(Boolean).join(" ") || void 0, C = f(null);
1005
- return c(() => {
1392
+ }, un = {
1393
+ Root: cn,
1394
+ Option: ln
1395
+ }, dn = 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"), fn = ({ 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
+ 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
+ return l(() => {
1006
1398
  let e = g?.subscribe(() => {
1007
1399
  C.current && (C.current.value = "");
1008
1400
  });
1009
1401
  return () => e?.unsubscribe();
1010
- }, [g]), /* @__PURE__ */ t("div", {
1402
+ }, [g]), /* @__PURE__ */ n("div", {
1011
1403
  className: "flex flex-col gap-[var(--space-stack)]",
1012
1404
  children: [
1013
- /* @__PURE__ */ e("label", {
1405
+ /* @__PURE__ */ t("label", {
1014
1406
  htmlFor: y,
1015
1407
  className: "font-secondary font-medium text-body text-foreground",
1016
- children: n
1408
+ children: e
1017
1409
  }),
1018
- /* @__PURE__ */ e("input", {
1410
+ /* @__PURE__ */ t("input", {
1019
1411
  ref: C,
1020
1412
  id: y,
1021
1413
  name: r,
1022
1414
  type: "text",
1023
1415
  inputMode: "decimal",
1024
- className: ot(),
1416
+ className: dn(),
1025
1417
  required: i,
1026
1418
  disabled: d,
1027
1419
  defaultValue: m,
1028
- placeholder: p,
1420
+ placeholder: f,
1029
1421
  "aria-invalid": s || void 0,
1030
1422
  "aria-describedby": S,
1031
1423
  "data-testid": _,
1032
1424
  onInput: (e) => !d && h?.next(e.currentTarget.value)
1033
1425
  }),
1034
- !i && a && /* @__PURE__ */ e("span", {
1426
+ !i && a && /* @__PURE__ */ t("span", {
1035
1427
  className: "font-secondary text-muted text-small",
1036
1428
  children: a
1037
1429
  }),
1038
- o && /* @__PURE__ */ e("p", {
1430
+ o && /* @__PURE__ */ t("p", {
1039
1431
  id: b,
1040
1432
  className: "font-secondary text-muted text-small",
1041
1433
  children: o
1042
1434
  }),
1043
- s && /* @__PURE__ */ e("p", {
1435
+ s && /* @__PURE__ */ t("p", {
1044
1436
  id: x,
1045
1437
  className: "font-secondary text-error text-small",
1046
- children: u
1438
+ children: c
1047
1439
  })
1048
1440
  ]
1049
1441
  });
1050
- }, ct = v([
1442
+ }, pn = y([
1051
1443
  "flex flex-col gap-[var(--space-stack)]",
1052
1444
  "[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
1053
1445
  "[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
1054
1446
  "[&>p]:font-secondary [&>p]:text-small [&>p]:text-muted [&>p[data-error]]:text-error",
1055
1447
  "[&>select]:block [&>select]:w-full [&>select]:rounded-[var(--radius-control)] [&>select]:border [&>select]:border-solid [&>select]:border-control-border [&>select]:bg-transparent [&>select]:px-3 [&>select]:py-2",
1056
- "[&>select]:font-primary [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
1448
+ "[&>select]:font-control [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
1057
1449
  "[&>select]:outline-focus-ring [&>select]:outline-offset-[var(--focus-ring-offset)] [&>select]:focus-visible:outline [&>select]:focus-visible:outline-[length:var(--focus-ring-width)]",
1058
1450
  "[&>select:user-invalid]:border-error [&>select]:aria-[invalid=true]:border-error [&>select]:disabled:cursor-not-allowed [&>select]:disabled:border-disabled [&>select]:disabled:text-muted"
1059
- ].join(" ")), lt = {
1060
- Root: ({ label: n, name: r, required: i, optionalLabel: a, disabled: o, invalid: s, hint: c, errorMessage: u, testId: d, defaultValue: f, onChange$: p, placeholder: m, children: h }) => {
1061
- let g = l(), _ = `${g}-control`, v = `${g}-hint`, y = `${g}-error`, b = [c ? v : void 0, s && u ? y : void 0].filter(Boolean).join(" ") || void 0;
1062
- return /* @__PURE__ */ t("div", {
1063
- className: ct(),
1451
+ ].join(" ")), mn = {
1452
+ 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
+ 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
+ return /* @__PURE__ */ n("div", {
1455
+ className: pn(),
1064
1456
  children: [
1065
- /* @__PURE__ */ e("label", {
1457
+ /* @__PURE__ */ t("label", {
1066
1458
  htmlFor: _,
1067
- children: n
1459
+ children: e
1068
1460
  }),
1069
- /* @__PURE__ */ t("select", {
1461
+ /* @__PURE__ */ n("select", {
1070
1462
  id: _,
1071
1463
  name: r,
1072
1464
  required: i,
@@ -1076,34 +1468,34 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1076
1468
  "aria-describedby": b,
1077
1469
  "data-testid": d,
1078
1470
  onChange: (e) => !o && p?.next(e.currentTarget.value),
1079
- children: [/* @__PURE__ */ e("option", {
1471
+ children: [/* @__PURE__ */ t("option", {
1080
1472
  value: "",
1081
1473
  children: m
1082
1474
  }), h]
1083
1475
  }),
1084
- !i && a && /* @__PURE__ */ e("span", { children: a }),
1085
- c && /* @__PURE__ */ e("p", {
1476
+ !i && a && /* @__PURE__ */ t("span", { children: a }),
1477
+ c && /* @__PURE__ */ t("p", {
1086
1478
  id: v,
1087
1479
  children: c
1088
1480
  }),
1089
- s && u && /* @__PURE__ */ e("p", {
1481
+ s && l && /* @__PURE__ */ t("p", {
1090
1482
  id: y,
1091
1483
  "data-error": !0,
1092
- children: u
1484
+ children: l
1093
1485
  })
1094
1486
  ]
1095
1487
  });
1096
1488
  },
1097
- Option: ({ value: t, children: n, testId: r }) => /* @__PURE__ */ e("option", {
1098
- value: t,
1489
+ Option: ({ value: e, children: n, testId: r }) => /* @__PURE__ */ t("option", {
1490
+ value: e,
1099
1491
  "data-testid": r,
1100
1492
  children: n
1101
1493
  })
1102
- }, X = class extends Error {
1494
+ }, Z = class extends Error {
1103
1495
  constructor(e) {
1104
1496
  super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
1105
1497
  }
1106
- }, ut = v([
1498
+ }, hn = y([
1107
1499
  "block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
1108
1500
  "disabled:cursor-not-allowed",
1109
1501
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -1114,202 +1506,202 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1114
1506
  "[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
1115
1507
  "[&::-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",
1116
1508
  "[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
1117
- ].join(" ")), dt = (e) => {
1118
- for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new X(`\`${t}\` must be a finite number, got ${n}`);
1119
- if (e.min >= e.max) throw new X(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
1120
- if (e.step <= 0) throw new X(`\`step\` (${e.step}) must be positive`);
1121
- if (e.value < e.min || e.value > e.max) throw new X(`\`value\` (${e.value}) must lie within [${e.min}, ${e.max}]`);
1122
- }, ft = ({ min: n, max: r, step: i = 1, value: a, onInput$: o, label: s, valueText: c, disabled: u, testId: d }) => {
1123
- let f = `${l()}-control`;
1124
- return dt({
1125
- min: n,
1509
+ ].join(" ")), gn = (e) => {
1510
+ for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new Z(`\`${t}\` must be a finite number, got ${n}`);
1511
+ if (e.min >= e.max) throw new Z(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
1512
+ if (e.step <= 0) throw new Z(`\`step\` (${e.step}) must be positive`);
1513
+ if (e.value < e.min || e.value > e.max) throw new Z(`\`value\` (${e.value}) must lie within [${e.min}, ${e.max}]`);
1514
+ }, _n = ({ min: e, max: r, step: i = 1, value: a, onInput$: o, label: s, valueText: c, disabled: l, testId: d }) => {
1515
+ let f = `${u()}-control`;
1516
+ return gn({
1517
+ min: e,
1126
1518
  max: r,
1127
1519
  step: i,
1128
1520
  value: a
1129
- }), /* @__PURE__ */ t("div", {
1521
+ }), /* @__PURE__ */ n("div", {
1130
1522
  className: "flex flex-col gap-[var(--space-stack)]",
1131
- children: [/* @__PURE__ */ e("label", {
1523
+ children: [/* @__PURE__ */ t("label", {
1132
1524
  htmlFor: f,
1133
1525
  className: "font-secondary font-medium text-body text-foreground",
1134
1526
  children: s
1135
- }), /* @__PURE__ */ e("input", {
1527
+ }), /* @__PURE__ */ t("input", {
1136
1528
  id: f,
1137
1529
  type: "range",
1138
- className: ut(),
1139
- min: n,
1530
+ className: hn(),
1531
+ min: e,
1140
1532
  max: r,
1141
1533
  step: i,
1142
1534
  value: a,
1143
- disabled: u,
1535
+ disabled: l,
1144
1536
  "aria-valuetext": c,
1145
1537
  "data-testid": d,
1146
1538
  onChange: (e) => o.next(e.currentTarget.valueAsNumber)
1147
1539
  })]
1148
1540
  });
1149
- }, pt = class extends Error {
1541
+ }, vn = class extends Error {
1150
1542
  constructor(e) {
1151
1543
  super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
1152
1544
  }
1153
- }, mt = v([
1545
+ }, yn = y([
1154
1546
  "flex flex-row overflow-x-auto",
1155
1547
  "p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
1156
1548
  "m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
1157
1549
  "scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
1158
- ].join(" ")), ht = v([
1550
+ ].join(" ")), bn = y([
1159
1551
  "font-secondary text-label tracking-label",
1160
1552
  "text-muted hover:text-foreground aria-selected:text-foreground",
1161
1553
  "border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
1162
- "shrink-0 cursor-pointer select-none text-nowrap px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
1554
+ "cursor-pointer select-none px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
1163
1555
  "transition-colors duration-[var(--motion-duration-color)]",
1164
1556
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
1165
- ].join(" ")), gt = v("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), _t = i(void 0), Z = (e) => {
1166
- let t = s(_t);
1167
- if (t === void 0) throw new pt(e);
1557
+ ].join(" ")), xn = y("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), Sn = a(void 0), Cn = (e) => {
1558
+ let t = c(Sn);
1559
+ if (t === void 0) throw new vn(e);
1168
1560
  return t;
1169
- }, vt = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), yt = (e) => {
1561
+ }, wn = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), Tn = (e) => {
1170
1562
  e.currentTarget.scrollIntoView({
1171
1563
  block: "nearest",
1172
1564
  inline: "nearest"
1173
1565
  });
1174
- }, bt = (e, t) => `${e}tab-${vt(t)}`, xt = (e, t) => `${e}panel-${vt(t)}`, St = (e, t) => {
1566
+ }, En = (e, t) => `${e}tab-${wn(t)}`, Dn = (e, t) => `${e}panel-${wn(t)}`, On = (e, t) => {
1175
1567
  let n = e.closest("[role=\"tablist\"]");
1176
1568
  if (n === null) return;
1177
1569
  let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
1178
1570
  return r[(r.indexOf(e) + t + r.length) % r.length];
1179
- }, Ct = {
1180
- Root: ({ active: t, onSelect$: n, label: r, children: i, testId: a }) => {
1181
- let o = l();
1182
- return /* @__PURE__ */ e(_t.Provider, {
1571
+ }, kn = {
1572
+ Root: ({ active: e, onSelect$: n, label: r, children: i, testId: a }) => {
1573
+ let o = u();
1574
+ return /* @__PURE__ */ t(Sn.Provider, {
1183
1575
  value: {
1184
- active: t,
1576
+ active: e,
1185
1577
  onSelect$: n,
1186
1578
  label: r,
1187
1579
  baseId: o
1188
1580
  },
1189
- children: /* @__PURE__ */ e("div", {
1581
+ children: /* @__PURE__ */ t("div", {
1190
1582
  "data-testid": a,
1191
1583
  children: i
1192
1584
  })
1193
1585
  });
1194
1586
  },
1195
- List: ({ children: t, testId: n }) => {
1196
- let { label: r } = Z("List");
1197
- return /* @__PURE__ */ e("div", {
1587
+ List: ({ children: e, testId: n }) => {
1588
+ let { label: r } = Cn("List");
1589
+ return /* @__PURE__ */ t("div", {
1198
1590
  role: "tablist",
1199
1591
  "aria-label": r,
1200
- className: mt(),
1592
+ className: yn(),
1201
1593
  "data-testid": n,
1202
- children: t
1594
+ children: e
1203
1595
  });
1204
1596
  },
1205
- Tab: ({ value: t, children: n, testId: r }) => {
1206
- let { active: i, onSelect$: a, baseId: o } = Z("Tab"), s = i === t;
1207
- return /* @__PURE__ */ e("button", {
1597
+ Tab: ({ value: e, children: n, testId: r }) => {
1598
+ let { active: i, onSelect$: a, baseId: o } = Cn("Tab"), s = i === e;
1599
+ return /* @__PURE__ */ t("button", {
1208
1600
  type: "button",
1209
1601
  role: "tab",
1210
- id: bt(o, t),
1602
+ id: En(o, e),
1211
1603
  "aria-selected": s,
1212
- "aria-controls": xt(o, t),
1604
+ "aria-controls": Dn(o, e),
1213
1605
  tabIndex: s ? 0 : -1,
1214
- "data-value": t,
1606
+ "data-value": e,
1215
1607
  "data-testid": r,
1216
- className: ht(),
1217
- onClick: () => a.next(t),
1608
+ className: bn(),
1609
+ onClick: () => a.next(e),
1218
1610
  onKeyDown: (e) => {
1219
1611
  if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
1220
1612
  e.preventDefault();
1221
- let t = St(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
1613
+ let t = On(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
1222
1614
  if (t === void 0) return;
1223
1615
  t.focus();
1224
1616
  let n = t.dataset.value;
1225
1617
  n !== void 0 && a.next(n);
1226
1618
  },
1227
- onFocus: yt,
1619
+ onFocus: Tn,
1228
1620
  children: n
1229
1621
  });
1230
1622
  },
1231
- Panel: ({ value: t, children: n, testId: r }) => {
1232
- let { active: i, baseId: a } = Z("Panel"), o = i === t;
1233
- return /* @__PURE__ */ e("div", {
1623
+ Panel: ({ value: e, children: n, testId: r }) => {
1624
+ let { active: i, baseId: a } = Cn("Panel"), o = i === e;
1625
+ return /* @__PURE__ */ t("div", {
1234
1626
  role: "tabpanel",
1235
- id: xt(a, t),
1236
- "aria-labelledby": bt(a, t),
1627
+ id: Dn(a, e),
1628
+ "aria-labelledby": En(a, e),
1237
1629
  hidden: !o,
1238
1630
  tabIndex: o ? 0 : void 0,
1239
- className: gt(),
1631
+ className: xn(),
1240
1632
  "data-testid": r,
1241
1633
  children: o ? n : void 0
1242
1634
  });
1243
1635
  }
1244
- }, wt = v("block min-h-24 w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-primary text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted"), Tt = ({ label: n, name: r, required: i, optionalLabel: a, invalid: o, disabled: s, defaultValue: u, placeholder: d, autocomplete: p, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
1245
- let y = l(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, o ? S : void 0].filter(Boolean).join(" ") || void 0, w = f(null);
1246
- return c(() => {
1636
+ }, An = 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"), jn = ({ 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
+ 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
+ return l(() => {
1247
1639
  let e = _?.subscribe(() => {
1248
1640
  w.current && (w.current.value = "");
1249
1641
  });
1250
1642
  return () => e?.unsubscribe();
1251
- }, [_]), /* @__PURE__ */ t("div", {
1643
+ }, [_]), /* @__PURE__ */ n("div", {
1252
1644
  className: "flex flex-col gap-[var(--space-stack)]",
1253
1645
  children: [
1254
- /* @__PURE__ */ e("label", {
1646
+ /* @__PURE__ */ t("label", {
1255
1647
  htmlFor: b,
1256
1648
  className: "font-secondary font-medium text-body text-foreground",
1257
- children: n
1649
+ children: e
1258
1650
  }),
1259
- /* @__PURE__ */ e("textarea", {
1651
+ /* @__PURE__ */ t("textarea", {
1260
1652
  ref: w,
1261
1653
  id: b,
1262
1654
  name: r,
1263
- className: wt(),
1655
+ className: An(),
1264
1656
  required: i,
1265
1657
  disabled: s,
1266
- defaultValue: u,
1658
+ defaultValue: c,
1267
1659
  placeholder: d,
1268
- autoComplete: p,
1660
+ autoComplete: f,
1269
1661
  "aria-invalid": o || void 0,
1270
1662
  "aria-describedby": C,
1271
1663
  "data-testid": v,
1272
1664
  onInput: (e) => g?.next(e.currentTarget.value)
1273
1665
  }),
1274
- !i && a && /* @__PURE__ */ e("span", {
1666
+ !i && a && /* @__PURE__ */ t("span", {
1275
1667
  className: "font-secondary text-muted text-small",
1276
1668
  children: a
1277
1669
  }),
1278
- m && /* @__PURE__ */ e("p", {
1670
+ m && /* @__PURE__ */ t("p", {
1279
1671
  id: x,
1280
1672
  className: "font-secondary text-muted text-small",
1281
1673
  children: m
1282
1674
  }),
1283
- o && /* @__PURE__ */ e("p", {
1675
+ o && /* @__PURE__ */ t("p", {
1284
1676
  id: S,
1285
1677
  className: "font-secondary text-error text-small",
1286
1678
  children: h
1287
1679
  })
1288
1680
  ]
1289
1681
  });
1290
- }, Et = v([
1682
+ }, Mn = y([
1291
1683
  "flex flex-col items-center",
1292
1684
  "min-h-[var(--cover-height)]",
1293
1685
  "px-[var(--gutter)] py-[var(--space-region)]"
1294
- ].join(" ")), Dt = "my-auto max-w-full", Ot = ({ children: n, foot: r, testId: i }) => {
1686
+ ].join(" ")), Nn = "my-auto max-w-full", Pn = ({ children: e, foot: r, testId: i }) => {
1295
1687
  let a = r != null && typeof r != "boolean";
1296
- return /* @__PURE__ */ t("div", {
1297
- className: Et(),
1688
+ return /* @__PURE__ */ n("div", {
1689
+ className: Mn(),
1298
1690
  "data-testid": i,
1299
- children: [/* @__PURE__ */ e("div", {
1300
- className: Dt,
1301
- children: n
1302
- }), a && /* @__PURE__ */ e("div", { children: r })]
1691
+ children: [/* @__PURE__ */ t("div", {
1692
+ className: Nn,
1693
+ children: e
1694
+ }), a && /* @__PURE__ */ t("div", { children: r })]
1303
1695
  });
1304
- }, kt = class extends Error {
1696
+ }, Fn = class extends Error {
1305
1697
  constructor(e) {
1306
1698
  super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
1307
1699
  }
1308
- }, At = class extends Error {
1700
+ }, In = class extends Error {
1309
1701
  constructor() {
1310
1702
  super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
1311
1703
  }
1312
- }, jt = v([
1704
+ }, Ln = y([
1313
1705
  "open:flex open:flex-col m-auto p-0 overflow-hidden",
1314
1706
  "bg-surface text-foreground",
1315
1707
  "rounded-[var(--radius-dialog)] shadow-[var(--elevation-floating)]",
@@ -1320,61 +1712,61 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1320
1712
  content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
1321
1713
  } },
1322
1714
  defaultVariants: { extent: "screen" }
1323
- }), Mt = v(["px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[&:has(+[data-dialog-member=description])]:pb-0"].join(" ")), Nt = v(["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(" ")), Pt = v([
1715
+ }), Rn = y(["px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[&:has(+[data-dialog-member=description])]:pb-0"].join(" ")), zn = 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(" ")), Bn = y([
1324
1716
  "grow shrink min-h-0 overflow-y-auto",
1325
1717
  "px-[var(--space-region)] py-[var(--space-region)]",
1326
1718
  "[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
1327
- ].join(" ")), Ft = v([
1719
+ ].join(" ")), Vn = y([
1328
1720
  "flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
1329
1721
  "px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
1330
1722
  "[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
1331
- ].join(" ")), It = i(void 0), Q = (e) => {
1332
- let t = s(It);
1333
- if (t === void 0) throw new kt(e);
1723
+ ].join(" ")), Hn = a(void 0), Q = (e) => {
1724
+ let t = c(Hn);
1725
+ if (t === void 0) throw new Fn(e);
1334
1726
  return t;
1335
- }, Lt = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", Rt = (e, { presented: t, opener: n }) => {
1727
+ }, Un = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", Wn = (e, { presented: t, opener: n }) => {
1336
1728
  if (e === void 0 || e.open) return;
1337
1729
  let r = document.activeElement;
1338
- n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(Lt)?.focus();
1730
+ n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(Un)?.focus();
1339
1731
  }, $ = (e, { presented: t }) => {
1340
1732
  t.current = !1, e?.open && e.close();
1341
- }, zt = {
1342
- Root: ({ children: t, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: s }) => {
1343
- let u = l(), d = f(void 0), m = f(!1), h = f(void 0), [g] = p(() => ({
1344
- presented: m,
1733
+ }, Gn = {
1734
+ Root: ({ children: e, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: o }) => {
1735
+ let c = u(), d = p(void 0), f = p(!1), h = p(void 0), [g] = m(() => ({
1736
+ presented: f,
1345
1737
  opener: h
1346
- })), [_, v] = p({
1738
+ })), [_, v] = m({
1347
1739
  title: !1,
1348
1740
  description: !1
1349
- }), y = o((e) => (v((t) => ({
1741
+ }), y = s((e) => (v((t) => ({
1350
1742
  ...t,
1351
1743
  [e]: !0
1352
1744
  })), () => v((t) => ({
1353
1745
  ...t,
1354
1746
  [e]: !1
1355
1747
  }))), []), b = {
1356
- titleId: `${u}title`,
1357
- descriptionId: `${u}description`,
1748
+ titleId: `${c}title`,
1749
+ descriptionId: `${c}description`,
1358
1750
  isLabelled: a !== void 0,
1359
1751
  registerNamePart: y
1360
1752
  }, x = () => {
1361
1753
  n.next(), r === void 0 ? $(d.current, g) : r.next(!1);
1362
1754
  };
1363
- return c(() => {
1364
- if (r === void 0) return Rt(d.current, g), () => $(d.current, g);
1755
+ return l(() => {
1756
+ if (r === void 0) return Wn(d.current, g), () => $(d.current, g);
1365
1757
  let e = r.subscribe((e) => {
1366
- e ? Rt(d.current, g) : $(d.current, g);
1758
+ e ? Wn(d.current, g) : $(d.current, g);
1367
1759
  });
1368
1760
  return () => {
1369
1761
  e.unsubscribe(), $(d.current, g);
1370
1762
  };
1371
- }, [r, g]), /* @__PURE__ */ e(It.Provider, {
1763
+ }, [r, g]), /* @__PURE__ */ t(Hn.Provider, {
1372
1764
  value: b,
1373
- children: /* @__PURE__ */ e("dialog", {
1765
+ children: /* @__PURE__ */ t("dialog", {
1374
1766
  ref: (e) => {
1375
1767
  d.current = e ?? void 0, e?.setAttribute("headingreset", "");
1376
1768
  },
1377
- className: jt({ extent: i }),
1769
+ className: Ln({ extent: i }),
1378
1770
  "aria-label": a,
1379
1771
  "aria-labelledby": a === void 0 && _.title ? b.titleId : void 0,
1380
1772
  "aria-describedby": _.description ? b.descriptionId : void 0,
@@ -1387,66 +1779,66 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1387
1779
  },
1388
1780
  onClose: () => {
1389
1781
  if (d.current?.open) return;
1390
- let e = m.current;
1391
- m.current = !1;
1782
+ let e = f.current;
1783
+ f.current = !1;
1392
1784
  let t = h.current;
1393
- h.current = void 0, t?.isConnected && (t.matches(Lt) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
1785
+ h.current = void 0, t?.isConnected && (t.matches(Un) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
1394
1786
  },
1395
- "data-testid": s,
1396
- children: t
1787
+ "data-testid": o,
1788
+ children: e
1397
1789
  })
1398
1790
  });
1399
1791
  },
1400
- Title: ({ children: t, testId: n }) => {
1792
+ Title: ({ children: e, testId: n }) => {
1401
1793
  let { titleId: r, isLabelled: i, registerNamePart: a } = Q("Title");
1402
- if (c(() => a("title"), [a]), i) throw new At();
1403
- return /* @__PURE__ */ e("div", {
1794
+ if (l(() => a("title"), [a]), i) throw new In();
1795
+ return /* @__PURE__ */ t("div", {
1404
1796
  "data-dialog-member": "title",
1405
- className: Mt(),
1797
+ className: Rn(),
1406
1798
  "data-testid": n,
1407
- children: /* @__PURE__ */ e("h1", {
1799
+ children: /* @__PURE__ */ t("h1", {
1408
1800
  id: r,
1409
- className: "font-primary text-dialog-title leading-dialog-title text-foreground",
1410
- children: t
1801
+ className: "font-heading text-dialog-title leading-dialog-title text-foreground",
1802
+ children: e
1411
1803
  })
1412
1804
  });
1413
1805
  },
1414
- Description: ({ children: t, testId: n }) => {
1806
+ Description: ({ children: e, testId: n }) => {
1415
1807
  let { descriptionId: r, registerNamePart: i } = Q("Description");
1416
- return c(() => i("description"), [i]), /* @__PURE__ */ e("div", {
1808
+ return l(() => i("description"), [i]), /* @__PURE__ */ t("div", {
1417
1809
  "data-dialog-member": "description",
1418
- className: Nt(),
1810
+ className: zn(),
1419
1811
  "data-testid": n,
1420
- children: /* @__PURE__ */ e("p", {
1812
+ children: /* @__PURE__ */ t("p", {
1421
1813
  id: r,
1422
- className: "font-primary text-body leading-body text-foreground",
1423
- children: t
1814
+ className: "font-body text-body leading-body text-foreground",
1815
+ children: e
1424
1816
  })
1425
1817
  });
1426
1818
  },
1427
- Content: ({ children: t, testId: n }) => (Q("Content"), /* @__PURE__ */ e("div", {
1819
+ Content: ({ children: e, testId: n }) => (Q("Content"), /* @__PURE__ */ t("div", {
1428
1820
  "data-dialog-member": "content",
1429
- className: Pt(),
1821
+ className: Bn(),
1430
1822
  "data-testid": n,
1431
- children: t
1823
+ children: e
1432
1824
  })),
1433
- Actions: ({ children: t, testId: n }) => (Q("Actions"), /* @__PURE__ */ e("div", {
1825
+ Actions: ({ children: e, testId: n }) => (Q("Actions"), /* @__PURE__ */ t("div", {
1434
1826
  "data-dialog-member": "actions",
1435
- className: Ft(),
1827
+ className: Vn(),
1436
1828
  "data-testid": n,
1437
- children: t
1829
+ children: e
1438
1830
  }))
1439
- }, Bt = v("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
1831
+ }, Kn = y("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
1440
1832
  variants: { edge: {
1441
1833
  none: "",
1442
1834
  rule: "border-t border-solid border-rule"
1443
1835
  } },
1444
1836
  defaultVariants: { edge: "rule" }
1445
- }), Vt = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
1446
- className: Bt({ edge: t }),
1837
+ }), qn = ({ edge: e, children: n, testId: r }) => /* @__PURE__ */ t("footer", {
1838
+ className: Kn({ edge: e }),
1447
1839
  "data-testid": r,
1448
1840
  children: n
1449
- }), Ht = v("font-secondary text-small", {
1841
+ }), Jn = y("font-secondary text-small", {
1450
1842
  variants: { state: {
1451
1843
  idle: "text-muted",
1452
1844
  sending: "text-muted",
@@ -1454,90 +1846,159 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1454
1846
  failed: "text-error"
1455
1847
  } },
1456
1848
  defaultVariants: { state: "idle" }
1457
- }), Ut = {
1849
+ }), Yn = {
1458
1850
  sent: "status",
1459
1851
  failed: "alert"
1460
- }, Wt = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
1852
+ }, Xn = ({ action: e, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
1461
1853
  let l = s != null && typeof s != "boolean";
1462
1854
  if (i === "sent" && !l) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
1463
- let u = i !== "sent", d = Ut[i];
1464
- return /* @__PURE__ */ t("form", {
1465
- action: n,
1855
+ let u = i !== "sent", d = Yn[i];
1856
+ return /* @__PURE__ */ n("form", {
1857
+ action: e,
1466
1858
  method: r,
1467
1859
  "aria-busy": i === "sending" || void 0,
1468
1860
  "data-testid": c,
1469
1861
  className: "flex max-w-[var(--measure)] flex-col gap-[var(--space-region)]",
1470
1862
  children: [
1471
- u && /* @__PURE__ */ e("div", {
1863
+ u && /* @__PURE__ */ t("div", {
1472
1864
  className: "flex flex-col gap-[var(--space-stack)]",
1473
1865
  children: a
1474
1866
  }),
1475
- u && o && /* @__PURE__ */ e("div", {
1867
+ u && o && /* @__PURE__ */ t("div", {
1476
1868
  className: "flex flex-row gap-[var(--space-stack)]",
1477
1869
  children: o
1478
1870
  }),
1479
- l && /* @__PURE__ */ e("p", {
1871
+ l && /* @__PURE__ */ t("p", {
1480
1872
  role: d,
1481
- className: Ht({ state: i }),
1873
+ className: Jn({ state: i }),
1482
1874
  children: s
1483
1875
  })
1484
1876
  ]
1485
1877
  });
1486
- }, Gt = v([
1487
- "flex items-baseline justify-between",
1878
+ }, Zn = y([
1879
+ "flex items-baseline",
1488
1880
  "font-secondary text-label leading-label tracking-label text-muted",
1489
1881
  "py-[var(--space-region)] px-[var(--gutter)]",
1490
1882
  "[&_[aria-current=page]]:text-foreground"
1491
1883
  ].join(" "), {
1492
- variants: { edge: {
1493
- none: "",
1494
- rule: "border-b border-solid border-rule"
1495
- } },
1496
- defaultVariants: { edge: "rule" }
1497
- }), Kt = [
1884
+ variants: {
1885
+ edge: {
1886
+ none: "",
1887
+ rule: "border-b border-solid border-rule"
1888
+ },
1889
+ mode: {
1890
+ navigation: "justify-between",
1891
+ statusAction: "flex-wrap gap-x-[var(--space-region)] gap-y-[var(--space-stack)]"
1892
+ }
1893
+ },
1894
+ defaultVariants: {
1895
+ edge: "rule",
1896
+ mode: "navigation"
1897
+ }
1898
+ }), Qn = [
1498
1899
  "inline-flex shrink-0 items-center",
1499
1900
  "min-h-[calc(var(--text-label)*var(--leading-label))]",
1500
1901
  "min-w-[var(--standing-min-width)]"
1501
- ].join(" "), qt = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
1502
- className: Gt({ edge: n }),
1503
- "data-testid": o,
1504
- children: [/* @__PURE__ */ e("div", {
1505
- className: Kt,
1506
- children: r
1507
- }), /* @__PURE__ */ e("nav", {
1508
- "aria-label": i,
1509
- className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
1510
- children: a
1511
- })]
1512
- }), Jt = v("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
1902
+ ].join(" "), $n = "flex flex-wrap items-baseline gap-[var(--space-region)]", er = "min-w-0 wrap-anywhere", tr = "ms-auto", nr = (e) => e != null && typeof e != "boolean" && e !== "", rr = ({ edge: r, testId: i, standing: a, navName: o, children: s, status: c, action: l }) => {
1903
+ let u = c !== void 0 || l !== void 0;
1904
+ return /* @__PURE__ */ t("header", {
1905
+ className: Zn({
1906
+ edge: r,
1907
+ mode: u ? "statusAction" : "navigation"
1908
+ }),
1909
+ "data-testid": i,
1910
+ children: u ? /* @__PURE__ */ n(e, { children: [nr(c) && /* @__PURE__ */ t("div", {
1911
+ className: er,
1912
+ children: c
1913
+ }), nr(l) && /* @__PURE__ */ t("div", {
1914
+ className: tr,
1915
+ children: l
1916
+ })] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
1917
+ className: Qn,
1918
+ children: a
1919
+ }), /* @__PURE__ */ t("nav", {
1920
+ "aria-label": o,
1921
+ className: $n,
1922
+ children: s
1923
+ })] })
1924
+ });
1925
+ }, ir = y("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
1513
1926
  variants: { place: {
1514
1927
  start: "justify-start",
1515
1928
  center: "justify-center",
1516
1929
  between: "justify-between"
1517
1930
  } },
1518
1931
  defaultVariants: { place: "center" }
1519
- }), Yt = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
1520
- className: Jt({ place: t }),
1932
+ }), ar = ({ place: e, children: n, testId: r }) => /* @__PURE__ */ t("div", {
1933
+ className: ir({ place: e }),
1521
1934
  "data-testid": r,
1522
1935
  children: n
1523
- }), Xt = v("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), Zt = v("font-primary text-title leading-title tracking-optical text-foreground"), Qt = v("font-primary text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), $t = v("font-primary text-small text-muted max-w-[var(--measure)]"), en = ({ title: n, lede: r, intro: i, testId: a }) => /* @__PURE__ */ t("header", {
1524
- className: Xt(),
1936
+ }), or = y("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), sr = y("font-heading text-title leading-title tracking-optical text-foreground"), cr = y("font-body text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), lr = y("font-body text-small text-muted max-w-[var(--measure)]"), ur = ({ title: e, lede: r, intro: i, testId: a }) => /* @__PURE__ */ n("header", {
1937
+ className: or(),
1525
1938
  "data-testid": a,
1526
1939
  children: [
1527
- /* @__PURE__ */ e("h1", {
1528
- className: Zt(),
1529
- children: n
1940
+ /* @__PURE__ */ t("h1", {
1941
+ className: sr(),
1942
+ children: e
1530
1943
  }),
1531
- r !== void 0 && /* @__PURE__ */ e("p", {
1532
- className: Qt(),
1944
+ r !== void 0 && /* @__PURE__ */ t("p", {
1945
+ className: cr(),
1533
1946
  children: r
1534
1947
  }),
1535
- i !== void 0 && /* @__PURE__ */ e("p", {
1536
- className: $t(),
1948
+ i !== void 0 && /* @__PURE__ */ t("p", {
1949
+ className: lr(),
1537
1950
  children: i
1538
1951
  })
1539
1952
  ]
1540
- }), tn = v([
1953
+ }), dr = 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
+ variants: { axis: {
1955
+ both: "overflow-auto",
1956
+ horizontal: "overflow-x-auto overflow-y-hidden",
1957
+ vertical: "overflow-y-auto overflow-x-hidden"
1958
+ } },
1959
+ defaultVariants: { axis: "both" }
1960
+ }), fr = y("p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]", {
1961
+ variants: { axis: {
1962
+ both: "w-fit min-w-full",
1963
+ horizontal: "w-fit min-w-full",
1964
+ vertical: "w-full"
1965
+ } },
1966
+ defaultVariants: { axis: "both" }
1967
+ }), pr = (e, t) => {
1968
+ let n = e.scrollWidth > e.clientWidth, r = e.scrollHeight > e.clientHeight;
1969
+ return t !== "vertical" && n || t !== "horizontal" && r;
1970
+ }, mr = (e, t, n) => {
1971
+ let [r, i] = m(!0);
1972
+ return d(() => {
1973
+ let r = e.current;
1974
+ if (r === null) return;
1975
+ let a = () => i(pr(r, n) || r === document.activeElement);
1976
+ a();
1977
+ let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
1978
+ return o?.observe(r), t.current !== null && o?.observe(t.current), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
1979
+ o?.disconnect(), window.removeEventListener("resize", a), r.removeEventListener("blur", a);
1980
+ };
1981
+ }, [
1982
+ e,
1983
+ t,
1984
+ n
1985
+ ]), r;
1986
+ }, hr = ({ axis: e, ariaLabel: n, children: r, testId: i }) => {
1987
+ let a = p(null), o = p(null), s = mr(a, o, e ?? "both");
1988
+ return /* @__PURE__ */ t("div", {
1989
+ ref: a,
1990
+ className: dr({ axis: e }),
1991
+ "data-testid": i,
1992
+ role: s ? "group" : void 0,
1993
+ "aria-label": s ? n : void 0,
1994
+ tabIndex: s ? 0 : void 0,
1995
+ children: /* @__PURE__ */ t("div", {
1996
+ ref: o,
1997
+ className: fr({ axis: e }),
1998
+ children: r
1999
+ })
2000
+ });
2001
+ }, gr = y([
1541
2002
  "relative",
1542
2003
  "py-[var(--space-band)]",
1543
2004
  "[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
@@ -1547,20 +2008,20 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1547
2008
  full: ""
1548
2009
  } },
1549
2010
  defaultVariants: { bleed: "inset" }
1550
- }), nn = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
2011
+ }), _r = ({ bleed: e, name: n, children: r, testId: i }) => /* @__PURE__ */ t("section", {
1551
2012
  "data-section": "",
1552
- className: tn({ bleed: t }),
2013
+ className: gr({ bleed: e }),
1553
2014
  "aria-label": n,
1554
2015
  "data-testid": i,
1555
2016
  children: r
1556
- }), rn = v([
2017
+ }), vr = y([
1557
2018
  "grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
1558
2019
  "[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
1559
2020
  "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)]",
1560
2021
  "lg:[&>div:first-child>nav]:sticky lg:[&>div:first-child>nav]:top-0 lg:[&>div:first-child>nav]:max-h-[min(100dvh,var(--sidebar-scrollport-height,100dvh))] lg:[&>div:first-child>nav]:overflow-y-auto",
1561
2022
  "[&>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))]",
1562
2023
  "[&>div:first-child>nav>ul]:flex [&>div:first-child>nav>ul]:flex-col [&>div:first-child>nav>ul]:gap-[var(--space-stack)]"
1563
- ].join(" ")), an = (e) => {
2024
+ ].join(" ")), yr = (e) => {
1564
2025
  if (!e) return;
1565
2026
  let t = [];
1566
2027
  for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
@@ -1574,8 +2035,8 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1574
2035
  return window.addEventListener("resize", n), () => {
1575
2036
  r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
1576
2037
  };
1577
- }, on = v([
1578
- "w-full text-left font-secondary text-label tracking-label",
2038
+ }, br = y([
2039
+ "w-full text-left font-secondary text-label tracking-label wrap-anywhere",
1579
2040
  "underline-offset-[var(--underline-offset)]",
1580
2041
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
1581
2042
  ].join(" "), {
@@ -1585,44 +2046,44 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1585
2046
  inert: "text-muted cursor-not-allowed"
1586
2047
  } },
1587
2048
  defaultVariants: { state: "usable" }
1588
- }), sn = i(void 0), cn = ({ entryKey: t, children: n, inert: r, testId: i }) => {
1589
- let a = s(sn), o = a !== void 0 && a.active === t;
1590
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", {
2049
+ }), xr = a(void 0), Sr = ({ entryKey: e, children: n, inert: r, testId: i }) => {
2050
+ let a = c(xr), o = a !== void 0 && a.active === e;
2051
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", {
1591
2052
  type: "button",
1592
- className: on({ state: r ? "inert" : o ? "active" : "usable" }),
2053
+ className: br({ state: r ? "inert" : o ? "active" : "usable" }),
1593
2054
  disabled: r,
1594
2055
  "aria-current": o ? "true" : void 0,
1595
2056
  "data-testid": i,
1596
2057
  onClick: () => {
1597
- o || a?.onSelect$.next(t);
2058
+ o || a?.onSelect$.next(e);
1598
2059
  },
1599
2060
  children: n
1600
2061
  }) });
1601
- }, ln = ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
2062
+ }, Cr = ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
1602
2063
  "data-testid": n,
1603
- children: t
1604
- }), un = {
1605
- Root: ({ active: r, label: i, onSelect$: o, children: s, testId: c }) => {
1606
- let l = n.toArray(s).filter(a);
1607
- return /* @__PURE__ */ t("div", {
1608
- className: rn(),
2064
+ children: e
2065
+ }), wr = {
2066
+ Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c }) => {
2067
+ let l = r.toArray(s).filter(o);
2068
+ return /* @__PURE__ */ n("div", {
2069
+ className: vr(),
1609
2070
  "data-testid": c,
1610
- children: [/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("nav", {
1611
- ref: an,
2071
+ children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("nav", {
2072
+ ref: yr,
1612
2073
  "aria-label": i,
1613
- children: /* @__PURE__ */ e(sn, {
2074
+ children: /* @__PURE__ */ t(xr, {
1614
2075
  value: {
1615
- active: r,
1616
- onSelect$: o
2076
+ active: e,
2077
+ onSelect$: a
1617
2078
  },
1618
- children: /* @__PURE__ */ e("ul", { children: l.filter((e) => e.type === cn) })
2079
+ children: /* @__PURE__ */ t("ul", { children: l.filter((e) => e.type === Sr) })
1619
2080
  })
1620
- }) }), l.filter((e) => e.type === ln)]
2081
+ }) }), l.filter((e) => e.type === Cr)]
1621
2082
  });
1622
2083
  },
1623
- Item: cn,
1624
- Content: ln
1625
- }, dn = {
2084
+ Item: Sr,
2085
+ Content: Cr
2086
+ }, Tr = {
1626
2087
  surface: "#ffffff",
1627
2088
  foreground: "#0f172a",
1628
2089
  muted: "#64748b",
@@ -1646,8 +2107,10 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1646
2107
  success: "#047857",
1647
2108
  warning: "#b45309",
1648
2109
  error: "#d63384",
2110
+ errorHover: "#be185d",
2111
+ errorForeground: "#ffffff",
1649
2112
  info: "#0e7490"
1650
- }, fn = {
2113
+ }, Er = {
1651
2114
  surface: "#0f172a",
1652
2115
  foreground: "#f8fafc",
1653
2116
  muted: "#94a3b8",
@@ -1661,8 +2124,8 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1661
2124
  primary: "#8b5cf6",
1662
2125
  primaryHover: "#a78bfa",
1663
2126
  primaryForeground: "#020617",
1664
- secondary: "#0284c7",
1665
- secondaryHover: "#0ea5e9",
2127
+ secondary: "#0ea5e9",
2128
+ secondaryHover: "#38bdf8",
1666
2129
  secondaryForeground: "#020617",
1667
2130
  disabled: "#475569",
1668
2131
  disabledHover: "#334155",
@@ -1671,7 +2134,9 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = h, v = (e
1671
2134
  success: "#34d399",
1672
2135
  warning: "#fbbf24",
1673
2136
  error: "#f48fb1",
2137
+ errorHover: "#f8bbd0",
2138
+ errorForeground: "#020617",
1674
2139
  info: "#22d3ee"
1675
2140
  };
1676
2141
  //#endregion
1677
- export { w as Brandmark, Ae as Button, E as Checklist, Re as Choices, b as Cluster, O as Collection, Ot as Cover, ae as DefinitionList, zt as Dialog, U as Eyebrow, A as Figure, Vt as Footer, Wt as Form, ue as H1, de as H2, pe as H3, he as H4, _e as H5, ye as H6, qt as Header, Yt as Hero, Be as Input, He as Link, P as Meter, at as MultiSelect, xe as Note, st as NumberInput, Ce as P, en as PageHead, Oe as Prose, z as Rail, nn as Section, lt as Select, un as Sidebar, ft as Slider, S as Stack, se as Table, Ct as Tabs, Tt as TextArea, fn as dark, dn as light };
2142
+ export { me as Box, ge as Brandmark, Mt as Button, ye as Checklist, Bt as Choices, x as Cluster, Se as Collection, N as ColumnLayout, Pn as Cover, Ne as DefinitionList, Gn as Dialog, lt as Eyebrow, ue as FieldRow, Fe as Figure, qn as Footer, Xn as Form, dt as H1, pt as H2, ht as H3, _t as H4, yt as H5, xt as H6, rr as Header, ar as Hero, ze as Icon, Ht as Input, Wt as Link, Ue as Meter, un as MultiSelect, Ct as Note, fn as NumberInput, Tt as P, ur as PageHead, At as Prose, Je as Rail, hr as ScrollContainer, _r as Section, mn as Select, wr as Sidebar, _n as Slider, fe as Stack, st as Table, kn as Tabs, jn as TextArea, Er as dark, Tr as light };