@stevegreco/design-system 0.0.1
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 +64 -0
- package/dist/css/tokens.css +317 -0
- package/dist/tokens/primitives.json +162 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# design-system
|
|
2
|
+
|
|
3
|
+
Design token package with DTCG-style source tokens and generated distribution artifacts.
|
|
4
|
+
|
|
5
|
+
## Source of truth
|
|
6
|
+
|
|
7
|
+
- DTCG-style tokens: `tokens/primitives.tokens.json`
|
|
8
|
+
- Semantic token examples:
|
|
9
|
+
- `tokens/semantic/light.tokens.json`
|
|
10
|
+
- `tokens/semantic/dark.tokens.json`
|
|
11
|
+
|
|
12
|
+
## Build outputs
|
|
13
|
+
|
|
14
|
+
- CSS variables (single file): `dist/css/tokens.css`
|
|
15
|
+
- JSON tokens: `dist/tokens/primitives.json`
|
|
16
|
+
- The CSS file contains:
|
|
17
|
+
- primitives in `:root` with `--primitives-*` names
|
|
18
|
+
- semantic light tokens in `:root`
|
|
19
|
+
- semantic dark overrides in `:root[data-theme="dark"]`
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Build
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm run build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Consume in CSS projects
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
@import "design-system/css";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or via JS:
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
import "design-system/css";
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Semantic layers:
|
|
46
|
+
The single CSS entry already includes both light and dark semantic layers.
|
|
47
|
+
The sample semantic token is `--semantic-color-background-brand`.
|
|
48
|
+
|
|
49
|
+
## Consume JSON tokens
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import tokens from "design-system/tokens";
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Publish checklist
|
|
56
|
+
|
|
57
|
+
1. Run `pnpm run build`
|
|
58
|
+
2. Bump version in `package.json`
|
|
59
|
+
3. Publish with `pnpm publish`
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- The package uses Style Dictionary to generate platform outputs.
|
|
64
|
+
- Keep editing tokens in `tokens/primitives.tokens.json` rather than editing `dist/*` files directly.
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--primitives-color-white: #ffffff;
|
|
7
|
+
--primitives-color-black: #000000;
|
|
8
|
+
--primitives-color-rob-roy-50: #fdf9ed;
|
|
9
|
+
--primitives-color-rob-roy-100: #f7edce;
|
|
10
|
+
--primitives-color-rob-roy-200: #efda98;
|
|
11
|
+
--primitives-color-rob-roy-300: #e8c468;
|
|
12
|
+
--primitives-color-rob-roy-400: #e1ac3e;
|
|
13
|
+
--primitives-color-rob-roy-500: #d98f27;
|
|
14
|
+
--primitives-color-rob-roy-600: #c06d1f;
|
|
15
|
+
--primitives-color-rob-roy-700: #a0501d;
|
|
16
|
+
--primitives-color-rob-roy-800: #823f1e;
|
|
17
|
+
--primitives-color-rob-roy-900: #6b341c;
|
|
18
|
+
--primitives-color-rob-roy-950: #3d1a0b;
|
|
19
|
+
--primitives-color-blue-smoke-50: #f6f7f7;
|
|
20
|
+
--primitives-color-blue-smoke-100: #e0e7e3;
|
|
21
|
+
--primitives-color-blue-smoke-200: #c1cec7;
|
|
22
|
+
--primitives-color-blue-smoke-300: #9aaea4;
|
|
23
|
+
--primitives-color-blue-smoke-400: #7a9086;
|
|
24
|
+
--primitives-color-blue-smoke-500: #5b7168;
|
|
25
|
+
--primitives-color-blue-smoke-600: #475a52;
|
|
26
|
+
--primitives-color-blue-smoke-700: #3b4a43;
|
|
27
|
+
--primitives-color-blue-smoke-800: #323d38;
|
|
28
|
+
--primitives-color-blue-smoke-900: #2c3531;
|
|
29
|
+
--primitives-color-blue-smoke-950: #171c1a;
|
|
30
|
+
--primitives-color-clay-50: #faf6f0;
|
|
31
|
+
--primitives-color-clay-100: #f2ebdf;
|
|
32
|
+
--primitives-color-clay-200: #e6d8c3;
|
|
33
|
+
--primitives-color-clay-300: #d4bea0;
|
|
34
|
+
--primitives-color-clay-400: #b89977;
|
|
35
|
+
--primitives-color-clay-500: #9a7a58;
|
|
36
|
+
--primitives-color-clay-600: #7c6044;
|
|
37
|
+
--primitives-color-clay-700: #5e4733;
|
|
38
|
+
--primitives-color-clay-800: #3f2f22;
|
|
39
|
+
--primitives-color-clay-900: #221a13;
|
|
40
|
+
--primitives-color-moss-100: #e3ecd9;
|
|
41
|
+
--primitives-color-moss-500: #6b8e5a;
|
|
42
|
+
--primitives-color-moss-700: #4a6b3d;
|
|
43
|
+
--primitives-color-moss-900: #394739;
|
|
44
|
+
--primitives-color-rust-100: #f5dbd0;
|
|
45
|
+
--primitives-color-rust-500: #b8472a;
|
|
46
|
+
--primitives-color-rust-700: #84301c;
|
|
47
|
+
--primitives-color-rust-900: #483930;
|
|
48
|
+
--primitives-color-sky-100: #d6e1ea;
|
|
49
|
+
--primitives-color-sky-500: #4a7896;
|
|
50
|
+
--primitives-color-sky-700: #2f5973;
|
|
51
|
+
--primitives-color-sky-900: #34464a;
|
|
52
|
+
--primitives-font-display: 'Lora', Georgia, serif;
|
|
53
|
+
--primitives-font-sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
|
|
54
|
+
--primitives-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
|
|
55
|
+
--primitives-text-2xs: 11px;
|
|
56
|
+
--primitives-text-xs: 12px;
|
|
57
|
+
--primitives-text-sm: 14px;
|
|
58
|
+
--primitives-text-base: 16px;
|
|
59
|
+
--primitives-text-md: 18px;
|
|
60
|
+
--primitives-text-lg: 20px;
|
|
61
|
+
--primitives-text-xl: 24px;
|
|
62
|
+
--primitives-text-2xl: 30px;
|
|
63
|
+
--primitives-text-3xl: 38px;
|
|
64
|
+
--primitives-text-4xl: 48px;
|
|
65
|
+
--primitives-text-5xl: 60px;
|
|
66
|
+
--primitives-text-6xl: 76px;
|
|
67
|
+
--primitives-weight-light: 300;
|
|
68
|
+
--primitives-weight-regular: 400;
|
|
69
|
+
--primitives-weight-medium: 500;
|
|
70
|
+
--primitives-weight-semibold: 600;
|
|
71
|
+
--primitives-weight-bold: 700;
|
|
72
|
+
--primitives-leading-tight: 1.15;
|
|
73
|
+
--primitives-leading-snug: 1.25;
|
|
74
|
+
--primitives-leading-normal: 1.5;
|
|
75
|
+
--primitives-leading-relaxed: 1.65;
|
|
76
|
+
--primitives-tracking-tight: -0.02em;
|
|
77
|
+
--primitives-tracking-snug: -0.01em;
|
|
78
|
+
--primitives-tracking-normal: 0em;
|
|
79
|
+
--primitives-tracking-wide: 0.04em;
|
|
80
|
+
--primitives-tracking-caps: 0.08em;
|
|
81
|
+
--primitives-space-0: 0;
|
|
82
|
+
--primitives-space-1: 4px;
|
|
83
|
+
--primitives-space-2: 8px;
|
|
84
|
+
--primitives-space-3: 12px;
|
|
85
|
+
--primitives-space-4: 16px;
|
|
86
|
+
--primitives-space-5: 20px;
|
|
87
|
+
--primitives-space-6: 24px;
|
|
88
|
+
--primitives-space-8: 32px;
|
|
89
|
+
--primitives-space-10: 40px;
|
|
90
|
+
--primitives-space-12: 48px;
|
|
91
|
+
--primitives-space-16: 64px;
|
|
92
|
+
--primitives-space-20: 80px;
|
|
93
|
+
--primitives-space-24: 96px;
|
|
94
|
+
--primitives-space-32: 128px;
|
|
95
|
+
--primitives-space-px: 1px;
|
|
96
|
+
--primitives-radius-none: 0;
|
|
97
|
+
--primitives-radius-xs: 3px;
|
|
98
|
+
--primitives-radius-sm: 6px;
|
|
99
|
+
--primitives-radius-md: 10px;
|
|
100
|
+
--primitives-radius-lg: 14px;
|
|
101
|
+
--primitives-radius-xl: 20px;
|
|
102
|
+
--primitives-radius-2xl: 28px;
|
|
103
|
+
--primitives-radius-full: 9999px;
|
|
104
|
+
--primitives-shadow-xs: 0 1px 2px rgba(61, 26, 11, 0.06);
|
|
105
|
+
--primitives-shadow-sm: 0 1px 2px rgba(61, 26, 11, 0.05), 0 2px 4px rgba(61, 26, 11, 0.04);
|
|
106
|
+
--primitives-shadow-md: 0 2px 4px rgba(61, 26, 11, 0.05), 0 6px 14px rgba(61, 26, 11, 0.07);
|
|
107
|
+
--primitives-shadow-lg: 0 4px 8px rgba(61, 26, 11, 0.06), 0 16px 32px rgba(61, 26, 11, 0.10);
|
|
108
|
+
--primitives-shadow-xl: 0 8px 16px rgba(61, 26, 11, 0.08), 0 32px 64px rgba(61, 26, 11, 0.14);
|
|
109
|
+
--primitives-shadow-inset: inset 0 1px 2px rgba(61, 26, 11, 0.08);
|
|
110
|
+
--primitives-shadow-inset-lg: inset 0 2px 6px rgba(61, 26, 11, 0.10);
|
|
111
|
+
--primitives-shadow-none: 0 0 #0000;
|
|
112
|
+
--primitives-ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
113
|
+
--primitives-ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
|
|
114
|
+
--primitives-ease-inout: cubic-bezier(0.65, 0.05, 0.36, 1);
|
|
115
|
+
--primitives-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
|
|
116
|
+
--primitives-duration-fast: 140ms;
|
|
117
|
+
--primitives-duration-base: 220ms;
|
|
118
|
+
--primitives-duration-slow: 360ms;
|
|
119
|
+
--primitives-duration-xslow: 600ms;
|
|
120
|
+
--primitives-layout-narrow: 640px;
|
|
121
|
+
--primitives-layout-prose: 720px;
|
|
122
|
+
--primitives-layout-wide: 960px;
|
|
123
|
+
--primitives-layout-xwide: 1200px;
|
|
124
|
+
--primitives-layout-max: 1440px;
|
|
125
|
+
--primitives-border-none: 0px;
|
|
126
|
+
--primitives-border-thin: 1px;
|
|
127
|
+
--primitives-border-thick: 2px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Do not edit directly, this file was auto-generated.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
:root {
|
|
135
|
+
--semantic-color-background-default: #faf6f0;
|
|
136
|
+
--semantic-color-background-raised: #ffffff;
|
|
137
|
+
--semantic-color-background-sunken: #f2ebdf;
|
|
138
|
+
--semantic-color-background-muted: #e0e7e3;
|
|
139
|
+
--semantic-color-foreground-default: #171c1a;
|
|
140
|
+
--semantic-color-foreground-muted: #3b4a43;
|
|
141
|
+
--semantic-color-foreground-subtle: #5b7168;
|
|
142
|
+
--semantic-color-foreground-faint: #7a9086;
|
|
143
|
+
--semantic-color-foreground-on-accent: #faf6f0;
|
|
144
|
+
--semantic-color-foreground-inverse: #faf6f0;
|
|
145
|
+
--semantic-color-border-default: #c1cec7;
|
|
146
|
+
--semantic-color-border-strong: #9aaea4;
|
|
147
|
+
--semantic-color-border-subtle: #e6d8c3;
|
|
148
|
+
--semantic-color-border-warm: #efda98;
|
|
149
|
+
--semantic-color-accent-default: #a0501d;
|
|
150
|
+
--semantic-color-accent-hover: #823f1e;
|
|
151
|
+
--semantic-color-accent-press: #6b341c;
|
|
152
|
+
--semantic-color-accent-soft: #f7edce;
|
|
153
|
+
--semantic-color-accent-foreground: #faf6f0;
|
|
154
|
+
--semantic-color-secondary-default: #3b4a43;
|
|
155
|
+
--semantic-color-secondary-hover: #323d38;
|
|
156
|
+
--semantic-color-secondary-soft: #e0e7e3;
|
|
157
|
+
--semantic-color-status-success-default: #6b8e5a;
|
|
158
|
+
--semantic-color-status-success-foreground: #4a6b3d;
|
|
159
|
+
--semantic-color-status-success-background: #e3ecd9;
|
|
160
|
+
--semantic-color-status-danger-default: #b8472a;
|
|
161
|
+
--semantic-color-status-danger-foreground: #84301c;
|
|
162
|
+
--semantic-color-status-danger-background: #f5dbd0;
|
|
163
|
+
--semantic-color-status-warning-default: #c06d1f;
|
|
164
|
+
--semantic-color-status-warning-foreground: #823f1e;
|
|
165
|
+
--semantic-color-status-warning-background: #f7edce;
|
|
166
|
+
--semantic-color-status-info-default: #4a7896;
|
|
167
|
+
--semantic-color-status-info-foreground: #2f5973;
|
|
168
|
+
--semantic-color-status-info-background: #d6e1ea;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Do not edit directly, this file was auto-generated.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
:root[data-theme="dark"] {
|
|
176
|
+
--semantic-color-background-default: #171c1a;
|
|
177
|
+
--semantic-color-background-raised: #2c3531;
|
|
178
|
+
--semantic-color-background-sunken: #0e1211;
|
|
179
|
+
--semantic-color-background-muted: #323d38;
|
|
180
|
+
--semantic-color-foreground-default: #faf6f0;
|
|
181
|
+
--semantic-color-foreground-muted: #c1cec7;
|
|
182
|
+
--semantic-color-foreground-subtle: #9aaea4;
|
|
183
|
+
--semantic-color-foreground-faint: #5b7168;
|
|
184
|
+
--semantic-color-foreground-on-accent: #171c1a;
|
|
185
|
+
--semantic-color-foreground-inverse: #171c1a;
|
|
186
|
+
--semantic-color-border-default: #323d38;
|
|
187
|
+
--semantic-color-border-strong: #3b4a43;
|
|
188
|
+
--semantic-color-border-subtle: #2c3531;
|
|
189
|
+
--semantic-color-border-warm: #823f1e;
|
|
190
|
+
--semantic-color-accent-default: #e1ac3e;
|
|
191
|
+
--semantic-color-accent-hover: #e8c468;
|
|
192
|
+
--semantic-color-accent-press: #d98f27;
|
|
193
|
+
--semantic-color-accent-soft: #3a2e1e;
|
|
194
|
+
--semantic-color-accent-foreground: #171c1a;
|
|
195
|
+
--semantic-color-secondary-default: #c1cec7;
|
|
196
|
+
--semantic-color-secondary-hover: #faf6f0;
|
|
197
|
+
--semantic-color-secondary-soft: #323d38;
|
|
198
|
+
--semantic-color-status-success-default: #6b8e5a;
|
|
199
|
+
--semantic-color-status-success-foreground: #e3ecd9;
|
|
200
|
+
--semantic-color-status-success-background: #394739;
|
|
201
|
+
--semantic-color-status-danger-default: #b8472a;
|
|
202
|
+
--semantic-color-status-danger-foreground: #f5dbd0;
|
|
203
|
+
--semantic-color-status-danger-background: #483930;
|
|
204
|
+
--semantic-color-status-warning-default: #d98f27;
|
|
205
|
+
--semantic-color-status-warning-foreground: #f7edce;
|
|
206
|
+
--semantic-color-status-warning-background: #51432d;
|
|
207
|
+
--semantic-color-status-info-default: #4a7896;
|
|
208
|
+
--semantic-color-status-info-foreground: #d6e1ea;
|
|
209
|
+
--semantic-color-status-info-background: #34464a;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Do not edit directly, this file was auto-generated.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
:root {
|
|
217
|
+
--component-button-secondary-bg: rgba(0, 0, 0, 0);
|
|
218
|
+
--component-button-ghost-bg: rgba(0, 0, 0, 0);
|
|
219
|
+
--component-button-ghost-border: rgba(0, 0, 0, 0);
|
|
220
|
+
--component-alert-radius: var(--radius-md);
|
|
221
|
+
--component-alert-padding: var(--space-4);
|
|
222
|
+
--component-alert-gap: var(--space-3);
|
|
223
|
+
--component-alert-font-size: var(--text-sm);
|
|
224
|
+
--component-alert-title-font-weight: var(--weight-semibold);
|
|
225
|
+
--component-badge-radius: var(--radius-full);
|
|
226
|
+
--component-badge-padding-x: var(--space-2);
|
|
227
|
+
--component-badge-padding-y: var(--space-px);
|
|
228
|
+
--component-badge-font-size: var(--text-xs);
|
|
229
|
+
--component-badge-font-weight: var(--weight-medium);
|
|
230
|
+
--component-button-radius-md: var(--radius-md);
|
|
231
|
+
--component-button-radius-full: var(--radius-full);
|
|
232
|
+
--component-button-padding-x: var(--space-4);
|
|
233
|
+
--component-button-padding-y: var(--space-3);
|
|
234
|
+
--component-button-padding-x-sm: var(--space-3);
|
|
235
|
+
--component-button-padding-y-sm: var(--space-2);
|
|
236
|
+
--component-button-font-family: var(--font-sans);
|
|
237
|
+
--component-button-font-weight: var(--weight-medium);
|
|
238
|
+
--component-button-font-size: var(--text-sm);
|
|
239
|
+
--component-button-transition: var(--duration-fast);
|
|
240
|
+
--component-button-danger-fg: var(--color-white);
|
|
241
|
+
--component-card-radius: var(--radius-lg);
|
|
242
|
+
--component-card-shadow: var(--shadow-sm);
|
|
243
|
+
--component-card-shadow-hover: var(--shadow-md);
|
|
244
|
+
--component-card-padding: var(--space-6);
|
|
245
|
+
--component-card-gap: var(--space-4);
|
|
246
|
+
--component-input-radius: var(--radius-sm);
|
|
247
|
+
--component-input-padding-x: var(--space-3);
|
|
248
|
+
--component-input-padding-y: var(--space-2);
|
|
249
|
+
--component-input-shadow: var(--shadow-inset);
|
|
250
|
+
--component-input-shadow-focus: var(--shadow-xs);
|
|
251
|
+
--component-input-font-family: var(--font-sans);
|
|
252
|
+
--component-input-font-size: var(--text-sm);
|
|
253
|
+
--component-alert-success-bg: var(--semantic-color-status-success-background);
|
|
254
|
+
--component-alert-success-fg: var(--semantic-color-status-success-foreground);
|
|
255
|
+
--component-alert-success-icon-color: var(--semantic-color-status-success-default);
|
|
256
|
+
--component-alert-success-border: var(--semantic-color-status-success-background);
|
|
257
|
+
--component-alert-danger-bg: var(--semantic-color-status-danger-background);
|
|
258
|
+
--component-alert-danger-fg: var(--semantic-color-status-danger-foreground);
|
|
259
|
+
--component-alert-danger-icon-color: var(--semantic-color-status-danger-default);
|
|
260
|
+
--component-alert-danger-border: var(--semantic-color-status-danger-background);
|
|
261
|
+
--component-alert-warning-bg: var(--semantic-color-status-warning-background);
|
|
262
|
+
--component-alert-warning-fg: var(--semantic-color-status-warning-foreground);
|
|
263
|
+
--component-alert-warning-icon-color: var(--semantic-color-status-warning-default);
|
|
264
|
+
--component-alert-warning-border: var(--semantic-color-status-warning-background);
|
|
265
|
+
--component-alert-info-bg: var(--semantic-color-status-info-background);
|
|
266
|
+
--component-alert-info-fg: var(--semantic-color-status-info-foreground);
|
|
267
|
+
--component-alert-info-icon-color: var(--semantic-color-status-info-default);
|
|
268
|
+
--component-alert-info-border: var(--semantic-color-status-info-background);
|
|
269
|
+
--component-badge-default-bg: var(--semantic-color-background-muted);
|
|
270
|
+
--component-badge-default-fg: var(--semantic-color-foreground-muted);
|
|
271
|
+
--component-badge-default-border: var(--semantic-color-border-default);
|
|
272
|
+
--component-badge-accent-bg: var(--semantic-color-accent-soft);
|
|
273
|
+
--component-badge-accent-fg: var(--semantic-color-accent-default);
|
|
274
|
+
--component-badge-accent-border: var(--semantic-color-border-warm);
|
|
275
|
+
--component-badge-success-bg: var(--semantic-color-status-success-background);
|
|
276
|
+
--component-badge-success-fg: var(--semantic-color-status-success-foreground);
|
|
277
|
+
--component-badge-success-border: var(--semantic-color-status-success-background);
|
|
278
|
+
--component-badge-danger-bg: var(--semantic-color-status-danger-background);
|
|
279
|
+
--component-badge-danger-fg: var(--semantic-color-status-danger-foreground);
|
|
280
|
+
--component-badge-danger-border: var(--semantic-color-status-danger-background);
|
|
281
|
+
--component-badge-warning-bg: var(--semantic-color-status-warning-background);
|
|
282
|
+
--component-badge-warning-fg: var(--semantic-color-status-warning-foreground);
|
|
283
|
+
--component-badge-warning-border: var(--semantic-color-status-warning-background);
|
|
284
|
+
--component-badge-info-bg: var(--semantic-color-status-info-background);
|
|
285
|
+
--component-badge-info-fg: var(--semantic-color-status-info-foreground);
|
|
286
|
+
--component-badge-info-border: var(--semantic-color-status-info-background);
|
|
287
|
+
--component-button-primary-bg: var(--semantic-color-accent-default);
|
|
288
|
+
--component-button-primary-bg-hover: var(--semantic-color-accent-hover);
|
|
289
|
+
--component-button-primary-bg-press: var(--semantic-color-accent-press);
|
|
290
|
+
--component-button-primary-fg: var(--semantic-color-accent-foreground);
|
|
291
|
+
--component-button-primary-border: var(--semantic-color-accent-default);
|
|
292
|
+
--component-button-secondary-bg-hover: var(--semantic-color-secondary-soft);
|
|
293
|
+
--component-button-secondary-bg-press: var(--semantic-color-secondary-soft);
|
|
294
|
+
--component-button-secondary-fg: var(--semantic-color-secondary-default);
|
|
295
|
+
--component-button-secondary-border: var(--semantic-color-border-default);
|
|
296
|
+
--component-button-ghost-bg-hover: var(--semantic-color-secondary-soft);
|
|
297
|
+
--component-button-ghost-fg: var(--semantic-color-foreground-default);
|
|
298
|
+
--component-button-danger-bg: var(--semantic-color-status-danger-default);
|
|
299
|
+
--component-button-danger-bg-hover: var(--semantic-color-status-danger-foreground);
|
|
300
|
+
--component-button-danger-border: var(--semantic-color-status-danger-default);
|
|
301
|
+
--component-card-bg: var(--semantic-color-background-raised);
|
|
302
|
+
--component-card-border: var(--semantic-color-border-default);
|
|
303
|
+
--component-card-warm-bg: var(--semantic-color-accent-soft);
|
|
304
|
+
--component-card-warm-border: var(--semantic-color-border-warm);
|
|
305
|
+
--component-input-bg: var(--semantic-color-background-raised);
|
|
306
|
+
--component-input-bg-disabled: var(--semantic-color-background-muted);
|
|
307
|
+
--component-input-border: var(--semantic-color-border-default);
|
|
308
|
+
--component-input-border-hover: var(--semantic-color-border-strong);
|
|
309
|
+
--component-input-border-focus: var(--semantic-color-accent-default);
|
|
310
|
+
--component-input-border-error: var(--semantic-color-status-danger-default);
|
|
311
|
+
--component-input-fg: var(--semantic-color-foreground-default);
|
|
312
|
+
--component-input-fg-placeholder: var(--semantic-color-foreground-faint);
|
|
313
|
+
--component-input-fg-disabled: var(--semantic-color-foreground-subtle);
|
|
314
|
+
--component-input-label-fg: var(--semantic-color-foreground-muted);
|
|
315
|
+
--component-input-hint-fg: var(--semantic-color-foreground-subtle);
|
|
316
|
+
--component-input-error-fg: var(--semantic-color-status-danger-foreground);
|
|
317
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"color": {
|
|
3
|
+
"white": "#ffffff",
|
|
4
|
+
"black": "#000000",
|
|
5
|
+
"robRoy": {
|
|
6
|
+
"50": "#fdf9ed",
|
|
7
|
+
"100": "#f7edce",
|
|
8
|
+
"200": "#efda98",
|
|
9
|
+
"300": "#e8c468",
|
|
10
|
+
"400": "#e1ac3e",
|
|
11
|
+
"500": "#d98f27",
|
|
12
|
+
"600": "#c06d1f",
|
|
13
|
+
"700": "#a0501d",
|
|
14
|
+
"800": "#823f1e",
|
|
15
|
+
"900": "#6b341c",
|
|
16
|
+
"950": "#3d1a0b"
|
|
17
|
+
},
|
|
18
|
+
"blueSmoke": {
|
|
19
|
+
"50": "#f6f7f7",
|
|
20
|
+
"100": "#e0e7e3",
|
|
21
|
+
"200": "#c1cec7",
|
|
22
|
+
"300": "#9aaea4",
|
|
23
|
+
"400": "#7a9086",
|
|
24
|
+
"500": "#5b7168",
|
|
25
|
+
"600": "#475a52",
|
|
26
|
+
"700": "#3b4a43",
|
|
27
|
+
"800": "#323d38",
|
|
28
|
+
"900": "#2c3531",
|
|
29
|
+
"950": "#171c1a"
|
|
30
|
+
},
|
|
31
|
+
"clay": {
|
|
32
|
+
"50": "#faf6f0",
|
|
33
|
+
"100": "#f2ebdf",
|
|
34
|
+
"200": "#e6d8c3",
|
|
35
|
+
"300": "#d4bea0",
|
|
36
|
+
"400": "#b89977",
|
|
37
|
+
"500": "#9a7a58",
|
|
38
|
+
"600": "#7c6044",
|
|
39
|
+
"700": "#5e4733",
|
|
40
|
+
"800": "#3f2f22",
|
|
41
|
+
"900": "#221a13"
|
|
42
|
+
},
|
|
43
|
+
"moss": {
|
|
44
|
+
"100": "#e3ecd9",
|
|
45
|
+
"500": "#6b8e5a",
|
|
46
|
+
"700": "#4a6b3d",
|
|
47
|
+
"900": "#394739"
|
|
48
|
+
},
|
|
49
|
+
"rust": {
|
|
50
|
+
"100": "#f5dbd0",
|
|
51
|
+
"500": "#b8472a",
|
|
52
|
+
"700": "#84301c",
|
|
53
|
+
"900": "#483930"
|
|
54
|
+
},
|
|
55
|
+
"sky": {
|
|
56
|
+
"100": "#d6e1ea",
|
|
57
|
+
"500": "#4a7896",
|
|
58
|
+
"700": "#2f5973",
|
|
59
|
+
"900": "#34464a"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"font": {
|
|
63
|
+
"display": "'Lora', Georgia, serif",
|
|
64
|
+
"sans": "'Source Sans 3', system-ui, -apple-system, sans-serif",
|
|
65
|
+
"mono": "'JetBrains Mono', 'SF Mono', Menlo, monospace"
|
|
66
|
+
},
|
|
67
|
+
"text": {
|
|
68
|
+
"2xs": "11px",
|
|
69
|
+
"xs": "12px",
|
|
70
|
+
"sm": "14px",
|
|
71
|
+
"base": "16px",
|
|
72
|
+
"md": "18px",
|
|
73
|
+
"lg": "20px",
|
|
74
|
+
"xl": "24px",
|
|
75
|
+
"2xl": "30px",
|
|
76
|
+
"3xl": "38px",
|
|
77
|
+
"4xl": "48px",
|
|
78
|
+
"5xl": "60px",
|
|
79
|
+
"6xl": "76px"
|
|
80
|
+
},
|
|
81
|
+
"weight": {
|
|
82
|
+
"light": 300,
|
|
83
|
+
"regular": 400,
|
|
84
|
+
"medium": 500,
|
|
85
|
+
"semibold": 600,
|
|
86
|
+
"bold": 700
|
|
87
|
+
},
|
|
88
|
+
"leading": {
|
|
89
|
+
"tight": "1.15",
|
|
90
|
+
"snug": "1.25",
|
|
91
|
+
"normal": "1.5",
|
|
92
|
+
"relaxed": "1.65"
|
|
93
|
+
},
|
|
94
|
+
"tracking": {
|
|
95
|
+
"tight": "-0.02em",
|
|
96
|
+
"snug": "-0.01em",
|
|
97
|
+
"normal": "0em",
|
|
98
|
+
"wide": "0.04em",
|
|
99
|
+
"caps": "0.08em"
|
|
100
|
+
},
|
|
101
|
+
"space": {
|
|
102
|
+
"0": "0",
|
|
103
|
+
"1": "4px",
|
|
104
|
+
"2": "8px",
|
|
105
|
+
"3": "12px",
|
|
106
|
+
"4": "16px",
|
|
107
|
+
"5": "20px",
|
|
108
|
+
"6": "24px",
|
|
109
|
+
"8": "32px",
|
|
110
|
+
"10": "40px",
|
|
111
|
+
"12": "48px",
|
|
112
|
+
"16": "64px",
|
|
113
|
+
"20": "80px",
|
|
114
|
+
"24": "96px",
|
|
115
|
+
"32": "128px",
|
|
116
|
+
"px": "1px"
|
|
117
|
+
},
|
|
118
|
+
"radius": {
|
|
119
|
+
"none": "0",
|
|
120
|
+
"xs": "3px",
|
|
121
|
+
"sm": "6px",
|
|
122
|
+
"md": "10px",
|
|
123
|
+
"lg": "14px",
|
|
124
|
+
"xl": "20px",
|
|
125
|
+
"2xl": "28px",
|
|
126
|
+
"full": "9999px"
|
|
127
|
+
},
|
|
128
|
+
"shadow": {
|
|
129
|
+
"xs": "0 1px 2px rgba(61, 26, 11, 0.06)",
|
|
130
|
+
"sm": "0 1px 2px rgba(61, 26, 11, 0.05), 0 2px 4px rgba(61, 26, 11, 0.04)",
|
|
131
|
+
"md": "0 2px 4px rgba(61, 26, 11, 0.05), 0 6px 14px rgba(61, 26, 11, 0.07)",
|
|
132
|
+
"lg": "0 4px 8px rgba(61, 26, 11, 0.06), 0 16px 32px rgba(61, 26, 11, 0.10)",
|
|
133
|
+
"xl": "0 8px 16px rgba(61, 26, 11, 0.08), 0 32px 64px rgba(61, 26, 11, 0.14)",
|
|
134
|
+
"inset": "inset 0 1px 2px rgba(61, 26, 11, 0.08)",
|
|
135
|
+
"insetLg": "inset 0 2px 6px rgba(61, 26, 11, 0.10)",
|
|
136
|
+
"none": "0 0 #0000"
|
|
137
|
+
},
|
|
138
|
+
"ease": {
|
|
139
|
+
"out": "cubic-bezier(0.22, 0.61, 0.36, 1)",
|
|
140
|
+
"in": "cubic-bezier(0.55, 0.06, 0.68, 0.19)",
|
|
141
|
+
"inout": "cubic-bezier(0.65, 0.05, 0.36, 1)",
|
|
142
|
+
"soft": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
143
|
+
},
|
|
144
|
+
"duration": {
|
|
145
|
+
"fast": "140ms",
|
|
146
|
+
"base": "220ms",
|
|
147
|
+
"slow": "360ms",
|
|
148
|
+
"xslow": "600ms"
|
|
149
|
+
},
|
|
150
|
+
"layout": {
|
|
151
|
+
"narrow": "640px",
|
|
152
|
+
"prose": "720px",
|
|
153
|
+
"wide": "960px",
|
|
154
|
+
"xwide": "1200px",
|
|
155
|
+
"max": "1440px"
|
|
156
|
+
},
|
|
157
|
+
"border": {
|
|
158
|
+
"none": "0px",
|
|
159
|
+
"thin": "1px",
|
|
160
|
+
"thick": "2px"
|
|
161
|
+
}
|
|
162
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stevegreco/design-system",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Design tokens distributed as CSS and JSON artifacts.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/tokens/primitives.json",
|
|
7
|
+
"style": "./dist/css/tokens.css",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/tokens/primitives.json",
|
|
10
|
+
"./css": "./dist/css/tokens.css",
|
|
11
|
+
"./tokens": "./dist/tokens/primitives.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"design-system",
|
|
18
|
+
"design-tokens",
|
|
19
|
+
"css-variables"
|
|
20
|
+
],
|
|
21
|
+
"author": "Steve Greco",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"style-dictionary": "latest"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"build": "pnpm run clean && node build-tokens.js && node build-css.js",
|
|
32
|
+
"showcase": "node generate-showcase.js",
|
|
33
|
+
"dashboard": "open examples/dashboard.html",
|
|
34
|
+
"food": "open examples/food-order.html"
|
|
35
|
+
}
|
|
36
|
+
}
|