@arcadeai/design-system 3.39.4 → 3.41.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/icons/forkable.js +10 -0
- 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 +470 -465
- package/dist/components/ui/atoms/badge.js +5 -5
- package/dist/components/ui/atoms/button.js +1 -1
- package/dist/components/ui/atoms/icons/forkable.d.ts +4 -0
- package/dist/components/ui/atoms/icons/forkable.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/forkable.js +31 -0
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +220 -218
- package/dist/components/ui/atoms/index.js +369 -367
- package/dist/components/ui/atoms/switch.js +19 -19
- package/dist/components/ui/index.js +470 -465
- package/dist/components/ui/molecules/date-time-picker.js +1 -1
- package/dist/components/ui/molecules/index.d.ts +2 -0
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +30 -27
- package/dist/components/ui/molecules/steps-progress.d.ts +3 -1
- package/dist/components/ui/molecules/steps-progress.d.ts.map +1 -1
- package/dist/components/ui/molecules/steps-progress.js +153 -112
- package/dist/components/ui/molecules/tags-input.d.ts +44 -0
- package/dist/components/ui/molecules/tags-input.d.ts.map +1 -0
- package/dist/components/ui/molecules/tags-input.js +139 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +19 -22
- package/dist/components/ui/pages/login-page.js +13 -13
- package/dist/main.js +487 -482
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +158 -156
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/package.json +7 -7
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { X as _ } from "lucide-react";
|
|
3
|
+
import { useId as C, useState as D, useRef as P, Fragment as L } from "react";
|
|
4
|
+
import { Badge as X } from "../atoms/badge.js";
|
|
5
|
+
import { cn as $ } from "../../../lib/utils.js";
|
|
6
|
+
const T = /[,\n\r]+/;
|
|
7
|
+
function q({ value: n, onRemove: s }) {
|
|
8
|
+
return /* @__PURE__ */ h(X, { className: "gap-1 pr-1", variant: "secondary", children: [
|
|
9
|
+
/* @__PURE__ */ c("span", { className: "max-w-[220px] truncate", children: n }),
|
|
10
|
+
/* @__PURE__ */ c(
|
|
11
|
+
"button",
|
|
12
|
+
{
|
|
13
|
+
"aria-label": `Remove ${n}`,
|
|
14
|
+
className: "ml-0.5 rounded text-muted-foreground hover:text-foreground",
|
|
15
|
+
onClick: (p) => {
|
|
16
|
+
p.stopPropagation(), s();
|
|
17
|
+
},
|
|
18
|
+
type: "button",
|
|
19
|
+
children: /* @__PURE__ */ c(_, { className: "size-3" })
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
function G(n, s) {
|
|
25
|
+
return /* @__PURE__ */ c(q, { onRemove: s, value: n });
|
|
26
|
+
}
|
|
27
|
+
function W({
|
|
28
|
+
values: n,
|
|
29
|
+
onChange: s,
|
|
30
|
+
placeholder: p,
|
|
31
|
+
addOnBlur: z = !0,
|
|
32
|
+
validateValue: f,
|
|
33
|
+
isDuplicate: x,
|
|
34
|
+
renderValue: B,
|
|
35
|
+
className: V,
|
|
36
|
+
disabled: y = !1,
|
|
37
|
+
id: A,
|
|
38
|
+
...F
|
|
39
|
+
}) {
|
|
40
|
+
const S = C(), b = A ?? S, [i, m] = D(""), [w, d] = D(null), k = P(null), l = P(n);
|
|
41
|
+
l.current = n;
|
|
42
|
+
const j = B ?? G, I = (e, t) => {
|
|
43
|
+
for (const o of t) {
|
|
44
|
+
const r = x ? x(e, o) : e === o;
|
|
45
|
+
if (r === !0)
|
|
46
|
+
return "Already added";
|
|
47
|
+
if (typeof r == "string" && r)
|
|
48
|
+
return r;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}, N = (e) => {
|
|
52
|
+
const t = e.trim();
|
|
53
|
+
if (!t)
|
|
54
|
+
return;
|
|
55
|
+
const o = l.current, r = f ? f(t, o) : {};
|
|
56
|
+
if (r.error) {
|
|
57
|
+
d(r.error);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const u = r.normalizedValue ?? t, a = I(u, o);
|
|
61
|
+
if (a) {
|
|
62
|
+
d(a);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
s([...o, u]), m(""), d(null);
|
|
66
|
+
}, v = (e) => {
|
|
67
|
+
s(l.current.filter((t) => t !== e));
|
|
68
|
+
}, K = (e) => {
|
|
69
|
+
if ((e.key === "Enter" || e.key === ",") && !e.nativeEvent.isComposing)
|
|
70
|
+
e.preventDefault(), N(i);
|
|
71
|
+
else if (e.key === "Backspace" && i === "") {
|
|
72
|
+
const t = l.current.at(-1);
|
|
73
|
+
t !== void 0 && v(t);
|
|
74
|
+
} else
|
|
75
|
+
d(null);
|
|
76
|
+
}, M = (e) => {
|
|
77
|
+
const t = e.clipboardData.getData("text");
|
|
78
|
+
if (!T.test(t))
|
|
79
|
+
return;
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
const o = t.split(T).map((a) => a.trim()).filter(Boolean);
|
|
82
|
+
let r = [...l.current], u = null;
|
|
83
|
+
for (const a of o) {
|
|
84
|
+
const g = f ? f(a, r) : {};
|
|
85
|
+
if (g.error) {
|
|
86
|
+
u = g.error;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
const E = g.normalizedValue ?? a, R = I(E, r);
|
|
90
|
+
if (R) {
|
|
91
|
+
u = R;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
r = [...r, E];
|
|
95
|
+
}
|
|
96
|
+
r.length > l.current.length && s(r), m(""), d(u);
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ h("div", { className: "space-y-1", children: [
|
|
99
|
+
/* @__PURE__ */ h(
|
|
100
|
+
"label",
|
|
101
|
+
{
|
|
102
|
+
className: $(
|
|
103
|
+
"flex min-h-10 w-full cursor-text flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-3 py-2 text-sm transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
|
|
104
|
+
y && "cursor-not-allowed opacity-50",
|
|
105
|
+
V
|
|
106
|
+
),
|
|
107
|
+
htmlFor: b,
|
|
108
|
+
ref: k,
|
|
109
|
+
children: [
|
|
110
|
+
n.map((e) => /* @__PURE__ */ c(L, { children: j(e, () => v(e)) }, e)),
|
|
111
|
+
/* @__PURE__ */ c(
|
|
112
|
+
"input",
|
|
113
|
+
{
|
|
114
|
+
...F,
|
|
115
|
+
className: "min-w-32 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
116
|
+
disabled: y,
|
|
117
|
+
id: b,
|
|
118
|
+
onBlur: (e) => {
|
|
119
|
+
const t = k.current?.contains(e.relatedTarget);
|
|
120
|
+
z && i.trim() && !t && N(i);
|
|
121
|
+
},
|
|
122
|
+
onChange: (e) => m(e.target.value),
|
|
123
|
+
onKeyDown: K,
|
|
124
|
+
onPaste: M,
|
|
125
|
+
placeholder: n.length === 0 ? p : "",
|
|
126
|
+
type: "text",
|
|
127
|
+
value: i
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
w && /* @__PURE__ */ c("p", { className: "text-destructive text-sm", children: w })
|
|
134
|
+
] });
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
W as TagsInput,
|
|
138
|
+
q as TagsInputValue
|
|
139
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-card.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/tool-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAY7C,MAAM,MAAM,aAAa,GAAG;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAE3D,iBAAS,YAAY,CAAC,EACpB,oBAAoB,EACpB,IAAI,EACJ,WAAW,EACX,WAAW,EACX,IAA+B,EAC/B,UAAkB,EAClB,QAAQ,EACR,YAAoB,EACpB,GAAG,IAAI,EACR,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"tool-card.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/tool-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAY7C,MAAM,MAAM,aAAa,GAAG;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACtD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAE3D,iBAAS,YAAY,CAAC,EACpB,oBAAoB,EACpB,IAAI,EACJ,WAAW,EACX,WAAW,EACX,IAA+B,EAC/B,UAAkB,EAClB,QAAQ,EACR,YAAoB,EACpB,GAAG,IAAI,EACR,EAAE,aAAa,eAyIf;AAcD,eAAO,MAAM,QAAQ,gDAAoD,CAAC"}
|
|
@@ -13,22 +13,22 @@ function R({
|
|
|
13
13
|
fully_qualified_name: m,
|
|
14
14
|
name: f,
|
|
15
15
|
toolkitName: p,
|
|
16
|
-
description:
|
|
17
|
-
Icon: b = (
|
|
16
|
+
description: h,
|
|
17
|
+
Icon: b = (s) => /* @__PURE__ */ r(E, { ...s }),
|
|
18
18
|
isSelected: o = !1,
|
|
19
|
-
onSelect:
|
|
20
|
-
hideCheckbox:
|
|
19
|
+
onSelect: n,
|
|
20
|
+
hideCheckbox: u = !1,
|
|
21
21
|
...g
|
|
22
22
|
}) {
|
|
23
|
-
const
|
|
24
|
-
() =>
|
|
25
|
-
[o,
|
|
26
|
-
), [
|
|
23
|
+
const s = t.useCallback(
|
|
24
|
+
() => n?.(!o),
|
|
25
|
+
[o, n]
|
|
26
|
+
), [l, k] = t.useState(!1), { ref: x, isTruncated: C } = z(!l), v = (e) => {
|
|
27
27
|
const i = e.key === "Enter" || e.code === "Enter", c = e.key === " " || e.key === "Spacebar" || e.code === "Space";
|
|
28
|
-
(i || c) && (e.preventDefault(),
|
|
28
|
+
(i || c) && (e.preventDefault(), s());
|
|
29
29
|
}, y = t.useCallback(
|
|
30
|
-
(e) =>
|
|
31
|
-
[
|
|
30
|
+
(e) => n?.(!!e),
|
|
31
|
+
[n]
|
|
32
32
|
), w = t.useCallback((e) => {
|
|
33
33
|
e.stopPropagation();
|
|
34
34
|
}, []), N = t.useCallback((e) => {
|
|
@@ -47,7 +47,7 @@ function R({
|
|
|
47
47
|
!o && "border-neutral-200 hover:border-neutral-300 dark:border-neutral-800 dark:hover:border-neutral-700"
|
|
48
48
|
),
|
|
49
49
|
onClick: (e) => {
|
|
50
|
-
e.target.closest('[data-slot="checkbox-wrapper"]') ||
|
|
50
|
+
e.target.closest('[data-slot="checkbox-wrapper"]') || s();
|
|
51
51
|
},
|
|
52
52
|
onKeyDown: v,
|
|
53
53
|
tabIndex: 0,
|
|
@@ -57,10 +57,10 @@ function R({
|
|
|
57
57
|
className: d(
|
|
58
58
|
"grid items-start gap-2",
|
|
59
59
|
"grid-cols-[20px_1fr_auto]",
|
|
60
|
-
|
|
60
|
+
u && "grid-cols-[1fr_auto]"
|
|
61
61
|
),
|
|
62
62
|
children: [
|
|
63
|
-
!
|
|
63
|
+
!u && /* @__PURE__ */ r(
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
className: "flex items-center justify-center pt-1.5",
|
|
@@ -84,20 +84,20 @@ function R({
|
|
|
84
84
|
p && /* @__PURE__ */ r("span", { className: "font-medium text-neutral-500 text-xs leading-tight dark:text-neutral-400", children: p })
|
|
85
85
|
] })
|
|
86
86
|
] }),
|
|
87
|
-
|
|
87
|
+
h && /* @__PURE__ */ a(T, { onOpenChange: k, open: l, children: [
|
|
88
88
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
89
89
|
/* @__PURE__ */ r(
|
|
90
90
|
"p",
|
|
91
91
|
{
|
|
92
92
|
className: d(
|
|
93
93
|
"text-neutral-600 text-sm dark:text-neutral-400",
|
|
94
|
-
!
|
|
94
|
+
!l && "line-clamp-3"
|
|
95
95
|
),
|
|
96
96
|
ref: x,
|
|
97
|
-
children:
|
|
97
|
+
children: h
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
|
-
C && /* @__PURE__ */
|
|
100
|
+
C && /* @__PURE__ */ r(
|
|
101
101
|
K,
|
|
102
102
|
{
|
|
103
103
|
render: /* @__PURE__ */ r(
|
|
@@ -110,10 +110,7 @@ function R({
|
|
|
110
110
|
variant: "link"
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
children:
|
|
114
|
-
n && "Show less",
|
|
115
|
-
!n && "Show more"
|
|
116
|
-
]
|
|
113
|
+
children: /* @__PURE__ */ r("span", { children: l ? "Show less" : "Show more" })
|
|
117
114
|
}
|
|
118
115
|
)
|
|
119
116
|
] }),
|
|
@@ -5,7 +5,7 @@ import { ArcadeGrid as g } from "../../../assets/images/arcade-grid.js";
|
|
|
5
5
|
import { Button as A } from "../atoms/button.js";
|
|
6
6
|
import { ArcadeLogo as b } from "../atoms/icons/arcade-logo.js";
|
|
7
7
|
import { AuthTemplate as T, AuthTemplateVideoBackground as v, AuthTemplateLogo as y, AuthTemplateCard as L, AuthTemplateHeader as N, AuthTemplateTitle as x, AuthTemplateDescription as k, AuthTemplateContent as z, AuthTemplateFooter as w, AuthTemplatePrompt as P, AuthTemplatePromptLink as _, AuthTemplateLegal as B, AuthTemplateLegalLink as C } from "../templates/auth-template.js";
|
|
8
|
-
import { cn as
|
|
8
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
9
9
|
import { PUBLIC_VIDEO_URL as D } from "../../../metadata/constants.js";
|
|
10
10
|
const I = `${D}/A_L_Orange_Pink.mp4`;
|
|
11
11
|
function F({ isLoading: t }) {
|
|
@@ -13,32 +13,32 @@ function F({ isLoading: t }) {
|
|
|
13
13
|
}
|
|
14
14
|
function j({
|
|
15
15
|
termsHref: t,
|
|
16
|
-
privacyHref:
|
|
16
|
+
privacyHref: o
|
|
17
17
|
}) {
|
|
18
18
|
const i = [
|
|
19
19
|
t && { href: t, label: "Terms of Service" },
|
|
20
|
-
|
|
20
|
+
o && { href: o, label: "Privacy Policy" }
|
|
21
21
|
].filter((a) => !!a);
|
|
22
22
|
return i.length === 0 ? null : /* @__PURE__ */ r(B, { children: [
|
|
23
23
|
"By continuing, you agree to the",
|
|
24
24
|
" ",
|
|
25
|
-
i.map((a,
|
|
26
|
-
|
|
25
|
+
i.map((a, n) => /* @__PURE__ */ r(f, { children: [
|
|
26
|
+
n > 0 && /* @__PURE__ */ e("span", { children: " and " }),
|
|
27
27
|
/* @__PURE__ */ e(C, { href: a.href, children: a.label })
|
|
28
28
|
] }, a.href))
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
31
|
function q({
|
|
32
32
|
isLoading: t = !1,
|
|
33
|
-
loadingText:
|
|
33
|
+
loadingText: o = "Authenticating...",
|
|
34
34
|
onSubmit: i,
|
|
35
35
|
privacyHref: a,
|
|
36
|
-
registerHref:
|
|
37
|
-
submitText:
|
|
36
|
+
registerHref: n,
|
|
37
|
+
submitText: m = "Sign in with Arcade",
|
|
38
38
|
termsHref: l,
|
|
39
39
|
videoSrc: c = I
|
|
40
40
|
}) {
|
|
41
|
-
const h = t ?
|
|
41
|
+
const h = t ? o : m, u = n || l || a;
|
|
42
42
|
return /* @__PURE__ */ r(T, { children: [
|
|
43
43
|
/* @__PURE__ */ e("div", { className: "absolute -inset-4 z-0 bg-gradient-to-br from-rose-500/70 via-pink-400/50 to-amber-500/70 opacity-60 blur-lg brightness-50" }),
|
|
44
44
|
c && /* @__PURE__ */ e(v, { src: c }),
|
|
@@ -52,7 +52,7 @@ function q({
|
|
|
52
52
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ r(
|
|
53
53
|
A,
|
|
54
54
|
{
|
|
55
|
-
className:
|
|
55
|
+
className: s(
|
|
56
56
|
"group relative h-12 w-full overflow-hidden text-base transition-all duration-300",
|
|
57
57
|
"hover:scale-[1.01] hover:shadow-md hover:brightness-105 active:scale-[0.99]"
|
|
58
58
|
),
|
|
@@ -67,7 +67,7 @@ function q({
|
|
|
67
67
|
/* @__PURE__ */ e(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
|
-
className:
|
|
70
|
+
className: s(
|
|
71
71
|
"absolute inset-0 bg-gradient-to-r from-primary/5 via-primary/0 to-primary/5 transition-opacity duration-300 group-hover:opacity-100",
|
|
72
72
|
t ? "pointer-events-none opacity-0" : "opacity-0"
|
|
73
73
|
)
|
|
@@ -77,10 +77,10 @@ function q({
|
|
|
77
77
|
}
|
|
78
78
|
) }),
|
|
79
79
|
u && /* @__PURE__ */ r(w, { children: [
|
|
80
|
-
|
|
80
|
+
n && /* @__PURE__ */ r(P, { children: [
|
|
81
81
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground text-sm", children: "Don't have an account?" }),
|
|
82
82
|
" ",
|
|
83
|
-
/* @__PURE__ */ e(_, { href:
|
|
83
|
+
/* @__PURE__ */ e(_, { href: n, children: "Register" })
|
|
84
84
|
] }),
|
|
85
85
|
/* @__PURE__ */ e(j, { privacyHref: a, termsHref: l })
|
|
86
86
|
] })
|