ui-style-kit-css 2.0.4 → 2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  All notable changes to **UI Style Kit CSS** will be documented here.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [2.2.0] - 2026-08-09
8
+
9
+ ### Added
10
+
11
+ - Added the public 12-token shared semantic producer contract and its machine-readable manifest inventory for companion and third-party consumers.
12
+ - Implemented the manifest-backed semantic component API with 29 exact `.ui-*` selectors, context-constrained `data-ui-variant` values, and unchanged-markup runtime switching across all 11 presets.
13
+ - Added a persistent semantic component demo whose DOM nodes and classes remain stable through every preset switch.
14
+ - Documented native `<dialog>` as the neutral modal/dialog fallback without inventing `.ui-modal` or `.ui-dialog` selectors.
15
+
16
+ ### Changed
17
+
18
+ - Clarified that generated default, visual, with-bridge, and focused entrypoints provide semantic aliases, while raw preset sources, partial extras, and deprecated structural aliases remain prefixed compatibility or advanced APIs.
19
+ - Preserved `.ui-spinner` and `.ui-tooltip` as retained hooks while generating the other 27 selectors from existing preset declarations.
20
+
21
+ ## [2.1.0] - 2026-07-20
22
+
23
+ ### Added
24
+
25
+ - Added visual-only full, minified, and focused preset entrypoints for applications that own their structural layout.
26
+ - Added `manifest.json` with preset entrypoints, themes, modes, composed class capabilities, deprecated structural suffixes, and native-part ownership classifications.
27
+ - Added a canonical `interactive-surface-theme.css` bridge that supplies public tokens and paint while leaving interaction mechanics to `interactive-surface-css/state-core.css`.
28
+ - Added CSS Tree AST contract coverage for generated class retention, export targets, cascade layers, and bridge ownership boundaries.
29
+ - Added exact `@axe-core/playwright` representative scans and a sharded 990-combination UI matrix across presets, themes, modes, and browser engines.
30
+ - Added manifest-backed demo control data and real `showModal()` dialog coverage for themed native backdrop behavior.
31
+
32
+ ### Changed
33
+
34
+ - Rebuilt combined output around the ordered `theme_colors`, `native_elements`, `components`, `presets`, and `compat_layout` layers.
35
+ - Moved shared component foundations into `components` and isolated retained prefixed structural helpers in `compat_layout`.
36
+ - Formatted generated CSS through Lightning CSS and pinned `css-tree` exactly for deterministic AST partitioning.
37
+ - Increased native and custom checkbox/radio targets to the WCAG 2.2 24px minimum and tightened demo accessibility semantics.
38
+
39
+ ### Deprecated
40
+
41
+ - Deprecated the `page`, `container`, `section`, `grid`, `stack`, `cluster`, and `split` prefixed structural suffixes for removal in v3.
42
+ - Deprecated the stateful `interactive-surface-bridge` and `with-bridge` integration paths while preserving their existing behavior.
43
+
5
44
  ## [2.0.4] - 2026-07-20
6
45
 
7
46
  ### Added
package/README.md CHANGED
@@ -9,13 +9,13 @@ It is separate from, but complementary to, **Interactive Surface CSS**. Use **UI
9
9
 
10
10
  ## Current Release
11
11
 
12
- `v2.0.4` is the current v2 correctness patch. It adds parser-based minification, restores valid native file-button and modal-backdrop styling, routes status foregrounds through semantic `on-*` tokens, and retains the shared content-overflow and responsive coverage work without changing the CSS API.
12
+ `v2.2.0` adds the shared 12-token semantic producer contract and a manifest-backed 29-selector `.ui-*` component API across all 11 presets. Existing default and focused entrypoints remain compatible, including their deprecated structural helpers, and parser-based minification remains exactly pinned.
13
13
 
14
14
  [Showcase website](https://foscat.github.io/ui-style-kit-css/)
15
15
 
16
16
  ## How the library fits together
17
17
 
18
- UI Style Kit CSS owns visual identity: themes, component paint, native HTML styling, and the prefixed class API. It can be used alone, or paired with the sibling libraries when a project needs structural layout primitives or richer interaction-state behavior.
18
+ UI Style Kit CSS owns visual identity: themes, semantic `.ui-*` component paint, native HTML styling, and the advanced prefixed class API. It can be used alone, or paired with the sibling libraries when a project needs structural layout primitives or richer interaction-state behavior.
19
19
 
20
20
  ```mermaid
21
21
  flowchart LR
@@ -50,12 +50,18 @@ These libraries stay standalone, but the current aligned set is:
50
50
 
51
51
  | Library | Aligned version | Owns |
52
52
  |---|---:|---|
53
- | `ui-style-kit-css@2.0.4` | source release target | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
54
- | `interactive-surface-css@1.3.0` | latest published sibling | interaction-state primitives, surface behavior, state layers, and input affordances |
55
- | `layout-style-css@1.1.2` | latest published sibling | structural wrappers, grids, sections, app shells, and layout recipes |
53
+ | `ui-style-kit-css@2.2.0` | current package version | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
54
+ | `interactive-surface-css@1.6.0` | published release | interaction-state primitives, surface behavior, state layers, and input affordances |
55
+ | `layout-style-css@3.0.1` | published release | structural wrappers, grids, sections, app shells, and layout recipes |
56
+
57
+ The current combination is `ui-style-kit-css@2.2.0`, `interactive-surface-css@1.6.0`, and `layout-style-css@3.0.1`. UI Style Kit `2.2.0` is the current package version, and the release pipeline treats it as the active candidate only while that exact npm version is absent. Interactive Surface `1.6.0` and Layout Style `3.0.1` are published releases. The validated minimum remains `ui-style-kit-css@2.1.0`, `interactive-surface-css@1.5.0`, and `layout-style-css@3.0.0`.
56
58
 
57
59
  Use one, two, or all three depending on the project. UI Style Kit does not require the sibling libraries, and the optional bridge only maps shared `--usk-*` roles into Interactive Surface tokens when consumers import it.
58
60
 
61
+ Every UI Style Kit visual or preset entrypoint also publishes a small, fully typed `--ui-*` semantic handshake. These tokens let companion libraries and third-party themes share paint, control geometry, focus, and default motion without depending on preset-specific names. They are optional fallbacks for consumers: package-specific tokens still take precedence, and standalone packages keep their existing legacy and literal defaults when the handshake is absent. See the [token contract](docs/TOKENS.md#shared-semantic-token-handshake) for the exact 12-token inventory.
62
+
63
+ A third-party producer can load its semantic token stylesheet before `interactive-surface-css/standalone-preset.css`. UI Style Kit's visual entrypoints support the same portable composition; keep the canonical theme bridge with `state-core.css` when specialized variant, level, and icon-role mappings are required.
64
+
59
65
  For import order, ownership boundaries, and adoption paths, see the [Ecosystem guide](docs/ECOSYSTEM.md).
60
66
 
61
67
  ## Features
@@ -64,6 +70,8 @@ For import order, ownership boundaries, and adoption paths, see the [Ecosystem g
64
70
  - 10 shared color schemes
65
71
  - `light`, `dark`, and `contrast` modes
66
72
  - Combined CSS bundle and per-style production imports
73
+ - Visual-only full and focused entrypoints for consumer-owned layouts
74
+ - Machine-readable `manifest.json` preset, theme, mode, class, and native-part capabilities
67
75
  - Shared `theme-colors.css`, `native-elements.css`, and `content-overflow.css` layers for all UI systems
68
76
  - Scoped native HTML element coverage, including semantic containers and inline text elements
69
77
  - Visible `:focus-visible` defaults
@@ -72,7 +80,8 @@ For import order, ownership boundaries, and adoption paths, see the [Ecosystem g
72
80
  - Theme-driven card, panel, control, page-background, and spinner defaults
73
81
  - Visible tooltip classes and native `[role="tooltip"]` styling inside each UI scope
74
82
  - Font-family override variables for body, headings, controls, and mono text
75
- - Optional bridge tokens, visible state layers, and an opt-in bridge bundle for `interactive-surface-css`
83
+ - Canonical token-and-paint-only theme bridge for `interactive-surface-css/state-core.css`
84
+ - Deprecated stateful bridge exports retained for backward compatibility
76
85
  - Reduced-motion, high-contrast, forced-colors, and print support
77
86
  - Cascade-layered CSS for easier consumer overrides
78
87
  - No runtime dependencies
@@ -83,50 +92,69 @@ For import order, ownership boundaries, and adoption paths, see the [Ecosystem g
83
92
  npm install ui-style-kit-css
84
93
  ```
85
94
 
95
+ ### v2 distribution defaults
96
+
97
+ The default bundle remains unchanged for all v2 releases. The root package and canonical `.` export resolve to the readable `dist/ui-style-kit.css`; the canonical `./min.css` export resolves to the minified `dist/ui-style-kit.min.css`. The focused `visual/<preset>.css` entrypoints remain available for applications fixed to one visual system.
98
+
99
+ `ui-style-kit-css/visual.css` is the recommended entrypoint when consumers own layout. Making `visual.css` the package default remains only a v3 proposal; no v2 export is redirected as part of that proposal.
100
+
101
+ The `./css`, `./css.css`, and `./min` exports are redundant deprecated compatibility aliases. They remain available throughout v2 with their existing targets: `./css` and `./css.css` match `.`, while `./min` matches `./min.css`. New integrations should use the canonical exports.
102
+
86
103
  ## Import
87
104
 
88
- Use a single style import for production apps that use one visual system:
105
+ Use the generated default bundle for semantic components that can switch across every preset at runtime:
89
106
 
90
107
  ```js
91
- import "ui-style-kit-css/minimal-saas.css";
108
+ import "ui-style-kit-css";
92
109
  ```
93
110
 
94
- In `v2.0.4`, standalone style files import the shared color-scheme layer from `styles/theme-colors.css`, the shared native-element fallback layer from `styles/native-elements.css`, and the shared content-overflow layer from `styles/content-overflow.css`. Bundlers that understand CSS `@import` will resolve them automatically. If your build pipeline does not resolve CSS imports, import the shared dependencies before the style file:
111
+ Use `ui-style-kit-css/visual.css` for the same 29-selector semantic runtime API without the deprecated prefixed layout selectors. The generated default, visual, and with-bridge bundles all support all 11 `data-ui` values.
112
+
113
+ Applications fixed to one preset can use a generated focused visual entrypoint. It includes semantic aliases scoped to that preset only:
95
114
 
96
115
  ```js
97
- import "ui-style-kit-css/theme-colors.css";
98
- import "ui-style-kit-css/native-elements.css";
99
- import "ui-style-kit-css/content-overflow.css";
100
- import "ui-style-kit-css/minimal-saas.css";
116
+ import "ui-style-kit-css/visual/minimal-saas.css";
101
117
  ```
102
118
 
103
- The longer `styles/*` paths are also exported:
119
+ The exact preset, theme, mode, class, and native-part capability matrix is available from `ui-style-kit-css/manifest.json`.
120
+
121
+ ### Advanced prefixed and raw imports
122
+
123
+ The standalone preset exports and longer `styles/*` paths remain advanced compatibility entrypoints. They preserve the prefixed API and do not promise multi-preset semantic switching:
104
124
 
105
125
  ```js
126
+ import "ui-style-kit-css/minimal-saas.css";
127
+ // Equivalent raw source export:
106
128
  import "ui-style-kit-css/styles/minimal-saas.css";
107
- import "ui-style-kit-css/styles/cyberpunk.css";
108
129
  ```
109
130
 
110
- Use the full bundle when users need to switch `data-ui` systems at runtime:
131
+ In `v2.1.0`, legacy standalone style files continue to import the shared color-scheme, native-element fallback, and content-overflow layers. Bundlers that understand CSS `@import` resolve them automatically. If your build pipeline does not resolve CSS imports, import the shared dependencies before the style file:
111
132
 
112
133
  ```js
113
- import "ui-style-kit-css/dist/ui-style-kit.css";
134
+ import "ui-style-kit-css/theme-colors.css";
135
+ import "ui-style-kit-css/native-elements.css";
136
+ import "ui-style-kit-css/content-overflow.css";
137
+ import "ui-style-kit-css/minimal-saas.css";
114
138
  ```
115
139
 
116
- Use the opt-in bridge bundle when you want UI Style Kit CSS and the Interactive Surface bridge in one import:
140
+ The explicit distribution path is also available for runtime switching:
117
141
 
118
142
  ```js
119
- import "ui-style-kit-css/with-bridge.css";
143
+ import "ui-style-kit-css/dist/ui-style-kit.css";
120
144
  ```
121
145
 
122
- Or import the bridge by itself when you are using a single style file:
146
+ For the canonical all-three integration, import visual paint, the token-only theme bridge, Interactive Surface state mechanics, and Layout structure in this order:
123
147
 
124
148
  ```js
125
- import "ui-style-kit-css/minimal-saas.css";
126
- import "ui-style-kit-css/interactive-surface-bridge";
149
+ import "ui-style-kit-css/visual.css";
150
+ import "ui-style-kit-css/interactive-surface-theme.css";
151
+ import "interactive-surface-css/state-core.css";
152
+ import "layout-style-css";
127
153
  ```
128
154
 
129
- The default full bundle does **not** include the bridge. That keeps `dist/ui-style-kit.css` focused on UI systems and prevents accidental duplicate bridge imports.
155
+ The older stateful bridge and combined bundle remain public, deprecated compatibility paths. See the [bridge migration guide](docs/BRIDGE-MIGRATION.md) when upgrading an existing v2 integration.
156
+
157
+ The default and visual-only bundles do **not** include either bridge. That keeps UI paint independent and prevents accidental duplicate bridge imports.
130
158
 
131
159
  When the bridge is attached, add `.interactive-surface` to interactable elements and use `data-surface-variant` plus `data-surface-level="1"`, `"2"`, or `"3"` to opt into the visible rest, hover, active, and focus treatments. The bridge inherits from shared `--usk-*` roles instead of duplicating per-theme or per-preset token maps.
132
160
 
@@ -134,11 +162,13 @@ When the bridge is attached, add `.interactive-surface` to interactable elements
134
162
 
135
163
  | Import | Raw | Gzip | Best for |
136
164
  |---|---:|---:|---|
137
- | `ui-style-kit-css/dist/ui-style-kit.min.css` | ~271 KB | ~35 KB | Runtime UI-system switchers and demos |
138
- | `ui-style-kit-css/with-bridge.css` | ~339 KB | ~40 KB | Runtime switchers plus Interactive Surface bridge |
165
+ | `ui-style-kit-css/dist/ui-style-kit.min.css` | ~357 KB | ~44 KB | Compatible runtime UI-system switchers and demos |
166
+ | `ui-style-kit-css/visual.min.css` | ~348 KB | ~43 KB | Runtime visual switching with consumer-owned layout |
167
+ | `ui-style-kit-css/with-bridge.css` | ~431 KB | ~52 KB | Deprecated runtime switcher plus stateful bridge |
139
168
  | `ui-style-kit-css/theme-colors.css` | ~25 KB | ~3 KB | Shared color schemes for standalone style imports |
140
- | `ui-style-kit-css/native-elements.css` | ~13 KB | ~2 KB | Shared native HTML fallback styling |
169
+ | `ui-style-kit-css/native-elements.css` | ~22 KB | ~4 KB | Shared native HTML fallback styling |
141
170
  | `ui-style-kit-css/content-overflow.css` | ~7 KB | ~1 KB | Shared long-text containment for standalone style imports |
171
+ | `ui-style-kit-css/interactive-surface-theme.css` | ~8 KB | ~1 KB | Canonical token-and-paint bridge for Interactive Surface state core |
142
172
  | Single style imports | ~26-28 KB | ~5-6 KB | Production apps with one visual system |
143
173
 
144
174
  ## CDN usage
@@ -149,25 +179,23 @@ Use the latest published NPM package:
149
179
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@latest/dist/ui-style-kit.min.css" />
150
180
  ```
151
181
 
152
- For production today, pin the latest published patch. Update this pin to `2.0.4` after that release is published:
182
+ For production, pin the exact approved release rather than relying on `latest`:
153
183
 
154
184
  ```html
155
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.0.3/dist/ui-style-kit.min.css" />
185
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.2.0/dist/ui-style-kit.min.css" />
156
186
  ```
157
187
 
158
188
  ## Basic usage
159
189
 
160
190
  ```html
161
191
  <body data-ui="minimal-saas" data-theme="arctic-indigo" data-mode="light">
162
- <main class="saas-page">
163
- <section class="saas-container saas-stack">
164
- <article class="saas-card">
165
- <h1 class="saas-title">UI Style Kit CSS</h1>
166
- <p class="saas-subtitle">Switch UI systems, themes, and modes with attributes.</p>
167
- <button class="saas-button saas-button-primary">Primary Action</button>
168
- <span class="saas-spinner" aria-label="Loading"></span>
169
- </article>
170
- </section>
192
+ <main>
193
+ <article class="ui-card">
194
+ <h1>UI Style Kit CSS</h1>
195
+ <p>Switch UI systems, themes, and modes without changing component classes.</p>
196
+ <button class="ui-button" data-ui-variant="primary">Primary Action</button>
197
+ <span class="ui-spinner" role="status" aria-label="Loading"></span>
198
+ </article>
171
199
  </main>
172
200
  </body>
173
201
  ```
@@ -180,6 +208,47 @@ document.body.dataset.theme = "midnight-gold";
180
208
  document.body.dataset.mode = "dark";
181
209
  ```
182
210
 
211
+ This changes the semantic components' visual preset without replacing their DOM nodes or rewriting their `.ui-*` classes.
212
+
213
+ ## Semantic component API
214
+
215
+ `manifest.json#semanticComponentApi` is the authoritative specification for the implemented generic component API. Its 29 selectors keep the same class names while `data-ui` changes across all 11 presets. `implementationStatus` records the two retained `.ui-spinner` and `.ui-tooltip` hooks, the 27 generated semantic aliases, and an empty pending set.
216
+
217
+ | Role | Generic selectors | Switching coverage |
218
+ |---|---|---|
219
+ | Buttons | `.ui-button`, `.ui-icon-button` | all 11 presets |
220
+ | Card | `.ui-card` | all 11 presets |
221
+ | Forms | `.ui-field`, `.ui-label`, `.ui-help-text`, `.ui-input`, `.ui-select`, `.ui-textarea` | all 11 presets |
222
+ | Choice controls | `.ui-check`, `.ui-check-control`, `.ui-radio`, `.ui-radio-control`, `.ui-switch`, `.ui-switch-track`, `.ui-switch-thumb` | all 11 presets |
223
+ | Badge | `.ui-badge` | all 11 presets |
224
+ | Alert | `.ui-alert`, `.ui-alert-title`, `.ui-alert-body` | all 11 presets |
225
+ | Navigation | `.ui-nav`, `.ui-nav-link` | all 11 presets |
226
+ | Table | `.ui-table`, `.ui-table-wrap` | all 11 presets |
227
+ | Progress | `.ui-progress`, `.ui-progress-bar` | all 11 presets |
228
+ | Toolbar | `.ui-toolbar` | all 11 presets |
229
+ | Existing generic hooks | `.ui-spinner`, `.ui-tooltip` | all 11 presets |
230
+
231
+ The only new attribute is context-constrained `data-ui-variant`. Omit it for the neutral treatment.
232
+
233
+ | Selector | `data-ui-variant` values |
234
+ |---|---|
235
+ | `.ui-button` | `primary`, `secondary`, `danger`, `ghost` |
236
+ | `.ui-badge` | `primary`, `secondary`, `success`, `warning`, `danger` |
237
+ | `.ui-alert` | `success`, `warning`, `danger` |
238
+
239
+ ```html
240
+ <body data-ui="minimal-saas" data-theme="arctic-indigo" data-mode="light">
241
+ <button class="ui-button" data-ui-variant="primary">Save</button>
242
+ <article class="ui-card">...</article>
243
+ </body>
244
+ ```
245
+
246
+ Modal and dialog roles deliberately use a neutral native `<dialog>` fallback. There is no `.ui-modal` or `.ui-dialog` selector. The semantic API also does not define `data-ui-state`, `data-ui-size`, or `data-ui-placement`; continue to use native and ARIA state hooks, `.is-active`, and `[data-ui-tooltip-anchor]` where supported.
247
+
248
+ Preset-prefixed classes remain supported compatibility and advanced APIs. Partial preset extras, typography and paint utilities, surface/size/placement helpers, shape and accessibility utilities, and the deprecated `page`, `container`, `section`, `grid`, `stack`, `cluster`, and `split` structural aliases remain prefix-bound rather than entering the generic contract.
249
+
250
+ For example, a fixed Minimal SaaS integration may continue to use `<button class="saas-button saas-button-primary">`. Prefer `.ui-button` plus `data-ui-variant="primary"` when markup must survive runtime preset changes.
251
+
183
252
  ## UI systems
184
253
 
185
254
  | UI style | `data-ui` | Class prefix | Best for |
@@ -244,6 +313,8 @@ CSS improves accessibility presentation, but it cannot guarantee accessibility b
244
313
 
245
314
  Semantic text utilities such as `saas-text-primary`, `saas-text-warning`, and `saas-text-danger` use the active theme palette directly. Filled UI such as buttons, badges, and busy states use compact `on-*` aliases like `--saas-on-primary` and `--saas-on-danger`.
246
315
 
316
+ For the full native-element and subpart support contract, including platform-owned picker and popup limitations, see [Native Element Coverage](docs/NATIVE-ELEMENTS.md).
317
+
247
318
  ## Loading states
248
319
 
249
320
  Every style includes theme-driven spinner utilities:
@@ -290,6 +361,8 @@ Override `--<prefix>-font-sans` and `--<prefix>-font-display` for the broadest c
290
361
 
291
362
  The library styles are wrapped in `@layer ui-style-kit.*`. Unlayered consumer CSS can override the library without specificity fights:
292
363
 
364
+ The declared order is `theme_colors`, `native_elements`, `components`, `presets`, then `compat_layout`. Visual-only entrypoints leave the final compatibility layer empty of deprecated structural selectors.
365
+
293
366
  ```css
294
367
  [data-ui="minimal-saas"][data-theme="arctic-indigo"] {
295
368
  --saas-radius-md: 1rem;
@@ -314,6 +387,7 @@ The color model is intentionally small: shared `--usk-*` RGB variables feed pref
314
387
  ```txt
315
388
  ui-style-kit-css/
316
389
  package.json
390
+ manifest.json
317
391
  README.md
318
392
  LICENSE
319
393
  CHANGELOG.md
@@ -321,11 +395,18 @@ ui-style-kit-css/
321
395
  dist/
322
396
  ui-style-kit.css
323
397
  ui-style-kit.min.css
398
+ ui-style-kit.visual.css
399
+ ui-style-kit.visual.min.css
324
400
  ui-style-kit.with-bridge.css
325
401
  ui-style-kit.with-bridge.min.css
402
+ visual/
403
+ minimal-saas.css
404
+ ...
326
405
  styles/
327
406
  theme-colors.css
328
407
  native-elements.css
408
+ components.css
409
+ compat-layout.css
329
410
  content-overflow.css
330
411
  minimal-saas.css
331
412
  bento.css
@@ -338,6 +419,7 @@ ui-style-kit-css/
338
419
  cyberpunk.css
339
420
  y2k.css
340
421
  retro-glass.css
422
+ interactive-surface-theme.css
341
423
  interactive-surface-bridge.css
342
424
  docs/
343
425
  TOKENS.md
@@ -351,10 +433,21 @@ The checked-in demo, favicon pack, and social preview image stay in the reposito
351
433
 
352
434
  ```bash
353
435
  npm run check
436
+ npm run test:e2e
437
+ npm run test:axe
438
+ npm run test:visual
439
+ npm run test:matrix
354
440
  npm run pack:dry-run
355
441
  ```
356
442
 
357
- `npm run check` rebuilds the bundles, runs stylelint, verifies package metadata, checks the documented class API, and validates contrast for base text/link pairs and filled component `on-*` pairs. Optional Playwright visual smoke tests are available through `npm run test:visual` after installing dev dependencies.
443
+ `npm run check` rebuilds the bundles, runs stylelint, verifies package metadata, checks the documented class API, and validates contrast for base text/link pairs and filled component `on-*` pairs. Browser release gates add all-engine Playwright coverage, representative Axe scans, curated visual smoke checks, and the sharded `11 presets x 10 themes x 3 modes x 3 engines` matrix.
444
+
445
+ ## v2.1.0 Architecture Notes
446
+
447
+ - Prefer `visual.css` or `visual/<preset>.css` when Layout Style CSS or application CSS owns structure.
448
+ - Existing root, minified, focused preset, `interactive-surface-bridge`, and `with-bridge` entrypoints preserve their v2 behavior.
449
+ - Treat `page`, `container`, `section`, `grid`, `stack`, `cluster`, and `split` suffixes as deprecated compatibility helpers; their removal is reserved for v3.
450
+ - Prefer `interactive-surface-theme.css` with `interactive-surface-css/state-core.css`. The old stateful bridge exports remain deprecated compatibility paths.
358
451
 
359
452
  ## v2.0.1 Migration Notes
360
453
 
@@ -363,7 +456,7 @@ The `v2.0.1` release line removes duplicated per-UI color-scheme blocks. Color s
363
456
  - Use `--usk-*-rgb` when defining or overriding a color scheme.
364
457
  - Continue using prefixed functional tokens such as `--saas-primary`, `--neo-card-bg`, and `--rg-on-primary` inside components.
365
458
  - Import `ui-style-kit-css/theme-colors.css`, `ui-style-kit-css/native-elements.css`, and `ui-style-kit-css/content-overflow.css` before standalone style files if your bundler does not follow CSS `@import`.
366
- - Keep using `ui-style-kit-css/interactive-surface-bridge` or `ui-style-kit-css/with-bridge.css` for the opt-in bridge. The bridge now inherits shared `--usk-*` roles and exposes three `data-surface-level` visual states while the default bundle remains bridge-free.
459
+ - Existing v2.0.1 integrations can keep using `ui-style-kit-css/interactive-surface-bridge` or `ui-style-kit-css/with-bridge.css`; those stateful compatibility paths are deprecated in v2.1.0. New integrations should compose the visual, theme-bridge, and state-core entrypoints documented above.
367
460
 
368
461
  ## License
369
462
 
package/STYLE-MAP.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # UI Style Kit CSS Style Map
2
2
 
3
+ ## Recommended runtime API
4
+
5
+ Lead with stable semantic classes when an interface can switch visual presets:
6
+
7
+ ```html
8
+ <article class="ui-card">
9
+ <button class="ui-button" data-ui-variant="primary">Continue</button>
10
+ <span class="ui-badge" data-ui-variant="success">Ready</span>
11
+ </article>
12
+ ```
13
+
14
+ Changing only the ancestor `data-ui` value restyles that markup across all 11 presets in the generated default, visual, and with-bridge bundles. A generated `visual/<preset>.css` focused entrypoint supplies the same semantic aliases for its selected preset only. Raw `styles/*` and standalone preset exports remain advanced prefixed APIs and do not promise multi-preset semantic switching.
15
+
3
16
  ## UI systems
4
17
 
5
18
  Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallback selectors are defined once in `styles/native-elements.css`. Long-text containment rules are defined once in `styles/content-overflow.css`. Each UI system file imports all shared layers, aliases `--usk-*` RGB roles back to its prefix, and maps `--usk-native-*` tokens into the preset's visual identity.
@@ -66,3 +79,26 @@ The bridge inherits from shared `--usk-*` color roles, then applies `.interactiv
66
79
  - `light`
67
80
  - `dark`
68
81
  - `contrast`
82
+
83
+ ## Semantic component contract
84
+
85
+ The machine-readable source of truth is `manifest.json#semanticComponentApi`. Its 29 implemented generic selectors map only to source suffixes with 11-of-11 composed preset coverage. The `implementationStatus` section records `.ui-spinner` and `.ui-tooltip` as retained hooks, the other 27 selectors as generated aliases, and no pending selectors.
86
+
87
+ | Role | Generic selector -> current source suffix |
88
+ |---|---|
89
+ | Button | `.ui-button` -> `button`; `.ui-icon-button` -> `icon-button` |
90
+ | Card | `.ui-card` -> `card` |
91
+ | Form | `.ui-field` -> `field`; `.ui-label` -> `label`; `.ui-help-text` -> `help-text`; `.ui-input` -> `input`; `.ui-select` -> `select`; `.ui-textarea` -> `textarea` |
92
+ | Choice control | `.ui-check` -> `check`; `.ui-check-control` -> `check-control`; `.ui-radio` -> `radio`; `.ui-radio-control` -> `radio-control`; `.ui-switch` -> `switch`; `.ui-switch-track` -> `switch-track`; `.ui-switch-thumb` -> `switch-thumb` |
93
+ | Badge | `.ui-badge` -> `badge` |
94
+ | Alert | `.ui-alert` -> `alert`; `.ui-alert-title` -> `alert-title`; `.ui-alert-body` -> `alert-body` |
95
+ | Navigation | `.ui-nav` -> `nav`; `.ui-nav-link` -> `nav-link` |
96
+ | Table | `.ui-table` -> `table`; `.ui-table-wrap` -> `table-wrap` |
97
+ | Progress | `.ui-progress` -> `progress`; `.ui-progress-bar` -> `progress-bar` |
98
+ | Toolbar | `.ui-toolbar` -> `toolbar` |
99
+ | Loading | `.ui-spinner` -> `spinner` |
100
+ | Tooltip | `.ui-tooltip` -> `tooltip` |
101
+
102
+ `data-ui-variant` is the only new attribute. Omission means neutral. `.ui-button` accepts `primary`, `secondary`, `danger`, and `ghost`; `.ui-badge` accepts `primary`, `secondary`, `success`, `warning`, and `danger`; `.ui-alert` accepts `success`, `warning`, and `danger`.
103
+
104
+ Modal and dialog roles retain native `<dialog>` as their one neutral fallback; `.ui-modal` and `.ui-dialog` are not defined. Preset-prefixed classes remain supported for compatibility and advanced use. Partial preset extras and the seven deprecated structural suffixes stay out of the semantic contract.