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.
@@ -0,0 +1,20 @@
1
+ # Deprecated Interactive Surface Bridge Migration
2
+
3
+ The canonical integration for new applications is `ui-style-kit-css/visual.css`, `ui-style-kit-css/interactive-surface-theme.css`, `interactive-surface-css/state-core.css`, and `layout-style-css` in that order.
4
+
5
+ `interactive-surface-bridge` and `with-bridge` remain public v2 compatibility exports. They are deprecated because they include stateful bridge behavior that is no longer part of the canonical token-and-paint boundary. They are retained unchanged in v2 and will not be redirected to the token-only bridge.
6
+
7
+ The shared semantic path is separate from migration: a third-party token producer may load before `interactive-surface-css/standalone-preset.css`, but it does not reproduce UI Style Kit's specialized variant and level mappings. Existing bridge consumers should follow the canonical imports above when migrating.
8
+
9
+ ## Retained deprecated imports
10
+
11
+ Existing integrations may continue to use either exported stateful path while scheduling their migration:
12
+
13
+ ```js
14
+ import "ui-style-kit-css/interactive-surface-bridge";
15
+ import "ui-style-kit-css/interactive-surface-bridge.css";
16
+ import "ui-style-kit-css/with-bridge";
17
+ import "ui-style-kit-css/with-bridge.css";
18
+ ```
19
+
20
+ Do not combine a deprecated bridge import with `interactive-surface-theme.css`; select the legacy stateful path during migration or the canonical token-only path for new integration work.
package/docs/ECOSYSTEM.md CHANGED
@@ -2,15 +2,46 @@
2
2
 
3
3
  UI Style Kit CSS is the visual layer in the three-library CSS ecosystem. It can run alone, but it also has stable integration points for Interactive Surface CSS and Layout Style CSS.
4
4
 
5
+ `ecosystem-compatibility.json` is the authoritative source for supported ranges, validated combinations, canonical imports, and deprecated bridge metadata. UI Style Kit owns this file temporarily until a dedicated ecosystem fixture repository is introduced.
6
+
7
+ Its companion source records pin the exact published merge revisions used by integration and release verification. Update those immutable pins whenever a later companion release changes the validated contract.
8
+
9
+ ## Remote Validation Sequence
10
+
11
+ The pinned Interactive Surface and Layout commits are published merge objects. Before a UI branch or pull request is expected to validate, verify each pinned SHA remains fetchable from its GitHub repository. The CI and publish workflows perform the same remote-object preflight, so they intentionally fail rather than silently substituting a mutable branch or stale registry artifact when either companion revision is unavailable.
12
+
5
13
  ## Aligned Versions
6
14
 
7
15
  | Library | Current aligned version | Owns |
8
16
  |---|---:|---|
9
- | `ui-style-kit-css@2.0.4` | source release target | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
10
- | `interactive-surface-css@1.3.0` | latest published sibling | interaction-state primitives, surface behavior, state layers, and input affordances |
11
- | `layout-style-css@1.1.2` | latest published sibling | structural wrappers, grids, sections, app shells, and layout recipes |
17
+ | `ui-style-kit-css@2.2.0` | current package version | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
18
+ | `interactive-surface-css@1.6.0` | published release | interaction-state primitives, surface behavior, state layers, and input affordances |
19
+ | `layout-style-css@3.0.1` | published release | structural wrappers, grids, sections, app shells, and layout recipes |
20
+
21
+ 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`.
22
+
23
+ ## Layout-to-visual pairing matrix
24
+
25
+ Pairings are recommendations, never dependencies. `data-ly-layout`, `data-ui`, `data-theme`, and `data-mode` remain independently selectable; `layout-style-css/personalities.json` publishes the machine-readable source.
26
+
27
+ | Layout personality | Visual guidance |
28
+ | --- | --- |
29
+ | Minimal SaaS, Bento, Maximalist, Bauhaus, Tactile, Neumorphism, Retrofuturism, Brutalism, Cyberpunk, Y2K, Retro Glass | Native UI Style Kit match with the same identifier |
30
+ | F-pattern, Z-pattern, Split Screen, Mondrian | Any UI Style Kit visual preset; these are structure-only layouts |
31
+ | Synthwave | Recommend `cyberpunk` or `retrofuturism`; Layout's rendered demo verifies each preset while keeping the synthwave layout selected |
12
32
 
13
- `ui-style-kit-css@2.0.4` is prepared in source. Until it is published, production CDN examples should stay pinned to the latest published patch.
33
+ ## Shared semantic theming
34
+
35
+ UI Style Kit's complete, visual, and focused visual entrypoints produce the 12 package-neutral `--ui-*` control tokens under `[data-ui][data-theme][data-mode]`. A third-party theme may produce the same contract under its own scope; consumers do not need UI Style Kit-specific `--usk-*` values. Package-specific values remain first in consumer fallback chains, shared semantic values come second, and legacy values or literals remain last.
36
+
37
+ A third-party producer can theme Interactive Surface's complete standalone entry point without a package-specific adapter:
38
+
39
+ ```js
40
+ import "third-party-theme/tokens.css";
41
+ import "interactive-surface-css/standalone-preset.css";
42
+ ```
43
+
44
+ UI Style Kit can use the same portable path by loading `ui-style-kit-css/visual.css` before `interactive-surface-css/standalone-preset.css`. That composition provides the semantic control baseline. Use the canonical `interactive-surface-theme.css` plus `state-core.css` path when an application needs UI Style Kit's specialized variant, level, icon-role, and state-opacity mappings.
14
45
 
15
46
  ## Adoption Paths
16
47
 
@@ -24,19 +55,19 @@ import "ui-style-kit-css/minimal-saas.css";
24
55
 
25
56
  ### Use two
26
57
 
27
- Pair UI Style Kit with Interactive Surface CSS when controls need the sibling interaction-state primitives. Import Interactive Surface first, then the visual style and the optional bridge.
58
+ Pair UI Style Kit with Interactive Surface CSS when controls need the sibling interaction-state primitives. Import UI paint first, its public token bridge second, and the sibling state core third.
28
59
 
29
60
  ```js
30
- import "interactive-surface-css/interactive-surface.css";
31
- import "ui-style-kit-css/minimal-saas.css";
32
- import "ui-style-kit-css/interactive-surface-bridge";
61
+ import "ui-style-kit-css/visual/minimal-saas.css";
62
+ import "ui-style-kit-css/interactive-surface-theme.css";
63
+ import "interactive-surface-css/state-core.css";
33
64
  ```
34
65
 
35
66
  Pair UI Style Kit with Layout Style CSS when the app already has interaction behavior but needs structural wrappers, grids, and sections.
36
67
 
37
68
  ```js
69
+ import "ui-style-kit-css/visual/minimal-saas.css";
38
70
  import "layout-style-css";
39
- import "ui-style-kit-css/minimal-saas.css";
40
71
  ```
41
72
 
42
73
  ### Use all three
@@ -44,9 +75,10 @@ import "ui-style-kit-css/minimal-saas.css";
44
75
  Use all three libraries when a project needs structural layout, visual styling, and interaction-state behavior in separate layers.
45
76
 
46
77
  ```js
78
+ import "ui-style-kit-css/visual.css";
79
+ import "ui-style-kit-css/interactive-surface-theme.css";
80
+ import "interactive-surface-css/state-core.css";
47
81
  import "layout-style-css";
48
- import "interactive-surface-css/interactive-surface.css";
49
- import "ui-style-kit-css/with-bridge.css";
50
82
  ```
51
83
 
52
84
  ## Ownership Boundaries
@@ -55,4 +87,4 @@ import "ui-style-kit-css/with-bridge.css";
55
87
  - Interactive Surface CSS owns interaction-state semantics, input affordances, state layers, and surface behavior.
56
88
  - Layout Style CSS owns structural wrappers, layout recipes, grids, app shells, and section composition.
57
89
 
58
- The bridge does not make Interactive Surface a dependency of UI Style Kit. It only maps shared `--usk-*` roles to `--interactive-surface-*` tokens when consumers opt into the bridge import.
90
+ The canonical theme bridge does not make Interactive Surface a dependency of UI Style Kit. It only maps shared `--usk-*` roles to `--interactive-surface-*` tokens and provides paint; `state-core.css` continues to own interaction mechanics. The older `interactive-surface-bridge` and `with-bridge` exports are deprecated compatibility paths whose stateful behavior remains unchanged.
@@ -0,0 +1,52 @@
1
+ # Native Element Coverage
2
+
3
+ UI Style Kit uses a hybrid-native policy: it themes safe element boxes and exposed subparts, uses `accent-color` and `color-scheme` as fallbacks, and leaves inaccessible browser popups to the platform.
4
+
5
+ ## Classification
6
+
7
+ | Classification | Elements and surfaces |
8
+ |---|---|
9
+ | Fully themed | `html`, `body`, `main`, `section`, `header`, `footer`, `nav`, `article`, `aside`, `address`, `form`, `fieldset`, `legend`, `label`, `input`, `textarea`, `select`, `button`, `table`, `caption`, `thead`, `tbody`, `tfoot`, `tr`, `th`, `td`, `details`, `summary`, `dialog`, `progress`, `meter`, `menu`, `search`, headings `h1`-`h6`, `hgroup`, paragraphs, lists, definition lists, blockquotes, `code`, `kbd`, `samp`, `pre`, `mark`, `abbr`, `strong`, `b`, `em`, `i`, `cite`, `var`, `q`, `ins`, `del`, `s`, `u`, `sub`, `sup`, `output`, `time`, `data`, `dfn`, `ruby`, `rt`, `rp`, `bdi`, and `bdo` |
10
+ | Progressively enhanced | `img`, `picture`, `video`, `audio`, `canvas`, `svg`, `math`, `iframe`, `object`, `embed`, `map`, `area`, `col`, `colgroup`, `optgroup`, `option`, `slot`, `selectedcontent`, `br`, and `wbr` |
11
+ | Platform-owned | `select` popup, `datalist popup`, color picker dialog, date/time picker dialogs, native media controls, autofill menus, spellcheck menus, and operating-system file pickers |
12
+ | Non-rendered | `base`, `datalist`, `head`, `link`, `meta`, `noscript`, `script`, `source`, `style`, `template`, `title`, and `track` |
13
+
14
+ `selectedcontent` is classified as progressive enhancement because support is still emerging. `datalist` remains non-rendered; the input box is themed, but the datalist popup is platform-owned.
15
+
16
+ ## Exposed Subparts
17
+
18
+ The native layer styles safely exposed parts where engines allow it:
19
+
20
+ - placeholder text
21
+ - file selector buttons, including hover, focus, active, and disabled states
22
+ - range tracks and thumbs
23
+ - color swatches
24
+ - progress and meter tracks and values
25
+ - calendar picker indicators
26
+ - search cancellation controls
27
+ - number spinners
28
+ - select picker indicators where supported
29
+ - summary and list markers
30
+ - supported scrollbars
31
+
32
+ ## Native Tokens
33
+
34
+ Preset files map existing `--usk-native-*` roles through their active visual system. The shared native layer also defines these sizing and paint tokens:
35
+
36
+ ```css
37
+ --usk-native-control-min-block-size
38
+ --usk-native-control-padding-block
39
+ --usk-native-control-padding-inline
40
+ --usk-native-subcontrol-padding-block
41
+ --usk-native-subcontrol-padding-inline
42
+ --usk-native-border-width
43
+ --usk-native-field-gap
44
+ --usk-native-panel-padding
45
+ --usk-native-track
46
+ --usk-native-track-fill
47
+ --usk-native-thumb
48
+ --usk-native-thumb-border
49
+ --usk-native-indicator
50
+ ```
51
+
52
+ Invalid paint activates only through `[aria-invalid="true"]`, `.is-invalid`, or `:user-invalid`. Required empty controls do not get danger paint before user interaction.
@@ -6,11 +6,34 @@
6
6
  npm run release:verify
7
7
  ```
8
8
 
9
- `npm run release:verify` is the non-publishing hotfix release gate. It runs `npm run check`, `npm run test:e2e`, `npm run test:visual`, `npm audit --audit-level=moderate`, and `npm run pack:dry-run`.
9
+ `npm run release:verify` is the non-publishing release gate. It runs `npm run check`, `npm run test:e2e`, `npm run test:axe`, `npm run test:visual`, `npm run test:matrix`, the explicit UI-candidate release preflight, `npm audit --audit-level=moderate`, and `npm run pack:dry-run`.
10
10
 
11
- `npm run check` rebuilds dist CSS, runs stylelint, executes package, class API, shared theme-color, and vendor-prefix unit checks, validates core text/link contrast pairs and filled component `on-*` contrast pairs, and confirms package metadata. `npm run pack:dry-run` shows the exact files that would publish.
11
+ `npm run release:preflight` validates the shared manifests and compatibility contract, queries npm for every exact minimum/current version, resolves every export from the candidate tarball, checks maintained documentation against installed packages, and reuses the current/minimum clean-install browser matrix. Normal UI preflight remains strict and queries `ui-style-kit-css@2.2.0` alongside every other documented exact version. The release workflows pass `--candidate-package ui-style-kit-css`, which excludes only that exact current version while it is absent from npm and still requires every published minimum and companion version. The gate performs no publish, tag, release, or deployment mutation and is therefore safe to execute on pull requests.
12
12
 
13
- `npm run build` uses the exactly pinned Lightning CSS parser-minifier. Generated minified bundles retain the release banner while preserving grammar-sensitive selector and `calc()` whitespace.
13
+ `npm run check` rebuilds dist CSS, runs stylelint, executes package, class API, shared theme-color, and vendor-prefix unit checks, validates core text/link contrast pairs and filled component `on-*` contrast pairs, and confirms package metadata. Browser gates cover regular demo flows, representative Axe scans, curated visual smoke checks, and the sharded 990-combination matrix. `npm run check:ecosystem:packs` verifies standalone, pairwise, and all-three packed package compatibility for the canonical visual/theme/state/layout imports and the deprecated bridge imports in both supported matrices. `npm run pack:dry-run` shows the exact files that would publish.
14
+
15
+ `npm run check:ecosystem:current` packs this repository and the sibling `../Layout-Style-CSS` and `../Interactive-Surface-CSS` checkouts. It extracts imports from the explicitly maintained current documentation in all three repositories and resolves every documented specifier from the installed tarballs. Deprecated UI bridge guides are validated as a separate supported-compatibility class; changelogs and Layout migration guides are reviewed historical material rather than current setup. Use `-- --ui-spec <specifier>`, `-- --layout-repo <path>`, `-- --layout-spec <specifier>`, `-- --interactive-spec <specifier>`, `-- --interactive-repo <path>`, `-- --layout-docs-repo <path>`, or `-- --interactive-docs-repo <path>` when validating different package or documentation sources.
16
+
17
+ `npm run check:ecosystem:minimum` downloads and repacks the declared minimum published runtime versions: `ui-style-kit-css@2.1.0`, `interactive-surface-css@1.5.0`, and `layout-style-css@3.0.0`. Those tarballs predate the additive shared-manifest policy introduced on the coordinated branches, so the minimum matrix validates their exact installed versions and published CSS entry points; current packed heads retain the stricter manifest-schema and current-documentation checks. `npm run check:ecosystem:packs` runs current first and minimum second.
18
+
19
+ The current matrix checks `ui-style-kit-css@2.2.0` as the active candidate only while its exact npm version is absent, `interactive-surface-css@1.6.0` as a published release, and `layout-style-css@3.0.1` as a published release. UI Style Kit `2.2.0` remains the current package version. The minimum published matrix remains `ui-style-kit-css@2.1.0`, `interactive-surface-css@1.5.0`, and `layout-style-css@3.0.0`.
20
+
21
+ Both matrices install fresh tarball consumers for UI only, Interaction only, Layout only, every pair, and all three. Chromium then checks selected theme paint, native and prefixed components, interaction focus/disabled/loading/selected/persistent states, Layout wrappers/primitives/recipes/personalities, console cleanliness, and an empty external-request log. Three text-free baselines under `tests/snapshots/clean-install/` cover the highest-risk integrated combinations.
22
+
23
+ Snapshot verification decodes PNG pixels, requires exact dimensions, ignores pixelmatch-classified antialias noise, uses a `0.1` color threshold, and permits at most `0.25%` differing pixels. The committed fixtures render at 720-721 by 261 pixels and therefore allow 469-470 changed pixels while rejecting the tested 42% meaningful change. A mismatch retains both `SCENARIO-actual.png` and `SCENARIO-diff.png` in the reported safe temporary directory. CI only validates committed baselines and never passes the generation flag. To intentionally refresh them locally, run the current checker with `--update-snapshots`, inspect all three images, and rerun without that flag.
24
+
25
+ The PR integration and npm-publish workflows read the companion repository and immutable revision pins from `ecosystem-compatibility.json`, then pack those coordinated reviewed artifacts. Advance those pins whenever a later release changes a companion contract. The current values pin the published Interactive Surface CSS merge at `b50a60d8ffd804d8227b1a16903c394556b88511` and the published Layout Style CSS merge at `44c34693554879790c54a6205b37160ff63a1747`.
26
+
27
+ Use this exact bootstrap and merge sequence:
28
+
29
+ 1. Verify the published Interactive Surface CSS and Layout Style CSS merge commits remain remotely reachable.
30
+ 2. Update and review the final UI companion pins against those immutable merge commits.
31
+ 3. Push the final UI branch, rerun its explicit UI-candidate ecosystem preflight, and merge UI with a merge commit.
32
+ 4. Do not squash or rebase away reviewed release commits that remain part of the pinned verification history.
33
+
34
+ The workflows enforce immutable remote-object reachability and do not fall back to mutable branches or registry packages. The stable bootstrap ref lets companion workflows load the reviewed preflight implementation before the final UI commit references their heads.
35
+
36
+ `npm run build` uses exactly pinned CSS Tree parsing and Lightning CSS formatting/minification. Generated minified bundles retain the release banner while preserving grammar-sensitive selector and `calc()` whitespace.
14
37
 
15
38
  The npm artifact is library-focused: `dist/`, `styles/`, docs, and metadata. Demo pages, favicon source assets, and social preview images remain checked in for GitHub Pages but are excluded from the tarball to keep package installs small.
16
39
 
@@ -18,11 +41,19 @@ The npm artifact is library-focused: `dist/`, `styles/`, docs, and metadata. Dem
18
41
 
19
42
  No package, tag, or registry release occurs without explicit approval.
20
43
 
44
+ The completed 2.0.4 correctness hotfix is historical context. Do not create replacement tags or registry releases merely to verify the coordinated compatibility contract.
45
+
46
+ Run the coordinated checked-out ecosystem proof from this repository:
47
+
48
+ ```bash
49
+ npm run check:ecosystem:packs -- --layout-repo ../Layout-Style-CSS --interactive-repo ../Interactive-Surface-CSS --layout-docs-repo ../Layout-Style-CSS --interactive-docs-repo ../Interactive-Surface-CSS
50
+ ```
51
+
21
52
  ```bash
22
53
  npm publish
23
54
  ```
24
55
 
25
- `prepublishOnly` runs `npm run release:verify`, so a direct `npm publish` still has the full hotfix release gate. For GitHub releases, create or dispatch a release for the matching package tag, such as `v2.0.4`. The release workflows verify that `package.json`, `package-lock.json`, `CHANGELOG.md`, and generated dist banners are aligned before publishing.
56
+ `prepublishOnly` runs `npm run release:verify`, so a direct `npm publish` still has the full release gate. For GitHub releases, create or dispatch a release for the matching package tag, such as `v2.2.0`. The release workflows verify that `package.json`, `package-lock.json`, `CHANGELOG.md`, and generated dist banners are aligned before publishing.
26
57
 
27
58
  ## Versioning
28
59
 
package/docs/TOKENS.md CHANGED
@@ -8,6 +8,46 @@ shared scheme channels -> prefixed aliases -> UI rules
8
8
 
9
9
  `styles/theme-colors.css` defines the active scheme and mode once as `--usk-*` RGB channels. Each UI style maps those shared channels to its public prefix, then component rules consume prefixed functional variables. `styles/native-elements.css` owns native HTML fallback selectors and consumes `--usk-native-*` tokens that each preset maps back to its own public variables.
10
10
 
11
+ ## Shared semantic token handshake
12
+
13
+ The existing `[data-ui][data-theme][data-mode]` native-token root publishes 12 fully typed `--ui-*` values. UI Style Kit is the primary producer, but the names are intentionally package-neutral so a third-party theme can produce the same contract. Consumer libraries treat these values as optional fallbacks: a package-specific override wins first, then the shared semantic value, then the consumer's legacy token and literal default.
14
+
15
+ | Shared token | CSS type | UI Style Kit source |
16
+ |---|---|---|
17
+ | `--ui-color-bg` | `<color>` | `rgb(var(--usk-bg-rgb))` |
18
+ | `--ui-color-surface` | `<color>` | `var(--usk-native-surface-strong)` |
19
+ | `--ui-color-text` | `<color>` | `var(--usk-native-text)` |
20
+ | `--ui-color-muted` | `<color>` | `var(--usk-native-text-muted)` |
21
+ | `--ui-color-primary` | `<color>` | `var(--usk-native-primary)` |
22
+ | `--ui-color-on-primary` | `<color>` | `var(--usk-native-on-primary)` |
23
+ | `--ui-color-border` | `<color>` | `var(--usk-native-border)` |
24
+ | `--ui-radius-control` | `<length>` | `var(--usk-native-radius)` |
25
+ | `--ui-shadow-control` | `<shadow-list>` | `var(--usk-native-shadow)` |
26
+ | `--ui-focus-color` | `<color>` | `var(--usk-native-focus)` |
27
+ | `--ui-motion-duration` | `<time>` | `var(--usk-motion-duration)` |
28
+ | `--ui-motion-easing` | `<easing-function>` | `var(--usk-motion-easing)` |
29
+
30
+ The two motion sources are scalar values (`140ms` and `cubic-bezier(0.2, 0, 0.2, 1)`), not values derived from a transition shorthand. That keeps them valid wherever a consumer needs one duration or one easing function.
31
+
32
+ A third-party theme can provide the same handshake without importing UI Style Kit:
33
+
34
+ ```css
35
+ [data-theme="partner"] {
36
+ --ui-color-surface: rgb(250 252 255);
37
+ --ui-color-text: rgb(18 28 45);
38
+ --ui-color-primary: rgb(20 92 180);
39
+ --ui-color-on-primary: white;
40
+ --ui-color-border: rgb(150 165 185);
41
+ --ui-radius-control: 0.75rem;
42
+ --ui-shadow-control: 0 8px 24px rgb(20 40 70 / 0.16);
43
+ --ui-focus-color: rgb(20 92 180);
44
+ --ui-motion-duration: 140ms;
45
+ --ui-motion-easing: cubic-bezier(0.2, 0, 0.2, 1);
46
+ }
47
+ ```
48
+
49
+ UI Style Kit entrypoints publish all 12 values. Standalone consumer packages must remain complete when none of them are present.
50
+
11
51
  ## Prefixes
12
52
 
13
53
  | UI style | Prefix |
@@ -142,6 +182,19 @@ Native HTML coverage is shared in `styles/native-elements.css` to avoid repeatin
142
182
  --usk-native-radius-sm
143
183
  --usk-native-radius
144
184
  --usk-native-radius-lg
185
+ --usk-native-border-width
186
+ --usk-native-field-gap
187
+ --usk-native-panel-padding
188
+ --usk-native-control-min-block-size
189
+ --usk-native-control-padding-block
190
+ --usk-native-control-padding-inline
191
+ --usk-native-subcontrol-padding-block
192
+ --usk-native-subcontrol-padding-inline
193
+ --usk-native-track
194
+ --usk-native-track-fill
195
+ --usk-native-thumb
196
+ --usk-native-thumb-border
197
+ --usk-native-indicator
145
198
  --usk-native-shadow
146
199
  --usk-native-shadow-md
147
200
  --usk-native-focus-ring