@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,56 +1,56 @@
1
1
  "use client";
2
2
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { MotionConfig as _, motion as z } from "motion/react";
5
- import { User as j, PanelLeft as E } from "../lib/icons.js";
4
+ import { MotionConfig as j, motion as _ } from "motion/react";
5
+ import { User as E, PanelLeft as H } from "../lib/icons.js";
6
6
  import { cn as n } from "../lib/cn.js";
7
- import { springSidebar as H } from "../lib/motion.js";
8
- import { Tooltip as I } from "./tooltip.js";
9
- import { Avatar as L } from "./avatar.js";
10
- const R = o.createContext({
7
+ import { springSidebar as I } from "../lib/motion.js";
8
+ import { Tooltip as L } from "./tooltip.js";
9
+ import { Avatar as M } from "./avatar.js";
10
+ const z = o.createContext({
11
11
  collapsed: !1,
12
12
  toggle: () => {
13
13
  },
14
14
  setCollapsed: () => {
15
15
  }
16
16
  });
17
- function M() {
18
- return o.useContext(R);
17
+ function W() {
18
+ return o.useContext(z);
19
19
  }
20
20
  const K = o.forwardRef(
21
21
  ({
22
- className: t,
22
+ className: a,
23
23
  collapsed: e,
24
- defaultCollapsed: a = !1,
25
- onCollapsedChange: i,
24
+ defaultCollapsed: i = !1,
25
+ onCollapsedChange: t,
26
26
  animateOnMount: s = !1,
27
27
  keyboardToggle: d = !0,
28
28
  ...l
29
- }, m) => {
30
- const [v, y] = o.useState(a), g = e !== void 0, u = g ? e : v, b = o.useCallback(
29
+ }, b) => {
30
+ const [g, y] = o.useState(i), f = e !== void 0, u = f ? e : g, m = o.useCallback(
31
31
  (p) => {
32
- g || y(p), i == null || i(p);
32
+ f || y(p), t == null || t(p);
33
33
  },
34
- [g, i]
35
- ), h = o.useCallback(
36
- () => b(!u),
37
- [u, b]
34
+ [f, t]
35
+ ), v = o.useCallback(
36
+ () => m(!u),
37
+ [u, m]
38
38
  );
39
39
  o.useEffect(() => {
40
40
  if (!d) return;
41
- const p = (f) => {
42
- (f.metaKey || f.ctrlKey) && f.key.toLowerCase() === "b" && (f.preventDefault(), h());
41
+ const p = (h) => {
42
+ (h.metaKey || h.ctrlKey) && h.key.toLowerCase() === "b" && (h.preventDefault(), v());
43
43
  };
44
44
  return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
45
- }, [d, h]);
45
+ }, [d, v]);
46
46
  const x = o.useMemo(
47
- () => ({ collapsed: u, toggle: h, setCollapsed: b }),
48
- [u, h, b]
47
+ () => ({ collapsed: u, toggle: v, setCollapsed: m }),
48
+ [u, v, m]
49
49
  );
50
- return /* @__PURE__ */ r(R.Provider, { value: x, children: /* @__PURE__ */ r(_, { reducedMotion: "user", children: /* @__PURE__ */ r(
51
- z.aside,
50
+ return /* @__PURE__ */ r(z.Provider, { value: x, children: /* @__PURE__ */ r(j, { reducedMotion: "user", children: /* @__PURE__ */ r(
51
+ _.aside,
52
52
  {
53
- ref: m,
53
+ ref: b,
54
54
  "data-collapsed": u ? "true" : "false",
55
55
  initial: s ? {
56
56
  width: u ? 56 : 240,
@@ -62,10 +62,10 @@ const K = o.forwardRef(
62
62
  transform: "translate3d(0, 0, 0)",
63
63
  opacity: 1
64
64
  },
65
- transition: H,
65
+ transition: I,
66
66
  className: n(
67
67
  "group/sidebar flex h-full shrink-0 flex-col bg-background",
68
- t
68
+ a
69
69
  ),
70
70
  ...l
71
71
  }
@@ -73,20 +73,20 @@ const K = o.forwardRef(
73
73
  }
74
74
  );
75
75
  K.displayName = "Sidebar";
76
- function S({ children: t }) {
77
- return /* @__PURE__ */ r("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: t });
76
+ function S({ children: a }) {
77
+ return /* @__PURE__ */ r("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: a });
78
78
  }
79
79
  function k({
80
- className: t,
80
+ className: a,
81
81
  onClick: e,
82
- tooltipSide: a = "right",
83
- ...i
82
+ tooltipSide: i = "right",
83
+ ...t
84
84
  }) {
85
- const { collapsed: s, toggle: d } = M();
85
+ const { collapsed: s, toggle: d } = W();
86
86
  return /* @__PURE__ */ r(
87
- I,
87
+ L,
88
88
  {
89
- side: a,
89
+ side: i,
90
90
  content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
91
91
  s ? "Expand" : "Collapse",
92
92
  /* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
@@ -108,33 +108,35 @@ function k({
108
108
  "transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
109
109
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
110
110
  "[&_svg]:size-4.5",
111
- t
111
+ a
112
112
  ),
113
- ...i,
114
- children: /* @__PURE__ */ r(E, {})
113
+ ...t,
114
+ children: /* @__PURE__ */ r(H, {})
115
115
  }
116
116
  )
117
117
  }
118
118
  );
119
119
  }
120
- function Y({
121
- logo: t,
120
+ function Z({
121
+ logo: a,
122
122
  href: e,
123
- label: a = "Home",
124
- showTrigger: i = !0,
123
+ label: i = "Home",
124
+ showTrigger: t = !0,
125
125
  children: s,
126
126
  className: d,
127
127
  ...l
128
128
  }) {
129
- const m = n(
130
- // 20px mark centered in a 32px square — the same box as every other rail icon.
131
- // group/brand lets a BrandMark logo play its blip loop on hover.
132
- "group/brand flex size-(--sidebar-item) items-center justify-center",
133
- "[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)",
129
+ const b = o.isValidElement(a) && a.type === R, g = n(
130
+ b ? "flex min-w-0 items-center rounded-m outline-none focus-visible:ring-3 focus-visible:ring-ring" : n(
131
+ // 20px mark centered in a 32px square — the same box as every other rail icon.
132
+ // group/brand lets a BrandMark logo play its blip loop on hover.
133
+ "group/brand flex size-(--sidebar-item) items-center justify-center",
134
+ "[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)"
135
+ ),
134
136
  // The logo owns the header at rest in BOTH states. On the collapsed rail
135
137
  // it swaps for the expand trigger only while the rail is hovered (or
136
138
  // holds keyboard focus, so the control stays reachable).
137
- i && "group-data-[collapsed=true]/sidebar:group-hover/sidebar:hidden group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:hidden"
139
+ t && "group-data-[collapsed=true]/sidebar:group-hover/sidebar:hidden group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:hidden"
138
140
  );
139
141
  return /* @__PURE__ */ c(
140
142
  "div",
@@ -146,57 +148,91 @@ function Y({
146
148
  ),
147
149
  ...l,
148
150
  children: [
149
- e ? /* @__PURE__ */ r("a", { href: e, "aria-label": a, className: m, children: t }) : /* @__PURE__ */ r("span", { className: m, children: t }),
150
- i && /* @__PURE__ */ r("div", { className: "hidden group-data-[collapsed=true]/sidebar:group-hover/sidebar:flex group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:flex", children: /* @__PURE__ */ r(k, { tooltipSide: "right" }) }),
151
+ e ? /* @__PURE__ */ r("a", { href: e, "aria-label": i, className: g, children: a }) : /* @__PURE__ */ r("span", { className: g, children: a }),
152
+ t && /* @__PURE__ */ r("div", { className: "hidden group-data-[collapsed=true]/sidebar:group-hover/sidebar:flex group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:flex", children: /* @__PURE__ */ r(k, { tooltipSide: "right" }) }),
151
153
  /* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
152
- i && /* @__PURE__ */ r(k, { tooltipSide: "bottom" }),
154
+ t && /* @__PURE__ */ r(k, { tooltipSide: "bottom" }),
153
155
  s
154
156
  ] })
155
157
  ]
156
158
  }
157
159
  );
158
160
  }
161
+ const R = o.forwardRef(
162
+ ({ className: a, name: e, logoSrc: i, showName: t = !0, ...s }, d) => {
163
+ const l = e.trim().charAt(0).toUpperCase();
164
+ return /* @__PURE__ */ c(
165
+ "span",
166
+ {
167
+ ref: d,
168
+ className: n("flex min-w-0 items-center gap-2.5", a),
169
+ ...s,
170
+ children: [
171
+ i ? /* @__PURE__ */ r(
172
+ "img",
173
+ {
174
+ src: i,
175
+ alt: t ? "" : e,
176
+ className: "size-(--sidebar-item) shrink-0 rounded-m object-contain"
177
+ }
178
+ ) : /* @__PURE__ */ r(
179
+ "span",
180
+ {
181
+ "aria-hidden": t || void 0,
182
+ role: t ? void 0 : "img",
183
+ "aria-label": t ? void 0 : e,
184
+ className: "flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-m bg-wg12 text-m leading-[var(--text-m--line-height)] font-medium text-white",
185
+ children: l
186
+ }
187
+ ),
188
+ t && /* @__PURE__ */ r("span", { className: "min-w-0 truncate text-l leading-[var(--text-l--line-height)] font-medium text-foreground group-data-[collapsed=true]/sidebar:sr-only", children: e })
189
+ ]
190
+ }
191
+ );
192
+ }
193
+ );
194
+ R.displayName = "SidebarWorkspace";
159
195
  const q = o.forwardRef(
160
- ({ className: t, ...e }, a) => /* @__PURE__ */ r(
196
+ ({ className: a, ...e }, i) => /* @__PURE__ */ r(
161
197
  "div",
162
198
  {
163
- ref: a,
199
+ ref: i,
164
200
  className: n(
165
201
  "flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
166
202
  "group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
167
- t
203
+ a
168
204
  ),
169
205
  ...e
170
206
  }
171
207
  )
172
208
  );
173
209
  q.displayName = "SidebarHeader";
174
- const B = o.forwardRef(
175
- ({ className: t, ...e }, a) => /* @__PURE__ */ r("nav", { ref: a, className: n("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", t), ...e })
210
+ const A = o.forwardRef(
211
+ ({ className: a, ...e }, i) => /* @__PURE__ */ r("nav", { ref: i, className: n("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", a), ...e })
176
212
  );
177
- B.displayName = "SidebarNav";
178
- const D = o.forwardRef(
179
- ({ className: t, label: e, children: a, ...i }, s) => /* @__PURE__ */ c("div", { ref: s, className: t, ...i, children: [
213
+ A.displayName = "SidebarNav";
214
+ const B = o.forwardRef(
215
+ ({ className: a, label: e, children: i, ...t }, s) => /* @__PURE__ */ c("div", { ref: s, className: a, ...t, children: [
180
216
  e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s font-normal uppercase leading-4 tracking-wider text-tertiary group-data-[collapsed=true]/sidebar:hidden", children: e }),
181
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: a })
217
+ /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: i })
182
218
  ] })
183
219
  );
184
- D.displayName = "SidebarSection";
185
- const F = o.forwardRef(
186
- ({ className: t, icon: e, isActive: a, endContent: i, children: s, title: d, ...l }, m) => /* @__PURE__ */ c(
220
+ B.displayName = "SidebarSection";
221
+ const D = o.forwardRef(
222
+ ({ className: a, icon: e, isActive: i, endContent: t, children: s, title: d, ...l }, b) => /* @__PURE__ */ c(
187
223
  "a",
188
224
  {
189
- ref: m,
190
- "aria-current": a ? "page" : void 0,
225
+ ref: b,
226
+ "aria-current": i ? "page" : void 0,
191
227
  title: d ?? (typeof s == "string" ? s : void 0),
192
228
  className: n(
193
229
  "group/sidebar-item flex h-9 items-center gap-2.5 rounded-md border border-transparent px-3 text-m leading-[var(--text-m--line-height)] font-normal text-sidebar-foreground",
194
- "transition-[background-color,border-color,color] duration-150 ease-out motion-reduce:transition-none",
230
+ "transition-[background-color,border-color,color,box-shadow] duration-150 ease-out motion-reduce:transition-none",
195
231
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
196
232
  // Collapsed: a centered square (--sidebar-item) so every rail item lines up.
197
233
  "group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
198
- a ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
199
- t
234
+ i ? "bg-sidebar-accent text-sidebar-accent-foreground shadow-nav-active" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
235
+ a
200
236
  ),
201
237
  ...l,
202
238
  children: [
@@ -205,29 +241,29 @@ const F = o.forwardRef(
205
241
  {
206
242
  "aria-hidden": !0,
207
243
  className: "flex shrink-0 items-center justify-center transition-transform duration-150 ease-out group-hover/sidebar-item:scale-110 motion-reduce:transition-none motion-reduce:group-hover/sidebar-item:scale-100 [&_svg]:size-4 [&_svg]:shrink-0",
208
- children: a && o.isValidElement(e) ? o.cloneElement(e, { weight: "fill" }) : e
244
+ children: i && o.isValidElement(e) ? o.cloneElement(e, { weight: "fill" }) : e
209
245
  }
210
246
  ),
211
247
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
212
- i && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: i })
248
+ t && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: t })
213
249
  ]
214
250
  }
215
251
  )
216
252
  );
217
- F.displayName = "SidebarItem";
218
- const W = o.forwardRef(
219
- ({ className: t, ...e }, a) => /* @__PURE__ */ r(
253
+ D.displayName = "SidebarItem";
254
+ const F = o.forwardRef(
255
+ ({ className: a, ...e }, i) => /* @__PURE__ */ r(
220
256
  "div",
221
257
  {
222
- ref: a,
223
- className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
258
+ ref: i,
259
+ className: n("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", a),
224
260
  ...e
225
261
  }
226
262
  )
227
263
  );
228
- W.displayName = "SidebarFooter";
229
- const $ = o.forwardRef(
230
- ({ className: t, icon: e, children: a, ...i }, s) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
264
+ F.displayName = "SidebarFooter";
265
+ const U = o.forwardRef(
266
+ ({ className: a, icon: e, children: i, ...t }, s) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
231
267
  "button",
232
268
  {
233
269
  ref: s,
@@ -242,53 +278,53 @@ const $ = o.forwardRef(
242
278
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
243
279
  "[&_svg]:size-4 [&_svg]:shrink-0",
244
280
  "group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-0",
245
- t
281
+ a
246
282
  ),
247
- ...i,
283
+ ...t,
248
284
  children: [
249
285
  e,
250
- /* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: a })
286
+ /* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
251
287
  ]
252
288
  }
253
289
  ) })
254
290
  );
255
- $.displayName = "SidebarAction";
256
- const A = o.forwardRef(
257
- ({ className: t, label: e, children: a, ...i }, s) => /* @__PURE__ */ c(
291
+ U.displayName = "SidebarAction";
292
+ const V = o.forwardRef(
293
+ ({ className: a, label: e, children: i, ...t }, s) => /* @__PURE__ */ c(
258
294
  "div",
259
295
  {
260
296
  ref: s,
261
- className: n("group-data-[collapsed=true]/sidebar:hidden", t),
262
- ...i,
297
+ className: n("group-data-[collapsed=true]/sidebar:hidden", a),
298
+ ...t,
263
299
  children: [
264
- e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-[var(--text-s--line-height)] font-medium text-on-warm-grey-secondary", children: e }),
265
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: a })
300
+ e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s font-normal uppercase leading-4 tracking-wider text-tertiary", children: e }),
301
+ /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
266
302
  ]
267
303
  }
268
304
  )
269
305
  );
270
- A.displayName = "SidebarHistory";
271
- const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActive: s, icon: d, ...l }, m) => {
272
- const v = o.useRef(null), y = o.useRef(null), [g, u] = o.useState(0);
306
+ V.displayName = "SidebarHistory";
307
+ const $ = o.forwardRef(({ className: a, children: e, title: i, action: t, isActive: s, icon: d, ...l }, b) => {
308
+ const g = o.useRef(null), y = o.useRef(null), [f, u] = o.useState(0);
273
309
  o.useLayoutEffect(() => {
274
- const x = v.current, p = y.current;
310
+ const x = g.current, p = y.current;
275
311
  if (!x || !p) return;
276
- const f = () => {
312
+ const h = () => {
277
313
  const w = p.scrollWidth - x.clientWidth;
278
- u(w > 0 ? w + (i ? 32 : 0) : 0);
314
+ u(w > 0 ? w + (t ? 32 : 0) : 0);
279
315
  };
280
- f();
281
- const N = new ResizeObserver(f);
316
+ h();
317
+ const N = new ResizeObserver(h);
282
318
  return N.observe(x), N.observe(p), () => N.disconnect();
283
- }, [e, i]);
284
- const b = g > 0, h = Math.max(500, Math.round(g * 18));
319
+ }, [e, t]);
320
+ const m = f > 0, v = Math.max(500, Math.round(f * 18));
285
321
  return /* @__PURE__ */ c(
286
322
  "div",
287
323
  {
288
324
  className: n(
289
325
  "group/hist relative flex items-center rounded-md transition-colors",
290
326
  "text-sidebar-foreground",
291
- s ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground"
327
+ s ? "bg-sidebar-accent text-sidebar-accent-foreground shadow-nav-active" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground"
292
328
  ),
293
329
  children: [
294
330
  d && /* @__PURE__ */ r(
@@ -302,27 +338,27 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
302
338
  /* @__PURE__ */ r(
303
339
  "a",
304
340
  {
305
- ref: m,
306
- title: a ?? (typeof e == "string" ? e : void 0),
341
+ ref: b,
342
+ title: i ?? (typeof e == "string" ? e : void 0),
307
343
  className: n(
308
344
  // Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
309
345
  // gap-2.5 = 2.375rem) so history titles line up under the nav labels.
310
346
  "block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-m leading-[var(--text-m--line-height)] font-normal",
311
347
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
312
- t
348
+ a
313
349
  ),
314
350
  ...l,
315
351
  children: /* @__PURE__ */ r(
316
352
  "span",
317
353
  {
318
- ref: v,
354
+ ref: g,
319
355
  className: n(
320
356
  "block overflow-hidden",
321
357
  // Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
322
358
  // so fade the LEFT edge where it exits; the action backdrop (or the
323
359
  // string's own end) handles the right.
324
- b && "[mask-image:linear-gradient(to_right,var(--color-wg12)_calc(100%-1.5rem),transparent)]",
325
- b && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,var(--color-wg12)_1.25rem,var(--color-wg12)_100%)]"
360
+ m && "[mask-image:linear-gradient(to_right,var(--color-wg12)_calc(100%-1.5rem),transparent)]",
361
+ m && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,var(--color-wg12)_1.25rem,var(--color-wg12)_100%)]"
326
362
  ),
327
363
  children: /* @__PURE__ */ r(
328
364
  "span",
@@ -330,12 +366,12 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
330
366
  ref: y,
331
367
  className: n(
332
368
  "block w-max whitespace-nowrap transition-transform ease-linear",
333
- b && "group-hover/hist:[transform:translateX(var(--mq-x))]",
369
+ m && "group-hover/hist:[transform:translateX(var(--mq-x))]",
334
370
  "motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
335
371
  ),
336
372
  style: {
337
- "--mq-x": `-${g}px`,
338
- transitionDuration: `${h}ms`
373
+ "--mq-x": `-${f}px`,
374
+ transitionDuration: `${v}ms`
339
375
  },
340
376
  children: e
341
377
  }
@@ -344,7 +380,7 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
344
380
  )
345
381
  }
346
382
  ),
347
- i && /* @__PURE__ */ r(
383
+ t && /* @__PURE__ */ r(
348
384
  "span",
349
385
  {
350
386
  className: n(
@@ -357,16 +393,16 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
357
393
  "pointer-events-none group-hover/hist:pointer-events-auto",
358
394
  "focus-within:pointer-events-auto focus-within:opacity-100"
359
395
  ),
360
- children: i
396
+ children: t
361
397
  }
362
398
  )
363
399
  ]
364
400
  }
365
401
  );
366
402
  });
367
- O.displayName = "SidebarHistoryItem";
368
- const P = o.forwardRef(
369
- ({ className: t, name: e, role: a, src: i, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
403
+ $.displayName = "SidebarHistoryItem";
404
+ const O = o.forwardRef(
405
+ ({ className: a, name: e, role: i, src: t, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
370
406
  "a",
371
407
  {
372
408
  ref: l,
@@ -374,13 +410,13 @@ const P = o.forwardRef(
374
410
  "flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-wg10",
375
411
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
376
412
  "group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
377
- t
413
+ a
378
414
  ),
379
415
  ...d,
380
416
  children: [
381
- !s && /* @__PURE__ */ r(L, { size: "sm", name: e, src: i }),
417
+ !s && /* @__PURE__ */ r(M, { size: "sm", name: e, src: t }),
382
418
  s && /* @__PURE__ */ r(
383
- j,
419
+ E,
384
420
  {
385
421
  "aria-hidden": !0,
386
422
  className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
@@ -388,25 +424,26 @@ const P = o.forwardRef(
388
424
  ),
389
425
  /* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
390
426
  /* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
391
- a && /* @__PURE__ */ r("div", { className: "truncate text-s leading-[var(--text-s--line-height)] text-tertiary", children: a })
427
+ i && /* @__PURE__ */ r("div", { className: "truncate text-s leading-[var(--text-s--line-height)] text-tertiary", children: i })
392
428
  ] })
393
429
  ]
394
430
  }
395
431
  )
396
432
  );
397
- P.displayName = "SidebarAccount";
433
+ O.displayName = "SidebarAccount";
398
434
  export {
399
435
  K as Sidebar,
400
- P as SidebarAccount,
401
- $ as SidebarAction,
402
- Y as SidebarBrand,
403
- W as SidebarFooter,
436
+ O as SidebarAccount,
437
+ U as SidebarAction,
438
+ Z as SidebarBrand,
439
+ F as SidebarFooter,
404
440
  q as SidebarHeader,
405
- A as SidebarHistory,
406
- O as SidebarHistoryItem,
407
- F as SidebarItem,
408
- B as SidebarNav,
409
- D as SidebarSection,
441
+ V as SidebarHistory,
442
+ $ as SidebarHistoryItem,
443
+ D as SidebarItem,
444
+ A as SidebarNav,
445
+ B as SidebarSection,
410
446
  k as SidebarTrigger,
411
- M as useSidebar
447
+ R as SidebarWorkspace,
448
+ W as useSidebar
412
449
  };
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Sparkline — a tiny, axis-less trend line for a stat card (principle
4
+ * `analytics-surfaces`, user-mandated 2026-11-14).
5
+ *
6
+ * It draws one series in a chart-palette colour: a 2px line, a wash under it
7
+ * that fades top-to-bottom from 20% of the colour to nothing (the same wash
8
+ * `LineChart` carries), and a dot on the latest value. There are no axes,
9
+ * gridlines, labels or tooltip — the stat card's number is the value; the
10
+ * sparkline only says which way it has been moving. It fills its container's
11
+ * width; give it a height.
12
+ *
13
+ * Use it inside a resting stat card, beside the number, or in a table's
14
+ * "Last 7 days" column at `height={28}` with `dot={false}` (principle
15
+ * `collection-screens`). For a trend people read values from, use `LineChart`.
16
+ */
17
+ export type SparklineColor = 1 | 2 | 3 | 4 | 5 | 6;
18
+ export interface SparklineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
19
+ /** The series, oldest first. Needs at least two values to draw. */
20
+ data: number[];
21
+ /** Which `chart-1…6` series colour to draw in. @default 1 */
22
+ color?: SparklineColor;
23
+ /** Height in px. @default 48 */
24
+ height?: number;
25
+ /** Mark the latest value with a round dot. Turn off in table cells. @default true */
26
+ dot?: boolean;
27
+ /** Accessible summary of the trend, e.g. "Calls analysed rising over 7 days". */
28
+ label: string;
29
+ }
30
+ export declare const Sparkline: React.ForwardRefExoticComponent<SparklineProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
+ import * as u from "react";
4
+ import { cn as j } from "../lib/cn.js";
5
+ const r = 100, m = 4, z = u.forwardRef(
6
+ ({ className: $, data: k, color: h = 1, height: e = 48, dot: v = !0, label: x, style: b, ...y }, g) => {
7
+ const d = u.useId().replace(/[^a-zA-Z0-9]/g, ""), n = `var(--color-chart-${h})`, s = k.filter((a) => Number.isFinite(a)), p = Math.min(...s), w = Math.max(...s) - p || 1, t = s.map((a, i) => [
8
+ s.length > 1 ? i / (s.length - 1) * r : r,
9
+ m + (e - 2 * m) * (1 - (a - p) / w)
10
+ ]), f = t.map(([a, i], N) => `${N === 0 ? "M" : "L"}${a.toFixed(2)},${i.toFixed(2)}`).join(" "), L = t.length > 1 ? `${f} L${r},${e} L0,${e} Z` : "", l = t[t.length - 1];
11
+ return /* @__PURE__ */ c(
12
+ "div",
13
+ {
14
+ ref: g,
15
+ "data-slot": "sparkline",
16
+ role: "img",
17
+ "aria-label": x,
18
+ className: j("relative w-full", $),
19
+ style: { height: e, ...b },
20
+ ...y,
21
+ children: [
22
+ t.length > 1 && /* @__PURE__ */ c(
23
+ "svg",
24
+ {
25
+ "aria-hidden": !0,
26
+ className: "absolute inset-0 size-full overflow-visible",
27
+ viewBox: `0 0 ${r} ${e}`,
28
+ preserveAspectRatio: "none",
29
+ children: [
30
+ /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ c("linearGradient", { id: `${d}-wash`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
31
+ /* @__PURE__ */ o("stop", { offset: "0%", stopColor: n, stopOpacity: 0.2 }),
32
+ /* @__PURE__ */ o("stop", { offset: "100%", stopColor: n, stopOpacity: 0 })
33
+ ] }) }),
34
+ /* @__PURE__ */ o("path", { "data-slot": "sparkline-area", d: L, fill: `url(#${d}-wash)`, stroke: "none" }),
35
+ /* @__PURE__ */ o(
36
+ "path",
37
+ {
38
+ "data-slot": "sparkline-line",
39
+ d: f,
40
+ fill: "none",
41
+ stroke: n,
42
+ strokeWidth: 2,
43
+ strokeLinecap: "round",
44
+ strokeLinejoin: "round",
45
+ vectorEffect: "non-scaling-stroke"
46
+ }
47
+ )
48
+ ]
49
+ }
50
+ ),
51
+ v && l && t.length > 1 && // The end dot is HTML so it stays round while the SVG stretches.
52
+ /* @__PURE__ */ o(
53
+ "span",
54
+ {
55
+ "aria-hidden": !0,
56
+ "data-slot": "sparkline-dot",
57
+ className: "absolute size-2 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-card",
58
+ style: { left: `${l[0] / r * 100}%`, top: `${l[1] / e * 100}%`, background: n }
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ );
64
+ }
65
+ );
66
+ z.displayName = "Sparkline";
67
+ export {
68
+ z as Sparkline
69
+ };
@@ -95,6 +95,14 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
95
95
  disclosureLabel?: string;
96
96
  /** @deprecated Existing visual-only marker. New rows should pass an action via onClick. */
97
97
  isInteractive?: boolean;
98
+ /**
99
+ * This row's detail panel is open (e.g. the shell-level inline `Drawer`
100
+ * that `onClick` opened). Paints the same soft-teal left-to-right fade as a
101
+ * selected row and sets `aria-current="true"`, without needing a selection
102
+ * column. Clear it when the panel closes. Independent of `selectionMode`:
103
+ * a row can be both active and checked.
104
+ */
105
+ isActive?: boolean;
98
106
  }
99
107
  export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
100
108
  export interface TableColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement> {