@actioneer/ads 1.0.6 → 1.0.8

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 (74) hide show
  1. package/DESIGN.md +80 -86
  2. package/README.md +6 -0
  3. package/components/ai-elements/chart.js +20 -20
  4. package/components/ai-elements/inline-citation.js +50 -50
  5. package/components/ai-elements/message.js +1 -1
  6. package/components/ai-elements/tool.js +5 -5
  7. package/components/alert.d.ts +5 -4
  8. package/components/alert.js +91 -79
  9. package/components/answer.js +1 -1
  10. package/components/assistant-ui/action-bar.js +1 -1
  11. package/components/assistant-ui/attachment.js +68 -49
  12. package/components/assistant-ui/composer-add-context.js +1 -1
  13. package/components/assistant-ui/composer-trigger-popover.js +1 -1
  14. package/components/assistant-ui/composer.js +13 -13
  15. package/components/assistant-ui/message-timing.js +6 -6
  16. package/components/assistant-ui/selection-toolbar.js +5 -5
  17. package/components/assistant-ui/sources.js +15 -15
  18. package/components/assistant-ui/tooltip-icon-button.js +18 -14
  19. package/components/audio-waveform.d.ts +21 -8
  20. package/components/audio-waveform.js +371 -94
  21. package/components/autocomplete.js +9 -9
  22. package/components/breadcrumbs.js +32 -38
  23. package/components/button.js +83 -73
  24. package/components/card.js +1 -1
  25. package/components/chart.js +732 -673
  26. package/components/chip.js +37 -35
  27. package/components/command-palette.js +12 -12
  28. package/components/connector-card.d.ts +1 -2
  29. package/components/connector-card.js +17 -17
  30. package/components/date-range-picker.js +1 -2
  31. package/components/drawer.js +9 -10
  32. package/components/dropdown.js +1 -1
  33. package/components/empty-state.d.ts +2 -0
  34. package/components/empty-state.js +17 -15
  35. package/components/field.js +9 -10
  36. package/components/file-dropzone.d.ts +6 -3
  37. package/components/file-dropzone.js +72 -60
  38. package/components/infinite-canvas.js +9 -9
  39. package/components/modal.js +1 -1
  40. package/components/page-body.js +8 -8
  41. package/components/popover.js +11 -11
  42. package/components/progress-circle.d.ts +1 -1
  43. package/components/progress-circle.js +57 -48
  44. package/components/radio.d.ts +1 -1
  45. package/components/radio.js +53 -53
  46. package/components/segmented.d.ts +1 -0
  47. package/components/segmented.js +34 -36
  48. package/components/select.js +2 -2
  49. package/components/selection-action-bar.js +32 -31
  50. package/components/setting-row.js +10 -10
  51. package/components/sidebar.js +74 -73
  52. package/components/slider.js +5 -5
  53. package/components/stepper.d.ts +1 -1
  54. package/components/stepper.js +1 -1
  55. package/components/switch.js +10 -10
  56. package/components/table.d.ts +17 -5
  57. package/components/table.js +559 -405
  58. package/components/tabs.js +41 -35
  59. package/components/timeline.js +3 -3
  60. package/components/toast.js +53 -56
  61. package/components/ui/button.js +4 -4
  62. package/components/ui/dialog.js +1 -1
  63. package/components/viz-charts.js +263 -221
  64. package/examples/README.md +30 -0
  65. package/examples/agents-screen.tsx +477 -0
  66. package/examples/settings-screen.tsx +90 -0
  67. package/examples/workspace-header.tsx +71 -0
  68. package/lib/icons.d.ts +8 -0
  69. package/lib/icons.js +171 -118
  70. package/llms.txt +16 -16
  71. package/manifest.json +178 -54
  72. package/package.json +1 -1
  73. package/styles.css +60 -72
  74. package/theme.css +55 -63
@@ -1,111 +1,111 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as R } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as y } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { MotionConfig as v, motion as y } from "motion/react";
5
- import { cn as b } from "../lib/cn.js";
6
- import { Field as N } from "./field.js";
7
- import { springRadio as w } from "../lib/motion.js";
8
- const x = i.createContext(null), k = i.forwardRef(
4
+ import { MotionConfig as N, motion as w } from "motion/react";
5
+ import { cn as g } from "../lib/cn.js";
6
+ import { Field as k } from "./field.js";
7
+ import { springRadio as C } from "../lib/motion.js";
8
+ const R = i.createContext(null), j = i.forwardRef(
9
9
  ({
10
- className: d,
11
- name: n,
10
+ className: u,
11
+ name: t,
12
12
  value: o,
13
- onChange: t,
14
- label: a,
15
- description: c,
16
- error: u,
17
- orientation: p = "vertical",
18
- disabled: e,
19
- children: s,
20
- ...l
21
- }, f) => {
13
+ onChange: a,
14
+ label: s,
15
+ description: p,
16
+ error: n,
17
+ orientation: f = "vertical",
18
+ disabled: l,
19
+ children: e,
20
+ ...d
21
+ }, c) => {
22
22
  const m = i.useMemo(
23
- () => ({ name: n, value: o, onValueChange: t, disabled: e }),
24
- [n, o, t, e]
23
+ () => ({ name: t, value: o, onValueChange: a, disabled: l }),
24
+ [t, o, a, l]
25
25
  );
26
26
  return /* @__PURE__ */ r(
27
- N,
27
+ k,
28
28
  {
29
- ref: f,
30
- label: a,
31
- description: c,
32
- error: u,
29
+ ref: c,
30
+ label: s,
31
+ description: p,
32
+ error: n,
33
33
  role: "radiogroup",
34
- className: d,
35
- ...l,
36
- children: /* @__PURE__ */ r(x.Provider, { value: m, children: /* @__PURE__ */ r(
34
+ className: u,
35
+ ...d,
36
+ children: /* @__PURE__ */ r(R.Provider, { value: m, children: /* @__PURE__ */ r(
37
37
  "div",
38
38
  {
39
- className: b(
39
+ className: g(
40
40
  "flex gap-3",
41
- p === "vertical" ? "flex-col" : "flex-row flex-wrap"
41
+ f === "vertical" ? "flex-col" : "flex-row flex-wrap"
42
42
  ),
43
- children: s
43
+ children: e
44
44
  }
45
45
  ) })
46
46
  }
47
47
  );
48
48
  }
49
49
  );
50
- k.displayName = "RadioGroup";
51
- const j = i.forwardRef(
52
- ({ className: d, children: n, value: o, disabled: t, checked: a, defaultChecked: c, ...u }, p) => {
53
- const e = i.useContext(x), s = t || (e == null ? void 0 : e.disabled), l = a !== void 0, [f, m] = i.useState(!!c), g = e ? e.value === o : l ? a : f;
54
- return /* @__PURE__ */ R(
50
+ j.displayName = "RadioGroup";
51
+ const G = i.forwardRef(
52
+ ({ className: u, children: t, value: o, disabled: a, checked: s, defaultChecked: p, onChange: n, ...f }, l) => {
53
+ const e = i.useContext(R), d = a || (e == null ? void 0 : e.disabled), c = s !== void 0, [m, v] = i.useState(!!p), b = e ? e.value === o : c ? s : m;
54
+ return /* @__PURE__ */ y(
55
55
  "label",
56
56
  {
57
- className: b(
57
+ className: g(
58
58
  "group inline-flex items-center gap-2 text-m text-foreground select-none",
59
- s ? "cursor-not-allowed opacity-50" : "cursor-pointer",
60
- d
59
+ d ? "cursor-not-allowed opacity-50" : "cursor-pointer",
60
+ u
61
61
  ),
62
62
  children: [
63
63
  /* @__PURE__ */ r(
64
64
  "input",
65
65
  {
66
- ref: p,
66
+ ref: l,
67
67
  type: "radio",
68
68
  name: e == null ? void 0 : e.name,
69
69
  value: o,
70
- checked: g,
71
- disabled: s,
72
- onChange: (C) => {
70
+ checked: b,
71
+ disabled: d,
72
+ onChange: (x) => {
73
73
  var h;
74
- C.target.checked && (e ? (h = e.onValueChange) == null || h.call(e, o) : l || m(!0));
74
+ x.target.checked && (e ? (h = e.onValueChange) == null || h.call(e, o) : c || v(!0), n == null || n(x));
75
75
  },
76
76
  className: "peer sr-only",
77
- ...u
77
+ ...f
78
78
  }
79
79
  ),
80
80
  /* @__PURE__ */ r(
81
81
  "span",
82
82
  {
83
83
  "aria-hidden": !0,
84
- className: b(
84
+ className: g(
85
85
  "flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-elevated",
86
86
  "transition-[border-color,box-shadow] duration-150 ease-out",
87
87
  "peer-checked:border-brand",
88
88
  "peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
89
89
  ),
90
- children: /* @__PURE__ */ r(v, { reducedMotion: "user", children: /* @__PURE__ */ r(
91
- y.span,
90
+ children: /* @__PURE__ */ r(N, { reducedMotion: "user", children: /* @__PURE__ */ r(
91
+ w.span,
92
92
  {
93
93
  className: "size-2 rounded-full bg-brand",
94
94
  initial: !1,
95
- animate: { opacity: g ? 1 : 0, scale: g ? 1 : 0.9 },
96
- transition: w
95
+ animate: { opacity: b ? 1 : 0, scale: b ? 1 : 0.9 },
96
+ transition: C
97
97
  }
98
98
  ) })
99
99
  }
100
100
  ),
101
- n && /* @__PURE__ */ r("span", { children: n })
101
+ t && /* @__PURE__ */ r("span", { children: t })
102
102
  ]
103
103
  }
104
104
  );
105
105
  }
106
106
  );
107
- j.displayName = "Radio";
107
+ G.displayName = "Radio";
108
108
  export {
109
- j as Radio,
110
- k as RadioGroup
109
+ G as Radio,
110
+ j as RadioGroup
111
111
  };
@@ -14,6 +14,7 @@ export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDiv
14
14
  options: SegmentedOption[];
15
15
  value: string;
16
16
  onChange: (value: string) => void;
17
+ /** @deprecated No effect: the active thumb is always flat (ADS 1.0.8). */
17
18
  elevated?: boolean;
18
19
  }
19
20
  export declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,15 +1,14 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
+ import { jsx as n, jsxs as h } from "react/jsx-runtime";
3
3
  import * as l from "react";
4
- import { MotionConfig as v, motion as w } from "motion/react";
4
+ import { MotionConfig as v, motion as x } from "motion/react";
5
5
  import { cva as c } from "class-variance-authority";
6
- import { cn as o } from "../lib/cn.js";
7
- import { springControl as y } from "../lib/motion.js";
8
- const D = c(
9
- // Borderless recessed track on ink-200 (bg-surface) — matches the Tabs
10
- // primary track (the selected segment provides the definition; a stroke around the
11
- // track read as a second, heavier control).
12
- "inline-flex items-center gap-1 bg-surface p-1",
6
+ import { cn as a } from "../lib/cn.js";
7
+ import { springControl as w } from "../lib/motion.js";
8
+ const y = c(
9
+ // Soft WG2 track with a WG4 edge; the selected option is a White thumb with
10
+ // its own WG4 edge, so the control reads as one quiet, premium switcher.
11
+ "inline-flex items-center gap-0.5 border border-border bg-background p-0.5",
13
12
  {
14
13
  variants: {
15
14
  size: {
@@ -21,10 +20,10 @@ const D = c(
21
20
  defaultVariants: { size: "md" }
22
21
  }
23
22
  ), k = c(
24
- o(
23
+ a(
25
24
  // The active segment is a shared motion thumb that SLIDES between options
26
25
  // (layoutId), so the option itself only carries text color.
27
- "relative inline-flex items-center justify-center whitespace-nowrap text-m font-normal select-none",
26
+ "relative inline-flex items-center justify-center whitespace-nowrap text-m select-none",
28
27
  "transition-colors duration-150 cursor-pointer",
29
28
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
30
29
  "disabled:pointer-events-none disabled:opacity-50"
@@ -32,44 +31,44 @@ const D = c(
32
31
  {
33
32
  variants: {
34
33
  size: {
35
- sm: "h-6 rounded-sm px-2.5",
36
- md: "h-8 rounded-md px-3",
37
- lg: "h-9 rounded-md px-4"
34
+ sm: "h-6 rounded-xs px-2.5",
35
+ md: "h-7.5 rounded-sm px-3",
36
+ lg: "h-8.5 rounded-sm px-4"
38
37
  },
39
38
  selected: {
40
- true: "text-brand-foreground",
41
- false: "text-muted-foreground hover:text-brand-text"
39
+ true: "font-medium text-foreground",
40
+ false: "font-normal text-muted-foreground hover:text-foreground"
42
41
  }
43
42
  },
44
43
  defaultVariants: { size: "md", selected: !1 }
45
44
  }
46
- ), I = l.forwardRef(({ options: t, value: a, onChange: s, size: i, className: m, elevated: u = !0, ...f }, b) => {
47
- const p = l.useId(), d = (e) => {
48
- const r = t.findIndex((h) => h.value === a), g = ((r < 0 ? 0 : r) + e + t.length) % t.length;
45
+ ), D = l.forwardRef(({ options: t, value: o, onChange: s, size: d, className: m, elevated: I, ...u }, f) => {
46
+ const b = l.useId(), i = (e) => {
47
+ const r = t.findIndex((p) => p.value === o), g = ((r < 0 ? 0 : r) + e + t.length) % t.length;
49
48
  s(t[g].value);
50
49
  };
51
50
  return /* @__PURE__ */ n(
52
51
  "div",
53
52
  {
54
- ref: b,
53
+ ref: f,
55
54
  role: "radiogroup",
56
55
  onKeyDown: (e) => {
57
56
  switch (e.key) {
58
57
  case "ArrowRight":
59
58
  case "ArrowDown":
60
- e.preventDefault(), d(1);
59
+ e.preventDefault(), i(1);
61
60
  break;
62
61
  case "ArrowLeft":
63
62
  case "ArrowUp":
64
- e.preventDefault(), d(-1);
63
+ e.preventDefault(), i(-1);
65
64
  break;
66
65
  }
67
66
  },
68
- className: o(D({ size: i }), m),
69
- ...f,
67
+ className: a(y({ size: d }), m),
68
+ ...u,
70
69
  children: /* @__PURE__ */ n(v, { reducedMotion: "user", children: t.map((e) => {
71
- const r = e.value === a;
72
- return /* @__PURE__ */ x(
70
+ const r = e.value === o;
71
+ return /* @__PURE__ */ h(
73
72
  "button",
74
73
  {
75
74
  type: "button",
@@ -78,18 +77,17 @@ const D = c(
78
77
  "aria-label": e.ariaLabel,
79
78
  tabIndex: r ? 0 : -1,
80
79
  onClick: () => s(e.value),
81
- className: k({ size: i, selected: r }),
80
+ className: k({ size: d, selected: r }),
82
81
  children: [
83
82
  r && /* @__PURE__ */ n(
84
- w.span,
83
+ x.span,
85
84
  {
86
- layoutId: p,
85
+ layoutId: b,
87
86
  "aria-hidden": !0,
88
- layoutDependency: a,
89
- transition: y,
90
- className: o(
91
- "absolute inset-0 rounded-[inherit] bg-brand",
92
- u && "shadow-elevation"
87
+ layoutDependency: o,
88
+ transition: w,
89
+ className: a(
90
+ "absolute inset-0 rounded-[inherit] border border-border bg-card"
93
91
  )
94
92
  }
95
93
  ),
@@ -102,7 +100,7 @@ const D = c(
102
100
  }
103
101
  );
104
102
  });
105
- I.displayName = "SegmentedControl";
103
+ D.displayName = "SegmentedControl";
106
104
  export {
107
- I as SegmentedControl
105
+ D as SegmentedControl
108
106
  };
@@ -61,7 +61,7 @@ const te = G(
61
61
  },
62
62
  className: b(
63
63
  "pointer-events-auto min-w-[280px] max-h-60 overflow-auto p-1",
64
- "rounded-md border border-input bg-elevated shadow-elevation",
64
+ "rounded-md border border-input bg-elevated",
65
65
  $
66
66
  ),
67
67
  children: [
@@ -220,7 +220,7 @@ const re = n.forwardRef(
220
220
  },
221
221
  className: b(
222
222
  "pointer-events-auto max-h-60 overflow-auto p-1",
223
- "rounded-md border border-border bg-elevated shadow-elevation",
223
+ "rounded-md border border-border bg-elevated",
224
224
  m ? "fixed" : b(
225
225
  "absolute z-50 w-full",
226
226
  x === "top" ? "bottom-full mb-1.5" : "top-full mt-1.5"
@@ -1,36 +1,36 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
3
- import * as i from "react";
2
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
3
+ import * as c from "react";
4
4
  import { cn as s } from "../lib/cn.js";
5
- import { Button as g } from "./button.js";
6
- const p = i.forwardRef(
5
+ import { Button as p } from "./button.js";
6
+ const b = c.forwardRef(
7
7
  ({
8
- className: r,
9
- selectedCount: o,
10
- selectedLabel: t,
11
- actions: n,
8
+ className: t,
9
+ selectedCount: a,
10
+ selectedLabel: i,
11
+ actions: r,
12
12
  onClear: e,
13
- clearLabel: l = "Clear",
13
+ clearLabel: d = "Clear",
14
14
  ...m
15
- }, f) => /* @__PURE__ */ c(
15
+ }, h) => /* @__PURE__ */ o(
16
16
  "div",
17
17
  {
18
- ref: f,
18
+ ref: h,
19
19
  className: s(
20
- "flex items-center gap-3 rounded-lg bg-brand px-3 py-2 text-s text-brand-foreground",
21
- r
20
+ "flex items-center gap-3 rounded-lg bg-wg12 px-3 py-2 text-s text-white",
21
+ t
22
22
  ),
23
23
  ...m,
24
24
  children: [
25
- /* @__PURE__ */ a("span", { className: "font-normal tabular-nums", children: t ?? `${o} selected` }),
26
- /* @__PURE__ */ c("div", { className: "ml-auto flex items-center gap-1", children: [
27
- n,
28
- e && /* @__PURE__ */ a(
29
- d,
25
+ /* @__PURE__ */ n("span", { className: "font-normal tabular-nums", children: i ?? `${a} selected` }),
26
+ /* @__PURE__ */ o("div", { className: "ml-auto flex items-center gap-1", children: [
27
+ r,
28
+ e && /* @__PURE__ */ n(
29
+ l,
30
30
  {
31
31
  onClick: e,
32
- className: "text-brand-foreground",
33
- children: l
32
+ className: "text-white",
33
+ children: d
34
34
  }
35
35
  )
36
36
  ] })
@@ -38,22 +38,23 @@ const p = i.forwardRef(
38
38
  }
39
39
  )
40
40
  );
41
- p.displayName = "SelectionActionBar";
42
- const d = i.forwardRef(({ className: r, variant: o = "ghost", size: t = "xs", ...n }, e) => /* @__PURE__ */ a(
43
- g,
41
+ b.displayName = "SelectionActionBar";
42
+ const l = c.forwardRef(({ className: t, variant: a = "ghost", size: i = "xs", ...r }, e) => /* @__PURE__ */ n(
43
+ p,
44
44
  {
45
45
  ref: e,
46
- variant: o,
47
- size: t,
46
+ variant: a,
47
+ size: i,
48
48
  className: s(
49
- "text-brand-foreground hover:bg-brand-hover hover:text-brand-foreground focus-visible:ring-brand-foreground",
50
- r
49
+ // Neutral black dock: actions wash 12% White on hover, no outline.
50
+ "text-white enabled:hover:border-transparent enabled:hover:bg-white/12 enabled:hover:text-white enabled:active:border-transparent enabled:active:bg-white/12 focus-visible:ring-white",
51
+ t
51
52
  ),
52
- ...n
53
+ ...r
53
54
  }
54
55
  ));
55
- d.displayName = "SelectionActionBarAction";
56
+ l.displayName = "SelectionActionBarAction";
56
57
  export {
57
- p as SelectionActionBar,
58
- d as SelectionActionBarAction
58
+ b as SelectionActionBar,
59
+ l as SelectionActionBarAction
59
60
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
- import * as f from "react";
4
- import { cva as p } from "class-variance-authority";
2
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import { cva as u } from "class-variance-authority";
5
5
  import { cn as s } from "../lib/cn.js";
6
- const g = p(
6
+ const g = u(
7
7
  [
8
8
  "relative flex w-full items-center gap-3 rounded-md bg-transparent px-4 py-3 text-left",
9
9
  "after:pointer-events-none after:absolute after:inset-x-4 after:bottom-0 after:z-20",
@@ -18,10 +18,10 @@ const g = p(
18
18
  },
19
19
  defaultVariants: { isPressable: !1 }
20
20
  }
21
- ), v = f.forwardRef(
21
+ ), v = d.forwardRef(
22
22
  ({ className: a, icon: r, label: t, description: n, action: i, onSelect: o, ...c }, m) => {
23
23
  const l = !!o;
24
- return /* @__PURE__ */ d(
24
+ return /* @__PURE__ */ f(
25
25
  "div",
26
26
  {
27
27
  ref: m,
@@ -38,7 +38,7 @@ const g = p(
38
38
  className: s(
39
39
  "absolute inset-0 rounded-md outline-none",
40
40
  "transition-[background-color,transform] duration-150 ease-out",
41
- "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
41
+ "hover:bg-wg2 focus-visible:ring-3 focus-visible:ring-ring",
42
42
  "active:scale-[0.97] motion-reduce:transition-none"
43
43
  )
44
44
  }
@@ -51,7 +51,7 @@ const g = p(
51
51
  children: r
52
52
  }
53
53
  ),
54
- /* @__PURE__ */ d("div", { className: "relative z-10 flex min-w-0 flex-1 flex-col gap-0.5 pointer-events-none", children: [
54
+ /* @__PURE__ */ f("div", { className: "relative z-10 flex min-w-0 flex-1 flex-col gap-0.5 pointer-events-none", children: [
55
55
  /* @__PURE__ */ e("div", { className: "min-w-0 text-base text-foreground wrap-break-word", children: t }),
56
56
  n && /* @__PURE__ */ e("div", { className: "min-w-0 text-xs text-tertiary", children: n })
57
57
  ] }),
@@ -61,7 +61,7 @@ const g = p(
61
61
  "span",
62
62
  {
63
63
  className: "relative z-20 shrink-0",
64
- onClick: (u) => u.stopPropagation(),
64
+ onClick: (p) => p.stopPropagation(),
65
65
  children: i
66
66
  }
67
67
  )
@@ -71,7 +71,7 @@ const g = p(
71
71
  }
72
72
  );
73
73
  v.displayName = "SettingRow";
74
- const x = f.forwardRef(
74
+ const x = d.forwardRef(
75
75
  ({ className: a, ...r }, t) => /* @__PURE__ */ e(
76
76
  "div",
77
77
  {