@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,36 @@
1
+ import * as c from "react";
2
+ import * as f from "react-dom";
3
+ import { c as p } from "./index-CB1Wkg0G.js";
4
+ import { jsx as l } from "react/jsx-runtime";
5
+ var u = [
6
+ "a",
7
+ "button",
8
+ "div",
9
+ "form",
10
+ "h2",
11
+ "h3",
12
+ "img",
13
+ "input",
14
+ "label",
15
+ "li",
16
+ "nav",
17
+ "ol",
18
+ "p",
19
+ "select",
20
+ "span",
21
+ "svg",
22
+ "ul"
23
+ ], h = u.reduce((t, i) => {
24
+ const o = p(`Primitive.${i}`), r = c.forwardRef((e, s) => {
25
+ const { asChild: a, ...m } = e, n = a ? o : i;
26
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...m, ref: s });
27
+ });
28
+ return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
+ }, {});
30
+ function w(t, i) {
31
+ t && f.flushSync(() => t.dispatchEvent(i));
32
+ }
33
+ export {
34
+ h as P,
35
+ w as d
36
+ };
@@ -0,0 +1,83 @@
1
+ import * as i from "react";
2
+ import { jsx as f, Fragment as g } from "react/jsx-runtime";
3
+ function d(e, n) {
4
+ if (typeof e == "function")
5
+ return e(n);
6
+ e != null && (e.current = n);
7
+ }
8
+ function m(...e) {
9
+ return (n) => {
10
+ let r = !1;
11
+ const o = e.map((t) => {
12
+ const l = d(t, n);
13
+ return !r && typeof l == "function" && (r = !0), l;
14
+ });
15
+ if (r)
16
+ return () => {
17
+ for (let t = 0; t < o.length; t++) {
18
+ const l = o[t];
19
+ typeof l == "function" ? l() : d(e[t], null);
20
+ }
21
+ };
22
+ };
23
+ }
24
+ function x(...e) {
25
+ return i.useCallback(m(...e), e);
26
+ }
27
+ // @__NO_SIDE_EFFECTS__
28
+ function C(e) {
29
+ const n = /* @__PURE__ */ b(e), r = i.forwardRef((o, t) => {
30
+ const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(E);
31
+ if (c) {
32
+ const u = c.props.children, S = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
33
+ return /* @__PURE__ */ f(n, { ...a, ref: t, children: i.isValidElement(u) ? i.cloneElement(u, void 0, S) : null });
34
+ }
35
+ return /* @__PURE__ */ f(n, { ...a, ref: t, children: l });
36
+ });
37
+ return r.displayName = `${e}.Slot`, r;
38
+ }
39
+ var I = /* @__PURE__ */ C("Slot");
40
+ // @__NO_SIDE_EFFECTS__
41
+ function b(e) {
42
+ const n = i.forwardRef((r, o) => {
43
+ const { children: t, ...l } = r;
44
+ if (i.isValidElement(t)) {
45
+ const a = h(t), s = R(l, t.props);
46
+ return t.type !== i.Fragment && (s.ref = o ? m(o, a) : a), i.cloneElement(t, s);
47
+ }
48
+ return i.Children.count(t) > 1 ? i.Children.only(null) : null;
49
+ });
50
+ return n.displayName = `${e}.SlotClone`, n;
51
+ }
52
+ var y = Symbol("radix.slottable");
53
+ // @__NO_SIDE_EFFECTS__
54
+ function V(e) {
55
+ const n = ({ children: r }) => /* @__PURE__ */ f(g, { children: r });
56
+ return n.displayName = `${e}.Slottable`, n.__radixId = y, n;
57
+ }
58
+ function E(e) {
59
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === y;
60
+ }
61
+ function R(e, n) {
62
+ const r = { ...n };
63
+ for (const o in n) {
64
+ const t = e[o], l = n[o];
65
+ /^on[A-Z]/.test(o) ? t && l ? r[o] = (...s) => {
66
+ const c = l(...s);
67
+ return t(...s), c;
68
+ } : t && (r[o] = t) : o === "style" ? r[o] = { ...t, ...l } : o === "className" && (r[o] = [t, l].filter(Boolean).join(" "));
69
+ }
70
+ return { ...e, ...r };
71
+ }
72
+ function h(e) {
73
+ var o, t;
74
+ let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning;
75
+ return r ? e.ref : (n = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
76
+ }
77
+ export {
78
+ I as S,
79
+ V as a,
80
+ m as b,
81
+ C as c,
82
+ x as u
83
+ };
@@ -0,0 +1,27 @@
1
+ import * as h from "react";
2
+ import { u as z } from "./index-DuekHEmj.js";
3
+ function n(r) {
4
+ const [d, e] = h.useState(void 0);
5
+ return z(() => {
6
+ if (r) {
7
+ e({ width: r.offsetWidth, height: r.offsetHeight });
8
+ const f = new ResizeObserver((i) => {
9
+ if (!Array.isArray(i) || !i.length)
10
+ return;
11
+ const b = i[0];
12
+ let o, t;
13
+ if ("borderBoxSize" in b) {
14
+ const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
15
+ o = u.inlineSize, t = u.blockSize;
16
+ } else
17
+ o = r.offsetWidth, t = r.offsetHeight;
18
+ e({ width: o, height: t });
19
+ });
20
+ return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
21
+ } else
22
+ e(void 0);
23
+ }, [r]), d;
24
+ }
25
+ export {
26
+ n as u
27
+ };
@@ -0,0 +1,122 @@
1
+ import T from "react";
2
+ var l = { exports: {} }, y = {};
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var L;
13
+ function A() {
14
+ if (L) return y;
15
+ L = 1;
16
+ var i = T;
17
+ function _(t, o) {
18
+ return t === o && (t !== 0 || 1 / t === 1 / o) || t !== t && o !== o;
19
+ }
20
+ var c = typeof Object.is == "function" ? Object.is : _, p = i.useState, u = i.useEffect, S = i.useLayoutEffect, E = i.useDebugValue;
21
+ function O(t, o) {
22
+ var e = o(), n = p({ inst: { value: e, getSnapshot: o } }), r = n[0].inst, a = n[1];
23
+ return S(
24
+ function() {
25
+ r.value = e, r.getSnapshot = o, f(r) && a({ inst: r });
26
+ },
27
+ [t, e, o]
28
+ ), u(
29
+ function() {
30
+ return f(r) && a({ inst: r }), t(function() {
31
+ f(r) && a({ inst: r });
32
+ });
33
+ },
34
+ [t]
35
+ ), E(e), e;
36
+ }
37
+ function f(t) {
38
+ var o = t.getSnapshot;
39
+ t = t.value;
40
+ try {
41
+ var e = o();
42
+ return !c(t, e);
43
+ } catch {
44
+ return !0;
45
+ }
46
+ }
47
+ function v(t, o) {
48
+ return o();
49
+ }
50
+ var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : O;
51
+ return y.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : d, y;
52
+ }
53
+ var m = {};
54
+ /**
55
+ * @license React
56
+ * use-sync-external-store-shim.development.js
57
+ *
58
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */
63
+ var x;
64
+ function R() {
65
+ return x || (x = 1, process.env.NODE_ENV !== "production" && function() {
66
+ function i(e, n) {
67
+ return e === n && (e !== 0 || 1 / e === 1 / n) || e !== e && n !== n;
68
+ }
69
+ function _(e, n) {
70
+ d || u.startTransition === void 0 || (d = !0, console.error(
71
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
72
+ ));
73
+ var r = n();
74
+ if (!t) {
75
+ var a = n();
76
+ S(r, a) || (console.error(
77
+ "The result of getSnapshot should be cached to avoid an infinite loop"
78
+ ), t = !0);
79
+ }
80
+ a = E({
81
+ inst: { value: r, getSnapshot: n }
82
+ });
83
+ var s = a[0].inst, h = a[1];
84
+ return f(
85
+ function() {
86
+ s.value = r, s.getSnapshot = n, c(s) && h({ inst: s });
87
+ },
88
+ [e, r, n]
89
+ ), O(
90
+ function() {
91
+ return c(s) && h({ inst: s }), e(function() {
92
+ c(s) && h({ inst: s });
93
+ });
94
+ },
95
+ [e]
96
+ ), v(r), r;
97
+ }
98
+ function c(e) {
99
+ var n = e.getSnapshot;
100
+ e = e.value;
101
+ try {
102
+ var r = n();
103
+ return !S(e, r);
104
+ } catch {
105
+ return !0;
106
+ }
107
+ }
108
+ function p(e, n) {
109
+ return n();
110
+ }
111
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
112
+ var u = T, S = typeof Object.is == "function" ? Object.is : i, E = u.useState, O = u.useEffect, f = u.useLayoutEffect, v = u.useDebugValue, d = !1, t = !1, o = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? p : _;
113
+ m.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : o, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
114
+ }()), m;
115
+ }
116
+ var w;
117
+ function D() {
118
+ return w || (w = 1, process.env.NODE_ENV === "production" ? l.exports = A() : l.exports = R()), l.exports;
119
+ }
120
+ export {
121
+ D as r
122
+ };
@@ -0,0 +1,259 @@
1
+ import { c as V } from "./createLucideIcon-B6fy1GTR.js";
2
+ import * as s from "react";
3
+ import { c as p } from "./index-DLeNytVF.js";
4
+ import { u as _, c as q } from "./index-CB1Wkg0G.js";
5
+ import { c as K, a as U } from "./index-UFb2E87s.js";
6
+ import { u as R } from "./index-umR1UobZ.js";
7
+ import { u as X } from "./index-DYfkNB0n.js";
8
+ import { P as Y, D as Z } from "./index-QMp1pYFl.js";
9
+ import { h as z, R as J, u as Q, F as ee } from "./index-BAhNQL1u.js";
10
+ import { P as h } from "./index-p7nYL7BU.js";
11
+ import { P as m } from "./index-C9KW2H79.js";
12
+ import { jsx as i, jsxs as N, Fragment as O } from "react/jsx-runtime";
13
+ /**
14
+ * @license lucide-react v0.522.0 - ISC
15
+ *
16
+ * This source code is licensed under the ISC license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const te = [
20
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
21
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
22
+ ], Pe = V("x", te);
23
+ var v = "Dialog", [I, ye] = K(v), [oe, u] = I(v), x = (e) => {
24
+ const {
25
+ __scopeDialog: o,
26
+ children: r,
27
+ open: a,
28
+ defaultOpen: n,
29
+ onOpenChange: t,
30
+ modal: c = !0
31
+ } = e, l = s.useRef(null), d = s.useRef(null), [g, C] = X({
32
+ prop: a,
33
+ defaultProp: n ?? !1,
34
+ onChange: t,
35
+ caller: v
36
+ });
37
+ return /* @__PURE__ */ i(
38
+ oe,
39
+ {
40
+ scope: o,
41
+ triggerRef: l,
42
+ contentRef: d,
43
+ contentId: R(),
44
+ titleId: R(),
45
+ descriptionId: R(),
46
+ open: g,
47
+ onOpenChange: C,
48
+ onOpenToggle: s.useCallback(() => C((H) => !H), [C]),
49
+ modal: c,
50
+ children: r
51
+ }
52
+ );
53
+ };
54
+ x.displayName = v;
55
+ var b = "DialogTrigger", A = s.forwardRef(
56
+ (e, o) => {
57
+ const { __scopeDialog: r, ...a } = e, n = u(b, r), t = _(o, n.triggerRef);
58
+ return /* @__PURE__ */ i(
59
+ m.button,
60
+ {
61
+ type: "button",
62
+ "aria-haspopup": "dialog",
63
+ "aria-expanded": n.open,
64
+ "aria-controls": n.contentId,
65
+ "data-state": E(n.open),
66
+ ...a,
67
+ ref: t,
68
+ onClick: p(e.onClick, n.onOpenToggle)
69
+ }
70
+ );
71
+ }
72
+ );
73
+ A.displayName = b;
74
+ var P = "DialogPortal", [ne, T] = I(P, {
75
+ forceMount: void 0
76
+ }), M = (e) => {
77
+ const { __scopeDialog: o, forceMount: r, children: a, container: n } = e, t = u(P, o);
78
+ return /* @__PURE__ */ i(ne, { scope: o, forceMount: r, children: s.Children.map(a, (c) => /* @__PURE__ */ i(h, { present: r || t.open, children: /* @__PURE__ */ i(Y, { asChild: !0, container: n, children: c }) })) });
79
+ };
80
+ M.displayName = P;
81
+ var D = "DialogOverlay", w = s.forwardRef(
82
+ (e, o) => {
83
+ const r = T(D, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(D, e.__scopeDialog);
84
+ return t.modal ? /* @__PURE__ */ i(h, { present: a || t.open, children: /* @__PURE__ */ i(ae, { ...n, ref: o }) }) : null;
85
+ }
86
+ );
87
+ w.displayName = D;
88
+ var re = q("DialogOverlay.RemoveScroll"), ae = s.forwardRef(
89
+ (e, o) => {
90
+ const { __scopeDialog: r, ...a } = e, n = u(D, r);
91
+ return (
92
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
93
+ // ie. when `Overlay` and `Content` are siblings
94
+ /* @__PURE__ */ i(J, { as: re, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ i(
95
+ m.div,
96
+ {
97
+ "data-state": E(n.open),
98
+ ...a,
99
+ ref: o,
100
+ style: { pointerEvents: "auto", ...a.style }
101
+ }
102
+ ) })
103
+ );
104
+ }
105
+ ), f = "DialogContent", F = s.forwardRef(
106
+ (e, o) => {
107
+ const r = T(f, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(f, e.__scopeDialog);
108
+ return /* @__PURE__ */ i(h, { present: a || t.open, children: t.modal ? /* @__PURE__ */ i(ie, { ...n, ref: o }) : /* @__PURE__ */ i(se, { ...n, ref: o }) });
109
+ }
110
+ );
111
+ F.displayName = f;
112
+ var ie = s.forwardRef(
113
+ (e, o) => {
114
+ const r = u(f, e.__scopeDialog), a = s.useRef(null), n = _(o, r.contentRef, a);
115
+ return s.useEffect(() => {
116
+ const t = a.current;
117
+ if (t) return z(t);
118
+ }, []), /* @__PURE__ */ i(
119
+ S,
120
+ {
121
+ ...e,
122
+ ref: n,
123
+ trapFocus: r.open,
124
+ disableOutsidePointerEvents: !0,
125
+ onCloseAutoFocus: p(e.onCloseAutoFocus, (t) => {
126
+ var c;
127
+ t.preventDefault(), (c = r.triggerRef.current) == null || c.focus();
128
+ }),
129
+ onPointerDownOutside: p(e.onPointerDownOutside, (t) => {
130
+ const c = t.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
131
+ (c.button === 2 || l) && t.preventDefault();
132
+ }),
133
+ onFocusOutside: p(
134
+ e.onFocusOutside,
135
+ (t) => t.preventDefault()
136
+ )
137
+ }
138
+ );
139
+ }
140
+ ), se = s.forwardRef(
141
+ (e, o) => {
142
+ const r = u(f, e.__scopeDialog), a = s.useRef(!1), n = s.useRef(!1);
143
+ return /* @__PURE__ */ i(
144
+ S,
145
+ {
146
+ ...e,
147
+ ref: o,
148
+ trapFocus: !1,
149
+ disableOutsidePointerEvents: !1,
150
+ onCloseAutoFocus: (t) => {
151
+ var c, l;
152
+ (c = e.onCloseAutoFocus) == null || c.call(e, t), t.defaultPrevented || (a.current || (l = r.triggerRef.current) == null || l.focus(), t.preventDefault()), a.current = !1, n.current = !1;
153
+ },
154
+ onInteractOutside: (t) => {
155
+ var d, g;
156
+ (d = e.onInteractOutside) == null || d.call(e, t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (n.current = !0));
157
+ const c = t.target;
158
+ ((g = r.triggerRef.current) == null ? void 0 : g.contains(c)) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && n.current && t.preventDefault();
159
+ }
160
+ }
161
+ );
162
+ }
163
+ ), S = s.forwardRef(
164
+ (e, o) => {
165
+ const { __scopeDialog: r, trapFocus: a, onOpenAutoFocus: n, onCloseAutoFocus: t, ...c } = e, l = u(f, r), d = s.useRef(null), g = _(o, d);
166
+ return Q(), /* @__PURE__ */ N(O, { children: [
167
+ /* @__PURE__ */ i(
168
+ ee,
169
+ {
170
+ asChild: !0,
171
+ loop: !0,
172
+ trapped: a,
173
+ onMountAutoFocus: n,
174
+ onUnmountAutoFocus: t,
175
+ children: /* @__PURE__ */ i(
176
+ Z,
177
+ {
178
+ role: "dialog",
179
+ id: l.contentId,
180
+ "aria-describedby": l.descriptionId,
181
+ "aria-labelledby": l.titleId,
182
+ "data-state": E(l.open),
183
+ ...c,
184
+ ref: g,
185
+ onDismiss: () => l.onOpenChange(!1)
186
+ }
187
+ )
188
+ }
189
+ ),
190
+ /* @__PURE__ */ N(O, { children: [
191
+ /* @__PURE__ */ i(ce, { titleId: l.titleId }),
192
+ /* @__PURE__ */ i(ue, { contentRef: d, descriptionId: l.descriptionId })
193
+ ] })
194
+ ] });
195
+ }
196
+ ), y = "DialogTitle", W = s.forwardRef(
197
+ (e, o) => {
198
+ const { __scopeDialog: r, ...a } = e, n = u(y, r);
199
+ return /* @__PURE__ */ i(m.h2, { id: n.titleId, ...a, ref: o });
200
+ }
201
+ );
202
+ W.displayName = y;
203
+ var k = "DialogDescription", L = s.forwardRef(
204
+ (e, o) => {
205
+ const { __scopeDialog: r, ...a } = e, n = u(k, r);
206
+ return /* @__PURE__ */ i(m.p, { id: n.descriptionId, ...a, ref: o });
207
+ }
208
+ );
209
+ L.displayName = k;
210
+ var G = "DialogClose", $ = s.forwardRef(
211
+ (e, o) => {
212
+ const { __scopeDialog: r, ...a } = e, n = u(G, r);
213
+ return /* @__PURE__ */ i(
214
+ m.button,
215
+ {
216
+ type: "button",
217
+ ...a,
218
+ ref: o,
219
+ onClick: p(e.onClick, () => n.onOpenChange(!1))
220
+ }
221
+ );
222
+ }
223
+ );
224
+ $.displayName = G;
225
+ function E(e) {
226
+ return e ? "open" : "closed";
227
+ }
228
+ var B = "DialogTitleWarning", [Ee, j] = U(B, {
229
+ contentName: f,
230
+ titleName: y,
231
+ docsSlug: "dialog"
232
+ }), ce = ({ titleId: e }) => {
233
+ const o = j(B), r = `\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
234
+
235
+ If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
236
+
237
+ For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;
238
+ return s.useEffect(() => {
239
+ e && (document.getElementById(e) || console.error(r));
240
+ }, [r, e]), null;
241
+ }, le = "DialogDescriptionWarning", ue = ({ contentRef: e, descriptionId: o }) => {
242
+ const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(le).contentName}}.`;
243
+ return s.useEffect(() => {
244
+ var t;
245
+ const n = (t = e.current) == null ? void 0 : t.getAttribute("aria-describedby");
246
+ o && n && (document.getElementById(o) || console.warn(a));
247
+ }, [a, e, o]), null;
248
+ }, Ne = x, Oe = A, Ie = M, xe = w, be = F, Ae = W, Te = L, Me = $;
249
+ export {
250
+ Me as C,
251
+ Te as D,
252
+ xe as O,
253
+ Ie as P,
254
+ Ne as R,
255
+ Oe as T,
256
+ Pe as X,
257
+ be as a,
258
+ Ae as b
259
+ };
@@ -0,0 +1,47 @@
1
+ import r from "react";
2
+ import { c as y } from "./index-UFb2E87s.js";
3
+ import { u as M, c as x } from "./index-CB1Wkg0G.js";
4
+ import { jsx as d } from "react/jsx-runtime";
5
+ function D(s) {
6
+ const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
7
+ f,
8
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
9
+ ), p = (c) => {
10
+ const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
11
+ return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
12
+ };
13
+ p.displayName = f;
14
+ const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
15
+ (c, e) => {
16
+ const { scope: l, children: o } = c, t = m(a, l), n = M(e, t.collectionRef);
17
+ return /* @__PURE__ */ d(E, { ref: n, children: o });
18
+ }
19
+ );
20
+ C.displayName = a;
21
+ const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(u), I = r.forwardRef(
22
+ (c, e) => {
23
+ const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = m(u, l);
24
+ return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
25
+ }
26
+ );
27
+ I.displayName = u;
28
+ function O(c) {
29
+ const e = m(s + "CollectionConsumer", c);
30
+ return r.useCallback(() => {
31
+ const o = e.collectionRef.current;
32
+ if (!o) return [];
33
+ const t = Array.from(o.querySelectorAll(`[${R}]`));
34
+ return Array.from(e.itemMap.values()).sort(
35
+ (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
36
+ );
37
+ }, [e.collectionRef, e.itemMap]);
38
+ }
39
+ return [
40
+ { Provider: p, Slot: C, ItemSlot: I },
41
+ O,
42
+ N
43
+ ];
44
+ }
45
+ export {
46
+ D as c
47
+ };
@@ -0,0 +1,119 @@
1
+ import * as o from "react";
2
+ import { c as O } from "./index-DLeNytVF.js";
3
+ import { c as S } from "./index-UFb2E87s.js";
4
+ import { u as D } from "./index-DYfkNB0n.js";
5
+ import { u as M } from "./index-DuekHEmj.js";
6
+ import { u as L } from "./index-CB1Wkg0G.js";
7
+ import { P as v } from "./index-C9KW2H79.js";
8
+ import { P as k } from "./index-p7nYL7BU.js";
9
+ import { u as F } from "./index-umR1UobZ.js";
10
+ import { jsx as c } from "react/jsx-runtime";
11
+ var f = "Collapsible", [B, W] = S(f), [G, g] = B(f), T = o.forwardRef(
12
+ (e, r) => {
13
+ const {
14
+ __scopeCollapsible: s,
15
+ open: a,
16
+ defaultOpen: t,
17
+ disabled: l,
18
+ onOpenChange: i,
19
+ ...m
20
+ } = e, [d, p] = D({
21
+ prop: a,
22
+ defaultProp: t ?? !1,
23
+ onChange: i,
24
+ caller: f
25
+ });
26
+ return /* @__PURE__ */ c(
27
+ G,
28
+ {
29
+ scope: s,
30
+ disabled: l,
31
+ contentId: F(),
32
+ open: d,
33
+ onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
34
+ children: /* @__PURE__ */ c(
35
+ v.div,
36
+ {
37
+ "data-state": h(d),
38
+ "data-disabled": l ? "" : void 0,
39
+ ...m,
40
+ ref: r
41
+ }
42
+ )
43
+ }
44
+ );
45
+ }
46
+ );
47
+ T.displayName = f;
48
+ var w = "CollapsibleTrigger", A = o.forwardRef(
49
+ (e, r) => {
50
+ const { __scopeCollapsible: s, ...a } = e, t = g(w, s);
51
+ return /* @__PURE__ */ c(
52
+ v.button,
53
+ {
54
+ type: "button",
55
+ "aria-controls": t.contentId,
56
+ "aria-expanded": t.open || !1,
57
+ "data-state": h(t.open),
58
+ "data-disabled": t.disabled ? "" : void 0,
59
+ disabled: t.disabled,
60
+ ...a,
61
+ ref: r,
62
+ onClick: O(e.onClick, t.onOpenToggle)
63
+ }
64
+ );
65
+ }
66
+ );
67
+ A.displayName = w;
68
+ var R = "CollapsibleContent", I = o.forwardRef(
69
+ (e, r) => {
70
+ const { forceMount: s, ...a } = e, t = g(R, e.__scopeCollapsible);
71
+ return /* @__PURE__ */ c(k, { present: s || t.open, children: ({ present: l }) => /* @__PURE__ */ c($, { ...a, ref: r, present: l }) });
72
+ }
73
+ );
74
+ I.displayName = R;
75
+ var $ = o.forwardRef((e, r) => {
76
+ const { __scopeCollapsible: s, present: a, children: t, ...l } = e, i = g(R, s), [m, d] = o.useState(a), p = o.useRef(null), C = L(r, p), P = o.useRef(0), y = P.current, x = o.useRef(0), N = x.current, b = i.open || m, _ = o.useRef(b), u = o.useRef(void 0);
77
+ return o.useEffect(() => {
78
+ const n = requestAnimationFrame(() => _.current = !1);
79
+ return () => cancelAnimationFrame(n);
80
+ }, []), M(() => {
81
+ const n = p.current;
82
+ if (n) {
83
+ u.current = u.current || {
84
+ transitionDuration: n.style.transitionDuration,
85
+ animationName: n.style.animationName
86
+ }, n.style.transitionDuration = "0s", n.style.animationName = "none";
87
+ const E = n.getBoundingClientRect();
88
+ P.current = E.height, x.current = E.width, _.current || (n.style.transitionDuration = u.current.transitionDuration, n.style.animationName = u.current.animationName), d(a);
89
+ }
90
+ }, [i.open, a]), /* @__PURE__ */ c(
91
+ v.div,
92
+ {
93
+ "data-state": h(i.open),
94
+ "data-disabled": i.disabled ? "" : void 0,
95
+ id: i.contentId,
96
+ hidden: !b,
97
+ ...l,
98
+ ref: C,
99
+ style: {
100
+ "--radix-collapsible-content-height": y ? `${y}px` : void 0,
101
+ "--radix-collapsible-content-width": N ? `${N}px` : void 0,
102
+ ...e.style
103
+ },
104
+ children: b && t
105
+ }
106
+ );
107
+ });
108
+ function h(e) {
109
+ return e ? "open" : "closed";
110
+ }
111
+ var X = T, Y = A, Z = I;
112
+ export {
113
+ A as C,
114
+ X as R,
115
+ Y as T,
116
+ I as a,
117
+ Z as b,
118
+ W as c
119
+ };