@bwui/tokens 0.1.2 → 0.1.4
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/README.md +43 -0
- package/dist/figma-variables.json +74 -2
- package/dist/token-manifest.json +81 -2
- package/dist/tokens.css +44 -2
- package/dist/tokens.dtcg.json +46 -2
- package/dist/tokens.js +12 -0
- package/package.json +7 -3
- package/src/dtcg/primitive.tokens.json +46 -2
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# `@bwui/tokens`
|
|
2
|
+
|
|
3
|
+
Brickwork design tokens: the platform-neutral source of truth. CSS custom
|
|
4
|
+
properties (`--bw-*`), a JS module, a Tailwind theme fragment, and a DTCG
|
|
5
|
+
JSON export all come from the same build.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @bwui/tokens
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
@import "@bwui/tokens/tokens.css";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { tokens } from "@bwui/tokens";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
@import "tailwindcss";
|
|
21
|
+
@import "@bwui/tokens/tailwind-theme.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## What to consume
|
|
25
|
+
|
|
26
|
+
| Import | Use |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `@bwui/tokens/tokens.css` | `--bw-*` custom properties |
|
|
29
|
+
| `@bwui/tokens` | JS token object |
|
|
30
|
+
| `@bwui/tokens/tailwind-theme.css` | Tailwind 4 `@theme` fragment |
|
|
31
|
+
| `@bwui/tokens/manifest` | Machine inventory of authored tokens |
|
|
32
|
+
|
|
33
|
+
Do not invent token names. Override values in your own stylesheet loaded
|
|
34
|
+
after this one. Brickwork owns the names; you own the values.
|
|
35
|
+
|
|
36
|
+
## Stack mates
|
|
37
|
+
|
|
38
|
+
- CSS primitives: `@bwui/css`
|
|
39
|
+
- HTML behaviours: `@bwui/js`
|
|
40
|
+
- React: `@bwui/react`
|
|
41
|
+
- Django: `django-brickwork` on PyPI (the wheel vendors this package)
|
|
42
|
+
|
|
43
|
+
Agents: start at https://brickworkui.com/llms.txt and `/catalog.json`.
|
|
@@ -210,10 +210,46 @@
|
|
|
210
210
|
"light": "2.5rem"
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
+
"bw-size-step-xs": {
|
|
214
|
+
"type": "COLOR_OR_FLOAT",
|
|
215
|
+
"valuesByMode": {
|
|
216
|
+
"light": "0.75"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"bw-size-step-sm": {
|
|
220
|
+
"type": "COLOR_OR_FLOAT",
|
|
221
|
+
"valuesByMode": {
|
|
222
|
+
"light": "0.875"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"bw-size-step-md": {
|
|
226
|
+
"type": "COLOR_OR_FLOAT",
|
|
227
|
+
"valuesByMode": {
|
|
228
|
+
"light": "1"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"bw-size-step-lg": {
|
|
232
|
+
"type": "COLOR_OR_FLOAT",
|
|
233
|
+
"valuesByMode": {
|
|
234
|
+
"light": "1.125"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"bw-size-step-xl": {
|
|
238
|
+
"type": "COLOR_OR_FLOAT",
|
|
239
|
+
"valuesByMode": {
|
|
240
|
+
"light": "1.25"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"bw-size-control-height-xs": {
|
|
244
|
+
"type": "COLOR_OR_FLOAT",
|
|
245
|
+
"valuesByMode": {
|
|
246
|
+
"light": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)))"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
213
249
|
"bw-size-control-height-sm": {
|
|
214
250
|
"type": "COLOR_OR_FLOAT",
|
|
215
251
|
"valuesByMode": {
|
|
216
|
-
"light": "
|
|
252
|
+
"light": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)))"
|
|
217
253
|
}
|
|
218
254
|
},
|
|
219
255
|
"bw-size-control-height-md": {
|
|
@@ -225,7 +261,43 @@
|
|
|
225
261
|
"bw-size-control-height-lg": {
|
|
226
262
|
"type": "COLOR_OR_FLOAT",
|
|
227
263
|
"valuesByMode": {
|
|
228
|
-
"light": "
|
|
264
|
+
"light": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)))"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"bw-size-control-height-xl": {
|
|
268
|
+
"type": "COLOR_OR_FLOAT",
|
|
269
|
+
"valuesByMode": {
|
|
270
|
+
"light": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)))"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"bw-size-control-padding-inline-xs": {
|
|
274
|
+
"type": "COLOR_OR_FLOAT",
|
|
275
|
+
"valuesByMode": {
|
|
276
|
+
"light": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs))"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"bw-size-control-padding-inline-sm": {
|
|
280
|
+
"type": "COLOR_OR_FLOAT",
|
|
281
|
+
"valuesByMode": {
|
|
282
|
+
"light": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm))"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"bw-size-control-padding-inline-md": {
|
|
286
|
+
"type": "COLOR_OR_FLOAT",
|
|
287
|
+
"valuesByMode": {
|
|
288
|
+
"light": "var(--bw-density-control-padding-inline)"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"bw-size-control-padding-inline-lg": {
|
|
292
|
+
"type": "COLOR_OR_FLOAT",
|
|
293
|
+
"valuesByMode": {
|
|
294
|
+
"light": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg))"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"bw-size-control-padding-inline-xl": {
|
|
298
|
+
"type": "COLOR_OR_FLOAT",
|
|
299
|
+
"valuesByMode": {
|
|
300
|
+
"light": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl))"
|
|
229
301
|
}
|
|
230
302
|
},
|
|
231
303
|
"bw-size-touch-target-min": {
|
package/dist/token-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://brickwork.icvoss.dev/token-manifest/v1",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"description": "brickwork token contract: the load-bearing brand set and the full overridable --bw-* vocabulary. Generated from the DTCG source; do not edit by hand.",
|
|
4
|
+
"description": "brickwork token contract: the load-bearing brand set and its constraints (brickwork#39), the full overridable --bw-* vocabulary, and derived-pair contrast constraints (brickwork#289, distinct from loadBearing: a contrastPairs entry holds between two DERIVED tokens that a brand does not directly author but can still break by overriding one of their inputs). Generated from the DTCG source; do not edit by hand.",
|
|
5
5
|
"loadBearing": [
|
|
6
6
|
{
|
|
7
7
|
"name": "--bw-color-surface"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "--bw-color-fg-on-accent",
|
|
18
|
+
"authoredPerTheme": true,
|
|
18
19
|
"contrastPair": "--bw-color-accent",
|
|
19
20
|
"minContrast": 4.5
|
|
20
21
|
},
|
|
@@ -35,7 +36,73 @@
|
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
"name": "--bw-color-info",
|
|
38
|
-
"conditional": true
|
|
39
|
+
"conditional": true,
|
|
40
|
+
"collapsesTo": "--bw-color-accent"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"contrastPairs": [
|
|
44
|
+
{
|
|
45
|
+
"name": "--bw-color-action-disabled-text",
|
|
46
|
+
"derived": "color-mix(in oklab, var(--bw-color-fg) 62%, var(--bw-color-surface))",
|
|
47
|
+
"contrastPair": "--bw-color-action-disabled-bg",
|
|
48
|
+
"pairDerived": "color-mix(in oklab, var(--bw-color-surface) 96.5%, black)",
|
|
49
|
+
"minContrast": 4.5
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "--bw-color-danger-fg",
|
|
53
|
+
"derived": "color-mix(in oklab, var(--bw-color-danger) 87%, var(--bw-color-status-fg-ink))",
|
|
54
|
+
"contrastPair": "--bw-color-danger-subtle",
|
|
55
|
+
"pairDerived": "color-mix(in oklab, var(--bw-color-danger) 7%, var(--bw-color-surface))",
|
|
56
|
+
"minContrast": 4.5
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "--bw-color-danger-fg",
|
|
60
|
+
"derived": "color-mix(in oklab, var(--bw-color-danger) 87%, var(--bw-color-status-fg-ink))",
|
|
61
|
+
"contrastPair": "--bw-color-surface",
|
|
62
|
+
"pairDerived": "var(--bw-color-surface)",
|
|
63
|
+
"minContrast": 4.5
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "--bw-color-warning-fg",
|
|
67
|
+
"derived": "color-mix(in oklab, var(--bw-color-warning) 68%, var(--bw-color-status-fg-ink))",
|
|
68
|
+
"contrastPair": "--bw-color-warning-subtle",
|
|
69
|
+
"pairDerived": "color-mix(in oklab, var(--bw-color-warning) 7%, var(--bw-color-surface))",
|
|
70
|
+
"minContrast": 4.5
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "--bw-color-warning-fg",
|
|
74
|
+
"derived": "color-mix(in oklab, var(--bw-color-warning) 68%, var(--bw-color-status-fg-ink))",
|
|
75
|
+
"contrastPair": "--bw-color-surface",
|
|
76
|
+
"pairDerived": "var(--bw-color-surface)",
|
|
77
|
+
"minContrast": 4.5
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "--bw-color-success-fg",
|
|
81
|
+
"derived": "color-mix(in oklab, var(--bw-color-success) 69%, var(--bw-color-status-fg-ink))",
|
|
82
|
+
"contrastPair": "--bw-color-success-subtle",
|
|
83
|
+
"pairDerived": "color-mix(in oklab, var(--bw-color-success) 7%, var(--bw-color-surface))",
|
|
84
|
+
"minContrast": 4.5
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "--bw-color-success-fg",
|
|
88
|
+
"derived": "color-mix(in oklab, var(--bw-color-success) 69%, var(--bw-color-status-fg-ink))",
|
|
89
|
+
"contrastPair": "--bw-color-surface",
|
|
90
|
+
"pairDerived": "var(--bw-color-surface)",
|
|
91
|
+
"minContrast": 4.5
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "--bw-color-info-fg",
|
|
95
|
+
"derived": "color-mix(in oklab, var(--bw-color-info) 75%, var(--bw-color-status-fg-ink))",
|
|
96
|
+
"contrastPair": "--bw-color-info-subtle",
|
|
97
|
+
"pairDerived": "color-mix(in oklab, var(--bw-color-info) 7%, var(--bw-color-surface))",
|
|
98
|
+
"minContrast": 4.5
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "--bw-color-info-fg",
|
|
102
|
+
"derived": "color-mix(in oklab, var(--bw-color-info) 75%, var(--bw-color-status-fg-ink))",
|
|
103
|
+
"contrastPair": "--bw-color-surface",
|
|
104
|
+
"pairDerived": "var(--bw-color-surface)",
|
|
105
|
+
"minContrast": 4.5
|
|
39
106
|
}
|
|
40
107
|
],
|
|
41
108
|
"overridable": [
|
|
@@ -249,11 +316,23 @@
|
|
|
249
316
|
"--bw-size-control-height-lg",
|
|
250
317
|
"--bw-size-control-height-md",
|
|
251
318
|
"--bw-size-control-height-sm",
|
|
319
|
+
"--bw-size-control-height-xl",
|
|
320
|
+
"--bw-size-control-height-xs",
|
|
321
|
+
"--bw-size-control-padding-inline-lg",
|
|
322
|
+
"--bw-size-control-padding-inline-md",
|
|
323
|
+
"--bw-size-control-padding-inline-sm",
|
|
324
|
+
"--bw-size-control-padding-inline-xl",
|
|
325
|
+
"--bw-size-control-padding-inline-xs",
|
|
252
326
|
"--bw-size-max-width-form",
|
|
253
327
|
"--bw-size-max-width-modal-lg",
|
|
254
328
|
"--bw-size-max-width-modal-md",
|
|
255
329
|
"--bw-size-max-width-modal-sm",
|
|
256
330
|
"--bw-size-max-width-prose",
|
|
331
|
+
"--bw-size-step-lg",
|
|
332
|
+
"--bw-size-step-md",
|
|
333
|
+
"--bw-size-step-sm",
|
|
334
|
+
"--bw-size-step-xl",
|
|
335
|
+
"--bw-size-step-xs",
|
|
257
336
|
"--bw-size-touch-target-min",
|
|
258
337
|
"--bw-space-0",
|
|
259
338
|
"--bw-space-0-5",
|
package/dist/tokens.css
CHANGED
|
@@ -39,9 +39,21 @@
|
|
|
39
39
|
--bw-component-icon-size-lg: 1.5rem;
|
|
40
40
|
--bw-component-icon-size-xl: 2rem;
|
|
41
41
|
--bw-component-icon-size-2xl: 2.5rem;
|
|
42
|
-
--bw-size-
|
|
42
|
+
--bw-size-step-xs: 0.75;
|
|
43
|
+
--bw-size-step-sm: 0.875;
|
|
44
|
+
--bw-size-step-md: 1;
|
|
45
|
+
--bw-size-step-lg: 1.125;
|
|
46
|
+
--bw-size-step-xl: 1.25;
|
|
47
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
48
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
43
49
|
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
44
|
-
--bw-size-control-height-lg:
|
|
50
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
51
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
52
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
53
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
54
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
55
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
56
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
45
57
|
--bw-size-touch-target-min: 2.75rem;
|
|
46
58
|
--bw-size-max-width-prose: 65ch;
|
|
47
59
|
--bw-size-max-width-form: 32rem;
|
|
@@ -594,6 +606,16 @@
|
|
|
594
606
|
--bw-density-section-gap: 2rem;
|
|
595
607
|
--bw-density-card-padding: 1rem;
|
|
596
608
|
--bw-density-page-gutter-inline: 1.5rem;
|
|
609
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
610
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
611
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
612
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
613
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
614
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
615
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
616
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
617
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
618
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
597
619
|
}
|
|
598
620
|
|
|
599
621
|
[data-density="compact"] {
|
|
@@ -610,6 +632,16 @@
|
|
|
610
632
|
--bw-density-section-gap: 1.5rem;
|
|
611
633
|
--bw-density-card-padding: 0.75rem;
|
|
612
634
|
--bw-density-page-gutter-inline: 1rem;
|
|
635
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
636
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
637
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
638
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
639
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
640
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
641
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
642
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
643
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
644
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
613
645
|
}
|
|
614
646
|
|
|
615
647
|
[data-density="spacious"] {
|
|
@@ -626,6 +658,16 @@
|
|
|
626
658
|
--bw-density-section-gap: 3rem;
|
|
627
659
|
--bw-density-card-padding: 1.5rem;
|
|
628
660
|
--bw-density-page-gutter-inline: 2rem;
|
|
661
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
662
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
663
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
664
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
665
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
666
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
667
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
668
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
669
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
670
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
629
671
|
}
|
|
630
672
|
|
|
631
673
|
:root {
|
package/dist/tokens.dtcg.json
CHANGED
|
@@ -930,15 +930,59 @@
|
|
|
930
930
|
"$value": "2.5rem"
|
|
931
931
|
}
|
|
932
932
|
},
|
|
933
|
+
"step": {
|
|
934
|
+
"$type": "number",
|
|
935
|
+
"$description": "ADR-125: kit-wide unitless step multipliers applied to the density control base. Starting ratios; xs and xl ship on a component only where that component earns them. Not a universal root: type, space and radius are computed within their own axes.",
|
|
936
|
+
"xs": {
|
|
937
|
+
"$value": 0.75
|
|
938
|
+
},
|
|
939
|
+
"sm": {
|
|
940
|
+
"$value": 0.875
|
|
941
|
+
},
|
|
942
|
+
"md": {
|
|
943
|
+
"$value": 1
|
|
944
|
+
},
|
|
945
|
+
"lg": {
|
|
946
|
+
"$value": 1.125
|
|
947
|
+
},
|
|
948
|
+
"xl": {
|
|
949
|
+
"$value": 1.25
|
|
950
|
+
}
|
|
951
|
+
},
|
|
933
952
|
"control-height": {
|
|
953
|
+
"$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
|
+
"xs": {
|
|
955
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)))"
|
|
956
|
+
},
|
|
934
957
|
"sm": {
|
|
935
|
-
"$value": "
|
|
958
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)))"
|
|
936
959
|
},
|
|
937
960
|
"md": {
|
|
938
961
|
"$value": "var(--bw-density-control-height)"
|
|
939
962
|
},
|
|
940
963
|
"lg": {
|
|
941
|
-
"$value": "
|
|
964
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)))"
|
|
965
|
+
},
|
|
966
|
+
"xl": {
|
|
967
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)))"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
"control-padding-inline": {
|
|
971
|
+
"$description": "ADR-125: density control padding base x step multiplier. Re-emitted inside every [data-density] block.",
|
|
972
|
+
"xs": {
|
|
973
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs))"
|
|
974
|
+
},
|
|
975
|
+
"sm": {
|
|
976
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm))"
|
|
977
|
+
},
|
|
978
|
+
"md": {
|
|
979
|
+
"$value": "var(--bw-density-control-padding-inline)"
|
|
980
|
+
},
|
|
981
|
+
"lg": {
|
|
982
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg))"
|
|
983
|
+
},
|
|
984
|
+
"xl": {
|
|
985
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl))"
|
|
942
986
|
}
|
|
943
987
|
},
|
|
944
988
|
"touch-target-min": {
|
package/dist/tokens.js
CHANGED
|
@@ -270,11 +270,23 @@ export const tokens = Object.freeze({
|
|
|
270
270
|
"size_control_height_lg": "var(--bw-size-control-height-lg)",
|
|
271
271
|
"size_control_height_md": "var(--bw-size-control-height-md)",
|
|
272
272
|
"size_control_height_sm": "var(--bw-size-control-height-sm)",
|
|
273
|
+
"size_control_height_xl": "var(--bw-size-control-height-xl)",
|
|
274
|
+
"size_control_height_xs": "var(--bw-size-control-height-xs)",
|
|
275
|
+
"size_control_padding_inline_lg": "var(--bw-size-control-padding-inline-lg)",
|
|
276
|
+
"size_control_padding_inline_md": "var(--bw-size-control-padding-inline-md)",
|
|
277
|
+
"size_control_padding_inline_sm": "var(--bw-size-control-padding-inline-sm)",
|
|
278
|
+
"size_control_padding_inline_xl": "var(--bw-size-control-padding-inline-xl)",
|
|
279
|
+
"size_control_padding_inline_xs": "var(--bw-size-control-padding-inline-xs)",
|
|
273
280
|
"size_max_width_form": "var(--bw-size-max-width-form)",
|
|
274
281
|
"size_max_width_modal_lg": "var(--bw-size-max-width-modal-lg)",
|
|
275
282
|
"size_max_width_modal_md": "var(--bw-size-max-width-modal-md)",
|
|
276
283
|
"size_max_width_modal_sm": "var(--bw-size-max-width-modal-sm)",
|
|
277
284
|
"size_max_width_prose": "var(--bw-size-max-width-prose)",
|
|
285
|
+
"size_step_lg": "var(--bw-size-step-lg)",
|
|
286
|
+
"size_step_md": "var(--bw-size-step-md)",
|
|
287
|
+
"size_step_sm": "var(--bw-size-step-sm)",
|
|
288
|
+
"size_step_xl": "var(--bw-size-step-xl)",
|
|
289
|
+
"size_step_xs": "var(--bw-size-step-xs)",
|
|
278
290
|
"size_touch_target_min": "var(--bw-size-touch-target-min)",
|
|
279
291
|
"space_0": "var(--bw-space-0)",
|
|
280
292
|
"space_0_5": "var(--bw-space-0-5)",
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwui/tokens",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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,
|
|
7
|
+
"license": "MIT",
|
|
7
8
|
"files": [
|
|
8
9
|
"dist",
|
|
9
|
-
"src"
|
|
10
|
+
"src",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
10
13
|
],
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
"access": "public"
|
|
35
38
|
},
|
|
36
39
|
"scripts": {
|
|
37
|
-
"build": "node scripts/build.mjs"
|
|
40
|
+
"build": "node scripts/build.mjs",
|
|
41
|
+
"test": "node --test \"test/*.test.mjs\""
|
|
38
42
|
}
|
|
39
43
|
}
|
|
@@ -312,15 +312,59 @@
|
|
|
312
312
|
"$value": "2.5rem"
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
|
+
"step": {
|
|
316
|
+
"$type": "number",
|
|
317
|
+
"$description": "ADR-125: kit-wide unitless step multipliers applied to the density control base. Starting ratios; xs and xl ship on a component only where that component earns them. Not a universal root: type, space and radius are computed within their own axes.",
|
|
318
|
+
"xs": {
|
|
319
|
+
"$value": 0.75
|
|
320
|
+
},
|
|
321
|
+
"sm": {
|
|
322
|
+
"$value": 0.875
|
|
323
|
+
},
|
|
324
|
+
"md": {
|
|
325
|
+
"$value": 1
|
|
326
|
+
},
|
|
327
|
+
"lg": {
|
|
328
|
+
"$value": 1.125
|
|
329
|
+
},
|
|
330
|
+
"xl": {
|
|
331
|
+
"$value": 1.25
|
|
332
|
+
}
|
|
333
|
+
},
|
|
315
334
|
"control-height": {
|
|
335
|
+
"$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
|
+
"xs": {
|
|
337
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)))"
|
|
338
|
+
},
|
|
316
339
|
"sm": {
|
|
317
|
-
"$value": "
|
|
340
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)))"
|
|
318
341
|
},
|
|
319
342
|
"md": {
|
|
320
343
|
"$value": "var(--bw-density-control-height)"
|
|
321
344
|
},
|
|
322
345
|
"lg": {
|
|
323
|
-
"$value": "
|
|
346
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)))"
|
|
347
|
+
},
|
|
348
|
+
"xl": {
|
|
349
|
+
"$value": "max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)))"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"control-padding-inline": {
|
|
353
|
+
"$description": "ADR-125: density control padding base x step multiplier. Re-emitted inside every [data-density] block.",
|
|
354
|
+
"xs": {
|
|
355
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs))"
|
|
356
|
+
},
|
|
357
|
+
"sm": {
|
|
358
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm))"
|
|
359
|
+
},
|
|
360
|
+
"md": {
|
|
361
|
+
"$value": "var(--bw-density-control-padding-inline)"
|
|
362
|
+
},
|
|
363
|
+
"lg": {
|
|
364
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg))"
|
|
365
|
+
},
|
|
366
|
+
"xl": {
|
|
367
|
+
"$value": "calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl))"
|
|
324
368
|
}
|
|
325
369
|
},
|
|
326
370
|
"touch-target-min": {
|