ui-style-kit-css 2.0.3 → 2.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +81 -15
  3. package/STYLE-MAP.md +9 -1
  4. package/dist/ui-style-kit.css +10563 -4496
  5. package/dist/ui-style-kit.min.css +7 -1
  6. package/dist/ui-style-kit.visual.css +11125 -0
  7. package/dist/ui-style-kit.visual.min.css +7 -0
  8. package/dist/ui-style-kit.with-bridge.css +10567 -4499
  9. package/dist/ui-style-kit.with-bridge.min.css +7 -1
  10. package/dist/visual/bauhaus.css +2948 -0
  11. package/dist/visual/bento.css +2967 -0
  12. package/dist/visual/brutalism.css +2731 -0
  13. package/dist/visual/cyberpunk.css +2757 -0
  14. package/dist/visual/maximalist.css +2955 -0
  15. package/dist/visual/minimal-saas.css +2946 -0
  16. package/dist/visual/neumorphism.css +2952 -0
  17. package/dist/visual/retro-glass.css +2768 -0
  18. package/dist/visual/retrofuturism.css +2939 -0
  19. package/dist/visual/tactile.css +2933 -0
  20. package/dist/visual/y2k.css +2729 -0
  21. package/docs/ECOSYSTEM.md +59 -0
  22. package/docs/NATIVE-ELEMENTS.md +52 -0
  23. package/docs/PUBLISHING.md +19 -4
  24. package/docs/TOKENS.md +13 -0
  25. package/manifest.json +436 -0
  26. package/package.json +33 -4
  27. package/styles/bauhaus.css +1 -0
  28. package/styles/bento.css +1 -0
  29. package/styles/brutalism.css +6 -5
  30. package/styles/compat-layout.css +88 -0
  31. package/styles/components.css +671 -0
  32. package/styles/content-overflow.css +292 -0
  33. package/styles/cyberpunk.css +3 -2
  34. package/styles/interactive-surface-bridge.css +5 -3
  35. package/styles/interactive-surface-theme.css +114 -0
  36. package/styles/maximalist.css +2 -1
  37. package/styles/minimal-saas.css +1 -0
  38. package/styles/native-elements.css +213 -10
  39. package/styles/neumorphism.css +1 -0
  40. package/styles/retro-glass.css +3 -2
  41. package/styles/retrofuturism.css +1 -0
  42. package/styles/tactile.css +1 -0
  43. package/styles/y2k.css +3 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  All notable changes to **UI Style Kit CSS** will be documented here.
4
4
 
5
+ ## [2.1.0] - 2026-07-20
6
+
7
+ ### Added
8
+
9
+ - Added visual-only full, minified, and focused preset entrypoints for applications that own their structural layout.
10
+ - Added `manifest.json` with preset entrypoints, themes, modes, composed class capabilities, deprecated structural suffixes, and native-part ownership classifications.
11
+ - 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`.
12
+ - Added CSS Tree AST contract coverage for generated class retention, export targets, cascade layers, and bridge ownership boundaries.
13
+ - Added exact `@axe-core/playwright` representative scans and a sharded 990-combination UI matrix across presets, themes, modes, and browser engines.
14
+ - Added manifest-backed demo control data and real `showModal()` dialog coverage for themed native backdrop behavior.
15
+
16
+ ### Changed
17
+
18
+ - Rebuilt combined output around the ordered `theme_colors`, `native_elements`, `components`, `presets`, and `compat_layout` layers.
19
+ - Moved shared component foundations into `components` and isolated retained prefixed structural helpers in `compat_layout`.
20
+ - Formatted generated CSS through Lightning CSS and pinned `css-tree` exactly for deterministic AST partitioning.
21
+ - Increased native and custom checkbox/radio targets to the WCAG 2.2 24px minimum and tightened demo accessibility semantics.
22
+
23
+ ### Deprecated
24
+
25
+ - Deprecated the `page`, `container`, `section`, `grid`, `stack`, `cluster`, and `split` prefixed structural suffixes for removal in v3.
26
+ - Deprecated the stateful `interactive-surface-bridge` and `with-bridge` integration paths while preserving their existing behavior.
27
+
28
+ ## [2.0.4] - 2026-07-20
29
+
30
+ ### Added
31
+
32
+ - Restored the exported `content-overflow.css` shared layer for standalone style imports.
33
+ - Added rendered regression coverage for long text containment and responsive orientation checks across mobile, tablet, desktop, portrait, and landscape viewports.
34
+
35
+ ### Changed
36
+
37
+ - Replaced the regex minifier with exactly pinned Lightning CSS parsing while preserving generated bundle banners and entry points.
38
+ - Aligned package metadata, generated bundle banners, demo structured data, and release documentation to `2.0.4`.
39
+ - Reconnected every standalone UI preset to the shared content-overflow layer so long words, URLs, and token strings stay inside layout wrappers.
40
+
41
+ ### Fixed
42
+
43
+ - Preserved descendant combinators and required whitespace around binary operators in generated `calc()` values.
44
+ - Moved `::file-selector-button` and `::backdrop` outside `:where()` arguments so Chromium accepts and applies the native rules.
45
+ - Routed Brutalism, Cyberpunk, Y2K, and Retro Glass status foregrounds through their documented `on-success`, `on-warning`, and `on-danger` tokens.
46
+
5
47
  ## [2.0.3] - 2026-07-11
6
48
 
7
49
  ### Added
package/README.md CHANGED
@@ -9,7 +9,7 @@ It is separate from, but complementary to, **Interactive Surface CSS**. Use **UI
9
9
 
10
10
  ## Current Release
11
11
 
12
- `v2.0.3` is the current v2 patch release. It keeps the `v2.0.1` shared color-scheme and native-element model, adds a demo theme-override workbench, improves copyable documentation examples, and refreshes release metadata without changing the CSS API.
12
+ `v2.1.0` introduces a visual-only public API, a machine-readable capability manifest, a five-layer build architecture, and a canonical token-only Interactive Surface theme bridge. 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
 
@@ -44,13 +44,31 @@ flowchart TB
44
44
 
45
45
  The demo page documents this flow directly: it shows computed RGB color tokens for the active theme and mode, lets developers edit them live, and copies the exact override block to drop into an app stylesheet.
46
46
 
47
+ ## Ecosystem compatibility
48
+
49
+ These libraries stay standalone, but the current aligned set is:
50
+
51
+ | Library | Aligned version | Owns |
52
+ |---|---:|---|
53
+ | `ui-style-kit-css@2.1.0` | staged source target | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
54
+ | `interactive-surface-css@1.5.0` | published release | interaction-state primitives, surface behavior, state layers, and input affordances |
55
+ | `layout-style-css@2.1.0` | staged source target | structural wrappers, grids, sections, app shells, and layout recipes |
56
+
57
+ UI Style Kit `2.1.0` and Layout Style `2.1.0` remain staged source targets until their release approvals complete. Interactive Surface `1.5.0` is the released companion state engine for this upgrade path.
58
+
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.
60
+
61
+ For import order, ownership boundaries, and adoption paths, see the [Ecosystem guide](docs/ECOSYSTEM.md).
62
+
47
63
  ## Features
48
64
 
49
65
  - 11 UI style systems
50
66
  - 10 shared color schemes
51
67
  - `light`, `dark`, and `contrast` modes
52
68
  - Combined CSS bundle and per-style production imports
53
- - Shared `theme-colors.css` scheme layer and `native-elements.css` fallback layer for all UI systems
69
+ - Visual-only full and focused entrypoints for consumer-owned layouts
70
+ - Machine-readable `manifest.json` preset, theme, mode, class, and native-part capabilities
71
+ - Shared `theme-colors.css`, `native-elements.css`, and `content-overflow.css` layers for all UI systems
54
72
  - Scoped native HTML element coverage, including semantic containers and inline text elements
55
73
  - Visible `:focus-visible` defaults
56
74
  - Skip-link and visually-hidden helpers per style prefix
@@ -58,7 +76,8 @@ The demo page documents this flow directly: it shows computed RGB color tokens f
58
76
  - Theme-driven card, panel, control, page-background, and spinner defaults
59
77
  - Visible tooltip classes and native `[role="tooltip"]` styling inside each UI scope
60
78
  - Font-family override variables for body, headings, controls, and mono text
61
- - Optional bridge tokens, visible state layers, and an opt-in bridge bundle for `interactive-surface-css`
79
+ - Canonical token-and-paint-only theme bridge for `interactive-surface-css/state-core.css`
80
+ - Deprecated stateful bridge exports retained unchanged for backward compatibility
62
81
  - Reduced-motion, high-contrast, forced-colors, and print support
63
82
  - Cascade-layered CSS for easier consumer overrides
64
83
  - No runtime dependencies
@@ -77,11 +96,20 @@ Use a single style import for production apps that use one visual system:
77
96
  import "ui-style-kit-css/minimal-saas.css";
78
97
  ```
79
98
 
80
- In `v2.0.3`, standalone style files import the shared color-scheme layer from `styles/theme-colors.css` and the shared native-element fallback layer from `styles/native-elements.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:
99
+ The existing focused entrypoints retain the v2 structural helpers. New integrations that already own layout should use a focused visual-only entrypoint:
100
+
101
+ ```js
102
+ import "ui-style-kit-css/visual/minimal-saas.css";
103
+ ```
104
+
105
+ Use `ui-style-kit-css/visual.css` for runtime preset switching without the deprecated prefixed layout selectors. The exact preset, theme, mode, class, and native-part capability matrix is available from `ui-style-kit-css/manifest.json`.
106
+
107
+ 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:
81
108
 
82
109
  ```js
83
110
  import "ui-style-kit-css/theme-colors.css";
84
111
  import "ui-style-kit-css/native-elements.css";
112
+ import "ui-style-kit-css/content-overflow.css";
85
113
  import "ui-style-kit-css/minimal-saas.css";
86
114
  ```
87
115
 
@@ -98,7 +126,15 @@ Use the full bundle when users need to switch `data-ui` systems at runtime:
98
126
  import "ui-style-kit-css/dist/ui-style-kit.css";
99
127
  ```
100
128
 
101
- Use the opt-in bridge bundle when you want UI Style Kit CSS and the Interactive Surface bridge in one import:
129
+ For the canonical state-only integration, import visual paint, the token-only theme bridge, and Interactive Surface state mechanics as separate ownership layers:
130
+
131
+ ```js
132
+ import "ui-style-kit-css/visual/minimal-saas.css";
133
+ import "ui-style-kit-css/interactive-surface-theme.css";
134
+ import "interactive-surface-css/state-core.css";
135
+ ```
136
+
137
+ The older stateful bridge and combined bundle remain available for compatibility, but they are deprecated and have not been redirected to the token-only behavior:
102
138
 
103
139
  ```js
104
140
  import "ui-style-kit-css/with-bridge.css";
@@ -111,7 +147,7 @@ import "ui-style-kit-css/minimal-saas.css";
111
147
  import "ui-style-kit-css/interactive-surface-bridge";
112
148
  ```
113
149
 
114
- 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.
150
+ The default and visual-only bundles do **not** include either bridge. That keeps UI paint independent and prevents accidental duplicate bridge imports.
115
151
 
116
152
  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.
117
153
 
@@ -119,24 +155,27 @@ When the bridge is attached, add `.interactive-surface` to interactable elements
119
155
 
120
156
  | Import | Raw | Gzip | Best for |
121
157
  |---|---:|---:|---|
122
- | `ui-style-kit-css/dist/ui-style-kit.min.css` | ~269 KB | ~34 KB | Runtime UI-system switchers and demos |
123
- | `ui-style-kit-css/with-bridge.css` | ~331 KB | ~39 KB | Runtime switchers plus Interactive Surface bridge |
158
+ | `ui-style-kit-css/dist/ui-style-kit.min.css` | ~299 KB | ~39 KB | Compatible runtime UI-system switchers and demos |
159
+ | `ui-style-kit-css/visual.min.css` | ~290 KB | ~38 KB | Runtime visual switching with consumer-owned layout |
160
+ | `ui-style-kit-css/with-bridge.css` | ~369 KB | ~44 KB | Deprecated runtime switcher plus stateful bridge |
124
161
  | `ui-style-kit-css/theme-colors.css` | ~25 KB | ~3 KB | Shared color schemes for standalone style imports |
125
- | `ui-style-kit-css/native-elements.css` | ~13 KB | ~2 KB | Shared native HTML fallback styling |
162
+ | `ui-style-kit-css/native-elements.css` | ~21 KB | ~3 KB | Shared native HTML fallback styling |
163
+ | `ui-style-kit-css/content-overflow.css` | ~7 KB | ~1 KB | Shared long-text containment for standalone style imports |
164
+ | `ui-style-kit-css/interactive-surface-theme.css` | ~8 KB | ~1 KB | Canonical token-and-paint bridge for Interactive Surface state core |
126
165
  | Single style imports | ~26-28 KB | ~5-6 KB | Production apps with one visual system |
127
166
 
128
167
  ## CDN usage
129
168
 
130
- After publishing to NPM:
169
+ Use the latest published NPM package:
131
170
 
132
171
  ```html
133
172
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@latest/dist/ui-style-kit.min.css" />
134
173
  ```
135
174
 
136
- For production, pin a version:
175
+ For production, pin the exact approved release rather than relying on `latest`:
137
176
 
138
177
  ```html
139
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.0.3/dist/ui-style-kit.min.css" />
178
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.1.0/dist/ui-style-kit.min.css" />
140
179
  ```
141
180
 
142
181
  ## Basic usage
@@ -209,6 +248,8 @@ contrast
209
248
 
210
249
  `styles/native-elements.css` owns the shared native selectors under `[data-ui][data-theme][data-mode]`. Each style system maps those selectors to its visual identity through `--usk-native-*` tokens, so native controls keep the same coverage while inheriting each preset's radius, shadows, borders, typography, and color surfaces.
211
250
 
251
+ `styles/content-overflow.css` owns the shared text containment contract under `[data-ui][data-theme][data-mode]`. It keeps headings, paragraphs, links, table cells, controls, badges, nav links, and common UI wrappers from widening their parent wrapper when content contains long words, hashes, URLs, or copyable tokens.
252
+
212
253
  The shared native layer covers common native elements, including:
213
254
 
214
255
  - semantic containers: `main`, `section`, `header`, `footer`, `nav`, `article`, `aside`, `address`
@@ -226,6 +267,8 @@ CSS improves accessibility presentation, but it cannot guarantee accessibility b
226
267
 
227
268
  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`.
228
269
 
270
+ For the full native-element and subpart support contract, including platform-owned picker and popup limitations, see [Native Element Coverage](docs/NATIVE-ELEMENTS.md).
271
+
229
272
  ## Loading states
230
273
 
231
274
  Every style includes theme-driven spinner utilities:
@@ -272,6 +315,8 @@ Override `--<prefix>-font-sans` and `--<prefix>-font-display` for the broadest c
272
315
 
273
316
  The library styles are wrapped in `@layer ui-style-kit.*`. Unlayered consumer CSS can override the library without specificity fights:
274
317
 
318
+ 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.
319
+
275
320
  ```css
276
321
  [data-ui="minimal-saas"][data-theme="arctic-indigo"] {
277
322
  --saas-radius-md: 1rem;
@@ -296,6 +341,7 @@ The color model is intentionally small: shared `--usk-*` RGB variables feed pref
296
341
  ```txt
297
342
  ui-style-kit-css/
298
343
  package.json
344
+ manifest.json
299
345
  README.md
300
346
  LICENSE
301
347
  CHANGELOG.md
@@ -303,11 +349,19 @@ ui-style-kit-css/
303
349
  dist/
304
350
  ui-style-kit.css
305
351
  ui-style-kit.min.css
352
+ ui-style-kit.visual.css
353
+ ui-style-kit.visual.min.css
306
354
  ui-style-kit.with-bridge.css
307
355
  ui-style-kit.with-bridge.min.css
356
+ visual/
357
+ minimal-saas.css
358
+ ...
308
359
  styles/
309
360
  theme-colors.css
310
361
  native-elements.css
362
+ components.css
363
+ compat-layout.css
364
+ content-overflow.css
311
365
  minimal-saas.css
312
366
  bento.css
313
367
  maximalist.css
@@ -319,6 +373,7 @@ ui-style-kit-css/
319
373
  cyberpunk.css
320
374
  y2k.css
321
375
  retro-glass.css
376
+ interactive-surface-theme.css
322
377
  interactive-surface-bridge.css
323
378
  docs/
324
379
  TOKENS.md
@@ -332,10 +387,21 @@ The checked-in demo, favicon pack, and social preview image stay in the reposito
332
387
 
333
388
  ```bash
334
389
  npm run check
390
+ npm run test:e2e
391
+ npm run test:axe
392
+ npm run test:visual
393
+ npm run test:matrix
335
394
  npm run pack:dry-run
336
395
  ```
337
396
 
338
- `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.
397
+ `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.
398
+
399
+ ## v2.1.0 Architecture Notes
400
+
401
+ - Prefer `visual.css` or `visual/<preset>.css` when Layout Style CSS or application CSS owns structure.
402
+ - Existing root, minified, focused preset, `interactive-surface-bridge`, and `with-bridge` entrypoints preserve their v2 behavior.
403
+ - Treat `page`, `container`, `section`, `grid`, `stack`, `cluster`, and `split` suffixes as deprecated compatibility helpers; their removal is reserved for v3.
404
+ - Prefer `interactive-surface-theme.css` with `interactive-surface-css/state-core.css`. The old stateful bridge exports remain deprecated compatibility paths.
339
405
 
340
406
  ## v2.0.1 Migration Notes
341
407
 
@@ -343,8 +409,8 @@ The `v2.0.1` release line removes duplicated per-UI color-scheme blocks. Color s
343
409
 
344
410
  - Use `--usk-*-rgb` when defining or overriding a color scheme.
345
411
  - Continue using prefixed functional tokens such as `--saas-primary`, `--neo-card-bg`, and `--rg-on-primary` inside components.
346
- - Import `ui-style-kit-css/theme-colors.css` and `ui-style-kit-css/native-elements.css` before standalone style files if your bundler does not follow CSS `@import`.
347
- - 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.
412
+ - 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`.
413
+ - 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.
348
414
 
349
415
  ## License
350
416
 
package/STYLE-MAP.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## UI systems
4
4
 
5
- Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallback selectors are defined once in `styles/native-elements.css`. Each UI system file imports both shared layers, aliases `--usk-*` RGB roles back to its prefix, and maps `--usk-native-*` tokens into the preset's visual identity.
5
+ 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.
6
6
 
7
7
  | UI style | `data-ui` | Prefix | File |
8
8
  |---|---:|---:|---|
@@ -32,6 +32,14 @@ Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallbac
32
32
 
33
33
  Native selectors stay generic under `[data-ui][data-theme][data-mode]`. Presets only provide token mappings such as `--usk-native-surface`, `--usk-native-radius`, and `--usk-native-shadow`, which avoids repeating the same fieldset, table, dialog, details, form, and semantic-element rules in every UI file.
34
34
 
35
+ ## Shared overflow layer
36
+
37
+ | Purpose | Import |
38
+ |---|---|
39
+ | Shared long-text containment for UI wrappers and controls | `styles/content-overflow.css` |
40
+
41
+ The overflow layer keeps headings, paragraphs, links, table cells, controls, badges, nav links, and common layout wrappers from widening the page when content includes long tokens or URLs.
42
+
35
43
  ## Bridge bundle
36
44
 
37
45
  | Purpose | Import |