@adamosuiteservices/ui 2.13.1 → 2.13.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 (46) hide show
  1. package/dist/components/ui/file-upload/file-upload.d.ts +11 -3
  2. package/dist/components/ui/slider/slider.d.ts +5 -2
  3. package/dist/components/ui/typography/typography.d.ts +1 -1
  4. package/dist/file-upload.cjs +6 -18
  5. package/dist/file-upload.js +264 -134
  6. package/dist/slider.cjs +6 -7
  7. package/dist/slider.js +191 -177
  8. package/dist/styles.css +1 -1
  9. package/dist/typography-Bj8oEDuE.cjs +1 -0
  10. package/dist/typography-MnY0LQoZ.js +50 -0
  11. package/dist/typography.cjs +1 -1
  12. package/dist/typography.js +1 -1
  13. package/docs/AI-GUIDE.md +321 -321
  14. package/docs/components/layout/sidebar.md +399 -399
  15. package/docs/components/layout/toaster.md +436 -436
  16. package/docs/components/ui/accordion-rounded.md +584 -584
  17. package/docs/components/ui/accordion.md +269 -269
  18. package/docs/components/ui/calendar.md +1159 -1159
  19. package/docs/components/ui/card.md +1455 -1455
  20. package/docs/components/ui/checkbox.md +292 -292
  21. package/docs/components/ui/collapsible.md +323 -323
  22. package/docs/components/ui/dialog.md +628 -628
  23. package/docs/components/ui/field.md +706 -706
  24. package/docs/components/ui/file-upload.md +475 -66
  25. package/docs/components/ui/hover-card.md +446 -446
  26. package/docs/components/ui/kbd.md +434 -434
  27. package/docs/components/ui/label.md +359 -359
  28. package/docs/components/ui/pagination.md +650 -650
  29. package/docs/components/ui/popover.md +536 -536
  30. package/docs/components/ui/progress.md +182 -182
  31. package/docs/components/ui/radio-group.md +311 -311
  32. package/docs/components/ui/separator.md +214 -214
  33. package/docs/components/ui/sheet.md +174 -174
  34. package/docs/components/ui/skeleton.md +140 -140
  35. package/docs/components/ui/slider.md +460 -341
  36. package/docs/components/ui/spinner.md +170 -170
  37. package/docs/components/ui/switch.md +408 -408
  38. package/docs/components/ui/tabs-underline.md +106 -106
  39. package/docs/components/ui/tabs.md +122 -122
  40. package/docs/components/ui/textarea.md +243 -243
  41. package/docs/components/ui/toggle.md +237 -237
  42. package/docs/components/ui/tooltip.md +317 -317
  43. package/docs/components/ui/typography.md +320 -280
  44. package/package.json +1 -1
  45. package/dist/typography-9EoV0kcN.js +0 -44
  46. package/dist/typography-DqQZZpkD.cjs +0 -1
package/dist/slider.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { j as c } from "./jsx-runtime-BzflLqGi.js";
2
+ import { j as u } from "./jsx-runtime-BzflLqGi.js";
3
3
  import * as l from "react";
4
- import { c as $ } from "./index-rKs9bXHr.js";
4
+ import { c as Y } from "./index-rKs9bXHr.js";
5
5
  import { u as le, c as _ } from "./index-C0UREtMP.js";
6
- import { u as C } from "./index-DLcqcWxM.js";
6
+ import { u as M } from "./index-DLcqcWxM.js";
7
7
  import { c as ce } from "./index-FxyLF8MY.js";
8
8
  import { c as ue, u as me } from "./index-CmWhhuj7.js";
9
9
  import { u as fe } from "./index-BZPx6jYI.js";
10
- import { u as pe } from "./index-BGQepRFJ.js";
10
+ import { u as he } from "./index-BGQepRFJ.js";
11
11
  import { P as I } from "./index-BMWt1NBG.js";
12
12
  import { c as N } from "./index-CRiPKpXj.js";
13
13
  var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], W = {
@@ -15,20 +15,20 @@ var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
15
15
  "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
16
16
  "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
17
17
  "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
18
- }, M = "Slider", [H, he, Se] = ue(M), [q] = ce(M, [
18
+ }, C = "Slider", [H, pe, Se] = ue(C), [q] = ce(C, [
19
19
  Se
20
- ]), [ge, B] = q(M), J = l.forwardRef(
20
+ ]), [ge, k] = q(C), J = l.forwardRef(
21
21
  (e, t) => {
22
22
  const {
23
- name: o,
24
- min: n = 0,
25
- max: r = 100,
23
+ name: n,
24
+ min: o = 0,
25
+ max: i = 100,
26
26
  step: d = 1,
27
- orientation: i = "horizontal",
27
+ orientation: r = "horizontal",
28
28
  disabled: s = !1,
29
- minStepsBetweenThumbs: u = 0,
30
- defaultValue: S = [n],
31
- value: g,
29
+ minStepsBetweenThumbs: c = 0,
30
+ defaultValue: g = [o],
31
+ value: h,
32
32
  onValueChange: a = () => {
33
33
  },
34
34
  onValueCommit: m = () => {
@@ -36,50 +36,50 @@ var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
36
36
  inverted: w = !1,
37
37
  form: y,
38
38
  ...v
39
- } = e, p = l.useRef(/* @__PURE__ */ new Set()), f = l.useRef(0), b = i === "horizontal" ? ve : we, [h = [], A] = le({
40
- prop: g,
41
- defaultProp: S,
39
+ } = e, p = l.useRef(/* @__PURE__ */ new Set()), f = l.useRef(0), b = r === "horizontal" ? ve : we, [S = [], A] = le({
40
+ prop: h,
41
+ defaultProp: g,
42
42
  onChange: (x) => {
43
43
  [...p.current][f.current]?.focus(), a(x);
44
44
  }
45
- }), T = l.useRef(h);
46
- function k(x) {
47
- const R = Pe(h, x);
45
+ }), B = l.useRef(S);
46
+ function T(x) {
47
+ const R = Pe(S, x);
48
48
  j(x, R);
49
49
  }
50
50
  function se(x) {
51
51
  j(x, f.current);
52
52
  }
53
53
  function de() {
54
- const x = T.current[f.current];
55
- h[f.current] !== x && m(h);
54
+ const x = B.current[f.current];
55
+ S[f.current] !== x && m(S);
56
56
  }
57
57
  function j(x, R, { commit: V } = { commit: !1 }) {
58
- const F = Ce(d), z = Me(Math.round((x - n) / d) * d + n, F), K = $(z, [n, r]);
58
+ const F = Me(d), z = Ce(Math.round((x - o) / d) * d + o, F), K = Y(z, [o, i]);
59
59
  A((E = []) => {
60
60
  const P = ye(E, K, R);
61
- if (_e(P, u * d)) {
61
+ if (_e(P, c * d)) {
62
62
  f.current = P.indexOf(K);
63
- const Y = String(P) !== String(E);
64
- return Y && V && m(P), Y ? P : E;
63
+ const $ = String(P) !== String(E);
64
+ return $ && V && m(P), $ ? P : E;
65
65
  } else
66
66
  return E;
67
67
  });
68
68
  }
69
- return /* @__PURE__ */ c.jsx(
69
+ return /* @__PURE__ */ u.jsx(
70
70
  ge,
71
71
  {
72
72
  scope: e.__scopeSlider,
73
- name: o,
73
+ name: n,
74
74
  disabled: s,
75
- min: n,
76
- max: r,
75
+ min: o,
76
+ max: i,
77
77
  valueIndexToChangeRef: f,
78
78
  thumbs: p.current,
79
- values: h,
80
- orientation: i,
79
+ values: S,
80
+ orientation: r,
81
81
  form: y,
82
- children: /* @__PURE__ */ c.jsx(H.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(H.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(
82
+ children: /* @__PURE__ */ u.jsx(H.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ u.jsx(H.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ u.jsx(
83
83
  b,
84
84
  {
85
85
  "aria-disabled": s,
@@ -87,19 +87,19 @@ var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
87
87
  ...v,
88
88
  ref: t,
89
89
  onPointerDown: _(v.onPointerDown, () => {
90
- s || (T.current = h);
90
+ s || (B.current = S);
91
91
  }),
92
- min: n,
93
- max: r,
92
+ min: o,
93
+ max: i,
94
94
  inverted: w,
95
- onSlideStart: s ? void 0 : k,
95
+ onSlideStart: s ? void 0 : T,
96
96
  onSlideMove: s ? void 0 : se,
97
97
  onSlideEnd: s ? void 0 : de,
98
- onHomeKeyDown: () => !s && j(n, 0, { commit: !0 }),
99
- onEndKeyDown: () => !s && j(r, h.length - 1, { commit: !0 }),
98
+ onHomeKeyDown: () => !s && j(o, 0, { commit: !0 }),
99
+ onEndKeyDown: () => !s && j(i, S.length - 1, { commit: !0 }),
100
100
  onStepKeyDown: ({ event: x, direction: R }) => {
101
101
  if (!s) {
102
- const z = X.includes(x.key) || x.shiftKey && G.includes(x.key) ? 10 : 1, K = f.current, E = h[K], P = d * z * R;
102
+ const z = X.includes(x.key) || x.shiftKey && G.includes(x.key) ? 10 : 1, K = f.current, E = S[K], P = d * z * R;
103
103
  j(E + P, K, { commit: !0 });
104
104
  }
105
105
  }
@@ -109,8 +109,8 @@ var X = ["PageUp", "PageDown"], G = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
109
109
  );
110
110
  }
111
111
  );
112
- J.displayName = M;
113
- var [Q, Z] = q(M, {
112
+ J.displayName = C;
113
+ var [Q, Z] = q(C, {
114
114
  startEdge: "left",
115
115
  endEdge: "right",
116
116
  size: "width",
@@ -118,21 +118,21 @@ var [Q, Z] = q(M, {
118
118
  }), ve = l.forwardRef(
119
119
  (e, t) => {
120
120
  const {
121
- min: o,
122
- max: n,
123
- dir: r,
121
+ min: n,
122
+ max: o,
123
+ dir: i,
124
124
  inverted: d,
125
- onSlideStart: i,
125
+ onSlideStart: r,
126
126
  onSlideMove: s,
127
- onSlideEnd: u,
128
- onStepKeyDown: S,
129
- ...g
130
- } = e, [a, m] = l.useState(null), w = C(t, (b) => m(b)), y = l.useRef(void 0), v = me(r), p = v === "ltr", f = p && !d || !p && d;
127
+ onSlideEnd: c,
128
+ onStepKeyDown: g,
129
+ ...h
130
+ } = e, [a, m] = l.useState(null), w = M(t, (b) => m(b)), y = l.useRef(void 0), v = me(i), p = v === "ltr", f = p && !d || !p && d;
131
131
  function D(b) {
132
- const h = y.current || a.getBoundingClientRect(), A = [0, h.width], k = U(A, f ? [o, n] : [n, o]);
133
- return y.current = h, k(b - h.left);
132
+ const S = y.current || a.getBoundingClientRect(), A = [0, S.width], T = U(A, f ? [n, o] : [o, n]);
133
+ return y.current = S, T(b - S.left);
134
134
  }
135
- return /* @__PURE__ */ c.jsx(
135
+ return /* @__PURE__ */ u.jsx(
136
136
  Q,
137
137
  {
138
138
  scope: e.__scopeSlider,
@@ -140,31 +140,31 @@ var [Q, Z] = q(M, {
140
140
  endEdge: f ? "right" : "left",
141
141
  direction: f ? 1 : -1,
142
142
  size: "width",
143
- children: /* @__PURE__ */ c.jsx(
143
+ children: /* @__PURE__ */ u.jsx(
144
144
  ee,
145
145
  {
146
146
  dir: v,
147
147
  "data-orientation": "horizontal",
148
- ...g,
148
+ ...h,
149
149
  ref: w,
150
150
  style: {
151
- ...g.style,
151
+ ...h.style,
152
152
  "--radix-slider-thumb-transform": "translateX(-50%)"
153
153
  },
154
154
  onSlideStart: (b) => {
155
- const h = D(b.clientX);
156
- i?.(h);
155
+ const S = D(b.clientX);
156
+ r?.(S);
157
157
  },
158
158
  onSlideMove: (b) => {
159
- const h = D(b.clientX);
160
- s?.(h);
159
+ const S = D(b.clientX);
160
+ s?.(S);
161
161
  },
162
162
  onSlideEnd: () => {
163
- y.current = void 0, u?.();
163
+ y.current = void 0, c?.();
164
164
  },
165
165
  onStepKeyDown: (b) => {
166
166
  const A = W[f ? "from-left" : "from-right"].includes(b.key);
167
- S?.({ event: b, direction: A ? -1 : 1 });
167
+ g?.({ event: b, direction: A ? -1 : 1 });
168
168
  }
169
169
  }
170
170
  )
@@ -174,20 +174,20 @@ var [Q, Z] = q(M, {
174
174
  ), we = l.forwardRef(
175
175
  (e, t) => {
176
176
  const {
177
- min: o,
178
- max: n,
179
- inverted: r,
177
+ min: n,
178
+ max: o,
179
+ inverted: i,
180
180
  onSlideStart: d,
181
- onSlideMove: i,
181
+ onSlideMove: r,
182
182
  onSlideEnd: s,
183
- onStepKeyDown: u,
184
- ...S
185
- } = e, g = l.useRef(null), a = C(t, g), m = l.useRef(void 0), w = !r;
183
+ onStepKeyDown: c,
184
+ ...g
185
+ } = e, h = l.useRef(null), a = M(t, h), m = l.useRef(void 0), w = !i;
186
186
  function y(v) {
187
- const p = m.current || g.current.getBoundingClientRect(), f = [0, p.height], b = U(f, w ? [n, o] : [o, n]);
187
+ const p = m.current || h.current.getBoundingClientRect(), f = [0, p.height], b = U(f, w ? [o, n] : [n, o]);
188
188
  return m.current = p, b(v - p.top);
189
189
  }
190
- return /* @__PURE__ */ c.jsx(
190
+ return /* @__PURE__ */ u.jsx(
191
191
  Q,
192
192
  {
193
193
  scope: e.__scopeSlider,
@@ -195,14 +195,14 @@ var [Q, Z] = q(M, {
195
195
  endEdge: w ? "top" : "bottom",
196
196
  size: "height",
197
197
  direction: w ? 1 : -1,
198
- children: /* @__PURE__ */ c.jsx(
198
+ children: /* @__PURE__ */ u.jsx(
199
199
  ee,
200
200
  {
201
201
  "data-orientation": "vertical",
202
- ...S,
202
+ ...g,
203
203
  ref: a,
204
204
  style: {
205
- ...S.style,
205
+ ...g.style,
206
206
  "--radix-slider-thumb-transform": "translateY(50%)"
207
207
  },
208
208
  onSlideStart: (v) => {
@@ -211,14 +211,14 @@ var [Q, Z] = q(M, {
211
211
  },
212
212
  onSlideMove: (v) => {
213
213
  const p = y(v.clientY);
214
- i?.(p);
214
+ r?.(p);
215
215
  },
216
216
  onSlideEnd: () => {
217
217
  m.current = void 0, s?.();
218
218
  },
219
219
  onStepKeyDown: (v) => {
220
220
  const f = W[w ? "from-bottom" : "from-top"].includes(v.key);
221
- u?.({ event: v, direction: f ? -1 : 1 });
221
+ c?.({ event: v, direction: f ? -1 : 1 });
222
222
  }
223
223
  }
224
224
  )
@@ -228,29 +228,29 @@ var [Q, Z] = q(M, {
228
228
  ), ee = l.forwardRef(
229
229
  (e, t) => {
230
230
  const {
231
- __scopeSlider: o,
232
- onSlideStart: n,
233
- onSlideMove: r,
231
+ __scopeSlider: n,
232
+ onSlideStart: o,
233
+ onSlideMove: i,
234
234
  onSlideEnd: d,
235
- onHomeKeyDown: i,
235
+ onHomeKeyDown: r,
236
236
  onEndKeyDown: s,
237
- onStepKeyDown: u,
238
- ...S
239
- } = e, g = B(M, o);
240
- return /* @__PURE__ */ c.jsx(
237
+ onStepKeyDown: c,
238
+ ...g
239
+ } = e, h = k(C, n);
240
+ return /* @__PURE__ */ u.jsx(
241
241
  I.span,
242
242
  {
243
- ...S,
243
+ ...g,
244
244
  ref: t,
245
245
  onKeyDown: _(e.onKeyDown, (a) => {
246
- a.key === "Home" ? (i(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : X.concat(G).includes(a.key) && (u(a), a.preventDefault());
246
+ a.key === "Home" ? (r(a), a.preventDefault()) : a.key === "End" ? (s(a), a.preventDefault()) : X.concat(G).includes(a.key) && (c(a), a.preventDefault());
247
247
  }),
248
248
  onPointerDown: _(e.onPointerDown, (a) => {
249
249
  const m = a.target;
250
- m.setPointerCapture(a.pointerId), a.preventDefault(), g.thumbs.has(m) ? m.focus() : n(a);
250
+ m.setPointerCapture(a.pointerId), a.preventDefault(), h.thumbs.has(m) ? m.focus() : o(a);
251
251
  }),
252
252
  onPointerMove: _(e.onPointerMove, (a) => {
253
- a.target.hasPointerCapture(a.pointerId) && r(a);
253
+ a.target.hasPointerCapture(a.pointerId) && i(a);
254
254
  }),
255
255
  onPointerUp: _(e.onPointerUp, (a) => {
256
256
  const m = a.target;
@@ -259,60 +259,60 @@ var [Q, Z] = q(M, {
259
259
  }
260
260
  );
261
261
  }
262
- ), te = "SliderTrack", oe = l.forwardRef(
262
+ ), te = "SliderTrack", ne = l.forwardRef(
263
263
  (e, t) => {
264
- const { __scopeSlider: o, ...n } = e, r = B(te, o);
265
- return /* @__PURE__ */ c.jsx(
264
+ const { __scopeSlider: n, ...o } = e, i = k(te, n);
265
+ return /* @__PURE__ */ u.jsx(
266
266
  I.span,
267
267
  {
268
- "data-disabled": r.disabled ? "" : void 0,
269
- "data-orientation": r.orientation,
270
- ...n,
268
+ "data-disabled": i.disabled ? "" : void 0,
269
+ "data-orientation": i.orientation,
270
+ ...o,
271
271
  ref: t
272
272
  }
273
273
  );
274
274
  }
275
275
  );
276
- oe.displayName = te;
277
- var L = "SliderRange", ne = l.forwardRef(
276
+ ne.displayName = te;
277
+ var L = "SliderRange", oe = l.forwardRef(
278
278
  (e, t) => {
279
- const { __scopeSlider: o, ...n } = e, r = B(L, o), d = Z(L, o), i = l.useRef(null), s = C(t, i), u = r.values.length, S = r.values.map(
280
- (m) => ae(m, r.min, r.max)
281
- ), g = u > 1 ? Math.min(...S) : 0, a = 100 - Math.max(...S);
282
- return /* @__PURE__ */ c.jsx(
279
+ const { __scopeSlider: n, ...o } = e, i = k(L, n), d = Z(L, n), r = l.useRef(null), s = M(t, r), c = i.values.length, g = i.values.map(
280
+ (m) => ae(m, i.min, i.max)
281
+ ), h = c > 1 ? Math.min(...g) : 0, a = 100 - Math.max(...g);
282
+ return /* @__PURE__ */ u.jsx(
283
283
  I.span,
284
284
  {
285
- "data-orientation": r.orientation,
286
- "data-disabled": r.disabled ? "" : void 0,
287
- ...n,
285
+ "data-orientation": i.orientation,
286
+ "data-disabled": i.disabled ? "" : void 0,
287
+ ...o,
288
288
  ref: s,
289
289
  style: {
290
290
  ...e.style,
291
- [d.startEdge]: g + "%",
291
+ [d.startEdge]: h + "%",
292
292
  [d.endEdge]: a + "%"
293
293
  }
294
294
  }
295
295
  );
296
296
  }
297
297
  );
298
- ne.displayName = L;
298
+ oe.displayName = L;
299
299
  var O = "SliderThumb", re = l.forwardRef(
300
300
  (e, t) => {
301
- const o = he(e.__scopeSlider), [n, r] = l.useState(null), d = C(t, (s) => r(s)), i = l.useMemo(
302
- () => n ? o().findIndex((s) => s.ref.current === n) : -1,
303
- [o, n]
301
+ const n = pe(e.__scopeSlider), [o, i] = l.useState(null), d = M(t, (s) => i(s)), r = l.useMemo(
302
+ () => o ? n().findIndex((s) => s.ref.current === o) : -1,
303
+ [n, o]
304
304
  );
305
- return /* @__PURE__ */ c.jsx(be, { ...e, ref: d, index: i });
305
+ return /* @__PURE__ */ u.jsx(be, { ...e, ref: d, index: r });
306
306
  }
307
307
  ), be = l.forwardRef(
308
308
  (e, t) => {
309
- const { __scopeSlider: o, index: n, name: r, ...d } = e, i = B(O, o), s = Z(O, o), [u, S] = l.useState(null), g = C(t, (D) => S(D)), a = u ? i.form || !!u.closest("form") : !0, m = pe(u), w = i.values[n], y = w === void 0 ? 0 : ae(w, i.min, i.max), v = Re(n, i.values.length), p = m?.[s.size], f = p ? De(p, y, s.direction) : 0;
309
+ const { __scopeSlider: n, index: o, name: i, ...d } = e, r = k(O, n), s = Z(O, n), [c, g] = l.useState(null), h = M(t, (D) => g(D)), a = c ? r.form || !!c.closest("form") : !0, m = he(c), w = r.values[o], y = w === void 0 ? 0 : ae(w, r.min, r.max), v = Re(o, r.values.length), p = m?.[s.size], f = p ? De(p, y, s.direction) : 0;
310
310
  return l.useEffect(() => {
311
- if (u)
312
- return i.thumbs.add(u), () => {
313
- i.thumbs.delete(u);
311
+ if (c)
312
+ return r.thumbs.add(c), () => {
313
+ r.thumbs.delete(c);
314
314
  };
315
- }, [u, i.thumbs]), /* @__PURE__ */ c.jsxs(
315
+ }, [c, r.thumbs]), /* @__PURE__ */ u.jsxs(
316
316
  "span",
317
317
  {
318
318
  style: {
@@ -321,34 +321,34 @@ var O = "SliderThumb", re = l.forwardRef(
321
321
  [s.startEdge]: `calc(${y}% + ${f}px)`
322
322
  },
323
323
  children: [
324
- /* @__PURE__ */ c.jsx(H.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ c.jsx(
324
+ /* @__PURE__ */ u.jsx(H.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ u.jsx(
325
325
  I.span,
326
326
  {
327
327
  role: "slider",
328
328
  "aria-label": e["aria-label"] || v,
329
- "aria-valuemin": i.min,
329
+ "aria-valuemin": r.min,
330
330
  "aria-valuenow": w,
331
- "aria-valuemax": i.max,
332
- "aria-orientation": i.orientation,
333
- "data-orientation": i.orientation,
334
- "data-disabled": i.disabled ? "" : void 0,
335
- tabIndex: i.disabled ? void 0 : 0,
331
+ "aria-valuemax": r.max,
332
+ "aria-orientation": r.orientation,
333
+ "data-orientation": r.orientation,
334
+ "data-disabled": r.disabled ? "" : void 0,
335
+ tabIndex: r.disabled ? void 0 : 0,
336
336
  ...d,
337
- ref: g,
337
+ ref: h,
338
338
  style: w === void 0 ? { display: "none" } : e.style,
339
339
  onFocus: _(e.onFocus, () => {
340
- i.valueIndexToChangeRef.current = n;
340
+ r.valueIndexToChangeRef.current = o;
341
341
  })
342
342
  }
343
343
  ) }),
344
- a && /* @__PURE__ */ c.jsx(
344
+ a && /* @__PURE__ */ u.jsx(
345
345
  ie,
346
346
  {
347
- name: r ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
348
- form: i.form,
347
+ name: i ?? (r.name ? r.name + (r.values.length > 1 ? "[]" : "") : void 0),
348
+ form: r.form,
349
349
  value: w
350
350
  },
351
- n
351
+ o
352
352
  )
353
353
  ]
354
354
  }
@@ -357,21 +357,21 @@ var O = "SliderThumb", re = l.forwardRef(
357
357
  );
358
358
  re.displayName = O;
359
359
  var xe = "RadioBubbleInput", ie = l.forwardRef(
360
- ({ __scopeSlider: e, value: t, ...o }, n) => {
361
- const r = l.useRef(null), d = C(r, n), i = fe(t);
360
+ ({ __scopeSlider: e, value: t, ...n }, o) => {
361
+ const i = l.useRef(null), d = M(i, o), r = fe(t);
362
362
  return l.useEffect(() => {
363
- const s = r.current;
363
+ const s = i.current;
364
364
  if (!s) return;
365
- const u = window.HTMLInputElement.prototype, g = Object.getOwnPropertyDescriptor(u, "value").set;
366
- if (i !== t && g) {
365
+ const c = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(c, "value").set;
366
+ if (r !== t && h) {
367
367
  const a = new Event("input", { bubbles: !0 });
368
- g.call(s, t), s.dispatchEvent(a);
368
+ h.call(s, t), s.dispatchEvent(a);
369
369
  }
370
- }, [i, t]), /* @__PURE__ */ c.jsx(
370
+ }, [r, t]), /* @__PURE__ */ u.jsx(
371
371
  I.input,
372
372
  {
373
373
  style: { display: "none" },
374
- ...o,
374
+ ...n,
375
375
  ref: d,
376
376
  defaultValue: t
377
377
  }
@@ -379,73 +379,85 @@ var xe = "RadioBubbleInput", ie = l.forwardRef(
379
379
  }
380
380
  );
381
381
  ie.displayName = xe;
382
- function ye(e = [], t, o) {
383
- const n = [...e];
384
- return n[o] = t, n.sort((r, d) => r - d);
382
+ function ye(e = [], t, n) {
383
+ const o = [...e];
384
+ return o[n] = t, o.sort((i, d) => i - d);
385
385
  }
386
- function ae(e, t, o) {
387
- const d = 100 / (o - t) * (e - t);
388
- return $(d, [0, 100]);
386
+ function ae(e, t, n) {
387
+ const d = 100 / (n - t) * (e - t);
388
+ return Y(d, [0, 100]);
389
389
  }
390
390
  function Re(e, t) {
391
391
  return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
392
392
  }
393
393
  function Pe(e, t) {
394
394
  if (e.length === 1) return 0;
395
- const o = e.map((r) => Math.abs(r - t)), n = Math.min(...o);
396
- return o.indexOf(n);
395
+ const n = e.map((i) => Math.abs(i - t)), o = Math.min(...n);
396
+ return n.indexOf(o);
397
397
  }
398
- function De(e, t, o) {
399
- const n = e / 2, d = U([0, 50], [0, n]);
400
- return (n - d(t) * o) * o;
398
+ function De(e, t, n) {
399
+ const o = e / 2, d = U([0, 50], [0, o]);
400
+ return (o - d(t) * n) * n;
401
401
  }
402
402
  function Ee(e) {
403
- return e.slice(0, -1).map((t, o) => e[o + 1] - t);
403
+ return e.slice(0, -1).map((t, n) => e[n + 1] - t);
404
404
  }
405
405
  function _e(e, t) {
406
406
  if (t > 0) {
407
- const o = Ee(e);
408
- return Math.min(...o) >= t;
407
+ const n = Ee(e);
408
+ return Math.min(...n) >= t;
409
409
  }
410
410
  return !0;
411
411
  }
412
412
  function U(e, t) {
413
- return (o) => {
413
+ return (n) => {
414
414
  if (e[0] === e[1] || t[0] === t[1]) return t[0];
415
- const n = (t[1] - t[0]) / (e[1] - e[0]);
416
- return t[0] + n * (o - e[0]);
415
+ const o = (t[1] - t[0]) / (e[1] - e[0]);
416
+ return t[0] + o * (n - e[0]);
417
417
  };
418
418
  }
419
- function Ce(e) {
419
+ function Me(e) {
420
420
  return (String(e).split(".")[1] || "").length;
421
421
  }
422
- function Me(e, t) {
423
- const o = Math.pow(10, t);
424
- return Math.round(e * o) / o;
422
+ function Ce(e, t) {
423
+ const n = Math.pow(10, t);
424
+ return Math.round(e * n) / n;
425
425
  }
426
- var Ae = J, je = oe, Ke = ne, Ie = re;
426
+ var Ae = J, je = ne, Ke = oe, Ie = re;
427
427
  function Fe({
428
428
  className: e,
429
429
  defaultValue: t,
430
- value: o,
431
- min: n = 0,
432
- max: r = 100,
430
+ value: n,
431
+ min: o = 0,
432
+ max: i = 100,
433
433
  theme: d,
434
- ...i
434
+ color: r,
435
+ ...s
435
436
  }) {
436
- const s = l.useMemo(
437
- () => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, r],
438
- [o, t, n, r]
439
- );
440
- return /* @__PURE__ */ c.jsxs(
437
+ const c = l.useMemo(
438
+ () => Array.isArray(n) ? n : Array.isArray(t) ? t : [o, i],
439
+ [n, t, o, i]
440
+ ), g = l.useMemo(() => {
441
+ if (r) {
442
+ if (r === "full")
443
+ return {
444
+ background: "linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff0000)"
445
+ };
446
+ if (Array.isArray(r) && r.length === 2)
447
+ return {
448
+ background: `linear-gradient(to right, ${r[0]}, ${r[1]})`
449
+ };
450
+ }
451
+ }, [r]);
452
+ return /* @__PURE__ */ u.jsxs(
441
453
  Ae,
442
454
  {
443
455
  "data-slot": "slider",
444
456
  "data-theme": d,
445
457
  defaultValue: t,
446
- value: o,
447
- min: n,
448
- max: r,
458
+ value: n,
459
+ min: o,
460
+ max: i,
449
461
  className: N(
450
462
  `
451
463
  adm:relative adm:flex adm:w-full adm:touch-none adm:items-center
@@ -458,38 +470,40 @@ function Fe({
458
470
  `,
459
471
  e
460
472
  ),
461
- ...i,
473
+ ...s,
462
474
  children: [
463
- /* @__PURE__ */ c.jsx(
475
+ /* @__PURE__ */ u.jsx(
464
476
  je,
465
477
  {
466
478
  "data-slot": "slider-track",
467
479
  className: N(
468
480
  `
469
481
  adm:relative adm:grow adm:overflow-hidden adm:rounded-full
470
- adm:bg-muted
471
482
  adm:data-[orientation=horizontal]:h-1.5
472
483
  adm:data-[orientation=horizontal]:w-full
473
484
  adm:data-[orientation=vertical]:h-full
474
485
  adm:data-[orientation=vertical]:w-1.5
475
- `
486
+ `,
487
+ r ? "" : "adm:bg-muted"
476
488
  ),
477
- children: /* @__PURE__ */ c.jsx(
489
+ style: r ? g : void 0,
490
+ children: /* @__PURE__ */ u.jsx(
478
491
  Ke,
479
492
  {
480
493
  "data-slot": "slider-range",
481
494
  className: N(
482
495
  `
483
- adm:absolute adm:bg-primary
496
+ adm:absolute
484
497
  adm:data-[orientation=horizontal]:h-full
485
498
  adm:data-[orientation=vertical]:w-full
486
- `
499
+ `,
500
+ r ? "adm:bg-transparent" : "adm:bg-primary"
487
501
  )
488
502
  }
489
503
  )
490
504
  }
491
505
  ),
492
- Array.from({ length: s.length }, (u, S) => /* @__PURE__ */ c.jsx(
506
+ Array.from({ length: c.length }, (h, a) => /* @__PURE__ */ u.jsx(
493
507
  Ie,
494
508
  {
495
509
  "data-slot": "slider-thumb",
@@ -502,7 +516,7 @@ function Fe({
502
516
  adm:disabled:pointer-events-none adm:disabled:opacity-50
503
517
  `
504
518
  },
505
- S
519
+ a
506
520
  ))
507
521
  ]
508
522
  }