@arcadeai/design-system 0.7.1 → 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 (71) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/tokens.css +1 -1
  3. package/dist/assets/variables.css +1 -1
  4. package/dist/{check-CxcShTlQ.js → check-B5h1DvDs.js} +2 -2
  5. package/dist/{chevron-down-D_a-ccxi.js → chevron-down-DmZMdOiC.js} +2 -2
  6. package/dist/{chevron-right-DriXIqe5.js → chevron-right-BYYHEJjK.js} +2 -2
  7. package/dist/components/ui/atoms/accordion.js +70 -74
  8. package/dist/components/ui/atoms/alert.js +2 -2
  9. package/dist/components/ui/atoms/avatar.js +5 -5
  10. package/dist/components/ui/atoms/badge.js +3 -3
  11. package/dist/components/ui/atoms/breadcrumb.js +5 -5
  12. package/dist/components/ui/atoms/button.js +3 -3
  13. package/dist/components/ui/atoms/card.js +1 -1
  14. package/dist/components/ui/atoms/chart.js +2153 -2154
  15. package/dist/components/ui/atoms/collapsible.js +1 -1
  16. package/dist/components/ui/atoms/command.js +15 -15
  17. package/dist/components/ui/atoms/dialog.js +2 -2
  18. package/dist/components/ui/atoms/dropdown-menu.js +367 -384
  19. package/dist/components/ui/atoms/form.d.ts +1 -1
  20. package/dist/components/ui/atoms/form.js +182 -199
  21. package/dist/components/ui/atoms/hover-card.js +40 -41
  22. package/dist/components/ui/atoms/input.js +1 -1
  23. package/dist/components/ui/atoms/label.js +18 -19
  24. package/dist/components/ui/atoms/popover.js +107 -110
  25. package/dist/components/ui/atoms/progress.js +3 -3
  26. package/dist/components/ui/atoms/resizable.js +8 -8
  27. package/dist/components/ui/atoms/scroll-area.js +82 -84
  28. package/dist/components/ui/atoms/select.js +393 -407
  29. package/dist/components/ui/atoms/separator.js +2 -2
  30. package/dist/components/ui/atoms/sheet.js +2 -2
  31. package/dist/components/ui/atoms/sidebar.js +18 -18
  32. package/dist/components/ui/atoms/skeleton.js +1 -1
  33. package/dist/components/ui/atoms/slider.js +213 -214
  34. package/dist/components/ui/atoms/sonner.js +28 -28
  35. package/dist/components/ui/atoms/switch.js +7 -7
  36. package/dist/components/ui/atoms/table.js +1 -1
  37. package/dist/components/ui/atoms/tabs.js +8 -8
  38. package/dist/components/ui/atoms/textarea.js +1 -1
  39. package/dist/components/ui/atoms/toggle.js +5 -5
  40. package/dist/components/ui/atoms/tooltip.js +103 -104
  41. package/dist/{createLucideIcon-B6fy1GTR.js → createLucideIcon-XRdN60yz.js} +4 -4
  42. package/dist/index-0ioNhtNM.js +10 -0
  43. package/dist/index-437EL2iq.js +52 -0
  44. package/dist/{index-CB1Wkg0G.js → index-5Bhkapwi.js} +2 -3
  45. package/dist/index-B695uy69.js +9 -0
  46. package/dist/{index-CHDs-SiB.js → index-BGQepRFJ.js} +1 -1
  47. package/dist/{index-BAhNQL1u.js → index-BvWMjxZ5.js} +22 -23
  48. package/dist/index-C8_QusYl.js +70 -0
  49. package/dist/index-CCKe-Mpx.js +6 -0
  50. package/dist/{index-DdnpnyX2.js → index-CQhYMnjT.js} +4 -4
  51. package/dist/{index-C9KW2H79.js → index-CpDnqHCm.js} +1 -1
  52. package/dist/{index-CxK6rt_N.js → index-CtSXVDca.js} +8 -8
  53. package/dist/{index-umR1UobZ.js → index-Cv867SGx.js} +1 -1
  54. package/dist/{index-CuMpq4Un.js → index-CxO14pcK.js} +2 -2
  55. package/dist/index-DFZozV_h.js +68 -0
  56. package/dist/index-DLfXSskr.js +255 -0
  57. package/dist/{index-D2uXV4lz.js → index-DMCYNwtg.js} +8 -8
  58. package/dist/index-DYHsXnnS.js +144 -0
  59. package/dist/{index-nluJZSbA.js → index-DfNPZZ8M.js} +1 -1
  60. package/dist/{index-Dy7YuPrV.js → index-f0YS5Ufh.js} +319 -321
  61. package/dist/lib/utils.js +1 -1
  62. package/dist/{utils-Dy2WjYNJ.js → utils-CRiPKpXj.js} +41 -42
  63. package/package.json +32 -26
  64. package/dist/index-CL4N9wMT.js +0 -259
  65. package/dist/index-DLeNytVF.js +0 -9
  66. package/dist/index-DYfkNB0n.js +0 -54
  67. package/dist/index-DuekHEmj.js +0 -6
  68. package/dist/index-DwYXX2sM.js +0 -13
  69. package/dist/index-QMp1pYFl.js +0 -145
  70. package/dist/index-UFb2E87s.js +0 -70
  71. package/dist/index-p7nYL7BU.js +0 -71
@@ -1,19 +1,19 @@
1
- import { jsx as b, jsxs as j, Fragment as se } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as j, Fragment as se } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { P as L } from "../../../index-C9KW2H79.js";
4
- import { P as I } from "../../../index-p7nYL7BU.js";
5
- import { c as ae } from "../../../index-UFb2E87s.js";
6
- import { u as T } from "../../../index-CB1Wkg0G.js";
7
- import { u as C } from "../../../index-DwYXX2sM.js";
3
+ import { P as L } from "../../../index-CpDnqHCm.js";
4
+ import { P as I } from "../../../index-C8_QusYl.js";
5
+ import { c as ae } from "../../../index-DFZozV_h.js";
6
+ import { u as T } from "../../../index-5Bhkapwi.js";
7
+ import { u as C } from "../../../index-0ioNhtNM.js";
8
8
  import { u as ie } from "../../../index-ByaXH_ih.js";
9
- import { u as de } from "../../../index-DuekHEmj.js";
9
+ import { u as de } from "../../../index-CCKe-Mpx.js";
10
10
  import { c as ue } from "../../../index-rKs9bXHr.js";
11
- import { c as R } from "../../../index-DLeNytVF.js";
12
- import { c as V } from "../../../utils-Dy2WjYNJ.js";
11
+ import { c as R } from "../../../index-B695uy69.js";
12
+ import { c as V } from "../../../utils-CRiPKpXj.js";
13
13
  function fe(e, o) {
14
14
  return c.useReducer((r, l) => o[r][l] ?? r, e);
15
15
  }
16
- var B = "ScrollArea", [q, Ye] = ae(B), [he, v] = q(B), G = c.forwardRef(
16
+ var B = "ScrollArea", [q, Ye] = ae(B), [he, p] = q(B), G = c.forwardRef(
17
17
  (e, o) => {
18
18
  const {
19
19
  __scopeScrollArea: r,
@@ -21,21 +21,21 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, v] = q(B), G = c.forwardRef(
21
21
  dir: t,
22
22
  scrollHideDelay: n = 600,
23
23
  ...s
24
- } = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [h, u] = c.useState(null), [m, p] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [N, y] = c.useState(!1), [W, H] = c.useState(!1), S = T(o, (E) => i(E)), w = ie(t);
25
- return /* @__PURE__ */ b(
24
+ } = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [m, w] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [N, y] = c.useState(!1), [W, H] = c.useState(!1), S = T(o, (E) => i(E)), v = ie(t);
25
+ return /* @__PURE__ */ h(
26
26
  he,
27
27
  {
28
28
  scope: r,
29
29
  type: l,
30
- dir: w,
30
+ dir: v,
31
31
  scrollHideDelay: n,
32
32
  scrollArea: a,
33
33
  viewport: f,
34
34
  onViewportChange: d,
35
- content: h,
35
+ content: b,
36
36
  onContentChange: u,
37
37
  scrollbarX: m,
38
- onScrollbarXChange: p,
38
+ onScrollbarXChange: w,
39
39
  scrollbarXEnabled: N,
40
40
  onScrollbarXEnabledChange: y,
41
41
  scrollbarY: x,
@@ -44,10 +44,10 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, v] = q(B), G = c.forwardRef(
44
44
  onScrollbarYEnabledChange: H,
45
45
  onCornerWidthChange: _,
46
46
  onCornerHeightChange: D,
47
- children: /* @__PURE__ */ b(
47
+ children: /* @__PURE__ */ h(
48
48
  L.div,
49
49
  {
50
- dir: w,
50
+ dir: v,
51
51
  ...s,
52
52
  ref: S,
53
53
  style: {
@@ -66,9 +66,9 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, v] = q(B), G = c.forwardRef(
66
66
  G.displayName = B;
67
67
  var J = "ScrollAreaViewport", K = c.forwardRef(
68
68
  (e, o) => {
69
- const { __scopeScrollArea: r, children: l, nonce: t, ...n } = e, s = v(J, r), a = c.useRef(null), i = T(o, a, s.onViewportChange);
69
+ const { __scopeScrollArea: r, children: l, nonce: t, ...n } = e, s = p(J, r), a = c.useRef(null), i = T(o, a, s.onViewportChange);
70
70
  return /* @__PURE__ */ j(se, { children: [
71
- /* @__PURE__ */ b(
71
+ /* @__PURE__ */ h(
72
72
  "style",
73
73
  {
74
74
  dangerouslySetInnerHTML: {
@@ -77,7 +77,7 @@ var J = "ScrollAreaViewport", K = c.forwardRef(
77
77
  nonce: t
78
78
  }
79
79
  ),
80
- /* @__PURE__ */ b(
80
+ /* @__PURE__ */ h(
81
81
  L.div,
82
82
  {
83
83
  "data-radix-scroll-area-viewport": "",
@@ -99,7 +99,7 @@ var J = "ScrollAreaViewport", K = c.forwardRef(
99
99
  overflowY: s.scrollbarYEnabled ? "scroll" : "hidden",
100
100
  ...e.style
101
101
  },
102
- children: /* @__PURE__ */ b("div", { ref: s.onContentChange, style: { minWidth: "100%", display: "table" }, children: l })
102
+ children: /* @__PURE__ */ h("div", { ref: s.onContentChange, style: { minWidth: "100%", display: "table" }, children: l })
103
103
  }
104
104
  )
105
105
  ] });
@@ -108,15 +108,15 @@ var J = "ScrollAreaViewport", K = c.forwardRef(
108
108
  K.displayName = J;
109
109
  var g = "ScrollAreaScrollbar", Q = c.forwardRef(
110
110
  (e, o) => {
111
- const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = t, a = e.orientation === "horizontal";
111
+ const { forceMount: r, ...l } = e, t = p(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = t, a = e.orientation === "horizontal";
112
112
  return c.useEffect(() => (a ? n(!0) : s(!0), () => {
113
113
  a ? n(!1) : s(!1);
114
- }), [a, n, s]), t.type === "hover" ? /* @__PURE__ */ b(be, { ...l, ref: o, forceMount: r }) : t.type === "scroll" ? /* @__PURE__ */ b(me, { ...l, ref: o, forceMount: r }) : t.type === "auto" ? /* @__PURE__ */ b(Z, { ...l, ref: o, forceMount: r }) : t.type === "always" ? /* @__PURE__ */ b(k, { ...l, ref: o }) : null;
114
+ }), [a, n, s]), t.type === "hover" ? /* @__PURE__ */ h(be, { ...l, ref: o, forceMount: r }) : t.type === "scroll" ? /* @__PURE__ */ h(me, { ...l, ref: o, forceMount: r }) : t.type === "auto" ? /* @__PURE__ */ h(Z, { ...l, ref: o, forceMount: r }) : t.type === "always" ? /* @__PURE__ */ h(k, { ...l, ref: o }) : null;
115
115
  }
116
116
  );
117
117
  Q.displayName = g;
118
118
  var be = c.forwardRef((e, o) => {
119
- const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), [n, s] = c.useState(!1);
119
+ const { forceMount: r, ...l } = e, t = p(g, e.__scopeScrollArea), [n, s] = c.useState(!1);
120
120
  return c.useEffect(() => {
121
121
  const a = t.scrollArea;
122
122
  let i = 0;
@@ -130,7 +130,7 @@ var be = c.forwardRef((e, o) => {
130
130
  window.clearTimeout(i), a.removeEventListener("pointerenter", f), a.removeEventListener("pointerleave", d);
131
131
  };
132
132
  }
133
- }, [t.scrollArea, t.scrollHideDelay]), /* @__PURE__ */ b(I, { present: r || n, children: /* @__PURE__ */ b(
133
+ }, [t.scrollArea, t.scrollHideDelay]), /* @__PURE__ */ h(I, { present: r || n, children: /* @__PURE__ */ h(
134
134
  Z,
135
135
  {
136
136
  "data-state": n ? "visible" : "hidden",
@@ -139,7 +139,7 @@ var be = c.forwardRef((e, o) => {
139
139
  }
140
140
  ) });
141
141
  }), me = c.forwardRef((e, o) => {
142
- const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Y(() => i("SCROLL_END"), 100), [a, i] = fe("hidden", {
142
+ const { forceMount: r, ...l } = e, t = p(g, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Y(() => i("SCROLL_END"), 100), [a, i] = fe("hidden", {
143
143
  hidden: {
144
144
  SCROLL: "scrolling"
145
145
  },
@@ -165,14 +165,14 @@ var be = c.forwardRef((e, o) => {
165
165
  }, [a, t.scrollHideDelay, i]), c.useEffect(() => {
166
166
  const f = t.viewport, d = n ? "scrollLeft" : "scrollTop";
167
167
  if (f) {
168
- let h = f[d];
168
+ let b = f[d];
169
169
  const u = () => {
170
170
  const m = f[d];
171
- h !== m && (i("SCROLL"), s()), h = m;
171
+ b !== m && (i("SCROLL"), s()), b = m;
172
172
  };
173
173
  return f.addEventListener("scroll", u), () => f.removeEventListener("scroll", u);
174
174
  }
175
- }, [t.viewport, n, i, s]), /* @__PURE__ */ b(I, { present: r || a !== "hidden", children: /* @__PURE__ */ b(
175
+ }, [t.viewport, n, i, s]), /* @__PURE__ */ h(I, { present: r || a !== "hidden", children: /* @__PURE__ */ h(
176
176
  k,
177
177
  {
178
178
  "data-state": a === "hidden" ? "hidden" : "visible",
@@ -183,13 +183,13 @@ var be = c.forwardRef((e, o) => {
183
183
  }
184
184
  ) });
185
185
  }), Z = c.forwardRef((e, o) => {
186
- const r = v(g, e.__scopeScrollArea), { forceMount: l, ...t } = e, [n, s] = c.useState(!1), a = e.orientation === "horizontal", i = Y(() => {
186
+ const r = p(g, e.__scopeScrollArea), { forceMount: l, ...t } = e, [n, s] = c.useState(!1), a = e.orientation === "horizontal", i = Y(() => {
187
187
  if (r.viewport) {
188
188
  const f = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
189
189
  s(a ? f : d);
190
190
  }
191
191
  }, 10);
192
- return A(r.viewport, i), A(r.content, i), /* @__PURE__ */ b(I, { present: l || n, children: /* @__PURE__ */ b(
192
+ return A(r.viewport, i), A(r.content, i), /* @__PURE__ */ h(I, { present: l || n, children: /* @__PURE__ */ h(
193
193
  k,
194
194
  {
195
195
  "data-state": n ? "visible" : "hidden",
@@ -198,7 +198,7 @@ var be = c.forwardRef((e, o) => {
198
198
  }
199
199
  ) });
200
200
  }), k = c.forwardRef((e, o) => {
201
- const { orientation: r = "vertical", ...l } = e, t = v(g, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [a, i] = c.useState({
201
+ const { orientation: r = "vertical", ...l } = e, t = p(g, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [a, i] = c.useState({
202
202
  content: 0,
203
203
  viewport: 0,
204
204
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -211,10 +211,10 @@ var be = c.forwardRef((e, o) => {
211
211
  onThumbPointerUp: () => s.current = 0,
212
212
  onThumbPointerDown: (u) => s.current = u
213
213
  };
214
- function h(u, m) {
214
+ function b(u, m) {
215
215
  return Pe(u, s.current, a, m);
216
216
  }
217
- return r === "horizontal" ? /* @__PURE__ */ b(
217
+ return r === "horizontal" ? /* @__PURE__ */ h(
218
218
  Se,
219
219
  {
220
220
  ...d,
@@ -229,10 +229,10 @@ var be = c.forwardRef((e, o) => {
229
229
  t.viewport && (t.viewport.scrollLeft = u);
230
230
  },
231
231
  onDragScroll: (u) => {
232
- t.viewport && (t.viewport.scrollLeft = h(u, t.dir));
232
+ t.viewport && (t.viewport.scrollLeft = b(u, t.dir));
233
233
  }
234
234
  }
235
- ) : r === "vertical" ? /* @__PURE__ */ b(
235
+ ) : r === "vertical" ? /* @__PURE__ */ h(
236
236
  pe,
237
237
  {
238
238
  ...d,
@@ -247,15 +247,15 @@ var be = c.forwardRef((e, o) => {
247
247
  t.viewport && (t.viewport.scrollTop = u);
248
248
  },
249
249
  onDragScroll: (u) => {
250
- t.viewport && (t.viewport.scrollTop = h(u));
250
+ t.viewport && (t.viewport.scrollTop = b(u));
251
251
  }
252
252
  }
253
253
  ) : null;
254
254
  }), Se = c.forwardRef((e, o) => {
255
- const { sizes: r, onSizesChange: l, ...t } = e, n = v(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = T(o, i, n.onScrollbarXChange);
255
+ const { sizes: r, onSizesChange: l, ...t } = e, n = p(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = T(o, i, n.onScrollbarXChange);
256
256
  return c.useEffect(() => {
257
257
  i.current && a(getComputedStyle(i.current));
258
- }, [i]), /* @__PURE__ */ b(
258
+ }, [i]), /* @__PURE__ */ h(
259
259
  re,
260
260
  {
261
261
  "data-orientation": "horizontal",
@@ -271,10 +271,10 @@ var be = c.forwardRef((e, o) => {
271
271
  },
272
272
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
273
273
  onDragScroll: (d) => e.onDragScroll(d.x),
274
- onWheelScroll: (d, h) => {
274
+ onWheelScroll: (d, b) => {
275
275
  if (n.viewport) {
276
276
  const u = n.viewport.scrollLeft + d.deltaX;
277
- e.onWheelScroll(u), ce(u, h) && d.preventDefault();
277
+ e.onWheelScroll(u), ce(u, b) && d.preventDefault();
278
278
  }
279
279
  },
280
280
  onResize: () => {
@@ -291,10 +291,10 @@ var be = c.forwardRef((e, o) => {
291
291
  }
292
292
  );
293
293
  }), pe = c.forwardRef((e, o) => {
294
- const { sizes: r, onSizesChange: l, ...t } = e, n = v(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = T(o, i, n.onScrollbarYChange);
294
+ const { sizes: r, onSizesChange: l, ...t } = e, n = p(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = T(o, i, n.onScrollbarYChange);
295
295
  return c.useEffect(() => {
296
296
  i.current && a(getComputedStyle(i.current));
297
- }, [i]), /* @__PURE__ */ b(
297
+ }, [i]), /* @__PURE__ */ h(
298
298
  re,
299
299
  {
300
300
  "data-orientation": "vertical",
@@ -311,10 +311,10 @@ var be = c.forwardRef((e, o) => {
311
311
  },
312
312
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
313
313
  onDragScroll: (d) => e.onDragScroll(d.y),
314
- onWheelScroll: (d, h) => {
314
+ onWheelScroll: (d, b) => {
315
315
  if (n.viewport) {
316
316
  const u = n.viewport.scrollTop + d.deltaY;
317
- e.onWheelScroll(u), ce(u, h) && d.preventDefault();
317
+ e.onWheelScroll(u), ce(u, b) && d.preventDefault();
318
318
  }
319
319
  },
320
320
  onResize: () => {
@@ -341,44 +341,44 @@ var be = c.forwardRef((e, o) => {
341
341
  onThumbPositionChange: i,
342
342
  onDragScroll: f,
343
343
  onWheelScroll: d,
344
- onResize: h,
344
+ onResize: b,
345
345
  ...u
346
- } = e, m = v(g, r), [p, x] = c.useState(null), M = T(o, (S) => x(S)), P = c.useRef(null), _ = c.useRef(""), U = m.viewport, D = l.content - l.viewport, N = C(d), y = C(i), W = Y(h, 10);
346
+ } = e, m = p(g, r), [w, x] = c.useState(null), M = T(o, (S) => x(S)), P = c.useRef(null), _ = c.useRef(""), U = m.viewport, D = l.content - l.viewport, N = C(d), y = C(i), W = Y(b, 10);
347
347
  function H(S) {
348
348
  if (P.current) {
349
- const w = S.clientX - P.current.left, E = S.clientY - P.current.top;
350
- f({ x: w, y: E });
349
+ const v = S.clientX - P.current.left, E = S.clientY - P.current.top;
350
+ f({ x: v, y: E });
351
351
  }
352
352
  }
353
353
  return c.useEffect(() => {
354
- const S = (w) => {
355
- const E = w.target;
356
- (p == null ? void 0 : p.contains(E)) && N(w, D);
354
+ const S = (v) => {
355
+ const E = v.target;
356
+ w?.contains(E) && N(v, D);
357
357
  };
358
358
  return document.addEventListener("wheel", S, { passive: !1 }), () => document.removeEventListener("wheel", S, { passive: !1 });
359
- }, [U, p, D, N]), c.useEffect(y, [l, y]), A(p, W), A(m.content, W), /* @__PURE__ */ b(
359
+ }, [U, w, D, N]), c.useEffect(y, [l, y]), A(w, W), A(m.content, W), /* @__PURE__ */ h(
360
360
  ve,
361
361
  {
362
362
  scope: r,
363
- scrollbar: p,
363
+ scrollbar: w,
364
364
  hasThumb: t,
365
365
  onThumbChange: C(n),
366
366
  onThumbPointerUp: C(s),
367
367
  onThumbPositionChange: y,
368
368
  onThumbPointerDown: C(a),
369
- children: /* @__PURE__ */ b(
369
+ children: /* @__PURE__ */ h(
370
370
  L.div,
371
371
  {
372
372
  ...u,
373
373
  ref: M,
374
374
  style: { position: "absolute", ...u.style },
375
375
  onPointerDown: R(e.onPointerDown, (S) => {
376
- S.button === 0 && (S.target.setPointerCapture(S.pointerId), P.current = p.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), H(S));
376
+ S.button === 0 && (S.target.setPointerCapture(S.pointerId), P.current = w.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), H(S));
377
377
  }),
378
378
  onPointerMove: R(e.onPointerMove, H),
379
379
  onPointerUp: R(e.onPointerUp, (S) => {
380
- const w = S.target;
381
- w.hasPointerCapture(S.pointerId) && w.releasePointerCapture(S.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), P.current = null;
380
+ const v = S.target;
381
+ v.hasPointerCapture(S.pointerId) && v.releasePointerCapture(S.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), P.current = null;
382
382
  })
383
383
  }
384
384
  )
@@ -387,28 +387,28 @@ var be = c.forwardRef((e, o) => {
387
387
  }), z = "ScrollAreaThumb", oe = c.forwardRef(
388
388
  (e, o) => {
389
389
  const { forceMount: r, ...l } = e, t = ee(z, e.__scopeScrollArea);
390
- return /* @__PURE__ */ b(I, { present: r || t.hasThumb, children: /* @__PURE__ */ b(we, { ref: o, ...l }) });
390
+ return /* @__PURE__ */ h(I, { present: r || t.hasThumb, children: /* @__PURE__ */ h(we, { ref: o, ...l }) });
391
391
  }
392
392
  ), we = c.forwardRef(
393
393
  (e, o) => {
394
- const { __scopeScrollArea: r, style: l, ...t } = e, n = v(z, r), s = ee(z, r), { onThumbPositionChange: a } = s, i = T(
394
+ const { __scopeScrollArea: r, style: l, ...t } = e, n = p(z, r), s = ee(z, r), { onThumbPositionChange: a } = s, i = T(
395
395
  o,
396
- (h) => s.onThumbChange(h)
396
+ (b) => s.onThumbChange(b)
397
397
  ), f = c.useRef(void 0), d = Y(() => {
398
398
  f.current && (f.current(), f.current = void 0);
399
399
  }, 100);
400
400
  return c.useEffect(() => {
401
- const h = n.viewport;
402
- if (h) {
401
+ const b = n.viewport;
402
+ if (b) {
403
403
  const u = () => {
404
404
  if (d(), !f.current) {
405
- const m = Ce(h, a);
405
+ const m = Ce(b, a);
406
406
  f.current = m, a();
407
407
  }
408
408
  };
409
- return a(), h.addEventListener("scroll", u), () => h.removeEventListener("scroll", u);
409
+ return a(), b.addEventListener("scroll", u), () => b.removeEventListener("scroll", u);
410
410
  }
411
- }, [n.viewport, d, a]), /* @__PURE__ */ b(
411
+ }, [n.viewport, d, a]), /* @__PURE__ */ h(
412
412
  L.div,
413
413
  {
414
414
  "data-state": s.hasThumb ? "visible" : "hidden",
@@ -419,9 +419,9 @@ var be = c.forwardRef((e, o) => {
419
419
  height: "var(--radix-scroll-area-thumb-height)",
420
420
  ...l
421
421
  },
422
- onPointerDownCapture: R(e.onPointerDownCapture, (h) => {
423
- const m = h.target.getBoundingClientRect(), p = h.clientX - m.left, x = h.clientY - m.top;
424
- s.onThumbPointerDown({ x: p, y: x });
422
+ onPointerDownCapture: R(e.onPointerDownCapture, (b) => {
423
+ const m = b.target.getBoundingClientRect(), w = b.clientX - m.left, x = b.clientY - m.top;
424
+ s.onThumbPointerDown({ x: w, y: x });
425
425
  }),
426
426
  onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
427
427
  }
@@ -431,22 +431,20 @@ var be = c.forwardRef((e, o) => {
431
431
  oe.displayName = z;
432
432
  var F = "ScrollAreaCorner", te = c.forwardRef(
433
433
  (e, o) => {
434
- const r = v(F, e.__scopeScrollArea), l = !!(r.scrollbarX && r.scrollbarY);
435
- return r.type !== "scroll" && l ? /* @__PURE__ */ b(ge, { ...e, ref: o }) : null;
434
+ const r = p(F, e.__scopeScrollArea), l = !!(r.scrollbarX && r.scrollbarY);
435
+ return r.type !== "scroll" && l ? /* @__PURE__ */ h(ge, { ...e, ref: o }) : null;
436
436
  }
437
437
  );
438
438
  te.displayName = F;
439
439
  var ge = c.forwardRef((e, o) => {
440
- const { __scopeScrollArea: r, ...l } = e, t = v(F, r), [n, s] = c.useState(0), [a, i] = c.useState(0), f = !!(n && a);
440
+ const { __scopeScrollArea: r, ...l } = e, t = p(F, r), [n, s] = c.useState(0), [a, i] = c.useState(0), f = !!(n && a);
441
441
  return A(t.scrollbarX, () => {
442
- var h;
443
- const d = ((h = t.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
442
+ const d = t.scrollbarX?.offsetHeight || 0;
444
443
  t.onCornerHeightChange(d), i(d);
445
444
  }), A(t.scrollbarY, () => {
446
- var h;
447
- const d = ((h = t.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
445
+ const d = t.scrollbarY?.offsetWidth || 0;
448
446
  t.onCornerWidthChange(d), s(d);
449
- }), f ? /* @__PURE__ */ b(
447
+ }), f ? /* @__PURE__ */ h(
450
448
  L.div,
451
449
  {
452
450
  ...l,
@@ -475,8 +473,8 @@ function X(e) {
475
473
  return Math.max(l, 18);
476
474
  }
477
475
  function Pe(e, o, r, l = "ltr") {
478
- const t = X(r), n = t / 2, s = o || n, a = t - s, i = r.scrollbar.paddingStart + s, f = r.scrollbar.size - r.scrollbar.paddingEnd - a, d = r.content - r.viewport, h = l === "ltr" ? [0, d] : [d * -1, 0];
479
- return le([i, f], h)(e);
476
+ const t = X(r), n = t / 2, s = o || n, a = t - s, i = r.scrollbar.paddingStart + s, f = r.scrollbar.size - r.scrollbar.paddingEnd - a, d = r.content - r.viewport, b = l === "ltr" ? [0, d] : [d * -1, 0];
477
+ return le([i, f], b)(e);
480
478
  }
481
479
  function $(e, o, r = "ltr") {
482
480
  const l = X(o), t = o.scrollbar.paddingStart + o.scrollbar.paddingEnd, n = o.scrollbar.size - t, s = o.content - o.viewport, a = n - l, i = r === "ltr" ? [0, s] : [s * -1, 0], f = ue(e, i);
@@ -534,7 +532,7 @@ function Me({
534
532
  "data-slot": "scroll-area",
535
533
  ...l,
536
534
  children: [
537
- /* @__PURE__ */ b(
535
+ /* @__PURE__ */ h(
538
536
  Ee,
539
537
  {
540
538
  className: V(
@@ -545,8 +543,8 @@ function Me({
545
543
  children: o
546
544
  }
547
545
  ),
548
- /* @__PURE__ */ b(Te, {}),
549
- /* @__PURE__ */ b(Ae, {})
546
+ /* @__PURE__ */ h(Te, {}),
547
+ /* @__PURE__ */ h(Ae, {})
550
548
  ]
551
549
  }
552
550
  );
@@ -556,7 +554,7 @@ function Te({
556
554
  orientation: o = "vertical",
557
555
  ...r
558
556
  }) {
559
- return /* @__PURE__ */ b(
557
+ return /* @__PURE__ */ h(
560
558
  Q,
561
559
  {
562
560
  className: V(
@@ -568,7 +566,7 @@ function Te({
568
566
  "data-slot": "scroll-area-scrollbar",
569
567
  orientation: o,
570
568
  ...r,
571
- children: /* @__PURE__ */ b(
569
+ children: /* @__PURE__ */ h(
572
570
  oe,
573
571
  {
574
572
  className: "relative flex-1 rounded-full bg-border",