ui-style-kit-css 2.1.0 → 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/manifest.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
+ "schemaPolicy": {
4
+ "compatibility": "additive-within-major",
5
+ "breakingChange": "increment-schemaVersion-before-removing-or-renaming-fields"
6
+ },
3
7
  "name": "ui-style-kit-css",
4
- "version": "2.1.0",
8
+ "version": "2.2.0",
5
9
  "cascadeLayers": [
6
10
  "ui-style-kit.theme_colors",
7
11
  "ui-style-kit.native_elements",
@@ -127,6 +131,324 @@
127
131
  "dark",
128
132
  "contrast"
129
133
  ],
134
+ "tokens": {
135
+ "sharedSemantic": [
136
+ {
137
+ "name": "--ui-color-bg",
138
+ "type": "<color>",
139
+ "namespacedSource": "rgb(var(--usk-bg-rgb))",
140
+ "producerScope": "[data-ui][data-theme][data-mode]",
141
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
142
+ },
143
+ {
144
+ "name": "--ui-color-surface",
145
+ "type": "<color>",
146
+ "namespacedSource": "var(--usk-native-surface-strong)",
147
+ "producerScope": "[data-ui][data-theme][data-mode]",
148
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
149
+ },
150
+ {
151
+ "name": "--ui-color-text",
152
+ "type": "<color>",
153
+ "namespacedSource": "var(--usk-native-text)",
154
+ "producerScope": "[data-ui][data-theme][data-mode]",
155
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
156
+ },
157
+ {
158
+ "name": "--ui-color-muted",
159
+ "type": "<color>",
160
+ "namespacedSource": "var(--usk-native-text-muted)",
161
+ "producerScope": "[data-ui][data-theme][data-mode]",
162
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
163
+ },
164
+ {
165
+ "name": "--ui-color-primary",
166
+ "type": "<color>",
167
+ "namespacedSource": "var(--usk-native-primary)",
168
+ "producerScope": "[data-ui][data-theme][data-mode]",
169
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
170
+ },
171
+ {
172
+ "name": "--ui-color-on-primary",
173
+ "type": "<color>",
174
+ "namespacedSource": "var(--usk-native-on-primary)",
175
+ "producerScope": "[data-ui][data-theme][data-mode]",
176
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
177
+ },
178
+ {
179
+ "name": "--ui-color-border",
180
+ "type": "<color>",
181
+ "namespacedSource": "var(--usk-native-border)",
182
+ "producerScope": "[data-ui][data-theme][data-mode]",
183
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
184
+ },
185
+ {
186
+ "name": "--ui-radius-control",
187
+ "type": "<length>",
188
+ "namespacedSource": "var(--usk-native-radius)",
189
+ "producerScope": "[data-ui][data-theme][data-mode]",
190
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
191
+ },
192
+ {
193
+ "name": "--ui-shadow-control",
194
+ "type": "<shadow-list>",
195
+ "namespacedSource": "var(--usk-native-shadow)",
196
+ "producerScope": "[data-ui][data-theme][data-mode]",
197
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
198
+ },
199
+ {
200
+ "name": "--ui-focus-color",
201
+ "type": "<color>",
202
+ "namespacedSource": "var(--usk-native-focus)",
203
+ "producerScope": "[data-ui][data-theme][data-mode]",
204
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
205
+ },
206
+ {
207
+ "name": "--ui-motion-duration",
208
+ "type": "<time>",
209
+ "namespacedSource": "var(--usk-motion-duration)",
210
+ "producerScope": "[data-ui][data-theme][data-mode]",
211
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
212
+ },
213
+ {
214
+ "name": "--ui-motion-easing",
215
+ "type": "<easing-function>",
216
+ "namespacedSource": "var(--usk-motion-easing)",
217
+ "producerScope": "[data-ui][data-theme][data-mode]",
218
+ "standaloneExpectation": "available-with-ui-style-kit-entrypoints"
219
+ }
220
+ ]
221
+ },
222
+ "semanticComponentApi": {
223
+ "presetSwitchAttribute": "data-ui",
224
+ "selectorsByRole": {
225
+ "button": [
226
+ {
227
+ "selector": ".ui-button",
228
+ "sourceSuffix": "button"
229
+ },
230
+ {
231
+ "selector": ".ui-icon-button",
232
+ "sourceSuffix": "icon-button"
233
+ }
234
+ ],
235
+ "card": [
236
+ {
237
+ "selector": ".ui-card",
238
+ "sourceSuffix": "card"
239
+ }
240
+ ],
241
+ "form": [
242
+ {
243
+ "selector": ".ui-field",
244
+ "sourceSuffix": "field"
245
+ },
246
+ {
247
+ "selector": ".ui-label",
248
+ "sourceSuffix": "label"
249
+ },
250
+ {
251
+ "selector": ".ui-help-text",
252
+ "sourceSuffix": "help-text"
253
+ },
254
+ {
255
+ "selector": ".ui-input",
256
+ "sourceSuffix": "input"
257
+ },
258
+ {
259
+ "selector": ".ui-select",
260
+ "sourceSuffix": "select"
261
+ },
262
+ {
263
+ "selector": ".ui-textarea",
264
+ "sourceSuffix": "textarea"
265
+ },
266
+ {
267
+ "selector": ".ui-check",
268
+ "sourceSuffix": "check"
269
+ },
270
+ {
271
+ "selector": ".ui-check-control",
272
+ "sourceSuffix": "check-control"
273
+ },
274
+ {
275
+ "selector": ".ui-radio",
276
+ "sourceSuffix": "radio"
277
+ },
278
+ {
279
+ "selector": ".ui-radio-control",
280
+ "sourceSuffix": "radio-control"
281
+ },
282
+ {
283
+ "selector": ".ui-switch",
284
+ "sourceSuffix": "switch"
285
+ },
286
+ {
287
+ "selector": ".ui-switch-track",
288
+ "sourceSuffix": "switch-track"
289
+ },
290
+ {
291
+ "selector": ".ui-switch-thumb",
292
+ "sourceSuffix": "switch-thumb"
293
+ }
294
+ ],
295
+ "badge": [
296
+ {
297
+ "selector": ".ui-badge",
298
+ "sourceSuffix": "badge"
299
+ }
300
+ ],
301
+ "alert": [
302
+ {
303
+ "selector": ".ui-alert",
304
+ "sourceSuffix": "alert"
305
+ },
306
+ {
307
+ "selector": ".ui-alert-title",
308
+ "sourceSuffix": "alert-title"
309
+ },
310
+ {
311
+ "selector": ".ui-alert-body",
312
+ "sourceSuffix": "alert-body"
313
+ }
314
+ ],
315
+ "navigation": [
316
+ {
317
+ "selector": ".ui-nav",
318
+ "sourceSuffix": "nav"
319
+ },
320
+ {
321
+ "selector": ".ui-nav-link",
322
+ "sourceSuffix": "nav-link"
323
+ }
324
+ ],
325
+ "table": [
326
+ {
327
+ "selector": ".ui-table",
328
+ "sourceSuffix": "table"
329
+ },
330
+ {
331
+ "selector": ".ui-table-wrap",
332
+ "sourceSuffix": "table-wrap"
333
+ }
334
+ ],
335
+ "progress": [
336
+ {
337
+ "selector": ".ui-progress",
338
+ "sourceSuffix": "progress"
339
+ },
340
+ {
341
+ "selector": ".ui-progress-bar",
342
+ "sourceSuffix": "progress-bar"
343
+ }
344
+ ],
345
+ "toolbar": [
346
+ {
347
+ "selector": ".ui-toolbar",
348
+ "sourceSuffix": "toolbar"
349
+ }
350
+ ],
351
+ "loading": [
352
+ {
353
+ "selector": ".ui-spinner",
354
+ "sourceSuffix": "spinner"
355
+ }
356
+ ],
357
+ "tooltip": [
358
+ {
359
+ "selector": ".ui-tooltip",
360
+ "sourceSuffix": "tooltip"
361
+ }
362
+ ]
363
+ },
364
+ "variantAttribute": {
365
+ "name": "data-ui-variant",
366
+ "neutral": "omitted",
367
+ "valuesBySelector": {
368
+ ".ui-button": [
369
+ "primary",
370
+ "secondary",
371
+ "danger",
372
+ "ghost"
373
+ ],
374
+ ".ui-badge": [
375
+ "primary",
376
+ "secondary",
377
+ "success",
378
+ "warning",
379
+ "danger"
380
+ ],
381
+ ".ui-alert": [
382
+ "success",
383
+ "warning",
384
+ "danger"
385
+ ]
386
+ }
387
+ },
388
+ "nativeFallbacks": [
389
+ {
390
+ "roles": [
391
+ "modal",
392
+ "dialog"
393
+ ],
394
+ "element": "dialog",
395
+ "genericSelectors": []
396
+ }
397
+ ],
398
+ "presetPrefixedClasses": {
399
+ "status": "supported",
400
+ "uses": [
401
+ "compatibility",
402
+ "advanced"
403
+ ]
404
+ },
405
+ "implementationStatus": {
406
+ "retained": {
407
+ "status": "implemented",
408
+ "selectors": [
409
+ ".ui-spinner",
410
+ ".ui-tooltip"
411
+ ]
412
+ },
413
+ "implemented": {
414
+ "status": "implemented",
415
+ "selectors": [
416
+ ".ui-button",
417
+ ".ui-icon-button",
418
+ ".ui-card",
419
+ ".ui-field",
420
+ ".ui-label",
421
+ ".ui-help-text",
422
+ ".ui-input",
423
+ ".ui-select",
424
+ ".ui-textarea",
425
+ ".ui-check",
426
+ ".ui-check-control",
427
+ ".ui-radio",
428
+ ".ui-radio-control",
429
+ ".ui-switch",
430
+ ".ui-switch-track",
431
+ ".ui-switch-thumb",
432
+ ".ui-badge",
433
+ ".ui-alert",
434
+ ".ui-alert-title",
435
+ ".ui-alert-body",
436
+ ".ui-nav",
437
+ ".ui-nav-link",
438
+ ".ui-table",
439
+ ".ui-table-wrap",
440
+ ".ui-progress",
441
+ ".ui-progress-bar",
442
+ ".ui-toolbar"
443
+ ]
444
+ },
445
+ "pending": {
446
+ "status": "pending",
447
+ "targetTask": 11,
448
+ "selectors": []
449
+ }
450
+ }
451
+ },
130
452
  "nativeElements": {
131
453
  "fullyThemed": [
132
454
  "a",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-style-kit-css",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "CSS theme and UI style preset library for accessible websites, dashboards, admin interfaces, and client-facing pages.",
5
5
  "style": "dist/ui-style-kit.css",
6
6
  "main": "dist/ui-style-kit.css",
@@ -150,7 +150,7 @@
150
150
  "bugs": {
151
151
  "url": "https://github.com/Foscat/ui-style-kit-css/issues"
152
152
  },
153
- "homepage": "https://github.com/Foscat/ui-style-kit-css#readme",
153
+ "homepage": "https://foscat.github.io/ui-style-kit-css/",
154
154
  "engines": {
155
155
  "node": ">=20"
156
156
  },
@@ -160,12 +160,21 @@
160
160
  "@playwright/test": "~1.61.1",
161
161
  "css-tree": "3.2.1",
162
162
  "lightningcss": "1.33.0",
163
+ "pixelmatch": "7.2.0",
164
+ "pngjs": "7.0.0",
163
165
  "stylelint": "~17.14.0"
164
166
  },
167
+ "overrides": {
168
+ "fast-uri": "3.1.5",
169
+ "js-yaml": "4.3.1",
170
+ "nanoid": "3.3.17",
171
+ "postcss": "8.5.23"
172
+ },
165
173
  "scripts": {
166
174
  "build": "node scripts/build.mjs",
167
175
  "lint": "stylelint \"styles/**/*.css\" \"demo/**/*.css\"",
168
176
  "check:contrast": "node scripts/check-contrast.mjs",
177
+ "check:ownership": "node scripts/check-css-ownership.mjs",
169
178
  "check:package": "node scripts/check-package.mjs",
170
179
  "test": "npm run test:unit",
171
180
  "test:unit": "node --test tests/*.test.js",
@@ -173,11 +182,15 @@
173
182
  "test:axe": "playwright test --config playwright.config.js tests/e2e/accessibility.spec.js",
174
183
  "test:matrix": "playwright test --config playwright.matrix.config.js",
175
184
  "test:e2e:install:ci": "playwright install --with-deps chromium firefox webkit",
176
- "check:ecosystem:packs": "node scripts/check-ecosystem-packs.mjs",
177
- "check": "npm run build && npm run lint && npm run test:unit && npm run check:contrast && npm run check:package",
185
+ "check:ecosystem:current": "node scripts/check-ecosystem-packs.mjs --matrix current",
186
+ "check:ecosystem:minimum": "node scripts/check-ecosystem-packs.mjs --matrix minimum --skip-docs",
187
+ "check:ecosystem:packs": "npm run check:ecosystem:current && npm run check:ecosystem:minimum",
188
+ "test:ecosystem:clean-install": "node --test tests/clean-install-ecosystem-contract.integration.mjs",
189
+ "release:preflight": "npm run build && node scripts/release-preflight.mjs --layout-repo ../Layout-Style-CSS --interactive-repo ../Interactive-Surface-CSS --layout-docs-repo ../Layout-Style-CSS --interactive-docs-repo ../Interactive-Surface-CSS",
190
+ "check": "npm run build && npm run lint && npm run test:unit && npm run check:contrast && npm run check:ownership && npm run check:package",
178
191
  "pack:dry-run": "npm pack --dry-run",
179
192
  "prepack": "npm run check",
180
- "release:verify": "npm run check && npm run test:e2e && npm run test:axe && npm run test:visual && npm run test:matrix && npm run check:ecosystem:packs && npm audit --audit-level=moderate && npm run pack:dry-run",
193
+ "release:verify": "npm run check && npm run test:e2e && npm run test:axe && npm run test:visual && npm run test:matrix && npm run release:preflight -- --candidate-package ui-style-kit-css && npm audit --audit-level=moderate && npm run pack:dry-run",
181
194
  "prepublishOnly": "npm run release:verify",
182
195
  "release:patch": "npm version patch && npm publish",
183
196
  "release:minor": "npm version minor && npm publish",
@@ -11,10 +11,11 @@
11
11
 
12
12
  :where([data-ui][data-theme][data-mode]) .interactive-surface {
13
13
  --interactive-surface-border-width: 1px;
14
+ /* Preserve the adapter's opaque paint while semantic surfaces may retain preset alpha. */
14
15
  --interactive-surface-bg: rgb(var(--usk-surface-strong-rgb, var(--usk-surface-rgb, 255 255 255)));
15
- --interactive-surface-fg: rgb(var(--usk-text-rgb));
16
+ --interactive-surface-fg: var(--ui-color-text, rgb(var(--usk-text-rgb)));
16
17
  --interactive-surface-border-color: rgb(var(--usk-border-rgb, 128 128 128) / .72);
17
- --interactive-surface-focus-ring-color: rgb(var(--usk-focus-rgb, var(--usk-primary-rgb, 72 120 255)));
18
+ --interactive-surface-focus-ring-color: var(--ui-focus-color, rgb(var(--usk-focus-rgb, var(--usk-primary-rgb, 72 120 255))));
18
19
  --interactive-surface-radius: .85rem;
19
20
  --interactive-surface-state-layer-color: currentColor;
20
21
  --interactive-surface-state-layer-opacity: 0;
@@ -27,8 +28,8 @@
27
28
  --interactive-surface-light-icon-color-dark: var(--interactive-surface-light-icon-color);
28
29
  --interactive-surface-dark-icon-color-dark: var(--interactive-surface-dark-icon-color);
29
30
  --interactive-surface-accessibility-icon-color-dark: var(--interactive-surface-accessibility-icon-color);
30
- --interactive-surface-variant-primary-bg: rgb(var(--usk-primary-rgb));
31
- --interactive-surface-variant-primary-fg: rgb(var(--usk-primary-text-rgb, var(--usk-bg-rgb, 255 255 255)));
31
+ --interactive-surface-variant-primary-bg: var(--ui-color-primary, rgb(var(--usk-primary-rgb)));
32
+ --interactive-surface-variant-primary-fg: var(--ui-color-on-primary, rgb(var(--usk-primary-text-rgb, var(--usk-bg-rgb, 255 255 255))));
32
33
  --interactive-surface-variant-primary-border-color: rgb(var(--usk-primary-rgb, 72 120 255));
33
34
  --interactive-surface-variant-secondary-bg: rgb(var(--usk-secondary-rgb, var(--usk-surface-soft-rgb, 96 112 128)));
34
35
  --interactive-surface-variant-secondary-fg: rgb(var(--usk-secondary-text-rgb, var(--usk-text-rgb, 18 18 18)));
@@ -37,7 +38,7 @@
37
38
  --interactive-surface-variant-accent-fg: rgb(var(--usk-accent-text-rgb, var(--usk-bg-rgb, 255 255 255)));
38
39
  --interactive-surface-variant-accent-border-color: rgb(var(--usk-accent-rgb, var(--usk-primary-rgb, 72 120 255)));
39
40
  --interactive-surface-variant-subtle-bg: rgb(var(--usk-surface-soft-rgb, var(--usk-surface-rgb, 244 244 244)));
40
- --interactive-surface-variant-subtle-fg: rgb(var(--usk-text-rgb, 18 18 18));
41
+ --interactive-surface-variant-subtle-fg: var(--ui-color-text, rgb(var(--usk-text-rgb, 18 18 18)));
41
42
  --interactive-surface-variant-subtle-border-color: rgb(var(--usk-border-rgb, 128 128 128) / .64);
42
43
  --interactive-surface-variant-warning-bg: rgb(var(--usk-warning-rgb, 255 190 72));
43
44
  --interactive-surface-variant-warning-fg: rgb(var(--usk-warning-text-rgb, var(--usk-bg-rgb, 18 18 18)));
@@ -8,10 +8,11 @@
8
8
 
9
9
  :where([data-ui][data-theme][data-mode]) .interactive-surface {
10
10
  --interactive-surface-border-width: 1px;
11
+ /* Preserve the adapter's opaque paint while semantic surfaces may retain preset alpha. */
11
12
  --interactive-surface-bg: rgb(var(--usk-surface-strong-rgb, var(--usk-surface-rgb, 255 255 255)));
12
- --interactive-surface-fg: rgb(var(--usk-text-rgb, 18 18 18));
13
+ --interactive-surface-fg: var(--ui-color-text, rgb(var(--usk-text-rgb, 18 18 18)));
13
14
  --interactive-surface-border-color: rgb(var(--usk-border-rgb, 128 128 128) / .72);
14
- --interactive-surface-focus-ring-color: rgb(var(--usk-focus-rgb, var(--usk-primary-rgb, 72 120 255)));
15
+ --interactive-surface-focus-ring-color: var(--ui-focus-color, rgb(var(--usk-focus-rgb, var(--usk-primary-rgb, 72 120 255))));
15
16
  --interactive-surface-radius: .85rem;
16
17
  --interactive-surface-light-icon-color: rgb(var(--usk-warning-rgb, var(--usk-accent-rgb, 255 190 72)));
17
18
  --interactive-surface-dark-icon-color: rgb(var(--usk-text-rgb, 18 18 18));
@@ -19,8 +20,8 @@
19
20
  --interactive-surface-light-icon-color-dark: var(--interactive-surface-light-icon-color);
20
21
  --interactive-surface-dark-icon-color-dark: var(--interactive-surface-dark-icon-color);
21
22
  --interactive-surface-accessibility-icon-color-dark: var(--interactive-surface-accessibility-icon-color);
22
- --interactive-surface-variant-primary-bg: rgb(var(--usk-primary-rgb, 72 120 255));
23
- --interactive-surface-variant-primary-fg: rgb(var(--usk-primary-text-rgb, var(--usk-bg-rgb, 255 255 255)));
23
+ --interactive-surface-variant-primary-bg: var(--ui-color-primary, rgb(var(--usk-primary-rgb, 72 120 255)));
24
+ --interactive-surface-variant-primary-fg: var(--ui-color-on-primary, rgb(var(--usk-primary-text-rgb, var(--usk-bg-rgb, 255 255 255))));
24
25
  --interactive-surface-variant-primary-border-color: rgb(var(--usk-primary-rgb, 72 120 255));
25
26
  --interactive-surface-variant-secondary-bg: rgb(var(--usk-secondary-rgb, var(--usk-surface-soft-rgb, 96 112 128)));
26
27
  --interactive-surface-variant-secondary-fg: rgb(var(--usk-secondary-text-rgb, var(--usk-text-rgb, 18 18 18)));
@@ -29,7 +30,7 @@
29
30
  --interactive-surface-variant-accent-fg: rgb(var(--usk-accent-text-rgb, var(--usk-bg-rgb, 255 255 255)));
30
31
  --interactive-surface-variant-accent-border-color: rgb(var(--usk-accent-rgb, var(--usk-primary-rgb, 72 120 255)));
31
32
  --interactive-surface-variant-subtle-bg: rgb(var(--usk-surface-soft-rgb, var(--usk-surface-rgb, 244 244 244)));
32
- --interactive-surface-variant-subtle-fg: rgb(var(--usk-text-rgb, 18 18 18));
33
+ --interactive-surface-variant-subtle-fg: var(--ui-color-text, rgb(var(--usk-text-rgb, 18 18 18)));
33
34
  --interactive-surface-variant-subtle-border-color: rgb(var(--usk-border-rgb, 128 128 128) / .64);
34
35
  --interactive-surface-variant-warning-bg: rgb(var(--usk-warning-rgb, 255 190 72));
35
36
  --interactive-surface-variant-warning-fg: rgb(var(--usk-warning-text-rgb, var(--usk-bg-rgb, 18 18 18)));
@@ -47,6 +47,22 @@
47
47
  --usk-native-shadow: none;
48
48
  --usk-native-shadow-md: var(--usk-native-shadow);
49
49
  --usk-native-focus-ring: 0 0 0 3px rgb(var(--usk-focus-rgb) / .28);
50
+ --usk-motion-duration: 140ms;
51
+ --usk-motion-easing: cubic-bezier(0.2, 0, 0.2, 1);
52
+
53
+ /* Shared semantic values are fully typed so optional companion and third-party consumers can use them directly. */
54
+ --ui-color-bg: rgb(var(--usk-bg-rgb));
55
+ --ui-color-surface: var(--usk-native-surface-strong);
56
+ --ui-color-text: var(--usk-native-text);
57
+ --ui-color-muted: var(--usk-native-text-muted);
58
+ --ui-color-primary: var(--usk-native-primary);
59
+ --ui-color-on-primary: var(--usk-native-on-primary);
60
+ --ui-color-border: var(--usk-native-border);
61
+ --ui-radius-control: var(--usk-native-radius);
62
+ --ui-shadow-control: var(--usk-native-shadow);
63
+ --ui-focus-color: var(--usk-native-focus);
64
+ --ui-motion-duration: var(--usk-motion-duration);
65
+ --ui-motion-easing: var(--usk-motion-easing);
50
66
  }
51
67
 
52
68
  [data-ui][data-theme][data-mode] :where(h1, h2, h3, h4, h5, h6) {