@adia-ai/web-components 0.8.48 → 0.8.50

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/MIGRATION.md +136 -0
  3. package/components/chart/chart.class.js +41 -10
  4. package/components/input/input.a2ui.json +2 -2
  5. package/components/input/input.css +45 -16
  6. package/components/input/input.yaml +11 -9
  7. package/components/search/search.a2ui.json +1 -1
  8. package/components/search/search.class.js +43 -0
  9. package/components/search/search.css +28 -0
  10. package/components/search/search.yaml +4 -1
  11. package/components/select/select.class.js +4 -1
  12. package/components/select/select.css +13 -0
  13. package/components/stat/stat.a2ui.json +30 -3
  14. package/components/stat/stat.css +88 -0
  15. package/components/stat/stat.d.ts +2 -2
  16. package/components/stat/stat.yaml +99 -6
  17. package/components/table/table.a2ui.json +1 -1
  18. package/components/table/table.class.js +9 -9
  19. package/components/table/table.d.ts +1 -1
  20. package/components/table/table.yaml +7 -7
  21. package/components/table-footer/table-footer.class.js +6 -6
  22. package/components/table-toolbar/table-toolbar.a2ui.json +3 -0
  23. package/components/table-toolbar/table-toolbar.class.js +28 -6
  24. package/components/table-toolbar/table-toolbar.css +30 -0
  25. package/components/table-toolbar/table-toolbar.yaml +57 -17
  26. package/components/theme-provider/theme-provider.a2ui.json +3 -5
  27. package/components/theme-provider/theme-provider.class.js +9 -30
  28. package/components/theme-provider/theme-provider.d.ts +3 -5
  29. package/components/theme-provider/theme-provider.yaml +4 -8
  30. package/core/element.js +16 -3
  31. package/custom-elements.json +10 -6
  32. package/dist/theme-provider.min.js +3 -3
  33. package/dist/web-components.min.css +1 -1
  34. package/dist/web-components.min.js +58 -57
  35. package/dist/web-components.sheet.js +1 -1
  36. package/index.css +1 -2
  37. package/package.json +1 -1
  38. package/styles/README.md +1 -1
  39. package/styles/api/sizing.css +1 -1
  40. package/styles/host.css +1 -4
  41. package/styles/index.css +2 -2
  42. package/styles/scale.css +19 -26
  43. package/styles/themes.css +2 -2
  44. package/styles/type/roles.css +3 -3
  45. package/styles/typography.css +6 -5
  46. package/dist/prose.min.css +0 -1
  47. package/dist/prose.sheet.js +0 -11
  48. package/dist/verse.min.css +0 -1
  49. package/dist/verse.sheet.js +0 -11
  50. package/styles/prose.css +0 -211
  51. package/styles/verse.css +0 -151
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @adia-ai/web-components
2
2
 
3
+ ## [0.8.50] — 2026-08-23
4
+
5
+ ### Added
6
+ - **`stat-ui` KPI tile layout — full-bleed chart band + overlaid delta chip (gh#1835, PR #1920, ADR-0083).** New `[bleed]` (with the existing `[band]`) composition on the chart slot lets the chart reach the card's edges — a right-column bleed alone, a three-edge bottom band together with `band` — with the value/label/change stack overlaying it. New public CSS custom properties: `--stat-change-inset`, `--stat-change-size`, and the six `--stat-change-chip-*` tokens (`bg`, `fg`, `font-size`, `pad-x`, `pad-y`, `radius`). (Entry added at cut time — PR #1920 merged without one.)
7
+
8
+ ### Removed
9
+ - **BREAKING: `[prose]`/`[verse]` deprecated attribute sheets removed (gh#1885, closes gh#1822).** `styles/prose.css` and `styles/verse.css` — deprecated since v0.8.11 in favor of the ancestor `[scale]` register — are deleted outright, along with the `[prose]`/`[verse]` HTML attributes, `<theme-provider scale="prose"|"verse">`'s legacy alias mapping, and the a2ui catalog's deprecated `prose` `DynamicBoolean` prop (`common_types.json`). No deprecation alias — use `scale="content-md"` / `scale="ui-sm"` (byte-identical rendering). Migration guide: `.claude/docs/MIGRATION GUIDE.md` § Shipped in `0.8.50`. Ships in this PATCH cut per Kim ruling of 2026-08-23 PDT, held-items entry dated 2026-08-24 UTC (recorded invariant-7/IDR-0004 deviation).
10
+
11
+ ### Changed
12
+ - **BREAKING: `input-ui`/`search-ui` fill-default sizing posture, `[inline]` hugs (ADR-0077, Steps 1-2, gh#1856).** A form control dropped into a flex toolbar row with no explicit width/flex collapsed to its content/floor width instead of filling the row's remaining space, because `input-ui`'s 20ch legibility floor (gh#781) applied unconditionally on the plain `:scope` — fighting any container that wanted to size it (same root-cause class as gh#1633's select-ui/combobox-ui collapse). `input-ui`'s `:scope` now fills (`width: 100%`) by default; `--input-min-width` moves to `:scope[inline]`, which also flips to inline-level display + `fit-content` per ADR-0037 §2 hug mechanics. `search-ui` gets the same fill-default posture on its own host and forwards its `[inline]` attribute onto its internal `<input-ui>` (light-DOM composition, so `:scope[inline]` can't reach across that boundary) via a hand-rolled `observedAttributes`/`attributeChangedCallback`. `select-ui`/`combobox-ui`/`date-range-picker-ui` remain on the old posture, scheduled as later plan waves (`docs/ops/plan/plan-form-control-sizing.md`). See `.claude/docs/MIGRATION GUIDE.md`.
13
+
14
+ ### Maintenance
15
+ - **`components/` touched in this release window** (38 file(s), e.g. `chart/chart.class.js`) — carried by the entries above.
16
+ - **`core/` touched in this release window** (2 file(s), e.g. `core/element.js`) — carried by the entries above.
17
+ - **`dist/` bundles rebuilt** in this cut's window (8 file(s)) — regenerated from the source changes described above, not independent edits.
18
+
3
19
  ## [0.8.48] — 2026-08-23
4
20
 
5
21
  ### Added
package/MIGRATION.md CHANGED
@@ -90,6 +90,10 @@ Version cuts and migration scope:
90
90
 
91
91
  - **Shipped in `0.8.43` (three 0.8.41-era deprecated components removed — `toggle-group-ui`/`toggle-option-ui`, `progress-row-ui`, `datetime-picker-ui`, gh#1617)** — **BREAKING.** Each shipped its `status: deprecated` soft-deprecation additively in `0.8.41` (its own entry below); all three are now removed outright per the same operator ruling (gh#1562, IDR-0004 deviation). None of the three tags register as custom elements anymore. Migrate: `<toggle-group-ui value>` + `<toggle-option-ui>` children → `<segmented-ui multiple value>` + `<segment-ui>` children (`<toggle-group-ui single>` → plain `<segmented-ui>`, no `[multiple]`); `<progress-row-ui label value meta>` → `<progress-ui label value meta>` (mechanical tag rename); `<datetime-picker-ui>` → `<calendar-picker-ui precision="minute">`. See [§ Shipped in `0.8.43` — three 0.8.41-era deprecated components removed](#shipped-in-0843--three-0841-era-deprecated-components-removed-toggle-group-uitoggle-option-ui-progress-row-ui-datetime-picker-ui-gh1617).
92
92
 
93
+ - **Shipped in `0.8.50` (Kim ruling of 2026-08-23 PDT (held-items entry dated 2026-08-24 UTC) — invariant-7/IDR-0004 recorded deviation, ships in a PATCH cut)** — **BREAKING:** the `[prose]`/`[verse]` deprecated attribute sheets (`styles/prose.css`, `styles/verse.css`, deprecated since `0.8.11`) are removed outright, with no deprecation alias — `[prose]`/`[verse]` and `<theme-provider scale="prose"|"verse">` no longer resolve. Use `scale="content-md"` / `scale="ui-sm"` instead (byte-identical rendering). The a2ui catalog's deprecated `prose` `DynamicBoolean` prop is also dropped from `common_types.json`. (gh#1885, closing gh#1822.) See [§ Shipped in `0.8.50` — `[prose]`/`[verse]` sheets removed](#shipped-in-0850--proseverse-sheets-removed-gh1885-gh1822).
94
+
95
+ - **Shipped in `0.8.50` (`input-ui`/`search-ui` fill-default sizing posture, ADR-0077, gh#1856)** — **BREAKING, no deprecation alias.** A form control dropped into a flex toolbar row with no explicit width/flex used to collapse to its content/floor width instead of filling the row's remaining space (visible as clipped search placeholder text in consumer admin surfaces), because `input-ui`'s 20ch legibility floor (gh#781) applied unconditionally on the plain `:scope`. `<input-ui>`'s `:scope` now fills (`width: 100%`) by default; the old floor (`--input-min-width`) moves to `:scope[inline]`, which also switches to inline-level display + `fit-content` per ADR-0037 §2 hug mechanics. `<search-ui>` gets the same fill-default posture and forwards `[inline]` onto its internal `<input-ui>`. Migration: any consumer relying on the old shrink-wrap default (e.g. an unconstrained `<input-ui>`/`<search-ui>` inline among text, expecting it to hug its content) must add `[inline]` explicitly. `select-ui`/`combobox-ui`/`date-range-picker-ui` are unaffected — same old posture, later plan waves. See [§ Shipped in `0.8.50` — input-ui/search-ui fill-default sizing posture](#shipped-in-0850--input-uisearch-ui-fill-default-sizing-posture-adr-0077-gh1856).
96
+
93
97
  Live demos and per-component docs at [ui-kit.exe.xyz/site/](https://ui-kit.exe.xyz/site/). The `adia-ui-migration` skill (in `.agents/skills/`) automates most of the mechanical sweeps in this guide.
94
98
 
95
99
  ---
@@ -1887,6 +1891,138 @@ npm run check
1887
1891
 
1888
1892
  ---
1889
1893
 
1894
+ ## Shipped in `0.8.50` — `[prose]`/`[verse]` sheets removed (gh#1885, gh#1822)
1895
+
1896
+ **BREAKING, no deprecation alias.** `styles/prose.css` and `styles/verse.css`
1897
+ — deprecated since `0.8.11` in favor of the ancestor `[scale]` register — are
1898
+ removed outright (gh#1885, closing gh#1822's open question). The `[prose]`/
1899
+ `[verse]` HTML attributes and `<theme-provider scale="verse">`/
1900
+ `scale="prose"`'s legacy aliases no longer resolve to anything. All live
1901
+ in-repo usage had already migrated to `scale="content-md"`/`scale="ui-sm"`
1902
+ in PR #1874; this cut deletes the byte-identical fallback sheets those
1903
+ attributes depended on.
1904
+
1905
+ ### `[prose]` → `scale="content-md"` (`prose` → `content-md`)
1906
+
1907
+ `[prose]` was the long-form/reading register — byte-identical to
1908
+ `scale="content-md"`.
1909
+
1910
+ **Audit:**
1911
+ ```bash
1912
+ git grep -nE '\[prose\]|<[a-z-]+ prose\b|prose="'
1913
+ ```
1914
+
1915
+ **Sweep:**
1916
+ ```bash
1917
+ git grep -lz -E '\bprose\b' -- '*.html' '*.js' | while IFS= read -r -d '' f; do
1918
+ perl -i -pe 's/\bprose(=""|="true")?\b(?!-)/scale="content-md"/g if /<[a-z-]+[^>]*\bprose\b/' "$f"
1919
+ done
1920
+ # Boolean-attribute rewrites are structural, not string-substitutable in
1921
+ # general — review each hit; the sweep above only rewrites the exact
1922
+ # `<tag prose>` / `<tag prose="">` shape. A theme-provider scale="prose"
1923
+ # call site is a plain value rename instead:
1924
+ git grep -lz 'scale="prose"' | while IFS= read -r -d '' f; do
1925
+ perl -i -pe 's/scale="prose"/scale="content-md"/g' "$f"
1926
+ done
1927
+ ```
1928
+
1929
+ ### `[verse]` → `scale="ui-sm"` (`verse` → `ui-sm`)
1930
+
1931
+ `[verse]` was the dense/compact-product-UI register — byte-identical to
1932
+ `scale="ui-sm"`.
1933
+
1934
+ **Audit:**
1935
+ ```bash
1936
+ git grep -nE '\[verse\]|<[a-z-]+ verse\b|verse="'
1937
+ ```
1938
+
1939
+ **Sweep:**
1940
+ ```bash
1941
+ git grep -lz -E '\bverse\b' -- '*.html' '*.js' | while IFS= read -r -d '' f; do
1942
+ perl -i -pe 's/\bverse(=""|="true")?\b(?!-)/scale="ui-sm"/g if /<[a-z-]+[^>]*\bverse\b/' "$f"
1943
+ done
1944
+ git grep -lz 'scale="verse"' | while IFS= read -r -d '' f; do
1945
+ perl -i -pe 's/scale="verse"/scale="ui-sm"/g' "$f"
1946
+ done
1947
+ ```
1948
+
1949
+ ### The a2ui catalog `prose` prop is gone too
1950
+
1951
+ `common_types.json`'s deprecated `prose` `DynamicBoolean` prop (mapped onto
1952
+ the legacy `[prose]` attribute) is removed from `ComponentCommon`. Generated
1953
+ a2ui documents carrying `"prose": true` on any node no longer validate —
1954
+ regenerate via the composer, or hand-migrate to an ancestor
1955
+ `{"component": "ThemeProvider", "scale": "content-md"}` wrapper.
1956
+
1957
+ ### Verify
1958
+
1959
+ ```bash
1960
+ git grep -nE '\[prose\]|\[verse\]|prose-ui|verse-ui|prose\.css|verse\.css' \
1961
+ -- ':!CHANGELOG.md' ':!**/CHANGELOG*.md' ':!docs/ops/releases/**' \
1962
+ ':!.claude/ops/**' ':!**/HANDOFF*.md' ':!**/BUILD.md' \
1963
+ ':!.claude/docs/specs/cascade-layer-architecture.md' \
1964
+ ':!.claude/docs/MIGRATION GUIDE.md' ':!packages/web-components/MIGRATION.md'
1965
+ node scripts/build/components.mjs --verify
1966
+ npm run check
1967
+ ```
1968
+
1969
+ ---
1970
+
1971
+ ## Shipped in `0.8.50` — `input-ui`/`search-ui` fill-default sizing posture (ADR-0077, gh#1856)
1972
+
1973
+ **BREAKING, no deprecation alias.** A form control dropped into a flex
1974
+ toolbar row with no explicit width/flex collapsed to its content/floor
1975
+ width instead of filling the row's remaining space (visible as clipped
1976
+ search placeholder text in consumer admin surfaces), because `input-ui`'s
1977
+ 20ch legibility floor (gh#781) applied unconditionally on the plain
1978
+ `:scope`, fighting any container that wanted to size it. Same root-cause
1979
+ class as gh#1633's select-ui/combobox-ui collapse.
1980
+
1981
+ Implements Steps 1-2 of `docs/ops/plan/plan-form-control-sizing.md` against
1982
+ the ratified `docs/ops/adr/adr-0077-form-control-sizing-posture.md` /
1983
+ `spec-form-control-sizing-posture`: form controls fill their container by
1984
+ default; `[inline]` opts into the old shrink-wrap/hug behavior, where the
1985
+ legibility floor now lives instead of on every state.
1986
+
1987
+ ### What changed
1988
+
1989
+ - **`input-ui`** — `:scope` fills (`width: 100%`) by default; `--input-min-width`
1990
+ moves to `:scope[inline]`, which also flips to inline-level display +
1991
+ `fit-content` per ADR-0037 §2 hug mechanics.
1992
+ - **`search-ui`** — same fill-default posture on its own host. Forwards its
1993
+ `[inline]` attribute onto the internal `<input-ui>` (light-DOM
1994
+ composition — CSS `:scope[inline]` can't reach across that boundary) via
1995
+ a hand-rolled `observedAttributes`/`attributeChangedCallback`.
1996
+ - **Unaffected:** `select-ui`/`combobox-ui`/`date-range-picker-ui` remain on
1997
+ the old posture — scheduled as later `plan-form-control-sizing.md` waves.
1998
+
1999
+ ### Migration
2000
+
2001
+ Any consumer relying on the previous shrink-wrap default — an unconstrained
2002
+ `<input-ui>`/`<search-ui>` placed inline among text or in a layout that
2003
+ expected it to hug its content rather than stretch — must add `[inline]`
2004
+ explicitly:
2005
+
2006
+ ```html
2007
+ <!-- before (0.8.48 and earlier): hugged its content by default -->
2008
+ <input-ui placeholder="Search…"></input-ui>
2009
+
2010
+ <!-- after: fills its container by default; opt into the old hug -->
2011
+ <input-ui inline placeholder="Search…"></input-ui>
2012
+ ```
2013
+
2014
+ A control already given an explicit width, or already inside a container
2015
+ that constrains it (a `card-ui`, a fixed-width `field-ui`), needs no change.
2016
+
2017
+ ### Verify
2018
+
2019
+ ```bash
2020
+ node scripts/build/components.mjs --verify
2021
+ npm run check
2022
+ ```
2023
+
2024
+ ---
2025
+
1890
2026
  ## Migrating to `@adia-ai/*@v0.8.23` (2026-07-30)
1891
2027
 
1892
2028
  - **Removed: the `--a-font` alias** (pre-ADR-0035 name, DEPRECATED since the 0.8.x line). Any surviving `font-family: var(--a-font)` goes invalid-at-computed-value-time → `inherit` → UA **serif** — the visible symptom is Times-faced labels on an otherwise-correct page.
@@ -569,7 +569,14 @@ export class UIChart extends UIElement {
569
569
  if (!this.#data.length) return;
570
570
  const rw = Math.round(w);
571
571
  const rh = Math.round(h);
572
- if (rw === this.#lastW && (!this.hasAttribute('resize') || rh === this.#lastH)) return;
572
+ // gh#1901 #dims() now trusts a measured clientHeight for EVERY
573
+ // chart (not only `resize`-attributed ones, see #dims() above), so
574
+ // a height-only change (e.g. `--stat-chart-band-height` changing,
575
+ // or the box's own CSS height rule flipping via a media query)
576
+ // must re-render regardless of the `resize` attribute — gating
577
+ // height changes behind `resize` froze the viewBox on exactly
578
+ // that class of change.
579
+ if (rw === this.#lastW && rh === this.#lastH) return;
573
580
  this.#lastW = rw;
574
581
  this.#lastH = rh;
575
582
  if (this.#resizeRaf) return;
@@ -614,18 +621,42 @@ export class UIChart extends UIElement {
614
621
  const n = this.#data.length || 1;
615
622
 
616
623
  const width = Math.max(containerW, 120);
617
- // When element has explicit height (resize handle, CSS height, inline style),
618
- // use it. Otherwise derive from aspect ratio. Safe because resize sets
619
- // overflow:auto which prevents content from pushing height.
620
- const hasExplicitHeight = this.hasAttribute('resize') || this.style.height;
621
- // ADR-0074 — an explicit `ratio` PINS the box's own aspect, overriding
622
- // whatever height the container/explicit-height path would otherwise
623
- // give (REQ-R-002: "regardless of the container's actual aspect
624
- // ratio"). Unset falls through to the pre-existing behavior unchanged.
624
+ // gh#1901 trust a measured clientHeight above the noise floor
625
+ // regardless of WHERE the height came from (inline style, the
626
+ // `resize` handle, or a plain CSS rule like
627
+ // `stat-ui[band] [slot="chart"] { height: … }`). Checking only
628
+ // `this.style.height`/`resize` missed the CSS-rule case entirely
629
+ // an author can size the box from a stylesheet just as validly as
630
+ // from an inline style, and #dims() has no way to tell those apart:
631
+ // `getComputedStyle(this).height` resolves to a used-value px length
632
+ // for ANY laid-out box (an explicit `height:`, an `aspect-ratio:`
633
+ // box, OR a plain `align-items:stretch` grid/flex item with no
634
+ // declared size at all) — there is no computed-style read that
635
+ // reports "an author declared this" versus "layout resolved this".
636
+ //
637
+ // KNOWN TRADE-OFF (gh#1901 review) — because of that, a chart-ui
638
+ // dropped bare into a generic grid/flex row also gets stretched to
639
+ // match a taller sibling's track/row, and that stretched height is
640
+ // trusted the same as a deliberate `height:`/`aspect-ratio:` rule
641
+ // (see chart.test.js's "ambient grid-stretch height" fixture, which
642
+ // asserts and documents this rather than hiding it). This is the
643
+ // same default a plain `<img>`/`<video>` gets in that layout — no
644
+ // intrinsic size fills whatever the stretched box gives it — and it
645
+ // is consistent with the intentional stretch-to-bleed already used by
646
+ // `stat-ui[bleed] [slot="chart"]` (`align-self:stretch; height:auto`,
647
+ // stat.css), which relies on exactly this same measured-height path.
648
+ // A narrower heuristic (e.g. gating on a specific computed-style
649
+ // signal) would have to reject that intentional case too, since
650
+ // mechanically it is indistinguishable from the accidental one.
651
+ // Below the 40px floor there's nothing to trust yet (pre-layout/
652
+ // empty box), so fall back to the aspect-ratio guess; once real
653
+ // content has rendered once, this stays self-consistent on every
654
+ // re-measure (a fallback-derived height reproduces the same value
655
+ // next time).
625
656
  const pinnedRatio = CHART_RATIOS[this.ratio];
626
657
  let height = pinnedRatio
627
658
  ? Math.round(width / pinnedRatio)
628
- : hasExplicitHeight && containerH > 40
659
+ : containerH > 40
629
660
  ? containerH
630
661
  : Math.round(width / aspect.ratio);
631
662
 
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://adiaui.dev/a2ui/v0_9/components/Input.json",
4
4
  "title": "Input",
5
- "description": "Text input field with contenteditable surface. Supports prefix/suffix icons, label, form participation, and a `type=\"number\"` mode that renders [+]/[-] stepper buttons, numeric input filtering, and ARIA spinbutton semantics — no native `<input type=\"number\">` under the hood. Password type uses a native `<input>` (only path that still wraps native, for `-webkit-text-security` disc masking). Has a 20ch minimum width (`--input-min-width`, mirrors the native `<input>` baseline) so a bare, placeholder-only instance stays usable inside a flex row (row-ui) with no explicit sizing explicit `width`/`flex` or CSS can size the host above the floor; values below the floor remain clamped unless `--input-min-width` is lowered.",
5
+ "description": "Text input field with contenteditable surface. Supports prefix/suffix icons, label, form participation, and a `type=\"number\"` mode that renders [+]/[-] stepper buttons, numeric input filtering, and ARIA spinbutton semantics — no native `<input type=\"number\">` under the hood. Password type uses a native `<input>` (only path that still wraps native, for `-webkit-text-security` disc masking). Fills its container's available inline width by default (ADR-0077 / spec-form-control-sizing-posture) in a flex row (row-ui) or grid track it tracks the container all the way down, with no host floor. `[inline]` opts into the old shrink-wrap behavior and is where the 20ch minimum width (`--input-min-width`, mirrors the native `<input>` baseline) survives, guarding a bare, placeholder-only instance from collapsing to near-zero as a hugging flex item.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -370,7 +370,7 @@
370
370
  "description": "Override line height"
371
371
  },
372
372
  "--input-min-width": {
373
- "description": "Override the minimum-width floor (20ch, mirrors the native `<input>` baseline). Keeps an empty, placeholder-only instance legible when placed directly in a flex row (row-ui) with no explicit width/flex sizing — the placeholder renders via an out-of-flow ::before that contributes no intrinsic width of its own, so without this floor the host collapses to near-zero as a flex item. Explicit sizing (width/flex) can grow the host above the floor but does not bypass it — set to 0 or another lower value to permit a narrower explicit size."
373
+ "description": "Override the minimum-width floor (20ch, mirrors the native `<input>` baseline), applied only in the `[inline]` hug state (ADR-0077 / spec-form-control-sizing-posture REQ-F-001/REQ-F-002). Keeps an empty, placeholder-only `[inline]` instance legible — the placeholder renders via an out-of-flow ::before that contributes no intrinsic width of its own, so without this floor a hugging instance collapses to near-zero. The default (non-`[inline]`) fill state carries no floor at all — the container owns the width all the way down. Set to 0 or another lower value to permit a narrower `[inline]` instance."
374
374
  },
375
375
  "--input-padding": {
376
376
  "description": "Override base padding (density-scaled)"
@@ -32,10 +32,14 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
32
32
  --input-affix-fg: var(--a-ui-text-placeholder);
33
33
  --input-field-gap: var(--a-space-1);
34
34
  --input-label-min-width: 8ch;
35
- /* Native-<input> baseline (historically ~20 characters). Floors the
36
- host so an empty, placeholder-only instance stays legible as a
37
- flex item see the :scope min-width rule below for the collapse
38
- mechanism this guards against. */
35
+ /* Native-<input> baseline (historically ~20 characters). ADR-0077 /
36
+ spec-form-control-sizing-posture (REQ-F-001/REQ-F-002) moved this
37
+ floor from the plain :scope to :scope[inline] the default
38
+ (fill) posture carries no host floor at all; the container owns
39
+ the width all the way down. The floor survives ONLY in the hug
40
+ state, where it guards an empty, placeholder-only instance from
41
+ collapsing to near-zero (gh#781/gh#1633). See :scope[inline]
42
+ below for the rule that now consumes this token. */
39
43
  --input-min-width: 20ch;
40
44
 
41
45
  /* ── Transitions ── */
@@ -63,18 +67,43 @@ input-ui:not([disabled]) [slot="field"]:hover [slot="suffix"] {
63
67
  /* ── Base ── */
64
68
  box-sizing: border-box;
65
69
  display: block;
66
- /* `display: block` gives no width once this host becomes a flex item
67
- (row-ui, or any display:flex parent) flex items size from
68
- content/flex-basis, not display type. The one child that could
69
- drive content-based sizing, [slot="text"], is EMPTY when the
70
- input has no value; its placeholder renders via an out-of-flow
71
- ::before (deliberately, for caret positioning see the pseudo
72
- below) that contributes zero intrinsic width. Without a floor,
73
- an empty placeholder-only input-ui collapses to near-zero in any
74
- flex context that doesn't otherwise force a width (gh#781).
75
- min-width, not width, so explicit width/flex can size the host
76
- above the floor; values below the floor remain clamped. Override
77
- via --input-min-width (e.g. 0 to opt back out) or size explicitly. */
70
+ /* ADR-0077 / spec-form-control-sizing-posture REQ-P-001 (fill, the
71
+ default): `display: block` alone gives no width once this host
72
+ becomes a flex item (row-ui, or any display:flex parent) flex
73
+ items size from content/flex-basis, not display type, and the one
74
+ child that could drive content-based sizing, [slot="text"], is
75
+ EMPTY when the input has no value (its placeholder renders via an
76
+ out-of-flow ::before deliberately, for caret positioning, see
77
+ the pseudo below that contributes zero intrinsic width). So the
78
+ host declares the fill explicitly with `width: 100%`: in block
79
+ flow this is a no-op (width:auto already fills ADR-0037's
80
+ confirmed full-width default), in flex parents it over-constrains
81
+ the line and lets the shrink algorithm split real space among
82
+ fill-state siblings (REQ-P-002), and in grid parents it's
83
+ redundant-but-harmless against the track's own default stretch.
84
+ This is a deliberate SCOPE-EXTENT exception: the family contract
85
+ (REQ-R-001) requires it, the same mechanism field-ui (bug-34) and
86
+ otp-input-ui (bug-37) already ship. No host floor survives here —
87
+ the container owns the width all the way down (REQ-F-001); the
88
+ legibility floor moves to the hug state below. */
89
+ width: 100%;
90
+ }
91
+
92
+ /* ADR-0077 / spec-form-control-sizing-posture REQ-P-003 (hug, via
93
+ [inline]): the explicit opt-in for the old shrink-to-content
94
+ behavior. ADR-0037 §2's display-flip mechanics (block → inline-block)
95
+ plus `width: fit-content` — fit-content (not the absence of the fill
96
+ rule) because a grid item is blockified/stretch-aligned by default,
97
+ so a bare `width: auto` [inline] host would still render at track
98
+ width. The gh#781/gh#1633 legibility floor moves here from the plain
99
+ :scope (REQ-F-001/REQ-F-002): it guards an empty, placeholder-only
100
+ instance from collapsing to near-zero, exactly as it always has —
101
+ just scoped to the state where the control, not the container, owns
102
+ its size. Override --input-min-width to 0 to opt a hug instance back
103
+ into full collapse. */
104
+ :scope[inline] {
105
+ display: inline-block;
106
+ width: fit-content;
78
107
  min-width: var(--input-min-width);
79
108
  }
80
109
 
@@ -8,9 +8,10 @@ version: 1
8
8
  description: Text input field with contenteditable surface. Supports prefix/suffix icons, label, form participation, and a
9
9
  `type="number"` mode that renders [+]/[-] stepper buttons, numeric input filtering, and ARIA spinbutton semantics — no native
10
10
  `<input type="number">` under the hood. Password type uses a native `<input>` (only path that still wraps native, for `-webkit-text-security`
11
- disc masking). Has a 20ch minimum width (`--input-min-width`, mirrors the native `<input>` baseline) so a bare,
12
- placeholder-only instance stays usable inside a flex row (row-ui) with no explicit sizing explicit `width`/`flex`
13
- or CSS can size the host above the floor; values below the floor remain clamped unless `--input-min-width` is lowered.
11
+ disc masking). Fills its container's available inline width by default (ADR-0077 / spec-form-control-sizing-posture)
12
+ in a flex row (row-ui) or grid track it tracks the container all the way down, with no host floor. `[inline]` opts into
13
+ the old shrink-wrap behavior and is where the 20ch minimum width (`--input-min-width`, mirrors the native `<input>`
14
+ baseline) survives, guarding a bare, placeholder-only instance from collapsing to near-zero as a hugging flex item.
14
15
  # Per ADR-0027 — primitives that programmatically create other primitives
15
16
  # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
16
17
  composes:
@@ -238,12 +239,13 @@ tokens:
238
239
  description: Override line height
239
240
  --input-min-width:
240
241
  description: Override the minimum-width floor (20ch, mirrors the native `<input>`
241
- baseline). Keeps an empty, placeholder-only instance legible when placed directly
242
- in a flex row (row-ui) with no explicit width/flex sizing the placeholder renders
243
- via an out-of-flow ::before that contributes no intrinsic width of its own, so
244
- without this floor the host collapses to near-zero as a flex item. Explicit sizing
245
- (width/flex) can grow the host above the floor but does not bypass it set to 0
246
- or another lower value to permit a narrower explicit size.
242
+ baseline), applied only in the `[inline]` hug state (ADR-0077 / spec-form-control-sizing-posture
243
+ REQ-F-001/REQ-F-002). Keeps an empty, placeholder-only `[inline]` instance legible
244
+ the placeholder renders via an out-of-flow ::before that contributes no intrinsic
245
+ width of its own, so without this floor a hugging instance collapses to near-zero.
246
+ The default (non-`[inline]`) fill state carries no floor at allthe container owns
247
+ the width all the way down. Set to 0 or another lower value to permit a narrower
248
+ `[inline]` instance.
247
249
  --input-padding:
248
250
  description: Override base padding (density-scaled)
249
251
  --input-placeholder-color:
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://adiaui.dev/a2ui/v0_9/components/Search.json",
4
4
  "title": "Search",
5
- "description": "Search input with magnifying-glass icon, clear button, and debounced search event.",
5
+ "description": "Search input with magnifying-glass icon, clear button, and debounced search event. Fills its container's available inline width by default (ADR-0077 / spec-form-control-sizing-posture) — in a flex row (row-ui) or grid track it tracks the container all the way down. `[inline]` opts into the old shrink-wrap behavior and forwards onto the internal input-ui so its 20ch legibility floor applies.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -55,6 +55,21 @@ export class UISearch extends UIFormElement {
55
55
 
56
56
  static template = () => null;
57
57
 
58
+ // ADR-0077 / spec-form-control-sizing-posture — `[inline]` is a CSS-only
59
+ // universal layout attribute (ADR-0037 §2: no yaml, no static properties
60
+ // entry on THIS host). But search-ui composes input-ui via light-DOM
61
+ // child stamping (connected()'s innerHTML below), so a plain CSS
62
+ // `:scope[inline]` on input-ui's own @scope can't reach across that
63
+ // composition boundary — the host's `[inline]` has to be forwarded onto
64
+ // the internal <input-ui> in JS. Hand-rolled `observedAttributes` +
65
+ // `attributeChangedCallback`, same shape as tags-input.class.js's `value`
66
+ // and drilldown.class.js's `path` — a non-declared-property attribute
67
+ // that still needs a JS reaction.
68
+ static get observedAttributes() {
69
+ const base = super.observedAttributes;
70
+ return base.includes('inline') ? base : [...base, 'inline'];
71
+ }
72
+
58
73
  #inputEl = null;
59
74
  #suffixEl = null;
60
75
  #timer = null;
@@ -77,6 +92,7 @@ export class UISearch extends UIFormElement {
77
92
  suffix="x-circle"
78
93
  placeholder="${this.placeholder}"
79
94
  ${this.disabled ? 'disabled' : ''}
95
+ ${this.hasAttribute('inline') ? 'inline' : ''}
80
96
  ${size ? `size="${size}"` : ''}
81
97
  ></input-ui>`;
82
98
  }
@@ -106,11 +122,38 @@ export class UISearch extends UIFormElement {
106
122
  setAttrIfChanged(this.#inputEl, 'placeholder', this.placeholder);
107
123
  if (this.disabled) setAttrIfChanged(this.#inputEl, 'disabled', '');
108
124
  else removeAttrIfPresent(this.#inputEl, 'disabled');
125
+ this.#syncInline();
109
126
 
110
127
  // Reflect value for CSS (clear button visibility)
111
128
  setAttrIfChanged(this, 'value', this.value || '');
112
129
  }
113
130
 
131
+ /**
132
+ * Forward this host's own `[inline]` (a CSS-only universal attribute,
133
+ * ADR-0037 §2 — never a declared property) onto the internal <input-ui>.
134
+ * Same idempotent-write shape as the placeholder/disabled sync above
135
+ * (gh#1755): setAttrIfChanged/removeAttrIfPresent so a byte-identical
136
+ * SSR-rendered child survives upgrade with zero attribute mutations.
137
+ */
138
+ #syncInline() {
139
+ if (!this.#inputEl) return;
140
+ if (this.hasAttribute('inline')) setAttrIfChanged(this.#inputEl, 'inline', '');
141
+ else removeAttrIfPresent(this.#inputEl, 'inline');
142
+ }
143
+
144
+ /**
145
+ * `[inline]` isn't a declared property (see `observedAttributes` above),
146
+ * so a post-connect `el.setAttribute('inline', '')` wouldn't otherwise
147
+ * trigger a re-render — render()'s effect only tracks this element's own
148
+ * reactive signals. Sync it directly here so a later toggle still
149
+ * propagates to the already-created child, same guarantee `.disabled =`
150
+ * gets for free from the declared-property/render-effect path.
151
+ */
152
+ attributeChangedCallback(name, oldValue, newValue) {
153
+ super.attributeChangedCallback(name, oldValue, newValue);
154
+ if (name === 'inline') this.#syncInline();
155
+ }
156
+
114
157
  #onInput = () => {
115
158
  this.value = this.#inputEl.value;
116
159
  this.syncValue(this.value);
@@ -9,6 +9,34 @@
9
9
 
10
10
  :scope {
11
11
  display: block;
12
+ /* ADR-0077 / spec-form-control-sizing-posture REQ-P-001/REQ-R-001
13
+ (search-ui row): fill by default, matching input-ui's own posture
14
+ (input.css). `display: block` alone gives no width once this host
15
+ becomes a flex item (row-ui) — flex items size from content, not
16
+ display type — so the fill is explicit. The inner <input-ui> (see
17
+ the `input-ui` override rule below) carries the matching
18
+ `width: 100%` already shipped on its own default :scope, so it
19
+ fills THIS now-100%-wide
20
+ host in turn — two widths, one contract. No host floor here: no
21
+ `--search-min-width` token is minted (REQ-F-003's documented
22
+ build-time choice) because the inner input's own hug-state floor
23
+ (input.css's --input-min-width, forwarded via [inline] below)
24
+ already delivers the family's legibility guarantee. */
25
+ width: 100%;
26
+ }
27
+
28
+ /* ADR-0077 / spec-form-control-sizing-posture REQ-P-003 (hug, via
29
+ [inline]): ADR-0037 §2 display-flip mechanics + `width: fit-content`
30
+ (not the mere absence of the fill rule — a grid item is blockified/
31
+ stretch-aligned by default, so hug needs the explicit rule to win
32
+ there too). search.class.js forwards this host's own `[inline]`
33
+ attribute onto the internal <input-ui> (light-DOM composition — CSS
34
+ `:scope[inline]` can't reach across that boundary on its own), so the
35
+ inner input's own :scope[inline] floor (--input-min-width, 20ch)
36
+ becomes this control's visible hug-state legibility floor. */
37
+ :scope[inline] {
38
+ display: inline-block;
39
+ width: fit-content;
12
40
  }
13
41
 
14
42
  /* Hide clear icon when empty */
@@ -7,7 +7,10 @@ status: stable
7
7
  component: Search
8
8
  category: input
9
9
  version: 1
10
- description: Search input with magnifying-glass icon, clear button, and debounced search event.
10
+ description: Search input with magnifying-glass icon, clear button, and debounced search event. Fills its
11
+ container's available inline width by default (ADR-0077 / spec-form-control-sizing-posture) — in a flex row
12
+ (row-ui) or grid track it tracks the container all the way down. `[inline]` opts into the old shrink-wrap
13
+ behavior and forwards onto the internal input-ui so its 20ch legibility floor applies.
11
14
  props:
12
15
  name:
13
16
  description: Form field name
@@ -755,7 +755,10 @@ export class UISelect extends UIFormElement {
755
755
  if (!opt) return '';
756
756
  if (opt.mark) return `<adia-mark-ui data-select-mark size="sm"></adia-mark-ui>`;
757
757
  if (opt.avatar) return `<img data-option-avatar src="${escapeHTML(opt.avatar)}" alt="" />`;
758
- if (opt.icon) return `<icon-ui name="${escapeHTML(opt.icon)}"></icon-ui>`;
758
+ // gh#1857 — data-select-icon mirrors data-select-mark: a marker the
759
+ // trigger/option-row icon-sizing rule (select.css) keys off, so this
760
+ // stamped leading icon renders at the same 1.25rem diameter as the mark.
761
+ if (opt.icon) return `<icon-ui data-select-icon name="${escapeHTML(opt.icon)}"></icon-ui>`;
759
762
  return '';
760
763
  }
761
764
 
@@ -622,3 +622,16 @@ select-ui adia-mark-ui[data-select-leading][size],
622
622
  select-ui adia-mark-ui[data-select-mark][size] {
623
623
  --adia-mark-size: 1.25rem;
624
624
  }
625
+
626
+ /* gh#1857 — stamped leading icons match the mark's 1.25rem diameter above
627
+ (visual parity between the two leading-visual kinds). The trigger's
628
+ icon-ui already carries [data-select-leading] (shared with mark/avatar,
629
+ select.class.js #syncLeading()); the option-row icon-ui carries the
630
+ parallel [data-select-icon] marker (#optionLeadHTML()). Both selectors
631
+ add the [role="option"] / tag qualifiers needed to strictly outspecify
632
+ the generic `select-ui [role="option"] icon-ui` (--a-ui-size) default
633
+ above without relying on source order. */
634
+ select-ui icon-ui[data-select-leading],
635
+ select-ui [role="option"] icon-ui[data-select-icon] {
636
+ --a-icon-size: 1.25rem;
637
+ }
@@ -14,12 +14,12 @@
14
14
  ],
15
15
  "properties": {
16
16
  "band": {
17
- "description": "Chart-band KPI layout. With a `slot=\"chart\"` child, label / value / change stack full width top to bottom and the chart forms a short full-width band between the value and the change row (the Gmail/Vercel/shadcn stat-card shape). Composes with `icon` exactly as the base layout does. No effect without a chart slot.",
17
+ "description": "Chart-band KPI layout. With a `slot=\"chart\"` child, label / value / change stack full width top to bottom and the chart forms a short full-width band between the value and the change row (the Gmail/Vercel/shadcn stat-card shape). Composes with `icon` exactly as the base layout does. Set together with `bleed` (`band bleed`) for the KPI tile: the band bleeds to the card's inline-start, inline-end, and block-end edges, and the `change` delta overlays it as a chip instead of stacking below it (ADR-0083) — the tile's `stat-ui` must be the card's last content (no trailing footer/section). No effect without a chart slot.",
18
18
  "type": "boolean",
19
19
  "default": false
20
20
  },
21
21
  "bleed": {
22
- "description": "Horizontal-bleed KPI layout. With a `slot=\"chart\"` child, the value / label / change stack on the left while the chart fills the right column at full height and bleeds to the card's top / right / bottom edges (the horizontal counterpart to a chart in a card `<section bleed>`). No effect without a chart slot.",
22
+ "description": "The chart reaches the card's edges — which edges depends on `band`: a column bleeding top/right/bottom without it, a three-edge (inline-start, inline-end, block-end) bottom band with it. With `slot=\"chart\"` alone (no `band`), the value / label / change stack on the left while the chart fills the right column at full height and bleeds to the card's top / right / bottom edges (the horizontal counterpart to a chart in a card `<section bleed>`). Set together with `band` for the full-bleed KPI tile — see `band`. No effect without a chart slot.",
23
23
  "type": "boolean",
24
24
  "default": false
25
25
  },
@@ -76,6 +76,11 @@
76
76
  "description": "Basic Stat usage",
77
77
  "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"Stat\",\n \"label\": \"Example Stat\",\n \"value\": \"\"\n }\n]",
78
78
  "name": "basic-stat"
79
+ },
80
+ {
81
+ "description": "KPI tile — band bleed with an overlaid delta chip (ADR-0083)",
82
+ "a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"Stat\",\n \"band\": true,\n \"bleed\": true,\n \"label\": \"Sessions\",\n \"value\": \"84,232\",\n \"change\": \"+57%\",\n \"trend\": \"up\",\n \"children\": [\n \"chart\"\n ]\n },\n {\n \"id\": \"chart\",\n \"component\": \"Chart\",\n \"slot\": \"chart\",\n \"type\": \"area\",\n \"x\": \"d\",\n \"y\": \"v\",\n \"noGrid\": true,\n \"noValues\": true,\n \"data\": [\n { \"d\": \"Mon\", \"v\": 12 },\n { \"d\": \"Tue\", \"v\": 18 },\n { \"d\": \"Wed\", \"v\": 15 },\n { \"d\": \"Thu\", \"v\": 27 },\n { \"d\": \"Fri\", \"v\": 22 },\n { \"d\": \"Sat\", \"v\": 31 },\n { \"d\": \"Sun\", \"v\": 29 }\n ]\n }\n]",
83
+ "name": "tile"
79
84
  }
80
85
  ],
81
86
  "keywords": [
@@ -96,7 +101,8 @@
96
101
  "telemetry",
97
102
  "observability",
98
103
  "performance",
99
- "scoreboard"
104
+ "scoreboard",
105
+ "tile"
100
106
  ],
101
107
  "name": "UIStat",
102
108
  "parts": {},
@@ -236,6 +242,27 @@
236
242
  },
237
243
  "tag": "stat-ui",
238
244
  "tokens": {
245
+ "--stat-change-chip-bg": {
246
+ "description": "Background of the `band bleed` tile's change chip. Falls back to `chart-ui`'s `--chart-chip-bg`, so an ancestor override re-themes chart axis chips and this delta chip together."
247
+ },
248
+ "--stat-change-chip-fg": {
249
+ "description": "Text color of the `band bleed` tile's change chip when no canonical `trend` is set (a set `trend` keeps painting via `--stat-up-fg` / `--stat-down-fg`). Falls back to `chart-ui`'s `--chart-chip-fg`."
250
+ },
251
+ "--stat-change-chip-font-size": {
252
+ "description": "Font size of the `band bleed` tile's change chip. Falls back to `chart-ui`'s `--chart-chip-font-size`."
253
+ },
254
+ "--stat-change-chip-pad-x": {
255
+ "description": "Inline padding of the `band bleed` tile's change chip. Falls back to `chart-ui`'s `--chart-chip-pad-x`."
256
+ },
257
+ "--stat-change-chip-pad-y": {
258
+ "description": "Block padding of the `band bleed` tile's change chip. Falls back to `chart-ui`'s `--chart-chip-pad-y`."
259
+ },
260
+ "--stat-change-chip-radius": {
261
+ "description": "Corner radius of the `band bleed` tile's change chip. Falls back to `chart-ui`'s `--chart-chip-radius`."
262
+ },
263
+ "--stat-change-inset": {
264
+ "description": "Clearance of the `band bleed` tile's change chip from the chart band's edges. Aliases the same ladder rung as `chart-ui`'s `--chart-chrome-inset`."
265
+ },
239
266
  "--stat-change-size": {
240
267
  "description": "Font size for the change badge"
241
268
  },