@juwel-development/design-system 3.8.0 → 3.9.1

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.
@@ -1,35 +1,35 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { Children as n, createContext as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useId as c, useRef as l, useState as u } from "react";
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";
3
3
  import './index.css';//#region node_modules/clsx/dist/clsx.mjs
4
- function d(e) {
4
+ function m(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 = d(e[t])) && (r && (r += " "), r += n);
10
+ for (t = 0; t < i; t++) e[t] && (n = m(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 f() {
16
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = d(e)) && (r && (r += " "), r += t);
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);
17
17
  return r;
18
18
  }
19
19
  //#endregion
20
20
  //#region node_modules/class-variance-authority/dist/index.mjs
21
- var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e, t) => (n) => {
22
- if (t?.variants == null) return m(e, n?.class, n?.className);
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);
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 = p(t) || p(a);
26
+ let o = g(t) || g(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 m(e, a, t?.compoundVariants?.reduce((e, t) => {
32
+ return _(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 p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
46
46
  r
47
47
  ] : e;
48
48
  }, []), n?.class, n?.className);
49
- }, g = h("flex flex-wrap items-baseline gap-y-[var(--space-stack)]", {
49
+ }, y = v("flex flex-wrap items-baseline gap-y-[var(--space-stack)]", {
50
50
  variants: {
51
51
  gap: {
52
52
  stack: "gap-x-[var(--space-stack)]",
@@ -61,14 +61,14 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
61
61
  gap: "region",
62
62
  justify: "start"
63
63
  }
64
- }), _ = ({ gap: t, justify: n, children: r, testId: i }) => /* @__PURE__ */ e("div", {
65
- className: g({
64
+ }), b = ({ gap: t, justify: n, children: r, testId: i }) => /* @__PURE__ */ e("div", {
65
+ className: y({
66
66
  gap: t,
67
67
  justify: n
68
68
  }),
69
69
  "data-testid": i,
70
70
  children: r
71
- }), v = h("flex", {
71
+ }), x = v("flex", {
72
72
  variants: {
73
73
  gap: {
74
74
  stack: "gap-[var(--space-stack)]",
@@ -93,8 +93,8 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
93
93
  measure: !1,
94
94
  direction: "column"
95
95
  }
96
- }), y = ({ gap: t, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ e("div", {
97
- className: v({
96
+ }), S = ({ gap: t, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ e("div", {
97
+ className: x({
98
98
  gap: t,
99
99
  measure: n,
100
100
  direction: r,
@@ -102,55 +102,55 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
102
102
  }),
103
103
  "data-testid": o,
104
104
  children: a
105
- }), b = h("inline-flex", { variants: { cut: {
105
+ }), C = v("inline-flex", { variants: { cut: {
106
106
  full: "",
107
107
  compact: ""
108
- } } }), x = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
108
+ } } }), w = ({ name: t, cut: n, children: r, testId: i }) => t === "" ? /* @__PURE__ */ e("span", {
109
109
  "aria-hidden": "true",
110
110
  "data-cut": n,
111
- className: b({ cut: n }),
111
+ className: C({ cut: n }),
112
112
  "data-testid": i,
113
113
  children: r
114
114
  }) : /* @__PURE__ */ e("span", {
115
115
  role: "img",
116
116
  "aria-label": t,
117
117
  "data-cut": n,
118
- className: b({ cut: n }),
118
+ className: C({ cut: n }),
119
119
  "data-testid": i,
120
120
  children: r
121
- }), S = h("m-0 list-none p-0"), C = h([
121
+ }), T = v("m-0 list-none p-0"), ee = v([
122
122
  "flex items-start gap-3 font-primary text-body leading-body text-foreground",
123
123
  "before:mt-[0.35em] before:size-[calc(var(--tick-length)*0.7)] before:shrink-0 before:rotate-45 before:[border-top:var(--tick-thickness)_solid_var(--color-rule)] before:[border-right:var(--tick-thickness)_solid_var(--color-rule)] before:content-['']",
124
124
  "[&:not(:first-child)]:mt-[var(--space-stack)] [&:not(:first-child)]:border-border [&:not(:first-child)]:border-t [&:not(:first-child)]:border-solid [&:not(:first-child)]:pt-[var(--space-stack)]"
125
- ].join(" ")), w = {
125
+ ].join(" ")), E = {
126
126
  Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
127
- className: S(),
127
+ className: T(),
128
128
  role: "list",
129
129
  "data-testid": n,
130
130
  children: t
131
131
  }),
132
132
  Item: ({ children: t }) => /* @__PURE__ */ e("li", {
133
- className: C(),
133
+ className: ee(),
134
134
  children: t
135
135
  })
136
- }, T = h("m-0 list-none p-0"), ee = h("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), te = {
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
137
  Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("ul", {
138
- className: T(),
138
+ className: te(),
139
139
  role: "list",
140
140
  "data-testid": n,
141
141
  children: t
142
142
  }),
143
143
  Item: ({ children: t, testId: n }) => /* @__PURE__ */ e("li", {
144
- className: ee(),
144
+ className: D(),
145
145
  "data-testid": n,
146
146
  children: t
147
147
  })
148
- }, ne = h([
148
+ }, ne = v([
149
149
  "grid gap-[var(--space-stack)] py-6",
150
150
  "border-b border-solid border-border first:border-t",
151
151
  "lg:grid-cols-[16rem_minmax(0,1fr)] lg:items-baseline lg:gap-x-12",
152
152
  "lg:[&>dt]:col-start-1 lg:[&>dd]:col-start-2 lg:[&>dd]:row-start-1"
153
- ].join(" ")), re = h("font-primary text-subtitle leading-subtitle text-foreground"), ie = h("font-primary text-body leading-body text-muted max-w-[var(--measure)]"), ae = {
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
154
  Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("dl", {
155
155
  "data-testid": n,
156
156
  children: t
@@ -168,7 +168,7 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
168
168
  className: ie(),
169
169
  children: t
170
170
  })
171
- }, oe = h("block w-full object-cover bg-backing", {
171
+ }, k = v("block w-full object-cover bg-backing", {
172
172
  variants: {
173
173
  ratio: {
174
174
  portrait: "aspect-portrait",
@@ -185,13 +185,13 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
185
185
  }
186
186
  },
187
187
  defaultVariants: { focus: "center" }
188
- }), se = ({ src: n, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
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
189
  let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ e("img", {
190
190
  src: n,
191
191
  alt: r,
192
192
  width: i,
193
193
  height: a,
194
- className: oe({
194
+ className: k({
195
195
  ratio: o,
196
196
  focus: s
197
197
  }),
@@ -214,20 +214,20 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
214
214
  children: l
215
215
  })]
216
216
  });
217
- }, E = class extends Error {
217
+ }, j = class extends Error {
218
218
  constructor(e) {
219
219
  super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
220
220
  }
221
- }, ce = h("w-full h-[var(--meter-track-thickness)] bg-meter-track border border-solid border-rule"), le = h("h-full w-[calc(var(--meter-level)*100%)]", {
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%)]", {
222
222
  variants: { treatment: {
223
223
  neutral: "bg-meter-fill",
224
224
  depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
225
225
  } },
226
226
  defaultVariants: { treatment: "neutral" }
227
- }), ue = ({ 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 E(`value, min and max must be finite numbers (got value=${t}, min=${n}, max=${r})`);
229
- if (n >= r) throw new E(`min must be less than max (got min=${n}, max=${r})`);
230
- if (t < n || t > r) throw new E(`value must lie within [min, max] (got value=${t}, min=${n}, max=${r})`);
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
231
  let c = { "--meter-level": (t - n) / (r - n) };
232
232
  return /* @__PURE__ */ e("div", {
233
233
  role: "meter",
@@ -237,28 +237,28 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
237
237
  "aria-label": a,
238
238
  "aria-valuetext": o,
239
239
  "data-testid": s,
240
- className: ce(),
240
+ className: M(),
241
241
  style: c,
242
242
  children: /* @__PURE__ */ e("div", {
243
243
  "aria-hidden": "true",
244
- className: le({ treatment: i })
244
+ className: N({ treatment: i })
245
245
  })
246
246
  });
247
- }, de = h(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), fe = h("lg:sticky lg:top-6"), pe = h("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), me = h("block pt-1 font-secondary text-label tracking-label text-foreground"), he = {
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
248
  Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
249
- className: de(),
249
+ className: F(),
250
250
  "data-testid": n,
251
251
  children: t
252
252
  }),
253
253
  Index: ({ number: n, children: r, testId: i }) => /* @__PURE__ */ t("div", {
254
- className: fe(),
254
+ className: I(),
255
255
  "data-testid": i,
256
256
  "aria-hidden": "true",
257
257
  children: [n !== void 0 && /* @__PURE__ */ e("span", {
258
- className: pe(),
258
+ className: L(),
259
259
  children: n
260
260
  }), /* @__PURE__ */ e("span", {
261
- className: me(),
261
+ className: R(),
262
262
  children: r
263
263
  })]
264
264
  }),
@@ -266,7 +266,7 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
266
266
  "data-testid": n,
267
267
  children: t
268
268
  })
269
- }, D = h([
269
+ }, B = v([
270
270
  "[&:not([data-notes])]:overflow-x-auto",
271
271
  "[&>table]:w-full [&>table]:border-collapse [&>table]:text-left",
272
272
  "[&_caption]:pb-3 [&_caption]:text-left [&_caption]:font-secondary [&_caption]:text-label [&_caption]:tracking-label [&_caption]:text-muted",
@@ -275,7 +275,7 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
275
275
  "[&[data-notes=content]>table]:max-md:block",
276
276
  "[&[data-notes=content]_thead]:max-md:block [&[data-notes=content]_tbody]:max-md:block [&[data-notes=content]_tfoot]:max-md:block",
277
277
  "[&[data-notes=content]_tr]:max-md:block [&[data-notes=content]_td]:max-md:block [&[data-notes=content]_th]:max-md:block"
278
- ].join(" ")), ge = h("border-t border-solid border-border"), O = h("px-4 py-2 text-small first:pl-0 last:pr-0", {
278
+ ].join(" ")), V = v("border-t border-solid border-border"), H = v("px-4 py-2 text-small first:pl-0 last:pr-0", {
279
279
  variants: {
280
280
  variant: {
281
281
  value: "font-primary text-foreground tabular-nums",
@@ -291,24 +291,24 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
291
291
  variant: "value",
292
292
  align: "left"
293
293
  }
294
- }), k = h("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
294
+ }), oe = v("px-4 py-2 font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
295
295
  variants: { align: {
296
296
  left: "text-left",
297
297
  right: "text-right",
298
298
  center: "text-center"
299
299
  } },
300
300
  defaultVariants: { align: "left" }
301
- }), A = {
301
+ }), se = {
302
302
  Root: ({ caption: n, notes: r, children: i, testId: a }) => {
303
303
  let o = /* @__PURE__ */ t("table", { children: [/* @__PURE__ */ e("caption", { children: n }), i] });
304
304
  return r === void 0 ? /* @__PURE__ */ e("section", {
305
- className: D(),
305
+ className: B(),
306
306
  "data-testid": a,
307
307
  "aria-label": n,
308
308
  tabIndex: 0,
309
309
  children: o
310
310
  }) : /* @__PURE__ */ e("div", {
311
- className: D(),
311
+ className: B(),
312
312
  "data-notes": r,
313
313
  "data-testid": a,
314
314
  children: o
@@ -318,24 +318,24 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
318
318
  Body: ({ children: t }) => /* @__PURE__ */ e("tbody", { children: t }),
319
319
  Footer: ({ children: t }) => /* @__PURE__ */ e("tfoot", { children: t }),
320
320
  Row: ({ children: t, testId: n }) => /* @__PURE__ */ e("tr", {
321
- className: ge(),
321
+ className: V(),
322
322
  "data-testid": n,
323
323
  children: t
324
324
  }),
325
325
  HeaderCell: ({ scope: t, align: n, children: r }) => /* @__PURE__ */ e("th", {
326
326
  scope: t,
327
- className: k({ align: n }),
327
+ className: oe({ align: n }),
328
328
  children: r
329
329
  }),
330
330
  Cell: ({ variant: t, align: n, children: r }) => /* @__PURE__ */ e("td", {
331
- className: O({
331
+ className: H({
332
332
  variant: t,
333
333
  align: n
334
334
  }),
335
335
  "data-variant": t ?? "value",
336
336
  children: r
337
337
  })
338
- }, j = h("font-secondary text-label tracking-label font-medium", {
338
+ }, ce = v("font-secondary text-label tracking-label font-medium", {
339
339
  variants: { color: {
340
340
  foreground: "text-foreground",
341
341
  muted: "text-muted",
@@ -345,11 +345,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
345
345
  info: "text-info"
346
346
  } },
347
347
  defaultVariants: { color: "muted" }
348
- }), M = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
349
- className: j({ color: n }),
348
+ }), U = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
349
+ className: ce({ color: n }),
350
350
  "data-testid": r,
351
351
  children: t
352
- }), N = h("font-primary text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
352
+ }), le = v("font-primary text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
353
353
  variants: { color: {
354
354
  foreground: "text-foreground",
355
355
  muted: "text-muted",
@@ -359,11 +359,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
359
359
  info: "text-info"
360
360
  } },
361
361
  defaultVariants: { color: "foreground" }
362
- }), P = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
363
- className: N({ color: n }),
362
+ }), ue = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h1", {
363
+ className: le({ color: n }),
364
364
  "data-testid": r,
365
365
  children: t
366
- }), F = h("font-primary text-title leading-title tracking-optical", {
366
+ }), W = v("font-primary text-title leading-title tracking-optical", {
367
367
  variants: { color: {
368
368
  foreground: "text-foreground",
369
369
  muted: "text-muted",
@@ -373,11 +373,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
373
373
  info: "text-info"
374
374
  } },
375
375
  defaultVariants: { color: "foreground" }
376
- }), I = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
377
- className: F({ color: n }),
376
+ }), de = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h2", {
377
+ className: W({ color: n }),
378
378
  "data-testid": r,
379
379
  children: t
380
- }), L = h("font-primary text-subtitle leading-subtitle", {
380
+ }), fe = v("font-primary text-subtitle leading-subtitle", {
381
381
  variants: { color: {
382
382
  foreground: "text-foreground",
383
383
  muted: "text-muted",
@@ -387,11 +387,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
387
387
  info: "text-info"
388
388
  } },
389
389
  defaultVariants: { color: "foreground" }
390
- }), _e = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
391
- className: L({ color: n }),
390
+ }), pe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h3", {
391
+ className: fe({ color: n }),
392
392
  "data-testid": r,
393
393
  children: t
394
- }), ve = h("font-primary text-body leading-body font-bold", {
394
+ }), me = v("font-primary text-body leading-body font-bold", {
395
395
  variants: { color: {
396
396
  foreground: "text-foreground",
397
397
  muted: "text-muted",
@@ -401,11 +401,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
401
401
  info: "text-info"
402
402
  } },
403
403
  defaultVariants: { color: "foreground" }
404
- }), ye = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
405
- className: ve({ color: n }),
404
+ }), he = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h4", {
405
+ className: me({ color: n }),
406
406
  "data-testid": r,
407
407
  children: t
408
- }), be = h("font-primary text-body leading-body font-semibold", {
408
+ }), ge = v("font-primary text-body leading-body font-semibold", {
409
409
  variants: { color: {
410
410
  foreground: "text-foreground",
411
411
  muted: "text-muted",
@@ -415,11 +415,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
415
415
  info: "text-info"
416
416
  } },
417
417
  defaultVariants: { color: "foreground" }
418
- }), xe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
419
- className: be({ color: n }),
418
+ }), _e = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h5", {
419
+ className: ge({ color: n }),
420
420
  "data-testid": r,
421
421
  children: t
422
- }), Se = h("font-primary text-body leading-body font-medium", {
422
+ }), ve = v("font-primary text-body leading-body font-medium", {
423
423
  variants: { color: {
424
424
  foreground: "text-foreground",
425
425
  muted: "text-muted",
@@ -429,11 +429,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
429
429
  info: "text-info"
430
430
  } },
431
431
  defaultVariants: { color: "foreground" }
432
- }), Ce = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
433
- className: Se({ color: n }),
432
+ }), ye = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("h6", {
433
+ className: ve({ color: n }),
434
434
  "data-testid": r,
435
435
  children: t
436
- }), we = h("font-secondary text-small", {
436
+ }), be = v("font-secondary text-small", {
437
437
  variants: { color: {
438
438
  foreground: "text-foreground",
439
439
  muted: "text-muted",
@@ -443,11 +443,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
443
443
  info: "text-info"
444
444
  } },
445
445
  defaultVariants: { color: "foreground" }
446
- }), Te = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
447
- className: we({ color: n }),
446
+ }), xe = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
447
+ className: be({ color: n }),
448
448
  "data-testid": r,
449
449
  children: t
450
- }), Ee = h("font-primary text-body leading-body", {
450
+ }), Se = v("font-primary text-body leading-body", {
451
451
  variants: { color: {
452
452
  foreground: "text-foreground",
453
453
  muted: "text-muted",
@@ -457,11 +457,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
457
457
  info: "text-info"
458
458
  } },
459
459
  defaultVariants: { color: "foreground" }
460
- }), De = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
461
- className: Ee({ color: n }),
460
+ }), Ce = ({ children: t, color: n, testId: r }) => /* @__PURE__ */ e("p", {
461
+ className: Se({ color: n }),
462
462
  "data-testid": r,
463
463
  children: t
464
- }), Oe = h("flex max-w-[var(--measure)] flex-col gap-[var(--space-stack)]"), ke = h("font-primary text-lede leading-lede text-foreground"), Ae = h("font-primary text-body leading-body", {
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", {
465
465
  variants: { color: {
466
466
  foreground: "text-foreground",
467
467
  muted: "text-muted",
@@ -471,66 +471,66 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
471
471
  info: "text-info"
472
472
  } },
473
473
  defaultVariants: { color: "foreground" }
474
- }), je = h("font-primary text-small text-muted"), Me = {
474
+ }), De = v("font-primary text-small text-muted"), Oe = {
475
475
  Root: ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
476
- className: Oe(),
476
+ className: we(),
477
477
  "data-testid": n,
478
478
  children: t
479
479
  }),
480
480
  Lede: ({ children: t }) => /* @__PURE__ */ e("p", {
481
- className: ke(),
481
+ className: Te(),
482
482
  children: t
483
483
  }),
484
484
  Body: ({ color: t, children: n }) => /* @__PURE__ */ e("p", {
485
- className: Ae({ color: t }),
485
+ className: Ee({ color: t }),
486
486
  children: n
487
487
  }),
488
488
  Tail: ({ children: t }) => /* @__PURE__ */ e("p", {
489
- className: je(),
489
+ className: De(),
490
490
  children: t
491
491
  })
492
- }, Ne = h("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)]", {
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)]", {
493
493
  variants: { variant: {
494
494
  primary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-primary text-primary-foreground hover:bg-primary-hover",
495
495
  secondary: "px-4 sm:px-6 min-w-[var(--control-min-width)] bg-secondary text-secondary-foreground hover:bg-secondary-hover",
496
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)]"
497
497
  } },
498
498
  defaultVariants: { variant: "primary" }
499
- }), Pe = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
499
+ }), Ae = ({ children: t, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ e("button", {
500
500
  type: s,
501
501
  "data-testid": r,
502
- className: Ne({ variant: i }),
502
+ className: ke({ variant: i }),
503
503
  onClick: () => a?.next(),
504
504
  disabled: n,
505
505
  "aria-label": o,
506
506
  children: t
507
- }), Fe = class extends Error {
507
+ }), je = class extends Error {
508
508
  constructor(e) {
509
509
  super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
510
510
  }
511
- }, Ie = h("flex flex-col gap-[var(--space-stack)]"), Le = h([
511
+ }, Me = v("flex flex-col gap-[var(--space-stack)]"), Ne = v([
512
512
  "group/choice flex w-full flex-row items-start gap-3 text-left",
513
513
  "rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
514
514
  "px-3 py-2",
515
515
  "cursor-pointer disabled:cursor-not-allowed",
516
516
  "transition-colors duration-[var(--motion-duration-color)]",
517
517
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
518
- ].join(" ")), R = r(void 0), Re = (e) => {
519
- let t = o(R);
520
- if (t === void 0) throw new Fe(e);
518
+ ].join(" ")), Pe = i(void 0), Fe = (e) => {
519
+ let t = s(Pe);
520
+ if (t === void 0) throw new je(e);
521
521
  return t;
522
- }, ze = (e, t) => {
522
+ }, Ie = (e, t) => {
523
523
  let n = e.closest("[role=\"radiogroup\"]");
524
524
  if (n === null) return;
525
525
  let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
526
526
  return r[(r.indexOf(e) + t + r.length) % r.length];
527
- }, Be = {
527
+ }, Le = {
528
528
  ArrowDown: 1,
529
529
  ArrowRight: 1,
530
530
  ArrowUp: -1,
531
531
  ArrowLeft: -1
532
- }, Ve = {
533
- Root: ({ selected: t, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ e(R.Provider, {
532
+ }, Re = {
533
+ Root: ({ selected: t, onSelect$: n, label: r, inert: i, children: a, testId: o }) => /* @__PURE__ */ e(Pe.Provider, {
534
534
  value: {
535
535
  selected: t,
536
536
  onSelect$: n,
@@ -540,32 +540,32 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
540
540
  role: "radiogroup",
541
541
  "aria-label": r,
542
542
  "aria-disabled": i === !0 ? "true" : void 0,
543
- className: Ie(),
543
+ className: Me(),
544
544
  "data-testid": o,
545
545
  children: a
546
546
  })
547
547
  }),
548
548
  Choice: ({ value: n, children: r, description: i, testId: a }) => {
549
- let { selected: o, onSelect$: s, inert: l } = Re("Choice"), u = o === n, d = c(), f = `${d}-name`, p = `${d}-description`;
549
+ let { selected: o, onSelect$: s, inert: c } = Fe("Choice"), u = o === n, d = l(), f = `${d}-name`, p = `${d}-description`;
550
550
  return /* @__PURE__ */ t("button", {
551
551
  type: "button",
552
552
  role: "radio",
553
553
  "aria-checked": u,
554
554
  "aria-labelledby": f,
555
555
  "aria-describedby": p,
556
- tabIndex: u && !l ? 0 : -1,
557
- disabled: l,
556
+ tabIndex: u && !c ? 0 : -1,
557
+ disabled: c,
558
558
  "data-value": n,
559
559
  "data-testid": a,
560
- className: Le(),
560
+ className: Ne(),
561
561
  onClick: () => {
562
562
  u || s.next(n);
563
563
  },
564
564
  onKeyDown: (e) => {
565
- let t = Be[e.key];
566
- if (t === void 0 || l) return;
565
+ let t = Le[e.key];
566
+ if (t === void 0 || c) return;
567
567
  e.preventDefault();
568
- let n = ze(e.currentTarget, t);
568
+ let n = Ie(e.currentTarget, t);
569
569
  if (n === void 0) return;
570
570
  n.focus();
571
571
  let r = n.dataset.value;
@@ -591,16 +591,16 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
591
591
  })]
592
592
  });
593
593
  }
594
- }, He = h("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", {
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", {
595
595
  variants: { variant: {
596
596
  text: "",
597
597
  email: "",
598
598
  url: ""
599
599
  } },
600
600
  defaultVariants: { variant: "text" }
601
- }), Ue = ({ label: n, name: r, variant: i, required: a, optionalLabel: o, invalid: u, disabled: d, defaultValue: f, placeholder: p, autocomplete: m, hint: h, errorMessage: g, onInput$: _, reset$: v, testId: y }) => {
602
- let b = c(), x = `${b}-control`, S = `${b}-hint`, C = `${b}-error`, w = [h ? S : void 0, u ? C : void 0].filter(Boolean).join(" ") || void 0, T = l(null);
603
- return s(() => {
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(() => {
604
604
  let e = v?.subscribe(() => {
605
605
  T.current && (T.current.value = "");
606
606
  });
@@ -618,13 +618,13 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
618
618
  id: x,
619
619
  name: r,
620
620
  type: i ?? "text",
621
- className: He({ variant: i }),
621
+ className: ze({ variant: i }),
622
622
  required: a,
623
- disabled: d,
624
- defaultValue: f,
623
+ disabled: u,
624
+ defaultValue: d,
625
625
  placeholder: p,
626
626
  autoComplete: m,
627
- "aria-invalid": u || void 0,
627
+ "aria-invalid": s || void 0,
628
628
  "aria-describedby": w,
629
629
  "data-testid": y,
630
630
  onInput: (e) => _?.next(e.currentTarget.value)
@@ -638,14 +638,14 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
638
638
  className: "font-secondary text-muted text-small",
639
639
  children: h
640
640
  }),
641
- u && /* @__PURE__ */ e("p", {
641
+ s && /* @__PURE__ */ e("p", {
642
642
  id: C,
643
643
  className: "font-secondary text-error text-small",
644
644
  children: g
645
645
  })
646
646
  ]
647
647
  });
648
- }, We = h("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
648
+ }, Ve = v("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
649
649
  variants: { treatment: {
650
650
  prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
651
651
  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 +653,401 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
653
653
  graphic: "text-inherit no-underline"
654
654
  } },
655
655
  defaultVariants: { treatment: "prose" }
656
- }), Ge = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
656
+ }), He = ({ href: t, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ e("a", {
657
657
  href: t,
658
- className: We({ treatment: r }),
658
+ className: Ve({ treatment: r }),
659
659
  target: i ? "_blank" : void 0,
660
660
  rel: i ? "noopener noreferrer" : void 0,
661
661
  "aria-current": a ? "page" : void 0,
662
662
  "data-testid": o,
663
663
  children: n
664
- }), Ke = h([
664
+ }), Ue = (e, t, n, r) => {
665
+ let i = Math.max(e.length - 1, 0) * r;
666
+ if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
667
+ let a = 0, o = t;
668
+ for (let t of e) {
669
+ if (o + t + r > n) break;
670
+ o += t + r, a += 1;
671
+ }
672
+ return a;
673
+ }, We = class extends Error {
674
+ constructor(e) {
675
+ super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
676
+ }
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("", {
678
+ variants: { part: {
679
+ root: [
680
+ "relative flex flex-col gap-[var(--space-stack)]",
681
+ "[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
682
+ "[&>p]:font-secondary [&>p]:text-small [&>p]:text-muted"
683
+ ].join(" "),
684
+ field: [
685
+ "group/field relative flex items-center gap-1",
686
+ "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)]",
688
+ "data-[disabled]:border-disabled data-[disabled]:text-muted"
689
+ ].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}`,
691
+ 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
+ track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
693
+ chip: [
694
+ "relative inline-flex max-w-[12rem] shrink-0 items-center gap-1 pointer-events-auto",
695
+ "rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
696
+ "group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
697
+ ].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}`,
701
+ surface: [
702
+ "absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
703
+ "rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
704
+ "max-h-[var(--multiselect-surface-max-height,50vh)]",
705
+ "data-[placement=below]:top-full data-[placement=below]:mt-1 data-[placement=above]:bottom-full data-[placement=above]:mb-1"
706
+ ].join(" ")
707
+ } },
708
+ defaultVariants: { part: "root" }
709
+ }), Ke = v([
710
+ "group/option flex w-full flex-row items-center gap-3 text-left",
711
+ "rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
712
+ "cursor-pointer disabled:cursor-not-allowed",
713
+ "transition-colors duration-[var(--motion-duration-color)]",
714
+ "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);
718
+ return t;
719
+ }, J = (e) => (t) => {
720
+ 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) {
725
+ let { value: t, children: n } = e.props;
726
+ return [{
727
+ value: t,
728
+ label: n
729
+ }];
730
+ }
731
+ return [];
732
+ }), Xe = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), Ze = (e) => {
733
+ let t = document.activeElement;
734
+ 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) => {
736
+ switch (e.kind) {
737
+ case "firstOption": return r === void 0 ? void 0 : Qe(r);
738
+ case "afterRemoval": {
739
+ let r = Xe(t);
740
+ return r[e.index] ?? r[e.index - 1] ?? n;
741
+ }
742
+ case "afterClear": return n;
743
+ }
744
+ }, nt = () => /* @__PURE__ */ e("svg", {
745
+ "aria-hidden": !0,
746
+ focusable: !1,
747
+ viewBox: "0 0 16 16",
748
+ className: "size-3",
749
+ children: /* @__PURE__ */ e("path", {
750
+ d: "M4 4l8 8M12 4l-8 8",
751
+ fill: "none",
752
+ stroke: "currentColor",
753
+ strokeWidth: 1.5,
754
+ strokeLinecap: "round"
755
+ })
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));
761
+ return () => e.unsubscribe();
762
+ }, [r]), c(() => {
763
+ T && D(!1);
764
+ }, [T]), u(() => {
765
+ let e = M.current;
766
+ if (e === void 0 || typeof ResizeObserver > "u") return;
767
+ let t = new ResizeObserver(() => ae());
768
+ return t.observe(e), () => t.disconnect();
769
+ }, []), u(() => {
770
+ let e = M.current;
771
+ 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;
781
+ 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));
784
+ };
785
+ return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
786
+ }, [I]), u(() => {
787
+ let e = k.current, t = j.current;
788
+ 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);
791
+ });
792
+ let H = (e) => {
793
+ i.next($e(L, e));
794
+ }, oe = (e) => {
795
+ if (T) return;
796
+ let t = new Set(R);
797
+ t.delete(e) || t.add(e), H(t);
798
+ }, se = (e, t) => (n) => {
799
+ if (T) return;
800
+ document.activeElement === n.currentTarget && (P.current = {
801
+ kind: "afterRemoval",
802
+ index: t,
803
+ control: n.currentTarget
804
+ });
805
+ let r = new Set(R);
806
+ r.delete(e), H(r);
807
+ }, ce = (e) => {
808
+ T || (document.activeElement === e.currentTarget && (P.current = {
809
+ kind: "afterClear",
810
+ control: e.currentTarget
811
+ }), i.next([]));
812
+ }, U = (e) => {
813
+ T || (e.detail === 0 && (P.current = { kind: "firstOption" }), D(!0));
814
+ }, le = (e) => {
815
+ I ? D(!1) : U(e);
816
+ }, ue = (e) => {
817
+ if (e.key !== "ArrowDown" || T) return;
818
+ 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());
823
+ }, 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);
827
+ }, 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
+ (!(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,
839
+ children: [
840
+ /* @__PURE__ */ e("label", {
841
+ id: b,
842
+ htmlFor: x,
843
+ children: n
844
+ }),
845
+ /* @__PURE__ */ t("div", {
846
+ ref: J(A),
847
+ "data-multiselect-field": !0,
848
+ "data-disabled": T || void 0,
849
+ className: K({ part: "field" }),
850
+ children: [
851
+ /* @__PURE__ */ e("button", {
852
+ ref: J(j),
853
+ id: x,
854
+ type: "button",
855
+ "aria-labelledby": b,
856
+ "aria-expanded": I,
857
+ "aria-controls": I ? S : void 0,
858
+ "aria-describedby": me,
859
+ disabled: T,
860
+ "data-testid": _,
861
+ className: K({ part: "trigger" }),
862
+ onClick: le,
863
+ onKeyDown: ue,
864
+ children: /* @__PURE__ */ e("svg", {
865
+ "aria-hidden": !0,
866
+ focusable: !1,
867
+ viewBox: "0 0 16 16",
868
+ className: "size-4",
869
+ children: /* @__PURE__ */ e("path", {
870
+ d: "M3 6l5 5 5-5",
871
+ fill: "none",
872
+ stroke: "currentColor",
873
+ strokeWidth: 1.5,
874
+ strokeLinecap: "round",
875
+ strokeLinejoin: "round"
876
+ })
877
+ })
878
+ }),
879
+ /* @__PURE__ */ e("div", {
880
+ className: K({ part: "clip" }),
881
+ children: /* @__PURE__ */ t("div", {
882
+ ref: J(M),
883
+ "data-multiselect-track": !0,
884
+ className: K({ part: "track" }),
885
+ children: [
886
+ z.length === 0 && /* @__PURE__ */ e("span", {
887
+ id: w,
888
+ className: "truncate text-muted",
889
+ children: a
890
+ }),
891
+ z.map(({ value: n, label: r }, i) => {
892
+ let a = i >= B;
893
+ return /* @__PURE__ */ t("span", {
894
+ "data-multiselect-chip": !0,
895
+ "data-overflow": a || void 0,
896
+ "aria-hidden": a || void 0,
897
+ inert: a || void 0,
898
+ className: K({ part: "chip" }),
899
+ children: [/* @__PURE__ */ e("span", {
900
+ className: "truncate",
901
+ children: r
902
+ }), /* @__PURE__ */ e("button", {
903
+ type: "button",
904
+ "aria-label": o.replaceAll("{label}", r),
905
+ disabled: T,
906
+ tabIndex: a ? -1 : void 0,
907
+ className: K({ part: "iconButton" }),
908
+ onClick: se(n, i),
909
+ children: /* @__PURE__ */ e(nt, {})
910
+ })]
911
+ }, n);
912
+ }),
913
+ V > 0 && /* @__PURE__ */ e("button", {
914
+ type: "button",
915
+ disabled: T,
916
+ className: K({ part: "count" }),
917
+ onClick: U,
918
+ children: m.replaceAll("{count}", String(V))
919
+ }),
920
+ z.length > 0 && /* @__PURE__ */ e("span", {
921
+ "aria-hidden": !0,
922
+ "data-multiselect-count": !0,
923
+ className: K({ part: "countMeasure" }),
924
+ children: m.replaceAll("{count}", String(z.length))
925
+ })
926
+ ]
927
+ })
928
+ }),
929
+ z.length > 0 ? /* @__PURE__ */ e("button", {
930
+ type: "button",
931
+ "aria-label": s,
932
+ disabled: T,
933
+ className: K({ part: "iconButton" }),
934
+ onClick: ce,
935
+ children: /* @__PURE__ */ e(nt, {})
936
+ }) : /* @__PURE__ */ e("span", {
937
+ "aria-hidden": !0,
938
+ className: "size-6 shrink-0"
939
+ }),
940
+ /* @__PURE__ */ e("span", {
941
+ "aria-hidden": !0,
942
+ className: "size-6 shrink-0"
943
+ }),
944
+ I && /* @__PURE__ */ e("div", {
945
+ ref: J(N),
946
+ id: S,
947
+ role: "group",
948
+ "aria-labelledby": b,
949
+ "data-placement": re,
950
+ className: K({ part: "surface" }),
951
+ onMouseDown: pe,
952
+ children: /* @__PURE__ */ e(qe, {
953
+ value: {
954
+ selected: R,
955
+ disabled: T,
956
+ toggle: oe
957
+ },
958
+ children: v
959
+ })
960
+ })
961
+ ]
962
+ }),
963
+ h && /* @__PURE__ */ e("p", {
964
+ id: C,
965
+ children: h
966
+ })
967
+ ]
968
+ });
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", {
972
+ type: "button",
973
+ role: "checkbox",
974
+ "aria-checked": c,
975
+ disabled: o,
976
+ "data-testid": i,
977
+ className: Ke(),
978
+ onClick: () => s(n),
979
+ children: [/* @__PURE__ */ e("span", {
980
+ 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", {
982
+ "aria-hidden": !0,
983
+ focusable: !1,
984
+ viewBox: "0 0 16 16",
985
+ className: "size-3 text-foreground",
986
+ children: /* @__PURE__ */ e("path", {
987
+ d: "M3 8.5l3 3 7-7",
988
+ fill: "none",
989
+ stroke: "currentColor",
990
+ strokeWidth: 2,
991
+ strokeLinecap: "round",
992
+ strokeLinejoin: "round"
993
+ })
994
+ })
995
+ }), /* @__PURE__ */ e("span", {
996
+ className: "min-w-0 flex-1 font-secondary text-body text-foreground [overflow-wrap:anywhere]",
997
+ children: r
998
+ })]
999
+ });
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(() => {
1006
+ let e = g?.subscribe(() => {
1007
+ C.current && (C.current.value = "");
1008
+ });
1009
+ return () => e?.unsubscribe();
1010
+ }, [g]), /* @__PURE__ */ t("div", {
1011
+ className: "flex flex-col gap-[var(--space-stack)]",
1012
+ children: [
1013
+ /* @__PURE__ */ e("label", {
1014
+ htmlFor: y,
1015
+ className: "font-secondary font-medium text-body text-foreground",
1016
+ children: n
1017
+ }),
1018
+ /* @__PURE__ */ e("input", {
1019
+ ref: C,
1020
+ id: y,
1021
+ name: r,
1022
+ type: "text",
1023
+ inputMode: "decimal",
1024
+ className: ot(),
1025
+ required: i,
1026
+ disabled: d,
1027
+ defaultValue: m,
1028
+ placeholder: p,
1029
+ "aria-invalid": s || void 0,
1030
+ "aria-describedby": S,
1031
+ "data-testid": _,
1032
+ onInput: (e) => !d && h?.next(e.currentTarget.value)
1033
+ }),
1034
+ !i && a && /* @__PURE__ */ e("span", {
1035
+ className: "font-secondary text-muted text-small",
1036
+ children: a
1037
+ }),
1038
+ o && /* @__PURE__ */ e("p", {
1039
+ id: b,
1040
+ className: "font-secondary text-muted text-small",
1041
+ children: o
1042
+ }),
1043
+ s && /* @__PURE__ */ e("p", {
1044
+ id: x,
1045
+ className: "font-secondary text-error text-small",
1046
+ children: u
1047
+ })
1048
+ ]
1049
+ });
1050
+ }, ct = v([
665
1051
  "flex flex-col gap-[var(--space-stack)]",
666
1052
  "[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
667
1053
  "[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
@@ -670,11 +1056,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
670
1056
  "[&>select]:font-primary [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
671
1057
  "[&>select]:outline-focus-ring [&>select]:outline-offset-[var(--focus-ring-offset)] [&>select]:focus-visible:outline [&>select]:focus-visible:outline-[length:var(--focus-ring-width)]",
672
1058
  "[&>select:user-invalid]:border-error [&>select]:aria-[invalid=true]:border-error [&>select]:disabled:cursor-not-allowed [&>select]:disabled:border-disabled [&>select]:disabled:text-muted"
673
- ].join(" ")), qe = {
674
- Root: ({ label: n, name: r, required: i, optionalLabel: a, disabled: o, invalid: s, hint: l, errorMessage: u, testId: d, defaultValue: f, onChange$: p, placeholder: m, children: h }) => {
675
- let g = c(), _ = `${g}-control`, v = `${g}-hint`, y = `${g}-error`, b = [l ? v : void 0, s && u ? y : void 0].filter(Boolean).join(" ") || void 0;
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;
676
1062
  return /* @__PURE__ */ t("div", {
677
- className: Ke(),
1063
+ className: ct(),
678
1064
  children: [
679
1065
  /* @__PURE__ */ e("label", {
680
1066
  htmlFor: _,
@@ -696,9 +1082,9 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
696
1082
  }), h]
697
1083
  }),
698
1084
  !i && a && /* @__PURE__ */ e("span", { children: a }),
699
- l && /* @__PURE__ */ e("p", {
1085
+ c && /* @__PURE__ */ e("p", {
700
1086
  id: v,
701
- children: l
1087
+ children: c
702
1088
  }),
703
1089
  s && u && /* @__PURE__ */ e("p", {
704
1090
  id: y,
@@ -713,11 +1099,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
713
1099
  "data-testid": r,
714
1100
  children: n
715
1101
  })
716
- }, z = class extends Error {
1102
+ }, X = class extends Error {
717
1103
  constructor(e) {
718
1104
  super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
719
1105
  }
720
- }, Je = h([
1106
+ }, ut = v([
721
1107
  "block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
722
1108
  "disabled:cursor-not-allowed",
723
1109
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -728,62 +1114,72 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
728
1114
  "[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
729
1115
  "[&::-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",
730
1116
  "[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
731
- ].join(" ")), Ye = (e) => {
732
- for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new z(`\`${t}\` must be a finite number, got ${n}`);
733
- if (e.min >= e.max) throw new z(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
734
- if (e.step <= 0) throw new z(`\`step\` (${e.step}) must be positive`);
735
- if (e.value < e.min || e.value > e.max) throw new z(`\`value\` (${e.value}) must lie within [${e.min}, ${e.max}]`);
736
- }, Xe = ({ min: t, max: n, step: r = 1, value: i, onInput$: a, label: o, valueText: s, disabled: c, testId: l }) => (Ye({
737
- min: t,
738
- max: n,
739
- step: r,
740
- value: i
741
- }), /* @__PURE__ */ e("input", {
742
- type: "range",
743
- className: Je(),
744
- min: t,
745
- max: n,
746
- step: r,
747
- value: i,
748
- disabled: c,
749
- "aria-label": o,
750
- "aria-valuetext": s,
751
- "data-testid": l,
752
- onChange: (e) => a.next(e.currentTarget.valueAsNumber)
753
- })), Ze = class extends Error {
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,
1126
+ max: r,
1127
+ step: i,
1128
+ value: a
1129
+ }), /* @__PURE__ */ t("div", {
1130
+ className: "flex flex-col gap-[var(--space-stack)]",
1131
+ children: [/* @__PURE__ */ e("label", {
1132
+ htmlFor: f,
1133
+ className: "font-secondary font-medium text-body text-foreground",
1134
+ children: s
1135
+ }), /* @__PURE__ */ e("input", {
1136
+ id: f,
1137
+ type: "range",
1138
+ className: ut(),
1139
+ min: n,
1140
+ max: r,
1141
+ step: i,
1142
+ value: a,
1143
+ disabled: u,
1144
+ "aria-valuetext": c,
1145
+ "data-testid": d,
1146
+ onChange: (e) => o.next(e.currentTarget.valueAsNumber)
1147
+ })]
1148
+ });
1149
+ }, pt = class extends Error {
754
1150
  constructor(e) {
755
1151
  super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
756
1152
  }
757
- }, Qe = h([
1153
+ }, mt = v([
758
1154
  "flex flex-row overflow-x-auto",
759
1155
  "p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
760
1156
  "m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
761
1157
  "scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
762
- ].join(" ")), $e = h([
1158
+ ].join(" ")), ht = v([
763
1159
  "font-secondary text-label tracking-label",
764
1160
  "text-muted hover:text-foreground aria-selected:text-foreground",
765
1161
  "border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
766
1162
  "shrink-0 cursor-pointer select-none text-nowrap px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
767
1163
  "transition-colors duration-[var(--motion-duration-color)]",
768
1164
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
769
- ].join(" ")), et = h("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), B = r(void 0), V = (e) => {
770
- let t = o(B);
771
- if (t === void 0) throw new Ze(e);
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);
772
1168
  return t;
773
- }, H = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), tt = (e) => {
1169
+ }, vt = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), yt = (e) => {
774
1170
  e.currentTarget.scrollIntoView({
775
1171
  block: "nearest",
776
1172
  inline: "nearest"
777
1173
  });
778
- }, U = (e, t) => `${e}tab-${H(t)}`, W = (e, t) => `${e}panel-${H(t)}`, nt = (e, t) => {
1174
+ }, bt = (e, t) => `${e}tab-${vt(t)}`, xt = (e, t) => `${e}panel-${vt(t)}`, St = (e, t) => {
779
1175
  let n = e.closest("[role=\"tablist\"]");
780
1176
  if (n === null) return;
781
1177
  let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
782
1178
  return r[(r.indexOf(e) + t + r.length) % r.length];
783
- }, rt = {
1179
+ }, Ct = {
784
1180
  Root: ({ active: t, onSelect$: n, label: r, children: i, testId: a }) => {
785
- let o = c();
786
- return /* @__PURE__ */ e(B.Provider, {
1181
+ let o = l();
1182
+ return /* @__PURE__ */ e(_t.Provider, {
787
1183
  value: {
788
1184
  active: t,
789
1185
  onSelect$: n,
@@ -797,57 +1193,57 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
797
1193
  });
798
1194
  },
799
1195
  List: ({ children: t, testId: n }) => {
800
- let { label: r } = V("List");
1196
+ let { label: r } = Z("List");
801
1197
  return /* @__PURE__ */ e("div", {
802
1198
  role: "tablist",
803
1199
  "aria-label": r,
804
- className: Qe(),
1200
+ className: mt(),
805
1201
  "data-testid": n,
806
1202
  children: t
807
1203
  });
808
1204
  },
809
1205
  Tab: ({ value: t, children: n, testId: r }) => {
810
- let { active: i, onSelect$: a, baseId: o } = V("Tab"), s = i === t;
1206
+ let { active: i, onSelect$: a, baseId: o } = Z("Tab"), s = i === t;
811
1207
  return /* @__PURE__ */ e("button", {
812
1208
  type: "button",
813
1209
  role: "tab",
814
- id: U(o, t),
1210
+ id: bt(o, t),
815
1211
  "aria-selected": s,
816
- "aria-controls": W(o, t),
1212
+ "aria-controls": xt(o, t),
817
1213
  tabIndex: s ? 0 : -1,
818
1214
  "data-value": t,
819
1215
  "data-testid": r,
820
- className: $e(),
1216
+ className: ht(),
821
1217
  onClick: () => a.next(t),
822
1218
  onKeyDown: (e) => {
823
1219
  if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
824
1220
  e.preventDefault();
825
- let t = nt(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
1221
+ let t = St(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
826
1222
  if (t === void 0) return;
827
1223
  t.focus();
828
1224
  let n = t.dataset.value;
829
1225
  n !== void 0 && a.next(n);
830
1226
  },
831
- onFocus: tt,
1227
+ onFocus: yt,
832
1228
  children: n
833
1229
  });
834
1230
  },
835
1231
  Panel: ({ value: t, children: n, testId: r }) => {
836
- let { active: i, baseId: a } = V("Panel"), o = i === t;
1232
+ let { active: i, baseId: a } = Z("Panel"), o = i === t;
837
1233
  return /* @__PURE__ */ e("div", {
838
1234
  role: "tabpanel",
839
- id: W(a, t),
840
- "aria-labelledby": U(a, t),
1235
+ id: xt(a, t),
1236
+ "aria-labelledby": bt(a, t),
841
1237
  hidden: !o,
842
1238
  tabIndex: o ? 0 : void 0,
843
- className: et(),
1239
+ className: gt(),
844
1240
  "data-testid": r,
845
1241
  children: o ? n : void 0
846
1242
  });
847
1243
  }
848
- }, it = h("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"), at = ({ label: n, name: r, required: i, optionalLabel: a, invalid: o, disabled: u, defaultValue: d, placeholder: f, autocomplete: p, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
849
- let y = c(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, o ? S : void 0].filter(Boolean).join(" ") || void 0, w = l(null);
850
- return s(() => {
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(() => {
851
1247
  let e = _?.subscribe(() => {
852
1248
  w.current && (w.current.value = "");
853
1249
  });
@@ -864,11 +1260,11 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
864
1260
  ref: w,
865
1261
  id: b,
866
1262
  name: r,
867
- className: it(),
1263
+ className: wt(),
868
1264
  required: i,
869
- disabled: u,
870
- defaultValue: d,
871
- placeholder: f,
1265
+ disabled: s,
1266
+ defaultValue: u,
1267
+ placeholder: d,
872
1268
  autoComplete: p,
873
1269
  "aria-invalid": o || void 0,
874
1270
  "aria-describedby": C,
@@ -891,29 +1287,29 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
891
1287
  })
892
1288
  ]
893
1289
  });
894
- }, ot = h([
1290
+ }, Et = v([
895
1291
  "flex flex-col items-center",
896
1292
  "min-h-[var(--cover-height)]",
897
1293
  "px-[var(--gutter)] py-[var(--space-region)]"
898
- ].join(" ")), st = "my-auto max-w-full", ct = ({ children: n, foot: r, testId: i }) => {
1294
+ ].join(" ")), Dt = "my-auto max-w-full", Ot = ({ children: n, foot: r, testId: i }) => {
899
1295
  let a = r != null && typeof r != "boolean";
900
1296
  return /* @__PURE__ */ t("div", {
901
- className: ot(),
1297
+ className: Et(),
902
1298
  "data-testid": i,
903
1299
  children: [/* @__PURE__ */ e("div", {
904
- className: st,
1300
+ className: Dt,
905
1301
  children: n
906
1302
  }), a && /* @__PURE__ */ e("div", { children: r })]
907
1303
  });
908
- }, lt = class extends Error {
1304
+ }, kt = class extends Error {
909
1305
  constructor(e) {
910
1306
  super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
911
1307
  }
912
- }, ut = class extends Error {
1308
+ }, At = class extends Error {
913
1309
  constructor() {
914
1310
  super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
915
1311
  }
916
- }, dt = h([
1312
+ }, jt = v([
917
1313
  "open:flex open:flex-col m-auto p-0 overflow-hidden",
918
1314
  "bg-surface text-foreground",
919
1315
  "rounded-[var(--radius-dialog)] shadow-[var(--elevation-floating)]",
@@ -924,89 +1320,89 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
924
1320
  content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
925
1321
  } },
926
1322
  defaultVariants: { extent: "screen" }
927
- }), ft = h(["px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[&:has(+[data-dialog-member=description])]:pb-0"].join(" ")), pt = h(["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(" ")), mt = h([
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([
928
1324
  "grow shrink min-h-0 overflow-y-auto",
929
1325
  "px-[var(--space-region)] py-[var(--space-region)]",
930
1326
  "[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
931
- ].join(" ")), ht = h([
1327
+ ].join(" ")), Ft = v([
932
1328
  "flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
933
1329
  "px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
934
1330
  "[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
935
- ].join(" ")), G = r(void 0), K = (e) => {
936
- let t = o(G);
937
- if (t === void 0) throw new lt(e);
1331
+ ].join(" ")), It = i(void 0), Q = (e) => {
1332
+ let t = s(It);
1333
+ if (t === void 0) throw new kt(e);
938
1334
  return t;
939
- }, q = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", J = (e, { presented: t, opener: n }) => {
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 }) => {
940
1336
  if (e === void 0 || e.open) return;
941
1337
  let r = document.activeElement;
942
- n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(q)?.focus();
943
- }, Y = (e, { presented: t }) => {
1338
+ n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(Lt)?.focus();
1339
+ }, $ = (e, { presented: t }) => {
944
1340
  t.current = !1, e?.open && e.close();
945
- }, gt = {
946
- Root: ({ children: t, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: o, testId: d }) => {
947
- let f = c(), p = l(void 0), m = l(!1), h = l(void 0), [g] = u(() => ({
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(() => ({
948
1344
  presented: m,
949
1345
  opener: h
950
- })), [_, v] = u({
1346
+ })), [_, v] = p({
951
1347
  title: !1,
952
1348
  description: !1
953
- }), y = a((e) => (v((t) => ({
1349
+ }), y = o((e) => (v((t) => ({
954
1350
  ...t,
955
1351
  [e]: !0
956
1352
  })), () => v((t) => ({
957
1353
  ...t,
958
1354
  [e]: !1
959
1355
  }))), []), b = {
960
- titleId: `${f}title`,
961
- descriptionId: `${f}description`,
962
- isLabelled: o !== void 0,
1356
+ titleId: `${u}title`,
1357
+ descriptionId: `${u}description`,
1358
+ isLabelled: a !== void 0,
963
1359
  registerNamePart: y
964
1360
  }, x = () => {
965
- n.next(), r === void 0 ? Y(p.current, g) : r.next(!1);
1361
+ n.next(), r === void 0 ? $(d.current, g) : r.next(!1);
966
1362
  };
967
- return s(() => {
968
- if (r === void 0) return J(p.current, g), () => Y(p.current, g);
1363
+ return c(() => {
1364
+ if (r === void 0) return Rt(d.current, g), () => $(d.current, g);
969
1365
  let e = r.subscribe((e) => {
970
- e ? J(p.current, g) : Y(p.current, g);
1366
+ e ? Rt(d.current, g) : $(d.current, g);
971
1367
  });
972
1368
  return () => {
973
- e.unsubscribe(), Y(p.current, g);
1369
+ e.unsubscribe(), $(d.current, g);
974
1370
  };
975
- }, [r, g]), /* @__PURE__ */ e(G.Provider, {
1371
+ }, [r, g]), /* @__PURE__ */ e(It.Provider, {
976
1372
  value: b,
977
1373
  children: /* @__PURE__ */ e("dialog", {
978
1374
  ref: (e) => {
979
- p.current = e ?? void 0, e?.setAttribute("headingreset", "");
1375
+ d.current = e ?? void 0, e?.setAttribute("headingreset", "");
980
1376
  },
981
- className: dt({ extent: i }),
982
- "aria-label": o,
983
- "aria-labelledby": o === void 0 && _.title ? b.titleId : void 0,
1377
+ className: jt({ extent: i }),
1378
+ "aria-label": a,
1379
+ "aria-labelledby": a === void 0 && _.title ? b.titleId : void 0,
984
1380
  "aria-describedby": _.description ? b.descriptionId : void 0,
985
1381
  onCancel: x,
986
1382
  onClick: (e) => {
987
- let t = p.current;
1383
+ let t = d.current;
988
1384
  if (t === void 0 || e.target !== t || !t.open) return;
989
1385
  let n = t.getBoundingClientRect();
990
1386
  e.clientX >= n.left && e.clientX <= n.right && e.clientY >= n.top && e.clientY <= n.bottom || x();
991
1387
  },
992
1388
  onClose: () => {
993
- if (p.current?.open) return;
1389
+ if (d.current?.open) return;
994
1390
  let e = m.current;
995
1391
  m.current = !1;
996
1392
  let t = h.current;
997
- h.current = void 0, t?.isConnected && (t.matches(q) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
1393
+ h.current = void 0, t?.isConnected && (t.matches(Lt) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
998
1394
  },
999
- "data-testid": d,
1395
+ "data-testid": s,
1000
1396
  children: t
1001
1397
  })
1002
1398
  });
1003
1399
  },
1004
1400
  Title: ({ children: t, testId: n }) => {
1005
- let { titleId: r, isLabelled: i, registerNamePart: a } = K("Title");
1006
- if (s(() => a("title"), [a]), i) throw new ut();
1401
+ let { titleId: r, isLabelled: i, registerNamePart: a } = Q("Title");
1402
+ if (c(() => a("title"), [a]), i) throw new At();
1007
1403
  return /* @__PURE__ */ e("div", {
1008
1404
  "data-dialog-member": "title",
1009
- className: ft(),
1405
+ className: Mt(),
1010
1406
  "data-testid": n,
1011
1407
  children: /* @__PURE__ */ e("h1", {
1012
1408
  id: r,
@@ -1016,10 +1412,10 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1016
1412
  });
1017
1413
  },
1018
1414
  Description: ({ children: t, testId: n }) => {
1019
- let { descriptionId: r, registerNamePart: i } = K("Description");
1020
- return s(() => i("description"), [i]), /* @__PURE__ */ e("div", {
1415
+ let { descriptionId: r, registerNamePart: i } = Q("Description");
1416
+ return c(() => i("description"), [i]), /* @__PURE__ */ e("div", {
1021
1417
  "data-dialog-member": "description",
1022
- className: pt(),
1418
+ className: Nt(),
1023
1419
  "data-testid": n,
1024
1420
  children: /* @__PURE__ */ e("p", {
1025
1421
  id: r,
@@ -1028,29 +1424,29 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1028
1424
  })
1029
1425
  });
1030
1426
  },
1031
- Content: ({ children: t, testId: n }) => (K("Content"), /* @__PURE__ */ e("div", {
1427
+ Content: ({ children: t, testId: n }) => (Q("Content"), /* @__PURE__ */ e("div", {
1032
1428
  "data-dialog-member": "content",
1033
- className: mt(),
1429
+ className: Pt(),
1034
1430
  "data-testid": n,
1035
1431
  children: t
1036
1432
  })),
1037
- Actions: ({ children: t, testId: n }) => (K("Actions"), /* @__PURE__ */ e("div", {
1433
+ Actions: ({ children: t, testId: n }) => (Q("Actions"), /* @__PURE__ */ e("div", {
1038
1434
  "data-dialog-member": "actions",
1039
- className: ht(),
1435
+ className: Ft(),
1040
1436
  "data-testid": n,
1041
1437
  children: t
1042
1438
  }))
1043
- }, _t = h("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
1439
+ }, Bt = v("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
1044
1440
  variants: { edge: {
1045
1441
  none: "",
1046
1442
  rule: "border-t border-solid border-rule"
1047
1443
  } },
1048
1444
  defaultVariants: { edge: "rule" }
1049
- }), vt = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
1050
- className: _t({ edge: t }),
1445
+ }), Vt = ({ edge: t, children: n, testId: r }) => /* @__PURE__ */ e("footer", {
1446
+ className: Bt({ edge: t }),
1051
1447
  "data-testid": r,
1052
1448
  children: n
1053
- }), yt = h("font-secondary text-small", {
1449
+ }), Ht = v("font-secondary text-small", {
1054
1450
  variants: { state: {
1055
1451
  idle: "text-muted",
1056
1452
  sending: "text-muted",
@@ -1058,13 +1454,13 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1058
1454
  failed: "text-error"
1059
1455
  } },
1060
1456
  defaultVariants: { state: "idle" }
1061
- }), bt = {
1457
+ }), Ut = {
1062
1458
  sent: "status",
1063
1459
  failed: "alert"
1064
- }, xt = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
1460
+ }, Wt = ({ action: n, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
1065
1461
  let l = s != null && typeof s != "boolean";
1066
1462
  if (i === "sent" && !l) throw Error("Form in the `sent` state must be given a `note` - it is the outcome message.");
1067
- let u = i !== "sent", d = bt[i];
1463
+ let u = i !== "sent", d = Ut[i];
1068
1464
  return /* @__PURE__ */ t("form", {
1069
1465
  action: n,
1070
1466
  method: r,
@@ -1082,12 +1478,12 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1082
1478
  }),
1083
1479
  l && /* @__PURE__ */ e("p", {
1084
1480
  role: d,
1085
- className: yt({ state: i }),
1481
+ className: Ht({ state: i }),
1086
1482
  children: s
1087
1483
  })
1088
1484
  ]
1089
1485
  });
1090
- }, St = h([
1486
+ }, Gt = v([
1091
1487
  "flex items-baseline justify-between",
1092
1488
  "font-secondary text-label leading-label tracking-label text-muted",
1093
1489
  "py-[var(--space-region)] px-[var(--gutter)]",
@@ -1098,50 +1494,50 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1098
1494
  rule: "border-b border-solid border-rule"
1099
1495
  } },
1100
1496
  defaultVariants: { edge: "rule" }
1101
- }), Ct = [
1497
+ }), Kt = [
1102
1498
  "inline-flex shrink-0 items-center",
1103
1499
  "min-h-[calc(var(--text-label)*var(--leading-label))]",
1104
1500
  "min-w-[var(--standing-min-width)]"
1105
- ].join(" "), wt = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
1106
- className: St({ edge: n }),
1501
+ ].join(" "), qt = ({ edge: n, standing: r, navName: i, children: a, testId: o }) => /* @__PURE__ */ t("header", {
1502
+ className: Gt({ edge: n }),
1107
1503
  "data-testid": o,
1108
1504
  children: [/* @__PURE__ */ e("div", {
1109
- className: Ct,
1505
+ className: Kt,
1110
1506
  children: r
1111
1507
  }), /* @__PURE__ */ e("nav", {
1112
1508
  "aria-label": i,
1113
1509
  className: "flex flex-wrap items-baseline gap-[var(--space-region)]",
1114
1510
  children: a
1115
1511
  })]
1116
- }), Tt = h("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
1512
+ }), Jt = v("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
1117
1513
  variants: { place: {
1118
1514
  start: "justify-start",
1119
1515
  center: "justify-center",
1120
1516
  between: "justify-between"
1121
1517
  } },
1122
1518
  defaultVariants: { place: "center" }
1123
- }), Et = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
1124
- className: Tt({ place: t }),
1519
+ }), Yt = ({ place: t, children: n, testId: r }) => /* @__PURE__ */ e("div", {
1520
+ className: Jt({ place: t }),
1125
1521
  "data-testid": r,
1126
1522
  children: n
1127
- }), Dt = h("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), Ot = h("font-primary text-title leading-title tracking-optical text-foreground"), kt = h("font-primary text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), X = h("font-primary text-small text-muted max-w-[var(--measure)]"), At = ({ title: n, lede: r, intro: i, testId: a }) => /* @__PURE__ */ t("header", {
1128
- className: Dt(),
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(),
1129
1525
  "data-testid": a,
1130
1526
  children: [
1131
1527
  /* @__PURE__ */ e("h1", {
1132
- className: Ot(),
1528
+ className: Zt(),
1133
1529
  children: n
1134
1530
  }),
1135
1531
  r !== void 0 && /* @__PURE__ */ e("p", {
1136
- className: kt(),
1532
+ className: Qt(),
1137
1533
  children: r
1138
1534
  }),
1139
1535
  i !== void 0 && /* @__PURE__ */ e("p", {
1140
- className: X(),
1536
+ className: $t(),
1141
1537
  children: i
1142
1538
  })
1143
1539
  ]
1144
- }), jt = h([
1540
+ }), tn = v([
1145
1541
  "relative",
1146
1542
  "py-[var(--space-band)]",
1147
1543
  "[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
@@ -1151,20 +1547,20 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1151
1547
  full: ""
1152
1548
  } },
1153
1549
  defaultVariants: { bleed: "inset" }
1154
- }), Mt = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
1550
+ }), nn = ({ bleed: t, name: n, children: r, testId: i }) => /* @__PURE__ */ e("section", {
1155
1551
  "data-section": "",
1156
- className: jt({ bleed: t }),
1552
+ className: tn({ bleed: t }),
1157
1553
  "aria-label": n,
1158
1554
  "data-testid": i,
1159
1555
  children: r
1160
- }), Nt = h([
1556
+ }), rn = v([
1161
1557
  "grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
1162
1558
  "[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
1163
1559
  "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)]",
1164
1560
  "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",
1165
1561
  "[&>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))]",
1166
1562
  "[&>div:first-child>nav>ul]:flex [&>div:first-child>nav>ul]:flex-col [&>div:first-child>nav>ul]:gap-[var(--space-stack)]"
1167
- ].join(" ")), Pt = (e) => {
1563
+ ].join(" ")), an = (e) => {
1168
1564
  if (!e) return;
1169
1565
  let t = [];
1170
1566
  for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
@@ -1178,7 +1574,7 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1178
1574
  return window.addEventListener("resize", n), () => {
1179
1575
  r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
1180
1576
  };
1181
- }, Ft = h([
1577
+ }, on = v([
1182
1578
  "w-full text-left font-secondary text-label tracking-label",
1183
1579
  "underline-offset-[var(--underline-offset)]",
1184
1580
  "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
@@ -1189,44 +1585,44 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1189
1585
  inert: "text-muted cursor-not-allowed"
1190
1586
  } },
1191
1587
  defaultVariants: { state: "usable" }
1192
- }), Z = r(void 0), Q = ({ entryKey: t, children: n, inert: r, testId: i }) => {
1193
- let a = o(Z), s = a !== void 0 && a.active === t;
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;
1194
1590
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", {
1195
1591
  type: "button",
1196
- className: Ft({ state: r ? "inert" : s ? "active" : "usable" }),
1592
+ className: on({ state: r ? "inert" : o ? "active" : "usable" }),
1197
1593
  disabled: r,
1198
- "aria-current": s ? "true" : void 0,
1594
+ "aria-current": o ? "true" : void 0,
1199
1595
  "data-testid": i,
1200
1596
  onClick: () => {
1201
- s || a?.onSelect$.next(t);
1597
+ o || a?.onSelect$.next(t);
1202
1598
  },
1203
1599
  children: n
1204
1600
  }) });
1205
- }, $ = ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
1601
+ }, ln = ({ children: t, testId: n }) => /* @__PURE__ */ e("div", {
1206
1602
  "data-testid": n,
1207
1603
  children: t
1208
- }), It = {
1209
- Root: ({ active: r, label: a, onSelect$: o, children: s, testId: c }) => {
1210
- let l = n.toArray(s).filter(i);
1604
+ }), un = {
1605
+ Root: ({ active: r, label: i, onSelect$: o, children: s, testId: c }) => {
1606
+ let l = n.toArray(s).filter(a);
1211
1607
  return /* @__PURE__ */ t("div", {
1212
- className: Nt(),
1608
+ className: rn(),
1213
1609
  "data-testid": c,
1214
1610
  children: [/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("nav", {
1215
- ref: Pt,
1216
- "aria-label": a,
1217
- children: /* @__PURE__ */ e(Z, {
1611
+ ref: an,
1612
+ "aria-label": i,
1613
+ children: /* @__PURE__ */ e(sn, {
1218
1614
  value: {
1219
1615
  active: r,
1220
1616
  onSelect$: o
1221
1617
  },
1222
- children: /* @__PURE__ */ e("ul", { children: l.filter((e) => e.type === Q) })
1618
+ children: /* @__PURE__ */ e("ul", { children: l.filter((e) => e.type === cn) })
1223
1619
  })
1224
- }) }), l.filter((e) => e.type === $)]
1620
+ }) }), l.filter((e) => e.type === ln)]
1225
1621
  });
1226
1622
  },
1227
- Item: Q,
1228
- Content: $
1229
- }, Lt = {
1623
+ Item: cn,
1624
+ Content: ln
1625
+ }, dn = {
1230
1626
  surface: "#ffffff",
1231
1627
  foreground: "#0f172a",
1232
1628
  muted: "#64748b",
@@ -1251,7 +1647,7 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1251
1647
  warning: "#b45309",
1252
1648
  error: "#d63384",
1253
1649
  info: "#0e7490"
1254
- }, Rt = {
1650
+ }, fn = {
1255
1651
  surface: "#0f172a",
1256
1652
  foreground: "#f8fafc",
1257
1653
  muted: "#94a3b8",
@@ -1278,4 +1674,4 @@ var p = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, m = f, h = (e
1278
1674
  info: "#22d3ee"
1279
1675
  };
1280
1676
  //#endregion
1281
- export { x as Brandmark, Pe as Button, w as Checklist, Ve as Choices, _ as Cluster, te as Collection, ct as Cover, ae as DefinitionList, gt as Dialog, M as Eyebrow, se as Figure, vt as Footer, xt as Form, P as H1, I as H2, _e as H3, ye as H4, xe as H5, Ce as H6, wt as Header, Et as Hero, Ue as Input, Ge as Link, ue as Meter, Te as Note, De as P, At as PageHead, Me as Prose, he as Rail, Mt as Section, qe as Select, It as Sidebar, Xe as Slider, y as Stack, A as Table, rt as Tabs, at as TextArea, Rt as dark, Lt as light };
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 };