@adia-ai/web-components 0.0.26 → 0.0.28
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/components/agent-artifact/agent-artifact.a2ui.json +1 -1
- package/components/agent-artifact/agent-artifact.css +11 -0
- package/components/agent-artifact/agent-artifact.js +23 -2
- package/components/agent-artifact/agent-artifact.yaml +1 -1
- package/components/agent-questions/agent-questions.css +20 -1
- package/components/agent-reasoning/agent-reasoning.css +11 -0
- package/components/agent-reasoning/agent-reasoning.js +16 -0
- package/components/agent-trace/agent-trace.css +36 -12
- package/components/alert/alert.a2ui.json +10 -4
- package/components/alert/alert.css +13 -0
- package/components/alert/alert.js +1 -1
- package/components/alert/alert.yaml +21 -4
- package/components/badge/badge.a2ui.json +0 -2
- package/components/badge/badge.css +20 -0
- package/components/badge/badge.js +10 -2
- package/components/badge/badge.yaml +0 -2
- package/components/breadcrumb/breadcrumb.a2ui.json +16 -1
- package/components/breadcrumb/breadcrumb.css +27 -0
- package/components/breadcrumb/breadcrumb.js +95 -17
- package/components/breadcrumb/breadcrumb.yaml +15 -1
- package/components/calendar-picker/calendar-picker.css +17 -0
- package/components/chart/chart.css +20 -13
- package/components/chart/chart.js +49 -17
- package/components/chart-legend/chart-legend.css +30 -54
- package/components/chart-legend/chart-legend.js +48 -30
- package/components/code/code.css +41 -0
- package/components/code/code.js +44 -3
- package/components/command/command.js +52 -1
- package/components/empty-state/empty-state.js +32 -21
- package/components/feed/feed-item.yaml +50 -0
- package/components/feed/feed.a2ui.json +59 -0
- package/components/feed/feed.css +141 -0
- package/components/feed/feed.js +276 -0
- package/components/feed/feed.yaml +33 -0
- package/components/index.js +2 -0
- package/components/list/list.js +20 -16
- package/components/menu/menu.css +18 -0
- package/components/menu/menu.js +24 -10
- package/components/pane/pane.css +5 -0
- package/components/pipeline-status/pipeline-status.css +15 -1
- package/components/popover/popover.css +17 -0
- package/components/select/select.css +18 -0
- package/components/swatch/swatch.a2ui.json +116 -0
- package/components/swatch/swatch.css +141 -0
- package/components/swatch/swatch.js +121 -0
- package/components/swatch/swatch.yaml +101 -0
- package/components/swiper/swiper.css +9 -0
- package/components/table/table.css +5 -0
- package/components/table/table.js +45 -1
- package/components/table-toolbar/table-toolbar.css +13 -0
- package/components/tag/tag.css +10 -0
- package/components/timeline/timeline.css +15 -4
- package/components/toast/toast.css +93 -48
- package/components/toast/toast.js +101 -22
- package/components/toolbar/toolbar.css +13 -0
- package/components/tooltip/tooltip.css +11 -3
- package/core/provider.js +1 -0
- package/package.json +1 -1
- package/styles/colors/semantics.css +1 -1
- package/styles/components.css +1 -0
|
@@ -106,39 +106,60 @@ toast-ui[data-closing][position="top-left"] {
|
|
|
106
106
|
/* Enter / exit animation rules ([data-open] / [data-closing]) moved
|
|
107
107
|
outside @scope — see Safari 17.x bug note at top of file. */
|
|
108
108
|
|
|
109
|
-
/* ──
|
|
109
|
+
/* ── Variants ──
|
|
110
|
+
`--variant-muted` flips light↔dark with scheme, so the fg token
|
|
111
|
+
paired with it must do the same. Use `--a-{variant}-text` (the
|
|
112
|
+
light-dark scheme-aware token), NOT `--a-{variant}-text-strong`
|
|
113
|
+
(the latter is locked dark for warning + light for the others —
|
|
114
|
+
designed for solid `--variant-strong` fills, where the bg never
|
|
115
|
+
flips). Mirrors alert.css's variant wiring. */
|
|
110
116
|
|
|
111
117
|
:where(:scope),
|
|
112
118
|
:where(:scope[variant="info"]) {
|
|
113
|
-
--toast-bg:
|
|
114
|
-
--toast-fg:
|
|
119
|
+
--toast-bg: var(--a-info-muted);
|
|
120
|
+
--toast-fg: var(--a-info-text);
|
|
115
121
|
--toast-border: var(--a-info-border-subtle);
|
|
116
122
|
}
|
|
117
|
-
|
|
118
|
-
/* ── Variant: success ── */
|
|
119
|
-
|
|
120
123
|
:where(:scope[variant="success"]) {
|
|
121
|
-
--toast-bg:
|
|
122
|
-
--toast-fg:
|
|
124
|
+
--toast-bg: var(--a-success-muted);
|
|
125
|
+
--toast-fg: var(--a-success-text);
|
|
123
126
|
--toast-border: var(--a-success-border-subtle);
|
|
124
127
|
}
|
|
125
|
-
|
|
126
|
-
/* ── Variant: warning ── */
|
|
127
|
-
|
|
128
128
|
:where(:scope[variant="warning"]) {
|
|
129
|
-
--toast-bg:
|
|
130
|
-
--toast-fg:
|
|
129
|
+
--toast-bg: var(--a-warning-muted);
|
|
130
|
+
--toast-fg: var(--a-warning-text);
|
|
131
131
|
--toast-border: var(--a-warning-border-subtle);
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
/* ── Variant: danger ── */
|
|
135
|
-
|
|
136
133
|
:where(:scope[variant="danger"]) {
|
|
137
|
-
--toast-bg:
|
|
138
|
-
--toast-fg:
|
|
134
|
+
--toast-bg: var(--a-danger-muted);
|
|
135
|
+
--toast-fg: var(--a-danger-text);
|
|
139
136
|
--toast-border: var(--a-danger-border-subtle);
|
|
140
137
|
}
|
|
141
138
|
|
|
139
|
+
/* `primary` is the accent-filled variant — solid bg + on-accent text
|
|
140
|
+
for "branded" toasts (welcome banners, feature-launch nudges)
|
|
141
|
+
where the message should read as a brand stamp rather than tinted
|
|
142
|
+
status chrome. Tracks the same accent-strong source as button-ui's
|
|
143
|
+
primary; border picks up `--a-accent-border-subtle` since there's
|
|
144
|
+
no `--a-primary-border-subtle` token. */
|
|
145
|
+
:where(:scope[variant="primary"]) {
|
|
146
|
+
--toast-bg: var(--a-primary-bg);
|
|
147
|
+
--toast-fg: var(--a-primary-fg);
|
|
148
|
+
--toast-border: var(--a-accent-border-subtle);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* `muted` and `neutral` are semantic aliases of the base canvas
|
|
152
|
+
surface — same tokens as the unstyled `:scope`, declared explicitly
|
|
153
|
+
so the yaml enum and the CSS contract agree. Use cases: quiet
|
|
154
|
+
status nudges that shouldn't carry tonal weight (e.g. "Draft
|
|
155
|
+
saved" without success-green). Mirrors alert-ui's pattern. */
|
|
156
|
+
:where(:scope[variant="muted"]),
|
|
157
|
+
:where(:scope[variant="neutral"]) {
|
|
158
|
+
--toast-bg: var(--a-bg-subtle);
|
|
159
|
+
--toast-fg: var(--a-fg);
|
|
160
|
+
--toast-border: var(--a-border-subtle);
|
|
161
|
+
}
|
|
162
|
+
|
|
142
163
|
/* ── Message slot ── */
|
|
143
164
|
|
|
144
165
|
[slot="message"] {
|
|
@@ -146,25 +167,17 @@ toast-ui[data-closing][position="top-left"] {
|
|
|
146
167
|
min-width: 0;
|
|
147
168
|
}
|
|
148
169
|
|
|
149
|
-
/* ── Close button ──
|
|
150
|
-
|
|
170
|
+
/* ── Close button ──
|
|
171
|
+
A real <button-ui icon="x" variant="ghost" size="sm"> stamped by
|
|
172
|
+
toast.js — brings the system focus ring + hover transition + a
|
|
173
|
+
properly-sized icon-ui glyph. The `align-self: start` keeps the
|
|
174
|
+
button on the first line of multi-line toast bodies, matching the
|
|
175
|
+
alert-ui pattern. */
|
|
151
176
|
[slot="close"] {
|
|
152
|
-
background: none;
|
|
153
|
-
border: none;
|
|
154
|
-
font-size: 0.875rem;
|
|
155
|
-
color: currentColor;
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
padding: 0;
|
|
158
|
-
line-height: 1;
|
|
159
|
-
opacity: 0.6;
|
|
160
177
|
flex-shrink: 0;
|
|
161
|
-
align-self:
|
|
162
|
-
|
|
163
|
-
transition: opacity var(--toast-close-duration) var(--toast-close-easing);
|
|
178
|
+
align-self: start;
|
|
179
|
+
color: currentColor;
|
|
164
180
|
}
|
|
165
|
-
[slot="close"]::after { content: '\00d7'; }
|
|
166
|
-
[slot="close"]:hover { opacity: 1; }
|
|
167
|
-
[slot="close"]:focus-visible { box-shadow: var(--toast-focus-ring); border-radius: var(--toast-focus-radius); }
|
|
168
181
|
|
|
169
182
|
/* Inside a container: drop fixed positioning */
|
|
170
183
|
[data-toast-container] > :scope {
|
|
@@ -176,37 +189,69 @@ toast-ui[data-closing][position="top-left"] {
|
|
|
176
189
|
}
|
|
177
190
|
}
|
|
178
191
|
|
|
179
|
-
/* ──
|
|
180
|
-
|
|
192
|
+
/* ── Toast lane container ──
|
|
193
|
+
Per-position singleton, attached to `document.body`. Promoted to the
|
|
194
|
+
browser's top-layer via the Popover API — `[popover="manual"]` on the
|
|
195
|
+
element + `showPopover()` on first post. The native popover stack
|
|
196
|
+
means multiple lanes (e.g. top-right + bottom-center) coexist
|
|
197
|
+
without z-index collisions, and the lane sits above ALL page chrome
|
|
198
|
+
(modals included, since both ride the top-layer in document order).
|
|
199
|
+
|
|
200
|
+
Reset the UA `[popover]` defaults (centred, white panel, border).
|
|
201
|
+
The lane is a transparent flex column anchored to a viewport corner;
|
|
202
|
+
the toast cards inside paint themselves. `pointer-events: none` on
|
|
203
|
+
the lane + `auto` on each toast lets clicks pass through empty
|
|
204
|
+
space between cards. */
|
|
181
205
|
[data-toast-container] {
|
|
182
206
|
position: fixed;
|
|
183
|
-
|
|
207
|
+
inset: unset;
|
|
208
|
+
margin: 0;
|
|
209
|
+
padding: 0;
|
|
210
|
+
border: none;
|
|
211
|
+
background: transparent;
|
|
212
|
+
overflow: visible;
|
|
213
|
+
width: max-content;
|
|
214
|
+
max-width: 100vw;
|
|
215
|
+
z-index: 9999; /* fallback for envs without Popover API */
|
|
184
216
|
display: flex;
|
|
185
|
-
flex-direction: column;
|
|
186
217
|
gap: var(--a-space-2);
|
|
187
218
|
pointer-events: none;
|
|
188
219
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
align-items: flex-end;
|
|
220
|
+
[data-toast-container]:popover-open {
|
|
221
|
+
/* Native top-layer; component-level z-index above is moot here but kept
|
|
222
|
+
for fallback. */
|
|
223
|
+
display: flex;
|
|
194
224
|
}
|
|
195
225
|
|
|
226
|
+
/* Top lanes — newest at top, columns flow downward. */
|
|
227
|
+
[data-toast-container="top-right"],
|
|
228
|
+
[data-toast-container="top-center"],
|
|
229
|
+
[data-toast-container="top-left"] {
|
|
230
|
+
top: var(--a-space-4);
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
}
|
|
233
|
+
/* Bottom lanes — newest at bottom, columns reverse so post() lands at
|
|
234
|
+
the visually-newest position. */
|
|
235
|
+
[data-toast-container="bottom-right"],
|
|
236
|
+
[data-toast-container="bottom-center"],
|
|
196
237
|
[data-toast-container="bottom-left"] {
|
|
197
238
|
bottom: var(--a-space-4);
|
|
198
|
-
|
|
199
|
-
align-items: flex-start;
|
|
239
|
+
flex-direction: column-reverse;
|
|
200
240
|
}
|
|
201
241
|
|
|
242
|
+
[data-toast-container="bottom-right"],
|
|
202
243
|
[data-toast-container="top-right"] {
|
|
203
|
-
top: var(--a-space-4);
|
|
204
244
|
right: var(--a-space-4);
|
|
205
245
|
align-items: flex-end;
|
|
206
246
|
}
|
|
207
|
-
|
|
247
|
+
[data-toast-container="bottom-left"],
|
|
208
248
|
[data-toast-container="top-left"] {
|
|
209
|
-
top: var(--a-space-4);
|
|
210
249
|
left: var(--a-space-4);
|
|
211
250
|
align-items: flex-start;
|
|
212
251
|
}
|
|
252
|
+
[data-toast-container="top-center"],
|
|
253
|
+
[data-toast-container="bottom-center"] {
|
|
254
|
+
left: 50%;
|
|
255
|
+
transform: translateX(-50%);
|
|
256
|
+
align-items: center;
|
|
257
|
+
}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* <toast-ui> — Notification popup
|
|
2
|
+
* <toast-ui> — Notification popup wired through a shared top-layer
|
|
3
|
+
* messaging channel.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
5
|
+
* All toasts — declarative AND imperative — route through one
|
|
6
|
+
* lazily-mounted `[data-toast-container][data-toast-position]` per
|
|
7
|
+
* position. Per-position singletons; consumers can post from anywhere
|
|
8
|
+
* without holding a reference to the toast component:
|
|
6
9
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
10
|
+
* // Imperative API
|
|
11
|
+
* AdiaToast.show({ text: 'Saved!', variant: 'success' });
|
|
9
12
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* // Global event channel — same shape, dispatched on `window`.
|
|
14
|
+
* // Any code (other components, integration scripts) can post
|
|
15
|
+
* // without importing AdiaToast.
|
|
16
|
+
* window.dispatchEvent(new CustomEvent('toast', {
|
|
17
|
+
* detail: { text: 'Saved!', variant: 'success' }
|
|
18
|
+
* }));
|
|
19
|
+
*
|
|
20
|
+
* // Declarative — auto-routes to the per-position container on
|
|
21
|
+
* // connect. No need to author <toast-ui> inside the container.
|
|
22
|
+
* <toast-ui text="Saved!" variant="success"></toast-ui>
|
|
12
23
|
*
|
|
13
24
|
* Events:
|
|
14
25
|
* close — fired after the toast finishes its exit animation
|
|
@@ -21,6 +32,7 @@ class AdiaToast extends AdiaElement {
|
|
|
21
32
|
#removing = false;
|
|
22
33
|
#closeTimer = null;
|
|
23
34
|
#openRaf = null;
|
|
35
|
+
#routed = false;
|
|
24
36
|
|
|
25
37
|
static properties = {
|
|
26
38
|
text: { type: String, default: '', reflect: true },
|
|
@@ -31,25 +43,27 @@ class AdiaToast extends AdiaElement {
|
|
|
31
43
|
|
|
32
44
|
static parts = {
|
|
33
45
|
message: '<div slot="message"></div>',
|
|
34
|
-
close: '<
|
|
46
|
+
close: '<button-ui slot="close" icon="x" variant="ghost" size="sm" aria-label="Dismiss"></button-ui>',
|
|
35
47
|
};
|
|
36
48
|
|
|
37
49
|
static template = () => html``;
|
|
38
50
|
|
|
39
|
-
#
|
|
51
|
+
#onPress = (e) => {
|
|
40
52
|
if (e.target.closest('[slot="close"]')) this.dismiss();
|
|
41
53
|
};
|
|
42
54
|
|
|
43
|
-
#onKeydown = (e) => {
|
|
44
|
-
if (e.target.closest('[slot="close"]') && (e.key === 'Enter' || e.key === ' ')) {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
this.dismiss();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
55
|
connected() {
|
|
51
|
-
this.addEventListener('
|
|
52
|
-
|
|
56
|
+
this.addEventListener('press', this.#onPress);
|
|
57
|
+
|
|
58
|
+
// Route declarative <toast-ui> instances into the shared per-position
|
|
59
|
+
// container so authored toasts share the same lane as imperatively-
|
|
60
|
+
// posted ones (no overlap, consistent stacking). Skipped if we're
|
|
61
|
+
// already inside a container (re-entrant connect after reparent).
|
|
62
|
+
if (!this.#routed && !this.parentElement?.matches?.('[data-toast-container]')) {
|
|
63
|
+
this.#routed = true;
|
|
64
|
+
const container = AdiaToast.#getContainer(this.position || 'bottom-right');
|
|
65
|
+
if (this.parentElement !== container) container.appendChild(this);
|
|
66
|
+
}
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
#getDuration() {
|
|
@@ -97,14 +111,19 @@ class AdiaToast extends AdiaElement {
|
|
|
97
111
|
this.#closeTimer = setTimeout(() => {
|
|
98
112
|
this.#closeTimer = null;
|
|
99
113
|
this.removeAttribute('data-closing');
|
|
114
|
+
const container = this.parentElement;
|
|
100
115
|
this.dispatchEvent(new Event('close', { bubbles: true }));
|
|
101
116
|
this.remove();
|
|
117
|
+
/* If the lane is now empty, hide its popover and remove the
|
|
118
|
+
container — keeps document.body free of leaked containers. */
|
|
119
|
+
if (container?.matches?.('[data-toast-container]')) {
|
|
120
|
+
AdiaToast.#releaseContainerIfEmpty(container);
|
|
121
|
+
}
|
|
102
122
|
}, this.#getDuration());
|
|
103
123
|
}
|
|
104
124
|
|
|
105
125
|
disconnected() {
|
|
106
|
-
this.removeEventListener('
|
|
107
|
-
this.removeEventListener('keydown', this.#onKeydown);
|
|
126
|
+
this.removeEventListener('press', this.#onPress);
|
|
108
127
|
if (this.#timer) { clearTimeout(this.#timer); this.#timer = null; }
|
|
109
128
|
if (this.#closeTimer) { clearTimeout(this.#closeTimer); this.#closeTimer = null; }
|
|
110
129
|
if (this.#openRaf != null) { cancelAnimationFrame(this.#openRaf); this.#openRaf = null; }
|
|
@@ -121,16 +140,58 @@ class AdiaToast extends AdiaElement {
|
|
|
121
140
|
*/
|
|
122
141
|
static #containers = new Map();
|
|
123
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Get (or lazily create) the per-position lane. Each lane is a manual
|
|
145
|
+
* Popover-API container — `[popover="manual"]` puts it in the browser's
|
|
146
|
+
* top-layer, above ALL page content with no z-index wars, and the
|
|
147
|
+
* native popover stack lets multiple lanes coexist (e.g. one toast in
|
|
148
|
+
* top-right + another in bottom-center) without collision.
|
|
149
|
+
*
|
|
150
|
+
* `popover="manual"` (not `auto`) — toasts must NOT light-dismiss on
|
|
151
|
+
* outside click; they auto-fade by their own duration timer.
|
|
152
|
+
*
|
|
153
|
+
* Falls back gracefully if the Popover API is unsupported (Safari < 17 /
|
|
154
|
+
* Firefox < 125): the lane still renders as a `position: fixed` div via
|
|
155
|
+
* the CSS `[data-toast-container]` rules. Browser baseline (Chromium
|
|
156
|
+
* 125+, Safari 18.0+, Firefox 129+) all support `[popover]`.
|
|
157
|
+
*/
|
|
124
158
|
static #getContainer(position) {
|
|
125
|
-
|
|
126
|
-
|
|
159
|
+
let el = AdiaToast.#containers.get(position);
|
|
160
|
+
if (el && el.isConnected) return el;
|
|
161
|
+
el = document.createElement('div');
|
|
127
162
|
el.setAttribute('data-toast-container', position);
|
|
163
|
+
/* `manual` = no light-dismiss; container stays open until we
|
|
164
|
+
explicitly hidePopover() it when its last toast leaves. */
|
|
165
|
+
if ('popover' in HTMLElement.prototype) {
|
|
166
|
+
el.setAttribute('popover', 'manual');
|
|
167
|
+
}
|
|
128
168
|
document.body.appendChild(el);
|
|
169
|
+
/* Show the popover so the lane lifts into the top-layer. Wrapped in
|
|
170
|
+
try/catch because some test rigs (happy-dom) don't ship the API. */
|
|
171
|
+
try { el.showPopover?.(); } catch { /* graceful fallback to fixed */ }
|
|
129
172
|
AdiaToast.#containers.set(position, el);
|
|
130
173
|
return el;
|
|
131
174
|
}
|
|
132
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Tear down the per-position lane when its last toast has been
|
|
178
|
+
* dismissed. Keeps `document.body` clean — addresses the audit's L-B4
|
|
179
|
+
* "container leak" finding (toasts permanently leaving DIVs in body).
|
|
180
|
+
*/
|
|
181
|
+
static #releaseContainerIfEmpty(container) {
|
|
182
|
+
if (!container) return;
|
|
183
|
+
if (container.children.length > 0) return;
|
|
184
|
+
try { container.hidePopover?.(); } catch { /* noop */ }
|
|
185
|
+
container.remove();
|
|
186
|
+
/* Clear from the singleton map so the next post() rebuilds. */
|
|
187
|
+
for (const [pos, el] of AdiaToast.#containers) {
|
|
188
|
+
if (el === container) AdiaToast.#containers.delete(pos);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
133
192
|
static show({ text, variant = 'info', duration = 4000, position = 'bottom-right' } = {}) {
|
|
193
|
+
/* `error` is a documented alias of `danger` (Phase 6 variant table). */
|
|
194
|
+
if (variant === 'error') variant = 'danger';
|
|
134
195
|
const container = AdiaToast.#getContainer(position);
|
|
135
196
|
const toast = document.createElement('toast-ui');
|
|
136
197
|
toast.text = text;
|
|
@@ -140,7 +201,25 @@ class AdiaToast extends AdiaElement {
|
|
|
140
201
|
container.appendChild(toast);
|
|
141
202
|
return toast;
|
|
142
203
|
}
|
|
204
|
+
|
|
143
205
|
}
|
|
206
|
+
|
|
207
|
+
/* Install the global 'toast' CustomEvent listener once, at module load,
|
|
208
|
+
so any code can post into the channel without importing AdiaToast
|
|
209
|
+
directly:
|
|
210
|
+
|
|
211
|
+
window.dispatchEvent(new CustomEvent('toast', {
|
|
212
|
+
detail: { text: 'Saved!', variant: 'success' }
|
|
213
|
+
}));
|
|
214
|
+
|
|
215
|
+
Idempotent — guarded by a window flag so HMR / re-imports are safe. */
|
|
216
|
+
if (typeof window !== 'undefined' && !window.__adiaToastListenerInstalled) {
|
|
217
|
+
window.__adiaToastListenerInstalled = true;
|
|
218
|
+
window.addEventListener('toast', (e) => {
|
|
219
|
+
if (e?.detail && typeof e.detail === 'object') AdiaToast.show(e.detail);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
144
223
|
customElements.define('toast-ui', AdiaToast);
|
|
145
224
|
|
|
146
225
|
export { AdiaToast };
|
|
@@ -109,6 +109,19 @@ toolbar-ui [data-toolbar-spillover-menu]:popover-open {
|
|
|
109
109
|
display: flex;
|
|
110
110
|
flex-direction: column;
|
|
111
111
|
gap: var(--a-space-1);
|
|
112
|
+
/* Fade + lift in on first paint. */
|
|
113
|
+
opacity: 1;
|
|
114
|
+
translate: 0 0;
|
|
115
|
+
transition: opacity var(--a-duration-fast) var(--a-easing-out),
|
|
116
|
+
translate var(--a-duration-fast) var(--a-easing-out);
|
|
117
|
+
@starting-style {
|
|
118
|
+
opacity: 0;
|
|
119
|
+
translate: 0 -4px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (prefers-reduced-motion: reduce) {
|
|
124
|
+
toolbar-ui [data-toolbar-spillover-menu]:popover-open { transition: none; }
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
/* Inside the spillover, render as a vertical list — every item (groups and
|
|
@@ -36,12 +36,20 @@
|
|
|
36
36
|
box-shadow: var(--a-shadow-sm);
|
|
37
37
|
white-space: nowrap;
|
|
38
38
|
pointer-events: none;
|
|
39
|
+
/* Fade in on first paint via @starting-style. */
|
|
40
|
+
opacity: 1;
|
|
41
|
+
transition: opacity var(--a-duration-fast) var(--a-easing-out);
|
|
39
42
|
/* No z-index needed — Popover API renders in the top layer which
|
|
40
43
|
has its own stacking above all document content. */
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
.tooltip-popup:popover-open {
|
|
44
47
|
display: block;
|
|
48
|
+
@starting-style { opacity: 0; }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52
|
+
.tooltip-popup { transition: none; }
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
/* ── Pointer-follow mode (chart/heatmap) ──
|
|
@@ -132,7 +140,7 @@
|
|
|
132
140
|
width: var(--tooltip-indicator-size);
|
|
133
141
|
height: var(--tooltip-indicator-size);
|
|
134
142
|
border-radius: 50%;
|
|
135
|
-
background: var(--tooltip-indicator-color, var(--
|
|
143
|
+
background: var(--tooltip-indicator-color, var(--a-data-0));
|
|
136
144
|
flex-shrink: 0;
|
|
137
145
|
}
|
|
138
146
|
|
|
@@ -140,14 +148,14 @@
|
|
|
140
148
|
display: inline-block;
|
|
141
149
|
width: calc(var(--tooltip-indicator-size) * 1.6);
|
|
142
150
|
height: 2px;
|
|
143
|
-
background: var(--tooltip-indicator-color, var(--
|
|
151
|
+
background: var(--tooltip-indicator-color, var(--a-data-0));
|
|
144
152
|
flex-shrink: 0;
|
|
145
153
|
}
|
|
146
154
|
|
|
147
155
|
.tooltip-popup[data-follows="pointer"][data-indicator="dashed"] [data-indicator] {
|
|
148
156
|
display: inline-block;
|
|
149
157
|
width: calc(var(--tooltip-indicator-size) * 1.6);
|
|
150
|
-
border-top: 2px dashed var(--tooltip-indicator-color, var(--
|
|
158
|
+
border-top: 2px dashed var(--tooltip-indicator-color, var(--a-data-0));
|
|
151
159
|
flex-shrink: 0;
|
|
152
160
|
}
|
|
153
161
|
|
package/core/provider.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-utils.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
--a-primary-bg-disabled: var(--a-accent-muted);
|
|
177
177
|
--a-primary-bg-invalid: var(--a-danger-muted);
|
|
178
178
|
|
|
179
|
-
--a-primary-fg: var(--a-accent-
|
|
179
|
+
--a-primary-fg: var(--a-accent-05-tint);
|
|
180
180
|
--a-primary-fg-hover: var(--a-accent-text-strong);
|
|
181
181
|
--a-primary-fg-active: var(--a-accent-text-strong);
|
|
182
182
|
--a-primary-fg-selected: var(--a-accent-text-strong);
|
package/styles/components.css
CHANGED
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
@import "../components/alert/alert.css";
|
|
51
51
|
@import "../components/kbd/kbd.css";
|
|
52
52
|
@import "../components/tag/tag.css";
|
|
53
|
+
@import "../components/swatch/swatch.css";
|
|
53
54
|
@import "../components/col/col.css";
|
|
54
55
|
@import "../components/field/field.css";
|
|
55
56
|
@import "../components/row/row.css";
|