@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.
- package/DESIGN.md +125 -50
- package/README.md +31 -7
- package/components/answer.js +1 -1
- package/components/assistant-ui/composer-harness.js +14 -10
- package/components/body-page-header.d.ts +9 -4
- package/components/body-page-header.js +10 -10
- package/components/breadcrumbs.js +15 -15
- package/components/button.d.ts +16 -1
- package/components/button.js +7 -4
- package/components/card.js +18 -18
- package/components/chart.d.ts +40 -4
- package/components/chart.js +824 -628
- package/components/chip.d.ts +2 -1
- package/components/chip.js +49 -46
- package/components/collection-header.js +4 -4
- package/components/connector-card.js +30 -30
- package/components/date-range-picker.js +1 -1
- package/components/detail-list.d.ts +28 -0
- package/components/detail-list.js +52 -0
- package/components/drawer.d.ts +38 -15
- package/components/drawer.js +150 -86
- package/components/empty-state.d.ts +3 -2
- package/components/empty-state.js +22 -22
- package/components/field.d.ts +16 -0
- package/components/field.js +63 -42
- package/components/file-dropzone.d.ts +15 -4
- package/components/file-dropzone.js +100 -64
- package/components/filter-bar.d.ts +44 -0
- package/components/filter-bar.js +89 -0
- package/components/filters.d.ts +37 -0
- package/components/filters.js +129 -0
- package/components/index.d.ts +4 -0
- package/components/index.js +526 -510
- package/components/input-field.d.ts +1 -1
- package/components/input-field.js +24 -22
- package/components/modal.d.ts +2 -1
- package/components/modal.js +120 -106
- package/components/panel.js +26 -27
- package/components/popover.d.ts +6 -1
- package/components/popover.js +74 -64
- package/components/sidebar.d.ts +15 -0
- package/components/sidebar.js +166 -129
- package/components/sparkline.d.ts +30 -0
- package/components/sparkline.js +69 -0
- package/components/table.d.ts +8 -0
- package/components/table.js +357 -350
- package/components/tabs.d.ts +6 -1
- package/components/tabs.js +28 -31
- package/demo/components/add-to-artifact.js +6 -2
- package/examples/README.md +5 -2
- package/examples/call-logs-screen.tsx +381 -0
- package/examples/campaign-analysis-screen.tsx +180 -0
- package/examples/campaigns-screen.tsx +497 -0
- package/examples/guardrails-settings-screen.tsx +123 -0
- package/fonts/geist-variable.woff2 +0 -0
- package/fonts.css +12 -17
- package/lib/icons.js +3 -3
- package/llms.txt +162 -30
- package/manifest.json +11604 -7878
- package/package.json +1 -1
- package/styles.css +102 -59
- package/theme.css +81 -37
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
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, ...
|
|
19
|
-
const
|
|
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
|
-
|
|
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(
|
|
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__ */
|
|
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
|
-
...
|
|
47
|
+
...h,
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ t("ol", { className: "flex min-w-0 shrink items-center gap-1.5 text-
|
|
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 },
|
|
62
|
-
const { count: o } = r.useContext(N),
|
|
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-
|
|
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__ */
|
|
84
|
+
return /* @__PURE__ */ b(
|
|
85
85
|
"li",
|
|
86
86
|
{
|
|
87
|
-
ref:
|
|
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
|
-
!
|
|
96
|
+
!x && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "shrink-0 select-none text-border-strong", children: "/" })
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
);
|
package/components/button.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/components/button.js
CHANGED
|
@@ -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
|
-
//
|
|
36
|
-
|
|
37
|
-
sm
|
|
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-
|
|
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"
|
package/components/card.js
CHANGED
|
@@ -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:
|
|
6
|
+
({ className: e, isHoverable: a, isPressable: r, children: s, ...n }, i) => {
|
|
7
7
|
const c = o(
|
|
8
|
-
"bg-card text-card-foreground
|
|
9
|
-
(
|
|
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
|
-
|
|
11
|
+
e
|
|
12
12
|
);
|
|
13
|
-
return
|
|
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:
|
|
32
|
+
const f = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
ref:
|
|
36
|
-
className: o("flex flex-col gap-1 px-5 pt-5",
|
|
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:
|
|
41
|
+
const m = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
42
42
|
"h3",
|
|
43
43
|
{
|
|
44
|
-
ref:
|
|
45
|
-
className: o("text-base font-medium leading-none",
|
|
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:
|
|
50
|
+
const p = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
51
51
|
"p",
|
|
52
52
|
{
|
|
53
|
-
ref:
|
|
54
|
-
className: o("text-xs text-muted-foreground",
|
|
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:
|
|
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:
|
|
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
|
-
|
|
69
|
+
e
|
|
70
70
|
),
|
|
71
|
-
...
|
|
71
|
+
...r
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
);
|
package/components/chart.d.ts
CHANGED
|
@@ -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
|
|
107
|
-
* series
|
|
108
|
-
*
|
|
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
|
-
/**
|
|
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 {
|