@nationaldesignstudio/react 0.2.0 → 0.3.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/dist/components/atoms/background/background.d.ts +13 -27
- package/dist/components/atoms/button/button.d.ts +55 -71
- package/dist/components/atoms/button/icon-button.d.ts +62 -110
- package/dist/components/atoms/input/input-group.d.ts +278 -0
- package/dist/components/atoms/input/input.d.ts +121 -0
- package/dist/components/atoms/select/select.d.ts +131 -0
- package/dist/components/organisms/card/card.d.ts +2 -2
- package/dist/components/sections/prose/prose.d.ts +3 -3
- package/dist/components/sections/river/river.d.ts +1 -1
- package/dist/components/sections/tout/tout.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11034 -7824
- package/dist/index.js.map +1 -1
- package/dist/lib/form-control.d.ts +105 -0
- package/dist/tokens.css +2132 -17329
- package/package.json +1 -1
- package/src/components/atoms/background/background.tsx +71 -109
- package/src/components/atoms/button/button.stories.tsx +42 -0
- package/src/components/atoms/button/button.test.tsx +1 -1
- package/src/components/atoms/button/button.tsx +38 -103
- package/src/components/atoms/button/button.visual.test.tsx +70 -24
- package/src/components/atoms/button/icon-button.tsx +81 -224
- package/src/components/atoms/input/index.ts +17 -0
- package/src/components/atoms/input/input-group.stories.tsx +650 -0
- package/src/components/atoms/input/input-group.test.tsx +376 -0
- package/src/components/atoms/input/input-group.tsx +384 -0
- package/src/components/atoms/input/input.stories.tsx +232 -0
- package/src/components/atoms/input/input.test.tsx +183 -0
- package/src/components/atoms/input/input.tsx +97 -0
- package/src/components/atoms/select/index.ts +18 -0
- package/src/components/atoms/select/select.stories.tsx +455 -0
- package/src/components/atoms/select/select.tsx +320 -0
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
- package/src/components/foundation/typography/typography.stories.tsx +401 -0
- package/src/components/organisms/card/card.stories.tsx +11 -11
- package/src/components/organisms/card/card.test.tsx +1 -1
- package/src/components/organisms/card/card.tsx +2 -2
- package/src/components/organisms/card/card.visual.test.tsx +6 -6
- package/src/components/organisms/navbar/navbar.tsx +2 -2
- package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
- package/src/components/sections/card-grid/card-grid.tsx +1 -1
- package/src/components/sections/faq-section/faq-section.tsx +2 -2
- package/src/components/sections/hero/hero.test.tsx +5 -5
- package/src/components/sections/prose/prose.test.tsx +2 -2
- package/src/components/sections/prose/prose.tsx +4 -5
- package/src/components/sections/river/river.stories.tsx +8 -8
- package/src/components/sections/river/river.test.tsx +1 -1
- package/src/components/sections/river/river.tsx +2 -4
- package/src/components/sections/tout/tout.test.tsx +1 -1
- package/src/components/sections/tout/tout.tsx +2 -2
- package/src/index.ts +41 -0
- package/src/lib/form-control.ts +69 -0
- package/src/stories/Introduction.mdx +29 -15
- package/src/stories/ThemeProvider.stories.tsx +1 -3
- package/src/stories/TokenShowcase.stories.tsx +0 -19
- package/src/stories/TokenShowcase.tsx +714 -1366
- package/src/styles.css +3 -0
- package/src/tests/token-resolution.test.tsx +301 -0
|
@@ -1,1429 +1,777 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<div className="mt-1 text-xs font-mono text-gray-600">{label}</div>
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Color Tokens
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
type ColorScale = {
|
|
8
|
+
name: string;
|
|
9
|
+
prefix: string;
|
|
10
|
+
shades: (string | number)[];
|
|
11
|
+
vibrant?: (string | number)[];
|
|
15
12
|
};
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<ColorSwatch bgClass="bg-gray-700" label="700" />
|
|
35
|
-
<ColorSwatch bgClass="bg-gray-800" label="800" />
|
|
36
|
-
<ColorSwatch bgClass="bg-gray-900" label="900" />
|
|
37
|
-
<ColorSwatch bgClass="bg-gray-1000" label="1000" />
|
|
38
|
-
<ColorSwatch bgClass="bg-gray-1100" label="1100" />
|
|
39
|
-
<ColorSwatch bgClass="bg-gray-1200" label="1200" />
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
{/* Brown */}
|
|
44
|
-
<div className="mb-8">
|
|
45
|
-
<h3 className="text-lg font-semibold mb-3">Brown</h3>
|
|
46
|
-
<div className="grid grid-cols-13 gap-2">
|
|
47
|
-
<ColorSwatch bgClass="bg-brown-50" label="50" />
|
|
48
|
-
<ColorSwatch bgClass="bg-brown-100" label="100" />
|
|
49
|
-
<ColorSwatch bgClass="bg-brown-200" label="200" />
|
|
50
|
-
<ColorSwatch bgClass="bg-brown-300" label="300" />
|
|
51
|
-
<ColorSwatch bgClass="bg-brown-400" label="400" />
|
|
52
|
-
<ColorSwatch bgClass="bg-brown-500" label="500" />
|
|
53
|
-
<ColorSwatch bgClass="bg-brown-600" label="600" />
|
|
54
|
-
<ColorSwatch bgClass="bg-brown-700" label="700" />
|
|
55
|
-
<ColorSwatch bgClass="bg-brown-800" label="800" />
|
|
56
|
-
<ColorSwatch bgClass="bg-brown-900" label="900" />
|
|
57
|
-
<ColorSwatch bgClass="bg-brown-1000" label="1000" />
|
|
58
|
-
<ColorSwatch bgClass="bg-brown-1100" label="1100" />
|
|
59
|
-
<ColorSwatch bgClass="bg-brown-1200" label="1200" />
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
{/* Steel */}
|
|
64
|
-
<div className="mb-8">
|
|
65
|
-
<h3 className="text-lg font-semibold mb-3">Steel</h3>
|
|
66
|
-
<div className="grid grid-cols-13 gap-2">
|
|
67
|
-
<ColorSwatch bgClass="bg-steel-50" label="50" />
|
|
68
|
-
<ColorSwatch bgClass="bg-steel-100" label="100" />
|
|
69
|
-
<ColorSwatch bgClass="bg-steel-200" label="200" />
|
|
70
|
-
<ColorSwatch bgClass="bg-steel-300" label="300" />
|
|
71
|
-
<ColorSwatch bgClass="bg-steel-400" label="400" />
|
|
72
|
-
<ColorSwatch bgClass="bg-steel-500" label="500" />
|
|
73
|
-
<ColorSwatch bgClass="bg-steel-600" label="600" />
|
|
74
|
-
<ColorSwatch bgClass="bg-steel-700" label="700" />
|
|
75
|
-
<ColorSwatch bgClass="bg-steel-800" label="800" />
|
|
76
|
-
<ColorSwatch bgClass="bg-steel-900" label="900" />
|
|
77
|
-
<ColorSwatch bgClass="bg-steel-1000" label="1000" />
|
|
78
|
-
<ColorSwatch bgClass="bg-steel-1100" label="1100" />
|
|
79
|
-
<ColorSwatch bgClass="bg-steel-1200" label="1200" />
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
{/* Red */}
|
|
84
|
-
<div className="mb-8">
|
|
85
|
-
<h3 className="text-lg font-semibold mb-3">Red</h3>
|
|
86
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
87
|
-
<ColorSwatch bgClass="bg-red-50" label="50" />
|
|
88
|
-
<ColorSwatch bgClass="bg-red-100" label="100" />
|
|
89
|
-
<ColorSwatch bgClass="bg-red-200" label="200" />
|
|
90
|
-
<ColorSwatch bgClass="bg-red-300" label="300" />
|
|
91
|
-
<ColorSwatch bgClass="bg-red-400" label="400" />
|
|
92
|
-
<ColorSwatch bgClass="bg-red-500" label="500" />
|
|
93
|
-
<ColorSwatch bgClass="bg-red-600" label="600" />
|
|
94
|
-
<ColorSwatch bgClass="bg-red-700" label="700" />
|
|
95
|
-
<ColorSwatch bgClass="bg-red-800" label="800" />
|
|
96
|
-
<ColorSwatch bgClass="bg-red-900" label="900" />
|
|
97
|
-
</div>
|
|
98
|
-
<div className="mt-3">
|
|
99
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
100
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
101
|
-
<ColorSwatch bgClass="bg-red-v100" label="v100" />
|
|
102
|
-
<ColorSwatch bgClass="bg-red-v200" label="v200" />
|
|
103
|
-
<ColorSwatch bgClass="bg-red-v300" label="v300" />
|
|
104
|
-
<ColorSwatch bgClass="bg-red-v400" label="v400" />
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
{/* Pink */}
|
|
110
|
-
<div className="mb-8">
|
|
111
|
-
<h3 className="text-lg font-semibold mb-3">Pink</h3>
|
|
112
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
113
|
-
<ColorSwatch bgClass="bg-pink-50" label="50" />
|
|
114
|
-
<ColorSwatch bgClass="bg-pink-100" label="100" />
|
|
115
|
-
<ColorSwatch bgClass="bg-pink-200" label="200" />
|
|
116
|
-
<ColorSwatch bgClass="bg-pink-300" label="300" />
|
|
117
|
-
<ColorSwatch bgClass="bg-pink-400" label="400" />
|
|
118
|
-
<ColorSwatch bgClass="bg-pink-500" label="500" />
|
|
119
|
-
<ColorSwatch bgClass="bg-pink-600" label="600" />
|
|
120
|
-
<ColorSwatch bgClass="bg-pink-700" label="700" />
|
|
121
|
-
<ColorSwatch bgClass="bg-pink-800" label="800" />
|
|
122
|
-
<ColorSwatch bgClass="bg-pink-900" label="900" />
|
|
123
|
-
</div>
|
|
124
|
-
<div className="mt-3">
|
|
125
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
126
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
127
|
-
<ColorSwatch bgClass="bg-pink-v100" label="v100" />
|
|
128
|
-
<ColorSwatch bgClass="bg-pink-v200" label="v200" />
|
|
129
|
-
<ColorSwatch bgClass="bg-pink-v300" label="v300" />
|
|
130
|
-
<ColorSwatch bgClass="bg-pink-v400" label="v400" />
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
{/* Purple */}
|
|
136
|
-
<div className="mb-8">
|
|
137
|
-
<h3 className="text-lg font-semibold mb-3">Purple</h3>
|
|
138
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
139
|
-
<ColorSwatch bgClass="bg-purple-50" label="50" />
|
|
140
|
-
<ColorSwatch bgClass="bg-purple-100" label="100" />
|
|
141
|
-
<ColorSwatch bgClass="bg-purple-200" label="200" />
|
|
142
|
-
<ColorSwatch bgClass="bg-purple-300" label="300" />
|
|
143
|
-
<ColorSwatch bgClass="bg-purple-400" label="400" />
|
|
144
|
-
<ColorSwatch bgClass="bg-purple-500" label="500" />
|
|
145
|
-
<ColorSwatch bgClass="bg-purple-600" label="600" />
|
|
146
|
-
<ColorSwatch bgClass="bg-purple-700" label="700" />
|
|
147
|
-
<ColorSwatch bgClass="bg-purple-800" label="800" />
|
|
148
|
-
<ColorSwatch bgClass="bg-purple-900" label="900" />
|
|
149
|
-
</div>
|
|
150
|
-
<div className="mt-3">
|
|
151
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
152
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
153
|
-
<ColorSwatch bgClass="bg-purple-v100" label="v100" />
|
|
154
|
-
<ColorSwatch bgClass="bg-purple-v200" label="v200" />
|
|
155
|
-
<ColorSwatch bgClass="bg-purple-v300" label="v300" />
|
|
156
|
-
<ColorSwatch bgClass="bg-purple-v400" label="v400" />
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
|
|
161
|
-
{/* Iris */}
|
|
162
|
-
<div className="mb-8">
|
|
163
|
-
<h3 className="text-lg font-semibold mb-3">Iris</h3>
|
|
164
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
165
|
-
<ColorSwatch bgClass="bg-iris-50" label="50" />
|
|
166
|
-
<ColorSwatch bgClass="bg-iris-100" label="100" />
|
|
167
|
-
<ColorSwatch bgClass="bg-iris-200" label="200" />
|
|
168
|
-
<ColorSwatch bgClass="bg-iris-300" label="300" />
|
|
169
|
-
<ColorSwatch bgClass="bg-iris-400" label="400" />
|
|
170
|
-
<ColorSwatch bgClass="bg-iris-500" label="500" />
|
|
171
|
-
<ColorSwatch bgClass="bg-iris-600" label="600" />
|
|
172
|
-
<ColorSwatch bgClass="bg-iris-700" label="700" />
|
|
173
|
-
<ColorSwatch bgClass="bg-iris-800" label="800" />
|
|
174
|
-
<ColorSwatch bgClass="bg-iris-900" label="900" />
|
|
175
|
-
</div>
|
|
176
|
-
<div className="mt-3">
|
|
177
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
178
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
179
|
-
<ColorSwatch bgClass="bg-iris-v100" label="v100" />
|
|
180
|
-
<ColorSwatch bgClass="bg-iris-v200" label="v200" />
|
|
181
|
-
<ColorSwatch bgClass="bg-iris-v300" label="v300" />
|
|
182
|
-
<ColorSwatch bgClass="bg-iris-v400" label="v400" />
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
{/* Indigo */}
|
|
188
|
-
<div className="mb-8">
|
|
189
|
-
<h3 className="text-lg font-semibold mb-3">Indigo</h3>
|
|
190
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
191
|
-
<ColorSwatch bgClass="bg-indigo-50" label="50" />
|
|
192
|
-
<ColorSwatch bgClass="bg-indigo-100" label="100" />
|
|
193
|
-
<ColorSwatch bgClass="bg-indigo-200" label="200" />
|
|
194
|
-
<ColorSwatch bgClass="bg-indigo-300" label="300" />
|
|
195
|
-
<ColorSwatch bgClass="bg-indigo-400" label="400" />
|
|
196
|
-
<ColorSwatch bgClass="bg-indigo-500" label="500" />
|
|
197
|
-
<ColorSwatch bgClass="bg-indigo-600" label="600" />
|
|
198
|
-
<ColorSwatch bgClass="bg-indigo-700" label="700" />
|
|
199
|
-
<ColorSwatch bgClass="bg-indigo-800" label="800" />
|
|
200
|
-
<ColorSwatch bgClass="bg-indigo-900" label="900" />
|
|
201
|
-
</div>
|
|
202
|
-
<div className="mt-3">
|
|
203
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
204
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
205
|
-
<ColorSwatch bgClass="bg-indigo-v100" label="v100" />
|
|
206
|
-
<ColorSwatch bgClass="bg-indigo-v200" label="v200" />
|
|
207
|
-
<ColorSwatch bgClass="bg-indigo-v300" label="v300" />
|
|
208
|
-
<ColorSwatch bgClass="bg-indigo-v400" label="v400" />
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
|
|
213
|
-
{/* Blue */}
|
|
214
|
-
<div className="mb-8">
|
|
215
|
-
<h3 className="text-lg font-semibold mb-3">Blue</h3>
|
|
216
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
217
|
-
<ColorSwatch bgClass="bg-blue-50" label="50" />
|
|
218
|
-
<ColorSwatch bgClass="bg-blue-100" label="100" />
|
|
219
|
-
<ColorSwatch bgClass="bg-blue-200" label="200" />
|
|
220
|
-
<ColorSwatch bgClass="bg-blue-300" label="300" />
|
|
221
|
-
<ColorSwatch bgClass="bg-blue-400" label="400" />
|
|
222
|
-
<ColorSwatch bgClass="bg-blue-500" label="500" />
|
|
223
|
-
<ColorSwatch bgClass="bg-blue-600" label="600" />
|
|
224
|
-
<ColorSwatch bgClass="bg-blue-700" label="700" />
|
|
225
|
-
<ColorSwatch bgClass="bg-blue-800" label="800" />
|
|
226
|
-
<ColorSwatch bgClass="bg-blue-900" label="900" />
|
|
227
|
-
</div>
|
|
228
|
-
<div className="mt-3">
|
|
229
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
230
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
231
|
-
<ColorSwatch bgClass="bg-blue-v100" label="v100" />
|
|
232
|
-
<ColorSwatch bgClass="bg-blue-v200" label="v200" />
|
|
233
|
-
<ColorSwatch bgClass="bg-blue-v300" label="v300" />
|
|
234
|
-
<ColorSwatch bgClass="bg-blue-v400" label="v400" />
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
{/* Ice */}
|
|
240
|
-
<div className="mb-8">
|
|
241
|
-
<h3 className="text-lg font-semibold mb-3">Ice</h3>
|
|
242
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
243
|
-
<ColorSwatch bgClass="bg-ice-50" label="50" />
|
|
244
|
-
<ColorSwatch bgClass="bg-ice-100" label="100" />
|
|
245
|
-
<ColorSwatch bgClass="bg-ice-200" label="200" />
|
|
246
|
-
<ColorSwatch bgClass="bg-ice-300" label="300" />
|
|
247
|
-
<ColorSwatch bgClass="bg-ice-400" label="400" />
|
|
248
|
-
<ColorSwatch bgClass="bg-ice-500" label="500" />
|
|
249
|
-
<ColorSwatch bgClass="bg-ice-600" label="600" />
|
|
250
|
-
<ColorSwatch bgClass="bg-ice-700" label="700" />
|
|
251
|
-
<ColorSwatch bgClass="bg-ice-800" label="800" />
|
|
252
|
-
<ColorSwatch bgClass="bg-ice-900" label="900" />
|
|
253
|
-
</div>
|
|
254
|
-
<div className="mt-3">
|
|
255
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
256
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
257
|
-
<ColorSwatch bgClass="bg-ice-v100" label="v100" />
|
|
258
|
-
<ColorSwatch bgClass="bg-ice-v200" label="v200" />
|
|
259
|
-
<ColorSwatch bgClass="bg-ice-v300" label="v300" />
|
|
260
|
-
<ColorSwatch bgClass="bg-ice-v400" label="v400" />
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
264
|
-
|
|
265
|
-
{/* Cyan */}
|
|
266
|
-
<div className="mb-8">
|
|
267
|
-
<h3 className="text-lg font-semibold mb-3">Cyan</h3>
|
|
268
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
269
|
-
<ColorSwatch bgClass="bg-cyan-50" label="50" />
|
|
270
|
-
<ColorSwatch bgClass="bg-cyan-100" label="100" />
|
|
271
|
-
<ColorSwatch bgClass="bg-cyan-200" label="200" />
|
|
272
|
-
<ColorSwatch bgClass="bg-cyan-300" label="300" />
|
|
273
|
-
<ColorSwatch bgClass="bg-cyan-400" label="400" />
|
|
274
|
-
<ColorSwatch bgClass="bg-cyan-500" label="500" />
|
|
275
|
-
<ColorSwatch bgClass="bg-cyan-600" label="600" />
|
|
276
|
-
<ColorSwatch bgClass="bg-cyan-700" label="700" />
|
|
277
|
-
<ColorSwatch bgClass="bg-cyan-800" label="800" />
|
|
278
|
-
<ColorSwatch bgClass="bg-cyan-900" label="900" />
|
|
279
|
-
</div>
|
|
280
|
-
<div className="mt-3">
|
|
281
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
282
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
283
|
-
<ColorSwatch bgClass="bg-cyan-v100" label="v100" />
|
|
284
|
-
<ColorSwatch bgClass="bg-cyan-v200" label="v200" />
|
|
285
|
-
<ColorSwatch bgClass="bg-cyan-v300" label="v300" />
|
|
286
|
-
<ColorSwatch bgClass="bg-cyan-v400" label="v400" />
|
|
287
|
-
</div>
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
|
|
291
|
-
{/* Teal */}
|
|
292
|
-
<div className="mb-8">
|
|
293
|
-
<h3 className="text-lg font-semibold mb-3">Teal</h3>
|
|
294
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
295
|
-
<ColorSwatch bgClass="bg-teal-50" label="50" />
|
|
296
|
-
<ColorSwatch bgClass="bg-teal-100" label="100" />
|
|
297
|
-
<ColorSwatch bgClass="bg-teal-200" label="200" />
|
|
298
|
-
<ColorSwatch bgClass="bg-teal-300" label="300" />
|
|
299
|
-
<ColorSwatch bgClass="bg-teal-400" label="400" />
|
|
300
|
-
<ColorSwatch bgClass="bg-teal-500" label="500" />
|
|
301
|
-
<ColorSwatch bgClass="bg-teal-600" label="600" />
|
|
302
|
-
<ColorSwatch bgClass="bg-teal-700" label="700" />
|
|
303
|
-
<ColorSwatch bgClass="bg-teal-800" label="800" />
|
|
304
|
-
<ColorSwatch bgClass="bg-teal-900" label="900" />
|
|
305
|
-
</div>
|
|
306
|
-
<div className="mt-3">
|
|
307
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
308
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
309
|
-
<ColorSwatch bgClass="bg-teal-v100" label="v100" />
|
|
310
|
-
<ColorSwatch bgClass="bg-teal-v200" label="v200" />
|
|
311
|
-
<ColorSwatch bgClass="bg-teal-v300" label="v300" />
|
|
312
|
-
<ColorSwatch bgClass="bg-teal-v400" label="v400" />
|
|
313
|
-
</div>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
{/* Green */}
|
|
318
|
-
<div className="mb-8">
|
|
319
|
-
<h3 className="text-lg font-semibold mb-3">Green</h3>
|
|
320
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
321
|
-
<ColorSwatch bgClass="bg-green-50" label="50" />
|
|
322
|
-
<ColorSwatch bgClass="bg-green-100" label="100" />
|
|
323
|
-
<ColorSwatch bgClass="bg-green-200" label="200" />
|
|
324
|
-
<ColorSwatch bgClass="bg-green-300" label="300" />
|
|
325
|
-
<ColorSwatch bgClass="bg-green-400" label="400" />
|
|
326
|
-
<ColorSwatch bgClass="bg-green-500" label="500" />
|
|
327
|
-
<ColorSwatch bgClass="bg-green-600" label="600" />
|
|
328
|
-
<ColorSwatch bgClass="bg-green-700" label="700" />
|
|
329
|
-
<ColorSwatch bgClass="bg-green-800" label="800" />
|
|
330
|
-
<ColorSwatch bgClass="bg-green-900" label="900" />
|
|
331
|
-
</div>
|
|
332
|
-
<div className="mt-3">
|
|
333
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
334
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
335
|
-
<ColorSwatch bgClass="bg-green-v100" label="v100" />
|
|
336
|
-
<ColorSwatch bgClass="bg-green-v200" label="v200" />
|
|
337
|
-
<ColorSwatch bgClass="bg-green-v300" label="v300" />
|
|
338
|
-
<ColorSwatch bgClass="bg-green-v400" label="v400" />
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
|
|
343
|
-
{/* Sage */}
|
|
344
|
-
<div className="mb-8">
|
|
345
|
-
<h3 className="text-lg font-semibold mb-3">Sage</h3>
|
|
346
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
347
|
-
<ColorSwatch bgClass="bg-sage-50" label="50" />
|
|
348
|
-
<ColorSwatch bgClass="bg-sage-100" label="100" />
|
|
349
|
-
<ColorSwatch bgClass="bg-sage-200" label="200" />
|
|
350
|
-
<ColorSwatch bgClass="bg-sage-300" label="300" />
|
|
351
|
-
<ColorSwatch bgClass="bg-sage-400" label="400" />
|
|
352
|
-
<ColorSwatch bgClass="bg-sage-500" label="500" />
|
|
353
|
-
<ColorSwatch bgClass="bg-sage-600" label="600" />
|
|
354
|
-
<ColorSwatch bgClass="bg-sage-700" label="700" />
|
|
355
|
-
<ColorSwatch bgClass="bg-sage-800" label="800" />
|
|
356
|
-
<ColorSwatch bgClass="bg-sage-900" label="900" />
|
|
357
|
-
</div>
|
|
358
|
-
<div className="mt-3">
|
|
359
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
360
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
361
|
-
<ColorSwatch bgClass="bg-sage-v100" label="v100" />
|
|
362
|
-
<ColorSwatch bgClass="bg-sage-v200" label="v200" />
|
|
363
|
-
<ColorSwatch bgClass="bg-sage-v300" label="v300" />
|
|
364
|
-
<ColorSwatch bgClass="bg-sage-v400" label="v400" />
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
</div>
|
|
368
|
-
|
|
369
|
-
{/* Lime */}
|
|
370
|
-
<div className="mb-8">
|
|
371
|
-
<h3 className="text-lg font-semibold mb-3">Lime</h3>
|
|
372
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
373
|
-
<ColorSwatch bgClass="bg-lime-50" label="50" />
|
|
374
|
-
<ColorSwatch bgClass="bg-lime-100" label="100" />
|
|
375
|
-
<ColorSwatch bgClass="bg-lime-200" label="200" />
|
|
376
|
-
<ColorSwatch bgClass="bg-lime-300" label="300" />
|
|
377
|
-
<ColorSwatch bgClass="bg-lime-400" label="400" />
|
|
378
|
-
<ColorSwatch bgClass="bg-lime-500" label="500" />
|
|
379
|
-
<ColorSwatch bgClass="bg-lime-600" label="600" />
|
|
380
|
-
<ColorSwatch bgClass="bg-lime-700" label="700" />
|
|
381
|
-
<ColorSwatch bgClass="bg-lime-800" label="800" />
|
|
382
|
-
<ColorSwatch bgClass="bg-lime-900" label="900" />
|
|
383
|
-
</div>
|
|
384
|
-
<div className="mt-3">
|
|
385
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
386
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
387
|
-
<ColorSwatch bgClass="bg-lime-v100" label="v100" />
|
|
388
|
-
<ColorSwatch bgClass="bg-lime-v200" label="v200" />
|
|
389
|
-
<ColorSwatch bgClass="bg-lime-v300" label="v300" />
|
|
390
|
-
<ColorSwatch bgClass="bg-lime-v400" label="v400" />
|
|
391
|
-
</div>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
|
|
395
|
-
{/* Yellow */}
|
|
396
|
-
<div className="mb-8">
|
|
397
|
-
<h3 className="text-lg font-semibold mb-3">Yellow</h3>
|
|
398
|
-
<div className="grid grid-cols-10 gap-2 mb-2">
|
|
399
|
-
<ColorSwatch bgClass="bg-yellow-50" label="50" />
|
|
400
|
-
<ColorSwatch bgClass="bg-yellow-100" label="100" />
|
|
401
|
-
<ColorSwatch bgClass="bg-yellow-200" label="200" />
|
|
402
|
-
<ColorSwatch bgClass="bg-yellow-300" label="300" />
|
|
403
|
-
<ColorSwatch bgClass="bg-yellow-400" label="400" />
|
|
404
|
-
<ColorSwatch bgClass="bg-yellow-500" label="500" />
|
|
405
|
-
<ColorSwatch bgClass="bg-yellow-600" label="600" />
|
|
406
|
-
<ColorSwatch bgClass="bg-yellow-700" label="700" />
|
|
407
|
-
<ColorSwatch bgClass="bg-yellow-800" label="800" />
|
|
408
|
-
<ColorSwatch bgClass="bg-yellow-900" label="900" />
|
|
409
|
-
</div>
|
|
410
|
-
<div className="mt-3">
|
|
411
|
-
<div className="text-sm text-gray-500 mb-2">Vibrant</div>
|
|
412
|
-
<div className="grid grid-cols-4 gap-2 max-w-xs">
|
|
413
|
-
<ColorSwatch bgClass="bg-yellow-v100" label="v100" />
|
|
414
|
-
<ColorSwatch bgClass="bg-yellow-v200" label="v200" />
|
|
415
|
-
<ColorSwatch bgClass="bg-yellow-v300" label="v300" />
|
|
416
|
-
<ColorSwatch bgClass="bg-yellow-v400" label="v400" />
|
|
417
|
-
</div>
|
|
418
|
-
</div>
|
|
419
|
-
</div>
|
|
14
|
+
const neutralScales: ColorScale[] = [
|
|
15
|
+
{
|
|
16
|
+
name: "Gray",
|
|
17
|
+
prefix: "gray",
|
|
18
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Brown",
|
|
22
|
+
prefix: "brown",
|
|
23
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "Steel",
|
|
27
|
+
prefix: "steel",
|
|
28
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
420
31
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
32
|
+
const colorScales: ColorScale[] = [
|
|
33
|
+
{
|
|
34
|
+
name: "Red",
|
|
35
|
+
prefix: "red",
|
|
36
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
37
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "Pink",
|
|
41
|
+
prefix: "pink",
|
|
42
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
43
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "Purple",
|
|
47
|
+
prefix: "purple",
|
|
48
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
49
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Iris",
|
|
53
|
+
prefix: "iris",
|
|
54
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
55
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "Indigo",
|
|
59
|
+
prefix: "indigo",
|
|
60
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
61
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "Blue",
|
|
65
|
+
prefix: "blue",
|
|
66
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
67
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Ice",
|
|
71
|
+
prefix: "ice",
|
|
72
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
73
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Cyan",
|
|
77
|
+
prefix: "cyan",
|
|
78
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
79
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "Teal",
|
|
83
|
+
prefix: "teal",
|
|
84
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
85
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Green",
|
|
89
|
+
prefix: "green",
|
|
90
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
91
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "Sage",
|
|
95
|
+
prefix: "sage",
|
|
96
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
97
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "Lime",
|
|
101
|
+
prefix: "lime",
|
|
102
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
103
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "Yellow",
|
|
107
|
+
prefix: "yellow",
|
|
108
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
109
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "Amber",
|
|
113
|
+
prefix: "amber",
|
|
114
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
115
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "Orange",
|
|
119
|
+
prefix: "orange",
|
|
120
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
121
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "Ember",
|
|
125
|
+
prefix: "ember",
|
|
126
|
+
shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
127
|
+
vibrant: ["v100", "v200", "v300", "v400"],
|
|
128
|
+
},
|
|
129
|
+
];
|
|
446
130
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
131
|
+
// Tailwind needs static class names - generate lookup maps
|
|
132
|
+
const bgClasses: Record<string, string> = {
|
|
133
|
+
// Neutrals
|
|
134
|
+
"gray-50": "bg-gray-50",
|
|
135
|
+
"gray-100": "bg-gray-100",
|
|
136
|
+
"gray-200": "bg-gray-200",
|
|
137
|
+
"gray-300": "bg-gray-300",
|
|
138
|
+
"gray-400": "bg-gray-400",
|
|
139
|
+
"gray-500": "bg-gray-500",
|
|
140
|
+
"gray-600": "bg-gray-600",
|
|
141
|
+
"gray-700": "bg-gray-700",
|
|
142
|
+
"gray-800": "bg-gray-800",
|
|
143
|
+
"gray-900": "bg-gray-900",
|
|
144
|
+
"gray-1000": "bg-gray-1000",
|
|
145
|
+
"gray-1100": "bg-gray-1100",
|
|
146
|
+
"gray-1200": "bg-gray-1200",
|
|
147
|
+
"brown-50": "bg-brown-50",
|
|
148
|
+
"brown-100": "bg-brown-100",
|
|
149
|
+
"brown-200": "bg-brown-200",
|
|
150
|
+
"brown-300": "bg-brown-300",
|
|
151
|
+
"brown-400": "bg-brown-400",
|
|
152
|
+
"brown-500": "bg-brown-500",
|
|
153
|
+
"brown-600": "bg-brown-600",
|
|
154
|
+
"brown-700": "bg-brown-700",
|
|
155
|
+
"brown-800": "bg-brown-800",
|
|
156
|
+
"brown-900": "bg-brown-900",
|
|
157
|
+
"brown-1000": "bg-brown-1000",
|
|
158
|
+
"brown-1100": "bg-brown-1100",
|
|
159
|
+
"brown-1200": "bg-brown-1200",
|
|
160
|
+
"steel-50": "bg-steel-50",
|
|
161
|
+
"steel-100": "bg-steel-100",
|
|
162
|
+
"steel-200": "bg-steel-200",
|
|
163
|
+
"steel-300": "bg-steel-300",
|
|
164
|
+
"steel-400": "bg-steel-400",
|
|
165
|
+
"steel-500": "bg-steel-500",
|
|
166
|
+
"steel-600": "bg-steel-600",
|
|
167
|
+
"steel-700": "bg-steel-700",
|
|
168
|
+
"steel-800": "bg-steel-800",
|
|
169
|
+
"steel-900": "bg-steel-900",
|
|
170
|
+
"steel-1000": "bg-steel-1000",
|
|
171
|
+
"steel-1100": "bg-steel-1100",
|
|
172
|
+
"steel-1200": "bg-steel-1200",
|
|
173
|
+
// Colors
|
|
174
|
+
"red-50": "bg-red-50",
|
|
175
|
+
"red-100": "bg-red-100",
|
|
176
|
+
"red-200": "bg-red-200",
|
|
177
|
+
"red-300": "bg-red-300",
|
|
178
|
+
"red-400": "bg-red-400",
|
|
179
|
+
"red-500": "bg-red-500",
|
|
180
|
+
"red-600": "bg-red-600",
|
|
181
|
+
"red-700": "bg-red-700",
|
|
182
|
+
"red-800": "bg-red-800",
|
|
183
|
+
"red-900": "bg-red-900",
|
|
184
|
+
"red-v100": "bg-red-v100",
|
|
185
|
+
"red-v200": "bg-red-v200",
|
|
186
|
+
"red-v300": "bg-red-v300",
|
|
187
|
+
"red-v400": "bg-red-v400",
|
|
188
|
+
"pink-50": "bg-pink-50",
|
|
189
|
+
"pink-100": "bg-pink-100",
|
|
190
|
+
"pink-200": "bg-pink-200",
|
|
191
|
+
"pink-300": "bg-pink-300",
|
|
192
|
+
"pink-400": "bg-pink-400",
|
|
193
|
+
"pink-500": "bg-pink-500",
|
|
194
|
+
"pink-600": "bg-pink-600",
|
|
195
|
+
"pink-700": "bg-pink-700",
|
|
196
|
+
"pink-800": "bg-pink-800",
|
|
197
|
+
"pink-900": "bg-pink-900",
|
|
198
|
+
"pink-v100": "bg-pink-v100",
|
|
199
|
+
"pink-v200": "bg-pink-v200",
|
|
200
|
+
"pink-v300": "bg-pink-v300",
|
|
201
|
+
"pink-v400": "bg-pink-v400",
|
|
202
|
+
"purple-50": "bg-purple-50",
|
|
203
|
+
"purple-100": "bg-purple-100",
|
|
204
|
+
"purple-200": "bg-purple-200",
|
|
205
|
+
"purple-300": "bg-purple-300",
|
|
206
|
+
"purple-400": "bg-purple-400",
|
|
207
|
+
"purple-500": "bg-purple-500",
|
|
208
|
+
"purple-600": "bg-purple-600",
|
|
209
|
+
"purple-700": "bg-purple-700",
|
|
210
|
+
"purple-800": "bg-purple-800",
|
|
211
|
+
"purple-900": "bg-purple-900",
|
|
212
|
+
"purple-v100": "bg-purple-v100",
|
|
213
|
+
"purple-v200": "bg-purple-v200",
|
|
214
|
+
"purple-v300": "bg-purple-v300",
|
|
215
|
+
"purple-v400": "bg-purple-v400",
|
|
216
|
+
"iris-50": "bg-iris-50",
|
|
217
|
+
"iris-100": "bg-iris-100",
|
|
218
|
+
"iris-200": "bg-iris-200",
|
|
219
|
+
"iris-300": "bg-iris-300",
|
|
220
|
+
"iris-400": "bg-iris-400",
|
|
221
|
+
"iris-500": "bg-iris-500",
|
|
222
|
+
"iris-600": "bg-iris-600",
|
|
223
|
+
"iris-700": "bg-iris-700",
|
|
224
|
+
"iris-800": "bg-iris-800",
|
|
225
|
+
"iris-900": "bg-iris-900",
|
|
226
|
+
"iris-v100": "bg-iris-v100",
|
|
227
|
+
"iris-v200": "bg-iris-v200",
|
|
228
|
+
"iris-v300": "bg-iris-v300",
|
|
229
|
+
"iris-v400": "bg-iris-v400",
|
|
230
|
+
"indigo-50": "bg-indigo-50",
|
|
231
|
+
"indigo-100": "bg-indigo-100",
|
|
232
|
+
"indigo-200": "bg-indigo-200",
|
|
233
|
+
"indigo-300": "bg-indigo-300",
|
|
234
|
+
"indigo-400": "bg-indigo-400",
|
|
235
|
+
"indigo-500": "bg-indigo-500",
|
|
236
|
+
"indigo-600": "bg-indigo-600",
|
|
237
|
+
"indigo-700": "bg-indigo-700",
|
|
238
|
+
"indigo-800": "bg-indigo-800",
|
|
239
|
+
"indigo-900": "bg-indigo-900",
|
|
240
|
+
"indigo-v100": "bg-indigo-v100",
|
|
241
|
+
"indigo-v200": "bg-indigo-v200",
|
|
242
|
+
"indigo-v300": "bg-indigo-v300",
|
|
243
|
+
"indigo-v400": "bg-indigo-v400",
|
|
244
|
+
"blue-50": "bg-blue-50",
|
|
245
|
+
"blue-100": "bg-blue-100",
|
|
246
|
+
"blue-200": "bg-blue-200",
|
|
247
|
+
"blue-300": "bg-blue-300",
|
|
248
|
+
"blue-400": "bg-blue-400",
|
|
249
|
+
"blue-500": "bg-blue-500",
|
|
250
|
+
"blue-600": "bg-blue-600",
|
|
251
|
+
"blue-700": "bg-blue-700",
|
|
252
|
+
"blue-800": "bg-blue-800",
|
|
253
|
+
"blue-900": "bg-blue-900",
|
|
254
|
+
"blue-v100": "bg-blue-v100",
|
|
255
|
+
"blue-v200": "bg-blue-v200",
|
|
256
|
+
"blue-v300": "bg-blue-v300",
|
|
257
|
+
"blue-v400": "bg-blue-v400",
|
|
258
|
+
"ice-50": "bg-ice-50",
|
|
259
|
+
"ice-100": "bg-ice-100",
|
|
260
|
+
"ice-200": "bg-ice-200",
|
|
261
|
+
"ice-300": "bg-ice-300",
|
|
262
|
+
"ice-400": "bg-ice-400",
|
|
263
|
+
"ice-500": "bg-ice-500",
|
|
264
|
+
"ice-600": "bg-ice-600",
|
|
265
|
+
"ice-700": "bg-ice-700",
|
|
266
|
+
"ice-800": "bg-ice-800",
|
|
267
|
+
"ice-900": "bg-ice-900",
|
|
268
|
+
"ice-v100": "bg-ice-v100",
|
|
269
|
+
"ice-v200": "bg-ice-v200",
|
|
270
|
+
"ice-v300": "bg-ice-v300",
|
|
271
|
+
"ice-v400": "bg-ice-v400",
|
|
272
|
+
"cyan-50": "bg-cyan-50",
|
|
273
|
+
"cyan-100": "bg-cyan-100",
|
|
274
|
+
"cyan-200": "bg-cyan-200",
|
|
275
|
+
"cyan-300": "bg-cyan-300",
|
|
276
|
+
"cyan-400": "bg-cyan-400",
|
|
277
|
+
"cyan-500": "bg-cyan-500",
|
|
278
|
+
"cyan-600": "bg-cyan-600",
|
|
279
|
+
"cyan-700": "bg-cyan-700",
|
|
280
|
+
"cyan-800": "bg-cyan-800",
|
|
281
|
+
"cyan-900": "bg-cyan-900",
|
|
282
|
+
"cyan-v100": "bg-cyan-v100",
|
|
283
|
+
"cyan-v200": "bg-cyan-v200",
|
|
284
|
+
"cyan-v300": "bg-cyan-v300",
|
|
285
|
+
"cyan-v400": "bg-cyan-v400",
|
|
286
|
+
"teal-50": "bg-teal-50",
|
|
287
|
+
"teal-100": "bg-teal-100",
|
|
288
|
+
"teal-200": "bg-teal-200",
|
|
289
|
+
"teal-300": "bg-teal-300",
|
|
290
|
+
"teal-400": "bg-teal-400",
|
|
291
|
+
"teal-500": "bg-teal-500",
|
|
292
|
+
"teal-600": "bg-teal-600",
|
|
293
|
+
"teal-700": "bg-teal-700",
|
|
294
|
+
"teal-800": "bg-teal-800",
|
|
295
|
+
"teal-900": "bg-teal-900",
|
|
296
|
+
"teal-v100": "bg-teal-v100",
|
|
297
|
+
"teal-v200": "bg-teal-v200",
|
|
298
|
+
"teal-v300": "bg-teal-v300",
|
|
299
|
+
"teal-v400": "bg-teal-v400",
|
|
300
|
+
"green-50": "bg-green-50",
|
|
301
|
+
"green-100": "bg-green-100",
|
|
302
|
+
"green-200": "bg-green-200",
|
|
303
|
+
"green-300": "bg-green-300",
|
|
304
|
+
"green-400": "bg-green-400",
|
|
305
|
+
"green-500": "bg-green-500",
|
|
306
|
+
"green-600": "bg-green-600",
|
|
307
|
+
"green-700": "bg-green-700",
|
|
308
|
+
"green-800": "bg-green-800",
|
|
309
|
+
"green-900": "bg-green-900",
|
|
310
|
+
"green-v100": "bg-green-v100",
|
|
311
|
+
"green-v200": "bg-green-v200",
|
|
312
|
+
"green-v300": "bg-green-v300",
|
|
313
|
+
"green-v400": "bg-green-v400",
|
|
314
|
+
"sage-50": "bg-sage-50",
|
|
315
|
+
"sage-100": "bg-sage-100",
|
|
316
|
+
"sage-200": "bg-sage-200",
|
|
317
|
+
"sage-300": "bg-sage-300",
|
|
318
|
+
"sage-400": "bg-sage-400",
|
|
319
|
+
"sage-500": "bg-sage-500",
|
|
320
|
+
"sage-600": "bg-sage-600",
|
|
321
|
+
"sage-700": "bg-sage-700",
|
|
322
|
+
"sage-800": "bg-sage-800",
|
|
323
|
+
"sage-900": "bg-sage-900",
|
|
324
|
+
"sage-v100": "bg-sage-v100",
|
|
325
|
+
"sage-v200": "bg-sage-v200",
|
|
326
|
+
"sage-v300": "bg-sage-v300",
|
|
327
|
+
"sage-v400": "bg-sage-v400",
|
|
328
|
+
"lime-50": "bg-lime-50",
|
|
329
|
+
"lime-100": "bg-lime-100",
|
|
330
|
+
"lime-200": "bg-lime-200",
|
|
331
|
+
"lime-300": "bg-lime-300",
|
|
332
|
+
"lime-400": "bg-lime-400",
|
|
333
|
+
"lime-500": "bg-lime-500",
|
|
334
|
+
"lime-600": "bg-lime-600",
|
|
335
|
+
"lime-700": "bg-lime-700",
|
|
336
|
+
"lime-800": "bg-lime-800",
|
|
337
|
+
"lime-900": "bg-lime-900",
|
|
338
|
+
"lime-v100": "bg-lime-v100",
|
|
339
|
+
"lime-v200": "bg-lime-v200",
|
|
340
|
+
"lime-v300": "bg-lime-v300",
|
|
341
|
+
"lime-v400": "bg-lime-v400",
|
|
342
|
+
"yellow-50": "bg-yellow-50",
|
|
343
|
+
"yellow-100": "bg-yellow-100",
|
|
344
|
+
"yellow-200": "bg-yellow-200",
|
|
345
|
+
"yellow-300": "bg-yellow-300",
|
|
346
|
+
"yellow-400": "bg-yellow-400",
|
|
347
|
+
"yellow-500": "bg-yellow-500",
|
|
348
|
+
"yellow-600": "bg-yellow-600",
|
|
349
|
+
"yellow-700": "bg-yellow-700",
|
|
350
|
+
"yellow-800": "bg-yellow-800",
|
|
351
|
+
"yellow-900": "bg-yellow-900",
|
|
352
|
+
"yellow-v100": "bg-yellow-v100",
|
|
353
|
+
"yellow-v200": "bg-yellow-v200",
|
|
354
|
+
"yellow-v300": "bg-yellow-v300",
|
|
355
|
+
"yellow-v400": "bg-yellow-v400",
|
|
356
|
+
"amber-50": "bg-amber-50",
|
|
357
|
+
"amber-100": "bg-amber-100",
|
|
358
|
+
"amber-200": "bg-amber-200",
|
|
359
|
+
"amber-300": "bg-amber-300",
|
|
360
|
+
"amber-400": "bg-amber-400",
|
|
361
|
+
"amber-500": "bg-amber-500",
|
|
362
|
+
"amber-600": "bg-amber-600",
|
|
363
|
+
"amber-700": "bg-amber-700",
|
|
364
|
+
"amber-800": "bg-amber-800",
|
|
365
|
+
"amber-900": "bg-amber-900",
|
|
366
|
+
"amber-v100": "bg-amber-v100",
|
|
367
|
+
"amber-v200": "bg-amber-v200",
|
|
368
|
+
"amber-v300": "bg-amber-v300",
|
|
369
|
+
"amber-v400": "bg-amber-v400",
|
|
370
|
+
"orange-50": "bg-orange-50",
|
|
371
|
+
"orange-100": "bg-orange-100",
|
|
372
|
+
"orange-200": "bg-orange-200",
|
|
373
|
+
"orange-300": "bg-orange-300",
|
|
374
|
+
"orange-400": "bg-orange-400",
|
|
375
|
+
"orange-500": "bg-orange-500",
|
|
376
|
+
"orange-600": "bg-orange-600",
|
|
377
|
+
"orange-700": "bg-orange-700",
|
|
378
|
+
"orange-800": "bg-orange-800",
|
|
379
|
+
"orange-900": "bg-orange-900",
|
|
380
|
+
"orange-v100": "bg-orange-v100",
|
|
381
|
+
"orange-v200": "bg-orange-v200",
|
|
382
|
+
"orange-v300": "bg-orange-v300",
|
|
383
|
+
"orange-v400": "bg-orange-v400",
|
|
384
|
+
"ember-50": "bg-ember-50",
|
|
385
|
+
"ember-100": "bg-ember-100",
|
|
386
|
+
"ember-200": "bg-ember-200",
|
|
387
|
+
"ember-300": "bg-ember-300",
|
|
388
|
+
"ember-400": "bg-ember-400",
|
|
389
|
+
"ember-500": "bg-ember-500",
|
|
390
|
+
"ember-600": "bg-ember-600",
|
|
391
|
+
"ember-700": "bg-ember-700",
|
|
392
|
+
"ember-800": "bg-ember-800",
|
|
393
|
+
"ember-900": "bg-ember-900",
|
|
394
|
+
"ember-v100": "bg-ember-v100",
|
|
395
|
+
"ember-v200": "bg-ember-v200",
|
|
396
|
+
"ember-v300": "bg-ember-v300",
|
|
397
|
+
"ember-v400": "bg-ember-v400",
|
|
398
|
+
// Alpha
|
|
399
|
+
"alpha-black-5": "bg-alpha-black-5",
|
|
400
|
+
"alpha-black-10": "bg-alpha-black-10",
|
|
401
|
+
"alpha-black-20": "bg-alpha-black-20",
|
|
402
|
+
"alpha-black-30": "bg-alpha-black-30",
|
|
403
|
+
"alpha-black-40": "bg-alpha-black-40",
|
|
404
|
+
"alpha-black-50": "bg-alpha-black-50",
|
|
405
|
+
"alpha-black-60": "bg-alpha-black-60",
|
|
406
|
+
"alpha-black-70": "bg-alpha-black-70",
|
|
407
|
+
"alpha-black-80": "bg-alpha-black-80",
|
|
408
|
+
"alpha-black-90": "bg-alpha-black-90",
|
|
409
|
+
"alpha-black-95": "bg-alpha-black-95",
|
|
410
|
+
"alpha-white-5": "bg-alpha-white-5",
|
|
411
|
+
"alpha-white-10": "bg-alpha-white-10",
|
|
412
|
+
"alpha-white-20": "bg-alpha-white-20",
|
|
413
|
+
"alpha-white-30": "bg-alpha-white-30",
|
|
414
|
+
"alpha-white-40": "bg-alpha-white-40",
|
|
415
|
+
"alpha-white-50": "bg-alpha-white-50",
|
|
416
|
+
"alpha-white-60": "bg-alpha-white-60",
|
|
417
|
+
"alpha-white-70": "bg-alpha-white-70",
|
|
418
|
+
"alpha-white-80": "bg-alpha-white-80",
|
|
419
|
+
"alpha-white-90": "bg-alpha-white-90",
|
|
420
|
+
"alpha-white-95": "bg-alpha-white-95",
|
|
421
|
+
};
|
|
472
422
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
423
|
+
const ColorScaleRow: React.FC<{ scale: ColorScale; showVibrant?: boolean }> = ({
|
|
424
|
+
scale,
|
|
425
|
+
showVibrant = true,
|
|
426
|
+
}) => {
|
|
427
|
+
const allShades =
|
|
428
|
+
showVibrant && scale.vibrant
|
|
429
|
+
? [...scale.shades, ...scale.vibrant]
|
|
430
|
+
: scale.shades;
|
|
431
|
+
return (
|
|
432
|
+
<div className="grid grid-cols-[72px_1fr] gap-16 items-center">
|
|
433
|
+
<span className="text-14 font-medium text-gray-700">{scale.name}</span>
|
|
434
|
+
<div className="grid grid-flow-col auto-cols-fr gap-2">
|
|
435
|
+
{allShades.map((shade) => {
|
|
436
|
+
const key = `${scale.prefix}-${shade}`;
|
|
437
|
+
return (
|
|
438
|
+
<div
|
|
439
|
+
key={key}
|
|
440
|
+
className={`h-32 rounded-4 ${bgClasses[key] || ""}`}
|
|
441
|
+
title={`${scale.prefix}-${shade}`}
|
|
442
|
+
/>
|
|
443
|
+
);
|
|
444
|
+
})}
|
|
498
445
|
</div>
|
|
446
|
+
</div>
|
|
447
|
+
);
|
|
448
|
+
};
|
|
499
449
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
450
|
+
export const ColorTokens: React.FC = () => (
|
|
451
|
+
<div className="space-y-48">
|
|
452
|
+
{/* Neutrals */}
|
|
453
|
+
<section>
|
|
454
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
455
|
+
Neutrals
|
|
456
|
+
</h3>
|
|
457
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24 space-y-12">
|
|
458
|
+
{neutralScales.map((scale) => (
|
|
459
|
+
<ColorScaleRow key={scale.prefix} scale={scale} showVibrant={false} />
|
|
460
|
+
))}
|
|
461
|
+
</div>
|
|
462
|
+
</section>
|
|
463
|
+
|
|
464
|
+
{/* Chromatic Colors */}
|
|
465
|
+
<section>
|
|
466
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
467
|
+
Colors
|
|
468
|
+
</h3>
|
|
469
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24 space-y-12">
|
|
470
|
+
{colorScales.map((scale) => (
|
|
471
|
+
<ColorScaleRow key={scale.prefix} scale={scale} />
|
|
472
|
+
))}
|
|
473
|
+
</div>
|
|
474
|
+
</section>
|
|
475
|
+
|
|
476
|
+
{/* Alpha Colors */}
|
|
477
|
+
<section>
|
|
478
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
479
|
+
Alpha
|
|
480
|
+
</h3>
|
|
481
|
+
<div className="grid grid-cols-2 gap-24">
|
|
482
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24">
|
|
483
|
+
<div className="text-12 font-medium text-gray-600 mb-16">
|
|
484
|
+
Black (on light)
|
|
485
|
+
</div>
|
|
486
|
+
<div className="grid grid-flow-col auto-cols-fr gap-2 bg-gray-100 p-16 rounded-8">
|
|
487
|
+
{[5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95].map((alpha) => (
|
|
488
|
+
<div
|
|
489
|
+
key={`alpha-black-${alpha}`}
|
|
490
|
+
className={`h-32 rounded-4 ${bgClasses[`alpha-black-${alpha}`] || ""}`}
|
|
491
|
+
title={`alpha-black-${alpha}`}
|
|
492
|
+
/>
|
|
493
|
+
))}
|
|
519
494
|
</div>
|
|
520
495
|
</div>
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
<div className="grid grid-cols-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<ColorSwatch bgClass="bg-alpha-white-70" label="70" />
|
|
534
|
-
<ColorSwatch bgClass="bg-alpha-white-80" label="80" />
|
|
535
|
-
<ColorSwatch bgClass="bg-alpha-white-90" label="90" />
|
|
536
|
-
<ColorSwatch bgClass="bg-alpha-white-95" label="95" />
|
|
496
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24">
|
|
497
|
+
<div className="text-12 font-medium text-gray-600 mb-16">
|
|
498
|
+
White (on dark)
|
|
499
|
+
</div>
|
|
500
|
+
<div className="grid grid-flow-col auto-cols-fr gap-2 bg-gray-900 p-16 rounded-8">
|
|
501
|
+
{[5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95].map((alpha) => (
|
|
502
|
+
<div
|
|
503
|
+
key={`alpha-white-${alpha}`}
|
|
504
|
+
className={`h-32 rounded-4 ${bgClasses[`alpha-white-${alpha}`] || ""}`}
|
|
505
|
+
title={`alpha-white-${alpha}`}
|
|
506
|
+
/>
|
|
507
|
+
))}
|
|
537
508
|
</div>
|
|
538
509
|
</div>
|
|
539
510
|
</div>
|
|
540
|
-
</
|
|
541
|
-
|
|
542
|
-
|
|
511
|
+
</section>
|
|
512
|
+
</div>
|
|
513
|
+
);
|
|
543
514
|
|
|
544
|
-
//
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
value: string;
|
|
548
|
-
widthClass: string;
|
|
549
|
-
};
|
|
515
|
+
// =============================================================================
|
|
516
|
+
// Spacing Tokens
|
|
517
|
+
// =============================================================================
|
|
550
518
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
{ token: "spacing-4", value: "4px", widthClass: "w-spacing-4" },
|
|
555
|
-
{ token: "spacing-6", value: "6px", widthClass: "w-spacing-6" },
|
|
556
|
-
{ token: "spacing-8", value: "8px", widthClass: "w-spacing-8" },
|
|
557
|
-
{ token: "spacing-10", value: "10px", widthClass: "w-spacing-10" },
|
|
558
|
-
{ token: "spacing-12", value: "12px", widthClass: "w-spacing-12" },
|
|
559
|
-
{ token: "spacing-16", value: "16px", widthClass: "w-spacing-16" },
|
|
560
|
-
{ token: "spacing-20", value: "20px", widthClass: "w-spacing-20" },
|
|
561
|
-
{ token: "spacing-24", value: "24px", widthClass: "w-spacing-24" },
|
|
562
|
-
{ token: "spacing-28", value: "28px", widthClass: "w-spacing-28" },
|
|
563
|
-
{ token: "spacing-32", value: "32px", widthClass: "w-spacing-32" },
|
|
564
|
-
{ token: "spacing-36", value: "36px", widthClass: "w-spacing-36" },
|
|
565
|
-
{ token: "spacing-40", value: "40px", widthClass: "w-spacing-40" },
|
|
566
|
-
{ token: "spacing-48", value: "48px", widthClass: "w-spacing-48" },
|
|
567
|
-
{ token: "spacing-56", value: "56px", widthClass: "w-spacing-56" },
|
|
568
|
-
{ token: "spacing-64", value: "64px", widthClass: "w-spacing-64" },
|
|
569
|
-
{ token: "spacing-72", value: "72px", widthClass: "w-spacing-72" },
|
|
570
|
-
{ token: "spacing-80", value: "80px", widthClass: "w-spacing-80" },
|
|
571
|
-
{ token: "spacing-96", value: "96px", widthClass: "w-spacing-96" },
|
|
572
|
-
{ token: "spacing-112", value: "112px", widthClass: "w-spacing-112" },
|
|
573
|
-
{ token: "spacing-128", value: "128px", widthClass: "w-spacing-128" },
|
|
574
|
-
{ token: "spacing-144", value: "144px", widthClass: "w-spacing-144" },
|
|
575
|
-
{ token: "spacing-160", value: "160px", widthClass: "w-spacing-160" },
|
|
576
|
-
{ token: "spacing-176", value: "176px", widthClass: "w-spacing-176" },
|
|
577
|
-
{ token: "spacing-192", value: "192px", widthClass: "w-spacing-192" },
|
|
578
|
-
{ token: "spacing-208", value: "208px", widthClass: "w-spacing-208" },
|
|
579
|
-
{ token: "spacing-224", value: "224px", widthClass: "w-spacing-224" },
|
|
580
|
-
{ token: "spacing-240", value: "240px", widthClass: "w-spacing-240" },
|
|
581
|
-
{ token: "spacing-256", value: "256px", widthClass: "w-spacing-256" },
|
|
582
|
-
{ token: "spacing-288", value: "288px", widthClass: "w-spacing-288" },
|
|
583
|
-
{ token: "spacing-320", value: "320px", widthClass: "w-spacing-320" },
|
|
584
|
-
{ token: "spacing-352", value: "352px", widthClass: "w-spacing-352" },
|
|
585
|
-
{ token: "spacing-384", value: "384px", widthClass: "w-spacing-384" },
|
|
586
|
-
{ token: "spacing-400", value: "400px", widthClass: "w-spacing-400" },
|
|
519
|
+
const spacingScale = [
|
|
520
|
+
2, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 80, 96, 112,
|
|
521
|
+
128, 144, 160, 176, 192, 208, 224, 240, 256, 288, 320, 352, 384, 400,
|
|
587
522
|
];
|
|
588
523
|
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
524
|
+
const widthClasses: Record<number, string> = {
|
|
525
|
+
2: "w-spacing-2",
|
|
526
|
+
4: "w-spacing-4",
|
|
527
|
+
6: "w-spacing-6",
|
|
528
|
+
8: "w-spacing-8",
|
|
529
|
+
10: "w-spacing-10",
|
|
530
|
+
12: "w-spacing-12",
|
|
531
|
+
16: "w-spacing-16",
|
|
532
|
+
20: "w-spacing-20",
|
|
533
|
+
24: "w-spacing-24",
|
|
534
|
+
28: "w-spacing-28",
|
|
535
|
+
32: "w-spacing-32",
|
|
536
|
+
36: "w-spacing-36",
|
|
537
|
+
40: "w-spacing-40",
|
|
538
|
+
48: "w-spacing-48",
|
|
539
|
+
56: "w-spacing-56",
|
|
540
|
+
64: "w-spacing-64",
|
|
541
|
+
72: "w-spacing-72",
|
|
542
|
+
80: "w-spacing-80",
|
|
543
|
+
96: "w-spacing-96",
|
|
544
|
+
112: "w-spacing-112",
|
|
545
|
+
128: "w-spacing-128",
|
|
546
|
+
144: "w-spacing-144",
|
|
547
|
+
160: "w-spacing-160",
|
|
548
|
+
176: "w-spacing-176",
|
|
549
|
+
192: "w-spacing-192",
|
|
550
|
+
208: "w-spacing-208",
|
|
551
|
+
224: "w-spacing-224",
|
|
552
|
+
240: "w-spacing-240",
|
|
553
|
+
256: "w-spacing-256",
|
|
554
|
+
288: "w-spacing-288",
|
|
555
|
+
320: "w-spacing-320",
|
|
556
|
+
352: "w-spacing-352",
|
|
557
|
+
384: "w-spacing-384",
|
|
558
|
+
400: "w-spacing-400",
|
|
607
559
|
};
|
|
608
560
|
|
|
609
|
-
export const SpacingTokens: React.FC = () =>
|
|
610
|
-
|
|
611
|
-
<div className="
|
|
612
|
-
<div>
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
561
|
+
export const SpacingTokens: React.FC = () => (
|
|
562
|
+
<div className="bg-white rounded-8 border border-gray-200 overflow-hidden">
|
|
563
|
+
<div className="grid grid-cols-[64px_1fr_100px] gap-16 px-24 py-12 bg-gray-50 border-b border-gray-200 text-12 font-medium text-gray-500 uppercase">
|
|
564
|
+
<div>Value</div>
|
|
565
|
+
<div>Preview</div>
|
|
566
|
+
<div>Token</div>
|
|
567
|
+
</div>
|
|
568
|
+
<div className="divide-y divide-gray-100">
|
|
569
|
+
{spacingScale.map((size) => (
|
|
570
|
+
<div
|
|
571
|
+
key={size}
|
|
572
|
+
className="grid grid-cols-[64px_1fr_100px] gap-16 px-24 py-8 items-center"
|
|
573
|
+
>
|
|
574
|
+
<div className="text-14 font-mono text-gray-600">{size}px</div>
|
|
575
|
+
<div className="flex items-center">
|
|
576
|
+
<div
|
|
577
|
+
className={`h-12 bg-indigo-500 rounded-2 ${widthClasses[size]} max-w-full`}
|
|
626
578
|
/>
|
|
627
|
-
|
|
579
|
+
</div>
|
|
580
|
+
<div className="text-12 font-mono text-gray-400">spacing-{size}</div>
|
|
628
581
|
</div>
|
|
629
|
-
|
|
582
|
+
))}
|
|
630
583
|
</div>
|
|
631
|
-
|
|
632
|
-
|
|
584
|
+
</div>
|
|
585
|
+
);
|
|
633
586
|
|
|
634
|
-
//
|
|
635
|
-
//
|
|
636
|
-
|
|
637
|
-
token: string;
|
|
638
|
-
textClass: string;
|
|
639
|
-
desc: string;
|
|
640
|
-
};
|
|
587
|
+
// =============================================================================
|
|
588
|
+
// Typography Tokens
|
|
589
|
+
// =============================================================================
|
|
641
590
|
|
|
642
|
-
type
|
|
643
|
-
|
|
644
|
-
|
|
591
|
+
type TypographyToken = {
|
|
592
|
+
name: string;
|
|
593
|
+
class: string;
|
|
594
|
+
sizes: string;
|
|
645
595
|
};
|
|
646
596
|
|
|
647
|
-
const
|
|
597
|
+
const headingTokens: TypographyToken[] = [
|
|
648
598
|
{
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
token: "brand-large-display-hero",
|
|
653
|
-
textClass: "typography-brand-large-display-hero",
|
|
654
|
-
desc: "Hero - 280px",
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
token: "brand-large-display-xl",
|
|
658
|
-
textClass: "typography-brand-large-display-xl",
|
|
659
|
-
desc: "XL - 224px",
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
token: "brand-large-display-large",
|
|
663
|
-
textClass: "typography-brand-large-display-large",
|
|
664
|
-
desc: "Large - 192px",
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
token: "brand-large-display-medium",
|
|
668
|
-
textClass: "typography-brand-large-display-medium",
|
|
669
|
-
desc: "Medium - 168px",
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
token: "brand-large-display-small",
|
|
673
|
-
textClass: "typography-brand-large-display-small",
|
|
674
|
-
desc: "Small - 148px",
|
|
675
|
-
},
|
|
676
|
-
],
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
label: "Headline",
|
|
680
|
-
tokens: [
|
|
681
|
-
{
|
|
682
|
-
token: "brand-large-headline-xl",
|
|
683
|
-
textClass: "typography-brand-large-headline-xl",
|
|
684
|
-
desc: "XL - 112px",
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
token: "brand-large-headline-large",
|
|
688
|
-
textClass: "typography-brand-large-headline-large",
|
|
689
|
-
desc: "Large - 96px",
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
token: "brand-large-headline-medium",
|
|
693
|
-
textClass: "typography-brand-large-headline-medium",
|
|
694
|
-
desc: "Medium - 72px",
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
token: "brand-large-headline-small",
|
|
698
|
-
textClass: "typography-brand-large-headline-small",
|
|
699
|
-
desc: "Small - 56px",
|
|
700
|
-
},
|
|
701
|
-
],
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
label: "Subheading",
|
|
705
|
-
tokens: [
|
|
706
|
-
{
|
|
707
|
-
token: "brand-large-subheading-large",
|
|
708
|
-
textClass: "typography-brand-large-subheading-large",
|
|
709
|
-
desc: "Large - 42px",
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
token: "brand-large-subheading-medium",
|
|
713
|
-
textClass: "typography-brand-large-subheading-medium",
|
|
714
|
-
desc: "Medium - 32px",
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
token: "brand-large-subheading-small",
|
|
718
|
-
textClass: "typography-brand-large-subheading-small",
|
|
719
|
-
desc: "Small - 24px",
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
token: "brand-large-subheading-xs",
|
|
723
|
-
textClass: "typography-brand-large-subheading-xs",
|
|
724
|
-
desc: "XS - 18px",
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
token: "brand-large-subheading-xss",
|
|
728
|
-
textClass: "typography-brand-large-subheading-xss",
|
|
729
|
-
desc: "XSS - 16px",
|
|
730
|
-
},
|
|
731
|
-
],
|
|
732
|
-
},
|
|
733
|
-
{
|
|
734
|
-
label: "Body",
|
|
735
|
-
tokens: [
|
|
736
|
-
{
|
|
737
|
-
token: "brand-large-body-large",
|
|
738
|
-
textClass: "typography-brand-large-body-large",
|
|
739
|
-
desc: "Large - 21px",
|
|
740
|
-
},
|
|
741
|
-
{
|
|
742
|
-
token: "brand-large-body-medium",
|
|
743
|
-
textClass: "typography-brand-large-body-medium",
|
|
744
|
-
desc: "Medium - 18px",
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
token: "brand-large-body-small",
|
|
748
|
-
textClass: "typography-brand-large-body-small",
|
|
749
|
-
desc: "Small - 16px",
|
|
750
|
-
},
|
|
751
|
-
],
|
|
599
|
+
name: "Display",
|
|
600
|
+
class: "typography-h1-display",
|
|
601
|
+
sizes: "64px → 96px → 128px",
|
|
752
602
|
},
|
|
603
|
+
{ name: "H1", class: "typography-h1", sizes: "48px → 72px → 96px" },
|
|
604
|
+
{ name: "H2", class: "typography-h2", sizes: "48px → 64px → 72px" },
|
|
605
|
+
{ name: "H3", class: "typography-h3", sizes: "32px → 48px → 64px" },
|
|
606
|
+
{ name: "H4", class: "typography-h4", sizes: "24px → 32px → 48px" },
|
|
607
|
+
{ name: "H5", class: "typography-h5", sizes: "21px → 24px → 32px" },
|
|
608
|
+
];
|
|
609
|
+
|
|
610
|
+
const bodyTokens: TypographyToken[] = [
|
|
753
611
|
{
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
token: "brand-large-button-xl",
|
|
758
|
-
textClass: "typography-brand-large-button-xl",
|
|
759
|
-
desc: "XL - 24px",
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
token: "brand-large-button-large",
|
|
763
|
-
textClass: "typography-brand-large-button-large",
|
|
764
|
-
desc: "Large - 18px",
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
token: "brand-large-button-medium",
|
|
768
|
-
textClass: "typography-brand-large-button-medium",
|
|
769
|
-
desc: "Medium - 16px",
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
token: "brand-large-button-small",
|
|
773
|
-
textClass: "typography-brand-large-button-small",
|
|
774
|
-
desc: "Small - 14px",
|
|
775
|
-
},
|
|
776
|
-
],
|
|
612
|
+
name: "Body Large",
|
|
613
|
+
class: "typography-body-large",
|
|
614
|
+
sizes: "16px → 18px → 21px",
|
|
777
615
|
},
|
|
778
616
|
{
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
token: "brand-large-link-large",
|
|
783
|
-
textClass: "typography-brand-large-link-large",
|
|
784
|
-
desc: "Large - 18px",
|
|
785
|
-
},
|
|
786
|
-
{
|
|
787
|
-
token: "brand-large-link-medium",
|
|
788
|
-
textClass: "typography-brand-large-link-medium",
|
|
789
|
-
desc: "Medium - 16px",
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
token: "brand-large-link-small",
|
|
793
|
-
textClass: "typography-brand-large-link-small",
|
|
794
|
-
desc: "Small - 14px",
|
|
795
|
-
},
|
|
796
|
-
],
|
|
617
|
+
name: "Body Medium",
|
|
618
|
+
class: "typography-body-medium",
|
|
619
|
+
sizes: "14px → 16px → 18px",
|
|
797
620
|
},
|
|
798
621
|
{
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
token: "brand-large-label-large",
|
|
803
|
-
textClass: "typography-brand-large-label-large",
|
|
804
|
-
desc: "Large - 16px",
|
|
805
|
-
},
|
|
806
|
-
{
|
|
807
|
-
token: "brand-large-label-medium",
|
|
808
|
-
textClass: "typography-brand-large-label-medium",
|
|
809
|
-
desc: "Medium - 14px",
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
token: "brand-large-label-small",
|
|
813
|
-
textClass: "typography-brand-large-label-small",
|
|
814
|
-
desc: "Small - 12px",
|
|
815
|
-
},
|
|
816
|
-
],
|
|
622
|
+
name: "Body Small",
|
|
623
|
+
class: "typography-body-small",
|
|
624
|
+
sizes: "12px → 14px → 14px",
|
|
817
625
|
},
|
|
626
|
+
];
|
|
627
|
+
|
|
628
|
+
const uiTokens: TypographyToken[] = [
|
|
629
|
+
{ name: "Overline", class: "typography-overline", sizes: "14px" },
|
|
630
|
+
{ name: "Caption", class: "typography-caption", sizes: "11px" },
|
|
631
|
+
{ name: "Button Large", class: "typography-ui-button-large", sizes: "18px" },
|
|
818
632
|
{
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
token: "brand-large-caption-large",
|
|
823
|
-
textClass: "typography-brand-large-caption-large",
|
|
824
|
-
desc: "Large - 14px",
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
token: "brand-large-caption-small",
|
|
828
|
-
textClass: "typography-brand-large-caption-small",
|
|
829
|
-
desc: "Small - 12px",
|
|
830
|
-
},
|
|
831
|
-
],
|
|
633
|
+
name: "Button Medium",
|
|
634
|
+
class: "typography-ui-button-medium",
|
|
635
|
+
sizes: "16px",
|
|
832
636
|
},
|
|
637
|
+
{ name: "Button Small", class: "typography-ui-button-small", sizes: "14px" },
|
|
638
|
+
{ name: "Label", class: "typography-ui-label", sizes: "14px" },
|
|
833
639
|
];
|
|
834
640
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
};
|
|
842
|
-
|
|
843
|
-
type SemanticSpacingGroup = {
|
|
844
|
-
label: string;
|
|
845
|
-
tokens: SemanticSpacingToken[];
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
const semanticSpacingTokens: {
|
|
849
|
-
component: SemanticSpacingGroup[];
|
|
850
|
-
layout: SemanticSpacingGroup[];
|
|
851
|
-
content: SemanticSpacingGroup[];
|
|
852
|
-
} = {
|
|
853
|
-
component: [
|
|
854
|
-
{
|
|
855
|
-
label: "Button",
|
|
856
|
-
tokens: [
|
|
857
|
-
{
|
|
858
|
-
token: "spacing-component-button-padding-x-large",
|
|
859
|
-
value: "32px",
|
|
860
|
-
widthClass: "w-spacing-component-button-padding-x-large",
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
token: "spacing-component-button-padding-x-medium",
|
|
864
|
-
value: "20px",
|
|
865
|
-
widthClass: "w-spacing-component-button-padding-x-medium",
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
token: "spacing-component-button-padding-x-small",
|
|
869
|
-
value: "12px",
|
|
870
|
-
widthClass: "w-spacing-component-button-padding-x-small",
|
|
871
|
-
},
|
|
872
|
-
{
|
|
873
|
-
token: "spacing-component-button-padding-y-large",
|
|
874
|
-
value: "20px",
|
|
875
|
-
widthClass: "w-spacing-component-button-padding-y-large",
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
token: "spacing-component-button-padding-y-medium",
|
|
879
|
-
value: "12px",
|
|
880
|
-
widthClass: "w-spacing-component-button-padding-y-medium",
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
token: "spacing-component-button-padding-y-small",
|
|
884
|
-
value: "8px",
|
|
885
|
-
widthClass: "w-spacing-component-button-padding-y-small",
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
token: "spacing-component-button-height-large",
|
|
889
|
-
value: "56px",
|
|
890
|
-
widthClass: "w-spacing-component-button-height-large",
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
token: "spacing-component-button-height-medium",
|
|
894
|
-
value: "40px",
|
|
895
|
-
widthClass: "w-spacing-component-button-height-medium",
|
|
896
|
-
},
|
|
897
|
-
{
|
|
898
|
-
token: "spacing-component-button-height-small",
|
|
899
|
-
value: "28px",
|
|
900
|
-
widthClass: "w-spacing-component-button-height-small",
|
|
901
|
-
},
|
|
902
|
-
{
|
|
903
|
-
token: "spacing-component-button-radius-large",
|
|
904
|
-
value: "10px",
|
|
905
|
-
widthClass: "w-spacing-component-button-radius-large",
|
|
906
|
-
},
|
|
907
|
-
{
|
|
908
|
-
token: "spacing-component-button-radius-medium",
|
|
909
|
-
value: "6px",
|
|
910
|
-
widthClass: "w-spacing-component-button-radius-medium",
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
token: "spacing-component-button-radius-small",
|
|
914
|
-
value: "4px",
|
|
915
|
-
widthClass: "w-spacing-component-button-radius-small",
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
token: "spacing-component-button-gap-icon-text",
|
|
919
|
-
value: "6px",
|
|
920
|
-
widthClass: "w-spacing-component-button-gap-icon-text",
|
|
921
|
-
},
|
|
922
|
-
{
|
|
923
|
-
token: "spacing-component-button-gap-button-group",
|
|
924
|
-
value: "12px",
|
|
925
|
-
widthClass: "w-spacing-component-button-gap-button-group",
|
|
926
|
-
},
|
|
927
|
-
],
|
|
928
|
-
},
|
|
929
|
-
{
|
|
930
|
-
label: "Card",
|
|
931
|
-
tokens: [
|
|
932
|
-
{
|
|
933
|
-
token: "spacing-component-card-padding-large",
|
|
934
|
-
value: "40px",
|
|
935
|
-
widthClass: "w-spacing-component-card-padding-large",
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
token: "spacing-component-card-padding-medium",
|
|
939
|
-
value: "32px",
|
|
940
|
-
widthClass: "w-spacing-component-card-padding-medium",
|
|
941
|
-
},
|
|
942
|
-
{
|
|
943
|
-
token: "spacing-component-card-padding-small",
|
|
944
|
-
value: "24px",
|
|
945
|
-
widthClass: "w-spacing-component-card-padding-small",
|
|
946
|
-
},
|
|
947
|
-
{
|
|
948
|
-
token: "spacing-component-card-gap-internal",
|
|
949
|
-
value: "24px",
|
|
950
|
-
widthClass: "w-spacing-component-card-gap-internal",
|
|
951
|
-
},
|
|
952
|
-
],
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
label: "Feature Section",
|
|
956
|
-
tokens: [
|
|
957
|
-
{
|
|
958
|
-
token: "spacing-component-feature-padding-large",
|
|
959
|
-
value: "48px",
|
|
960
|
-
widthClass: "w-spacing-component-feature-padding-large",
|
|
961
|
-
},
|
|
962
|
-
{
|
|
963
|
-
token: "spacing-component-feature-padding-medium",
|
|
964
|
-
value: "40px",
|
|
965
|
-
widthClass: "w-spacing-component-feature-padding-medium",
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
token: "spacing-component-feature-padding-small",
|
|
969
|
-
value: "32px",
|
|
970
|
-
widthClass: "w-spacing-component-feature-padding-small",
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
token: "spacing-component-feature-gap-icon-content",
|
|
974
|
-
value: "24px",
|
|
975
|
-
widthClass: "w-spacing-component-feature-gap-icon-content",
|
|
976
|
-
},
|
|
977
|
-
],
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
label: "Form",
|
|
981
|
-
tokens: [
|
|
982
|
-
{
|
|
983
|
-
token: "spacing-component-form-gap-field-field",
|
|
984
|
-
value: "20px",
|
|
985
|
-
widthClass: "w-spacing-component-form-gap-field-field",
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
token: "spacing-component-form-gap-label-field",
|
|
989
|
-
value: "8px",
|
|
990
|
-
widthClass: "w-spacing-component-form-gap-label-field",
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
token: "spacing-component-form-gap-field-button",
|
|
994
|
-
value: "24px",
|
|
995
|
-
widthClass: "w-spacing-component-form-gap-field-button",
|
|
996
|
-
},
|
|
997
|
-
],
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
label: "Testimonial",
|
|
1001
|
-
tokens: [
|
|
1002
|
-
{
|
|
1003
|
-
token: "spacing-component-testimonial-padding",
|
|
1004
|
-
value: "40px",
|
|
1005
|
-
widthClass: "w-spacing-component-testimonial-padding",
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
token: "spacing-component-testimonial-gap-quote-attribution",
|
|
1009
|
-
value: "24px",
|
|
1010
|
-
widthClass: "w-spacing-component-testimonial-gap-quote-attribution",
|
|
1011
|
-
},
|
|
1012
|
-
],
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
label: "Accordion",
|
|
1016
|
-
tokens: [
|
|
1017
|
-
{
|
|
1018
|
-
token: "spacing-component-accordion-padding-y",
|
|
1019
|
-
value: "28px",
|
|
1020
|
-
widthClass: "w-spacing-component-accordion-padding-y",
|
|
1021
|
-
},
|
|
1022
|
-
],
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
label: "Navbar",
|
|
1026
|
-
tokens: [
|
|
1027
|
-
{
|
|
1028
|
-
token: "spacing-component-navbar-padding-x-mobile",
|
|
1029
|
-
value: "20px",
|
|
1030
|
-
widthClass: "w-spacing-component-navbar-padding-x-mobile",
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
token: "spacing-component-navbar-padding-x-tablet",
|
|
1034
|
-
value: "32px",
|
|
1035
|
-
widthClass: "w-spacing-component-navbar-padding-x-tablet",
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
token: "spacing-component-navbar-padding-y-mobile",
|
|
1039
|
-
value: "8px",
|
|
1040
|
-
widthClass: "w-spacing-component-navbar-padding-y-mobile",
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
token: "spacing-component-navbar-padding-y-tablet",
|
|
1044
|
-
value: "16px",
|
|
1045
|
-
widthClass: "w-spacing-component-navbar-padding-y-tablet",
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
token: "spacing-component-navbar-padding-y-desktop",
|
|
1049
|
-
value: "24px",
|
|
1050
|
-
widthClass: "w-spacing-component-navbar-padding-y-desktop",
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
token: "spacing-component-navbar-gap-links",
|
|
1054
|
-
value: "40px",
|
|
1055
|
-
widthClass: "w-spacing-component-navbar-gap-links",
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
token: "spacing-component-navbar-gap-actions",
|
|
1059
|
-
value: "8px",
|
|
1060
|
-
widthClass: "w-spacing-component-navbar-gap-actions",
|
|
1061
|
-
},
|
|
1062
|
-
],
|
|
1063
|
-
},
|
|
1064
|
-
],
|
|
1065
|
-
layout: [
|
|
1066
|
-
{
|
|
1067
|
-
label: "Hero Section",
|
|
1068
|
-
tokens: [
|
|
1069
|
-
{
|
|
1070
|
-
token: "spacing-brand-large-layout-hero-padding-y-large",
|
|
1071
|
-
value: "112px",
|
|
1072
|
-
widthClass: "w-spacing-brand-large-layout-hero-padding-y-large",
|
|
1073
|
-
},
|
|
1074
|
-
{
|
|
1075
|
-
token: "spacing-brand-large-layout-hero-padding-y-medium",
|
|
1076
|
-
value: "96px",
|
|
1077
|
-
widthClass: "w-spacing-brand-large-layout-hero-padding-y-medium",
|
|
1078
|
-
},
|
|
1079
|
-
{
|
|
1080
|
-
token: "spacing-brand-large-layout-hero-padding-y-small",
|
|
1081
|
-
value: "80px",
|
|
1082
|
-
widthClass: "w-spacing-brand-large-layout-hero-padding-y-small",
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
token: "spacing-brand-large-layout-hero-gap-content-cta",
|
|
1086
|
-
value: "40px",
|
|
1087
|
-
widthClass: "w-spacing-brand-large-layout-hero-gap-content-cta",
|
|
1088
|
-
},
|
|
1089
|
-
],
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
label: "Section",
|
|
1093
|
-
tokens: [
|
|
1094
|
-
{
|
|
1095
|
-
token: "spacing-brand-large-layout-section-gap-xlarge",
|
|
1096
|
-
value: "224px",
|
|
1097
|
-
widthClass: "w-spacing-brand-large-layout-section-gap-xlarge",
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
token: "spacing-brand-large-layout-section-gap-large",
|
|
1101
|
-
value: "160px",
|
|
1102
|
-
widthClass: "w-spacing-brand-large-layout-section-gap-large",
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
token: "spacing-brand-large-layout-section-gap-medium",
|
|
1106
|
-
value: "112px",
|
|
1107
|
-
widthClass: "w-spacing-brand-large-layout-section-gap-medium",
|
|
1108
|
-
},
|
|
1109
|
-
{
|
|
1110
|
-
token: "spacing-brand-large-layout-section-gap-small",
|
|
1111
|
-
value: "80px",
|
|
1112
|
-
widthClass: "w-spacing-brand-large-layout-section-gap-small",
|
|
1113
|
-
},
|
|
1114
|
-
{
|
|
1115
|
-
token: "spacing-brand-large-layout-section-gap-default",
|
|
1116
|
-
value: "160px",
|
|
1117
|
-
widthClass: "w-spacing-brand-large-layout-section-gap-default",
|
|
1118
|
-
},
|
|
1119
|
-
{
|
|
1120
|
-
token: "spacing-brand-large-layout-section-padding-y-large",
|
|
1121
|
-
value: "128px",
|
|
1122
|
-
widthClass: "w-spacing-brand-large-layout-section-padding-y-large",
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
token: "spacing-brand-large-layout-section-padding-y-medium",
|
|
1126
|
-
value: "96px",
|
|
1127
|
-
widthClass: "w-spacing-brand-large-layout-section-padding-y-medium",
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
token: "spacing-brand-large-layout-section-padding-y-small",
|
|
1131
|
-
value: "64px",
|
|
1132
|
-
widthClass: "w-spacing-brand-large-layout-section-padding-y-small",
|
|
1133
|
-
},
|
|
1134
|
-
],
|
|
1135
|
-
},
|
|
1136
|
-
{
|
|
1137
|
-
label: "Container",
|
|
1138
|
-
tokens: [
|
|
1139
|
-
{
|
|
1140
|
-
token: "spacing-brand-large-layout-container-padding-x-large",
|
|
1141
|
-
value: "48px",
|
|
1142
|
-
widthClass: "w-spacing-brand-large-layout-container-padding-x-large",
|
|
1143
|
-
},
|
|
1144
|
-
{
|
|
1145
|
-
token: "spacing-brand-large-layout-container-padding-x-medium",
|
|
1146
|
-
value: "32px",
|
|
1147
|
-
widthClass: "w-spacing-brand-large-layout-container-padding-x-medium",
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
token: "spacing-brand-large-layout-container-padding-x-small",
|
|
1151
|
-
value: "20px",
|
|
1152
|
-
widthClass: "w-spacing-brand-large-layout-container-padding-x-small",
|
|
1153
|
-
},
|
|
1154
|
-
],
|
|
1155
|
-
},
|
|
1156
|
-
{
|
|
1157
|
-
label: "Grid",
|
|
1158
|
-
tokens: [
|
|
1159
|
-
{
|
|
1160
|
-
token: "spacing-brand-large-layout-grid-gap-large",
|
|
1161
|
-
value: "48px",
|
|
1162
|
-
widthClass: "w-spacing-brand-large-layout-grid-gap-large",
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
token: "spacing-brand-large-layout-grid-gap-medium",
|
|
1166
|
-
value: "32px",
|
|
1167
|
-
widthClass: "w-spacing-brand-large-layout-grid-gap-medium",
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
token: "spacing-brand-large-layout-grid-gap-small",
|
|
1171
|
-
value: "24px",
|
|
1172
|
-
widthClass: "w-spacing-brand-large-layout-grid-gap-small",
|
|
1173
|
-
},
|
|
1174
|
-
],
|
|
1175
|
-
},
|
|
1176
|
-
],
|
|
1177
|
-
content: [
|
|
1178
|
-
{
|
|
1179
|
-
label: "Content Stack",
|
|
1180
|
-
tokens: [
|
|
1181
|
-
{
|
|
1182
|
-
token: "spacing-brand-large-content-stack-display-body-tight",
|
|
1183
|
-
value: "16px",
|
|
1184
|
-
widthClass: "w-spacing-brand-large-content-stack-display-body-tight",
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
token: "spacing-brand-large-content-stack-display-body-normal",
|
|
1188
|
-
value: "24px",
|
|
1189
|
-
widthClass: "w-spacing-brand-large-content-stack-display-body-normal",
|
|
1190
|
-
},
|
|
1191
|
-
{
|
|
1192
|
-
token: "spacing-brand-large-content-stack-display-body-relaxed",
|
|
1193
|
-
value: "32px",
|
|
1194
|
-
widthClass:
|
|
1195
|
-
"w-spacing-brand-large-content-stack-display-body-relaxed",
|
|
1196
|
-
},
|
|
1197
|
-
{
|
|
1198
|
-
token: "spacing-brand-large-content-stack-headline-subheading",
|
|
1199
|
-
value: "16px",
|
|
1200
|
-
widthClass: "w-spacing-brand-large-content-stack-headline-subheading",
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
token: "spacing-brand-large-content-stack-subheading-body",
|
|
1204
|
-
value: "12px",
|
|
1205
|
-
widthClass: "w-spacing-brand-large-content-stack-subheading-body",
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
token: "spacing-brand-large-content-stack-body-cta",
|
|
1209
|
-
value: "32px",
|
|
1210
|
-
widthClass: "w-spacing-brand-large-content-stack-body-cta",
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
token: "spacing-brand-large-content-stack-eyebrow-headline",
|
|
1214
|
-
value: "12px",
|
|
1215
|
-
widthClass: "w-spacing-brand-large-content-stack-eyebrow-headline",
|
|
1216
|
-
},
|
|
1217
|
-
{
|
|
1218
|
-
token: "spacing-brand-large-content-stack-body-body",
|
|
1219
|
-
value: "20px",
|
|
1220
|
-
widthClass: "w-spacing-brand-large-content-stack-body-body",
|
|
1221
|
-
},
|
|
1222
|
-
],
|
|
1223
|
-
},
|
|
1224
|
-
],
|
|
1225
|
-
};
|
|
1226
|
-
|
|
1227
|
-
// Typography sample component using hardcoded classes
|
|
1228
|
-
const SemanticTypographySwatch: React.FC<{
|
|
1229
|
-
token: string;
|
|
1230
|
-
textClass: string;
|
|
1231
|
-
desc: string;
|
|
1232
|
-
}> = ({ token, textClass, desc }) => {
|
|
1233
|
-
const isLargeType = token.includes("display") || token.includes("headline");
|
|
1234
|
-
const sampleText = isLargeType
|
|
1235
|
-
? "Aa"
|
|
1236
|
-
: "The quick brown fox jumps over the lazy dog";
|
|
641
|
+
const TypographyRow: React.FC<{ token: TypographyToken; sample?: string }> = ({
|
|
642
|
+
token,
|
|
643
|
+
sample,
|
|
644
|
+
}) => {
|
|
645
|
+
const isHeading = token.class.includes("h1") || token.class.includes("h2");
|
|
646
|
+
const text = sample || (isHeading ? "Aa" : "The quick brown fox");
|
|
1237
647
|
|
|
1238
648
|
return (
|
|
1239
|
-
<div className="py-
|
|
1240
|
-
<div className="flex justify-between
|
|
1241
|
-
<
|
|
1242
|
-
{token}
|
|
1243
|
-
</
|
|
1244
|
-
<span className="text-
|
|
649
|
+
<div className="py-12 border-b border-gray-100 last:border-0">
|
|
650
|
+
<div className="flex items-baseline justify-between gap-16 mb-4">
|
|
651
|
+
<code className="text-12 font-mono text-indigo-600 bg-indigo-50 px-8 py-2 rounded-4">
|
|
652
|
+
{token.class}
|
|
653
|
+
</code>
|
|
654
|
+
<span className="text-12 text-gray-400">{token.sizes}</span>
|
|
1245
655
|
</div>
|
|
1246
|
-
<p className={
|
|
656
|
+
<p className={token.class}>{text}</p>
|
|
1247
657
|
</div>
|
|
1248
658
|
);
|
|
1249
659
|
};
|
|
1250
660
|
|
|
1251
|
-
export const TypographyTokens: React.FC = () =>
|
|
1252
|
-
|
|
1253
|
-
<
|
|
1254
|
-
<
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
{semanticTypographyTokens.map((group) => (
|
|
1262
|
-
<div key={group.label} className="mb-8">
|
|
1263
|
-
<h3 className="text-lg font-semibold mb-3">{group.label}</h3>
|
|
1264
|
-
<div className="bg-white rounded-lg border border-gray-200 p-6 overflow-x-auto">
|
|
1265
|
-
{group.tokens.map((t) => (
|
|
1266
|
-
<SemanticTypographySwatch
|
|
1267
|
-
key={t.token}
|
|
1268
|
-
token={t.token}
|
|
1269
|
-
textClass={t.textClass}
|
|
1270
|
-
desc={t.desc}
|
|
1271
|
-
/>
|
|
1272
|
-
))}
|
|
1273
|
-
</div>
|
|
1274
|
-
</div>
|
|
661
|
+
export const TypographyTokens: React.FC = () => (
|
|
662
|
+
<div className="space-y-32">
|
|
663
|
+
<section>
|
|
664
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
665
|
+
Headings (Responsive)
|
|
666
|
+
</h3>
|
|
667
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24">
|
|
668
|
+
{headingTokens.map((token) => (
|
|
669
|
+
<TypographyRow key={token.class} token={token} />
|
|
1275
670
|
))}
|
|
1276
671
|
</div>
|
|
1277
|
-
</
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
<
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
{token}
|
|
1297
|
-
|
|
672
|
+
</section>
|
|
673
|
+
|
|
674
|
+
<section>
|
|
675
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
676
|
+
Body (Responsive)
|
|
677
|
+
</h3>
|
|
678
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24">
|
|
679
|
+
{bodyTokens.map((token) => (
|
|
680
|
+
<TypographyRow key={token.class} token={token} />
|
|
681
|
+
))}
|
|
682
|
+
</div>
|
|
683
|
+
</section>
|
|
684
|
+
|
|
685
|
+
<section>
|
|
686
|
+
<h3 className="text-12 font-semibold text-gray-500 uppercase tracking-wider mb-16">
|
|
687
|
+
UI Elements
|
|
688
|
+
</h3>
|
|
689
|
+
<div className="bg-white rounded-8 border border-gray-200 p-24">
|
|
690
|
+
{uiTokens.map((token) => (
|
|
691
|
+
<TypographyRow key={token.class} token={token} />
|
|
692
|
+
))}
|
|
1298
693
|
</div>
|
|
694
|
+
</section>
|
|
695
|
+
</div>
|
|
696
|
+
);
|
|
697
|
+
|
|
698
|
+
// =============================================================================
|
|
699
|
+
// Responsive Typography Demo
|
|
700
|
+
// =============================================================================
|
|
701
|
+
|
|
702
|
+
export const ResponsiveTypography: React.FC = () => (
|
|
703
|
+
<div className="space-y-32">
|
|
704
|
+
<div className="bg-indigo-50 border border-indigo-100 rounded-8 p-16">
|
|
705
|
+
<p className="text-14 text-indigo-700">
|
|
706
|
+
<strong>Responsive Typography</strong> — Resize viewport to see
|
|
707
|
+
typography scale. Mobile (<768px) → Tablet → Desktop (>1440px)
|
|
708
|
+
</p>
|
|
1299
709
|
</div>
|
|
1300
|
-
);
|
|
1301
|
-
};
|
|
1302
|
-
|
|
1303
|
-
export const SemanticSpacingTokens: React.FC = () => {
|
|
1304
|
-
return (
|
|
1305
|
-
<div className="space-y-8">
|
|
1306
|
-
<div>
|
|
1307
|
-
<h2 className="text-2xl font-bold mb-6">Semantic Spacing</h2>
|
|
1308
|
-
<p className="text-gray-600 mb-6">
|
|
1309
|
-
Purpose-driven spacing tokens for components, layouts, and content
|
|
1310
|
-
stacks. These provide consistent spacing across the design system.
|
|
1311
|
-
</p>
|
|
1312
|
-
|
|
1313
|
-
{/* Component Spacing */}
|
|
1314
|
-
<div className="mb-8">
|
|
1315
|
-
<h3 className="text-lg font-semibold mb-3">Component Spacing</h3>
|
|
1316
|
-
<div className="bg-white rounded-lg border border-gray-200 p-6">
|
|
1317
|
-
{semanticSpacingTokens.component.map((group) => (
|
|
1318
|
-
<div key={group.label} className="mb-6 last:mb-0">
|
|
1319
|
-
<div className="text-sm text-gray-500 mb-2">{group.label}</div>
|
|
1320
|
-
{group.tokens.map((t) => (
|
|
1321
|
-
<SemanticSpacingSwatch
|
|
1322
|
-
key={t.token}
|
|
1323
|
-
token={t.token}
|
|
1324
|
-
value={t.value}
|
|
1325
|
-
widthClass={t.widthClass}
|
|
1326
|
-
/>
|
|
1327
|
-
))}
|
|
1328
|
-
</div>
|
|
1329
|
-
))}
|
|
1330
|
-
</div>
|
|
1331
|
-
</div>
|
|
1332
710
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
<div className="text-sm text-gray-500 mb-2">{group.label}</div>
|
|
1340
|
-
{group.tokens.map((t) => (
|
|
1341
|
-
<SemanticSpacingSwatch
|
|
1342
|
-
key={t.token}
|
|
1343
|
-
token={t.token}
|
|
1344
|
-
value={t.value}
|
|
1345
|
-
widthClass={t.widthClass}
|
|
1346
|
-
/>
|
|
1347
|
-
))}
|
|
1348
|
-
</div>
|
|
1349
|
-
))}
|
|
1350
|
-
</div>
|
|
1351
|
-
</div>
|
|
1352
|
-
|
|
1353
|
-
{/* Content Spacing */}
|
|
1354
|
-
<div className="mb-8">
|
|
1355
|
-
<h3 className="text-lg font-semibold mb-3">Content Stack Spacing</h3>
|
|
1356
|
-
<div className="bg-white rounded-lg border border-gray-200 p-6">
|
|
1357
|
-
{semanticSpacingTokens.content.map((group) => (
|
|
1358
|
-
<div key={group.label} className="mb-6 last:mb-0">
|
|
1359
|
-
<div className="text-sm text-gray-500 mb-2">{group.label}</div>
|
|
1360
|
-
{group.tokens.map((t) => (
|
|
1361
|
-
<SemanticSpacingSwatch
|
|
1362
|
-
key={t.token}
|
|
1363
|
-
token={t.token}
|
|
1364
|
-
value={t.value}
|
|
1365
|
-
widthClass={t.widthClass}
|
|
1366
|
-
/>
|
|
1367
|
-
))}
|
|
1368
|
-
</div>
|
|
1369
|
-
))}
|
|
1370
|
-
</div>
|
|
1371
|
-
</div>
|
|
711
|
+
<section className="space-y-16">
|
|
712
|
+
<div className="border-l-4 border-indigo-500 pl-16">
|
|
713
|
+
<code className="text-12 font-mono text-gray-500">
|
|
714
|
+
typography-h1-display
|
|
715
|
+
</code>
|
|
716
|
+
<h1 className="typography-h1-display">Display</h1>
|
|
1372
717
|
</div>
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
718
|
+
<div className="border-l-4 border-indigo-400 pl-16">
|
|
719
|
+
<code className="text-12 font-mono text-gray-500">typography-h1</code>
|
|
720
|
+
<h1 className="typography-h1">Heading 1</h1>
|
|
721
|
+
</div>
|
|
722
|
+
<div className="border-l-4 border-indigo-300 pl-16">
|
|
723
|
+
<code className="text-12 font-mono text-gray-500">typography-h2</code>
|
|
724
|
+
<h2 className="typography-h2">Heading 2</h2>
|
|
725
|
+
</div>
|
|
726
|
+
<div className="border-l-4 border-indigo-200 pl-16">
|
|
727
|
+
<code className="text-12 font-mono text-gray-500">typography-h3</code>
|
|
728
|
+
<h3 className="typography-h3">Heading 3</h3>
|
|
729
|
+
</div>
|
|
730
|
+
</section>
|
|
1376
731
|
|
|
1377
|
-
|
|
1378
|
-
return (
|
|
1379
|
-
<div className="space-y-12">
|
|
1380
|
-
{/* Headline example */}
|
|
732
|
+
<section className="bg-gray-50 rounded-8 p-16 space-y-12">
|
|
1381
733
|
<div>
|
|
1382
|
-
<
|
|
1383
|
-
|
|
734
|
+
<code className="text-12 font-mono text-gray-500">
|
|
735
|
+
typography-body-large
|
|
736
|
+
</code>
|
|
737
|
+
<p className="typography-body-large">
|
|
738
|
+
Large body text scales from 16px to 21px.
|
|
1384
739
|
</p>
|
|
1385
|
-
<h1 className="typography-brand-small-headline-small md:typography-brand-medium-headline-medium lg:typography-brand-large-headline-large">
|
|
1386
|
-
Responsive Headline
|
|
1387
|
-
</h1>
|
|
1388
740
|
</div>
|
|
1389
|
-
|
|
1390
|
-
{/* Subheading example */}
|
|
1391
741
|
<div>
|
|
1392
|
-
<
|
|
1393
|
-
|
|
742
|
+
<code className="text-12 font-mono text-gray-500">
|
|
743
|
+
typography-body-medium
|
|
744
|
+
</code>
|
|
745
|
+
<p className="typography-body-medium">
|
|
746
|
+
Medium body text scales from 14px to 18px.
|
|
1394
747
|
</p>
|
|
1395
|
-
<h2 className="typography-brand-small-subheading-small md:typography-brand-medium-subheading-medium lg:typography-brand-large-subheading-large">
|
|
1396
|
-
Responsive Subheading
|
|
1397
|
-
</h2>
|
|
1398
748
|
</div>
|
|
1399
|
-
|
|
1400
|
-
{/* Body example */}
|
|
1401
749
|
<div>
|
|
1402
|
-
<
|
|
1403
|
-
|
|
1404
|
-
</
|
|
1405
|
-
<p className="typography-
|
|
1406
|
-
|
|
1407
|
-
variant, on tablet the medium variant, and on desktop the large
|
|
1408
|
-
variant. Resize the viewport to see it change.
|
|
750
|
+
<code className="text-12 font-mono text-gray-500">
|
|
751
|
+
typography-body-small
|
|
752
|
+
</code>
|
|
753
|
+
<p className="typography-body-small">
|
|
754
|
+
Small body text scales from 12px to 14px.
|
|
1409
755
|
</p>
|
|
1410
756
|
</div>
|
|
757
|
+
</section>
|
|
758
|
+
</div>
|
|
759
|
+
);
|
|
760
|
+
|
|
761
|
+
// =============================================================================
|
|
762
|
+
// Main Export
|
|
763
|
+
// =============================================================================
|
|
764
|
+
|
|
765
|
+
export const TokenShowcase: React.FC = () => (
|
|
766
|
+
<div className="p-32 bg-gray-50 min-h-screen">
|
|
767
|
+
<div className="max-w-6xl mx-auto">
|
|
768
|
+
<header className="mb-32">
|
|
769
|
+
<h1 className="text-24 font-bold text-gray-900">Design Tokens</h1>
|
|
770
|
+
<p className="text-gray-600">
|
|
771
|
+
Primitive color palette from the design system
|
|
772
|
+
</p>
|
|
773
|
+
</header>
|
|
774
|
+
<ColorTokens />
|
|
1411
775
|
</div>
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
export const TokenShowcase: React.FC = () => {
|
|
1416
|
-
return (
|
|
1417
|
-
<div className="p-8 bg-gray-50 min-h-screen">
|
|
1418
|
-
<div className="max-w-7xl mx-auto">
|
|
1419
|
-
<div className="mb-8">
|
|
1420
|
-
<h1 className="text-3xl font-bold mb-2">Design Tokens</h1>
|
|
1421
|
-
<p className="text-lg text-gray-600">
|
|
1422
|
-
Primitive color tokens available in the design system
|
|
1423
|
-
</p>
|
|
1424
|
-
</div>
|
|
1425
|
-
<ColorTokens />
|
|
1426
|
-
</div>
|
|
1427
|
-
</div>
|
|
1428
|
-
);
|
|
1429
|
-
};
|
|
776
|
+
</div>
|
|
777
|
+
);
|