ui-style-kit-css 1.2.1 → 2.0.1
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 +38 -119
- package/CONTRIBUTING.md +25 -0
- package/README.md +206 -150
- package/SECURITY.md +18 -0
- package/STYLE-MAP.md +60 -0
- package/demo/index.html +1124 -0
- package/dist/ui-style-kit.css +3077 -8115
- package/dist/ui-style-kit.min.css +1 -7
- package/dist/ui-style-kit.with-bridge.css +5861 -0
- package/dist/ui-style-kit.with-bridge.min.css +1 -0
- package/docs/PUBLISHING.md +28 -0
- package/docs/STYLE-GUIDE.md +30 -0
- package/docs/TOKENS.md +276 -0
- package/package.json +90 -128
- package/styles/bauhaus.css +145 -702
- package/styles/bento.css +145 -701
- package/styles/brutalism.css +156 -640
- package/styles/cyberpunk.css +149 -639
- package/styles/interactive-surface-bridge.css +147 -311
- package/styles/maximalist.css +146 -702
- package/styles/minimal-saas.css +141 -701
- package/styles/native-elements.css +374 -0
- package/styles/neumorphism.css +147 -702
- package/styles/retro-glass.css +152 -642
- package/styles/retrofuturism.css +147 -702
- package/styles/tactile.css +145 -701
- package/styles/theme-colors.css +787 -0
- package/styles/y2k.css +143 -636
- package/CODE_OF_CONDUCT.md +0 -64
- package/index.html +0 -234
package/CHANGELOG.md
CHANGED
|
@@ -1,138 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
4
|
-
Entries are aligned to commits merged into `main` between tagged release points.
|
|
3
|
+
All notable changes to **UI Style Kit CSS** will be documented here.
|
|
5
4
|
|
|
6
|
-
## [
|
|
5
|
+
## [2.0.1] - 2026-06-22
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
### Added
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
- Added visible tooltip utilities for every UI preset through `<prefix>-tooltip`, `<prefix>-tooltip-arrow`, `.ui-tooltip`, `[role="tooltip"]`, and `[data-tooltip]`.
|
|
10
|
+
- Added demo coverage for tooltips, switch-style Interactive Surface bridge controls, padded table showcases, combined controls/loading/progress displays, and more useful utility samples.
|
|
11
|
+
- Added the exported `native-elements.css` shared fallback layer for standalone style imports.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
- Aligned `package-lock.json` root metadata with `package.json` at `1.2.1`.
|
|
13
|
+
### Changed
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
- Aligned package metadata, generated dist banners, and release documentation to publish from the `v2.0.1` tag after the previous release tag was retired.
|
|
16
|
+
- Moved concrete color scheme values into the shared `styles/theme-colors.css` layer.
|
|
17
|
+
- Updated all UI systems to alias shared `--usk-*` RGB roles back to their public style prefixes.
|
|
18
|
+
- Reduced generated bundle size by removing duplicated per-UI color scheme blocks from `dist`.
|
|
19
|
+
- Kept prefixed functional tokens such as `--saas-primary`, `--neo-card-bg`, and `--rg-on-primary` for component styling.
|
|
20
|
+
- Refactored the Interactive Surface bridge to inherit shared `--usk-*` roles, expose visible hover/active/focus state layers, and support `data-surface-level="1"`, `"2"`, and `"3"` surface depth hooks.
|
|
21
|
+
- Moved the bridge attach switch into the demo bridge section so the opt-in behavior is documented where it is exercised.
|
|
22
|
+
- Refactored native HTML fallback rules into one shared `styles/native-elements.css` layer while each preset now supplies only visual token mappings through `--usk-native-*`.
|
|
23
|
+
- Polished the demo component layout at desktop, tablet, and square viewports with denser controls, richer badge examples, padded native controls, and balanced showcase rows.
|
|
24
|
+
- Moved the demo Usage section to match the primary navigation order and tightened the mobile controls showcase into a readable single-column flow.
|
|
25
|
+
- Updated the Interactive Surface bridge docs to keep the bridge opt-in while `interactive-surface-css` is revised separately.
|
|
16
26
|
|
|
17
|
-
###
|
|
27
|
+
### Breaking
|
|
18
28
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- Updated release workflow guidance to avoid release branch version rewrites during pull request automation.
|
|
29
|
+
- Concrete scheme overrides should now target shared `--usk-*-rgb` roles instead of redefining one copy per UI prefix.
|
|
30
|
+
- Standalone style imports rely on `styles/theme-colors.css` and `styles/native-elements.css`; import those shared layers first if your CSS pipeline does not resolve `@import`.
|
|
22
31
|
|
|
23
|
-
## [1.
|
|
32
|
+
## [1.2.2] - 2026-06-05
|
|
24
33
|
|
|
25
|
-
###
|
|
34
|
+
### Added
|
|
26
35
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
36
|
+
- Added package exports for the optional `interactive-surface-bridge` stylesheet.
|
|
37
|
+
- Added unit, lint, e2e, and dry-run pack scripts expected by CI and release workflows.
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
### Changed
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
- Added generated `with-bridge` dist CSS for consumers that want the Interactive Surface bridge in the same import.
|
|
42
|
+
- Aligned release metadata, package checks, and documentation for the `1.2.2` release.
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
## 0.2.0
|
|
35
45
|
|
|
36
|
-
### Changed
|
|
46
|
+
### Changed
|
|
37
47
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
48
|
+
- Added cascade layer wrapping to all UI style systems so consumer CSS can override the library more predictably.
|
|
49
|
+
- Fixed light-mode primary button contrast for `midnight-gold` and `cyber-lime` across all UI systems.
|
|
50
|
+
- Added native HTML and CSS accessibility coverage to `brutalism`, `cyberpunk`, `y2k`, and `retro-glass` for parity with the newer UI systems.
|
|
51
|
+
- Added build, package, and contrast-check scripts.
|
|
52
|
+
- Expanded package exports to include both extensionless and `.css` import paths.
|
|
53
|
+
- Removed runtime dependencies; this is a CSS-only consumer package.
|
|
40
54
|
|
|
41
|
-
##
|
|
55
|
+
## 0.1.0
|
|
42
56
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- Bumped package version metadata to `1.1.1` for the next publish target.
|
|
46
|
-
- Aligned `package-lock.json` root metadata with `package.json` at `1.1.1`.
|
|
47
|
-
- Hardened npm publish automation to validate release tag/version alignment before attempting `npm publish`.
|
|
48
|
-
- Updated changelog history alignment notes to reflect tagged release progression.
|
|
49
|
-
|
|
50
|
-
## [1.1.0] - 2026-06-01
|
|
51
|
-
|
|
52
|
-
### Added - UI Style Kit bridge
|
|
53
|
-
|
|
54
|
-
- Added `styles/interactive-surface-bridge.css` to map UI Style Kit tokens to `interactive-surface-css` token hooks.
|
|
55
|
-
- Added new package export aliases:
|
|
56
|
-
- `ui-style-kit-css/interactive-surface-bridge`
|
|
57
|
-
- `ui-style-kit-css/styles/interactive-surface-bridge`
|
|
58
|
-
|
|
59
|
-
### Changed - UI Style Kit bridge
|
|
60
|
-
|
|
61
|
-
- Included `interactive-surface-bridge.css` in the combined `dist/ui-style-kit.css` and `dist/ui-style-kit.min.css` build pipeline.
|
|
62
|
-
- Updated README and wiki setup docs with first-class cross-library integration guidance.
|
|
63
|
-
- Added package integrity coverage for interactive surface bridge export and bundling.
|
|
64
|
-
- Included release metadata correction commit (`chore(release): bump version to 1.0.4`) in the `1.0.4..v1.1.0` commit range.
|
|
65
|
-
|
|
66
|
-
## [1.0.4] - 2026-05-26
|
|
67
|
-
|
|
68
|
-
### Changed - 1.0.4
|
|
69
|
-
|
|
70
|
-
- Added deployment/build prep updates across CI, publish, and release workflows (`[chore] Build deployment pieces`).
|
|
71
|
-
- Synced `package.json` version from `main` (`chore: sync package.json version with main`).
|
|
72
|
-
|
|
73
|
-
## [1.0.3] - 2026-05-26
|
|
74
|
-
|
|
75
|
-
### Added - 1.0.3
|
|
76
|
-
|
|
77
|
-
- Added `.github/workflows/npm-publish.yml` (`Add publish workflow`).
|
|
78
|
-
|
|
79
|
-
### Changed - 1.0.3
|
|
80
|
-
|
|
81
|
-
- Updated `package.json` version metadata and changelog formatting for the `1.0.3` line.
|
|
82
|
-
- Applied pull request follow-up changelog fix (`Potential fix for pull request finding`).
|
|
83
|
-
- Included `package.json` sync commits from automation (`chore: sync package.json version with main`).
|
|
84
|
-
|
|
85
|
-
## [1.0.2] - 2026-05-25
|
|
86
|
-
|
|
87
|
-
### Added - 1.0.2
|
|
88
|
-
|
|
89
|
-
- `.github/workflows/sync-package-version-with-main.yml` to keep pull request branch versions aligned with `main`.
|
|
90
|
-
- `.github/workflows/release-version-alignment.yml` to enforce matching GitHub tag, `package.json`, changelog entry, and npm publish target version.
|
|
91
|
-
|
|
92
|
-
### Changed - 1.0.2
|
|
93
|
-
|
|
94
|
-
- Bumped package version to `1.0.2`.
|
|
95
|
-
- Upgraded `stylelint` from `16.26.1` to `17.12.0`.
|
|
96
|
-
- Updated GitHub Actions in CI:
|
|
97
|
-
- `actions/checkout` from `v4` to `v6`
|
|
98
|
-
- `actions/setup-node` from `v4` to `v6`
|
|
99
|
-
- Updated release alignment notes and changelog formatting during review feedback.
|
|
100
|
-
|
|
101
|
-
## [1.0.1] - 2026-05-25
|
|
102
|
-
|
|
103
|
-
### Fixed - 1.0.1
|
|
104
|
-
|
|
105
|
-
- Patched release metadata and demo HTML (`package.json`, `index.html`) for package stability.
|
|
106
|
-
|
|
107
|
-
## [1.0.0] - 2026-05-24
|
|
108
|
-
|
|
109
|
-
### Added - 1.0.0
|
|
110
|
-
|
|
111
|
-
- Full project wiki under `wiki/`
|
|
112
|
-
- `CODE_OF_CONDUCT.md`
|
|
113
|
-
- SEO support files for GitHub Pages demo:
|
|
114
|
-
- `robots.txt`
|
|
115
|
-
- `sitemap.xml`
|
|
116
|
-
- `site.webmanifest`
|
|
117
|
-
- `browserconfig.xml`
|
|
118
|
-
- `.nojekyll`
|
|
119
|
-
- `logo.png`
|
|
120
|
-
- `assets/seo/social-card.png`
|
|
121
|
-
- `llms.txt`
|
|
122
|
-
- Professional repository scaffolding:
|
|
123
|
-
- `CONTRIBUTING.md`
|
|
124
|
-
- `SECURITY.md`
|
|
125
|
-
- `.editorconfig`
|
|
126
|
-
- `.gitattributes`
|
|
127
|
-
- `.github/workflows/ci.yml`
|
|
128
|
-
- GitHub issue and pull request templates
|
|
129
|
-
- Dependabot config
|
|
130
|
-
- Stylelint configuration:
|
|
131
|
-
- `.stylelintrc.json`
|
|
132
|
-
- `.stylelintignore`
|
|
133
|
-
- package scripts and dev dependencies
|
|
134
|
-
|
|
135
|
-
### Changed - 1.0.0
|
|
136
|
-
|
|
137
|
-
- Expanded `index.html` with comprehensive SEO, social metadata, and JSON-LD structured data.
|
|
138
|
-
- Updated README with quality, community, and SEO sections.
|
|
57
|
+
- Initial library package with 11 UI style systems, 10 shared color themes, and light/dark/contrast modes.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Local workflow
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install
|
|
7
|
+
npm run check
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The library is CSS-only for consumers. Build and validation scripts run with Node and do not create runtime dependencies for package users.
|
|
11
|
+
|
|
12
|
+
## Adding or changing a style system
|
|
13
|
+
|
|
14
|
+
1. Keep the public `data-ui`, `data-theme`, and `data-mode` API stable unless preparing a documented major version.
|
|
15
|
+
2. Preserve class prefixes and prefixed functional tokens.
|
|
16
|
+
3. Define concrete color scheme values in `styles/theme-colors.css` as shared `--usk-*` roles; UI style files should only alias those roles and define visual treatment.
|
|
17
|
+
4. Include the native HTML coverage and accessibility layer.
|
|
18
|
+
5. Run `npm run check` before publishing.
|
|
19
|
+
6. Update `STYLE-MAP.md`, `docs/TOKENS.md`, `README.md`, wiki pages, and `CHANGELOG.md` for public API changes.
|
|
20
|
+
|
|
21
|
+
## Versioning
|
|
22
|
+
|
|
23
|
+
- Patch: CSS fixes, docs fixes, small accessibility corrections.
|
|
24
|
+
- Minor: new UI style, new theme, new public utility classes.
|
|
25
|
+
- Major: breaking token names, class names, mode names, or import paths.
|
package/README.md
CHANGED
|
@@ -1,123 +1,95 @@
|
|
|
1
1
|
# UI Style Kit CSS
|
|
2
2
|
|
|
3
|
-
**UI Style Kit CSS** is a CSS-only theme and
|
|
3
|
+
**UI Style Kit CSS** is a CSS-only theme and UI style preset library for accessible websites, dashboards, admin interfaces, and customer-facing pages.
|
|
4
4
|
|
|
5
|
-
It is
|
|
5
|
+
It is separate from, but complementary to, **Interactive Surface CSS**. Use **UI Style Kit CSS** for visual identity, color themes, UI presets, layout mood, and native HTML styling. Use **Interactive Surface CSS** for interaction-state animation systems and surface behavior.
|
|
6
|
+
|
|
7
|
+
## Current Release
|
|
8
|
+
|
|
9
|
+
`v2.0.1` is the current v2 release. It centralizes color schemes in `styles/theme-colors.css`, centralizes native HTML fallback styling in `styles/native-elements.css`, keeps style-specific component APIs prefix-bound, and ships the Interactive Surface bridge as an opt-in import.
|
|
6
10
|
|
|
7
11
|
## Features
|
|
8
12
|
|
|
9
13
|
- 11 UI style systems
|
|
10
14
|
- 10 shared color schemes
|
|
11
15
|
- `light`, `dark`, and `contrast` modes
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- [`wiki/Home.md`](wiki/Home.md)
|
|
26
|
-
- [`wiki/Installation-and-Setup.md`](wiki/Installation-and-Setup.md)
|
|
27
|
-
- [`wiki/Theming-Model.md`](wiki/Theming-Model.md)
|
|
28
|
-
- [`wiki/Class-API.md`](wiki/Class-API.md)
|
|
29
|
-
- [`wiki/UI-Systems.md`](wiki/UI-Systems.md)
|
|
30
|
-
- [`wiki/Accessibility.md`](wiki/Accessibility.md)
|
|
31
|
-
|
|
32
|
-
## Community
|
|
33
|
-
|
|
34
|
-
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
35
|
-
- [Contributing Guide](CONTRIBUTING.md)
|
|
36
|
-
- [Security Policy](SECURITY.md)
|
|
37
|
-
|
|
38
|
-
## Quality
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm install
|
|
42
|
-
npm run build
|
|
43
|
-
npm run lint:css
|
|
44
|
-
npm test
|
|
45
|
-
```
|
|
16
|
+
- Combined CSS bundle and per-style production imports
|
|
17
|
+
- Shared `theme-colors.css` scheme layer and `native-elements.css` fallback layer for all UI systems
|
|
18
|
+
- Scoped native HTML element coverage, including semantic containers and inline text elements
|
|
19
|
+
- Visible `:focus-visible` defaults
|
|
20
|
+
- Skip-link and visually-hidden helpers per style prefix
|
|
21
|
+
- Compact shared palette → prefixed alias → UI-rule token model
|
|
22
|
+
- Theme-driven card, panel, control, page-background, and spinner defaults
|
|
23
|
+
- Visible tooltip classes and native `[role="tooltip"]` styling inside each UI scope
|
|
24
|
+
- Font-family override variables for body, headings, controls, and mono text
|
|
25
|
+
- Optional bridge tokens, visible state layers, and an opt-in bridge bundle for `interactive-surface-css`
|
|
26
|
+
- Reduced-motion, high-contrast, forced-colors, and print support
|
|
27
|
+
- Cascade-layered CSS for easier consumer overrides
|
|
28
|
+
- No runtime dependencies
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npm run test:e2e:install
|
|
51
|
-
npm run test:e2e
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Auto-fix style issues:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npm run lint:css:fix
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Full release gate:
|
|
30
|
+
## Install
|
|
61
31
|
|
|
62
32
|
```bash
|
|
63
|
-
npm
|
|
33
|
+
npm install ui-style-kit-css
|
|
64
34
|
```
|
|
65
35
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
The demo page includes production SEO/social metadata plus supporting files for GitHub Pages:
|
|
69
|
-
|
|
70
|
-
- `index.html` comprehensive metadata + JSON-LD
|
|
71
|
-
- `robots.txt`
|
|
72
|
-
- `sitemap.xml`
|
|
73
|
-
- `site.webmanifest`
|
|
74
|
-
- `browserconfig.xml`
|
|
75
|
-
- `.nojekyll`
|
|
76
|
-
- `logo.png`
|
|
77
|
-
- `assets/seo/social-card.png`
|
|
36
|
+
## Import
|
|
78
37
|
|
|
79
|
-
|
|
38
|
+
Use a single style import for production apps that use one visual system:
|
|
80
39
|
|
|
81
|
-
```
|
|
82
|
-
|
|
40
|
+
```js
|
|
41
|
+
import "ui-style-kit-css/minimal-saas.css";
|
|
83
42
|
```
|
|
84
43
|
|
|
85
|
-
|
|
44
|
+
In `v2.0.1`, 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:
|
|
86
45
|
|
|
87
46
|
```js
|
|
88
|
-
import "ui-style-kit-css/
|
|
47
|
+
import "ui-style-kit-css/theme-colors.css";
|
|
48
|
+
import "ui-style-kit-css/native-elements.css";
|
|
49
|
+
import "ui-style-kit-css/minimal-saas.css";
|
|
89
50
|
```
|
|
90
51
|
|
|
91
|
-
|
|
52
|
+
The longer `styles/*` paths are also exported:
|
|
92
53
|
|
|
93
54
|
```js
|
|
94
55
|
import "ui-style-kit-css/styles/minimal-saas.css";
|
|
95
56
|
import "ui-style-kit-css/styles/cyberpunk.css";
|
|
96
57
|
```
|
|
97
58
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
This package now ships with an integration bridge for `interactive-surface-css`.
|
|
59
|
+
Use the full bundle when users need to switch `data-ui` systems at runtime:
|
|
101
60
|
|
|
102
|
-
|
|
61
|
+
```js
|
|
62
|
+
import "ui-style-kit-css/dist/ui-style-kit.css";
|
|
63
|
+
```
|
|
103
64
|
|
|
104
|
-
|
|
65
|
+
Use the opt-in bridge bundle when you want UI Style Kit CSS and the Interactive Surface bridge in one import:
|
|
105
66
|
|
|
106
67
|
```js
|
|
107
|
-
import "
|
|
108
|
-
import "ui-style-kit-css/styles/minimal-saas.css";
|
|
109
|
-
import "ui-style-kit-css/styles/interactive-surface-bridge.css";
|
|
68
|
+
import "ui-style-kit-css/with-bridge.css";
|
|
110
69
|
```
|
|
111
70
|
|
|
112
|
-
|
|
71
|
+
Or import the bridge by itself when you are using a single style file:
|
|
113
72
|
|
|
114
73
|
```js
|
|
74
|
+
import "ui-style-kit-css/minimal-saas.css";
|
|
115
75
|
import "ui-style-kit-css/interactive-surface-bridge";
|
|
116
76
|
```
|
|
117
77
|
|
|
118
|
-
The
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
### Bundle size guide
|
|
83
|
+
|
|
84
|
+
| Import | Raw | Gzip | Best for |
|
|
85
|
+
|---|---:|---:|---|
|
|
86
|
+
| `ui-style-kit-css/dist/ui-style-kit.min.css` | ~269 KB | ~34 KB | Runtime UI-system switchers and demos |
|
|
87
|
+
| `ui-style-kit-css/with-bridge.css` | ~331 KB | ~39 KB | Runtime switchers plus Interactive Surface bridge |
|
|
88
|
+
| `ui-style-kit-css/theme-colors.css` | ~25 KB | ~3 KB | Shared color schemes for standalone style imports |
|
|
89
|
+
| `ui-style-kit-css/native-elements.css` | ~13 KB | ~2 KB | Shared native HTML fallback styling |
|
|
90
|
+
| Single style imports | ~26-28 KB | ~5-6 KB | Production apps with one visual system |
|
|
119
91
|
|
|
120
|
-
##
|
|
92
|
+
## CDN usage
|
|
121
93
|
|
|
122
94
|
After publishing to NPM:
|
|
123
95
|
|
|
@@ -125,10 +97,10 @@ After publishing to NPM:
|
|
|
125
97
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@latest/dist/ui-style-kit.min.css" />
|
|
126
98
|
```
|
|
127
99
|
|
|
128
|
-
|
|
100
|
+
For production, pin a version:
|
|
129
101
|
|
|
130
102
|
```html
|
|
131
|
-
<link rel="stylesheet" href="dist/ui-style-kit.css" />
|
|
103
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.0.1/dist/ui-style-kit.min.css" />
|
|
132
104
|
```
|
|
133
105
|
|
|
134
106
|
## Basic usage
|
|
@@ -140,86 +112,166 @@ Local usage:
|
|
|
140
112
|
<article class="saas-card">
|
|
141
113
|
<h1 class="saas-title">UI Style Kit CSS</h1>
|
|
142
114
|
<p class="saas-subtitle">Switch UI systems, themes, and modes with attributes.</p>
|
|
115
|
+
<button class="saas-button saas-button-primary">Primary Action</button>
|
|
116
|
+
<span class="saas-spinner" aria-label="Loading"></span>
|
|
143
117
|
</article>
|
|
144
118
|
</section>
|
|
145
119
|
</main>
|
|
146
120
|
</body>
|
|
147
121
|
```
|
|
148
122
|
|
|
123
|
+
## Dynamic switching
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
document.body.dataset.ui = "cyberpunk";
|
|
127
|
+
document.body.dataset.theme = "midnight-gold";
|
|
128
|
+
document.body.dataset.mode = "dark";
|
|
129
|
+
```
|
|
130
|
+
|
|
149
131
|
## UI systems
|
|
150
132
|
|
|
151
|
-
| UI style | `data-ui` | Class prefix |
|
|
152
|
-
|
|
153
|
-
| Minimal SaaS | `minimal-saas` | `saas` |
|
|
154
|
-
| Bento UI | `bento` | `bento` |
|
|
155
|
-
| Maximalist / Playful | `maximalist` | `max` |
|
|
156
|
-
| Bauhaus / Swiss Modern | `bauhaus` | `bau` |
|
|
157
|
-
| Skeuomorphic / Tactile | `tactile` | `tactile` |
|
|
158
|
-
| Neumorphism | `neumorphism` | `neo` |
|
|
159
|
-
| Retrofuturism | `retrofuturism` | `retro` |
|
|
160
|
-
| Brutalism | `brutalism` | `brutal` |
|
|
161
|
-
| Cyberpunk | `cyberpunk` | `cyber` |
|
|
162
|
-
| Y2K | `y2k` | `y2k` |
|
|
163
|
-
| Retro Glass | `retro-glass` | `rg` |
|
|
133
|
+
| UI style | `data-ui` | Class prefix | Best for |
|
|
134
|
+
|---|---:|---:|---|
|
|
135
|
+
| Minimal SaaS | `minimal-saas` | `saas` | dashboards, admin tools, SaaS apps |
|
|
136
|
+
| Bento UI | `bento` | `bento` | landing pages, feature sections, showcases |
|
|
137
|
+
| Maximalist / Playful | `maximalist` | `max` | creators, entertainment, bold client sites |
|
|
138
|
+
| Bauhaus / Swiss Modern | `bauhaus` | `bau` | agencies, editorial layouts, design-forward brands |
|
|
139
|
+
| Skeuomorphic / Tactile | `tactile` | `tactile` | premium tactile interfaces, control panels |
|
|
140
|
+
| Neumorphism | `neumorphism` | `neo` | soft dashboards, experimental UI |
|
|
141
|
+
| Retrofuturism | `retrofuturism` | `retro` | futuristic portfolios and product pages |
|
|
142
|
+
| Brutalism | `brutalism` | `brutal` | bold creative websites |
|
|
143
|
+
| Cyberpunk | `cyberpunk` | `cyber` | security, gaming, encryption, tech demos |
|
|
144
|
+
| Y2K | `y2k` | `y2k` | nostalgic, playful, fashion/music/event sites |
|
|
145
|
+
| Retro Glass | `retro-glass` | `rg` | futuristic glass dashboards and hero sections |
|
|
164
146
|
|
|
165
147
|
## Color themes
|
|
166
148
|
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
149
|
+
```txt
|
|
150
|
+
midnight-gold
|
|
151
|
+
ocean-steel
|
|
152
|
+
forest-moss
|
|
153
|
+
sunset-ember
|
|
154
|
+
royal-plum
|
|
155
|
+
graphite-cyan
|
|
156
|
+
desert-sage
|
|
157
|
+
rose-quartz
|
|
158
|
+
cyber-lime
|
|
159
|
+
arctic-indigo
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Color schemes are defined once in `styles/theme-colors.css` as shared `--usk-*` RGB roles. Each UI style maps those shared roles back to its public prefix, so existing component rules still consume variables such as `--saas-primary`, `--bau-surface`, and `--rg-on-primary`.
|
|
177
163
|
|
|
178
164
|
## Modes
|
|
179
165
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
166
|
+
```txt
|
|
167
|
+
light
|
|
168
|
+
dark
|
|
169
|
+
contrast
|
|
170
|
+
```
|
|
183
171
|
|
|
184
|
-
##
|
|
172
|
+
## Native HTML coverage
|
|
185
173
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
174
|
+
`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.
|
|
175
|
+
|
|
176
|
+
The shared native layer covers common native elements, including:
|
|
177
|
+
|
|
178
|
+
- semantic containers: `main`, `section`, `header`, `footer`, `nav`, `article`, `aside`, `address`
|
|
179
|
+
- headings, paragraphs, links, lists, definition lists, blockquotes, code, pre, mark, abbr
|
|
180
|
+
- inline semantics: `strong`, `b`, `em`, `i`, `cite`, `var`, `q`, `ins`, `del`, `s`, `sub`, `sup`, `output`, `time`, `data`, `dfn`, `ruby`, `rt`, `rp`
|
|
181
|
+
- images, media, figures, captions, `audio`, `picture`, `object`, `embed`, and `math`
|
|
182
|
+
- forms, fieldsets, labels, inputs, textareas, selects, checkboxes, radios, range, color, file inputs
|
|
183
|
+
- buttons and submit/reset controls
|
|
184
|
+
- tables and captions
|
|
185
|
+
- `details`, `summary`, `dialog`, `progress`, `meter`, `menu`, `search`, `optgroup`, and `option`
|
|
186
|
+
- loading indicators through `<prefix>-spinner`, `<prefix>-loading-spinner`, and busy native buttons with `aria-busy="true"`
|
|
187
|
+
- tooltip surfaces through `<prefix>-tooltip`, `<prefix>-tooltip-arrow`, `.ui-tooltip`, `[role="tooltip"]`, and `[data-tooltip]`
|
|
188
|
+
|
|
189
|
+
CSS improves accessibility presentation, but it cannot guarantee accessibility by itself. Use semantic HTML, real labels, keyboard-safe JavaScript, meaningful link/button text, and correct ARIA state management.
|
|
190
|
+
|
|
191
|
+
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`.
|
|
192
|
+
|
|
193
|
+
## Loading states
|
|
194
|
+
|
|
195
|
+
Every style includes theme-driven spinner utilities:
|
|
196
|
+
|
|
197
|
+
```html
|
|
198
|
+
<span class="saas-spinner" aria-label="Loading"></span>
|
|
199
|
+
<span class="saas-loading-spinner saas-spinner-sm" aria-hidden="true"></span>
|
|
200
|
+
<button class="saas-button saas-button-primary" aria-busy="true">Saving</button>
|
|
190
201
|
```
|
|
191
202
|
|
|
203
|
+
Spinner track, stroke, and accent colors come from the active `data-theme` and `data-mode`. The generic `.ui-spinner`, `.loading-spinner`, and `[data-loading-spinner]` hooks are also themed inside any `[data-ui="..."]` scope.
|
|
204
|
+
|
|
205
|
+
## Tooltip surfaces
|
|
206
|
+
|
|
207
|
+
Every style includes visible tooltip utilities with the same API and preset-specific visual treatment:
|
|
208
|
+
|
|
209
|
+
```html
|
|
210
|
+
<span class="saas-tooltip" role="tooltip">
|
|
211
|
+
Helpful context
|
|
212
|
+
<span class="saas-tooltip-arrow" aria-hidden="true"></span>
|
|
213
|
+
</span>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Inside a `[data-ui="..."]` scope, generic `.ui-tooltip`, `[role="tooltip"]`, and `[data-tooltip]` hooks inherit the active UI system.
|
|
217
|
+
|
|
218
|
+
## Font overrides
|
|
219
|
+
|
|
220
|
+
Each style exposes backward-compatible base font variables plus more granular aliases:
|
|
221
|
+
|
|
222
|
+
```css
|
|
223
|
+
[data-ui="minimal-saas"] {
|
|
224
|
+
--saas-font-sans: Inter, system-ui, sans-serif;
|
|
225
|
+
--saas-font-display: Inter, system-ui, sans-serif;
|
|
226
|
+
--saas-font-body: var(--saas-font-sans);
|
|
227
|
+
--saas-font-heading: var(--saas-font-display);
|
|
228
|
+
--saas-font-control: var(--saas-font-display);
|
|
229
|
+
--saas-font-mono: "JetBrains Mono", ui-monospace, monospace;
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Override `--<prefix>-font-sans` and `--<prefix>-font-display` for the broadest changes, or override `--<prefix>-font-body`, `--<prefix>-font-heading`, `--<prefix>-font-control`, and `--<prefix>-font-mono` for targeted typography control.
|
|
234
|
+
|
|
235
|
+
## Cascade layers
|
|
236
|
+
|
|
237
|
+
The library styles are wrapped in `@layer ui-style-kit.*`. Unlayered consumer CSS can override the library without specificity fights:
|
|
238
|
+
|
|
239
|
+
```css
|
|
240
|
+
[data-ui="minimal-saas"][data-theme="arctic-indigo"] {
|
|
241
|
+
--saas-radius-md: 1rem;
|
|
242
|
+
--saas-font-sans: Inter, system-ui, sans-serif;
|
|
243
|
+
--saas-font-display: Inter, system-ui, sans-serif;
|
|
244
|
+
--saas-font-body: var(--saas-font-sans);
|
|
245
|
+
--saas-font-heading: var(--saas-font-display);
|
|
246
|
+
--saas-font-control: var(--saas-font-display);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:where([data-ui][data-theme="arctic-indigo"][data-mode="light"]) {
|
|
250
|
+
--usk-primary-rgb: 72 91 255;
|
|
251
|
+
--usk-primary-hover-rgb: 55 75 230;
|
|
252
|
+
--usk-primary-text-rgb: 255 255 255;
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
The color model is intentionally small: shared `--usk-*` RGB variables feed prefixed aliases such as `--<prefix>-bg`, `--<prefix>-text`, `--<prefix>-surface`, and `--<prefix>-border`. Filled components use `--<prefix>-on-primary`, `--<prefix>-on-secondary`, `--<prefix>-on-success`, `--<prefix>-on-warning`, and `--<prefix>-on-danger` for readable text over filled surfaces.
|
|
257
|
+
|
|
192
258
|
## File structure
|
|
193
259
|
|
|
194
260
|
```txt
|
|
195
261
|
ui-style-kit-css/
|
|
196
262
|
package.json
|
|
197
263
|
README.md
|
|
198
|
-
CONTRIBUTING.md
|
|
199
|
-
SECURITY.md
|
|
200
|
-
CODE_OF_CONDUCT.md
|
|
201
264
|
LICENSE
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
llms.txt
|
|
205
|
-
robots.txt
|
|
206
|
-
sitemap.xml
|
|
207
|
-
site.webmanifest
|
|
208
|
-
browserconfig.xml
|
|
209
|
-
assets/
|
|
210
|
-
seo/
|
|
211
|
-
social-card.png
|
|
212
|
-
.stylelintrc.json
|
|
213
|
-
.stylelintignore
|
|
214
|
-
.editorconfig
|
|
215
|
-
.gitattributes
|
|
216
|
-
.github/
|
|
217
|
-
workflows/
|
|
218
|
-
ci.yml
|
|
265
|
+
CHANGELOG.md
|
|
266
|
+
STYLE-MAP.md
|
|
219
267
|
dist/
|
|
220
268
|
ui-style-kit.css
|
|
221
269
|
ui-style-kit.min.css
|
|
270
|
+
ui-style-kit.with-bridge.css
|
|
271
|
+
ui-style-kit.with-bridge.min.css
|
|
222
272
|
styles/
|
|
273
|
+
theme-colors.css
|
|
274
|
+
native-elements.css
|
|
223
275
|
minimal-saas.css
|
|
224
276
|
bento.css
|
|
225
277
|
maximalist.css
|
|
@@ -231,28 +283,32 @@ ui-style-kit-css/
|
|
|
231
283
|
cyberpunk.css
|
|
232
284
|
y2k.css
|
|
233
285
|
retro-glass.css
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
286
|
+
interactive-surface-bridge.css
|
|
287
|
+
docs/
|
|
288
|
+
TOKENS.md
|
|
289
|
+
STYLE-GUIDE.md
|
|
290
|
+
PUBLISHING.md
|
|
291
|
+
demo/
|
|
292
|
+
index.html
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Development checks
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
npm run check
|
|
299
|
+
npm run pack:dry-run
|
|
241
300
|
```
|
|
242
301
|
|
|
243
|
-
|
|
302
|
+
`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.
|
|
244
303
|
|
|
245
|
-
|
|
304
|
+
## v2.0.1 Migration Notes
|
|
246
305
|
|
|
247
|
-
-
|
|
248
|
-
- visible `:focus-visible` styles
|
|
249
|
-
- `prefers-reduced-motion` support
|
|
250
|
-
- `prefers-contrast: more` support
|
|
251
|
-
- `forced-colors: active` support
|
|
252
|
-
- print styles
|
|
253
|
-
- skip-link and visually-hidden utilities per style prefix
|
|
306
|
+
The `v2.0.1` release line removes duplicated per-UI color-scheme blocks. Color schemes now live in `theme-colors.css` as shared `--usk-*` roles, native HTML fallback styling lives in `native-elements.css`, and each UI style aliases those shared roles back to its prefix.
|
|
254
307
|
|
|
255
|
-
|
|
308
|
+
- Use `--usk-*-rgb` when defining or overriding a color scheme.
|
|
309
|
+
- Continue using prefixed functional tokens such as `--saas-primary`, `--neo-card-bg`, and `--rg-on-primary` inside components.
|
|
310
|
+
- 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`.
|
|
311
|
+
- 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.
|
|
256
312
|
|
|
257
313
|
## License
|
|
258
314
|
|