@moondreamsdev/dreamer-ui 1.7.7-test.13 → 1.7.7-test.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/Toast-BnDLmjXs.cjs +2 -0
  2. package/dist/Toast-BnDLmjXs.cjs.map +1 -0
  3. package/dist/{Toast-cdFf2Gbf.js → Toast-Dux71f5k.js} +55 -53
  4. package/dist/Toast-Dux71f5k.js.map +1 -0
  5. package/dist/components.cjs.js +1 -1
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.esm.js +1255 -801
  8. package/dist/components.esm.js.map +1 -1
  9. package/dist/providers.cjs.js +1 -1
  10. package/dist/providers.esm.js +1 -1
  11. package/dist/src/components/accordion/AccordionItem.d.ts +0 -1
  12. package/dist/src/components/clickable/Clickable.d.ts +0 -1
  13. package/dist/src/components/index.d.ts +2 -0
  14. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
  15. package/dist/src/components/scroll-area/ScrollArea.d.ts +1 -1
  16. package/dist/src/components/scroll-area/hooks.d.ts +0 -1
  17. package/dist/src/components/select/Select.d.ts +22 -0
  18. package/dist/src/components/select/hooks.d.ts +35 -0
  19. package/dist/src/components/select/index.d.ts +2 -0
  20. package/dist/src/components/select/variants.d.ts +15 -0
  21. package/dist/src/components/tabs/TabsContent.d.ts +0 -1
  22. package/dist/src/components/tabs/TabsContext.d.ts +0 -1
  23. package/dist/src/components/tabs/TabsList.d.ts +0 -1
  24. package/dist/src/components/tabs/TabsTrigger.d.ts +0 -1
  25. package/dist/src/components/tooltip/hooks.d.ts +0 -1
  26. package/dist/src/hooks/useActionModal.d.ts +0 -1
  27. package/dist/src/hooks/useToast.d.ts +0 -1
  28. package/dist/src/symbols/index.d.ts +0 -1
  29. package/package.json +3 -3
  30. package/dist/Toast-BabLpwoU.cjs +0 -2
  31. package/dist/Toast-BabLpwoU.cjs.map +0 -1
  32. package/dist/Toast-cdFf2Gbf.js.map +0 -1
@@ -1,55 +1,55 @@
1
- import { jsxs as C, jsx as c, Fragment as O } from "react/jsx-runtime";
2
- import j, { useId as z, useState as A, createElement as le, useEffect as $, useCallback as I, useMemo as ee, useRef as F, isValidElement as ue, cloneElement as fe } from "react";
3
- import { join as w } from "./utils.esm.js";
4
- import { d as me, C as be, a as he, g as pe, E as ge, Q as ve, b as ye, e as we, f as xe, c as Ne } from "./QuestionMarkCircled-CY81euqP.js";
5
- import { n as L, a as Ee, u as te } from "./Toast-cdFf2Gbf.js";
6
- import { A as Rt, T as zt } from "./Toast-cdFf2Gbf.js";
7
- import { E as Ce, X as ce } from "./X-CIoyLewf.js";
8
- import { createPortal as re } from "react-dom";
9
- function Z({
10
- id: n,
11
- title: o,
1
+ import { jsxs as T, jsx as c, Fragment as ne } from "react/jsx-runtime";
2
+ import W, { useId as F, useState as k, createElement as be, useEffect as $, useCallback as C, useMemo as Q, useRef as V, isValidElement as we, cloneElement as xe } from "react";
3
+ import { join as x } from "./utils.esm.js";
4
+ import { d as he, C as ve, a as Ne, g as Ee, E as Te, Q as Ae, b as ke, e as Ie, f as Ce, c as $e } from "./QuestionMarkCircled-CY81euqP.js";
5
+ import { n as R, a as De, u as ae } from "./Toast-Dux71f5k.js";
6
+ import { A as Wt, T as Ut } from "./Toast-Dux71f5k.js";
7
+ import { E as ze, X as oe } from "./X-CIoyLewf.js";
8
+ import { createPortal as se } from "react-dom";
9
+ function ee({
10
+ id: r,
11
+ title: a,
12
12
  content: t,
13
- children: a,
13
+ children: n,
14
14
  className: e = "",
15
- disabled: r = !1,
15
+ disabled: o = !1,
16
16
  isOpen: s = !1,
17
17
  onToggle: i,
18
18
  triggerClassName: u = "",
19
19
  bodyClassName: d = ""
20
20
  }) {
21
- const m = z(), l = n || `accordion-item-${m}`, g = `${l}-header`, f = `${l}-panel`, b = () => {
22
- !r && i && i();
23
- }, v = (h) => {
24
- (h.key === "Enter" || h.key === " ") && (h.preventDefault(), b());
21
+ const f = F(), l = r || `accordion-item-${f}`, b = `${l}-header`, m = `${l}-panel`, v = () => {
22
+ !o && i && i();
23
+ }, h = (p) => {
24
+ (p.key === "Enter" || p.key === " ") && (p.preventDefault(), v());
25
25
  };
26
- return /* @__PURE__ */ C("div", { className: w("border-b border-gray-200", r && "opacity-60 cursor-not-allowed", e), children: [
27
- /* @__PURE__ */ C(
26
+ return /* @__PURE__ */ T("div", { className: x("border-b border-gray-200", o && "opacity-60 cursor-not-allowed", e), children: [
27
+ /* @__PURE__ */ T(
28
28
  "button",
29
29
  {
30
- id: g,
30
+ id: b,
31
31
  type: "button",
32
- className: w(
32
+ className: x(
33
33
  "w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary",
34
- r ? "cursor-not-allowed" : "hover:bg-gray-50/10 cursor-pointer",
34
+ o ? "cursor-not-allowed" : "hover:bg-gray-50/10 cursor-pointer",
35
35
  u
36
36
  ),
37
37
  "aria-expanded": s,
38
- "aria-controls": f,
39
- disabled: r,
40
- onClick: b,
41
- onKeyDown: v,
38
+ "aria-controls": m,
39
+ disabled: o,
40
+ onClick: v,
41
+ onKeyDown: h,
42
42
  children: [
43
- /* @__PURE__ */ c("span", { children: o }),
43
+ /* @__PURE__ */ c("span", { children: a }),
44
44
  /* @__PURE__ */ c(
45
45
  "span",
46
46
  {
47
- className: w(
47
+ className: x(
48
48
  "transform transition-transform duration-300 ease-linear",
49
49
  s ? "rotate-180" : "rotate-0"
50
50
  ),
51
51
  "aria-hidden": "true",
52
- children: /* @__PURE__ */ c(me, { size: 18 })
52
+ children: /* @__PURE__ */ c(he, { size: 18 })
53
53
  }
54
54
  )
55
55
  ]
@@ -58,69 +58,69 @@ function Z({
58
58
  /* @__PURE__ */ c(
59
59
  "div",
60
60
  {
61
- id: f,
61
+ id: m,
62
62
  role: "region",
63
- "aria-labelledby": g,
64
- className: w(
63
+ "aria-labelledby": b,
64
+ className: x(
65
65
  "transition-all duration-300 ease-linear px-4",
66
66
  s ? "max-h-96 opacity-100 overflow-auto py-3" : "max-h-0 opacity-0 overflow-hidden",
67
67
  d
68
68
  ),
69
- children: s && (a || t)
69
+ children: s && (n || t)
70
70
  }
71
71
  )
72
72
  ] });
73
73
  }
74
- function dt({
75
- id: n,
76
- items: o = [],
74
+ function xt({
75
+ id: r,
76
+ items: a = [],
77
77
  children: t,
78
- className: a = "",
78
+ className: n = "",
79
79
  itemClassName: e = "",
80
- allowMultiple: r = !1,
80
+ allowMultiple: o = !1,
81
81
  defaultOpenItems: s = [],
82
82
  triggersClassName: i = "",
83
83
  bodiesClassName: u = ""
84
84
  }) {
85
- const d = z(), m = n || `accordion-group-${d}`, [l, g] = A(new Set(s)), f = (h) => {
86
- g((y) => {
87
- const p = new Set(y);
88
- return p.has(h) ? p.delete(h) : (r || p.clear(), p.add(h)), p;
85
+ const d = F(), f = r || `accordion-group-${d}`, [l, b] = k(new Set(s)), m = (p) => {
86
+ b((y) => {
87
+ const g = new Set(y);
88
+ return g.has(p) ? g.delete(p) : (o || g.clear(), g.add(p)), g;
89
89
  });
90
- }, b = (h) => `${d}-item-${h}`, v = (h) => l.has(h);
91
- return /* @__PURE__ */ C("div", { id: m, className: a, children: [
92
- o.length > 0 && o.map((h, y) => {
93
- const p = h.id || b(y);
90
+ }, v = (p) => `${d}-item-${p}`, h = (p) => l.has(p);
91
+ return /* @__PURE__ */ T("div", { id: f, className: n, children: [
92
+ a.length > 0 && a.map((p, y) => {
93
+ const g = p.id || v(y);
94
94
  return /* @__PURE__ */ c(
95
- Z,
95
+ ee,
96
96
  {
97
- id: p,
98
- title: h.title,
99
- content: h.content,
100
- disabled: h.disabled,
101
- isOpen: v(p),
102
- onToggle: () => f(p),
97
+ id: g,
98
+ title: p.title,
99
+ content: p.content,
100
+ disabled: p.disabled,
101
+ isOpen: h(g),
102
+ onToggle: () => m(g),
103
103
  className: e,
104
104
  triggerClassName: i,
105
105
  bodyClassName: u
106
106
  },
107
- p
107
+ g
108
108
  );
109
109
  }),
110
- o.length === 0 && t && j.Children.map(t, (h, y) => {
111
- if (j.isValidElement(h) && h.type === Z) {
112
- const p = h.props.id || b(y);
113
- return /* @__PURE__ */ le(
114
- Z,
110
+ a.length === 0 && t && W.Children.map(t, (p, y) => {
111
+ if (W.isValidElement(p) && p.type === ee) {
112
+ const g = p.props.id || v(y);
113
+ return /* @__PURE__ */ be(
114
+ ee,
115
115
  {
116
- ...h.props,
117
- key: p,
118
- id: p,
119
- className: w(e, h.props.className),
120
- isOpen: v(p),
121
- onToggle: () => f(p),
122
- triggerClassName: w(i, h.props.triggerClassName),
123
- bodyClassName: w(u, h.props.bodyClassName)
116
+ ...p.props,
117
+ key: g,
118
+ id: g,
119
+ className: x(e, p.props.className),
120
+ isOpen: h(g),
121
+ onToggle: () => m(g),
122
+ triggerClassName: x(i, p.props.triggerClassName),
123
+ bodyClassName: x(u, p.props.bodyClassName)
124
124
  }
125
125
  );
126
126
  }
@@ -128,25 +128,25 @@ function dt({
128
128
  })
129
129
  ] });
130
130
  }
131
- function Ae() {
132
- const [n, o] = A(0);
131
+ function Re() {
132
+ const [r, a] = k(0);
133
133
  return $(() => {
134
134
  const t = setInterval(() => {
135
- o((a) => (a + 1) % 3);
135
+ a((n) => (n + 1) % 3);
136
136
  }, 500);
137
137
  return () => clearInterval(t);
138
138
  }, []), /* @__PURE__ */ c("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((t) => /* @__PURE__ */ c(
139
139
  "div",
140
140
  {
141
- className: w(
141
+ className: x(
142
142
  "rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
143
- n === t && "transform -translate-y-1"
143
+ r === t && "transform -translate-y-1"
144
144
  )
145
145
  },
146
146
  t
147
147
  )) });
148
148
  }
149
- const Ie = {
149
+ const Se = {
150
150
  base: "",
151
151
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
152
152
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -154,7 +154,7 @@ const Ie = {
154
154
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
155
155
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
156
156
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
157
- }, ke = {
157
+ }, Le = {
158
158
  stripped: "",
159
159
  fitted: "size-fit",
160
160
  sm: "px-2 py-1 text-sm",
@@ -162,60 +162,60 @@ const Ie = {
162
162
  lg: "px-6 py-3 text-lg",
163
163
  icon: "p-1 w-fit aspect-square",
164
164
  full: "p-2 w-full"
165
- }, Te = {
165
+ }, Ve = {
166
166
  none: "rounded-none",
167
167
  sm: "rounded-sm",
168
168
  md: "rounded-md",
169
169
  lg: "rounded-lg",
170
170
  full: "rounded-full"
171
- }, J = {
171
+ }, te = {
172
172
  variant: "primary",
173
173
  size: "md",
174
174
  rounded: "md"
175
175
  };
176
- function $e({
177
- variant: n = J.variant,
178
- size: o,
179
- rounded: t = J.rounded,
180
- loading: a,
176
+ function Be({
177
+ variant: r = te.variant,
178
+ size: a,
179
+ rounded: t = te.rounded,
180
+ loading: n,
181
181
  linkTo: e,
182
- linkProps: r,
182
+ linkProps: o,
183
183
  type: s = "button",
184
184
  className: i,
185
185
  ...u
186
186
  }) {
187
187
  let d;
188
- n === "link" && !o ? d = "fitted" : d = o || J.size;
189
- const l = w(
188
+ r === "link" && !a ? d = "fitted" : d = a || te.size;
189
+ const l = x(
190
190
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
191
- Ie[n],
192
- ke[d],
193
- Te[t],
194
- a && "relative pointer-events-none",
191
+ Se[r],
192
+ Le[d],
193
+ Ve[t],
194
+ n && "relative pointer-events-none",
195
195
  e && "relative",
196
196
  i
197
197
  );
198
- return /* @__PURE__ */ C(
198
+ return /* @__PURE__ */ T(
199
199
  "button",
200
200
  {
201
201
  ...u,
202
202
  role: e ? "link" : u.role,
203
- "aria-label": u["aria-label"] || (r == null ? void 0 : r["aria-label"]),
204
- "aria-description": u["aria-description"] || (r == null ? void 0 : r["aria-description"]),
205
- "aria-disabled": u.disabled || a,
206
- "aria-busy": a,
203
+ "aria-label": u["aria-label"] || (o == null ? void 0 : o["aria-label"]),
204
+ "aria-description": u["aria-description"] || (o == null ? void 0 : o["aria-description"]),
205
+ "aria-disabled": u.disabled || n,
206
+ "aria-busy": n,
207
207
  type: s,
208
208
  className: l,
209
209
  children: [
210
- a && /* @__PURE__ */ c(Ae, {}),
211
- /* @__PURE__ */ c("span", { className: w(a && "invisible"), children: u.children }),
210
+ n && /* @__PURE__ */ c(Re, {}),
211
+ /* @__PURE__ */ c("span", { className: x(n && "invisible"), children: u.children }),
212
212
  e && !u.disabled && /* @__PURE__ */ c(
213
213
  "a",
214
214
  {
215
- ...r,
215
+ ...o,
216
216
  "aria-hidden": !0,
217
217
  href: e,
218
- rel: (r == null ? void 0 : r.rel) || "noreferrer",
218
+ rel: (o == null ? void 0 : o.rel) || "noreferrer",
219
219
  className: "absolute inset-0"
220
220
  }
221
221
  )
@@ -223,47 +223,47 @@ function $e({
223
223
  }
224
224
  );
225
225
  }
226
- function De(n) {
227
- const [o, t] = A(""), a = I((e) => {
228
- let r = e, s = "";
229
- for (; r && !s; ) {
230
- const i = window.getComputedStyle(r).backgroundColor;
231
- i && i !== "transparent" && i !== "rgba(0, 0, 0, 0)" && (s = i), r = r.parentElement;
226
+ function He(r) {
227
+ const [a, t] = k(""), n = C((e) => {
228
+ let o = e, s = "";
229
+ for (; o && !s; ) {
230
+ const i = window.getComputedStyle(o).backgroundColor;
231
+ i && i !== "transparent" && i !== "rgba(0, 0, 0, 0)" && (s = i), o = o.parentElement;
232
232
  }
233
233
  return s || "transparent";
234
234
  }, []);
235
235
  return $(() => {
236
- const e = document.getElementById(n);
236
+ const e = document.getElementById(r);
237
237
  if (e) {
238
- const r = a(e.parentElement);
239
- t(r);
238
+ const o = n(e.parentElement);
239
+ t(o);
240
240
  }
241
- }, [n, a]), o;
241
+ }, [r, n]), a;
242
242
  }
243
- function ut({
244
- ref: n,
245
- id: o,
243
+ function Nt({
244
+ ref: r,
245
+ id: a,
246
246
  size: t = 20,
247
- color: a,
247
+ color: n,
248
248
  filled: e = !1,
249
- rounded: r = !0,
249
+ rounded: o = !0,
250
250
  checked: s = !1,
251
251
  onCheckedChange: i,
252
252
  disabled: u,
253
253
  className: d = "",
254
- ...m
254
+ ...f
255
255
  }) {
256
- const l = z(), g = ee(() => o || `checkbox-${l}`, [o, l]), f = De(g), [b, v] = A(s);
256
+ const l = F(), b = Q(() => a || `checkbox-${l}`, [a, l]), m = He(b), [v, h] = k(s);
257
257
  $(() => {
258
- v(s);
258
+ h(s);
259
259
  }, [s]);
260
- const h = () => {
261
- u || (v(!b), i == null || i(!b));
262
- }, y = (x) => {
263
- x.key === " " && (x.preventDefault(), h());
264
- }, p = w(
260
+ const p = () => {
261
+ u || (h(!v), i == null || i(!v));
262
+ }, y = (w) => {
263
+ w.key === " " && (w.preventDefault(), p());
264
+ }, g = x(
265
265
  "flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",
266
- r && "rounded",
266
+ o && "rounded",
267
267
  u && "opacity-40 cursor-not-allowed",
268
268
  !u && "cursor-pointer",
269
269
  d
@@ -271,175 +271,175 @@ function ut({
271
271
  return /* @__PURE__ */ c(
272
272
  "button",
273
273
  {
274
- id: g,
274
+ id: b,
275
275
  type: "button",
276
- ref: n,
276
+ ref: r,
277
277
  tabIndex: 0,
278
278
  role: "checkbox",
279
- onClick: h,
280
- "aria-checked": b,
279
+ onClick: p,
280
+ "aria-checked": v,
281
281
  "aria-disabled": u,
282
282
  onKeyDownCapture: y,
283
283
  style: {
284
284
  width: t,
285
285
  height: t,
286
- color: a,
287
- backgroundColor: b && e ? "currentcolor" : "transparent"
286
+ color: n,
287
+ backgroundColor: v && e ? "currentcolor" : "transparent"
288
288
  },
289
- className: p,
290
- ...m,
291
- children: b && /* @__PURE__ */ c(be, { size: t, color: e ? f : void 0 })
289
+ className: g,
290
+ ...f,
291
+ children: v && /* @__PURE__ */ c(ve, { size: t, color: e ? m : void 0 })
292
292
  }
293
293
  );
294
294
  }
295
- function ft({
296
- children: n,
297
- className: o,
295
+ function Et({
296
+ children: r,
297
+ className: a,
298
298
  linkTo: t,
299
- linkProps: a,
299
+ linkProps: n,
300
300
  onButtonClick: e,
301
- buttonProps: r,
301
+ buttonProps: o,
302
302
  ...s
303
303
  }) {
304
- return t && e && console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'), /* @__PURE__ */ C("div", { className: w("relative w-fit", o), ...s, children: [
305
- n,
304
+ return t && e && console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'), /* @__PURE__ */ T("div", { className: x("relative w-fit", a), ...s, children: [
305
+ r,
306
306
  t && /* @__PURE__ */ c(
307
307
  "a",
308
308
  {
309
- ...a,
310
- rel: (a == null ? void 0 : a.rel) || "noreferrer",
309
+ ...n,
310
+ rel: (n == null ? void 0 : n.rel) || "noreferrer",
311
311
  href: t,
312
- className: w("absolute inset-0", a == null ? void 0 : a.className)
312
+ className: x("absolute inset-0", n == null ? void 0 : n.className)
313
313
  }
314
314
  ),
315
315
  !t && e && /* @__PURE__ */ c(
316
316
  "button",
317
317
  {
318
- ...r,
318
+ ...o,
319
319
  type: "button",
320
320
  onClick: e,
321
- className: w("absolute inset-0 cursor-pointer", r == null ? void 0 : r.className)
321
+ className: x("absolute inset-0 cursor-pointer", o == null ? void 0 : o.className)
322
322
  }
323
323
  )
324
324
  ] });
325
325
  }
326
- function Q({ elementId: n, type: o, message: t }) {
326
+ function Y({ elementId: r, type: a, message: t }) {
327
327
  return $(() => {
328
- const a = document.getElementById(n);
329
- if (a) {
330
- if (!t && o === "error") {
331
- a.removeAttribute("data-error");
328
+ const n = document.getElementById(r);
329
+ if (n) {
330
+ if (!t && a === "error") {
331
+ n.removeAttribute("data-error");
332
332
  return;
333
333
  }
334
- if (!t && o === "success") {
335
- a.removeAttribute("data-success");
334
+ if (!t && a === "success") {
335
+ n.removeAttribute("data-success");
336
336
  return;
337
337
  }
338
- return a.setAttribute("aria-describedby", `${n}-${o}-message`), a.setAttribute("aria-invalid", o === "error" ? "true" : "false"), o === "error" && a.setAttribute("data-error", "true"), o === "success" && a.setAttribute("data-success", "true"), () => {
339
- a.removeAttribute("aria-describedby"), a.removeAttribute("aria-invalid"), a.removeAttribute("data-error"), a.removeAttribute("data-success");
338
+ return n.setAttribute("aria-describedby", `${r}-${a}-message`), n.setAttribute("aria-invalid", a === "error" ? "true" : "false"), a === "error" && n.setAttribute("data-error", "true"), a === "success" && n.setAttribute("data-success", "true"), () => {
339
+ n.removeAttribute("aria-describedby"), n.removeAttribute("aria-invalid"), n.removeAttribute("data-error"), n.removeAttribute("data-success");
340
340
  };
341
341
  }
342
- }, [n, o, t]), t ? /* @__PURE__ */ C(
342
+ }, [r, a, t]), t ? /* @__PURE__ */ T(
343
343
  "small",
344
344
  {
345
- className: w(
345
+ className: x(
346
346
  "mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",
347
- o === "error" && "text-destructive",
348
- o === "success" && "text-success"
347
+ a === "error" && "text-destructive",
348
+ a === "success" && "text-success"
349
349
  ),
350
350
  role: "status",
351
351
  children: [
352
- o === "error" ? /* @__PURE__ */ c(Ce, {}) : /* @__PURE__ */ c(he, {}),
353
- /* @__PURE__ */ c("span", { id: `${n}-${o}-message`, children: t })
352
+ a === "error" ? /* @__PURE__ */ c(ze, {}) : /* @__PURE__ */ c(Ne, {}),
353
+ /* @__PURE__ */ c("span", { id: `${r}-${a}-message`, children: t })
354
354
  ]
355
355
  }
356
356
  ) : null;
357
357
  }
358
- const Le = {
358
+ const Fe = {
359
359
  base: "",
360
360
  default: "ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success",
361
361
  underline: "border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",
362
362
  outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"
363
- }, Re = {
363
+ }, je = {
364
364
  none: "rounded-none",
365
365
  sm: "rounded-sm",
366
366
  md: "rounded-md",
367
367
  lg: "rounded-lg",
368
368
  full: "px-3 rounded-full"
369
- }, ne = {
369
+ }, le = {
370
370
  variant: "default",
371
371
  rounded: "none"
372
372
  };
373
- function mt({
374
- variant: n = ne.variant,
375
- rounded: o,
373
+ function Tt({
374
+ variant: r = le.variant,
375
+ rounded: a,
376
376
  displayOnlyMode: t = !1,
377
- errorMessage: a,
377
+ errorMessage: n,
378
378
  successMessage: e,
379
- type: r = "text",
379
+ type: o = "text",
380
380
  className: s,
381
381
  ...i
382
382
  }) {
383
- const u = z(), [d, m] = A(!1);
384
- let l = o;
385
- n === "outline" && !o && (l = "md"), l = l || ne.rounded;
386
- const b = w(
383
+ const u = F(), [d, f] = k(!1);
384
+ let l = a;
385
+ r === "outline" && !a && (l = "md"), l = l || le.rounded;
386
+ const v = x(
387
387
  "appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
388
388
  "file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",
389
- !t && Le[n],
390
- !t && Re[l],
391
- r === "password" && "pr-10",
389
+ !t && Fe[r],
390
+ !t && je[l],
391
+ o === "password" && "pr-10",
392
392
  !t && "px-2 py-1",
393
393
  t && "pointer-events-none",
394
394
  s
395
395
  );
396
- return /* @__PURE__ */ C("div", { className: w(t && "cursor-text"), style: { height: i.height, width: i.width }, children: [
397
- /* @__PURE__ */ C("div", { className: w(r === "password" && "relative"), children: [
396
+ return /* @__PURE__ */ T("div", { className: x(t && "cursor-text"), style: { height: i.height, width: i.width }, children: [
397
+ /* @__PURE__ */ T("div", { className: x(o === "password" && "relative"), children: [
398
398
  /* @__PURE__ */ c(
399
399
  "input",
400
400
  {
401
401
  ...i,
402
402
  id: u,
403
- type: r === "password" && d ? "text" : r,
403
+ type: o === "password" && d ? "text" : o,
404
404
  "aria-disabled": i.disabled,
405
405
  readOnly: t,
406
406
  "aria-readonly": t || i["aria-readonly"],
407
- "data-error": a ? !0 : void 0,
407
+ "data-error": n ? !0 : void 0,
408
408
  "data-success": e ? !0 : void 0,
409
- className: b
409
+ className: v
410
410
  }
411
411
  ),
412
- r === "password" && /* @__PURE__ */ c(
412
+ o === "password" && /* @__PURE__ */ c(
413
413
  "button",
414
414
  {
415
- onClick: () => m(!d),
415
+ onClick: () => f(!d),
416
416
  className: "absolute inset-y-0 right-0 px-2 hover:cursor-pointer",
417
417
  "aria-label": "Toggle password visibility",
418
418
  "data-state": d ? "visible" : "hidden",
419
- children: d ? /* @__PURE__ */ c(pe, { size: 20 }) : /* @__PURE__ */ c(ge, { size: 20 })
419
+ children: d ? /* @__PURE__ */ c(Ee, { size: 20 }) : /* @__PURE__ */ c(Te, { size: 20 })
420
420
  }
421
421
  )
422
422
  ] }),
423
- !t && /* @__PURE__ */ c(Q, { elementId: u, type: "error", message: a }),
424
- !t && /* @__PURE__ */ c(Q, { elementId: u, type: "success", message: e })
423
+ !t && /* @__PURE__ */ c(Y, { elementId: u, type: "error", message: n }),
424
+ !t && /* @__PURE__ */ c(Y, { elementId: u, type: "success", message: e })
425
425
  ] });
426
426
  }
427
- function bt({
428
- display: n = "inline",
429
- width: o = "fit-content",
427
+ function At({
428
+ display: r = "inline",
429
+ width: a = "fit-content",
430
430
  className: t = "",
431
- required: a,
431
+ required: n,
432
432
  helpMessage: e,
433
- suffix: r,
433
+ suffix: o,
434
434
  htmlFor: s,
435
435
  children: i,
436
436
  ...u
437
437
  }) {
438
- const d = z(), m = w("font-medium", n, t), l = e ? `${s ?? d}-help` : void 0;
439
- return /* @__PURE__ */ C("div", { style: { display: n === "inline" ? "inline-flex" : "flex", width: o }, className: "relative", children: [
440
- /* @__PURE__ */ C("label", { className: m, htmlFor: s, ...u, children: [
438
+ const d = F(), f = x("font-medium", r, t), l = e ? `${s ?? d}-help` : void 0;
439
+ return /* @__PURE__ */ T("div", { style: { display: r === "inline" ? "inline-flex" : "flex", width: a }, className: "relative", children: [
440
+ /* @__PURE__ */ T("label", { className: f, htmlFor: s, ...u, children: [
441
441
  i,
442
- a && /* @__PURE__ */ c("span", { className: "text-red-500 font-medium ml-1", "aria-label": "required", children: "*" })
442
+ n && /* @__PURE__ */ c("span", { className: "text-red-500 font-medium ml-1", "aria-label": "required", children: "*" })
443
443
  ] }),
444
444
  e && /* @__PURE__ */ c(
445
445
  "span",
@@ -448,36 +448,36 @@ function bt({
448
448
  "aria-describedby": l,
449
449
  "aria-label": "Help information",
450
450
  title: e,
451
- children: /* @__PURE__ */ c(ve, {})
451
+ children: /* @__PURE__ */ c(Ae, {})
452
452
  }
453
453
  ),
454
454
  e && /* @__PURE__ */ c("div", { id: l, className: "sr-only", children: e }),
455
- r && /* @__PURE__ */ c("span", { className: "ml-1", children: r })
455
+ o && /* @__PURE__ */ c("span", { className: "ml-1", children: o })
456
456
  ] });
457
457
  }
458
- function ze(n) {
459
- const [o, t] = A(!1), [a, e] = A(!1);
458
+ function Ke(r) {
459
+ const [a, t] = k(!1), [n, e] = k(!1);
460
460
  return $(() => {
461
- n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));
462
- }, [n]), { show: o, shouldRender: a };
461
+ r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));
462
+ }, [r]), { show: a, shouldRender: n };
463
463
  }
464
- function Ve(n, o) {
464
+ function Pe(r, a) {
465
465
  $(() => {
466
- const t = (a) => {
467
- a.key === "Escape" && n && o();
466
+ const t = (n) => {
467
+ n.key === "Escape" && r && a();
468
468
  };
469
- return document.addEventListener("keydown", t), n && (document.body.style.overflow = "hidden"), () => {
469
+ return document.addEventListener("keydown", t), r && (document.body.style.overflow = "hidden"), () => {
470
470
  document.removeEventListener("keydown", t), document.body.style.overflow = "auto";
471
471
  };
472
- }, [n, o]);
472
+ }, [r, a]);
473
473
  }
474
- function Be(n, o) {
475
- const t = F(null), a = I(() => {
476
- const e = document.getElementById(n);
474
+ function Ge(r, a) {
475
+ const t = V(null), n = C(() => {
476
+ const e = document.getElementById(r);
477
477
  if (!e) return;
478
- const r = e.querySelectorAll('[data-modal-action="true"]');
479
- if (r.length > 0) {
480
- r[0].focus();
478
+ const o = e.querySelectorAll('[data-modal-action="true"]');
479
+ if (o.length > 0) {
480
+ o[0].focus();
481
481
  return;
482
482
  }
483
483
  const s = e.querySelectorAll(
@@ -493,60 +493,60 @@ function Be(n, o) {
493
493
  return;
494
494
  }
495
495
  e.focus();
496
- }, [n]);
497
- $(() => (o && (t.current = document.activeElement, a()), () => {
496
+ }, [r]);
497
+ $(() => (a && (t.current = document.activeElement, n()), () => {
498
498
  document.body.style.overflow = "auto", t.current instanceof HTMLElement && t.current.focus();
499
- }), [o, a]);
499
+ }), [a, n]);
500
500
  }
501
- function ht({
502
- id: n,
503
- isOpen: o,
501
+ function kt({
502
+ id: r,
503
+ isOpen: a,
504
504
  onClose: t,
505
- title: a,
505
+ title: n,
506
506
  children: e,
507
- contentOnly: r = !1,
507
+ contentOnly: o = !1,
508
508
  className: s,
509
509
  overlayClassName: i,
510
510
  hideCloseButton: u = !1,
511
511
  actions: d = [],
512
- disableCloseOnOverlayClick: m = !1,
512
+ disableCloseOnOverlayClick: f = !1,
513
513
  ariaLabelledBy: l,
514
- ariaDescribedBy: g
514
+ ariaDescribedBy: b
515
515
  }) {
516
- const f = z(), b = n || `modal-${f}`, v = n ? `${n}-title` : `modal-title-${f}`, { show: h, shouldRender: y } = ze(o);
517
- if (Be(b, y), Ve(y, t), !y) return null;
518
- const p = () => a ? j.isValidElement(a) ? /* @__PURE__ */ c("div", { className: "mb-4", children: a }) : /* @__PURE__ */ c("h2", { className: "mb-4 text-xl font-semibold", id: v, children: a }) : null, x = () => d.length === 0 ? null : /* @__PURE__ */ c("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: d.map((N, E) => {
519
- const { label: V, className: k, ...R } = N;
520
- return /* @__PURE__ */ c($e, { className: k, type: "button", ...R, "data-modal-action": "true", children: V }, E);
516
+ const m = F(), v = r || `modal-${m}`, h = r ? `${r}-title` : `modal-title-${m}`, { show: p, shouldRender: y } = Ke(a);
517
+ if (Ge(v, y), Pe(y, t), !y) return null;
518
+ const g = () => n ? W.isValidElement(n) ? /* @__PURE__ */ c("div", { className: "mb-4", children: n }) : /* @__PURE__ */ c("h2", { className: "mb-4 text-xl font-semibold", id: h, children: n }) : null, w = () => d.length === 0 ? null : /* @__PURE__ */ c("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: d.map((N, E) => {
519
+ const { label: L, className: I, ...S } = N;
520
+ return /* @__PURE__ */ c(Be, { className: I, type: "button", ...S, "data-modal-action": "true", children: L }, E);
521
521
  }) });
522
- return /* @__PURE__ */ c(O, { children: re(
522
+ return /* @__PURE__ */ c(ne, { children: se(
523
523
  /* @__PURE__ */ c(
524
524
  "div",
525
525
  {
526
- "aria-labelledby": l ?? a ? v : void 0,
527
- "aria-describedby": g,
526
+ "aria-labelledby": l ?? n ? h : void 0,
527
+ "aria-describedby": b,
528
528
  role: "dialog",
529
529
  "aria-modal": "true",
530
530
  className: "fixed inset-0 z-[100] overflow-y-auto",
531
- children: /* @__PURE__ */ C("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
531
+ children: /* @__PURE__ */ T("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
532
532
  /* @__PURE__ */ c(
533
533
  "div",
534
534
  {
535
- className: L("fixed inset-0 bg-black/20 transition-all", i),
535
+ className: R("fixed inset-0 bg-black/20 transition-all", i),
536
536
  onClick: () => {
537
- m || t();
537
+ f || t();
538
538
  }
539
539
  }
540
540
  ),
541
- r && /* @__PURE__ */ c("div", { className: L("relative w-fit", s), children: e }),
542
- !r && /* @__PURE__ */ C(
541
+ o && /* @__PURE__ */ c("div", { className: R("relative w-fit", s), children: e }),
542
+ !o && /* @__PURE__ */ T(
543
543
  "div",
544
544
  {
545
- id: b,
545
+ id: v,
546
546
  tabIndex: -1,
547
- className: L(
547
+ className: R(
548
548
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
549
- h ? "opacity-100 scale-100" : "opacity-0 scale-90",
549
+ p ? "opacity-100 scale-100" : "opacity-0 scale-90",
550
550
  s
551
551
  ),
552
552
  children: [
@@ -557,12 +557,12 @@ function ht({
557
557
  onClick: t,
558
558
  "data-modal-close-button": "true",
559
559
  className: "rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",
560
- children: /* @__PURE__ */ c(ce, { size: 18 })
560
+ children: /* @__PURE__ */ c(oe, { size: 18 })
561
561
  }
562
562
  ),
563
- p(),
563
+ g(),
564
564
  e,
565
- x()
565
+ w()
566
566
  ]
567
567
  }
568
568
  )
@@ -572,117 +572,117 @@ function ht({
572
572
  document.body
573
573
  ) });
574
574
  }
575
- const Se = {
575
+ const Me = {
576
576
  link: "text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary",
577
577
  outline: "border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary",
578
578
  filled: "bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground"
579
- }, je = {
579
+ }, qe = {
580
580
  sm: "px-2 py-1 text-sm min-w-[32px] min-h-8",
581
581
  md: "px-2 py-1 text-base min-w-[40px] min-h-10"
582
582
  };
583
- function pt({
584
- page: n,
585
- pageCount: o = 5,
583
+ function It({
584
+ page: r,
585
+ pageCount: a = 5,
586
586
  maxVisiblePages: t = 5,
587
- showFirstLast: a = !0,
587
+ showFirstLast: n = !0,
588
588
  onPageChange: e,
589
- size: r = "md",
589
+ size: o = "md",
590
590
  variant: s = "link",
591
591
  className: i,
592
592
  ref: u,
593
593
  buttonsClassName: d,
594
- ...m
594
+ ...f
595
595
  }) {
596
- const l = o === 1 / 0, f = I(() => {
596
+ const l = a === 1 / 0, m = C(() => {
597
597
  if (l) return [];
598
- const N = o, E = Math.min(t, N);
598
+ const N = a, E = Math.min(t, N);
599
599
  if (N <= E)
600
- return Array.from({ length: N }, (q, G) => G + 1);
601
- const V = Math.floor(E / 2);
602
- let k = Math.max(1, n - V), R = Math.min(N, k + E - 1);
603
- return R - k + 1 < E && (k = Math.max(1, R - E + 1), R = Math.min(N, k + E - 1)), Array.from({ length: R - k + 1 }, (q, G) => k + G);
604
- }, [l, t, n, o])(), b = n > 1, v = l || n < o, h = a && !l, y = a && !l, p = (N) => {
605
- N >= 1 && (l || N <= o) && e(N);
606
- }, x = I(() => {
607
- const N = L(
600
+ return Array.from({ length: N }, (K, P) => P + 1);
601
+ const L = Math.floor(E / 2);
602
+ let I = Math.max(1, r - L), S = Math.min(N, I + E - 1);
603
+ return S - I + 1 < E && (I = Math.max(1, S - E + 1), S = Math.min(N, I + E - 1)), Array.from({ length: S - I + 1 }, (K, P) => I + P);
604
+ }, [l, t, r, a])(), v = r > 1, h = l || r < a, p = n && !l, y = n && !l, g = (N) => {
605
+ N >= 1 && (l || N <= a) && e(N);
606
+ }, w = C(() => {
607
+ const N = R(
608
608
  "flex items-center justify-center min-w-fit",
609
609
  "disabled:opacity-50 disabled:cursor-not-allowed",
610
- je[r],
610
+ qe[o],
611
611
  "rounded-md"
612
612
  );
613
- return L(N, Se[s], d);
614
- }, [s, r, d]);
615
- return /* @__PURE__ */ C(
613
+ return R(N, Me[s], d);
614
+ }, [s, o, d]);
615
+ return /* @__PURE__ */ T(
616
616
  "nav",
617
617
  {
618
618
  ref: u,
619
- className: L("flex items-center justify-center gap-1", i),
619
+ className: R("flex items-center justify-center gap-1", i),
620
620
  role: "navigation",
621
621
  "aria-label": "Pagination",
622
- "data-page": n,
623
- "data-page-count": l ? "infinite" : o,
624
- ...m,
622
+ "data-page": r,
623
+ "data-page-count": l ? "infinite" : a,
624
+ ...f,
625
625
  children: [
626
- h && /* @__PURE__ */ C(
626
+ p && /* @__PURE__ */ T(
627
627
  "button",
628
628
  {
629
- onClick: () => p(1),
630
- className: x(),
631
- disabled: n === 1,
629
+ onClick: () => g(1),
630
+ className: w(),
631
+ disabled: r === 1,
632
632
  "aria-label": "Go to first page",
633
633
  children: [
634
- /* @__PURE__ */ c(ye, { size: r === "sm" ? 12 : 15 }),
634
+ /* @__PURE__ */ c(ke, { size: o === "sm" ? 12 : 15 }),
635
635
  /* @__PURE__ */ c("span", { className: "ml-1", children: "First" })
636
636
  ]
637
637
  }
638
638
  ),
639
- /* @__PURE__ */ C(
639
+ /* @__PURE__ */ T(
640
640
  "button",
641
641
  {
642
- onClick: () => p(n - 1),
643
- className: x(),
644
- disabled: !b,
642
+ onClick: () => g(r - 1),
643
+ className: w(),
644
+ disabled: !v,
645
645
  "aria-label": "Go to previous page",
646
646
  children: [
647
- /* @__PURE__ */ c(we, { size: r === "sm" ? 12 : 15 }),
647
+ /* @__PURE__ */ c(Ie, { size: o === "sm" ? 12 : 15 }),
648
648
  /* @__PURE__ */ c("span", { className: "ml-1", children: "Previous" })
649
649
  ]
650
650
  }
651
651
  ),
652
- !l && f.map((N) => /* @__PURE__ */ c(
652
+ !l && m.map((N) => /* @__PURE__ */ c(
653
653
  "button",
654
654
  {
655
- onClick: () => p(N),
656
- className: L(x(), "aspect-square"),
655
+ onClick: () => g(N),
656
+ className: R(w(), "aspect-square"),
657
657
  "aria-label": `Go to page ${N}`,
658
- "aria-current": N === n ? !0 : void 0,
658
+ "aria-current": N === r ? !0 : void 0,
659
659
  children: N
660
660
  },
661
661
  N
662
662
  )),
663
- /* @__PURE__ */ C(
663
+ /* @__PURE__ */ T(
664
664
  "button",
665
665
  {
666
- onClick: () => p(n + 1),
667
- className: x(),
668
- disabled: !v,
666
+ onClick: () => g(r + 1),
667
+ className: w(),
668
+ disabled: !h,
669
669
  "aria-label": "Go to next page",
670
670
  children: [
671
671
  /* @__PURE__ */ c("span", { className: "mr-1", children: "Next" }),
672
- /* @__PURE__ */ c(xe, { size: r === "sm" ? 12 : 15 })
672
+ /* @__PURE__ */ c(Ce, { size: o === "sm" ? 12 : 15 })
673
673
  ]
674
674
  }
675
675
  ),
676
- y && /* @__PURE__ */ C(
676
+ y && /* @__PURE__ */ T(
677
677
  "button",
678
678
  {
679
- onClick: () => p(o),
680
- className: x(),
681
- disabled: n === o,
679
+ onClick: () => g(a),
680
+ className: w(),
681
+ disabled: r === a,
682
682
  "aria-label": "Go to last page",
683
683
  children: [
684
684
  /* @__PURE__ */ c("span", { className: "mr-1", children: "Last" }),
685
- /* @__PURE__ */ c(Ne, { size: r === "sm" ? 12 : 15 })
685
+ /* @__PURE__ */ c($e, { size: o === "sm" ? 12 : 15 })
686
686
  ]
687
687
  }
688
688
  )
@@ -690,29 +690,29 @@ function pt({
690
690
  }
691
691
  );
692
692
  }
693
- function Fe(n) {
694
- const [o, t] = A(!1), [a, e] = A(!1);
693
+ function We(r) {
694
+ const [a, t] = k(!1), [n, e] = k(!1);
695
695
  return $(() => {
696
- n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));
697
- }, [n]), { show: o, shouldRender: a };
696
+ r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));
697
+ }, [r]), { show: a, shouldRender: n };
698
698
  }
699
- function Ge(n, o) {
699
+ function Ue(r, a) {
700
700
  $(() => {
701
- const t = (a) => {
702
- a.key === "Escape" && n && o();
701
+ const t = (n) => {
702
+ n.key === "Escape" && r && a();
703
703
  };
704
- return document.addEventListener("keydown", t), n && (document.body.style.overflow = "hidden"), () => {
704
+ return document.addEventListener("keydown", t), r && (document.body.style.overflow = "hidden"), () => {
705
705
  document.removeEventListener("keydown", t), document.body.style.overflow = "auto";
706
706
  };
707
- }, [n, o]);
707
+ }, [r, a]);
708
708
  }
709
- function qe(n, o) {
710
- const t = F(null), a = I(() => {
711
- const e = document.getElementById(n);
709
+ function _e(r, a) {
710
+ const t = V(null), n = C(() => {
711
+ const e = document.getElementById(r);
712
712
  if (!e) return;
713
- const r = e.querySelectorAll('[data-panel-action="true"]');
714
- if (r.length > 0) {
715
- r[0].focus();
713
+ const o = e.querySelectorAll('[data-panel-action="true"]');
714
+ if (o.length > 0) {
715
+ o[0].focus();
716
716
  return;
717
717
  }
718
718
  const s = e.querySelectorAll(
@@ -728,12 +728,12 @@ function qe(n, o) {
728
728
  return;
729
729
  }
730
730
  e.focus();
731
- }, [n]);
732
- $(() => (o && (t.current = document.activeElement, a()), () => {
731
+ }, [r]);
732
+ $(() => (a && (t.current = document.activeElement, n()), () => {
733
733
  document.body.style.overflow = "auto", t.current instanceof HTMLElement && t.current.focus();
734
- }), [o, a]);
734
+ }), [a, n]);
735
735
  }
736
- const He = {
736
+ const Xe = {
737
737
  size: {
738
738
  sm: "max-w-sm",
739
739
  md: "max-w-md",
@@ -744,38 +744,38 @@ const He = {
744
744
  screen: "w-screen"
745
745
  }
746
746
  };
747
- function gt({
748
- ref: n,
749
- id: o,
747
+ function Ct({
748
+ ref: r,
749
+ id: a,
750
750
  isOpen: t,
751
- onClose: a,
751
+ onClose: n,
752
752
  title: e,
753
- children: r,
753
+ children: o,
754
754
  footer: s,
755
755
  size: i = "md",
756
756
  className: u,
757
757
  overlayClassName: d,
758
- hideCloseButton: m = !1,
758
+ hideCloseButton: f = !1,
759
759
  disableCloseOnOverlayClick: l = !1,
760
- ariaLabelledBy: g,
761
- ariaDescribedBy: f
760
+ ariaLabelledBy: b,
761
+ ariaDescribedBy: m
762
762
  }) {
763
- const b = z(), v = o || `panel-${b}`, h = o ? `${o}-title` : `panel-title-${b}`, { show: y, shouldRender: p } = Fe(t);
764
- if (qe(v, p), Ge(p, a), !p) return null;
765
- const x = () => e ? j.isValidElement(e) ? /* @__PURE__ */ c("div", { children: e }) : /* @__PURE__ */ c("h2", { className: "text-2xl font-semibold", id: h, children: e }) : null, N = () => {
763
+ const v = F(), h = a || `panel-${v}`, p = a ? `${a}-title` : `panel-title-${v}`, { show: y, shouldRender: g } = We(t);
764
+ if (_e(h, g), Ue(g, n), !g) return null;
765
+ const w = () => e ? W.isValidElement(e) ? /* @__PURE__ */ c("div", { children: e }) : /* @__PURE__ */ c("h2", { className: "text-2xl font-semibold", id: p, children: e }) : null, N = () => {
766
766
  if (!s) return null;
767
- if (j.isValidElement(s)) {
768
- const E = s, V = E.props.className || "";
769
- return j.cloneElement(E, { className: L("px-6 py-4", V) });
767
+ if (W.isValidElement(s)) {
768
+ const E = s, L = E.props.className || "";
769
+ return W.cloneElement(E, { className: R("px-6 py-4", L) });
770
770
  }
771
771
  return /* @__PURE__ */ c("div", { className: "px-6 py-4", children: s });
772
772
  };
773
- return /* @__PURE__ */ c(O, { children: re(
774
- /* @__PURE__ */ C(
773
+ return /* @__PURE__ */ c(ne, { children: se(
774
+ /* @__PURE__ */ T(
775
775
  "div",
776
776
  {
777
- "aria-labelledby": g ?? e ? h : void 0,
778
- "aria-describedby": f,
777
+ "aria-labelledby": b ?? e ? p : void 0,
778
+ "aria-describedby": m,
779
779
  role: "dialog",
780
780
  "aria-modal": "true",
781
781
  className: "fixed inset-0 z-[100] overflow-hidden",
@@ -784,44 +784,44 @@ function gt({
784
784
  /* @__PURE__ */ c(
785
785
  "div",
786
786
  {
787
- className: L(
787
+ className: R(
788
788
  "fixed inset-0 bg-black/40 transition-opacity duration-300",
789
789
  y ? "opacity-100" : "opacity-0",
790
790
  d
791
791
  ),
792
792
  onClick: () => {
793
- l || a();
793
+ l || n();
794
794
  }
795
795
  }
796
796
  ),
797
797
  /* @__PURE__ */ c("div", { className: "fixed inset-y-0 right-0 flex max-w-full", children: /* @__PURE__ */ c(
798
798
  "div",
799
799
  {
800
- id: v,
801
- ref: n,
800
+ id: h,
801
+ ref: r,
802
802
  tabIndex: -1,
803
- className: L(
803
+ className: R(
804
804
  "relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out",
805
805
  i !== "screen" && "border-l border-border",
806
- He.size[i],
806
+ Xe.size[i],
807
807
  y ? "translate-x-0" : "translate-x-full",
808
808
  u
809
809
  ),
810
810
  "data-panel-size": i,
811
- children: /* @__PURE__ */ C("div", { className: "flex h-full flex-col", children: [
812
- e && /* @__PURE__ */ c("div", { className: "px-6 pt-6", children: x() }),
813
- !m && /* @__PURE__ */ c(
811
+ children: /* @__PURE__ */ T("div", { className: "flex h-full flex-col", children: [
812
+ e && /* @__PURE__ */ c("div", { className: "px-6 pt-6", children: w() }),
813
+ !f && /* @__PURE__ */ c(
814
814
  "button",
815
815
  {
816
816
  type: "button",
817
- onClick: a,
817
+ onClick: n,
818
818
  "data-panel-close-button": "true",
819
819
  "aria-label": "Close panel",
820
820
  className: "rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",
821
- children: /* @__PURE__ */ c(ce, { size: 18 })
821
+ children: /* @__PURE__ */ c(oe, { size: 18 })
822
822
  }
823
823
  ),
824
- /* @__PURE__ */ c("div", { className: L("flex-1 overflow-y-auto px-6 pb-6", e ? "pt-6" : "pt-10"), children: r }),
824
+ /* @__PURE__ */ c("div", { className: R("flex-1 overflow-y-auto px-6 pb-6", e ? "pt-6" : "pt-10"), children: o }),
825
825
  N()
826
826
  ] })
827
827
  }
@@ -832,26 +832,26 @@ function gt({
832
832
  document.body
833
833
  ) });
834
834
  }
835
- function Me({ itemId: n, checked: o, onChange: t, name: a, disabled: e = !1, className: r = "" }) {
835
+ function Qe({ itemId: r, checked: a, onChange: t, name: n, disabled: e = !1, className: o = "" }) {
836
836
  const s = "relative inline-flex items-center justify-center rounded-full", i = () => {
837
837
  e || t();
838
- }, u = w(
838
+ }, u = x(
839
839
  s,
840
- !o && "hover:border-current/60",
840
+ !a && "hover:border-current/60",
841
841
  !e && "border-current cursor-pointer",
842
842
  e && "border-muted/60 cursor-not-allowed",
843
- r
843
+ o
844
844
  );
845
845
  return /* @__PURE__ */ c(
846
846
  "div",
847
847
  {
848
- id: n,
848
+ id: r,
849
849
  role: "radio",
850
850
  tabIndex: -1,
851
- "aria-checked": o,
851
+ "aria-checked": a,
852
852
  "aria-disabled": e,
853
- "aria-description": `Radio button for ${a}`,
854
- "aria-labelledby": `${n}-label`,
853
+ "aria-description": `Radio button for ${n}`,
854
+ "aria-labelledby": `${r}-label`,
855
855
  onClick: i,
856
856
  className: u,
857
857
  style: {
@@ -860,76 +860,76 @@ function Me({ itemId: n, checked: o, onChange: t, name: a, disabled: e = !1, cla
860
860
  padding: "0.1em",
861
861
  borderWidth: "0.06em"
862
862
  },
863
- children: o && /* @__PURE__ */ c(
863
+ children: a && /* @__PURE__ */ c(
864
864
  "div",
865
865
  {
866
- className: w("size-full aspect-square rounded-full", e && "bg-muted/60", !e && "bg-current")
866
+ className: x("size-full aspect-square rounded-full", e && "bg-muted/60", !e && "bg-current")
867
867
  }
868
868
  )
869
869
  }
870
870
  );
871
871
  }
872
- function Y({
873
- value: n,
874
- children: o,
872
+ function re({
873
+ value: r,
874
+ children: a,
875
875
  className: t = "",
876
- isSelected: a = !1,
876
+ isSelected: n = !1,
877
877
  onChange: e,
878
- disabled: r = !1,
878
+ disabled: o = !1,
879
879
  hideInput: s = !1,
880
880
  description: i,
881
881
  name: u
882
882
  }) {
883
- const m = `radio-${z()}-${n}`, l = () => {
884
- r || e == null || e(n);
883
+ const f = `radio-${F()}-${r}`, l = () => {
884
+ o || e == null || e(r);
885
885
  };
886
- return /* @__PURE__ */ C(
886
+ return /* @__PURE__ */ T(
887
887
  "div",
888
888
  {
889
889
  title: i,
890
- className: w(
890
+ className: x(
891
891
  "relative flex items-center",
892
892
  t,
893
893
  // Uses text color for borders
894
- s && `p-2 border-2 focus-within:border-dashed focus-within:${r ? "border-current/50" : "border-current/80"}`,
895
- s && !a && `border-transparent ${r ? "" : "not-focus-within:hover:border-border/60"}`,
896
- s && a && "border-border",
897
- r && "opacity-60 cursor-not-allowed"
894
+ s && `p-2 border-2 focus-within:border-dashed focus-within:${o ? "border-current/50" : "border-current/80"}`,
895
+ s && !n && `border-transparent ${o ? "" : "not-focus-within:hover:border-border/60"}`,
896
+ s && n && "border-border",
897
+ o && "opacity-60 cursor-not-allowed"
898
898
  ),
899
899
  style: {
900
900
  gap: "0.5em"
901
901
  },
902
902
  children: [
903
903
  !s && /* @__PURE__ */ c(
904
- Me,
904
+ Qe,
905
905
  {
906
- itemId: m,
906
+ itemId: f,
907
907
  name: u || "",
908
- checked: a,
908
+ checked: n,
909
909
  onChange: l,
910
- disabled: r,
911
- className: w(s && "")
910
+ disabled: o,
911
+ className: x(s && "")
912
912
  }
913
913
  ),
914
914
  /* @__PURE__ */ c(
915
915
  "div",
916
916
  {
917
- id: s ? m : void 0,
917
+ id: s ? f : void 0,
918
918
  tabIndex: s ? -1 : void 0,
919
919
  role: s ? "radio" : void 0,
920
920
  onClick: s ? l : void 0,
921
- "aria-checked": s ? a ? "true" : "false" : void 0,
922
- "aria-disabled": s ? r : void 0,
921
+ "aria-checked": s ? n ? "true" : "false" : void 0,
922
+ "aria-disabled": s ? o : void 0,
923
923
  "aria-description": s ? i || `Radio button for ${u}` : void 0,
924
- "aria-labelledby": s ? `${m}-label` : void 0,
925
- className: w(s && "size-full", typeof o == "object" && "grow focus:outline-none"),
924
+ "aria-labelledby": s ? `${f}-label` : void 0,
925
+ className: x(s && "size-full", typeof a == "object" && "grow focus:outline-none"),
926
926
  children: /* @__PURE__ */ c(
927
927
  "label",
928
928
  {
929
- id: `${m}-label`,
929
+ id: `${f}-label`,
930
930
  onClick: s ? void 0 : l,
931
- className: w(r && "cursor-not-allowed", !r && "cursor-pointer"),
932
- children: o
931
+ className: x(o && "cursor-not-allowed", !o && "cursor-pointer"),
932
+ children: a
933
933
  }
934
934
  )
935
935
  }
@@ -938,98 +938,98 @@ function Y({
938
938
  }
939
939
  );
940
940
  }
941
- function Pe(n, o) {
942
- const [t, a] = A(o), [e, r] = A(-1), [s, i] = A(!1), u = I((f, b) => {
941
+ function Ze(r, a) {
942
+ const [t, n] = k(a), [e, o] = k(-1), [s, i] = k(!1), u = C((m, v) => {
943
943
  var y;
944
- const v = f[b];
945
- v.hasAttribute("disabled") || v.getAttribute("aria-disabled") === "true" || ((y = f[b]) == null || y.click(), r(b));
946
- }, []), d = I(
947
- (f, b) => {
948
- var h;
949
- if (f.preventDefault(), s || !b.length) return;
950
- const v = o !== -1 ? o : 0;
951
- (h = b[v]) == null || h.focus(), a(v), o !== -1 && u(b, v);
944
+ const h = m[v];
945
+ h.hasAttribute("disabled") || h.getAttribute("aria-disabled") === "true" || ((y = m[v]) == null || y.click(), o(v));
946
+ }, []), d = C(
947
+ (m, v) => {
948
+ var p;
949
+ if (m.preventDefault(), s || !v.length) return;
950
+ const h = a !== -1 ? a : 0;
951
+ (p = v[h]) == null || p.focus(), n(h), a !== -1 && u(v, h);
952
952
  },
953
- [o, s, u]
954
- ), m = I(
955
- (f) => {
953
+ [a, s, u]
954
+ ), f = C(
955
+ (m) => {
956
956
  var y;
957
- if (!f.shiftKey)
957
+ if (!m.shiftKey)
958
958
  return;
959
- f.preventDefault();
960
- const b = Array.from(
959
+ m.preventDefault();
960
+ const v = Array.from(
961
961
  document.querySelectorAll(
962
962
  'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
963
963
  )
964
- ).filter((p) => !p.hasAttribute("disabled") && p.tabIndex >= 0), v = b.findIndex((p) => p.id === n), h = v > 0 ? v - 1 : b.length - 1;
965
- (y = b[h]) == null || y.focus();
964
+ ).filter((g) => !g.hasAttribute("disabled") && g.tabIndex >= 0), h = v.findIndex((g) => g.id === r), p = h > 0 ? h - 1 : v.length - 1;
965
+ (y = v[p]) == null || y.focus();
966
966
  },
967
- [n]
968
- ), l = I(
969
- (f, b) => {
970
- var x;
971
- if (!b.length) return;
972
- const v = f.target;
973
- if (!b.some((N) => N.id === v.id)) return;
967
+ [r]
968
+ ), l = C(
969
+ (m, v) => {
970
+ var w;
971
+ if (!v.length) return;
972
+ const h = m.target;
973
+ if (!v.some((N) => N.id === h.id)) return;
974
974
  const y = t !== -1 ? t : 0;
975
- let p = y;
976
- switch (f.key) {
975
+ let g = y;
976
+ switch (m.key) {
977
977
  case "ArrowUp":
978
978
  case "ArrowLeft":
979
- f.preventDefault(), p = y > 0 ? y - 1 : b.length - 1;
979
+ m.preventDefault(), g = y > 0 ? y - 1 : v.length - 1;
980
980
  break;
981
981
  case "ArrowDown":
982
982
  case "ArrowRight":
983
- f.preventDefault(), p = (y + 1) % b.length;
983
+ m.preventDefault(), g = (y + 1) % v.length;
984
984
  break;
985
985
  // Select the option when the space key is pressed
986
986
  case " ":
987
- f.preventDefault(), u(b, y);
987
+ m.preventDefault(), u(v, y);
988
988
  return;
989
989
  case "Tab":
990
- m(f);
990
+ f(m);
991
991
  return;
992
992
  default:
993
993
  return;
994
994
  }
995
- (x = b[p]) == null || x.focus(), a(p), e !== -1 && u(b, p);
995
+ (w = v[g]) == null || w.focus(), n(g), e !== -1 && u(v, g);
996
996
  },
997
- [t, e, m, u]
998
- ), g = I(() => {
999
- const f = document.querySelector(`[id="${n}"][role="radiogroup"]`);
1000
- return f ? Array.from(f.querySelectorAll('[role="radio"]')) : [];
1001
- }, [n]);
997
+ [t, e, f, u]
998
+ ), b = C(() => {
999
+ const m = document.querySelector(`[id="${r}"][role="radiogroup"]`);
1000
+ return m ? Array.from(m.querySelectorAll('[role="radio"]')) : [];
1001
+ }, [r]);
1002
1002
  $(() => {
1003
- const f = document.querySelector(`[id="${n}"][role="radiogroup"]`);
1004
- if (!f) return;
1005
- const b = g(), v = (x) => d(x, b), h = (x) => l(x, b), y = () => i(!0), p = () => i(!1);
1006
- return document.addEventListener("keydown", h), f.addEventListener("focus", v), f.addEventListener("mousedown", y), document.addEventListener("mouseup", p), () => {
1007
- document.removeEventListener("keydown", h), f.removeEventListener("focus", v), f.removeEventListener("mousedown", y), document.removeEventListener("mouseup", p);
1003
+ const m = document.querySelector(`[id="${r}"][role="radiogroup"]`);
1004
+ if (!m) return;
1005
+ const v = b(), h = (w) => d(w, v), p = (w) => l(w, v), y = () => i(!0), g = () => i(!1);
1006
+ return document.addEventListener("keydown", p), m.addEventListener("focus", h), m.addEventListener("mousedown", y), document.addEventListener("mouseup", g), () => {
1007
+ document.removeEventListener("keydown", p), m.removeEventListener("focus", h), m.removeEventListener("mousedown", y), document.removeEventListener("mouseup", g);
1008
1008
  };
1009
- }, [n, g, d, l]);
1009
+ }, [r, b, d, l]);
1010
1010
  }
1011
- function vt({
1012
- options: n = [],
1013
- value: o,
1011
+ function $t({
1012
+ options: r = [],
1013
+ value: a,
1014
1014
  onChange: t,
1015
- id: a,
1015
+ id: n,
1016
1016
  children: e,
1017
- className: r = "",
1017
+ className: o = "",
1018
1018
  childrenClassName: s = "",
1019
1019
  hideInputs: i = !1
1020
1020
  }) {
1021
- const u = z(), d = a || `radio-group-${u}`;
1022
- Pe(
1021
+ const u = F(), d = n || `radio-group-${u}`;
1022
+ Ze(
1023
1023
  d,
1024
- n.findIndex((l) => l === o)
1024
+ r.findIndex((l) => l === a)
1025
1025
  );
1026
- const m = ee(() => n.reduce((l, g) => (typeof g == "string" ? l.some((f) => f.value === g) || l.push({ label: g, value: g }) : l.push(g), l), []), [n]);
1027
- return /* @__PURE__ */ C("div", { id: d, role: "radiogroup", tabIndex: 0, className: w(r, "focus:outline-none"), children: [
1028
- m.length > 0 && m.map((l, g) => /* @__PURE__ */ c(
1029
- Y,
1026
+ const f = Q(() => r.reduce((l, b) => (typeof b == "string" ? l.some((m) => m.value === b) || l.push({ label: b, value: b }) : l.push(b), l), []), [r]);
1027
+ return /* @__PURE__ */ T("div", { id: d, role: "radiogroup", tabIndex: 0, className: x(o, "focus:outline-none"), children: [
1028
+ f.length > 0 && f.map((l, b) => /* @__PURE__ */ c(
1029
+ re,
1030
1030
  {
1031
1031
  value: l.value,
1032
- isSelected: o === l.value,
1032
+ isSelected: a === l.value,
1033
1033
  onChange: t,
1034
1034
  name: d,
1035
1035
  disabled: l.disabled,
@@ -1038,15 +1038,15 @@ function vt({
1038
1038
  className: s,
1039
1039
  children: l.label
1040
1040
  },
1041
- `${l.value}-${g}`
1041
+ `${l.value}-${b}`
1042
1042
  )),
1043
- m.length === 0 && e && j.Children.map(e, (l) => j.isValidElement(l) && l.type === Y ? /* @__PURE__ */ c(
1044
- Y,
1043
+ f.length === 0 && e && W.Children.map(e, (l) => W.isValidElement(l) && l.type === re ? /* @__PURE__ */ c(
1044
+ re,
1045
1045
  {
1046
1046
  ...l.props,
1047
- className: w(s, l.props.className),
1047
+ className: x(s, l.props.className),
1048
1048
  hideInput: l.props.hideInput || i,
1049
- isSelected: o === l.props.value,
1049
+ isSelected: a === l.props.value,
1050
1050
  onChange: t,
1051
1051
  name: d,
1052
1052
  children: l.props.children
@@ -1054,7 +1054,459 @@ function vt({
1054
1054
  ) : null)
1055
1055
  ] });
1056
1056
  }
1057
- const Ke = {
1057
+ function Je(r) {
1058
+ const a = V(null), t = V(null), n = V(null), [e, o] = k(!1), [s, i] = k(!1), [u, d] = k({
1059
+ vertical: !1,
1060
+ horizontal: !1
1061
+ }), f = V(null), l = V(null), b = C(() => {
1062
+ const h = a.current;
1063
+ if (!h) return;
1064
+ const p = h.scrollHeight > h.clientHeight, y = h.scrollWidth > h.clientWidth;
1065
+ d({
1066
+ vertical: p,
1067
+ horizontal: y
1068
+ });
1069
+ }, []), m = C(() => {
1070
+ const h = a.current, p = t.current, y = n.current;
1071
+ if (h) {
1072
+ if (p && u.vertical) {
1073
+ const w = (u.horizontal ? h.clientHeight - r : h.clientHeight) / h.scrollHeight, N = Math.max(w * 100, 10), E = h.scrollHeight - h.clientHeight, L = E > 0 ? h.scrollTop / E : 0, I = 100 - N, S = L * I;
1074
+ p.style.height = `${N}%`, p.style.top = `${S}%`, p.style.transform = "none";
1075
+ }
1076
+ if (y && u.horizontal) {
1077
+ const w = (u.vertical ? h.clientWidth - r : h.clientWidth) / h.scrollWidth, N = Math.max(w * 100, 10), E = h.scrollWidth - h.clientWidth, L = E > 0 ? h.scrollLeft / E : 0, I = 100 - N, S = L * I;
1078
+ y.style.width = `${N}%`, y.style.left = `${S}%`, y.style.transform = "none";
1079
+ }
1080
+ }
1081
+ }, [u, r]), v = C(() => {
1082
+ f.current && clearTimeout(f.current), l.current && clearTimeout(l.current), o(!0), i(!1), m(), f.current = setTimeout(() => {
1083
+ i(!0), l.current = setTimeout(() => {
1084
+ o(!1), i(!1);
1085
+ }, 300);
1086
+ }, 1e3);
1087
+ }, [m]);
1088
+ return $(() => {
1089
+ const h = a.current;
1090
+ if (!h) return;
1091
+ b();
1092
+ const p = new ResizeObserver(b);
1093
+ p.observe(h);
1094
+ const y = new MutationObserver(b);
1095
+ return y.observe(h, {
1096
+ childList: !0,
1097
+ subtree: !0,
1098
+ attributes: !0
1099
+ }), () => {
1100
+ p.disconnect(), y.disconnect();
1101
+ };
1102
+ }, [b]), $(() => {
1103
+ m();
1104
+ }, [u, m]), $(() => () => {
1105
+ f.current && clearTimeout(f.current), l.current && clearTimeout(l.current);
1106
+ }, []), {
1107
+ viewportRef: a,
1108
+ verticalThumbRef: t,
1109
+ horizontalThumbRef: n,
1110
+ isScrolling: e,
1111
+ isFadingOut: s,
1112
+ scrollbarVisible: u,
1113
+ handleScroll: v
1114
+ };
1115
+ }
1116
+ function Dt({
1117
+ className: r,
1118
+ thumbClassName: a,
1119
+ viewportClassName: t,
1120
+ scrollbarClassName: n,
1121
+ scrollbarThickness: e = 10,
1122
+ children: o,
1123
+ id: s,
1124
+ ref: i,
1125
+ ...u
1126
+ }) {
1127
+ const { viewportRef: d, verticalThumbRef: f, horizontalThumbRef: l, isScrolling: b, isFadingOut: m, scrollbarVisible: v, handleScroll: h } = Je(e), p = R(
1128
+ "relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400",
1129
+ a
1130
+ );
1131
+ return /* @__PURE__ */ T("div", { ref: i, id: s, className: R("relative overflow-hidden", r), "data-scroll-area-root": "", ...u, children: [
1132
+ /* @__PURE__ */ c(
1133
+ "div",
1134
+ {
1135
+ ref: d,
1136
+ className: R(
1137
+ "h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
1138
+ t
1139
+ ),
1140
+ onScroll: h,
1141
+ "data-scroll-area-viewport": "",
1142
+ children: o
1143
+ }
1144
+ ),
1145
+ v.vertical && (b || m) && /* @__PURE__ */ c(
1146
+ "div",
1147
+ {
1148
+ className: R(
1149
+ "touch-none select-none transition-all duration-300",
1150
+ "p-[1px]",
1151
+ "absolute right-0 top-0",
1152
+ m ? "opacity-0" : "opacity-100",
1153
+ n
1154
+ ),
1155
+ "data-scroll-area-scrollbar": "vertical",
1156
+ "data-state": b ? "visible" : "hidden",
1157
+ style: {
1158
+ width: `${e}px`,
1159
+ height: v.horizontal ? `calc(100% - ${e}px)` : "100%"
1160
+ },
1161
+ children: /* @__PURE__ */ c(
1162
+ "div",
1163
+ {
1164
+ ref: f,
1165
+ className: R("absolute rounded-full", p),
1166
+ "data-scroll-area-thumb": "",
1167
+ style: { height: "20%", top: "0%", width: "100%" }
1168
+ }
1169
+ )
1170
+ }
1171
+ ),
1172
+ v.horizontal && (b || m) && /* @__PURE__ */ c(
1173
+ "div",
1174
+ {
1175
+ className: R(
1176
+ "touch-none select-none transition-all duration-300",
1177
+ "p-[1px]",
1178
+ "absolute bottom-0 left-0",
1179
+ m ? "opacity-0" : "opacity-100",
1180
+ n
1181
+ ),
1182
+ "data-scroll-area-scrollbar": "horizontal",
1183
+ "data-state": b ? "visible" : "hidden",
1184
+ style: {
1185
+ height: `${e}px`,
1186
+ width: v.vertical ? `calc(100% - ${e}px)` : "100%"
1187
+ },
1188
+ children: /* @__PURE__ */ c(
1189
+ "div",
1190
+ {
1191
+ ref: l,
1192
+ className: R("absolute rounded-full", p),
1193
+ "data-scroll-area-thumb": "",
1194
+ style: { width: "20%", left: "0%", height: "100%" }
1195
+ }
1196
+ )
1197
+ }
1198
+ ),
1199
+ v.vertical && v.horizontal && /* @__PURE__ */ c(
1200
+ "div",
1201
+ {
1202
+ className: R("bg-transparent", "absolute bottom-0 right-0"),
1203
+ "data-scroll-area-corner": "",
1204
+ style: {
1205
+ height: `${e}px`,
1206
+ width: `${e}px`
1207
+ }
1208
+ }
1209
+ )
1210
+ ] });
1211
+ }
1212
+ function Ye(r) {
1213
+ const [a, t] = k(!1), [n, e] = k(!1);
1214
+ return $(() => {
1215
+ r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));
1216
+ }, [r]), { show: a, shouldRender: n };
1217
+ }
1218
+ function Oe({
1219
+ isOpen: r,
1220
+ setIsOpen: a,
1221
+ filteredOptions: t,
1222
+ highlightedIndex: n,
1223
+ setHighlightedIndex: e,
1224
+ onSelect: o,
1225
+ triggerRef: s
1226
+ }) {
1227
+ return { handleKeyDown: C(
1228
+ (u) => {
1229
+ var d;
1230
+ switch (u.key) {
1231
+ case "ArrowDown":
1232
+ if (u.preventDefault(), !r)
1233
+ a(!0);
1234
+ else {
1235
+ const f = n < t.length - 1 ? n + 1 : 0;
1236
+ let l = f;
1237
+ for (let b = 0; b < t.length; b++) {
1238
+ const m = (f + b) % t.length;
1239
+ if (!t[m].disabled) {
1240
+ l = m;
1241
+ break;
1242
+ }
1243
+ }
1244
+ e(l);
1245
+ }
1246
+ break;
1247
+ case "ArrowUp":
1248
+ if (u.preventDefault(), !r)
1249
+ a(!0);
1250
+ else {
1251
+ const f = n > 0 ? n - 1 : t.length - 1;
1252
+ let l = f;
1253
+ for (let b = 0; b < t.length; b++) {
1254
+ const m = (f - b + t.length) % t.length;
1255
+ if (!t[m].disabled) {
1256
+ l = m;
1257
+ break;
1258
+ }
1259
+ }
1260
+ e(l);
1261
+ }
1262
+ break;
1263
+ case "Enter":
1264
+ case " ":
1265
+ if (u.preventDefault(), !r)
1266
+ a(!0);
1267
+ else if (n >= 0 && n < t.length) {
1268
+ const f = t[n];
1269
+ f.disabled || o(f);
1270
+ }
1271
+ break;
1272
+ case "Escape":
1273
+ u.preventDefault(), r && (a(!1), (d = s.current) == null || d.focus());
1274
+ break;
1275
+ case "Tab":
1276
+ r && a(!1);
1277
+ break;
1278
+ }
1279
+ },
1280
+ [r, a, t, n, e, o, s]
1281
+ ) };
1282
+ }
1283
+ function et({
1284
+ isOpen: r,
1285
+ filteredOptions: a,
1286
+ selectedOption: t,
1287
+ shouldRender: n,
1288
+ optionsContainerRef: e
1289
+ }) {
1290
+ const [o, s] = k(-1), i = Q(() => t ? a.findIndex((u) => u.value === t.value) : -1, [a, t]);
1291
+ return $(() => {
1292
+ r && a.length > 0 ? s(t && i >= 0 ? i : 0) : s(-1);
1293
+ }, [a, r, t, i]), $(() => {
1294
+ if (o >= 0 && e.current && n) {
1295
+ const u = () => {
1296
+ const d = e.current, f = d == null ? void 0 : d.querySelector(`[data-option-index="${o}"]`);
1297
+ if (f) {
1298
+ const l = r && t && o === i ? "auto" : "smooth";
1299
+ f.scrollIntoView({
1300
+ behavior: l,
1301
+ block: "nearest"
1302
+ });
1303
+ }
1304
+ };
1305
+ r && n && t ? setTimeout(u, 10) : u();
1306
+ }
1307
+ }, [o, n, r, t, a, e, i]), { highlightedIndex: o, setHighlightedIndex: s };
1308
+ }
1309
+ const ce = {
1310
+ sm: {
1311
+ trigger: "px-2 py-1 text-sm",
1312
+ options: "px-2 py-2 text-xs"
1313
+ },
1314
+ md: {
1315
+ trigger: "px-3 py-2 text-base",
1316
+ options: "px-3 py-2.5 text-sm"
1317
+ },
1318
+ lg: {
1319
+ trigger: "px-4 py-3 text-lg",
1320
+ options: "px-4 py-3 text-base"
1321
+ }
1322
+ };
1323
+ function zt({
1324
+ options: r,
1325
+ value: a,
1326
+ placeholder: t = "Select an option...",
1327
+ searchable: n = !1,
1328
+ disabled: e = !1,
1329
+ clearable: o = !1,
1330
+ size: s = "md",
1331
+ className: i,
1332
+ triggerClassName: u,
1333
+ dropdownClassName: d,
1334
+ id: f,
1335
+ ref: l,
1336
+ onChange: b,
1337
+ onSearch: m,
1338
+ searchPlaceholder: v = "Search options..."
1339
+ }) {
1340
+ const h = F(), y = `${f ?? h}-listbox`, g = (A) => `${y}-option-${A}`, [w, N] = k(!1), [E, L] = k(""), I = V(null), S = V(null), K = V(null), P = V(null), { show: X, shouldRender: j } = Ye(w), D = Q(() => !n || !E ? r : r.filter(
1341
+ (A) => {
1342
+ var H;
1343
+ return A.text.toLowerCase().includes(E.toLowerCase()) || ((H = A.description) == null ? void 0 : H.toLowerCase().includes(E.toLowerCase()));
1344
+ }
1345
+ ), [r, n, E]), z = Q(() => r.find((A) => A.value === a), [r, a]), { highlightedIndex: B, setHighlightedIndex: G } = et({
1346
+ isOpen: w,
1347
+ filteredOptions: D,
1348
+ selectedOption: z,
1349
+ shouldRender: j,
1350
+ optionsContainerRef: P
1351
+ }), U = B >= 0 ? g(B) : void 0;
1352
+ $(() => {
1353
+ w && j && n && S.current && S.current.focus();
1354
+ }, [w, n, j]);
1355
+ const _ = C(
1356
+ (A) => {
1357
+ var H;
1358
+ A.disabled || (b == null || b(A.value), N(!1), L(""), (H = I.current) == null || H.focus());
1359
+ },
1360
+ [b]
1361
+ ), { handleKeyDown: q } = Oe({
1362
+ isOpen: w,
1363
+ setIsOpen: N,
1364
+ filteredOptions: D,
1365
+ highlightedIndex: B,
1366
+ setHighlightedIndex: G,
1367
+ onSelect: _,
1368
+ triggerRef: I
1369
+ });
1370
+ $(() => {
1371
+ if (!w)
1372
+ return;
1373
+ const A = (H) => {
1374
+ var ie;
1375
+ K.current && !K.current.contains(H.target) && !((ie = I.current) != null && ie.contains(H.target)) && (N(!1), L(""));
1376
+ };
1377
+ return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
1378
+ }, [w]);
1379
+ const O = () => {
1380
+ e || (N(!w), w || (L(""), G(-1)));
1381
+ }, pe = (A) => {
1382
+ A.disabled || (b == null || b(A.value), N(!1), L(""));
1383
+ }, ge = (A) => {
1384
+ const H = A.target.value;
1385
+ L(H), m == null || m(H), G(-1);
1386
+ }, ye = (A) => {
1387
+ A.preventDefault(), A.stopPropagation(), b == null || b("");
1388
+ };
1389
+ return /* @__PURE__ */ T(
1390
+ "div",
1391
+ {
1392
+ className: x("relative", i),
1393
+ id: f,
1394
+ ref: l,
1395
+ "data-select": "true",
1396
+ "data-value": a,
1397
+ "data-searchable": n,
1398
+ "data-disabled": e,
1399
+ "data-clearable": o,
1400
+ children: [
1401
+ /* @__PURE__ */ T(
1402
+ "button",
1403
+ {
1404
+ ref: I,
1405
+ type: "button",
1406
+ className: x(
1407
+ "flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors",
1408
+ "hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
1409
+ e && "opacity-50 cursor-not-allowed hover:border-border",
1410
+ w && "border-primary ring-1 ring-primary",
1411
+ ce[s].trigger,
1412
+ u
1413
+ ),
1414
+ onClick: O,
1415
+ onKeyDown: q,
1416
+ disabled: e,
1417
+ "aria-disabled": e,
1418
+ "aria-haspopup": "listbox",
1419
+ "aria-expanded": w,
1420
+ "aria-controls": w ? y : void 0,
1421
+ "aria-activedescendant": w && !n ? U : void 0,
1422
+ "aria-label": z ? z.text : t,
1423
+ "data-select-trigger": "true",
1424
+ children: [
1425
+ /* @__PURE__ */ c("span", { className: x("block truncate", !z && "opacity-70"), children: z ? z.text : t }),
1426
+ /* @__PURE__ */ T("div", { className: "flex items-center ml-2", children: [
1427
+ o && z && /* @__PURE__ */ c(
1428
+ "button",
1429
+ {
1430
+ type: "button",
1431
+ onClick: ye,
1432
+ className: "p-0.5 rounded hover:bg-accent/20 transition-colors mr-1 group",
1433
+ "aria-label": "Clear selection",
1434
+ "data-select-clear": "true",
1435
+ children: /* @__PURE__ */ c(oe, { size: 14, className: "opacity-70 group-hover:opacity-100 transition-opacity" })
1436
+ }
1437
+ ),
1438
+ /* @__PURE__ */ c(he, { size: 16, className: x("transition-transform duration-200", w && "rotate-180") })
1439
+ ] })
1440
+ ]
1441
+ }
1442
+ ),
1443
+ j && /* @__PURE__ */ T(
1444
+ "div",
1445
+ {
1446
+ ref: K,
1447
+ className: x(
1448
+ "absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150",
1449
+ X ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-2",
1450
+ d
1451
+ ),
1452
+ id: y,
1453
+ role: "listbox",
1454
+ "data-select-content": "true",
1455
+ children: [
1456
+ n && /* @__PURE__ */ c("div", { className: "border-b border-border", children: /* @__PURE__ */ c(
1457
+ "input",
1458
+ {
1459
+ ref: S,
1460
+ type: "text",
1461
+ value: E,
1462
+ onChange: ge,
1463
+ onKeyDown: q,
1464
+ placeholder: v,
1465
+ className: "w-full px-2 py-2 text-inherit focus:outline-none",
1466
+ "aria-autocomplete": "list",
1467
+ "aria-controls": y,
1468
+ "aria-activedescendant": U,
1469
+ "data-select-search": "true"
1470
+ }
1471
+ ) }),
1472
+ /* @__PURE__ */ c("div", { ref: P, className: "max-h-60 overflow-auto", children: D.length > 0 ? D.map((A, H) => /* @__PURE__ */ T(
1473
+ "div",
1474
+ {
1475
+ id: g(H),
1476
+ className: x(
1477
+ "flex items-center cursor-pointer transition-colors",
1478
+ "hover:bg-accent/10 focus:bg-accent/10",
1479
+ ce[s].options,
1480
+ A.disabled && "opacity-50 cursor-not-allowed",
1481
+ H === B && "bg-accent/20",
1482
+ a === A.value && "bg-accent/30"
1483
+ ),
1484
+ onClick: () => pe(A),
1485
+ role: "option",
1486
+ "aria-selected": a === A.value,
1487
+ "aria-disabled": A.disabled,
1488
+ "data-select-option": "true",
1489
+ "data-value": A.value,
1490
+ "data-highlighted": H === B,
1491
+ "data-option-index": H,
1492
+ children: [
1493
+ /* @__PURE__ */ T("div", { className: "flex-1 min-w-0", children: [
1494
+ /* @__PURE__ */ c("div", { className: "font-medium", children: A.text }),
1495
+ A.description && /* @__PURE__ */ c("div", { className: "text-xs opacity-70 mt-0.5", children: A.description })
1496
+ ] }),
1497
+ a === A.value && /* @__PURE__ */ c(ve, { size: 16, className: "ml-2 text-primary flex-shrink-0" })
1498
+ ]
1499
+ },
1500
+ A.value
1501
+ )) : /* @__PURE__ */ c("div", { className: "px-3 py-2 text-sm opacity-70 text-center", children: n && E ? "No results found" : "No options available" }) })
1502
+ ]
1503
+ }
1504
+ )
1505
+ ]
1506
+ }
1507
+ );
1508
+ }
1509
+ const tt = {
1058
1510
  thin: {
1059
1511
  horizontal: "h-px",
1060
1512
  vertical: "w-px"
@@ -1071,37 +1523,37 @@ const Ke = {
1071
1523
  horizontal: "h-2",
1072
1524
  vertical: "w-2"
1073
1525
  }
1074
- }, Ue = {
1526
+ }, rt = {
1075
1527
  horizontal: "w-full",
1076
1528
  vertical: "min-h-4 h-full"
1077
1529
  };
1078
- function yt({
1079
- orientation: n = "horizontal",
1080
- decorative: o = !1,
1530
+ function Rt({
1531
+ orientation: r = "horizontal",
1532
+ decorative: a = !1,
1081
1533
  thickness: t = "thin",
1082
- className: a,
1534
+ className: n,
1083
1535
  ...e
1084
1536
  }) {
1085
- const r = w(
1537
+ const o = x(
1086
1538
  "shrink-0 bg-border",
1087
- Ue[n],
1088
- Ke[t][n],
1089
- a
1539
+ rt[r],
1540
+ tt[t][r],
1541
+ n
1090
1542
  );
1091
1543
  return /* @__PURE__ */ c(
1092
1544
  "div",
1093
1545
  {
1094
1546
  ...e,
1095
- className: r,
1096
- role: o ? "presentation" : "separator",
1097
- "aria-orientation": o ? void 0 : n,
1098
- "aria-hidden": o,
1099
- "data-orientation": n,
1547
+ className: o,
1548
+ role: a ? "presentation" : "separator",
1549
+ "aria-orientation": a ? void 0 : r,
1550
+ "aria-hidden": a,
1551
+ "data-orientation": r,
1100
1552
  "data-thickness": t
1101
1553
  }
1102
1554
  );
1103
1555
  }
1104
- const ae = {
1556
+ const ue = {
1105
1557
  shape: {
1106
1558
  rectangle: "rounded-md min-h-1",
1107
1559
  circle: "rounded-full aspect-square min-h-1",
@@ -1115,35 +1567,35 @@ const ae = {
1115
1567
  xl: "space-y-6"
1116
1568
  }
1117
1569
  };
1118
- function wt({
1119
- shape: n = "rectangle",
1120
- lineSpacing: o = "sm",
1570
+ function St({
1571
+ shape: r = "rectangle",
1572
+ lineSpacing: a = "sm",
1121
1573
  className: t,
1122
- lines: a = 1,
1574
+ lines: n = 1,
1123
1575
  animate: e = !0,
1124
- ref: r,
1576
+ ref: o,
1125
1577
  ...s
1126
1578
  }) {
1127
- const i = w("bg-muted/70", e && "animate-pulse", ae.shape[n], t);
1128
- return a > 1 ? /* @__PURE__ */ c(
1579
+ const i = x("bg-muted/70", e && "animate-pulse", ue.shape[r], t);
1580
+ return n > 1 ? /* @__PURE__ */ c(
1129
1581
  "div",
1130
1582
  {
1131
- ref: r,
1132
- className: ae.lineSpacing[o],
1583
+ ref: o,
1584
+ className: ue.lineSpacing[a],
1133
1585
  role: "presentation",
1134
1586
  "aria-hidden": "true",
1135
1587
  "data-testid": "skeleton-container",
1136
- "data-lines": a,
1137
- "data-shape": n,
1588
+ "data-lines": n,
1589
+ "data-shape": r,
1138
1590
  "data-animate": e,
1139
1591
  ...s,
1140
- children: Array.from({ length: a }, (u, d) => /* @__PURE__ */ c(
1592
+ children: Array.from({ length: n }, (u, d) => /* @__PURE__ */ c(
1141
1593
  "div",
1142
1594
  {
1143
- className: w(
1595
+ className: x(
1144
1596
  i,
1145
1597
  // Make last line shorter for a more natural text appearance
1146
- d === a - 1 && "w-3/4"
1598
+ d === n - 1 && "w-3/4"
1147
1599
  ),
1148
1600
  role: "presentation",
1149
1601
  "aria-hidden": "true",
@@ -1156,179 +1608,179 @@ function wt({
1156
1608
  ) : /* @__PURE__ */ c(
1157
1609
  "div",
1158
1610
  {
1159
- ref: r,
1611
+ ref: o,
1160
1612
  className: i,
1161
1613
  role: "presentation",
1162
1614
  "aria-hidden": "true",
1163
1615
  "data-testid": "skeleton",
1164
- "data-shape": n,
1616
+ "data-shape": r,
1165
1617
  "data-animate": e,
1166
1618
  ...s
1167
1619
  }
1168
1620
  );
1169
1621
  }
1170
- function xt({
1171
- id: n,
1172
- value: o,
1622
+ function Lt({
1623
+ id: r,
1624
+ value: a,
1173
1625
  defaultValue: t = 0,
1174
- onValueChange: a,
1626
+ onValueChange: n,
1175
1627
  min: e = 0,
1176
- max: r = 100,
1628
+ max: o = 100,
1177
1629
  step: s = 1,
1178
1630
  disabled: i = !1,
1179
1631
  trackClassName: u,
1180
1632
  rangeClassName: d,
1181
- thumbClassName: m,
1633
+ thumbClassName: f,
1182
1634
  className: l,
1183
- ref: g,
1184
- ariaLabel: f,
1185
- ariaLabelledBy: b,
1186
- ...v
1635
+ ref: b,
1636
+ ariaLabel: m,
1637
+ ariaLabelledBy: v,
1638
+ ...h
1187
1639
  }) {
1188
- const [h, y] = A(t), p = o !== void 0, x = p ? o : h, N = F(null), E = F(!1), V = F(0), k = I(
1189
- (T) => {
1190
- const D = Math.max(e, Math.min(r, T)), B = Math.round(D / s) * s;
1191
- p || y(B), a == null || a(B);
1640
+ const [p, y] = k(t), g = a !== void 0, w = g ? a : p, N = V(null), E = V(!1), L = V(0), I = C(
1641
+ (D) => {
1642
+ const z = Math.max(e, Math.min(o, D)), B = Math.round(z / s) * s;
1643
+ g || y(B), n == null || n(B);
1192
1644
  },
1193
- [e, r, s, p, a]
1194
- ), R = I(
1195
- (T, D = !1) => {
1196
- var K;
1197
- const B = (K = N.current) == null ? void 0 : K.getBoundingClientRect();
1198
- if (!B) return x;
1199
- let M = T.clientX;
1200
- D && (M = M - V.current);
1201
- const _ = Math.max(0, Math.min(1, (M - B.left) / B.width));
1202
- return e + (r - e) * _;
1645
+ [e, o, s, g, n]
1646
+ ), S = C(
1647
+ (D, z = !1) => {
1648
+ var _;
1649
+ const B = (_ = N.current) == null ? void 0 : _.getBoundingClientRect();
1650
+ if (!B) return w;
1651
+ let G = D.clientX;
1652
+ z && (G = G - L.current);
1653
+ const U = Math.max(0, Math.min(1, (G - B.left) / B.width));
1654
+ return e + (o - e) * U;
1203
1655
  },
1204
- [e, r, x]
1205
- ), q = I(
1206
- (T) => {
1207
- if (i || T.target !== T.currentTarget) return;
1208
- const D = R(T);
1209
- k(D);
1656
+ [e, o, w]
1657
+ ), K = C(
1658
+ (D) => {
1659
+ if (i || D.target !== D.currentTarget) return;
1660
+ const z = S(D);
1661
+ I(z);
1210
1662
  },
1211
- [i, R, k]
1212
- ), G = I(
1213
- (T) => {
1214
- var K;
1663
+ [i, S, I]
1664
+ ), P = C(
1665
+ (D) => {
1666
+ var _;
1215
1667
  if (i) return;
1216
- T.stopPropagation(), E.current = !0;
1217
- const D = (K = N.current) == null ? void 0 : K.getBoundingClientRect(), B = T.currentTarget.getBoundingClientRect();
1218
- if (D && B) {
1219
- const P = B.left + B.width / 2;
1220
- V.current = T.clientX - P;
1668
+ D.stopPropagation(), E.current = !0;
1669
+ const z = (_ = N.current) == null ? void 0 : _.getBoundingClientRect(), B = D.currentTarget.getBoundingClientRect();
1670
+ if (z && B) {
1671
+ const q = B.left + B.width / 2;
1672
+ L.current = D.clientX - q;
1221
1673
  }
1222
- T.currentTarget.setPointerCapture(T.pointerId);
1223
- const M = (P) => {
1674
+ D.currentTarget.setPointerCapture(D.pointerId);
1675
+ const G = (q) => {
1224
1676
  if (!E.current) return;
1225
- const de = R(P, !0);
1226
- k(de);
1227
- }, _ = (P) => {
1228
- if (P.pointerId === T.pointerId) {
1229
- E.current = !1, V.current = 0;
1677
+ const O = S(q, !0);
1678
+ I(O);
1679
+ }, U = (q) => {
1680
+ if (q.pointerId === D.pointerId) {
1681
+ E.current = !1, L.current = 0;
1230
1682
  try {
1231
- T.currentTarget.releasePointerCapture(P.pointerId);
1683
+ D.currentTarget.releasePointerCapture(q.pointerId);
1232
1684
  } catch {
1233
1685
  }
1234
- document.removeEventListener("pointermove", M), document.removeEventListener("pointerup", _);
1686
+ document.removeEventListener("pointermove", G), document.removeEventListener("pointerup", U);
1235
1687
  }
1236
1688
  };
1237
- document.addEventListener("pointermove", M), document.addEventListener("pointerup", _);
1689
+ document.addEventListener("pointermove", G), document.addEventListener("pointerup", U);
1238
1690
  },
1239
- [i, R, k]
1240
- ), U = I(
1241
- (T) => {
1691
+ [i, S, I]
1692
+ ), X = C(
1693
+ (D) => {
1242
1694
  if (i) return;
1243
- let D = x;
1244
- switch (T.key) {
1695
+ let z = w;
1696
+ switch (D.key) {
1245
1697
  case "ArrowRight":
1246
1698
  case "ArrowUp":
1247
- D = x + s;
1699
+ z = w + s;
1248
1700
  break;
1249
1701
  case "ArrowLeft":
1250
1702
  case "ArrowDown":
1251
- D = x - s;
1703
+ z = w - s;
1252
1704
  break;
1253
1705
  case "Home":
1254
- D = e;
1706
+ z = e;
1255
1707
  break;
1256
1708
  case "End":
1257
- D = r;
1709
+ z = o;
1258
1710
  break;
1259
1711
  case "PageUp":
1260
- D = x + s * 10;
1712
+ z = w + s * 10;
1261
1713
  break;
1262
1714
  case "PageDown":
1263
- D = x - s * 10;
1715
+ z = w - s * 10;
1264
1716
  break;
1265
1717
  default:
1266
1718
  return;
1267
1719
  }
1268
- T.preventDefault(), k(D);
1720
+ D.preventDefault(), I(z);
1269
1721
  },
1270
- [i, x, s, e, r, k]
1271
- ), H = r === e ? 0 : (x - e) / (r - e) * 100;
1722
+ [i, w, s, e, o, I]
1723
+ ), j = o === e ? 0 : (w - e) / (o - e) * 100;
1272
1724
  return /* @__PURE__ */ c(
1273
1725
  "div",
1274
1726
  {
1275
- id: n,
1276
- ref: g,
1277
- className: L(
1727
+ id: r,
1728
+ ref: b,
1729
+ className: R(
1278
1730
  "relative flex items-center w-full touch-none select-none",
1279
1731
  i && "opacity-50 cursor-not-allowed",
1280
1732
  l
1281
1733
  ),
1282
1734
  "data-disabled": i,
1283
- "data-value": x,
1735
+ "data-value": w,
1284
1736
  "data-min": e,
1285
- "data-max": r,
1737
+ "data-max": o,
1286
1738
  "data-step": s,
1287
- ...v,
1288
- children: /* @__PURE__ */ C(
1739
+ ...h,
1740
+ children: /* @__PURE__ */ T(
1289
1741
  "div",
1290
1742
  {
1291
1743
  ref: N,
1292
- className: L(
1744
+ className: R(
1293
1745
  "relative h-1.5 w-full rounded-full bg-muted cursor-pointer",
1294
1746
  i && "cursor-not-allowed",
1295
1747
  u
1296
1748
  ),
1297
- onPointerDown: q,
1749
+ onPointerDown: K,
1298
1750
  children: [
1299
1751
  /* @__PURE__ */ c(
1300
1752
  "div",
1301
1753
  {
1302
- className: L(
1754
+ className: R(
1303
1755
  "absolute h-full rounded-full pointer-events-none",
1304
1756
  // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior
1305
1757
  !E.current && "transition-all",
1306
1758
  d
1307
1759
  ),
1308
- style: { width: `${H}%` }
1760
+ style: { width: `${j}%` }
1309
1761
  }
1310
1762
  ),
1311
1763
  /* @__PURE__ */ c(
1312
1764
  "div",
1313
1765
  {
1314
- className: L(
1766
+ className: R(
1315
1767
  "absolute size-5 -top-2 rounded-full shadow-md cursor-grab",
1316
1768
  i && "cursor-not-allowed",
1317
1769
  !i && "cursor-grab focus:outline-none focus:ring-2",
1318
1770
  E.current ? "cursor-grabbing scale-110" : "transition-all",
1319
- m
1771
+ f
1320
1772
  ),
1321
- style: { left: `calc(${H}% - 10px)` },
1773
+ style: { left: `calc(${j}% - 10px)` },
1322
1774
  tabIndex: i ? -1 : 0,
1323
1775
  role: "slider",
1324
1776
  "aria-valuemin": e,
1325
- "aria-valuemax": r,
1326
- "aria-valuenow": x,
1327
- "aria-label": f,
1328
- "aria-labelledby": b,
1777
+ "aria-valuemax": o,
1778
+ "aria-valuenow": w,
1779
+ "aria-label": m,
1780
+ "aria-labelledby": v,
1329
1781
  "aria-disabled": i,
1330
- onKeyDown: U,
1331
- onPointerDown: G
1782
+ onKeyDown: X,
1783
+ onPointerDown: P
1332
1784
  }
1333
1785
  )
1334
1786
  ]
@@ -1337,72 +1789,72 @@ function xt({
1337
1789
  }
1338
1790
  );
1339
1791
  }
1340
- function Nt({ children: n, ref: o, ...t }) {
1341
- if (ue(n)) {
1342
- let a = { ...t };
1343
- return n.props && (a = { ...a, ...n.props }), fe(n, {
1344
- ...a,
1792
+ function Vt({ children: r, ref: a, ...t }) {
1793
+ if (we(r)) {
1794
+ let n = { ...t };
1795
+ return r.props && (n = { ...n, ...r.props }), xe(r, {
1796
+ ...n,
1345
1797
  ref: (e) => {
1346
- typeof o == "function" ? o(e) : o && (o.current = e);
1798
+ typeof a == "function" ? a(e) : a && (a.current = e);
1347
1799
  }
1348
1800
  });
1349
1801
  }
1350
- return le("div", { ...t, ref: o }, n);
1802
+ return be("div", { ...t, ref: a }, r);
1351
1803
  }
1352
- const _e = ({ defaultValue: n, value: o, onValueChange: t } = {}) => {
1353
- const [a, e] = A(n || ""), r = o !== void 0, s = r ? o : a, i = I((u) => {
1354
- r || e(u), t == null || t(u);
1355
- }, [r, t]);
1804
+ const nt = ({ defaultValue: r, value: a, onValueChange: t } = {}) => {
1805
+ const [n, e] = k(r || ""), o = a !== void 0, s = o ? a : n, i = C((u) => {
1806
+ o || e(u), t == null || t(u);
1807
+ }, [o, t]);
1356
1808
  return {
1357
1809
  value: s,
1358
1810
  onValueChange: i
1359
1811
  };
1360
1812
  };
1361
- function Et({
1362
- defaultValue: n,
1363
- value: o,
1813
+ function Bt({
1814
+ defaultValue: r,
1815
+ value: a,
1364
1816
  onValueChange: t,
1365
- tabsWidth: a = "fit",
1817
+ tabsWidth: n = "fit",
1366
1818
  variant: e = "underline",
1367
- className: r,
1819
+ className: o,
1368
1820
  children: s,
1369
1821
  ref: i,
1370
1822
  id: u,
1371
1823
  triggersClassName: d,
1372
- contentClassName: m
1824
+ contentClassName: f
1373
1825
  }) {
1374
- const { value: l, onValueChange: g } = _e({
1375
- defaultValue: n,
1376
- value: o,
1826
+ const { value: l, onValueChange: b } = nt({
1827
+ defaultValue: r,
1828
+ value: a,
1377
1829
  onValueChange: t
1378
- }), f = {
1830
+ }), m = {
1379
1831
  selectedValue: l,
1380
- onValueChange: g,
1381
- tabsWidth: a,
1832
+ onValueChange: b,
1833
+ tabsWidth: n,
1382
1834
  variant: e,
1383
1835
  triggersClassName: d,
1384
- contentClassName: m
1836
+ contentClassName: f
1385
1837
  };
1386
- return /* @__PURE__ */ c(Ee.Provider, { value: f, children: /* @__PURE__ */ c("div", { id: u, ref: i, className: r, "data-tabs-width": a, "data-variant": e, children: s }) });
1838
+ return /* @__PURE__ */ c(De.Provider, { value: m, children: /* @__PURE__ */ c("div", { id: u, ref: i, className: o, "data-tabs-width": n, "data-variant": e, children: s }) });
1387
1839
  }
1388
- function Ct({ value: n, className: o, children: t, ref: a }) {
1389
- const { selectedValue: e, contentClassName: r } = te(), s = e === n;
1840
+ function Ht({ value: r, className: a, children: t, ref: n }) {
1841
+ const { selectedValue: e, contentClassName: o } = ae(), s = e === r;
1390
1842
  return s ? /* @__PURE__ */ c(
1391
1843
  "div",
1392
1844
  {
1393
- ref: a,
1845
+ ref: n,
1394
1846
  role: "tabpanel",
1395
- id: `tabs-content-${n}`,
1396
- "aria-labelledby": `tabs-trigger-${n}`,
1847
+ id: `tabs-content-${r}`,
1848
+ "aria-labelledby": `tabs-trigger-${r}`,
1397
1849
  "data-state": s ? "active" : "inactive",
1398
- "data-value": n,
1399
- className: w("mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2", r, o),
1850
+ "data-value": r,
1851
+ className: x("mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2", o, a),
1400
1852
  tabIndex: 0,
1401
1853
  children: t
1402
1854
  }
1403
1855
  ) : null;
1404
1856
  }
1405
- const oe = {
1857
+ const de = {
1406
1858
  width: {
1407
1859
  fit: "w-fit",
1408
1860
  full: "w-full *:flex-1"
@@ -1412,166 +1864,166 @@ const oe = {
1412
1864
  pills: "",
1413
1865
  bordered: "border border-border rounded-lg p-1"
1414
1866
  }
1415
- }, We = {
1867
+ }, at = {
1416
1868
  underline: "border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground",
1417
1869
  pills: "rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30",
1418
1870
  bordered: "rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30"
1419
1871
  };
1420
- function At({ children: n, className: o, id: t, ref: a }) {
1421
- const { tabsWidth: e, variant: r } = te();
1872
+ function Ft({ children: r, className: a, id: t, ref: n }) {
1873
+ const { tabsWidth: e, variant: o } = ae();
1422
1874
  return /* @__PURE__ */ c(
1423
1875
  "div",
1424
1876
  {
1425
1877
  id: t,
1426
- ref: a,
1878
+ ref: n,
1427
1879
  role: "tablist",
1428
- className: w("flex", oe.width[e], oe.variant[r], o),
1880
+ className: x("flex", de.width[e], de.variant[o], a),
1429
1881
  "data-tabs-width": e,
1430
- "data-variant": r,
1431
- children: n
1882
+ "data-variant": o,
1883
+ children: r
1432
1884
  }
1433
1885
  );
1434
1886
  }
1435
- function It({ value: n, disabled: o = !1, className: t, children: a, onClick: e, id: r, ref: s }) {
1436
- const { selectedValue: i, onValueChange: u, variant: d, triggersClassName: m } = te(), l = i === n, g = (b) => {
1437
- o || u(n), e == null || e(b);
1887
+ function jt({ value: r, disabled: a = !1, className: t, children: n, onClick: e, id: o, ref: s }) {
1888
+ const { selectedValue: i, onValueChange: u, variant: d, triggersClassName: f } = ae(), l = i === r, b = (v) => {
1889
+ a || u(r), e == null || e(v);
1438
1890
  };
1439
1891
  return /* @__PURE__ */ c(
1440
1892
  "button",
1441
1893
  {
1442
- id: r,
1894
+ id: o,
1443
1895
  ref: s,
1444
1896
  role: "tab",
1445
1897
  type: "button",
1446
1898
  "aria-selected": l,
1447
- "aria-controls": `tabs-content-${n}`,
1899
+ "aria-controls": `tabs-content-${r}`,
1448
1900
  "data-state": l ? "active" : "inactive",
1449
- "data-value": n,
1450
- disabled: o,
1451
- className: w(
1901
+ "data-value": r,
1902
+ disabled: a,
1903
+ className: x(
1452
1904
  "inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
1453
1905
  l ? "font-medium" : "font-light",
1454
- We[d],
1455
- m,
1906
+ at[d],
1907
+ f,
1456
1908
  t
1457
1909
  ),
1458
- onClick: g,
1459
- children: a
1910
+ onClick: b,
1911
+ children: n
1460
1912
  }
1461
1913
  );
1462
1914
  }
1463
- function Xe({ elementId: n, maxLength: o }) {
1464
- const [t, a] = A(0);
1915
+ function ot({ elementId: r, maxLength: a }) {
1916
+ const [t, n] = k(0);
1465
1917
  return $(() => {
1466
- const e = document.getElementById(n);
1918
+ const e = document.getElementById(r);
1467
1919
  if (!e)
1468
1920
  return;
1469
- const r = () => {
1921
+ const o = () => {
1470
1922
  const s = e.value.length;
1471
- a(s);
1472
- const i = s >= o;
1473
- e.setAttribute("aria-describedby", `${n}-character-count`), e.setAttribute("aria-invalid", i ? "true" : "false"), i ? e.setAttribute("data-error", "true") : e.removeAttribute("data-error");
1923
+ n(s);
1924
+ const i = s >= a;
1925
+ e.setAttribute("aria-describedby", `${r}-character-count`), e.setAttribute("aria-invalid", i ? "true" : "false"), i ? e.setAttribute("data-error", "true") : e.removeAttribute("data-error");
1474
1926
  };
1475
- return r(), e.addEventListener("input", r), e.setAttribute("maxlength", String(o)), () => {
1476
- e.removeEventListener("input", r), e.removeAttribute("maxlength"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-invalid"), e.removeAttribute("data-error");
1927
+ return o(), e.addEventListener("input", o), e.setAttribute("maxlength", String(a)), () => {
1928
+ e.removeEventListener("input", o), e.removeAttribute("maxlength"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-invalid"), e.removeAttribute("data-error");
1477
1929
  };
1478
- }, [n, o]), /* @__PURE__ */ c(
1930
+ }, [r, a]), /* @__PURE__ */ c(
1479
1931
  "small",
1480
1932
  {
1481
- className: w(
1933
+ className: x(
1482
1934
  "mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",
1483
- t >= o && "text-destructive",
1484
- t < o && "text-current"
1935
+ t >= a && "text-destructive",
1936
+ t < a && "text-current"
1485
1937
  ),
1486
1938
  role: "status",
1487
- children: /* @__PURE__ */ C("span", { id: `${n}-character-count`, children: [
1939
+ children: /* @__PURE__ */ T("span", { id: `${r}-character-count`, children: [
1488
1940
  t,
1489
1941
  " / ",
1490
- o,
1942
+ a,
1491
1943
  " characters"
1492
1944
  ] })
1493
1945
  }
1494
1946
  );
1495
1947
  }
1496
- function Qe(n, o) {
1948
+ function st(r, a) {
1497
1949
  $(() => {
1498
- const t = document.getElementById(n);
1950
+ const t = document.getElementById(r);
1499
1951
  if (!t)
1500
1952
  return;
1501
- if (!o) {
1953
+ if (!a) {
1502
1954
  t.style.height = "auto";
1503
1955
  return;
1504
1956
  }
1505
- const a = () => {
1957
+ const n = () => {
1506
1958
  t.style.height = "auto", t.style.height = `${t.scrollHeight}px`;
1507
1959
  };
1508
- return a(), t.addEventListener("input", a), t.addEventListener("resize", a), window.addEventListener("resize", a), () => {
1509
- t.removeEventListener("input", a), t.removeEventListener("resize", a), window.removeEventListener("resize", a);
1960
+ return n(), t.addEventListener("input", n), t.addEventListener("resize", n), window.addEventListener("resize", n), () => {
1961
+ t.removeEventListener("input", n), t.removeEventListener("resize", n), window.removeEventListener("resize", n);
1510
1962
  };
1511
- }, [n, o]);
1963
+ }, [r, a]);
1512
1964
  }
1513
- const Ze = {
1965
+ const it = {
1514
1966
  base: "",
1515
1967
  "left-line": "border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",
1516
1968
  outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"
1517
- }, Je = {
1969
+ }, lt = {
1518
1970
  none: "rounded-none",
1519
1971
  sm: "rounded-sm",
1520
1972
  md: "rounded-md",
1521
1973
  lg: "rounded-lg",
1522
1974
  full: "px-3 rounded-full"
1523
- }, se = {
1975
+ }, fe = {
1524
1976
  variant: "outline",
1525
1977
  rounded: "none"
1526
1978
  };
1527
- function kt({
1528
- variant: n = se.variant,
1529
- rounded: o,
1979
+ function Kt({
1980
+ variant: r = fe.variant,
1981
+ rounded: a,
1530
1982
  displayOnlyMode: t = !1,
1531
- errorMessage: a,
1983
+ errorMessage: n,
1532
1984
  successMessage: e,
1533
- hideResizeHandle: r = !1,
1985
+ hideResizeHandle: o = !1,
1534
1986
  autoExpand: s = !1,
1535
1987
  characterLimit: i = 0,
1536
1988
  className: u,
1537
1989
  ...d
1538
1990
  }) {
1539
- const m = z();
1540
- Qe(m, s || t);
1541
- let l = o;
1542
- n === "outline" && !o && (l = "md"), l = l || se.rounded;
1543
- let g = r;
1544
- (t || n === "left-line" && !r) && (g = !0);
1545
- const b = w(
1991
+ const f = F();
1992
+ st(f, s || t);
1993
+ let l = a;
1994
+ r === "outline" && !a && (l = "md"), l = l || fe.rounded;
1995
+ let b = o;
1996
+ (t || r === "left-line" && !o) && (b = !0);
1997
+ const v = x(
1546
1998
  "appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
1547
- !t && Ze[n],
1548
- !t && Je[l],
1999
+ !t && it[r],
2000
+ !t && lt[l],
1549
2001
  !t && "px-2 py-1",
1550
2002
  t && "pointer-events-none",
1551
- g && "no-resize-handle",
2003
+ b && "no-resize-handle",
1552
2004
  u
1553
2005
  );
1554
- return /* @__PURE__ */ C("div", { className: w("-space-y-1.5", t && "cursor-text"), children: [
2006
+ return /* @__PURE__ */ T("div", { className: x("-space-y-1.5", t && "cursor-text"), children: [
1555
2007
  /* @__PURE__ */ c(
1556
2008
  "textarea",
1557
2009
  {
1558
2010
  ...d,
1559
- id: m,
2011
+ id: f,
1560
2012
  "aria-disabled": d.disabled,
1561
2013
  readOnly: t,
1562
2014
  "aria-readonly": t || d["aria-readonly"],
1563
2015
  style: {
1564
2016
  resize: s ? "none" : void 0
1565
2017
  },
1566
- className: b
2018
+ className: v
1567
2019
  }
1568
2020
  ),
1569
- i > 0 && /* @__PURE__ */ c(Xe, { elementId: m, maxLength: i }),
1570
- !t && /* @__PURE__ */ c(Q, { elementId: m, type: "error", message: a }),
1571
- !t && /* @__PURE__ */ c(Q, { elementId: m, type: "success", message: e })
2021
+ i > 0 && /* @__PURE__ */ c(ot, { elementId: f, maxLength: i }),
2022
+ !t && /* @__PURE__ */ c(Y, { elementId: f, type: "error", message: n }),
2023
+ !t && /* @__PURE__ */ c(Y, { elementId: f, type: "success", message: e })
1572
2024
  ] });
1573
2025
  }
1574
- const Ye = {
2026
+ const ct = {
1575
2027
  sm: {
1576
2028
  container: "h-5 min-w-9 w-9",
1577
2029
  thumb: "h-4 w-4",
@@ -1587,7 +2039,7 @@ const Ye = {
1587
2039
  thumb: "h-6 w-6",
1588
2040
  translate: "translate-x-6"
1589
2041
  }
1590
- }, Oe = {
2042
+ }, ut = {
1591
2043
  default: {
1592
2044
  unchecked: "bg-muted",
1593
2045
  checked: "bg-primary"
@@ -1600,273 +2052,273 @@ const Ye = {
1600
2052
  unchecked: "bg-muted",
1601
2053
  checked: "bg-destructive"
1602
2054
  }
1603
- }, ie = {
2055
+ }, me = {
1604
2056
  variant: "default",
1605
2057
  size: "md"
1606
2058
  };
1607
- function Tt({
1608
- ref: n,
1609
- id: o,
1610
- size: t = ie.size,
1611
- variant: a = ie.variant,
2059
+ function Pt({
2060
+ ref: r,
2061
+ id: a,
2062
+ size: t = me.size,
2063
+ variant: n = me.variant,
1612
2064
  checked: e,
1613
- onCheckedChange: r,
2065
+ onCheckedChange: o,
1614
2066
  disabled: s = !1,
1615
2067
  className: i,
1616
2068
  thumbClassName: u,
1617
2069
  backgroundClassNames: d,
1618
- ...m
2070
+ ...f
1619
2071
  }) {
1620
- const l = z(), g = ee(() => o || `toggle-${l}`, [o, l]), [f, b] = A(e);
2072
+ const l = F(), b = Q(() => a || `toggle-${l}`, [a, l]), [m, v] = k(e);
1621
2073
  $(() => {
1622
- b(e);
2074
+ v(e);
1623
2075
  }, [e]);
1624
- const v = () => {
2076
+ const h = () => {
1625
2077
  if (!s) {
1626
- const E = !f;
1627
- e === void 0 && b(E), r == null || r(E);
2078
+ const E = !m;
2079
+ e === void 0 && v(E), o == null || o(E);
1628
2080
  }
1629
- }, h = (E) => {
1630
- (E.key === " " || E.key === "Enter") && (E.preventDefault(), v());
1631
- }, y = Ye[t], p = Oe[a], x = w(
2081
+ }, p = (E) => {
2082
+ (E.key === " " || E.key === "Enter") && (E.preventDefault(), h());
2083
+ }, y = ct[t], g = ut[n], w = x(
1632
2084
  // Base styles
1633
2085
  "relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out",
1634
2086
  "focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
1635
2087
  // Size
1636
2088
  y.container,
1637
2089
  // Variant and state
1638
- f ? (d == null ? void 0 : d.checked) || p.checked : (d == null ? void 0 : d.unchecked) || p.unchecked,
2090
+ m ? (d == null ? void 0 : d.checked) || g.checked : (d == null ? void 0 : d.unchecked) || g.unchecked,
1639
2091
  // Disabled state
1640
2092
  s && "opacity-50 cursor-not-allowed",
1641
2093
  !s && "cursor-pointer",
1642
2094
  i
1643
- ), N = w(
2095
+ ), N = x(
1644
2096
  // Base thumb styles
1645
2097
  "absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",
1646
2098
  // Size
1647
2099
  y.thumb,
1648
2100
  // Position based on state
1649
- f && y.translate,
2101
+ m && y.translate,
1650
2102
  u
1651
2103
  );
1652
- return /* @__PURE__ */ C(
2104
+ return /* @__PURE__ */ T(
1653
2105
  "button",
1654
2106
  {
1655
- ref: n,
1656
- id: g,
2107
+ ref: r,
2108
+ id: b,
1657
2109
  type: "button",
1658
2110
  role: "switch",
1659
2111
  tabIndex: 0,
1660
- "aria-checked": f,
2112
+ "aria-checked": m,
1661
2113
  "aria-disabled": s,
1662
2114
  disabled: s,
1663
- onClick: v,
1664
- onKeyDown: h,
1665
- className: x,
1666
- ...m,
2115
+ onClick: h,
2116
+ onKeyDown: p,
2117
+ className: w,
2118
+ ...f,
1667
2119
  children: [
1668
2120
  /* @__PURE__ */ c("span", { className: N }),
1669
- /* @__PURE__ */ c("span", { className: "sr-only", children: f ? "Enabled" : "Disabled" })
2121
+ /* @__PURE__ */ c("span", { className: "sr-only", children: m ? "Enabled" : "Disabled" })
1670
2122
  ]
1671
2123
  }
1672
2124
  );
1673
2125
  }
1674
- const W = 8, X = 4, S = 6;
1675
- function et(n) {
1676
- return { calculatePosition: I(
1677
- (t, a) => {
1678
- const e = t.getBoundingClientRect(), r = a.getBoundingClientRect(), s = {
2126
+ const Z = 8, J = 4, M = 6;
2127
+ function dt(r) {
2128
+ return { calculatePosition: C(
2129
+ (t, n) => {
2130
+ const e = t.getBoundingClientRect(), o = n.getBoundingClientRect(), s = {
1679
2131
  width: window.innerWidth,
1680
2132
  height: window.innerHeight
1681
- }, i = (g, f, b, v) => g < 0 || f < 0 || g + b > s.width || f + v > s.height, u = {
2133
+ }, i = (b, m, v, h) => b < 0 || m < 0 || b + v > s.width || m + h > s.height, u = {
1682
2134
  top: {
1683
- x: e.left + e.width / 2 - r.width / 2,
1684
- y: e.top - r.height - X,
2135
+ x: e.left + e.width / 2 - o.width / 2,
2136
+ y: e.top - o.height - J,
1685
2137
  arrow: {
1686
- x: r.width / 2 - S,
1687
- y: r.height
2138
+ x: o.width / 2 - M,
2139
+ y: o.height
1688
2140
  }
1689
2141
  },
1690
2142
  bottom: {
1691
- x: e.left + e.width / 2 - r.width / 2,
1692
- y: e.bottom + X,
2143
+ x: e.left + e.width / 2 - o.width / 2,
2144
+ y: e.bottom + J,
1693
2145
  arrow: {
1694
- x: r.width / 2 - S,
2146
+ x: o.width / 2 - M,
1695
2147
  y: -6
1696
2148
  }
1697
2149
  },
1698
2150
  left: {
1699
- x: e.left - r.width - X,
1700
- y: e.top + e.height / 2 - r.height / 2,
2151
+ x: e.left - o.width - J,
2152
+ y: e.top + e.height / 2 - o.height / 2,
1701
2153
  arrow: {
1702
- x: r.width,
1703
- y: r.height / 2 - S
2154
+ x: o.width,
2155
+ y: o.height / 2 - M
1704
2156
  }
1705
2157
  },
1706
2158
  right: {
1707
- x: e.right + X,
1708
- y: e.top + e.height / 2 - r.height / 2,
2159
+ x: e.right + J,
2160
+ y: e.top + e.height / 2 - o.height / 2,
1709
2161
  arrow: {
1710
2162
  x: -6,
1711
- y: r.height / 2 - S
2163
+ y: o.height / 2 - M
1712
2164
  }
1713
2165
  }
1714
2166
  };
1715
- let d = n, m = u[n];
1716
- if (i(m.x, m.y, r.width, r.height)) {
1717
- const g = {
2167
+ let d = r, f = u[r];
2168
+ if (i(f.x, f.y, o.width, o.height)) {
2169
+ const b = {
1718
2170
  top: "bottom",
1719
2171
  bottom: "top",
1720
2172
  left: "right",
1721
2173
  right: "left"
1722
- }, f = u[g[n]];
1723
- if (!i(f.x, f.y, r.width, r.height))
1724
- d = g[n], m = f;
2174
+ }, m = u[b[r]];
2175
+ if (!i(m.x, m.y, o.width, o.height))
2176
+ d = b[r], f = m;
1725
2177
  else {
1726
- const b = ["top", "bottom", "left", "right"].filter(
1727
- (v) => v !== n && v !== g[n]
2178
+ const v = ["top", "bottom", "left", "right"].filter(
2179
+ (h) => h !== r && h !== b[r]
1728
2180
  );
1729
- for (const v of b) {
1730
- const h = u[v];
1731
- if (!i(h.x, h.y, r.width, r.height)) {
1732
- d = v, m = h;
2181
+ for (const h of v) {
2182
+ const p = u[h];
2183
+ if (!i(p.x, p.y, o.width, o.height)) {
2184
+ d = h, f = p;
1733
2185
  break;
1734
2186
  }
1735
2187
  }
1736
2188
  }
1737
2189
  }
1738
- m.x = Math.max(
1739
- W,
1740
- Math.min(m.x, s.width - r.width - W)
1741
- ), m.y = Math.max(
1742
- W,
1743
- Math.min(m.y, s.height - r.height - W)
2190
+ f.x = Math.max(
2191
+ Z,
2192
+ Math.min(f.x, s.width - o.width - Z)
2193
+ ), f.y = Math.max(
2194
+ Z,
2195
+ Math.min(f.y, s.height - o.height - Z)
1744
2196
  );
1745
2197
  const l = {
1746
2198
  x: e.left + e.width / 2,
1747
2199
  y: e.top + e.height / 2
1748
2200
  };
1749
- return d === "top" || d === "bottom" ? m.arrow.x = Math.max(
1750
- S,
1751
- Math.min(l.x - m.x - S, r.width - S * 2)
1752
- ) : m.arrow.y = Math.max(
1753
- S,
1754
- Math.min(l.y - m.y - S, r.height - S * 2)
2201
+ return d === "top" || d === "bottom" ? f.arrow.x = Math.max(
2202
+ M,
2203
+ Math.min(l.x - f.x - M, o.width - M * 2)
2204
+ ) : f.arrow.y = Math.max(
2205
+ M,
2206
+ Math.min(l.y - f.y - M, o.height - M * 2)
1755
2207
  ), {
1756
- ...m,
2208
+ ...f,
1757
2209
  placement: d
1758
2210
  };
1759
2211
  },
1760
- [n]
2212
+ [r]
1761
2213
  ) };
1762
2214
  }
1763
- function tt(n, o, t) {
1764
- const a = F(null), e = F(null), r = I(() => {
1765
- if (!a.current || !e.current) return;
1766
- const s = n(a.current, e.current);
2215
+ function ft(r, a, t) {
2216
+ const n = V(null), e = V(null), o = C(() => {
2217
+ if (!n.current || !e.current) return;
2218
+ const s = r(n.current, e.current);
1767
2219
  t(s);
1768
- }, [n, t]);
2220
+ }, [r, t]);
1769
2221
  return $(() => {
1770
- if (!o) return;
1771
- const s = () => r();
2222
+ if (!a) return;
2223
+ const s = () => o();
1772
2224
  return window.addEventListener("resize", s), () => {
1773
2225
  window.removeEventListener("resize", s);
1774
2226
  };
1775
- }, [o, r]), {
1776
- triggerRef: a,
2227
+ }, [a, o]), {
2228
+ triggerRef: n,
1777
2229
  tooltipRef: e,
1778
- updatePosition: r
2230
+ updatePosition: o
1779
2231
  };
1780
2232
  }
1781
- function rt(n, o, t, a, e, r, s, i, u) {
1782
- const d = F(null), m = I(() => {
1783
- n || (d.current && clearTimeout(d.current), d.current = window.setTimeout(() => {
2233
+ function mt(r, a, t, n, e, o, s, i, u) {
2234
+ const d = V(null), f = C(() => {
2235
+ r || (d.current && clearTimeout(d.current), d.current = window.setTimeout(() => {
1784
2236
  t(!0), requestAnimationFrame(() => {
1785
- e(), a(!0);
2237
+ e(), n(!0);
1786
2238
  });
1787
- }, o));
1788
- }, [n, o, t, e, a]), l = I(
1789
- (g = !1) => {
1790
- if (d.current && clearTimeout(d.current), g) {
1791
- a(!1), setTimeout(() => t(!1), 150);
2239
+ }, a));
2240
+ }, [r, a, t, e, n]), l = C(
2241
+ (b = !1) => {
2242
+ if (d.current && clearTimeout(d.current), b) {
2243
+ n(!1), setTimeout(() => t(!1), 150);
1792
2244
  return;
1793
2245
  }
1794
2246
  d.current = window.setTimeout(() => {
1795
- a(!1), setTimeout(() => t(!1), 150);
2247
+ n(!1), setTimeout(() => t(!1), 150);
1796
2248
  }, 100);
1797
2249
  },
1798
- [a, t]
2250
+ [n, t]
1799
2251
  );
1800
2252
  return $(() => {
1801
- !r && !s && !i && u && l();
1802
- }, [r, s, i, u, l]), $(() => () => {
2253
+ !o && !s && !i && u && l();
2254
+ }, [o, s, i, u, l]), $(() => () => {
1803
2255
  d.current && clearTimeout(d.current);
1804
2256
  }, []), {
1805
- showTooltip: m,
2257
+ showTooltip: f,
1806
2258
  hideTooltip: l,
1807
2259
  timeoutRef: d
1808
2260
  };
1809
2261
  }
1810
- function $t({
1811
- id: n,
1812
- children: o,
2262
+ function Gt({
2263
+ id: r,
2264
+ children: a,
1813
2265
  message: t,
1814
- placement: a = "top",
2266
+ placement: n = "top",
1815
2267
  disabled: e = !1,
1816
- delay: r = 200,
2268
+ delay: o = 200,
1817
2269
  className: s
1818
2270
  }) {
1819
- const [i, u] = A(!1), [d, m] = A(!1), [l, g] = A(null), [f, b] = A(!1), [v, h] = A(!1), [y, p] = A(!1), { calculatePosition: x } = et(a), { triggerRef: N, tooltipRef: E, updatePosition: V } = tt(x, d, g), { showTooltip: k, hideTooltip: R, timeoutRef: q } = rt(
2271
+ const [i, u] = k(!1), [d, f] = k(!1), [l, b] = k(null), [m, v] = k(!1), [h, p] = k(!1), [y, g] = k(!1), { calculatePosition: w } = dt(n), { triggerRef: N, tooltipRef: E, updatePosition: L } = ft(w, d, b), { showTooltip: I, hideTooltip: S, timeoutRef: K } = mt(
1820
2272
  e,
1821
- r,
1822
- m,
1823
- u,
1824
- V,
2273
+ o,
1825
2274
  f,
1826
- v,
2275
+ u,
2276
+ L,
2277
+ m,
2278
+ h,
1827
2279
  y,
1828
2280
  i
1829
- ), G = z(), U = n ?? G;
1830
- return /* @__PURE__ */ C(O, { children: [
1831
- j.cloneElement(o, {
1832
- ref: (H) => {
1833
- N.current = H;
2281
+ ), P = F(), X = r ?? P;
2282
+ return /* @__PURE__ */ T(ne, { children: [
2283
+ W.cloneElement(a, {
2284
+ ref: (j) => {
2285
+ N.current = j;
1834
2286
  },
1835
2287
  onMouseEnter: () => {
1836
- b(!0), k();
2288
+ v(!0), I();
1837
2289
  },
1838
2290
  onMouseLeave: () => {
1839
- b(!1);
2291
+ v(!1);
1840
2292
  },
1841
2293
  onFocus: () => {
1842
- p(!0), k();
2294
+ g(!0), I();
1843
2295
  },
1844
2296
  onBlur: () => {
1845
- p(!1), R(!0);
2297
+ g(!1), S(!0);
1846
2298
  },
1847
- onKeyDown: (H) => {
1848
- H.key === "Escape" && R(!0);
2299
+ onKeyDown: (j) => {
2300
+ j.key === "Escape" && S(!0);
1849
2301
  },
1850
- "aria-describedby": e ? void 0 : U
2302
+ "aria-describedby": e ? void 0 : X
1851
2303
  }),
1852
- d && re(
2304
+ d && se(
1853
2305
  /* @__PURE__ */ c(
1854
2306
  "div",
1855
2307
  {
1856
2308
  ref: E,
1857
- id: U,
2309
+ id: X,
1858
2310
  role: "tooltip",
1859
- className: w(
2311
+ className: x(
1860
2312
  "fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out",
1861
2313
  i ? "opacity-100" : "opacity-0",
1862
2314
  s
1863
2315
  ),
1864
2316
  style: l ? { left: l.x, top: l.y } : { opacity: 0 },
1865
2317
  onMouseEnter: () => {
1866
- h(!0), q.current && clearTimeout(q.current);
2318
+ p(!0), K.current && clearTimeout(K.current);
1867
2319
  },
1868
2320
  onMouseLeave: () => {
1869
- h(!1);
2321
+ p(!1);
1870
2322
  },
1871
2323
  children: t
1872
2324
  }
@@ -1876,32 +2328,34 @@ function $t({
1876
2328
  ] });
1877
2329
  }
1878
2330
  export {
1879
- dt as Accordion,
1880
- Z as AccordionItem,
1881
- Rt as ActionModal,
1882
- $e as Button,
1883
- Ae as ButtonLoadingDots,
1884
- ut as Checkbox,
1885
- ft as Clickable,
1886
- mt as Input,
1887
- bt as Label,
1888
- ht as Modal,
1889
- pt as Pagination,
1890
- gt as Panel,
1891
- vt as RadioGroup,
1892
- Y as RadioGroupItem,
1893
- Me as RadioInput,
1894
- yt as Separator,
1895
- wt as Skeleton,
1896
- xt as Slider,
1897
- Nt as Slot,
1898
- Et as Tabs,
1899
- Ct as TabsContent,
1900
- At as TabsList,
1901
- It as TabsTrigger,
1902
- kt as Textarea,
1903
- zt as Toast,
1904
- Tt as Toggle,
1905
- $t as Tooltip
2331
+ xt as Accordion,
2332
+ ee as AccordionItem,
2333
+ Wt as ActionModal,
2334
+ Be as Button,
2335
+ Re as ButtonLoadingDots,
2336
+ Nt as Checkbox,
2337
+ Et as Clickable,
2338
+ Tt as Input,
2339
+ At as Label,
2340
+ kt as Modal,
2341
+ It as Pagination,
2342
+ Ct as Panel,
2343
+ $t as RadioGroup,
2344
+ re as RadioGroupItem,
2345
+ Qe as RadioInput,
2346
+ Dt as ScrollArea,
2347
+ zt as Select,
2348
+ Rt as Separator,
2349
+ St as Skeleton,
2350
+ Lt as Slider,
2351
+ Vt as Slot,
2352
+ Bt as Tabs,
2353
+ Ht as TabsContent,
2354
+ Ft as TabsList,
2355
+ jt as TabsTrigger,
2356
+ Kt as Textarea,
2357
+ Ut as Toast,
2358
+ Pt as Toggle,
2359
+ Gt as Tooltip
1906
2360
  };
1907
2361
  //# sourceMappingURL=components.esm.js.map