@arcadeai/design-system 1.6.0 → 1.7.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.
@@ -0,0 +1,14 @@
1
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import type * as React from 'react';
3
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
11
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
12
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
13
+ declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
14
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -0,0 +1,248 @@
1
+ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { c as $ } from "../../../index-DFZozV_h.js";
4
+ import { u as m, a as M } from "../../../index-5Bhkapwi.js";
5
+ import { c as A, R as I, P as z, O as F, T as L, W as j, C as G, b as W, D as k, a as D } from "../../../index-Dkey23PG.js";
6
+ import { c as H } from "../../../index-B695uy69.js";
7
+ import { buttonVariants as v } from "./button.js";
8
+ import { c as s } from "../../../utils-Db4QWi-E.js";
9
+ var N = "AlertDialog", [V, De] = $(N, [
10
+ A
11
+ ]), n = A(), y = (e) => {
12
+ const { __scopeAlertDialog: t, ...o } = e, r = n(t);
13
+ return /* @__PURE__ */ a(I, { ...r, ...o, modal: !0 });
14
+ };
15
+ y.displayName = N;
16
+ var Y = "AlertDialogTrigger", _ = i.forwardRef(
17
+ (e, t) => {
18
+ const { __scopeAlertDialog: o, ...r } = e, l = n(o);
19
+ return /* @__PURE__ */ a(L, { ...l, ...r, ref: t });
20
+ }
21
+ );
22
+ _.displayName = Y;
23
+ var q = "AlertDialogPortal", x = (e) => {
24
+ const { __scopeAlertDialog: t, ...o } = e, r = n(t);
25
+ return /* @__PURE__ */ a(z, { ...r, ...o });
26
+ };
27
+ x.displayName = q;
28
+ var B = "AlertDialogOverlay", h = i.forwardRef(
29
+ (e, t) => {
30
+ const { __scopeAlertDialog: o, ...r } = e, l = n(o);
31
+ return /* @__PURE__ */ a(F, { ...l, ...r, ref: t });
32
+ }
33
+ );
34
+ h.displayName = B;
35
+ var c = "AlertDialogContent", [J, K] = V(c), Q = M("AlertDialogContent"), C = i.forwardRef(
36
+ (e, t) => {
37
+ const { __scopeAlertDialog: o, children: r, ...l } = e, p = n(o), g = i.useRef(null), O = m(t, g), u = i.useRef(null);
38
+ return /* @__PURE__ */ a(
39
+ j,
40
+ {
41
+ contentName: c,
42
+ titleName: R,
43
+ docsSlug: "alert-dialog",
44
+ children: /* @__PURE__ */ a(J, { scope: o, cancelRef: u, children: /* @__PURE__ */ f(
45
+ G,
46
+ {
47
+ role: "alertdialog",
48
+ ...p,
49
+ ...l,
50
+ ref: O,
51
+ onOpenAutoFocus: H(l.onOpenAutoFocus, (d) => {
52
+ d.preventDefault(), u.current?.focus({ preventScroll: !0 });
53
+ }),
54
+ onPointerDownOutside: (d) => d.preventDefault(),
55
+ onInteractOutside: (d) => d.preventDefault(),
56
+ children: [
57
+ /* @__PURE__ */ a(Q, { children: r }),
58
+ /* @__PURE__ */ a(X, { contentRef: g })
59
+ ]
60
+ }
61
+ ) })
62
+ }
63
+ );
64
+ }
65
+ );
66
+ C.displayName = c;
67
+ var R = "AlertDialogTitle", b = i.forwardRef(
68
+ (e, t) => {
69
+ const { __scopeAlertDialog: o, ...r } = e, l = n(o);
70
+ return /* @__PURE__ */ a(W, { ...l, ...r, ref: t });
71
+ }
72
+ );
73
+ b.displayName = R;
74
+ var E = "AlertDialogDescription", P = i.forwardRef((e, t) => {
75
+ const { __scopeAlertDialog: o, ...r } = e, l = n(o);
76
+ return /* @__PURE__ */ a(k, { ...l, ...r, ref: t });
77
+ });
78
+ P.displayName = E;
79
+ var U = "AlertDialogAction", S = i.forwardRef(
80
+ (e, t) => {
81
+ const { __scopeAlertDialog: o, ...r } = e, l = n(o);
82
+ return /* @__PURE__ */ a(D, { ...l, ...r, ref: t });
83
+ }
84
+ );
85
+ S.displayName = U;
86
+ var T = "AlertDialogCancel", w = i.forwardRef(
87
+ (e, t) => {
88
+ const { __scopeAlertDialog: o, ...r } = e, { cancelRef: l } = K(T, o), p = n(o), g = m(t, l);
89
+ return /* @__PURE__ */ a(D, { ...p, ...r, ref: g });
90
+ }
91
+ );
92
+ w.displayName = T;
93
+ var X = ({ contentRef: e }) => {
94
+ const t = `\`${c}\` requires a description for the component to be accessible for screen reader users.
95
+
96
+ You can add a description to the \`${c}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
97
+
98
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${c}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
99
+
100
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
101
+ return i.useEffect(() => {
102
+ document.getElementById(
103
+ e.current?.getAttribute("aria-describedby")
104
+ ) || console.warn(t);
105
+ }, [t, e]), null;
106
+ }, Z = y, ee = _, te = x, ae = h, oe = C, re = S, le = w, ie = b, ne = P;
107
+ function ve({
108
+ ...e
109
+ }) {
110
+ return /* @__PURE__ */ a(Z, { "data-slot": "alert-dialog", ...e });
111
+ }
112
+ function Ne({
113
+ ...e
114
+ }) {
115
+ return /* @__PURE__ */ a(ee, { "data-slot": "alert-dialog-trigger", ...e });
116
+ }
117
+ function se({
118
+ ...e
119
+ }) {
120
+ return /* @__PURE__ */ a(te, { "data-slot": "alert-dialog-portal", ...e });
121
+ }
122
+ function ce({
123
+ className: e,
124
+ ...t
125
+ }) {
126
+ return /* @__PURE__ */ a(
127
+ ae,
128
+ {
129
+ className: s(
130
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
131
+ e
132
+ ),
133
+ "data-slot": "alert-dialog-overlay",
134
+ ...t
135
+ }
136
+ );
137
+ }
138
+ function ye({
139
+ className: e,
140
+ ...t
141
+ }) {
142
+ return /* @__PURE__ */ f(se, { children: [
143
+ /* @__PURE__ */ a(ce, {}),
144
+ /* @__PURE__ */ a(
145
+ oe,
146
+ {
147
+ className: s(
148
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",
149
+ e
150
+ ),
151
+ "data-slot": "alert-dialog-content",
152
+ ...t
153
+ }
154
+ )
155
+ ] });
156
+ }
157
+ function _e({
158
+ className: e,
159
+ ...t
160
+ }) {
161
+ return /* @__PURE__ */ a(
162
+ "div",
163
+ {
164
+ className: s("flex flex-col gap-2 text-center sm:text-left", e),
165
+ "data-slot": "alert-dialog-header",
166
+ ...t
167
+ }
168
+ );
169
+ }
170
+ function xe({
171
+ className: e,
172
+ ...t
173
+ }) {
174
+ return /* @__PURE__ */ a(
175
+ "div",
176
+ {
177
+ className: s(
178
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
179
+ e
180
+ ),
181
+ "data-slot": "alert-dialog-footer",
182
+ ...t
183
+ }
184
+ );
185
+ }
186
+ function he({
187
+ className: e,
188
+ ...t
189
+ }) {
190
+ return /* @__PURE__ */ a(
191
+ ie,
192
+ {
193
+ className: s("font-semibold text-lg", e),
194
+ "data-slot": "alert-dialog-title",
195
+ ...t
196
+ }
197
+ );
198
+ }
199
+ function Ce({
200
+ className: e,
201
+ ...t
202
+ }) {
203
+ return /* @__PURE__ */ a(
204
+ ne,
205
+ {
206
+ className: s("text-muted-foreground text-sm", e),
207
+ "data-slot": "alert-dialog-description",
208
+ ...t
209
+ }
210
+ );
211
+ }
212
+ function Re({
213
+ className: e,
214
+ ...t
215
+ }) {
216
+ return /* @__PURE__ */ a(
217
+ re,
218
+ {
219
+ className: s(v(), e),
220
+ ...t
221
+ }
222
+ );
223
+ }
224
+ function be({
225
+ className: e,
226
+ ...t
227
+ }) {
228
+ return /* @__PURE__ */ a(
229
+ le,
230
+ {
231
+ className: s(v({ variant: "outline" }), e),
232
+ ...t
233
+ }
234
+ );
235
+ }
236
+ export {
237
+ ve as AlertDialog,
238
+ Re as AlertDialogAction,
239
+ be as AlertDialogCancel,
240
+ ye as AlertDialogContent,
241
+ Ce as AlertDialogDescription,
242
+ xe as AlertDialogFooter,
243
+ _e as AlertDialogHeader,
244
+ ce as AlertDialogOverlay,
245
+ se as AlertDialogPortal,
246
+ he as AlertDialogTitle,
247
+ Ne as AlertDialogTrigger
248
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as C, jsxs as ne } from "react/jsx-runtime";
2
- import { R as Se, P as Ie, O as Re, C as Ae } from "../../../index-BzU0xzeS.js";
2
+ import { R as Se, P as Ie, O as Re, C as Ae } from "../../../index-Dkey23PG.js";
3
3
  import * as l from "react";
4
4
  import { P as A } from "../../../index-CpDnqHCm.js";
5
5
  import { u as j } from "../../../index-Cv867SGx.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
- import { R as r, T as d, C as c, a as s, b as g, D as u, P as f, O as m } from "../../../index-BzU0xzeS.js";
2
+ import { R as r, T as d, C as c, a as s, b as g, D as u, P as f, O as m } from "../../../index-Dkey23PG.js";
3
3
  import { XIcon as p } from "lucide-react";
4
4
  import { c as o } from "../../../utils-Db4QWi-E.js";
5
5
  function N({
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { R as d, T as c, a as r, C as m, b as u, D as f, P as h, O as g } from "../../../index-BzU0xzeS.js";
2
+ import { R as d, T as c, a as r, C as m, b as u, D as f, P as h, O as g } from "../../../index-Dkey23PG.js";
3
3
  import { XIcon as p } from "lucide-react";
4
4
  import { c as o } from "../../../utils-Db4QWi-E.js";
5
5
  function v({ ...t }) {
@@ -1,8 +1,8 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { r as c, a as i } from "../../../../../react.esm-CFMQn0EI.js";
2
+ import { r as c, a as i } from "../../../../../react.esm-CAxz4dXo.js";
3
3
  import { mockToolkitCollection as a } from "../mocks/toolkit-collection.js";
4
4
  import { useToolkitPicker as n, ToolkitPickerProvider as k } from "./use-toolkit-picker.js";
5
- import { d as T, b as d, i as u, g as e, v as p } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
5
+ import { d as T, b as d, i as u, g as e, v as p } from "../../../../../vi.bdSIJ99Y-hyudrc3R.js";
6
6
  T("useToolkitPicker - Filter Tests", () => {
7
7
  d(() => {
8
8
  p.clearAllMocks();
@@ -1,8 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { r as c, a as l } from "../../../../../react.esm-CFMQn0EI.js";
2
+ import { r as c, a as l } from "../../../../../react.esm-CAxz4dXo.js";
3
3
  import { mockToolkitCollection as a } from "../mocks/toolkit-collection.js";
4
4
  import { useToolkitPicker as n, ToolkitPickerProvider as u } from "./use-toolkit-picker.js";
5
- import { d as k, b as h, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
5
+ import { d as k, b as h, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-hyudrc3R.js";
6
6
  k("useToolkitPicker - Search Tests", () => {
7
7
  h(() => {
8
8
  m.clearAllMocks();
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { r as i, a as t } from "../../../../../react.esm-CFMQn0EI.js";
2
+ import { r as i, a as t } from "../../../../../react.esm-CAxz4dXo.js";
3
3
  import { simpleMockToolkitCollection as c } from "../mocks/toolkit-collection.js";
4
4
  import { useToolkitPicker as a, ToolkitPickerProvider as n } from "./use-toolkit-picker.js";
5
- import { d as u, b as k, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
5
+ import { d as u, b as k, i as d, g as o, v as m } from "../../../../../vi.bdSIJ99Y-hyudrc3R.js";
6
6
  u("useToolkitPicker - Selection Tests", () => {
7
7
  k(() => {
8
8
  m.clearAllMocks();
@@ -1,7 +1,7 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
2
  import { ToolkitPickerTrigger as N } from "../../molecules/toolkit-picker-trigger.js";
3
- import { c as Mo, e as Ko, g as v, d as Sc, a as Mc, i as D, v as pe } from "../../../../vi.bdSIJ99Y-CQ1FdEM8.js";
4
- import { g as _e, b as $, s as u, c as V, w as fe, d as Ac } from "../../../../react.esm-CFMQn0EI.js";
3
+ import { c as Mo, e as Ko, g as v, d as Sc, a as Mc, i as D, v as pe } from "../../../../vi.bdSIJ99Y-hyudrc3R.js";
4
+ import { g as _e, b as $, s as u, c as V, w as fe, d as Ac } from "../../../../react.esm-CAxz4dXo.js";
5
5
  import { ToolkitPicker as H } from "./index.js";
6
6
  import { createMockToolkitCollection as Nc, mockToolkitCollection as j } from "./mocks/toolkit-collection.js";
7
7
  var fo, zo;
@@ -1,5 +1,5 @@
1
1
  import { createPropsComparator as s, areStringArraysEqual as a } from "./memo.js";
2
- import { d as i, i as t, g as e } from "../../../vi.bdSIJ99Y-CQ1FdEM8.js";
2
+ import { d as i, i as t, g as e } from "../../../vi.bdSIJ99Y-hyudrc3R.js";
3
3
  i("createPropsComparator", () => {
4
4
  t("returns true when selected keys are strictly equal", () => {
5
5
  const r = s(["id", "name"]);
@@ -238,6 +238,8 @@ export {
238
238
  Ee as P,
239
239
  he as R,
240
240
  Pe as T,
241
+ _e as W,
241
242
  xe as a,
242
- Oe as b
243
+ Oe as b,
244
+ Re as c
243
245
  };
@@ -1,6 +1,6 @@
1
1
  import { A as i, a as c } from "../../arcade-DzMbb7xi.js";
2
2
  import { allTools as m } from "./mocks.js";
3
- import { v as l, d as u, b as p, i as s, g as e } from "../../vi.bdSIJ99Y-CQ1FdEM8.js";
3
+ import { v as l, d as u, b as p, i as s, g as e } from "../../vi.bdSIJ99Y-hyudrc3R.js";
4
4
  const d = {
5
5
  tools: {
6
6
  list: l.fn().mockImplementation((o) => {
@@ -1,5 +1,5 @@
1
1
  import { c as o, r as s } from "../utils-Db4QWi-E.js";
2
- import { d as r, i as n, g as e, b as v, a as i, v as t } from "../vi.bdSIJ99Y-CQ1FdEM8.js";
2
+ import { d as r, i as n, g as e, b as v, a as i, v as t } from "../vi.bdSIJ99Y-hyudrc3R.js";
3
3
  r("cn", () => {
4
4
  n("joins simple class names", () => {
5
5
  e(o("a", "b", "c")).toBe("a b c");
@@ -1,7 +1,7 @@
1
1
  import * as io from "react";
2
2
  import j1 from "react";
3
3
  import yf from "react-dom";
4
- import { c as KO } from "./vi.bdSIJ99Y-CQ1FdEM8.js";
4
+ import { c as KO } from "./vi.bdSIJ99Y-hyudrc3R.js";
5
5
  var q1 = { exports: {} }, rS = {};
6
6
  /**
7
7
  * @license React