@minimalstuff/ui 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
1
  import e from "clsx";
2
2
  import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { cloneElement as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
4
- import { arrow as h, autoUpdate as g, flip as _, offset as v, shift as y, useFloating as b } from "@floating-ui/react-dom";
5
- import { createPortal as x } from "react-dom";
6
- import { create as S } from "zustand";
7
- import { createCallable as C } from "react-call";
3
+ import { cloneElement as i, createContext as a, isValidElement as o, memo as s, useCallback as c, useContext as l, useEffect as u, useEffectEvent as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
4
+ import { arrow as _, autoUpdate as v, flip as y, offset as b, shift as x, useFloating as S } from "@floating-ui/react-dom";
5
+ import { createPortal as C } from "react-dom";
6
+ import { create as w } from "zustand";
7
+ import { createCallable as T } from "react-call";
8
8
  // src/components/shared/surface_tokens.ts
9
- var w = "border-gray-300 dark:border-gray-600", T = "bg-white dark:bg-gray-800", E = "border-gray-200 dark:border-gray-700", D = "bg-white dark:bg-gray-900", O = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", k = `[scrollbar-width:thin] ${O}`;
10
- `${O}`;
9
+ var E = "border-gray-300 dark:border-gray-600", D = "bg-white dark:bg-gray-800", O = "border-gray-200 dark:border-gray-700", k = "bg-white dark:bg-gray-900", A = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", j = `[scrollbar-width:thin] ${A}`;
10
+ `${A}`;
11
11
  // src/components/app_bar/app_bar.tsx
12
- var A = e("grid min-h-8 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b text-xs", "pl-[max(0.75rem,env(safe-area-inset-left))] pr-[max(0.75rem,env(safe-area-inset-right))]", "text-gray-700 dark:text-gray-300", D, E);
13
- function j(t) {
12
+ var M = e("grid min-h-8 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b text-xs", "pl-[max(0.75rem,env(safe-area-inset-left))] pr-[max(0.75rem,env(safe-area-inset-right))]", "text-gray-700 dark:text-gray-300", k, O);
13
+ function N(t) {
14
14
  let { start: i, title: a, end: o, startClassName: s, titleClassName: c, endClassName: l, unstyled: u = !1, className: d, ...f } = t;
15
15
  return /* @__PURE__ */ r("header", {
16
16
  ...f,
17
- className: e(!u && A, d),
17
+ className: e(!u && M, d),
18
18
  children: [
19
19
  /* @__PURE__ */ n("div", {
20
20
  className: e("flex min-w-0 items-center justify-start", s),
@@ -32,7 +32,7 @@ function j(t) {
32
32
  });
33
33
  }
34
34
  // src/components/shared/focus_styles.ts
35
- var M = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", N = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", P = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", F = "has-[:focus-visible]:ring-blue-500", I = "has-[:focus-visible]:ring-red-500", L = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", R = {
35
+ var P = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", F = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", I = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", L = "has-[:focus-visible]:ring-blue-500", R = "has-[:focus-visible]:ring-red-500", z = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", B = "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400", V = {
36
36
  primary: {
37
37
  solid: "border-transparent bg-blue-600 text-white interactive:hover:bg-blue-700 interactive:active:bg-blue-800",
38
38
  outline: "border-blue-300 bg-transparent text-blue-700 interactive:hover:bg-blue-50 interactive:active:bg-blue-100 dark:border-blue-800 dark:text-blue-400 dark:interactive:hover:bg-blue-950/40 dark:interactive:active:bg-blue-950/60",
@@ -73,85 +73,85 @@ var M = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
73
73
  pressedSolid: "border-transparent bg-yellow-900 text-white ring-2 ring-inset ring-white interactive:hover:bg-yellow-950 interactive:active:bg-yellow-950",
74
74
  focusOutline: "focus-visible:outline-yellow-700 dark:focus-visible:outline-yellow-500"
75
75
  }
76
- }, z = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", B = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${M}`;
77
- function V(e, t, n) {
78
- let r = R[e];
76
+ }, H = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", U = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${P}`;
77
+ function W(e, t, n) {
78
+ let r = V[e];
79
79
  return n ? r.pressedSolid : r[t];
80
80
  }
81
81
  // src/components/shared/radius.ts
82
- var H = {
82
+ var G = {
83
83
  none: "rounded-none",
84
84
  sm: "rounded-sm",
85
85
  md: "rounded-md",
86
86
  lg: "rounded-lg",
87
87
  xl: "rounded-xl",
88
88
  full: "rounded-full"
89
- }, U = {
90
- ...H,
91
- full: H.lg
92
- }, W = {
89
+ }, ee = {
90
+ ...G,
91
+ full: G.lg
92
+ }, te = {
93
93
  xs: "h-6 w-6 text-xs",
94
94
  sm: "h-8 w-8 text-sm",
95
95
  md: "h-10 w-10 text-base",
96
96
  lg: "h-12 w-12 text-xl"
97
- }, G = new Intl.Segmenter(void 0, { granularity: "grapheme" });
98
- function ee(e) {
97
+ }, ne = new Intl.Segmenter(void 0, { granularity: "grapheme" });
98
+ function re(e) {
99
99
  let t = e.trim();
100
100
  if (t.length === 0) return "";
101
- let [n] = G.segment(t);
101
+ let [n] = ne.segment(t);
102
102
  return n.segment.toUpperCase();
103
103
  }
104
- function te({ name: t, src: r, size: i = "sm", color: a = "primary", radius: o = "full", unstyled: s = !1, className: c }) {
105
- let [l, u] = m(null), d = r !== void 0 && r !== l, f = t.trim().length > 0, p = d ? /* @__PURE__ */ n("img", {
104
+ function ie({ name: t, src: r, size: i = "sm", color: a = "primary", radius: o = "full", unstyled: s = !1, className: c }) {
105
+ let [l, u] = g(null), d = r !== void 0 && r !== l, f = t.trim().length > 0, p = d ? /* @__PURE__ */ n("img", {
106
106
  src: r,
107
107
  alt: "",
108
108
  onError: () => u(r ?? null),
109
109
  className: "h-full w-full object-cover"
110
110
  }) : /* @__PURE__ */ n("span", {
111
111
  "aria-hidden": "true",
112
- children: ee(t)
112
+ children: re(t)
113
113
  });
114
114
  return /* @__PURE__ */ n("span", {
115
115
  role: f ? "img" : void 0,
116
116
  "aria-label": f ? t : void 0,
117
117
  "aria-hidden": !f || void 0,
118
- className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", W[i], !s && H[o], !s && !d && ["border font-semibold", R[a].solid], c),
118
+ className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", te[i], !s && G[o], !s && !d && ["border font-semibold", V[a].solid], c),
119
119
  children: p
120
120
  });
121
121
  }
122
122
  // src/components/badge/badge.tsx
123
- var ne = {
123
+ var ae = {
124
124
  xs: "px-1.5 py-0.5 text-xs",
125
125
  sm: "px-2.5 py-1 text-sm",
126
126
  md: "px-3 py-1 text-base",
127
127
  lg: "px-3.5 py-1.5 text-lg"
128
- }, re = ({ children: t, color: r = "primary", variant: i = "subtle", size: a = "sm", radius: o = "md", unstyled: s = !1, className: c, ...l }) => /* @__PURE__ */ n("span", {
128
+ }, oe = ({ children: t, color: r = "primary", variant: i = "subtle", size: a = "sm", radius: o = "md", unstyled: s = !1, className: c, ...l }) => /* @__PURE__ */ n("span", {
129
129
  className: e("inline-flex items-center", !s && [
130
130
  "gap-1 border",
131
- H[o],
132
- ne[a],
133
- R[r][i]
131
+ G[o],
132
+ ae[a],
133
+ V[r][i]
134
134
  ], c),
135
135
  ...l,
136
136
  children: t
137
- }), ie = {
137
+ }), se = {
138
138
  xs: "px-2 py-1 text-xs",
139
139
  sm: "px-3 py-1.5 text-sm",
140
140
  md: "px-4 py-2 text-sm",
141
141
  lg: "px-4 py-3 text-base"
142
142
  };
143
- function K(t = {}) {
143
+ function ce(t = {}) {
144
144
  let { variant: n = "solid", color: r = "primary", size: i = "md", radius: a = "md", fullWidth: o = !1, pressed: s = !1, unstyled: c = !1, className: l } = t;
145
- return e(z, !c && [
146
- B,
145
+ return e(H, !c && [
146
+ U,
147
147
  "gap-2 font-medium border",
148
- H[a],
149
- ie[i],
150
- V(r, n, s),
151
- R[r].focusOutline
148
+ G[a],
149
+ se[i],
150
+ W(r, n, s),
151
+ V[r].focusOutline
152
152
  ], o && "w-full", l);
153
153
  }
154
- var q = a({
154
+ var K = a({
155
155
  close: "Close",
156
156
  confirm: "Confirm",
157
157
  cancel: "Cancel",
@@ -170,23 +170,23 @@ var q = a({
170
170
  maxSelectedHint: (e) => `You can select up to ${e} items`
171
171
  });
172
172
  // src/components/ui_provider/use_labels.ts
173
- function J() {
174
- return c(q);
173
+ function q() {
174
+ return l(K);
175
175
  }
176
176
  // src/components/button/button.tsx
177
- var ae = {
177
+ var le = {
178
178
  xs: "w-3.5 h-3.5",
179
179
  sm: "w-4 h-4",
180
180
  md: "w-4 h-4",
181
181
  lg: "w-5 h-5"
182
182
  };
183
- function Y(t) {
184
- let { unstyled: i = !1, variant: a = "solid", color: o = "primary", size: s = "md", radius: c = "md", children: l, className: u, fullWidth: d = !1, loading: f = !1, pressed: p, startIcon: m, endIcon: h, disabled: g, onClick: _, "aria-label": v, ...y } = t, b = J(), x = v !== void 0, S = f && x ? `${v} ${b.loading}` : v, C = ae[s], w = (e) => {
183
+ function J(t) {
184
+ let { unstyled: i = !1, variant: a = "solid", color: o = "primary", size: s = "md", radius: c = "md", children: l, className: u, fullWidth: d = !1, loading: f = !1, pressed: p, startIcon: m, endIcon: h, disabled: g, onClick: _, "aria-label": v, ...y } = t, b = q(), x = v !== void 0, S = f && x ? `${v} ${b.loading}` : v, C = le[s], w = (e) => {
185
185
  f ? e.preventDefault() : _?.(e);
186
186
  };
187
187
  return /* @__PURE__ */ r("button", {
188
188
  type: "button",
189
- className: K({
189
+ className: ce({
190
190
  variant: a,
191
191
  color: o,
192
192
  size: s,
@@ -225,13 +225,13 @@ function Y(t) {
225
225
  });
226
226
  }
227
227
  // src/components/card/card_header.tsx
228
- var oe = {
228
+ var ue = {
229
229
  2: "h2",
230
230
  3: "h3",
231
231
  4: "h4"
232
232
  };
233
- function X({ title: e, titleId: t, level: i, description: a, actions: o }) {
234
- let s = oe[i];
233
+ function Y({ title: e, titleId: t, level: i, description: a, actions: o }) {
234
+ let s = ue[i];
235
235
  return /* @__PURE__ */ r("div", {
236
236
  className: "mb-4",
237
237
  children: [/* @__PURE__ */ r("div", {
@@ -248,25 +248,25 @@ function X({ title: e, titleId: t, level: i, description: a, actions: o }) {
248
248
  });
249
249
  }
250
250
  // src/components/card/card.tsx
251
- var se = {
251
+ var de = {
252
252
  none: "",
253
253
  sm: "p-4",
254
254
  md: "p-6",
255
255
  lg: "p-8"
256
256
  };
257
- function ce({ children: t, title: i, description: a, actions: o, headingLevel: s = 2, padding: c = "md", radius: l = "lg", unstyled: d = !1, className: f }) {
258
- let p = u(), m = !!i;
257
+ function fe({ children: t, title: i, description: a, actions: o, headingLevel: s = 2, padding: c = "md", radius: l = "lg", unstyled: u = !1, className: d }) {
258
+ let p = f(), m = !!i;
259
259
  return /* @__PURE__ */ r("div", {
260
260
  role: m ? "region" : void 0,
261
261
  "aria-labelledby": m ? p : void 0,
262
- className: e(!d && [
262
+ className: e(!u && [
263
263
  "border",
264
264
  "bg-white dark:bg-gray-800",
265
265
  "border-gray-200 dark:border-gray-700",
266
- H[l],
267
- se[c]
268
- ], f),
269
- children: [m && /* @__PURE__ */ n(X, {
266
+ G[l],
267
+ de[c]
268
+ ], d),
269
+ children: [m && /* @__PURE__ */ n(Y, {
270
270
  title: i,
271
271
  titleId: p,
272
272
  level: s,
@@ -276,23 +276,23 @@ function ce({ children: t, title: i, description: a, actions: o, headingLevel: s
276
276
  });
277
277
  }
278
278
  // src/components/character_count/character_count.tsx
279
- var le = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", ue = .1;
280
- function de(e, t) {
279
+ var pe = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", me = .1;
280
+ function he(e, t) {
281
281
  if (t === void 0) return "ok";
282
282
  let n = t - e;
283
- return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * ue)) ? "low" : "ok";
283
+ return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * me)) ? "low" : "ok";
284
284
  }
285
- function fe(e, t) {
285
+ function X(e, t) {
286
286
  return t ? "" : e === "overLimit" ? "text-red-600 dark:text-red-400" : e === "atLimit" ? "text-amber-700 dark:text-amber-400" : "";
287
287
  }
288
288
  function Z({ current: i, min: a, max: o, showMin: s, showMax: c, unstyled: l = !1, id: u, className: d }) {
289
- let f = J(), p = de(i, o), [h, g] = m({
289
+ let f = q(), p = he(i, o), [m, h] = g({
290
290
  zone: p,
291
291
  message: ""
292
292
  });
293
- if (h.zone !== p) {
293
+ if (m.zone !== p) {
294
294
  let e = Math.max(0, (o ?? 0) - i);
295
- g({
295
+ h({
296
296
  zone: p,
297
297
  message: p === "ok" ? "" : f.charactersRemaining(e)
298
298
  });
@@ -300,34 +300,34 @@ function Z({ current: i, min: a, max: o, showMin: s, showMax: c, unstyled: l = !
300
300
  let _ = s === !0 || c === !0, v = a !== void 0 && i <= a ? "atLimit" : "ok", y = o !== void 0 && i > o ? "overLimit" : o !== void 0 && i >= o ? "atLimit" : "ok", b = _ ? `${i}/${a} min` : `${i} (min ${a})`, x = _ ? `${i}/${o} max` : `${i}/${o}`;
301
301
  return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
302
302
  id: u,
303
- className: e(!l && le, d),
303
+ className: e(!l && pe, d),
304
304
  children: [
305
305
  s && a !== void 0 && /* @__PURE__ */ n("span", {
306
- className: fe(v, l),
306
+ className: X(v, l),
307
307
  children: b
308
308
  }),
309
309
  s && c && " · ",
310
310
  c && o !== void 0 && /* @__PURE__ */ n("span", {
311
- className: fe(y, l),
311
+ className: X(y, l),
312
312
  children: x
313
313
  }),
314
314
  !s && !c && o !== void 0 && /* @__PURE__ */ n("span", {
315
- className: fe(y, l),
315
+ className: X(y, l),
316
316
  children: x
317
317
  }),
318
318
  !s && !c && a !== void 0 && o === void 0 && /* @__PURE__ */ n("span", {
319
- className: fe(v, l),
319
+ className: X(v, l),
320
320
  children: b
321
321
  })
322
322
  ]
323
323
  }), /* @__PURE__ */ n("span", {
324
324
  "aria-live": "polite",
325
325
  className: "sr-only",
326
- children: h.message
326
+ children: m.message
327
327
  })] });
328
328
  }
329
329
  // src/components/shared/checkmark_icon.tsx
330
- function pe() {
330
+ function ge() {
331
331
  return /* @__PURE__ */ n("svg", {
332
332
  className: "h-3 w-3 text-white",
333
333
  viewBox: "0 0 12 12",
@@ -340,7 +340,7 @@ function pe() {
340
340
  });
341
341
  }
342
342
  // src/components/shared/dash_icon.tsx
343
- function me() {
343
+ function _e() {
344
344
  return /* @__PURE__ */ n("svg", {
345
345
  className: "h-3 w-3 text-white",
346
346
  viewBox: "0 0 12 12",
@@ -356,63 +356,63 @@ function me() {
356
356
  })
357
357
  });
358
358
  }
359
- var he = `w-full border ${w} ${T} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${N} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, ge = "text-sm font-medium text-gray-700 dark:text-gray-300", _e = "text-red-500 dark:text-red-400 ml-1", ve = "text-xs text-gray-600 dark:text-gray-400", ye = "text-xs text-red-600 dark:text-red-400", be = "border-red-500 dark:border-red-400", xe = ({ id: t, description: r, className: i }) => r ? typeof r == "string" ? /* @__PURE__ */ n("p", {
359
+ var ve = `w-full border ${E} ${D} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${F} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, ye = "text-sm font-medium text-gray-700 dark:text-gray-300", be = "text-red-500 dark:text-red-400 ml-1", xe = "text-xs text-gray-600 dark:text-gray-400", Se = "text-xs text-red-600 dark:text-red-400", Ce = "border-red-500 dark:border-red-400", we = ({ id: t, description: r, className: i }) => r ? typeof r == "string" ? /* @__PURE__ */ n("p", {
360
360
  id: t,
361
- className: e(ve, i),
361
+ className: e(xe, i),
362
362
  children: r
363
363
  }) : /* @__PURE__ */ n("span", {
364
364
  id: t,
365
- className: e(ve, "block", i),
365
+ className: e(xe, "block", i),
366
366
  children: r
367
- }) : null, Se = a(!0);
368
- function Ce() {
369
- return c(Se);
367
+ }) : null, Te = a(!0);
368
+ function Ee() {
369
+ return l(Te);
370
370
  }
371
371
  // src/components/shared/field_error.tsx
372
- var we = ({ id: t, error: r, className: i }) => {
373
- let a = Ce();
372
+ var Q = ({ id: t, error: r, className: i }) => {
373
+ let a = Ee();
374
374
  return r ? /* @__PURE__ */ n("p", {
375
375
  id: t,
376
- className: e(ye, i),
376
+ className: e(Se, i),
377
377
  role: a ? "alert" : void 0,
378
378
  children: r
379
379
  }) : null;
380
380
  };
381
381
  // src/components/shared/join_ids.ts
382
- function Q(...e) {
382
+ function De(...e) {
383
383
  return e.filter(Boolean).join(" ") || void 0;
384
384
  }
385
385
  // src/components/shared/option_card_styles.ts
386
- function Te(t) {
386
+ function Oe(t) {
387
387
  let { isSelected: n, isError: r, isDisabled: i, radius: a, unstyled: o } = t;
388
- return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", P, r ? I : F, !o && [
389
- H[a],
388
+ return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", I, r ? R : L, !o && [
389
+ G[a],
390
390
  "border px-3 py-2.5",
391
391
  n ? r ? e("border-red-500 dark:border-red-400", "bg-red-50 dark:bg-red-950/20") : "border-blue-500 bg-blue-50 dark:border-blue-500 dark:bg-blue-950/25" : r ? "border-red-300 bg-white dark:border-red-800/50 dark:bg-gray-800/50" : e("border-gray-200 dark:border-gray-700", "bg-gray-50 hover:border-gray-300 hover:bg-white dark:bg-gray-800/50 dark:hover:border-gray-600 dark:hover:bg-gray-800")
392
392
  ], i && "cursor-not-allowed opacity-50");
393
393
  }
394
- function Ee(e) {
394
+ function ke(e) {
395
395
  let { isSelected: t, isError: n } = e;
396
- return t ? n ? be : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : w;
396
+ return t ? n ? Ce : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : E;
397
397
  }
398
398
  // src/components/shared/required_mark.tsx
399
- function De() {
399
+ function Ae() {
400
400
  return /* @__PURE__ */ n("span", {
401
- className: _e,
401
+ className: be,
402
402
  "aria-hidden": "true",
403
403
  children: "*"
404
404
  });
405
405
  }
406
406
  // src/components/shared/use_controlled_state.ts
407
- function Oe(e, t) {
408
- let [n, r] = m(t), i = e !== void 0, a = s((e) => {
407
+ function je(e, t) {
408
+ let [n, r] = g(t), i = e !== void 0, a = c((e) => {
409
409
  i || r(e);
410
410
  }, [i]);
411
411
  return [i ? e : n, a];
412
412
  }
413
413
  // src/components/shared/use_field_ids.ts
414
- function $(e) {
415
- let t = u(), n = e ?? t;
414
+ function Me(e) {
415
+ let t = f(), n = e ?? t;
416
416
  return {
417
417
  fieldId: n,
418
418
  errorId: `${n}-error`,
@@ -422,91 +422,123 @@ function $(e) {
422
422
  };
423
423
  }
424
424
  // src/components/shared/use_warn_unnamed.ts
425
- var ke = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.";
426
- function Ae(e, t, n = ke) {
427
- l(() => {
428
- process.env.NODE_ENV === "production" || t || console.warn(`${e}: ${n}`);
425
+ var Ne = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.", Pe = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop, or a `<label>` that targets it.";
426
+ function Fe(e, t) {
427
+ process.env.NODE_ENV !== "production" && console.warn(`${e}: ${t}`);
428
+ }
429
+ function Ie(e, t, n = Ne) {
430
+ u(() => {
431
+ t || Fe(e, n);
429
432
  }, [
430
433
  e,
431
434
  t,
432
435
  n
433
436
  ]);
434
437
  }
438
+ function Le(e, t, n, r = Pe) {
439
+ u(() => {
440
+ n || (t.current?.labels?.length ?? 0) > 0 || Fe(e, r);
441
+ }, [
442
+ e,
443
+ t,
444
+ n,
445
+ r
446
+ ]);
447
+ }
435
448
  // src/lib/merge_refs.ts
436
- function je(...e) {
449
+ function $(...e) {
437
450
  return (t) => {
438
451
  for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
439
452
  };
440
453
  }
441
454
  // src/components/checkbox/checkbox.tsx
442
- function Me(e, i, a) {
455
+ function Re(e, i, a) {
443
456
  return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ r("span", {
444
457
  className: i,
445
- children: [e, a && /* @__PURE__ */ n(De, {})]
446
- }) : /* @__PURE__ */ r(t, { children: [e, a && /* @__PURE__ */ n(De, {})] });
447
- }
448
- function Ne({ label: t, indeterminate: i = !1, description: a, error: o, radius: s = "sm", unstyled: c = !1, fullWidth: u = !1, variant: d = "inline", className: m, wrapperClassName: h, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
449
- let { fieldId: T, errorId: E, descriptionId: D } = $(y), [O, k] = Oe(g, _), A = p(null), j = d === "card", M = O || i, N = Q(b, !!a && D, o && E);
450
- Ae("Checkbox", !!t || !!x?.trim() || !!S?.trim());
451
- let P = f(() => je(A, C), [C]);
452
- l(() => {
458
+ children: [e, a && /* @__PURE__ */ n(Ae, {})]
459
+ }) : /* @__PURE__ */ r(t, { children: [e, a && /* @__PURE__ */ n(Ae, {})] });
460
+ }
461
+ var ze = "absolute m-0 appearance-none opacity-0";
462
+ function Be(t) {
463
+ let { hasLabel: n, isCardVariant: r, isDisabled: i } = t;
464
+ return n ? "sr-only" : e(ze, r ? "inset-0 h-full w-full" : "-inset-0.5 h-6 w-6", i ? "cursor-not-allowed" : "cursor-pointer");
465
+ }
466
+ function Ve({ htmlFor: e, className: t, children: r }) {
467
+ return e === void 0 ? /* @__PURE__ */ n("div", {
468
+ className: t,
469
+ children: r
470
+ }) : /* @__PURE__ */ n("label", {
471
+ htmlFor: e,
472
+ className: t,
473
+ children: r
474
+ });
475
+ }
476
+ function He({ label: t, indeterminate: i = !1, description: a, error: o, radius: s = "sm", unstyled: c = !1, fullWidth: l = !1, variant: d = "inline", className: f, wrapperClassName: p, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
477
+ let { fieldId: T, errorId: E, descriptionId: D } = Me(y), [O, k] = je(g, _), A = h(null), j = d === "card", M = !!t, N = O || i, P = De(b, !!a && D, o && E);
478
+ Le("Checkbox", A, !!t || !!x?.trim() || !!S?.trim());
479
+ let F = m(() => $(A, C), [C]);
480
+ u(() => {
453
481
  A.current && (A.current.indeterminate = i);
454
482
  });
455
- let F = (e) => {
483
+ let I = (e) => {
456
484
  e.target.indeterminate = i, k(e.target.checked), v?.(e);
457
- }, I = j ? Te({
458
- isSelected: M,
485
+ }, L = j ? Oe({
486
+ isSelected: N,
459
487
  isError: !!o,
460
488
  isDisabled: w.disabled === !0,
461
489
  radius: s,
462
490
  unstyled: c
463
- }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), L = j ? e("select-none text-sm font-medium", M ? o ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(ge, "select-none"), R = e("relative shrink-0", H[s], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", o ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), z = Me(t, L, w.required === !0);
491
+ }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), R = j ? e("select-none text-sm font-medium", N ? o ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(ye, "select-none"), z = e("shrink-0", (M || !j) && "relative", G[s], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", o ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), B = Re(t, R, w.required === !0);
464
492
  return /* @__PURE__ */ r("div", {
465
- className: e(u ? "w-full" : "w-fit", h),
493
+ className: e(l ? "w-full" : "w-fit", p),
466
494
  children: [
467
- /* @__PURE__ */ r("label", {
468
- htmlFor: T,
469
- className: I,
495
+ /* @__PURE__ */ r(Ve, {
496
+ htmlFor: M ? T : void 0,
497
+ className: L,
470
498
  children: [/* @__PURE__ */ r("span", {
471
- className: R,
499
+ className: z,
472
500
  children: [/* @__PURE__ */ n("input", {
473
501
  type: "checkbox",
474
- ref: P,
502
+ ref: F,
475
503
  id: T,
476
- className: "sr-only",
504
+ className: Be({
505
+ hasLabel: M,
506
+ isCardVariant: j,
507
+ isDisabled: w.disabled === !0
508
+ }),
477
509
  checked: O,
478
- onChange: F,
510
+ onChange: I,
479
511
  "aria-invalid": !!o,
480
- "aria-describedby": N,
512
+ "aria-describedby": P,
481
513
  "aria-label": x,
482
514
  "aria-labelledby": S,
483
515
  ...w
484
516
  }), /* @__PURE__ */ n("span", {
485
517
  className: e("flex h-5 w-5 items-center justify-center transition-all duration-200", !c && [
486
- H[s],
518
+ G[s],
487
519
  "border-2",
488
- M ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800"),
520
+ N ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800"),
489
521
  o && "border-red-500 dark:border-red-400"
490
- ], m),
522
+ ], f),
491
523
  "aria-hidden": !0,
492
- children: i ? /* @__PURE__ */ n(me, {}) : O && /* @__PURE__ */ n(pe, {})
524
+ children: i ? /* @__PURE__ */ n(_e, {}) : O && /* @__PURE__ */ n(ge, {})
493
525
  })]
494
526
  }), j ? /* @__PURE__ */ r("span", {
495
527
  className: "flex min-w-0 flex-col",
496
- children: [z, a && /* @__PURE__ */ n("span", {
528
+ children: [B, a && /* @__PURE__ */ n("span", {
497
529
  id: D,
498
530
  className: e("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
499
531
  "aria-hidden": "true",
500
532
  children: a
501
533
  })]
502
- }) : z]
534
+ }) : B]
503
535
  }),
504
- !j && /* @__PURE__ */ n(xe, {
536
+ !j && /* @__PURE__ */ n(we, {
505
537
  id: D,
506
538
  description: a,
507
539
  className: "mt-1 ml-8"
508
540
  }),
509
- /* @__PURE__ */ n(we, {
541
+ /* @__PURE__ */ n(Q, {
510
542
  id: E,
511
543
  error: o,
512
544
  className: j ? "mt-1" : "mt-1 ml-8"
@@ -515,10 +547,10 @@ function Ne({ label: t, indeterminate: i = !1, description: a, error: o, radius:
515
547
  });
516
548
  }
517
549
  // src/components/shared/option_row.tsx
518
- function Pe({ item: t, htmlFor: i, descriptionId: a, orientation: o, isSelected: s, isDisabled: c, isError: l, radius: u, unstyled: d, className: f, control: p, indicator: m }) {
550
+ function Ue({ item: t, htmlFor: i, descriptionId: a, orientation: o, isSelected: s, isDisabled: c, isError: l, radius: u, unstyled: d, className: f, control: p, indicator: m }) {
519
551
  return /* @__PURE__ */ r("label", {
520
552
  htmlFor: i,
521
- className: e(Te({
553
+ className: e(Oe({
522
554
  isSelected: s,
523
555
  isError: l,
524
556
  isDisabled: c,
@@ -550,9 +582,9 @@ function Pe({ item: t, htmlFor: i, descriptionId: a, orientation: o, isSelected:
550
582
  });
551
583
  }
552
584
  // src/components/checkbox_options/checkbox_option_row.tsx
553
- function Fe({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, error: l, radius: u, unstyled: d, className: f, onToggle: p }) {
585
+ function We({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, error: l, radius: u, unstyled: d, className: f, onToggle: p }) {
554
586
  let m = !!l;
555
- return /* @__PURE__ */ n(Pe, {
587
+ return /* @__PURE__ */ n(Ue, {
556
588
  item: t,
557
589
  htmlFor: r,
558
590
  descriptionId: i,
@@ -576,44 +608,44 @@ function Fe({ option: t, optionId: r, descriptionId: i, name: a, orientation: o,
576
608
  className: "sr-only"
577
609
  }),
578
610
  indicator: /* @__PURE__ */ n("span", {
579
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", H.sm, Ee({
611
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", G.sm, ke({
580
612
  isSelected: s,
581
613
  isError: m
582
614
  }), s && (m ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
583
615
  "aria-hidden": !0,
584
- children: s && /* @__PURE__ */ n(pe, {})
616
+ children: s && /* @__PURE__ */ n(ge, {})
585
617
  })
586
618
  });
587
619
  }
588
620
  // src/components/checkbox_options/checkbox_options.tsx
589
- function Ie(e, t, n) {
621
+ function Ge(e, t, n) {
590
622
  let r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
591
623
  return e.map((e) => e.value).filter((e) => r.includes(e));
592
624
  }
593
- function Le({ options: i, orientation: a = "vertical", values: o, defaultValues: s, onChange: c, name: l, label: u, error: d, required: f, requiredLabel: p, disabled: m, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
594
- let S = J(), { fieldId: C, errorId: w } = $(y), T = l ?? C, [E, D] = Oe(o, s ?? []), O = i.map((e) => typeof e == "string" ? {
625
+ function Ke({ options: i, orientation: a = "vertical", values: o, defaultValues: s, onChange: c, name: l, label: u, error: d, required: f, requiredLabel: p, disabled: m, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
626
+ let S = q(), { fieldId: C, errorId: w } = Me(y), T = l ?? C, [E, D] = je(o, s ?? []), O = i.map((e) => typeof e == "string" ? {
595
627
  value: e,
596
628
  label: e
597
629
  } : e), k = (e) => {
598
- let t = Ie(O, E, e);
630
+ let t = Ge(O, E, e);
599
631
  D(t), c?.(t);
600
632
  };
601
633
  return /* @__PURE__ */ r("fieldset", {
602
634
  className: e("m-0 border-0 p-0", v),
603
635
  disabled: m,
604
- "aria-describedby": Q(b, d && w),
636
+ "aria-describedby": De(b, d && w),
605
637
  ...x,
606
638
  children: [
607
639
  u && /* @__PURE__ */ r("legend", {
608
640
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
609
- children: [u, f && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(De, {}), /* @__PURE__ */ n("span", {
641
+ children: [u, f && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(Ae, {}), /* @__PURE__ */ n("span", {
610
642
  className: "sr-only",
611
643
  children: ` (${p ?? S.required})`
612
644
  })] })]
613
645
  }),
614
646
  /* @__PURE__ */ n("div", {
615
647
  className: e(a === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
616
- children: O.map((e, t) => /* @__PURE__ */ n(Fe, {
648
+ children: O.map((e, t) => /* @__PURE__ */ n(We, {
617
649
  option: e,
618
650
  optionId: `${C}-${t}`,
619
651
  descriptionId: `${C}-${t}-desc`,
@@ -628,7 +660,7 @@ function Le({ options: i, orientation: a = "vertical", values: o, defaultValues:
628
660
  onToggle: k
629
661
  }, e.value))
630
662
  }),
631
- /* @__PURE__ */ n(we, {
663
+ /* @__PURE__ */ n(Q, {
632
664
  id: w,
633
665
  error: d,
634
666
  className: "mt-2"
@@ -637,9 +669,9 @@ function Le({ options: i, orientation: a = "vertical", values: o, defaultValues:
637
669
  });
638
670
  }
639
671
  // src/hooks/use_is_client/use_is_client.tsx
640
- var Re = () => {
641
- let [e, t] = m(!1);
642
- return l(() => {
672
+ var qe = () => {
673
+ let [e, t] = g(!1);
674
+ return u(() => {
643
675
  let e = requestAnimationFrame(() => {
644
676
  t(!0);
645
677
  });
@@ -649,11 +681,11 @@ var Re = () => {
649
681
  }, []), e;
650
682
  };
651
683
  // src/components/client_only/client_only.tsx
652
- function ze({ children: e, fallback: r }) {
653
- return Re() ? /* @__PURE__ */ n(t, { children: e }) : r ?? null;
684
+ function Je({ children: e, fallback: r }) {
685
+ return qe() ? /* @__PURE__ */ n(t, { children: e }) : r ?? null;
654
686
  }
655
687
  // src/components/shared/field.tsx
656
- var Be = ({ fieldId: t, errorId: i, descriptionId: a, label: o, description: s, error: c, required: l = !1, wrapperClassName: u, children: d }) => /* @__PURE__ */ r("div", {
688
+ var Ye = ({ fieldId: t, errorId: i, descriptionId: a, label: o, description: s, error: c, required: l = !1, wrapperClassName: u, children: d }) => /* @__PURE__ */ r("div", {
657
689
  className: e("w-full", u),
658
690
  children: [
659
691
  !!o && (typeof o == "string" ? /* @__PURE__ */ r("label", {
@@ -674,92 +706,458 @@ var Be = ({ fieldId: t, errorId: i, descriptionId: a, label: o, description: s,
674
706
  })]
675
707
  })),
676
708
  d,
677
- a && /* @__PURE__ */ n(xe, {
709
+ a && /* @__PURE__ */ n(we, {
678
710
  id: a,
679
711
  description: s,
680
712
  className: "mt-1"
681
713
  }),
682
- /* @__PURE__ */ n(we, {
714
+ /* @__PURE__ */ n(Q, {
683
715
  id: i,
684
716
  error: c,
685
717
  className: "mt-1"
686
718
  })
687
719
  ]
688
720
  });
721
+ // src/components/shared/has_modifier_key.ts
722
+ function Xe(e) {
723
+ return e.shiftKey || e.ctrlKey || e.altKey || e.metaKey;
724
+ }
725
+ // src/components/shared/listbox_option_id.ts
726
+ function Ze(e, t) {
727
+ return `${e}-option-${t}`;
728
+ }
729
+ // src/components/shared/listbox_option.tsx
730
+ function Qe(e) {
731
+ e.preventDefault();
732
+ }
733
+ function $e(t, n, r, i) {
734
+ return e("px-3 py-2 text-gray-900 dark:text-gray-100", n ? "opacity-50 cursor-not-allowed" : "cursor-pointer", t ? e("bg-blue-50 dark:bg-blue-900/40", B) : !n && "hover:bg-gray-50 dark:hover:bg-gray-800/60", i && "truncate", r);
735
+ }
736
+ function et(e, t) {
737
+ let n = e.querySelector(".truncate") ?? e;
738
+ n.scrollWidth > n.clientWidth ? e.setAttribute("title", t) : e.removeAttribute("title");
739
+ }
740
+ function tt(e, t, n) {
741
+ if (e !== void 0) return {
742
+ position: "absolute",
743
+ top: e,
744
+ left: 0,
745
+ right: 0
746
+ };
747
+ if (t !== void 0 || n !== void 0) return {
748
+ marginTop: t,
749
+ marginBottom: n
750
+ };
751
+ }
752
+ var nt = /* @__PURE__ */ s(function({ listboxId: e, option: t, index: r, setSize: i, isActive: a, isSelected: o, isDisabled: s, className: c, isTruncated: l, canShowTitle: u, absoluteTop: d, marginTop: f, marginBottom: p, renderContent: m, onOptionClick: h }) {
753
+ return /* @__PURE__ */ n("li", {
754
+ id: Ze(e, r),
755
+ role: "option",
756
+ "aria-selected": o,
757
+ "aria-disabled": s,
758
+ "aria-setsize": i,
759
+ "aria-posinset": r + 1,
760
+ onMouseDown: Qe,
761
+ onMouseEnter: u ? (e) => et(e.currentTarget, t.label) : void 0,
762
+ onClick: () => h(t),
763
+ className: $e(a, s, c, l),
764
+ style: tt(d, f, p),
765
+ children: m(t, o, l)
766
+ });
767
+ });
768
+ function rt(e) {
769
+ return e > 100;
770
+ }
771
+ function it(e, t, n) {
772
+ return Math.min(Math.max(e, t), n);
773
+ }
774
+ function at({ scrollTop: e, viewportHeight: t, rowHeight: n, optionCount: r, overscan: i }) {
775
+ if (r <= 0) return {
776
+ startIndex: 0,
777
+ endIndex: 0
778
+ };
779
+ if (n <= 0 || t <= 0) return {
780
+ startIndex: 0,
781
+ endIndex: Math.min(r, 20)
782
+ };
783
+ let a = Math.floor(e / n), o = Math.ceil((e + t) / n), s = it(a - i, 0, r - 1);
784
+ return {
785
+ startIndex: s,
786
+ endIndex: it(o + i, s + 1, r)
787
+ };
788
+ }
789
+ function ot({ scrollTop: e, viewportHeight: t, rowHeight: n, index: r, edgePadding: i, targetRowHeight: a }) {
790
+ let o = i + r * n, s = o + a;
791
+ return o < e ? Math.max(0, o - i) : s > e + t ? s - t : e;
792
+ }
793
+ function st({ startIndex: e, endIndex: t, activeIndex: n }) {
794
+ let r = Array.from({ length: Math.max(0, t - e) }, (t, n) => e + n);
795
+ return n < 0 ? r : n < e ? [n, ...r] : n >= t ? [...r, n] : r;
796
+ }
797
+ // src/components/shared/listbox_page_size.ts
798
+ var ct = 10;
799
+ function lt(e, t) {
800
+ return Math.max(1, Math.floor(e / t));
801
+ }
802
+ var ut = "[role=\"option\"]";
803
+ function dt(e, t = -1) {
804
+ return e.querySelector(`[role="option"]:not([aria-posinset="${t + 1}"])`)?.getBoundingClientRect().height ?? 0;
805
+ }
806
+ function ft(e, t = -1) {
807
+ if (!e) return ct;
808
+ let n = e.clientHeight, r = dt(e, t);
809
+ return n <= 0 || r <= 0 ? ct : lt(n, r);
810
+ }
811
+ // src/components/shared/use_stable_callback.ts
812
+ function pt(e) {
813
+ let t = h(e);
814
+ return p(() => {
815
+ t.current = e;
816
+ }), c((...e) => {
817
+ t.current(...e);
818
+ }, []);
819
+ }
820
+ // src/components/shared/use_listbox_metrics.ts
821
+ var mt = {
822
+ rowHeight: 0,
823
+ viewportHeight: 0,
824
+ edgePadding: 0
825
+ };
826
+ function ht(e, t) {
827
+ return {
828
+ rowHeight: dt(e, t),
829
+ viewportHeight: e.clientHeight,
830
+ edgePadding: Number.parseFloat(getComputedStyle(e).paddingTop) || 0
831
+ };
832
+ }
833
+ function gt(e, t) {
834
+ return e.rowHeight === t.rowHeight && e.viewportHeight === t.viewportHeight && e.edgePadding === t.edgePadding;
835
+ }
836
+ function _t({ listboxRef: e, optionCount: t, activeIndex: n, isEnabled: r }) {
837
+ let [i, a] = g(mt), o = h(null), s = h(null), c = pt(() => {
838
+ let t = e.current;
839
+ if (!t) return;
840
+ let r = ht(t, n);
841
+ a((e) => {
842
+ let t = {
843
+ ...r,
844
+ rowHeight: r.rowHeight || e.rowHeight
845
+ };
846
+ return gt(e, t) ? e : t;
847
+ });
848
+ });
849
+ return p(() => {
850
+ let t = e.current;
851
+ if (!r || !t || typeof ResizeObserver > "u") return;
852
+ let n = new ResizeObserver(c);
853
+ return n.observe(t), o.current = n, () => {
854
+ n.disconnect(), o.current = null, s.current = null;
855
+ };
856
+ }, [
857
+ r,
858
+ e,
859
+ c
860
+ ]), p(() => {
861
+ let t = e.current;
862
+ if (!r || !t) return;
863
+ let n = s.current;
864
+ if (n?.isConnected) return;
865
+ n && o.current?.unobserve(n);
866
+ let i = t.querySelector(ut);
867
+ i && o.current?.observe(i), s.current = i, o.current || c();
868
+ }), p(() => {
869
+ r && c();
870
+ }, [
871
+ r,
872
+ t,
873
+ c
874
+ ]), i;
875
+ }
876
+ // src/components/shared/use_listbox_window.ts
877
+ function vt(e, t) {
878
+ return e.startIndex === t.startIndex && e.endIndex === t.endIndex;
879
+ }
880
+ function yt({ listboxRef: e, optionCount: t, activeIndex: n, isWindowed: r }) {
881
+ let i = _t({
882
+ listboxRef: e,
883
+ optionCount: t,
884
+ activeIndex: n,
885
+ isEnabled: r
886
+ }), [a, o] = g(() => at({
887
+ scrollTop: 0,
888
+ viewportHeight: 0,
889
+ rowHeight: 0,
890
+ optionCount: t,
891
+ overscan: 10
892
+ })), s = c(() => {
893
+ let n = e.current;
894
+ if (!r || !n) return;
895
+ let a = at({
896
+ scrollTop: n.scrollTop,
897
+ viewportHeight: i.viewportHeight,
898
+ rowHeight: i.rowHeight,
899
+ optionCount: t,
900
+ overscan: 10
901
+ });
902
+ o((e) => vt(e, a) ? e : a);
903
+ }, [
904
+ e,
905
+ r,
906
+ i,
907
+ t
908
+ ]);
909
+ p(s, [s]);
910
+ let l = Math.min(a.endIndex, t);
911
+ return {
912
+ startIndex: Math.min(a.startIndex, l),
913
+ endIndex: l,
914
+ metrics: i,
915
+ refreshWindow: s
916
+ };
917
+ }
918
+ // src/components/shared/use_scroll_to_active_option.ts
919
+ function bt({ listboxRef: e, listboxId: t, activeIndex: n, initialVisibleIndex: r, isWindowed: i, metrics: a, refreshWindow: o }) {
920
+ let s = h(r), c = a.rowHeight > 0, l = pt((n) => {
921
+ if (!i) {
922
+ document.getElementById(Ze(t, n))?.scrollIntoView?.({ block: "nearest" });
923
+ return;
924
+ }
925
+ let r = e.current;
926
+ if (!r) return;
927
+ let s = document.getElementById(Ze(t, n))?.getBoundingClientRect().height ?? 0, c = s > 0 ? s : a.rowHeight;
928
+ r.scrollTop = ot({
929
+ scrollTop: r.scrollTop,
930
+ viewportHeight: r.clientHeight,
931
+ rowHeight: a.rowHeight,
932
+ index: n,
933
+ edgePadding: a.edgePadding,
934
+ targetRowHeight: c
935
+ }), o();
936
+ });
937
+ p(() => {
938
+ if (i && !c) return;
939
+ if (n >= 0) {
940
+ s.current = void 0, l(n);
941
+ return;
942
+ }
943
+ let e = s.current;
944
+ e === void 0 || e < 0 || (s.current = void 0, l(e));
945
+ }, [
946
+ n,
947
+ i,
948
+ c,
949
+ l
950
+ ]);
951
+ }
952
+ // src/components/shared/listbox_options.tsx
953
+ var xt = 50, St = "max-h-60 overflow-auto py-1", Ct = "w-0 min-w-full";
954
+ function wt(e, t) {
955
+ return `${e * t}px`;
956
+ }
957
+ function Tt(e, t) {
958
+ return `${t.edgePadding + e * t.rowHeight}px`;
959
+ }
960
+ function Et() {
961
+ let [e, t] = g(!1);
962
+ return u(() => {
963
+ let e = setTimeout(() => t(!0), xt);
964
+ return () => clearTimeout(e);
965
+ }, []), e;
966
+ }
967
+ function Dt({ ref: i, id: a, options: o, activeIndex: s, noResultsText: c, isWindowed: l = !1, labelOverflow: u = "wrap", initialVisibleIndex: d, "aria-label": f, "aria-labelledby": p, "aria-multiselectable": g, getOptionState: _, renderOptionContent: v, onOptionClick: y }) {
968
+ let b = o.length === 0, x = Et(), S = h(null), C = m(() => $(i, S), [i]), { startIndex: w, endIndex: T, metrics: E, refreshWindow: D } = yt({
969
+ listboxRef: S,
970
+ optionCount: o.length,
971
+ activeIndex: s,
972
+ isWindowed: l
973
+ });
974
+ bt({
975
+ listboxRef: S,
976
+ listboxId: a,
977
+ activeIndex: s,
978
+ initialVisibleIndex: d,
979
+ isWindowed: l,
980
+ metrics: E,
981
+ refreshWindow: D
982
+ });
983
+ let O = (e) => l && e === w && w > 0 ? wt(w, E.rowHeight) : void 0, k = (e) => l && e === T - 1 && T < o.length ? wt(o.length - T, E.rowHeight) : void 0, A = (e) => u === "truncate" || u === "wrap-active" && !e, M = (e, t) => {
984
+ let { isSelected: r, isDisabled: i, className: c } = _(e), u = t === s, d = t < w || t >= T;
985
+ return /* @__PURE__ */ n(nt, {
986
+ listboxId: a,
987
+ option: e,
988
+ index: t,
989
+ setSize: o.length,
990
+ isActive: u,
991
+ isSelected: r,
992
+ isDisabled: i,
993
+ className: c,
994
+ isTruncated: A(u),
995
+ canShowTitle: A(u),
996
+ absoluteTop: l && d ? Tt(t, E) : void 0,
997
+ marginTop: O(t),
998
+ marginBottom: k(t),
999
+ renderContent: v,
1000
+ onOptionClick: y
1001
+ }, e.value);
1002
+ };
1003
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("ul", {
1004
+ ref: C,
1005
+ id: a,
1006
+ role: "listbox",
1007
+ "aria-labelledby": p,
1008
+ "aria-label": f,
1009
+ "aria-multiselectable": g,
1010
+ className: e(St, u !== "wrap" && Ct, l && "relative", j),
1011
+ onScroll: l ? D : void 0,
1012
+ children: l ? st({
1013
+ startIndex: w,
1014
+ endIndex: T,
1015
+ activeIndex: s
1016
+ }).map((e) => M(o[e], e)) : o.map(M)
1017
+ }), /* @__PURE__ */ n("div", {
1018
+ role: "status",
1019
+ className: b ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
1020
+ children: b && x ? c : ""
1021
+ })] });
1022
+ }
689
1023
  // src/components/shared/resolve_node_labelled_by.ts
690
- function Ve(e, t, n) {
1024
+ function Ot(e, t, n) {
691
1025
  if (e && typeof e != "string" && !n) return t;
692
1026
  }
693
1027
  // src/components/shared/use_active_option.ts
694
- var He = -1;
695
- function Ue(e, t) {
696
- return e >= 0 && e < t ? e : He;
1028
+ var kt = -1;
1029
+ function At(e, t) {
1030
+ return e >= 0 && e < t ? e : kt;
697
1031
  }
698
- function We({ optionCount: e, getOptionId: t, isOpen: n }) {
699
- let [r, i] = m(He), a = Ue(r, e), o = s((t) => {
1032
+ function jt({ optionCount: e, getOptionId: t, isOpen: n }) {
1033
+ let [r, i] = g(kt), a = At(r, e), o = c((t) => {
700
1034
  e !== 0 && i((n) => {
701
- let r = Ue(n, e) + t;
1035
+ let r = At(n, e) + t;
702
1036
  return r < 0 ? e - 1 : r >= e ? 0 : r;
703
1037
  });
704
- }, [e]), c = s(() => {
1038
+ }, [e]), s = c((t) => {
1039
+ e !== 0 && i((n) => {
1040
+ let r = At(n, e) + t;
1041
+ return Math.min(Math.max(r, 0), e - 1);
1042
+ });
1043
+ }, [e]), l = c(() => {
705
1044
  i(0);
706
- }, []), u = s(() => {
1045
+ }, []), u = c(() => {
707
1046
  i(e - 1);
708
- }, [e]), d = s(() => {
709
- i(He);
710
- }, []), f = n && a >= 0 ? t(a) : void 0;
711
- return l(() => {
712
- f !== void 0 && document.getElementById(f)?.scrollIntoView?.({ block: "nearest" });
713
- }, [f]), {
1047
+ }, [e]), d = c(() => {
1048
+ i(kt);
1049
+ }, []);
1050
+ return {
714
1051
  activeIndex: a,
715
- activeOptionId: f,
1052
+ activeOptionId: n && a >= 0 ? t(a) : void 0,
716
1053
  move: o,
717
- first: c,
1054
+ moveWithinBounds: s,
1055
+ first: l,
718
1056
  last: u,
719
1057
  reset: d
720
1058
  };
721
1059
  }
722
- // src/components/combobox/combobox.tsx
723
- function Ge(e, t) {
724
- return e.label.toLowerCase().includes(t.toLowerCase());
1060
+ // src/components/shared/use_dropdown_viewport_fit.ts
1061
+ var Mt = 8, Nt = {
1062
+ left: "",
1063
+ maxWidth: "",
1064
+ minWidth: ""
1065
+ };
1066
+ function Pt(e) {
1067
+ return e.left === "" && e.maxWidth === "" && e.minWidth === "";
725
1068
  }
726
- function Ke({ options: t, filterOption: i = Ge, label: a, description: o, "aria-label": s, error: c, placeholder: l, noResultsText: u, clearLabel: d, radius: h = "md", unstyled: g = !1, disabled: _ = !1, required: v = !1, className: y, wrapperClassName: b, value: x, defaultValue: S = "", onChange: C, id: w }) {
727
- let T = J(), { fieldId: E, errorId: D, descriptionId: O, labelId: k } = $(w), A = `${E}-listbox`, j = p(null), [M, N] = Oe(x, S), P = t.find((e) => e.value === M), [F, I] = m(""), [L, z] = m(!1), [B, V] = m(!1), U = f(() => L ? t.filter((e) => i(e, F)) : t, [
1069
+ function Ft(e, t) {
1070
+ e.style.left = t.left, e.style.maxWidth = t.maxWidth, e.style.minWidth = t.minWidth;
1071
+ }
1072
+ function It(e) {
1073
+ let { left: t, width: n } = e.getBoundingClientRect();
1074
+ return {
1075
+ left: t,
1076
+ width: n,
1077
+ offsetLeft: e.offsetLeft,
1078
+ viewportWidth: document.documentElement.clientWidth
1079
+ };
1080
+ }
1081
+ function Lt(e) {
1082
+ let t = e.viewportWidth - 16, n = e.width > t, r = Math.min(e.width, t), i = e.left + r - (e.viewportWidth - Mt);
1083
+ return {
1084
+ left: i > 0 ? `${e.offsetLeft - i}px` : "",
1085
+ maxWidth: n ? `${t}px` : "",
1086
+ minWidth: n ? `${t}px` : ""
1087
+ };
1088
+ }
1089
+ function Rt(e) {
1090
+ let t = h(null);
1091
+ return p(() => {
1092
+ let n = t.current;
1093
+ if (!e || !n) return;
1094
+ let r = Nt, i = () => {
1095
+ Pt(r) || Ft(n, Nt);
1096
+ let e = Lt(It(n));
1097
+ Pt(r) && Pt(e) || Ft(n, e), r = e;
1098
+ };
1099
+ i(), window.addEventListener("resize", i);
1100
+ let a = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
1101
+ return a?.observe(n), n.parentElement && a?.observe(n.parentElement), () => {
1102
+ window.removeEventListener("resize", i), a?.disconnect(), Ft(n, Nt);
1103
+ };
1104
+ }, [e]), t;
1105
+ }
1106
+ // src/components/combobox/combobox.tsx
1107
+ function zt(e) {
1108
+ return e.label;
1109
+ }
1110
+ function Bt({ options: t, filterOption: i, label: a, description: o, "aria-label": s, error: c, placeholder: l, noResultsText: u, clearLabel: d, radius: f = "md", unstyled: p = !1, disabled: _ = !1, required: v = !1, className: y, wrapperClassName: b, dropdownClassName: x, optionLabelOverflow: S = "wrap", value: C, defaultValue: w = "", onChange: T, id: E }) {
1111
+ let D = q(), { fieldId: O, errorId: k, descriptionId: A, labelId: j } = Me(E), M = `${O}-listbox`, N = h(null), P = h(null), [F, I] = je(C, w), L = t.find((e) => e.value === F), [R, z] = g(""), [B, H] = g(!1), [U, W] = g(!1), ee = Rt(U), te = m(() => i ? [] : t.map((e) => e.label.toLowerCase()), [t, i]), ne = m(() => {
1112
+ if (!B) return t;
1113
+ if (i) return t.filter((e) => i(e, R));
1114
+ let e = R.toLowerCase();
1115
+ return t.filter((t, n) => te[n].includes(e));
1116
+ }, [
728
1117
  t,
729
1118
  i,
730
- L,
731
- F
732
- ]), { activeIndex: W, activeOptionId: G, move: ee, first: te, last: ne, reset: re } = We({
733
- optionCount: U.length,
734
- getOptionId: (e) => `${A}-option-${e}`,
735
- isOpen: B
736
- }), ie = B ? F : P?.label ?? "", K = () => {
737
- _ || (I(P?.label ?? ""), z(!1), V(!0), re());
738
- }, q = () => {
739
- V(!1), z(!1), re();
740
- }, ae = (e) => {
741
- N(e.value), C?.(e.value), q();
742
- }, Y = () => {
743
- N(""), C?.(""), I(""), j.current?.focus();
744
- }, oe = (e) => {
745
- I(e.target.value), z(!0), V(!0), te();
746
- }, X = () => {
747
- B || K();
748
- }, se = (e) => {
749
- e.preventDefault(), e.altKey ? B || K() : B ? ee(1) : (K(), te());
750
- }, ce = (e) => {
751
- e.preventDefault(), e.altKey ? B && q() : B ? ee(-1) : (K(), ne());
752
- }, le = (e) => {
753
- if (!B) return;
754
- let t = U[W];
755
- t ? (e.preventDefault(), ae(t)) : q();
756
- }, ue = (e) => {
757
- B && (e.preventDefault(), q());
758
- };
759
- return /* @__PURE__ */ n(Be, {
760
- fieldId: E,
761
- errorId: D,
762
- descriptionId: O,
1119
+ te,
1120
+ B,
1121
+ R
1122
+ ]), { activeIndex: re, activeOptionId: ie, move: ae, moveWithinBounds: oe, first: se, last: ce, reset: K } = jt({
1123
+ optionCount: ne.length,
1124
+ getOptionId: (e) => Ze(M, e),
1125
+ isOpen: U
1126
+ }), le = S !== "wrap" && rt(t.length), J = ne.findIndex((e) => e.value === F), ue = U ? R : L?.label ?? "", Y = () => {
1127
+ _ || (z(L?.label ?? ""), H(!1), W(!0), K());
1128
+ }, de = () => {
1129
+ W(!1), H(!1), K();
1130
+ }, fe = (e) => {
1131
+ I(e.value), T?.(e.value), de();
1132
+ }, pe = () => {
1133
+ I(""), T?.(""), z(""), N.current?.focus();
1134
+ }, me = (e) => {
1135
+ z(e.target.value), H(!0), W(!0), se();
1136
+ }, he = () => {
1137
+ U || Y();
1138
+ }, X = (e) => {
1139
+ e.preventDefault(), e.altKey ? U || Y() : U ? ae(1) : (Y(), se());
1140
+ }, Z = (e) => {
1141
+ e.preventDefault(), e.altKey ? U && de() : U ? ae(-1) : (Y(), ce());
1142
+ }, ge = (e) => {
1143
+ if (!U) return;
1144
+ let t = ne[re];
1145
+ t ? (e.preventDefault(), fe(t)) : de();
1146
+ }, _e = (e) => {
1147
+ U && (e.preventDefault(), de());
1148
+ }, ye = (e, t) => {
1149
+ U && !Xe(e) && (e.preventDefault(), oe(t * ft(P.current, re)));
1150
+ }, be = (e) => {
1151
+ let t = e.value === F;
1152
+ return {
1153
+ isSelected: t,
1154
+ className: t ? "font-medium" : void 0
1155
+ };
1156
+ }, xe = pt(fe);
1157
+ return /* @__PURE__ */ n(Ye, {
1158
+ fieldId: O,
1159
+ errorId: k,
1160
+ descriptionId: A,
763
1161
  label: a,
764
1162
  description: o,
765
1163
  error: c,
@@ -768,136 +1166,134 @@ function Ke({ options: t, filterOption: i = Ge, label: a, description: o, "aria-
768
1166
  children: /* @__PURE__ */ r("div", {
769
1167
  className: "relative",
770
1168
  children: [
771
- !g && /* @__PURE__ */ n("span", {
1169
+ !p && /* @__PURE__ */ n("span", {
772
1170
  className: "i-mdi-magnify absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-500 pointer-events-none",
773
1171
  "aria-hidden": !0
774
1172
  }),
775
1173
  /* @__PURE__ */ n("input", {
776
- ref: j,
777
- id: E,
1174
+ ref: N,
1175
+ id: O,
778
1176
  role: "combobox",
779
1177
  type: "text",
780
1178
  autoComplete: "off",
781
1179
  disabled: _,
782
1180
  placeholder: l,
783
- value: ie,
784
- onChange: oe,
785
- onClick: X,
786
- onBlur: q,
1181
+ value: ue,
1182
+ onChange: me,
1183
+ onClick: he,
1184
+ onBlur: de,
787
1185
  onKeyDown: (e) => {
788
- if (e.key === "ArrowDown") return se(e);
789
- if (e.key === "ArrowUp") return ce(e);
790
- if (e.key === "Enter") return le(e);
791
- if (e.key === "Escape") return ue(e);
1186
+ if (e.key === "PageDown") return ye(e, 1);
1187
+ if (e.key === "PageUp") return ye(e, -1);
1188
+ if (e.key === "ArrowDown") return X(e);
1189
+ if (e.key === "ArrowUp") return Z(e);
1190
+ if (e.key === "Enter") return ge(e);
1191
+ if (e.key === "Escape") return _e(e);
792
1192
  },
793
- "aria-expanded": B,
794
- "aria-controls": A,
1193
+ "aria-expanded": U,
1194
+ "aria-controls": M,
795
1195
  "aria-autocomplete": "list",
796
1196
  "aria-label": s,
797
- "aria-labelledby": Ve(a, k, s),
798
- "aria-activedescendant": G,
1197
+ "aria-labelledby": Ot(a, j, s),
1198
+ "aria-activedescendant": ie,
799
1199
  "aria-invalid": !!c,
800
1200
  "aria-required": v || void 0,
801
- "aria-describedby": Q(!!o && O, c && D),
802
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !g && [
803
- he,
804
- H[h],
1201
+ "aria-describedby": De(!!o && A, c && k),
1202
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !p && [
1203
+ ve,
1204
+ G[f],
805
1205
  "pl-9 pr-8 py-2 text-sm"
806
- ], !g && c && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), y)
1206
+ ], !p && c && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), y)
807
1207
  }),
808
- !g && P && !_ && /* @__PURE__ */ n("button", {
1208
+ !p && L && !_ && /* @__PURE__ */ n("button", {
809
1209
  type: "button",
810
- "aria-label": d ?? T.clearSelection,
1210
+ "aria-label": d ?? D.clearSelection,
811
1211
  onMouseDown: (e) => {
812
1212
  e.preventDefault();
813
1213
  },
814
- onClick: Y,
815
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", R.primary.focusOutline),
1214
+ onClick: pe,
1215
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", V.primary.focusOutline),
816
1216
  children: /* @__PURE__ */ n("span", {
817
1217
  className: "i-mdi-close block w-4 h-4",
818
1218
  "aria-hidden": !0
819
1219
  })
820
1220
  }),
821
- B && /* @__PURE__ */ r("div", {
822
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !g && [
1221
+ U && /* @__PURE__ */ n("div", {
1222
+ ref: ee,
1223
+ className: e("absolute z-10 mt-1", x ? "min-w-full" : "w-full", "text-sm shadow-lg", !p && [
823
1224
  "border",
824
1225
  "bg-white dark:bg-gray-900",
825
1226
  "border-gray-100 dark:border-gray-800",
826
- H[h]
827
- ]),
828
- children: [/* @__PURE__ */ n("ul", {
829
- id: A,
830
- role: "listbox",
831
- "aria-labelledby": a && !s ? k : void 0,
1227
+ G[f]
1228
+ ], x),
1229
+ children: /* @__PURE__ */ n(Dt, {
1230
+ ref: P,
1231
+ id: M,
1232
+ options: ne,
1233
+ activeIndex: re,
1234
+ isWindowed: le,
1235
+ labelOverflow: S,
1236
+ initialVisibleIndex: J,
1237
+ noResultsText: u ?? D.noResults,
1238
+ "aria-labelledby": a && !s ? j : void 0,
832
1239
  "aria-label": s,
833
- className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
834
- children: U.map((t, r) => /* @__PURE__ */ n("li", {
835
- id: `${A}-option-${r}`,
836
- role: "option",
837
- "aria-selected": t.value === M,
838
- onMouseDown: (e) => e.preventDefault(),
839
- onClick: () => ae(t),
840
- className: e("px-3 py-2 cursor-pointer text-gray-900 dark:text-gray-100", r === W ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : "hover:bg-gray-50 dark:hover:bg-gray-800/60", t.value === M && "font-medium"),
841
- children: t.label
842
- }, t.value))
843
- }), /* @__PURE__ */ n("div", {
844
- role: "status",
845
- className: U.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
846
- children: U.length === 0 ? u ?? T.noResults : ""
847
- })]
1240
+ getOptionState: be,
1241
+ renderOptionContent: zt,
1242
+ onOptionClick: xe
1243
+ })
848
1244
  })
849
1245
  ]
850
1246
  })
851
1247
  });
852
1248
  }
853
1249
  // src/components/menu/find_typeahead_index.ts
854
- var qe = -1;
855
- function Je(e, t, n) {
1250
+ var Vt = -1;
1251
+ function Ht(e, t, n) {
856
1252
  let r = n.toLowerCase(), i = e.length;
857
1253
  for (let n = 1; n <= i; n += 1) {
858
1254
  let a = (t + n + i) % i;
859
1255
  if (e[a]?.toLowerCase().startsWith(r)) return a;
860
1256
  }
861
- return qe;
1257
+ return Vt;
862
1258
  }
863
1259
  // src/components/menu/menu_context.ts
864
- var Ye = a(null);
865
- function Xe() {
866
- return c(Ye);
1260
+ var Ut = a(null);
1261
+ function Wt() {
1262
+ return l(Ut);
867
1263
  }
868
1264
  // src/components/menu/menu_surface.tsx
869
- var Ze = ":not(:disabled):not([aria-disabled=\"true\"])", Qe = `[role="menuitem"]${Ze}, [role="menuitemradio"]${Ze}`;
870
- function $e(e) {
871
- return Array.from(e.querySelectorAll(Qe));
1265
+ var Gt = ":not(:disabled):not([aria-disabled=\"true\"])", Kt = `[role="menuitem"]${Gt}, [role="menuitemradio"]${Gt}`;
1266
+ function qt(e) {
1267
+ return Array.from(e.querySelectorAll(Kt));
872
1268
  }
873
- function et(e, t) {
874
- let n = $e(e);
1269
+ function Jt(e, t) {
1270
+ let n = qt(e);
875
1271
  n.length !== 0 && n[(t % n.length + n.length) % n.length]?.focus({ preventScroll: !0 });
876
1272
  }
877
- function tt(e, t, n, r) {
878
- if (e.key === "ArrowDown") et(t, r + 1);
879
- else if (e.key === "ArrowUp") et(t, r - 1);
880
- else if (e.key === "Home") et(t, 0);
881
- else if (e.key === "End") et(t, n.length - 1);
1273
+ function Yt(e, t, n, r) {
1274
+ if (e.key === "ArrowDown") Jt(t, r + 1);
1275
+ else if (e.key === "ArrowUp") Jt(t, r - 1);
1276
+ else if (e.key === "Home") Jt(t, 0);
1277
+ else if (e.key === "End") Jt(t, n.length - 1);
882
1278
  else return !1;
883
1279
  return e.preventDefault(), !0;
884
1280
  }
885
- function nt(e) {
1281
+ function Xt(e) {
886
1282
  return e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey;
887
1283
  }
888
- function rt(e, t, n, r) {
889
- let i = Je(t.map((e) => e.textContent?.trim() ?? ""), n, r);
890
- i !== -1 && et(e, i);
1284
+ function Zt(e, t, n, r) {
1285
+ let i = Ht(t.map((e) => e.textContent?.trim() ?? ""), n, r);
1286
+ i !== -1 && Jt(e, i);
891
1287
  }
892
- function it({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s, radius: c, unstyled: u = !1, panelClassName: d, onClose: f, children: m, id: h, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
893
- let b = p(null);
894
- return l(() => {
1288
+ function Qt({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s, radius: c, unstyled: l = !1, panelClassName: d, onClose: f, children: p, id: m, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
1289
+ let b = h(null);
1290
+ return u(() => {
895
1291
  if (!s) return;
896
1292
  let e = b.current;
897
1293
  if (!e) return;
898
- let t = $e(e);
1294
+ let t = qt(e);
899
1295
  (v === "last" ? t[t.length - 1] : t[0])?.focus({ preventScroll: !0 });
900
- }, [s, v]), x(/* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
1296
+ }, [s, v]), C(/* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
901
1297
  className: "fixed inset-0 z-40",
902
1298
  onClick: f,
903
1299
  "aria-hidden": "true"
@@ -907,7 +1303,7 @@ function it({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s,
907
1303
  className: "z-50",
908
1304
  children: /* @__PURE__ */ n("div", {
909
1305
  ref: b,
910
- id: h,
1306
+ id: m,
911
1307
  role: "menu",
912
1308
  "aria-label": _,
913
1309
  "aria-labelledby": g,
@@ -916,47 +1312,47 @@ function it({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s,
916
1312
  onKeyDown: (e) => {
917
1313
  let t = b.current;
918
1314
  if (!t) return;
919
- let n = $e(t), r = n.indexOf(document.activeElement);
920
- tt(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f()) : e.key === "Tab" ? f() : nt(e) && (e.stopPropagation(), rt(t, n, r, e.key));
1315
+ let n = qt(t), r = n.indexOf(document.activeElement);
1316
+ Yt(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f()) : e.key === "Tab" ? f() : Xt(e) && (e.stopPropagation(), Zt(t, n, r, e.key));
921
1317
  },
922
- className: e("w-max", !u && [
1318
+ className: e("w-max", !l && [
923
1319
  "min-w-40 max-w-xs origin-top border py-1 shadow-lg backdrop-blur-sm",
924
1320
  "transition-[opacity,transform] duration-150 ease-out",
925
1321
  o ? "scale-100 opacity-100" : "ms-menu-surface-closed",
926
1322
  "bg-white dark:bg-gray-900",
927
1323
  "border-gray-100 dark:border-gray-800",
928
- H[c]
1324
+ G[c]
929
1325
  ], d),
930
1326
  onClick: (e) => e.stopPropagation(),
931
- children: /* @__PURE__ */ n(Ye.Provider, {
1327
+ children: /* @__PURE__ */ n(Ut.Provider, {
932
1328
  value: f,
933
- children: m
1329
+ children: p
934
1330
  })
935
1331
  })
936
1332
  })] }), y);
937
1333
  }
938
1334
  // src/components/shared/dialog_portal_target.ts
939
- var at = "dialog, [role=dialog], [role=alertdialog]";
940
- function ot(e) {
941
- return e?.closest(at) ?? (e?.ownerDocument ?? document).body;
1335
+ var $t = "dialog, [role=dialog], [role=alertdialog]";
1336
+ function en(e) {
1337
+ return e?.closest($t) ?? (e?.ownerDocument ?? document).body;
942
1338
  }
943
1339
  // src/components/shared/use_overlay_state.ts
944
- function st() {
945
- let [e, t] = m(!1), [n, r] = m(!1), i = p(void 0);
946
- return l(() => () => clearTimeout(i.current), []), {
1340
+ function tn() {
1341
+ let [e, t] = g(!1), [n, r] = g(!1), i = h(void 0);
1342
+ return u(() => () => clearTimeout(i.current), []), {
947
1343
  isMounted: e,
948
1344
  isVisible: n,
949
1345
  setIsVisible: r,
950
- open: s((e) => {
1346
+ open: c((e) => {
951
1347
  clearTimeout(i.current), t(!0), e && r(!0);
952
1348
  }, []),
953
- close: s(() => {
1349
+ close: c(() => {
954
1350
  clearTimeout(i.current), r(!1), i.current = setTimeout(() => t(!1), 150);
955
1351
  }, [])
956
1352
  };
957
1353
  }
958
- function ct(e, t, n) {
959
- l(() => {
1354
+ function nn(e, t, n) {
1355
+ u(() => {
960
1356
  if (!e || !t) return;
961
1357
  let r = requestAnimationFrame(() => n(!0));
962
1358
  return () => cancelAnimationFrame(r);
@@ -967,8 +1363,8 @@ function ct(e, t, n) {
967
1363
  ]);
968
1364
  }
969
1365
  // src/components/context_menu/context_menu.tsx
970
- var lt = 2;
971
- function ut(e, t) {
1366
+ var rn = 2;
1367
+ function an(e, t) {
972
1368
  return { getBoundingClientRect: () => ({
973
1369
  width: 0,
974
1370
  height: 0,
@@ -980,7 +1376,7 @@ function ut(e, t) {
980
1376
  bottom: t
981
1377
  }) };
982
1378
  }
983
- function dt(e) {
1379
+ function on(e) {
984
1380
  if (e.clientX !== 0 || e.clientY !== 0) return {
985
1381
  x: e.clientX,
986
1382
  y: e.clientY
@@ -994,220 +1390,228 @@ function dt(e) {
994
1390
  y: 0
995
1391
  };
996
1392
  }
997
- function ft({ children: e, items: t, radius: i = "md", unstyled: a = !1, panelClassName: o, className: c, ref: l, "aria-label": u }) {
998
- let d = p(null), [f, h] = m(null), { isMounted: x, isVisible: S, setIsVisible: C, open: w, close: T } = st(), { refs: E, floatingStyles: D, isPositioned: O } = b({
1393
+ function sn({ children: e, items: t, radius: i = "md", unstyled: a = !1, panelClassName: o, className: s, ref: l, "aria-label": u }) {
1394
+ let d = h(null), [f, p] = g(null), { isMounted: m, isVisible: _, setIsVisible: C, open: w, close: T } = tn(), { refs: E, floatingStyles: D, isPositioned: O } = S({
999
1395
  placement: "bottom-start",
1000
1396
  strategy: "fixed",
1001
- open: x,
1002
- whileElementsMounted: g,
1397
+ open: m,
1398
+ whileElementsMounted: v,
1003
1399
  middleware: [
1004
- v(lt),
1005
- _(),
1006
- y({ padding: 8 })
1400
+ b(rn),
1401
+ y(),
1402
+ x({ padding: 8 })
1007
1403
  ]
1008
1404
  });
1009
- ct(x, O, C);
1010
- let k = s((e) => je(h, l)(e), [l]), A = s(() => {
1405
+ nn(m, O, C);
1406
+ let k = c((e) => $(p, l)(e), [l]), A = c(() => {
1011
1407
  T(), d.current?.focus({ preventScroll: !0 });
1012
1408
  }, [T]);
1013
1409
  return /* @__PURE__ */ r("div", {
1014
1410
  ref: k,
1015
- className: c,
1411
+ className: s,
1016
1412
  onContextMenu: (e) => {
1017
- e.preventDefault(), x || (d.current = document.activeElement);
1018
- let { x: t, y: n } = dt(e);
1019
- E.setReference(ut(t, n)), w(!1);
1413
+ e.preventDefault(), m || (d.current = document.activeElement);
1414
+ let { x: t, y: n } = on(e);
1415
+ E.setReference(an(t, n)), w(!1);
1020
1416
  },
1021
- children: [e, x && /* @__PURE__ */ n(it, {
1417
+ children: [e, m && /* @__PURE__ */ n(Qt, {
1022
1418
  "aria-label": u,
1023
1419
  setFloating: E.setFloating,
1024
1420
  floatingStyles: D,
1025
- isVisible: S,
1421
+ isVisible: _,
1026
1422
  isPositioned: O,
1027
1423
  radius: i,
1028
1424
  unstyled: a,
1029
1425
  panelClassName: o,
1030
1426
  onClose: A,
1031
- portalTarget: ot(f),
1427
+ portalTarget: en(f),
1032
1428
  children: t
1033
1429
  })]
1034
1430
  });
1035
1431
  }
1036
1432
  // src/components/shared/accessible_name.ts
1037
- function pt(e) {
1433
+ function cn(e) {
1038
1434
  return (e ?? "").replace(/\s+/g, " ").trim();
1039
1435
  }
1040
- function mt(e, t) {
1436
+ function ln(e, t) {
1041
1437
  return t.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent).join(" ");
1042
1438
  }
1043
- function ht(e) {
1044
- let t = pt(e.getAttribute("aria-label"));
1439
+ function un(e) {
1440
+ let t = cn(e.getAttribute("aria-label"));
1045
1441
  if (t) return t;
1046
1442
  let n = e.getAttribute("aria-labelledby");
1047
- return (n ? pt(mt(e, n)) : "") || pt(e.textContent);
1443
+ return (n ? cn(ln(e, n)) : "") || cn(e.textContent);
1048
1444
  }
1049
1445
  // src/components/shared/portal_target.ts
1050
- var gt = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1051
- function _t(e) {
1052
- return e?.closest(gt) ?? (e?.ownerDocument ?? document).body;
1446
+ var dn = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1447
+ function fn(e) {
1448
+ return e?.closest(dn) ?? (e?.ownerDocument ?? document).body;
1053
1449
  }
1054
1450
  // src/components/tooltip/tooltip.tsx
1055
- var vt = 8, yt = 8, bt = 100, xt = {
1451
+ var pn = 8, mn = 8, hn = 100, gn = {
1056
1452
  top: "ms-tooltip-enter-top",
1057
1453
  bottom: "ms-tooltip-enter-bottom",
1058
1454
  left: "ms-tooltip-enter-left",
1059
1455
  right: "ms-tooltip-enter-right"
1060
- }, St = {
1456
+ }, _n = {
1061
1457
  top: "bottom",
1062
1458
  bottom: "top",
1063
1459
  left: "right",
1064
1460
  right: "left"
1065
1461
  };
1066
- function Ct({ content: a, children: c, position: f = "top", showOnClick: S = !1, temporaryContent: C, temporaryDuration: w = 2e3, disabled: T = !1, radius: E = "lg", unstyled: D = !1, panelClassName: O, onTemporaryShow: k, className: A, describeChild: j, hoverable: M = !1, portalContainer: N, ref: P }) {
1067
- let { isMounted: F, isVisible: I, setIsVisible: L, open: R, close: z } = st(), [B, V] = m(!1), U = u(), W = p(null), [G, ee] = m(null), [te, ne] = m(null), [re, ie] = m(null), K = p(void 0), q = p(void 0), { refs: J, floatingStyles: ae, placement: Y, middlewareData: oe, isPositioned: X } = b({
1068
- placement: f,
1462
+ function vn({ content: a, children: s, position: l = "top", showOnClick: m = !1, temporaryContent: w, temporaryDuration: T = 2e3, disabled: E = !1, radius: D = "lg", unstyled: O = !1, panelClassName: k, onTemporaryShow: A, className: j, describeChild: M, hoverable: N = !1, portalContainer: P, ref: F }) {
1463
+ let { isMounted: I, isVisible: L, setIsVisible: R, open: z, close: B } = tn(), [V, H] = g(!1), [U, W] = g(!1), ee = f(), te = h(null), [ne, re] = g(null), [ie, ae] = g(null), [oe, se] = g(null), ce = h(void 0), K = h(void 0), { refs: q, floatingStyles: le, placement: J, middlewareData: ue, isPositioned: Y } = S({
1464
+ placement: l,
1069
1465
  strategy: "fixed",
1070
- open: F,
1071
- whileElementsMounted: g,
1466
+ open: I,
1467
+ whileElementsMounted: v,
1072
1468
  middleware: [
1073
- v(vt),
1074
- _(),
1075
- y({ padding: 8 }),
1076
- h({ element: W })
1469
+ b(pn),
1470
+ y(),
1471
+ x({ padding: 8 }),
1472
+ _({ element: te })
1077
1473
  ]
1078
- }), se = Y.split("-")[0];
1079
- ct(F, X, L);
1080
- let ce = s((e) => je(J.setReference, ee, P)(e), [J, P]), le = s((e) => je(J.setFloating, ne)(e), [J]);
1081
- d(() => {
1082
- let e = G?.firstElementChild;
1083
- ie(te && e ? pt(te.textContent) === ht(e) : null);
1474
+ }), de = J.split("-")[0];
1475
+ nn(I, Y, c((e) => {
1476
+ U && R(e);
1477
+ }, [U, R]));
1478
+ let fe = c((e) => $(q.setReference, re, F)(e), [q, F]), pe = c((e) => $(q.setFloating, ae)(e), [q]);
1479
+ p(() => {
1480
+ let e = ne?.firstElementChild;
1481
+ se(ie && e ? cn(ie.textContent) === un(e) : null);
1084
1482
  }, [
1085
- G,
1086
- te,
1483
+ ne,
1484
+ ie,
1087
1485
  a,
1088
- C,
1089
- B
1486
+ w,
1487
+ V
1090
1488
  ]);
1091
- let ue = s(() => {
1092
- V(!1), z();
1093
- }, [z]), de = () => {
1094
- !T && C && (V(!0), R(X), clearTimeout(K.current), K.current = setTimeout(ue, w), k?.());
1095
- }, fe = () => {
1096
- T || R(X);
1097
- }, Z = s(() => {
1098
- clearTimeout(K.current), clearTimeout(q.current), ue();
1099
- }, [ue]), pe = () => {
1100
- clearTimeout(q.current);
1101
- }, me = () => {
1102
- clearTimeout(q.current), q.current = setTimeout(Z, bt);
1103
- }, he = (e) => {
1104
- e.target.matches(":focus-visible") && fe();
1105
- }, ge = (e) => {
1106
- e.pointerType !== "touch" && (pe(), fe());
1107
- }, _e = (e) => {
1108
- e.pointerType !== "touch" && (M ? me() : Z());
1489
+ let me = c(() => {
1490
+ H(!1), W(!1), B();
1491
+ }, [B]), he = () => {
1492
+ !E && w && (H(!0), W(!0), z(Y), clearTimeout(ce.current), ce.current = setTimeout(me, T), A?.());
1493
+ }, X = () => {
1494
+ E || (W(!0), z(Y));
1495
+ }, Z = c(() => {
1496
+ clearTimeout(ce.current), clearTimeout(K.current), me();
1497
+ }, [me]), ge = () => {
1498
+ clearTimeout(K.current);
1499
+ }, _e = () => {
1500
+ clearTimeout(K.current), K.current = setTimeout(Z, hn);
1109
1501
  }, ve = (e) => {
1110
- e.pointerType !== "touch" && pe();
1502
+ e.target.matches(":focus-visible") && X();
1503
+ }, ye = (e) => {
1504
+ e.pointerType !== "touch" && (ge(), X());
1505
+ }, be = (e) => {
1506
+ e.pointerType !== "touch" && (N ? _e() : Z());
1507
+ }, xe = (e) => {
1508
+ e.pointerType !== "touch" && ge();
1111
1509
  };
1112
- l(() => () => {
1113
- clearTimeout(K.current), clearTimeout(q.current);
1114
- }, []), l(() => {
1115
- if (!I || T) return;
1510
+ u(() => () => {
1511
+ clearTimeout(ce.current), clearTimeout(K.current);
1512
+ }, []);
1513
+ let Se = d(() => {
1514
+ U && Z();
1515
+ });
1516
+ u(() => {
1517
+ E && Se();
1518
+ }, [E]), u(() => {
1519
+ if (!U || E) return;
1116
1520
  let e = (e) => {
1117
1521
  e.key === "Escape" && (e.preventDefault(), Z());
1118
1522
  };
1119
1523
  return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
1120
1524
  }, [
1121
- I,
1122
- T,
1525
+ U,
1526
+ E,
1123
1527
  Z
1124
1528
  ]);
1125
- let ye = F && !T, be = B && C ? C : a, xe = {
1529
+ let Ce = I && !E, we = V && w ? w : a, Te = {
1126
1530
  onClick: (e) => {
1127
- S && C && de(), o(c) && c.props.onClick?.(e);
1531
+ m && w && he(), o(s) && s.props.onClick?.(e);
1128
1532
  },
1129
- "aria-describedby": Q(o(c) ? c.props["aria-describedby"] : void 0, ye && (j ?? (re !== null && !re)) && U)
1130
- }, Se = o(c) ? i(c, xe) : c, Ce = oe.arrow?.x, we = oe.arrow?.y, Te = St[se];
1533
+ "aria-describedby": De(o(s) ? s.props["aria-describedby"] : void 0, Ce && (M ?? (oe !== null && !oe)) && ee)
1534
+ }, Ee = o(s) ? i(s, Te) : s, Q = ue.arrow?.x, Oe = ue.arrow?.y, ke = _n[de];
1131
1535
  return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("span", {
1132
- ref: ce,
1133
- className: e("inline-flex", A),
1134
- onPointerEnter: ge,
1135
- onPointerLeave: _e,
1136
- onFocus: he,
1536
+ ref: fe,
1537
+ className: e("inline-flex", j),
1538
+ onPointerEnter: ye,
1539
+ onPointerLeave: be,
1540
+ onFocus: ve,
1137
1541
  onBlur: Z,
1138
- children: [Se, C !== void 0 && /* @__PURE__ */ n("span", {
1542
+ children: [Ee, w !== void 0 && /* @__PURE__ */ n("span", {
1139
1543
  role: "status",
1140
1544
  className: "sr-only",
1141
- children: B ? C : null
1545
+ children: V ? w : null
1142
1546
  })]
1143
- }), ye && x(/* @__PURE__ */ n("div", {
1144
- ref: le,
1145
- style: ae,
1146
- className: e("z-50 inline-block", !M && "pointer-events-none"),
1147
- onPointerEnter: M ? ve : void 0,
1148
- onPointerLeave: M ? _e : void 0,
1547
+ }), Ce && C(/* @__PURE__ */ n("div", {
1548
+ ref: pe,
1549
+ style: le,
1550
+ className: e("z-50 inline-block", !N && "pointer-events-none"),
1551
+ onPointerEnter: N ? xe : void 0,
1552
+ onPointerLeave: N ? be : void 0,
1149
1553
  children: /* @__PURE__ */ r("div", {
1150
- id: U,
1554
+ id: ee,
1151
1555
  role: "tooltip",
1152
- "data-state": I ? "open" : "closed",
1153
- className: e("whitespace-nowrap", !D && [
1556
+ "data-state": L ? "open" : "closed",
1557
+ className: e("whitespace-nowrap", !O && [
1154
1558
  "px-3 py-1.5 text-sm",
1155
1559
  "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg",
1156
1560
  "transition-[opacity,transform] duration-150 ease-out",
1157
- I ? "opacity-100" : "opacity-0",
1158
- xt[se],
1159
- H[E]
1160
- ], O),
1161
- children: [be, !D && /* @__PURE__ */ n("div", {
1162
- ref: W,
1561
+ L ? "opacity-100" : "opacity-0",
1562
+ gn[de],
1563
+ G[D]
1564
+ ], k),
1565
+ children: [we, !O && /* @__PURE__ */ n("div", {
1566
+ ref: te,
1163
1567
  style: {
1164
1568
  position: "absolute",
1165
- width: `${yt}px`,
1166
- height: `${yt}px`,
1167
- left: Ce === void 0 ? void 0 : `${Ce}px`,
1168
- top: we === void 0 ? void 0 : `${we}px`,
1169
- [Te]: `-${yt / 2}px`
1569
+ width: `${mn}px`,
1570
+ height: `${mn}px`,
1571
+ left: Q === void 0 ? void 0 : `${Q}px`,
1572
+ top: Oe === void 0 ? void 0 : `${Oe}px`,
1573
+ [ke]: `-${mn / 2}px`
1170
1574
  },
1171
1575
  className: "rotate-45 bg-gray-900 dark:bg-gray-100"
1172
1576
  })]
1173
1577
  })
1174
- }), N ?? _t(G))] });
1578
+ }), P ?? fn(ne))] });
1175
1579
  }
1176
1580
  // src/components/icon_button/icon_button.tsx
1177
- var wt = {
1581
+ var yn = {
1178
1582
  xs: "p-1",
1179
1583
  sm: "p-2",
1180
1584
  md: "p-2",
1181
1585
  lg: "p-3"
1182
- }, Tt = {
1586
+ }, bn = {
1183
1587
  xs: "w-4 h-4",
1184
1588
  sm: "w-4 h-4",
1185
1589
  md: "w-5 h-5",
1186
1590
  lg: "w-6 h-6"
1187
1591
  };
1188
- function Et(e) {
1592
+ function xn(e) {
1189
1593
  if (e) return e === !0 ? {} : typeof e == "string" ? { position: e } : e;
1190
1594
  }
1191
- function Dt(t) {
1192
- let { icon: i, "aria-label": a, unstyled: o = !1, variant: s = "outline", color: c = "neutral", size: l = "md", radius: u = "md", className: d, children: f, tooltip: p, pressed: m, ref: h, ...g } = t, _ = R[c], v = Et(p), y = /* @__PURE__ */ r("button", {
1595
+ function Sn(t) {
1596
+ let { icon: i, "aria-label": a, unstyled: o = !1, variant: s = "outline", color: c = "neutral", size: l = "md", radius: u = "md", className: d, children: f, tooltip: p, pressed: m, ref: h, ...g } = t, _ = V[c], v = xn(p), y = /* @__PURE__ */ r("button", {
1193
1597
  ref: h,
1194
1598
  type: "button",
1195
1599
  "aria-label": a,
1196
1600
  "aria-pressed": m,
1197
- className: e(z, !o && [
1198
- B,
1601
+ className: e(H, !o && [
1602
+ U,
1199
1603
  "border",
1200
- H[u],
1201
- wt[l],
1202
- V(c, s, m ?? !1),
1604
+ G[u],
1605
+ yn[l],
1606
+ W(c, s, m ?? !1),
1203
1607
  _.focusOutline
1204
1608
  ], d),
1205
1609
  ...g,
1206
- children: [/* @__PURE__ */ n("span", { className: e(i, Tt[l], f && "mr-1") }), f]
1610
+ children: [/* @__PURE__ */ n("span", { className: e(i, bn[l], f && "mr-1") }), f]
1207
1611
  });
1208
1612
  if (!v) return y;
1209
1613
  let b = v.content !== void 0;
1210
- return /* @__PURE__ */ n(Ct, {
1614
+ return /* @__PURE__ */ n(vn, {
1211
1615
  content: b ? v.content : a,
1212
1616
  position: v.position,
1213
1617
  describeChild: b ? void 0 : !1,
@@ -1215,32 +1619,32 @@ function Dt(t) {
1215
1619
  });
1216
1620
  }
1217
1621
  // src/lib/surface_error.ts
1218
- function Ot(e, t) {
1622
+ function Cn(e, t) {
1219
1623
  t ? t(e) : queueMicrotask(() => {
1220
1624
  throw e;
1221
1625
  });
1222
1626
  }
1223
1627
  // src/components/copy_button/copy_button.tsx
1224
- var kt = 2e3, At = 0;
1225
- function jt({ value: e, children: i, label: a, onError: o }) {
1226
- let s = J(), [c, u] = m(!1), [d, f] = m(""), h = p(void 0), g = p(void 0);
1227
- l(() => () => {
1228
- clearTimeout(h.current), clearTimeout(g.current);
1628
+ var wn = 2e3, Tn = 0;
1629
+ function En({ value: e, children: i, label: a, onError: o }) {
1630
+ let s = q(), [c, l] = g(!1), [d, f] = g(""), p = h(void 0), m = h(void 0);
1631
+ u(() => () => {
1632
+ clearTimeout(p.current), clearTimeout(m.current);
1229
1633
  }, []);
1230
1634
  let _ = () => {
1231
- clearTimeout(g.current), f(""), g.current = setTimeout(() => f(s.copied), At);
1635
+ clearTimeout(m.current), f(""), m.current = setTimeout(() => f(s.copied), Tn);
1232
1636
  }, v = async () => {
1233
1637
  try {
1234
- await navigator.clipboard.writeText(e), u(!0), _(), clearTimeout(h.current), h.current = setTimeout(() => {
1235
- u(!1), f("");
1236
- }, kt);
1638
+ await navigator.clipboard.writeText(e), l(!0), _(), clearTimeout(p.current), p.current = setTimeout(() => {
1639
+ l(!1), f("");
1640
+ }, wn);
1237
1641
  } catch (e) {
1238
- Ot(e, o);
1642
+ Cn(e, o);
1239
1643
  }
1240
1644
  }, y = i?.({
1241
1645
  copied: c,
1242
1646
  copy: v
1243
- }) ?? (i ? null : /* @__PURE__ */ n(Dt, {
1647
+ }) ?? (i ? null : /* @__PURE__ */ n(Sn, {
1244
1648
  icon: c ? "i-mdi-check" : "i-mdi-content-copy",
1245
1649
  "aria-label": a ?? s.copy ?? "Copy",
1246
1650
  onClick: () => void v()
@@ -1252,7 +1656,7 @@ function jt({ value: e, children: i, label: a, onError: o }) {
1252
1656
  })] });
1253
1657
  }
1254
1658
  // src/lib/split_into_highlight_segments.ts
1255
- function Mt(e, t) {
1659
+ function Dn(e, t) {
1256
1660
  if (t.length === 0) return [{
1257
1661
  text: e,
1258
1662
  isMatch: !1
@@ -1274,8 +1678,8 @@ function Mt(e, t) {
1274
1678
  }), n;
1275
1679
  }
1276
1680
  // src/components/highlight/highlight.tsx
1277
- var Nt = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1278
- function Pt(e) {
1681
+ var On = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1682
+ function kn(e) {
1279
1683
  let t = 0;
1280
1684
  return e.map((e) => {
1281
1685
  let n = t;
@@ -1285,25 +1689,25 @@ function Pt(e) {
1285
1689
  };
1286
1690
  });
1287
1691
  }
1288
- function Ft({ text: r, ranges: i, radius: a = "sm", unstyled: o = !1, markClassName: s }) {
1289
- let c = Pt(Mt(r, i));
1692
+ function An({ text: r, ranges: i, radius: a = "sm", unstyled: o = !1, markClassName: s }) {
1693
+ let c = kn(Dn(r, i));
1290
1694
  return /* @__PURE__ */ n(t, { children: c.map((t) => t.isMatch ? /* @__PURE__ */ n("mark", {
1291
- className: e(!o && [H[a], Nt], s),
1695
+ className: e(!o && [G[a], On], s),
1292
1696
  children: t.text
1293
1697
  }, t.start) : /* @__PURE__ */ n("span", { children: t.text }, t.start)) });
1294
1698
  }
1295
1699
  // src/components/drawer/drawer_styles.ts
1296
- var It = {
1700
+ var jn = {
1297
1701
  sm: "ms-drawer-width-sm",
1298
1702
  md: "ms-drawer-width-md",
1299
1703
  lg: "ms-drawer-width-lg"
1300
- }, Lt = {
1704
+ }, Mn = {
1301
1705
  right: "right-0",
1302
1706
  left: "left-0"
1303
- }, Rt = {
1707
+ }, Nn = {
1304
1708
  right: "ms-drawer-offscreen-right",
1305
1709
  left: "ms-drawer-offscreen-left"
1306
- }, zt = {
1710
+ }, Pn = {
1307
1711
  right: {
1308
1712
  none: "rounded-l-none",
1309
1713
  sm: "rounded-l-sm",
@@ -1320,9 +1724,9 @@ var It = {
1320
1724
  xl: "rounded-r-xl",
1321
1725
  full: "rounded-r-lg"
1322
1726
  }
1323
- }, Bt = a(null);
1727
+ }, Fn = a(null);
1324
1728
  // src/components/modal/modal_footer_slot.tsx
1325
- function Vt({ onSlotChange: t, children: r, unstyled: i = !1 }) {
1729
+ function In({ onSlotChange: t, children: r, unstyled: i = !1 }) {
1326
1730
  return /* @__PURE__ */ n("div", {
1327
1731
  ref: t,
1328
1732
  className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !i && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
@@ -1330,10 +1734,10 @@ function Vt({ onSlotChange: t, children: r, unstyled: i = !1 }) {
1330
1734
  });
1331
1735
  }
1332
1736
  // src/components/modal/modal_footer_slot_context.ts
1333
- var Ht = a(null);
1737
+ var Ln = a(null);
1334
1738
  // src/components/modal/modal_header.tsx
1335
- function Ut({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s, unstyled: c = !1 }) {
1336
- let l = J(), u = s ?? l.close;
1739
+ function Rn({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s, unstyled: c = !1 }) {
1740
+ let l = q(), u = s ?? l.close;
1337
1741
  return /* @__PURE__ */ r("div", {
1338
1742
  className: e("flex items-center justify-between flex-shrink-0", !c && "gap-4 px-6 pt-5 pb-4"),
1339
1743
  children: [
@@ -1342,14 +1746,14 @@ function Ut({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s,
1342
1746
  className: e(!c && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1343
1747
  children: i
1344
1748
  }),
1345
- o && c && /* @__PURE__ */ n(Dt, {
1749
+ o && c && /* @__PURE__ */ n(Sn, {
1346
1750
  icon: "i-mdi-close",
1347
1751
  onClick: a,
1348
1752
  "aria-label": u,
1349
1753
  className: "min-h-6 min-w-6",
1350
1754
  unstyled: !0
1351
1755
  }),
1352
- o && !c && /* @__PURE__ */ n(Dt, {
1756
+ o && !c && /* @__PURE__ */ n(Sn, {
1353
1757
  icon: "i-mdi-close",
1354
1758
  onClick: a,
1355
1759
  "aria-label": u,
@@ -1362,65 +1766,65 @@ function Ut({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s,
1362
1766
  });
1363
1767
  }
1364
1768
  // src/components/modal/use_guarded_dismiss.ts
1365
- function Wt(e) {
1769
+ function zn(e) {
1366
1770
  try {
1367
1771
  return e();
1368
1772
  } catch (e) {
1369
- return Ot(e), null;
1773
+ return Cn(e), null;
1370
1774
  }
1371
1775
  }
1372
- function Gt({ onDismiss: e, isEnded: t }) {
1373
- let n = p(e), r = p(t), i = p([]), a = p(!1);
1374
- d(() => {
1776
+ function Bn({ onDismiss: e, isEnded: t }) {
1777
+ let n = h(e), r = h(t), i = h([]), a = h(!1);
1778
+ p(() => {
1375
1779
  n.current = e, r.current = t;
1376
1780
  });
1377
- let [o] = m(() => ({ register: (e) => (i.current = [...i.current, e], () => {
1781
+ let [o] = g(() => ({ register: (e) => (i.current = [...i.current, e], () => {
1378
1782
  i.current = i.current.filter((t) => t !== e);
1379
- }) })), c = s((e) => {
1783
+ }) })), s = c((e) => {
1380
1784
  a.current = !0, e.then((e) => {
1381
1785
  a.current = !1, e && !r.current && n.current();
1382
1786
  }, (e) => {
1383
- a.current = !1, Ot(e);
1787
+ a.current = !1, Cn(e);
1384
1788
  });
1385
1789
  }, []);
1386
1790
  return {
1387
- dismiss: s(() => {
1791
+ dismiss: c(() => {
1388
1792
  if (a.current) return;
1389
1793
  let e = i.current.at(-1);
1390
1794
  if (!e) {
1391
1795
  n.current();
1392
1796
  return;
1393
1797
  }
1394
- let t = Wt(e.current);
1395
- t !== null && (typeof t == "boolean" ? t && n.current() : c(t));
1396
- }, [c]),
1798
+ let t = zn(e.current);
1799
+ t !== null && (typeof t == "boolean" ? t && n.current() : s(t));
1800
+ }, [s]),
1397
1801
  registry: o
1398
1802
  };
1399
1803
  }
1400
1804
  // src/components/modal/keyboard_scroll_region_attribute.ts
1401
- var Kt = "data-keyboard-scroll-region", qt = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1402
- function Jt(e) {
1805
+ var Vn = "data-keyboard-scroll-region", Hn = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1806
+ function Un(e) {
1403
1807
  return e.matches(":disabled");
1404
1808
  }
1405
- function Yt(e) {
1809
+ function Wn(e) {
1406
1810
  return e.getAttribute("tabindex") === "-1";
1407
1811
  }
1408
- function Xt(e) {
1812
+ function Gn(e) {
1409
1813
  return e.matches("input[type=\"hidden\"]");
1410
1814
  }
1411
- function Zt(e) {
1815
+ function Kn(e) {
1412
1816
  return e.closest("[inert]") !== null;
1413
1817
  }
1414
- function Qt(e) {
1818
+ function qn(e) {
1415
1819
  return typeof e.checkVisibility != "function" || e.checkVisibility();
1416
1820
  }
1417
- function $t(e) {
1418
- return !Jt(e) && !Yt(e) && !Xt(e) && !Zt(e) && Qt(e);
1821
+ function Jn(e) {
1822
+ return !Un(e) && !Wn(e) && !Gn(e) && !Kn(e) && qn(e);
1419
1823
  }
1420
- function en(e) {
1824
+ function Yn(e) {
1421
1825
  return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
1422
1826
  }
1423
- function tn(e) {
1827
+ function Xn(e) {
1424
1828
  let t = /* @__PURE__ */ new Map();
1425
1829
  for (let n of e) {
1426
1830
  let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
@@ -1430,105 +1834,134 @@ function tn(e) {
1430
1834
  }
1431
1835
  return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
1432
1836
  }
1433
- function nn(e) {
1837
+ function Zn(e) {
1434
1838
  return e.find((e) => e.checked) ?? e[0];
1435
1839
  }
1436
- function rn(e) {
1437
- let t = Array.from(e.querySelectorAll(qt)).filter($t), n = t.filter(en), r = new Set(tn(n).map(nn));
1438
- return t.filter((e) => !en(e) || r.has(e));
1840
+ function Qn(e) {
1841
+ let t = Array.from(e.querySelectorAll(Hn)).filter(Jn), n = t.filter(Yn), r = new Set(Xn(n).map(Zn));
1842
+ return t.filter((e) => !Yn(e) || r.has(e));
1843
+ }
1844
+ // src/components/modal/use_keyboard_scroll_region.ts
1845
+ var $n = {};
1846
+ function er(e) {
1847
+ return e.scrollHeight > e.clientHeight && Qn(e).length === 0;
1848
+ }
1849
+ var tr = [
1850
+ "disabled",
1851
+ "tabindex",
1852
+ "hidden",
1853
+ "inert",
1854
+ "href",
1855
+ "contenteditable"
1856
+ ];
1857
+ function nr(e, t) {
1858
+ e.disconnect(), e.observe(t);
1859
+ for (let n of t.children) e.observe(n);
1439
1860
  }
1440
- // src/components/modal/use_keyboard_scrollable.ts
1441
- var an = {};
1442
- function on(e) {
1443
- return e.scrollHeight > e.clientHeight && rn(e).length === 0;
1861
+ function rr(e, t) {
1862
+ let n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(t), r = new MutationObserver(() => {
1863
+ t(), n && nr(n, e);
1864
+ });
1865
+ return r.observe(e, {
1866
+ childList: !0,
1867
+ subtree: !0,
1868
+ attributes: !0,
1869
+ attributeFilter: tr
1870
+ }), n && nr(n, e), () => {
1871
+ r.disconnect(), n?.disconnect();
1872
+ };
1444
1873
  }
1445
- function sn(e, { labelledBy: t, label: n }) {
1446
- let [r, i] = m(!1);
1447
- return l(() => {
1448
- let t = e.current;
1449
- if (!t) return;
1450
- let n = () => i(on(t));
1451
- n();
1452
- let r = new MutationObserver(n);
1453
- r.observe(t, {
1454
- childList: !0,
1455
- subtree: !0
1456
- });
1457
- let a = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(n);
1458
- return a?.observe(t), () => {
1459
- r.disconnect(), a?.disconnect();
1460
- };
1461
- }, [e]), !r || !(t || n) ? an : {
1462
- tabIndex: 0,
1463
- role: "region",
1464
- [Kt]: !0,
1465
- "aria-labelledby": t,
1466
- "aria-label": t ? void 0 : n,
1467
- focusClassName: L
1874
+ function ir({ labelledBy: e, label: t }) {
1875
+ let [n, r] = g(null), [i, a] = g(null);
1876
+ return u(() => {
1877
+ if (!n) return;
1878
+ let e = () => a(er(n) ? n : null);
1879
+ return e(), rr(n, e);
1880
+ }, [n]), n === null || i !== n || !(e || t) ? {
1881
+ ref: r,
1882
+ scrollableProps: $n,
1883
+ focusClassName: void 0
1884
+ } : {
1885
+ ref: r,
1886
+ scrollableProps: {
1887
+ tabIndex: 0,
1888
+ role: "region",
1889
+ [Vn]: !0,
1890
+ "aria-labelledby": e,
1891
+ "aria-label": e ? void 0 : t
1892
+ },
1893
+ focusClassName: z
1468
1894
  };
1469
1895
  }
1470
1896
  // src/components/modal/body_scroll_lock.ts
1471
- var cn = "--scrollbar-compensation", ln = 0, un;
1472
- function dn() {
1897
+ var ar = "--scrollbar-compensation", or = 0, sr;
1898
+ function cr() {
1473
1899
  let { style: e } = document.documentElement;
1474
1900
  return {
1475
1901
  overflow: e.overflow,
1476
1902
  overflowX: e.overflowX,
1477
1903
  overflowY: e.overflowY,
1478
1904
  paddingRight: e.paddingRight,
1479
- scrollbarCompensation: e.getPropertyValue(cn)
1905
+ scrollbarCompensation: e.getPropertyValue(ar)
1480
1906
  };
1481
1907
  }
1482
- function fn(e) {
1908
+ function lr(e) {
1483
1909
  let { style: t } = document.documentElement;
1484
- t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(cn) : t.setProperty(cn, e.scrollbarCompensation);
1910
+ t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(ar) : t.setProperty(ar, e.scrollbarCompensation);
1485
1911
  }
1486
- function pn(e, t) {
1912
+ function ur(e, t) {
1487
1913
  let { style: n } = document.documentElement;
1488
- n.paddingRight = `${t + e}px`, n.setProperty(cn, `${e}px`);
1914
+ n.paddingRight = `${t + e}px`, n.setProperty(ar, `${e}px`);
1489
1915
  }
1490
- function mn() {
1491
- if (ln === 0) {
1916
+ function dr() {
1917
+ if (or === 0) {
1492
1918
  let e = document.documentElement;
1493
- un = dn();
1919
+ sr = cr();
1494
1920
  let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
1495
1921
  e.style.overflow = "hidden";
1496
1922
  let r = e.clientWidth - n;
1497
- r > 0 && pn(r, t);
1923
+ r > 0 && ur(r, t);
1498
1924
  }
1499
- ln += 1;
1925
+ or += 1;
1500
1926
  }
1501
- function hn() {
1502
- --ln, ln === 0 && un && (fn(un), un = void 0);
1927
+ function fr() {
1928
+ --or, or === 0 && sr && (lr(sr), sr = void 0);
1503
1929
  }
1504
- function gn() {
1505
- l(() => (mn(), hn), []);
1930
+ function pr() {
1931
+ u(() => (dr(), fr), []);
1506
1932
  }
1507
1933
  // src/components/modal/modal_stack.ts
1508
- var _n = [];
1509
- function vn(e) {
1510
- return _n.push(e), () => {
1511
- let t = _n.indexOf(e);
1512
- t !== -1 && _n.splice(t, 1);
1934
+ var mr = [];
1935
+ function hr(e, t) {
1936
+ return mr.push({
1937
+ token: e,
1938
+ requestDismiss: t
1939
+ }), () => {
1940
+ let t = mr.findIndex((t) => t.token === e);
1941
+ t !== -1 && mr.splice(t, 1);
1513
1942
  };
1514
1943
  }
1515
- function yn(e) {
1516
- return _n[_n.length - 1] === e;
1944
+ function gr(e) {
1945
+ return mr.at(-1)?.token === e;
1946
+ }
1947
+ function _r() {
1948
+ let e = mr.at(-1);
1949
+ return e ? (e.requestDismiss(), !0) : !1;
1517
1950
  }
1518
1951
  // src/components/modal/use_modal_dialog.ts
1519
- function bn(e) {
1520
- return rn(e).filter((e) => !e.hasAttribute(Kt));
1952
+ function vr(e) {
1953
+ return Qn(e).filter((e) => !e.hasAttribute(Vn));
1521
1954
  }
1522
- function xn({ dialog: e, content: t, fallbackScope: n }) {
1523
- let r = t ? bn(t)[0] : void 0;
1524
- return r || n === "content" ? r : e ? bn(e)[0] : void 0;
1955
+ function yr({ dialog: e, content: t, fallbackScope: n }) {
1956
+ let r = t ? vr(t)[0] : void 0;
1957
+ return r || n === "content" ? r : e ? vr(e)[0] : void 0;
1525
1958
  }
1526
- function Sn(e) {
1527
- let t = xn(e);
1959
+ function br(e) {
1960
+ let t = yr(e);
1528
1961
  (e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
1529
1962
  }
1530
- function Cn(e, t) {
1531
- let n = rn(t);
1963
+ function xr(e, t) {
1964
+ let n = Qn(t);
1532
1965
  if (n.length === 0) {
1533
1966
  e.preventDefault(), t.focus();
1534
1967
  return;
@@ -1536,151 +1969,151 @@ function Cn(e, t) {
1536
1969
  let r = n[0], i = n[n.length - 1], a = document.activeElement;
1537
1970
  (a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
1538
1971
  }
1539
- function wn() {
1972
+ function Sr() {
1540
1973
  return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
1541
1974
  }
1542
- function Tn() {
1543
- let [e, t] = m(!1);
1544
- return l(() => {
1975
+ function Cr() {
1976
+ let [e, t] = g(!1);
1977
+ return u(() => {
1545
1978
  let e = requestAnimationFrame(() => {
1546
1979
  requestAnimationFrame(() => t(!0));
1547
1980
  });
1548
1981
  return () => cancelAnimationFrame(e);
1549
1982
  }, []), e;
1550
1983
  }
1551
- function En(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
1552
- l(() => {
1984
+ function wr(e, { isEnded: t, modalToken: n }) {
1985
+ u(() => {
1553
1986
  if (t) return;
1554
- let a = (t) => {
1555
- if (yn(i)) {
1987
+ let r = (t) => {
1988
+ if (gr(n)) {
1556
1989
  if (t.key === "Escape") {
1557
1990
  if (t.defaultPrevented) return;
1558
- t.preventDefault(), r && n();
1559
- } else t.key === "Tab" && e.current && Cn(t, e.current);
1991
+ t.preventDefault(), _r();
1992
+ } else t.key === "Tab" && e.current && xr(t, e.current);
1560
1993
  }
1561
1994
  };
1562
- return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
1995
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
1563
1996
  }, [
1564
1997
  t,
1565
1998
  n,
1566
- r,
1567
- i,
1568
1999
  e
1569
2000
  ]);
1570
2001
  }
1571
- function Dn({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
1572
- let [o] = m(() => Symbol("modal")), [s, c] = m(null), u = p(null), d = p(null), [f] = m(wn);
1573
- l(() => {
1574
- if (!e) return vn(o);
1575
- }, [e, o]), gn();
1576
- let h = Tn();
1577
- return l(() => {
1578
- s && !e && Sn({
1579
- dialog: u.current,
2002
+ function Tr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
2003
+ let [o] = g(() => Symbol("modal")), [s, c] = g(null), l = h(null), d = h(null), [f] = g(Sr), m = h(() => {});
2004
+ p(() => {
2005
+ m.current = () => {
2006
+ n && t();
2007
+ };
2008
+ }), u(() => {
2009
+ if (!e) return hr(o, () => m.current());
2010
+ }, [e, o]), pr();
2011
+ let _ = Cr();
2012
+ return u(() => {
2013
+ s && !e && br({
2014
+ dialog: l.current,
1580
2015
  content: d.current,
1581
2016
  initialFocusRef: r,
1582
2017
  fallbackScope: i
1583
2018
  });
1584
- }, [s, e]), l(() => {
2019
+ }, [s, e]), u(() => {
1585
2020
  e && (f?.isConnected ? f : a?.())?.focus({ preventScroll: !0 });
1586
2021
  }, [
1587
2022
  e,
1588
2023
  f,
1589
2024
  a
1590
- ]), En(u, {
2025
+ ]), wr(l, {
1591
2026
  isEnded: e,
1592
- onDismiss: t,
1593
- dismissible: n,
1594
2027
  modalToken: o
1595
2028
  }), {
1596
- dialogRef: u,
2029
+ dialogRef: l,
1597
2030
  contentRef: d,
1598
2031
  footerSlot: s,
1599
2032
  setFooterSlot: c,
1600
- isVisible: h && !e,
2033
+ isVisible: _ && !e,
1601
2034
  handleBackdropClick: () => {
1602
2035
  !e && n && t();
1603
2036
  },
1604
2037
  handleBackdropMouseDown: (e) => {
1605
2038
  let t = e.target;
1606
- e.currentTarget.contains(t) && !u.current?.contains(t) && e.preventDefault();
2039
+ e.currentTarget.contains(t) && !l.current?.contains(t) && e.preventDefault();
1607
2040
  }
1608
2041
  };
1609
2042
  }
1610
2043
  // src/stores/global_hotkeys_store/global_hotkeys_store.ts
1611
- var On = S((e) => ({
2044
+ var Er = w((e) => ({
1612
2045
  globalHotkeysEnabled: !0,
1613
2046
  setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
1614
- })), kn = 0;
1615
- function An() {
1616
- l(() => (kn += 1, kn === 1 && On.getState().setGlobalHotkeysEnabled(!1), () => {
1617
- --kn, kn === 0 && On.getState().setGlobalHotkeysEnabled(!0);
2047
+ })), Dr = 0;
2048
+ function Or() {
2049
+ u(() => (Dr += 1, Dr === 1 && Er.getState().setGlobalHotkeysEnabled(!1), () => {
2050
+ --Dr, Dr === 0 && Er.getState().setGlobalHotkeysEnabled(!0);
1618
2051
  }), []);
1619
2052
  }
1620
2053
  // src/components/drawer/drawer.tsx
1621
- function jn() {
2054
+ function kr() {
1622
2055
  let e = document.querySelector("main");
1623
2056
  return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
1624
2057
  }
1625
- function Mn({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c, side: l, radius: d, className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g, closeLabel: _, initialFocusRef: v }) {
1626
- An();
1627
- let y = u(), { dismiss: b, registry: S } = Gt({
2058
+ function Ar({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c, side: l, radius: u, className: d, panelClassName: p, backdropClassName: h, unstyled: g = !1, dismissible: _, closeLabel: v, initialFocusRef: y }) {
2059
+ Or();
2060
+ let b = f(), { dismiss: x, registry: S } = Bn({
1628
2061
  onDismiss: i,
1629
2062
  isEnded: t
1630
- }), { dialogRef: C, contentRef: w, footerSlot: T, setFooterSlot: E, isVisible: D, handleBackdropClick: O, handleBackdropMouseDown: k } = Dn({
2063
+ }), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = Tr({
1631
2064
  isEnded: t,
1632
- onDismiss: b,
1633
- dismissible: g,
1634
- initialFocusRef: v,
2065
+ onDismiss: x,
2066
+ dismissible: _,
2067
+ initialFocusRef: y,
1635
2068
  initialFocusFallbackScope: "content",
1636
- getFocusFallback: jn
1637
- }), { focusClassName: A, ...j } = sn(w, { labelledBy: y });
1638
- return /* @__PURE__ */ n(Bt.Provider, {
2069
+ getFocusFallback: kr
2070
+ }), { ref: j, scrollableProps: M, focusClassName: N } = ir({ labelledBy: b }), P = m(() => $(T, j), [T, j]);
2071
+ return /* @__PURE__ */ n(Fn.Provider, {
1639
2072
  value: S,
1640
- children: x(/* @__PURE__ */ r("div", {
1641
- className: e("fixed inset-0 z-50", !h && "transition-opacity duration-200 ease-out", D ? "opacity-100" : "opacity-0"),
1642
- onClick: O,
1643
- onMouseDown: k,
2073
+ children: C(/* @__PURE__ */ r("div", {
2074
+ className: e("fixed inset-0 z-50", !g && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
2075
+ onClick: k,
2076
+ onMouseDown: A,
1644
2077
  children: [/* @__PURE__ */ n("div", {
1645
- className: e("fixed inset-0", !h && "bg-black/60 backdrop-blur-md", m),
2078
+ className: e("fixed inset-0", !g && "bg-black/60 backdrop-blur-md", h),
1646
2079
  "aria-hidden": "true"
1647
2080
  }), /* @__PURE__ */ r("div", {
1648
- ref: C,
2081
+ ref: w,
1649
2082
  role: "dialog",
1650
2083
  "aria-modal": "true",
1651
- "aria-labelledby": y,
2084
+ "aria-labelledby": b,
1652
2085
  tabIndex: -1,
1653
- "data-state": D ? "open" : "closed",
2086
+ "data-state": O ? "open" : "closed",
1654
2087
  inert: t,
1655
- className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Lt[l], It[c], "focus:outline-none", !h && [
2088
+ className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Mn[l], jn[c], "focus:outline-none", !g && [
1656
2089
  "bg-white dark:bg-gray-900",
1657
2090
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
1658
2091
  "shadow-2xl",
1659
- zt[l][d],
2092
+ Pn[l][u],
1660
2093
  "ms-drawer-transition"
1661
- ], !D && Rt[l], p),
2094
+ ], !O && Nn[l], p),
1662
2095
  onClick: (e) => e.stopPropagation(),
1663
2096
  children: [
1664
- /* @__PURE__ */ n(Ut, {
1665
- titleId: y,
2097
+ /* @__PURE__ */ n(Rn, {
2098
+ titleId: b,
1666
2099
  title: a,
1667
- onDismiss: b,
1668
- dismissible: g,
1669
- closeLabel: _,
1670
- unstyled: h
2100
+ onDismiss: x,
2101
+ dismissible: _,
2102
+ closeLabel: v,
2103
+ unstyled: g
1671
2104
  }),
1672
2105
  /* @__PURE__ */ n("div", {
1673
- ref: w,
1674
- ...j,
1675
- className: e("flex-1 overflow-y-auto min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", A, f),
1676
- children: /* @__PURE__ */ n(Ht.Provider, {
1677
- value: T,
2106
+ ref: P,
2107
+ ...M,
2108
+ className: e("flex-1 overflow-y-auto min-h-0", !g && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", N, d),
2109
+ children: /* @__PURE__ */ n(Ln.Provider, {
2110
+ value: E,
1678
2111
  children: o
1679
2112
  })
1680
2113
  }),
1681
- /* @__PURE__ */ n(Vt, {
1682
- onSlotChange: E,
1683
- unstyled: h,
2114
+ /* @__PURE__ */ n(In, {
2115
+ onSlotChange: D,
2116
+ unstyled: g,
1684
2117
  children: s
1685
2118
  })
1686
2119
  ]
@@ -1688,17 +2121,19 @@ function Mn({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size:
1688
2121
  }), document.body)
1689
2122
  });
1690
2123
  }
1691
- function Nn(e) {
1692
- let [t, n] = m(!e);
1693
- return e && t && n(!1), l(() => {
1694
- if (e) return;
1695
- let t = setTimeout(() => n(!0), 200);
2124
+ function jr(e, t) {
2125
+ let [n, r] = g(!e), i = d(() => t?.());
2126
+ return e && n && r(!1), u(() => {
2127
+ if (e || n) return;
2128
+ let t = setTimeout(() => {
2129
+ r(!0), i();
2130
+ }, 200);
1696
2131
  return () => clearTimeout(t);
1697
- }, [e]), e || !t;
2132
+ }, [e, n]), e || !n;
1698
2133
  }
1699
- function Pn({ isOpen: e, onClose: t, size: r = "md", side: i = "right", radius: a = "none", dismissible: o = !0, ...s }) {
1700
- return Nn(e) ? /* @__PURE__ */ n(Mn, {
1701
- ...s,
2134
+ function Mr({ isOpen: e, onClose: t, size: r = "md", side: i = "right", radius: a = "none", dismissible: o = !0, onExited: s, ...c }) {
2135
+ return jr(e, s) ? /* @__PURE__ */ n(Ar, {
2136
+ ...c,
1702
2137
  isEnded: !e,
1703
2138
  onDismiss: t,
1704
2139
  size: r,
@@ -1708,24 +2143,24 @@ function Pn({ isOpen: e, onClose: t, size: r = "md", side: i = "right", radius:
1708
2143
  }) : null;
1709
2144
  }
1710
2145
  // src/components/shared/use_controlled_length.ts
1711
- function Fn(e) {
2146
+ function Nr(e) {
1712
2147
  return typeof e == "string" ? e.length : 0;
1713
2148
  }
1714
- function In(e, t) {
1715
- let [n, r] = m(Fn(t)), i = e !== void 0;
2149
+ function Pr(e, t) {
2150
+ let [n, r] = g(Nr(t)), i = e !== void 0;
1716
2151
  return {
1717
- length: i ? Fn(e) : n,
2152
+ length: i ? Nr(e) : n,
1718
2153
  trackLength: (e) => {
1719
2154
  i || r(e.length);
1720
2155
  }
1721
2156
  };
1722
2157
  }
1723
2158
  // src/components/input/input.tsx
1724
- function Ln({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
1725
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = In(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
2159
+ function Fr({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2160
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = Me(g), { length: T, trackLength: E } = Pr(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
1726
2161
  E(e.target.value), h?.(e);
1727
2162
  };
1728
- return /* @__PURE__ */ r(Be, {
2163
+ return /* @__PURE__ */ r(Ye, {
1729
2164
  fieldId: b,
1730
2165
  errorId: x,
1731
2166
  descriptionId: S,
@@ -1737,8 +2172,8 @@ function Ln({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
1737
2172
  children: [/* @__PURE__ */ n("input", {
1738
2173
  id: b,
1739
2174
  className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !u && [
1740
- he,
1741
- H[l],
2175
+ ve,
2176
+ G[l],
1742
2177
  "px-3 py-2 text-sm"
1743
2178
  ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
1744
2179
  ...p === void 0 ? { defaultValue: m } : { value: p },
@@ -1747,8 +2182,8 @@ function Ln({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
1747
2182
  onChange: O,
1748
2183
  "aria-invalid": !!a,
1749
2184
  "aria-label": v,
1750
- "aria-labelledby": Ve(t, C, v),
1751
- "aria-describedby": Q(_, !!i && S, a && x, D && w),
2185
+ "aria-labelledby": Ot(t, C, v),
2186
+ "aria-describedby": De(_, !!i && S, a && x, D && w),
1752
2187
  ...y
1753
2188
  }), D && /* @__PURE__ */ n(Z, {
1754
2189
  id: w,
@@ -1761,41 +2196,41 @@ function Ln({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
1761
2196
  });
1762
2197
  }
1763
2198
  // src/components/kbd/kbd.tsx
1764
- var Rn = {
2199
+ var Ir = {
1765
2200
  xs: "px-1.5 py-0.5 text-xs",
1766
2201
  sm: "px-2 py-0.5 text-xs",
1767
2202
  md: "px-2.5 py-1 text-sm",
1768
2203
  lg: "px-3 py-1 text-base"
1769
- }, zn = ({ children: t, size: r = "sm", radius: i = "sm", unstyled: a = !1, className: o }) => /* @__PURE__ */ n("kbd", {
1770
- className: e("inline-flex items-center", Rn[r], !a && [
2204
+ }, Lr = ({ children: t, size: r = "sm", radius: i = "sm", unstyled: a = !1, className: o }) => /* @__PURE__ */ n("kbd", {
2205
+ className: e("inline-flex items-center", Ir[r], !a && [
1771
2206
  "border font-semibold uppercase",
1772
2207
  "text-gray-600 dark:text-gray-300",
1773
2208
  "bg-gray-100 dark:bg-gray-700",
1774
2209
  "border-gray-200 dark:border-gray-600",
1775
- H[i]
2210
+ G[i]
1776
2211
  ], o),
1777
2212
  children: t
1778
- }), Bn = 4;
1779
- function Vn(e, t) {
2213
+ }), Rr = 4;
2214
+ function zr(e, t) {
1780
2215
  return t === "center" ? e : `${e}-${t}`;
1781
2216
  }
1782
- function Hn({ trigger: t, children: a, side: c = "bottom", align: d = "start", radius: f = "md", unstyled: h = !1, panelClassName: x, className: S, disabled: C = !1, ref: w }) {
1783
- let T = p(null), [E, D] = m(null), [O, k] = m("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = st(), { refs: F, floatingStyles: I, isPositioned: L } = b({
1784
- placement: Vn(c, d),
2217
+ function Br({ trigger: t, children: a, side: s = "bottom", align: l = "start", radius: d = "md", unstyled: p = !1, panelClassName: m, className: _, disabled: C = !1, ref: w }) {
2218
+ let T = h(null), [E, D] = g(null), [O, k] = g("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = tn(), { refs: F, floatingStyles: I, isPositioned: L } = S({
2219
+ placement: zr(s, l),
1785
2220
  strategy: "fixed",
1786
2221
  open: A,
1787
- whileElementsMounted: g,
2222
+ whileElementsMounted: v,
1788
2223
  middleware: [
1789
- v(Bn),
1790
- _(),
1791
- y({ padding: 8 })
2224
+ b(Rr),
2225
+ y(),
2226
+ x({ padding: 8 })
1792
2227
  ]
1793
2228
  });
1794
- ct(A, L, M);
1795
- let R = u(), z = (o(t) ? t.props.id : void 0) ?? R, B = `${z}-menu`, V = s(() => {
2229
+ nn(A, L, M);
2230
+ let R = f(), z = (o(t) ? t.props.id : void 0) ?? R, B = `${z}-menu`, V = c(() => {
1796
2231
  P(), T.current?.querySelector("button, [href], [tabindex]")?.focus({ preventScroll: !0 });
1797
- }, [P]), H = s((e) => je(F.setReference, T, D, w)(e), [F, w]);
1798
- l(() => {
2232
+ }, [P]), H = c((e) => $(F.setReference, T, D, w)(e), [F, w]);
2233
+ u(() => {
1799
2234
  C && A && P();
1800
2235
  }, [
1801
2236
  C,
@@ -1816,27 +2251,27 @@ function Hn({ trigger: t, children: a, side: c = "bottom", align: d = "start", r
1816
2251
  }, W = o(t) ? i(t, U) : t;
1817
2252
  return /* @__PURE__ */ r("span", {
1818
2253
  ref: H,
1819
- className: e("inline-flex", S),
1820
- children: [W, A && /* @__PURE__ */ n(it, {
2254
+ className: e("inline-flex", _),
2255
+ children: [W, A && /* @__PURE__ */ n(Qt, {
1821
2256
  id: B,
1822
2257
  labelledBy: z,
1823
2258
  setFloating: F.setFloating,
1824
2259
  floatingStyles: I,
1825
2260
  isVisible: j,
1826
2261
  isPositioned: L,
1827
- radius: f,
1828
- unstyled: h,
1829
- panelClassName: x,
2262
+ radius: d,
2263
+ unstyled: p,
2264
+ panelClassName: m,
1830
2265
  onClose: V,
1831
2266
  initialFocus: O,
1832
- portalTarget: ot(E),
2267
+ portalTarget: en(E),
1833
2268
  children: a
1834
2269
  })]
1835
2270
  });
1836
2271
  }
1837
2272
  // src/components/menu_group/menu_group.tsx
1838
- function Un({ label: t, children: i, unstyled: a = !1, className: o, wrapperClassName: s }) {
1839
- let c = u();
2273
+ function Vr({ label: t, children: i, unstyled: a = !1, className: o, wrapperClassName: s }) {
2274
+ let c = f();
1840
2275
  return /* @__PURE__ */ r("div", {
1841
2276
  role: "group",
1842
2277
  "aria-labelledby": c,
@@ -1850,12 +2285,12 @@ function Un({ label: t, children: i, unstyled: a = !1, className: o, wrapperClas
1850
2285
  });
1851
2286
  }
1852
2287
  // src/components/menu_item/menu_item_content.tsx
1853
- var Wn = ({ icon: i, danger: a = !1, unstyled: o = !1, children: s }) => /* @__PURE__ */ r(t, { children: [i && /* @__PURE__ */ n("span", {
2288
+ var Hr = ({ icon: i, danger: a = !1, unstyled: o = !1, children: s }) => /* @__PURE__ */ r(t, { children: [i && /* @__PURE__ */ n("span", {
1854
2289
  className: e(i, "h-4 w-4 flex-shrink-0", !a && !o && "text-gray-500 dark:text-gray-400"),
1855
2290
  "aria-hidden": "true"
1856
2291
  }), s] });
1857
2292
  // src/components/menu_item/menu_item_end.tsx
1858
- function Gn({ trailing: t, selected: i, unstyled: a = !1 }) {
2293
+ function Ur({ trailing: t, selected: i, unstyled: a = !1 }) {
1859
2294
  let o = i !== void 0;
1860
2295
  return !t && !o ? null : /* @__PURE__ */ r("span", {
1861
2296
  className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
@@ -1869,27 +2304,27 @@ function Gn({ trailing: t, selected: i, unstyled: a = !1 }) {
1869
2304
  });
1870
2305
  }
1871
2306
  // src/components/menu_item/menu_item_styles.ts
1872
- var Kn = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", qn = "gap-2 px-3 py-2 text-sm transition-colors", Jn = {
2307
+ var Wr = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Gr = "gap-2 px-3 py-2 text-sm transition-colors", Kr = {
1873
2308
  default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
1874
2309
  danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
1875
2310
  };
1876
- function Yn({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
2311
+ function qr({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
1877
2312
  let s = r ? "danger" : "default";
1878
- return e(Kn, !i && [
2313
+ return e(Wr, !i && [
1879
2314
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
1880
- qn,
1881
- Jn[s],
2315
+ Gr,
2316
+ Kr[s],
1882
2317
  t[s],
1883
- a && H[a]
2318
+ a && G[a]
1884
2319
  ], n, o);
1885
2320
  }
1886
2321
  // src/components/menu_item/menu_item_button.tsx
1887
- var Xn = {
2322
+ var Jr = {
1888
2323
  default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
1889
2324
  danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
1890
- }, Zn = ["disabled:cursor-not-allowed disabled:opacity-50"];
1891
- function Qn({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, disabled: s = !1, children: c, radius: l, unstyled: u = !1, className: d, ref: f }) {
1892
- let p = Xe();
2325
+ }, Yr = ["disabled:cursor-not-allowed disabled:opacity-50"];
2326
+ function Xr({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, disabled: s = !1, children: c, radius: l, unstyled: u = !1, className: d, ref: f }) {
2327
+ let p = Wt();
1893
2328
  return /* @__PURE__ */ r("button", {
1894
2329
  ref: f,
1895
2330
  type: "button",
@@ -1900,20 +2335,20 @@ function Qn({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, dis
1900
2335
  e.stopPropagation(), i(e), p?.();
1901
2336
  },
1902
2337
  disabled: s,
1903
- className: Yn({
1904
- hoverClasses: Xn,
1905
- stateClasses: Zn,
2338
+ className: qr({
2339
+ hoverClasses: Jr,
2340
+ stateClasses: Yr,
1906
2341
  danger: o,
1907
2342
  unstyled: u,
1908
2343
  radius: l,
1909
2344
  className: d
1910
2345
  }),
1911
- children: [/* @__PURE__ */ n(Wn, {
2346
+ children: [/* @__PURE__ */ n(Hr, {
1912
2347
  icon: e,
1913
2348
  danger: o,
1914
2349
  unstyled: u,
1915
2350
  children: c
1916
- }), /* @__PURE__ */ n(Gn, {
2351
+ }), /* @__PURE__ */ n(Ur, {
1917
2352
  trailing: t,
1918
2353
  selected: a,
1919
2354
  unstyled: u
@@ -1921,145 +2356,157 @@ function Qn({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, dis
1921
2356
  });
1922
2357
  }
1923
2358
  // src/components/menu_item/menu_item_link.tsx
1924
- var $n = "_blank", er = "noopener noreferrer", tr = {
2359
+ var Zr = "_blank", Qr = "noopener noreferrer", $r = {
1925
2360
  default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
1926
2361
  danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
1927
- }, nr = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
1928
- function rr({ icon: e, trailing: t, href: i, target: a, rel: o, danger: s = !1, disabled: c = !1, children: l, radius: u, unstyled: d = !1, className: f, ref: p }) {
1929
- let m = Xe();
2362
+ }, ei = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
2363
+ function ti({ icon: e, trailing: t, href: i, target: a, rel: o, danger: s = !1, disabled: c = !1, children: l, radius: u, unstyled: d = !1, className: f, ref: p }) {
2364
+ let m = Wt();
1930
2365
  return /* @__PURE__ */ r("a", {
1931
2366
  ref: p,
1932
2367
  role: "menuitem",
1933
2368
  tabIndex: -1,
1934
2369
  href: c ? void 0 : i,
1935
2370
  target: a,
1936
- rel: o ?? (a === $n ? er : void 0),
2371
+ rel: o ?? (a === Zr ? Qr : void 0),
1937
2372
  "aria-disabled": c || void 0,
1938
2373
  onClick: (e) => {
1939
2374
  e.stopPropagation(), m?.();
1940
2375
  },
1941
- className: Yn({
1942
- hoverClasses: tr,
1943
- stateClasses: nr,
2376
+ className: qr({
2377
+ hoverClasses: $r,
2378
+ stateClasses: ei,
1944
2379
  danger: s,
1945
2380
  unstyled: d,
1946
2381
  radius: u,
1947
2382
  className: f
1948
2383
  }),
1949
- children: [/* @__PURE__ */ n(Wn, {
2384
+ children: [/* @__PURE__ */ n(Hr, {
1950
2385
  icon: e,
1951
2386
  danger: s,
1952
2387
  unstyled: d,
1953
2388
  children: l
1954
- }), /* @__PURE__ */ n(Gn, {
2389
+ }), /* @__PURE__ */ n(Ur, {
1955
2390
  trailing: t,
1956
2391
  unstyled: d
1957
2392
  })]
1958
2393
  });
1959
2394
  }
1960
2395
  // src/components/menu_item/menu_item.tsx
1961
- function ir(e) {
1962
- return e.href === void 0 ? /* @__PURE__ */ n(Qn, { ...e }) : /* @__PURE__ */ n(rr, { ...e });
2396
+ function ni(e) {
2397
+ return e.href === void 0 ? /* @__PURE__ */ n(Xr, { ...e }) : /* @__PURE__ */ n(ti, { ...e });
1963
2398
  }
1964
2399
  // src/components/menu_separator/menu_separator.tsx
1965
- var ar = ({ unstyled: t = !1, className: r }) => /* @__PURE__ */ n("hr", {
2400
+ var ri = ({ unstyled: t = !1, className: r }) => /* @__PURE__ */ n("hr", {
1966
2401
  "aria-orientation": "horizontal",
1967
2402
  className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], r)
1968
- }), or = {
2403
+ }), ii = {
1969
2404
  danger: "i-mdi-alert-circle",
1970
2405
  primary: "i-mdi-help-circle",
1971
2406
  success: "i-mdi-check-circle"
1972
- }, sr = {
2407
+ }, ai = {
1973
2408
  danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
1974
2409
  primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
1975
2410
  success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
1976
2411
  };
1977
- function cr({ title: t, color: i }) {
2412
+ function oi({ title: t, color: i }) {
1978
2413
  return /* @__PURE__ */ r("div", {
1979
2414
  className: "flex items-center gap-3",
1980
2415
  children: [/* @__PURE__ */ n("span", {
1981
- className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", sr[i]),
2416
+ className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", ai[i]),
1982
2417
  "aria-hidden": "true",
1983
- children: /* @__PURE__ */ n("span", { className: e(or[i], "h-5 w-5") })
2418
+ children: /* @__PURE__ */ n("span", { className: e(ii[i], "h-5 w-5") })
1984
2419
  }), t]
1985
2420
  });
1986
2421
  }
1987
- // src/components/modal/modal_shell.tsx
1988
- var lr = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", ur = {
2422
+ // src/components/modal/modal_sheet_classes.ts
2423
+ var si = {
2424
+ sm: "ms-modal-sheet-size-sm",
2425
+ md: "ms-modal-sheet-size-md",
2426
+ lg: "ms-modal-sheet-size-lg",
2427
+ xl: "ms-modal-sheet-size-xl"
2428
+ }, ci = {
2429
+ none: "ms-modal-sheet-radius-none",
2430
+ sm: "ms-modal-sheet-radius-sm",
2431
+ md: "ms-modal-sheet-radius-md",
2432
+ lg: "ms-modal-sheet-radius-lg",
2433
+ xl: "ms-modal-sheet-radius-xl",
2434
+ full: "ms-modal-sheet-radius-full"
2435
+ }, li = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", ui = {
1989
2436
  sm: "max-w-md",
1990
2437
  md: "max-w-lg",
1991
2438
  lg: "max-w-2xl",
1992
2439
  xl: "max-w-4xl"
1993
- }, dr = {
2440
+ }, di = {
1994
2441
  auto: "",
1995
2442
  fixed: "ms-modal-height-fixed"
1996
- }, fr = {
2443
+ }, fi = {
1997
2444
  auto: "overflow-y-auto",
1998
2445
  fixed: "overflow-hidden flex flex-col"
1999
2446
  };
2000
- function pr({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c = "md", height: l = "auto", radius: d = "xl", className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g = !0, closeLabel: _, role: v = "dialog", initialFocusRef: y, "aria-label": b }) {
2001
- let S = u(), C = u(), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = Dn({
2447
+ function pi({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c = "md", height: l = "auto", phoneLayout: u = "center", radius: d = "xl", className: p, panelClassName: h, backdropClassName: g, unstyled: _ = !1, dismissible: v = !0, closeLabel: y, role: b = "dialog", initialFocusRef: x, "aria-label": S }) {
2448
+ let w = f(), T = f(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } = Tr({
2002
2449
  isEnded: t,
2003
2450
  onDismiss: i,
2004
- dismissible: g,
2005
- initialFocusRef: y
2006
- });
2007
- Ae("Modal", !!a || !!b?.trim(), lr);
2008
- let { focusClassName: j, ...M } = sn(T, {
2009
- labelledBy: a ? S : void 0,
2010
- label: b
2011
- }), N = l === "auto", P = v === "alertdialog" && !!o;
2012
- return x(/* @__PURE__ */ r("div", {
2013
- className: e("fixed inset-0 z-50 flex items-start justify-center", "ms-modal-backdrop-padding", !h && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
2014
- onClick: k,
2015
- onMouseDown: A,
2451
+ dismissible: v,
2452
+ initialFocusRef: x
2453
+ });
2454
+ Ie("Modal", !!a || !!S?.trim(), li);
2455
+ let { ref: N, scrollableProps: P, focusClassName: F } = ir({
2456
+ labelledBy: a ? w : void 0,
2457
+ label: S
2458
+ }), I = m(() => $(D, N), [D, N]), L = l === "auto", R = u === "sheet", z = b === "alertdialog" && !!o;
2459
+ return C(/* @__PURE__ */ r("div", {
2460
+ className: e("fixed inset-0 z-50 flex justify-center", R ? "ms-modal-sheet-backdrop" : "items-start ms-modal-backdrop-padding", !_ && "transition-opacity duration-200 ease-out", A ? "opacity-100" : "opacity-0"),
2461
+ onClick: j,
2462
+ onMouseDown: M,
2016
2463
  children: [/* @__PURE__ */ n("div", {
2017
- className: e("fixed inset-0", !h && [
2464
+ className: e("fixed inset-0", !_ && [
2018
2465
  "bg-black/60 backdrop-blur-md",
2019
2466
  "transition-opacity duration-200 ease-out",
2020
- O ? "opacity-100" : "opacity-0"
2021
- ], m),
2467
+ A ? "opacity-100" : "opacity-0"
2468
+ ], g),
2022
2469
  "aria-hidden": "true"
2023
2470
  }), /* @__PURE__ */ r("div", {
2024
- ref: w,
2025
- role: v,
2471
+ ref: E,
2472
+ role: b,
2026
2473
  "aria-modal": "true",
2027
- "aria-labelledby": a ? S : void 0,
2028
- "aria-label": a ? void 0 : b,
2029
- "aria-describedby": P ? C : void 0,
2474
+ "aria-labelledby": a ? w : void 0,
2475
+ "aria-label": a ? void 0 : S,
2476
+ "aria-describedby": z ? T : void 0,
2030
2477
  tabIndex: -1,
2031
- "data-state": O ? "open" : "closed",
2032
- className: e("relative w-full", ur[c], dr[l], "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !h && [
2478
+ "data-state": A ? "open" : "closed",
2479
+ className: e("relative w-full", R ? si[c] : ui[c], di[l], R && "ms-modal-sheet-panel", R && l === "fixed" && "ms-modal-sheet-height-fixed", "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !_ && [
2033
2480
  "bg-white dark:bg-gray-900",
2034
2481
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
2035
2482
  "shadow-2xl",
2036
- H[d],
2483
+ R ? ci[d] : G[d],
2037
2484
  "transition-all duration-200 ease-out",
2038
- O ? "opacity-100" : "ms-modal-panel-closed"
2039
- ], p),
2485
+ A ? "opacity-100" : R ? "ms-modal-sheet-closed" : "ms-modal-panel-closed"
2486
+ ], h),
2040
2487
  onClick: (e) => e.stopPropagation(),
2041
2488
  children: [
2042
- a && /* @__PURE__ */ n(Ut, {
2043
- titleId: S,
2489
+ a && /* @__PURE__ */ n(Rn, {
2490
+ titleId: w,
2044
2491
  title: a,
2045
2492
  onDismiss: i,
2046
- dismissible: g,
2047
- closeLabel: _,
2048
- unstyled: h
2493
+ dismissible: v,
2494
+ closeLabel: y,
2495
+ unstyled: _
2049
2496
  }),
2050
2497
  /* @__PURE__ */ n("div", {
2051
- ref: T,
2052
- id: P ? C : void 0,
2053
- ...N ? M : void 0,
2054
- className: e("flex-1 min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", fr[l], !h && !a && "pt-6", N && j, f),
2055
- children: /* @__PURE__ */ n(Ht.Provider, {
2056
- value: E,
2498
+ ref: I,
2499
+ id: z ? T : void 0,
2500
+ ...L ? P : void 0,
2501
+ className: e("flex-1 min-h-0", !_ && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", fi[l], !_ && !a && "pt-6", L && F, p),
2502
+ children: /* @__PURE__ */ n(Ln.Provider, {
2503
+ value: O,
2057
2504
  children: o
2058
2505
  })
2059
2506
  }),
2060
- /* @__PURE__ */ n(Vt, {
2061
- onSlotChange: D,
2062
- unstyled: h,
2507
+ /* @__PURE__ */ n(In, {
2508
+ onSlotChange: k,
2509
+ unstyled: _,
2063
2510
  children: s
2064
2511
  })
2065
2512
  ]
@@ -2067,23 +2514,23 @@ function pr({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size:
2067
2514
  }), document.body);
2068
2515
  }
2069
2516
  // src/components/modal/confirm_modal.tsx
2070
- var mr = C(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, confirmColor: c, radius: l, closeLabel: u, onConfirm: d, onError: f }) => {
2071
- An();
2072
- let [h, g] = m(!1), _ = p(null), v = () => e.end(!1), y = async () => {
2517
+ var mi = T(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, confirmColor: c, radius: l, closeLabel: u, onConfirm: d, onError: f }) => {
2518
+ Or();
2519
+ let [p, m] = g(!1), _ = h(null), v = () => e.end(!1), y = async () => {
2073
2520
  if (!d) e.end(!0);
2074
2521
  else {
2075
- g(!0);
2522
+ m(!0);
2076
2523
  try {
2077
2524
  await d(), e.end(!0);
2078
2525
  } catch (e) {
2079
- g(!1), Ot(e, f);
2526
+ m(!1), Cn(e, f);
2080
2527
  }
2081
2528
  }
2082
- }, b = J(), x = o ?? b.confirm, S = s ?? b.cancel, C = c ?? "primary";
2083
- return /* @__PURE__ */ n(pr, {
2529
+ }, b = q(), x = o ?? b.confirm, S = s ?? b.cancel, C = c ?? "primary";
2530
+ return /* @__PURE__ */ n(pi, {
2084
2531
  isEnded: e.ended,
2085
2532
  onDismiss: v,
2086
- title: /* @__PURE__ */ n(cr, {
2533
+ title: /* @__PURE__ */ n(oi, {
2087
2534
  title: i,
2088
2535
  color: C
2089
2536
  }),
@@ -2092,20 +2539,20 @@ var mr = C(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, c
2092
2539
  closeLabel: u,
2093
2540
  role: "alertdialog",
2094
2541
  initialFocusRef: _,
2095
- footer: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(Y, {
2542
+ footer: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(J, {
2096
2543
  ref: _,
2097
2544
  variant: "outline",
2098
2545
  color: "neutral",
2099
2546
  onClick: v,
2100
- disabled: h,
2547
+ disabled: p,
2101
2548
  size: "sm",
2102
2549
  children: S
2103
- }), /* @__PURE__ */ n(Y, {
2550
+ }), /* @__PURE__ */ n(J, {
2104
2551
  color: C,
2105
2552
  onClick: () => {
2106
2553
  y();
2107
2554
  },
2108
- loading: h,
2555
+ loading: p,
2109
2556
  size: "sm",
2110
2557
  children: x
2111
2558
  })] }),
@@ -2113,64 +2560,86 @@ var mr = C(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, c
2113
2560
  });
2114
2561
  }, 200);
2115
2562
  // src/components/modal/modal.tsx
2116
- function hr(e, t) {
2563
+ function hi(e, t) {
2117
2564
  return typeof e == "function" ? e(t) : e;
2118
2565
  }
2119
- var gr = C(({ call: e, title: t, children: r, size: i, height: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
2120
- An();
2121
- let { dismiss: g, registry: _ } = Gt({
2566
+ var gi = T(({ call: e, title: t, children: r, size: i, height: a, phoneLayout: o, radius: s, className: c, panelClassName: l, backdropClassName: u, unstyled: d, dismissible: f, closeLabel: p, role: m, initialFocusRef: h, "aria-label": g }) => {
2567
+ Or();
2568
+ let { dismiss: _, registry: v } = Bn({
2122
2569
  onDismiss: () => e.end(),
2123
2570
  isEnded: e.ended
2124
2571
  });
2125
- return /* @__PURE__ */ n(Bt.Provider, {
2126
- value: _,
2127
- children: /* @__PURE__ */ n(pr, {
2572
+ return /* @__PURE__ */ n(Fn.Provider, {
2573
+ value: v,
2574
+ children: /* @__PURE__ */ n(pi, {
2128
2575
  isEnded: e.ended,
2129
- onDismiss: g,
2576
+ onDismiss: _,
2130
2577
  title: t,
2131
2578
  size: i,
2132
2579
  height: a,
2133
- radius: o,
2134
- className: s,
2135
- panelClassName: c,
2136
- backdropClassName: l,
2137
- unstyled: u,
2138
- dismissible: d,
2139
- closeLabel: f,
2140
- role: p,
2141
- initialFocusRef: m,
2142
- "aria-label": h,
2143
- children: hr(r, g)
2580
+ phoneLayout: o,
2581
+ radius: s,
2582
+ className: c,
2583
+ panelClassName: l,
2584
+ backdropClassName: u,
2585
+ unstyled: d,
2586
+ dismissible: f,
2587
+ closeLabel: p,
2588
+ role: m,
2589
+ initialFocusRef: h,
2590
+ "aria-label": g,
2591
+ children: hi(r, _)
2144
2592
  })
2145
2593
  });
2146
2594
  }, 200);
2147
2595
  // src/components/modal/modal_footer.tsx
2148
- function _r({ children: e }) {
2149
- let t = c(Ht);
2150
- return t ? x(e, t) : null;
2596
+ function _i({ children: e }) {
2597
+ let t = l(Ln);
2598
+ return t ? C(e, t) : null;
2151
2599
  }
2152
2600
  // src/components/modal/use_dismiss_guard.ts
2153
- function vr(e, t = !0) {
2154
- let n = c(Bt), r = p(e);
2155
- if (d(() => {
2601
+ function vi(e, t = !0) {
2602
+ let n = l(Fn), r = h(e);
2603
+ if (p(() => {
2156
2604
  r.current = e;
2157
- }), l(() => {
2605
+ }), u(() => {
2158
2606
  if (n && t) return n.register(r);
2159
2607
  }, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
2160
2608
  }
2161
2609
  // src/components/modal_provider/modal_provider.tsx
2162
- function yr() {
2163
- return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(gr, {}), /* @__PURE__ */ n(mr, {})] });
2610
+ function yi() {
2611
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(gi, {}), /* @__PURE__ */ n(mi, {})] });
2612
+ }
2613
+ // src/components/multi_combobox/multi_combobox_checkbox.tsx
2614
+ function bi({ isSelected: t, unstyled: r, radius: i }) {
2615
+ return /* @__PURE__ */ n("span", {
2616
+ "aria-hidden": !0,
2617
+ className: e("flex h-4 w-4 shrink-0 items-center justify-center", !r && [
2618
+ "border-2",
2619
+ G[i],
2620
+ t ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2621
+ ]),
2622
+ children: t && /* @__PURE__ */ n("svg", {
2623
+ className: "h-3 w-3 text-white",
2624
+ viewBox: "0 0 12 12",
2625
+ fill: "none",
2626
+ stroke: "currentColor",
2627
+ strokeWidth: "2.5",
2628
+ strokeLinecap: "round",
2629
+ strokeLinejoin: "round",
2630
+ children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
2631
+ })
2632
+ });
2164
2633
  }
2165
2634
  // src/components/multi_combobox/multi_combobox.tsx
2166
- var br = 2;
2167
- function xr(e, t, n, r) {
2168
- return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
2635
+ var xi = 2, Si = "flex items-center gap-2";
2636
+ function Ci(e, t, n, r, i) {
2637
+ return i?.(e, t) ? !0 : r === void 0 || n.has(e) ? !1 : t.length >= r;
2169
2638
  }
2170
- function Sr(e, t) {
2171
- return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
2639
+ function wi(e, t, n) {
2640
+ return t.has(n) ? e.filter((e) => e !== n) : [...e, n];
2172
2641
  }
2173
- function Cr(e, t) {
2642
+ function Ti(e, t) {
2174
2643
  if (e.length <= t) return {
2175
2644
  visibleOptions: e,
2176
2645
  hiddenCount: 0
@@ -2181,148 +2650,167 @@ function Cr(e, t) {
2181
2650
  hiddenCount: e.length - n
2182
2651
  };
2183
2652
  }
2184
- function wr(e, t, n) {
2653
+ function Ei(e, t, n) {
2185
2654
  return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
2186
2655
  }
2187
- function Tr(e, t) {
2188
- return e.label.toLowerCase().includes(t.trim().toLowerCase());
2189
- }
2190
- var Er = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2191
- function Dr({ options: i, filterOption: a = Tr, label: o, description: c, "aria-label": u, error: d, placeholder: h, searchPlaceholder: g, noResultsText: _, clearLabel: v, clearText: y, maxSelectedValues: b, isOptionDisabled: x, maxDisplayedValues: S = br, formatOverflowCount: C, formatSelectedCount: w, formatMaxSelectedHint: T, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, values: M, defaultValues: N = [], onChange: P, onDropdownClose: F, id: I }) {
2192
- let L = J(), { fieldId: z, errorId: B, descriptionId: V, labelId: W } = $(I), G = `${z}-listbox`, ee = `${z}-max-hint`, te = `${z}-selection`, ne = o !== void 0 || !!u, re = p(null), ie = p(null), K = p(null), [q, ae] = Oe(M, N), [Y, oe] = m(""), [X, se] = m(!1), ce = f(() => Y.trim() ? i.filter((e) => a(e, Y)) : i, [
2656
+ var Di = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2657
+ function Oi({ options: i, filterOption: a, label: o, description: s, "aria-label": l, error: d, placeholder: f, searchPlaceholder: p, noResultsText: _, clearLabel: v, clearText: y, maxSelectedValues: b, isOptionDisabled: x, maxDisplayedValues: S = xi, formatOverflowCount: C, formatSelectedCount: w, formatMaxSelectedHint: T, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, dropdownClassName: M, optionLabelOverflow: N = "wrap", values: P, defaultValues: F = [], onChange: I, onDropdownClose: L, id: R }) {
2658
+ let z = q(), { fieldId: B, errorId: H, descriptionId: U, labelId: W } = Me(R), te = `${B}-listbox`, ne = `${B}-max-hint`, re = `${B}-selection`, ie = o !== void 0 || !!l, ae = h(null), oe = h(null), se = h(null), ce = h(null), [K, le] = je(P, F), [J, ue] = g(""), [Y, de] = g(!1), fe = Rt(Y), pe = m(() => new Set(K), [K]), me = m(() => a ? [] : i.map((e) => e.label.toLowerCase()), [i, a]), he = m(() => {
2659
+ let e = J.trim().toLowerCase();
2660
+ return e ? a ? i.filter((e) => a(e, J)) : i.filter((t, n) => me[n].includes(e)) : i;
2661
+ }, [
2193
2662
  i,
2194
2663
  a,
2195
- Y
2196
- ]), { activeIndex: le, activeOptionId: ue, move: de, first: fe, last: Z, reset: pe } = We({
2197
- optionCount: ce.length,
2198
- getOptionId: (e) => `${G}-option-${e}`,
2199
- isOpen: X
2200
- }), me = f(() => i.filter((e) => q.includes(e.value)), [i, q]), ge = ne && me.length > 0, { visibleOptions: _e, hiddenCount: ve } = Cr(me, S), ye = () => {
2201
- O || se(!0);
2202
- }, be = s(() => {
2203
- se(!1), oe(""), pe(), F?.(q);
2664
+ me,
2665
+ J
2666
+ ]), { activeIndex: X, activeOptionId: Z, move: ge, moveWithinBounds: _e, first: ye, last: be, reset: xe } = jt({
2667
+ optionCount: he.length,
2668
+ getOptionId: (e) => Ze(te, e),
2669
+ isOpen: Y
2670
+ }), Se = m(() => i.filter((e) => pe.has(e.value)), [i, pe]), Ce = ie && Se.length > 0, { visibleOptions: we, hiddenCount: Te } = Ti(Se, S), Ee = () => {
2671
+ O || de(!0);
2672
+ }, Q = c(() => {
2673
+ de(!1), ue(""), xe(), L?.(K);
2204
2674
  }, [
2205
- pe,
2206
- F,
2207
- q
2208
- ]), xe = () => {
2209
- X ? be() : ye();
2210
- }, Se = (e) => {
2211
- if (xr(e, q, b, x)) return;
2212
- let t = Sr(q, e);
2213
- ae(t), P?.(t);
2214
- }, Ce = () => {
2215
- ae([]), P?.([]);
2216
- }, we = (e) => {
2217
- e.stopPropagation(), Ce(), X || F?.([]), re.current?.focus();
2218
- }, Te = () => {
2219
- Ce(), K.current?.focus();
2220
- }, Ee = () => {
2221
- O || xe();
2222
- }, De = (e) => {
2223
- oe(e.target.value), pe();
2675
+ xe,
2676
+ L,
2677
+ K
2678
+ ]), Oe = () => {
2679
+ Y ? Q() : Ee();
2224
2680
  }, ke = (e) => {
2225
- e.preventDefault(), X ? de(1) : (ye(), fe());
2226
- }, Ae = (e) => {
2227
- e.preventDefault(), X ? de(-1) : (ye(), Z());
2228
- }, je = (e) => {
2229
- if (!X) return;
2230
- e.preventDefault();
2231
- let t = ce[le];
2232
- t && Se(t.value);
2233
- }, Me = (e) => {
2234
- X && (e.preventDefault(), be(), re.current?.focus());
2681
+ if (Ci(e, K, pe, b, x)) return;
2682
+ let t = wi(K, pe, e);
2683
+ le(t), I?.(t);
2684
+ }, Ae = () => {
2685
+ le([]), I?.([]);
2235
2686
  }, Ne = (e) => {
2236
- if (e.key === "ArrowDown") return ke(e);
2237
- if (e.key === "ArrowUp") return Ae(e);
2238
- if (e.key === "Enter") return je(e);
2239
- if (e.key === "Escape") return Me(e);
2687
+ e.stopPropagation(), Ae(), Y || L?.([]), ae.current?.focus();
2688
+ }, Pe = () => {
2689
+ Ae(), se.current?.focus();
2690
+ }, Fe = () => {
2691
+ O || Oe();
2692
+ }, Ie = (e) => {
2693
+ ue(e.target.value), xe();
2694
+ }, Le = (e) => {
2695
+ e.preventDefault(), Y ? ge(1) : (Ee(), ye());
2696
+ }, $ = (e) => {
2697
+ e.preventDefault(), Y ? ge(-1) : (Ee(), be());
2698
+ }, Re = (e) => {
2699
+ if (!Y) return;
2700
+ e.preventDefault();
2701
+ let t = he[X];
2702
+ t && ke(t.value);
2703
+ }, ze = (e) => {
2704
+ Y && (e.preventDefault(), Q(), ae.current?.focus());
2705
+ }, Be = (e, t) => {
2706
+ Y && !Xe(e) && (e.preventDefault(), _e(t * ft(ce.current, X)));
2707
+ }, Ve = pt((e) => {
2708
+ ke(e.value);
2709
+ }), He = (e) => ({
2710
+ isSelected: pe.has(e.value),
2711
+ isDisabled: Ci(e.value, K, pe, b, x),
2712
+ className: Si
2713
+ }), Ue = c((e, i, a) => /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(bi, {
2714
+ isSelected: i,
2715
+ unstyled: D,
2716
+ radius: E
2717
+ }), a ? /* @__PURE__ */ n("span", {
2718
+ className: "min-w-0 truncate",
2719
+ children: e.label
2720
+ }) : e.label] }), [D, E]), We = (e) => {
2721
+ if (e.key === "PageDown") return Be(e, 1);
2722
+ if (e.key === "PageUp") return Be(e, -1);
2723
+ if (e.key === "ArrowDown") return Le(e);
2724
+ if (e.key === "ArrowUp") return $(e);
2725
+ if (e.key === "Enter") return Re(e);
2726
+ if (e.key === "Escape") return ze(e);
2240
2727
  };
2241
- return l(() => {
2242
- if (!X) return;
2728
+ return u(() => {
2729
+ if (!Y) return;
2243
2730
  let e = (e) => {
2244
- ie.current && !ie.current.contains(e.target) && be();
2731
+ oe.current && !oe.current.contains(e.target) && Q();
2245
2732
  };
2246
2733
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2247
- }, [X, be]), /* @__PURE__ */ n(Be, {
2248
- fieldId: z,
2249
- errorId: B,
2250
- descriptionId: V,
2734
+ }, [Y, Q]), /* @__PURE__ */ n(Ye, {
2735
+ fieldId: B,
2736
+ errorId: H,
2737
+ descriptionId: U,
2251
2738
  label: o,
2252
- description: c,
2739
+ description: s,
2253
2740
  error: d,
2254
2741
  required: k,
2255
2742
  wrapperClassName: j,
2256
2743
  children: /* @__PURE__ */ r("div", {
2257
- ref: ie,
2744
+ ref: oe,
2258
2745
  className: "relative",
2259
2746
  onBlur: (e) => {
2260
- if (!X) return;
2747
+ if (!Y) return;
2261
2748
  let t = e.relatedTarget;
2262
- t instanceof Node && ie.current?.contains(t) || be();
2749
+ t instanceof Node && oe.current?.contains(t) || Q();
2263
2750
  },
2264
2751
  children: [
2265
- ge && /* @__PURE__ */ n("span", {
2266
- id: te,
2752
+ Ce && /* @__PURE__ */ n("span", {
2753
+ id: re,
2267
2754
  className: "sr-only",
2268
- children: me.map((e) => e.label).join(", ")
2755
+ children: Se.map((e) => e.label).join(", ")
2269
2756
  }),
2270
2757
  /* @__PURE__ */ n("button", {
2271
- ref: re,
2758
+ ref: ae,
2272
2759
  type: "button",
2273
- id: z,
2760
+ id: B,
2274
2761
  role: "combobox",
2275
2762
  disabled: O,
2276
- "aria-expanded": X,
2277
- "aria-controls": G,
2763
+ "aria-expanded": Y,
2764
+ "aria-controls": te,
2278
2765
  "aria-haspopup": "listbox",
2279
2766
  "aria-invalid": !!d,
2280
2767
  "aria-required": k || void 0,
2281
- "aria-describedby": Q(ge && te, !!c && V, d && B),
2282
- "aria-labelledby": o && !u ? W : void 0,
2283
- "aria-label": u,
2284
- onClick: Ee,
2285
- onKeyDown: Ne,
2768
+ "aria-describedby": De(Ce && re, !!s && U, d && H),
2769
+ "aria-labelledby": o && !l ? W : void 0,
2770
+ "aria-label": l,
2771
+ onClick: Fe,
2772
+ onKeyDown: We,
2286
2773
  className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !D && [
2287
- he,
2288
- H[E],
2774
+ ve,
2775
+ G[E],
2289
2776
  "pl-3 pr-8 py-2 text-sm min-h-10"
2290
2777
  ], !D && d && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), A),
2291
- children: me.length === 0 ? /* @__PURE__ */ n("span", {
2778
+ children: Se.length === 0 ? /* @__PURE__ */ n("span", {
2292
2779
  className: e(!D && "text-gray-500 dark:text-gray-400"),
2293
- children: h
2294
- }) : /* @__PURE__ */ r(t, { children: [_e.map((t) => /* @__PURE__ */ n("span", {
2295
- className: e(!D && Er),
2780
+ children: f
2781
+ }) : /* @__PURE__ */ r(t, { children: [we.map((t) => /* @__PURE__ */ n("span", {
2782
+ className: e(!D && Di),
2296
2783
  children: t.label
2297
- }, t.value)), ve > 0 && /* @__PURE__ */ n("span", {
2298
- className: e(!D && Er),
2299
- children: (C ?? L.overflowCount)(ve)
2784
+ }, t.value)), Te > 0 && /* @__PURE__ */ n("span", {
2785
+ className: e(!D && Di),
2786
+ children: (C ?? z.overflowCount)(Te)
2300
2787
  })] })
2301
2788
  }),
2302
- !D && q.length > 0 && !O && /* @__PURE__ */ n("button", {
2789
+ !D && K.length > 0 && !O && /* @__PURE__ */ n("button", {
2303
2790
  type: "button",
2304
- "aria-label": v ?? L.clearSelection,
2791
+ "aria-label": v ?? z.clearSelection,
2305
2792
  onMouseDown: (e) => e.preventDefault(),
2306
- onClick: we,
2307
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", R.primary.focusOutline),
2793
+ onClick: Ne,
2794
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", V.primary.focusOutline),
2308
2795
  children: /* @__PURE__ */ n("span", {
2309
2796
  className: "i-mdi-close block w-4 h-4",
2310
2797
  "aria-hidden": !0
2311
2798
  })
2312
2799
  }),
2313
- X && /* @__PURE__ */ r("div", {
2800
+ Y && /* @__PURE__ */ r("div", {
2801
+ ref: fe,
2314
2802
  onMouseDown: (e) => {
2315
- e.target !== K.current && e.preventDefault();
2803
+ e.target !== se.current && e.preventDefault();
2316
2804
  },
2317
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !D && [
2805
+ className: e("absolute z-10 mt-1", M ? "min-w-full" : "w-full", "text-sm shadow-lg", !D && [
2318
2806
  "border overflow-hidden",
2319
2807
  "bg-white dark:bg-gray-900",
2320
2808
  "border-gray-100 dark:border-gray-800",
2321
- U[E]
2322
- ]),
2809
+ ee[E]
2810
+ ], M),
2323
2811
  children: [
2324
2812
  /* @__PURE__ */ n("input", {
2325
- ref: K,
2813
+ ref: se,
2326
2814
  type: "text",
2327
2815
  autoFocus: !0,
2328
2816
  role: "combobox",
@@ -2330,14 +2818,14 @@ function Dr({ options: i, filterOption: a = Tr, label: o, description: c, "aria-
2330
2818
  "aria-autocomplete": "list",
2331
2819
  "aria-haspopup": "listbox",
2332
2820
  autoComplete: "off",
2333
- value: Y,
2334
- onChange: De,
2335
- onKeyDown: Ne,
2336
- placeholder: g ?? L.search,
2337
- "aria-label": wr(o, u, g ?? L.search),
2338
- "aria-controls": G,
2339
- "aria-activedescendant": ue,
2340
- "aria-describedby": b === void 0 ? void 0 : ee,
2821
+ value: J,
2822
+ onChange: Ie,
2823
+ onKeyDown: We,
2824
+ placeholder: p ?? z.search,
2825
+ "aria-label": Ei(o, l, p ?? z.search),
2826
+ "aria-controls": te,
2827
+ "aria-activedescendant": Z,
2828
+ "aria-describedby": b === void 0 ? void 0 : ne,
2341
2829
  className: e("w-full", !D && [
2342
2830
  "px-3 py-2 border-b bg-transparent",
2343
2831
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
@@ -2346,63 +2834,36 @@ function Dr({ options: i, filterOption: a = Tr, label: o, description: c, "aria-
2346
2834
  ])
2347
2835
  }),
2348
2836
  b !== void 0 && /* @__PURE__ */ n("div", {
2349
- id: ee,
2837
+ id: ne,
2350
2838
  className: e("px-3 py-1 text-xs", !D && ["border-b", "border-gray-100 dark:border-gray-800"], !D && "text-gray-500 dark:text-gray-400"),
2351
- children: (T ?? L.maxSelectedHint)(b)
2839
+ children: (T ?? z.maxSelectedHint)(b)
2352
2840
  }),
2353
- /* @__PURE__ */ n("ul", {
2354
- id: G,
2355
- role: "listbox",
2356
- "aria-labelledby": o && !u ? W : void 0,
2357
- "aria-label": u,
2841
+ /* @__PURE__ */ n(Dt, {
2842
+ ref: ce,
2843
+ id: te,
2844
+ options: he,
2845
+ activeIndex: X,
2846
+ isWindowed: N !== "wrap" && rt(i.length),
2847
+ labelOverflow: N,
2848
+ noResultsText: _ ?? z.noResults,
2849
+ "aria-labelledby": o && !l ? W : void 0,
2850
+ "aria-label": l,
2358
2851
  "aria-multiselectable": !0,
2359
- className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
2360
- children: ce.map((t, i) => {
2361
- let a = q.includes(t.value), o = xr(t.value, q, b, x);
2362
- return /* @__PURE__ */ r("li", {
2363
- id: `${G}-option-${i}`,
2364
- role: "option",
2365
- "aria-selected": a,
2366
- "aria-disabled": o,
2367
- onClick: () => Se(t.value),
2368
- className: e("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", o ? "opacity-50 cursor-not-allowed" : "cursor-pointer", i === le ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !o && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
2369
- children: [/* @__PURE__ */ n("span", {
2370
- "aria-hidden": !0,
2371
- className: e("flex h-4 w-4 shrink-0 items-center justify-center", !D && [
2372
- "border-2",
2373
- H[E],
2374
- a ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2375
- ]),
2376
- children: a && /* @__PURE__ */ n("svg", {
2377
- className: "h-3 w-3 text-white",
2378
- viewBox: "0 0 12 12",
2379
- fill: "none",
2380
- stroke: "currentColor",
2381
- strokeWidth: "2.5",
2382
- strokeLinecap: "round",
2383
- strokeLinejoin: "round",
2384
- children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
2385
- })
2386
- }), t.label]
2387
- }, t.value);
2388
- })
2389
- }),
2390
- /* @__PURE__ */ n("div", {
2391
- role: "status",
2392
- className: ce.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
2393
- children: ce.length === 0 ? _ ?? L.noResults : ""
2852
+ getOptionState: He,
2853
+ renderOptionContent: Ue,
2854
+ onOptionClick: Ve
2394
2855
  }),
2395
2856
  b !== void 0 && /* @__PURE__ */ r("div", {
2396
2857
  className: e("flex items-center justify-between px-3 py-2", !D && ["border-t", "border-gray-100 dark:border-gray-800"]),
2397
2858
  children: [/* @__PURE__ */ n("span", {
2398
2859
  className: "text-xs text-gray-500 dark:text-gray-400",
2399
- children: (w ?? L.selectedCount)(q.length)
2860
+ children: (w ?? z.selectedCount)(K.length)
2400
2861
  }), /* @__PURE__ */ n("button", {
2401
2862
  type: "button",
2402
- disabled: q.length === 0,
2403
- onClick: Te,
2863
+ disabled: K.length === 0,
2864
+ onClick: Pe,
2404
2865
  className: "text-xs font-medium text-blue-600 hover:text-blue-700 disabled:opacity-50 disabled:cursor-not-allowed dark:text-blue-400 dark:hover:text-blue-300",
2405
- children: y ?? L.clear
2866
+ children: y ?? z.clear
2406
2867
  })]
2407
2868
  })
2408
2869
  ]
@@ -2412,9 +2873,9 @@ function Dr({ options: i, filterOption: a = Tr, label: o, description: c, "aria-
2412
2873
  });
2413
2874
  }
2414
2875
  // src/components/radio_options/radio_option_row.tsx
2415
- function Or({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, isFirstOption: l, required: u, error: d, radius: f, unstyled: p, className: m, onSelect: h }) {
2876
+ function ki({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, isFirstOption: l, required: u, error: d, radius: f, unstyled: p, className: m, onSelect: h }) {
2416
2877
  let g = !!d;
2417
- return /* @__PURE__ */ n(Pe, {
2878
+ return /* @__PURE__ */ n(Ue, {
2418
2879
  item: t,
2419
2880
  htmlFor: r,
2420
2881
  descriptionId: i,
@@ -2438,7 +2899,7 @@ function Or({ option: t, optionId: r, descriptionId: i, name: a, orientation: o,
2438
2899
  className: "sr-only"
2439
2900
  }),
2440
2901
  indicator: /* @__PURE__ */ n("span", {
2441
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", Ee({
2902
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", ke({
2442
2903
  isSelected: s,
2443
2904
  isError: g
2444
2905
  })),
@@ -2448,8 +2909,8 @@ function Or({ option: t, optionId: r, descriptionId: i, name: a, orientation: o,
2448
2909
  });
2449
2910
  }
2450
2911
  // src/components/radio_options/radio_options.tsx
2451
- function kr({ options: t, orientation: i = "vertical", value: a, defaultValue: o, onChange: s, name: c, label: l, error: u, required: d, disabled: f, radius: p = "lg", unstyled: m = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2452
- let { fieldId: b, errorId: x } = $(_), S = c ?? b, [C, w] = Oe(a, o ?? ""), T = t.map((e) => typeof e == "string" ? {
2912
+ function Ai({ options: t, orientation: i = "vertical", value: a, defaultValue: o, onChange: s, name: c, label: l, error: u, required: d, disabled: f, radius: p = "lg", unstyled: m = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2913
+ let { fieldId: b, errorId: x } = Me(_), S = c ?? b, [C, w] = je(a, o ?? ""), T = t.map((e) => typeof e == "string" ? {
2453
2914
  value: e,
2454
2915
  label: e
2455
2916
  } : e), E = (e) => {
@@ -2460,16 +2921,16 @@ function kr({ options: t, orientation: i = "vertical", value: a, defaultValue: o
2460
2921
  role: "radiogroup",
2461
2922
  disabled: f,
2462
2923
  "aria-invalid": u ? !0 : void 0,
2463
- "aria-describedby": Q(v, u && x),
2924
+ "aria-describedby": De(v, u && x),
2464
2925
  ...y,
2465
2926
  children: [
2466
2927
  l && /* @__PURE__ */ r("legend", {
2467
2928
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
2468
- children: [l, d && /* @__PURE__ */ n(De, {})]
2929
+ children: [l, d && /* @__PURE__ */ n(Ae, {})]
2469
2930
  }),
2470
2931
  /* @__PURE__ */ n("div", {
2471
2932
  className: e(i === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
2472
- children: T.map((e, t) => /* @__PURE__ */ n(Or, {
2933
+ children: T.map((e, t) => /* @__PURE__ */ n(ki, {
2473
2934
  option: e,
2474
2935
  optionId: `${b}-${t}`,
2475
2936
  descriptionId: `${b}-${t}-desc`,
@@ -2486,7 +2947,7 @@ function kr({ options: t, orientation: i = "vertical", value: a, defaultValue: o
2486
2947
  onSelect: E
2487
2948
  }, e.value))
2488
2949
  }),
2489
- /* @__PURE__ */ n(we, {
2950
+ /* @__PURE__ */ n(Q, {
2490
2951
  id: x,
2491
2952
  error: u,
2492
2953
  className: "mt-2"
@@ -2495,9 +2956,9 @@ function kr({ options: t, orientation: i = "vertical", value: a, defaultValue: o
2495
2956
  });
2496
2957
  }
2497
2958
  // src/components/select/select.tsx
2498
- function Ar({ options: t, label: i, description: a, error: o, placeholder: s, radius: c = "md", unstyled: l = !1, className: u, wrapperClassName: d, value: f, defaultValue: p, onChange: m, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2499
- let { fieldId: y, errorId: b, descriptionId: x, labelId: S } = $(h);
2500
- return /* @__PURE__ */ n(Be, {
2959
+ function ji({ options: t, label: i, description: a, error: o, placeholder: s, radius: c = "md", unstyled: l = !1, className: u, wrapperClassName: d, value: f, defaultValue: p, onChange: m, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2960
+ let { fieldId: y, errorId: b, descriptionId: x, labelId: S } = Me(h);
2961
+ return /* @__PURE__ */ n(Ye, {
2501
2962
  fieldId: y,
2502
2963
  errorId: b,
2503
2964
  descriptionId: x,
@@ -2509,8 +2970,8 @@ function Ar({ options: t, label: i, description: a, error: o, placeholder: s, ra
2509
2970
  children: /* @__PURE__ */ r("select", {
2510
2971
  id: y,
2511
2972
  className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !l && [
2512
- he,
2513
- H[c],
2973
+ ve,
2974
+ G[c],
2514
2975
  "pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
2515
2976
  "bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
2516
2977
  ], !l && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), u),
@@ -2518,8 +2979,8 @@ function Ar({ options: t, label: i, description: a, error: o, placeholder: s, ra
2518
2979
  onChange: m,
2519
2980
  "aria-invalid": !!o,
2520
2981
  "aria-label": _,
2521
- "aria-labelledby": Ve(i, S, _),
2522
- "aria-describedby": Q(g, !!a && x, o && b),
2982
+ "aria-labelledby": Ot(i, S, _),
2983
+ "aria-describedby": De(g, !!a && x, o && b),
2523
2984
  ...v,
2524
2985
  children: [s !== void 0 && /* @__PURE__ */ n("option", {
2525
2986
  value: "",
@@ -2531,30 +2992,30 @@ function Ar({ options: t, label: i, description: a, error: o, placeholder: s, ra
2531
2992
  })
2532
2993
  });
2533
2994
  }
2534
- var jr = "!rounded-l-none border-l", Mr = {
2995
+ var Mi = "!rounded-l-none border-l", Ni = {
2535
2996
  solid: "!border-l-white/40",
2536
2997
  outline: "!border-l-0",
2537
2998
  ghost: "!border-l-current/25",
2538
2999
  subtle: "!border-l-current/25"
2539
- }, Nr = "!border-l-gray-400";
2540
- function Pr(e, t) {
2541
- return [jr, e === "solid" && t === "neutral" ? Nr : Mr[e]];
3000
+ }, Pi = "!border-l-gray-400";
3001
+ function Fi(e, t) {
3002
+ return [Mi, e === "solid" && t === "neutral" ? Pi : Ni[e]];
2542
3003
  }
2543
3004
  // src/components/split_button/split_button.tsx
2544
- var Fr = "i-mdi-chevron-down";
2545
- function Ir(t) {
2546
- let { children: i, onClick: a, menu: o, menuLabel: s, menuIcon: c = Fr, menuAlign: l = "end", startIcon: u, size: d = "md", loading: f = !1, disabled: p = !1, "aria-label": m, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
3005
+ var Ii = "i-mdi-chevron-down";
3006
+ function Li(t) {
3007
+ let { children: i, onClick: a, menu: o, menuLabel: s, menuIcon: c = Ii, menuAlign: l = "end", startIcon: u, size: d = "md", loading: f = !1, disabled: p = !1, "aria-label": m, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
2547
3008
  variant: y,
2548
3009
  color: b,
2549
3010
  radius: x
2550
- }, C = /* @__PURE__ */ n(Dt, {
3011
+ }, C = /* @__PURE__ */ n(Sn, {
2551
3012
  icon: c,
2552
3013
  "aria-label": s,
2553
3014
  tooltip: !0,
2554
3015
  size: d,
2555
3016
  disabled: p,
2556
3017
  "aria-disabled": f && !p || void 0,
2557
- className: e(!v && ["relative focus-visible:z-10", Pr(y, b)]),
3018
+ className: e(!v && ["relative focus-visible:z-10", Fi(y, b)]),
2558
3019
  ...S
2559
3020
  });
2560
3021
  return /* @__PURE__ */ r("div", {
@@ -2562,7 +3023,7 @@ function Ir(t) {
2562
3023
  "aria-label": m,
2563
3024
  "aria-labelledby": h,
2564
3025
  className: e("inline-flex", g),
2565
- children: [/* @__PURE__ */ n(Y, {
3026
+ children: [/* @__PURE__ */ n(J, {
2566
3027
  ref: _,
2567
3028
  size: d,
2568
3029
  startIcon: u,
@@ -2572,7 +3033,7 @@ function Ir(t) {
2572
3033
  className: e(!v && ["relative focus-visible:z-10", "!rounded-r-none"]),
2573
3034
  ...S,
2574
3035
  children: i
2575
- }), /* @__PURE__ */ n(Hn, {
3036
+ }), /* @__PURE__ */ n(Br, {
2576
3037
  trigger: C,
2577
3038
  align: l,
2578
3039
  radius: x,
@@ -2582,28 +3043,28 @@ function Ir(t) {
2582
3043
  });
2583
3044
  }
2584
3045
  // src/components/spinner/spinner.tsx
2585
- var Lr = 0, Rr = "inline-flex items-center gap-2", zr = {
3046
+ var Ri = 0, zi = "inline-flex items-center gap-2", Bi = {
2586
3047
  xs: "text-xs",
2587
3048
  sm: "text-sm",
2588
3049
  md: "text-sm",
2589
3050
  lg: "text-base"
2590
- }, Br = {
3051
+ }, Vi = {
2591
3052
  xs: "w-3.5 h-3.5",
2592
3053
  sm: "w-4 h-4",
2593
3054
  md: "w-5 h-5",
2594
3055
  lg: "w-6 h-6"
2595
3056
  };
2596
- function Vr(t) {
2597
- let { size: i = "md", label: a, unstyled: o = !1, className: s, iconClassName: c, labelClassName: u, ...d } = t, f = J(), [p, h] = m(!1);
2598
- l(() => {
2599
- let e = setTimeout(() => h(!0), Lr);
3057
+ function Hi(t) {
3058
+ let { size: i = "md", label: a, unstyled: o = !1, className: s, iconClassName: c, labelClassName: l, ...d } = t, f = q(), [p, m] = g(!1);
3059
+ u(() => {
3060
+ let e = setTimeout(() => m(!0), Ri);
2600
3061
  return () => clearTimeout(e);
2601
3062
  }, []);
2602
- let g = a ?? f.loading, _ = e(!o && Br[i], c);
3063
+ let h = a ?? f.loading, _ = e(!o && Vi[i], c);
2603
3064
  return /* @__PURE__ */ r("span", {
2604
3065
  role: "status",
2605
3066
  ...d,
2606
- className: e(!o && [Rr, zr[i]], s),
3067
+ className: e(!o && [zi, Bi[i]], s),
2607
3068
  children: [
2608
3069
  /* @__PURE__ */ n("span", {
2609
3070
  className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", _),
@@ -2614,57 +3075,74 @@ function Vr(t) {
2614
3075
  "aria-hidden": "true"
2615
3076
  }),
2616
3077
  p && /* @__PURE__ */ n("span", {
2617
- className: a === void 0 ? "sr-only" : u,
2618
- children: g
3078
+ className: a === void 0 ? "sr-only" : l,
3079
+ children: h
2619
3080
  })
2620
3081
  ]
2621
3082
  });
2622
3083
  }
2623
3084
  // src/components/switch/switch.tsx
2624
- function Hr({ label: i, description: a, error: o, unstyled: s = !1, fullWidth: c = !1, className: l, wrapperClassName: u, checked: d, defaultChecked: f = !1, onChange: p, id: m, "aria-describedby": h, "aria-label": g, "aria-labelledby": _, ...v }) {
2625
- let { fieldId: y, errorId: b, descriptionId: x } = $(m), [S, C] = Oe(d, f), w = Q(h, !!a && x, o && b);
2626
- return Ae("Switch", !!i || !!g?.trim() || !!_?.trim()), /* @__PURE__ */ r("div", {
3085
+ var Ui = "absolute -inset-0.5 m-0 h-6 w-11 appearance-none opacity-0";
3086
+ function Wi(t, n) {
3087
+ return t ? "sr-only" : e(Ui, n ? "cursor-not-allowed" : "cursor-pointer");
3088
+ }
3089
+ function Gi({ htmlFor: e, className: t, children: r }) {
3090
+ return e === void 0 ? /* @__PURE__ */ n("div", {
3091
+ className: t,
3092
+ children: r
3093
+ }) : /* @__PURE__ */ n("label", {
3094
+ htmlFor: e,
3095
+ className: t,
3096
+ children: r
3097
+ });
3098
+ }
3099
+ function Ki({ label: i, description: a, error: o, unstyled: s = !1, fullWidth: c = !1, className: l, wrapperClassName: u, checked: d, defaultChecked: f = !1, onChange: p, id: g, "aria-describedby": _, "aria-label": v, "aria-labelledby": y, ref: b, ...x }) {
3100
+ let { fieldId: S, errorId: C, descriptionId: w } = Me(g), [T, E] = je(d, f), D = h(null), O = !!i, k = De(_, !!a && w, o && C);
3101
+ Le("Switch", D, !!i || !!v?.trim() || !!y?.trim());
3102
+ let A = m(() => $(D, b), [b]);
3103
+ return /* @__PURE__ */ r("div", {
2627
3104
  className: e(c ? "w-full" : "w-fit", u),
2628
3105
  children: [
2629
- /* @__PURE__ */ r("label", {
2630
- htmlFor: y,
2631
- className: e("flex items-center gap-3 cursor-pointer", v.disabled && "cursor-not-allowed opacity-50"),
3106
+ /* @__PURE__ */ r(Gi, {
3107
+ htmlFor: O ? S : void 0,
3108
+ className: e("flex items-center gap-3 cursor-pointer", x.disabled && "cursor-not-allowed opacity-50"),
2632
3109
  children: [/* @__PURE__ */ r("span", {
2633
- className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", P, F, !s && [
3110
+ className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", I, L, !s && [
2634
3111
  "rounded-full border-2 border-transparent",
2635
- S ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-200 dark:bg-gray-600",
3112
+ T ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-200 dark:bg-gray-600",
2636
3113
  o && "ring-2 ring-red-500 dark:ring-red-400"
2637
3114
  ], l),
2638
3115
  children: [/* @__PURE__ */ n("input", {
2639
3116
  type: "checkbox",
2640
3117
  role: "switch",
2641
- id: y,
2642
- className: "sr-only",
2643
- checked: S,
3118
+ ref: A,
3119
+ id: S,
3120
+ className: Wi(O, x.disabled === !0),
3121
+ checked: T,
2644
3122
  onChange: (e) => {
2645
- C(e.target.checked), p?.(e);
3123
+ E(e.target.checked), p?.(e);
2646
3124
  },
2647
3125
  "aria-invalid": !!o,
2648
- "aria-describedby": w,
2649
- "aria-label": g,
2650
- "aria-labelledby": _,
2651
- ...v
3126
+ "aria-describedby": k,
3127
+ "aria-label": v,
3128
+ "aria-labelledby": y,
3129
+ ...x
2652
3130
  }), /* @__PURE__ */ n("span", {
2653
- className: e("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0", "ms-switch-thumb-transition", S ? "translate-x-5.25" : "translate-x-0"),
3131
+ className: e("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0", "ms-switch-thumb-transition", T ? "translate-x-5.25" : "translate-x-0"),
2654
3132
  "aria-hidden": !0
2655
3133
  })]
2656
3134
  }), i && /* @__PURE__ */ n(t, { children: typeof i == "string" ? /* @__PURE__ */ r("span", {
2657
3135
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "select-none"),
2658
- children: [i, v.required && /* @__PURE__ */ n(De, {})]
2659
- }) : /* @__PURE__ */ r(t, { children: [i, v.required && /* @__PURE__ */ n(De, {})] }) })]
3136
+ children: [i, x.required && /* @__PURE__ */ n(Ae, {})]
3137
+ }) : /* @__PURE__ */ r(t, { children: [i, x.required && /* @__PURE__ */ n(Ae, {})] }) })]
2660
3138
  }),
2661
- /* @__PURE__ */ n(xe, {
2662
- id: x,
3139
+ /* @__PURE__ */ n(we, {
3140
+ id: w,
2663
3141
  description: a,
2664
3142
  className: "mt-1 ml-14"
2665
3143
  }),
2666
- /* @__PURE__ */ n(we, {
2667
- id: b,
3144
+ /* @__PURE__ */ n(Q, {
3145
+ id: C,
2668
3146
  error: o,
2669
3147
  className: "mt-1 ml-14"
2670
3148
  })
@@ -2672,23 +3150,23 @@ function Hr({ label: i, description: a, error: o, unstyled: s = !1, fullWidth: c
2672
3150
  });
2673
3151
  }
2674
3152
  // src/components/tabs/tabs_styles.ts
2675
- var Ur = {
3153
+ var qi = {
2676
3154
  list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
2677
3155
  tab: "",
2678
- indicator: `absolute inset-0 ${T} border border-gray-200 dark:border-gray-700`
2679
- }, Wr = {
3156
+ indicator: `absolute inset-0 ${D} border border-gray-200 dark:border-gray-700`
3157
+ }, Ji = {
2680
3158
  line: {
2681
3159
  activeTab: "border-transparent text-gray-900 dark:text-gray-100",
2682
3160
  idleTab: "border-transparent text-gray-500 dark:text-gray-400",
2683
3161
  idleHover: "hover:text-gray-900 hover:border-gray-300 dark:hover:text-gray-100 dark:hover:border-gray-600",
2684
3162
  byOrientation: {
2685
3163
  horizontal: {
2686
- list: `gap-1 border-b ${E}`,
3164
+ list: `gap-1 border-b ${O}`,
2687
3165
  tab: "-mb-px border-b-2",
2688
3166
  indicator: "absolute inset-x-0 -bottom-0.5 h-0.5 bg-blue-600 dark:bg-blue-400"
2689
3167
  },
2690
3168
  vertical: {
2691
- list: `gap-1 border-r ${E}`,
3169
+ list: `gap-1 border-r ${O}`,
2692
3170
  tab: "border-r-2",
2693
3171
  indicator: "absolute inset-y-0 -right-0.5 w-0.5 bg-blue-600 dark:bg-blue-400"
2694
3172
  }
@@ -2699,52 +3177,52 @@ var Ur = {
2699
3177
  idleTab: "text-gray-600 dark:text-gray-400",
2700
3178
  idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
2701
3179
  byOrientation: {
2702
- horizontal: Ur,
2703
- vertical: Ur
3180
+ horizontal: qi,
3181
+ vertical: qi
2704
3182
  }
2705
3183
  }
2706
- }, Gr = {
3184
+ }, Yi = {
2707
3185
  xs: "px-2 py-1 text-xs",
2708
3186
  sm: "px-3 py-1.5 text-sm",
2709
3187
  md: "px-4 py-2.5 text-sm",
2710
3188
  lg: "px-5 py-3 text-base"
2711
- }, Kr = {
3189
+ }, Xi = {
2712
3190
  xs: "w-3.5 h-3.5",
2713
3191
  sm: "w-4 h-4",
2714
3192
  md: "w-4 h-4",
2715
3193
  lg: "w-5 h-5"
2716
- }, qr = {
2717
- horizontal: e(M, R.primary.focusOutline),
2718
- vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", R.primary.focusOutline)
2719
- }, Jr = "items-center", Yr = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", k), Xr = "w-48 shrink-0", Zr = "justify-start text-left whitespace-normal", Qr = "whitespace-nowrap", $r = "flex min-h-0", ei = e("flex-1 min-w-0 min-h-0 overflow-y-auto", k), ti = "ml-6", ni = "mt-4";
2720
- function ri(t, n) {
2721
- return e("w-full", t === "vertical" && $r, n);
2722
- }
2723
- function ii(t) {
3194
+ }, Zi = {
3195
+ horizontal: e(P, V.primary.focusOutline),
3196
+ vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", V.primary.focusOutline)
3197
+ }, Qi = "items-center", $i = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", j), ea = "w-48 shrink-0", ta = "justify-start text-left whitespace-normal", na = "whitespace-nowrap", ra = "flex min-h-0", ia = e("flex-1 min-w-0 min-h-0 overflow-y-auto", j), aa = "ml-6", oa = "mt-4";
3198
+ function sa(t, n) {
3199
+ return e("w-full", t === "vertical" && ra, n);
3200
+ }
3201
+ function ca(t) {
2724
3202
  let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
2725
- return e(a && ei, !r && [a ? ti : ni, qr[n]], i);
3203
+ return e(a && ia, !r && [a ? aa : oa, Zi[n]], i);
2726
3204
  }
2727
- function ai(t) {
3205
+ function la(t) {
2728
3206
  let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
2729
- return e("flex", c ? Yr : Jr, !c && o && "w-full", !a && c && Xr, !a && Wr[n].byOrientation[r].list, !a && n === "segmented" && H[i], s);
3207
+ return e("flex", c ? $i : Qi, !c && o && "w-full", !a && c && ea, !a && Ji[n].byOrientation[r].list, !a && n === "segmented" && G[i], s);
2730
3208
  }
2731
- function oi(t) {
2732
- let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Wr[n];
2733
- return e("relative flex items-center gap-2", d ? Zr : Qr, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
3209
+ function ua(t) {
3210
+ let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Ji[n];
3211
+ return e("relative flex items-center gap-2", d ? ta : na, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
2734
3212
  "font-medium transition-colors duration-200",
2735
- Gr[i],
3213
+ Yi[i],
2736
3214
  f.byOrientation[r].tab,
2737
3215
  s ? f.activeTab : [f.idleTab, !c && f.idleHover],
2738
- n === "segmented" && H[a],
2739
- qr[r]
3216
+ n === "segmented" && G[a],
3217
+ Zi[r]
2740
3218
  ], u);
2741
3219
  }
2742
- function si(t) {
3220
+ function da(t) {
2743
3221
  let { variant: n, orientation: r, radius: i } = t;
2744
- return e("tabs-indicator pointer-events-none", Wr[n].byOrientation[r].indicator, n === "segmented" && H[i]);
3222
+ return e("tabs-indicator pointer-events-none", Ji[n].byOrientation[r].indicator, n === "segmented" && G[i]);
2745
3223
  }
2746
3224
  // src/components/tabs/tab_button.tsx
2747
- function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidth: c, variant: l, orientation: u, size: d, radius: f, unstyled: p, tabId: m, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
3225
+ function fa({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidth: c, variant: l, orientation: u, size: d, radius: f, unstyled: p, tabId: m, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
2748
3226
  let b = !!i.disabled;
2749
3227
  return /* @__PURE__ */ r("button", {
2750
3228
  ref: v,
@@ -2758,7 +3236,7 @@ function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidt
2758
3236
  disabled: i.disabled,
2759
3237
  onClick: g,
2760
3238
  onKeyDown: _,
2761
- className: oi({
3239
+ className: ua({
2762
3240
  variant: l,
2763
3241
  orientation: u,
2764
3242
  size: d,
@@ -2772,7 +3250,7 @@ function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidt
2772
3250
  a && !p && /* @__PURE__ */ n("span", {
2773
3251
  ref: y,
2774
3252
  "aria-hidden": "true",
2775
- className: si({
3253
+ className: da({
2776
3254
  variant: l,
2777
3255
  orientation: u,
2778
3256
  radius: f
@@ -2780,7 +3258,7 @@ function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidt
2780
3258
  }),
2781
3259
  i.icon && /* @__PURE__ */ n("span", {
2782
3260
  "aria-hidden": "true",
2783
- className: e("relative shrink-0", Kr[d], i.icon)
3261
+ className: e("relative shrink-0", Xi[d], i.icon)
2784
3262
  }),
2785
3263
  /* @__PURE__ */ n("span", {
2786
3264
  className: "relative",
@@ -2791,7 +3269,7 @@ function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidt
2791
3269
  });
2792
3270
  }
2793
3271
  // src/components/tabs/tab_panel.tsx
2794
- function li({ panelId: t, tabId: r, isHidden: i, isAnimated: a, className: o, contentKey: s, children: c }) {
3272
+ function pa({ panelId: t, tabId: r, isHidden: i, isAnimated: a, className: o, contentKey: s, children: c }) {
2795
3273
  return /* @__PURE__ */ n("div", {
2796
3274
  role: "tabpanel",
2797
3275
  id: t,
@@ -2806,11 +3284,11 @@ function li({ panelId: t, tabId: r, isHidden: i, isAnimated: a, className: o, co
2806
3284
  });
2807
3285
  }
2808
3286
  // src/components/tabs/use_tab_indicator_transition.ts
2809
- var ui = 200, di = "ease-out", fi = "(prefers-reduced-motion: reduce)";
2810
- function pi() {
2811
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(fi).matches;
3287
+ var ma = 200, ha = "ease-out", ga = "(prefers-reduced-motion: reduce)";
3288
+ function _a() {
3289
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(ga).matches;
2812
3290
  }
2813
- function mi(e, t, n) {
3291
+ function va(e, t, n) {
2814
3292
  return e === "vertical" ? [{
2815
3293
  transform: `translateY(${t.top - n.top}px)`,
2816
3294
  height: `${t.height}px`
@@ -2825,25 +3303,25 @@ function mi(e, t, n) {
2825
3303
  width: `${n.width}px`
2826
3304
  }];
2827
3305
  }
2828
- function hi(e, t, n, r) {
2829
- e.animate(mi(t, n, r), {
2830
- duration: ui,
2831
- easing: di
3306
+ function ya(e, t, n, r) {
3307
+ e.animate(va(t, n, r), {
3308
+ duration: ma,
3309
+ easing: ha
2832
3310
  });
2833
3311
  }
2834
- function gi(e, t, n) {
2835
- return !e || !t || !n ? !1 : !pi();
3312
+ function ba(e, t, n) {
3313
+ return !e || !t || !n ? !1 : !_a();
2836
3314
  }
2837
- function _i(e) {
2838
- let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = p(null);
2839
- d(() => {
3315
+ function xa(e) {
3316
+ let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = h(null);
3317
+ p(() => {
2840
3318
  let e = n.current;
2841
3319
  if (!e) {
2842
3320
  a.current = null;
2843
3321
  return;
2844
3322
  }
2845
3323
  let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
2846
- gi(a.current, r, o) && hi(e, i, a.current, t), a.current = t;
3324
+ ba(a.current, r, o) && ya(e, i, a.current, t), a.current = t;
2847
3325
  }, [
2848
3326
  t,
2849
3327
  n,
@@ -2852,34 +3330,34 @@ function _i(e) {
2852
3330
  ]);
2853
3331
  }
2854
3332
  // src/components/tabs/use_tabs_keyboard_navigation.ts
2855
- var vi = {
3333
+ var Sa = {
2856
3334
  Home: () => 0,
2857
3335
  End: (e, t) => t - 1
2858
- }, yi = (e, t) => (e + 1) % t, bi = (e, t) => (e - 1 + t) % t, xi = {
3336
+ }, Ca = (e, t) => (e + 1) % t, wa = (e, t) => (e - 1 + t) % t, Ta = {
2859
3337
  horizontal: {
2860
- ...vi,
2861
- ArrowRight: yi,
2862
- ArrowLeft: bi
3338
+ ...Sa,
3339
+ ArrowRight: Ca,
3340
+ ArrowLeft: wa
2863
3341
  },
2864
3342
  vertical: {
2865
- ...vi,
2866
- ArrowDown: yi,
2867
- ArrowUp: bi
3343
+ ...Sa,
3344
+ ArrowDown: Ca,
3345
+ ArrowUp: wa
2868
3346
  }
2869
3347
  };
2870
- function Si(e) {
3348
+ function Ea(e) {
2871
3349
  return e.flatMap((e, t) => e.disabled ? [] : [t]);
2872
3350
  }
2873
- function Ci(e, t) {
3351
+ function Da(e, t) {
2874
3352
  let n = e[t];
2875
- return n && !n.disabled ? t : Si(e)[0] ?? -1;
3353
+ return n && !n.disabled ? t : Ea(e)[0] ?? -1;
2876
3354
  }
2877
- function wi(e) {
3355
+ function Oa(e) {
2878
3356
  let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
2879
3357
  return (e) => {
2880
- let a = xi[r][e.key];
3358
+ let a = Ta[r][e.key];
2881
3359
  if (!a) return;
2882
- let o = Si(t);
3360
+ let o = Ea(t);
2883
3361
  if (o.length === 0) return;
2884
3362
  e.preventDefault();
2885
3363
  let s = a(o.indexOf(n), o.length);
@@ -2887,69 +3365,69 @@ function wi(e) {
2887
3365
  };
2888
3366
  }
2889
3367
  // src/components/tabs/tabs.tsx
2890
- function Ti({ items: e, value: t, defaultIndex: i = 0, variant: a = "line", orientation: o = "horizontal", size: s = "md", radius: c = "md", fullWidth: l = !1, unstyled: d = !1, animated: f = !0, keepMounted: m = !1, "aria-label": h, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
2891
- let [x, S] = Oe(t, i), C = u(), w = p([]), T = p(null), E = (t) => {
3368
+ function ka({ items: e, value: t, defaultIndex: i = 0, variant: a = "line", orientation: o = "horizontal", size: s = "md", radius: c = "md", fullWidth: l = !1, unstyled: u = !1, animated: d = !0, keepMounted: p = !1, "aria-label": m, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
3369
+ let [x, S] = je(t, i), C = f(), w = h([]), T = h(null), E = (t) => {
2892
3370
  e[t]?.disabled || (S(t), b?.(t));
2893
3371
  }, D = (e) => {
2894
3372
  w.current[e]?.focus(), E(e);
2895
- }, O = Ci(e, x), k = wi({
3373
+ }, O = Da(e, x), k = Oa({
2896
3374
  items: e,
2897
3375
  activeIndex: O,
2898
3376
  orientation: o,
2899
3377
  onNavigate: D
2900
- }), A = ii({
3378
+ }), A = ca({
2901
3379
  orientation: o,
2902
- unstyled: d,
3380
+ unstyled: u,
2903
3381
  className: y
2904
- }), j = f && !d;
2905
- return _i({
3382
+ }), j = d && !u;
3383
+ return xa({
2906
3384
  activeIndex: x,
2907
3385
  indicatorRef: T,
2908
- isAnimated: f,
3386
+ isAnimated: d,
2909
3387
  orientation: o
2910
3388
  }), /* @__PURE__ */ r("div", {
2911
- className: ri(o, _),
3389
+ className: sa(o, _),
2912
3390
  children: [/* @__PURE__ */ n("div", {
2913
3391
  role: "tablist",
2914
- "aria-label": h,
3392
+ "aria-label": m,
2915
3393
  "aria-labelledby": g,
2916
3394
  "aria-orientation": o,
2917
- className: ai({
3395
+ className: la({
2918
3396
  variant: a,
2919
3397
  orientation: o,
2920
3398
  radius: c,
2921
- unstyled: d,
3399
+ unstyled: u,
2922
3400
  isFullWidth: l,
2923
3401
  className: v
2924
3402
  }),
2925
- children: e.map((e, t) => /* @__PURE__ */ n(ci, {
3403
+ children: e.map((e, t) => /* @__PURE__ */ n(fa, {
2926
3404
  ref: (e) => {
2927
3405
  w.current[t] = e;
2928
3406
  },
2929
3407
  indicatorRef: T,
2930
3408
  item: e,
2931
3409
  isActive: x === t,
2932
- hasMountedPanel: m || x === t,
3410
+ hasMountedPanel: p || x === t,
2933
3411
  isTabStop: O === t,
2934
3412
  isFullWidth: l,
2935
3413
  variant: a,
2936
3414
  orientation: o,
2937
3415
  size: s,
2938
3416
  radius: c,
2939
- unstyled: d,
3417
+ unstyled: u,
2940
3418
  tabId: `${C}-tab-${t}`,
2941
3419
  panelId: `${C}-panel-${t}`,
2942
3420
  onSelect: () => E(t),
2943
3421
  onKeyDown: k
2944
3422
  }, e.title))
2945
- }), m ? e.map((e, t) => /* @__PURE__ */ n(li, {
3423
+ }), p ? e.map((e, t) => /* @__PURE__ */ n(pa, {
2946
3424
  panelId: `${C}-panel-${t}`,
2947
3425
  tabId: `${C}-tab-${t}`,
2948
3426
  isHidden: t !== x,
2949
3427
  isAnimated: j,
2950
3428
  className: A,
2951
3429
  children: e.content
2952
- }, e.title)) : /* @__PURE__ */ n(li, {
3430
+ }, e.title)) : /* @__PURE__ */ n(pa, {
2953
3431
  panelId: `${C}-panel-${x}`,
2954
3432
  tabId: `${C}-tab-${x}`,
2955
3433
  isHidden: !1,
@@ -2961,11 +3439,11 @@ function Ti({ items: e, value: t, defaultIndex: i = 0, variant: a = "line", orie
2961
3439
  });
2962
3440
  }
2963
3441
  // src/components/textarea/textarea.tsx
2964
- function Ei({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2965
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = In(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
3442
+ function Aa({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
3443
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = Me(g), { length: T, trackLength: E } = Pr(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
2966
3444
  E(e.target.value), h?.(e);
2967
3445
  };
2968
- return /* @__PURE__ */ r(Be, {
3446
+ return /* @__PURE__ */ r(Ye, {
2969
3447
  fieldId: b,
2970
3448
  errorId: x,
2971
3449
  descriptionId: S,
@@ -2977,8 +3455,8 @@ function Ei({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
2977
3455
  children: [/* @__PURE__ */ n("textarea", {
2978
3456
  id: b,
2979
3457
  className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !u && [
2980
- he,
2981
- H[l],
3458
+ ve,
3459
+ G[l],
2982
3460
  "px-3 py-2 text-sm"
2983
3461
  ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
2984
3462
  ...p === void 0 ? { defaultValue: m } : { value: p },
@@ -2987,8 +3465,8 @@ function Ei({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
2987
3465
  onChange: O,
2988
3466
  "aria-invalid": !!a,
2989
3467
  "aria-label": v,
2990
- "aria-labelledby": Ve(t, C, v),
2991
- "aria-describedby": Q(_, !!i && S, a && x, D && w),
3468
+ "aria-labelledby": Ot(t, C, v),
3469
+ "aria-describedby": De(_, !!i && S, a && x, D && w),
2992
3470
  ...y
2993
3471
  }), D && /* @__PURE__ */ n(Z, {
2994
3472
  id: w,
@@ -3001,7 +3479,7 @@ function Ei({ label: t, description: i, error: a, showCharCount: o = !1, minLeng
3001
3479
  });
3002
3480
  }
3003
3481
  // src/lib/is_webkit_gtk.ts
3004
- var Di = "AppleWebKit", Oi = ["Linux", "X11"], ki = [
3482
+ var ja = "AppleWebKit", Ma = ["Linux", "X11"], Na = [
3005
3483
  "Chrome",
3006
3484
  "Chromium",
3007
3485
  "Edg",
@@ -3009,12 +3487,12 @@ var Di = "AppleWebKit", Oi = ["Linux", "X11"], ki = [
3009
3487
  "CriOS",
3010
3488
  "FxiOS"
3011
3489
  ];
3012
- function Ai(e) {
3013
- return !e.includes(Di) || !Oi.some((t) => e.includes(t)) ? !1 : !ki.some((t) => e.includes(t));
3490
+ function Pa(e) {
3491
+ return !e.includes(ja) || !Ma.some((t) => e.includes(t)) ? !1 : !Na.some((t) => e.includes(t));
3014
3492
  }
3015
3493
  // src/lib/theme_transition.ts
3016
- var ji = 750, Mi = "ease-in-out";
3017
- async function Ni({ theme: e, element: t, transitionDuration: n = ji, transitionEasing: r = Mi, applyThemeCallback: i }) {
3494
+ var Fa = 750, Ia = "ease-in-out";
3495
+ async function La({ theme: e, element: t, transitionDuration: n = Fa, transitionEasing: r = Ia, applyThemeCallback: i }) {
3018
3496
  if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
3019
3497
  i(e);
3020
3498
  return;
@@ -3028,76 +3506,81 @@ async function Ni({ theme: e, element: t, transitionDuration: n = ji, transition
3028
3506
  pseudoElement: "::view-transition-new(root)"
3029
3507
  });
3030
3508
  }
3031
- function Pi(e) {
3509
+ function Ra(e) {
3032
3510
  return e === "light" ? "dark" : e === "dark" ? "system" : "light";
3033
3511
  }
3034
3512
  // src/stores/theme_store/theme_storage_key.ts
3035
- var Fi = "theme";
3513
+ var za = "theme";
3036
3514
  // src/stores/theme_store/theme_store.ts
3037
- function Ii(e) {
3515
+ function Ba(e) {
3038
3516
  return e === "light" || e === "dark" || e === "system";
3039
3517
  }
3040
- function Li() {
3518
+ function Va() {
3041
3519
  return globalThis.window !== void 0 && globalThis.document !== void 0;
3042
3520
  }
3043
- function Ri(e) {
3521
+ var Ha = "meta[name=\"theme-color\"][data-light][data-dark]";
3522
+ function Ua(e) {
3523
+ let t = e ? "data-dark" : "data-light";
3524
+ for (let e of document.querySelectorAll(Ha)) e.setAttribute("content", e.getAttribute(t) ?? "");
3525
+ }
3526
+ function Wa(e) {
3044
3527
  let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
3045
- document.documentElement.classList.toggle("dark", n);
3528
+ document.documentElement.classList.toggle("dark", n), Ua(n);
3046
3529
  }
3047
- function zi() {
3048
- if (!Li()) return "system";
3530
+ function Ga() {
3531
+ if (!Va()) return "system";
3049
3532
  try {
3050
- let e = globalThis.localStorage.getItem(Fi);
3051
- return Ii(e) ? e : "system";
3533
+ let e = globalThis.localStorage.getItem(za);
3534
+ return Ba(e) ? e : "system";
3052
3535
  } catch {
3053
3536
  return "system";
3054
3537
  }
3055
3538
  }
3056
- function Bi(e) {
3057
- if (Li()) try {
3058
- globalThis.localStorage.setItem(Fi, e);
3539
+ function Ka(e) {
3540
+ if (Va()) try {
3541
+ globalThis.localStorage.setItem(za, e);
3059
3542
  } catch {
3060
3543
  return;
3061
3544
  }
3062
3545
  }
3063
- var Vi = zi();
3064
- Li() && Ri(Vi);
3065
- var Hi = S((e) => ({
3066
- theme: Vi,
3546
+ var qa = Ga();
3547
+ Va() && Wa(qa);
3548
+ var Ja = w((e) => ({
3549
+ theme: qa,
3067
3550
  setTheme: (t) => {
3068
- Ri(t), Bi(t), e({ theme: t });
3551
+ Wa(t), Ka(t), e({ theme: t });
3069
3552
  }
3070
3553
  }));
3071
- Li() && (globalThis.addEventListener("storage", (e) => {
3554
+ Va() && (globalThis.addEventListener("storage", (e) => {
3072
3555
  if (e.key !== "theme") return;
3073
- let t = Ii(e.newValue) ? e.newValue : "system";
3074
- Ri(t), Hi.setState({ theme: t });
3556
+ let t = Ba(e.newValue) ? e.newValue : "system";
3557
+ Wa(t), Ja.setState({ theme: t });
3075
3558
  }), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
3076
- Hi.getState().theme === "system" && Ri("system");
3559
+ Ja.getState().theme === "system" && Wa("system");
3077
3560
  }));
3078
3561
  // src/components/theme_toggle/theme_toggle.tsx
3079
- var Ui = {
3562
+ var Ya = {
3080
3563
  light: "i-tabler-sun text-yellow-500",
3081
3564
  dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
3082
3565
  system: "i-tabler-device-desktop text-blue-500"
3083
- }, Wi = {
3566
+ }, Xa = {
3084
3567
  light: "i-tabler-sun",
3085
3568
  dark: "i-tabler-moon-stars",
3086
3569
  system: "i-tabler-device-desktop"
3087
- }, Gi = "i-tabler-device-desktop text-gray-400", Ki = "i-tabler-device-desktop";
3088
- function qi(e, t, n) {
3570
+ }, Za = "i-tabler-device-desktop text-gray-400", Qa = "i-tabler-device-desktop";
3571
+ function $a(e, t, n) {
3089
3572
  return e ? { unstyled: !0 } : {
3090
3573
  radius: t,
3091
3574
  variant: n
3092
3575
  };
3093
3576
  }
3094
- function Ji(e, t, n) {
3095
- return n ? t ? Wi[e] : Ki : t ? Ui[e] : Gi;
3577
+ function eo(e, t, n) {
3578
+ return n ? t ? Xa[e] : Qa : t ? Ya[e] : Za;
3096
3579
  }
3097
- function Yi({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r, size: i = "md", unstyled: a = !1, radius: o, variant: c, getAriaLabel: l, tooltip: u }) {
3098
- let d = Hi((e) => e.theme), f = Hi((e) => e.setTheme), m = J(), h = Re(), g = p(null), _ = s(async () => {
3099
- let n = Pi(d), i = g.current, a = e ?? !Ai(navigator.userAgent);
3100
- i && a ? await Ni({
3580
+ function to({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r, size: i = "md", unstyled: a = !1, radius: o, variant: s, getAriaLabel: l, tooltip: u }) {
3581
+ let d = Ja((e) => e.theme), f = Ja((e) => e.setTheme), p = q(), m = qe(), g = h(null), _ = c(async () => {
3582
+ let n = Ra(d), i = g.current, a = e ?? !Pa(navigator.userAgent);
3583
+ i && a ? await La({
3101
3584
  theme: n,
3102
3585
  element: i,
3103
3586
  transitionDuration: t,
@@ -3110,11 +3593,11 @@ function Yi({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r
3110
3593
  t,
3111
3594
  r,
3112
3595
  f
3113
- ]), v = Ji(d, h, a), y = qi(a, o, c);
3114
- return /* @__PURE__ */ n(Dt, {
3596
+ ]), v = eo(d, m, a), y = $a(a, o, s);
3597
+ return /* @__PURE__ */ n(Sn, {
3115
3598
  ref: g,
3116
3599
  icon: v,
3117
- "aria-label": (l ?? m.currentTheme)(d),
3600
+ "aria-label": (l ?? p.currentTheme)(d),
3118
3601
  size: i,
3119
3602
  ...y,
3120
3603
  tooltip: u,
@@ -3124,7 +3607,7 @@ function Yi({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r
3124
3607
  });
3125
3608
  }
3126
3609
  // src/components/toolbar/toolbar_items.ts
3127
- var Xi = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Zi = [
3610
+ var no = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", ro = [
3128
3611
  "textarea",
3129
3612
  "[contenteditable]:not([contenteditable=\"false\"])",
3130
3613
  `input:not(${[
@@ -3138,48 +3621,48 @@ var Xi = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
3138
3621
  "reset",
3139
3622
  "submit"
3140
3623
  ].map((e) => `[type="${e}"]`).join(", ")})`
3141
- ].join(", "), Qi = "select, input[type=\"range\"], input[type=\"radio\"]";
3142
- function $i(e) {
3624
+ ].join(", "), io = "select, input[type=\"range\"], input[type=\"radio\"]";
3625
+ function ao(e) {
3143
3626
  return e.matches(":disabled, [aria-disabled=\"true\"]");
3144
3627
  }
3145
- function ea(e) {
3146
- return Array.from(e.querySelectorAll(Xi));
3628
+ function oo(e) {
3629
+ return Array.from(e.querySelectorAll(no));
3147
3630
  }
3148
- function ta(e) {
3149
- return ea(e).filter((e) => !$i(e));
3631
+ function so(e) {
3632
+ return oo(e).filter((e) => !ao(e));
3150
3633
  }
3151
- function na(e) {
3152
- return e instanceof HTMLElement && e.matches(`${Zi}, ${Qi}`);
3634
+ function co(e) {
3635
+ return e instanceof HTMLElement && e.matches(`${ro}, ${io}`);
3153
3636
  }
3154
3637
  // src/components/toolbar/toolbar_navigation.ts
3155
- var ra = (e, t) => (e + 1) % t, ia = (e, t) => (e - 1 + t) % t, aa = () => 0, oa = (e, t) => t - 1, sa = {
3638
+ var lo = (e, t) => (e + 1) % t, uo = (e, t) => (e - 1 + t) % t, fo = () => 0, po = (e, t) => t - 1, mo = {
3156
3639
  horizontal: {
3157
- ArrowRight: ra,
3158
- ArrowLeft: ia,
3159
- Home: aa,
3160
- End: oa
3640
+ ArrowRight: lo,
3641
+ ArrowLeft: uo,
3642
+ Home: fo,
3643
+ End: po
3161
3644
  },
3162
3645
  vertical: {
3163
- ArrowDown: ra,
3164
- ArrowUp: ia,
3165
- Home: aa,
3166
- End: oa
3646
+ ArrowDown: lo,
3647
+ ArrowUp: uo,
3648
+ Home: fo,
3649
+ End: po
3167
3650
  }
3168
3651
  };
3169
- function ca(e) {
3170
- let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = sa[n][t];
3652
+ function ho(e) {
3653
+ let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = mo[n][t];
3171
3654
  if (a && i !== 0) return a(r, i);
3172
3655
  }
3173
3656
  // src/components/toolbar/use_toolbar_roving_focus.ts
3174
- var la = ["disabled", "aria-disabled"];
3175
- function ua(e, t) {
3176
- let n = p(null), r = s(() => {
3657
+ var go = ["disabled", "aria-disabled"];
3658
+ function _o(e, t) {
3659
+ let n = h(null), r = c(() => {
3177
3660
  let t = e.current;
3178
3661
  if (!t) return;
3179
- let r = ta(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3180
- for (let e of ea(t)) e.tabIndex = e === a ? 0 : -1;
3662
+ let r = so(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3663
+ for (let e of oo(t)) e.tabIndex = e === a ? 0 : -1;
3181
3664
  }, [e]);
3182
- return l(() => {
3665
+ return u(() => {
3183
3666
  let t = e.current;
3184
3667
  if (!t) return;
3185
3668
  r();
@@ -3188,19 +3671,19 @@ function ua(e, t) {
3188
3671
  subtree: !0,
3189
3672
  childList: !0,
3190
3673
  attributes: !0,
3191
- attributeFilter: la
3674
+ attributeFilter: go
3192
3675
  }), () => n.disconnect();
3193
3676
  }, [e, r]), {
3194
3677
  handleFocus: (t) => {
3195
3678
  let i = e.current;
3196
3679
  if (!i) return;
3197
- let a = ta(i).find((e) => e === t.target);
3680
+ let a = so(i).find((e) => e === t.target);
3198
3681
  a && (n.current = a, r());
3199
3682
  },
3200
3683
  handleKeyDown: (n) => {
3201
3684
  let r = e.current;
3202
- if (!r || !r.contains(n.target) || na(n.target)) return;
3203
- let i = ta(r), a = ca({
3685
+ if (!r || !r.contains(n.target) || co(n.target)) return;
3686
+ let i = so(r), a = ho({
3204
3687
  key: n.key,
3205
3688
  orientation: t,
3206
3689
  currentPosition: i.findIndex((e) => e === n.target),
@@ -3211,18 +3694,18 @@ function ua(e, t) {
3211
3694
  };
3212
3695
  }
3213
3696
  // src/components/toolbar/toolbar.tsx
3214
- var da = {
3697
+ var vo = {
3215
3698
  horizontal: "flex items-center gap-1",
3216
3699
  vertical: "flex flex-col items-stretch gap-1"
3217
3700
  };
3218
- function fa(t) {
3219
- let { orientation: r = "horizontal", unstyled: i = !1, className: a, ref: o, onFocus: s, onKeyDown: c, ...l } = t, u = p(null), { handleFocus: d, handleKeyDown: f } = ua(u, r);
3701
+ function yo(t) {
3702
+ let { orientation: r = "horizontal", unstyled: i = !1, className: a, ref: o, onFocus: s, onKeyDown: c, ...l } = t, u = h(null), { handleFocus: d, handleKeyDown: f } = _o(u, r);
3220
3703
  return /* @__PURE__ */ n("div", {
3221
3704
  ...l,
3222
- ref: je(u, o),
3705
+ ref: $(u, o),
3223
3706
  role: "toolbar",
3224
3707
  "aria-orientation": r,
3225
- className: e(!i && da[r], a),
3708
+ className: e(!i && vo[r], a),
3226
3709
  onFocus: (e) => {
3227
3710
  d(e), s?.(e);
3228
3711
  },
@@ -3232,11 +3715,11 @@ function fa(t) {
3232
3715
  });
3233
3716
  }
3234
3717
  // src/components/ui_provider/french_ui_labels.ts
3235
- var pa = {
3718
+ var bo = {
3236
3719
  light: "clair",
3237
3720
  dark: "sombre",
3238
3721
  system: "système"
3239
- }, ma = {
3722
+ }, xo = {
3240
3723
  close: "Fermer",
3241
3724
  confirm: "Confirmer",
3242
3725
  cancel: "Annuler",
@@ -3249,33 +3732,45 @@ var pa = {
3249
3732
  loading: "Chargement",
3250
3733
  copy: "Copier",
3251
3734
  charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
3252
- currentTheme: (e) => `Thème actuel : ${pa[e]}`,
3735
+ currentTheme: (e) => `Thème actuel : ${bo[e]}`,
3253
3736
  overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
3254
3737
  selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
3255
3738
  maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
3256
3739
  };
3257
3740
  // src/components/ui_provider/ui_provider.tsx
3258
- function ha(e = {}) {
3741
+ function So(e = {}) {
3259
3742
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
3260
3743
  }
3261
- function ga({ labels: e, announceFieldErrors: t, children: r }) {
3262
- let i = c(q), a = Ce(), o = f(() => ({
3744
+ function Co({ labels: e, announceFieldErrors: t, children: r }) {
3745
+ let i = l(K), a = Ee(), o = m(() => ({
3263
3746
  ...i,
3264
- ...ha(e)
3747
+ ...So(e)
3265
3748
  }), [i, e]);
3266
- return /* @__PURE__ */ n(q.Provider, {
3749
+ return /* @__PURE__ */ n(K.Provider, {
3267
3750
  value: o,
3268
- children: /* @__PURE__ */ n(Se.Provider, {
3751
+ children: /* @__PURE__ */ n(Te.Provider, {
3269
3752
  value: t ?? a,
3270
3753
  children: r
3271
3754
  })
3272
3755
  });
3273
3756
  }
3274
3757
  // src/hooks/use_is_client/with_client_only.tsx
3275
- var _a = (e) => {
3758
+ var wo = (e) => {
3276
3759
  function t(t) {
3277
- return Re() ? /* @__PURE__ */ n(e, { ...t }) : null;
3760
+ return qe() ? /* @__PURE__ */ n(e, { ...t }) : null;
3278
3761
  }
3279
3762
  return t;
3280
- }, va = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(Fi)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d)})()`;
3281
- export { j as AppBar, te as Avatar, he as BASE_INPUT_STYLES, re as Badge, Y as Button, ce as Card, Z as CharacterCount, Ne as Checkbox, Le as CheckboxOptions, ze as ClientOnly, Ke as Combobox, mr as ConfirmModal, ft as ContextMenu, jt as CopyButton, Pn as Drawer, ma as FRENCH_UI_LABELS, Ft as Highlight, Dt as IconButton, Ln as Input, zn as Kbd, Hn as Menu, Un as MenuGroup, ir as MenuItem, ar as MenuSeparator, gr as Modal, _r as ModalFooter, yr as ModalProvider, Dr as MultiCombobox, kr as RadioOptions, Ar as Select, Vr as Spinner, Ir as SplitButton, Hr as Switch, va as THEME_INIT_SCRIPT, Ti as Tabs, Ei as Textarea, Yi as ThemeToggle, fa as Toolbar, Ct as Tooltip, ga as UIProvider, K as buttonClassName, Mt as splitIntoHighlightSegments, An as useDisableHotkeysWhileMounted, vr as useDismissGuard, On as useGlobalHotkeysStore, Re as useIsClient, Hi as useThemeStore, _a as withClientOnly };
3763
+ }, To = "a scroll region needs an accessible name. Provide a non-empty `label` or `labelledBy`.";
3764
+ function Eo(e) {
3765
+ let { ref: t, scrollableProps: n, focusClassName: r } = ir(e);
3766
+ return Ie("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(), To), {
3767
+ scrollableProps: {
3768
+ ref: t,
3769
+ ...n
3770
+ },
3771
+ focusClassName: r
3772
+ };
3773
+ }
3774
+ // src/stores/theme_store/theme_init_script.ts
3775
+ var Do = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(za)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d);var m=document.querySelectorAll('meta[name="theme-color"][data-light][data-dark]');for(var i=0;i<m.length;i++){m[i].setAttribute("content",m[i].getAttribute(d?"data-dark":"data-light"))}})()`;
3776
+ export { N as AppBar, ie as Avatar, ve as BASE_INPUT_STYLES, oe as Badge, J as Button, fe as Card, Z as CharacterCount, He as Checkbox, Ke as CheckboxOptions, Je as ClientOnly, Bt as Combobox, mi as ConfirmModal, sn as ContextMenu, En as CopyButton, Mr as Drawer, xo as FRENCH_UI_LABELS, An as Highlight, Sn as IconButton, Fr as Input, Lr as Kbd, Br as Menu, Vr as MenuGroup, ni as MenuItem, ri as MenuSeparator, gi as Modal, _i as ModalFooter, yi as ModalProvider, Oi as MultiCombobox, Ai as RadioOptions, ji as Select, Hi as Spinner, Li as SplitButton, Ki as Switch, Do as THEME_INIT_SCRIPT, ka as Tabs, Aa as Textarea, to as ThemeToggle, yo as Toolbar, vn as Tooltip, Co as UIProvider, ce as buttonClassName, _r as dismissTopmostModal, Dn as splitIntoHighlightSegments, Or as useDisableHotkeysWhileMounted, vi as useDismissGuard, Er as useGlobalHotkeysStore, qe as useIsClient, Eo as useKeyboardScrollable, Ja as useThemeStore, wo as withClientOnly };