@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,675 @@
1
+ import * as u from "react";
2
+ import { useState as he } from "react";
3
+ import { u as me } from "./index-CB1Wkg0G.js";
4
+ import { P as pe } from "./index-C9KW2H79.js";
5
+ import { u as z } from "./index-DwYXX2sM.js";
6
+ import { jsx as ge } from "react/jsx-runtime";
7
+ var U = "focusScope.autoFocusOnMount", _ = "focusScope.autoFocusOnUnmount", Z = { bubbles: !1, cancelable: !0 }, ye = "FocusScope", be = u.forwardRef((e, t) => {
8
+ const {
9
+ loop: n = !1,
10
+ trapped: r = !1,
11
+ onMountAutoFocus: c,
12
+ onUnmountAutoFocus: i,
13
+ ...s
14
+ } = e, [a, S] = u.useState(null), b = z(c), g = z(i), f = u.useRef(null), v = me(t, (o) => S(o)), h = u.useRef({
15
+ paused: !1,
16
+ pause() {
17
+ this.paused = !0;
18
+ },
19
+ resume() {
20
+ this.paused = !1;
21
+ }
22
+ }).current;
23
+ u.useEffect(() => {
24
+ if (r) {
25
+ let o = function(p) {
26
+ if (h.paused || !a) return;
27
+ const y = p.target;
28
+ a.contains(y) ? f.current = y : k(f.current, { select: !0 });
29
+ }, l = function(p) {
30
+ if (h.paused || !a) return;
31
+ const y = p.relatedTarget;
32
+ y !== null && (a.contains(y) || k(f.current, { select: !0 }));
33
+ }, d = function(p) {
34
+ if (document.activeElement === document.body)
35
+ for (const E of p)
36
+ E.removedNodes.length > 0 && k(a);
37
+ };
38
+ document.addEventListener("focusin", o), document.addEventListener("focusout", l);
39
+ const m = new MutationObserver(d);
40
+ return a && m.observe(a, { childList: !0, subtree: !0 }), () => {
41
+ document.removeEventListener("focusin", o), document.removeEventListener("focusout", l), m.disconnect();
42
+ };
43
+ }
44
+ }, [r, a, h.paused]), u.useEffect(() => {
45
+ if (a) {
46
+ Q.add(h);
47
+ const o = document.activeElement;
48
+ if (!a.contains(o)) {
49
+ const d = new CustomEvent(U, Z);
50
+ a.addEventListener(U, b), a.dispatchEvent(d), d.defaultPrevented || (Ee(ke(oe(a)), { select: !0 }), document.activeElement === o && k(a));
51
+ }
52
+ return () => {
53
+ a.removeEventListener(U, b), setTimeout(() => {
54
+ const d = new CustomEvent(_, Z);
55
+ a.addEventListener(_, g), a.dispatchEvent(d), d.defaultPrevented || k(o ?? document.body, { select: !0 }), a.removeEventListener(_, g), Q.remove(h);
56
+ }, 0);
57
+ };
58
+ }
59
+ }, [a, b, g, h]);
60
+ const w = u.useCallback(
61
+ (o) => {
62
+ if (!n && !r || h.paused) return;
63
+ const l = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
64
+ if (l && d) {
65
+ const m = o.currentTarget, [p, y] = Se(m);
66
+ p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n && k(p, { select: !0 })) : o.shiftKey && d === p && (o.preventDefault(), n && k(y, { select: !0 })) : d === m && o.preventDefault();
67
+ }
68
+ },
69
+ [n, r, h.paused]
70
+ );
71
+ return /* @__PURE__ */ ge(pe.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
72
+ });
73
+ be.displayName = ye;
74
+ function Ee(e, { select: t = !1 } = {}) {
75
+ const n = document.activeElement;
76
+ for (const r of e)
77
+ if (k(r, { select: t }), document.activeElement !== n) return;
78
+ }
79
+ function Se(e) {
80
+ const t = oe(e), n = q(t, e), r = q(t.reverse(), e);
81
+ return [n, r];
82
+ }
83
+ function oe(e) {
84
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
85
+ acceptNode: (r) => {
86
+ const c = r.tagName === "INPUT" && r.type === "hidden";
87
+ return r.disabled || r.hidden || c ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
88
+ }
89
+ });
90
+ for (; n.nextNode(); ) t.push(n.currentNode);
91
+ return t;
92
+ }
93
+ function q(e, t) {
94
+ for (const n of e)
95
+ if (!we(n, { upTo: t })) return n;
96
+ }
97
+ function we(e, { upTo: t }) {
98
+ if (getComputedStyle(e).visibility === "hidden") return !0;
99
+ for (; e; ) {
100
+ if (t !== void 0 && e === t) return !1;
101
+ if (getComputedStyle(e).display === "none") return !0;
102
+ e = e.parentElement;
103
+ }
104
+ return !1;
105
+ }
106
+ function Ce(e) {
107
+ return e instanceof HTMLInputElement && "select" in e;
108
+ }
109
+ function k(e, { select: t = !1 } = {}) {
110
+ if (e && e.focus) {
111
+ const n = document.activeElement;
112
+ e.focus({ preventScroll: !0 }), e !== n && Ce(e) && t && e.select();
113
+ }
114
+ }
115
+ var Q = Re();
116
+ function Re() {
117
+ let e = [];
118
+ return {
119
+ add(t) {
120
+ const n = e[0];
121
+ t !== n && (n == null || n.pause()), e = $(e, t), e.unshift(t);
122
+ },
123
+ remove(t) {
124
+ var n;
125
+ e = $(e, t), (n = e[0]) == null || n.resume();
126
+ }
127
+ };
128
+ }
129
+ function $(e, t) {
130
+ const n = [...e], r = n.indexOf(t);
131
+ return r !== -1 && n.splice(r, 1), n;
132
+ }
133
+ function ke(e) {
134
+ return e.filter((t) => t.tagName !== "A");
135
+ }
136
+ var j = 0;
137
+ function gt() {
138
+ u.useEffect(() => {
139
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
140
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()), j++, () => {
141
+ j === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), j--;
142
+ };
143
+ }, []);
144
+ }
145
+ function J() {
146
+ const e = document.createElement("span");
147
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
148
+ }
149
+ var C = function() {
150
+ return C = Object.assign || function(t) {
151
+ for (var n, r = 1, c = arguments.length; r < c; r++) {
152
+ n = arguments[r];
153
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
154
+ }
155
+ return t;
156
+ }, C.apply(this, arguments);
157
+ };
158
+ function ce(e, t) {
159
+ var n = {};
160
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
161
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
162
+ for (var c = 0, r = Object.getOwnPropertySymbols(e); c < r.length; c++)
163
+ t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
164
+ return n;
165
+ }
166
+ function Ae(e, t, n) {
167
+ if (n || arguments.length === 2) for (var r = 0, c = t.length, i; r < c; r++)
168
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
169
+ return e.concat(i || Array.prototype.slice.call(t));
170
+ }
171
+ var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Te = "with-scroll-bars-hidden", Ne = "--removed-body-scroll-bar-size";
172
+ function K(e, t) {
173
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
174
+ }
175
+ function Me(e, t) {
176
+ var n = he(function() {
177
+ return {
178
+ // value
179
+ value: e,
180
+ // last callback
181
+ callback: t,
182
+ // "memoized" public interface
183
+ facade: {
184
+ get current() {
185
+ return n.value;
186
+ },
187
+ set current(r) {
188
+ var c = n.value;
189
+ c !== r && (n.value = r, n.callback(r, c));
190
+ }
191
+ }
192
+ };
193
+ })[0];
194
+ return n.callback = t, n.facade;
195
+ }
196
+ var Pe = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
197
+ function Oe(e, t) {
198
+ var n = Me(null, function(r) {
199
+ return e.forEach(function(c) {
200
+ return K(c, r);
201
+ });
202
+ });
203
+ return Pe(function() {
204
+ var r = ee.get(n);
205
+ if (r) {
206
+ var c = new Set(r), i = new Set(e), s = n.current;
207
+ c.forEach(function(a) {
208
+ i.has(a) || K(a, null);
209
+ }), i.forEach(function(a) {
210
+ c.has(a) || K(a, s);
211
+ });
212
+ }
213
+ ee.set(n, e);
214
+ }, [e]), n;
215
+ }
216
+ function Fe(e) {
217
+ return e;
218
+ }
219
+ function Le(e, t) {
220
+ t === void 0 && (t = Fe);
221
+ var n = [], r = !1, c = {
222
+ read: function() {
223
+ if (r)
224
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
225
+ return n.length ? n[n.length - 1] : e;
226
+ },
227
+ useMedium: function(i) {
228
+ var s = t(i, r);
229
+ return n.push(s), function() {
230
+ n = n.filter(function(a) {
231
+ return a !== s;
232
+ });
233
+ };
234
+ },
235
+ assignSyncMedium: function(i) {
236
+ for (r = !0; n.length; ) {
237
+ var s = n;
238
+ n = [], s.forEach(i);
239
+ }
240
+ n = {
241
+ push: function(a) {
242
+ return i(a);
243
+ },
244
+ filter: function() {
245
+ return n;
246
+ }
247
+ };
248
+ },
249
+ assignMedium: function(i) {
250
+ r = !0;
251
+ var s = [];
252
+ if (n.length) {
253
+ var a = n;
254
+ n = [], a.forEach(i), s = n;
255
+ }
256
+ var S = function() {
257
+ var g = s;
258
+ s = [], g.forEach(i);
259
+ }, b = function() {
260
+ return Promise.resolve().then(S);
261
+ };
262
+ b(), n = {
263
+ push: function(g) {
264
+ s.push(g), b();
265
+ },
266
+ filter: function(g) {
267
+ return s = s.filter(g), n;
268
+ }
269
+ };
270
+ }
271
+ };
272
+ return c;
273
+ }
274
+ function Ie(e) {
275
+ e === void 0 && (e = {});
276
+ var t = Le(null);
277
+ return t.options = C({ async: !0, ssr: !1 }, e), t;
278
+ }
279
+ var ue = function(e) {
280
+ var t = e.sideCar, n = ce(e, ["sideCar"]);
281
+ if (!t)
282
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
283
+ var r = t.read();
284
+ if (!r)
285
+ throw new Error("Sidecar medium not found");
286
+ return u.createElement(r, C({}, n));
287
+ };
288
+ ue.isSideCarExport = !0;
289
+ function xe(e, t) {
290
+ return e.useMedium(t), ue;
291
+ }
292
+ var ie = Ie(), H = function() {
293
+ }, D = u.forwardRef(function(e, t) {
294
+ var n = u.useRef(null), r = u.useState({
295
+ onScrollCapture: H,
296
+ onWheelCapture: H,
297
+ onTouchMoveCapture: H
298
+ }), c = r[0], i = r[1], s = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, l = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y = ce(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, A = Oe([n, t]), R = C(C({}, y), c);
299
+ return u.createElement(
300
+ u.Fragment,
301
+ null,
302
+ g && u.createElement(E, { sideCar: ie, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: p }),
303
+ s ? u.cloneElement(u.Children.only(a), C(C({}, R), { ref: A })) : u.createElement(m, C({}, R, { className: S, ref: A }), a)
304
+ );
305
+ });
306
+ D.defaultProps = {
307
+ enabled: !0,
308
+ removeScrollBar: !0,
309
+ inert: !1
310
+ };
311
+ D.classNames = {
312
+ fullWidth: B,
313
+ zeroRight: W
314
+ };
315
+ var We = function() {
316
+ if (typeof __webpack_nonce__ < "u")
317
+ return __webpack_nonce__;
318
+ };
319
+ function Be() {
320
+ if (!document)
321
+ return null;
322
+ var e = document.createElement("style");
323
+ e.type = "text/css";
324
+ var t = We();
325
+ return t && e.setAttribute("nonce", t), e;
326
+ }
327
+ function De(e, t) {
328
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
329
+ }
330
+ function Ue(e) {
331
+ var t = document.head || document.getElementsByTagName("head")[0];
332
+ t.appendChild(e);
333
+ }
334
+ var _e = function() {
335
+ var e = 0, t = null;
336
+ return {
337
+ add: function(n) {
338
+ e == 0 && (t = Be()) && (De(t, n), Ue(t)), e++;
339
+ },
340
+ remove: function() {
341
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
342
+ }
343
+ };
344
+ }, je = function() {
345
+ var e = _e();
346
+ return function(t, n) {
347
+ u.useEffect(function() {
348
+ return e.add(t), function() {
349
+ e.remove();
350
+ };
351
+ }, [t && n]);
352
+ };
353
+ }, le = function() {
354
+ var e = je(), t = function(n) {
355
+ var r = n.styles, c = n.dynamic;
356
+ return e(r, c), null;
357
+ };
358
+ return t;
359
+ }, Ke = {
360
+ left: 0,
361
+ top: 0,
362
+ right: 0,
363
+ gap: 0
364
+ }, V = function(e) {
365
+ return parseInt(e || "", 10) || 0;
366
+ }, He = function(e) {
367
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
368
+ return [V(n), V(r), V(c)];
369
+ }, Ve = function(e) {
370
+ if (e === void 0 && (e = "margin"), typeof window > "u")
371
+ return Ke;
372
+ var t = He(e), n = document.documentElement.clientWidth, r = window.innerWidth;
373
+ return {
374
+ left: t[0],
375
+ top: t[1],
376
+ right: t[2],
377
+ gap: Math.max(0, r - n + t[2] - t[0])
378
+ };
379
+ }, Xe = le(), P = "data-scroll-locked", Ye = function(e, t, n, r) {
380
+ var c = e.left, i = e.top, s = e.right, a = e.gap;
381
+ return n === void 0 && (n = "margin"), `
382
+ .`.concat(Te, ` {
383
+ overflow: hidden `).concat(r, `;
384
+ padding-right: `).concat(a, "px ").concat(r, `;
385
+ }
386
+ body[`).concat(P, `] {
387
+ overflow: hidden `).concat(r, `;
388
+ overscroll-behavior: contain;
389
+ `).concat([
390
+ t && "position: relative ".concat(r, ";"),
391
+ n === "margin" && `
392
+ padding-left: `.concat(c, `px;
393
+ padding-top: `).concat(i, `px;
394
+ padding-right: `).concat(s, `px;
395
+ margin-left:0;
396
+ margin-top:0;
397
+ margin-right: `).concat(a, "px ").concat(r, `;
398
+ `),
399
+ n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")
400
+ ].filter(Boolean).join(""), `
401
+ }
402
+
403
+ .`).concat(W, ` {
404
+ right: `).concat(a, "px ").concat(r, `;
405
+ }
406
+
407
+ .`).concat(B, ` {
408
+ margin-right: `).concat(a, "px ").concat(r, `;
409
+ }
410
+
411
+ .`).concat(W, " .").concat(W, ` {
412
+ right: 0 `).concat(r, `;
413
+ }
414
+
415
+ .`).concat(B, " .").concat(B, ` {
416
+ margin-right: 0 `).concat(r, `;
417
+ }
418
+
419
+ body[`).concat(P, `] {
420
+ `).concat(Ne, ": ").concat(a, `px;
421
+ }
422
+ `);
423
+ }, te = function() {
424
+ var e = parseInt(document.body.getAttribute(P) || "0", 10);
425
+ return isFinite(e) ? e : 0;
426
+ }, Ge = function() {
427
+ u.useEffect(function() {
428
+ return document.body.setAttribute(P, (te() + 1).toString()), function() {
429
+ var e = te() - 1;
430
+ e <= 0 ? document.body.removeAttribute(P) : document.body.setAttribute(P, e.toString());
431
+ };
432
+ }, []);
433
+ }, ze = function(e) {
434
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
435
+ Ge();
436
+ var i = u.useMemo(function() {
437
+ return Ve(c);
438
+ }, [c]);
439
+ return u.createElement(Xe, { styles: Ye(i, !t, c, n ? "" : "!important") });
440
+ }, Y = !1;
441
+ if (typeof window < "u")
442
+ try {
443
+ var F = Object.defineProperty({}, "passive", {
444
+ get: function() {
445
+ return Y = !0, !0;
446
+ }
447
+ });
448
+ window.addEventListener("test", F, F), window.removeEventListener("test", F, F);
449
+ } catch {
450
+ Y = !1;
451
+ }
452
+ var T = Y ? { passive: !1 } : !1, Ze = function(e) {
453
+ return e.tagName === "TEXTAREA";
454
+ }, se = function(e, t) {
455
+ if (!(e instanceof Element))
456
+ return !1;
457
+ var n = window.getComputedStyle(e);
458
+ return (
459
+ // not-not-scrollable
460
+ n[t] !== "hidden" && // contains scroll inside self
461
+ !(n.overflowY === n.overflowX && !Ze(e) && n[t] === "visible")
462
+ );
463
+ }, qe = function(e) {
464
+ return se(e, "overflowY");
465
+ }, Qe = function(e) {
466
+ return se(e, "overflowX");
467
+ }, ne = function(e, t) {
468
+ var n = t.ownerDocument, r = t;
469
+ do {
470
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
471
+ var c = fe(e, r);
472
+ if (c) {
473
+ var i = de(e, r), s = i[1], a = i[2];
474
+ if (s > a)
475
+ return !0;
476
+ }
477
+ r = r.parentNode;
478
+ } while (r && r !== n.body);
479
+ return !1;
480
+ }, $e = function(e) {
481
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
482
+ return [
483
+ t,
484
+ n,
485
+ r
486
+ ];
487
+ }, Je = function(e) {
488
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
489
+ return [
490
+ t,
491
+ n,
492
+ r
493
+ ];
494
+ }, fe = function(e, t) {
495
+ return e === "v" ? qe(t) : Qe(t);
496
+ }, de = function(e, t) {
497
+ return e === "v" ? $e(t) : Je(t);
498
+ }, et = function(e, t) {
499
+ return e === "h" && t === "rtl" ? -1 : 1;
500
+ }, tt = function(e, t, n, r, c) {
501
+ var i = et(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, S = t.contains(a), b = !1, g = s > 0, f = 0, v = 0;
502
+ do {
503
+ if (!a)
504
+ break;
505
+ var h = de(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
506
+ (w || d) && fe(e, a) && (f += d, v += w);
507
+ var m = a.parentNode;
508
+ a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
509
+ } while (
510
+ // portaled content
511
+ !S && a !== document.body || // self content
512
+ S && (t.contains(a) || t === a)
513
+ );
514
+ return (g && Math.abs(f) < 1 || !g && Math.abs(v) < 1) && (b = !0), b;
515
+ }, L = function(e) {
516
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
517
+ }, re = function(e) {
518
+ return [e.deltaX, e.deltaY];
519
+ }, ae = function(e) {
520
+ return e && "current" in e ? e.current : e;
521
+ }, nt = function(e, t) {
522
+ return e[0] === t[0] && e[1] === t[1];
523
+ }, rt = function(e) {
524
+ return `
525
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
526
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
527
+ `);
528
+ }, at = 0, N = [];
529
+ function ot(e) {
530
+ var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(at++)[0], i = u.useState(le)[0], s = u.useRef(e);
531
+ u.useEffect(function() {
532
+ s.current = e;
533
+ }, [e]), u.useEffect(function() {
534
+ if (e.inert) {
535
+ document.body.classList.add("block-interactivity-".concat(c));
536
+ var o = Ae([e.lockRef.current], (e.shards || []).map(ae), !0).filter(Boolean);
537
+ return o.forEach(function(l) {
538
+ return l.classList.add("allow-interactivity-".concat(c));
539
+ }), function() {
540
+ document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(l) {
541
+ return l.classList.remove("allow-interactivity-".concat(c));
542
+ });
543
+ };
544
+ }
545
+ }, [e.inert, e.lockRef.current, e.shards]);
546
+ var a = u.useCallback(function(o, l) {
547
+ if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
548
+ return !s.current.allowPinchZoom;
549
+ var d = L(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E, A = o.target, R = Math.abs(p) > Math.abs(y) ? "h" : "v";
550
+ if ("touches" in o && R === "h" && A.type === "range")
551
+ return !1;
552
+ var O = ne(R, A);
553
+ if (!O)
554
+ return !0;
555
+ if (O ? E = R : (E = R === "v" ? "h" : "v", O = ne(R, A)), !O)
556
+ return !1;
557
+ if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
558
+ return !0;
559
+ var G = r.current || E;
560
+ return tt(G, l, o, G === "h" ? p : y);
561
+ }, []), S = u.useCallback(function(o) {
562
+ var l = o;
563
+ if (!(!N.length || N[N.length - 1] !== i)) {
564
+ var d = "deltaY" in l ? re(l) : L(l), m = t.current.filter(function(E) {
565
+ return E.name === l.type && (E.target === l.target || l.target === E.shadowParent) && nt(E.delta, d);
566
+ })[0];
567
+ if (m && m.should) {
568
+ l.cancelable && l.preventDefault();
569
+ return;
570
+ }
571
+ if (!m) {
572
+ var p = (s.current.shards || []).map(ae).filter(Boolean).filter(function(E) {
573
+ return E.contains(l.target);
574
+ }), y = p.length > 0 ? a(l, p[0]) : !s.current.noIsolation;
575
+ y && l.cancelable && l.preventDefault();
576
+ }
577
+ }
578
+ }, []), b = u.useCallback(function(o, l, d, m) {
579
+ var p = { name: o, delta: l, target: d, should: m, shadowParent: ct(d) };
580
+ t.current.push(p), setTimeout(function() {
581
+ t.current = t.current.filter(function(y) {
582
+ return y !== p;
583
+ });
584
+ }, 1);
585
+ }, []), g = u.useCallback(function(o) {
586
+ n.current = L(o), r.current = void 0;
587
+ }, []), f = u.useCallback(function(o) {
588
+ b(o.type, re(o), o.target, a(o, e.lockRef.current));
589
+ }, []), v = u.useCallback(function(o) {
590
+ b(o.type, L(o), o.target, a(o, e.lockRef.current));
591
+ }, []);
592
+ u.useEffect(function() {
593
+ return N.push(i), e.setCallbacks({
594
+ onScrollCapture: f,
595
+ onWheelCapture: f,
596
+ onTouchMoveCapture: v
597
+ }), document.addEventListener("wheel", S, T), document.addEventListener("touchmove", S, T), document.addEventListener("touchstart", g, T), function() {
598
+ N = N.filter(function(o) {
599
+ return o !== i;
600
+ }), document.removeEventListener("wheel", S, T), document.removeEventListener("touchmove", S, T), document.removeEventListener("touchstart", g, T);
601
+ };
602
+ }, []);
603
+ var h = e.removeScrollBar, w = e.inert;
604
+ return u.createElement(
605
+ u.Fragment,
606
+ null,
607
+ w ? u.createElement(i, { styles: rt(c) }) : null,
608
+ h ? u.createElement(ze, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
609
+ );
610
+ }
611
+ function ct(e) {
612
+ for (var t = null; e !== null; )
613
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
614
+ return t;
615
+ }
616
+ const ut = xe(ie, ot);
617
+ var it = u.forwardRef(function(e, t) {
618
+ return u.createElement(D, C({}, e, { ref: t, sideCar: ut }));
619
+ });
620
+ it.classNames = D.classNames;
621
+ var lt = function(e) {
622
+ if (typeof document > "u")
623
+ return null;
624
+ var t = Array.isArray(e) ? e[0] : e;
625
+ return t.ownerDocument.body;
626
+ }, M = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {}, X = 0, ve = function(e) {
627
+ return e && (e.host || ve(e.parentNode));
628
+ }, st = function(e, t) {
629
+ return t.map(function(n) {
630
+ if (e.contains(n))
631
+ return n;
632
+ var r = ve(n);
633
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
634
+ }).filter(function(n) {
635
+ return !!n;
636
+ });
637
+ }, ft = function(e, t, n, r) {
638
+ var c = st(t, Array.isArray(e) ? e : [e]);
639
+ x[n] || (x[n] = /* @__PURE__ */ new WeakMap());
640
+ var i = x[n], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
641
+ !f || a.has(f) || (a.add(f), b(f.parentNode));
642
+ };
643
+ c.forEach(b);
644
+ var g = function(f) {
645
+ !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
646
+ if (a.has(v))
647
+ g(v);
648
+ else
649
+ try {
650
+ var h = v.getAttribute(r), w = h !== null && h !== "false", o = (M.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
651
+ M.set(v, o), i.set(v, l), s.push(v), o === 1 && w && I.set(v, !0), l === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
652
+ } catch (d) {
653
+ console.error("aria-hidden: cannot operate on ", v, d);
654
+ }
655
+ });
656
+ };
657
+ return g(t), a.clear(), X++, function() {
658
+ s.forEach(function(f) {
659
+ var v = M.get(f) - 1, h = i.get(f) - 1;
660
+ M.set(f, v), i.set(f, h), v || (I.has(f) || f.removeAttribute(r), I.delete(f)), h || f.removeAttribute(n);
661
+ }), X--, X || (M = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {});
662
+ };
663
+ }, yt = function(e, t, n) {
664
+ n === void 0 && (n = "data-aria-hidden");
665
+ var r = Array.from(Array.isArray(e) ? e : [e]), c = lt(e);
666
+ return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), ft(r, c, n, "aria-hidden")) : function() {
667
+ return null;
668
+ };
669
+ };
670
+ export {
671
+ be as F,
672
+ it as R,
673
+ yt as h,
674
+ gt as u
675
+ };
@@ -0,0 +1,8 @@
1
+ import * as u from "react";
2
+ function t(r) {
3
+ const e = u.useRef({ value: r, previous: r });
4
+ return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
5
+ }
6
+ export {
7
+ t as u
8
+ };
@@ -0,0 +1,10 @@
1
+ import * as t from "react";
2
+ import "react/jsx-runtime";
3
+ var r = t.createContext(void 0);
4
+ function n(o) {
5
+ const e = t.useContext(r);
6
+ return o || e || "ltr";
7
+ }
8
+ export {
9
+ n as u
10
+ };