@adia-ai/web-components 0.7.4 → 0.7.5
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 +9 -0
- package/components/button/button.css +27 -4
- package/dist/host.min.css +1 -1
- package/dist/web-components.min.css +1 -1
- package/package.json +1 -1
- package/styles/api/text.css +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog — @adia-ai/web-components
|
|
2
2
|
|
|
3
|
+
## [0.7.5] — 2026-06-02
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`<button-ui>` colored buttons — unreadable solid text + outline rendering as a solid pill.** Two bugs in the `[color]` × `variant` matrix, both verified on the live render (`scripts/qa/button-color-probe.mjs`: WCAG contrast + fill-transparency probe). (1) **Solid** `color="danger|info|success"` set `--button-fg: var(--a-X-fg)`, which resolves to `--a-X-text-strong` — *family-colored* text, ~1:1 contrast on the same-hue fill (near-invisible). Now `--a-chrome-light` (white) like `variant="primary"` → danger 4.75:1, info 4.27:1, success 4.02:1. `warning` keeps dark `--a-warning-fg` (its `--a-warning-bg` fill is light amber). Documented anti-pattern `feedback_text_on_accent_disc` (light text on filled accent surfaces). (2) **Outline/ghost + color** rendered as a solid pill — the `[color]` rule's solid `--button-bg` won source-order over `[variant="outline"]` (the demo's `variant="outline" color="success"` "Approve" button, `button.examples.html:50`). Added combined `[variant][color]` selectors (specificity 0,3,0 > the 0,2,0 `[color]` rule) restoring a transparent fill + colored text (`--a-X-text`) + colored border (`--a-X-border` for outline). **(3) The actual override mechanism.** Fixes (1)+(2) set `--button-fg` correctly, yet the rendered text stayed the fill hue: the global `[color]` presentational utility (`api/text.css`, `utilities` layer) sets `color: var(--a-fg)` and wins over the button's `components`-layer `color: var(--button-fg)` by **layer order** (utilities > components), regardless of specificity. `button-ui` re-purposes `color=` as a semantic *fill* (the `variant="danger"`→`color="danger"` migration, button.css:180) and is the only filled control that does, and is not among the color honorings (`cascade-component-attr-sweep.mjs`) — so it is now excluded from the text-color utility: `[color]:not(:where(button-ui))` (specificity-neutral via `:where()`; a plain `[color="info"]` element still resolves to info text). Verified on a *fresh* serve against the real demo buttons — the persistent dev server caches the `host.css` `@import` chain and masked the fix on edit. Files: `components/button/button.css`, `styles/api/text.css`.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- **CDN bundles rebuilt** — `dist/host.min.css` + `dist/web-components.min.css` regenerated so the button-color fix above reaches `@adia-ai/web-components@0.7` CDN consumers (the bundles were stale since the fix landed on `main` pre-cut, ahead of the cut's `build:bundles`).
|
|
11
|
+
|
|
3
12
|
## [0.7.4] — 2026-06-02
|
|
4
13
|
|
|
5
14
|
### Added
|
|
@@ -56,7 +56,7 @@ button-ui[color="danger"]:not([disabled]):hover {
|
|
|
56
56
|
--button-border-ghost: transparent;
|
|
57
57
|
--button-border-ghost-hover: transparent;
|
|
58
58
|
--button-bg-danger: var(--a-danger);
|
|
59
|
-
--button-fg-danger: var(--a-
|
|
59
|
+
--button-fg-danger: var(--a-chrome-light); /* white on the saturated fill — see color rules */
|
|
60
60
|
--button-bg-hover-danger: var(--a-danger);
|
|
61
61
|
--button-bg-disabled: var(--a-ui-bg-disabled);
|
|
62
62
|
--button-fg-disabled: var(--a-ui-text-disabled);
|
|
@@ -186,13 +186,17 @@ button-ui[color="danger"]:not([disabled]):hover {
|
|
|
186
186
|
/* Consume the L3 `-bg` alias, not the L2 `-strong` step. Currently
|
|
187
187
|
resolves identically (both = `-50`), but consuming `-bg` future-
|
|
188
188
|
proofs if the surface-step ever redirects (as -warning-bg did
|
|
189
|
-
in v0.6.36 to fix muddy contrast).
|
|
189
|
+
in v0.6.36 to fix muddy contrast).
|
|
190
|
+
Text is --a-chrome-light (white) on the saturated fill, like primary
|
|
191
|
+
(--button-fg-primary). --a-success-fg is success-COLORED text — near
|
|
192
|
+
invisible on the fill (feedback_text_on_accent_disc). Warning is the
|
|
193
|
+
exception: its --a-warning-bg fill is light, so it keeps dark -fg. */
|
|
190
194
|
--button-bg: var(--a-success-bg);
|
|
191
|
-
--button-fg: var(--a-
|
|
195
|
+
--button-fg: var(--a-chrome-light);
|
|
192
196
|
}
|
|
193
197
|
:scope[color="info"] {
|
|
194
198
|
--button-bg: var(--a-info-bg);
|
|
195
|
-
--button-fg: var(--a-
|
|
199
|
+
--button-fg: var(--a-chrome-light);
|
|
196
200
|
}
|
|
197
201
|
:scope[color="warning"] {
|
|
198
202
|
/* `--a-warning-bg` (bright amber, scheme-independent) not
|
|
@@ -203,6 +207,25 @@ button-ui[color="danger"]:not([disabled]):hover {
|
|
|
203
207
|
--button-fg: var(--a-warning-fg);
|
|
204
208
|
}
|
|
205
209
|
|
|
210
|
+
/* ── Color × non-solid variants ──
|
|
211
|
+
The [color] rules above set a SOLID fill — that's the default rendering
|
|
212
|
+
(bare `color="danger"`). But with variant="outline"/"ghost" the button
|
|
213
|
+
must COMPOSE, not fill. These combined selectors (specificity 0,3,0) beat
|
|
214
|
+
the 0,2,0 [color] rules regardless of source order, restoring a transparent
|
|
215
|
+
fill + colored text (+ colored border for outline). Without them,
|
|
216
|
+
`variant="outline" color="success"` renders as a solid green pill — the
|
|
217
|
+
demo's "Approve" button (button.examples.html:50). --a-X-text is the
|
|
218
|
+
family-colored text designed to read on a neutral page surface; -border is
|
|
219
|
+
the L3 colored border alias. */
|
|
220
|
+
:scope[variant="outline"][color="danger"] { --button-bg: transparent; --button-fg: var(--a-danger-text); --button-border: var(--a-danger-border); }
|
|
221
|
+
:scope[variant="outline"][color="info"] { --button-bg: transparent; --button-fg: var(--a-info-text); --button-border: var(--a-info-border); }
|
|
222
|
+
:scope[variant="outline"][color="success"] { --button-bg: transparent; --button-fg: var(--a-success-text); --button-border: var(--a-success-border); }
|
|
223
|
+
:scope[variant="outline"][color="warning"] { --button-bg: transparent; --button-fg: var(--a-warning-text); --button-border: var(--a-warning-border); }
|
|
224
|
+
:scope[variant="ghost"][color="danger"] { --button-bg: transparent; --button-fg: var(--a-danger-text); }
|
|
225
|
+
:scope[variant="ghost"][color="info"] { --button-bg: transparent; --button-fg: var(--a-info-text); }
|
|
226
|
+
:scope[variant="ghost"][color="success"] { --button-bg: transparent; --button-fg: var(--a-success-text); }
|
|
227
|
+
:scope[variant="ghost"][color="warning"] { --button-bg: transparent; --button-fg: var(--a-warning-text); }
|
|
228
|
+
|
|
206
229
|
/* Hover rules moved outside @scope — see Safari 17.x bug note at
|
|
207
230
|
top of file. */
|
|
208
231
|
|