@arcadeai/design-system 0.7.2 → 0.7.3

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 (69) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/{check-CxcShTlQ.js → check-B5h1DvDs.js} +2 -2
  3. package/dist/{chevron-down-D_a-ccxi.js → chevron-down-DmZMdOiC.js} +2 -2
  4. package/dist/{chevron-right-DriXIqe5.js → chevron-right-BYYHEJjK.js} +2 -2
  5. package/dist/components/ui/atoms/accordion.js +70 -74
  6. package/dist/components/ui/atoms/alert.js +2 -2
  7. package/dist/components/ui/atoms/avatar.js +5 -5
  8. package/dist/components/ui/atoms/badge.js +3 -3
  9. package/dist/components/ui/atoms/breadcrumb.js +5 -5
  10. package/dist/components/ui/atoms/button.js +3 -3
  11. package/dist/components/ui/atoms/card.js +1 -1
  12. package/dist/components/ui/atoms/chart.js +2153 -2154
  13. package/dist/components/ui/atoms/collapsible.js +1 -1
  14. package/dist/components/ui/atoms/command.js +15 -15
  15. package/dist/components/ui/atoms/dialog.js +2 -2
  16. package/dist/components/ui/atoms/dropdown-menu.js +367 -384
  17. package/dist/components/ui/atoms/form.d.ts +1 -1
  18. package/dist/components/ui/atoms/form.js +182 -199
  19. package/dist/components/ui/atoms/hover-card.js +40 -41
  20. package/dist/components/ui/atoms/input.js +1 -1
  21. package/dist/components/ui/atoms/label.js +18 -19
  22. package/dist/components/ui/atoms/popover.js +107 -110
  23. package/dist/components/ui/atoms/progress.js +3 -3
  24. package/dist/components/ui/atoms/resizable.js +8 -8
  25. package/dist/components/ui/atoms/scroll-area.js +82 -84
  26. package/dist/components/ui/atoms/select.js +393 -407
  27. package/dist/components/ui/atoms/separator.js +2 -2
  28. package/dist/components/ui/atoms/sheet.js +2 -2
  29. package/dist/components/ui/atoms/sidebar.js +17 -17
  30. package/dist/components/ui/atoms/skeleton.js +1 -1
  31. package/dist/components/ui/atoms/slider.js +213 -214
  32. package/dist/components/ui/atoms/sonner.js +28 -28
  33. package/dist/components/ui/atoms/switch.js +7 -7
  34. package/dist/components/ui/atoms/table.js +1 -1
  35. package/dist/components/ui/atoms/tabs.js +8 -8
  36. package/dist/components/ui/atoms/textarea.js +1 -1
  37. package/dist/components/ui/atoms/toggle.js +5 -5
  38. package/dist/components/ui/atoms/tooltip.js +103 -104
  39. package/dist/{createLucideIcon-B6fy1GTR.js → createLucideIcon-XRdN60yz.js} +4 -4
  40. package/dist/index-0ioNhtNM.js +10 -0
  41. package/dist/index-437EL2iq.js +52 -0
  42. package/dist/{index-CB1Wkg0G.js → index-5Bhkapwi.js} +2 -3
  43. package/dist/index-B695uy69.js +9 -0
  44. package/dist/{index-CHDs-SiB.js → index-BGQepRFJ.js} +1 -1
  45. package/dist/{index-BAhNQL1u.js → index-BvWMjxZ5.js} +22 -23
  46. package/dist/index-C8_QusYl.js +70 -0
  47. package/dist/index-CCKe-Mpx.js +6 -0
  48. package/dist/{index-DdnpnyX2.js → index-CQhYMnjT.js} +4 -4
  49. package/dist/{index-C9KW2H79.js → index-CpDnqHCm.js} +1 -1
  50. package/dist/{index-CxK6rt_N.js → index-CtSXVDca.js} +8 -8
  51. package/dist/{index-umR1UobZ.js → index-Cv867SGx.js} +1 -1
  52. package/dist/{index-CuMpq4Un.js → index-CxO14pcK.js} +2 -2
  53. package/dist/index-DFZozV_h.js +68 -0
  54. package/dist/index-DLfXSskr.js +255 -0
  55. package/dist/{index-D2uXV4lz.js → index-DMCYNwtg.js} +8 -8
  56. package/dist/index-DYHsXnnS.js +144 -0
  57. package/dist/{index-nluJZSbA.js → index-DfNPZZ8M.js} +1 -1
  58. package/dist/{index-Dy7YuPrV.js → index-f0YS5Ufh.js} +319 -321
  59. package/dist/lib/utils.js +1 -1
  60. package/dist/{utils-Dy2WjYNJ.js → utils-CRiPKpXj.js} +41 -42
  61. package/package.json +32 -26
  62. package/dist/index-CL4N9wMT.js +0 -259
  63. package/dist/index-DLeNytVF.js +0 -9
  64. package/dist/index-DYfkNB0n.js +0 -54
  65. package/dist/index-DuekHEmj.js +0 -6
  66. package/dist/index-DwYXX2sM.js +0 -13
  67. package/dist/index-QMp1pYFl.js +0 -145
  68. package/dist/index-UFb2E87s.js +0 -70
  69. package/dist/index-p7nYL7BU.js +0 -71
@@ -1,69 +1,68 @@
1
1
  import { jsx as m, jsxs as j } from "react/jsx-runtime";
2
- import * as d from "react";
2
+ import * as c from "react";
3
3
  import { c as X } from "../../../index-rKs9bXHr.js";
4
- import { c as C } from "../../../index-DLeNytVF.js";
5
- import { u as A } from "../../../index-CB1Wkg0G.js";
6
- import { c as de } from "../../../index-UFb2E87s.js";
7
- import { u as ue } from "../../../index-DYfkNB0n.js";
4
+ import { c as _ } from "../../../index-B695uy69.js";
5
+ import { u as C } from "../../../index-5Bhkapwi.js";
6
+ import { c as de } from "../../../index-DFZozV_h.js";
7
+ import { u as ue } from "../../../index-437EL2iq.js";
8
8
  import { u as fe } from "../../../index-ByaXH_ih.js";
9
9
  import { u as me } from "../../../index-BZPx6jYI.js";
10
- import { u as pe } from "../../../index-CHDs-SiB.js";
11
- import { P as T } from "../../../index-C9KW2H79.js";
12
- import { c as he } from "../../../index-CuMpq4Un.js";
13
- import { c as H } from "../../../utils-Dy2WjYNJ.js";
10
+ import { u as pe } from "../../../index-BGQepRFJ.js";
11
+ import { P as B } from "../../../index-CpDnqHCm.js";
12
+ import { c as Se } from "../../../index-CxO14pcK.js";
13
+ import { c as H } from "../../../utils-CRiPKpXj.js";
14
14
  var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = {
15
15
  "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
16
16
  "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
17
17
  "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
18
18
  "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
19
- }, M = "Slider", [L, Se, ge] = he(M), [J, Xe] = de(M, [
19
+ }, M = "Slider", [L, he, ge] = Se(M), [J, Xe] = de(M, [
20
20
  ge
21
- ]), [ve, k] = J(M), Q = d.forwardRef(
21
+ ]), [ve, T] = J(M), Q = c.forwardRef(
22
22
  (e, t) => {
23
23
  const {
24
24
  name: o,
25
25
  min: n = 0,
26
- max: i = 100,
27
- step: c = 1,
28
- orientation: r = "horizontal",
29
- disabled: a = !1,
30
- minStepsBetweenThumbs: l = 0,
31
- defaultValue: S = [n],
32
- value: g,
33
- onValueChange: s = () => {
26
+ max: r = 100,
27
+ step: l = 1,
28
+ orientation: i = "horizontal",
29
+ disabled: s = !1,
30
+ minStepsBetweenThumbs: d = 0,
31
+ defaultValue: w = [n],
32
+ value: h,
33
+ onValueChange: a = () => {
34
34
  },
35
35
  onValueCommit: u = () => {
36
36
  },
37
- inverted: b = !1,
37
+ inverted: v = !1,
38
38
  form: R,
39
- ...v
40
- } = e, p = d.useRef(/* @__PURE__ */ new Set()), f = d.useRef(0), w = r === "horizontal" ? be : we, [h = [], I] = ue({
41
- prop: g,
42
- defaultProp: S,
39
+ ...g
40
+ } = e, p = c.useRef(/* @__PURE__ */ new Set()), f = c.useRef(0), b = i === "horizontal" ? we : be, [S = [], A] = ue({
41
+ prop: h,
42
+ defaultProp: w,
43
43
  onChange: (y) => {
44
- var _;
45
- (_ = [...p.current][f.current]) == null || _.focus(), s(y);
44
+ [...p.current][f.current]?.focus(), a(y);
46
45
  }
47
- }), V = d.useRef(h);
48
- function N(y) {
49
- const P = De(h, y);
50
- B(y, P);
46
+ }), k = c.useRef(S);
47
+ function V(y) {
48
+ const P = De(S, y);
49
+ K(y, P);
51
50
  }
52
- function ce(y) {
53
- B(y, f.current);
51
+ function le(y) {
52
+ K(y, f.current);
54
53
  }
55
- function le() {
56
- const y = V.current[f.current];
57
- h[f.current] !== y && u(h);
54
+ function ce() {
55
+ const y = k.current[f.current];
56
+ S[f.current] !== y && u(S);
58
57
  }
59
- function B(y, P, { commit: _ } = { commit: !1 }) {
60
- const Y = Ae(c), z = Me(Math.round((y - n) / c) * c + n, Y), K = X(z, [n, i]);
61
- I((E = []) => {
62
- const x = Pe(E, K, P);
63
- if (Ce(x, l * c)) {
64
- f.current = x.indexOf(K);
58
+ function K(y, P, { commit: z } = { commit: !1 }) {
59
+ const Y = Me(l), N = Ae(Math.round((y - n) / l) * l + n, Y), I = X(N, [n, r]);
60
+ A((E = []) => {
61
+ const x = Pe(E, I, P);
62
+ if (Ce(x, d * l)) {
63
+ f.current = x.indexOf(I);
65
64
  const $ = String(x) !== String(E);
66
- return $ && _ && u(x), $ ? x : E;
65
+ return $ && z && u(x), $ ? x : E;
67
66
  } else
68
67
  return E;
69
68
  });
@@ -73,36 +72,36 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
73
72
  {
74
73
  scope: e.__scopeSlider,
75
74
  name: o,
76
- disabled: a,
75
+ disabled: s,
77
76
  min: n,
78
- max: i,
77
+ max: r,
79
78
  valueIndexToChangeRef: f,
80
79
  thumbs: p.current,
81
- values: h,
82
- orientation: r,
80
+ values: S,
81
+ orientation: i,
83
82
  form: R,
84
83
  children: /* @__PURE__ */ m(L.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(L.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
85
- w,
84
+ b,
86
85
  {
87
- "aria-disabled": a,
88
- "data-disabled": a ? "" : void 0,
89
- ...v,
86
+ "aria-disabled": s,
87
+ "data-disabled": s ? "" : void 0,
88
+ ...g,
90
89
  ref: t,
91
- onPointerDown: C(v.onPointerDown, () => {
92
- a || (V.current = h);
90
+ onPointerDown: _(g.onPointerDown, () => {
91
+ s || (k.current = S);
93
92
  }),
94
93
  min: n,
95
- max: i,
96
- inverted: b,
97
- onSlideStart: a ? void 0 : N,
98
- onSlideMove: a ? void 0 : ce,
99
- onSlideEnd: a ? void 0 : le,
100
- onHomeKeyDown: () => !a && B(n, 0, { commit: !0 }),
101
- onEndKeyDown: () => !a && B(i, h.length - 1, { commit: !0 }),
94
+ max: r,
95
+ inverted: v,
96
+ onSlideStart: s ? void 0 : V,
97
+ onSlideMove: s ? void 0 : le,
98
+ onSlideEnd: s ? void 0 : ce,
99
+ onHomeKeyDown: () => !s && K(n, 0, { commit: !0 }),
100
+ onEndKeyDown: () => !s && K(r, S.length - 1, { commit: !0 }),
102
101
  onStepKeyDown: ({ event: y, direction: P }) => {
103
- if (!a) {
104
- const z = G.includes(y.key) || y.shiftKey && W.includes(y.key) ? 10 : 1, K = f.current, E = h[K], x = c * z * P;
105
- B(E + x, K, { commit: !0 });
102
+ if (!s) {
103
+ const N = G.includes(y.key) || y.shiftKey && W.includes(y.key) ? 10 : 1, I = f.current, E = S[I], x = l * N * P;
104
+ K(E + x, I, { commit: !0 });
106
105
  }
107
106
  }
108
107
  }
@@ -117,22 +116,22 @@ var [Z, ee] = J(M, {
117
116
  endEdge: "right",
118
117
  size: "width",
119
118
  direction: 1
120
- }), be = d.forwardRef(
119
+ }), we = c.forwardRef(
121
120
  (e, t) => {
122
121
  const {
123
122
  min: o,
124
123
  max: n,
125
- dir: i,
126
- inverted: c,
127
- onSlideStart: r,
128
- onSlideMove: a,
129
- onSlideEnd: l,
130
- onStepKeyDown: S,
131
- ...g
132
- } = e, [s, u] = d.useState(null), b = A(t, (w) => u(w)), R = d.useRef(void 0), v = fe(i), p = v === "ltr", f = p && !c || !p && c;
133
- function D(w) {
134
- const h = R.current || s.getBoundingClientRect(), I = [0, h.width], N = F(I, f ? [o, n] : [n, o]);
135
- return R.current = h, N(w - h.left);
124
+ dir: r,
125
+ inverted: l,
126
+ onSlideStart: i,
127
+ onSlideMove: s,
128
+ onSlideEnd: d,
129
+ onStepKeyDown: w,
130
+ ...h
131
+ } = e, [a, u] = c.useState(null), v = C(t, (b) => u(b)), R = c.useRef(void 0), g = fe(r), p = g === "ltr", f = p && !l || !p && l;
132
+ function D(b) {
133
+ const S = R.current || a.getBoundingClientRect(), A = [0, S.width], V = F(A, f ? [o, n] : [n, o]);
134
+ return R.current = S, V(b - S.left);
136
135
  }
137
136
  return /* @__PURE__ */ m(
138
137
  Z,
@@ -145,130 +144,130 @@ var [Z, ee] = J(M, {
145
144
  children: /* @__PURE__ */ m(
146
145
  te,
147
146
  {
148
- dir: v,
147
+ dir: g,
149
148
  "data-orientation": "horizontal",
150
- ...g,
151
- ref: b,
149
+ ...h,
150
+ ref: v,
152
151
  style: {
153
- ...g.style,
152
+ ...h.style,
154
153
  "--radix-slider-thumb-transform": "translateX(-50%)"
155
154
  },
156
- onSlideStart: (w) => {
157
- const h = D(w.clientX);
158
- r == null || r(h);
155
+ onSlideStart: (b) => {
156
+ const S = D(b.clientX);
157
+ i?.(S);
159
158
  },
160
- onSlideMove: (w) => {
161
- const h = D(w.clientX);
162
- a == null || a(h);
159
+ onSlideMove: (b) => {
160
+ const S = D(b.clientX);
161
+ s?.(S);
163
162
  },
164
163
  onSlideEnd: () => {
165
- R.current = void 0, l == null || l();
164
+ R.current = void 0, d?.();
166
165
  },
167
- onStepKeyDown: (w) => {
168
- const I = q[f ? "from-left" : "from-right"].includes(w.key);
169
- S == null || S({ event: w, direction: I ? -1 : 1 });
166
+ onStepKeyDown: (b) => {
167
+ const A = q[f ? "from-left" : "from-right"].includes(b.key);
168
+ w?.({ event: b, direction: A ? -1 : 1 });
170
169
  }
171
170
  }
172
171
  )
173
172
  }
174
173
  );
175
174
  }
176
- ), we = d.forwardRef(
175
+ ), be = c.forwardRef(
177
176
  (e, t) => {
178
177
  const {
179
178
  min: o,
180
179
  max: n,
181
- inverted: i,
182
- onSlideStart: c,
183
- onSlideMove: r,
184
- onSlideEnd: a,
185
- onStepKeyDown: l,
186
- ...S
187
- } = e, g = d.useRef(null), s = A(t, g), u = d.useRef(void 0), b = !i;
188
- function R(v) {
189
- const p = u.current || g.current.getBoundingClientRect(), f = [0, p.height], w = F(f, b ? [n, o] : [o, n]);
190
- return u.current = p, w(v - p.top);
180
+ inverted: r,
181
+ onSlideStart: l,
182
+ onSlideMove: i,
183
+ onSlideEnd: s,
184
+ onStepKeyDown: d,
185
+ ...w
186
+ } = e, h = c.useRef(null), a = C(t, h), u = c.useRef(void 0), v = !r;
187
+ function R(g) {
188
+ const p = u.current || h.current.getBoundingClientRect(), f = [0, p.height], b = F(f, v ? [n, o] : [o, n]);
189
+ return u.current = p, b(g - p.top);
191
190
  }
192
191
  return /* @__PURE__ */ m(
193
192
  Z,
194
193
  {
195
194
  scope: e.__scopeSlider,
196
- startEdge: b ? "bottom" : "top",
197
- endEdge: b ? "top" : "bottom",
195
+ startEdge: v ? "bottom" : "top",
196
+ endEdge: v ? "top" : "bottom",
198
197
  size: "height",
199
- direction: b ? 1 : -1,
198
+ direction: v ? 1 : -1,
200
199
  children: /* @__PURE__ */ m(
201
200
  te,
202
201
  {
203
202
  "data-orientation": "vertical",
204
- ...S,
205
- ref: s,
203
+ ...w,
204
+ ref: a,
206
205
  style: {
207
- ...S.style,
206
+ ...w.style,
208
207
  "--radix-slider-thumb-transform": "translateY(50%)"
209
208
  },
210
- onSlideStart: (v) => {
211
- const p = R(v.clientY);
212
- c == null || c(p);
209
+ onSlideStart: (g) => {
210
+ const p = R(g.clientY);
211
+ l?.(p);
213
212
  },
214
- onSlideMove: (v) => {
215
- const p = R(v.clientY);
216
- r == null || r(p);
213
+ onSlideMove: (g) => {
214
+ const p = R(g.clientY);
215
+ i?.(p);
217
216
  },
218
217
  onSlideEnd: () => {
219
- u.current = void 0, a == null || a();
218
+ u.current = void 0, s?.();
220
219
  },
221
- onStepKeyDown: (v) => {
222
- const f = q[b ? "from-bottom" : "from-top"].includes(v.key);
223
- l == null || l({ event: v, direction: f ? -1 : 1 });
220
+ onStepKeyDown: (g) => {
221
+ const f = q[v ? "from-bottom" : "from-top"].includes(g.key);
222
+ d?.({ event: g, direction: f ? -1 : 1 });
224
223
  }
225
224
  }
226
225
  )
227
226
  }
228
227
  );
229
228
  }
230
- ), te = d.forwardRef(
229
+ ), te = c.forwardRef(
231
230
  (e, t) => {
232
231
  const {
233
232
  __scopeSlider: o,
234
233
  onSlideStart: n,
235
- onSlideMove: i,
236
- onSlideEnd: c,
237
- onHomeKeyDown: r,
238
- onEndKeyDown: a,
239
- onStepKeyDown: l,
240
- ...S
241
- } = e, g = k(M, o);
234
+ onSlideMove: r,
235
+ onSlideEnd: l,
236
+ onHomeKeyDown: i,
237
+ onEndKeyDown: s,
238
+ onStepKeyDown: d,
239
+ ...w
240
+ } = e, h = T(M, o);
242
241
  return /* @__PURE__ */ m(
243
- T.span,
242
+ B.span,
244
243
  {
245
- ...S,
244
+ ...w,
246
245
  ref: t,
247
- onKeyDown: C(e.onKeyDown, (s) => {
248
- s.key === "Home" ? (r(s), s.preventDefault()) : s.key === "End" ? (a(s), s.preventDefault()) : G.concat(W).includes(s.key) && (l(s), s.preventDefault());
246
+ onKeyDown: _(e.onKeyDown, (a) => {
247
+ a.key === "Home" ? (i(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : G.concat(W).includes(a.key) && (d(a), a.preventDefault());
249
248
  }),
250
- onPointerDown: C(e.onPointerDown, (s) => {
251
- const u = s.target;
252
- u.setPointerCapture(s.pointerId), s.preventDefault(), g.thumbs.has(u) ? u.focus() : n(s);
249
+ onPointerDown: _(e.onPointerDown, (a) => {
250
+ const u = a.target;
251
+ u.setPointerCapture(a.pointerId), a.preventDefault(), h.thumbs.has(u) ? u.focus() : n(a);
253
252
  }),
254
- onPointerMove: C(e.onPointerMove, (s) => {
255
- s.target.hasPointerCapture(s.pointerId) && i(s);
253
+ onPointerMove: _(e.onPointerMove, (a) => {
254
+ a.target.hasPointerCapture(a.pointerId) && r(a);
256
255
  }),
257
- onPointerUp: C(e.onPointerUp, (s) => {
258
- const u = s.target;
259
- u.hasPointerCapture(s.pointerId) && (u.releasePointerCapture(s.pointerId), c(s));
256
+ onPointerUp: _(e.onPointerUp, (a) => {
257
+ const u = a.target;
258
+ u.hasPointerCapture(a.pointerId) && (u.releasePointerCapture(a.pointerId), l(a));
260
259
  })
261
260
  }
262
261
  );
263
262
  }
264
- ), oe = "SliderTrack", ne = d.forwardRef(
263
+ ), oe = "SliderTrack", ne = c.forwardRef(
265
264
  (e, t) => {
266
- const { __scopeSlider: o, ...n } = e, i = k(oe, o);
265
+ const { __scopeSlider: o, ...n } = e, r = T(oe, o);
267
266
  return /* @__PURE__ */ m(
268
- T.span,
267
+ B.span,
269
268
  {
270
- "data-disabled": i.disabled ? "" : void 0,
271
- "data-orientation": i.orientation,
269
+ "data-disabled": r.disabled ? "" : void 0,
270
+ "data-orientation": r.orientation,
272
271
  ...n,
273
272
  ref: t
274
273
  }
@@ -276,79 +275,79 @@ var [Z, ee] = J(M, {
276
275
  }
277
276
  );
278
277
  ne.displayName = oe;
279
- var O = "SliderRange", re = d.forwardRef(
278
+ var O = "SliderRange", re = c.forwardRef(
280
279
  (e, t) => {
281
- const { __scopeSlider: o, ...n } = e, i = k(O, o), c = ee(O, o), r = d.useRef(null), a = A(t, r), l = i.values.length, S = i.values.map(
282
- (u) => se(u, i.min, i.max)
283
- ), g = l > 1 ? Math.min(...S) : 0, s = 100 - Math.max(...S);
280
+ const { __scopeSlider: o, ...n } = e, r = T(O, o), l = ee(O, o), i = c.useRef(null), s = C(t, i), d = r.values.length, w = r.values.map(
281
+ (u) => se(u, r.min, r.max)
282
+ ), h = d > 1 ? Math.min(...w) : 0, a = 100 - Math.max(...w);
284
283
  return /* @__PURE__ */ m(
285
- T.span,
284
+ B.span,
286
285
  {
287
- "data-orientation": i.orientation,
288
- "data-disabled": i.disabled ? "" : void 0,
286
+ "data-orientation": r.orientation,
287
+ "data-disabled": r.disabled ? "" : void 0,
289
288
  ...n,
290
- ref: a,
289
+ ref: s,
291
290
  style: {
292
291
  ...e.style,
293
- [c.startEdge]: g + "%",
294
- [c.endEdge]: s + "%"
292
+ [l.startEdge]: h + "%",
293
+ [l.endEdge]: a + "%"
295
294
  }
296
295
  }
297
296
  );
298
297
  }
299
298
  );
300
299
  re.displayName = O;
301
- var U = "SliderThumb", ie = d.forwardRef(
300
+ var U = "SliderThumb", ie = c.forwardRef(
302
301
  (e, t) => {
303
- const o = Se(e.__scopeSlider), [n, i] = d.useState(null), c = A(t, (a) => i(a)), r = d.useMemo(
304
- () => n ? o().findIndex((a) => a.ref.current === n) : -1,
302
+ const o = he(e.__scopeSlider), [n, r] = c.useState(null), l = C(t, (s) => r(s)), i = c.useMemo(
303
+ () => n ? o().findIndex((s) => s.ref.current === n) : -1,
305
304
  [o, n]
306
305
  );
307
- return /* @__PURE__ */ m(ye, { ...e, ref: c, index: r });
306
+ return /* @__PURE__ */ m(ye, { ...e, ref: l, index: i });
308
307
  }
309
- ), ye = d.forwardRef(
308
+ ), ye = c.forwardRef(
310
309
  (e, t) => {
311
- const { __scopeSlider: o, index: n, name: i, ...c } = e, r = k(U, o), a = ee(U, o), [l, S] = d.useState(null), g = A(t, (D) => S(D)), s = l ? r.form || !!l.closest("form") : !0, u = pe(l), b = r.values[n], R = b === void 0 ? 0 : se(b, r.min, r.max), v = xe(n, r.values.length), p = u == null ? void 0 : u[a.size], f = p ? _e(p, R, a.direction) : 0;
312
- return d.useEffect(() => {
313
- if (l)
314
- return r.thumbs.add(l), () => {
315
- r.thumbs.delete(l);
310
+ const { __scopeSlider: o, index: n, name: r, ...l } = e, i = T(U, o), s = ee(U, o), [d, w] = c.useState(null), h = C(t, (D) => w(D)), a = d ? i.form || !!d.closest("form") : !0, u = pe(d), v = i.values[n], R = v === void 0 ? 0 : se(v, i.min, i.max), g = xe(n, i.values.length), p = u?.[s.size], f = p ? Ee(p, R, s.direction) : 0;
311
+ return c.useEffect(() => {
312
+ if (d)
313
+ return i.thumbs.add(d), () => {
314
+ i.thumbs.delete(d);
316
315
  };
317
- }, [l, r.thumbs]), /* @__PURE__ */ j(
316
+ }, [d, i.thumbs]), /* @__PURE__ */ j(
318
317
  "span",
319
318
  {
320
319
  style: {
321
320
  transform: "var(--radix-slider-thumb-transform)",
322
321
  position: "absolute",
323
- [a.startEdge]: `calc(${R}% + ${f}px)`
322
+ [s.startEdge]: `calc(${R}% + ${f}px)`
324
323
  },
325
324
  children: [
326
325
  /* @__PURE__ */ m(L.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
327
- T.span,
326
+ B.span,
328
327
  {
329
328
  role: "slider",
330
- "aria-label": e["aria-label"] || v,
331
- "aria-valuemin": r.min,
332
- "aria-valuenow": b,
333
- "aria-valuemax": r.max,
334
- "aria-orientation": r.orientation,
335
- "data-orientation": r.orientation,
336
- "data-disabled": r.disabled ? "" : void 0,
337
- tabIndex: r.disabled ? void 0 : 0,
338
- ...c,
339
- ref: g,
340
- style: b === void 0 ? { display: "none" } : e.style,
341
- onFocus: C(e.onFocus, () => {
342
- r.valueIndexToChangeRef.current = n;
329
+ "aria-label": e["aria-label"] || g,
330
+ "aria-valuemin": i.min,
331
+ "aria-valuenow": v,
332
+ "aria-valuemax": i.max,
333
+ "aria-orientation": i.orientation,
334
+ "data-orientation": i.orientation,
335
+ "data-disabled": i.disabled ? "" : void 0,
336
+ tabIndex: i.disabled ? void 0 : 0,
337
+ ...l,
338
+ ref: h,
339
+ style: v === void 0 ? { display: "none" } : e.style,
340
+ onFocus: _(e.onFocus, () => {
341
+ i.valueIndexToChangeRef.current = n;
343
342
  })
344
343
  }
345
344
  ) }),
346
- s && /* @__PURE__ */ m(
345
+ a && /* @__PURE__ */ m(
347
346
  ae,
348
347
  {
349
- name: i ?? (r.name ? r.name + (r.values.length > 1 ? "[]" : "") : void 0),
350
- form: r.form,
351
- value: b
348
+ name: r ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
349
+ form: i.form,
350
+ value: v
352
351
  },
353
352
  n
354
353
  )
@@ -358,23 +357,23 @@ var U = "SliderThumb", ie = d.forwardRef(
358
357
  }
359
358
  );
360
359
  ie.displayName = U;
361
- var Re = "RadioBubbleInput", ae = d.forwardRef(
360
+ var Re = "RadioBubbleInput", ae = c.forwardRef(
362
361
  ({ __scopeSlider: e, value: t, ...o }, n) => {
363
- const i = d.useRef(null), c = A(i, n), r = me(t);
364
- return d.useEffect(() => {
365
- const a = i.current;
366
- if (!a) return;
367
- const l = window.HTMLInputElement.prototype, g = Object.getOwnPropertyDescriptor(l, "value").set;
368
- if (r !== t && g) {
369
- const s = new Event("input", { bubbles: !0 });
370
- g.call(a, t), a.dispatchEvent(s);
362
+ const r = c.useRef(null), l = C(r, n), i = me(t);
363
+ return c.useEffect(() => {
364
+ const s = r.current;
365
+ if (!s) return;
366
+ const d = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(d, "value").set;
367
+ if (i !== t && h) {
368
+ const a = new Event("input", { bubbles: !0 });
369
+ h.call(s, t), s.dispatchEvent(a);
371
370
  }
372
- }, [r, t]), /* @__PURE__ */ m(
373
- T.input,
371
+ }, [i, t]), /* @__PURE__ */ m(
372
+ B.input,
374
373
  {
375
374
  style: { display: "none" },
376
375
  ...o,
377
- ref: c,
376
+ ref: l,
378
377
  defaultValue: t
379
378
  }
380
379
  );
@@ -383,30 +382,30 @@ var Re = "RadioBubbleInput", ae = d.forwardRef(
383
382
  ae.displayName = Re;
384
383
  function Pe(e = [], t, o) {
385
384
  const n = [...e];
386
- return n[o] = t, n.sort((i, c) => i - c);
385
+ return n[o] = t, n.sort((r, l) => r - l);
387
386
  }
388
387
  function se(e, t, o) {
389
- const c = 100 / (o - t) * (e - t);
390
- return X(c, [0, 100]);
388
+ const l = 100 / (o - t) * (e - t);
389
+ return X(l, [0, 100]);
391
390
  }
392
391
  function xe(e, t) {
393
392
  return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
394
393
  }
395
394
  function De(e, t) {
396
395
  if (e.length === 1) return 0;
397
- const o = e.map((i) => Math.abs(i - t)), n = Math.min(...o);
396
+ const o = e.map((r) => Math.abs(r - t)), n = Math.min(...o);
398
397
  return o.indexOf(n);
399
398
  }
400
- function _e(e, t, o) {
401
- const n = e / 2, c = F([0, 50], [0, n]);
402
- return (n - c(t) * o) * o;
399
+ function Ee(e, t, o) {
400
+ const n = e / 2, l = F([0, 50], [0, n]);
401
+ return (n - l(t) * o) * o;
403
402
  }
404
- function Ee(e) {
403
+ function _e(e) {
405
404
  return e.slice(0, -1).map((t, o) => e[o + 1] - t);
406
405
  }
407
406
  function Ce(e, t) {
408
407
  if (t > 0) {
409
- const o = Ee(e);
408
+ const o = _e(e);
410
409
  return Math.min(...o) >= t;
411
410
  }
412
411
  return !0;
@@ -418,25 +417,25 @@ function F(e, t) {
418
417
  return t[0] + n * (o - e[0]);
419
418
  };
420
419
  }
421
- function Ae(e) {
420
+ function Me(e) {
422
421
  return (String(e).split(".")[1] || "").length;
423
422
  }
424
- function Me(e, t) {
423
+ function Ae(e, t) {
425
424
  const o = Math.pow(10, t);
426
425
  return Math.round(e * o) / o;
427
426
  }
428
- var Ie = Q, Be = ne, Ke = re, Te = ie;
427
+ var Ke = Q, Ie = ne, Be = re, Te = ie;
429
428
  function Ge({
430
429
  className: e,
431
430
  defaultValue: t,
432
431
  value: o,
433
432
  min: n = 0,
434
- max: i = 100,
435
- ...c
433
+ max: r = 100,
434
+ ...l
436
435
  }) {
437
- const r = d.useMemo(() => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, i], [o, t, n, i]);
436
+ const i = c.useMemo(() => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, r], [o, t, n, r]);
438
437
  return /* @__PURE__ */ j(
439
- Ie,
438
+ Ke,
440
439
  {
441
440
  className: H(
442
441
  "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",
@@ -444,20 +443,20 @@ function Ge({
444
443
  ),
445
444
  "data-slot": "slider",
446
445
  defaultValue: t,
447
- max: i,
446
+ max: r,
448
447
  min: n,
449
448
  value: o,
450
- ...c,
449
+ ...l,
451
450
  children: [
452
451
  /* @__PURE__ */ m(
453
- Be,
452
+ Ie,
454
453
  {
455
454
  className: H(
456
455
  "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5"
457
456
  ),
458
457
  "data-slot": "slider-track",
459
458
  children: /* @__PURE__ */ m(
460
- Ke,
459
+ Be,
461
460
  {
462
461
  className: H(
463
462
  "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
@@ -467,13 +466,13 @@ function Ge({
467
466
  )
468
467
  }
469
468
  ),
470
- Array.from({ length: r.length }, (a, l) => /* @__PURE__ */ m(
469
+ Array.from({ length: i.length }, (s, d) => /* @__PURE__ */ m(
471
470
  Te,
472
471
  {
473
472
  className: "block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50",
474
473
  "data-slot": "slider-thumb"
475
474
  },
476
- l
475
+ d
477
476
  ))
478
477
  ]
479
478
  }