@bwui/tokens 0.1.5 → 0.1.7

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.
@@ -240,6 +240,36 @@
240
240
  "light": "1.25"
241
241
  }
242
242
  },
243
+ "bw-size-text-step-xs": {
244
+ "type": "COLOR_OR_FLOAT",
245
+ "valuesByMode": {
246
+ "light": "0.875"
247
+ }
248
+ },
249
+ "bw-size-text-step-sm": {
250
+ "type": "COLOR_OR_FLOAT",
251
+ "valuesByMode": {
252
+ "light": "0.9375"
253
+ }
254
+ },
255
+ "bw-size-text-step-md": {
256
+ "type": "COLOR_OR_FLOAT",
257
+ "valuesByMode": {
258
+ "light": "1"
259
+ }
260
+ },
261
+ "bw-size-text-step-lg": {
262
+ "type": "COLOR_OR_FLOAT",
263
+ "valuesByMode": {
264
+ "light": "1.125"
265
+ }
266
+ },
267
+ "bw-size-text-step-xl": {
268
+ "type": "COLOR_OR_FLOAT",
269
+ "valuesByMode": {
270
+ "light": "1.25"
271
+ }
272
+ },
243
273
  "bw-size-control-height-xs": {
244
274
  "type": "COLOR_OR_FLOAT",
245
275
  "valuesByMode": {
@@ -360,6 +390,36 @@
360
390
  "light": "var(--bw-space-3)"
361
391
  }
362
392
  },
393
+ "bw-size-control-font-size-xs": {
394
+ "type": "COLOR_OR_FLOAT",
395
+ "valuesByMode": {
396
+ "light": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)))"
397
+ }
398
+ },
399
+ "bw-size-control-font-size-sm": {
400
+ "type": "COLOR_OR_FLOAT",
401
+ "valuesByMode": {
402
+ "light": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)))"
403
+ }
404
+ },
405
+ "bw-size-control-font-size-md": {
406
+ "type": "COLOR_OR_FLOAT",
407
+ "valuesByMode": {
408
+ "light": "var(--bw-text-label-size)"
409
+ }
410
+ },
411
+ "bw-size-control-font-size-lg": {
412
+ "type": "COLOR_OR_FLOAT",
413
+ "valuesByMode": {
414
+ "light": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)))"
415
+ }
416
+ },
417
+ "bw-size-control-font-size-xl": {
418
+ "type": "COLOR_OR_FLOAT",
419
+ "valuesByMode": {
420
+ "light": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)))"
421
+ }
422
+ },
363
423
  "bw-size-touch-target-min": {
364
424
  "type": "COLOR_OR_FLOAT",
365
425
  "valuesByMode": {
@@ -420,6 +480,12 @@
420
480
  "light": "var(--bw-size-control-gap-md)"
421
481
  }
422
482
  },
483
+ "bw-control-font-size": {
484
+ "type": "COLOR_OR_FLOAT",
485
+ "valuesByMode": {
486
+ "light": "var(--bw-size-control-font-size-md)"
487
+ }
488
+ },
423
489
  "bw-component-icon-stroke-width": {
424
490
  "type": "COLOR_OR_FLOAT",
425
491
  "valuesByMode": {
@@ -235,6 +235,7 @@
235
235
  "--bw-component-toggle-track-width",
236
236
  "--bw-component-tooltip-max-width",
237
237
  "--bw-component-topbar-position",
238
+ "--bw-control-font-size",
238
239
  "--bw-control-gap",
239
240
  "--bw-control-height",
240
241
  "--bw-control-icon-size",
@@ -317,6 +318,11 @@
317
318
  "--bw-size-border-hairline",
318
319
  "--bw-size-border-nav-marker",
319
320
  "--bw-size-border-thick",
321
+ "--bw-size-control-font-size-lg",
322
+ "--bw-size-control-font-size-md",
323
+ "--bw-size-control-font-size-sm",
324
+ "--bw-size-control-font-size-xl",
325
+ "--bw-size-control-font-size-xs",
320
326
  "--bw-size-control-gap-lg",
321
327
  "--bw-size-control-gap-md",
322
328
  "--bw-size-control-gap-sm",
@@ -347,6 +353,11 @@
347
353
  "--bw-size-step-sm",
348
354
  "--bw-size-step-xl",
349
355
  "--bw-size-step-xs",
356
+ "--bw-size-text-step-lg",
357
+ "--bw-size-text-step-md",
358
+ "--bw-size-text-step-sm",
359
+ "--bw-size-text-step-xl",
360
+ "--bw-size-text-step-xs",
350
361
  "--bw-size-touch-target-min",
351
362
  "--bw-space-0",
352
363
  "--bw-space-0-5",
package/dist/tokens.css CHANGED
@@ -44,6 +44,11 @@
44
44
  --bw-size-step-md: 1;
45
45
  --bw-size-step-lg: 1.125;
46
46
  --bw-size-step-xl: 1.25;
47
+ --bw-size-text-step-xs: 0.875;
48
+ --bw-size-text-step-sm: 0.9375;
49
+ --bw-size-text-step-md: 1;
50
+ --bw-size-text-step-lg: 1.125;
51
+ --bw-size-text-step-xl: 1.25;
47
52
  --bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
48
53
  --bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
49
54
  --bw-size-control-height-md: var(--bw-density-control-height);
@@ -64,6 +69,11 @@
64
69
  --bw-size-control-gap-md: var(--bw-space-2);
65
70
  --bw-size-control-gap-lg: var(--bw-space-3);
66
71
  --bw-size-control-gap-xl: var(--bw-space-3);
72
+ --bw-size-control-font-size-xs: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)));
73
+ --bw-size-control-font-size-sm: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)));
74
+ --bw-size-control-font-size-md: var(--bw-text-label-size);
75
+ --bw-size-control-font-size-lg: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)));
76
+ --bw-size-control-font-size-xl: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)));
67
77
  --bw-size-touch-target-min: 2.75rem;
68
78
  --bw-size-max-width-prose: 65ch;
69
79
  --bw-size-max-width-form: 32rem;
@@ -74,6 +84,7 @@
74
84
  --bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
75
85
  --bw-control-icon-size: var(--bw-size-control-icon-md);
76
86
  --bw-control-gap: var(--bw-size-control-gap-md);
87
+ --bw-control-font-size: var(--bw-size-control-font-size-md);
77
88
  --bw-component-icon-size-sm: 1rem;
78
89
  --bw-component-icon-size-md: 1.25rem;
79
90
  --bw-component-icon-size-lg: 1.5rem;
@@ -640,10 +651,16 @@
640
651
  --bw-size-control-gap-md: var(--bw-space-2);
641
652
  --bw-size-control-gap-lg: var(--bw-space-3);
642
653
  --bw-size-control-gap-xl: var(--bw-space-3);
654
+ --bw-size-control-font-size-xs: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)));
655
+ --bw-size-control-font-size-sm: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)));
656
+ --bw-size-control-font-size-md: var(--bw-text-label-size);
657
+ --bw-size-control-font-size-lg: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)));
658
+ --bw-size-control-font-size-xl: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)));
643
659
  --bw-control-height: var(--bw-size-control-height-md);
644
660
  --bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
645
661
  --bw-control-icon-size: var(--bw-size-control-icon-md);
646
662
  --bw-control-gap: var(--bw-size-control-gap-md);
663
+ --bw-control-font-size: var(--bw-size-control-font-size-md);
647
664
  }
648
665
 
649
666
  [data-density="compact"] {
@@ -680,10 +697,16 @@
680
697
  --bw-size-control-gap-md: var(--bw-space-2);
681
698
  --bw-size-control-gap-lg: var(--bw-space-3);
682
699
  --bw-size-control-gap-xl: var(--bw-space-3);
700
+ --bw-size-control-font-size-xs: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)));
701
+ --bw-size-control-font-size-sm: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)));
702
+ --bw-size-control-font-size-md: var(--bw-text-label-size);
703
+ --bw-size-control-font-size-lg: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)));
704
+ --bw-size-control-font-size-xl: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)));
683
705
  --bw-control-height: var(--bw-size-control-height-md);
684
706
  --bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
685
707
  --bw-control-icon-size: var(--bw-size-control-icon-md);
686
708
  --bw-control-gap: var(--bw-size-control-gap-md);
709
+ --bw-control-font-size: var(--bw-size-control-font-size-md);
687
710
  }
688
711
 
689
712
  [data-density="spacious"] {
@@ -720,10 +743,16 @@
720
743
  --bw-size-control-gap-md: var(--bw-space-2);
721
744
  --bw-size-control-gap-lg: var(--bw-space-3);
722
745
  --bw-size-control-gap-xl: var(--bw-space-3);
746
+ --bw-size-control-font-size-xs: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)));
747
+ --bw-size-control-font-size-sm: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)));
748
+ --bw-size-control-font-size-md: var(--bw-text-label-size);
749
+ --bw-size-control-font-size-lg: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)));
750
+ --bw-size-control-font-size-xl: max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)));
723
751
  --bw-control-height: var(--bw-size-control-height-md);
724
752
  --bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
725
753
  --bw-control-icon-size: var(--bw-size-control-icon-md);
726
754
  --bw-control-gap: var(--bw-size-control-gap-md);
755
+ --bw-control-font-size: var(--bw-size-control-font-size-md);
727
756
  }
728
757
 
729
758
  :root {
@@ -949,6 +949,25 @@
949
949
  "$value": 1.25
950
950
  }
951
951
  },
952
+ "text-step": {
953
+ "$type": "number",
954
+ "$description": "ADR-125 and ADR-126 section 4: unitless multipliers applied to the label type size so a control's text follows its step. Deliberately gentler than the box multipliers (--bw-size-step-*): type has a legibility floor, so xs may not fall to 0.75 of the label (10.5 px at the 14 px label). The resolved size is clamped to --bw-font-size-xs. Starting ratios; the shape is fixed.",
955
+ "xs": {
956
+ "$value": 0.875
957
+ },
958
+ "sm": {
959
+ "$value": 0.9375
960
+ },
961
+ "md": {
962
+ "$value": 1
963
+ },
964
+ "lg": {
965
+ "$value": 1.125
966
+ },
967
+ "xl": {
968
+ "$value": 1.25
969
+ }
970
+ },
952
971
  "control-height": {
953
972
  "$description": "ADR-125: computed, never authored per step. density control height x step multiplier, clamped to the 1.5rem WCAG 2.5.8 floor (md is the base and is not clamped). Re-emitted inside every [data-density] block so a density scoped to a subtree re-resolves the whole scale.",
954
973
  "xs": {
@@ -1021,6 +1040,24 @@
1021
1040
  "$value": "var(--bw-space-3)"
1022
1041
  }
1023
1042
  },
1043
+ "control-font-size": {
1044
+ "$description": "ADR-126 section 4: label type size inside a control, by step. md is the label role size (--bw-text-label-size, the type ramp's label); the other steps are that size times --bw-size-text-step-<step>, clamped to the --bw-font-size-xs legibility floor (TYP-022), so text resizes with the box, the icon and the gap. Density does not change it. Re-emitted inside every [data-density] block beside the other resolved control tokens.",
1045
+ "xs": {
1046
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)))"
1047
+ },
1048
+ "sm": {
1049
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)))"
1050
+ },
1051
+ "md": {
1052
+ "$value": "var(--bw-text-label-size)"
1053
+ },
1054
+ "lg": {
1055
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)))"
1056
+ },
1057
+ "xl": {
1058
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)))"
1059
+ }
1060
+ },
1024
1061
  "touch-target-min": {
1025
1062
  "$value": "2.75rem"
1026
1063
  },
@@ -1056,6 +1093,9 @@
1056
1093
  },
1057
1094
  "gap": {
1058
1095
  "$value": "var(--bw-size-control-gap-md)"
1096
+ },
1097
+ "font-size": {
1098
+ "$value": "var(--bw-size-control-font-size-md)"
1059
1099
  }
1060
1100
  },
1061
1101
  "color": {
package/dist/tokens.js CHANGED
@@ -130,6 +130,7 @@ export const tokens = Object.freeze({
130
130
  "component_toggle_track_width": "var(--bw-component-toggle-track-width)",
131
131
  "component_tooltip_max_width": "var(--bw-component-tooltip-max-width)",
132
132
  "component_topbar_position": "var(--bw-component-topbar-position)",
133
+ "control_font_size": "var(--bw-control-font-size)",
133
134
  "control_gap": "var(--bw-control-gap)",
134
135
  "control_height": "var(--bw-control-height)",
135
136
  "control_icon_size": "var(--bw-control-icon-size)",
@@ -271,6 +272,11 @@ export const tokens = Object.freeze({
271
272
  "size_border_hairline": "var(--bw-size-border-hairline)",
272
273
  "size_border_nav_marker": "var(--bw-size-border-nav-marker)",
273
274
  "size_border_thick": "var(--bw-size-border-thick)",
275
+ "size_control_font_size_lg": "var(--bw-size-control-font-size-lg)",
276
+ "size_control_font_size_md": "var(--bw-size-control-font-size-md)",
277
+ "size_control_font_size_sm": "var(--bw-size-control-font-size-sm)",
278
+ "size_control_font_size_xl": "var(--bw-size-control-font-size-xl)",
279
+ "size_control_font_size_xs": "var(--bw-size-control-font-size-xs)",
274
280
  "size_control_gap_lg": "var(--bw-size-control-gap-lg)",
275
281
  "size_control_gap_md": "var(--bw-size-control-gap-md)",
276
282
  "size_control_gap_sm": "var(--bw-size-control-gap-sm)",
@@ -301,6 +307,11 @@ export const tokens = Object.freeze({
301
307
  "size_step_sm": "var(--bw-size-step-sm)",
302
308
  "size_step_xl": "var(--bw-size-step-xl)",
303
309
  "size_step_xs": "var(--bw-size-step-xs)",
310
+ "size_text_step_lg": "var(--bw-size-text-step-lg)",
311
+ "size_text_step_md": "var(--bw-size-text-step-md)",
312
+ "size_text_step_sm": "var(--bw-size-text-step-sm)",
313
+ "size_text_step_xl": "var(--bw-size-text-step-xl)",
314
+ "size_text_step_xs": "var(--bw-size-text-step-xs)",
304
315
  "size_touch_target_min": "var(--bw-size-touch-target-min)",
305
316
  "space_0": "var(--bw-space-0)",
306
317
  "space_0_5": "var(--bw-space-0-5)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwui/tokens",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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,
@@ -331,6 +331,25 @@
331
331
  "$value": 1.25
332
332
  }
333
333
  },
334
+ "text-step": {
335
+ "$type": "number",
336
+ "$description": "ADR-125 and ADR-126 section 4: unitless multipliers applied to the label type size so a control's text follows its step. Deliberately gentler than the box multipliers (--bw-size-step-*): type has a legibility floor, so xs may not fall to 0.75 of the label (10.5 px at the 14 px label). The resolved size is clamped to --bw-font-size-xs. Starting ratios; the shape is fixed.",
337
+ "xs": {
338
+ "$value": 0.875
339
+ },
340
+ "sm": {
341
+ "$value": 0.9375
342
+ },
343
+ "md": {
344
+ "$value": 1
345
+ },
346
+ "lg": {
347
+ "$value": 1.125
348
+ },
349
+ "xl": {
350
+ "$value": 1.25
351
+ }
352
+ },
334
353
  "control-height": {
335
354
  "$description": "ADR-125: computed, never authored per step. density control height x step multiplier, clamped to the 1.5rem WCAG 2.5.8 floor (md is the base and is not clamped). Re-emitted inside every [data-density] block so a density scoped to a subtree re-resolves the whole scale.",
336
355
  "xs": {
@@ -403,6 +422,24 @@
403
422
  "$value": "var(--bw-space-3)"
404
423
  }
405
424
  },
425
+ "control-font-size": {
426
+ "$description": "ADR-126 section 4: label type size inside a control, by step. md is the label role size (--bw-text-label-size, the type ramp's label); the other steps are that size times --bw-size-text-step-<step>, clamped to the --bw-font-size-xs legibility floor (TYP-022), so text resizes with the box, the icon and the gap. Density does not change it. Re-emitted inside every [data-density] block beside the other resolved control tokens.",
427
+ "xs": {
428
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xs)))"
429
+ },
430
+ "sm": {
431
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-sm)))"
432
+ },
433
+ "md": {
434
+ "$value": "var(--bw-text-label-size)"
435
+ },
436
+ "lg": {
437
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-lg)))"
438
+ },
439
+ "xl": {
440
+ "$value": "max(var(--bw-font-size-xs), calc(var(--bw-text-label-size) * var(--bw-size-text-step-xl)))"
441
+ }
442
+ },
406
443
  "touch-target-min": {
407
444
  "$value": "2.75rem"
408
445
  },
@@ -438,6 +475,9 @@
438
475
  },
439
476
  "gap": {
440
477
  "$value": "var(--bw-size-control-gap-md)"
478
+ },
479
+ "font-size": {
480
+ "$value": "var(--bw-size-control-font-size-md)"
441
481
  }
442
482
  }
443
483
  }