@adia-ai/web-components 0.8.12 → 0.8.13
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 +13 -0
- package/components/nav-group/nav-group.class.js +8 -0
- package/components/nav-group/nav-group.test.js +35 -0
- package/components/nav-item/nav-item.class.js +6 -0
- package/dist/theme-provider.min.js +5 -5
- package/dist/themes.min.css +1 -1
- package/dist/themes.sheet.js +1 -1
- package/dist/web-components.min.js +2 -2
- package/package.json +1 -1
- package/styles/host.css +2 -0
- package/styles/theme-fonts-url.txt +9 -0
- package/styles/themes.css +1484 -135
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog — @adia-ai/web-components
|
|
2
2
|
|
|
3
|
+
## [0.8.13] — 2026-07-25
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **12 named `[theme]` identities** (`styles/themes.css`, fully rewritten; PR #409) — atlas, signal, terrarium, ledger, arcade, meridian, solstice, glacier, ember, botanica, vector, velour. Each is a real recolor (not a decorative hue nudge): overrides the raw `--md-sys-color-{primary,secondary,tertiary}-*` OKLCH ramps per theme, hue-rotated from the shipped, contrast-verified L/C curve, so every semantic role (`-hover`/`-container`/`-outline`/`-on-surface`/etc., all `light-dark()` reads of those stops) recolors with zero component changes. `neutral` and the four intent families (`info`/`success`/`warning`/`danger`) stay constant across all 12 — only brand identity rotates. Each theme also pairs a distinct Google Fonts family (`--a-font-family-display`/`-text`) and its own shape knobs (`--a-radius-k`/`--a-density`/`--a-shadow-intensity`/`--a-brand-hue`). Supersedes the previous 8-name preset list (default/ocean/forest/sunset/lavender/rose/slate/midnight), which had degraded to shape-only knobs since v0.8.0's Material-static-export migration.
|
|
7
|
+
- **Google Fonts stylesheet reference** (`styles/theme-fonts-url.txt`) — the exact `<link>` URL (22 families, one request) a consumer must add once to use `[theme]`. Not `@import`'d from `themes.css` itself — LightningCSS's bundler resolves every `@import` as a local file, remote http(s) URLs included, so a CSS-level `@import` broke `build:bundle-css`; a `<link>` also avoids blocking parallel download. Falls back cleanly to each family's system-font stack when unlinked.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`styles/scale.css` (the six-tier `[scale]` register, shipped v0.8.11) was never linked anywhere** — not in `host.css`'s own "opt-in add-ons" list, not in `site/index.html`, not in `theme-panel`'s own demo. `[scale="x"]` was being set correctly by consumers but no stylesheet defined what the attribute did, so scale toggles were silently inert. `host.css`'s opt-in list now documents it; `site/index.html` links it.
|
|
11
|
+
|
|
12
|
+
### Maintenance
|
|
13
|
+
- **`components/` touched in this release window** (3 file(s), e.g. `nav-group/nav-group.class.js`) — carried by the entries above.
|
|
14
|
+
- **`dist/` bundles rebuilt** in this cut's window (4 file(s)) — regenerated from the source changes described above, not independent edits.
|
|
15
|
+
|
|
3
16
|
## [0.8.12] — 2026-07-24
|
|
4
17
|
|
|
5
18
|
### Changed
|
|
@@ -86,6 +86,14 @@ export class UINavGroup extends UIElement {
|
|
|
86
86
|
if (badgeEl) badgeEl.textContent = this.badge;
|
|
87
87
|
|
|
88
88
|
this.setAttribute('aria-expanded', String(this.open));
|
|
89
|
+
|
|
90
|
+
// Mirrors nav-item-ui's selected → fill convention: an open group
|
|
91
|
+
// reads as the active section via the same filled-glyph treatment
|
|
92
|
+
// [open] already drives (nav-group.css's [open] > [slot=header] color
|
|
93
|
+
// rule) — a state-driven weight swap, not a CSS color change, since
|
|
94
|
+
// Phosphor ships filled/regular as distinct SVGs.
|
|
95
|
+
const iconEl = this.querySelector('[slot="header"] [slot="icon"] icon-ui');
|
|
96
|
+
if (iconEl) iconEl.setAttribute('weight', this.open ? 'fill' : 'regular');
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
showPopover() {
|
|
@@ -30,3 +30,38 @@ describe('nav-group-ui — header stamp-if-absent (wrapper trap)', () => {
|
|
|
30
30
|
expect(headers[0].dataset.test).toBe('h');
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
+
|
|
34
|
+
describe('nav-group-ui — [open] drives the header icon weight', () => {
|
|
35
|
+
beforeEach(() => { document.body.innerHTML = ''; });
|
|
36
|
+
|
|
37
|
+
it('defaults the auto-stamped header icon to weight="regular"', async () => {
|
|
38
|
+
const el = mount('<nav-group-ui text="Reports" icon="folder"></nav-group-ui>');
|
|
39
|
+
await tick();
|
|
40
|
+
const icon = el.querySelector('[slot="header"] [slot="icon"] icon-ui');
|
|
41
|
+
expect(icon.getAttribute('weight')).toBe('regular');
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('switches the header icon to weight="fill" when [open] is set', async () => {
|
|
45
|
+
const el = mount('<nav-group-ui text="Reports" icon="folder"></nav-group-ui>');
|
|
46
|
+
await tick();
|
|
47
|
+
el.open = true;
|
|
48
|
+
await tick();
|
|
49
|
+
const icon = el.querySelector('[slot="header"] [slot="icon"] icon-ui');
|
|
50
|
+
expect(icon.getAttribute('weight')).toBe('fill');
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('reverts to weight="regular" when [open] is cleared', async () => {
|
|
54
|
+
const el = mount('<nav-group-ui text="Reports" icon="folder" open></nav-group-ui>');
|
|
55
|
+
await tick();
|
|
56
|
+
el.open = false;
|
|
57
|
+
await tick();
|
|
58
|
+
const icon = el.querySelector('[slot="header"] [slot="icon"] icon-ui');
|
|
59
|
+
expect(icon.getAttribute('weight')).toBe('regular');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('is a no-op when the group has no icon (empty icon slot, no icon-ui)', async () => {
|
|
63
|
+
const el = mount('<nav-group-ui text="Reports" open></nav-group-ui>');
|
|
64
|
+
await tick();
|
|
65
|
+
expect(el.querySelector('[slot="header"] [slot="icon"] icon-ui')).toBeNull();
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -77,6 +77,12 @@ export class UINavItem extends UIElement {
|
|
|
77
77
|
this.setAttribute('tabindex', this.disabled ? '-1' : '0');
|
|
78
78
|
if (this.selected) this.setAttribute('aria-current', 'page');
|
|
79
79
|
else this.removeAttribute('aria-current');
|
|
80
|
+
|
|
81
|
+
// Selected rows read as filled glyphs, unselected as regular weight —
|
|
82
|
+
// a state-driven weight swap (Phosphor ships filled/regular as distinct
|
|
83
|
+
// SVGs, so this can't be a CSS-only color change).
|
|
84
|
+
const iconEl = this.querySelector('[slot="icon"] icon-ui');
|
|
85
|
+
if (iconEl) iconEl.setAttribute('weight', this.selected ? 'fill' : 'regular');
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
disconnected() {
|