@senitix/ui 0.4.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 (206) hide show
  1. package/dist/avatar-C0aVNCG9.cjs +2 -0
  2. package/dist/avatar-C0aVNCG9.cjs.map +1 -0
  3. package/dist/avatar-CN6wcrqY.js +288 -0
  4. package/dist/avatar-CN6wcrqY.js.map +1 -0
  5. package/dist/calendar-BFWc4IB7.js +1182 -0
  6. package/dist/calendar-BFWc4IB7.js.map +1 -0
  7. package/dist/calendar-BUm7YrNf.cjs +2 -0
  8. package/dist/calendar-BUm7YrNf.cjs.map +1 -0
  9. package/dist/calendar-ChJkFXXr.js +11 -0
  10. package/dist/calendar-ChJkFXXr.js.map +1 -0
  11. package/dist/calendar-SwL5isYC.cjs +2 -0
  12. package/dist/calendar-SwL5isYC.cjs.map +1 -0
  13. package/dist/card-K4fxyYwE.js +51 -0
  14. package/dist/card-K4fxyYwE.js.map +1 -0
  15. package/dist/card-tMkUxpmW.cjs +2 -0
  16. package/dist/card-tMkUxpmW.cjs.map +1 -0
  17. package/dist/checkbox-CpOq5hkT.js +289 -0
  18. package/dist/checkbox-CpOq5hkT.js.map +1 -0
  19. package/dist/checkbox-D7-LQyCl.cjs +2 -0
  20. package/dist/checkbox-D7-LQyCl.cjs.map +1 -0
  21. package/dist/chevron-down-DHdXqOqK.cjs +2 -0
  22. package/dist/chevron-down-DHdXqOqK.cjs.map +1 -0
  23. package/dist/chevron-down-DJ1_YIFu.js +8 -0
  24. package/dist/chevron-down-DJ1_YIFu.js.map +1 -0
  25. package/dist/chevron-right-B3bovvh0.js +8 -0
  26. package/dist/chevron-right-B3bovvh0.js.map +1 -0
  27. package/dist/chevron-right-Dvyd11q0.cjs +2 -0
  28. package/dist/chevron-right-Dvyd11q0.cjs.map +1 -0
  29. package/dist/chevron-up-B9fuiZhc.cjs +2 -0
  30. package/dist/chevron-up-B9fuiZhc.cjs.map +1 -0
  31. package/dist/chevron-up-CGtXOr51.js +6 -0
  32. package/dist/chevron-up-CGtXOr51.js.map +1 -0
  33. package/dist/components/charts/index.cjs.js +2 -0
  34. package/dist/components/charts/index.cjs.js.map +1 -0
  35. package/dist/components/charts/index.es.js +12 -0
  36. package/dist/components/charts/index.es.js.map +1 -0
  37. package/dist/components/data-display/index.cjs.js +2 -0
  38. package/dist/components/data-display/index.cjs.js.map +1 -0
  39. package/dist/components/data-display/index.es.js +25 -0
  40. package/dist/components/data-display/index.es.js.map +1 -0
  41. package/dist/components/dnd/index.cjs.js +2 -0
  42. package/dist/components/dnd/index.cjs.js.map +1 -0
  43. package/dist/components/dnd/index.es.js +9 -0
  44. package/dist/components/dnd/index.es.js.map +1 -0
  45. package/dist/components/feedback/index.cjs.js +2 -0
  46. package/dist/components/feedback/index.cjs.js.map +1 -0
  47. package/dist/components/feedback/index.es.js +16 -0
  48. package/dist/components/feedback/index.es.js.map +1 -0
  49. package/dist/components/forms/index.cjs.js +2 -0
  50. package/dist/components/forms/index.cjs.js.map +1 -0
  51. package/dist/components/forms/index.es.js +27 -0
  52. package/dist/components/forms/index.es.js.map +1 -0
  53. package/dist/components/layouts/index.cjs.js +2 -0
  54. package/dist/components/layouts/index.cjs.js.map +1 -0
  55. package/dist/components/layouts/index.es.js +25 -0
  56. package/dist/components/layouts/index.es.js.map +1 -0
  57. package/dist/components/navigation/index.cjs.js +2 -0
  58. package/dist/components/navigation/index.cjs.js.map +1 -0
  59. package/dist/components/navigation/index.es.js +42 -0
  60. package/dist/components/navigation/index.es.js.map +1 -0
  61. package/dist/components/ui/index.cjs.js +2 -0
  62. package/dist/components/ui/index.cjs.js.map +1 -0
  63. package/dist/components/ui/index.es.js +165 -0
  64. package/dist/components/ui/index.es.js.map +1 -0
  65. package/dist/createLucideIcon-BbeNo6vq.js +56 -0
  66. package/dist/createLucideIcon-BbeNo6vq.js.map +1 -0
  67. package/dist/createLucideIcon-i5GEhNMV.cjs +2 -0
  68. package/dist/createLucideIcon-i5GEhNMV.cjs.map +1 -0
  69. package/dist/ellipsis-BW2gWki8.cjs +2 -0
  70. package/dist/ellipsis-BW2gWki8.cjs.map +1 -0
  71. package/dist/ellipsis-CiKEaUNP.js +10 -0
  72. package/dist/ellipsis-CiKEaUNP.js.map +1 -0
  73. package/dist/file-V_hhCUhr.cjs +2 -0
  74. package/dist/file-V_hhCUhr.cjs.map +1 -0
  75. package/dist/file-wzTXnWqz.js +9 -0
  76. package/dist/file-wzTXnWqz.js.map +1 -0
  77. package/dist/filter-tags-DjUaNXHR.cjs +5 -0
  78. package/dist/filter-tags-DjUaNXHR.cjs.map +1 -0
  79. package/dist/filter-tags-i_I8qV1N.js +2658 -0
  80. package/dist/filter-tags-i_I8qV1N.js.map +1 -0
  81. package/dist/full-calendar-7ac2FFU6.js +3518 -0
  82. package/dist/full-calendar-7ac2FFU6.js.map +1 -0
  83. package/dist/full-calendar-Cpeh5xMP.cjs +8 -0
  84. package/dist/full-calendar-Cpeh5xMP.cjs.map +1 -0
  85. package/dist/global-search-UNXjoFlI.cjs +2 -0
  86. package/dist/global-search-UNXjoFlI.cjs.map +1 -0
  87. package/dist/global-search-h1rVbP2q.js +1188 -0
  88. package/dist/global-search-h1rVbP2q.js.map +1 -0
  89. package/dist/hooks/index.cjs.js +2 -0
  90. package/dist/hooks/index.cjs.js.map +1 -0
  91. package/dist/hooks/index.es.js +13 -0
  92. package/dist/hooks/index.es.js.map +1 -0
  93. package/dist/index-Co9o9StL.js +33 -0
  94. package/dist/index-Co9o9StL.js.map +1 -0
  95. package/dist/index-CwJPJKOE.js +2278 -0
  96. package/dist/index-CwJPJKOE.js.map +1 -0
  97. package/dist/index-CzVK9Zyb.cjs +6 -0
  98. package/dist/index-CzVK9Zyb.cjs.map +1 -0
  99. package/dist/index-l828OqQN.js +288 -0
  100. package/dist/index-l828OqQN.js.map +1 -0
  101. package/dist/index-lGzB9daF.cjs +2 -0
  102. package/dist/index-lGzB9daF.cjs.map +1 -0
  103. package/dist/index-lT9bLt9X.cjs +2 -0
  104. package/dist/index-lT9bLt9X.cjs.map +1 -0
  105. package/dist/index.cjs.js +2 -0
  106. package/dist/index.cjs.js.map +1 -0
  107. package/dist/index.es.js +332 -0
  108. package/dist/index.es.js.map +1 -0
  109. package/dist/input-CZrckPLk.cjs +42 -0
  110. package/dist/input-CZrckPLk.cjs.map +1 -0
  111. package/dist/input-D4AoiWxo.js +3629 -0
  112. package/dist/input-D4AoiWxo.js.map +1 -0
  113. package/dist/locale-provider-DHMwuneF.cjs +2 -0
  114. package/dist/locale-provider-DHMwuneF.cjs.map +1 -0
  115. package/dist/locale-provider-DanG6RRG.js +1012 -0
  116. package/dist/locale-provider-DanG6RRG.js.map +1 -0
  117. package/dist/locale-selector-Ppe0KTi-.cjs +2 -0
  118. package/dist/locale-selector-Ppe0KTi-.cjs.map +1 -0
  119. package/dist/locale-selector-xn2GpdP9.js +1745 -0
  120. package/dist/locale-selector-xn2GpdP9.js.map +1 -0
  121. package/dist/minus-BXBFZSZs.cjs +2 -0
  122. package/dist/minus-BXBFZSZs.cjs.map +1 -0
  123. package/dist/minus-DvlYtl96.js +6 -0
  124. package/dist/minus-DvlYtl96.js.map +1 -0
  125. package/dist/multi-container-C2UpSw5f.js +731 -0
  126. package/dist/multi-container-C2UpSw5f.js.map +1 -0
  127. package/dist/multi-container-DMKL8c9B.cjs +2 -0
  128. package/dist/multi-container-DMKL8c9B.cjs.map +1 -0
  129. package/dist/pipeline-By5_8AFg.cjs +2 -0
  130. package/dist/pipeline-By5_8AFg.cjs.map +1 -0
  131. package/dist/pipeline-D-QNSU0U.js +1036 -0
  132. package/dist/pipeline-D-QNSU0U.js.map +1 -0
  133. package/dist/plus-8wKRkVu-.cjs +2 -0
  134. package/dist/plus-8wKRkVu-.cjs.map +1 -0
  135. package/dist/plus-CJD68KQD.js +9 -0
  136. package/dist/plus-CJD68KQD.js.map +1 -0
  137. package/dist/popover-4V4sGe1U.js +765 -0
  138. package/dist/popover-4V4sGe1U.js.map +1 -0
  139. package/dist/popover-ivh-plLc.cjs +2 -0
  140. package/dist/popover-ivh-plLc.cjs.map +1 -0
  141. package/dist/progress-CFnuLqnS.cjs +7 -0
  142. package/dist/progress-CFnuLqnS.cjs.map +1 -0
  143. package/dist/progress-D5AsrWa6.js +222 -0
  144. package/dist/progress-D5AsrWa6.js.map +1 -0
  145. package/dist/providers/index.cjs.js +2 -0
  146. package/dist/providers/index.cjs.js.map +1 -0
  147. package/dist/providers/index.es.js +9 -0
  148. package/dist/providers/index.es.js.map +1 -0
  149. package/dist/scroll-area-DQeqDp3Y.js +952 -0
  150. package/dist/scroll-area-DQeqDp3Y.js.map +1 -0
  151. package/dist/scroll-area-DYOiJMXh.cjs +2 -0
  152. package/dist/scroll-area-DYOiJMXh.cjs.map +1 -0
  153. package/dist/select-C1rNBi6c.js +974 -0
  154. package/dist/select-C1rNBi6c.js.map +1 -0
  155. package/dist/select-m-Mqwxu3.cjs +2 -0
  156. package/dist/select-m-Mqwxu3.cjs.map +1 -0
  157. package/dist/separator-DBUivkHq.cjs +2 -0
  158. package/dist/separator-DBUivkHq.cjs.map +1 -0
  159. package/dist/separator-DsfoJx-2.js +395 -0
  160. package/dist/separator-DsfoJx-2.js.map +1 -0
  161. package/dist/sheet-BVWCpq7E.js +84 -0
  162. package/dist/sheet-BVWCpq7E.js.map +1 -0
  163. package/dist/sheet-mKiFLVnK.cjs +2 -0
  164. package/dist/sheet-mKiFLVnK.cjs.map +1 -0
  165. package/dist/skeleton-BSwwYaQU.cjs +2 -0
  166. package/dist/skeleton-BSwwYaQU.cjs.map +1 -0
  167. package/dist/skeleton-BmGbfJw3.js +9 -0
  168. package/dist/skeleton-BmGbfJw3.js.map +1 -0
  169. package/dist/sortable.esm-Blhf_jh1.js +3391 -0
  170. package/dist/sortable.esm-Blhf_jh1.js.map +1 -0
  171. package/dist/sortable.esm-DcQYlXi3.cjs +6 -0
  172. package/dist/sortable.esm-DcQYlXi3.cjs.map +1 -0
  173. package/dist/sparkline-chart-Da-ehDGv.js +21082 -0
  174. package/dist/sparkline-chart-Da-ehDGv.js.map +1 -0
  175. package/dist/sparkline-chart-ca3uTzVK.cjs +68 -0
  176. package/dist/sparkline-chart-ca3uTzVK.cjs.map +1 -0
  177. package/dist/trending-up-D3Nfrhi3.cjs +2 -0
  178. package/dist/trending-up-D3Nfrhi3.cjs.map +1 -0
  179. package/dist/trending-up-DPwlYzQb.js +9 -0
  180. package/dist/trending-up-DPwlYzQb.js.map +1 -0
  181. package/dist/ui.css +1 -0
  182. package/dist/use-formatters-d97RVcmg.cjs +2 -0
  183. package/dist/use-formatters-d97RVcmg.cjs.map +1 -0
  184. package/dist/use-formatters-l1_2c8z0.js +6682 -0
  185. package/dist/use-formatters-l1_2c8z0.js.map +1 -0
  186. package/dist/use-local-storage-BjlrKzE-.js +42 -0
  187. package/dist/use-local-storage-BjlrKzE-.js.map +1 -0
  188. package/dist/use-local-storage-q-1odzIu.cjs +2 -0
  189. package/dist/use-local-storage-q-1odzIu.cjs.map +1 -0
  190. package/dist/use-mobile-C-LMK4T8.js +15 -0
  191. package/dist/use-mobile-C-LMK4T8.js.map +1 -0
  192. package/dist/use-mobile-DY7TJ5lx.cjs +2 -0
  193. package/dist/use-mobile-DY7TJ5lx.cjs.map +1 -0
  194. package/dist/use-toast-DG2qdYhl.js +97 -0
  195. package/dist/use-toast-DG2qdYhl.js.map +1 -0
  196. package/dist/use-toast-DxZJ8uUm.cjs +2 -0
  197. package/dist/use-toast-DxZJ8uUm.cjs.map +1 -0
  198. package/dist/utils/index.cjs.js +2 -0
  199. package/dist/utils/index.cjs.js.map +1 -0
  200. package/dist/utils/index.es.js +5 -0
  201. package/dist/utils/index.es.js.map +1 -0
  202. package/dist/welcome-card-CPolYl1D.cjs +2 -0
  203. package/dist/welcome-card-CPolYl1D.cjs.map +1 -0
  204. package/dist/welcome-card-CxMJZ8bv.js +963 -0
  205. package/dist/welcome-card-CxMJZ8bv.js.map +1 -0
  206. package/package.json +179 -0
@@ -0,0 +1,952 @@
1
+ import { c as te } from "./createLucideIcon-BbeNo6vq.js";
2
+ import { jsx as m, jsxs as re, Fragment as Se } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { a as we, c as z } from "./index-CwJPJKOE.js";
5
+ import * as ye from "react-dom";
6
+ function ht(e, t) {
7
+ const r = s.createContext(t), o = (l) => {
8
+ const { children: i, ...c } = l, a = s.useMemo(() => c, Object.values(c));
9
+ return /* @__PURE__ */ m(r.Provider, { value: a, children: i });
10
+ };
11
+ o.displayName = e + "Provider";
12
+ function n(l) {
13
+ const i = s.useContext(r);
14
+ if (i) return i;
15
+ if (t !== void 0) return t;
16
+ throw new Error(`\`${l}\` must be used within \`${e}\``);
17
+ }
18
+ return [o, n];
19
+ }
20
+ function Ce(e, t = []) {
21
+ let r = [];
22
+ function o(l, i) {
23
+ const c = s.createContext(i), a = r.length;
24
+ r = [...r, i];
25
+ const u = (h) => {
26
+ const { scope: f, children: p, ...v } = h, g = f?.[e]?.[a] || c, w = s.useMemo(() => v, Object.values(v));
27
+ return /* @__PURE__ */ m(g.Provider, { value: w, children: p });
28
+ };
29
+ u.displayName = l + "Provider";
30
+ function d(h, f) {
31
+ const p = f?.[e]?.[a] || c, v = s.useContext(p);
32
+ if (v) return v;
33
+ if (i !== void 0) return i;
34
+ throw new Error(`\`${h}\` must be used within \`${l}\``);
35
+ }
36
+ return [u, d];
37
+ }
38
+ const n = () => {
39
+ const l = r.map((i) => s.createContext(i));
40
+ return function(c) {
41
+ const a = c?.[e] || l;
42
+ return s.useMemo(
43
+ () => ({ [`__scope${e}`]: { ...c, [e]: a } }),
44
+ [c, a]
45
+ );
46
+ };
47
+ };
48
+ return n.scopeName = e, [o, Pe(n, ...t)];
49
+ }
50
+ function Pe(...e) {
51
+ const t = e[0];
52
+ if (e.length === 1) return t;
53
+ const r = () => {
54
+ const o = e.map((n) => ({
55
+ useScope: n(),
56
+ scopeName: n.scopeName
57
+ }));
58
+ return function(l) {
59
+ const i = o.reduce((c, { useScope: a, scopeName: u }) => {
60
+ const h = a(l)[`__scope${u}`];
61
+ return { ...c, ...h };
62
+ }, {});
63
+ return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
64
+ };
65
+ };
66
+ return r.scopeName = t.scopeName, r;
67
+ }
68
+ function G(e, t) {
69
+ if (typeof e == "function")
70
+ return e(t);
71
+ e != null && (e.current = t);
72
+ }
73
+ function Y(...e) {
74
+ return (t) => {
75
+ let r = !1;
76
+ const o = e.map((n) => {
77
+ const l = G(n, t);
78
+ return !r && typeof l == "function" && (r = !0), l;
79
+ });
80
+ if (r)
81
+ return () => {
82
+ for (let n = 0; n < o.length; n++) {
83
+ const l = o[n];
84
+ typeof l == "function" ? l() : G(e[n], null);
85
+ }
86
+ };
87
+ };
88
+ }
89
+ function R(...e) {
90
+ return s.useCallback(Y(...e), e);
91
+ }
92
+ function x(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
93
+ return function(n) {
94
+ if (e?.(n), r === !1 || !n.defaultPrevented)
95
+ return t?.(n);
96
+ };
97
+ }
98
+ var X = globalThis?.document ? s.useLayoutEffect : () => {
99
+ };
100
+ // @__NO_SIDE_EFFECTS__
101
+ function Ee(e) {
102
+ const t = /* @__PURE__ */ xe(e), r = s.forwardRef((o, n) => {
103
+ const { children: l, ...i } = o, c = s.Children.toArray(l), a = c.find(Ae);
104
+ if (a) {
105
+ const u = a.props.children, d = c.map((h) => h === a ? s.Children.count(u) > 1 ? s.Children.only(null) : s.isValidElement(u) ? u.props.children : null : h);
106
+ return /* @__PURE__ */ m(t, { ...i, ref: n, children: s.isValidElement(u) ? s.cloneElement(u, void 0, d) : null });
107
+ }
108
+ return /* @__PURE__ */ m(t, { ...i, ref: n, children: l });
109
+ });
110
+ return r.displayName = `${e}.Slot`, r;
111
+ }
112
+ // @__NO_SIDE_EFFECTS__
113
+ function xe(e) {
114
+ const t = s.forwardRef((r, o) => {
115
+ const { children: n, ...l } = r;
116
+ if (s.isValidElement(n)) {
117
+ const i = Ne(n), c = Te(l, n.props);
118
+ return n.type !== s.Fragment && (c.ref = o ? Y(o, i) : i), s.cloneElement(n, c);
119
+ }
120
+ return s.Children.count(n) > 1 ? s.Children.only(null) : null;
121
+ });
122
+ return t.displayName = `${e}.SlotClone`, t;
123
+ }
124
+ var Re = /* @__PURE__ */ Symbol("radix.slottable");
125
+ function Ae(e) {
126
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Re;
127
+ }
128
+ function Te(e, t) {
129
+ const r = { ...t };
130
+ for (const o in t) {
131
+ const n = e[o], l = t[o];
132
+ /^on[A-Z]/.test(o) ? n && l ? r[o] = (...c) => {
133
+ const a = l(...c);
134
+ return n(...c), a;
135
+ } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
136
+ }
137
+ return { ...e, ...r };
138
+ }
139
+ function Ne(e) {
140
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
141
+ return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
142
+ }
143
+ var _e = [
144
+ "a",
145
+ "button",
146
+ "div",
147
+ "form",
148
+ "h2",
149
+ "h3",
150
+ "img",
151
+ "input",
152
+ "label",
153
+ "li",
154
+ "nav",
155
+ "ol",
156
+ "p",
157
+ "select",
158
+ "span",
159
+ "svg",
160
+ "ul"
161
+ ], _ = _e.reduce((e, t) => {
162
+ const r = /* @__PURE__ */ Ee(`Primitive.${t}`), o = s.forwardRef((n, l) => {
163
+ const { asChild: i, ...c } = n, a = i ? r : t;
164
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ m(a, { ...c, ref: l });
165
+ });
166
+ return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
167
+ }, {});
168
+ function mt(e, t) {
169
+ e && ye.flushSync(() => e.dispatchEvent(t));
170
+ }
171
+ function Le(e, t) {
172
+ return s.useReducer((r, o) => t[r][o] ?? r, e);
173
+ }
174
+ var L = (e) => {
175
+ const { present: t, children: r } = e, o = Oe(t), n = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), l = R(o.ref, De(n));
176
+ return typeof r == "function" || o.isPresent ? s.cloneElement(n, { ref: l }) : null;
177
+ };
178
+ L.displayName = "Presence";
179
+ function Oe(e) {
180
+ const [t, r] = s.useState(), o = s.useRef(null), n = s.useRef(e), l = s.useRef("none"), i = e ? "mounted" : "unmounted", [c, a] = Le(i, {
181
+ mounted: {
182
+ UNMOUNT: "unmounted",
183
+ ANIMATION_OUT: "unmountSuspended"
184
+ },
185
+ unmountSuspended: {
186
+ MOUNT: "mounted",
187
+ ANIMATION_END: "unmounted"
188
+ },
189
+ unmounted: {
190
+ MOUNT: "mounted"
191
+ }
192
+ });
193
+ return s.useEffect(() => {
194
+ const u = V(o.current);
195
+ l.current = c === "mounted" ? u : "none";
196
+ }, [c]), X(() => {
197
+ const u = o.current, d = n.current;
198
+ if (d !== e) {
199
+ const f = l.current, p = V(u);
200
+ e ? a("MOUNT") : p === "none" || u?.display === "none" ? a("UNMOUNT") : a(d && f !== p ? "ANIMATION_OUT" : "UNMOUNT"), n.current = e;
201
+ }
202
+ }, [e, a]), X(() => {
203
+ if (t) {
204
+ let u;
205
+ const d = t.ownerDocument.defaultView ?? window, h = (p) => {
206
+ const g = V(o.current).includes(CSS.escape(p.animationName));
207
+ if (p.target === t && g && (a("ANIMATION_END"), !n.current)) {
208
+ const w = t.style.animationFillMode;
209
+ t.style.animationFillMode = "forwards", u = d.setTimeout(() => {
210
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = w);
211
+ });
212
+ }
213
+ }, f = (p) => {
214
+ p.target === t && (l.current = V(o.current));
215
+ };
216
+ return t.addEventListener("animationstart", f), t.addEventListener("animationcancel", h), t.addEventListener("animationend", h), () => {
217
+ d.clearTimeout(u), t.removeEventListener("animationstart", f), t.removeEventListener("animationcancel", h), t.removeEventListener("animationend", h);
218
+ };
219
+ } else
220
+ a("ANIMATION_END");
221
+ }, [t, a]), {
222
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
223
+ ref: s.useCallback((u) => {
224
+ o.current = u ? getComputedStyle(u) : null, r(u);
225
+ }, [])
226
+ };
227
+ }
228
+ function V(e) {
229
+ return e?.animationName || "none";
230
+ }
231
+ function De(e) {
232
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
233
+ return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
234
+ }
235
+ var Me = s.createContext(void 0);
236
+ function We(e) {
237
+ const t = s.useContext(Me);
238
+ return e || t || "ltr";
239
+ }
240
+ const pt = te("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
241
+ const vt = te("X", [
242
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
243
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
244
+ ]), J = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Q = we, ne = (e, t) => (r) => {
245
+ var o;
246
+ if (t?.variants == null) return Q(e, r?.class, r?.className);
247
+ const { variants: n, defaultVariants: l } = t, i = Object.keys(n).map((u) => {
248
+ const d = r?.[u], h = l?.[u];
249
+ if (d === null) return null;
250
+ const f = J(d) || J(h);
251
+ return n[u][f];
252
+ }), c = r && Object.entries(r).reduce((u, d) => {
253
+ let [h, f] = d;
254
+ return f === void 0 || (u[h] = f), u;
255
+ }, {}), a = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((u, d) => {
256
+ let { class: h, className: f, ...p } = d;
257
+ return Object.entries(p).every((v) => {
258
+ let [g, w] = v;
259
+ return Array.isArray(w) ? w.includes({
260
+ ...l,
261
+ ...c
262
+ }[g]) : {
263
+ ...l,
264
+ ...c
265
+ }[g] === w;
266
+ }) ? [
267
+ ...u,
268
+ h,
269
+ f
270
+ ] : u;
271
+ }, []);
272
+ return Q(e, i, a, r?.class, r?.className);
273
+ };
274
+ function E(e) {
275
+ const t = s.useRef(e);
276
+ return s.useEffect(() => {
277
+ t.current = e;
278
+ }), s.useMemo(() => (...r) => t.current?.(...r), []);
279
+ }
280
+ var Ie = /* @__PURE__ */ Symbol.for("react.lazy"), H = s[" use ".trim().toString()];
281
+ function Ve(e) {
282
+ return typeof e == "object" && e !== null && "then" in e;
283
+ }
284
+ function oe(e) {
285
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === Ie && "_payload" in e && Ve(e._payload);
286
+ }
287
+ // @__NO_SIDE_EFFECTS__
288
+ function He(e) {
289
+ const t = /* @__PURE__ */ $e(e), r = s.forwardRef((o, n) => {
290
+ let { children: l, ...i } = o;
291
+ oe(l) && typeof H == "function" && (l = H(l._payload));
292
+ const c = s.Children.toArray(l), a = c.find(Ue);
293
+ if (a) {
294
+ const u = a.props.children, d = c.map((h) => h === a ? s.Children.count(u) > 1 ? s.Children.only(null) : s.isValidElement(u) ? u.props.children : null : h);
295
+ return /* @__PURE__ */ m(t, { ...i, ref: n, children: s.isValidElement(u) ? s.cloneElement(u, void 0, d) : null });
296
+ }
297
+ return /* @__PURE__ */ m(t, { ...i, ref: n, children: l });
298
+ });
299
+ return r.displayName = `${e}.Slot`, r;
300
+ }
301
+ var ke = /* @__PURE__ */ He("Slot");
302
+ // @__NO_SIDE_EFFECTS__
303
+ function $e(e) {
304
+ const t = s.forwardRef((r, o) => {
305
+ let { children: n, ...l } = r;
306
+ if (oe(n) && typeof H == "function" && (n = H(n._payload)), s.isValidElement(n)) {
307
+ const i = Fe(n), c = Be(l, n.props);
308
+ return n.type !== s.Fragment && (c.ref = o ? Y(o, i) : i), s.cloneElement(n, c);
309
+ }
310
+ return s.Children.count(n) > 1 ? s.Children.only(null) : null;
311
+ });
312
+ return t.displayName = `${e}.SlotClone`, t;
313
+ }
314
+ var ze = /* @__PURE__ */ Symbol("radix.slottable");
315
+ function Ue(e) {
316
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ze;
317
+ }
318
+ function Be(e, t) {
319
+ const r = { ...t };
320
+ for (const o in t) {
321
+ const n = e[o], l = t[o];
322
+ /^on[A-Z]/.test(o) ? n && l ? r[o] = (...c) => {
323
+ const a = l(...c);
324
+ return n(...c), a;
325
+ } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
326
+ }
327
+ return { ...e, ...r };
328
+ }
329
+ function Fe(e) {
330
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
331
+ return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
332
+ }
333
+ const Xe = ne(
334
+ "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",
335
+ {
336
+ variants: {
337
+ variant: {
338
+ default: "bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md",
339
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:shadow-md",
340
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent",
341
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 hover:shadow-sm",
342
+ ghost: "hover:bg-accent hover:text-accent-foreground",
343
+ link: "text-primary underline-offset-4 hover:underline",
344
+ success: "bg-success text-success-foreground hover:bg-success/90 hover:shadow-md",
345
+ warning: "bg-warning text-warning-foreground hover:bg-warning/90 hover:shadow-md"
346
+ },
347
+ size: {
348
+ default: "h-10 px-4 py-2",
349
+ sm: "h-9 rounded-md px-3",
350
+ lg: "h-11 rounded-lg px-8",
351
+ icon: "h-10 w-10"
352
+ }
353
+ },
354
+ defaultVariants: {
355
+ variant: "default",
356
+ size: "default"
357
+ }
358
+ }
359
+ ), Ye = s.forwardRef(
360
+ ({ className: e, variant: t, size: r, asChild: o = !1, ...n }, l) => /* @__PURE__ */ m(o ? ke : "button", { className: z(Xe({ variant: t, size: r, className: e })), ref: l, ...n })
361
+ );
362
+ Ye.displayName = "Button";
363
+ const je = ne(
364
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
365
+ {
366
+ variants: {
367
+ variant: {
368
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80 hover:shadow-sm",
369
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
370
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80 hover:shadow-sm",
371
+ outline: "text-foreground hover:bg-muted",
372
+ success: "border-transparent bg-success text-success-foreground hover:bg-success/80 hover:shadow-sm",
373
+ warning: "border-transparent bg-warning text-warning-foreground hover:bg-warning/80 hover:shadow-sm",
374
+ info: "border-transparent bg-info text-info-foreground hover:bg-info/80 hover:shadow-sm"
375
+ }
376
+ },
377
+ defaultVariants: {
378
+ variant: "default"
379
+ }
380
+ }
381
+ );
382
+ function bt({ className: e, variant: t, ...r }) {
383
+ return /* @__PURE__ */ m("div", { className: z(je({ variant: t }), e), ...r });
384
+ }
385
+ function qe(e, [t, r]) {
386
+ return Math.min(r, Math.max(t, e));
387
+ }
388
+ function Ze(e, t) {
389
+ return s.useReducer((r, o) => t[r][o] ?? r, e);
390
+ }
391
+ var j = "ScrollArea", [le] = Ce(j), [Ke, S] = le(j), se = s.forwardRef(
392
+ (e, t) => {
393
+ const {
394
+ __scopeScrollArea: r,
395
+ type: o = "hover",
396
+ dir: n,
397
+ scrollHideDelay: l = 600,
398
+ ...i
399
+ } = e, [c, a] = s.useState(null), [u, d] = s.useState(null), [h, f] = s.useState(null), [p, v] = s.useState(null), [g, w] = s.useState(null), [P, O] = s.useState(0), [F, D] = s.useState(0), [M, N] = s.useState(!1), [W, I] = s.useState(!1), b = R(t, (A) => a(A)), y = We(n);
400
+ return /* @__PURE__ */ m(
401
+ Ke,
402
+ {
403
+ scope: r,
404
+ type: o,
405
+ dir: y,
406
+ scrollHideDelay: l,
407
+ scrollArea: c,
408
+ viewport: u,
409
+ onViewportChange: d,
410
+ content: h,
411
+ onContentChange: f,
412
+ scrollbarX: p,
413
+ onScrollbarXChange: v,
414
+ scrollbarXEnabled: M,
415
+ onScrollbarXEnabledChange: N,
416
+ scrollbarY: g,
417
+ onScrollbarYChange: w,
418
+ scrollbarYEnabled: W,
419
+ onScrollbarYEnabledChange: I,
420
+ onCornerWidthChange: O,
421
+ onCornerHeightChange: D,
422
+ children: /* @__PURE__ */ m(
423
+ _.div,
424
+ {
425
+ dir: y,
426
+ ...i,
427
+ ref: b,
428
+ style: {
429
+ position: "relative",
430
+ // Pass corner sizes as CSS vars to reduce re-renders of context consumers
431
+ "--radix-scroll-area-corner-width": P + "px",
432
+ "--radix-scroll-area-corner-height": F + "px",
433
+ ...e.style
434
+ }
435
+ }
436
+ )
437
+ }
438
+ );
439
+ }
440
+ );
441
+ se.displayName = j;
442
+ var ie = "ScrollAreaViewport", ce = s.forwardRef(
443
+ (e, t) => {
444
+ const { __scopeScrollArea: r, children: o, nonce: n, ...l } = e, i = S(ie, r), c = s.useRef(null), a = R(t, c, i.onViewportChange);
445
+ return /* @__PURE__ */ re(Se, { children: [
446
+ /* @__PURE__ */ m(
447
+ "style",
448
+ {
449
+ dangerouslySetInnerHTML: {
450
+ __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
451
+ },
452
+ nonce: n
453
+ }
454
+ ),
455
+ /* @__PURE__ */ m(
456
+ _.div,
457
+ {
458
+ "data-radix-scroll-area-viewport": "",
459
+ ...l,
460
+ ref: a,
461
+ style: {
462
+ /**
463
+ * We don't support `visible` because the intention is to have at least one scrollbar
464
+ * if this component is used and `visible` will behave like `auto` in that case
465
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
466
+ *
467
+ * We don't handle `auto` because the intention is for the native implementation
468
+ * to be hidden if using this component. We just want to ensure the node is scrollable
469
+ * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
470
+ * the browser from having to work out whether to render native scrollbars or not,
471
+ * we tell it to with the intention of hiding them in CSS.
472
+ */
473
+ overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
474
+ overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
475
+ ...e.style
476
+ },
477
+ children: /* @__PURE__ */ m("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
478
+ }
479
+ )
480
+ ] });
481
+ }
482
+ );
483
+ ce.displayName = ie;
484
+ var C = "ScrollAreaScrollbar", q = s.forwardRef(
485
+ (e, t) => {
486
+ const { forceMount: r, ...o } = e, n = S(C, e.__scopeScrollArea), { onScrollbarXEnabledChange: l, onScrollbarYEnabledChange: i } = n, c = e.orientation === "horizontal";
487
+ return s.useEffect(() => (c ? l(!0) : i(!0), () => {
488
+ c ? l(!1) : i(!1);
489
+ }), [c, l, i]), n.type === "hover" ? /* @__PURE__ */ m(Ge, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ m(Je, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ m(ae, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ m(Z, { ...o, ref: t }) : null;
490
+ }
491
+ );
492
+ q.displayName = C;
493
+ var Ge = s.forwardRef((e, t) => {
494
+ const { forceMount: r, ...o } = e, n = S(C, e.__scopeScrollArea), [l, i] = s.useState(!1);
495
+ return s.useEffect(() => {
496
+ const c = n.scrollArea;
497
+ let a = 0;
498
+ if (c) {
499
+ const u = () => {
500
+ window.clearTimeout(a), i(!0);
501
+ }, d = () => {
502
+ a = window.setTimeout(() => i(!1), n.scrollHideDelay);
503
+ };
504
+ return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", d), () => {
505
+ window.clearTimeout(a), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", d);
506
+ };
507
+ }
508
+ }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ m(L, { present: r || l, children: /* @__PURE__ */ m(
509
+ ae,
510
+ {
511
+ "data-state": l ? "visible" : "hidden",
512
+ ...o,
513
+ ref: t
514
+ }
515
+ ) });
516
+ }), Je = s.forwardRef((e, t) => {
517
+ const { forceMount: r, ...o } = e, n = S(C, e.__scopeScrollArea), l = e.orientation === "horizontal", i = B(() => a("SCROLL_END"), 100), [c, a] = Ze("hidden", {
518
+ hidden: {
519
+ SCROLL: "scrolling"
520
+ },
521
+ scrolling: {
522
+ SCROLL_END: "idle",
523
+ POINTER_ENTER: "interacting"
524
+ },
525
+ interacting: {
526
+ SCROLL: "interacting",
527
+ POINTER_LEAVE: "idle"
528
+ },
529
+ idle: {
530
+ HIDE: "hidden",
531
+ SCROLL: "scrolling",
532
+ POINTER_ENTER: "interacting"
533
+ }
534
+ });
535
+ return s.useEffect(() => {
536
+ if (c === "idle") {
537
+ const u = window.setTimeout(() => a("HIDE"), n.scrollHideDelay);
538
+ return () => window.clearTimeout(u);
539
+ }
540
+ }, [c, n.scrollHideDelay, a]), s.useEffect(() => {
541
+ const u = n.viewport, d = l ? "scrollLeft" : "scrollTop";
542
+ if (u) {
543
+ let h = u[d];
544
+ const f = () => {
545
+ const p = u[d];
546
+ h !== p && (a("SCROLL"), i()), h = p;
547
+ };
548
+ return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
549
+ }
550
+ }, [n.viewport, l, a, i]), /* @__PURE__ */ m(L, { present: r || c !== "hidden", children: /* @__PURE__ */ m(
551
+ Z,
552
+ {
553
+ "data-state": c === "hidden" ? "hidden" : "visible",
554
+ ...o,
555
+ ref: t,
556
+ onPointerEnter: x(e.onPointerEnter, () => a("POINTER_ENTER")),
557
+ onPointerLeave: x(e.onPointerLeave, () => a("POINTER_LEAVE"))
558
+ }
559
+ ) });
560
+ }), ae = s.forwardRef((e, t) => {
561
+ const r = S(C, e.__scopeScrollArea), { forceMount: o, ...n } = e, [l, i] = s.useState(!1), c = e.orientation === "horizontal", a = B(() => {
562
+ if (r.viewport) {
563
+ const u = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
564
+ i(c ? u : d);
565
+ }
566
+ }, 10);
567
+ return T(r.viewport, a), T(r.content, a), /* @__PURE__ */ m(L, { present: o || l, children: /* @__PURE__ */ m(
568
+ Z,
569
+ {
570
+ "data-state": l ? "visible" : "hidden",
571
+ ...n,
572
+ ref: t
573
+ }
574
+ ) });
575
+ }), Z = s.forwardRef((e, t) => {
576
+ const { orientation: r = "vertical", ...o } = e, n = S(C, e.__scopeScrollArea), l = s.useRef(null), i = s.useRef(0), [c, a] = s.useState({
577
+ content: 0,
578
+ viewport: 0,
579
+ scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
580
+ }), u = me(c.viewport, c.content), d = {
581
+ ...o,
582
+ sizes: c,
583
+ onSizesChange: a,
584
+ hasThumb: u > 0 && u < 1,
585
+ onThumbChange: (f) => l.current = f,
586
+ onThumbPointerUp: () => i.current = 0,
587
+ onThumbPointerDown: (f) => i.current = f
588
+ };
589
+ function h(f, p) {
590
+ return ot(f, i.current, c, p);
591
+ }
592
+ return r === "horizontal" ? /* @__PURE__ */ m(
593
+ Qe,
594
+ {
595
+ ...d,
596
+ ref: t,
597
+ onThumbPositionChange: () => {
598
+ if (n.viewport && l.current) {
599
+ const f = n.viewport.scrollLeft, p = ee(f, c, n.dir);
600
+ l.current.style.transform = `translate3d(${p}px, 0, 0)`;
601
+ }
602
+ },
603
+ onWheelScroll: (f) => {
604
+ n.viewport && (n.viewport.scrollLeft = f);
605
+ },
606
+ onDragScroll: (f) => {
607
+ n.viewport && (n.viewport.scrollLeft = h(f, n.dir));
608
+ }
609
+ }
610
+ ) : r === "vertical" ? /* @__PURE__ */ m(
611
+ et,
612
+ {
613
+ ...d,
614
+ ref: t,
615
+ onThumbPositionChange: () => {
616
+ if (n.viewport && l.current) {
617
+ const f = n.viewport.scrollTop, p = ee(f, c);
618
+ l.current.style.transform = `translate3d(0, ${p}px, 0)`;
619
+ }
620
+ },
621
+ onWheelScroll: (f) => {
622
+ n.viewport && (n.viewport.scrollTop = f);
623
+ },
624
+ onDragScroll: (f) => {
625
+ n.viewport && (n.viewport.scrollTop = h(f));
626
+ }
627
+ }
628
+ ) : null;
629
+ }), Qe = s.forwardRef((e, t) => {
630
+ const { sizes: r, onSizesChange: o, ...n } = e, l = S(C, e.__scopeScrollArea), [i, c] = s.useState(), a = s.useRef(null), u = R(t, a, l.onScrollbarXChange);
631
+ return s.useEffect(() => {
632
+ a.current && c(getComputedStyle(a.current));
633
+ }, [a]), /* @__PURE__ */ m(
634
+ de,
635
+ {
636
+ "data-orientation": "horizontal",
637
+ ...n,
638
+ ref: u,
639
+ sizes: r,
640
+ style: {
641
+ bottom: 0,
642
+ left: l.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
643
+ right: l.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
644
+ "--radix-scroll-area-thumb-width": U(r) + "px",
645
+ ...e.style
646
+ },
647
+ onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
648
+ onDragScroll: (d) => e.onDragScroll(d.x),
649
+ onWheelScroll: (d, h) => {
650
+ if (l.viewport) {
651
+ const f = l.viewport.scrollLeft + d.deltaX;
652
+ e.onWheelScroll(f), ve(f, h) && d.preventDefault();
653
+ }
654
+ },
655
+ onResize: () => {
656
+ a.current && l.viewport && i && o({
657
+ content: l.viewport.scrollWidth,
658
+ viewport: l.viewport.offsetWidth,
659
+ scrollbar: {
660
+ size: a.current.clientWidth,
661
+ paddingStart: $(i.paddingLeft),
662
+ paddingEnd: $(i.paddingRight)
663
+ }
664
+ });
665
+ }
666
+ }
667
+ );
668
+ }), et = s.forwardRef((e, t) => {
669
+ const { sizes: r, onSizesChange: o, ...n } = e, l = S(C, e.__scopeScrollArea), [i, c] = s.useState(), a = s.useRef(null), u = R(t, a, l.onScrollbarYChange);
670
+ return s.useEffect(() => {
671
+ a.current && c(getComputedStyle(a.current));
672
+ }, [a]), /* @__PURE__ */ m(
673
+ de,
674
+ {
675
+ "data-orientation": "vertical",
676
+ ...n,
677
+ ref: u,
678
+ sizes: r,
679
+ style: {
680
+ top: 0,
681
+ right: l.dir === "ltr" ? 0 : void 0,
682
+ left: l.dir === "rtl" ? 0 : void 0,
683
+ bottom: "var(--radix-scroll-area-corner-height)",
684
+ "--radix-scroll-area-thumb-height": U(r) + "px",
685
+ ...e.style
686
+ },
687
+ onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
688
+ onDragScroll: (d) => e.onDragScroll(d.y),
689
+ onWheelScroll: (d, h) => {
690
+ if (l.viewport) {
691
+ const f = l.viewport.scrollTop + d.deltaY;
692
+ e.onWheelScroll(f), ve(f, h) && d.preventDefault();
693
+ }
694
+ },
695
+ onResize: () => {
696
+ a.current && l.viewport && i && o({
697
+ content: l.viewport.scrollHeight,
698
+ viewport: l.viewport.offsetHeight,
699
+ scrollbar: {
700
+ size: a.current.clientHeight,
701
+ paddingStart: $(i.paddingTop),
702
+ paddingEnd: $(i.paddingBottom)
703
+ }
704
+ });
705
+ }
706
+ }
707
+ );
708
+ }), [tt, ue] = le(C), de = s.forwardRef((e, t) => {
709
+ const {
710
+ __scopeScrollArea: r,
711
+ sizes: o,
712
+ hasThumb: n,
713
+ onThumbChange: l,
714
+ onThumbPointerUp: i,
715
+ onThumbPointerDown: c,
716
+ onThumbPositionChange: a,
717
+ onDragScroll: u,
718
+ onWheelScroll: d,
719
+ onResize: h,
720
+ ...f
721
+ } = e, p = S(C, r), [v, g] = s.useState(null), w = R(t, (b) => g(b)), P = s.useRef(null), O = s.useRef(""), F = p.viewport, D = o.content - o.viewport, M = E(d), N = E(a), W = B(h, 10);
722
+ function I(b) {
723
+ if (P.current) {
724
+ const y = b.clientX - P.current.left, A = b.clientY - P.current.top;
725
+ u({ x: y, y: A });
726
+ }
727
+ }
728
+ return s.useEffect(() => {
729
+ const b = (y) => {
730
+ const A = y.target;
731
+ v?.contains(A) && M(y, D);
732
+ };
733
+ return document.addEventListener("wheel", b, { passive: !1 }), () => document.removeEventListener("wheel", b, { passive: !1 });
734
+ }, [F, v, D, M]), s.useEffect(N, [o, N]), T(v, W), T(p.content, W), /* @__PURE__ */ m(
735
+ tt,
736
+ {
737
+ scope: r,
738
+ scrollbar: v,
739
+ hasThumb: n,
740
+ onThumbChange: E(l),
741
+ onThumbPointerUp: E(i),
742
+ onThumbPositionChange: N,
743
+ onThumbPointerDown: E(c),
744
+ children: /* @__PURE__ */ m(
745
+ _.div,
746
+ {
747
+ ...f,
748
+ ref: w,
749
+ style: { position: "absolute", ...f.style },
750
+ onPointerDown: x(e.onPointerDown, (b) => {
751
+ b.button === 0 && (b.target.setPointerCapture(b.pointerId), P.current = v.getBoundingClientRect(), O.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), I(b));
752
+ }),
753
+ onPointerMove: x(e.onPointerMove, I),
754
+ onPointerUp: x(e.onPointerUp, (b) => {
755
+ const y = b.target;
756
+ y.hasPointerCapture(b.pointerId) && y.releasePointerCapture(b.pointerId), document.body.style.webkitUserSelect = O.current, p.viewport && (p.viewport.style.scrollBehavior = ""), P.current = null;
757
+ })
758
+ }
759
+ )
760
+ }
761
+ );
762
+ }), k = "ScrollAreaThumb", fe = s.forwardRef(
763
+ (e, t) => {
764
+ const { forceMount: r, ...o } = e, n = ue(k, e.__scopeScrollArea);
765
+ return /* @__PURE__ */ m(L, { present: r || n.hasThumb, children: /* @__PURE__ */ m(rt, { ref: t, ...o }) });
766
+ }
767
+ ), rt = s.forwardRef(
768
+ (e, t) => {
769
+ const { __scopeScrollArea: r, style: o, ...n } = e, l = S(k, r), i = ue(k, r), { onThumbPositionChange: c } = i, a = R(
770
+ t,
771
+ (h) => i.onThumbChange(h)
772
+ ), u = s.useRef(void 0), d = B(() => {
773
+ u.current && (u.current(), u.current = void 0);
774
+ }, 100);
775
+ return s.useEffect(() => {
776
+ const h = l.viewport;
777
+ if (h) {
778
+ const f = () => {
779
+ if (d(), !u.current) {
780
+ const p = lt(h, c);
781
+ u.current = p, c();
782
+ }
783
+ };
784
+ return c(), h.addEventListener("scroll", f), () => h.removeEventListener("scroll", f);
785
+ }
786
+ }, [l.viewport, d, c]), /* @__PURE__ */ m(
787
+ _.div,
788
+ {
789
+ "data-state": i.hasThumb ? "visible" : "hidden",
790
+ ...n,
791
+ ref: a,
792
+ style: {
793
+ width: "var(--radix-scroll-area-thumb-width)",
794
+ height: "var(--radix-scroll-area-thumb-height)",
795
+ ...o
796
+ },
797
+ onPointerDownCapture: x(e.onPointerDownCapture, (h) => {
798
+ const p = h.target.getBoundingClientRect(), v = h.clientX - p.left, g = h.clientY - p.top;
799
+ i.onThumbPointerDown({ x: v, y: g });
800
+ }),
801
+ onPointerUp: x(e.onPointerUp, i.onThumbPointerUp)
802
+ }
803
+ );
804
+ }
805
+ );
806
+ fe.displayName = k;
807
+ var K = "ScrollAreaCorner", he = s.forwardRef(
808
+ (e, t) => {
809
+ const r = S(K, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
810
+ return r.type !== "scroll" && o ? /* @__PURE__ */ m(nt, { ...e, ref: t }) : null;
811
+ }
812
+ );
813
+ he.displayName = K;
814
+ var nt = s.forwardRef((e, t) => {
815
+ const { __scopeScrollArea: r, ...o } = e, n = S(K, r), [l, i] = s.useState(0), [c, a] = s.useState(0), u = !!(l && c);
816
+ return T(n.scrollbarX, () => {
817
+ const d = n.scrollbarX?.offsetHeight || 0;
818
+ n.onCornerHeightChange(d), a(d);
819
+ }), T(n.scrollbarY, () => {
820
+ const d = n.scrollbarY?.offsetWidth || 0;
821
+ n.onCornerWidthChange(d), i(d);
822
+ }), u ? /* @__PURE__ */ m(
823
+ _.div,
824
+ {
825
+ ...o,
826
+ ref: t,
827
+ style: {
828
+ width: l,
829
+ height: c,
830
+ position: "absolute",
831
+ right: n.dir === "ltr" ? 0 : void 0,
832
+ left: n.dir === "rtl" ? 0 : void 0,
833
+ bottom: 0,
834
+ ...e.style
835
+ }
836
+ }
837
+ ) : null;
838
+ });
839
+ function $(e) {
840
+ return e ? parseInt(e, 10) : 0;
841
+ }
842
+ function me(e, t) {
843
+ const r = e / t;
844
+ return isNaN(r) ? 0 : r;
845
+ }
846
+ function U(e) {
847
+ const t = me(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
848
+ return Math.max(o, 18);
849
+ }
850
+ function ot(e, t, r, o = "ltr") {
851
+ const n = U(r), l = n / 2, i = t || l, c = n - i, a = r.scrollbar.paddingStart + i, u = r.scrollbar.size - r.scrollbar.paddingEnd - c, d = r.content - r.viewport, h = o === "ltr" ? [0, d] : [d * -1, 0];
852
+ return pe([a, u], h)(e);
853
+ }
854
+ function ee(e, t, r = "ltr") {
855
+ const o = U(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, l = t.scrollbar.size - n, i = t.content - t.viewport, c = l - o, a = r === "ltr" ? [0, i] : [i * -1, 0], u = qe(e, a);
856
+ return pe([0, i], [0, c])(u);
857
+ }
858
+ function pe(e, t) {
859
+ return (r) => {
860
+ if (e[0] === e[1] || t[0] === t[1]) return t[0];
861
+ const o = (t[1] - t[0]) / (e[1] - e[0]);
862
+ return t[0] + o * (r - e[0]);
863
+ };
864
+ }
865
+ function ve(e, t) {
866
+ return e > 0 && e < t;
867
+ }
868
+ var lt = (e, t = () => {
869
+ }) => {
870
+ let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
871
+ return (function n() {
872
+ const l = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== l.left, c = r.top !== l.top;
873
+ (i || c) && t(), r = l, o = window.requestAnimationFrame(n);
874
+ })(), () => window.cancelAnimationFrame(o);
875
+ };
876
+ function B(e, t) {
877
+ const r = E(e), o = s.useRef(0);
878
+ return s.useEffect(() => () => window.clearTimeout(o.current), []), s.useCallback(() => {
879
+ window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
880
+ }, [r, t]);
881
+ }
882
+ function T(e, t) {
883
+ const r = E(t);
884
+ X(() => {
885
+ let o = 0;
886
+ if (e) {
887
+ const n = new ResizeObserver(() => {
888
+ cancelAnimationFrame(o), o = window.requestAnimationFrame(r);
889
+ });
890
+ return n.observe(e), () => {
891
+ window.cancelAnimationFrame(o), n.unobserve(e);
892
+ };
893
+ }
894
+ }, [e, r]);
895
+ }
896
+ var be = se, st = ce, it = he;
897
+ const ct = s.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ re(
898
+ be,
899
+ {
900
+ ref: o,
901
+ className: z("relative overflow-hidden", e),
902
+ ...r,
903
+ children: [
904
+ /* @__PURE__ */ m(st, { className: "h-full w-full rounded-[inherit]", children: t }),
905
+ /* @__PURE__ */ m(ge, {}),
906
+ /* @__PURE__ */ m(it, {})
907
+ ]
908
+ }
909
+ ));
910
+ ct.displayName = be.displayName;
911
+ const ge = s.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ m(
912
+ q,
913
+ {
914
+ ref: o,
915
+ orientation: t,
916
+ className: z(
917
+ "flex touch-none select-none transition-colors",
918
+ t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
919
+ t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
920
+ e
921
+ ),
922
+ ...r,
923
+ children: /* @__PURE__ */ m(fe, { className: "relative flex-1 rounded-full bg-border" })
924
+ }
925
+ ));
926
+ ge.displayName = q.displayName;
927
+ export {
928
+ bt as B,
929
+ pt as C,
930
+ _ as P,
931
+ ct as S,
932
+ vt as X,
933
+ Ye as a,
934
+ je as b,
935
+ Xe as c,
936
+ ge as d,
937
+ ne as e,
938
+ Y as f,
939
+ Ce as g,
940
+ R as h,
941
+ X as i,
942
+ x as j,
943
+ E as k,
944
+ qe as l,
945
+ L as m,
946
+ ht as n,
947
+ He as o,
948
+ ke as p,
949
+ mt as q,
950
+ We as u
951
+ };
952
+ //# sourceMappingURL=scroll-area-DQeqDp3Y.js.map