@arcadeai/design-system 2.3.0 → 3.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.
- package/dist/{arcade-DzMbb7xi.js → arcade-CHE48l2C.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/ui/atoms/accordion.js +16 -16
- package/dist/components/ui/atoms/alert-dialog.js +25 -25
- package/dist/components/ui/atoms/avatar.js +7 -7
- package/dist/components/ui/atoms/checkbox.js +34 -34
- package/dist/components/ui/atoms/dropdown-menu.js +31 -31
- package/dist/components/ui/atoms/hover-card.js +19 -19
- package/dist/components/ui/atoms/popover.js +9 -9
- package/dist/components/ui/atoms/progress.js +11 -11
- package/dist/components/ui/atoms/radio-group.js +29 -29
- package/dist/components/ui/atoms/resizable.js +1 -1
- package/dist/components/ui/atoms/scroll-area.js +40 -40
- package/dist/components/ui/atoms/select.js +17 -17
- package/dist/components/ui/atoms/sidebar.js +4 -1
- package/dist/components/ui/atoms/slider.js +35 -35
- package/dist/components/ui/atoms/switch.js +15 -15
- package/dist/components/ui/atoms/tabs.js +13 -13
- package/dist/components/ui/atoms/tooltip.js +22 -22
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +6 -5
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-picker-trigger.js +20 -23
- package/dist/components/ui/molecules/toolkit-selection-summary.js +16 -19
- package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.js +6 -6
- package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.js +9 -12
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +12 -11
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +4 -7
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +21 -21
- 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/mocks/toolkit-collection.js +19 -23
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +1773 -1729
- package/dist/components/ui/utils/memo.test.js +1 -1
- package/dist/lib/arcade/arcade.js +1 -1
- package/dist/lib/arcade/arcade.test.js +2 -2
- package/dist/lib/utils.test.js +1 -1
- package/dist/main.js +195 -188
- package/dist/metadata/index.d.ts +1 -0
- package/dist/metadata/index.js +23 -16
- package/dist/metadata/toolkit-icons.d.ts +27 -0
- package/dist/metadata/toolkit-icons.js +227 -0
- package/dist/metadata/toolkits.js +341 -643
- package/dist/metadata/types.d.ts +1 -3
- package/dist/metadata/utils.d.ts +15 -0
- package/dist/metadata/utils.js +15 -8
- package/dist/{react-resizable-panels.browser-DggUboAp.js → react-resizable-panels.browser-31wAXhAV.js} +2 -1
- package/dist/{react.esm-DUaR5u-J.js → react.esm-I5_wjDW6.js} +17509 -15389
- package/dist/{toolkit-card-BWuG_NJi.js → toolkit-card-nuE_5OvN.js} +4 -3
- package/dist/{vi.bdSIJ99Y-Bs-viS39.js → vi.bdSIJ99Y-DBnM2VfT.js} +1296 -1315
- package/package.json +34 -34
- package/dist/components/ui/atoms/icons/utils.d.ts +0 -43
- package/dist/components/ui/atoms/icons/utils.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
3
|
import { c as T } from "../../../index-B695uy69.js";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as S } from "../../../index-DFZozV_h.js";
|
|
5
5
|
import { c as h, R as k, I as E } from "../../../index-DMCYNwtg.js";
|
|
6
6
|
import { P as F } from "../../../index-BGfrl8IX.js";
|
|
7
7
|
import { P as m } from "../../../index-CpDnqHCm.js";
|
|
@@ -9,7 +9,7 @@ import { u as $ } from "../../../index-ByaXH_ih.js";
|
|
|
9
9
|
import { u as D } from "../../../index-437EL2iq.js";
|
|
10
10
|
import { u as V } from "../../../index-Cv867SGx.js";
|
|
11
11
|
import { c as p } from "../../../utils-Db4QWi-E.js";
|
|
12
|
-
var g = "Tabs", [G
|
|
12
|
+
var g = "Tabs", [G] = S(g, [
|
|
13
13
|
h
|
|
14
14
|
]), C = h(), [L, x] = G(g), I = f.forwardRef(
|
|
15
15
|
(e, t) => {
|
|
@@ -79,7 +79,7 @@ var y = "TabsList", _ = f.forwardRef(
|
|
|
79
79
|
_.displayName = y;
|
|
80
80
|
var N = "TabsTrigger", R = f.forwardRef(
|
|
81
81
|
(e, t) => {
|
|
82
|
-
const { __scopeTabs: c, value: a, disabled: i = !1, ...d } = e, o = x(N, c), u = C(c), b = P(o.baseId, a), v =
|
|
82
|
+
const { __scopeTabs: c, value: a, disabled: i = !1, ...d } = e, o = x(N, c), u = C(c), b = P(o.baseId, a), v = M(o.baseId, a), s = a === o.value;
|
|
83
83
|
return /* @__PURE__ */ n(
|
|
84
84
|
E,
|
|
85
85
|
{
|
|
@@ -119,7 +119,7 @@ var N = "TabsTrigger", R = f.forwardRef(
|
|
|
119
119
|
R.displayName = N;
|
|
120
120
|
var w = "TabsContent", A = f.forwardRef(
|
|
121
121
|
(e, t) => {
|
|
122
|
-
const { __scopeTabs: c, value: a, forceMount: i, children: d, ...o } = e, u = x(w, c), b = P(u.baseId, a), v =
|
|
122
|
+
const { __scopeTabs: c, value: a, forceMount: i, children: d, ...o } = e, u = x(w, c), b = P(u.baseId, a), v = M(u.baseId, a), s = a === u.value, r = f.useRef(s);
|
|
123
123
|
return f.useEffect(() => {
|
|
124
124
|
const l = requestAnimationFrame(() => r.current = !1);
|
|
125
125
|
return () => cancelAnimationFrame(l);
|
|
@@ -148,11 +148,11 @@ A.displayName = w;
|
|
|
148
148
|
function P(e, t) {
|
|
149
149
|
return `${e}-trigger-${t}`;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function M(e, t) {
|
|
152
152
|
return `${e}-content-${t}`;
|
|
153
153
|
}
|
|
154
154
|
var j = I, z = _, K = R, B = A;
|
|
155
|
-
function
|
|
155
|
+
function ee({
|
|
156
156
|
className: e,
|
|
157
157
|
...t
|
|
158
158
|
}) {
|
|
@@ -165,7 +165,7 @@ function te({
|
|
|
165
165
|
}
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function te({
|
|
169
169
|
className: e,
|
|
170
170
|
...t
|
|
171
171
|
}) {
|
|
@@ -181,7 +181,7 @@ function ae({
|
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function ae({
|
|
185
185
|
className: e,
|
|
186
186
|
...t
|
|
187
187
|
}) {
|
|
@@ -197,7 +197,7 @@ function oe({
|
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function oe({
|
|
201
201
|
className: e,
|
|
202
202
|
...t
|
|
203
203
|
}) {
|
|
@@ -211,8 +211,8 @@ function re({
|
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
213
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
ee as Tabs,
|
|
215
|
+
oe as TabsContent,
|
|
216
|
+
te as TabsList,
|
|
217
|
+
ae as TabsTrigger
|
|
218
218
|
};
|
|
@@ -11,7 +11,7 @@ import { P as ne } from "../../../index-CpDnqHCm.js";
|
|
|
11
11
|
import { u as se } from "../../../index-437EL2iq.js";
|
|
12
12
|
import { R as ae } from "../../../index-DfNPZZ8M.js";
|
|
13
13
|
import { c as ie } from "../../../utils-Db4QWi-E.js";
|
|
14
|
-
var [O
|
|
14
|
+
var [O] = W("Tooltip", [
|
|
15
15
|
G
|
|
16
16
|
]), D = G(), F = "TooltipProvider", le = 700, A = "tooltip.open", [ce, k] = O(F), z = (e) => {
|
|
17
17
|
const {
|
|
@@ -58,22 +58,22 @@ var R = "Tooltip", [ue, _] = O(R), $ = (e) => {
|
|
|
58
58
|
onOpenChange: l,
|
|
59
59
|
disableHoverableContent: i,
|
|
60
60
|
delayDuration: v
|
|
61
|
-
} = e, a = k(R, e.__scopeTooltip), d = D(o), [c, f] = s.useState(null), m = Z(), p = s.useRef(0), h = i ?? a.disableHoverableContent,
|
|
61
|
+
} = e, a = k(R, e.__scopeTooltip), d = D(o), [c, f] = s.useState(null), m = Z(), p = s.useRef(0), h = i ?? a.disableHoverableContent, T = v ?? a.delayDuration, g = s.useRef(!1), [y, x] = se({
|
|
62
62
|
prop: r,
|
|
63
63
|
defaultProp: n ?? !1,
|
|
64
64
|
onChange: (N) => {
|
|
65
65
|
N ? (a.onOpen(), document.dispatchEvent(new CustomEvent(A))) : a.onClose(), l?.(N);
|
|
66
66
|
},
|
|
67
67
|
caller: R
|
|
68
|
-
}), w = s.useMemo(() => y ?
|
|
69
|
-
window.clearTimeout(p.current), p.current = 0,
|
|
68
|
+
}), w = s.useMemo(() => y ? g.current ? "delayed-open" : "instant-open" : "closed", [y]), P = s.useCallback(() => {
|
|
69
|
+
window.clearTimeout(p.current), p.current = 0, g.current = !1, x(!0);
|
|
70
70
|
}, [x]), E = s.useCallback(() => {
|
|
71
71
|
window.clearTimeout(p.current), p.current = 0, x(!1);
|
|
72
72
|
}, [x]), I = s.useCallback(() => {
|
|
73
73
|
window.clearTimeout(p.current), p.current = window.setTimeout(() => {
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
}, [
|
|
74
|
+
g.current = !0, x(!0), p.current = 0;
|
|
75
|
+
}, T);
|
|
76
|
+
}, [T, x]);
|
|
77
77
|
return s.useEffect(() => () => {
|
|
78
78
|
p.current && (window.clearTimeout(p.current), p.current = 0);
|
|
79
79
|
}, []), /* @__PURE__ */ u(ee, { ...d, children: /* @__PURE__ */ u(
|
|
@@ -144,23 +144,23 @@ var b = "TooltipContent", V = s.forwardRef(
|
|
|
144
144
|
const t = _(b, e.__scopeTooltip), r = k(b, e.__scopeTooltip), n = s.useRef(null), l = S(o, n), [i, v] = s.useState(null), { trigger: a, onClose: d } = t, c = n.current, { onPointerInTransitChange: f } = r, m = s.useCallback(() => {
|
|
145
145
|
v(null), f(!1);
|
|
146
146
|
}, [f]), p = s.useCallback(
|
|
147
|
-
(h,
|
|
148
|
-
const
|
|
147
|
+
(h, T) => {
|
|
148
|
+
const g = h.currentTarget, y = { x: h.clientX, y: h.clientY }, x = ge(y, g.getBoundingClientRect()), w = Te(y, x), P = xe(T.getBoundingClientRect()), E = Ce([...w, ...P]);
|
|
149
149
|
v(E), f(!0);
|
|
150
150
|
},
|
|
151
151
|
[f]
|
|
152
152
|
);
|
|
153
153
|
return s.useEffect(() => () => m(), [m]), s.useEffect(() => {
|
|
154
154
|
if (a && c) {
|
|
155
|
-
const h = (
|
|
156
|
-
return a.addEventListener("pointerleave", h), c.addEventListener("pointerleave",
|
|
157
|
-
a.removeEventListener("pointerleave", h), c.removeEventListener("pointerleave",
|
|
155
|
+
const h = (g) => p(g, c), T = (g) => p(g, a);
|
|
156
|
+
return a.addEventListener("pointerleave", h), c.addEventListener("pointerleave", T), () => {
|
|
157
|
+
a.removeEventListener("pointerleave", h), c.removeEventListener("pointerleave", T);
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
}, [a, c, p, m]), s.useEffect(() => {
|
|
161
161
|
if (i) {
|
|
162
|
-
const h = (
|
|
163
|
-
const
|
|
162
|
+
const h = (T) => {
|
|
163
|
+
const g = T.target, y = { x: T.clientX, y: T.clientY }, x = a?.contains(g) || c?.contains(g), w = !ye(y, i);
|
|
164
164
|
x ? m() : w && (m(), d());
|
|
165
165
|
};
|
|
166
166
|
return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
|
|
@@ -228,7 +228,7 @@ var q = "TooltipArrow", X = s.forwardRef(
|
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
X.displayName = q;
|
|
231
|
-
function
|
|
231
|
+
function ge(e, o) {
|
|
232
232
|
const t = Math.abs(o.top - e.y), r = Math.abs(o.bottom - e.y), n = Math.abs(o.right - e.x), l = Math.abs(o.left - e.x);
|
|
233
233
|
switch (Math.min(t, r, n, l)) {
|
|
234
234
|
case l:
|
|
@@ -243,7 +243,7 @@ function Te(e, o) {
|
|
|
243
243
|
throw new Error("unreachable");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Te(e, o, t = 5) {
|
|
247
247
|
const r = [];
|
|
248
248
|
switch (o) {
|
|
249
249
|
case "top":
|
|
@@ -334,17 +334,17 @@ function De({
|
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function $e({
|
|
338
338
|
...e
|
|
339
339
|
}) {
|
|
340
340
|
return /* @__PURE__ */ u(De, { children: /* @__PURE__ */ u(Pe, { "data-slot": "tooltip", ...e }) });
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Be({
|
|
343
343
|
...e
|
|
344
344
|
}) {
|
|
345
345
|
return /* @__PURE__ */ u(Ee, { "data-slot": "tooltip-trigger", ...e });
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ue({
|
|
348
348
|
className: e,
|
|
349
349
|
sideOffset: o = 0,
|
|
350
350
|
children: t,
|
|
@@ -368,8 +368,8 @@ function Ve({
|
|
|
368
368
|
) });
|
|
369
369
|
}
|
|
370
370
|
export {
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
$e as Tooltip,
|
|
372
|
+
Ue as TooltipContent,
|
|
373
373
|
De as TooltipProvider,
|
|
374
|
-
|
|
374
|
+
Be as TooltipTrigger
|
|
375
375
|
};
|
|
@@ -148,7 +148,7 @@ import { Textarea as Qm } from "./atoms/textarea.js";
|
|
|
148
148
|
import { Toggle as Ym, toggleVariants as jm } from "./atoms/toggle.js";
|
|
149
149
|
import { Tooltip as _m, TooltipContent as $m, TooltipProvider as oi, TooltipTrigger as ri } from "./atoms/tooltip.js";
|
|
150
150
|
import { EmptyState as ti } from "./molecules/empty-state.js";
|
|
151
|
-
import { R as ai, T as mi } from "../../toolkit-card-
|
|
151
|
+
import { R as ai, T as mi } from "../../toolkit-card-nuE_5OvN.js";
|
|
152
152
|
import { ToolCard as li } from "./molecules/tool-card.js";
|
|
153
153
|
import { ToolkitPickerTrigger as xi } from "./molecules/toolkit-picker-trigger.js";
|
|
154
154
|
import { ToolkitSelectionSummary as di } from "./molecules/toolkit-selection-summary.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyState as e } from "./empty-state.js";
|
|
2
|
-
import { R as m, T as a } from "../../../toolkit-card-
|
|
2
|
+
import { R as m, T as a } from "../../../toolkit-card-nuE_5OvN.js";
|
|
3
3
|
import { ToolCard as p } from "./tool-card.js";
|
|
4
4
|
import { ToolkitPickerTrigger as f } from "./toolkit-picker-trigger.js";
|
|
5
5
|
import { ToolkitSelectionSummary as x } from "./toolkit-selection-summary.js";
|
|
@@ -7,17 +7,18 @@ import "../atoms/byoc-badge.js";
|
|
|
7
7
|
import "../atoms/chart.js";
|
|
8
8
|
import "../atoms/mobile-tooltip.js";
|
|
9
9
|
import "../atoms/pro-badge.js";
|
|
10
|
-
import "../../../react-resizable-panels.browser-
|
|
10
|
+
import "../../../react-resizable-panels.browser-31wAXhAV.js";
|
|
11
11
|
import "../atoms/sidebar.js";
|
|
12
12
|
import "../atoms/table.js";
|
|
13
13
|
import "../atoms/tooltip.js";
|
|
14
|
-
import { O as
|
|
14
|
+
import { O as q, R as x, S as A } from "../../../toolkit-card-nuE_5OvN.js";
|
|
15
15
|
import "./tool-card.js";
|
|
16
|
+
import "../../../metadata/oauth-providers.js";
|
|
16
17
|
import "../../../metadata/toolkits.js";
|
|
17
18
|
import "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
|
|
18
19
|
import "../utils/memo.js";
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
q as OAuthBadge,
|
|
22
|
+
x as RequirementBadges,
|
|
23
|
+
A as SecretsBadge
|
|
23
24
|
};
|
|
@@ -6,7 +6,7 @@ import "../atoms/card.js";
|
|
|
6
6
|
import "../atoms/checkbox.js";
|
|
7
7
|
import "../atoms/view-tools-control.js";
|
|
8
8
|
import "../../../utils-Db4QWi-E.js";
|
|
9
|
-
import { T as k } from "../../../toolkit-card-
|
|
9
|
+
import { T as k } from "../../../toolkit-card-nuE_5OvN.js";
|
|
10
10
|
import "../utils/memo.js";
|
|
11
11
|
export {
|
|
12
12
|
k as ToolkitCard
|
|
@@ -2,12 +2,12 @@ import { jsx as e, jsxs as t, Fragment as h } from "react/jsx-runtime";
|
|
|
2
2
|
import { Loader2 as v, Package as w } from "lucide-react";
|
|
3
3
|
import { Badge as y } from "../atoms/badge.js";
|
|
4
4
|
import { Button as z } from "../atoms/button.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useToolkitPicker as
|
|
5
|
+
import { Tooltip as j, TooltipTrigger as C, TooltipContent as $ } from "../atoms/tooltip.js";
|
|
6
|
+
import { c as g } from "../../../utils-Db4QWi-E.js";
|
|
7
|
+
import { getToolkitIcon as L } from "../../../metadata/toolkit-icons.js";
|
|
8
|
+
import { useToolkitPicker as B } from "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
|
|
9
9
|
function D({
|
|
10
|
-
maxVisibleIcons:
|
|
10
|
+
maxVisibleIcons: k = 2,
|
|
11
11
|
className: b,
|
|
12
12
|
countType: s = "toolkits",
|
|
13
13
|
loading: o = !1,
|
|
@@ -15,13 +15,10 @@ function D({
|
|
|
15
15
|
}) {
|
|
16
16
|
const {
|
|
17
17
|
state: { committedToolkits: f, committedTools: N }
|
|
18
|
-
} =
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
toolkitName: a
|
|
23
|
-
});
|
|
24
|
-
}), k = Math.max(l - c.length, 0), T = s === "tools";
|
|
18
|
+
} = B(), i = Array.from(f.keys()), l = i.length, x = N.size, c = i.slice(0, k).map((r) => {
|
|
19
|
+
const a = f.get(r);
|
|
20
|
+
return L(a?.metadata?.id);
|
|
21
|
+
}), p = Math.max(l - c.length, 0), T = s === "tools";
|
|
25
22
|
let d = "Toolkits", m = l;
|
|
26
23
|
T && (d = "Tools", m = x);
|
|
27
24
|
let u = `Select ${s === "tools" ? "Tools" : "Toolkits"}`;
|
|
@@ -30,7 +27,7 @@ function D({
|
|
|
30
27
|
{
|
|
31
28
|
...n,
|
|
32
29
|
"aria-label": u,
|
|
33
|
-
className:
|
|
30
|
+
className: g("gap-2 bg-transparent transition-colors", b),
|
|
34
31
|
disabled: o,
|
|
35
32
|
size: n.size ?? "sm",
|
|
36
33
|
variant: n.variant ?? "outline",
|
|
@@ -41,30 +38,30 @@ function D({
|
|
|
41
38
|
/* @__PURE__ */ e("div", { className: "h-5 w-6 animate-pulse rounded-full bg-neutral-200 dark:bg-neutral-700" })
|
|
42
39
|
] })
|
|
43
40
|
] }) : /* @__PURE__ */ t(h, { children: [
|
|
44
|
-
l > 0 && /* @__PURE__ */ t(
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
c.map((
|
|
41
|
+
l > 0 && /* @__PURE__ */ t(j, { children: [
|
|
42
|
+
/* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "mr-2 flex items-center", children: [
|
|
43
|
+
c.map((r, a) => /* @__PURE__ */ e(
|
|
47
44
|
"div",
|
|
48
45
|
{
|
|
49
|
-
className:
|
|
50
|
-
style: { zIndex:
|
|
51
|
-
children: /* @__PURE__ */ e("div", { className: "flex size-6 items-center justify-center rounded-xl bg-gradient-to-br from-white to-neutral-50 p-1.5 shadow-lg ring-1 ring-neutral-200/80 transition-all hover:scale-110 hover:shadow-xl dark:from-neutral-800 dark:to-neutral-900 dark:ring-neutral-700/80", children: /* @__PURE__ */ e(
|
|
46
|
+
className: g("relative first:ml-0", a > 0 && "-ml-2"),
|
|
47
|
+
style: { zIndex: a + 1 },
|
|
48
|
+
children: /* @__PURE__ */ e("div", { className: "flex size-6 items-center justify-center rounded-xl bg-gradient-to-br from-white to-neutral-50 p-1.5 shadow-lg ring-1 ring-neutral-200/80 transition-all hover:scale-110 hover:shadow-xl dark:from-neutral-800 dark:to-neutral-900 dark:ring-neutral-700/80", children: /* @__PURE__ */ e(r, { className: "h-3 w-3 text-neutral-700 dark:text-neutral-300" }) })
|
|
52
49
|
},
|
|
53
|
-
`${
|
|
50
|
+
`${r.name || "icon"}-${a}`
|
|
54
51
|
)),
|
|
55
|
-
|
|
52
|
+
p > 0 && /* @__PURE__ */ t(
|
|
56
53
|
"span",
|
|
57
54
|
{
|
|
58
55
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-xl bg-gradient-to-br from-blue-50 to-blue-100 font-bold text-[11px] text-blue-800 shadow-lg ring-1 ring-blue-200/80 dark:from-blue-900/40 dark:to-blue-800/40 dark:text-blue-200 dark:ring-blue-700/80",
|
|
59
56
|
style: { zIndex: c.length + 10 },
|
|
60
57
|
children: [
|
|
61
58
|
"+",
|
|
62
|
-
|
|
59
|
+
p
|
|
63
60
|
]
|
|
64
61
|
}
|
|
65
62
|
)
|
|
66
63
|
] }) }),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
64
|
+
/* @__PURE__ */ e($, { side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e("div", { className: "text-xs", children: /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4", children: [
|
|
68
65
|
/* @__PURE__ */ t("li", { children: [
|
|
69
66
|
/* @__PURE__ */ e("span", { className: "font-semibold text-neutral-800 dark:text-neutral-200", children: "Toolkits" }),
|
|
70
67
|
/* @__PURE__ */ t("span", { className: "text-neutral-700 dark:text-neutral-300", children: [
|
|
@@ -3,24 +3,24 @@ import { Package as u, X as y, CheckSquare as C } from "lucide-react";
|
|
|
3
3
|
import { Button as x } from "../atoms/button.js";
|
|
4
4
|
import { MobileTooltip as p, MobileTooltipTrigger as g, MobileTooltipContent as f } from "../atoms/mobile-tooltip.js";
|
|
5
5
|
import "../atoms/chart.js";
|
|
6
|
-
import "../../../react-resizable-panels.browser-
|
|
6
|
+
import "../../../react-resizable-panels.browser-31wAXhAV.js";
|
|
7
7
|
import "../atoms/sidebar.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "../atoms/table.js";
|
|
10
|
-
import "../../../toolkit-card-
|
|
10
|
+
import "../../../toolkit-card-nuE_5OvN.js";
|
|
11
11
|
import "./tool-card.js";
|
|
12
|
-
import { getToolkitIcon as z } from "
|
|
12
|
+
import { getToolkitIcon as z } from "../../../metadata/toolkit-icons.js";
|
|
13
13
|
import "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
|
|
14
|
-
const
|
|
14
|
+
const j = 3;
|
|
15
15
|
function D({
|
|
16
16
|
selectedToolkits: s,
|
|
17
|
-
selectedTools:
|
|
17
|
+
selectedTools: n,
|
|
18
18
|
onClear: N,
|
|
19
|
-
onSelectAll:
|
|
19
|
+
onSelectAll: m,
|
|
20
20
|
allVisibleSelected: k,
|
|
21
21
|
selectionMode: w
|
|
22
22
|
}) {
|
|
23
|
-
const l = s.size > 0 ||
|
|
23
|
+
const l = s.size > 0 || n.size > 0, i = Array.from(s.keys()), o = n.size, a = i.length, r = i.slice(0, j), c = Math.max(a - r.length, 0);
|
|
24
24
|
return /* @__PURE__ */ t(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
@@ -36,17 +36,14 @@ function D({
|
|
|
36
36
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
37
37
|
/* @__PURE__ */ e(u, { className: "h-3.5 w-3.5 text-neutral-600 sm:h-4 sm:w-4 dark:text-neutral-300" }),
|
|
38
38
|
/* @__PURE__ */ t("span", { className: "font-medium text-neutral-900 dark:text-neutral-100", children: [
|
|
39
|
-
|
|
39
|
+
o,
|
|
40
40
|
" tool",
|
|
41
|
-
|
|
41
|
+
o !== 1 ? "s" : "",
|
|
42
42
|
" selected"
|
|
43
43
|
] }),
|
|
44
44
|
/* @__PURE__ */ t("div", { className: "ml-1 flex items-center sm:ml-1.5", children: [
|
|
45
|
-
r.map((
|
|
46
|
-
const v = s.get(
|
|
47
|
-
metadataIcon: v?.metadata?.icon,
|
|
48
|
-
toolkitName: n
|
|
49
|
-
});
|
|
45
|
+
r.map((d, h) => {
|
|
46
|
+
const v = s.get(d), b = z(v?.metadata?.id);
|
|
50
47
|
return /* @__PURE__ */ e(
|
|
51
48
|
"div",
|
|
52
49
|
{
|
|
@@ -54,17 +51,17 @@ function D({
|
|
|
54
51
|
style: { zIndex: h + 1 },
|
|
55
52
|
children: /* @__PURE__ */ e("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-neutral-200 p-0.5 ring-1 ring-black/15 sm:h-6 sm:w-6 dark:bg-neutral-700 dark:ring-white/15", children: /* @__PURE__ */ e(b, { className: "h-3 w-3 sm:h-3.5 sm:w-3.5" }) })
|
|
56
53
|
},
|
|
57
|
-
`mini-icon-${
|
|
54
|
+
`mini-icon-${d}`
|
|
58
55
|
);
|
|
59
56
|
}),
|
|
60
|
-
|
|
57
|
+
c > 0 && /* @__PURE__ */ t(
|
|
61
58
|
"span",
|
|
62
59
|
{
|
|
63
60
|
className: "-ml-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-neutral-200 font-medium text-[10px] text-neutral-700 ring-1 ring-black/15 sm:h-6 sm:w-6 dark:bg-neutral-700 dark:text-neutral-200 dark:ring-white/15",
|
|
64
61
|
style: { zIndex: r.length + 10 },
|
|
65
62
|
children: [
|
|
66
63
|
"+",
|
|
67
|
-
|
|
64
|
+
c
|
|
68
65
|
]
|
|
69
66
|
}
|
|
70
67
|
)
|
|
@@ -94,14 +91,14 @@ function D({
|
|
|
94
91
|
]
|
|
95
92
|
}
|
|
96
93
|
),
|
|
97
|
-
w !== "single" &&
|
|
94
|
+
w !== "single" && m && !k && /* @__PURE__ */ t(p, { children: [
|
|
98
95
|
/* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ e(
|
|
99
96
|
x,
|
|
100
97
|
{
|
|
101
98
|
"aria-label": "Select all visible",
|
|
102
99
|
className: "h-8 w-8",
|
|
103
100
|
"data-testid": "footer-select-all",
|
|
104
|
-
onClick:
|
|
101
|
+
onClick: m,
|
|
105
102
|
size: "sm",
|
|
106
103
|
variant: "ghost",
|
|
107
104
|
children: /* @__PURE__ */ e(C, { className: "h-4 w-4" })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { X as v, CheckSquare as x } from "lucide-react";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as r } from "../../../atoms/button.js";
|
|
4
4
|
import { useToolkitPicker as b } from "../hooks/use-toolkit-picker.js";
|
|
5
5
|
function y({ selectionMode: o }) {
|
|
6
6
|
const {
|
|
@@ -18,7 +18,7 @@ function y({ selectionMode: o }) {
|
|
|
18
18
|
) : Array.from(d).map((e) => e.fully_qualified_name), f = t.length > 0 && t.every((e) => a.has(e));
|
|
19
19
|
return /* @__PURE__ */ l("div", { className: "hidden items-center gap-2 sm:flex", children: [
|
|
20
20
|
h && /* @__PURE__ */ l(
|
|
21
|
-
|
|
21
|
+
r,
|
|
22
22
|
{
|
|
23
23
|
className: "h-8 border-neutral-300 text-neutral-700 hover:bg-neutral-50 hover:text-neutral-900 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-900/40 dark:hover:text-neutral-100",
|
|
24
24
|
"data-testid": "clear-selections",
|
|
@@ -26,13 +26,13 @@ function y({ selectionMode: o }) {
|
|
|
26
26
|
size: "sm",
|
|
27
27
|
variant: "outline",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ s(v, { className: "h-4 w-4 text-red-600 dark:text-red-400" }),
|
|
30
30
|
"Clear All"
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
34
|
o === "multi" && !f && /* @__PURE__ */ l(
|
|
35
|
-
|
|
35
|
+
r,
|
|
36
36
|
{
|
|
37
37
|
className: "h-8",
|
|
38
38
|
"data-testid": "select-all",
|
|
@@ -42,7 +42,7 @@ function y({ selectionMode: o }) {
|
|
|
42
42
|
size: "sm",
|
|
43
43
|
variant: "outline",
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ s(x, { className: "h-4 w-4" }),
|
|
46
46
|
"Select all"
|
|
47
47
|
]
|
|
48
48
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { FilterIcon as
|
|
2
|
+
import { FilterIcon as m, X as l, Search as x } from "lucide-react";
|
|
3
3
|
import { Badge as i } from "../../../atoms/badge.js";
|
|
4
|
-
import { getToolkitIcon as b } from "
|
|
4
|
+
import { getToolkitIcon as b } from "../../../../../metadata/toolkit-icons.js";
|
|
5
5
|
import { useToolkitPicker as h } from "../hooks/use-toolkit-picker.js";
|
|
6
6
|
function y() {
|
|
7
7
|
const {
|
|
8
8
|
state: { toolkitFilter: t, searchQuery: a, filteredToolkits: d },
|
|
9
|
-
setActiveTab:
|
|
10
|
-
clearFilter:
|
|
9
|
+
setActiveTab: s,
|
|
10
|
+
clearFilter: n,
|
|
11
11
|
clearSearchQuery: o
|
|
12
12
|
} = h();
|
|
13
13
|
return t || a ? /* @__PURE__ */ r("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
|
|
@@ -18,7 +18,7 @@ function y() {
|
|
|
18
18
|
variant: "secondary",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ r("span", { className: "mr-1.5 inline-flex items-center gap-1 rounded-full bg-purple-100 px-1.5 py-0.5 text-[10px] text-purple-700 dark:bg-purple-800/60 dark:text-purple-200", children: [
|
|
21
|
-
/* @__PURE__ */ e(
|
|
21
|
+
/* @__PURE__ */ e(m, { className: "h-3 w-3" }),
|
|
22
22
|
"Filter"
|
|
23
23
|
] }),
|
|
24
24
|
/* @__PURE__ */ r(
|
|
@@ -26,16 +26,13 @@ function y() {
|
|
|
26
26
|
{
|
|
27
27
|
className: "inline-flex h-full items-center gap-1.5",
|
|
28
28
|
"data-testid": "filter-badge",
|
|
29
|
-
onClick: () =>
|
|
29
|
+
onClick: () => s("toolkits"),
|
|
30
30
|
type: "button",
|
|
31
31
|
children: [
|
|
32
32
|
(() => {
|
|
33
33
|
const c = Array.from(d).find(
|
|
34
|
-
(
|
|
35
|
-
), p = b(
|
|
36
|
-
metadataIcon: c?.metadata?.icon,
|
|
37
|
-
toolkitName: t
|
|
38
|
-
});
|
|
34
|
+
(u) => u.name === t
|
|
35
|
+
), p = b(c?.metadata?.id);
|
|
39
36
|
return /* @__PURE__ */ e(p, { className: "h-3.5 w-3.5" });
|
|
40
37
|
})(),
|
|
41
38
|
/* @__PURE__ */ e("span", { className: "font-medium text-xs", children: t })
|
|
@@ -48,7 +45,7 @@ function y() {
|
|
|
48
45
|
"aria-label": "Clear toolkit filter",
|
|
49
46
|
className: "ml-1 inline-flex h-5 w-5 items-center justify-center rounded-full bg-purple-100 text-red-600 hover:bg-red-100 hover:text-red-700 focus-visible:ring-[3px] focus-visible:ring-red-200 dark:bg-purple-800/60 dark:text-red-400 dark:hover:bg-red-950/40 dark:hover:text-red-300",
|
|
50
47
|
"data-testid": "clear-filter",
|
|
51
|
-
onClick:
|
|
48
|
+
onClick: n,
|
|
52
49
|
type: "button",
|
|
53
50
|
children: /* @__PURE__ */ e(l, { className: "h-3.5 w-3.5" })
|
|
54
51
|
}
|
|
@@ -4,14 +4,15 @@ import { useRef as T } from "react";
|
|
|
4
4
|
import "../../../atoms/mobile-tooltip.js";
|
|
5
5
|
import "../../../atoms/chart.js";
|
|
6
6
|
import { Input as k } from "../../../atoms/input.js";
|
|
7
|
-
import "../../../../../react-resizable-panels.browser-
|
|
7
|
+
import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
|
|
8
8
|
import "../../../atoms/sidebar.js";
|
|
9
9
|
import "../../../atoms/table.js";
|
|
10
|
-
import "../../../../../toolkit-card-
|
|
10
|
+
import "../../../../../toolkit-card-nuE_5OvN.js";
|
|
11
11
|
import "../../../molecules/tool-card.js";
|
|
12
|
+
import "../../../../../metadata/oauth-providers.js";
|
|
12
13
|
import "../../../../../metadata/toolkits.js";
|
|
13
14
|
import { useToolkitPicker as g } from "../hooks/use-toolkit-picker.js";
|
|
14
|
-
function
|
|
15
|
+
function C() {
|
|
15
16
|
const r = T(null), {
|
|
16
17
|
state: {
|
|
17
18
|
searchQuery: o,
|
|
@@ -22,21 +23,21 @@ function z() {
|
|
|
22
23
|
},
|
|
23
24
|
setSearchQuery: n,
|
|
24
25
|
toggleToolkit: c,
|
|
25
|
-
toggleTool:
|
|
26
|
-
setActiveTab:
|
|
27
|
-
setToolkitFilter:
|
|
28
|
-
} = g(),
|
|
26
|
+
toggleTool: m,
|
|
27
|
+
setActiveTab: u,
|
|
28
|
+
setToolkitFilter: p
|
|
29
|
+
} = g(), f = () => {
|
|
29
30
|
const t = Array.from(s)[0];
|
|
30
31
|
if (t) {
|
|
31
32
|
if (a === "single") {
|
|
32
|
-
|
|
33
|
+
p(t.name), u("tools");
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
36
|
c(t);
|
|
36
37
|
}
|
|
37
38
|
}, h = () => {
|
|
38
39
|
const t = Array.from(l)[0];
|
|
39
|
-
t &&
|
|
40
|
+
t && m(t);
|
|
40
41
|
};
|
|
41
42
|
return /* @__PURE__ */ d("div", { className: "relative flex-1", children: [
|
|
42
43
|
/* @__PURE__ */ e(y, { className: "-translate-y-1/2 absolute top-1/2 left-3.5 size-4 text-gray-400" }),
|
|
@@ -51,7 +52,7 @@ function z() {
|
|
|
51
52
|
onKeyDown: (t) => {
|
|
52
53
|
if (!(t.key !== "Enter" || !(o.trim().length > 0))) {
|
|
53
54
|
if (t.preventDefault(), t.stopPropagation(), i === "toolkits") {
|
|
54
|
-
|
|
55
|
+
f();
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
58
|
h();
|
|
@@ -65,5 +66,5 @@ function z() {
|
|
|
65
66
|
] });
|
|
66
67
|
}
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
C as SearchInput
|
|
69
70
|
};
|
|
@@ -3,15 +3,16 @@ import "lucide-react";
|
|
|
3
3
|
import { Button as n } from "../../../atoms/button.js";
|
|
4
4
|
import "../../../atoms/mobile-tooltip.js";
|
|
5
5
|
import "../../../atoms/chart.js";
|
|
6
|
-
import "../../../../../react-resizable-panels.browser-
|
|
6
|
+
import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
|
|
7
7
|
import "../../../atoms/sidebar.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "../../../atoms/table.js";
|
|
10
|
-
import "../../../../../toolkit-card-
|
|
10
|
+
import "../../../../../toolkit-card-nuE_5OvN.js";
|
|
11
11
|
import "../../../molecules/tool-card.js";
|
|
12
|
+
import "../../../../../metadata/oauth-providers.js";
|
|
12
13
|
import "../../../../../metadata/toolkits.js";
|
|
13
14
|
import "../hooks/use-toolkit-picker.js";
|
|
14
|
-
function
|
|
15
|
+
function $({
|
|
15
16
|
selectionMode: t,
|
|
16
17
|
selectedCount: o,
|
|
17
18
|
onCommit: r,
|
|
@@ -30,5 +31,5 @@ function L({
|
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
$ as SelectButton
|
|
34
35
|
};
|