@arcadeai/design-system 3.27.0 → 3.27.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.
Files changed (50) hide show
  1. package/README.md +2 -2
  2. package/dist/calendar-w1IATMME.js +3042 -0
  3. package/dist/components/index.js +442 -435
  4. package/dist/components/ui/atoms/calendar.d.ts +21 -0
  5. package/dist/components/ui/atoms/calendar.d.ts.map +1 -0
  6. package/dist/components/ui/atoms/calendar.js +10 -0
  7. package/dist/components/ui/atoms/index.d.ts +2 -0
  8. package/dist/components/ui/atoms/index.d.ts.map +1 -1
  9. package/dist/components/ui/atoms/index.js +427 -422
  10. package/dist/components/ui/atoms/virtualized-grid.d.ts +23 -0
  11. package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -0
  12. package/dist/components/ui/atoms/virtualized-grid.js +682 -0
  13. package/dist/components/ui/index.js +442 -435
  14. package/dist/components/ui/molecules/date-time-picker.d.ts +12 -0
  15. package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -0
  16. package/dist/components/ui/molecules/date-time-picker.js +84 -0
  17. package/dist/components/ui/molecules/index.d.ts +1 -0
  18. package/dist/components/ui/molecules/index.d.ts.map +1 -1
  19. package/dist/components/ui/molecules/index.js +13 -11
  20. package/dist/components/ui/molecules/requirement-badges.js +6 -5
  21. package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
  22. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  23. package/dist/components/ui/molecules/toolkit-selection-summary.js +5 -4
  24. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +15 -14
  25. package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts.map +1 -1
  26. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +10 -9
  27. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
  28. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts +3 -1
  29. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts.map +1 -1
  30. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +109 -57
  31. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts +3 -1
  32. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts.map +1 -1
  33. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +74 -69
  34. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts +8 -0
  35. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts.map +1 -0
  36. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.js +11 -0
  37. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +6 -4
  38. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts.map +1 -1
  39. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +195 -261
  40. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +5 -1
  41. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts.map +1 -1
  42. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +154 -80
  43. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts.map +1 -1
  44. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +89 -75
  45. package/dist/hooks/use-columns.d.ts +6 -0
  46. package/dist/hooks/use-columns.d.ts.map +1 -0
  47. package/dist/hooks/use-columns.js +20 -0
  48. package/dist/main.js +476 -469
  49. package/dist/{toolkit-card-CsV6xoOG.js → toolkit-card-Qou74oWg.js} +4 -2
  50. package/package.json +7 -2
@@ -0,0 +1,12 @@
1
+ import { Calendar } from '../atoms/calendar';
2
+ import { ComponentProps } from 'react';
3
+ export type DateTimePickerProps = {
4
+ value?: Date;
5
+ onChange?: (date: Date | undefined) => void;
6
+ className?: string;
7
+ } & Omit<ComponentProps<typeof Calendar>, "selected" | "onSelect" | "mode">;
8
+ export declare function DateTimePicker({ value, onChange, className, ...calendarProps }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare namespace DateTimePicker {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=date-time-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/date-time-picker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAU5D,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;AAE5E,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,aAAa,EACjB,EAAE,mBAAmB,2CAgErB;yBArEe,cAAc"}
@@ -0,0 +1,84 @@
1
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
+ import { Button as g } from "../atoms/button.js";
3
+ import { f as k, C as w } from "../../../calendar-w1IATMME.js";
4
+ import { Input as x } from "../atoms/input.js";
5
+ import { Label as s } from "../atoms/label.js";
6
+ import { Popover as N, PopoverTrigger as b, PopoverContent as D } from "../atoms/popover.js";
7
+ import { ChevronDownIcon as v } from "lucide-react";
8
+ import { useState as C } from "react";
9
+ function P({
10
+ value: e,
11
+ onChange: a,
12
+ className: m,
13
+ ...l
14
+ }) {
15
+ const [p, i] = C(!1), d = e ? k(e, "HH:mm:ss") : "";
16
+ return /* @__PURE__ */ r("div", { className: m, children: /* @__PURE__ */ t("div", { className: "flex gap-4", children: [
17
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-3", children: [
18
+ /* @__PURE__ */ t(s, { className: "px-1", htmlFor: "date-picker", children: [
19
+ "Date:",
20
+ " "
21
+ ] }),
22
+ /* @__PURE__ */ t(N, { onOpenChange: i, open: p, children: [
23
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ t(
24
+ g,
25
+ {
26
+ className: "w-32 justify-between font-normal",
27
+ id: "date-picker",
28
+ variant: "outline",
29
+ children: [
30
+ e ? e.toLocaleDateString() : "Select date",
31
+ /* @__PURE__ */ r(v, {})
32
+ ]
33
+ }
34
+ ) }),
35
+ /* @__PURE__ */ r(
36
+ D,
37
+ {
38
+ align: "start",
39
+ className: "w-auto overflow-hidden p-0",
40
+ children: /* @__PURE__ */ r(
41
+ w,
42
+ {
43
+ captionLayout: "dropdown",
44
+ mode: "single",
45
+ onSelect: (o) => {
46
+ a?.(o), i(!1);
47
+ },
48
+ selected: e,
49
+ ...l
50
+ }
51
+ )
52
+ }
53
+ )
54
+ ] })
55
+ ] }),
56
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-3", children: [
57
+ /* @__PURE__ */ t(s, { className: "px-1", htmlFor: "time-picker", children: [
58
+ "Time:",
59
+ " "
60
+ ] }),
61
+ /* @__PURE__ */ r(
62
+ x,
63
+ {
64
+ className: "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none",
65
+ id: "time-picker",
66
+ onChange: (o) => {
67
+ const n = o.target.value;
68
+ if (!(n && e))
69
+ return;
70
+ const [f, h, u] = n.split(":").map(Number), c = new Date(e);
71
+ c.setHours(f, h, u || 0), a?.(c);
72
+ },
73
+ step: "1",
74
+ type: "time",
75
+ value: d
76
+ }
77
+ )
78
+ ] })
79
+ ] }) });
80
+ }
81
+ P.displayName = "DateTimePicker";
82
+ export {
83
+ P as DateTimePicker
84
+ };
@@ -1,4 +1,5 @@
1
1
  /** biome-ignore-all lint/performance/noBarrelFile: Barrel files are acceptable for atomic component folders */
2
+ export { DateTimePicker } from './date-time-picker';
2
3
  export { EmptyState } from './empty-state';
3
4
  export { RequirementBadges } from './requirement-badges';
4
5
  export { ToolCard } from './tool-card';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,13 +1,15 @@
1
- import { EmptyState as e } from "./empty-state.js";
2
- import { R as m, T as a } from "../../../toolkit-card-CsV6xoOG.js";
3
- import { ToolCard as p } from "./tool-card.js";
4
- import { ToolkitPickerTrigger as f } from "./toolkit-picker-trigger.js";
5
- import { ToolkitSelectionSummary as x } from "./toolkit-selection-summary.js";
1
+ import { DateTimePicker as e } from "./date-time-picker.js";
2
+ import { EmptyState as m } from "./empty-state.js";
3
+ import { R as a, T as p } from "../../../toolkit-card-Qou74oWg.js";
4
+ import { ToolCard as f } from "./tool-card.js";
5
+ import { ToolkitPickerTrigger as k } from "./toolkit-picker-trigger.js";
6
+ import { ToolkitSelectionSummary as c } from "./toolkit-selection-summary.js";
6
7
  export {
7
- e as EmptyState,
8
- m as RequirementBadges,
9
- p as ToolCard,
10
- a as ToolkitCard,
11
- f as ToolkitPickerTrigger,
12
- x as ToolkitSelectionSummary
8
+ e as DateTimePicker,
9
+ m as EmptyState,
10
+ a as RequirementBadges,
11
+ f as ToolCard,
12
+ p as ToolkitCard,
13
+ k as ToolkitPickerTrigger,
14
+ c as ToolkitSelectionSummary
13
15
  };
@@ -3,21 +3,22 @@ import "../../../utils-6KgZuQUR.js";
3
3
  import "lucide-react";
4
4
  import "../atoms/badge.js";
5
5
  import "../atoms/byoc-badge.js";
6
+ import "react";
6
7
  import "../atoms/chart.js";
7
8
  import "../atoms/mobile-tooltip.js";
8
9
  import "../atoms/pro-badge.js";
9
10
  import "../../../react-resizable-panels.browser-31wAXhAV.js";
10
11
  import "../atoms/sidebar.js";
11
- import "react";
12
12
  import "../atoms/tooltip.js";
13
- import { O as n, R as q, S as x } from "../../../toolkit-card-CsV6xoOG.js";
13
+ import "./date-time-picker.js";
14
+ import { O as q, R as x, S as A } from "../../../toolkit-card-Qou74oWg.js";
14
15
  import "./tool-card.js";
15
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
- n as OAuthBadge,
21
- q as RequirementBadges,
22
- x as SecretsBadge
21
+ q as OAuthBadge,
22
+ x as RequirementBadges,
23
+ A as SecretsBadge
23
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toolkit-card.d.ts","sourceRoot":"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R,EAAE,gBAAgB,eAkJlB;AAmBD,eAAO,MAAM,WAAW,mDAGvB,CAAC"}
@@ -6,7 +6,7 @@ import "../../../utils-6KgZuQUR.js";
6
6
  import "../../../index-r7CUvu2m.js";
7
7
  import "lucide-react";
8
8
  import "react";
9
- import { T as k } from "../../../toolkit-card-CsV6xoOG.js";
9
+ import { T as k } from "../../../toolkit-card-Qou74oWg.js";
10
10
  import "../utils/memo.js";
11
11
  export {
12
12
  k as ToolkitCard
@@ -2,16 +2,17 @@ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  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
+ import "react";
5
6
  import "../atoms/chart.js";
6
7
  import "../../../react-resizable-panels.browser-31wAXhAV.js";
7
8
  import "../atoms/sidebar.js";
8
- import "react";
9
- import "../../../toolkit-card-CsV6xoOG.js";
9
+ import "./date-time-picker.js";
10
+ import "../../../toolkit-card-Qou74oWg.js";
10
11
  import "./tool-card.js";
11
12
  import { getToolkitIcon as z } from "../../../metadata/toolkit-icons.js";
12
13
  import "../organisms/toolkit-picker/hooks/use-toolkit-picker.js";
13
14
  const j = 3;
14
- function _({
15
+ function D({
15
16
  selectedToolkits: s,
16
17
  selectedTools: n,
17
18
  onClear: N,
@@ -111,5 +112,5 @@ function _({
111
112
  );
112
113
  }
113
114
  export {
114
- _ as ToolkitSelectionSummary
115
+ D as ToolkitSelectionSummary
115
116
  };
@@ -1,18 +1,19 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import { Search as y } from "lucide-react";
3
3
  import "../../../atoms/mobile-tooltip.js";
4
+ import { useRef as T } from "react";
4
5
  import "../../../atoms/chart.js";
5
- import { Input as T } from "../../../atoms/input.js";
6
+ import { Input as k } from "../../../atoms/input.js";
6
7
  import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
7
8
  import "../../../atoms/sidebar.js";
8
- import { useRef as k } from "react";
9
- import "../../../../../toolkit-card-CsV6xoOG.js";
9
+ import "../../../molecules/date-time-picker.js";
10
+ import "../../../../../toolkit-card-Qou74oWg.js";
10
11
  import "../../../molecules/tool-card.js";
11
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 z() {
15
- const r = k(null), {
15
+ function C() {
16
+ const r = T(null), {
16
17
  state: {
17
18
  searchQuery: o,
18
19
  activeTab: i,
@@ -22,26 +23,26 @@ function z() {
22
23
  },
23
24
  setSearchQuery: n,
24
25
  toggleToolkit: c,
25
- toggleTool: u,
26
- setActiveTab: m,
27
- setToolkitFilter: f
28
- } = g(), p = () => {
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
- f(t.name), m("tools");
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 && u(t);
40
+ t && m(t);
40
41
  };
41
42
  return /* @__PURE__ */ d("div", { className: "relative flex-1", children: [
42
43
  /* @__PURE__ */ e(y, { className: "absolute top-1/2 left-3.5 size-4 -translate-y-1/2 text-gray-400" }),
43
44
  /* @__PURE__ */ e(
44
- T,
45
+ k,
45
46
  {
46
47
  "aria-label": "Search toolkits and tools",
47
48
  autoFocus: !0,
@@ -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
- p();
55
+ f();
55
56
  return;
56
57
  }
57
58
  h();
@@ -65,5 +66,5 @@ function z() {
65
66
  ] });
66
67
  }
67
68
  export {
68
- z as SearchInput
69
+ C as SearchInput
69
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-button.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/select-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,GACV,EAAE,iBAAiB,2CAuBnB"}
1
+ {"version":3,"file":"select-button.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/select-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,GACV,EAAE,iBAAiB,2CA2BnB"}
@@ -2,33 +2,34 @@ import { jsx as m } from "react/jsx-runtime";
2
2
  import "lucide-react";
3
3
  import { Button as n } from "../../../atoms/button.js";
4
4
  import "../../../atoms/mobile-tooltip.js";
5
+ import "react";
5
6
  import "../../../atoms/chart.js";
6
7
  import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
7
8
  import "../../../atoms/sidebar.js";
8
- import "react";
9
- import "../../../../../toolkit-card-CsV6xoOG.js";
9
+ import "../../../molecules/date-time-picker.js";
10
+ import "../../../../../toolkit-card-Qou74oWg.js";
10
11
  import "../../../molecules/tool-card.js";
11
12
  import "../../../../../metadata/oauth-providers.js";
12
13
  import "../../../../../metadata/toolkits.js";
13
14
  import "../hooks/use-toolkit-picker.js";
14
- function L({
15
+ function $({
15
16
  selectionMode: t,
16
17
  selectedCount: o,
17
- onCommit: r,
18
- className: i
18
+ onCommit: i,
19
+ className: r
19
20
  }) {
20
21
  return /* @__PURE__ */ m(
21
22
  n,
22
23
  {
23
- className: i,
24
+ className: r,
24
25
  "data-testid": "use-tools-button",
25
- disabled: o === 0,
26
- onClick: r,
26
+ disabled: t === "single" && o === 0,
27
+ onClick: i,
27
28
  size: "sm",
28
29
  children: t === "single" ? "Select Tool" : o === 0 ? "Select Tools" : `Use ${o} ${o === 1 ? "Tool" : "Tools"}`
29
30
  }
30
31
  );
31
32
  }
32
33
  export {
33
- L as SelectButton
34
+ $ as SelectButton
34
35
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { T as c } from "../../../../../toolkit-card-CsV6xoOG.js";
2
+ import { T as c } from "../../../../../toolkit-card-Qou74oWg.js";
3
3
  import { getToolkitIcon as d } from "../../../../../metadata/toolkit-icons.js";
4
4
  function g({
5
5
  toolkit: e,
@@ -1,7 +1,9 @@
1
+ import { RefObject } from 'react';
1
2
  import { SelectionMode } from '../index';
2
3
  type ToolkitListProps = {
3
4
  selectionMode: SelectionMode;
5
+ scrollContainerRef: RefObject<HTMLDivElement | null>;
4
6
  };
5
- export declare function ToolkitList({ selectionMode }: ToolkitListProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ToolkitList({ selectionMode, scrollContainerRef, }: ToolkitListProps): import("react/jsx-runtime").JSX.Element;
6
8
  export {};
7
9
  //# sourceMappingURL=toolkit-list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolkit-list.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/toolkit-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,gBAAgB,GAAG;IACtB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,aAAa,EAAE,EAAE,gBAAgB,2CAkG9D"}
1
+ {"version":3,"file":"toolkit-list.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/toolkit-list.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAM9C,KAAK,gBAAgB,GAAG;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,kBAAkB,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,aAAa,EACb,kBAAkB,GACnB,EAAE,gBAAgB,2CAqJlB"}
@@ -1,90 +1,142 @@
1
- import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
- import { EmptyState as k } from "../../../molecules/empty-state.js";
3
- import "../../../../../toolkit-card-CsV6xoOG.js";
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
+ import { VirtualizedGrid as u } from "../../../atoms/virtualized-grid.js";
3
+ import "../../../molecules/date-time-picker.js";
4
+ import { EmptyState as w } from "../../../molecules/empty-state.js";
5
+ import "../../../../../toolkit-card-Qou74oWg.js";
4
6
  import "../../../molecules/tool-card.js";
5
7
  import "../../../../../metadata/oauth-providers.js";
6
8
  import "../../../../../metadata/toolkits.js";
7
9
  import "lucide-react";
8
- import { useToolkitPicker as f } from "../hooks/use-toolkit-picker.js";
10
+ import { useToolkitPicker as S } from "../hooks/use-toolkit-picker.js";
9
11
  import "../../../atoms/mobile-tooltip.js";
12
+ import { useMemo as v } from "react";
10
13
  import "../../../atoms/chart.js";
11
14
  import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
12
15
  import "../../../atoms/sidebar.js";
13
- import "react";
14
- import { ToolkitCardWithSelection as h } from "./toolkit-card-with-selection.js";
15
- function F({ selectionMode: s }) {
16
+ import { useColumns as C } from "../../../../../hooks/use-columns.js";
17
+ import { FEATURED_TOOLKITS as R } from "../hooks/featured-toolkits.js";
18
+ import { ToolkitCardWithSelection as A } from "./toolkit-card-with-selection.js";
19
+ const x = 156;
20
+ function J({
21
+ selectionMode: f,
22
+ scrollContainerRef: d
23
+ }) {
16
24
  const {
17
- state: { filteredToolkits: i, selectedToolkits: r, selectedTools: a },
18
- toggleToolkit: x,
19
- setActiveTab: d,
20
- setToolkitFilter: n
21
- } = f();
22
- if (i.size === 0)
25
+ state: { filteredToolkits: m, selectedToolkits: l, selectedTools: T, searchQuery: o },
26
+ toggleToolkit: y,
27
+ setActiveTab: h,
28
+ setToolkitFilter: k
29
+ } = S(), n = C(), { selectedToolkitItems: a, featuredToolkitItems: i, unselectedToolkitItems: c } = v(() => {
30
+ const e = Array.from(m), g = new Set(
31
+ R.map((r) => r.toLowerCase())
32
+ ), N = e.filter(
33
+ (r) => l.has(r.name)
34
+ ), I = e.filter(
35
+ (r) => !(l.has(r.name) || o.trim()) && g.has(r.name.toLowerCase())
36
+ ), b = e.filter(
37
+ (r) => !l.has(r.name) && (o.trim() || !g.has(r.name.toLowerCase()))
38
+ );
39
+ return {
40
+ selectedToolkitItems: N,
41
+ featuredToolkitItems: I,
42
+ unselectedToolkitItems: b
43
+ };
44
+ }, [m, o, l]);
45
+ if (m.size === 0)
23
46
  return /* @__PURE__ */ t(
24
- k,
47
+ w,
25
48
  {
26
49
  "data-testid": "empty-toolkits",
27
50
  description: "Try a different search term",
28
51
  title: "No toolkits found"
29
52
  }
30
53
  );
31
- const m = Array.from(i), o = m.filter(
32
- (e) => r.has(e.name)
33
- ), c = m.filter(
34
- (e) => !r.has(e.name)
35
- ), p = (e) => (u) => {
36
- if (s === "single") {
37
- d("tools"), n(e.name);
38
- return;
39
- }
40
- x(e);
41
- }, g = (e) => () => {
42
- n(e.name), d("tools");
43
- };
44
- return /* @__PURE__ */ l("div", { className: "space-y-4", "data-testid": "toolkits-grid", children: [
45
- o.length > 0 && /* @__PURE__ */ l(
54
+ const p = (e) => /* @__PURE__ */ t(
55
+ A,
56
+ {
57
+ onSelect: (g) => {
58
+ if (f === "single") {
59
+ h("tools"), k(e.name);
60
+ return;
61
+ }
62
+ y(e);
63
+ },
64
+ onView: () => {
65
+ k(e.name), h("tools");
66
+ },
67
+ selectedTools: new Set(T.keys()),
68
+ selectionMode: f,
69
+ toolkit: e
70
+ },
71
+ e.name
72
+ );
73
+ return /* @__PURE__ */ s("div", { className: "space-y-4", "data-testid": "toolkits-grid", children: [
74
+ a.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-3", "data-testid": "selected-toolkits-section", children: [
75
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
76
+ /* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "Selected" }),
77
+ /* @__PURE__ */ t("span", { className: "rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: a.length })
78
+ ] }),
79
+ /* @__PURE__ */ t(
80
+ u,
81
+ {
82
+ columns: n,
83
+ estimateRowSize: x,
84
+ getItemKey: (e) => e.name,
85
+ gridClassName: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
86
+ items: a,
87
+ parentRef: d,
88
+ renderItem: p,
89
+ rowGapPx: 12
90
+ }
91
+ )
92
+ ] }),
93
+ !o.trim() && i.length > 0 && /* @__PURE__ */ s(
46
94
  "div",
47
95
  {
48
- className: "mt-0.5 space-y-2",
49
- "data-testid": "selected-toolkits-section",
96
+ className: "space-y-3 rounded-lg bg-neutral-50 p-4 dark:bg-neutral-900",
97
+ "data-testid": "featured-toolkits-section",
50
98
  children: [
51
- /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
52
- /* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "Selected" }),
53
- /* @__PURE__ */ t("span", { className: "rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: o.length })
99
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
100
+ /* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "Featured Toolkits" }),
101
+ /* @__PURE__ */ t("span", { className: "rounded-full bg-neutral-200 px-1.5 py-0.5 text-neutral-800 text-xs dark:bg-neutral-800 dark:text-neutral-200", children: i.length })
54
102
  ] }),
55
- /* @__PURE__ */ t("div", { className: "mt-3 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3", children: o.map((e) => /* @__PURE__ */ t(
56
- h,
103
+ /* @__PURE__ */ t(
104
+ u,
57
105
  {
58
- onSelect: p(e),
59
- onView: g(e),
60
- selectedTools: new Set(a.keys()),
61
- selectionMode: s,
62
- toolkit: e
63
- },
64
- e.name
65
- )) })
106
+ columns: n,
107
+ estimateRowSize: x,
108
+ getItemKey: (e) => e.name,
109
+ gridClassName: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
110
+ items: i,
111
+ parentRef: d,
112
+ renderItem: p,
113
+ rowGapPx: 12
114
+ }
115
+ )
66
116
  ]
67
117
  }
68
118
  ),
69
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
70
- o.length > 0 && /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
119
+ c.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-3", children: [
120
+ (a.length > 0 || i.length > 0) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
71
121
  /* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "All toolkits" }),
72
122
  /* @__PURE__ */ t("span", { className: "rounded-full bg-neutral-200 px-1.5 py-0.5 text-neutral-800 text-xs dark:bg-neutral-800 dark:text-neutral-200", children: c.length })
73
123
  ] }),
74
- /* @__PURE__ */ t("div", { className: "mt-2 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3", children: c.map((e) => /* @__PURE__ */ t(
75
- h,
124
+ /* @__PURE__ */ t(
125
+ u,
76
126
  {
77
- onSelect: p(e),
78
- onView: g(e),
79
- selectedTools: new Set(a.keys()),
80
- selectionMode: s,
81
- toolkit: e
82
- },
83
- e.name
84
- )) })
127
+ columns: n,
128
+ estimateRowSize: x,
129
+ getItemKey: (e) => e.name,
130
+ gridClassName: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
131
+ items: c,
132
+ parentRef: d,
133
+ renderItem: p,
134
+ rowGapPx: 12
135
+ }
136
+ )
85
137
  ] })
86
138
  ] });
87
139
  }
88
140
  export {
89
- F as ToolkitList
141
+ J as ToolkitList
90
142
  };
@@ -1,7 +1,9 @@
1
+ import { RefObject } from 'react';
1
2
  import { SelectionMode } from '../index';
2
3
  type ToolsListProps = {
3
4
  selectionMode: SelectionMode;
5
+ scrollContainerRef: RefObject<HTMLDivElement | null>;
4
6
  };
5
- export declare function ToolsList({ selectionMode }: ToolsListProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ToolsList({ selectionMode, scrollContainerRef, }: ToolsListProps): import("react/jsx-runtime").JSX.Element;
6
8
  export {};
7
9
  //# sourceMappingURL=tools-list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools-list.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/tools-list.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,KAAK,cAAc,GAAG;IACpB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE,cAAc,2CAuG1D"}
1
+ {"version":3,"file":"tools-list.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/components/tools-list.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK9C,KAAK,cAAc,GAAG;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,kBAAkB,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,kBAAkB,GACnB,EAAE,cAAc,2CAsGhB"}