@arcadeai/design-system 7.2.0 → 7.3.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.
@@ -8,6 +8,8 @@ export type McpRequirementsDialogProps = {
8
8
  description?: React.ReactNode;
9
9
  /** Optional leading icon in the header (e.g. a provider brand mark). */
10
10
  icon?: React.ReactNode;
11
+ /** Optional navigation back to the requirements list from a detail view. */
12
+ onBack?: () => void;
11
13
  /**
12
14
  * Current view id (e.g. a requirement id, or `"list"`). Changing it eases the
13
15
  * body height and fades the incoming view in. Omit for a static body.
@@ -22,5 +24,5 @@ export type McpRequirementsDialogProps = {
22
24
  * Height-bounded modal shell for the requirement setup flow: the body scrolls
23
25
  * inside the dialog and its height eases between views. The caller owns the body.
24
26
  */
25
- export declare function McpRequirementsDialog({ open, onOpenChange, trigger, title, description, icon, viewKey, children, className, bodyClassName, }: McpRequirementsDialogProps): React.JSX.Element;
27
+ export declare function McpRequirementsDialog({ open, onOpenChange, trigger, title, description, icon, onBack, viewKey, children, className, bodyClassName, }: McpRequirementsDialogProps): React.JSX.Element;
26
28
  //# sourceMappingURL=mcp-requirements-dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-requirements-dialog.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/organisms/mcp-requirements-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAapC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAsEF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAqB,EACrB,WAAiC,EACjC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,aAAa,GACd,EAAE,0BAA0B,qBA8D5B"}
1
+ {"version":3,"file":"mcp-requirements-dialog.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/organisms/mcp-requirements-dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAcpC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAsEF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAqB,EACrB,WAAiC,EACjC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,aAAa,GACd,EAAE,0BAA0B,qBA2F5B"}
@@ -1,15 +1,17 @@
1
1
  "use client";
2
2
  "use client";
3
3
  import { cn as e } from "../../../lib/utils.js";
4
- import { Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DialogTrigger as o } from "../atoms/dialog.js";
5
- import { t as s } from "../../../scroll-area-D7iOy7xj.js";
6
- import { useCallback as c, useRef as l } from "react";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { t } from "../../../button-BdQxLUOB.js";
5
+ import { Dialog as n, DialogContent as r, DialogDescription as i, DialogHeader as a, DialogTitle as o, DialogTrigger as s } from "../atoms/dialog.js";
6
+ import { t as c } from "../../../scroll-area-D7iOy7xj.js";
7
+ import { useCallback as l, useRef as u } from "react";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { ChevronLeft as p } from "lucide-react";
8
10
  //#region lib/components/ui/organisms/mcp-requirements-dialog.tsx
9
- var f = "Complete tool setup", p = "Add the connections and secrets your selected tools need before they can run.";
10
- function m() {
11
- let e = l(null), t = l(null);
12
- return c((n) => {
11
+ var m = "Complete tool setup", h = "Add the connections and secrets your selected tools need before they can run.";
12
+ function g() {
13
+ let e = u(null), t = u(null);
14
+ return l((n) => {
13
15
  e.current?.disconnect(), e.current = null, t.current !== null && (cancelAnimationFrame(t.current), t.current = null);
14
16
  let r = n?.parentElement;
15
17
  if (!(n && r)) return;
@@ -34,46 +36,58 @@ function m() {
34
36
  s.observe(n), e.current = s;
35
37
  }, []);
36
38
  }
37
- function h({ open: c, onOpenChange: h, trigger: g, title: _ = f, description: v = p, icon: y, viewKey: b, children: x, className: S, bodyClassName: C }) {
38
- let w = m(), T = l(null);
39
- return /* @__PURE__ */ d(t, {
40
- onOpenChange: h,
41
- open: c,
42
- children: [g ? /* @__PURE__ */ u(o, { render: g }) : null, /* @__PURE__ */ d(n, {
43
- className: e("grid max-h-[calc(100svh-2rem)] w-full grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] gap-0 overflow-hidden rounded-xl p-0 shadow-black/10 shadow-lg sm:max-w-[40rem] [&_[data-slot=dialog-close]]:top-4 [&_[data-slot=dialog-close]]:right-4", S),
39
+ function _({ open: _, onOpenChange: v, trigger: y, title: b = m, description: x = h, icon: S, onBack: C, viewKey: w, children: T, className: E, bodyClassName: D }) {
40
+ let O = g(), k = u(null), A = l(() => k.current?.querySelector("input:not([disabled]), textarea:not([disabled])") ?? k.current, []);
41
+ return /* @__PURE__ */ f(n, {
42
+ onOpenChange: v,
43
+ open: _,
44
+ children: [y ? /* @__PURE__ */ d(s, { render: y }) : null, /* @__PURE__ */ f(r, {
45
+ className: e("grid max-h-[calc(100svh-2rem)] w-full grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] gap-0 overflow-hidden rounded-xl p-0 shadow-black/10 shadow-lg sm:max-w-[40rem] [&_[data-slot=dialog-close]]:top-4 [&_[data-slot=dialog-close]]:right-4", E),
44
46
  "data-slot": "mcp-requirements-dialog",
45
- initialFocus: T,
46
- ref: T,
47
- children: [/* @__PURE__ */ u(i, {
47
+ initialFocus: A,
48
+ ref: k,
49
+ children: [/* @__PURE__ */ f(a, {
48
50
  className: "border-border/60 border-b bg-muted/[0.14] px-5 py-4.5 pr-14",
49
- children: /* @__PURE__ */ d("div", {
50
- className: "flex items-start gap-3.5",
51
- children: [y ? /* @__PURE__ */ u("span", {
52
- className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted/70 text-muted-foreground ring-1 ring-border/60 dark:bg-muted/50",
53
- children: y
54
- }) : null, /* @__PURE__ */ d("div", {
51
+ children: [C ? /* @__PURE__ */ f(t, {
52
+ "aria-label": "Back to requirements",
53
+ className: "-mt-1 -ml-1 w-fit bg-muted/60 font-medium text-foreground shadow-none hover:bg-muted dark:bg-muted/50 dark:hover:bg-muted/70",
54
+ onClick: C,
55
+ size: "default",
56
+ type: "button",
57
+ variant: "ghost",
58
+ children: [/* @__PURE__ */ d(p, {
59
+ "aria-hidden": !0,
60
+ "data-icon": "inline-start"
61
+ }), "Back"]
62
+ }) : null, /* @__PURE__ */ f("div", {
63
+ className: e("flex items-start gap-2.5", C && "mt-2"),
64
+ children: [S ? /* @__PURE__ */ d("span", {
65
+ "aria-hidden": !0,
66
+ className: "mt-0.5 flex size-6 shrink-0 items-center justify-center text-muted-foreground",
67
+ children: S
68
+ }) : null, /* @__PURE__ */ f("div", {
55
69
  className: "flex min-w-0 flex-col gap-1.5 pt-0.5",
56
- children: [/* @__PURE__ */ u(a, {
70
+ children: [/* @__PURE__ */ d(o, {
57
71
  className: "text-[17px] leading-5",
58
- children: _
59
- }), /* @__PURE__ */ u(r, {
72
+ children: b
73
+ }), /* @__PURE__ */ d(i, {
60
74
  className: "max-w-[60ch] text-pretty leading-5",
61
- children: v
75
+ children: x
62
76
  })]
63
77
  })]
64
- })
65
- }), /* @__PURE__ */ u(s, {
78
+ })]
79
+ }), /* @__PURE__ */ d(c, {
66
80
  className: "max-h-[min(70svh,42rem)] min-h-0",
67
- children: /* @__PURE__ */ u("div", {
81
+ children: /* @__PURE__ */ d("div", {
68
82
  className: "overflow-hidden transition-[height] duration-[var(--duration-normal)] ease-[var(--ease-smooth)] motion-reduce:transition-none",
69
83
  "data-slot": "mcp-requirements-dialog-height",
70
- children: /* @__PURE__ */ u("div", {
71
- ref: w,
72
- children: /* @__PURE__ */ u("div", {
73
- className: e("flex min-w-0 flex-col gap-5 px-4 py-5 [&>*]:min-w-0", b !== void 0 && "fade-in-0 slide-in-from-bottom-1 animate-in duration-[var(--duration-normal)] ease-[var(--ease-smooth)] motion-reduce:animate-none", C),
84
+ children: /* @__PURE__ */ d("div", {
85
+ ref: O,
86
+ children: /* @__PURE__ */ d("div", {
87
+ className: e("flex min-w-0 flex-col gap-5 px-4 py-5 [&>*]:min-w-0", w !== void 0 && "fade-in-0 slide-in-from-bottom-1 animate-in duration-[var(--duration-normal)] ease-[var(--ease-smooth)] motion-reduce:animate-none", D),
74
88
  onSubmit: (e) => e.stopPropagation(),
75
- children: x
76
- }, b)
89
+ children: T
90
+ }, w)
77
91
  })
78
92
  })
79
93
  })]
@@ -81,4 +95,4 @@ function h({ open: c, onOpenChange: h, trigger: g, title: _ = f, description: v
81
95
  });
82
96
  }
83
97
  //#endregion
84
- export { h as McpRequirementsDialog };
98
+ export { _ as McpRequirementsDialog };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadeai/design-system",
3
3
  "private": false,
4
- "version": "7.2.0",
4
+ "version": "7.3.1",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",