@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,99 +1,109 @@
1
1
  "use client";
2
- import { jsx as g, jsxs as C } from "react/jsx-runtime";
3
- import * as n from "react";
4
- import { createPortal as y } from "react-dom";
5
- import { MotionConfig as L, AnimatePresence as R, motion as k } from "motion/react";
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 O } from "../lib/motion.js";
8
- import { Ripple as j } from "./ripple.js";
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
- }, P = n.createContext(null);
14
- function E(i) {
15
- const e = n.useContext(P);
13
+ }, E = r.createContext(null);
14
+ function P(d) {
15
+ const e = r.useContext(E);
16
16
  if (!e)
17
- throw new Error(`${i} must be used within a <Popover>.`);
17
+ throw new Error(`${d} must be used within a <Popover>.`);
18
18
  return e;
19
19
  }
20
- function W({ children: i, defaultOpen: e = !1 }) {
21
- const [c, a] = n.useState(e), d = n.useRef(null);
22
- return /* @__PURE__ */ g(P.Provider, { value: { open: c, setOpen: a, triggerRef: d }, children: i });
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 K({ children: i }) {
25
- const { open: e, setOpen: c, triggerRef: a } = E("PopoverTrigger"), d = i;
26
- return n.cloneElement(d, {
27
- ref: a,
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: (w) => {
31
- var r, u;
32
- (u = (r = d.props).onClick) == null || u.call(r, w), c(!e);
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 N({
37
- className: i,
46
+ function U({
47
+ className: d,
38
48
  align: e = "start",
39
- sideOffset: c = 8,
40
- children: a,
41
- "aria-label": d = "Popover",
42
- ...w
49
+ sideOffset: n = 8,
50
+ children: i,
51
+ "aria-label": u = "Popover",
52
+ ...m
43
53
  }) {
44
- const { open: r, setOpen: u, triggerRef: v } = E("PopoverContent"), h = n.useRef(null), [s, b] = n.useState(null);
45
- return n.useLayoutEffect(() => {
46
- if (!r) return;
47
- const f = v.current;
48
- if (!f) return;
49
- const o = () => {
50
- var m;
51
- const t = f.getBoundingClientRect(), p = ((m = h.current) == null ? void 0 : m.offsetWidth) ?? 0;
52
- let l = t.left;
53
- e === "center" ? l = t.left + t.width / 2 - p / 2 : e === "end" && (l = t.right - p), b({ top: t.bottom + c, left: l });
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 o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
56
- window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
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
- }, [r, e, c, v]), n.useEffect(() => {
59
- if (!r) return;
60
- const f = (t) => {
61
- t.key === "Escape" && u(!1);
62
- }, o = (t) => {
63
- var l, m;
64
- const p = t.target;
65
- (l = h.current) != null && l.contains(p) || (m = v.current) != null && m.contains(p) || u(!1);
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", f), document.addEventListener("pointerdown", o), () => {
68
- document.removeEventListener("keydown", f), document.removeEventListener("pointerdown", o);
77
+ return document.addEventListener("keydown", v), document.addEventListener("pointerdown", c), () => {
78
+ document.removeEventListener("keydown", v), document.removeEventListener("pointerdown", c);
69
79
  };
70
- }, [r, u, v]), y(
71
- /* @__PURE__ */ g(L, { reducedMotion: "user", children: /* @__PURE__ */ g(R, { children: r && /* @__PURE__ */ C(
72
- k.div,
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: h,
84
+ ref: a,
75
85
  role: "dialog",
76
- "aria-label": d,
77
- variants: O,
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: (s == null ? void 0 : s.top) ?? 0,
84
- left: (s == null ? void 0 : s.left) ?? 0,
85
- visibility: s ? "visible" : "hidden",
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
- i
101
+ d
92
102
  ),
93
- ...w,
103
+ ...m,
94
104
  children: [
95
- /* @__PURE__ */ g(j, { origin: x[e] }),
96
- a
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
- W as Popover,
105
- N as PopoverContent,
106
- K as PopoverTrigger
114
+ K as Popover,
115
+ U as PopoverContent,
116
+ N as PopoverTrigger
107
117
  };
@@ -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> {