@bwui/tokens 0.1.14 → 0.1.15

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.
@@ -189,25 +189,25 @@
189
189
  "bw-component-icon-size-md": {
190
190
  "type": "COLOR_OR_FLOAT",
191
191
  "valuesByMode": {
192
- "light": "1.25rem"
192
+ "light": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-md))"
193
193
  }
194
194
  },
195
195
  "bw-component-icon-size-lg": {
196
196
  "type": "COLOR_OR_FLOAT",
197
197
  "valuesByMode": {
198
- "light": "1.5rem"
198
+ "light": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-lg))"
199
199
  }
200
200
  },
201
201
  "bw-component-icon-size-xl": {
202
202
  "type": "COLOR_OR_FLOAT",
203
203
  "valuesByMode": {
204
- "light": "2rem"
204
+ "light": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-xl))"
205
205
  }
206
206
  },
207
207
  "bw-component-icon-size-2xl": {
208
208
  "type": "COLOR_OR_FLOAT",
209
209
  "valuesByMode": {
210
- "light": "2.5rem"
210
+ "light": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-2xl))"
211
211
  }
212
212
  },
213
213
  "bw-size-step-xs": {
@@ -522,6 +522,36 @@
522
522
  "light": "var(--bw-font-size-md)"
523
523
  }
524
524
  },
525
+ "bw-icon-scale-sm": {
526
+ "type": "COLOR_OR_FLOAT",
527
+ "valuesByMode": {
528
+ "light": "1"
529
+ }
530
+ },
531
+ "bw-icon-scale-md": {
532
+ "type": "COLOR_OR_FLOAT",
533
+ "valuesByMode": {
534
+ "light": "1.25"
535
+ }
536
+ },
537
+ "bw-icon-scale-lg": {
538
+ "type": "COLOR_OR_FLOAT",
539
+ "valuesByMode": {
540
+ "light": "1.5"
541
+ }
542
+ },
543
+ "bw-icon-scale-xl": {
544
+ "type": "COLOR_OR_FLOAT",
545
+ "valuesByMode": {
546
+ "light": "2"
547
+ }
548
+ },
549
+ "bw-icon-scale-2xl": {
550
+ "type": "COLOR_OR_FLOAT",
551
+ "valuesByMode": {
552
+ "light": "2.5"
553
+ }
554
+ },
525
555
  "bw-component-icon-stroke-width": {
526
556
  "type": "COLOR_OR_FLOAT",
527
557
  "valuesByMode": {
@@ -325,6 +325,11 @@
325
325
  "--bw-font-weight-medium",
326
326
  "--bw-font-weight-normal",
327
327
  "--bw-font-weight-semibold",
328
+ "--bw-icon-scale-2xl",
329
+ "--bw-icon-scale-lg",
330
+ "--bw-icon-scale-md",
331
+ "--bw-icon-scale-sm",
332
+ "--bw-icon-scale-xl",
328
333
  "--bw-opacity-muted",
329
334
  "--bw-opacity-sort-idle",
330
335
  "--bw-radius-2xl",
package/dist/tokens.css CHANGED
@@ -35,10 +35,10 @@
35
35
  --bw-size-border-thick: 2px;
36
36
  --bw-size-border-nav-marker: 3px;
37
37
  --bw-component-icon-size-sm: 1rem;
38
- --bw-component-icon-size-md: 1.25rem;
39
- --bw-component-icon-size-lg: 1.5rem;
40
- --bw-component-icon-size-xl: 2rem;
41
- --bw-component-icon-size-2xl: 2.5rem;
38
+ --bw-component-icon-size-md: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-md));
39
+ --bw-component-icon-size-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-lg));
40
+ --bw-component-icon-size-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-xl));
41
+ --bw-component-icon-size-2xl: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-2xl));
42
42
  --bw-size-step-xs: 0.75;
43
43
  --bw-size-step-sm: 0.875;
44
44
  --bw-size-step-md: 1;
@@ -92,10 +92,15 @@
92
92
  --bw-control-gap: var(--bw-size-control-gap-md);
93
93
  --bw-control-font-size: var(--bw-font-size-md);
94
94
  --bw-component-icon-size-sm: 1rem;
95
- --bw-component-icon-size-md: 1.25rem;
96
- --bw-component-icon-size-lg: 1.5rem;
97
- --bw-component-icon-size-xl: 2rem;
98
- --bw-component-icon-size-2xl: 2.5rem;
95
+ --bw-component-icon-size-md: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-md));
96
+ --bw-component-icon-size-lg: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-lg));
97
+ --bw-component-icon-size-xl: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-xl));
98
+ --bw-component-icon-size-2xl: calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-2xl));
99
+ --bw-icon-scale-sm: 1;
100
+ --bw-icon-scale-md: 1.25;
101
+ --bw-icon-scale-lg: 1.5;
102
+ --bw-icon-scale-xl: 2;
103
+ --bw-icon-scale-2xl: 2.5;
99
104
  --bw-component-icon-stroke-width: 2;
100
105
  --bw-component-button-radius: var(--bw-radius-md);
101
106
  --bw-component-button-elevation: var(--bw-elevation-1);
@@ -37,6 +37,25 @@
37
37
  "$value": "{size.icon.2xl}"
38
38
  }
39
39
  },
40
+ "scale": {
41
+ "$type": "number",
42
+ "$description": "OQ-SZ-3: unitless display-icon multipliers applied to --bw-component-icon-size-sm. Icon-owned: deliberately not --bw-size-step-* (control glyphs need a tight band) and not --bw-font-scale-* (density must not resize icons). sm is the base (1). Starting ratios keep the shipped rem table: 1, 1.25, 1.5, 2, 2.5.",
43
+ "sm": {
44
+ "$value": 1
45
+ },
46
+ "md": {
47
+ "$value": 1.25
48
+ },
49
+ "lg": {
50
+ "$value": 1.5
51
+ },
52
+ "xl": {
53
+ "$value": 2
54
+ },
55
+ "2xl": {
56
+ "$value": 2.5
57
+ }
58
+ },
40
59
  "stroke-width": {
41
60
  "$type": "dimension",
42
61
  "$value": "2"
@@ -1745,20 +1764,22 @@
1745
1764
  }
1746
1765
  },
1747
1766
  "icon": {
1767
+ "$description": "OQ-SZ-3: display and standalone icon ramp. Base is sm (1rem), shared with control-icon md. Other steps are that base times --bw-icon-scale-<step>. Not --bw-size-step-* (those stay in the tight control band 0.75 to 1.25rem); density does not change it. Public Icon size vocabulary is sm to 2xl; sm is the base step on this axis.",
1748
1768
  "sm": {
1749
- "$value": "1rem"
1769
+ "$value": "1rem",
1770
+ "$description": "Display icon base. Control icon md is this token; retune one place to move both axes together."
1750
1771
  },
1751
1772
  "md": {
1752
- "$value": "1.25rem"
1773
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-md))"
1753
1774
  },
1754
1775
  "lg": {
1755
- "$value": "1.5rem"
1776
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-lg))"
1756
1777
  },
1757
1778
  "xl": {
1758
- "$value": "2rem"
1779
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-xl))"
1759
1780
  },
1760
1781
  "2xl": {
1761
- "$value": "2.5rem"
1782
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-2xl))"
1762
1783
  }
1763
1784
  },
1764
1785
  "step": {
@@ -1871,7 +1892,7 @@
1871
1892
  }
1872
1893
  },
1873
1894
  "inset": {
1874
- "$description": "ADR-126 sections 5 and 6 / SIZE-COVERAGE gate 5: container inset scale. md is --bw-density-card-padding; other steps start from the shared control multipliers (OQ-SZ-4 provisional). Re-emitted inside every [data-density] block. The bw-inset primitive reads these; card, stat and chip adopt in gate 6 (#43).",
1895
+ "$description": "ADR-126 sections 5 and 6 / SIZE-COVERAGE gate 5: container inset scale. md is --bw-density-card-padding; other steps use the shared control multipliers (OQ-SZ-4 settled 2026-11-22: keep). Re-emitted inside every [data-density] block. The bw-inset primitive reads these; card, stat and chip adopt in gate 6 (#43).",
1875
1896
  "xs": {
1876
1897
  "$value": "calc(var(--bw-density-card-padding) * var(--bw-size-step-xs))"
1877
1898
  },
package/dist/tokens.js CHANGED
@@ -220,6 +220,11 @@ export const tokens = Object.freeze({
220
220
  "font_weight_medium": "var(--bw-font-weight-medium)",
221
221
  "font_weight_normal": "var(--bw-font-weight-normal)",
222
222
  "font_weight_semibold": "var(--bw-font-weight-semibold)",
223
+ "icon_scale_2xl": "var(--bw-icon-scale-2xl)",
224
+ "icon_scale_lg": "var(--bw-icon-scale-lg)",
225
+ "icon_scale_md": "var(--bw-icon-scale-md)",
226
+ "icon_scale_sm": "var(--bw-icon-scale-sm)",
227
+ "icon_scale_xl": "var(--bw-icon-scale-xl)",
223
228
  "opacity_muted": "var(--bw-opacity-muted)",
224
229
  "opacity_sort_idle": "var(--bw-opacity-sort-idle)",
225
230
  "primitive_amber_100": "var(--bw-primitive-amber-100)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwui/tokens",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
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,
@@ -24,6 +24,10 @@
24
24
  "./manifest": "./dist/token-manifest.json",
25
25
  "./palette.css": "./dist/palette.css"
26
26
  },
27
+ "scripts": {
28
+ "build": "node scripts/build.mjs",
29
+ "test": "node --test \"test/*.test.mjs\""
30
+ },
27
31
  "dependencies": {
28
32
  "style-dictionary": "^4.3.0"
29
33
  },
@@ -37,9 +41,5 @@
37
41
  },
38
42
  "publishConfig": {
39
43
  "access": "public"
40
- },
41
- "scripts": {
42
- "build": "node scripts/build.mjs",
43
- "test": "node --test \"test/*.test.mjs\""
44
44
  }
45
- }
45
+ }
@@ -19,6 +19,25 @@
19
19
  "$value": "{size.icon.2xl}"
20
20
  }
21
21
  },
22
+ "scale": {
23
+ "$type": "number",
24
+ "$description": "OQ-SZ-3: unitless display-icon multipliers applied to --bw-component-icon-size-sm. Icon-owned: deliberately not --bw-size-step-* (control glyphs need a tight band) and not --bw-font-scale-* (density must not resize icons). sm is the base (1). Starting ratios keep the shipped rem table: 1, 1.25, 1.5, 2, 2.5.",
25
+ "sm": {
26
+ "$value": 1
27
+ },
28
+ "md": {
29
+ "$value": 1.25
30
+ },
31
+ "lg": {
32
+ "$value": 1.5
33
+ },
34
+ "xl": {
35
+ "$value": 2
36
+ },
37
+ "2xl": {
38
+ "$value": 2.5
39
+ }
40
+ },
22
41
  "stroke-width": {
23
42
  "$type": "dimension",
24
43
  "$value": "2"
@@ -1071,20 +1071,22 @@
1071
1071
  }
1072
1072
  },
1073
1073
  "icon": {
1074
+ "$description": "OQ-SZ-3: display and standalone icon ramp. Base is sm (1rem), shared with control-icon md. Other steps are that base times --bw-icon-scale-<step>. Not --bw-size-step-* (those stay in the tight control band 0.75 to 1.25rem); density does not change it. Public Icon size vocabulary is sm to 2xl; sm is the base step on this axis.",
1074
1075
  "sm": {
1075
- "$value": "1rem"
1076
+ "$value": "1rem",
1077
+ "$description": "Display icon base. Control icon md is this token; retune one place to move both axes together."
1076
1078
  },
1077
1079
  "md": {
1078
- "$value": "1.25rem"
1080
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-md))"
1079
1081
  },
1080
1082
  "lg": {
1081
- "$value": "1.5rem"
1083
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-lg))"
1082
1084
  },
1083
1085
  "xl": {
1084
- "$value": "2rem"
1086
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-xl))"
1085
1087
  },
1086
1088
  "2xl": {
1087
- "$value": "2.5rem"
1089
+ "$value": "calc(var(--bw-component-icon-size-sm) * var(--bw-icon-scale-2xl))"
1088
1090
  }
1089
1091
  },
1090
1092
  "step": {
@@ -1197,7 +1199,7 @@
1197
1199
  }
1198
1200
  },
1199
1201
  "inset": {
1200
- "$description": "ADR-126 sections 5 and 6 / SIZE-COVERAGE gate 5: container inset scale. md is --bw-density-card-padding; other steps start from the shared control multipliers (OQ-SZ-4 provisional). Re-emitted inside every [data-density] block. The bw-inset primitive reads these; card, stat and chip adopt in gate 6 (#43).",
1202
+ "$description": "ADR-126 sections 5 and 6 / SIZE-COVERAGE gate 5: container inset scale. md is --bw-density-card-padding; other steps use the shared control multipliers (OQ-SZ-4 settled 2026-11-22: keep). Re-emitted inside every [data-density] block. The bw-inset primitive reads these; card, stat and chip adopt in gate 6 (#43).",
1201
1203
  "xs": {
1202
1204
  "$value": "calc(var(--bw-density-card-padding) * var(--bw-size-step-xs))"
1203
1205
  },