@adia-ai/web-components 0.8.13 → 0.8.14

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 (69) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components/adia-mark/adia-mark.examples.md +3 -12
  3. package/components/adia-wordmark/adia-wordmark.examples.md +4 -12
  4. package/components/agent-artifact/agent-artifact.examples.md +0 -9
  5. package/components/agent-feedback-bar/agent-feedback-bar.examples.md +0 -11
  6. package/components/alert/alert.examples.md +1 -1
  7. package/components/badge/badge.examples.md +35 -4
  8. package/components/block/block.examples.md +5 -5
  9. package/components/blockquote/blockquote.examples.md +22 -0
  10. package/components/button/button.examples.md +4 -4
  11. package/components/card/card.examples.md +1 -1
  12. package/components/check/check.examples.md +23 -4
  13. package/components/col/col.examples.md +29 -0
  14. package/components/combobox/combobox.examples.md +9 -15
  15. package/components/command/command.examples.md +3 -3
  16. package/components/context-menu/context-menu.a2ui.json +1 -1
  17. package/components/context-menu/context-menu.css +3 -1
  18. package/components/context-menu/context-menu.examples.md +50 -0
  19. package/components/context-menu/context-menu.yaml +1 -1
  20. package/components/date-range-picker/date-range-picker.examples.md +9 -21
  21. package/components/datetime-picker/datetime-picker.examples.md +9 -30
  22. package/components/demo-toggle/demo-toggle.examples.md +1 -1
  23. package/components/display-field/display-field.examples.md +5 -30
  24. package/components/drawer/drawer.examples.md +17 -32
  25. package/components/field/field.examples.md +30 -11
  26. package/components/grid/grid.examples.md +27 -0
  27. package/components/heatmap/heatmap.examples.md +2 -2
  28. package/components/inline-edit/inline-edit.examples.md +32 -0
  29. package/components/integration-card/integration-card.examples.md +10 -27
  30. package/components/list-window/list-window.examples.md +5 -59
  31. package/components/loading-overlay/loading-overlay.examples.md +19 -36
  32. package/components/mark/mark.examples.md +62 -0
  33. package/components/menu/menu.css +8 -2
  34. package/components/nav/nav.examples.md +2 -2
  35. package/components/nav-group/nav-group.examples.md +2 -2
  36. package/components/nav-item/nav-item.css +21 -6
  37. package/components/noodles/noodles.examples.md +11 -11
  38. package/components/number-format/number-format.examples.md +19 -0
  39. package/components/page/page.examples.md +43 -20
  40. package/components/password-strength/password-strength.examples.md +28 -0
  41. package/components/popover/popover.css +7 -1
  42. package/components/preview/preview.examples.md +30 -0
  43. package/components/progress/progress.examples.md +3 -3
  44. package/components/qr-code/qr-code.examples.md +19 -0
  45. package/components/radio/radio.examples.md +23 -4
  46. package/components/relative-time/relative-time.examples.md +19 -0
  47. package/components/row/row.examples.md +20 -0
  48. package/components/skip-nav/skip-nav.examples.md +27 -0
  49. package/components/spinner/spinner.examples.md +5 -12
  50. package/components/stack/stack.examples.md +17 -0
  51. package/components/stat/stat.examples.md +23 -4
  52. package/components/swatch/swatch.examples.md +2 -2
  53. package/components/switch/switch.examples.md +23 -4
  54. package/components/table-toolbar/table-toolbar.examples.md +46 -0
  55. package/components/tabs/tabs.examples.md +13 -16
  56. package/components/tag/tag.examples.md +4 -4
  57. package/components/tags-input/tags-input.examples.md +6 -73
  58. package/components/text/text.examples.md +37 -6
  59. package/components/time-picker/time-picker.examples.md +3 -15
  60. package/components/toc/toc.examples.md +69 -0
  61. package/components/tour/tour.examples.md +119 -0
  62. package/components/visually-hidden/visually-hidden.examples.md +26 -0
  63. package/dist/theme-provider.min.js +6 -6
  64. package/dist/themes.min.css +1 -1
  65. package/dist/themes.sheet.js +1 -1
  66. package/dist/web-components.min.css +1 -1
  67. package/dist/web-components.sheet.js +1 -1
  68. package/package.json +1 -1
  69. package/styles/themes.css +460 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog — @adia-ai/web-components
2
2
 
3
+ ## [0.8.14] — 2026-07-25
4
+
5
+ ### Changed
6
+ - **Every theme's neutral chrome now carries its own hue** (`styles/themes.css`; PR #414) — canvas, borders and on-surface text stayed a fixed cool grey across all 12 `[theme]` identities while only the accent families rotated. The same hue-rotation mechanism (own L/C curve untouched, hue shifted by a constant delta, per-theme chroma multiplier) now extends to the neutral family, targeting each theme's own primary hue. Neutral's chroma stays low (≈0.002–0.044, the top end being signal's 1.3× and arcade's 1.4×), so the tint reads as a whisper rather than a recolor — chrome belongs to the theme's identity instead of sitting as a fixed grey under a rotating accent. `npm run verify:contrast` still passes 42/42 WCAG AA 4.5:1 pairs in both schemes for every theme (L values are byte-identical to the shipped ramp; only hue and chroma moved).
7
+ - **All floating overlays share one elevated surface** (`components/{popover,menu,context-menu}/`) — `popover-ui` used `--md-sys-color-neutral-surface-dimmer` (neutral-925, *darker* than the neutral-875 page it floats over, so a popover panel read near-black), while `menu-ui` and `context-menu-ui` sat at page level (`--a-bg-subtle` = `neutral-surface`). All three now use `--md-sys-color-neutral-surface-bright`, matching `select-ui`'s own dropdown exactly: a select menu and a popover panel opened from the same topbar sit on one plane. Verified live in dark mode — both surfaces measure the identical computed color. `drawer-ui` deliberately keeps `surface-dimmer` (edge-anchored, not floating) and `tooltip-ui` keeps its inverted surface.
8
+
9
+ ### Fixed
10
+ - **`nav-item-ui`'s selected state is distinguishable from hover again** (`components/nav-item/nav-item.css`) — v0.8.13 (PR #417) unified both states onto `--a-bg-muted` (container-low). Wherever no *other* selected affordance shows, that made them pixel-identical: a `[variant="section"]` item with no icon — the docs-site subnav shape — suppresses the accent bar and resolves `--a-ui-text-selected` and `--a-ui-text-hover` to the same `--a-fg-strong`, leaving the background as the only signal. Selected now reads `--a-bg-selected` (`neutral-container-active`) while hover keeps container-low, so v0.8.13's actual win — dropping the `--a-canvas-0-scrim` opacity synth from hover — is preserved. Verified live in dark mode: plain / hovered / selected measure transparent, α0.1, α0.4.
11
+ - **55 drifted or missing `.examples.md` regenerated, plus a drift gate** (gh#395; PR #416) — the size-model migration (PR #396) edited ~100 components' `.examples.html` without re-running `generate-examples-md.mjs`, so 42 committed `.md` files still described pre-migration markup and 13 components had no `.md` at all. Nothing caught either gap: unlike `.a2ui.json`, this generator had no drift check. `generate-examples-md.mjs --verify` (mirroring `components.mjs --verify`) and the new `check:examples-md-fresh` script close it.
12
+ - **Stale token-table defaults in the docs** — `menu.examples.html` documented a `--menu-bg` token that does not exist (the shipped token is `--menu-popover-bg`), `popover.examples.html` documented a default the CSS had not used for two releases, and `context-menu.yaml`'s `--context-menu-bg` default was equally stale. All three now state the shipped value.
13
+
14
+ ### Maintenance
15
+ - **`dist/` bundles rebuilt** — CSS + JS + `theme-provider.min.js`, which inlines the changed component CSS.
16
+
3
17
  ## [0.8.13] — 2026-07-25
4
18
 
5
19
  ### Added
@@ -6,19 +6,10 @@
6
6
  <adia-mark-ui></adia-mark-ui>
7
7
  ```
8
8
 
9
- ## Sizes
9
+ ## size
10
10
 
11
11
  ```html
12
- <adia-mark-ui size="sm"></adia-mark-ui>
13
- <adia-mark-ui size="md"></adia-mark-ui>
14
- <adia-mark-ui size="lg"></adia-mark-ui>
15
- ```
16
-
17
- ## Topbar brand slot
18
-
19
- ```html
20
- <row-ui gap="2" align="center">
12
+ <div scale="ui-sm">
21
13
  <adia-mark-ui size="sm"></adia-mark-ui>
22
- <text-ui variant="heading">Adia</text-ui>
23
- </row-ui>
14
+ </div>
24
15
  ```
@@ -6,18 +6,10 @@
6
6
  <adia-wordmark-ui></adia-wordmark-ui>
7
7
  ```
8
8
 
9
- ## Sizes
9
+ ## size
10
10
 
11
11
  ```html
12
- <adia-wordmark-ui size="sm"></adia-wordmark-ui>
13
- <adia-wordmark-ui size="md"></adia-wordmark-ui>
14
- <adia-wordmark-ui size="lg"></adia-wordmark-ui>
15
- ```
16
-
17
- ## Login header
18
-
19
- ```html
20
- <row-ui gap="2" align="center">
21
- <adia-wordmark-ui size="lg"></adia-wordmark-ui>
22
- </row-ui>
12
+ <div scale="ui-sm">
13
+ <adia-wordmark-ui size="sm"></adia-wordmark-ui>
14
+ </div>
23
15
  ```
@@ -17,12 +17,3 @@
17
17
  <div style="font-size: var(--a-ui-sm); color: var(--a-fg-muted); line-height: 1.5;">Validation score 62/100 — the output is missing a price badge and has an unlabeled button. Retrying would help.</div>
18
18
  </agent-artifact-ui>
19
19
  ```
20
-
21
- ## Usage
22
-
23
- ```html
24
- <agent-artifact-ui title="product-card" kind="A2UI" icon="layout">
25
- <button-ui slot="primary" text="Open in canvas" icon="arrows-out-simple"></button-ui>
26
- <button-ui slot="secondary" text="Copy" icon="copy"></button-ui>
27
- </agent-artifact-ui>
28
- ```
@@ -11,14 +11,3 @@
11
11
  ```html
12
12
  <agent-feedback-bar-ui id="demo-save" save-label="Save pattern"></agent-feedback-bar-ui>
13
13
  ```
14
-
15
- ## Usage
16
-
17
- ```html
18
- <agent-feedback-bar-ui save-label="Save pattern"></agent-feedback-bar-ui>
19
- el.addEventListener('feedback-rate', (e) => persist(e.detail.rating));
20
- el.addEventListener('feedback-save', async () => {
21
- const name = await savePattern(...);
22
- el.setStatus(`Saved as "${name}"`, { lock: 'save' });
23
- });
24
- ```
@@ -6,7 +6,7 @@
6
6
  <alert-ui text="Default alert message"></alert-ui>
7
7
  ```
8
8
 
9
- ## closable
9
+ ## closable · dismissible
10
10
 
11
11
  ```html
12
12
  <alert-ui text="This can be dismissed" closable></alert-ui>
@@ -6,14 +6,45 @@
6
6
  <badge-ui text="Default"></badge-ui>
7
7
  ```
8
8
 
9
- ## size
9
+ ## Typography registers
10
10
 
11
11
  ```html
12
- <badge-ui text="Small" size="sm"></badge-ui>
12
+ <row-ui gap="6" align="start" wrap>
13
+ <col-ui gap="2">
14
+ <text-ui variant="caption" color="muted">verse</text-ui>
15
+ <div verse>
16
+ <row-ui gap="2">
17
+ <badge-ui text="New" variant="success"></badge-ui>
18
+ <badge-ui text="Beta" variant="info"></badge-ui>
19
+ <badge-ui text="3" variant="danger"></badge-ui>
20
+ </row-ui>
21
+ </div>
22
+ </col-ui>
23
+ <col-ui gap="2">
24
+ <text-ui variant="caption" color="muted">regular</text-ui>
25
+ <div>
26
+ <row-ui gap="2">
27
+ <badge-ui text="New" variant="success"></badge-ui>
28
+ <badge-ui text="Beta" variant="info"></badge-ui>
29
+ <badge-ui text="3" variant="danger"></badge-ui>
30
+ </row-ui>
31
+ </div>
32
+ </col-ui>
33
+ <col-ui gap="2">
34
+ <text-ui variant="caption" color="muted">prose</text-ui>
35
+ <div prose>
36
+ <row-ui gap="2">
37
+ <badge-ui text="New" variant="success"></badge-ui>
38
+ <badge-ui text="Beta" variant="info"></badge-ui>
39
+ <badge-ui text="3" variant="danger"></badge-ui>
40
+ </row-ui>
41
+ </div>
42
+ </col-ui>
43
+ </row-ui>
13
44
  ```
14
45
 
15
- ## text
46
+ ## tone
16
47
 
17
48
  ```html
18
- <badge-ui text="New"></badge-ui>
49
+ <badge-ui text="Info" variant="info" tone="solid"></badge-ui>
19
50
  ```
@@ -3,7 +3,7 @@
3
3
  ## padding
4
4
 
5
5
  ```html
6
- <block-ui padding="none" style="border:1px dashed var(--a-border);">
6
+ <block-ui padding="none" style="border:1px dashed var(--md-sys-color-neutral-outline);">
7
7
  <p>padding: none</p>
8
8
  </block-ui>
9
9
  ```
@@ -11,8 +11,8 @@
11
11
  ## margin
12
12
 
13
13
  ```html
14
- <div style="background:var(--a-accent-10-tint); display:inline-block;">
15
- <block-ui margin="none" padding="sm" style="border:1px dashed var(--a-border); background:var(--a-canvas-bg);">
14
+ <div style="background:var(--a-primary-10-tint); display:inline-block;">
15
+ <block-ui margin="none" padding="sm" style="border:1px dashed var(--md-sys-color-neutral-outline); background:var(--a-canvas-bg);">
16
16
  <p>margin: none</p>
17
17
  </block-ui>
18
18
  </div>
@@ -21,8 +21,8 @@
21
21
  ## Combinations
22
22
 
23
23
  ```html
24
- <div style="background:var(--a-accent-10-tint); display:inline-block;">
25
- <block-ui padding="lg" margin="md" style="border:1px dashed var(--a-border); background:var(--a-canvas-bg);">
24
+ <div style="background:var(--a-primary-10-tint); display:inline-block;">
25
+ <block-ui padding="lg" margin="md" style="border:1px dashed var(--md-sys-color-neutral-outline); background:var(--a-canvas-bg);">
26
26
  <p>padding: lg + margin: md</p>
27
27
  </block-ui>
28
28
  </div>
@@ -0,0 +1,22 @@
1
+ # blockquote — Examples
2
+
3
+ ## default
4
+
5
+ ```html
6
+ <blockquote-ui>Stay hungry. Stay foolish.</blockquote-ui>
7
+ ```
8
+
9
+ ## cite (attribute)
10
+
11
+ ```html
12
+ <blockquote-ui cite="Steve Jobs, Stanford Commencement, 2005">Stay hungry. Stay foolish.</blockquote-ui>
13
+ ```
14
+
15
+ ## cite (slot — rich attribution)
16
+
17
+ ```html
18
+ <blockquote-ui>
19
+ The best way to predict the future is to invent it.
20
+ <link-ui slot="cite" href="https://en.wikipedia.org/wiki/Alan_Kay">Alan Kay (1971)</link-ui>
21
+ </blockquote-ui>
22
+ ```
@@ -6,14 +6,14 @@
6
6
  <button-ui text="Default"></button-ui>
7
7
  ```
8
8
 
9
- ## size
9
+ ## color
10
10
 
11
11
  ```html
12
- <button-ui text="Small" size="sm"></button-ui>
12
+ <button-ui text="Info" color="info"></button-ui>
13
13
  ```
14
14
 
15
- ## icon-only
15
+ ## size
16
16
 
17
17
  ```html
18
- <button-ui icon="plus" size="sm"></button-ui>
18
+ <button-ui text="Small" size="sm"></button-ui>
19
19
  ```
@@ -11,7 +11,7 @@
11
11
  ## size
12
12
 
13
13
  ```html
14
- <card-ui size="sm">
14
+ <card-ui>
15
15
  <section>Small card</section>
16
16
  </card-ui>
17
17
  ```
@@ -6,14 +6,33 @@
6
6
  <check-ui label="Unchecked"></check-ui>
7
7
  ```
8
8
 
9
- ## indeterminate
9
+ ## Typography registers
10
10
 
11
11
  ```html
12
- <check-ui label="Select All" indeterminate></check-ui>
12
+ <row-ui gap="6" align="start" wrap>
13
+ <col-ui gap="2">
14
+ <text-ui variant="caption" color="muted">verse</text-ui>
15
+ <div verse>
16
+ <check-ui label="Notify me" checked></check-ui>
17
+ </div>
18
+ </col-ui>
19
+ <col-ui gap="2">
20
+ <text-ui variant="caption" color="muted">regular</text-ui>
21
+ <div>
22
+ <check-ui label="Notify me" checked></check-ui>
23
+ </div>
24
+ </col-ui>
25
+ <col-ui gap="2">
26
+ <text-ui variant="caption" color="muted">prose</text-ui>
27
+ <div prose>
28
+ <check-ui label="Notify me" checked></check-ui>
29
+ </div>
30
+ </col-ui>
31
+ </row-ui>
13
32
  ```
14
33
 
15
- ## disabled
34
+ ## indeterminate
16
35
 
17
36
  ```html
18
- <check-ui label="Disabled Unchecked" disabled></check-ui>
37
+ <check-ui label="Select All" indeterminate></check-ui>
19
38
  ```
@@ -9,3 +9,32 @@
9
9
  <button-ui text="Sign in" variant="solid" stretch></button-ui>
10
10
  </col-ui>
11
11
  ```
12
+
13
+ ## Responsive (@bp)
14
+
15
+ ```html
16
+ <!-- Mobile: center-aligned single column; md+: start-aligned with larger gap -->
17
+ <col-ui gap="sm lg@md" align="center start@md">
18
+ <card-ui>...</card-ui>
19
+ <card-ui>...</card-ui>
20
+ </col-ui>
21
+ ```
22
+
23
+ ## Rendered demos
24
+
25
+ ```html
26
+ <col-ui gap="3">
27
+ <field-ui label="Full name">
28
+ <input-ui placeholder="Maya Chen"></input-ui>
29
+ </field-ui>
30
+ <field-ui label="Email">
31
+ <input-ui type="email" placeholder="maya@example.com"></input-ui>
32
+ </field-ui>
33
+ <field-ui label="Role">
34
+ <select-ui value="member">
35
+ <option value="admin">Admin</option>
36
+ <option value="member">Member</option>
37
+ </select-ui>
38
+ </field-ui>
39
+ </col-ui>
40
+ ```
@@ -11,6 +11,8 @@
11
11
  <option value="fr">France</option>
12
12
  <option value="es">Spain</option>
13
13
  <option value="it">Italy</option>
14
+ <option value="jp">Japan</option>
15
+ <option value="kr">South Korea</option>
14
16
  </combobox-ui>
15
17
  </field-ui>
16
18
  ```
@@ -23,16 +25,22 @@
23
25
  <optgroup label="Americas">
24
26
  <option value="nyc">New York</option>
25
27
  <option value="sf">San Francisco</option>
28
+ <option value="toronto">Toronto</option>
26
29
  </optgroup>
27
30
  <optgroup label="Europe">
28
31
  <option value="london">London</option>
29
32
  <option value="paris">Paris</option>
33
+ <option value="berlin">Berlin</option>
34
+ </optgroup>
35
+ <optgroup label="Asia">
36
+ <option value="tokyo">Tokyo</option>
37
+ <option value="singapore">Singapore</option>
30
38
  </optgroup>
31
39
  </combobox-ui>
32
40
  </field-ui>
33
41
  ```
34
42
 
35
- ## creatable tag picker
43
+ ## creatable
36
44
 
37
45
  ```html
38
46
  <field-ui label="Tag">
@@ -43,17 +51,3 @@
43
51
  </combobox-ui>
44
52
  </field-ui>
45
53
  ```
46
-
47
- Typing "regression" + Enter fires the `create` event with `detail.value === "regression"`.
48
-
49
- ## clearable
50
-
51
- ```html
52
- <field-ui label="Role">
53
- <combobox-ui clearable value="user" placeholder="Pick a role…">
54
- <option value="user">User</option>
55
- <option value="admin">Admin</option>
56
- <option value="guest">Guest</option>
57
- </combobox-ui>
58
- </field-ui>
59
- ```
@@ -3,7 +3,7 @@
3
3
  ## inline (not in dialog)
4
4
 
5
5
  ```html
6
- <command-ui placeholder="Search commands..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
6
+ <command-ui placeholder="Search commands..." style="width:32rem; max-height:24rem; border:1px solid var(--md-sys-color-neutral-outline); border-radius:var(--a-radius-lg);">
7
7
  <optgroup label="Pages">
8
8
  <option value="home" data-icon="house">Home</option>
9
9
  <option value="dashboard" data-icon="chart-bar">Dashboard</option>
@@ -19,7 +19,7 @@
19
19
  ## grouped options with icons
20
20
 
21
21
  ```html
22
- <command-ui placeholder="Type a command..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
22
+ <command-ui placeholder="Type a command..." style="width:32rem; max-height:24rem; border:1px solid var(--md-sys-color-neutral-outline); border-radius:var(--a-radius-lg);">
23
23
  <optgroup label="Navigation">
24
24
  <option value="home" data-icon="house">Go to Home</option>
25
25
  <option value="projects" data-icon="folder">Go to Projects</option>
@@ -41,7 +41,7 @@
41
41
  ## with shortcuts
42
42
 
43
43
  ```html
44
- <command-ui placeholder="Search..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
44
+ <command-ui placeholder="Search..." style="width:32rem; max-height:24rem; border:1px solid var(--md-sys-color-neutral-outline); border-radius:var(--a-radius-lg);">
45
45
  <optgroup label="Actions">
46
46
  <option value="new-file" data-icon="file-plus" data-shortcut="&#8984;N">New File</option>
47
47
  <option value="open" data-icon="folder-open" data-shortcut="&#8984;O">Open File</option>
@@ -138,7 +138,7 @@
138
138
  "tokens": {
139
139
  "--context-menu-bg": {
140
140
  "description": "Menu surface background color.",
141
- "default": "var(--a-bg-subtle)"
141
+ "default": "var(--md-sys-color-neutral-surface-bright)"
142
142
  },
143
143
  "--context-menu-border": {
144
144
  "description": "Menu surface border color.",
@@ -28,7 +28,9 @@
28
28
  padding: var(--a-space-1);
29
29
  border: 1px solid var(--md-sys-color-neutral-outline-variant);
30
30
  border-radius: var(--a-radius-lg);
31
- background: var(--a-bg-subtle);
31
+ /* surface-bright — same elevated-overlay plane as menu-ui (whose surface
32
+ this must match), select-ui's dropdown, and popover-ui. */
33
+ background: var(--md-sys-color-neutral-surface-bright);
32
34
  box-shadow: var(--a-shadow-lg);
33
35
  min-width: 10rem;
34
36
  font-family: var(--context-menu-font-family, var(--a-font-family-ui));
@@ -0,0 +1,50 @@
1
+ # context-menu — Examples
2
+
3
+ ## Wrap mode — target is the first non-item child
4
+
5
+ ```html
6
+ <context-menu-ui>
7
+ <div tabindex="0" style="padding: var(--a-space-3); border: 1px dashed var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-md); background: var(--md-sys-color-neutral-background); cursor: context-menu; outline: none;">
8
+ <icon-ui name="file-text"></icon-ui>
9
+ <strong>Q4-budget-draft.xlsx</strong>
10
+ <text-ui color="subtle" size="sm">— right-click me</text-ui>
11
+ </div>
12
+ <menu-item-ui value="open" text="Open"></menu-item-ui>
13
+ <menu-item-ui value="rename" text="Rename…"></menu-item-ui>
14
+ <menu-item-ui value="download" text="Download"></menu-item-ui>
15
+ <menu-divider-ui></menu-divider-ui>
16
+ <menu-item-ui value="delete" text="Delete" variant="danger"></menu-item-ui>
17
+ </context-menu-ui>
18
+ ```
19
+
20
+ ## [for] selector mode — point at existing targets
21
+
22
+ ```html
23
+ <div style="display: grid; gap: var(--a-space-2);">
24
+ <div data-row tabindex="0" style="padding: var(--a-space-3); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-sm); background: var(--md-sys-color-neutral-background);">Row A — right-click</div>
25
+ <div data-row tabindex="0" style="padding: var(--a-space-3); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-sm); background: var(--md-sys-color-neutral-background);">Row B — right-click</div>
26
+ <div data-row tabindex="0" style="padding: var(--a-space-3); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-sm); background: var(--md-sys-color-neutral-background);">Row C — right-click</div>
27
+ </div>
28
+ <context-menu-ui for='[data-chunk="context-menu-for"] [data-row]'>
29
+ <menu-item-ui value="edit" text="Edit"></menu-item-ui>
30
+ <menu-item-ui value="duplicate" text="Duplicate"></menu-item-ui>
31
+ <menu-divider-ui></menu-divider-ui>
32
+ <menu-item-ui value="archive" text="Archive" variant="warning"></menu-item-ui>
33
+ </context-menu-ui>
34
+ ```
35
+
36
+ ## open · long-press-ms
37
+
38
+ ```html
39
+ <context-menu-ui open long-press-ms="800">
40
+ <div tabindex="0" style="padding: var(--a-space-3); border: 1px dashed var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-md); background: var(--md-sys-color-neutral-background); cursor: context-menu; outline: none;">
41
+ <icon-ui name="dots-three"></icon-ui>
42
+ <strong>Canvas object</strong>
43
+ <text-ui color="subtle" size="sm">— long-press 800 ms, or open programmatically</text-ui>
44
+ </div>
45
+ <menu-item-ui value="front" text="Bring to front"></menu-item-ui>
46
+ <menu-item-ui value="back" text="Send to back"></menu-item-ui>
47
+ <menu-divider-ui></menu-divider-ui>
48
+ <menu-item-ui value="delete" text="Delete" variant="danger"></menu-item-ui>
49
+ </context-menu-ui>
50
+ ```
@@ -85,7 +85,7 @@ traits: []
85
85
  tokens:
86
86
  --context-menu-bg:
87
87
  description: Menu surface background color.
88
- default: var(--a-bg-subtle)
88
+ default: var(--md-sys-color-neutral-surface-bright)
89
89
  --context-menu-border:
90
90
  description: Menu surface border color.
91
91
  default: var(--a-border-subtle)
@@ -4,34 +4,22 @@
4
4
 
5
5
  ```html
6
6
  <field-ui label="Report period">
7
- <date-range-picker-ui
8
- name="report-period"
9
- min="2026-01-01"
10
- max="2026-12-31">
11
- </date-range-picker-ui>
7
+ <date-range-picker-ui name="report-period" min="2026-01-01" max="2026-12-31"></date-range-picker-ui>
12
8
  </field-ui>
13
9
  ```
14
10
 
15
- ## Comparison mode
11
+ ## Pre-selected
16
12
 
17
13
  ```html
18
- <date-range-picker-ui
19
- name="period"
20
- comparison
21
- value='{"from":"2026-05-01","to":"2026-05-31"}'
22
- compare-value='{"from":"2026-04-01","to":"2026-04-30"}'>
23
- </date-range-picker-ui>
14
+ <field-ui label="Booking dates">
15
+ <date-range-picker-ui value='{"from":"2026-03-01","to":"2026-03-15"}'></date-range-picker-ui>
16
+ </field-ui>
24
17
  ```
25
18
 
26
- ## Custom presets
19
+ ## Comparison mode
27
20
 
28
21
  ```html
29
- <date-range-picker-ui id="dr" name="period"></date-range-picker-ui>
30
- <script>
31
- document.getElementById('dr').presets = [
32
- { label: 'Q1', range: { from: '2026-01-01', to: '2026-03-31' } },
33
- { label: 'Q2', range: { from: '2026-04-01', to: '2026-06-30' } },
34
- { label: 'YTD', range: { from: '2026-01-01', to: '2026-05-24' } },
35
- ];
36
- </script>
22
+ <field-ui label="Analytics period">
23
+ <date-range-picker-ui name="period" comparison value='{"from":"2026-05-01","to":"2026-05-31"}' compare-value='{"from":"2026-04-01","to":"2026-04-30"}'></date-range-picker-ui>
24
+ </field-ui>
37
25
  ```
@@ -4,43 +4,22 @@
4
4
 
5
5
  ```html
6
6
  <field-ui label="Appointment">
7
- <datetime-picker-ui
8
- name="appointment"
9
- min="2026-01-01T00:00"
10
- max="2026-12-31T23:59">
11
- </datetime-picker-ui>
7
+ <datetime-picker-ui name="appointment" min="2026-01-01T00:00" max="2026-12-31T23:59"></datetime-picker-ui>
12
8
  </field-ui>
13
9
  ```
14
10
 
15
- ## Second precision
11
+ ## Pre-selected
16
12
 
17
13
  ```html
18
- <datetime-picker-ui
19
- precision="second"
20
- step="1"
21
- value="2026-05-24T14:30:45">
22
- </datetime-picker-ui>
23
- ```
24
-
25
- ## Forced 24-hour cycle
26
-
27
- ```html
28
- <datetime-picker-ui hour-cycle="h23"></datetime-picker-ui>
29
- ```
30
-
31
- ## Explicit commit (Apply / Cancel)
32
-
33
- ```html
34
- <datetime-picker-ui name="explicit">
35
- <div slot="footer">
36
- <button-ui data-action="cancel" variant="ghost" text="Cancel"></button-ui>
37
- <button-ui data-action="apply" variant="primary" text="Apply"></button-ui>
38
- </div>
39
- </datetime-picker-ui>
14
+ <field-ui label="Meeting start">
15
+ <datetime-picker-ui value="2026-05-24T14:30"></datetime-picker-ui>
16
+ </field-ui>
40
17
  ```
41
18
 
42
- ## Readonly
19
+ ## precision
43
20
 
44
21
  ```html
45
- <datetime-picker-ui readonly value="2026-05-24T14:30"></datetime-picker-ui>
22
+ <field-ui label="Minute precision">
23
+ <datetime-picker-ui value="2026-05-24T14:30"></datetime-picker-ui>
24
+ </field-ui>
46
25
  ```
@@ -5,7 +5,7 @@
5
5
  ```html
6
6
  <demo-toggle-ui label-on="With trait" label-off="Without trait" initial="off">
7
7
  <div slot="off" style="padding:var(--a-space-4);text-align:center;color:var(--a-fg-muted);">Bare surface — no trait attached.</div>
8
- <div slot="on" style="padding:var(--a-space-4);text-align:center;color:var(--a-fg);">Same surface, with trait attached.</div>
8
+ <div slot="on" style="padding:var(--a-space-4);text-align:center;color:var(--md-sys-color-neutral-on-surface);">Same surface, with trait attached.</div>
9
9
  </demo-toggle-ui>
10
10
  ```
11
11
 
@@ -1,44 +1,19 @@
1
1
  # display-field — Examples
2
2
 
3
- A display-only labeled value. No input semantics (no focus, no
4
- contenteditable, no form participation). For an editable field use
5
- `field-ui` + `input-ui`; for a metric use `stat-ui`; for many read-only
6
- pairs use `description-list-ui`.
7
-
8
- ## Basic
3
+ ## basic
9
4
 
10
5
  ```html
11
6
  <display-field-ui label="Account ID" value="acct_1Q9xK2"></display-field-ui>
12
7
  ```
13
8
 
14
- ## Masked value
15
-
16
- ```html
17
- <display-field-ui
18
- label="Card on file"
19
- value="•••• •••• •••• 4242"
20
- variant="masked"></display-field-ui>
21
- ```
22
-
23
- ## With a leading icon and a hint
9
+ ## variant="masked"
24
10
 
25
11
  ```html
26
- <display-field-ui
27
- label="Card on file"
28
- value="•••• 4242"
29
- variant="masked"
30
- icon="lock"
31
- hint="Expires 12/26"></display-field-ui>
12
+ <display-field-ui label="Card on file" value="•••• •••• •••• 4242" variant="masked"></display-field-ui>
32
13
  ```
33
14
 
34
- ## Hosting a third-party element (Stripe Element)
35
-
36
- Slot the foreign element as the default child; it takes the value region
37
- under the label. The host's `role="group"` + `aria-labelledby` names it for
38
- assistive tech.
15
+ ## icon + hint
39
16
 
40
17
  ```html
41
- <display-field-ui label="Card number">
42
- <div id="card-element"><!-- stripe.elements().create('card').mount('#card-element') --></div>
43
- </display-field-ui>
18
+ <display-field-ui label="Card on file" value="•••• 4242" variant="masked" icon="lock" hint="Expires 12/26"></display-field-ui>
44
19
  ```