@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.
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/components/index.js +235 -231
- package/dist/components/ui/atoms/icons/imgflip.d.ts +3 -0
- package/dist/components/ui/atoms/icons/imgflip.js +35 -0
- package/dist/components/ui/atoms/icons/index.d.ts +2 -0
- package/dist/components/ui/atoms/icons/index.js +126 -122
- package/dist/components/ui/atoms/icons/mongodb.d.ts +3 -0
- package/dist/components/ui/atoms/icons/mongodb.js +39 -0
- package/dist/components/ui/atoms/index.js +213 -209
- package/dist/components/ui/atoms/resizable.js +1 -1
- package/dist/components/ui/atoms/switch.d.ts +5 -1
- package/dist/components/ui/atoms/switch.js +98 -73
- package/dist/components/ui/index.js +235 -231
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +2 -2
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-selection-summary.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +2 -2
- package/dist/components/ui/utils/memo.test.js +1 -1
- package/dist/lib/arcade/arcade.test.js +1 -1
- package/dist/lib/utils.test.js +1 -1
- package/dist/{magic-string.es-QnVUNas7.js → magic-string.es-uPKorP4O.js} +7 -4
- package/dist/main.js +263 -259
- package/dist/metadata/toolkits.js +138 -106
- package/dist/{react-resizable-panels.browser-ZHjTH32c.js → react-resizable-panels.browser-DggUboAp.js} +2 -2
- package/dist/{react.esm-CAxz4dXo.js → react.esm-DUaR5u-J.js} +1 -1
- package/dist/{toolkit-card-fWmjBnBQ.js → toolkit-card-DgjPGtsJ.js} +1 -1
- package/dist/{vi.bdSIJ99Y-hyudrc3R.js → vi.bdSIJ99Y-Bs-viS39.js} +1 -1
- package/package.json +35 -34
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
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
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
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
|
|
10
|
-
import { c as
|
|
11
|
-
var m = "Switch", [U, Z] =
|
|
12
|
-
(
|
|
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:
|
|
15
|
+
name: a,
|
|
16
16
|
checked: o,
|
|
17
17
|
defaultChecked: b,
|
|
18
18
|
required: d,
|
|
19
|
-
disabled:
|
|
19
|
+
disabled: c,
|
|
20
20
|
value: u = "on",
|
|
21
|
-
onCheckedChange:
|
|
22
|
-
form:
|
|
23
|
-
...
|
|
24
|
-
} =
|
|
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:
|
|
27
|
+
onChange: v,
|
|
28
28
|
caller: m
|
|
29
29
|
});
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
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":
|
|
39
|
-
"data-disabled":
|
|
40
|
-
disabled:
|
|
38
|
+
"data-state": B(f),
|
|
39
|
+
"data-disabled": c ? "" : void 0,
|
|
40
|
+
disabled: c,
|
|
41
41
|
value: u,
|
|
42
|
-
...
|
|
43
|
-
ref:
|
|
44
|
-
onClick: M(
|
|
45
|
-
|
|
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
|
-
|
|
49
|
+
C && /* @__PURE__ */ s(
|
|
50
50
|
_,
|
|
51
51
|
{
|
|
52
52
|
control: l,
|
|
53
53
|
bubbles: !S.current,
|
|
54
|
-
name:
|
|
54
|
+
name: a,
|
|
55
55
|
value: u,
|
|
56
56
|
checked: f,
|
|
57
57
|
required: d,
|
|
58
|
-
disabled:
|
|
59
|
-
form:
|
|
58
|
+
disabled: c,
|
|
59
|
+
form: i,
|
|
60
60
|
style: { transform: "translateX(-100%)" }
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
|
-
|
|
67
|
-
var R = "SwitchThumb", E =
|
|
68
|
-
(
|
|
69
|
-
const { __scopeSwitch: t, ...
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
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":
|
|
73
|
+
"data-state": B(o.checked),
|
|
74
74
|
"data-disabled": o.disabled ? "" : void 0,
|
|
75
|
-
...
|
|
76
|
-
ref:
|
|
75
|
+
...a,
|
|
76
|
+
ref: e
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
E.displayName = R;
|
|
82
|
-
var O = "SwitchBubbleInput", _ =
|
|
82
|
+
var O = "SwitchBubbleInput", _ = n.forwardRef(
|
|
83
83
|
({
|
|
84
|
-
__scopeSwitch:
|
|
85
|
-
control:
|
|
84
|
+
__scopeSwitch: r,
|
|
85
|
+
control: e,
|
|
86
86
|
checked: t,
|
|
87
|
-
bubbles:
|
|
87
|
+
bubbles: a = !0,
|
|
88
88
|
...o
|
|
89
89
|
}, b) => {
|
|
90
|
-
const d =
|
|
91
|
-
return
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
94
|
-
const
|
|
95
|
-
|
|
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
|
|
100
|
-
p.call(
|
|
99
|
+
const k = new Event("click", { bubbles: a });
|
|
100
|
+
p.call(i, t), i.dispatchEvent(k);
|
|
101
101
|
}
|
|
102
|
-
}, [u, t,
|
|
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:
|
|
110
|
+
ref: c,
|
|
111
111
|
style: {
|
|
112
112
|
...o.style,
|
|
113
|
-
...
|
|
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
|
|
125
|
-
return
|
|
124
|
+
function B(r) {
|
|
125
|
+
return r ? "checked" : "unchecked";
|
|
126
126
|
}
|
|
127
|
-
var D =
|
|
127
|
+
var D = N, F = E;
|
|
128
128
|
function ee({
|
|
129
|
-
className:
|
|
130
|
-
|
|
129
|
+
className: r,
|
|
130
|
+
loading: e = !1,
|
|
131
|
+
disabled: t,
|
|
132
|
+
loadingIndicatorClassName: a,
|
|
133
|
+
...o
|
|
131
134
|
}) {
|
|
132
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ y(
|
|
133
136
|
D,
|
|
134
137
|
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
}
|