@bwui/tokens 0.1.17 → 0.1.18

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/dist/tokens.js CHANGED
@@ -8,6 +8,7 @@ export const tokens = Object.freeze({
8
8
  "color_accent": "var(--bw-color-accent)",
9
9
  "color_accent_hover": "var(--bw-color-accent-hover)",
10
10
  "color_accent_subtle": "var(--bw-color-accent-subtle)",
11
+ "color_accent_wash": "var(--bw-color-accent-wash)",
11
12
  "color_action_disabled_bg": "var(--bw-color-action-disabled-bg)",
12
13
  "color_action_disabled_border": "var(--bw-color-action-disabled-border)",
13
14
  "color_action_disabled_text": "var(--bw-color-action-disabled-text)",
@@ -34,6 +35,7 @@ export const tokens = Object.freeze({
34
35
  "color_danger_on_fg": "var(--bw-color-danger-on-fg)",
35
36
  "color_danger_strong": "var(--bw-color-danger-strong)",
36
37
  "color_danger_subtle": "var(--bw-color-danger-subtle)",
38
+ "color_edge_shade": "var(--bw-color-edge-shade)",
37
39
  "color_fg": "var(--bw-color-fg)",
38
40
  "color_fg_muted": "var(--bw-color-fg-muted)",
39
41
  "color_fg_on_accent": "var(--bw-color-fg-on-accent)",
@@ -177,6 +179,11 @@ export const tokens = Object.freeze({
177
179
  "elevation_ambient_2": "var(--bw-elevation-ambient-2)",
178
180
  "elevation_ambient_3": "var(--bw-elevation-ambient-3)",
179
181
  "elevation_ambient_4": "var(--bw-elevation-ambient-4)",
182
+ "elevation_control_bevel": "var(--bw-elevation-control-bevel)",
183
+ "elevation_control_inset": "var(--bw-elevation-control-inset)",
184
+ "elevation_control_pressed": "var(--bw-elevation-control-pressed)",
185
+ "elevation_floating": "var(--bw-elevation-floating)",
186
+ "elevation_panel_highlight": "var(--bw-elevation-panel-highlight)",
180
187
  "focus_ring_offset": "var(--bw-focus-ring-offset)",
181
188
  "focus_ring_style": "var(--bw-focus-ring-style)",
182
189
  "focus_ring_width": "var(--bw-focus-ring-width)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwui/tokens",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Brickwork design tokens — the platform-neutral source of truth (DTCG source, multi-target build).",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -40,6 +40,7 @@
40
40
  },
41
41
  "scripts": {
42
42
  "build": "node scripts/build.mjs",
43
+ "tokens:derive-baselines": "node scripts/derive-baselines.mjs",
43
44
  "test": "node --test \"test/*.test.mjs\""
44
45
  }
45
46
  }
@@ -62,7 +62,7 @@
62
62
  }
63
63
  },
64
64
  "fg-subtle": {
65
- "$value": "oklch(0.548 0.004 265)",
65
+ "$value": "oklch(0.547 0.004 265)",
66
66
  "$extensions": {
67
67
  "bw": {
68
68
  "derived": "color-mix(in oklab, var(--bw-color-fg) 49%, var(--bw-color-surface))"
@@ -104,7 +104,7 @@
104
104
  }
105
105
  },
106
106
  "border-strong": {
107
- "$value": "{primitive.zinc.700}",
107
+ "$value": "oklch(0.376 0.005 286.03)",
108
108
  "$extensions": {
109
109
  "bw": {
110
110
  "derived": "color-mix(in oklab, var(--bw-color-border) 86%, white)"
@@ -158,7 +158,7 @@
158
158
  }
159
159
  },
160
160
  "accent-hover": {
161
- "$value": "oklch(0.622 0.145 254)",
161
+ "$value": "oklch(0.622 0.145 254.62)",
162
162
  "$extensions": {
163
163
  "bw": {
164
164
  "derived": "color-mix(in oklab, var(--bw-color-accent) 88%, black)"
@@ -166,7 +166,7 @@
166
166
  }
167
167
  },
168
168
  "accent-subtle": {
169
- "$value": "oklch(0.212 0.05 254)",
169
+ "$value": "oklch(0.212 0.05 254.62)",
170
170
  "$description": "0.4.0 polish: mix lowered 40% to 30% so selection and active-nav recede behind content instead of outshining it; nav-item-active-text gains contrast on the darker tint (14.47:1).",
171
171
  "$extensions": {
172
172
  "bw": {
@@ -174,6 +174,19 @@
174
174
  }
175
175
  }
176
176
  },
177
+ "accent-wash": {
178
+ "$value": "oklch(0.707 0.165 254.62 / 0.14)",
179
+ "$description": "Translucent accent wash for a highlighted table column (comparison and pricing). Authored per theme: the wash is stronger on dark so it still reads.",
180
+ "$extensions": {
181
+ "bw": {
182
+ "derived": "color-mix(in oklab, var(--bw-color-accent) 14%, transparent)"
183
+ }
184
+ }
185
+ },
186
+ "edge-shade": {
187
+ "$value": "{primitive.black}",
188
+ "$description": "Mix target for the darker edge on filled buttons (accent and danger at 80% toward this colour). Theme-variant so a theme can retune or flatten the edge."
189
+ },
177
190
  "danger": {
178
191
  "$value": "{primitive.red.500}",
179
192
  "$extensions": {
@@ -183,7 +196,7 @@
183
196
  }
184
197
  },
185
198
  "danger-subtle": {
186
- "$value": "oklch(0.166 0.054 25)",
199
+ "$value": "oklch(0.166 0.062 25.33)",
187
200
  "$description": "0.4.0 polish: mix lowered 41% to 26% so the dark tint whispers like its light counterpart; danger-fg measures 7.22:1 on it. A literal (the red.950 alias no longer matches).",
188
201
  "$extensions": {
189
202
  "bw": {
@@ -192,7 +205,7 @@
192
205
  }
193
206
  },
194
207
  "danger-border": {
195
- "$value": "oklch(0.35 0.114 25)",
208
+ "$value": "oklch(0.35 0.13 25.33)",
196
209
  "$description": "Tinted badge/alert border for the danger intent; clears the black-mixed subtle tint by delta-L 0.184.",
197
210
  "$extensions": {
198
211
  "bw": {
@@ -201,7 +214,7 @@
201
214
  }
202
215
  },
203
216
  "danger-strong": {
204
- "$value": "oklch(0.652 0.2 25)",
217
+ "$value": "oklch(0.652 0.228 25.33)",
205
218
  "$extensions": {
206
219
  "bw": {
207
220
  "derived": "color-mix(in oklab, var(--bw-color-danger) 96%, white)"
@@ -209,7 +222,7 @@
209
222
  }
210
223
  },
211
224
  "danger-fg": {
212
- "$value": "oklch(0.735 0.152 25)",
225
+ "$value": "oklch(0.735 0.173 25.33)",
213
226
  "$description": "brickwork#289: constant tightened from 78% to 73% toward white. Dark-subtle mixes toward black (BR-BW-TOK-002 correction, not toward surface), so it does not carry this defect against danger-subtle; but danger-fg is also painted on plain surface/surface-raised (.bw-account-menu__item--danger), and DESIGN.md's own branding note already flagged that pairing degrades for a brand whose dark danger sits below about L 0.62. The retuned constant verifies >= 4.5:1 against plain surface for dark-surface L up to 0.35 (default dark surface is 0.18, surface-raised 0.237), well past any documented brand recipe. warning/success/info keep their existing 78% constant: it already clears this same plain-surface sweep without adjustment.",
214
227
  "$extensions": {
215
228
  "bw": {
@@ -237,7 +250,7 @@
237
250
  }
238
251
  },
239
252
  "warning-subtle": {
240
- "$value": "oklch(0.169 0.037 70)",
253
+ "$value": "oklch(0.169 0.041 70.08)",
241
254
  "$description": "Literal, not an amber ramp alias: black is hue-powerless in the mix, so the resolved hue stays the warning base's 70, not the ramp's 46. 0.4.0 polish: mix lowered 36% to 22%; warning-fg measures 10.77:1 on it.",
242
255
  "$extensions": {
243
256
  "bw": {
@@ -246,7 +259,7 @@
246
259
  }
247
260
  },
248
261
  "warning-border": {
249
- "$value": "oklch(0.423 0.091 70)",
262
+ "$value": "oklch(0.423 0.103 70.08)",
250
263
  "$description": "Tinted badge/alert border for the warning intent; clears the black-mixed subtle tint by delta-L 0.254.",
251
264
  "$extensions": {
252
265
  "bw": {
@@ -255,7 +268,7 @@
255
268
  }
256
269
  },
257
270
  "warning-strong": {
258
- "$value": "oklch(0.778 0.159 70)",
271
+ "$value": "oklch(0.778 0.18 70.08)",
259
272
  "$extensions": {
260
273
  "bw": {
261
274
  "derived": "color-mix(in oklab, var(--bw-color-warning) 96%, white)"
@@ -263,7 +276,7 @@
263
276
  }
264
277
  },
265
278
  "warning-fg": {
266
- "$value": "oklch(0.82 0.129 70)",
279
+ "$value": "oklch(0.82 0.147 70.08)",
267
280
  "$extensions": {
268
281
  "bw": {
269
282
  "derived": "color-mix(in oklab, var(--bw-color-warning) 78%, white)"
@@ -282,7 +295,7 @@
282
295
  }
283
296
  },
284
297
  "success-subtle": {
285
- "$value": "oklch(0.166 0.039 152)",
298
+ "$value": "oklch(0.166 0.05 149.58)",
286
299
  "$description": "0.4.0 polish: mix lowered 37% to 23%; success-fg measures 10.19:1 on it. A literal (the green.950 alias no longer matches).",
287
300
  "$extensions": {
288
301
  "bw": {
@@ -291,7 +304,7 @@
291
304
  }
292
305
  },
293
306
  "success-border": {
294
- "$value": "oklch(0.398 0.093 152)",
307
+ "$value": "oklch(0.398 0.12 149.58)",
295
308
  "$description": "Tinted badge/alert border for the success intent; clears the black-mixed subtle tint by delta-L 0.232.",
296
309
  "$extensions": {
297
310
  "bw": {
@@ -300,7 +313,7 @@
300
313
  }
301
314
  },
302
315
  "success-strong": {
303
- "$value": "oklch(0.734 0.162 152)",
316
+ "$value": "oklch(0.734 0.21 149.58)",
304
317
  "$extensions": {
305
318
  "bw": {
306
319
  "derived": "color-mix(in oklab, var(--bw-color-success) 96%, white)"
@@ -308,7 +321,7 @@
308
321
  }
309
322
  },
310
323
  "success-fg": {
311
- "$value": "oklch(0.784 0.132 152)",
324
+ "$value": "oklch(0.784 0.171 149.58)",
312
325
  "$extensions": {
313
326
  "bw": {
314
327
  "derived": "color-mix(in oklab, var(--bw-color-success) 78%, white)"
@@ -329,7 +342,7 @@
329
342
  }
330
343
  },
331
344
  "info-subtle": {
332
- "$value": "oklch(0.187 0.029 220)",
345
+ "$value": "oklch(0.205 0.04 211.53)",
333
346
  "$description": "Literal, not the cyan.950 alias: black is hue-powerless in the mix, so the resolved hue stays the info base's 220, not the ramp's 230. 0.4.0 polish: mix lowered 42% to 26%; info-fg measures 9.53:1 on it.",
334
347
  "$extensions": {
335
348
  "bw": {
@@ -338,7 +351,7 @@
338
351
  }
339
352
  },
340
353
  "info-border": {
341
- "$value": "oklch(0.396 0.061 220)",
354
+ "$value": "oklch(0.434 0.085 211.53)",
342
355
  "$description": "Tinted badge/alert border for the info intent; clears the black-mixed subtle tint by delta-L 0.209.",
343
356
  "$extensions": {
344
357
  "bw": {
@@ -347,7 +360,7 @@
347
360
  }
348
361
  },
349
362
  "info-strong": {
350
- "$value": "oklch(0.731 0.106 220)",
363
+ "$value": "oklch(0.797 0.148 211.53)",
351
364
  "$extensions": {
352
365
  "bw": {
353
366
  "derived": "color-mix(in oklab, var(--bw-color-info) 96%, white)"
@@ -355,7 +368,7 @@
355
368
  }
356
369
  },
357
370
  "info-fg": {
358
- "$value": "oklch(0.782 0.086 220)",
371
+ "$value": "oklch(0.835 0.12 211.53)",
359
372
  "$extensions": {
360
373
  "bw": {
361
374
  "derived": "color-mix(in oklab, var(--bw-color-info) 78%, white)"
@@ -366,7 +379,7 @@
366
379
  "$value": "{primitive.zinc.950}"
367
380
  },
368
381
  "icon-muted": {
369
- "$value": "oklch(0.548 0.004 265)",
382
+ "$value": "oklch(0.547 0.004 265)",
370
383
  "$extensions": {
371
384
  "bw": {
372
385
  "derived": "var(--bw-color-fg-subtle)"
@@ -374,7 +387,7 @@
374
387
  }
375
388
  },
376
389
  "focus-ring": {
377
- "$value": "oklch(0.5797 0.1353 254)",
390
+ "$value": "oklch(0.58 0.135 254.62)",
378
391
  "$description": "brickwork#134: derived from accent, not a flat literal. A hardcoded amber broke brand-agnosticism (see semantic.light.tokens.json for the full rationale). Derived by mixing accent (blue.400 by default) toward black, in oklab, to force a contrast-safe lightness: 82% accent, 18% black. Darkening, not lightening, is the correct direction here even though the theme is dark: surface-inverse in this theme is near-white (oklch L 0.93), so a ring lightened toward white would fail against it just as badly as the raw accent does (2.15:1). Darkening clears all three surfaces the ring is painted on at once. A tenant's `--bw-color-accent` still flows through as the ring's hue. Resolved literal for the default blue.400 dark accent, not an alias: surface 4.38:1, surface-raised (card) 3.86:1, surface-inverse (the near-white inverse/hero band) 3.50:1.",
379
392
  "$extensions": {
380
393
  "bw": {
@@ -383,7 +396,7 @@
383
396
  }
384
397
  },
385
398
  "nav-item-active-bg": {
386
- "$value": "oklch(0.212 0.05 254)",
399
+ "$value": "oklch(0.212 0.05 254.62)",
387
400
  "$extensions": {
388
401
  "bw": {
389
402
  "derived": "var(--bw-color-accent-subtle)"
@@ -391,7 +404,7 @@
391
404
  }
392
405
  },
393
406
  "nav-item-active-text": {
394
- "$value": "{primitive.blue.100}",
407
+ "$value": "oklch(0.927 0.041 254.62)",
395
408
  "$extensions": {
396
409
  "bw": {
397
410
  "derived": "color-mix(in oklab, var(--bw-color-accent) 25%, white)"
@@ -407,7 +420,7 @@
407
420
  }
408
421
  },
409
422
  "nav-item-disabled-text": {
410
- "$value": "oklch(0.548 0.004 265)",
423
+ "$value": "oklch(0.547 0.004 265)",
411
424
  "$extensions": {
412
425
  "bw": {
413
426
  "derived": "var(--bw-color-fg-subtle)"
@@ -431,7 +444,7 @@
431
444
  }
432
445
  },
433
446
  "breadcrumb-separator": {
434
- "$value": "oklch(0.548 0.004 265)",
447
+ "$value": "oklch(0.547 0.004 265)",
435
448
  "$extensions": {
436
449
  "bw": {
437
450
  "derived": "var(--bw-color-fg-subtle)"
@@ -456,7 +469,7 @@
456
469
  }
457
470
  },
458
471
  "surface-marketing-tint": {
459
- "$value": "oklch(0.2432 0.0241 255.99)",
472
+ "$value": "oklch(0.243 0.024 256.51)",
460
473
  "$description": "1.2.0 marketing token (BR-BW-MKT marketing tokens), AUTHORED for dark per BR-BW-TOK-002 (never derived from the light value). Mixed toward the dark surface at 12% (mirroring the light theme's own accent-toward-surface shape, unlike accent-subtle's mix-toward-black, which would read as near-black at this low a percentage on an already-dark surface): a faint lift off surface (dark surface L 0.18, surface-raised L 0.237) rather than a heavy tint; text placed on it clears WCAG AA in both themes (BR-BW-MKT-002). brickwork#289: hue corrected from 263.68 to 255.99, the true resolved hue of mixing two chromatic sides (accent and the dark surface's own C 0.005) in Cartesian oklab; the previous value was computed by a circular hue-angle approximation the test harness used before that model was corrected, and never matched what color-mix(in oklab) actually renders.",
461
474
  "$extensions": {
462
475
  "bw": {
@@ -465,7 +478,7 @@
465
478
  }
466
479
  },
467
480
  "stage-wash": {
468
- "$value": "oklch(0.707 0.165 254 / 0.16)",
481
+ "$value": "oklch(0.707 0.165 254.62 / 0.16)",
469
482
  "$description": "4.2.0 soft-stage wash (BR-BW-MKT-007 / #570), AUTHORED for dark: accent at 16% over transparent. Stronger than light so the wash reads on an already-dark surface. Text stays on the band surface, not on this wash.",
470
483
  "$extensions": {
471
484
  "bw": {
@@ -474,7 +487,7 @@
474
487
  }
475
488
  },
476
489
  "stage-grid": {
477
- "$value": "oklch(0.274 0.006 286.033 / 0.7)",
490
+ "$value": "oklch(0.274 0.006 286.03 / 0.7)",
478
491
  "$description": "4.2.0 soft-stage grid line (BR-BW-MKT-007 / #570), AUTHORED for dark: border at 70% over transparent so the grid stays visible on graphite.",
479
492
  "$extensions": {
480
493
  "bw": {
@@ -628,7 +641,7 @@
628
641
  "$value": "oklch(1 0 0 / 0.12)"
629
642
  },
630
643
  "selected-bg": {
631
- "$value": "oklch(0.212 0.05 254)",
644
+ "$value": "oklch(0.212 0.05 254.62)",
632
645
  "$extensions": {
633
646
  "bw": {
634
647
  "derived": "var(--bw-color-accent-subtle)"
@@ -658,20 +671,45 @@
658
671
  "$value": "0 20px 25px -5px oklch(0 0 0 / 0.5), 0 8px 10px -6px oklch(0 0 0 / 0.4), inset 0 1px 0 0 oklch(1 0 0 / 0.06)"
659
672
  },
660
673
  "ambient-1": {
661
- "$value": "none",
662
- "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97)."
674
+ "$value": "0 0 0 0 transparent",
675
+ "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97). A valid zero shadow, not none: none inside a box-shadow list invalidates the whole declaration, which is why components used to need per-theme resets."
663
676
  },
664
677
  "ambient-2": {
665
- "$value": "none",
666
- "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97)."
678
+ "$value": "0 0 0 0 transparent",
679
+ "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97). A valid zero shadow, not none: none inside a box-shadow list invalidates the whole declaration, which is why components used to need per-theme resets."
667
680
  },
668
681
  "ambient-3": {
669
- "$value": "none",
670
- "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97)."
682
+ "$value": "0 0 0 0 transparent",
683
+ "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97). A valid zero shadow, not none: none inside a box-shadow list invalidates the whole declaration, which is why components used to need per-theme resets."
671
684
  },
672
685
  "ambient-4": {
673
- "$value": "none",
674
- "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97)."
686
+ "$value": "0 0 0 0 transparent",
687
+ "$description": "Light-theme soft ambient; dark elevation tokens already carry depth (#97). A valid zero shadow, not none: none inside a box-shadow list invalidates the whole declaration, which is why components used to need per-theme resets."
688
+ },
689
+ "control-bevel": {
690
+ "$value": "inset 0 1px 0 0 oklch(1 0 0 / 0.12)",
691
+ "$description": "Catch-light on the top edge of a filled button (resting and hover)."
692
+ },
693
+ "control-pressed": {
694
+ "$value": "inset 0 1px 2px 0 oklch(0 0 0 / 0.2)",
695
+ "$description": "Inner shadow on a pressed (active) button."
696
+ },
697
+ "control-inset": {
698
+ "$value": "inset 0 1px 2px 0 oklch(0 0 0 / 0.04)",
699
+ "$description": "Faint inner shadow on text inputs, selects and the combobox field."
700
+ },
701
+ "panel-highlight": {
702
+ "$value": "inset 0 0 0 0 transparent",
703
+ "$description": "Top-edge catch-light on floating panels (theme switch, account menu, combobox listbox). Dark elevation levels carry their own highlight, so dark sets a zero shadow."
704
+ },
705
+ "floating": {
706
+ "$value": "0 4px 6px -1px oklch(0 0 0 / 0.4), 0 2px 4px -2px oklch(0 0 0 / 0.3), inset 0 1px 0 0 oklch(1 0 0 / 0.04)",
707
+ "$description": "Shadow under the smallest floating layer (tooltip bubble). Derived from the elevation ramp so a brand that retunes the ramp moves it too: one step above the resting panel level on dark, where it must lift off the canvas.",
708
+ "$extensions": {
709
+ "bw": {
710
+ "derived": "var(--bw-elevation-3)"
711
+ }
712
+ }
675
713
  }
676
714
  }
677
715
  }