@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.
- package/CHANGELOG.md +20 -0
- package/components/accordion/accordion.css +5 -0
- package/components/agent-artifact/agent-artifact.css +1 -0
- package/components/agent-reasoning/agent-reasoning.css +9 -5
- package/components/button/button.class.js +4 -1
- package/components/button/button.css +1 -1
- package/components/calendar-picker/calendar-picker.css +2 -0
- package/components/chat-thread/chat-input.a2ui.json +3 -1
- package/components/chat-thread/chat-input.css +12 -13
- package/components/chat-thread/chat-input.js +6 -2
- package/components/chat-thread/chat-input.yaml +3 -0
- package/components/check/check.css +1 -1
- package/components/combobox/combobox.a2ui.json +3 -1
- package/components/combobox/combobox.class.js +1 -3
- package/components/combobox/combobox.css +9 -12
- package/components/combobox/combobox.yaml +2 -0
- package/components/date-range-picker/date-range-picker.css +1 -0
- package/components/input/input.css +6 -2
- package/components/nav-group/nav-group.css +5 -6
- package/components/option-card/option-card.css +1 -0
- package/components/radio/radio.css +1 -1
- package/components/range/range.css +2 -0
- package/components/select/select.a2ui.json +2 -1
- package/components/select/select.class.js +9 -9
- package/components/select/select.css +29 -40
- package/components/select/select.test.js +6 -2
- package/components/select/select.yaml +1 -0
- package/components/swatch/swatch.a2ui.json +3 -1
- package/components/swatch/swatch.class.js +14 -8
- package/components/swatch/swatch.css +13 -18
- package/components/swatch/swatch.yaml +2 -0
- package/components/switch/switch.css +1 -1
- package/components/tag/tag.a2ui.json +4 -1
- package/components/tag/tag.class.js +3 -1
- package/components/tag/tag.css +13 -15
- package/components/tag/tag.yaml +3 -0
- package/components/tags-input/tags-input.css +1 -0
- package/components/textarea/textarea.css +2 -0
- package/components/time-picker/time-picker.css +2 -0
- package/components/timeline/timeline.a2ui.json +2 -1
- package/components/timeline/timeline.class.js +7 -8
- package/components/timeline/timeline.css +14 -26
- package/components/timeline/timeline.yaml +1 -0
- package/components/toggle-group/toggle-group.css +1 -0
- package/components/tree/tree.css +5 -2
- package/components/upload/upload.css +1 -0
- package/dist/theme-provider.min.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +7 -11
- package/dist/web-components.sheet.js +1 -1
- package/package.json +1 -1
- 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
|
-
|
|
294
|
-
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
-
|
|
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"] {
|
|
313
|
-
:scope > [data-copy][data-copy-state="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
|
}
|
|
@@ -55,7 +55,9 @@ export class UITag extends UIElement {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
static parts = {
|
|
58
|
-
|
|
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;
|
package/components/tag/tag.css
CHANGED
|
@@ -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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
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 ── */
|
package/components/tag/tag.yaml
CHANGED
|
@@ -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.
|
|
@@ -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 */
|
|
@@ -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
|
-
|
|
158
|
-
toggle
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
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
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
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
|
-
|
|
399
|
-
|
|
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
|
package/components/tree/tree.css
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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));
|