@arcadeai/design-system 1.1.0 → 1.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 (116) hide show
  1. package/README.md +1 -1
  2. package/dist/arcade-49z5mR1G.js +1541 -0
  3. package/dist/assets/icons/arcade.d.ts +3 -0
  4. package/dist/assets/icons/arcade.js +33 -0
  5. package/dist/assets/icons/google-docs.js +110 -120
  6. package/dist/assets/icons/index.d.ts +1 -0
  7. package/dist/assets/icons/index.js +124 -122
  8. package/dist/assets/icons/utils.d.ts +26 -0
  9. package/dist/assets/icons/utils.js +155 -138
  10. package/dist/components/index.js +188 -172
  11. package/dist/components/ui/atoms/accordion.js +1 -1
  12. package/dist/components/ui/atoms/alert.js +2 -2
  13. package/dist/components/ui/atoms/avatar.js +1 -1
  14. package/dist/components/ui/atoms/badge.js +2 -2
  15. package/dist/components/ui/atoms/breadcrumb.js +13 -15
  16. package/dist/components/ui/atoms/button.js +2 -2
  17. package/dist/components/ui/atoms/byoc-badge.js +2 -2
  18. package/dist/components/ui/atoms/card.js +1 -1
  19. package/dist/components/ui/atoms/chart.js +1 -1
  20. package/dist/components/ui/atoms/checkbox.d.ts +4 -0
  21. package/dist/components/ui/atoms/checkbox.js +268 -0
  22. package/dist/components/ui/atoms/command.js +2 -2
  23. package/dist/components/ui/atoms/dialog.js +8 -8
  24. package/dist/components/ui/atoms/dropdown-menu.js +2 -2
  25. package/dist/components/ui/atoms/form.d.ts +1 -1
  26. package/dist/components/ui/atoms/form.js +8 -7
  27. package/dist/components/ui/atoms/hover-card.js +2 -2
  28. package/dist/components/ui/atoms/index.d.ts +1 -0
  29. package/dist/components/ui/atoms/index.js +168 -165
  30. package/dist/components/ui/atoms/input.js +1 -1
  31. package/dist/components/ui/atoms/label.js +1 -1
  32. package/dist/components/ui/atoms/popover.js +2 -2
  33. package/dist/components/ui/atoms/pro-badge.js +2 -2
  34. package/dist/components/ui/atoms/progress.js +1 -1
  35. package/dist/components/ui/atoms/radio-group.js +1 -1
  36. package/dist/components/ui/atoms/resizable.js +24 -1527
  37. package/dist/components/ui/atoms/scroll-area.js +1 -1
  38. package/dist/components/ui/atoms/select.js +2 -2
  39. package/dist/components/ui/atoms/separator.js +1 -1
  40. package/dist/components/ui/atoms/sheet.js +2 -2
  41. package/dist/components/ui/atoms/sidebar.js +3 -3
  42. package/dist/components/ui/atoms/skeleton.js +1 -1
  43. package/dist/components/ui/atoms/slider.js +1 -1
  44. package/dist/components/ui/atoms/switch.js +1 -1
  45. package/dist/components/ui/atoms/table.js +1 -1
  46. package/dist/components/ui/atoms/tabs.js +1 -1
  47. package/dist/components/ui/atoms/textarea.js +1 -1
  48. package/dist/components/ui/atoms/toggle.js +2 -2
  49. package/dist/components/ui/atoms/tooltip.js +60 -60
  50. package/dist/components/ui/atoms/view-tools-control.d.ts +12 -0
  51. package/dist/components/ui/atoms/view-tools-control.js +53 -0
  52. package/dist/components/ui/index.d.ts +2 -0
  53. package/dist/components/ui/index.js +188 -172
  54. package/dist/components/ui/molecules/empty-state.d.ts +5 -0
  55. package/dist/components/ui/molecules/empty-state.js +25 -0
  56. package/dist/components/ui/molecules/index.d.ts +6 -0
  57. package/dist/components/ui/molecules/index.js +13 -0
  58. package/dist/components/ui/molecules/requirement-badges.d.ts +29 -0
  59. package/dist/components/ui/molecules/requirement-badges.js +24 -0
  60. package/dist/components/ui/molecules/tool-card.d.ts +17 -0
  61. package/dist/components/ui/molecules/tool-card.js +127 -0
  62. package/dist/components/ui/molecules/toolkit-card.d.ts +24 -0
  63. package/dist/components/ui/molecules/toolkit-card.js +13 -0
  64. package/dist/components/ui/molecules/toolkit-picker-trigger.d.ts +8 -0
  65. package/dist/components/ui/molecules/toolkit-picker-trigger.js +96 -0
  66. package/dist/components/ui/molecules/toolkit-selection-summary.d.ts +10 -0
  67. package/dist/components/ui/molecules/toolkit-selection-summary.js +117 -0
  68. package/dist/components/ui/organisms/index.d.ts +1 -0
  69. package/dist/components/ui/organisms/index.js +4 -0
  70. package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.d.ts +1 -0
  71. package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.js +36 -0
  72. package/dist/components/ui/organisms/toolkit-picker/components/mobile-filter-badges.d.ts +1 -0
  73. package/dist/components/ui/organisms/toolkit-picker/components/mobile-filter-badges.js +96 -0
  74. package/dist/components/ui/organisms/toolkit-picker/components/search-input.d.ts +1 -0
  75. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +36 -0
  76. package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts +9 -0
  77. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +35 -0
  78. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.d.ts +9 -0
  79. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +36 -0
  80. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.d.ts +1 -0
  81. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +44 -0
  82. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.d.ts +1 -0
  83. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +46 -0
  84. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.d.ts +1 -0
  85. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +28 -0
  86. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +40 -0
  87. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +267 -0
  88. package/dist/components/ui/organisms/toolkit-picker/index.d.ts +14 -0
  89. package/dist/components/ui/organisms/toolkit-picker/index.js +16 -0
  90. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +7 -0
  91. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +432 -0
  92. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts +2 -0
  93. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +395 -0
  94. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.d.ts +0 -0
  95. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +12832 -0
  96. package/dist/components/ui/utils/memo.d.ts +2 -0
  97. package/dist/components/ui/utils/memo.js +25 -0
  98. package/dist/{index-CQhYMnjT.js → index-BDE30rcJ.js} +1 -1
  99. package/dist/{index-PlrlSrPo.js → index-DEJd-dpa.js} +1 -1
  100. package/dist/{index-BSWzylXR.js → index-Ez2mlmzx.js} +2 -2
  101. package/dist/lib/arcade/arcade.d.ts +100 -0
  102. package/dist/lib/arcade/arcade.js +5 -0
  103. package/dist/lib/arcade/arcade.test.d.ts +1 -0
  104. package/dist/lib/arcade/arcade.test.js +299 -0
  105. package/dist/lib/arcade/mocks.d.ts +2 -0
  106. package/dist/lib/arcade/mocks.js +547 -0
  107. package/dist/lib/utils.d.ts +1 -0
  108. package/dist/lib/utils.js +3 -2
  109. package/dist/magic-string.es-BQ9KnLz-.js +659 -0
  110. package/dist/main.js +188 -172
  111. package/dist/react-resizable-panels.browser-ZHjTH32c.js +1509 -0
  112. package/dist/react.esm-369wBsAv.js +35565 -0
  113. package/dist/toolkit-card-GhM_oj4G.js +304 -0
  114. package/dist/{utils-CRiPKpXj.js → utils-Db4QWi-E.js} +204 -189
  115. package/dist/vi.bdSIJ99Y-CZgZQPWH.js +11996 -0
  116. package/package.json +39 -30
@@ -0,0 +1,127 @@
1
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
+ import { Wrench as N } from "lucide-react";
3
+ import * as t from "react";
4
+ import { Button as E } from "../atoms/button.js";
5
+ import { Card as P, CardContent as D } from "../atoms/card.js";
6
+ import { Checkbox as I } from "../atoms/checkbox.js";
7
+ import { Collapsible as j, CollapsibleTrigger as K, CollapsibleContent as S } from "../atoms/collapsible.js";
8
+ import { c as m } from "../../../utils-Db4QWi-E.js";
9
+ import { createPropsComparator as T } from "../utils/memo.js";
10
+ const _ = /\s+/;
11
+ function z({
12
+ fully_qualified_name: u,
13
+ name: k,
14
+ toolkitName: p,
15
+ description: n,
16
+ Icon: b = (s) => /* @__PURE__ */ r(N, { ...s }),
17
+ isSelected: o = !1,
18
+ onSelect: l,
19
+ hideCheckbox: h = !1,
20
+ ...C
21
+ }) {
22
+ const s = t.useCallback(
23
+ () => l?.(!o),
24
+ [o, l]
25
+ ), [i, x] = t.useState(!1), w = t.useMemo(() => n ? n.length > 220 ? !0 : n.trim().split(_).length > 40 : !1, [n]), y = (e) => {
26
+ const c = e.key === "Enter" || e.code === "Enter", d = e.key === " " || e.key === "Spacebar" || e.code === "Space";
27
+ (c || d) && (e.preventDefault(), s());
28
+ }, v = t.useCallback(
29
+ (e) => l?.(!!e),
30
+ [l]
31
+ ), f = t.useCallback((e) => {
32
+ e.stopPropagation();
33
+ }, []), g = t.useCallback((e) => {
34
+ const c = e.key === "Enter" || e.code === "Enter", d = e.key === " " || e.key === "Spacebar" || e.code === "Space";
35
+ (c || d) && e.stopPropagation();
36
+ }, []);
37
+ return /* @__PURE__ */ r(
38
+ P,
39
+ {
40
+ ...C,
41
+ "aria-label": `Select tool ${u}`,
42
+ className: m(
43
+ "group relative cursor-pointer overflow-hidden rounded-lg border py-3 transition-all duration-200",
44
+ "bg-white/50 hover:bg-white/70 dark:bg-neutral-900/50 dark:hover:bg-neutral-900/70",
45
+ "hover:-translate-y-0.5 hover:shadow-lg",
46
+ o && "border-emerald-300 ring-2 ring-emerald-500 ring-offset-2 ring-offset-white dark:border-emerald-900/60 dark:ring-offset-neutral-950",
47
+ !o && "border-neutral-200 hover:border-neutral-300 dark:border-neutral-800 dark:hover:border-neutral-700"
48
+ ),
49
+ onClick: s,
50
+ onKeyDown: y,
51
+ tabIndex: 0,
52
+ children: /* @__PURE__ */ r(D, { className: "px-3", children: /* @__PURE__ */ a(
53
+ "div",
54
+ {
55
+ className: m(
56
+ "grid items-start gap-2",
57
+ "grid-cols-[20px_1fr_auto]",
58
+ h && "grid-cols-[1fr_auto]"
59
+ ),
60
+ children: [
61
+ !h && /* @__PURE__ */ r("div", { className: "flex items-center justify-center pt-1.5", children: /* @__PURE__ */ r(
62
+ I,
63
+ {
64
+ checked: o,
65
+ onCheckedChange: v,
66
+ onClick: f,
67
+ onKeyDown: g,
68
+ tabIndex: -1
69
+ }
70
+ ) }),
71
+ /* @__PURE__ */ a("div", { className: "min-w-0 space-y-2", children: [
72
+ /* @__PURE__ */ a("div", { className: "flex min-w-0 items-start gap-3", children: [
73
+ /* @__PURE__ */ r("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__ */ r(b, { className: "size-6 text-neutral-700 dark:text-neutral-200" }) }),
74
+ /* @__PURE__ */ a("div", { className: "flex h-9 min-w-0 flex-col justify-center space-y-0.5", children: [
75
+ /* @__PURE__ */ r("h3", { className: "truncate font-semibold text-base text-neutral-900 leading-tight dark:text-neutral-100", children: k ?? u }),
76
+ p && /* @__PURE__ */ r("span", { className: "font-medium text-neutral-500 text-xs leading-tight dark:text-neutral-400", children: p })
77
+ ] })
78
+ ] }),
79
+ n && /* @__PURE__ */ a(j, { onOpenChange: x, open: i, children: [
80
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
81
+ /* @__PURE__ */ r(
82
+ "p",
83
+ {
84
+ className: m(
85
+ "text-neutral-600 text-sm dark:text-neutral-400",
86
+ !i && "line-clamp-3"
87
+ ),
88
+ children: n
89
+ }
90
+ ),
91
+ w && /* @__PURE__ */ r(K, { asChild: !0, children: /* @__PURE__ */ a(
92
+ E,
93
+ {
94
+ className: "h-auto px-0",
95
+ onClick: f,
96
+ onKeyDown: g,
97
+ size: "sm",
98
+ variant: "link",
99
+ children: [
100
+ i && "Show less",
101
+ !i && "Show more"
102
+ ]
103
+ }
104
+ ) })
105
+ ] }),
106
+ /* @__PURE__ */ r(S, {})
107
+ ] })
108
+ ] }),
109
+ /* @__PURE__ */ r("div", { className: "w-8" })
110
+ ]
111
+ }
112
+ ) })
113
+ }
114
+ );
115
+ }
116
+ const R = T([
117
+ "fully_qualified_name",
118
+ "name",
119
+ "toolkitName",
120
+ "description",
121
+ "isSelected",
122
+ "Icon",
123
+ "hideCheckbox"
124
+ ]), F = t.memo(z, R);
125
+ export {
126
+ F as ToolCard
127
+ };
@@ -0,0 +1,24 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import { ProcessedToolkit } from '../../../lib/arcade/arcade';
3
+ import * as React from 'react';
4
+ export type ToolkitCardProps = {
5
+ name: string;
6
+ version?: string;
7
+ description?: string;
8
+ toolsCount: number;
9
+ isSelected?: boolean;
10
+ isPartiallySelected?: boolean;
11
+ selectedToolsCount?: number;
12
+ Icon?: (props: {
13
+ className?: string;
14
+ }) => JSX.Element;
15
+ requirementsSummary: ProcessedToolkit['requirementsSummary'];
16
+ isByoc?: boolean;
17
+ isPro?: boolean;
18
+ onSelect?: (checked: boolean) => void;
19
+ onView?: () => void;
20
+ hideCheckbox?: boolean;
21
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>;
22
+ declare function ToolkitCardImpl({ name, version, toolsCount, Icon, isSelected, isPartiallySelected, selectedToolsCount, requirementsSummary, onSelect, onView, hideCheckbox, isByoc, isPro, ...rest }: ToolkitCardProps): JSX.Element;
23
+ export declare const ToolkitCard: React.MemoExoticComponent<typeof ToolkitCardImpl>;
24
+ export {};
@@ -0,0 +1,13 @@
1
+ import "react/jsx-runtime";
2
+ import "../../../index-BDE30rcJ.js";
3
+ import "lucide-react";
4
+ import "react";
5
+ import "../atoms/card.js";
6
+ import "../atoms/checkbox.js";
7
+ import "../atoms/view-tools-control.js";
8
+ import "../../../utils-Db4QWi-E.js";
9
+ import { T as k } from "../../../toolkit-card-GhM_oj4G.js";
10
+ import "../utils/memo.js";
11
+ export {
12
+ k as ToolkitCard
13
+ };
@@ -0,0 +1,8 @@
1
+ import { Button } from '../atoms/button';
2
+ import type * as React from 'react';
3
+ export type ToolkitPickerTriggerProps = React.ComponentProps<typeof Button> & {
4
+ maxVisibleIcons?: number;
5
+ countType?: 'toolkits' | 'tools';
6
+ loading?: boolean;
7
+ };
8
+ export declare function ToolkitPickerTrigger({ maxVisibleIcons, className, countType, loading, ...buttonProps }: ToolkitPickerTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,96 @@
1
+ import { jsx as e, jsxs as t, Fragment as h } from "react/jsx-runtime";
2
+ import { Loader2 as w, Package as v } from "lucide-react";
3
+ import { getToolkitIconByName as y } from "../../../assets/icons/utils.js";
4
+ import { Badge as j } from "../atoms/badge.js";
5
+ import { Button as z } from "../atoms/button.js";
6
+ import { Tooltip as C, TooltipTrigger as $, TooltipContent as L } from "../atoms/tooltip.js";
7
+ import { c as k } from "../../../utils-Db4QWi-E.js";
8
+ import { useToolkitPicker as B } from "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
9
+ function D({
10
+ maxVisibleIcons: g = 2,
11
+ className: x,
12
+ countType: s = "toolkits",
13
+ loading: r = !1,
14
+ ...i
15
+ }) {
16
+ const {
17
+ state: { committedToolkits: N, committedTools: T }
18
+ } = B(), n = Array.from(N.keys()), l = n.length, f = T.size, o = n.slice(0, g).map((a) => y(a)), p = Math.max(l - o.length, 0), b = s === "tools";
19
+ let c = "Toolkits", m = l;
20
+ b && (c = "Tools", m = f);
21
+ let d = `Select ${s === "tools" ? "Tools" : "Toolkits"}`;
22
+ return r ? d = "Loading toolkits..." : l > 0 && (d = `${m} ${c.toLowerCase()} selected`), /* @__PURE__ */ e(
23
+ z,
24
+ {
25
+ ...i,
26
+ "aria-label": d,
27
+ className: k("gap-2 bg-transparent transition-colors", x),
28
+ disabled: r,
29
+ size: i.size ?? "sm",
30
+ variant: i.variant ?? "outline",
31
+ children: r ? /* @__PURE__ */ t(h, { children: [
32
+ /* @__PURE__ */ e(w, { className: "h-4 w-4 animate-spin" }),
33
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
34
+ /* @__PURE__ */ e("div", { className: "h-4 w-16 animate-pulse rounded bg-neutral-200 dark:bg-neutral-700" }),
35
+ /* @__PURE__ */ e("div", { className: "h-5 w-6 animate-pulse rounded-full bg-neutral-200 dark:bg-neutral-700" })
36
+ ] })
37
+ ] }) : /* @__PURE__ */ t(h, { children: [
38
+ l > 0 && /* @__PURE__ */ t(C, { children: [
39
+ /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "mr-1.5 flex items-center", children: [
40
+ o.map((a, u) => /* @__PURE__ */ e(
41
+ "div",
42
+ {
43
+ className: k("relative first:ml-0", u > 0 && "-ml-2"),
44
+ style: { zIndex: u + 1 },
45
+ children: /* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-neutral-200 p-0.5 ring-1 ring-black/15 dark:bg-neutral-800 dark:ring-white/15", children: /* @__PURE__ */ e(a, { className: "h-3.5 w-3.5" }) })
46
+ },
47
+ `${a.name || "icon"}-${u}`
48
+ )),
49
+ p > 0 && /* @__PURE__ */ t(
50
+ "span",
51
+ {
52
+ className: "-ml-2 inline-flex h-6 w-6 items-center justify-center rounded-full bg-neutral-200 font-medium text-[10px] text-neutral-700 ring-1 ring-black/15 dark:bg-neutral-800 dark:text-neutral-200 dark:ring-white/15",
53
+ style: { zIndex: o.length + 10 },
54
+ children: [
55
+ "+",
56
+ p
57
+ ]
58
+ }
59
+ )
60
+ ] }) }),
61
+ /* @__PURE__ */ e(L, { side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e("div", { className: "text-xs", children: /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4", children: [
62
+ /* @__PURE__ */ t("li", { children: [
63
+ /* @__PURE__ */ e("span", { className: "font-semibold text-neutral-800 dark:text-neutral-200", children: "Toolkits" }),
64
+ /* @__PURE__ */ t("span", { className: "text-neutral-700 dark:text-neutral-300", children: [
65
+ ": ",
66
+ n.join(", ")
67
+ ] })
68
+ ] }),
69
+ /* @__PURE__ */ t("li", { children: [
70
+ /* @__PURE__ */ e("span", { className: "font-semibold text-neutral-800 dark:text-neutral-200", children: "Tools" }),
71
+ /* @__PURE__ */ t("span", { className: "text-neutral-700 dark:text-neutral-300", children: [
72
+ ": ",
73
+ f,
74
+ " selected"
75
+ ] })
76
+ ] })
77
+ ] }) }) })
78
+ ] }),
79
+ l === 0 && /* @__PURE__ */ t(h, { children: [
80
+ /* @__PURE__ */ e(v, { className: "h-4 w-4" }),
81
+ /* @__PURE__ */ t("span", { className: "truncate text-sm", children: [
82
+ "Select ",
83
+ s === "tools" ? "Tools" : "Toolkits"
84
+ ] })
85
+ ] }),
86
+ l > 0 && /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-2 truncate text-sm", children: [
87
+ c,
88
+ /* @__PURE__ */ e(j, { className: "px-1.5 py-0 text-[11px]", variant: "default", children: m })
89
+ ] })
90
+ ] })
91
+ }
92
+ );
93
+ }
94
+ export {
95
+ D as ToolkitPickerTrigger
96
+ };
@@ -0,0 +1,10 @@
1
+ import { SelectionMode } from '../organisms/toolkit-picker';
2
+ export interface ToolkitSelectionSummaryProps {
3
+ selectedToolkits: Set<string>;
4
+ selectedTools: Set<string>;
5
+ onClear: () => void;
6
+ onSelectAll?: () => void;
7
+ allVisibleSelected?: boolean;
8
+ selectionMode?: SelectionMode;
9
+ }
10
+ export declare function ToolkitSelectionSummary({ selectedToolkits, selectedTools, onClear, onSelectAll, allVisibleSelected, selectionMode, }: ToolkitSelectionSummaryProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,117 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Package as u, X as b, CheckSquare as y } from "lucide-react";
3
+ import { getToolkitIconByName as C } from "../../../assets/icons/utils.js";
4
+ import { Button as x } from "../atoms/button.js";
5
+ import { MobileTooltip as p, MobileTooltipTrigger as g, MobileTooltipContent as f } from "../atoms/mobile-tooltip.js";
6
+ import "../atoms/chart.js";
7
+ import "../atoms/form.js";
8
+ import "../../../react-resizable-panels.browser-ZHjTH32c.js";
9
+ import "../atoms/sidebar.js";
10
+ import "react";
11
+ import "../atoms/table.js";
12
+ import "../../../toolkit-card-GhM_oj4G.js";
13
+ import "./tool-card.js";
14
+ import "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
15
+ const z = 3;
16
+ function D({
17
+ selectedToolkits: r,
18
+ selectedTools: n,
19
+ onClear: N,
20
+ onSelectAll: m,
21
+ allVisibleSelected: k,
22
+ selectionMode: w
23
+ }) {
24
+ const s = r.size > 0 || n.size > 0, l = Array.from(r), o = n.size, i = l.length, a = l.slice(0, z), c = Math.max(i - a.length, 0);
25
+ return /* @__PURE__ */ t(
26
+ "div",
27
+ {
28
+ className: "flex items-center gap-3",
29
+ "data-testid": "toolkit-selection-summary",
30
+ children: [
31
+ !s && /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-neutral-500 text-sm dark:text-neutral-400", children: [
32
+ /* @__PURE__ */ e(u, { className: "h-4 w-4" }),
33
+ /* @__PURE__ */ e("span", { children: "No items selected" })
34
+ ] }),
35
+ s && /* @__PURE__ */ e("div", { className: "flex w-full items-center gap-2 sm:w-auto", children: /* @__PURE__ */ t(p, { children: [
36
+ /* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "grid min-h-8 w-full grid-cols-1 items-center gap-x-3 gap-y-1 rounded-lg bg-neutral-100 px-2 py-1.5 text-xs sm:min-h-10 sm:w-auto sm:grid-cols-[auto_auto] sm:px-3 sm:py-2 sm:text-sm dark:bg-neutral-800", children: [
37
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
38
+ /* @__PURE__ */ e(u, { className: "h-3.5 w-3.5 text-neutral-600 sm:h-4 sm:w-4 dark:text-neutral-300" }),
39
+ /* @__PURE__ */ t("span", { className: "font-medium text-neutral-900 dark:text-neutral-100", children: [
40
+ o,
41
+ " tool",
42
+ o !== 1 ? "s" : "",
43
+ " selected"
44
+ ] }),
45
+ /* @__PURE__ */ t("div", { className: "ml-1 flex items-center sm:ml-1.5", children: [
46
+ a.map((d, h) => {
47
+ const v = C(d);
48
+ return /* @__PURE__ */ e(
49
+ "div",
50
+ {
51
+ className: `relative ${h > 0 ? "-ml-2" : ""}`,
52
+ style: { zIndex: h + 1 },
53
+ 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(v, { className: "h-3 w-3 sm:h-3.5 sm:w-3.5" }) })
54
+ },
55
+ `mini-icon-${d}`
56
+ );
57
+ }),
58
+ c > 0 && /* @__PURE__ */ t(
59
+ "span",
60
+ {
61
+ 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",
62
+ style: { zIndex: a.length + 10 },
63
+ children: [
64
+ "+",
65
+ c
66
+ ]
67
+ }
68
+ )
69
+ ] })
70
+ ] }),
71
+ /* @__PURE__ */ t("div", { className: "text-neutral-600 text-xs dark:text-neutral-400", children: [
72
+ "from ",
73
+ i,
74
+ " toolkit",
75
+ i !== 1 ? "s" : ""
76
+ ] })
77
+ ] }) }),
78
+ /* @__PURE__ */ e(f, { side: "top", sideOffset: 6, children: /* @__PURE__ */ e("div", { className: "max-w-64 text-wrap text-xs", children: l.join(", ") }) })
79
+ ] }) }),
80
+ /* @__PURE__ */ t("div", { className: "ml-auto flex items-center gap-2 sm:hidden", children: [
81
+ s && /* @__PURE__ */ t(
82
+ x,
83
+ {
84
+ className: "h-8 text-red-600 hover:text-red-700",
85
+ "data-testid": "footer-clear-selections",
86
+ onClick: N,
87
+ size: "sm",
88
+ variant: "ghost",
89
+ children: [
90
+ /* @__PURE__ */ e(b, { className: "mr-0.5 h-4 w-4" }),
91
+ "Clear All"
92
+ ]
93
+ }
94
+ ),
95
+ w !== "single" && m && !k && /* @__PURE__ */ t(p, { children: [
96
+ /* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ e(
97
+ x,
98
+ {
99
+ "aria-label": "Select all visible",
100
+ className: "h-8 w-8",
101
+ "data-testid": "footer-select-all",
102
+ onClick: m,
103
+ size: "sm",
104
+ variant: "ghost",
105
+ children: /* @__PURE__ */ e(y, { className: "h-4 w-4" })
106
+ }
107
+ ) }),
108
+ /* @__PURE__ */ e(f, { side: "top", sideOffset: 6, children: /* @__PURE__ */ e("div", { className: "text-xs", children: "Select all visible" }) })
109
+ ] })
110
+ ] })
111
+ ]
112
+ }
113
+ );
114
+ }
115
+ export {
116
+ D as ToolkitSelectionSummary
117
+ };
@@ -0,0 +1 @@
1
+ export { ToolkitPicker } from './toolkit-picker/index';
@@ -0,0 +1,4 @@
1
+ import { ToolkitPicker as e } from "./toolkit-picker/index.js";
2
+ export {
3
+ e as ToolkitPicker
4
+ };
@@ -0,0 +1 @@
1
+ export declare function FooterSummary(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,36 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { ToolkitSelectionSummary as k } from "../../../molecules/toolkit-selection-summary.js";
3
+ import { useToolkitPicker as S } from "../hooks/use-toolkit-picker.js";
4
+ function A() {
5
+ const {
6
+ state: {
7
+ selectionMode: l,
8
+ selectedToolkits: o,
9
+ selectedTools: t,
10
+ filteredToolkits: s,
11
+ filteredTools: i,
12
+ activeTab: a
13
+ },
14
+ clearSelections: c,
15
+ selectAll: n
16
+ } = S(), m = s.size === o.size && i.size === t.size, f = () => {
17
+ const u = a === "toolkits" ? Array.from(s).flatMap(
18
+ (e) => e.tools.map((d) => d.fully_qualified_name)
19
+ ) : Array.from(i).map((e) => e.fully_qualified_name);
20
+ n(u);
21
+ };
22
+ return l !== "multi" ? null : /* @__PURE__ */ r("div", { className: "w-full sm:w-auto", children: /* @__PURE__ */ r(
23
+ k,
24
+ {
25
+ allVisibleSelected: m,
26
+ onClear: c,
27
+ onSelectAll: f,
28
+ selectedToolkits: new Set(o.keys()),
29
+ selectedTools: new Set(t.keys()),
30
+ selectionMode: l
31
+ }
32
+ ) });
33
+ }
34
+ export {
35
+ A as FooterSummary
36
+ };
@@ -0,0 +1 @@
1
+ export declare function MobileFilterBadges(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,96 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { Filter as p, X as a, Search as c } from "lucide-react";
3
+ import { getToolkitIconByName as m } from "../../../../../assets/icons/utils.js";
4
+ import { Badge as i } from "../../../atoms/badge.js";
5
+ import "../../../atoms/mobile-tooltip.js";
6
+ import "../../../atoms/chart.js";
7
+ import "../../../atoms/form.js";
8
+ import "../../../../../react-resizable-panels.browser-ZHjTH32c.js";
9
+ import "../../../atoms/sidebar.js";
10
+ import "react";
11
+ import "../../../atoms/table.js";
12
+ import "../../../../../toolkit-card-GhM_oj4G.js";
13
+ import "../../../molecules/tool-card.js";
14
+ import { useToolkitPicker as u } from "../hooks/use-toolkit-picker.js";
15
+ function T() {
16
+ const {
17
+ state: { toolkitFilter: t, searchQuery: l },
18
+ clearFilter: o,
19
+ clearSearchQuery: s,
20
+ setActiveTab: d
21
+ } = u();
22
+ return !(t || l) ? null : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-2 px-4 pb-0.5 sm:hidden", children: [
23
+ t && /* @__PURE__ */ r(
24
+ i,
25
+ {
26
+ className: "h-7 border border-purple-200 bg-purple-50 pr-1.5 pl-2 text-purple-800 shadow-sm ring-1 ring-purple-200/50 dark:border-purple-800/60 dark:bg-purple-950/40 dark:text-purple-200 dark:ring-purple-800/30",
27
+ variant: "secondary",
28
+ children: [
29
+ /* @__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: [
30
+ /* @__PURE__ */ e(p, { className: "h-2.5 w-2.5" }),
31
+ "Filter"
32
+ ] }),
33
+ /* @__PURE__ */ r(
34
+ "button",
35
+ {
36
+ className: "inline-flex h-full items-center gap-1.5",
37
+ "data-testid": "mobile-filter-badge",
38
+ onClick: () => d("toolkits"),
39
+ type: "button",
40
+ children: [
41
+ (() => {
42
+ const n = m(t);
43
+ return /* @__PURE__ */ e(n, { className: "h-3 w-3" });
44
+ })(),
45
+ /* @__PURE__ */ e("span", { className: "font-medium text-sm", children: t })
46
+ ]
47
+ }
48
+ ),
49
+ /* @__PURE__ */ e(
50
+ "button",
51
+ {
52
+ "aria-label": "Clear toolkit filter",
53
+ className: "ml-1 inline-flex h-4 w-4 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",
54
+ "data-testid": "mobile-clear-filter",
55
+ onClick: o,
56
+ type: "button",
57
+ children: /* @__PURE__ */ e(a, { className: "h-3 w-3" })
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ ),
63
+ l && /* @__PURE__ */ r(
64
+ i,
65
+ {
66
+ className: "h-7 border border-teal-200 bg-teal-50 pr-1.5 pl-2 text-teal-800 shadow-sm ring-1 ring-teal-200/50 dark:border-teal-800/60 dark:bg-teal-950/40 dark:text-teal-200 dark:ring-teal-800/30",
67
+ variant: "secondary",
68
+ children: [
69
+ /* @__PURE__ */ r("span", { className: "mr-1.5 inline-flex items-center gap-1 rounded-full bg-teal-100 px-1.5 py-0.5 text-[10px] text-teal-700 dark:bg-teal-800/60 dark:text-teal-200", children: [
70
+ /* @__PURE__ */ e(c, { className: "h-2.5 w-2.5" }),
71
+ "Search"
72
+ ] }),
73
+ /* @__PURE__ */ r("span", { className: "font-medium text-sm", children: [
74
+ '"',
75
+ l,
76
+ '"'
77
+ ] }),
78
+ /* @__PURE__ */ e(
79
+ "button",
80
+ {
81
+ "aria-label": "Clear search query",
82
+ className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-teal-100 text-red-600 hover:bg-red-100 hover:text-red-700 focus-visible:ring-[3px] focus-visible:ring-red-200 dark:bg-teal-800/60 dark:text-red-400 dark:hover:bg-red-950/40 dark:hover:text-red-300",
83
+ "data-testid": "mobile-clear-search",
84
+ onClick: s,
85
+ type: "button",
86
+ children: /* @__PURE__ */ e(a, { className: "h-3 w-3" })
87
+ }
88
+ )
89
+ ]
90
+ }
91
+ )
92
+ ] });
93
+ }
94
+ export {
95
+ T as MobileFilterBadges
96
+ };
@@ -0,0 +1 @@
1
+ export declare function SearchInput(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { Search as i } from "lucide-react";
3
+ import "../../../atoms/mobile-tooltip.js";
4
+ import "../../../atoms/chart.js";
5
+ import "../../../atoms/form.js";
6
+ import { Input as m } from "../../../atoms/input.js";
7
+ import "../../../../../react-resizable-panels.browser-ZHjTH32c.js";
8
+ import "../../../atoms/sidebar.js";
9
+ import "react";
10
+ import "../../../atoms/table.js";
11
+ import "../../../../../toolkit-card-GhM_oj4G.js";
12
+ import "../../../molecules/tool-card.js";
13
+ import "../../../../../assets/icons/utils.js";
14
+ import { useToolkitPicker as p } from "../hooks/use-toolkit-picker.js";
15
+ function N() {
16
+ const {
17
+ state: { searchQuery: r },
18
+ setSearchQuery: e
19
+ } = p();
20
+ return /* @__PURE__ */ a("div", { className: "relative flex-1", children: [
21
+ /* @__PURE__ */ t(i, { className: "-translate-y-1/2 absolute top-1/2 left-3.5 size-4 text-gray-400" }),
22
+ /* @__PURE__ */ t(
23
+ m,
24
+ {
25
+ className: "h-9 pl-10",
26
+ "data-testid": "search-input",
27
+ onChange: (o) => e(o.target.value),
28
+ placeholder: "Search toolkits and tools",
29
+ value: r
30
+ }
31
+ )
32
+ ] });
33
+ }
34
+ export {
35
+ N as SearchInput
36
+ };
@@ -0,0 +1,9 @@
1
+ import { SelectionMode } from '../index';
2
+ type SelectButtonProps = {
3
+ selectionMode: SelectionMode;
4
+ selectedCount: number;
5
+ onCommit: () => void;
6
+ className?: string;
7
+ };
8
+ export declare function SelectButton({ selectionMode, selectedCount, onCommit, className, }: SelectButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,35 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import "lucide-react";
3
+ import { Button as n } from "../../../atoms/button.js";
4
+ import "../../../atoms/mobile-tooltip.js";
5
+ import "../../../atoms/chart.js";
6
+ import "../../../atoms/form.js";
7
+ import "../../../../../react-resizable-panels.browser-ZHjTH32c.js";
8
+ import "../../../atoms/sidebar.js";
9
+ import "react";
10
+ import "../../../atoms/table.js";
11
+ import "../../../../../toolkit-card-GhM_oj4G.js";
12
+ import "../../../molecules/tool-card.js";
13
+ import "../../../../../assets/icons/utils.js";
14
+ import "../hooks/use-toolkit-picker.js";
15
+ function $({
16
+ selectionMode: t,
17
+ selectedCount: o,
18
+ onCommit: r,
19
+ className: i
20
+ }) {
21
+ return /* @__PURE__ */ m(
22
+ n,
23
+ {
24
+ className: i,
25
+ "data-testid": "use-tools-button",
26
+ disabled: o === 0,
27
+ onClick: r,
28
+ size: "sm",
29
+ children: t === "single" ? "Select Tool" : o === 0 ? "Select Tools" : `Use ${o} ${o === 1 ? "Tool" : "Tools"}`
30
+ }
31
+ );
32
+ }
33
+ export {
34
+ $ as SelectButton
35
+ };
@@ -0,0 +1,9 @@
1
+ import { ProcessedToolkit } from '../../../../../lib/arcade/arcade';
2
+ export interface ToolkitCardWithSelectionProps {
3
+ toolkit: ProcessedToolkit;
4
+ selectedTools: Set<string>;
5
+ onSelect: (checked: boolean) => void;
6
+ onView: () => void;
7
+ selectionMode: 'single' | 'multi';
8
+ }
9
+ export declare function ToolkitCardWithSelection({ toolkit, selectedTools, onSelect, onView, selectionMode, }: ToolkitCardWithSelectionProps): import("react/jsx-runtime").JSX.Element;