@actioneer/ads 1.0.7 → 1.0.9
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 +119 -91
- package/README.md +19 -1
- package/components/ai-elements/chart.js +20 -20
- package/components/ai-elements/inline-citation.js +50 -50
- package/components/ai-elements/message.js +1 -1
- package/components/ai-elements/tool.js +5 -5
- package/components/alert.d.ts +3 -2
- package/components/alert.js +25 -25
- package/components/answer.js +1 -1
- package/components/assistant-ui/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +68 -49
- package/components/assistant-ui/composer-add-context.js +1 -1
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/composer-trigger-popover.js +1 -1
- package/components/assistant-ui/composer.js +13 -13
- package/components/assistant-ui/message-timing.js +6 -6
- package/components/assistant-ui/selection-toolbar.js +5 -5
- package/components/assistant-ui/sources.js +15 -15
- package/components/assistant-ui/tooltip-icon-button.js +18 -14
- package/components/audio-waveform.d.ts +21 -8
- package/components/audio-waveform.js +371 -94
- package/components/autocomplete.js +9 -9
- package/components/breadcrumbs.js +36 -42
- package/components/button.d.ts +16 -1
- package/components/button.js +86 -73
- package/components/card.js +1 -1
- package/components/chart.d.ts +31 -4
- package/components/chart.js +900 -666
- package/components/chip.d.ts +2 -1
- package/components/chip.js +56 -51
- package/components/command-palette.js +12 -12
- package/components/connector-card.d.ts +1 -2
- package/components/connector-card.js +17 -17
- package/components/date-range-picker.js +1 -2
- package/components/drawer.js +9 -10
- package/components/dropdown.js +1 -1
- package/components/empty-state.d.ts +2 -0
- package/components/empty-state.js +17 -15
- package/components/field.js +9 -10
- package/components/file-dropzone.d.ts +6 -3
- package/components/file-dropzone.js +72 -60
- package/components/filters.d.ts +37 -0
- package/components/filters.js +129 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +447 -444
- package/components/infinite-canvas.js +9 -9
- package/components/modal.d.ts +2 -1
- package/components/modal.js +102 -91
- package/components/page-body.js +8 -8
- package/components/popover.d.ts +6 -1
- package/components/popover.js +75 -65
- package/components/progress-circle.d.ts +1 -1
- package/components/progress-circle.js +57 -48
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +34 -36
- package/components/select.js +2 -2
- package/components/selection-action-bar.js +32 -31
- package/components/setting-row.js +10 -10
- package/components/sidebar.d.ts +15 -0
- package/components/sidebar.js +186 -149
- package/components/slider.js +5 -5
- package/components/stepper.d.ts +1 -1
- package/components/stepper.js +1 -1
- package/components/switch.js +10 -10
- package/components/table.d.ts +10 -2
- package/components/table.js +380 -366
- package/components/tabs.d.ts +6 -1
- package/components/tabs.js +32 -29
- package/components/timeline.js +3 -3
- package/components/toast.js +53 -56
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +1 -1
- package/components/viz-charts.js +263 -221
- package/demo/components/add-to-artifact.js +3 -2
- package/examples/README.md +31 -0
- package/examples/agents-screen.tsx +477 -0
- package/examples/campaign-analysis-screen.tsx +138 -0
- package/examples/campaigns-screen.tsx +439 -0
- package/examples/settings-screen.tsx +90 -0
- package/examples/workspace-header.tsx +71 -0
- package/lib/icons.d.ts +8 -0
- package/lib/icons.js +171 -118
- package/llms.txt +93 -29
- package/manifest.json +1660 -113
- package/package.json +1 -1
- package/styles.css +55 -68
- package/theme.css +50 -59
package/DESIGN.md
CHANGED
|
@@ -15,46 +15,46 @@ colors:
|
|
|
15
15
|
success: "#2d6b22"
|
|
16
16
|
success-foreground: "#ffffff"
|
|
17
17
|
warning: "#f79009"
|
|
18
|
-
warning-foreground: "#
|
|
18
|
+
warning-foreground: "#202020"
|
|
19
19
|
danger: "#d92d20"
|
|
20
20
|
danger-foreground: "#ffffff"
|
|
21
21
|
info: "#1570ef"
|
|
22
22
|
info-foreground: "#ffffff"
|
|
23
|
-
background: "#
|
|
24
|
-
foreground: "#
|
|
25
|
-
surface: "#
|
|
26
|
-
surface-foreground: "#
|
|
23
|
+
background: "#f6f6f6"
|
|
24
|
+
foreground: "#202020"
|
|
25
|
+
surface: "#f1f1f1"
|
|
26
|
+
surface-foreground: "#202020"
|
|
27
27
|
elevated: "#ffffff"
|
|
28
28
|
card: "#ffffff"
|
|
29
|
-
card-foreground: "#
|
|
30
|
-
muted: "#
|
|
31
|
-
muted-foreground: "#
|
|
32
|
-
fill: "#
|
|
33
|
-
fill-foreground: "#
|
|
34
|
-
accent: "#
|
|
35
|
-
accent-foreground: "#
|
|
36
|
-
on-white-primary: "#
|
|
37
|
-
on-white-secondary: "#
|
|
38
|
-
on-white-tertiary: "#
|
|
39
|
-
on-warm-grey-primary: "#
|
|
40
|
-
on-warm-grey-secondary: "#
|
|
41
|
-
on-warm-grey-tertiary: "#
|
|
42
|
-
primary: "#
|
|
43
|
-
secondary: "#
|
|
44
|
-
tertiary: "color-mix(in srgb, var(--color-wg10)
|
|
45
|
-
border: "#
|
|
46
|
-
border-primary: "#
|
|
47
|
-
border-secondary: "#
|
|
48
|
-
border-tertiary: "#
|
|
49
|
-
border-strong: "#
|
|
50
|
-
input: "#
|
|
51
|
-
menu-stroke: "#
|
|
52
|
-
toast-stroke: "#
|
|
53
|
-
tree-stroke: "#
|
|
54
|
-
specimen-stroke: "#
|
|
29
|
+
card-foreground: "#202020"
|
|
30
|
+
muted: "#ececec"
|
|
31
|
+
muted-foreground: "#5e5d5d"
|
|
32
|
+
fill: "#f1f1f1"
|
|
33
|
+
fill-foreground: "#202020"
|
|
34
|
+
accent: "#e6e6e6"
|
|
35
|
+
accent-foreground: "#202020"
|
|
36
|
+
on-white-primary: "#202020"
|
|
37
|
+
on-white-secondary: "#5e5d5d"
|
|
38
|
+
on-white-tertiary: "#868686"
|
|
39
|
+
on-warm-grey-primary: "#202020"
|
|
40
|
+
on-warm-grey-secondary: "#5e5d5d"
|
|
41
|
+
on-warm-grey-tertiary: "#868686"
|
|
42
|
+
primary: "#202020"
|
|
43
|
+
secondary: "#5e5d5d"
|
|
44
|
+
tertiary: "color-mix(in srgb, var(--color-wg10) 40%, var(--color-wg11))"
|
|
45
|
+
border: "#ececec"
|
|
46
|
+
border-primary: "#e6e6e6"
|
|
47
|
+
border-secondary: "#ececec"
|
|
48
|
+
border-tertiary: "#f1f1f1"
|
|
49
|
+
border-strong: "#e6e6e6"
|
|
50
|
+
input: "#ececec"
|
|
51
|
+
menu-stroke: "#ececec"
|
|
52
|
+
toast-stroke: "#ececec"
|
|
53
|
+
tree-stroke: "#ececec"
|
|
54
|
+
specimen-stroke: "#f1f1f1"
|
|
55
55
|
table-shell: "#ffffff"
|
|
56
|
-
table-stroke: "#
|
|
57
|
-
table-header-foreground: "color-mix(in srgb, var(--color-wg10)
|
|
56
|
+
table-stroke: "#f1f1f1"
|
|
57
|
+
table-header-foreground: "color-mix(in srgb, var(--color-wg10) 40%, var(--color-wg11))"
|
|
58
58
|
artifact-canvas: "color-mix(in srgb, var(--color-brand-mark) 7%, var(--color-white))"
|
|
59
59
|
ring: "#1c8379"
|
|
60
60
|
overlay: "color-mix(in srgb, var(--color-wg12) 50%, transparent)"
|
|
@@ -179,7 +179,7 @@ components:
|
|
|
179
179
|
|
|
180
180
|
TASTE.md puts it in one line: On a quiet, neutral ground, colour and motion are spent like money — rarely, deliberately, and only where the eye should go.
|
|
181
181
|
|
|
182
|
-
ADS 1.0.
|
|
182
|
+
ADS 1.0.9 is a library first and a look second. 325 components across 10 families (Primitives / utilities, Foundations, Form controls, Overlays, Data display, Feedback, Navigation, Layout, AI Elements, Chat) ship from one barrel, and every product that consumes them inherits the judgment encoded in 56 semantic tokens and 15 principles rather than re-deciding it per screen.
|
|
183
183
|
|
|
184
184
|
The ground is warm grey and the ink is warm near-black. One hue is spent by default, the Studio teal CTA family, and four more carry semantic status. Everything else stays neutral. A consumer product may narrow that further, and one already does: Baby Sentinel drops the teal and runs every action on ink.
|
|
185
185
|
|
|
@@ -230,7 +230,7 @@ Semantic status. These four carry meaning and are never identity.
|
|
|
230
230
|
**Amber-500 fill kept (it IS the caution signal); dark ink foreground instead of white = 6.94:1 (white on amber was 2.35:1, failed even 3:1).**
|
|
231
231
|
|
|
232
232
|
- **warning** (`--color-warning`, #f79009) `bg-warning`
|
|
233
|
-
- **warning-foreground** (`--color-warning-foreground`, #
|
|
233
|
+
- **warning-foreground** (`--color-warning-foreground`, #202020) `text-warning-foreground`
|
|
234
234
|
|
|
235
235
|
**Danger and info: solid semantic fills carrying white foregrounds.**
|
|
236
236
|
|
|
@@ -245,77 +245,77 @@ The warm-grey ground everything else stands on.
|
|
|
245
245
|
|
|
246
246
|
**The shell canvas and its ink: the ground between top-level panels.**
|
|
247
247
|
|
|
248
|
-
- **background** (`--color-background`, #
|
|
249
|
-
- **foreground** (`--color-foreground`, #
|
|
248
|
+
- **background** (`--color-background`, #f6f6f6) `bg-background`
|
|
249
|
+
- **foreground** (`--color-foreground`, #202020) `text-foreground`
|
|
250
250
|
|
|
251
251
|
**One continuous recess inside a white surface, never a screen-level ground.**
|
|
252
252
|
|
|
253
|
-
- **surface** (`--color-surface`, #
|
|
254
|
-
- **surface-foreground** (`--color-surface-foreground`, #
|
|
253
|
+
- **surface** (`--color-surface`, #f1f1f1) `bg-surface`
|
|
254
|
+
- **surface-foreground** (`--color-surface-foreground`, #202020) `text-surface-foreground`
|
|
255
255
|
- **elevated** (`--color-elevated`, #ffffff) `bg-elevated`
|
|
256
256
|
|
|
257
257
|
**The white working plane that sits on the canvas, and the specimen hairline.**
|
|
258
258
|
|
|
259
259
|
- **card** (`--color-card`, #ffffff) `bg-card`
|
|
260
|
-
- **card-foreground** (`--color-card-foreground`, #
|
|
260
|
+
- **card-foreground** (`--color-card-foreground`, #202020) `text-card-foreground`
|
|
261
261
|
|
|
262
262
|
**The hover and row-state wash: interaction, not a default item background.**
|
|
263
263
|
|
|
264
|
-
- **muted** (`--color-muted`, #
|
|
265
|
-
- **muted-foreground** (`--color-muted-foreground`, #
|
|
264
|
+
- **muted** (`--color-muted`, #ececec) `bg-muted`
|
|
265
|
+
- **muted-foreground** (`--color-muted-foreground`, #5e5d5d) `text-muted-foreground`
|
|
266
266
|
|
|
267
267
|
**Quiet fill — avatars, chips, and disabled controls.**
|
|
268
268
|
|
|
269
|
-
- **fill** (`--color-fill`, #
|
|
270
|
-
- **fill-foreground** (`--color-fill-foreground`, #
|
|
269
|
+
- **fill** (`--color-fill`, #f1f1f1) `bg-fill`
|
|
270
|
+
- **fill-foreground** (`--color-fill-foreground`, #202020) `text-fill-foreground`
|
|
271
271
|
|
|
272
272
|
**The active and selected wash, one step above hover.**
|
|
273
273
|
|
|
274
|
-
- **accent** (`--color-accent`, #
|
|
275
|
-
- **accent-foreground** (`--color-accent-foreground`, #
|
|
274
|
+
- **accent** (`--color-accent`, #e6e6e6) `bg-accent`
|
|
275
|
+
- **accent-foreground** (`--color-accent-foreground`, #202020) `text-accent-foreground`
|
|
276
276
|
|
|
277
277
|
**Contextual text hierarchies — three accessible levels per surface.**
|
|
278
278
|
|
|
279
|
-
- **on-white-primary** (`--color-on-white-primary`, #
|
|
280
|
-
- **on-white-secondary** (`--color-on-white-secondary`, #
|
|
281
|
-
- **on-white-tertiary** (`--color-on-white-tertiary`, #
|
|
282
|
-
- **on-warm-grey-primary** (`--color-on-warm-grey-primary`, #
|
|
283
|
-
- **on-warm-grey-secondary** (`--color-on-warm-grey-secondary`, #
|
|
284
|
-
- **on-warm-grey-tertiary** (`--color-on-warm-grey-tertiary`, #
|
|
279
|
+
- **on-white-primary** (`--color-on-white-primary`, #202020) `bg-on-white-primary`
|
|
280
|
+
- **on-white-secondary** (`--color-on-white-secondary`, #5e5d5d) `bg-on-white-secondary`
|
|
281
|
+
- **on-white-tertiary** (`--color-on-white-tertiary`, #868686) `bg-on-white-tertiary`
|
|
282
|
+
- **on-warm-grey-primary** (`--color-on-warm-grey-primary`, #202020) `bg-on-warm-grey-primary`
|
|
283
|
+
- **on-warm-grey-secondary** (`--color-on-warm-grey-secondary`, #5e5d5d) `bg-on-warm-grey-secondary`
|
|
284
|
+
- **on-warm-grey-tertiary** (`--color-on-warm-grey-tertiary`, #868686) `bg-on-warm-grey-tertiary`
|
|
285
285
|
|
|
286
286
|
**Context-free compatibility aliases remain conservative.**
|
|
287
287
|
|
|
288
|
-
- **primary** (`--color-primary`, #
|
|
289
|
-
- **secondary** (`--color-secondary`, #
|
|
290
|
-
- **tertiary** (`--color-tertiary`, color-mix(in srgb, var(--color-wg10)
|
|
288
|
+
- **primary** (`--color-primary`, #202020) `bg-primary`
|
|
289
|
+
- **secondary** (`--color-secondary`, #5e5d5d) `bg-secondary`
|
|
290
|
+
- **tertiary** (`--color-tertiary`, color-mix(in srgb, var(--color-wg10) 40%, var(--color-wg11))) `bg-tertiary`
|
|
291
291
|
|
|
292
292
|
**The neutral stroke ladder: every 1px UI border stays within WG3 to WG5.**
|
|
293
293
|
|
|
294
|
-
- **border** (`--color-border`, #
|
|
295
|
-
- **border-primary** (`--color-border-primary`, #
|
|
296
|
-
- **border-secondary** (`--color-border-secondary`, #
|
|
297
|
-
- **border-tertiary** (`--color-border-tertiary`, #
|
|
298
|
-
- **border-strong** (`--color-border-strong`, #
|
|
299
|
-
- **input** (`--color-input`, #
|
|
300
|
-
- **menu-stroke** (`--color-menu-stroke`, #
|
|
301
|
-
- **toast-stroke** (`--color-toast-stroke`, #
|
|
302
|
-
- **tree-stroke** (`--color-tree-stroke`, #
|
|
294
|
+
- **border** (`--color-border`, #ececec) `bg-border`
|
|
295
|
+
- **border-primary** (`--color-border-primary`, #e6e6e6) `bg-border-primary`
|
|
296
|
+
- **border-secondary** (`--color-border-secondary`, #ececec) `bg-border-secondary`
|
|
297
|
+
- **border-tertiary** (`--color-border-tertiary`, #f1f1f1) `bg-border-tertiary`
|
|
298
|
+
- **border-strong** (`--color-border-strong`, #e6e6e6) `bg-border-strong`
|
|
299
|
+
- **input** (`--color-input`, #ececec) `bg-input`
|
|
300
|
+
- **menu-stroke** (`--color-menu-stroke`, #ececec) `bg-menu-stroke`
|
|
301
|
+
- **toast-stroke** (`--color-toast-stroke`, #ececec) `bg-toast-stroke`
|
|
302
|
+
- **tree-stroke** (`--color-tree-stroke`, #ececec) `bg-tree-stroke`
|
|
303
303
|
|
|
304
304
|
**The white working plane that sits on the canvas, and the specimen hairline.**
|
|
305
305
|
|
|
306
|
-
- **specimen-stroke** (`--color-specimen-stroke`, #
|
|
306
|
+
- **specimen-stroke** (`--color-specimen-stroke`, #f1f1f1) `bg-specimen-stroke`
|
|
307
307
|
|
|
308
308
|
**Table surfaces: the white tray, its hairlines, and header ink.**
|
|
309
309
|
|
|
310
310
|
- **table-shell** (`--color-table-shell`, #ffffff) `bg-table-shell`
|
|
311
|
-
- **table-stroke** (`--color-table-stroke`, #
|
|
312
|
-
- **table-header-foreground** (`--color-table-header-foreground`, color-mix(in srgb, var(--color-wg10)
|
|
311
|
+
- **table-stroke** (`--color-table-stroke`, #f1f1f1) `bg-table-stroke`
|
|
312
|
+
- **table-header-foreground** (`--color-table-header-foreground`, color-mix(in srgb, var(--color-wg10) 40%, var(--color-wg11))) `text-table-header-foreground`
|
|
313
313
|
|
|
314
314
|
**The artifact sheet: white warmed by a trace of the brand mark.**
|
|
315
315
|
|
|
316
316
|
- **artifact-canvas** (`--color-artifact-canvas`, color-mix(in srgb, var(--color-brand-mark) 7%, var(--color-white))) `bg-artifact-canvas`
|
|
317
317
|
|
|
318
|
-
**Focus ring and scrim, both translucent
|
|
318
|
+
**Focus ring and scrim, both translucent neutral ink.**
|
|
319
319
|
|
|
320
320
|
- **ring** (`--color-ring`, #1c8379) `ring-ring`
|
|
321
321
|
- **overlay** (`--color-overlay`, color-mix(in srgb, var(--color-wg12) 50%, transparent)) `bg-overlay`
|
|
@@ -361,24 +361,19 @@ The shell owns the frame and screens own their content. ADS targets landscape ta
|
|
|
361
361
|
|
|
362
362
|
## Elevation & Depth
|
|
363
363
|
|
|
364
|
-
Flat by default with tonal layering. Depth comes from the plane system, warm grey behind and white in front. `--shadow-
|
|
364
|
+
Flat by default with tonal layering. Depth comes from the plane system, warm grey behind and white in front. Five shadows only: `--shadow-0` (flat, every in-page surface), `--shadow-float` (toasts, toolbars, composer dock), `--shadow-overlay` (modals, dialogs, overlay drawers), and the two table scroll-hint smudges.
|
|
365
365
|
|
|
366
366
|
### Shadow vocabulary
|
|
367
367
|
|
|
368
368
|
- **0** (`--shadow-0`): `none`
|
|
369
|
-
- **
|
|
370
|
-
- **
|
|
371
|
-
- **300** (`--shadow-300`): `0 4px 6px -2px rgb(32 32 32 / 0.2)`
|
|
372
|
-
- **400** (`--shadow-400`): `0 8px 16px -4px rgb(32 32 32 / 0.22)`
|
|
373
|
-
- **500** (`--shadow-500`): `0 12px 20px -8px rgb(32 32 32 / 0.24)`
|
|
374
|
-
- **600** (`--shadow-600`): `0 20px 20px -8px rgb(32 32 32 / 0.28)`
|
|
375
|
-
- **elevation** (`--shadow-elevation`): `none`
|
|
369
|
+
- **float** (`--shadow-float`): `0 0 0 1px rgb(32 32 32 / 0.04), 0 2px 4px rgb(32 32 32 / 0.04), 0 8px 20px -4px rgb(32 32 32 / 0.10)`
|
|
370
|
+
- **overlay** (`--shadow-overlay`): `0 0 0 1px rgb(32 32 32 / 0.04), 0 4px 8px rgb(32 32 32 / 0.04), 0 16px 36px -8px rgb(32 32 32 / 0.14)`
|
|
376
371
|
- **table-smudge-left** (`--shadow-table-smudge-left`): `8px 0 24px -14px rgb(32 32 32 / 0.05)`
|
|
377
372
|
- **table-smudge-right** (`--shadow-table-smudge-right`): `-8px 0 24px -14px rgb(32 32 32 / 0.05)`
|
|
378
373
|
|
|
379
374
|
### Named rules
|
|
380
375
|
|
|
381
|
-
**The Elevation Is Actionability Rule.**
|
|
376
|
+
**The Elevation Is Actionability Rule.** ADS has five shadow tokens: shadow-0 (flat, the default), shadow-float, shadow-overlay, and the two table scroll-hint smudges. Only a layer that floats above the page may carry float or overlay; everything in the page is flat.
|
|
382
377
|
|
|
383
378
|
## Shapes
|
|
384
379
|
|
|
@@ -390,7 +385,7 @@ Soft geometry on a 5-step ladder: `xs` 2px, `sm` 4px, `md` 6px, `lg` 8px, `xl` 8
|
|
|
390
385
|
|
|
391
386
|
## Components
|
|
392
387
|
|
|
393
|
-
The catalog is the contract:
|
|
388
|
+
The catalog is the contract: 325 components, 10 hooks and 98 utilities behind one barrel (`@actioneer/ads`). Import exact, unaliased names. Native elements are for semantic structure only: `<div>`, `<form>`, `<main>`, `<section>`. Never recreate a visual control.
|
|
394
389
|
|
|
395
390
|
### Sourcing a component
|
|
396
391
|
|
|
@@ -518,9 +513,9 @@ Hand-rolling a visual control, or importing a UI library at a call site, is neve
|
|
|
518
513
|
|
|
519
514
|
**The ADS First Rule.** Every UI decision stays synchronized with ADS. Search the full catalog before deciding a component is missing, and use the exact exported name from the public barrel. When the barrel genuinely has no primitive, the sanctioned fallback is a shadcn/ui component vendored into src/components/ui through the repo's components.json recipe — never a hand-rolled control and never a UI library imported at a call site. Enforced by `npm run lint:ads`.
|
|
520
515
|
|
|
521
|
-
**The Back Leads Rule.** A
|
|
516
|
+
**The Back Leads Rule.** A record or drill-down page (a campaign inside Voice campaigns, a connector inside Data Integrations) is titled by its Breadcrumbs trail — parent / record at 16px — with no back arrow and no repeated H1; the page's one primary action sits at the right end of the same row. A standalone page-level Back control, when one is needed outside a hierarchy, sits immediately before the title and never on the right.
|
|
522
517
|
|
|
523
|
-
**The Tabs Lead, Search Trails Rule.** When tabs and a search field control the same content, they share one responsive control row: the tab
|
|
518
|
+
**The Tabs Lead, Search Trails Rule.** When tabs and a search field control the same content, they share one responsive control row: the tab list leads with its triggers left-aligned at their natural width over a baseline that fades from WG3 to transparent, and search sits at the trailing edge. On collection screens the trailing controls are icon triggers — SearchDisclosure (expands into the field) then Filters — and tab labels are 14px with a quieter count after each label.
|
|
524
519
|
|
|
525
520
|
## Do's and Don'ts
|
|
526
521
|
|
|
@@ -532,9 +527,9 @@ Every line below is a `do` or `dont` recorded on a principle in `ads-manifest.js
|
|
|
532
527
|
- **Do** inside a white Panel or Card, keep rows and items transparent at rest; group them with spacing or inset dividers, use bg-muted for hover/selection, and reserve bg-surface for one continuous semantic recess such as an editor or table tray. *(fills-over-strokes)*
|
|
533
528
|
- **Do** use border-border for outline buttons and lightweight action rows; reserve border-input for form controls (input, select, textarea, checkbox, radio, segmented-control track) and floating menus (dropdown, popover, listboxes). *(fills-over-strokes)*
|
|
534
529
|
- **Do** keep strokes on focus rings, the outline Button/Badge/Chip variants, Kbd, Divider, the Tree connector rail, and functional color swatches. *(fills-over-strokes)*
|
|
535
|
-
- **Do** keep
|
|
536
|
-
- **Do**
|
|
537
|
-
- **Do**
|
|
530
|
+
- **Do** keep cards, panels, chips, buttons, tabs, fields, thumbs, and other in-page surfaces at shadow-0; separate them with fill, border, or spacing. *(elevation-is-actionability)*
|
|
531
|
+
- **Do** use shadow-float for floating layers that sit over content: toasts, toolbars, the chat composer dock, and any menu or popover that needs lift beyond its border. *(elevation-is-actionability)*
|
|
532
|
+
- **Do** use shadow-overlay for modals, dialogs, and overlay drawers, so a dialog always reads above a menu. *(elevation-is-actionability)*
|
|
538
533
|
- **Do** treat motion as part of every ADS component import: preserve the component's built-in motion, and import any composition-level preset from the ADS root barrel. *(motion-follows-guide)*
|
|
539
534
|
- **Do** map the component family before choosing motion: tabs/segments use control; checkbox/radio/switch use selection; menus use highlight; popovers/tooltips use overlay; modal/drawer use dialog/sheet; accordion/collapsible use disclosure; progress, carousel, and sidebar use their matching presets. *(motion-follows-guide)*
|
|
540
535
|
- **Do** keep sliders, drag-resize, scrolling, and other pointer-following interactions immediate; motion begins after the committed value or destination changes. *(motion-follows-guide)*
|
|
@@ -555,24 +550,42 @@ Every line below is a `do` or `dont` recorded on a principle in `ads-manifest.js
|
|
|
555
550
|
- **Do** prefer more, smaller steps over dense ones; ask one thing at a time. *(minimal-information)*
|
|
556
551
|
- **Do** derive instead of asking whenever possible (a name from a work email, the company from its domain). *(minimal-information)*
|
|
557
552
|
- **Do** prefer clear text-only buttons; add an icon only when it communicates essential meaning the label cannot carry alone, or for a compact conventional icon-only control. *(minimal-information)*
|
|
558
|
-
- **Do**
|
|
553
|
+
- **Do** open a multi-step create task launched from a collection (New campaign) as a Modal over that list: title-only header, one scrolling form (for New campaign: Campaign name, Caller numbers, Audience), and Cancel + Create together in the footer — the user never loses their place. Add a Stepper only when the task truly has separate steps. Form modals use a fixed height (Modal height="fixed", 640px) so the frame never resizes: the header and footer stay put and ModalBody scrolls. Standalone onboarding flows render full-screen with a single content container holding the inputs and its own Back/Continue. *(minimal-information)*
|
|
559
554
|
- **Do** use @container on the pane and @lg:/@xl: variants on children inside components. *(responsive-container-fluid)*
|
|
560
555
|
- **Do** set pane widths in shells/pages through width tokens (thread-max-width, sidebar-width, aside-width, connector-card-min/-max). *(responsive-container-fluid)*
|
|
561
556
|
- **Do** cap prose at its measure; let tables/charts/tool cards break out wider. Use auto-fill + minmax(min, 1fr) for grids. *(responsive-container-fluid)*
|
|
562
|
-
- **Do**
|
|
563
|
-
- **Do**
|
|
564
|
-
- **Do**
|
|
557
|
+
- **Do** title a drill-down with Breadcrumbs (16px trail: muted parent links, Medium current item) and put its primary action (e.g. Pause campaign) right-aligned on the same row. *(leading-back-navigation)*
|
|
558
|
+
- **Do** use PageHeader with onBack only for a standalone page that has no parent hierarchy to show. *(leading-back-navigation)*
|
|
559
|
+
- **Do** reserve the trailing header area for forward or page-level actions such as Add, Save, Pause, or Share. *(leading-back-navigation)*
|
|
560
|
+
- **Do** keep tab triggers left-aligned at their natural width, then place the scoped search opposite them in the same toolbar. *(tabs-search-opposed)*
|
|
561
|
+
- **Do** on collection screens use SearchDisclosure followed by Filters as 32px icon triggers at the trailing edge; keep the page header for the title and one primary action only. *(tabs-search-opposed)*
|
|
562
|
+
- **Do** give each status tab its count (All 42 · Active 14 · Paused 4); the count renders Regular in tertiary grey, teal on the active tab. *(tabs-search-opposed)*
|
|
565
563
|
- **Do** on constrained containers, stack tabs first and search second while preserving their relationship. *(tabs-search-opposed)*
|
|
564
|
+
- **Do** size the page so the rows fill the panel to its 24px bottom inset and Pagination sits at the bottom; let only the rows scroll. *(collection-screens)*
|
|
565
|
+
- **Do** show row checkboxes only on hover/focus (and while checked or mixed); keep the header select-all checkbox always visible. *(collection-screens)*
|
|
566
|
+
- **Do** when a row's details are open, mark it with TableRow isActive (the soft-teal fade) — no radio and no selection column for that purpose. *(collection-screens)*
|
|
567
|
+
- **Do** put status in a Chip using business language (see status-language) and keep cell values at text-m. *(collection-screens)*
|
|
568
|
+
- **Do** show the customer's workspace logo in the Sidebar brand slot (SidebarWorkspace) when the product runs inside a customer workspace. *(collection-screens)*
|
|
569
|
+
- **Do** put the status Chip and its context ("Finished Oct 21") in the header, 4px under the title, so status never floats on its own. *(record-detail-panels)*
|
|
570
|
+
- **Do** group numbers in small outlined stat cards (WG3 edge, radius-l, 12px padding, 8px apart) and the trend in its own chart card. *(record-detail-panels)*
|
|
571
|
+
- **Do** list attributes (owner, started, calling windows) as label–value rows: label secondary left, value primary right, inset WG3 dividers. *(record-detail-panels)*
|
|
572
|
+
- **Do** separate sections with 32px and keep items inside a section ≤16px apart; give each section a 14px Medium title. *(record-detail-panels)*
|
|
573
|
+
- **Do** stat card: label (14px secondary) → number (32px) with its scope ("of 4,800 calls") 4px apart, then a Progress bar 12px below that fills the card width. *(analytics-surfaces)*
|
|
574
|
+
- **Do** chart card: title (16px Medium) + scope subtitle (12px secondary) on the left, the legend right-aligned on the same row, ~40px from the title block to the plot. *(analytics-surfaces)*
|
|
575
|
+
- **Do** bar charts print each bar's value; stacked bars print each segment that fits plus the stack total. Line charts print every point's value in the series colour (secondary grey for light amber/grey series). *(analytics-surfaces)*
|
|
576
|
+
- **Do** size charts so the cards end on the panel's 24px bottom inset. *(analytics-surfaces)*
|
|
577
|
+
- **Do** say Active, not Dialing; name the tab Active too (All · Draft · Active · Paused · Completed). *(status-language)*
|
|
578
|
+
- **Do** use Chip tones consistently for the same status everywhere (table cell, detail header, filters). *(status-language)*
|
|
579
|
+
- **Do** use the plain Chip appearance (square dot + 14px text) where a column of filled chips would shout louder than the record names. *(status-language)*
|
|
566
580
|
|
|
567
581
|
### Don't:
|
|
568
582
|
|
|
569
583
|
- **Don't** add a border to a surface to separate or group it — use fill/elevation/spacing instead. *(fills-over-strokes)*
|
|
570
584
|
- **Don't** alternate persistent neutral fills inside one panel (for example white Panel → grey item → white child); flatten the item or promote the recess to the container. *(fills-over-strokes)*
|
|
571
585
|
- **Don't** give a filled control no stroke on the tinted canvas — it disappears; it needs a crisp edge. *(fills-over-strokes)*
|
|
572
|
-
- **Don't**
|
|
573
|
-
- **Don't** use raw shadow values or
|
|
574
|
-
- **Don't**
|
|
575
|
-
- **Don't** use shadow-500 or shadow-600 as a routine default. *(elevation-is-actionability)*
|
|
586
|
+
- **Don't** put a shadow on an in-page surface for decoration or to signal that it is clickable. *(elevation-is-actionability)*
|
|
587
|
+
- **Don't** use raw shadow values, inset glows, or the removed numbered levels and elevation hook. *(elevation-is-actionability)*
|
|
588
|
+
- **Don't** invent a third floating level; stack order comes from float vs overlay. *(elevation-is-actionability)*
|
|
576
589
|
- **Don't** invent raw spring values inside a component, recreate a global duration/easing token scale, use an unbounded all-property transition, or start an entrance at scale zero. *(motion-follows-guide)*
|
|
577
590
|
- **Don't** override or duplicate the motion already shipped inside an imported ADS component. *(motion-follows-guide)*
|
|
578
591
|
- **Don't** animate keyboard-initiated or 100×/day actions (e.g. a command-palette toggle). *(motion-follows-guide)*
|
|
@@ -590,8 +603,23 @@ Every line below is a `do` or `dont` recorded on a principle in `ads-manifest.js
|
|
|
590
603
|
- **Don't** nest panel/step-rail chrome inside a multi-step flow. *(minimal-information)*
|
|
591
604
|
- **Don't** use sm:/md: viewport variants inside src/components, or hardcode a pane width there. *(responsive-container-fluid)*
|
|
592
605
|
- **Don't** cap a grid at a hard column count so it stops growing on wide displays. *(responsive-container-fluid)*
|
|
606
|
+
- **Don't** stack a back arrow and a large H1 above a page whose parent is already known — the breadcrumb says both. *(leading-back-navigation)*
|
|
593
607
|
- **Don't** place Back on the right side of a page header. *(leading-back-navigation)*
|
|
594
608
|
- **Don't** render a redundant visible Back label when the standard left arrow and accessible label are sufficient. *(leading-back-navigation)*
|
|
595
609
|
- **Don't** stretch the tab track to fill the space between its labels and the search field. *(tabs-search-opposed)*
|
|
596
610
|
- **Don't** put a scoped search field on a separate row above its tabs when both controls fit side by side. *(tabs-search-opposed)*
|
|
597
611
|
- **Don't** place search before tabs in the reading or keyboard order. *(tabs-search-opposed)*
|
|
612
|
+
- **Don't** put a Search button or a full-width search field in the page header of a collection screen. *(tabs-search-opposed)*
|
|
613
|
+
- **Don't** leave an empty band under a short table, or float Pagination mid-panel. *(collection-screens)*
|
|
614
|
+
- **Don't** use single-selection radios to mean 'this row is open'. *(collection-screens)*
|
|
615
|
+
- **Don't** show a checkbox on every resting row of a multi-select table. *(collection-screens)*
|
|
616
|
+
- **Don't** open record details in a modal over the list you are scanning. *(collection-screens)*
|
|
617
|
+
- **Don't** mix attributes (owner) into the metric grid. *(record-detail-panels)*
|
|
618
|
+
- **Don't** leave a lone chip or line of metadata between the title and the first section. *(record-detail-panels)*
|
|
619
|
+
- **Don't** repeat the same fact (finish date) in the header and in Details. *(record-detail-panels)*
|
|
620
|
+
- **Don't** separate stats with vertical hairlines while their bars run into the next stat — proximity breaks. *(analytics-surfaces)*
|
|
621
|
+
- **Don't** hide numbers behind a hover tooltip. *(analytics-surfaces)*
|
|
622
|
+
- **Don't** give a legend its own row under the subtitle when it fits beside the title. *(analytics-surfaces)*
|
|
623
|
+
- **Don't** put the same spacing between a label and its value as between two separate cards. *(analytics-surfaces)*
|
|
624
|
+
- **Don't** colour a status with the primary teal — it competes with the primary action and the selected-row fade. *(status-language)*
|
|
625
|
+
- **Don't** use different words for the same state in the tab, the chip and the filter. *(status-language)*
|
package/README.md
CHANGED
|
@@ -156,6 +156,24 @@ Reference the semantic tokens (e.g. `bg-brand`, `text-muted-foreground`,
|
|
|
156
156
|
`border-input`, `ring-ring`) rather than raw values; the full token list is in
|
|
157
157
|
`manifest.json` under `tokens`.
|
|
158
158
|
|
|
159
|
+
**Sample screens:** full screens built only from ADS exports ship as readable
|
|
160
|
+
source in `node_modules/@actioneer/ads/examples/` (`AgentsScreen`,
|
|
161
|
+
`SettingsScreen`, `WorkspaceHeaderScreen`, `CampaignsScreen`,
|
|
162
|
+
`CampaignAnalysisScreen`). Open them to see how components are meant to be
|
|
163
|
+
composed, or copy one into your app and swap in your own data; the folder's
|
|
164
|
+
`README.md` lists what each one shows.
|
|
165
|
+
|
|
166
|
+
**Screen recipes:** when you build a screen CLOSE to a collection (a list of
|
|
167
|
+
records with a detail panel and a create modal) or a record's analytics page,
|
|
168
|
+
start from `CampaignsScreen` / `CampaignAnalysisScreen` and follow the
|
|
169
|
+
`collection-screens`, `record-detail-panels`, `analytics-surfaces` and
|
|
170
|
+
`status-language` principles (`get_principles`) and the `collection-screen` /
|
|
171
|
+
`record-analytics` productions (`get_ui_grammar`). In short: rows fill the panel
|
|
172
|
+
with pagination at the bottom, row checkboxes on hover, `TableRow isActive` for
|
|
173
|
+
the open row, status under the detail title, outlined stat and chart cards with
|
|
174
|
+
legends in the title row and printed values, a 16px breadcrumb titling
|
|
175
|
+
drill-downs, business-language statuses, and fixed-height form modals.
|
|
176
|
+
|
|
159
177
|
Shared motion presets are named exports from `@actioneer/ads`. Components already
|
|
160
178
|
include their own interaction motion; use the exported presets for additional
|
|
161
179
|
application state changes.
|
|
@@ -197,7 +215,7 @@ every consuming repo honest.
|
|
|
197
215
|
|
|
198
216
|
## Documentation and license
|
|
199
217
|
|
|
200
|
-
- [Storybook: components
|
|
218
|
+
- [Storybook: components](https://actioneer-ads-storybook.himanshu-563.workers.dev)
|
|
201
219
|
- [ADS MCP: component discovery for coding agents](https://www.npmjs.com/package/@actioneer/ads-mcp)
|
|
202
220
|
- Bundled references: `@actioneer/ads/manifest.json`, `@actioneer/ads/llms.txt`,
|
|
203
221
|
and `@actioneer/ads/DESIGN.md`.
|
|
@@ -8,7 +8,7 @@ import { Collapsible as V, CollapsibleTrigger as W, CollapsibleContent as E } fr
|
|
|
8
8
|
import { Skeleton as x } from "../skeleton.js";
|
|
9
9
|
import { Spinner as v } from "../spinner.js";
|
|
10
10
|
import { Database as O, ChevronDown as P, WarningCircle as S, Refresh as F, CloseCircle as G } from "../../lib/icons.js";
|
|
11
|
-
import { cn as
|
|
11
|
+
import { cn as s } from "../../lib/cn.js";
|
|
12
12
|
const H = M(
|
|
13
13
|
// An ARTIFACT card, not a work-trace row: the chart is a produced object,
|
|
14
14
|
// so it reads like an attachment (contained hairline card + filled icon
|
|
@@ -91,7 +91,7 @@ function Z({
|
|
|
91
91
|
progress: r,
|
|
92
92
|
errorContent: i,
|
|
93
93
|
onRetry: o,
|
|
94
|
-
children:
|
|
94
|
+
children: l
|
|
95
95
|
}) {
|
|
96
96
|
return t === "error" ? /* @__PURE__ */ a(
|
|
97
97
|
"div",
|
|
@@ -138,11 +138,11 @@ function Z({
|
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ e("span", { children: U(r) ?? "Receiving chart data" })
|
|
140
140
|
] }),
|
|
141
|
-
/* @__PURE__ */ e("div", { className: "min-h-40", children:
|
|
141
|
+
/* @__PURE__ */ e("div", { className: "min-h-40", children: l ?? /* @__PURE__ */ e(x, { className: "h-40 w-full" }) })
|
|
142
142
|
] }) : t !== "ready" ? /* @__PURE__ */ e(Y, { status: t }) : (
|
|
143
143
|
// The ready chart draws itself in left→right (the reveal wipe) instead of
|
|
144
144
|
// popping after the loading state — data entrance, not chrome.
|
|
145
|
-
/* @__PURE__ */ e("div", { className: "ads-reveal ads-reveal-wipe min-h-40", "data-slot": "ai-chart-visual", children:
|
|
145
|
+
/* @__PURE__ */ e("div", { className: "ads-reveal ads-reveal-wipe min-h-40", "data-slot": "ai-chart-visual", children: l })
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
const ee = g.forwardRef(
|
|
@@ -151,7 +151,7 @@ const ee = g.forwardRef(
|
|
|
151
151
|
status: r,
|
|
152
152
|
title: i,
|
|
153
153
|
tag: o,
|
|
154
|
-
source:
|
|
154
|
+
source: l,
|
|
155
155
|
progress: c,
|
|
156
156
|
elapsed: y,
|
|
157
157
|
meta: d,
|
|
@@ -164,13 +164,13 @@ const ee = g.forwardRef(
|
|
|
164
164
|
onRetry: w,
|
|
165
165
|
children: k,
|
|
166
166
|
role: A = "group",
|
|
167
|
-
"aria-label":
|
|
168
|
-
"aria-describedby":
|
|
169
|
-
"aria-busy":
|
|
167
|
+
"aria-label": R,
|
|
168
|
+
"aria-describedby": j,
|
|
169
|
+
"aria-busy": z,
|
|
170
170
|
...I
|
|
171
171
|
}, $) => {
|
|
172
172
|
const n = r ?? "ready", B = n === "querying" || n === "partial" || n === "rendering", m = d !== void 0 ? d : X(n, c, y), q = K[n], f = g.useId(), p = n === "ready" && u != null, D = [
|
|
173
|
-
|
|
173
|
+
j,
|
|
174
174
|
p ? f : void 0
|
|
175
175
|
].filter(Boolean).join(" ") || void 0;
|
|
176
176
|
return /* @__PURE__ */ a(
|
|
@@ -181,11 +181,11 @@ const ee = g.forwardRef(
|
|
|
181
181
|
defaultOpen: N,
|
|
182
182
|
onOpenChange: C,
|
|
183
183
|
role: A,
|
|
184
|
-
"aria-label":
|
|
184
|
+
"aria-label": R ?? (typeof i == "string" ? i : "AI chart evidence"),
|
|
185
185
|
"aria-describedby": D,
|
|
186
186
|
"data-slot": "ai-chart",
|
|
187
187
|
"data-status": n,
|
|
188
|
-
className:
|
|
188
|
+
className: s(H({ status: n }), t),
|
|
189
189
|
...I,
|
|
190
190
|
children: [
|
|
191
191
|
/* @__PURE__ */ e(
|
|
@@ -203,7 +203,7 @@ const ee = g.forwardRef(
|
|
|
203
203
|
"button",
|
|
204
204
|
{
|
|
205
205
|
type: "button",
|
|
206
|
-
className:
|
|
206
|
+
className: s(
|
|
207
207
|
"group/ai-chart-trigger flex w-full items-center gap-2.5 px-2.5 py-2 text-left",
|
|
208
208
|
"outline-none transition-[background,color,transform] duration-150 ease-out hover:bg-fill active:scale-[0.97] motion-reduce:active:scale-100",
|
|
209
209
|
"focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring motion-reduce:transition-none"
|
|
@@ -213,7 +213,7 @@ const ee = g.forwardRef(
|
|
|
213
213
|
"span",
|
|
214
214
|
{
|
|
215
215
|
"aria-hidden": !0,
|
|
216
|
-
className: "grid
|
|
216
|
+
className: "grid h-8 w-5 shrink-0 place-items-center",
|
|
217
217
|
children: /* @__PURE__ */ e(O, { "data-slot": "ai-chart-icon", className: "size-4" })
|
|
218
218
|
}
|
|
219
219
|
),
|
|
@@ -248,7 +248,7 @@ const ee = g.forwardRef(
|
|
|
248
248
|
/* @__PURE__ */ a(
|
|
249
249
|
E,
|
|
250
250
|
{
|
|
251
|
-
className:
|
|
251
|
+
className: s(
|
|
252
252
|
"overflow-hidden px-2.5 pb-2.5 outline-none",
|
|
253
253
|
"data-[state=closed]:pointer-events-none"
|
|
254
254
|
),
|
|
@@ -257,7 +257,7 @@ const ee = g.forwardRef(
|
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
259
259
|
"data-slot": "ai-chart-body",
|
|
260
|
-
"aria-busy":
|
|
260
|
+
"aria-busy": z ?? (B || void 0),
|
|
261
261
|
children: /* @__PURE__ */ e(
|
|
262
262
|
Z,
|
|
263
263
|
{
|
|
@@ -270,7 +270,7 @@ const ee = g.forwardRef(
|
|
|
270
270
|
)
|
|
271
271
|
}
|
|
272
272
|
),
|
|
273
|
-
|
|
273
|
+
l && /* @__PURE__ */ e(
|
|
274
274
|
"div",
|
|
275
275
|
{
|
|
276
276
|
className: "mt-2 text-xs text-tertiary",
|
|
@@ -280,16 +280,16 @@ const ee = g.forwardRef(
|
|
|
280
280
|
{
|
|
281
281
|
type: "button",
|
|
282
282
|
className: "rounded-sm text-left text-s outline-none transition-colors duration-150 ease-out hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
|
|
283
|
-
"aria-label": `Open source ${
|
|
284
|
-
onClick: () => h(
|
|
283
|
+
"aria-label": `Open source ${l}`,
|
|
284
|
+
onClick: () => h(l),
|
|
285
285
|
children: [
|
|
286
286
|
"from ",
|
|
287
|
-
/* @__PURE__ */ e("span", { className: "font-normal tabular-nums", children:
|
|
287
|
+
/* @__PURE__ */ e("span", { className: "font-normal tabular-nums", children: l })
|
|
288
288
|
]
|
|
289
289
|
}
|
|
290
290
|
) : /* @__PURE__ */ a("p", { children: [
|
|
291
291
|
"from ",
|
|
292
|
-
/* @__PURE__ */ e("span", { className: "font-normal tabular-nums", children:
|
|
292
|
+
/* @__PURE__ */ e("span", { className: "font-normal tabular-nums", children: l })
|
|
293
293
|
] })
|
|
294
294
|
}
|
|
295
295
|
)
|