srcdev-nuxt-components 9.6.9 → 9.6.10

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.
@@ -196,6 +196,11 @@ The ledger can't see items 6c, 9, 10, 11 and 14, so check those by hand.
196
196
  - A toast, banner or status message doesn't `.focus()` itself when it appears (rule
197
197
  `consumer/a11y-no-focus-steal.md`).
198
198
  - Focus is visible (`:focus-visible`, not a suppressed outline) on anything focusable.
199
+ - `aria-invalid` is bound as `fieldHasError ? 'true' : undefined`, never the boolean itself:
200
+ `:aria-invalid="fieldHasError"` renders `aria-invalid="false"` on every valid field
201
+ (`InputTextarea`, `ToggleSwitch`, fixed 2026-10-16). Same for an empty `aria-describedby`.
202
+ - A checkbox drawn as an on/off switch has `role="switch"`, and its decorative track is
203
+ `aria-hidden` (`ToggleSwitch`, 2026-10-16).
199
204
  - Live-updating or auto-advancing content (carousels, marquees, auto-dismissing toasts) has a
200
205
  way to pause it, per WCAG 2.2.2 — a visible control, or pause-on-hover/focus at minimum.
201
206
  - `prefers-reduced-motion` is respected for any animation that isn't purely decorative.
@@ -275,6 +280,17 @@ The ledger can't see items 6c, 9, 10, 11 and 14, so check those by hand.
275
280
  defaults to its min-content width and overflows a narrow column (`MultipleCheckboxes`,
276
281
  2026-10-16).
277
282
  - Element ids come from `useId()`, never from data values (rule `consumer/ids-from-useid.md`).
283
+ - A wrapper passes its child only props the child declares. Anything else falls through as an
284
+ HTML attribute on the child's root: `InputTextField` put `label="…"` and
285
+ `error-message="…"` on `.input-text-wrapper` (fixed 2026-10-16). Check the child root's
286
+ attributes in a test.
287
+ - A control styled with `all: unset` restores the UA defaults it depends on. On a `<textarea>`
288
+ that reset `white-space: pre-wrap` (inherited, so it took the page's `normal`); set
289
+ `white-space: pre-wrap` and `overflow-wrap: anywhere` explicitly (`InputTextarea`,
290
+ 2026-10-16).
291
+ - A state rule (`[data-checked]`) written at the root level loses to deeper nested base rules
292
+ for the same element. Nest it in the element's own block as `.root[data-x] & { … }`
293
+ (`ToggleSwitch`, 2026-10-16; `css-nesting-conventions.md`).
278
294
  - Step buttons and any other script that changes a number round to the step's precision
279
295
  (`toFixed`), clamp to `min`/`max`, and compare limits with `<=`/`>=`, never `===` (0.1 steps
280
296
  drift to 0.30000000000000004, and an overshoot past an `===` check never disables the button).
@@ -60,7 +60,12 @@ stripping `Core`.
60
60
  control name).
61
61
  2. `sed` the old names across `app/`, `.claude/`, `.vscode/`, `MIGRATION.md` and `CLAUDE.md`:
62
62
  component names, `import` paths, story titles/`*StoryArgs` interfaces, `describe()` names, and the
63
- root/base DOM class (update `CONSUMER-STYLING.md` and test selectors that use it).
63
+ root/base DOM class (update `CONSUMER-STYLING.md` and test selectors that use it). Match on word
64
+ boundaries (`\bToggleSwitchCore\b`): a bare `ToggleSwitchCore` also matched inside
65
+ `TripleToggleSwitchCore` and rewrote its history notes (2026-10-16). Leave out the gitignored
66
+ `.claude/settings.json` (its old allowlist entries match too) and any dated "Renamed"/"Changed"
67
+ notes, and rename a removed wrapper by hand before the bulk pass, or `XWithLabel` → `XField`
68
+ turns `XWithLabelInline` into a name that never existed.
64
69
  3. Add a "Renamed YYYY-MM-DD" note at the top of the skill doc listing old → new names and classes.
65
70
  4. Grep consumer repos (`/check-component-usage`) and **list** the files/lines that use the old
66
71
  names (in the private consumer notes, never in this repo). Don't edit the consumers yet: they pin
@@ -28,7 +28,8 @@ This project uses **native CSS nesting** (W3C CSS Nesting spec), not Sass/SCSS.
28
28
  **Why it silently fails**: esbuild converts `&__heading` to `:is(__heading)`, which tries to match an HTML element named `__heading`. No such element exists, so the styles are never applied. There's no error — just missing styles.
29
29
 
30
30
  The build will show this warning:
31
- ```
31
+
32
+ ```text
32
33
  ▲ [WARNING] Cannot use type selector "__heading" directly after nesting selector "&" [css-syntax-error]
33
34
  CSS nesting syntax does not allow the "&" selector to come before a type selector.
34
35
  ```
@@ -119,3 +120,23 @@ If you see `&__` or `&-` in a `.vue` `<style lang="css">` block, it's Sass synta
119
120
 
120
121
  - `CLAUDE.md` → Styling Methodology section
121
122
  - `css-grid-max-width-gutters.md` — example of correct native nesting in a grid utility
123
+
124
+ ## State rules and specificity
125
+
126
+ Nesting multiplies specificity: `.toggle-switch { .toggle-switch-wrapper { .toggle-switch-track
127
+ { .toggle-switch-thumb {} } } }` compiles to a four-class selector. A state rule written once at
128
+ the root level, `.toggle-switch[data-checked] .toggle-switch-thumb`, has only three, so the base
129
+ rule wins and the state never shows. Nest the state rule inside the element's own block instead:
130
+
131
+ ```css
132
+ .toggle-switch-thumb {
133
+ translate: 0 0;
134
+
135
+ .toggle-switch[data-checked] & {
136
+ translate: 100% 0;
137
+ }
138
+ }
139
+ ```
140
+
141
+ `.toggle-switch[data-checked] &` adds the root's class and attribute on top of the full nested
142
+ selector, so it always outranks the base rule.
@@ -130,5 +130,5 @@ ancestor of the label).
130
130
 
131
131
  `:style-class-passthrough` (string or string array) adds classes to the `<label>`. It's only
132
132
  reachable when you render `InputLabel` directly in a custom field wrapper: the library's wrappers
133
- pass their own hook classes (`input-text-label`, `input-number-label`, `input-select-label`,
134
- `input-textarea-label`, `input-switch-label`) and don't forward yours.
133
+ pass their own hook classes (`input-text-label`, `input-number-label`, `input-range-label`, `input-select-label`,
134
+ `input-textarea-label`, `toggle-switch-label`) and don't forward yours.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.6.9",
4
+ "version": "9.6.10",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",