@bwui/tokens 0.1.2 → 0.1.3
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/token-manifest.json +69 -2
- package/package.json +5 -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`.
|
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": [
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwui/tokens",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
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
|
".": {
|