@adia-ai/web-components 0.8.2 → 0.8.4

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 (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/components/accordion/accordion.css +5 -0
  3. package/components/agent-artifact/agent-artifact.css +1 -0
  4. package/components/agent-reasoning/agent-reasoning.css +9 -5
  5. package/components/button/button.class.js +4 -1
  6. package/components/button/button.css +1 -1
  7. package/components/calendar-picker/calendar-picker.css +2 -0
  8. package/components/chat-thread/chat-input.a2ui.json +3 -1
  9. package/components/chat-thread/chat-input.css +12 -13
  10. package/components/chat-thread/chat-input.js +6 -2
  11. package/components/chat-thread/chat-input.yaml +3 -0
  12. package/components/check/check.css +1 -1
  13. package/components/combobox/combobox.a2ui.json +3 -1
  14. package/components/combobox/combobox.class.js +1 -3
  15. package/components/combobox/combobox.css +9 -12
  16. package/components/combobox/combobox.yaml +2 -0
  17. package/components/date-range-picker/date-range-picker.css +1 -0
  18. package/components/input/input.css +6 -2
  19. package/components/nav-group/nav-group.css +5 -6
  20. package/components/option-card/option-card.css +1 -0
  21. package/components/radio/radio.css +1 -1
  22. package/components/range/range.css +2 -0
  23. package/components/select/select.a2ui.json +2 -1
  24. package/components/select/select.class.js +9 -9
  25. package/components/select/select.css +29 -40
  26. package/components/select/select.test.js +6 -2
  27. package/components/select/select.yaml +1 -0
  28. package/components/swatch/swatch.a2ui.json +3 -1
  29. package/components/swatch/swatch.class.js +14 -8
  30. package/components/swatch/swatch.css +13 -18
  31. package/components/swatch/swatch.yaml +2 -0
  32. package/components/switch/switch.css +1 -1
  33. package/components/tag/tag.a2ui.json +4 -1
  34. package/components/tag/tag.class.js +3 -1
  35. package/components/tag/tag.css +13 -15
  36. package/components/tag/tag.yaml +3 -0
  37. package/components/tags-input/tags-input.css +1 -0
  38. package/components/textarea/textarea.css +2 -0
  39. package/components/time-picker/time-picker.css +2 -0
  40. package/components/timeline/timeline.a2ui.json +2 -1
  41. package/components/timeline/timeline.class.js +7 -8
  42. package/components/timeline/timeline.css +14 -26
  43. package/components/timeline/timeline.yaml +1 -0
  44. package/components/toggle-group/toggle-group.css +1 -0
  45. package/components/tree/tree.css +5 -2
  46. package/components/upload/upload.css +1 -0
  47. package/dist/theme-provider.min.js +1 -1
  48. package/dist/web-components.min.css +1 -1
  49. package/dist/web-components.min.js +7 -11
  50. package/dist/web-components.sheet.js +1 -1
  51. package/package.json +1 -1
  52. package/styles/colors/semantics/features.css +6 -1
@@ -288,29 +288,24 @@
288
288
  color: color-mix(in oklab, var(--a-chrome-dark, #111) 70%, transparent);
289
289
  }
290
290
 
291
- /* ═══════ Copy button ═══════ */
291
+ /* ═══════ Copy button a stamped <button-ui variant="ghost" size="xs">
292
+ (gh issue 276: no native <button> in stamped DOM). Geometry/colors
293
+ ride button token re-points; focus ring is button-ui's own. ═══════ */
292
294
  :scope > [data-copy] {
293
- appearance: none;
294
- -webkit-appearance: none;
295
- background: transparent;
296
- border: 0;
297
- padding: 2px 4px;
295
+ --button-fg: var(--swatch-copy-fg);
296
+ --button-fg-ghost-hover: var(--md-sys-color-neutral-on-surface);
297
+ --button-bg-ghost-hover: var(--a-bg-muted);
298
+ --button-radius: var(--a-radius-xs);
299
+ --button-height: calc(var(--a-ui-sm) + var(--a-space-1));
300
+
298
301
  margin-inline-start: var(--a-space-1);
299
- color: var(--swatch-copy-fg);
300
302
  font-size: var(--a-ui-sm);
301
- line-height: 1;
302
- cursor: pointer;
303
- border-radius: var(--a-radius-xs);
304
- transition: color var(--a-duration-fast) var(--a-easing-out), background var(--a-duration-fast) var(--a-easing-out);
305
- }
306
- :scope > [data-copy]:hover { color: var(--md-sys-color-neutral-on-surface); background: var(--a-bg-muted); }
307
- :scope > [data-copy]:focus-visible {
308
- outline: var(--swatch-select-ring-width) solid var(--swatch-select-ring);
309
- outline-offset: 1px;
303
+ flex-shrink: 0;
310
304
  }
305
+ /* button-ui's own :scope display wins over the UA [hidden] rule. */
311
306
  :scope > [data-copy][hidden] { display: none; }
312
- :scope > [data-copy][data-copy-state="ok"] { color: var(--swatch-copy-fg-ok); }
313
- :scope > [data-copy][data-copy-state="fail"] { color: var(--swatch-copy-fg-fail); }
307
+ :scope > [data-copy][data-copy-state="ok"] { --button-fg: var(--swatch-copy-fg-ok); }
308
+ :scope > [data-copy][data-copy-state="fail"] { --button-fg: var(--swatch-copy-fg-fail); }
314
309
 
315
310
  /* ═══════ Selectable + selected states ═══════
316
311
  [selectable] makes the whole host focusable; ring on :focus-visible.
@@ -11,6 +11,8 @@ description: |
11
11
  shape; pairs with an optional label slot or attribute. Composed by chart-
12
12
  legend-ui's per-row swatch and consumed directly by the token-colors /
13
13
  spacing demo pages.
14
+ composes:
15
+ - button-ui # [copyable] copy affordance (gh issue 276 — no native <button> in stamped DOM)
14
16
  props:
15
17
  shape:
16
18
  description: Visual shape — block (filled tile), dot (small circle), square (small filled square), line (solid hairline), dashed (dashed hairline).
@@ -130,7 +130,7 @@ switch-ui[checked] [slot="thumb"] {
130
130
  }
131
131
 
132
132
  :scope:focus-visible { outline: none; }
133
- :scope:focus-visible [slot="track"] { box-shadow: var(--switch-focus-ring); }
133
+ :scope:focus-visible [slot="track"] { box-shadow: var(--switch-focus-ring); border-color: transparent; }
134
134
 
135
135
  /* Size handled by universal [size] attribute system. */
136
136
  }
@@ -74,7 +74,10 @@
74
74
  "x-adiaui": {
75
75
  "anti_patterns": [],
76
76
  "category": "display",
77
- "composes": [],
77
+ "composes": [
78
+ "button-ui",
79
+ "icon-ui"
80
+ ],
78
81
  "events": {
79
82
  "remove": {
80
83
  "description": "Fired when the dismiss button is activated.",
@@ -55,7 +55,9 @@ export class UITag extends UIElement {
55
55
  };
56
56
 
57
57
  static parts = {
58
- dismiss: '<button slot="dismiss" type="button" aria-label="Remove"><icon-ui name="x" weight="bold"></icon-ui></button>',
58
+ // button-ui, not a native <button> (gh issue 276) — the icon slots in
59
+ // explicitly to keep its bold weight (the icon= prop stamps regular).
60
+ dismiss: '<button-ui slot="dismiss" variant="ghost" size="xs" aria-label="Remove"><icon-ui slot="icon" name="x" weight="bold"></icon-ui></button-ui>',
59
61
  };
60
62
 
61
63
  static template = () => null;
@@ -196,6 +196,7 @@ tag-ui[removable]:not([disabled]):hover {
196
196
  :scope:focus-visible {
197
197
  outline: none;
198
198
  box-shadow: var(--tag-focus-ring);
199
+ border-color: transparent;
199
200
  }
200
201
 
201
202
  /* ── Slotted icons (leading) ──
@@ -222,28 +223,25 @@ tag-ui[removable]:not([disabled]):hover {
222
223
  gap: var(--tag-gap-icon, 0.2em);
223
224
  }
224
225
 
225
- /* ── Dismiss button ── */
226
+ /* ── Dismiss button a stamped <button-ui variant="ghost" size="xs">
227
+ (gh issue 276: no native <button> in stamped DOM); geometry + hover
228
+ ride button token re-points, chrome is button-ui's own. */
226
229
  [slot="dismiss"] {
227
- display: inline-flex;
228
- align-items: center;
229
- justify-content: center;
230
- width: var(--tag-dismiss-size);
231
- height: var(--tag-dismiss-size);
232
- padding: 0;
233
- border: none;
234
- background: none;
235
- cursor: pointer;
236
- border-radius: var(--tag-dismiss-radius);
237
- color: var(--tag-dismiss-fg);
238
- opacity: var(--tag-dismiss-opacity);
230
+ --button-height: var(--tag-dismiss-size);
231
+ --button-radius: var(--tag-dismiss-radius);
232
+ --button-fg: var(--tag-dismiss-fg);
233
+ --button-bg-ghost-hover: var(--tag-dismiss-bg-hover);
234
+ --button-fg-ghost-hover: var(--tag-dismiss-fg);
239
235
  --a-icon-size: 0.875rem;
236
+
237
+ opacity: var(--tag-dismiss-opacity);
240
238
  order: 1; /* push dismiss to end so layout reads [text] [×] */
241
- transition: opacity var(--tag-duration) var(--tag-easing), background var(--tag-duration) var(--tag-easing);
239
+ flex-shrink: 0;
240
+ transition: opacity var(--tag-duration) var(--tag-easing);
242
241
  }
243
242
 
244
243
  [slot="dismiss"]:hover {
245
244
  opacity: var(--tag-dismiss-opacity-hover);
246
- background: var(--tag-dismiss-bg-hover);
247
245
  }
248
246
 
249
247
  /* ── Disabled ── */
@@ -16,6 +16,9 @@ description: |
16
16
  markers — badge-ui has no remove event. For navigation grouping
17
17
  use <nav-group-ui>; for inline command actions use
18
18
  <action-list-ui>.
19
+ composes:
20
+ - button-ui # dismiss affordance (gh issue 276 — no native <button> in stamped DOM)
21
+ - icon-ui # the dismiss x glyph, slotted into the button-ui
19
22
  props:
20
23
  disabled:
21
24
  description: Disables interaction and dims the tag.
@@ -75,6 +75,7 @@
75
75
  :scope[aria-invalid="true"]:focus-within,
76
76
  :scope[error]:focus-within {
77
77
  box-shadow: var(--tags-input-focus-ring-invalid);
78
+ border-color: transparent;
78
79
  }
79
80
 
80
81
  :scope[disabled] {
@@ -96,10 +96,12 @@ textarea-ui:not([disabled]) [slot="text"]:hover {
96
96
  outline: none;
97
97
  box-shadow: var(--textarea-focus-ring);
98
98
  color: var(--textarea-fg-hover);
99
+ border-color: transparent;
99
100
  }
100
101
  :scope[aria-invalid="true"]:not([disabled]) [slot="text"]:focus,
101
102
  :scope[error]:not([disabled]) [slot="text"]:focus {
102
103
  box-shadow: var(--textarea-focus-ring-invalid);
104
+ border-color: transparent;
103
105
  }
104
106
  :scope:not([disabled]) [slot="text"]:focus + [slot="label"],
105
107
  :scope:not([disabled]):focus-within [slot="label"] {
@@ -107,11 +107,13 @@ time-picker-ui:not([disabled]):hover {
107
107
  Canonical L3 ring; consumed via --time-picker-focus-ring (aliases --a-focus-ring). */
108
108
  time-picker-ui:not([disabled]):focus-within {
109
109
  box-shadow: var(--time-picker-focus-ring);
110
+ border-color: transparent;
110
111
  }
111
112
 
112
113
  time-picker-ui[aria-invalid="true"]:not([disabled]):focus-within,
113
114
  time-picker-ui[error]:not([disabled]):focus-within {
114
115
  box-shadow: var(--time-picker-focus-ring-invalid);
116
+ border-color: transparent;
115
117
  }
116
118
 
117
119
  /* Disabled / readonly affordance */
@@ -43,7 +43,8 @@
43
43
  "anti_patterns": [],
44
44
  "category": "display",
45
45
  "composes": [
46
- "icon-ui"
46
+ "icon-ui",
47
+ "button-ui"
47
48
  ],
48
49
  "events": {
49
50
  "timeline-toggle": {
@@ -154,8 +154,10 @@ export class UITimelineItem extends UIElement {
154
154
  // Toggle caret lives on the row — we stamp a button once
155
155
  let toggle = this.querySelector(':scope > [data-timeline-toggle]');
156
156
  if (!toggle) {
157
- toggle = document.createElement('button');
158
- toggle.type = 'button';
157
+ // button-ui, not a native <button> (gh issue 276).
158
+ toggle = document.createElement('button-ui');
159
+ toggle.setAttribute('variant', 'ghost');
160
+ toggle.setAttribute('size', 'xs');
159
161
  toggle.setAttribute('data-timeline-toggle', '');
160
162
  toggle.setAttribute('aria-label', 'Toggle details');
161
163
  toggle.addEventListener('click', (e) => {
@@ -168,12 +170,9 @@ export class UITimelineItem extends UIElement {
168
170
  });
169
171
  this.appendChild(toggle);
170
172
  }
171
- toggle.innerHTML = '';
172
- const caret = document.createElement('icon-ui');
173
- caret.setAttribute('name', this.#expanded ? 'caret-down' : 'caret-right');
174
- caret.setAttribute('color', 'muted');
175
- caret.setAttribute('size', 'sm');
176
- toggle.appendChild(caret);
173
+ // The caret rides button-ui's icon prop — flipping the attribute
174
+ // re-stamps the glyph; color/size are CSS token re-points.
175
+ toggle.setAttribute('icon', this.#expanded ? 'caret-down' : 'caret-right');
177
176
  } else {
178
177
  this.querySelector(':scope > [data-timeline-toggle]')?.remove();
179
178
  body?.remove();
@@ -362,32 +362,22 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
362
362
 
363
363
  /* ═══════ Toggle caret (outcomes) ═══════ */
364
364
 
365
+ /* A stamped <button-ui variant="ghost" size="xs" icon="caret-*">
366
+ (gh issue 276: no native <button> in stamped DOM). Geometry/colors
367
+ ride button token re-points; focus ring + hover are button-ui's own. */
365
368
  :scope > [data-timeline-toggle] {
366
369
  position: absolute;
367
370
  inset-inline-end: 0;
368
- /* Place the caret's icon-center on row 1's optical center.
369
- The button has --a-space-0-5 vertical padding, so the icon
370
- sits that much lower inside the box; we subtract that so the
371
- icon (not the box) lines up with the time-slot text center. */
371
+ /* Place the caret's icon-center on row 1's optical center (the box
372
+ is --button-height tall around a 1em-line icon). */
372
373
  top: calc((1.4em - 1em) / 2 - var(--a-space-0-5));
373
- background: none;
374
- border: none;
375
- padding: var(--a-space-0-5) var(--timeline-item-toggle-px);
376
- margin: 0;
377
- cursor: pointer;
378
- color: var(--timeline-item-label-fg-muted, var(--a-fg-muted));
379
- border-radius: var(--a-radius-sm);
380
- display: inline-flex;
381
- align-items: center;
382
- justify-content: center;
383
- line-height: 0;
384
- transition: background var(--timeline-item-duration) var(--timeline-item-easing),
385
- color var(--timeline-item-duration) var(--timeline-item-easing);
386
- }
387
-
388
- :scope > [data-timeline-toggle]:hover {
389
- background: var(--a-bg-subtle);
390
- color: var(--timeline-item-label-fg, var(--md-sys-color-neutral-on-surface));
374
+ --button-height: calc(1em + var(--a-space-1));
375
+ --button-radius: var(--a-radius-sm);
376
+ --button-fg: var(--timeline-item-label-fg-muted, var(--a-fg-muted));
377
+ --button-fg-ghost-hover: var(--timeline-item-label-fg, var(--md-sys-color-neutral-on-surface));
378
+ --button-bg-ghost-hover: var(--a-bg-subtle);
379
+ /* It IS a caret — universal caret size (ruling 2026-07-16). */
380
+ --a-icon-size: var(--a-caret-size);
391
381
  }
392
382
 
393
383
  /* Reserve room so the time isn't overlapped by the caret */
@@ -395,10 +385,8 @@ agent-reasoning-ui timeline-ui:not([orientation="horizontal"]),
395
385
  margin-inline-end: var(--timeline-item-toggle-time-margin);
396
386
  }
397
387
 
398
- :scope > [data-timeline-toggle]:focus-visible {
399
- outline: none;
400
- box-shadow: var(--a-focus-ring);
401
- }
388
+ /* (Focus ring is button-ui's own — the custom :focus-visible rule the
389
+ native button needed is gone with it, gh issue 276.) */
402
390
  }
403
391
 
404
392
  /* When size=sm on the parent, ring is 1.5px so the small dot still looks crisp.
@@ -12,6 +12,7 @@ description: "Timeline and step wizard. Two modes: timeline (per-item state) and
12
12
  # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
13
13
  composes:
14
14
  - icon-ui
15
+ - button-ui # outcomes toggle (gh issue 276 — no native <button> in stamped DOM)
15
16
  props:
16
17
  orientation:
17
18
  description: Layout direction
@@ -90,6 +90,7 @@ toggle-option-ui:not([disabled]):hover {
90
90
  :scope:focus-visible {
91
91
  outline: none;
92
92
  box-shadow: var(--toggle-option-focus-ring);
93
+ border-color: transparent;
93
94
  z-index: 1;
94
95
  }
95
96
 
@@ -7,7 +7,10 @@
7
7
  --tree-row-gap: var(--a-space-1);
8
8
  --tree-actions-gap: var(--a-space-0-5);
9
9
  --tree-indent: var(--a-space-4);
10
- --tree-caret-size: var(--a-space-2);
10
+ /* The universal caret token (14px default) — sidebar carets read one
11
+ size across nav-group / tree / accordion (ruling 2026-07-16); the
12
+ old --a-space-2 read made tree carets an 8px outlier. */
13
+ --tree-caret-size: var(--a-caret-size);
11
14
  --tree-icon-size: var(--a-space-3);
12
15
 
13
16
  /* ── Typography ── */
@@ -47,7 +50,7 @@
47
50
  --tree-item-row-gap: var(--tree-row-gap, var(--a-space-1));
48
51
  --tree-item-actions-gap: var(--tree-actions-gap, var(--a-space-0-5));
49
52
  --tree-item-indent: var(--tree-indent, var(--a-space-4));
50
- --tree-item-caret-size: var(--tree-caret-size, var(--a-space-2));
53
+ --tree-item-caret-size: var(--tree-caret-size, var(--a-caret-size));
51
54
  --tree-item-icon-size: var(--tree-icon-size, var(--a-space-3));
52
55
 
53
56
  --tree-item-fg: var(--tree-fg, var(--md-sys-color-neutral-on-surface));
@@ -75,6 +75,7 @@
75
75
  /* Canonical ring via L3 token (see semantics.css FOCUS block). */
76
76
  outline: none;
77
77
  box-shadow: var(--upload-focus-ring);
78
+ border-color: transparent;
78
79
  }
79
80
  [data-dropzone][data-dragover] {
80
81
  border-color: var(--upload-border-dragover);