@chai-ui/tokens 0.1.0
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 +56 -0
- package/dist/css/tokens.css +130 -0
- package/dist/figma/tokens.figma.json +561 -0
- package/dist/js/index.d.ts +5 -0
- package/dist/js/index.js +335 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kazarazat
|
|
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,56 @@
|
|
|
1
|
+
# @chai-ui/tokens
|
|
2
|
+
|
|
3
|
+
The single source of truth for color, space, radius, type, and motion values
|
|
4
|
+
across CHAI UI. One JSON file in, three consumers out:
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
src/tokens.json → dist/css/tokens.css (CSS custom properties)
|
|
8
|
+
→ dist/js/index.js/.d.ts (typed JS/TS exports)
|
|
9
|
+
→ dist/figma/tokens.figma.json (Figma token set)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Editing tokens
|
|
13
|
+
|
|
14
|
+
Edit `src/tokens.json` only. It's a DTCG-flavored format: every leaf is
|
|
15
|
+
`{ "$value": ... }`, and a value can reference another token with
|
|
16
|
+
`{color.root.green-50}` — see `color.semantic.*` for examples of referencing
|
|
17
|
+
`color.root.*`. Always add new components against `color.semantic.*` (or add
|
|
18
|
+
a new semantic alias) rather than `color.root.*` directly, so a future
|
|
19
|
+
re-theme only touches the root palette.
|
|
20
|
+
|
|
21
|
+
Run `pnpm build` (from here, or `pnpm --filter @chai-ui/tokens build` from
|
|
22
|
+
the repo root) to regenerate `dist/`.
|
|
23
|
+
|
|
24
|
+
## Using the tokens
|
|
25
|
+
|
|
26
|
+
**CSS**
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
@import "@chai-ui/tokens/css";
|
|
30
|
+
|
|
31
|
+
.my-thing {
|
|
32
|
+
background: var(--chai-color-semantic-control-surface);
|
|
33
|
+
padding: var(--chai-space-4);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**JS / TS**
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { tokens, flatTokens } from "@chai-ui/tokens";
|
|
41
|
+
|
|
42
|
+
tokens.color.semantic.accent; // "#009747"
|
|
43
|
+
flatTokens["color.semantic.accent"]; // same value, flat lookup
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Figma**
|
|
47
|
+
|
|
48
|
+
`dist/figma/tokens.figma.json` is shaped for the [Tokens Studio for Figma]
|
|
49
|
+
plugin (Import → JSON). It's also a reasonable starting point for a manual
|
|
50
|
+
Figma Variables import if you'd rather not add the plugin — the values are
|
|
51
|
+
already resolved, so no reference-following is required at the Figma end.
|
|
52
|
+
|
|
53
|
+
This is a design-tokens pipeline only: it does not keep Figma *components*
|
|
54
|
+
in sync with the code components.
|
|
55
|
+
|
|
56
|
+
[Tokens Studio for Figma]: https://tokens.studio/
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* Generated by @chai-ui/tokens/build.mjs — do not edit by hand. */
|
|
2
|
+
:root {
|
|
3
|
+
--chai-color-root-gray-0: #000000;
|
|
4
|
+
--chai-color-root-gray-10: #1a1a1a;
|
|
5
|
+
--chai-color-root-gray-30: #4a4a4a;
|
|
6
|
+
--chai-color-root-gray-40: #666666;
|
|
7
|
+
--chai-color-root-gray-50: #8b8b8b;
|
|
8
|
+
--chai-color-root-gray-60: #9e9e9e;
|
|
9
|
+
--chai-color-root-gray-75: #c2c2c2;
|
|
10
|
+
--chai-color-root-gray-85: #e0e0e0;
|
|
11
|
+
--chai-color-root-gray-90: #e9e9e9;
|
|
12
|
+
--chai-color-root-gray-97: #f8f8f8;
|
|
13
|
+
--chai-color-root-gray-100: #ffffff;
|
|
14
|
+
--chai-color-root-green-30: #005324;
|
|
15
|
+
--chai-color-root-green-40: #006d32;
|
|
16
|
+
--chai-color-root-green-50: #009747;
|
|
17
|
+
--chai-color-root-green-60: #57b06c;
|
|
18
|
+
--chai-color-root-green-80: #96f6c5;
|
|
19
|
+
--chai-color-root-green-95: #e9f4e6;
|
|
20
|
+
--chai-color-root-amber-40: #a8681c;
|
|
21
|
+
--chai-color-root-amber-50: #c98226;
|
|
22
|
+
--chai-color-root-amber-80: #f0d3a4;
|
|
23
|
+
--chai-color-root-red-40: #a13c33;
|
|
24
|
+
--chai-color-root-red-50: #c14e42;
|
|
25
|
+
--chai-color-root-red-80: #f0c2bc;
|
|
26
|
+
--chai-color-semantic-text-on-accent: #ffffff;
|
|
27
|
+
--chai-color-semantic-accent: #009747;
|
|
28
|
+
--chai-color-semantic-accent-hover: #006d32;
|
|
29
|
+
--chai-color-semantic-accent-subtle: #e9f4e6;
|
|
30
|
+
--chai-color-semantic-accent-soft: #96f6c5;
|
|
31
|
+
--chai-color-semantic-accent-text: #006d32;
|
|
32
|
+
--chai-color-semantic-warning: #c98226;
|
|
33
|
+
--chai-color-semantic-warning-subtle: #f0d3a4;
|
|
34
|
+
--chai-color-semantic-danger: #c14e42;
|
|
35
|
+
--chai-color-semantic-danger-subtle: #f0c2bc;
|
|
36
|
+
--chai-color-semantic-control-surface: #f8f8f8;
|
|
37
|
+
--chai-color-semantic-control-surface-hover: #e9e9e9;
|
|
38
|
+
--chai-color-semantic-control-surface-raised: #ffffff;
|
|
39
|
+
--chai-color-semantic-control-track: #e0e0e0;
|
|
40
|
+
--chai-color-semantic-control-divider: #e0e0e0;
|
|
41
|
+
--chai-color-semantic-control-border: #8b8b8b;
|
|
42
|
+
--chai-color-semantic-control-border-soft: #9e9e9e;
|
|
43
|
+
--chai-color-semantic-control-border-faint: #c2c2c2;
|
|
44
|
+
--chai-color-semantic-control-text-strong: #1a1a1a;
|
|
45
|
+
--chai-color-semantic-control-text: #4a4a4a;
|
|
46
|
+
--chai-color-semantic-control-text-muted: #666666;
|
|
47
|
+
--chai-color-semantic-overlay: rgba(0, 0, 0, 0.5);
|
|
48
|
+
--chai-color-semantic-on-overlay: #ffffff;
|
|
49
|
+
--chai-color-semantic-scrim: rgba(0, 0, 0, 0.6);
|
|
50
|
+
--chai-color-semantic-media-backdrop: #000000;
|
|
51
|
+
--chai-space-0: 0px;
|
|
52
|
+
--chai-space-1: 4px;
|
|
53
|
+
--chai-space-2: 8px;
|
|
54
|
+
--chai-space-3: 12px;
|
|
55
|
+
--chai-space-4: 16px;
|
|
56
|
+
--chai-space-5: 24px;
|
|
57
|
+
--chai-space-6: 32px;
|
|
58
|
+
--chai-space-7: 48px;
|
|
59
|
+
--chai-space-8: 64px;
|
|
60
|
+
--chai-radius-sm: 6px;
|
|
61
|
+
--chai-radius-md: 10px;
|
|
62
|
+
--chai-radius-lg: 16px;
|
|
63
|
+
--chai-radius-full: 999px;
|
|
64
|
+
--chai-type-family-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
65
|
+
--chai-type-family-mono: 'IBM Plex Mono', ui-monospace, monospace;
|
|
66
|
+
--chai-type-family-material: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
67
|
+
--chai-type-size-xs: 12px;
|
|
68
|
+
--chai-type-size-sm: 14px;
|
|
69
|
+
--chai-type-size-md: 16px;
|
|
70
|
+
--chai-type-size-lg: 20px;
|
|
71
|
+
--chai-type-size-xl: 26px;
|
|
72
|
+
--chai-type-size-2xl: 34px;
|
|
73
|
+
--chai-type-size-title-large: 22px;
|
|
74
|
+
--chai-type-size-title-medium: 16px;
|
|
75
|
+
--chai-type-size-body-large: 16px;
|
|
76
|
+
--chai-type-size-body-medium: 14px;
|
|
77
|
+
--chai-type-size-label-large: 14px;
|
|
78
|
+
--chai-type-size-label-small: 11px;
|
|
79
|
+
--chai-type-weight-regular: 440;
|
|
80
|
+
--chai-type-weight-medium: 540;
|
|
81
|
+
--chai-type-weight-semibold: 620;
|
|
82
|
+
--chai-type-weight-material-regular: 400;
|
|
83
|
+
--chai-type-weight-material-medium: 500;
|
|
84
|
+
--chai-type-leading-tight: 1.15;
|
|
85
|
+
--chai-type-leading-base: 1.45;
|
|
86
|
+
--chai-type-leading-loose: 1.7;
|
|
87
|
+
--chai-type-leading-title-large: 28px;
|
|
88
|
+
--chai-type-leading-title-medium: 24px;
|
|
89
|
+
--chai-type-leading-body-large: 24px;
|
|
90
|
+
--chai-type-leading-body-medium: 20px;
|
|
91
|
+
--chai-type-leading-label-large: 20px;
|
|
92
|
+
--chai-type-leading-label-small: 16px;
|
|
93
|
+
--chai-type-tracking-title-large: 0px;
|
|
94
|
+
--chai-type-tracking-title-medium: 0.15px;
|
|
95
|
+
--chai-type-tracking-body-large: 0.5px;
|
|
96
|
+
--chai-type-tracking-body-medium: 0.25px;
|
|
97
|
+
--chai-type-tracking-label-large: 0.1px;
|
|
98
|
+
--chai-type-tracking-label-small: 0.5px;
|
|
99
|
+
--chai-motion-duration-fast: 120ms;
|
|
100
|
+
--chai-motion-duration-base: 200ms;
|
|
101
|
+
--chai-motion-duration-slow: 360ms;
|
|
102
|
+
--chai-motion-duration-steep: 900ms;
|
|
103
|
+
--chai-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
104
|
+
--chai-motion-easing-growth: cubic-bezier(0.34, 1.2, 0.64, 1);
|
|
105
|
+
--chai-shadow-menu: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
|
|
106
|
+
--chai-gradient-ai: linear-gradient(90deg, #7b6fd6, #e08d75, #afc9f2, #7b6fd6);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Material Design 3 roles, driven by Chai tokens (color.material in src/tokens.json). */
|
|
110
|
+
:root {
|
|
111
|
+
--md-sys-color-primary: var(--chai-color-semantic-accent);
|
|
112
|
+
--md-sys-color-on-primary: var(--chai-color-semantic-control-surface-raised);
|
|
113
|
+
--md-sys-color-primary-container: var(--chai-color-semantic-accent-soft);
|
|
114
|
+
--md-sys-color-on-primary-container: var(--chai-color-semantic-accent-text);
|
|
115
|
+
--md-sys-color-secondary: var(--chai-color-semantic-accent);
|
|
116
|
+
--md-sys-color-secondary-container: var(--chai-color-semantic-accent-soft);
|
|
117
|
+
--md-sys-color-on-secondary-container: var(--chai-color-semantic-accent-text);
|
|
118
|
+
--md-sys-color-tertiary-container: var(--chai-color-semantic-accent-soft);
|
|
119
|
+
--md-sys-color-on-tertiary-container: var(--chai-color-semantic-accent-text);
|
|
120
|
+
--md-sys-color-error: var(--chai-color-semantic-danger);
|
|
121
|
+
--md-sys-color-on-error-container: var(--chai-color-semantic-danger);
|
|
122
|
+
--md-sys-color-surface: var(--chai-color-semantic-control-surface-raised);
|
|
123
|
+
--md-sys-color-surface-container-low: var(--chai-color-semantic-control-surface);
|
|
124
|
+
--md-sys-color-surface-container-high: var(--chai-color-semantic-control-surface-hover);
|
|
125
|
+
--md-sys-color-surface-container-highest: var(--chai-color-semantic-control-track);
|
|
126
|
+
--md-sys-color-on-surface: var(--chai-color-semantic-control-text-strong);
|
|
127
|
+
--md-sys-color-on-surface-variant: var(--chai-color-semantic-control-text);
|
|
128
|
+
--md-sys-color-outline: var(--chai-color-semantic-control-border);
|
|
129
|
+
--md-sys-color-shadow: var(--chai-color-semantic-media-backdrop);
|
|
130
|
+
}
|
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global": {
|
|
3
|
+
"color": {
|
|
4
|
+
"root": {
|
|
5
|
+
"gray-0": {
|
|
6
|
+
"value": "#000000",
|
|
7
|
+
"type": "color"
|
|
8
|
+
},
|
|
9
|
+
"gray-10": {
|
|
10
|
+
"value": "#1a1a1a",
|
|
11
|
+
"type": "color"
|
|
12
|
+
},
|
|
13
|
+
"gray-30": {
|
|
14
|
+
"value": "#4a4a4a",
|
|
15
|
+
"type": "color"
|
|
16
|
+
},
|
|
17
|
+
"gray-40": {
|
|
18
|
+
"value": "#666666",
|
|
19
|
+
"type": "color"
|
|
20
|
+
},
|
|
21
|
+
"gray-50": {
|
|
22
|
+
"value": "#8b8b8b",
|
|
23
|
+
"type": "color"
|
|
24
|
+
},
|
|
25
|
+
"gray-60": {
|
|
26
|
+
"value": "#9e9e9e",
|
|
27
|
+
"type": "color"
|
|
28
|
+
},
|
|
29
|
+
"gray-75": {
|
|
30
|
+
"value": "#c2c2c2",
|
|
31
|
+
"type": "color"
|
|
32
|
+
},
|
|
33
|
+
"gray-85": {
|
|
34
|
+
"value": "#e0e0e0",
|
|
35
|
+
"type": "color"
|
|
36
|
+
},
|
|
37
|
+
"gray-90": {
|
|
38
|
+
"value": "#e9e9e9",
|
|
39
|
+
"type": "color"
|
|
40
|
+
},
|
|
41
|
+
"gray-97": {
|
|
42
|
+
"value": "#f8f8f8",
|
|
43
|
+
"type": "color"
|
|
44
|
+
},
|
|
45
|
+
"gray-100": {
|
|
46
|
+
"value": "#ffffff",
|
|
47
|
+
"type": "color"
|
|
48
|
+
},
|
|
49
|
+
"green-30": {
|
|
50
|
+
"value": "#005324",
|
|
51
|
+
"type": "color"
|
|
52
|
+
},
|
|
53
|
+
"green-40": {
|
|
54
|
+
"value": "#006d32",
|
|
55
|
+
"type": "color"
|
|
56
|
+
},
|
|
57
|
+
"green-50": {
|
|
58
|
+
"value": "#009747",
|
|
59
|
+
"type": "color",
|
|
60
|
+
"description": "The brand green: the Chai UI logo, primary actions, switches, focus rings"
|
|
61
|
+
},
|
|
62
|
+
"green-60": {
|
|
63
|
+
"value": "#57b06c",
|
|
64
|
+
"type": "color"
|
|
65
|
+
},
|
|
66
|
+
"green-80": {
|
|
67
|
+
"value": "#96f6c5",
|
|
68
|
+
"type": "color"
|
|
69
|
+
},
|
|
70
|
+
"green-95": {
|
|
71
|
+
"value": "#e9f4e6",
|
|
72
|
+
"type": "color"
|
|
73
|
+
},
|
|
74
|
+
"amber-40": {
|
|
75
|
+
"value": "#a8681c",
|
|
76
|
+
"type": "color"
|
|
77
|
+
},
|
|
78
|
+
"amber-50": {
|
|
79
|
+
"value": "#c98226",
|
|
80
|
+
"type": "color"
|
|
81
|
+
},
|
|
82
|
+
"amber-80": {
|
|
83
|
+
"value": "#f0d3a4",
|
|
84
|
+
"type": "color"
|
|
85
|
+
},
|
|
86
|
+
"red-40": {
|
|
87
|
+
"value": "#a13c33",
|
|
88
|
+
"type": "color"
|
|
89
|
+
},
|
|
90
|
+
"red-50": {
|
|
91
|
+
"value": "#c14e42",
|
|
92
|
+
"type": "color"
|
|
93
|
+
},
|
|
94
|
+
"red-80": {
|
|
95
|
+
"value": "#f0c2bc",
|
|
96
|
+
"type": "color"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"semantic": {
|
|
100
|
+
"text-on-accent": {
|
|
101
|
+
"value": "#ffffff",
|
|
102
|
+
"type": "color"
|
|
103
|
+
},
|
|
104
|
+
"accent": {
|
|
105
|
+
"value": "#009747",
|
|
106
|
+
"type": "color",
|
|
107
|
+
"description": "Fills, switches, icons, focus rings. 3.8:1 on white: not for small text."
|
|
108
|
+
},
|
|
109
|
+
"accent-hover": {
|
|
110
|
+
"value": "#006d32",
|
|
111
|
+
"type": "color"
|
|
112
|
+
},
|
|
113
|
+
"accent-subtle": {
|
|
114
|
+
"value": "#e9f4e6",
|
|
115
|
+
"type": "color"
|
|
116
|
+
},
|
|
117
|
+
"accent-soft": {
|
|
118
|
+
"value": "#96f6c5",
|
|
119
|
+
"type": "color",
|
|
120
|
+
"description": "The bright mint: the ready submit button, an open picker, a drop zone with a file dragged over it"
|
|
121
|
+
},
|
|
122
|
+
"accent-text": {
|
|
123
|
+
"value": "#006d32",
|
|
124
|
+
"type": "color",
|
|
125
|
+
"description": "Green text and small icons on light backgrounds (6.5:1 on white)"
|
|
126
|
+
},
|
|
127
|
+
"warning": {
|
|
128
|
+
"value": "#c98226",
|
|
129
|
+
"type": "color"
|
|
130
|
+
},
|
|
131
|
+
"warning-subtle": {
|
|
132
|
+
"value": "#f0d3a4",
|
|
133
|
+
"type": "color"
|
|
134
|
+
},
|
|
135
|
+
"danger": {
|
|
136
|
+
"value": "#c14e42",
|
|
137
|
+
"type": "color"
|
|
138
|
+
},
|
|
139
|
+
"danger-subtle": {
|
|
140
|
+
"value": "#f0c2bc",
|
|
141
|
+
"type": "color"
|
|
142
|
+
},
|
|
143
|
+
"control-surface": {
|
|
144
|
+
"value": "#f8f8f8",
|
|
145
|
+
"type": "color",
|
|
146
|
+
"description": "Input and card fill: the Composer bar, Media Analyzer, result card media area"
|
|
147
|
+
},
|
|
148
|
+
"control-surface-hover": {
|
|
149
|
+
"value": "#e9e9e9",
|
|
150
|
+
"type": "color",
|
|
151
|
+
"description": "Hover and pressed fill for buttons, menu items and chips"
|
|
152
|
+
},
|
|
153
|
+
"control-surface-raised": {
|
|
154
|
+
"value": "#ffffff",
|
|
155
|
+
"type": "color",
|
|
156
|
+
"description": "Menus, the result card action bar and info side"
|
|
157
|
+
},
|
|
158
|
+
"control-track": {
|
|
159
|
+
"value": "#e0e0e0",
|
|
160
|
+
"type": "color",
|
|
161
|
+
"description": "Switch track, video scrubber track"
|
|
162
|
+
},
|
|
163
|
+
"control-divider": {
|
|
164
|
+
"value": "#e0e0e0",
|
|
165
|
+
"type": "color",
|
|
166
|
+
"description": "Thin dividers and thumbnail borders"
|
|
167
|
+
},
|
|
168
|
+
"control-border": {
|
|
169
|
+
"value": "#8b8b8b",
|
|
170
|
+
"type": "color",
|
|
171
|
+
"description": "Borders of inputs, chips and outlined buttons"
|
|
172
|
+
},
|
|
173
|
+
"control-border-soft": {
|
|
174
|
+
"value": "#9e9e9e",
|
|
175
|
+
"type": "color",
|
|
176
|
+
"description": "Card outlines and the switch outline"
|
|
177
|
+
},
|
|
178
|
+
"control-border-faint": {
|
|
179
|
+
"value": "#c2c2c2",
|
|
180
|
+
"type": "color"
|
|
181
|
+
},
|
|
182
|
+
"control-text-strong": {
|
|
183
|
+
"value": "#1a1a1a",
|
|
184
|
+
"type": "color",
|
|
185
|
+
"description": "Menu and option text"
|
|
186
|
+
},
|
|
187
|
+
"control-text": {
|
|
188
|
+
"value": "#4a4a4a",
|
|
189
|
+
"type": "color",
|
|
190
|
+
"description": "Text typed into controls, chip text"
|
|
191
|
+
},
|
|
192
|
+
"control-text-muted": {
|
|
193
|
+
"value": "#666666",
|
|
194
|
+
"type": "color",
|
|
195
|
+
"description": "Icons, placeholders, switch handle (5.4:1 on control-surface)"
|
|
196
|
+
},
|
|
197
|
+
"overlay": {
|
|
198
|
+
"value": "rgba(0, 0, 0, 0.5)",
|
|
199
|
+
"type": "color",
|
|
200
|
+
"description": "Buttons sitting on top of media: play, collapse, remove"
|
|
201
|
+
},
|
|
202
|
+
"on-overlay": {
|
|
203
|
+
"value": "#ffffff",
|
|
204
|
+
"type": "color",
|
|
205
|
+
"description": "Icons on overlay buttons"
|
|
206
|
+
},
|
|
207
|
+
"scrim": {
|
|
208
|
+
"value": "rgba(0, 0, 0, 0.6)",
|
|
209
|
+
"type": "color",
|
|
210
|
+
"description": "Backdrop behind an expanded image or video"
|
|
211
|
+
},
|
|
212
|
+
"media-backdrop": {
|
|
213
|
+
"value": "#000000",
|
|
214
|
+
"type": "color",
|
|
215
|
+
"description": "Letterboxing behind video"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"material": {
|
|
219
|
+
"primary": {
|
|
220
|
+
"value": "#009747",
|
|
221
|
+
"type": "color"
|
|
222
|
+
},
|
|
223
|
+
"on-primary": {
|
|
224
|
+
"value": "#ffffff",
|
|
225
|
+
"type": "color"
|
|
226
|
+
},
|
|
227
|
+
"primary-container": {
|
|
228
|
+
"value": "#96f6c5",
|
|
229
|
+
"type": "color"
|
|
230
|
+
},
|
|
231
|
+
"on-primary-container": {
|
|
232
|
+
"value": "#006d32",
|
|
233
|
+
"type": "color"
|
|
234
|
+
},
|
|
235
|
+
"secondary": {
|
|
236
|
+
"value": "#009747",
|
|
237
|
+
"type": "color"
|
|
238
|
+
},
|
|
239
|
+
"secondary-container": {
|
|
240
|
+
"value": "#96f6c5",
|
|
241
|
+
"type": "color"
|
|
242
|
+
},
|
|
243
|
+
"on-secondary-container": {
|
|
244
|
+
"value": "#006d32",
|
|
245
|
+
"type": "color"
|
|
246
|
+
},
|
|
247
|
+
"tertiary-container": {
|
|
248
|
+
"value": "#96f6c5",
|
|
249
|
+
"type": "color"
|
|
250
|
+
},
|
|
251
|
+
"on-tertiary-container": {
|
|
252
|
+
"value": "#006d32",
|
|
253
|
+
"type": "color"
|
|
254
|
+
},
|
|
255
|
+
"error": {
|
|
256
|
+
"value": "#c14e42",
|
|
257
|
+
"type": "color"
|
|
258
|
+
},
|
|
259
|
+
"on-error-container": {
|
|
260
|
+
"value": "#c14e42",
|
|
261
|
+
"type": "color"
|
|
262
|
+
},
|
|
263
|
+
"surface": {
|
|
264
|
+
"value": "#ffffff",
|
|
265
|
+
"type": "color"
|
|
266
|
+
},
|
|
267
|
+
"surface-container-low": {
|
|
268
|
+
"value": "#f8f8f8",
|
|
269
|
+
"type": "color"
|
|
270
|
+
},
|
|
271
|
+
"surface-container-high": {
|
|
272
|
+
"value": "#e9e9e9",
|
|
273
|
+
"type": "color"
|
|
274
|
+
},
|
|
275
|
+
"surface-container-highest": {
|
|
276
|
+
"value": "#e0e0e0",
|
|
277
|
+
"type": "color"
|
|
278
|
+
},
|
|
279
|
+
"on-surface": {
|
|
280
|
+
"value": "#1a1a1a",
|
|
281
|
+
"type": "color"
|
|
282
|
+
},
|
|
283
|
+
"on-surface-variant": {
|
|
284
|
+
"value": "#4a4a4a",
|
|
285
|
+
"type": "color"
|
|
286
|
+
},
|
|
287
|
+
"outline": {
|
|
288
|
+
"value": "#8b8b8b",
|
|
289
|
+
"type": "color"
|
|
290
|
+
},
|
|
291
|
+
"shadow": {
|
|
292
|
+
"value": "#000000",
|
|
293
|
+
"type": "color"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"space": {
|
|
298
|
+
"0": {
|
|
299
|
+
"value": "0px",
|
|
300
|
+
"type": "spacing"
|
|
301
|
+
},
|
|
302
|
+
"1": {
|
|
303
|
+
"value": "4px",
|
|
304
|
+
"type": "spacing"
|
|
305
|
+
},
|
|
306
|
+
"2": {
|
|
307
|
+
"value": "8px",
|
|
308
|
+
"type": "spacing"
|
|
309
|
+
},
|
|
310
|
+
"3": {
|
|
311
|
+
"value": "12px",
|
|
312
|
+
"type": "spacing"
|
|
313
|
+
},
|
|
314
|
+
"4": {
|
|
315
|
+
"value": "16px",
|
|
316
|
+
"type": "spacing"
|
|
317
|
+
},
|
|
318
|
+
"5": {
|
|
319
|
+
"value": "24px",
|
|
320
|
+
"type": "spacing"
|
|
321
|
+
},
|
|
322
|
+
"6": {
|
|
323
|
+
"value": "32px",
|
|
324
|
+
"type": "spacing"
|
|
325
|
+
},
|
|
326
|
+
"7": {
|
|
327
|
+
"value": "48px",
|
|
328
|
+
"type": "spacing"
|
|
329
|
+
},
|
|
330
|
+
"8": {
|
|
331
|
+
"value": "64px",
|
|
332
|
+
"type": "spacing"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"radius": {
|
|
336
|
+
"sm": {
|
|
337
|
+
"value": "6px",
|
|
338
|
+
"type": "borderRadius"
|
|
339
|
+
},
|
|
340
|
+
"md": {
|
|
341
|
+
"value": "10px",
|
|
342
|
+
"type": "borderRadius"
|
|
343
|
+
},
|
|
344
|
+
"lg": {
|
|
345
|
+
"value": "16px",
|
|
346
|
+
"type": "borderRadius"
|
|
347
|
+
},
|
|
348
|
+
"full": {
|
|
349
|
+
"value": "999px",
|
|
350
|
+
"type": "borderRadius"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"type": {
|
|
354
|
+
"family": {
|
|
355
|
+
"base": {
|
|
356
|
+
"value": "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
357
|
+
"type": "fontFamilies"
|
|
358
|
+
},
|
|
359
|
+
"mono": {
|
|
360
|
+
"value": "'IBM Plex Mono', ui-monospace, monospace",
|
|
361
|
+
"type": "fontFamilies"
|
|
362
|
+
},
|
|
363
|
+
"material": {
|
|
364
|
+
"value": "'Roboto', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
365
|
+
"type": "fontFamilies",
|
|
366
|
+
"description": "Material Design 3's own typeface primitive (m3.material.io/styles/typography), self-hosted via @fontsource/roboto. Used for the MD3 type-scale roles below and throughout the Composer, Media Analyzer and Result card."
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"size": {
|
|
370
|
+
"xs": {
|
|
371
|
+
"value": "12px",
|
|
372
|
+
"type": "fontSizes"
|
|
373
|
+
},
|
|
374
|
+
"sm": {
|
|
375
|
+
"value": "14px",
|
|
376
|
+
"type": "fontSizes"
|
|
377
|
+
},
|
|
378
|
+
"md": {
|
|
379
|
+
"value": "16px",
|
|
380
|
+
"type": "fontSizes"
|
|
381
|
+
},
|
|
382
|
+
"lg": {
|
|
383
|
+
"value": "20px",
|
|
384
|
+
"type": "fontSizes"
|
|
385
|
+
},
|
|
386
|
+
"xl": {
|
|
387
|
+
"value": "26px",
|
|
388
|
+
"type": "fontSizes"
|
|
389
|
+
},
|
|
390
|
+
"2xl": {
|
|
391
|
+
"value": "34px",
|
|
392
|
+
"type": "fontSizes"
|
|
393
|
+
},
|
|
394
|
+
"title-large": {
|
|
395
|
+
"value": "22px",
|
|
396
|
+
"type": "fontSizes",
|
|
397
|
+
"description": "MD3 type scale: Title Large"
|
|
398
|
+
},
|
|
399
|
+
"title-medium": {
|
|
400
|
+
"value": "16px",
|
|
401
|
+
"type": "fontSizes",
|
|
402
|
+
"description": "MD3 type scale: Title Medium"
|
|
403
|
+
},
|
|
404
|
+
"body-large": {
|
|
405
|
+
"value": "16px",
|
|
406
|
+
"type": "fontSizes",
|
|
407
|
+
"description": "MD3 type scale: Body Large"
|
|
408
|
+
},
|
|
409
|
+
"body-medium": {
|
|
410
|
+
"value": "14px",
|
|
411
|
+
"type": "fontSizes",
|
|
412
|
+
"description": "MD3 type scale: Body Medium"
|
|
413
|
+
},
|
|
414
|
+
"label-large": {
|
|
415
|
+
"value": "14px",
|
|
416
|
+
"type": "fontSizes",
|
|
417
|
+
"description": "MD3 type scale: Label Large"
|
|
418
|
+
},
|
|
419
|
+
"label-small": {
|
|
420
|
+
"value": "11px",
|
|
421
|
+
"type": "fontSizes",
|
|
422
|
+
"description": "MD3 type scale: Label Small"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"weight": {
|
|
426
|
+
"regular": {
|
|
427
|
+
"value": "440",
|
|
428
|
+
"type": "fontWeights"
|
|
429
|
+
},
|
|
430
|
+
"medium": {
|
|
431
|
+
"value": "540",
|
|
432
|
+
"type": "fontWeights"
|
|
433
|
+
},
|
|
434
|
+
"semibold": {
|
|
435
|
+
"value": "620",
|
|
436
|
+
"type": "fontWeights"
|
|
437
|
+
},
|
|
438
|
+
"material-regular": {
|
|
439
|
+
"value": "400",
|
|
440
|
+
"type": "fontWeights",
|
|
441
|
+
"description": "MD3 type scale weight: Regular"
|
|
442
|
+
},
|
|
443
|
+
"material-medium": {
|
|
444
|
+
"value": "500",
|
|
445
|
+
"type": "fontWeights",
|
|
446
|
+
"description": "MD3 type scale weight: Medium"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"leading": {
|
|
450
|
+
"tight": {
|
|
451
|
+
"value": "1.15",
|
|
452
|
+
"type": "lineHeights"
|
|
453
|
+
},
|
|
454
|
+
"base": {
|
|
455
|
+
"value": "1.45",
|
|
456
|
+
"type": "lineHeights"
|
|
457
|
+
},
|
|
458
|
+
"loose": {
|
|
459
|
+
"value": "1.7",
|
|
460
|
+
"type": "lineHeights"
|
|
461
|
+
},
|
|
462
|
+
"title-large": {
|
|
463
|
+
"value": "28px",
|
|
464
|
+
"type": "lineHeights"
|
|
465
|
+
},
|
|
466
|
+
"title-medium": {
|
|
467
|
+
"value": "24px",
|
|
468
|
+
"type": "lineHeights"
|
|
469
|
+
},
|
|
470
|
+
"body-large": {
|
|
471
|
+
"value": "24px",
|
|
472
|
+
"type": "lineHeights"
|
|
473
|
+
},
|
|
474
|
+
"body-medium": {
|
|
475
|
+
"value": "20px",
|
|
476
|
+
"type": "lineHeights"
|
|
477
|
+
},
|
|
478
|
+
"label-large": {
|
|
479
|
+
"value": "20px",
|
|
480
|
+
"type": "lineHeights"
|
|
481
|
+
},
|
|
482
|
+
"label-small": {
|
|
483
|
+
"value": "16px",
|
|
484
|
+
"type": "lineHeights"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"tracking": {
|
|
488
|
+
"title-large": {
|
|
489
|
+
"value": "0px",
|
|
490
|
+
"type": "letterSpacing"
|
|
491
|
+
},
|
|
492
|
+
"title-medium": {
|
|
493
|
+
"value": "0.15px",
|
|
494
|
+
"type": "letterSpacing"
|
|
495
|
+
},
|
|
496
|
+
"body-large": {
|
|
497
|
+
"value": "0.5px",
|
|
498
|
+
"type": "letterSpacing"
|
|
499
|
+
},
|
|
500
|
+
"body-medium": {
|
|
501
|
+
"value": "0.25px",
|
|
502
|
+
"type": "letterSpacing"
|
|
503
|
+
},
|
|
504
|
+
"label-large": {
|
|
505
|
+
"value": "0.1px",
|
|
506
|
+
"type": "letterSpacing"
|
|
507
|
+
},
|
|
508
|
+
"label-small": {
|
|
509
|
+
"value": "0.5px",
|
|
510
|
+
"type": "letterSpacing"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"motion": {
|
|
515
|
+
"duration": {
|
|
516
|
+
"fast": {
|
|
517
|
+
"value": "120ms",
|
|
518
|
+
"type": "duration"
|
|
519
|
+
},
|
|
520
|
+
"base": {
|
|
521
|
+
"value": "200ms",
|
|
522
|
+
"type": "duration"
|
|
523
|
+
},
|
|
524
|
+
"slow": {
|
|
525
|
+
"value": "360ms",
|
|
526
|
+
"type": "duration"
|
|
527
|
+
},
|
|
528
|
+
"steep": {
|
|
529
|
+
"value": "900ms",
|
|
530
|
+
"type": "duration",
|
|
531
|
+
"description": "Long ambient duration: loading spinners and pulses while a model generates"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"easing": {
|
|
535
|
+
"standard": {
|
|
536
|
+
"value": "cubic-bezier(0.2, 0, 0, 1)",
|
|
537
|
+
"type": "other"
|
|
538
|
+
},
|
|
539
|
+
"growth": {
|
|
540
|
+
"value": "cubic-bezier(0.34, 1.2, 0.64, 1)",
|
|
541
|
+
"type": "other",
|
|
542
|
+
"description": "Slight overshoot — for content arriving, e.g. a result appearing"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"shadow": {
|
|
547
|
+
"menu": {
|
|
548
|
+
"value": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)",
|
|
549
|
+
"type": "boxShadow",
|
|
550
|
+
"description": "Floating menus and popovers"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"gradient": {
|
|
554
|
+
"ai": {
|
|
555
|
+
"value": "linear-gradient(90deg, #7b6fd6, #e08d75, #afc9f2, #7b6fd6)",
|
|
556
|
+
"type": "other",
|
|
557
|
+
"description": "The AI shimmer: text revealing after prompt optimization"
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
package/dist/js/index.js
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
// Generated by @chai-ui/tokens/build.mjs — do not edit by hand.
|
|
2
|
+
export const tokens = {
|
|
3
|
+
"color": {
|
|
4
|
+
"root": {
|
|
5
|
+
"gray-0": "#000000",
|
|
6
|
+
"gray-10": "#1a1a1a",
|
|
7
|
+
"gray-30": "#4a4a4a",
|
|
8
|
+
"gray-40": "#666666",
|
|
9
|
+
"gray-50": "#8b8b8b",
|
|
10
|
+
"gray-60": "#9e9e9e",
|
|
11
|
+
"gray-75": "#c2c2c2",
|
|
12
|
+
"gray-85": "#e0e0e0",
|
|
13
|
+
"gray-90": "#e9e9e9",
|
|
14
|
+
"gray-97": "#f8f8f8",
|
|
15
|
+
"gray-100": "#ffffff",
|
|
16
|
+
"green-30": "#005324",
|
|
17
|
+
"green-40": "#006d32",
|
|
18
|
+
"green-50": "#009747",
|
|
19
|
+
"green-60": "#57b06c",
|
|
20
|
+
"green-80": "#96f6c5",
|
|
21
|
+
"green-95": "#e9f4e6",
|
|
22
|
+
"amber-40": "#a8681c",
|
|
23
|
+
"amber-50": "#c98226",
|
|
24
|
+
"amber-80": "#f0d3a4",
|
|
25
|
+
"red-40": "#a13c33",
|
|
26
|
+
"red-50": "#c14e42",
|
|
27
|
+
"red-80": "#f0c2bc"
|
|
28
|
+
},
|
|
29
|
+
"semantic": {
|
|
30
|
+
"text-on-accent": "#ffffff",
|
|
31
|
+
"accent": "#009747",
|
|
32
|
+
"accent-hover": "#006d32",
|
|
33
|
+
"accent-subtle": "#e9f4e6",
|
|
34
|
+
"accent-soft": "#96f6c5",
|
|
35
|
+
"accent-text": "#006d32",
|
|
36
|
+
"warning": "#c98226",
|
|
37
|
+
"warning-subtle": "#f0d3a4",
|
|
38
|
+
"danger": "#c14e42",
|
|
39
|
+
"danger-subtle": "#f0c2bc",
|
|
40
|
+
"control-surface": "#f8f8f8",
|
|
41
|
+
"control-surface-hover": "#e9e9e9",
|
|
42
|
+
"control-surface-raised": "#ffffff",
|
|
43
|
+
"control-track": "#e0e0e0",
|
|
44
|
+
"control-divider": "#e0e0e0",
|
|
45
|
+
"control-border": "#8b8b8b",
|
|
46
|
+
"control-border-soft": "#9e9e9e",
|
|
47
|
+
"control-border-faint": "#c2c2c2",
|
|
48
|
+
"control-text-strong": "#1a1a1a",
|
|
49
|
+
"control-text": "#4a4a4a",
|
|
50
|
+
"control-text-muted": "#666666",
|
|
51
|
+
"overlay": "rgba(0, 0, 0, 0.5)",
|
|
52
|
+
"on-overlay": "#ffffff",
|
|
53
|
+
"scrim": "rgba(0, 0, 0, 0.6)",
|
|
54
|
+
"media-backdrop": "#000000"
|
|
55
|
+
},
|
|
56
|
+
"material": {
|
|
57
|
+
"primary": "#009747",
|
|
58
|
+
"on-primary": "#ffffff",
|
|
59
|
+
"primary-container": "#96f6c5",
|
|
60
|
+
"on-primary-container": "#006d32",
|
|
61
|
+
"secondary": "#009747",
|
|
62
|
+
"secondary-container": "#96f6c5",
|
|
63
|
+
"on-secondary-container": "#006d32",
|
|
64
|
+
"tertiary-container": "#96f6c5",
|
|
65
|
+
"on-tertiary-container": "#006d32",
|
|
66
|
+
"error": "#c14e42",
|
|
67
|
+
"on-error-container": "#c14e42",
|
|
68
|
+
"surface": "#ffffff",
|
|
69
|
+
"surface-container-low": "#f8f8f8",
|
|
70
|
+
"surface-container-high": "#e9e9e9",
|
|
71
|
+
"surface-container-highest": "#e0e0e0",
|
|
72
|
+
"on-surface": "#1a1a1a",
|
|
73
|
+
"on-surface-variant": "#4a4a4a",
|
|
74
|
+
"outline": "#8b8b8b",
|
|
75
|
+
"shadow": "#000000"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"space": {
|
|
79
|
+
"0": "0px",
|
|
80
|
+
"1": "4px",
|
|
81
|
+
"2": "8px",
|
|
82
|
+
"3": "12px",
|
|
83
|
+
"4": "16px",
|
|
84
|
+
"5": "24px",
|
|
85
|
+
"6": "32px",
|
|
86
|
+
"7": "48px",
|
|
87
|
+
"8": "64px"
|
|
88
|
+
},
|
|
89
|
+
"radius": {
|
|
90
|
+
"sm": "6px",
|
|
91
|
+
"md": "10px",
|
|
92
|
+
"lg": "16px",
|
|
93
|
+
"full": "999px"
|
|
94
|
+
},
|
|
95
|
+
"type": {
|
|
96
|
+
"family": {
|
|
97
|
+
"base": "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
98
|
+
"mono": "'IBM Plex Mono', ui-monospace, monospace",
|
|
99
|
+
"material": "'Roboto', -apple-system, BlinkMacSystemFont, sans-serif"
|
|
100
|
+
},
|
|
101
|
+
"size": {
|
|
102
|
+
"xs": "12px",
|
|
103
|
+
"sm": "14px",
|
|
104
|
+
"md": "16px",
|
|
105
|
+
"lg": "20px",
|
|
106
|
+
"xl": "26px",
|
|
107
|
+
"2xl": "34px",
|
|
108
|
+
"title-large": "22px",
|
|
109
|
+
"title-medium": "16px",
|
|
110
|
+
"body-large": "16px",
|
|
111
|
+
"body-medium": "14px",
|
|
112
|
+
"label-large": "14px",
|
|
113
|
+
"label-small": "11px"
|
|
114
|
+
},
|
|
115
|
+
"weight": {
|
|
116
|
+
"regular": "440",
|
|
117
|
+
"medium": "540",
|
|
118
|
+
"semibold": "620",
|
|
119
|
+
"material-regular": "400",
|
|
120
|
+
"material-medium": "500"
|
|
121
|
+
},
|
|
122
|
+
"leading": {
|
|
123
|
+
"tight": "1.15",
|
|
124
|
+
"base": "1.45",
|
|
125
|
+
"loose": "1.7",
|
|
126
|
+
"title-large": "28px",
|
|
127
|
+
"title-medium": "24px",
|
|
128
|
+
"body-large": "24px",
|
|
129
|
+
"body-medium": "20px",
|
|
130
|
+
"label-large": "20px",
|
|
131
|
+
"label-small": "16px"
|
|
132
|
+
},
|
|
133
|
+
"tracking": {
|
|
134
|
+
"title-large": "0px",
|
|
135
|
+
"title-medium": "0.15px",
|
|
136
|
+
"body-large": "0.5px",
|
|
137
|
+
"body-medium": "0.25px",
|
|
138
|
+
"label-large": "0.1px",
|
|
139
|
+
"label-small": "0.5px"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"motion": {
|
|
143
|
+
"duration": {
|
|
144
|
+
"fast": "120ms",
|
|
145
|
+
"base": "200ms",
|
|
146
|
+
"slow": "360ms",
|
|
147
|
+
"steep": "900ms"
|
|
148
|
+
},
|
|
149
|
+
"easing": {
|
|
150
|
+
"standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
151
|
+
"growth": "cubic-bezier(0.34, 1.2, 0.64, 1)"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"shadow": {
|
|
155
|
+
"menu": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)"
|
|
156
|
+
},
|
|
157
|
+
"gradient": {
|
|
158
|
+
"ai": "linear-gradient(90deg, #7b6fd6, #e08d75, #afc9f2, #7b6fd6)"
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/** Flat lookup, e.g. flatTokens["color.semantic.accent"] */
|
|
163
|
+
export const flatTokens = {
|
|
164
|
+
"color.root.gray-0": "#000000",
|
|
165
|
+
"color.root.gray-10": "#1a1a1a",
|
|
166
|
+
"color.root.gray-30": "#4a4a4a",
|
|
167
|
+
"color.root.gray-40": "#666666",
|
|
168
|
+
"color.root.gray-50": "#8b8b8b",
|
|
169
|
+
"color.root.gray-60": "#9e9e9e",
|
|
170
|
+
"color.root.gray-75": "#c2c2c2",
|
|
171
|
+
"color.root.gray-85": "#e0e0e0",
|
|
172
|
+
"color.root.gray-90": "#e9e9e9",
|
|
173
|
+
"color.root.gray-97": "#f8f8f8",
|
|
174
|
+
"color.root.gray-100": "#ffffff",
|
|
175
|
+
"color.root.green-30": "#005324",
|
|
176
|
+
"color.root.green-40": "#006d32",
|
|
177
|
+
"color.root.green-50": "#009747",
|
|
178
|
+
"color.root.green-60": "#57b06c",
|
|
179
|
+
"color.root.green-80": "#96f6c5",
|
|
180
|
+
"color.root.green-95": "#e9f4e6",
|
|
181
|
+
"color.root.amber-40": "#a8681c",
|
|
182
|
+
"color.root.amber-50": "#c98226",
|
|
183
|
+
"color.root.amber-80": "#f0d3a4",
|
|
184
|
+
"color.root.red-40": "#a13c33",
|
|
185
|
+
"color.root.red-50": "#c14e42",
|
|
186
|
+
"color.root.red-80": "#f0c2bc",
|
|
187
|
+
"color.semantic.text-on-accent": "#ffffff",
|
|
188
|
+
"color.semantic.accent": "#009747",
|
|
189
|
+
"color.semantic.accent-hover": "#006d32",
|
|
190
|
+
"color.semantic.accent-subtle": "#e9f4e6",
|
|
191
|
+
"color.semantic.accent-soft": "#96f6c5",
|
|
192
|
+
"color.semantic.accent-text": "#006d32",
|
|
193
|
+
"color.semantic.warning": "#c98226",
|
|
194
|
+
"color.semantic.warning-subtle": "#f0d3a4",
|
|
195
|
+
"color.semantic.danger": "#c14e42",
|
|
196
|
+
"color.semantic.danger-subtle": "#f0c2bc",
|
|
197
|
+
"color.semantic.control-surface": "#f8f8f8",
|
|
198
|
+
"color.semantic.control-surface-hover": "#e9e9e9",
|
|
199
|
+
"color.semantic.control-surface-raised": "#ffffff",
|
|
200
|
+
"color.semantic.control-track": "#e0e0e0",
|
|
201
|
+
"color.semantic.control-divider": "#e0e0e0",
|
|
202
|
+
"color.semantic.control-border": "#8b8b8b",
|
|
203
|
+
"color.semantic.control-border-soft": "#9e9e9e",
|
|
204
|
+
"color.semantic.control-border-faint": "#c2c2c2",
|
|
205
|
+
"color.semantic.control-text-strong": "#1a1a1a",
|
|
206
|
+
"color.semantic.control-text": "#4a4a4a",
|
|
207
|
+
"color.semantic.control-text-muted": "#666666",
|
|
208
|
+
"color.semantic.overlay": "rgba(0, 0, 0, 0.5)",
|
|
209
|
+
"color.semantic.on-overlay": "#ffffff",
|
|
210
|
+
"color.semantic.scrim": "rgba(0, 0, 0, 0.6)",
|
|
211
|
+
"color.semantic.media-backdrop": "#000000",
|
|
212
|
+
"color.material.primary": "#009747",
|
|
213
|
+
"color.material.on-primary": "#ffffff",
|
|
214
|
+
"color.material.primary-container": "#96f6c5",
|
|
215
|
+
"color.material.on-primary-container": "#006d32",
|
|
216
|
+
"color.material.secondary": "#009747",
|
|
217
|
+
"color.material.secondary-container": "#96f6c5",
|
|
218
|
+
"color.material.on-secondary-container": "#006d32",
|
|
219
|
+
"color.material.tertiary-container": "#96f6c5",
|
|
220
|
+
"color.material.on-tertiary-container": "#006d32",
|
|
221
|
+
"color.material.error": "#c14e42",
|
|
222
|
+
"color.material.on-error-container": "#c14e42",
|
|
223
|
+
"color.material.surface": "#ffffff",
|
|
224
|
+
"color.material.surface-container-low": "#f8f8f8",
|
|
225
|
+
"color.material.surface-container-high": "#e9e9e9",
|
|
226
|
+
"color.material.surface-container-highest": "#e0e0e0",
|
|
227
|
+
"color.material.on-surface": "#1a1a1a",
|
|
228
|
+
"color.material.on-surface-variant": "#4a4a4a",
|
|
229
|
+
"color.material.outline": "#8b8b8b",
|
|
230
|
+
"color.material.shadow": "#000000",
|
|
231
|
+
"space.0": "0px",
|
|
232
|
+
"space.1": "4px",
|
|
233
|
+
"space.2": "8px",
|
|
234
|
+
"space.3": "12px",
|
|
235
|
+
"space.4": "16px",
|
|
236
|
+
"space.5": "24px",
|
|
237
|
+
"space.6": "32px",
|
|
238
|
+
"space.7": "48px",
|
|
239
|
+
"space.8": "64px",
|
|
240
|
+
"radius.sm": "6px",
|
|
241
|
+
"radius.md": "10px",
|
|
242
|
+
"radius.lg": "16px",
|
|
243
|
+
"radius.full": "999px",
|
|
244
|
+
"type.family.base": "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
245
|
+
"type.family.mono": "'IBM Plex Mono', ui-monospace, monospace",
|
|
246
|
+
"type.family.material": "'Roboto', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
247
|
+
"type.size.xs": "12px",
|
|
248
|
+
"type.size.sm": "14px",
|
|
249
|
+
"type.size.md": "16px",
|
|
250
|
+
"type.size.lg": "20px",
|
|
251
|
+
"type.size.xl": "26px",
|
|
252
|
+
"type.size.2xl": "34px",
|
|
253
|
+
"type.size.title-large": "22px",
|
|
254
|
+
"type.size.title-medium": "16px",
|
|
255
|
+
"type.size.body-large": "16px",
|
|
256
|
+
"type.size.body-medium": "14px",
|
|
257
|
+
"type.size.label-large": "14px",
|
|
258
|
+
"type.size.label-small": "11px",
|
|
259
|
+
"type.weight.regular": "440",
|
|
260
|
+
"type.weight.medium": "540",
|
|
261
|
+
"type.weight.semibold": "620",
|
|
262
|
+
"type.weight.material-regular": "400",
|
|
263
|
+
"type.weight.material-medium": "500",
|
|
264
|
+
"type.leading.tight": "1.15",
|
|
265
|
+
"type.leading.base": "1.45",
|
|
266
|
+
"type.leading.loose": "1.7",
|
|
267
|
+
"type.leading.title-large": "28px",
|
|
268
|
+
"type.leading.title-medium": "24px",
|
|
269
|
+
"type.leading.body-large": "24px",
|
|
270
|
+
"type.leading.body-medium": "20px",
|
|
271
|
+
"type.leading.label-large": "20px",
|
|
272
|
+
"type.leading.label-small": "16px",
|
|
273
|
+
"type.tracking.title-large": "0px",
|
|
274
|
+
"type.tracking.title-medium": "0.15px",
|
|
275
|
+
"type.tracking.body-large": "0.5px",
|
|
276
|
+
"type.tracking.body-medium": "0.25px",
|
|
277
|
+
"type.tracking.label-large": "0.1px",
|
|
278
|
+
"type.tracking.label-small": "0.5px",
|
|
279
|
+
"motion.duration.fast": "120ms",
|
|
280
|
+
"motion.duration.base": "200ms",
|
|
281
|
+
"motion.duration.slow": "360ms",
|
|
282
|
+
"motion.duration.steep": "900ms",
|
|
283
|
+
"motion.easing.standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
284
|
+
"motion.easing.growth": "cubic-bezier(0.34, 1.2, 0.64, 1)",
|
|
285
|
+
"shadow.menu": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)",
|
|
286
|
+
"gradient.ai": "linear-gradient(90deg, #7b6fd6, #e08d75, #afc9f2, #7b6fd6)"
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/** Alias tokens and what they point at, e.g. tokenRefs["color.material.primary"] === "color.semantic.accent" */
|
|
290
|
+
export const tokenRefs = {
|
|
291
|
+
"color.semantic.text-on-accent": "color.root.gray-100",
|
|
292
|
+
"color.semantic.accent": "color.root.green-50",
|
|
293
|
+
"color.semantic.accent-hover": "color.root.green-40",
|
|
294
|
+
"color.semantic.accent-subtle": "color.root.green-95",
|
|
295
|
+
"color.semantic.accent-soft": "color.root.green-80",
|
|
296
|
+
"color.semantic.accent-text": "color.root.green-40",
|
|
297
|
+
"color.semantic.warning": "color.root.amber-50",
|
|
298
|
+
"color.semantic.warning-subtle": "color.root.amber-80",
|
|
299
|
+
"color.semantic.danger": "color.root.red-50",
|
|
300
|
+
"color.semantic.danger-subtle": "color.root.red-80",
|
|
301
|
+
"color.semantic.control-surface": "color.root.gray-97",
|
|
302
|
+
"color.semantic.control-surface-hover": "color.root.gray-90",
|
|
303
|
+
"color.semantic.control-surface-raised": "color.root.gray-100",
|
|
304
|
+
"color.semantic.control-track": "color.root.gray-85",
|
|
305
|
+
"color.semantic.control-divider": "color.root.gray-85",
|
|
306
|
+
"color.semantic.control-border": "color.root.gray-50",
|
|
307
|
+
"color.semantic.control-border-soft": "color.root.gray-60",
|
|
308
|
+
"color.semantic.control-border-faint": "color.root.gray-75",
|
|
309
|
+
"color.semantic.control-text-strong": "color.root.gray-10",
|
|
310
|
+
"color.semantic.control-text": "color.root.gray-30",
|
|
311
|
+
"color.semantic.control-text-muted": "color.root.gray-40",
|
|
312
|
+
"color.semantic.on-overlay": "color.root.gray-100",
|
|
313
|
+
"color.semantic.media-backdrop": "color.root.gray-0",
|
|
314
|
+
"color.material.primary": "color.semantic.accent",
|
|
315
|
+
"color.material.on-primary": "color.semantic.control-surface-raised",
|
|
316
|
+
"color.material.primary-container": "color.semantic.accent-soft",
|
|
317
|
+
"color.material.on-primary-container": "color.semantic.accent-text",
|
|
318
|
+
"color.material.secondary": "color.semantic.accent",
|
|
319
|
+
"color.material.secondary-container": "color.semantic.accent-soft",
|
|
320
|
+
"color.material.on-secondary-container": "color.semantic.accent-text",
|
|
321
|
+
"color.material.tertiary-container": "color.semantic.accent-soft",
|
|
322
|
+
"color.material.on-tertiary-container": "color.semantic.accent-text",
|
|
323
|
+
"color.material.error": "color.semantic.danger",
|
|
324
|
+
"color.material.on-error-container": "color.semantic.danger",
|
|
325
|
+
"color.material.surface": "color.semantic.control-surface-raised",
|
|
326
|
+
"color.material.surface-container-low": "color.semantic.control-surface",
|
|
327
|
+
"color.material.surface-container-high": "color.semantic.control-surface-hover",
|
|
328
|
+
"color.material.surface-container-highest": "color.semantic.control-track",
|
|
329
|
+
"color.material.on-surface": "color.semantic.control-text-strong",
|
|
330
|
+
"color.material.on-surface-variant": "color.semantic.control-text",
|
|
331
|
+
"color.material.outline": "color.semantic.control-border",
|
|
332
|
+
"color.material.shadow": "color.semantic.media-backdrop"
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export default tokens;
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chai-ui/tokens",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CHAI UI design tokens — single source of truth, built to CSS variables, TypeScript, and a Figma Tokens/Variables-plugin JSON.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "kazarazat",
|
|
7
|
+
"homepage": "https://chai-ui.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kazarazat/chai-ui.git",
|
|
11
|
+
"directory": "packages/tokens"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/kazarazat/chai-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai",
|
|
18
|
+
"generative-ai",
|
|
19
|
+
"design-system",
|
|
20
|
+
"ai-ui",
|
|
21
|
+
"design-tokens",
|
|
22
|
+
"css-variables",
|
|
23
|
+
"figma-tokens"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"**/*.css"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/js/index.js",
|
|
30
|
+
"types": "./dist/js/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/js/index.d.ts",
|
|
34
|
+
"import": "./dist/js/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./css": "./dist/css/tokens.css",
|
|
37
|
+
"./figma": "./dist/figma/tokens.figma.json"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"rimraf": "^6.0.1",
|
|
44
|
+
"typescript": "^5.6.3"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "rimraf dist && node build.mjs",
|
|
51
|
+
"dev": "node build.mjs --watch",
|
|
52
|
+
"typecheck": "echo \"(no TS source to typecheck — tokens.json + a plain build.mjs only)\"",
|
|
53
|
+
"lint": "echo \"(no lint configured yet)\"",
|
|
54
|
+
"clean": "rimraf dist"
|
|
55
|
+
}
|
|
56
|
+
}
|