@actioneer/ads 1.0.8 → 1.0.10

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 (64) hide show
  1. package/DESIGN.md +125 -50
  2. package/README.md +31 -7
  3. package/components/answer.js +1 -1
  4. package/components/assistant-ui/composer-harness.js +14 -10
  5. package/components/body-page-header.d.ts +9 -4
  6. package/components/body-page-header.js +10 -10
  7. package/components/breadcrumbs.js +15 -15
  8. package/components/button.d.ts +16 -1
  9. package/components/button.js +7 -4
  10. package/components/card.js +18 -18
  11. package/components/chart.d.ts +40 -4
  12. package/components/chart.js +824 -628
  13. package/components/chip.d.ts +2 -1
  14. package/components/chip.js +49 -46
  15. package/components/collection-header.js +4 -4
  16. package/components/connector-card.js +30 -30
  17. package/components/date-range-picker.js +1 -1
  18. package/components/detail-list.d.ts +28 -0
  19. package/components/detail-list.js +52 -0
  20. package/components/drawer.d.ts +38 -15
  21. package/components/drawer.js +150 -86
  22. package/components/empty-state.d.ts +3 -2
  23. package/components/empty-state.js +22 -22
  24. package/components/field.d.ts +16 -0
  25. package/components/field.js +63 -42
  26. package/components/file-dropzone.d.ts +15 -4
  27. package/components/file-dropzone.js +100 -64
  28. package/components/filter-bar.d.ts +44 -0
  29. package/components/filter-bar.js +89 -0
  30. package/components/filters.d.ts +37 -0
  31. package/components/filters.js +129 -0
  32. package/components/index.d.ts +4 -0
  33. package/components/index.js +526 -510
  34. package/components/input-field.d.ts +1 -1
  35. package/components/input-field.js +24 -22
  36. package/components/modal.d.ts +2 -1
  37. package/components/modal.js +120 -106
  38. package/components/panel.js +26 -27
  39. package/components/popover.d.ts +6 -1
  40. package/components/popover.js +74 -64
  41. package/components/sidebar.d.ts +15 -0
  42. package/components/sidebar.js +166 -129
  43. package/components/sparkline.d.ts +30 -0
  44. package/components/sparkline.js +69 -0
  45. package/components/table.d.ts +8 -0
  46. package/components/table.js +357 -350
  47. package/components/tabs.d.ts +6 -1
  48. package/components/tabs.js +28 -31
  49. package/demo/components/add-to-artifact.js +6 -2
  50. package/examples/README.md +5 -2
  51. package/examples/call-logs-screen.tsx +381 -0
  52. package/examples/campaign-analysis-screen.tsx +180 -0
  53. package/examples/campaigns-screen.tsx +497 -0
  54. package/examples/guardrails-settings-screen.tsx +123 -0
  55. package/fonts/geist-variable.woff2 +0 -0
  56. package/fonts.css +12 -17
  57. package/lib/icons.js +3 -3
  58. package/llms.txt +162 -30
  59. package/manifest.json +11604 -7878
  60. package/package.json +1 -1
  61. package/styles.css +102 -59
  62. package/theme.css +81 -37
  63. package/fonts/aribau-grotesk-medium.woff2 +0 -0
  64. package/fonts/aribau-grotesk-regular.woff2 +0 -0
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as x, jsx as t, Fragment as k } from "react/jsx-runtime";
2
+ import { jsxs as b, jsx as t, Fragment as k } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import { cn as d } from "../lib/cn.js";
5
5
  const N = r.createContext({
@@ -15,18 +15,18 @@ function B(a) {
15
15
  return null;
16
16
  }
17
17
  const C = r.forwardRef(
18
- ({ className: a, children: n, sticky: e, actions: i, center: c, meta: f, ...p }, o) => {
19
- const h = r.Children.toArray(n), b = r.useRef(null), m = r.useCallback(
18
+ ({ className: a, children: n, sticky: e, actions: i, center: c, meta: f, ...h }, o) => {
19
+ const p = r.Children.toArray(n), x = r.useRef(null), m = r.useCallback(
20
20
  (s) => {
21
- b.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
21
+ x.current = s, typeof o == "function" ? o(s) : o && (o.current = s);
22
22
  },
23
23
  [o]
24
24
  ), [l, g] = r.useState(!1);
25
25
  return r.useEffect(() => {
26
26
  if (!e) return;
27
- const s = B(b.current), u = s ?? window, v = () => g((s ? s.scrollTop : window.scrollY) > 2);
27
+ const s = B(x.current), u = s ?? window, v = () => g((s ? s.scrollTop : window.scrollY) > 2);
28
28
  return v(), u.addEventListener("scroll", v, { passive: !0 }), () => u.removeEventListener("scroll", v);
29
- }, [e]), /* @__PURE__ */ x(
29
+ }, [e]), /* @__PURE__ */ b(
30
30
  "nav",
31
31
  {
32
32
  ref: m,
@@ -44,10 +44,10 @@ const C = r.forwardRef(
44
44
  e && (l ? "border-b border-border" : "border-b border-transparent"),
45
45
  a
46
46
  ),
47
- ...p,
47
+ ...h,
48
48
  children: [
49
- /* @__PURE__ */ x("div", { className: "flex min-w-0 shrink items-baseline", children: [
50
- /* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-base", children: /* @__PURE__ */ t(N.Provider, { value: { count: h.length }, children: h.map((s, u) => /* @__PURE__ */ t(w.Provider, { value: u, children: s }, u)) }) }),
49
+ /* @__PURE__ */ b("div", { className: "flex min-w-0 shrink items-baseline", children: [
50
+ /* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 font-heading text-xl", children: /* @__PURE__ */ t(N.Provider, { value: { count: p.length }, children: p.map((s, u) => /* @__PURE__ */ t(w.Provider, { value: u, children: s }, u)) }) }),
51
51
  f && /* @__PURE__ */ t("div", { className: "ml-3 flex shrink-0 items-baseline gap-3 text-s text-tertiary", children: f })
52
52
  ] }),
53
53
  c && /* @__PURE__ */ t("div", { className: "absolute left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 items-center", children: c }),
@@ -58,15 +58,15 @@ const C = r.forwardRef(
58
58
  }
59
59
  );
60
60
  C.displayName = "Breadcrumbs";
61
- const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children: c, ...f }, p) => {
62
- const { count: o } = r.useContext(N), b = r.useContext(w) === o - 1, m = "inline-flex items-center gap-1.5", l = /* @__PURE__ */ x(k, { children: [
61
+ const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children: c, ...f }, h) => {
62
+ const { count: o } = r.useContext(N), x = r.useContext(w) === o - 1, m = "inline-flex items-center gap-1.5", l = /* @__PURE__ */ b(k, { children: [
63
63
  i && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "flex shrink-0 items-center [&_svg]:size-4", children: i }),
64
64
  e ? /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: c }) : c
65
65
  ] }), g = e ? /* @__PURE__ */ t(
66
66
  "span",
67
67
  {
68
68
  "aria-current": "page",
69
- className: d(m, "min-w-0 text-base font-medium text-primary"),
69
+ className: d(m, "min-w-0 text-xl font-medium text-primary"),
70
70
  children: l
71
71
  }
72
72
  ) : n ? /* @__PURE__ */ t(
@@ -81,10 +81,10 @@ const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children
81
81
  children: l
82
82
  }
83
83
  ) : /* @__PURE__ */ t("span", { className: d(m, "text-muted-foreground"), children: l });
84
- return /* @__PURE__ */ x(
84
+ return /* @__PURE__ */ b(
85
85
  "li",
86
86
  {
87
- ref: p,
87
+ ref: h,
88
88
  className: d(
89
89
  "flex items-center gap-1.5",
90
90
  e ? "min-w-0 shrink" : "shrink-0",
@@ -93,7 +93,7 @@ const R = r.forwardRef(({ className: a, href: n, isCurrent: e, icon: i, children
93
93
  ...f,
94
94
  children: [
95
95
  g,
96
- !b && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
96
+ !x && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
97
97
  ]
98
98
  }
99
99
  );
@@ -4,7 +4,22 @@ export declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "danger" | "outline" | "solid" | "secondary" | "ghost" | null | undefined;
5
5
  size?: "xs" | "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-xs" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
7
+ /** Every accepted `size` value, including the deprecated aliases. */
8
+ export type ButtonSize = "md" | "lg" | "icon" | "icon-sm" | "icon-xs"
9
+ /** @deprecated Renders identically to `md` (32px). Use `md`. */
10
+ | "xs"
11
+ /** @deprecated Renders identically to `md` (32px). Use `md`. */
12
+ | "sm";
13
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Omit<VariantProps<typeof buttonVariants>, "size"> {
14
+ /**
15
+ * Button height. ADS has exactly two text-button heights: `md` (32px, the
16
+ * default) and `lg` (48px, 20px inline padding, radius-l). Icon-only sizes
17
+ * (`icon`, `icon-sm`, `icon-xs`) stay 32px tall.
18
+ *
19
+ * `xs` and `sm` are deprecated aliases kept for backward compatibility —
20
+ * they render identically to `md`.
21
+ */
22
+ size?: ButtonSize | null;
8
23
  isLoading?: boolean;
9
24
  startContent?: React.ReactNode;
10
25
  endContent?: React.ReactNode;
@@ -32,11 +32,14 @@ const x = v(
32
32
  danger: "bg-danger text-danger-foreground enabled:hover:bg-danger/90 enabled:active:bg-danger/90 focus-visible:ring-danger/40"
33
33
  },
34
34
  size: {
35
- // Each size has its own height; the 14px Medium label never changes.
36
- xs: "h-6 rounded-sm px-2 [&_svg]:size-3.5",
37
- sm: "h-7 rounded-sm px-3 [&_svg]:size-4",
35
+ // ADS has exactly two button heights: md (32px, default) and lg
36
+ // (48px). The 14px Medium label never changes between them.
37
+ // xs/sm are deprecated aliases kept for backward compatibility —
38
+ // they render identically to md.
39
+ xs: "h-8 rounded-md px-3.5 [&_svg]:size-4",
40
+ sm: "h-8 rounded-md px-3.5 [&_svg]:size-4",
38
41
  md: "h-8 rounded-md px-3.5 [&_svg]:size-4",
39
- lg: "h-10 rounded-md px-5 [&_svg]:size-5",
42
+ lg: "h-12 rounded-lg px-5 [&_svg]:size-5",
40
43
  icon: "h-8 w-9 rounded-md [&_svg]:size-4",
41
44
  "icon-sm": "h-8 w-8 rounded-sm [&_svg]:size-4",
42
45
  "icon-xs": "h-8 w-7 rounded-sm [&_svg]:size-4"
@@ -3,14 +3,14 @@ import { jsx as t } from "react/jsx-runtime";
3
3
  import * as d from "react";
4
4
  import { cn as o } from "../lib/cn.js";
5
5
  const l = d.forwardRef(
6
- ({ className: r, isHoverable: a, isPressable: e, children: s, ...n }, i) => {
6
+ ({ className: e, isHoverable: a, isPressable: r, children: s, ...n }, i) => {
7
7
  const c = o(
8
- "bg-card text-card-foreground rounded-xl",
9
- (e || a) && "transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
8
+ "rounded-card border border-border bg-card text-card-foreground shadow-card",
9
+ (r || a) && "transition-[box-shadow,transform] duration-150 ease-out motion-reduce:transition-none",
10
10
  a && "hover:-translate-y-0.5",
11
- r
11
+ e
12
12
  );
13
- return e ? /* @__PURE__ */ t(
13
+ return r ? /* @__PURE__ */ t(
14
14
  "button",
15
15
  {
16
16
  ref: i,
@@ -29,46 +29,46 @@ const l = d.forwardRef(
29
29
  }
30
30
  );
31
31
  l.displayName = "Card";
32
- const f = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
32
+ const f = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
33
33
  "div",
34
34
  {
35
- ref: e,
36
- className: o("flex flex-col gap-1 px-5 pt-5", r),
35
+ ref: r,
36
+ className: o("flex flex-col gap-1 px-5 pt-5", e),
37
37
  ...a
38
38
  }
39
39
  ));
40
40
  f.displayName = "CardHeader";
41
- const m = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
41
+ const m = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
42
42
  "h3",
43
43
  {
44
- ref: e,
45
- className: o("text-base font-medium leading-none", r),
44
+ ref: r,
45
+ className: o("text-base font-medium leading-none", e),
46
46
  ...a
47
47
  }
48
48
  ));
49
49
  m.displayName = "CardTitle";
50
- const p = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
50
+ const p = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
51
51
  "p",
52
52
  {
53
- ref: e,
54
- className: o("text-xs text-muted-foreground", r),
53
+ ref: r,
54
+ className: o("text-xs text-muted-foreground", e),
55
55
  ...a
56
56
  }
57
57
  ));
58
58
  p.displayName = "CardDescription";
59
- const u = d.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t("div", { ref: e, className: o("px-5 py-4", r), ...a }));
59
+ const u = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, className: o("px-5 py-4", e), ...a }));
60
60
  u.displayName = "CardBody";
61
61
  const x = d.forwardRef(
62
- ({ className: r, withBorder: a, ...e }, s) => /* @__PURE__ */ t(
62
+ ({ className: e, withBorder: a, ...r }, s) => /* @__PURE__ */ t(
63
63
  "div",
64
64
  {
65
65
  ref: s,
66
66
  className: o(
67
67
  "flex items-center px-5 pb-5 pt-4",
68
68
  a && "border-t border-border",
69
- r
69
+ e
70
70
  ),
71
- ...e
71
+ ...r
72
72
  }
73
73
  )
74
74
  );
@@ -2,6 +2,8 @@ import * as React from "react";
2
2
  /** One row of chart data. Gaps (null/undefined) render as breaks in the series. */
3
3
  export type ChartDatum = Record<string, string | number | null | undefined>;
4
4
  export type ChartColor = "primary" | "success" | "warning" | "danger" | "info";
5
+ /** Where a cartesian chart's series legend sits — see `BaseChartProps.legendPlacement`. */
6
+ export type ChartLegendPlacement = "header" | "top";
5
7
  /** Bounded Recharts domain surface — enough for fixed and data-driven axes. */
6
8
  export type ChartAxisDomain = [string | number, string | number];
7
9
  export type ChartTickFormatter = (value: string | number) => string | number;
@@ -82,6 +84,22 @@ interface BaseChartProps {
82
84
  grid?: boolean;
83
85
  /** Defaults to on when there is more than one series. */
84
86
  legend?: boolean;
87
+ /**
88
+ * Chart title, rendered in the chart's own header row (16px Medium). Spend
89
+ * the words on what the plot measures; scope goes in `subtitle`.
90
+ */
91
+ title?: React.ReactNode;
92
+ /** Scope line under the title — count, range, share (e.g. "442 calls · past 7 days"). */
93
+ subtitle?: React.ReactNode;
94
+ /**
95
+ * Where the series legend sits.
96
+ * • `"header"` — right-aligned at the end of the header row, opposite the
97
+ * title block, with 36px between the header and the plot. The default
98
+ * whenever a `title` or `subtitle` is set.
99
+ * • `"top"` — its own right-aligned row directly above the plot (12px
100
+ * gap). The default for an untitled chart (unchanged behavior).
101
+ */
102
+ legendPlacement?: ChartLegendPlacement;
85
103
  showYAxis?: boolean;
86
104
  formatValue?: (value: number) => string;
87
105
  /** Numeric/time x-axis scale. Time data must use numeric timestamps. */
@@ -103,11 +121,22 @@ export interface LineChartProps extends BaseChartProps {
103
121
  /** When set, only these series keys animate on mount/update. */
104
122
  animatedSeriesKeys?: string[];
105
123
  /**
106
- * Print each observation's value above its dot. On by default for a SINGLE
107
- * series (the reader shouldn't have to hover to read a number that fits);
108
- * off once there are several, where the labels would collide.
124
+ * Print each observation's value above its dot — ON by default for every
125
+ * series, so the numbers read without hovering (tooltips still work). The
126
+ * label takes its series color; light series (amber chart-2, grey chart-6,
127
+ * the context grey) use the secondary text color for contrast. Resting
128
+ * labels step aside while the plot is hovered. Pass `false` to opt out.
109
129
  */
110
130
  showValues?: boolean;
131
+ /**
132
+ * A soft wash under each observed line that fades from the series colour
133
+ * (20%) at the line down to nothing at the baseline — ON by default
134
+ * (user-mandated 2026-11-12, the Span trend-line look). It reads as the
135
+ * line's shadow, not as an area measurement: it never stacks, never takes a
136
+ * label or tooltip, and forecasts (dashed) stay unfilled. Pass `false` for
137
+ * bare lines.
138
+ */
139
+ gradientFill?: boolean;
111
140
  }
112
141
  export interface AreaChartProps extends BaseChartProps {
113
142
  curve?: "linear" | "natural" | "step";
@@ -123,7 +152,14 @@ export interface BarChartProps extends BaseChartProps {
123
152
  stacked?: boolean;
124
153
  /** Visual bar direction: vertical columns (default) or horizontal bars. */
125
154
  layout?: "vertical" | "horizontal";
126
- /** Print each bar's value past its end. On by default for a single series. */
155
+ /**
156
+ * Print values without hovering — ON by default (pass `false` to opt out).
157
+ * Single-series and grouped bars print their value past the bar's end in
158
+ * secondary text. Stacked bars print each segment's value centred inside it
159
+ * when the segment is at least 20px along the value axis (white ink on dark
160
+ * series, primary ink on light amber/grey), plus the stack total past the
161
+ * stack in Medium primary text. Tooltips still work on hover.
162
+ */
127
163
  showValues?: boolean;
128
164
  }
129
165
  export interface ComboChartProps extends BaseChartProps {