@aceshooting/lyra-ui 18.1.0 → 18.2.0

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.
@@ -115,6 +115,18 @@ omittedCount, truncatedLabelCount, truncated }` result for the latest assignment
115
115
  roving tabindex: a 100-row interactive legend contributes 100 tab stops, exactly as a 100-series
116
116
  `lr-chart` legend does. Each interactive row also grows to the shared `--lr-icon-button-size`
117
117
  hit-area floor (WCAG 2.5.8), which the panel's existing `max-block-size` and scrolling contain.
118
+ - `legendControlRole: 'button' | 'checkbox' = 'button'` (attribute `legend-control-role`,
119
+ reflected) — how each `legendInteractive` row's toggle presents itself to assistive tech; inert
120
+ while `legendInteractive` is unset, exactly like the toggle itself. `'button'` is byte-identical
121
+ to every legend rendered before this property existed: `<button aria-pressed>`. `'checkbox'`
122
+ renders the SAME `<button>` element with its implicit role overridden to `role="checkbox"` and
123
+ `aria-checked` in place of `aria-pressed` — the swatch, the label, the click handler and the
124
+ platform's own Enter/Space activation are unchanged, so `hiddenCategories`, the cancelable
125
+ `lr-map-legend-toggle` veto, `group` sections and `legendCollapsible` all compose with either
126
+ role. `aria-checked` tracks the same visibility flag `aria-pressed` does, inverted from
127
+ `hiddenCategories`: a hidden category renders `aria-checked="false"`. Prefer `'checkbox'` when the
128
+ legend reads as a checklist of independent show/hide toggles; prefer the `'button'` default when
129
+ it reads as a set of filtering actions. An unsupported value normalizes back to `'button'`.
118
130
  - `legendCollapsible: boolean = false` (attribute `legend-collapsible`, reflected) — opt-in: renders
119
131
  a `legend-disclosure` `button` inside the panel that collapses the key down to its header, so a
120
132
  large legend stops permanently covering part of the map. Unset, the panel renders exactly what it
@@ -509,10 +521,13 @@ container in the tree, so `legend` withholds `aria-controls` rather than leaving
509
521
  idref.
510
522
  Under `legendInteractive`, a row carrying a `value` wraps its swatch and label in a
511
523
  `legend-toggle` `button` with `aria-pressed` rendered as the literal `"true"`/`"false"` — never
512
- omitted, because a missing attribute reports "not a toggle button" rather than "unpressed". The
513
- button's accessible name is its own visible label (caller-supplied data, so deliberately not
514
- localized), scoped by the legend's own localized group name; no `aria-label` restates the state,
515
- which would make assistive tech announce it twice. A hidden row's button additionally carries the
524
+ omitted, because a missing attribute reports "not a toggle button" rather than "unpressed". Setting
525
+ `legendControlRole="checkbox"` renders the SAME `button` with `role="checkbox"` and `aria-checked`
526
+ (also always the literal `"true"`/`"false"`) in place of `aria-pressed`, and nothing else about the
527
+ row changes. The button's accessible name is its own visible label (caller-supplied data, so
528
+ deliberately not localized), scoped by the legend's own localized group name; no `aria-label`
529
+ restates the state, which would make assistive tech announce it twice. A hidden row's button
530
+ additionally carries the
516
531
  `legend-toggle-hidden` token — state lives in the part name, so `::part(legend-toggle-hidden)` is a
517
532
  reachable hook — and dims only its `aria-hidden` swatch while re-colouring the label through the
518
533
  quiet text token, so the label keeps AA contrast rather than fading with the whole button. In
package/llms/shared.md CHANGED
@@ -1177,7 +1177,12 @@ code. See each control's own reference page for its exact pair.
1177
1177
  | `--lr-icon-button-size-scope` | one subtree | the wrapper you want affected |
1178
1178
  | `--lr-icon-button-size` | one element | the icon-only control itself |
1179
1179
 
1180
- `--lr-theme-icon-button-size` wins wherever both ancestor inputs are set. `--lr-icon-button-size`
1180
+ `--lr-icon-button-size-scope` wins wherever both ancestor inputs are set — the narrower scope
1181
+ takes precedence, and it has to: the shipped `design-tokens.css` declares
1182
+ `--lr-theme-icon-button-size` on `:root`, and a `var()` chain only falls through for a property
1183
+ that is unset *everywhere*, not merely shadowed nearer the element. Reading the theme tier first
1184
+ therefore made this knob inert for anyone loading that stylesheet (a real 18.1.0 defect, fixed in
1185
+ 18.2.0). `--lr-icon-button-size`
1181
1186
  is **element-scoped on purpose** and is not a wrapper knob: every component re-declares it on its
1182
1187
  own host so the touch-target floor can apply per element, so a value set on a wrapper is replaced
1183
1188
  at the first component in between and never reaches anything nested inside one. That behaviour is
package/llms/tokens.md CHANGED
@@ -55,8 +55,10 @@ look arbitrary rather than systematic. Reach through a subtree with `--lr-theme-
55
55
  `--lr-theme-otp-input-segment-size`, or `--lr-theme-popover-viewport-clamp` instead.
56
56
  `--lr-icon-button-size` additionally has a dedicated subtree-scoped input,
57
57
  `--lr-icon-button-size-scope`, which an ancestor rule can set without reaching for the
58
- application-wide `--lr-theme-icon-button-size`; the theme input still wins over it when both
59
- are set. Every other `--lr-<component>-*` token including
58
+ application-wide `--lr-theme-icon-button-size`. The subtree input wins where both are set,
59
+ because the shipped `design-tokens.css` declares the theme tier on `:root` and a var() chain
60
+ only falls through for a property that is unset everywhere. Every other `--lr-<component>-*`
61
+ token — including
60
62
  the rest of `lr-icon-button`'s own (`-radius`, `-background`, `-color`, `-border`, and their
61
63
  `-hover`/`-active` variants) — is not re-declared anywhere in the shared layer and inherits
62
64
  normally from an ancestor.
@@ -178,7 +180,7 @@ normally from an ancestor.
178
180
  | `--lr-graph-cat-7` | `--lr-theme-graph-cat-7` | `#52d6e8` | dark: `var(--lr-theme-graph-cat-7, #79e2ef)`<br>forcedColors: `Highlight` |
179
181
  | `--lr-graph-cat-8` | `--lr-theme-graph-cat-8` | `#c9d1d9` | dark: `var(--lr-theme-graph-cat-8, #e4e7eb)`<br>forcedColors: `LinkText` |
180
182
  | `--lr-hover-brightness` | `--lr-theme-hover-brightness` | `1.08` | — |
181
- | `--lr-icon-button-size` | `--lr-theme-icon-button-size` | `var(--lr-icon-button-size-scope, 2.5rem)` | — |
183
+ | `--lr-icon-button-size` | `--lr-theme-icon-button-size` | `2.5rem` | — |
182
184
  | `--lr-layer-base` | `--lr-theme-z-index-base` | `0` | — |
183
185
  | `--lr-layer-content` | `--lr-theme-z-index-content` | `1` | — |
184
186
  | `--lr-layer-dropdown` | `--lr-theme-z-index-dropdown` | `900` | — |
package/llms-full.txt CHANGED
@@ -1229,7 +1229,12 @@ code. See each control's own reference page for its exact pair.
1229
1229
  | `--lr-icon-button-size-scope` | one subtree | the wrapper you want affected |
1230
1230
  | `--lr-icon-button-size` | one element | the icon-only control itself |
1231
1231
 
1232
- `--lr-theme-icon-button-size` wins wherever both ancestor inputs are set. `--lr-icon-button-size`
1232
+ `--lr-icon-button-size-scope` wins wherever both ancestor inputs are set — the narrower scope
1233
+ takes precedence, and it has to: the shipped `design-tokens.css` declares
1234
+ `--lr-theme-icon-button-size` on `:root`, and a `var()` chain only falls through for a property
1235
+ that is unset *everywhere*, not merely shadowed nearer the element. Reading the theme tier first
1236
+ therefore made this knob inert for anyone loading that stylesheet (a real 18.1.0 defect, fixed in
1237
+ 18.2.0). `--lr-icon-button-size`
1233
1238
  is **element-scoped on purpose** and is not a wrapper knob: every component re-declares it on its
1234
1239
  own host so the touch-target floor can apply per element, so a value set on a wrapper is replaced
1235
1240
  at the first component in between and never reaches anything nested inside one. That behaviour is
@@ -27360,6 +27365,18 @@ omittedCount, truncatedLabelCount, truncated }` result for the latest assignment
27360
27365
  roving tabindex: a 100-row interactive legend contributes 100 tab stops, exactly as a 100-series
27361
27366
  `lr-chart` legend does. Each interactive row also grows to the shared `--lr-icon-button-size`
27362
27367
  hit-area floor (WCAG 2.5.8), which the panel's existing `max-block-size` and scrolling contain.
27368
+ - `legendControlRole: 'button' | 'checkbox' = 'button'` (attribute `legend-control-role`,
27369
+ reflected) — how each `legendInteractive` row's toggle presents itself to assistive tech; inert
27370
+ while `legendInteractive` is unset, exactly like the toggle itself. `'button'` is byte-identical
27371
+ to every legend rendered before this property existed: `<button aria-pressed>`. `'checkbox'`
27372
+ renders the SAME `<button>` element with its implicit role overridden to `role="checkbox"` and
27373
+ `aria-checked` in place of `aria-pressed` — the swatch, the label, the click handler and the
27374
+ platform's own Enter/Space activation are unchanged, so `hiddenCategories`, the cancelable
27375
+ `lr-map-legend-toggle` veto, `group` sections and `legendCollapsible` all compose with either
27376
+ role. `aria-checked` tracks the same visibility flag `aria-pressed` does, inverted from
27377
+ `hiddenCategories`: a hidden category renders `aria-checked="false"`. Prefer `'checkbox'` when the
27378
+ legend reads as a checklist of independent show/hide toggles; prefer the `'button'` default when
27379
+ it reads as a set of filtering actions. An unsupported value normalizes back to `'button'`.
27363
27380
  - `legendCollapsible: boolean = false` (attribute `legend-collapsible`, reflected) — opt-in: renders
27364
27381
  a `legend-disclosure` `button` inside the panel that collapses the key down to its header, so a
27365
27382
  large legend stops permanently covering part of the map. Unset, the panel renders exactly what it
@@ -27754,10 +27771,13 @@ container in the tree, so `legend` withholds `aria-controls` rather than leaving
27754
27771
  idref.
27755
27772
  Under `legendInteractive`, a row carrying a `value` wraps its swatch and label in a
27756
27773
  `legend-toggle` `button` with `aria-pressed` rendered as the literal `"true"`/`"false"` — never
27757
- omitted, because a missing attribute reports "not a toggle button" rather than "unpressed". The
27758
- button's accessible name is its own visible label (caller-supplied data, so deliberately not
27759
- localized), scoped by the legend's own localized group name; no `aria-label` restates the state,
27760
- which would make assistive tech announce it twice. A hidden row's button additionally carries the
27774
+ omitted, because a missing attribute reports "not a toggle button" rather than "unpressed". Setting
27775
+ `legendControlRole="checkbox"` renders the SAME `button` with `role="checkbox"` and `aria-checked`
27776
+ (also always the literal `"true"`/`"false"`) in place of `aria-pressed`, and nothing else about the
27777
+ row changes. The button's accessible name is its own visible label (caller-supplied data, so
27778
+ deliberately not localized), scoped by the legend's own localized group name; no `aria-label`
27779
+ restates the state, which would make assistive tech announce it twice. A hidden row's button
27780
+ additionally carries the
27761
27781
  `legend-toggle-hidden` token — state lives in the part name, so `::part(legend-toggle-hidden)` is a
27762
27782
  reachable hook — and dims only its `aria-hidden` swatch while re-colouring the label through the
27763
27783
  quiet text token, so the label keeps AA contrast rather than fading with the whole button. In
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "18.1.0",
3
+ "version": "18.2.0",
4
4
  "description": "Free, independent Lit web components: an open-source alternative to Shoelace and Web Awesome with accessible forms, dashboards, charts, and agent UI.",
5
5
  "keywords": [
6
6
  "web-components",