@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
package/components/popover.js
CHANGED
|
@@ -1,99 +1,109 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
2
|
+
import { jsx as b, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { createPortal as L } from "react-dom";
|
|
5
|
+
import { MotionConfig as R, AnimatePresence as k, motion as C } from "motion/react";
|
|
6
6
|
import { cn as z } from "../lib/cn.js";
|
|
7
|
-
import { floatVariants as
|
|
8
|
-
import { Ripple as
|
|
7
|
+
import { floatVariants as j } from "../lib/motion.js";
|
|
8
|
+
import { Ripple as A } from "./ripple.js";
|
|
9
9
|
const x = {
|
|
10
10
|
start: "top left",
|
|
11
11
|
center: "top",
|
|
12
12
|
end: "top right"
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
-
const e =
|
|
13
|
+
}, E = r.createContext(null);
|
|
14
|
+
function P(d) {
|
|
15
|
+
const e = r.useContext(E);
|
|
16
16
|
if (!e)
|
|
17
|
-
throw new Error(`${
|
|
17
|
+
throw new Error(`${d} must be used within a <Popover>.`);
|
|
18
18
|
return e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
function K({
|
|
21
|
+
children: d,
|
|
22
|
+
defaultOpen: e = !1,
|
|
23
|
+
open: n,
|
|
24
|
+
onOpenChange: i
|
|
25
|
+
}) {
|
|
26
|
+
const [u, m] = r.useState(e), t = n ?? u, s = r.useCallback(
|
|
27
|
+
(a) => {
|
|
28
|
+
n === void 0 && m(a), i == null || i(a);
|
|
29
|
+
},
|
|
30
|
+
[n, i]
|
|
31
|
+
), f = r.useRef(null);
|
|
32
|
+
return /* @__PURE__ */ b(E.Provider, { value: { open: t, setOpen: s, triggerRef: f }, children: d });
|
|
23
33
|
}
|
|
24
|
-
function
|
|
25
|
-
const { open: e, setOpen:
|
|
26
|
-
return
|
|
27
|
-
ref:
|
|
34
|
+
function N({ children: d }) {
|
|
35
|
+
const { open: e, setOpen: n, triggerRef: i } = P("PopoverTrigger"), u = d;
|
|
36
|
+
return r.cloneElement(u, {
|
|
37
|
+
ref: i,
|
|
28
38
|
"aria-expanded": e,
|
|
29
39
|
"aria-haspopup": !0,
|
|
30
|
-
onClick: (
|
|
31
|
-
var
|
|
32
|
-
(
|
|
40
|
+
onClick: (m) => {
|
|
41
|
+
var t, s;
|
|
42
|
+
(s = (t = u.props).onClick) == null || s.call(t, m), n(!e);
|
|
33
43
|
}
|
|
34
44
|
});
|
|
35
45
|
}
|
|
36
|
-
function
|
|
37
|
-
className:
|
|
46
|
+
function U({
|
|
47
|
+
className: d,
|
|
38
48
|
align: e = "start",
|
|
39
|
-
sideOffset:
|
|
40
|
-
children:
|
|
41
|
-
"aria-label":
|
|
42
|
-
...
|
|
49
|
+
sideOffset: n = 8,
|
|
50
|
+
children: i,
|
|
51
|
+
"aria-label": u = "Popover",
|
|
52
|
+
...m
|
|
43
53
|
}) {
|
|
44
|
-
const { open:
|
|
45
|
-
return
|
|
46
|
-
if (!
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
49
|
-
const
|
|
50
|
-
var
|
|
51
|
-
const
|
|
52
|
-
let
|
|
53
|
-
e === "center" ?
|
|
54
|
+
const { open: t, setOpen: s, triggerRef: f } = P("PopoverContent"), a = r.useRef(null), [l, h] = r.useState(null);
|
|
55
|
+
return r.useLayoutEffect(() => {
|
|
56
|
+
if (!t) return;
|
|
57
|
+
const v = f.current;
|
|
58
|
+
if (!v) return;
|
|
59
|
+
const c = () => {
|
|
60
|
+
var g;
|
|
61
|
+
const o = v.getBoundingClientRect(), w = ((g = a.current) == null ? void 0 : g.offsetWidth) ?? 0;
|
|
62
|
+
let p = o.left;
|
|
63
|
+
e === "center" ? p = o.left + o.width / 2 - w / 2 : e === "end" && (p = o.right - w), h({ top: o.bottom + n, left: p });
|
|
54
64
|
};
|
|
55
|
-
return
|
|
56
|
-
window.removeEventListener("resize",
|
|
65
|
+
return c(), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), () => {
|
|
66
|
+
window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0);
|
|
57
67
|
};
|
|
58
|
-
}, [
|
|
59
|
-
if (!
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
var
|
|
64
|
-
const
|
|
65
|
-
(
|
|
68
|
+
}, [t, e, n, f]), r.useEffect(() => {
|
|
69
|
+
if (!t) return;
|
|
70
|
+
const v = (o) => {
|
|
71
|
+
o.key === "Escape" && s(!1);
|
|
72
|
+
}, c = (o) => {
|
|
73
|
+
var p, g;
|
|
74
|
+
const w = o.target;
|
|
75
|
+
(p = a.current) != null && p.contains(w) || (g = f.current) != null && g.contains(w) || s(!1);
|
|
66
76
|
};
|
|
67
|
-
return document.addEventListener("keydown",
|
|
68
|
-
document.removeEventListener("keydown",
|
|
77
|
+
return document.addEventListener("keydown", v), document.addEventListener("pointerdown", c), () => {
|
|
78
|
+
document.removeEventListener("keydown", v), document.removeEventListener("pointerdown", c);
|
|
69
79
|
};
|
|
70
|
-
}, [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
80
|
+
}, [t, s, f]), L(
|
|
81
|
+
/* @__PURE__ */ b(R, { reducedMotion: "user", children: /* @__PURE__ */ b(k, { children: t && /* @__PURE__ */ y(
|
|
82
|
+
C.div,
|
|
73
83
|
{
|
|
74
|
-
ref:
|
|
84
|
+
ref: a,
|
|
75
85
|
role: "dialog",
|
|
76
|
-
"aria-label":
|
|
77
|
-
variants:
|
|
86
|
+
"aria-label": u,
|
|
87
|
+
variants: j,
|
|
78
88
|
initial: "hidden",
|
|
79
89
|
animate: "visible",
|
|
80
90
|
exit: "hidden",
|
|
81
91
|
style: {
|
|
82
92
|
position: "fixed",
|
|
83
|
-
top: (
|
|
84
|
-
left: (
|
|
85
|
-
visibility:
|
|
93
|
+
top: (l == null ? void 0 : l.top) ?? 0,
|
|
94
|
+
left: (l == null ? void 0 : l.left) ?? 0,
|
|
95
|
+
visibility: l ? "visible" : "hidden",
|
|
86
96
|
transformOrigin: x[e]
|
|
87
97
|
},
|
|
88
98
|
className: z(
|
|
89
99
|
"relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-3",
|
|
90
100
|
"text-xs text-foreground",
|
|
91
|
-
|
|
101
|
+
d
|
|
92
102
|
),
|
|
93
|
-
...
|
|
103
|
+
...m,
|
|
94
104
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
105
|
+
/* @__PURE__ */ b(A, { origin: x[e] }),
|
|
106
|
+
i
|
|
97
107
|
]
|
|
98
108
|
}
|
|
99
109
|
) }) }),
|
|
@@ -101,7 +111,7 @@ function N({
|
|
|
101
111
|
);
|
|
102
112
|
}
|
|
103
113
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
K as Popover,
|
|
115
|
+
U as PopoverContent,
|
|
116
|
+
N as PopoverTrigger
|
|
107
117
|
};
|
package/components/sidebar.d.ts
CHANGED
|
@@ -63,6 +63,21 @@ export interface SidebarBrandProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
63
63
|
* `SidebarHeader`.
|
|
64
64
|
*/
|
|
65
65
|
export declare function SidebarBrand({ logo, href, label, showTrigger, children, className, ...props }: SidebarBrandProps): React.JSX.Element;
|
|
66
|
+
export interface SidebarWorkspaceProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
67
|
+
/** Customer workspace name. Also the logo's alt text and the tile initial. */
|
|
68
|
+
name: string;
|
|
69
|
+
/** Customer logo URL. Without it, a WG12 letter tile shows the initial. */
|
|
70
|
+
logoSrc?: string;
|
|
71
|
+
/** Show the name beside the mark. Always hidden in the collapsed rail. Default true. */
|
|
72
|
+
showName?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Customer workspace branding for the rail's top-left brand slot: a 32px
|
|
76
|
+
* customer logo (or a WG12 letter tile when no logo is given) and the
|
|
77
|
+
* workspace name, which truncates and hides in the collapsed rail. Pass it as
|
|
78
|
+
* `SidebarBrand`'s `logo`.
|
|
79
|
+
*/
|
|
80
|
+
export declare const SidebarWorkspace: React.ForwardRefExoticComponent<SidebarWorkspaceProps & React.RefAttributes<HTMLSpanElement>>;
|
|
66
81
|
export declare const SidebarHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
67
82
|
export declare const SidebarNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
68
83
|
export interface SidebarSectionProps extends React.HTMLAttributes<HTMLDivElement> {
|