@bwui/tokens 0.1.0 → 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/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/token-manifest.json +69 -2
- package/package.json +14 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nigel Copley
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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.
|
|
4
|
-
"description": "Brickwork design tokens
|
|
3
|
+
"version": "0.1.3",
|
|
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
|
".": {
|
|
@@ -20,16 +23,20 @@
|
|
|
20
23
|
"./dtcg": "./dist/tokens.dtcg.json",
|
|
21
24
|
"./manifest": "./dist/token-manifest.json"
|
|
22
25
|
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "node scripts/build.mjs"
|
|
25
|
-
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"style-dictionary": "^4.3.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"typescript": "5.7.3"
|
|
31
31
|
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/icvoss/brickwork.git"
|
|
35
|
+
},
|
|
32
36
|
"publishConfig": {
|
|
33
37
|
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "node scripts/build.mjs"
|
|
34
41
|
}
|
|
35
|
-
}
|
|
42
|
+
}
|