@adia-ai/web-components 0.8.11 → 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 CHANGED
@@ -1,5 +1,23 @@
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
+
16
+ ## [0.8.12] — 2026-07-24
17
+
18
+ ### Changed
19
+ - **`tag-ui` adopts `badge-ui`'s sm/md/lg size system** (`components/tag/{tag.yaml,tag.examples.html}`; PR #401) — the `size` enum was `sm|md` only, one row short of `badge-ui` despite already sharing the identical CSS pattern (both delegate sizing entirely to the universal `[size]` system; neither has any per-size CSS of its own). Added `lg`. No CSS changes required. Also fixed a stale deck paragraph ("Supports status variants and two sizes" → "three sizes") on the compile source for `/site/components/tag`.
20
+
3
21
  ## [0.8.11] — 2026-07-23
4
22
 
5
23
  ### Added
@@ -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() {
@@ -27,11 +27,12 @@
27
27
  "default": false
28
28
  },
29
29
  "size": {
30
- "description": "Size preset controlling font-size and padding.",
30
+ "description": "Size preset controlling font-size and padding (sm/md/lg — same size system as badge-ui). For a denser or larger register, set [scale] on an ancestor.",
31
31
  "type": "string",
32
32
  "enum": [
33
33
  "sm",
34
- "md"
34
+ "md",
35
+ "lg"
35
36
  ],
36
37
  "default": "md"
37
38
  },
@@ -34,8 +34,8 @@ export class UITag extends UIElement {
34
34
  disabled: boolean;
35
35
  /** Shows a dismiss button that fires the remove event. */
36
36
  removable: boolean;
37
- /** Size preset controlling font-size and padding. */
38
- size: 'sm' | 'md';
37
+ /** Size preset controlling font-size and padding (sm/md/lg — same size system as badge-ui). For a denser or larger register, set [scale] on an ancestor. */
38
+ size: 'sm' | 'md' | 'lg';
39
39
  /** Tag text content. */
40
40
  text: string;
41
41
  /** Tag label. Renderer routes this to the `text` attribute, rendered via CSS attr(text) on ::after. */
@@ -30,12 +30,13 @@ props:
30
30
  type: boolean
31
31
  default: false
32
32
  size:
33
- description: Size preset controlling font-size and padding.
33
+ description: Size preset controlling font-size and padding (sm/md/lg — same size system as badge-ui). For a denser or larger register, set [scale] on an ancestor.
34
34
  type: string
35
35
  default: md
36
36
  enum:
37
37
  - sm
38
38
  - md
39
+ - lg
39
40
  text:
40
41
  description: Tag text content.
41
42
  type: string