@arcadeai/design-system 2.0.0 → 2.1.1

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 (38) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/tokens.css +1 -1
  3. package/dist/assets/variables.css +1 -1
  4. package/dist/components/index.js +235 -231
  5. package/dist/components/ui/atoms/icons/imgflip.d.ts +3 -0
  6. package/dist/components/ui/atoms/icons/imgflip.js +35 -0
  7. package/dist/components/ui/atoms/icons/index.d.ts +2 -0
  8. package/dist/components/ui/atoms/icons/index.js +126 -122
  9. package/dist/components/ui/atoms/icons/mongodb.d.ts +3 -0
  10. package/dist/components/ui/atoms/icons/mongodb.js +39 -0
  11. package/dist/components/ui/atoms/index.js +213 -209
  12. package/dist/components/ui/atoms/resizable.js +1 -1
  13. package/dist/components/ui/atoms/switch.d.ts +5 -1
  14. package/dist/components/ui/atoms/switch.js +98 -73
  15. package/dist/components/ui/index.js +235 -231
  16. package/dist/components/ui/molecules/index.js +1 -1
  17. package/dist/components/ui/molecules/requirement-badges.js +2 -2
  18. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  19. package/dist/components/ui/molecules/toolkit-selection-summary.js +2 -2
  20. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +2 -2
  21. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +2 -2
  22. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
  23. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +2 -2
  24. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +2 -2
  25. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +2 -2
  26. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +2 -2
  27. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +2 -2
  28. package/dist/components/ui/utils/memo.test.js +1 -1
  29. package/dist/lib/arcade/arcade.test.js +1 -1
  30. package/dist/lib/utils.test.js +1 -1
  31. package/dist/{magic-string.es-QnVUNas7.js → magic-string.es-uPKorP4O.js} +7 -4
  32. package/dist/main.js +263 -259
  33. package/dist/metadata/toolkits.js +138 -106
  34. package/dist/{react-resizable-panels.browser-ZHjTH32c.js → react-resizable-panels.browser-DggUboAp.js} +2 -2
  35. package/dist/{react.esm-CAxz4dXo.js → react.esm-DUaR5u-J.js} +1 -1
  36. package/dist/{toolkit-card-fWmjBnBQ.js → toolkit-card-DgjPGtsJ.js} +1 -1
  37. package/dist/{vi.bdSIJ99Y-hyudrc3R.js → vi.bdSIJ99Y-Bs-viS39.js} +1 -1
  38. package/package.json +35 -34
@@ -1,105 +1,105 @@
1
- import { jsxs as I, jsx as i } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsxs as y, jsx as s } from "react/jsx-runtime";
2
+ import * as n from "react";
3
3
  import { c as M } from "../../../index-B695uy69.js";
4
4
  import { u as x } from "../../../index-5Bhkapwi.js";
5
- import { c as H } from "../../../index-DFZozV_h.js";
6
- import { u as j } from "../../../index-437EL2iq.js";
7
- import { u as z } from "../../../index-BZPx6jYI.js";
5
+ import { c as j } from "../../../index-DFZozV_h.js";
6
+ import { u as z } from "../../../index-437EL2iq.js";
7
+ import { u as H } from "../../../index-BZPx6jYI.js";
8
8
  import { u as A } from "../../../index-BGQepRFJ.js";
9
- import { P as y } from "../../../index-CpDnqHCm.js";
10
- import { c as C } from "../../../utils-Db4QWi-E.js";
11
- var m = "Switch", [U, Z] = H(m), [q, L] = U(m), P = a.forwardRef(
12
- (e, r) => {
9
+ import { P } from "../../../index-CpDnqHCm.js";
10
+ import { c as g } from "../../../utils-Db4QWi-E.js";
11
+ var m = "Switch", [U, Z] = j(m), [q, L] = U(m), N = n.forwardRef(
12
+ (r, e) => {
13
13
  const {
14
14
  __scopeSwitch: t,
15
- name: s,
15
+ name: a,
16
16
  checked: o,
17
17
  defaultChecked: b,
18
18
  required: d,
19
- disabled: n,
19
+ disabled: c,
20
20
  value: u = "on",
21
- onCheckedChange: w,
22
- form: c,
23
- ...k
24
- } = e, [l, p] = a.useState(null), v = x(r, (h) => p(h)), S = a.useRef(!1), g = l ? c || !!l.closest("form") : !0, [f, B] = j({
21
+ onCheckedChange: v,
22
+ form: i,
23
+ ...w
24
+ } = r, [l, p] = n.useState(null), k = x(e, (h) => p(h)), S = n.useRef(!1), C = l ? i || !!l.closest("form") : !0, [f, T] = z({
25
25
  prop: o,
26
26
  defaultProp: b ?? !1,
27
- onChange: w,
27
+ onChange: v,
28
28
  caller: m
29
29
  });
30
- return /* @__PURE__ */ I(q, { scope: t, checked: f, disabled: n, children: [
31
- /* @__PURE__ */ i(
32
- y.button,
30
+ return /* @__PURE__ */ y(q, { scope: t, checked: f, disabled: c, children: [
31
+ /* @__PURE__ */ s(
32
+ P.button,
33
33
  {
34
34
  type: "button",
35
35
  role: "switch",
36
36
  "aria-checked": f,
37
37
  "aria-required": d,
38
- "data-state": N(f),
39
- "data-disabled": n ? "" : void 0,
40
- disabled: n,
38
+ "data-state": B(f),
39
+ "data-disabled": c ? "" : void 0,
40
+ disabled: c,
41
41
  value: u,
42
- ...k,
43
- ref: v,
44
- onClick: M(e.onClick, (h) => {
45
- B((T) => !T), g && (S.current = h.isPropagationStopped(), S.current || h.stopPropagation());
42
+ ...w,
43
+ ref: k,
44
+ onClick: M(r.onClick, (h) => {
45
+ T((I) => !I), C && (S.current = h.isPropagationStopped(), S.current || h.stopPropagation());
46
46
  })
47
47
  }
48
48
  ),
49
- g && /* @__PURE__ */ i(
49
+ C && /* @__PURE__ */ s(
50
50
  _,
51
51
  {
52
52
  control: l,
53
53
  bubbles: !S.current,
54
- name: s,
54
+ name: a,
55
55
  value: u,
56
56
  checked: f,
57
57
  required: d,
58
- disabled: n,
59
- form: c,
58
+ disabled: c,
59
+ form: i,
60
60
  style: { transform: "translateX(-100%)" }
61
61
  }
62
62
  )
63
63
  ] });
64
64
  }
65
65
  );
66
- P.displayName = m;
67
- var R = "SwitchThumb", E = a.forwardRef(
68
- (e, r) => {
69
- const { __scopeSwitch: t, ...s } = e, o = L(R, t);
70
- return /* @__PURE__ */ i(
71
- y.span,
66
+ N.displayName = m;
67
+ var R = "SwitchThumb", E = n.forwardRef(
68
+ (r, e) => {
69
+ const { __scopeSwitch: t, ...a } = r, o = L(R, t);
70
+ return /* @__PURE__ */ s(
71
+ P.span,
72
72
  {
73
- "data-state": N(o.checked),
73
+ "data-state": B(o.checked),
74
74
  "data-disabled": o.disabled ? "" : void 0,
75
- ...s,
76
- ref: r
75
+ ...a,
76
+ ref: e
77
77
  }
78
78
  );
79
79
  }
80
80
  );
81
81
  E.displayName = R;
82
- var O = "SwitchBubbleInput", _ = a.forwardRef(
82
+ var O = "SwitchBubbleInput", _ = n.forwardRef(
83
83
  ({
84
- __scopeSwitch: e,
85
- control: r,
84
+ __scopeSwitch: r,
85
+ control: e,
86
86
  checked: t,
87
- bubbles: s = !0,
87
+ bubbles: a = !0,
88
88
  ...o
89
89
  }, b) => {
90
- const d = a.useRef(null), n = x(d, b), u = z(t), w = A(r);
91
- return a.useEffect(() => {
92
- const c = d.current;
93
- if (!c) return;
94
- const k = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
95
- k,
90
+ const d = n.useRef(null), c = x(d, b), u = H(t), v = A(e);
91
+ return n.useEffect(() => {
92
+ const i = d.current;
93
+ if (!i) return;
94
+ const w = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
95
+ w,
96
96
  "checked"
97
97
  ).set;
98
98
  if (u !== t && p) {
99
- const v = new Event("click", { bubbles: s });
100
- p.call(c, t), c.dispatchEvent(v);
99
+ const k = new Event("click", { bubbles: a });
100
+ p.call(i, t), i.dispatchEvent(k);
101
101
  }
102
- }, [u, t, s]), /* @__PURE__ */ i(
102
+ }, [u, t, a]), /* @__PURE__ */ s(
103
103
  "input",
104
104
  {
105
105
  type: "checkbox",
@@ -107,10 +107,10 @@ var O = "SwitchBubbleInput", _ = a.forwardRef(
107
107
  defaultChecked: t,
108
108
  ...o,
109
109
  tabIndex: -1,
110
- ref: n,
110
+ ref: c,
111
111
  style: {
112
112
  ...o.style,
113
- ...w,
113
+ ...v,
114
114
  position: "absolute",
115
115
  pointerEvents: "none",
116
116
  opacity: 0,
@@ -121,32 +121,57 @@ var O = "SwitchBubbleInput", _ = a.forwardRef(
121
121
  }
122
122
  );
123
123
  _.displayName = O;
124
- function N(e) {
125
- return e ? "checked" : "unchecked";
124
+ function B(r) {
125
+ return r ? "checked" : "unchecked";
126
126
  }
127
- var D = P, F = E;
127
+ var D = N, F = E;
128
128
  function ee({
129
- className: e,
130
- ...r
129
+ className: r,
130
+ loading: e = !1,
131
+ disabled: t,
132
+ loadingIndicatorClassName: a,
133
+ ...o
131
134
  }) {
132
- return /* @__PURE__ */ i(
135
+ return /* @__PURE__ */ y(
133
136
  D,
134
137
  {
135
- className: C(
136
- "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
137
- e
138
+ "aria-busy": e || void 0,
139
+ className: g(
140
+ "peer relative inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
141
+ r
138
142
  ),
143
+ "data-loading": e || void 0,
139
144
  "data-slot": "switch",
140
- ...r,
141
- children: /* @__PURE__ */ i(
142
- F,
143
- {
144
- className: C(
145
- "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"
146
- ),
147
- "data-slot": "switch-thumb"
148
- }
149
- )
145
+ disabled: t || e,
146
+ ...o,
147
+ children: [
148
+ /* @__PURE__ */ s(
149
+ F,
150
+ {
151
+ className: g(
152
+ "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground",
153
+ e && "opacity-0"
154
+ ),
155
+ "data-slot": "switch-thumb"
156
+ }
157
+ ),
158
+ e && /* @__PURE__ */ s(
159
+ "span",
160
+ {
161
+ "aria-hidden": "true",
162
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
163
+ children: /* @__PURE__ */ s(
164
+ "span",
165
+ {
166
+ className: g(
167
+ "size-3 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent",
168
+ a
169
+ )
170
+ }
171
+ )
172
+ }
173
+ )
174
+ ]
150
175
  }
151
176
  );
152
177
  }