@arcadeai/design-system 2.1.1 → 2.3.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.
Files changed (23) hide show
  1. package/dist/components/index.js +1 -1
  2. package/dist/components/ui/index.js +1 -1
  3. package/dist/components/ui/molecules/index.js +1 -1
  4. package/dist/components/ui/molecules/requirement-badges.js +1 -1
  5. package/dist/components/ui/molecules/tool-card.js +24 -24
  6. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  7. package/dist/components/ui/molecules/toolkit-selection-summary.js +1 -1
  8. package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.d.ts +6 -0
  9. package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.js +54 -0
  10. package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.d.ts +1 -0
  11. package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.js +92 -0
  12. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +52 -18
  13. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +1 -1
  14. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
  15. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts +6 -0
  16. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +90 -0
  17. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts +6 -0
  18. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +97 -0
  19. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +105 -302
  20. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +642 -622
  21. package/dist/main.js +1 -1
  22. package/dist/{toolkit-card-DgjPGtsJ.js → toolkit-card-BWuG_NJi.js} +27 -27
  23. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -148,7 +148,7 @@ import { Textarea as Km } from "./components/ui/atoms/textarea.js";
148
148
  import { Toggle as Zm, toggleVariants as Qm } from "./components/ui/atoms/toggle.js";
149
149
  import { Tooltip as jm, TooltipContent as $m, TooltipProvider as oi, TooltipTrigger as ri } from "./components/ui/atoms/tooltip.js";
150
150
  import { EmptyState as ti } from "./components/ui/molecules/empty-state.js";
151
- import { R as ai, T as mi } from "./toolkit-card-DgjPGtsJ.js";
151
+ import { R as ai, T as mi } from "./toolkit-card-BWuG_NJi.js";
152
152
  import { ToolCard as li } from "./components/ui/molecules/tool-card.js";
153
153
  import { ToolkitPickerTrigger as xi } from "./components/ui/molecules/toolkit-picker-trigger.js";
154
154
  import { ToolkitSelectionSummary as di } from "./components/ui/molecules/toolkit-selection-summary.js";
@@ -1,4 +1,4 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import { c as v } from "./index-BDE30rcJ.js";
3
3
  import { Key as R, Fingerprint as j, Wrench as O, Package as $ } from "lucide-react";
4
4
  import * as f from "react";
@@ -20,19 +20,19 @@ import { areStringArraysEqual as x, createPropsComparator as B } from "./compone
20
20
  import "./metadata/toolkits.js";
21
21
  import "./components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js";
22
22
  const _ = ({ secrets: r }) => {
23
- const a = (r.pending?.length ?? 0) > 0, s = /* @__PURE__ */ o("div", { className: "space-y-2", children: [
23
+ const a = (r.pending?.length ?? 0) > 0, s = /* @__PURE__ */ d("div", { className: "space-y-2", children: [
24
24
  /* @__PURE__ */ e("div", { className: "font-medium text-gray-900 dark:text-gray-100", children: "API Keys & Secrets" }),
25
- (r.configured?.length ?? 0) > 0 && /* @__PURE__ */ o("div", { children: [
25
+ (r.configured?.length ?? 0) > 0 && /* @__PURE__ */ d("div", { children: [
26
26
  /* @__PURE__ */ e("div", { className: "mb-1 font-medium text-emerald-700 text-xs dark:text-emerald-300", children: "Configured" }),
27
27
  /* @__PURE__ */ e("ul", { className: "list-disc pl-4 text-gray-700 text-xs dark:text-gray-300", children: r.configured?.map((t) => /* @__PURE__ */ e("li", { children: t }, `cfg-${t}`)) })
28
28
  ] }),
29
- (r.pending?.length ?? 0) > 0 && /* @__PURE__ */ o("div", { children: [
29
+ (r.pending?.length ?? 0) > 0 && /* @__PURE__ */ d("div", { children: [
30
30
  /* @__PURE__ */ e("div", { className: "mb-1 font-medium text-red-700 text-xs dark:text-red-300", children: "Pending" }),
31
31
  /* @__PURE__ */ e("ul", { className: "list-disc pl-4 text-gray-700 text-xs dark:text-gray-300", children: r.pending?.map((t) => /* @__PURE__ */ e("li", { children: t }, `pen-${t}`)) })
32
32
  ] })
33
33
  ] });
34
- return /* @__PURE__ */ o(y, { children: [
35
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ o(
34
+ return /* @__PURE__ */ d(y, { children: [
35
+ /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ d(
36
36
  N,
37
37
  {
38
38
  className: u(
@@ -49,17 +49,17 @@ const _ = ({ secrets: r }) => {
49
49
  /* @__PURE__ */ e(C, { className: "max-w-xs text-sm", sideOffset: 8, children: s })
50
50
  ] });
51
51
  }, F = ({ oauth: r }) => {
52
- const a = r.providers.filter((i) => i.status === "active").length, t = r.providers.length - a > 0, n = /* @__PURE__ */ o("div", { className: "space-y-2", children: [
52
+ const a = r.providers.filter((i) => i.status === "active").length, t = r.providers.length - a > 0, n = /* @__PURE__ */ d("div", { className: "space-y-2", children: [
53
53
  /* @__PURE__ */ e("div", { className: "font-medium text-gray-900 dark:text-gray-100", children: "OAuth Authorization" }),
54
- r.providers.map((i) => /* @__PURE__ */ o("div", { className: "text-gray-700 text-xs dark:text-gray-300", children: [
54
+ r.providers.map((i) => /* @__PURE__ */ d("div", { className: "text-gray-700 text-xs dark:text-gray-300", children: [
55
55
  /* @__PURE__ */ e("span", { className: "font-medium", children: i.id }),
56
56
  " ",
57
57
  i.status === "active" ? /* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-300", children: "(active)" }) : /* @__PURE__ */ e("span", { className: "text-red-700 dark:text-red-300", children: "(inactive)" }),
58
58
  i.scopes.length > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 pl-3 text-gray-600 dark:text-gray-400", children: i.scopes.join(", ") })
59
59
  ] }, i.id))
60
60
  ] });
61
- return /* @__PURE__ */ o(y, { children: [
62
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ o(
61
+ return /* @__PURE__ */ d(y, { children: [
62
+ /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ d(
63
63
  N,
64
64
  {
65
65
  className: u(
@@ -84,7 +84,7 @@ function W({
84
84
  if (!(r?.secrets || r?.oauth || a || s))
85
85
  return null;
86
86
  const { secrets: t, oauth: n } = r;
87
- return /* @__PURE__ */ o("div", { className: "flex w-full flex-wrap items-center gap-1.5", children: [
87
+ return /* @__PURE__ */ d("div", { className: "flex w-full flex-wrap items-center gap-1.5", children: [
88
88
  t && /* @__PURE__ */ e(G, { secrets: t }),
89
89
  n && /* @__PURE__ */ e(H, { oauth: n }),
90
90
  a && /* @__PURE__ */ e(z, { className: "gap-1.5 rounded-md" }),
@@ -119,11 +119,11 @@ const G = f.memo(_, (r, a) => r.secrets === a.secrets ? !0 : !(!(r.secrets && a.
119
119
  ), L = v("", {
120
120
  variants: {
121
121
  selected: {
122
- true: "border-emerald-300 ring-2 ring-emerald-500 ring-offset-2 ring-offset-white dark:border-emerald-900/60 dark:ring-offset-neutral-950",
122
+ true: "border-2 border-emerald-600 dark:border-emerald-400",
123
123
  false: ""
124
124
  },
125
125
  partial: {
126
- true: "border-amber-300 ring-2 ring-amber-500 ring-offset-2 ring-offset-white dark:border-amber-900/60 dark:ring-offset-neutral-950",
126
+ true: "border-2 border-emerald-600 border-dashed dark:border-emerald-400",
127
127
  false: ""
128
128
  }
129
129
  },
@@ -139,7 +139,7 @@ const G = f.memo(_, (r, a) => r.secrets === a.secrets ? !0 : !(!(r.secrets && a.
139
139
  {
140
140
  variants: {
141
141
  indeterminate: {
142
- true: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-200",
142
+ true: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-200",
143
143
  false: "bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-200"
144
144
  }
145
145
  }
@@ -155,21 +155,21 @@ function X({
155
155
  selectedToolsCount: c = 0,
156
156
  requirementsSummary: b,
157
157
  onSelect: h,
158
- onView: d,
158
+ onView: o,
159
159
  hideCheckbox: m = !1,
160
160
  isByoc: A,
161
161
  isPro: I,
162
162
  ...q
163
163
  }) {
164
164
  const g = f.useCallback(() => {
165
- if (m && d) {
166
- d();
165
+ if (m && o) {
166
+ o();
167
167
  return;
168
168
  }
169
169
  h?.(!n);
170
- }, [m, n, h, d]), T = (l) => {
170
+ }, [m, n, h, o]), T = (l) => {
171
171
  const p = l.key === "Enter" || l.code === "Enter", E = l.key === " " || l.key === "Spacebar" || l.code === "Space";
172
- (p || E) && (l.preventDefault(), g()), (l.key === "ArrowRight" || l.code === "ArrowRight") && d && (l.preventDefault(), d());
172
+ (p || E) && (l.preventDefault(), g()), (l.key === "ArrowRight" || l.code === "ArrowRight") && o && (l.preventDefault(), o());
173
173
  }, k = i && !n;
174
174
  return /* @__PURE__ */ e(
175
175
  P,
@@ -200,8 +200,8 @@ function X({
200
200
  onClick: g,
201
201
  onKeyDown: T,
202
202
  tabIndex: 0,
203
- children: /* @__PURE__ */ e(D, { className: "px-3", children: /* @__PURE__ */ o("div", { className: "space-y-3", children: [
204
- /* @__PURE__ */ o(
203
+ children: /* @__PURE__ */ e(D, { className: "px-3", children: /* @__PURE__ */ d("div", { className: "space-y-3", children: [
204
+ /* @__PURE__ */ d(
205
205
  "div",
206
206
  {
207
207
  className: u(
@@ -227,26 +227,26 @@ function X({
227
227
  tabIndex: -1
228
228
  }
229
229
  ) }),
230
- /* @__PURE__ */ e("div", { className: "mr-1.5 min-w-0", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-3", children: [
230
+ /* @__PURE__ */ e("div", { className: "mr-1.5 min-w-0", children: /* @__PURE__ */ d("div", { className: "flex min-w-0 items-center gap-3", children: [
231
231
  /* @__PURE__ */ e("div", { className: "flex size-9 items-center justify-center rounded bg-gradient-to-b from-neutral-200 to-neutral-100 ring-1 ring-black/5 dark:from-neutral-800 dark:to-neutral-900 dark:ring-white/5", children: /* @__PURE__ */ e(t, { className: "size-6 text-neutral-700 dark:text-neutral-200" }) }),
232
- /* @__PURE__ */ o("div", { className: "flex h-9 min-w-0 flex-col justify-center space-y-0.5", children: [
232
+ /* @__PURE__ */ d("div", { className: "flex h-9 min-w-0 flex-col justify-center space-y-0.5", children: [
233
233
  /* @__PURE__ */ e("h3", { className: "truncate font-semibold text-base text-neutral-900 leading-tight dark:text-neutral-100", children: r }),
234
- a && /* @__PURE__ */ o("span", { className: "font-medium text-neutral-500 text-xs leading-tight dark:text-neutral-400", children: [
234
+ a && /* @__PURE__ */ d("span", { className: "font-medium text-neutral-500 text-xs leading-tight dark:text-neutral-400", children: [
235
235
  "v",
236
236
  a
237
237
  ] })
238
238
  ] })
239
239
  ] }) }),
240
- /* @__PURE__ */ e("div", { className: "mt-0.5 self-center justify-self-end", children: d ? /* @__PURE__ */ e(
240
+ /* @__PURE__ */ e("div", { className: "mt-0.5 self-center justify-self-end", children: o ? /* @__PURE__ */ e(
241
241
  S,
242
242
  {
243
243
  indeterminate: k,
244
244
  name: r,
245
- onClick: () => d(),
245
+ onClick: () => o(),
246
246
  selectedCount: c,
247
247
  toolsCount: s
248
248
  }
249
- ) : /* @__PURE__ */ o(
249
+ ) : /* @__PURE__ */ d(
250
250
  "div",
251
251
  {
252
252
  className: Q({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadeai/design-system",
3
3
  "private": false,
4
- "version": "2.1.1",
4
+ "version": "2.3.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",