@arcadeai/design-system 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +128 -0
  2. package/dist/check-CxcShTlQ.js +11 -0
  3. package/dist/chevron-down-D_a-ccxi.js +11 -0
  4. package/dist/chevron-right-DriXIqe5.js +11 -0
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/components/index.js +195 -0
  7. package/dist/components/ui/atoms/accordion.d.ts +7 -0
  8. package/dist/components/ui/atoms/accordion.js +289 -0
  9. package/dist/components/ui/atoms/alert.d.ts +9 -0
  10. package/dist/components/ui/atoms/alert.js +66 -0
  11. package/dist/components/ui/atoms/avatar.d.ts +6 -0
  12. package/dist/components/ui/atoms/avatar.js +130 -0
  13. package/dist/components/ui/atoms/badge.d.ts +9 -0
  14. package/dist/components/ui/atoms/badge.js +41 -0
  15. package/dist/components/ui/atoms/breadcrumb.d.ts +11 -0
  16. package/dist/components/ui/atoms/breadcrumb.js +115 -0
  17. package/dist/components/ui/atoms/button.d.ts +10 -0
  18. package/dist/components/ui/atoms/button.js +51 -0
  19. package/dist/components/ui/atoms/card.d.ts +9 -0
  20. package/dist/components/ui/atoms/card.js +90 -0
  21. package/dist/components/ui/atoms/chart.d.ts +68 -0
  22. package/dist/components/ui/atoms/chart.js +10477 -0
  23. package/dist/components/ui/atoms/collapsible.d.ts +5 -0
  24. package/dist/components/ui/atoms/collapsible.js +34 -0
  25. package/dist/components/ui/atoms/command.d.ts +18 -0
  26. package/dist/components/ui/atoms/command.js +490 -0
  27. package/dist/components/ui/atoms/dialog.d.ts +15 -0
  28. package/dist/components/ui/atoms/dialog.js +135 -0
  29. package/dist/components/ui/atoms/dropdown-menu.d.ts +25 -0
  30. package/dist/components/ui/atoms/dropdown-menu.js +1035 -0
  31. package/dist/components/ui/atoms/form.d.ts +24 -0
  32. package/dist/components/ui/atoms/form.js +297 -0
  33. package/dist/components/ui/atoms/hover-card.d.ts +6 -0
  34. package/dist/components/ui/atoms/hover-card.js +211 -0
  35. package/dist/components/ui/atoms/index.d.ts +33 -0
  36. package/dist/components/ui/atoms/index.js +195 -0
  37. package/dist/components/ui/atoms/input.d.ts +3 -0
  38. package/dist/components/ui/atoms/input.js +21 -0
  39. package/dist/components/ui/atoms/label.d.ts +4 -0
  40. package/dist/components/ui/atoms/label.js +36 -0
  41. package/dist/components/ui/atoms/popover.d.ts +7 -0
  42. package/dist/components/ui/atoms/popover.js +266 -0
  43. package/dist/components/ui/atoms/progress.d.ts +4 -0
  44. package/dist/components/ui/atoms/progress.js +107 -0
  45. package/dist/components/ui/atoms/resizable.d.ts +8 -0
  46. package/dist/components/ui/atoms/resizable.js +1564 -0
  47. package/dist/components/ui/atoms/scroll-area.d.ts +5 -0
  48. package/dist/components/ui/atoms/scroll-area.js +580 -0
  49. package/dist/components/ui/atoms/select.d.ts +15 -0
  50. package/dist/components/ui/atoms/select.js +1000 -0
  51. package/dist/components/ui/atoms/separator.d.ts +4 -0
  52. package/dist/components/ui/atoms/separator.js +44 -0
  53. package/dist/components/ui/atoms/sheet.d.ts +14 -0
  54. package/dist/components/ui/atoms/sheet.js +127 -0
  55. package/dist/components/ui/atoms/sidebar.d.ts +69 -0
  56. package/dist/components/ui/atoms/sidebar.js +602 -0
  57. package/dist/components/ui/atoms/skeleton.d.ts +2 -0
  58. package/dist/components/ui/atoms/skeleton.js +15 -0
  59. package/dist/components/ui/atoms/slider.d.ts +4 -0
  60. package/dist/components/ui/atoms/slider.js +484 -0
  61. package/dist/components/ui/atoms/sonner.d.ts +3 -0
  62. package/dist/components/ui/atoms/sonner.js +788 -0
  63. package/dist/components/ui/atoms/switch.d.ts +4 -0
  64. package/dist/components/ui/atoms/switch.js +155 -0
  65. package/dist/components/ui/atoms/table.d.ts +10 -0
  66. package/dist/components/ui/atoms/table.js +114 -0
  67. package/dist/components/ui/atoms/tabs.d.ts +7 -0
  68. package/dist/components/ui/atoms/tabs.js +218 -0
  69. package/dist/components/ui/atoms/textarea.d.ts +3 -0
  70. package/dist/components/ui/atoms/textarea.js +18 -0
  71. package/dist/components/ui/atoms/toggle.d.ts +9 -0
  72. package/dist/components/ui/atoms/toggle.js +70 -0
  73. package/dist/components/ui/atoms/tooltip.d.ts +7 -0
  74. package/dist/components/ui/atoms/tooltip.js +376 -0
  75. package/dist/components/ui/index.d.ts +1 -0
  76. package/dist/components/ui/index.js +195 -0
  77. package/dist/createLucideIcon-B6fy1GTR.js +94 -0
  78. package/dist/hooks/use-mobile.d.ts +1 -0
  79. package/dist/hooks/use-mobile.js +14 -0
  80. package/dist/index-BAhNQL1u.js +675 -0
  81. package/dist/index-BZPx6jYI.js +8 -0
  82. package/dist/index-ByaXH_ih.js +10 -0
  83. package/dist/index-C9KW2H79.js +36 -0
  84. package/dist/index-CB1Wkg0G.js +83 -0
  85. package/dist/index-CHDs-SiB.js +27 -0
  86. package/dist/index-CJFGOBPb.js +122 -0
  87. package/dist/index-CL4N9wMT.js +259 -0
  88. package/dist/index-CuMpq4Un.js +47 -0
  89. package/dist/index-CxK6rt_N.js +119 -0
  90. package/dist/index-D2uXV4lz.js +181 -0
  91. package/dist/index-DLeNytVF.js +9 -0
  92. package/dist/index-DYfkNB0n.js +54 -0
  93. package/dist/index-DdnpnyX2.js +34 -0
  94. package/dist/index-DuekHEmj.js +6 -0
  95. package/dist/index-DwYXX2sM.js +13 -0
  96. package/dist/index-Dy7YuPrV.js +1532 -0
  97. package/dist/index-QMp1pYFl.js +145 -0
  98. package/dist/index-UFb2E87s.js +70 -0
  99. package/dist/index-nluJZSbA.js +31 -0
  100. package/dist/index-p7nYL7BU.js +71 -0
  101. package/dist/index-rKs9bXHr.js +6 -0
  102. package/dist/index-umR1UobZ.js +13 -0
  103. package/dist/index.css +2 -0
  104. package/dist/lib/utils.d.ts +2 -0
  105. package/dist/lib/utils.js +4 -0
  106. package/dist/main.d.ts +1 -0
  107. package/dist/main.js +195 -0
  108. package/dist/utils-Dy2WjYNJ.js +2744 -0
  109. package/package.json +100 -0
@@ -0,0 +1,484 @@
1
+ import { jsx as m, jsxs as j } from "react/jsx-runtime";
2
+ import * as d from "react";
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";
8
+ import { u as fe } from "../../../index-ByaXH_ih.js";
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";
14
+ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = {
15
+ "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
16
+ "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
17
+ "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
18
+ "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
19
+ }, M = "Slider", [L, Se, ge] = he(M), [J, Xe] = de(M, [
20
+ ge
21
+ ]), [ve, k] = J(M), Q = d.forwardRef(
22
+ (e, t) => {
23
+ const {
24
+ name: o,
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 = () => {
34
+ },
35
+ onValueCommit: u = () => {
36
+ },
37
+ inverted: b = !1,
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,
43
+ onChange: (y) => {
44
+ var _;
45
+ (_ = [...p.current][f.current]) == null || _.focus(), s(y);
46
+ }
47
+ }), V = d.useRef(h);
48
+ function N(y) {
49
+ const P = De(h, y);
50
+ B(y, P);
51
+ }
52
+ function ce(y) {
53
+ B(y, f.current);
54
+ }
55
+ function le() {
56
+ const y = V.current[f.current];
57
+ h[f.current] !== y && u(h);
58
+ }
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);
65
+ const $ = String(x) !== String(E);
66
+ return $ && _ && u(x), $ ? x : E;
67
+ } else
68
+ return E;
69
+ });
70
+ }
71
+ return /* @__PURE__ */ m(
72
+ ve,
73
+ {
74
+ scope: e.__scopeSlider,
75
+ name: o,
76
+ disabled: a,
77
+ min: n,
78
+ max: i,
79
+ valueIndexToChangeRef: f,
80
+ thumbs: p.current,
81
+ values: h,
82
+ orientation: r,
83
+ form: R,
84
+ children: /* @__PURE__ */ m(L.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(L.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
85
+ w,
86
+ {
87
+ "aria-disabled": a,
88
+ "data-disabled": a ? "" : void 0,
89
+ ...v,
90
+ ref: t,
91
+ onPointerDown: C(v.onPointerDown, () => {
92
+ a || (V.current = h);
93
+ }),
94
+ 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 }),
102
+ 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 });
106
+ }
107
+ }
108
+ }
109
+ ) }) })
110
+ }
111
+ );
112
+ }
113
+ );
114
+ Q.displayName = M;
115
+ var [Z, ee] = J(M, {
116
+ startEdge: "left",
117
+ endEdge: "right",
118
+ size: "width",
119
+ direction: 1
120
+ }), be = d.forwardRef(
121
+ (e, t) => {
122
+ const {
123
+ min: o,
124
+ 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);
136
+ }
137
+ return /* @__PURE__ */ m(
138
+ Z,
139
+ {
140
+ scope: e.__scopeSlider,
141
+ startEdge: f ? "left" : "right",
142
+ endEdge: f ? "right" : "left",
143
+ direction: f ? 1 : -1,
144
+ size: "width",
145
+ children: /* @__PURE__ */ m(
146
+ te,
147
+ {
148
+ dir: v,
149
+ "data-orientation": "horizontal",
150
+ ...g,
151
+ ref: b,
152
+ style: {
153
+ ...g.style,
154
+ "--radix-slider-thumb-transform": "translateX(-50%)"
155
+ },
156
+ onSlideStart: (w) => {
157
+ const h = D(w.clientX);
158
+ r == null || r(h);
159
+ },
160
+ onSlideMove: (w) => {
161
+ const h = D(w.clientX);
162
+ a == null || a(h);
163
+ },
164
+ onSlideEnd: () => {
165
+ R.current = void 0, l == null || l();
166
+ },
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 });
170
+ }
171
+ }
172
+ )
173
+ }
174
+ );
175
+ }
176
+ ), we = d.forwardRef(
177
+ (e, t) => {
178
+ const {
179
+ min: o,
180
+ 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);
191
+ }
192
+ return /* @__PURE__ */ m(
193
+ Z,
194
+ {
195
+ scope: e.__scopeSlider,
196
+ startEdge: b ? "bottom" : "top",
197
+ endEdge: b ? "top" : "bottom",
198
+ size: "height",
199
+ direction: b ? 1 : -1,
200
+ children: /* @__PURE__ */ m(
201
+ te,
202
+ {
203
+ "data-orientation": "vertical",
204
+ ...S,
205
+ ref: s,
206
+ style: {
207
+ ...S.style,
208
+ "--radix-slider-thumb-transform": "translateY(50%)"
209
+ },
210
+ onSlideStart: (v) => {
211
+ const p = R(v.clientY);
212
+ c == null || c(p);
213
+ },
214
+ onSlideMove: (v) => {
215
+ const p = R(v.clientY);
216
+ r == null || r(p);
217
+ },
218
+ onSlideEnd: () => {
219
+ u.current = void 0, a == null || a();
220
+ },
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 });
224
+ }
225
+ }
226
+ )
227
+ }
228
+ );
229
+ }
230
+ ), te = d.forwardRef(
231
+ (e, t) => {
232
+ const {
233
+ __scopeSlider: o,
234
+ 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);
242
+ return /* @__PURE__ */ m(
243
+ T.span,
244
+ {
245
+ ...S,
246
+ 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());
249
+ }),
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);
253
+ }),
254
+ onPointerMove: C(e.onPointerMove, (s) => {
255
+ s.target.hasPointerCapture(s.pointerId) && i(s);
256
+ }),
257
+ onPointerUp: C(e.onPointerUp, (s) => {
258
+ const u = s.target;
259
+ u.hasPointerCapture(s.pointerId) && (u.releasePointerCapture(s.pointerId), c(s));
260
+ })
261
+ }
262
+ );
263
+ }
264
+ ), oe = "SliderTrack", ne = d.forwardRef(
265
+ (e, t) => {
266
+ const { __scopeSlider: o, ...n } = e, i = k(oe, o);
267
+ return /* @__PURE__ */ m(
268
+ T.span,
269
+ {
270
+ "data-disabled": i.disabled ? "" : void 0,
271
+ "data-orientation": i.orientation,
272
+ ...n,
273
+ ref: t
274
+ }
275
+ );
276
+ }
277
+ );
278
+ ne.displayName = oe;
279
+ var O = "SliderRange", re = d.forwardRef(
280
+ (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);
284
+ return /* @__PURE__ */ m(
285
+ T.span,
286
+ {
287
+ "data-orientation": i.orientation,
288
+ "data-disabled": i.disabled ? "" : void 0,
289
+ ...n,
290
+ ref: a,
291
+ style: {
292
+ ...e.style,
293
+ [c.startEdge]: g + "%",
294
+ [c.endEdge]: s + "%"
295
+ }
296
+ }
297
+ );
298
+ }
299
+ );
300
+ re.displayName = O;
301
+ var U = "SliderThumb", ie = d.forwardRef(
302
+ (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,
305
+ [o, n]
306
+ );
307
+ return /* @__PURE__ */ m(ye, { ...e, ref: c, index: r });
308
+ }
309
+ ), ye = d.forwardRef(
310
+ (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);
316
+ };
317
+ }, [l, r.thumbs]), /* @__PURE__ */ j(
318
+ "span",
319
+ {
320
+ style: {
321
+ transform: "var(--radix-slider-thumb-transform)",
322
+ position: "absolute",
323
+ [a.startEdge]: `calc(${R}% + ${f}px)`
324
+ },
325
+ children: [
326
+ /* @__PURE__ */ m(L.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
327
+ T.span,
328
+ {
329
+ 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;
343
+ })
344
+ }
345
+ ) }),
346
+ s && /* @__PURE__ */ m(
347
+ ae,
348
+ {
349
+ name: i ?? (r.name ? r.name + (r.values.length > 1 ? "[]" : "") : void 0),
350
+ form: r.form,
351
+ value: b
352
+ },
353
+ n
354
+ )
355
+ ]
356
+ }
357
+ );
358
+ }
359
+ );
360
+ ie.displayName = U;
361
+ var Re = "RadioBubbleInput", ae = d.forwardRef(
362
+ ({ __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);
371
+ }
372
+ }, [r, t]), /* @__PURE__ */ m(
373
+ T.input,
374
+ {
375
+ style: { display: "none" },
376
+ ...o,
377
+ ref: c,
378
+ defaultValue: t
379
+ }
380
+ );
381
+ }
382
+ );
383
+ ae.displayName = Re;
384
+ function Pe(e = [], t, o) {
385
+ const n = [...e];
386
+ return n[o] = t, n.sort((i, c) => i - c);
387
+ }
388
+ function se(e, t, o) {
389
+ const c = 100 / (o - t) * (e - t);
390
+ return X(c, [0, 100]);
391
+ }
392
+ function xe(e, t) {
393
+ return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
394
+ }
395
+ function De(e, t) {
396
+ if (e.length === 1) return 0;
397
+ const o = e.map((i) => Math.abs(i - t)), n = Math.min(...o);
398
+ return o.indexOf(n);
399
+ }
400
+ function _e(e, t, o) {
401
+ const n = e / 2, c = F([0, 50], [0, n]);
402
+ return (n - c(t) * o) * o;
403
+ }
404
+ function Ee(e) {
405
+ return e.slice(0, -1).map((t, o) => e[o + 1] - t);
406
+ }
407
+ function Ce(e, t) {
408
+ if (t > 0) {
409
+ const o = Ee(e);
410
+ return Math.min(...o) >= t;
411
+ }
412
+ return !0;
413
+ }
414
+ function F(e, t) {
415
+ return (o) => {
416
+ if (e[0] === e[1] || t[0] === t[1]) return t[0];
417
+ const n = (t[1] - t[0]) / (e[1] - e[0]);
418
+ return t[0] + n * (o - e[0]);
419
+ };
420
+ }
421
+ function Ae(e) {
422
+ return (String(e).split(".")[1] || "").length;
423
+ }
424
+ function Me(e, t) {
425
+ const o = Math.pow(10, t);
426
+ return Math.round(e * o) / o;
427
+ }
428
+ var Ie = Q, Be = ne, Ke = re, Te = ie;
429
+ function Ge({
430
+ className: e,
431
+ defaultValue: t,
432
+ value: o,
433
+ min: n = 0,
434
+ max: i = 100,
435
+ ...c
436
+ }) {
437
+ const r = d.useMemo(() => Array.isArray(o) ? o : Array.isArray(t) ? t : [n, i], [o, t, n, i]);
438
+ return /* @__PURE__ */ j(
439
+ Ie,
440
+ {
441
+ className: H(
442
+ "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",
443
+ e
444
+ ),
445
+ "data-slot": "slider",
446
+ defaultValue: t,
447
+ max: i,
448
+ min: n,
449
+ value: o,
450
+ ...c,
451
+ children: [
452
+ /* @__PURE__ */ m(
453
+ Be,
454
+ {
455
+ className: H(
456
+ "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
+ ),
458
+ "data-slot": "slider-track",
459
+ children: /* @__PURE__ */ m(
460
+ Ke,
461
+ {
462
+ className: H(
463
+ "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
464
+ ),
465
+ "data-slot": "slider-range"
466
+ }
467
+ )
468
+ }
469
+ ),
470
+ Array.from({ length: r.length }, (a, l) => /* @__PURE__ */ m(
471
+ Te,
472
+ {
473
+ 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
+ "data-slot": "slider-thumb"
475
+ },
476
+ l
477
+ ))
478
+ ]
479
+ }
480
+ );
481
+ }
482
+ export {
483
+ Ge as Slider
484
+ };
@@ -0,0 +1,3 @@
1
+ import { ToasterProps } from 'sonner';
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { Toaster };