@grantcodes/style-dictionary 1.0.0 → 1.2.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.
Files changed (66) hide show
  1. package/.turbo/turbo-build.log +44 -0
  2. package/.turbo/turbo-lint.log +5 -0
  3. package/CHANGELOG.md +7 -0
  4. package/README.md +37 -0
  5. package/biome.json +9 -0
  6. package/build.js +10 -0
  7. package/config.js +485 -0
  8. package/demo.html +171 -0
  9. package/lib/color-generator.js +13 -0
  10. package/lib/get-style-dictionary-config.js +223 -0
  11. package/lib/get-themes.js +10 -0
  12. package/lib/index.js +3 -0
  13. package/package.json +57 -28
  14. package/tests/tokens.test.js +87 -0
  15. package/tokens/core/tier-1-definitions/colors.json +175 -0
  16. package/tokens/core/tier-1-definitions/z-index.json +29 -0
  17. package/tokens/grantcodes/tier-1-definitions/animation.json +27 -0
  18. package/tokens/grantcodes/tier-1-definitions/borders.json +36 -0
  19. package/tokens/grantcodes/tier-1-definitions/colors.json +35 -0
  20. package/tokens/grantcodes/tier-1-definitions/shadows.json +39 -0
  21. package/tokens/grantcodes/tier-1-definitions/typography.json +133 -0
  22. package/tokens/grantcodes/tier-2-usage/00-colors-background.json +72 -0
  23. package/tokens/grantcodes/tier-2-usage/00-colors-border.json +42 -0
  24. package/tokens/grantcodes/tier-2-usage/00-colors-content.json +45 -0
  25. package/tokens/grantcodes/tier-2-usage/animation.json +23 -0
  26. package/tokens/grantcodes/tier-2-usage/borders.json +26 -0
  27. package/tokens/grantcodes/tier-2-usage/shadows.json +39 -0
  28. package/tokens/grantcodes/tier-2-usage/typography-usage.json +277 -0
  29. package/tokens/grantcodes/tier-3-components/button.json +94 -0
  30. package/tokens/grantcodes/tier-3-components/focus-ring.json +26 -0
  31. package/tokens/grantcodes/tier-3-components/form.json +69 -0
  32. package/tokens/grantcodes/tier-3-components/link.json +39 -0
  33. package/tokens/todomap/tier-1-definitions/colors.json +92 -0
  34. package/tokens/todomap/tier-1-definitions/typography.json +10 -0
  35. package/tokens/todomap/tier-2-usage/00-colors-background.json +36 -0
  36. package/tokens/todomap/tier-2-usage/00-colors-content.json +33 -0
  37. package/tokens/todomap/tier-2-usage/typography-usage.json +20 -0
  38. package/tokens/todomap/tier-3-components/button.json +141 -0
  39. package/tokens/todomap/tier-3-components/focus-ring.json +26 -0
  40. package/tokens/todomap/tier-3-components/form.json +69 -0
  41. package/tokens/todomap/tier-3-components/link.json +39 -0
  42. package/tokens/wireframe/tier-1-definitions/animation.json +18 -0
  43. package/tokens/wireframe/tier-1-definitions/borders.json +42 -0
  44. package/tokens/wireframe/tier-1-definitions/colors.json +36 -0
  45. package/tokens/wireframe/tier-1-definitions/shadows.json +39 -0
  46. package/tokens/wireframe/tier-1-definitions/typography.json +130 -0
  47. package/tokens/wireframe/tier-2-usage/00-colors-background.json +86 -0
  48. package/tokens/wireframe/tier-2-usage/00-colors-border.json +42 -0
  49. package/tokens/wireframe/tier-2-usage/00-colors-content.json +45 -0
  50. package/tokens/wireframe/tier-2-usage/animation.json +24 -0
  51. package/tokens/wireframe/tier-2-usage/borders.json +33 -0
  52. package/tokens/wireframe/tier-2-usage/shadows.json +39 -0
  53. package/tokens/wireframe/tier-2-usage/typography-usage.json +445 -0
  54. package/tokens/wireframe/tier-3-components/button.json +94 -0
  55. package/tokens/wireframe/tier-3-components/focus-ring.json +26 -0
  56. package/tokens/wireframe/tier-3-components/form.json +69 -0
  57. package/tokens/wireframe/tier-3-components/link.json +39 -0
  58. package/.github/workflows/create-release.yml +0 -45
  59. package/.simple-git-hooks.cjs +0 -1
  60. package/build/css/default/style-dictionary.css +0 -181
  61. package/build/css/todomap/style-dictionary.css +0 -181
  62. package/build/js/default/style-dictionary.js +0 -179
  63. package/build/js/todomap/style-dictionary.js +0 -179
  64. package/build/scss/default/_style-dictionary.scss +0 -181
  65. package/build/scss/todomap/_style-dictionary.scss +0 -181
  66. package/commitlint.config.cjs +0 -1
@@ -0,0 +1,42 @@
1
+ {
2
+ "color": {
3
+ "border": {
4
+ "default": {
5
+ "value": "{color.neutral.300}"
6
+ },
7
+ "default-hover": {
8
+ "value": "{color.neutral.500}"
9
+ },
10
+ "subtle": {
11
+ "value": "{color.neutral.200}"
12
+ },
13
+ "strong": {
14
+ "value": "{color.neutral.900}"
15
+ },
16
+ "knockout": {
17
+ "value": "{color.neutral.400}"
18
+ },
19
+ "brand": {
20
+ "value": "{color.brand.gray.300}"
21
+ },
22
+ "utility": {
23
+ "error": {
24
+ "value": "{color.utility.red.700}"
25
+ },
26
+ "warning": {
27
+ "value": "{color.utility.yellow.700}"
28
+ },
29
+ "success": {
30
+ "value": "{color.utility.green.700}"
31
+ },
32
+ "info": {
33
+ "value": "{color.utility.blue.700}"
34
+ }
35
+ },
36
+ "disabled": {
37
+ "value": "{color.neutral.200}"
38
+ }
39
+ }
40
+ }
41
+ }
42
+
@@ -0,0 +1,45 @@
1
+ {
2
+ "color": {
3
+ "content": {
4
+ "default": {
5
+ "value": "{color.neutral.900}"
6
+ },
7
+ "default-hover": {
8
+ "value": "{color.neutral.black}"
9
+ },
10
+ "subtle": {
11
+ "value": "{color.neutral.500}"
12
+ },
13
+ "brand": {
14
+ "value": "{color.brand.gray.700}"
15
+ },
16
+ "brand-hover": {
17
+ "value": "{color.brand.gray.900}"
18
+ },
19
+ "brand-knockout": {
20
+ "value": "{color.brand.gray.100}"
21
+ },
22
+ "knockout": {
23
+ "value": "{color.neutral.white}"
24
+ },
25
+ "disabled": {
26
+ "value": "{color.neutral.600}"
27
+ },
28
+ "utility": {
29
+ "error": {
30
+ "value": "{color.utility.red.600}"
31
+ },
32
+ "warning": {
33
+ "value": "{color.utility.yellow.600}"
34
+ },
35
+ "success": {
36
+ "value": "{color.utility.green.600}"
37
+ },
38
+ "info": {
39
+ "value": "{color.utility.blue.600}"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+
@@ -0,0 +1,24 @@
1
+ {
2
+ "animation": {
3
+ "fade": {
4
+ "quick": {
5
+ "value": "{animation.duration.15}"
6
+ },
7
+ "long": {
8
+ "value": "{animation.duration.40}"
9
+ }
10
+ },
11
+ "move": {
12
+ "quick": {
13
+ "value": "{animation.duration.15}"
14
+ },
15
+ "long": {
16
+ "value": "{animation.duration.40}"
17
+ }
18
+ },
19
+ "ease": {
20
+ "value": "{animation.easing.default}"
21
+ }
22
+ }
23
+ }
24
+
@@ -0,0 +1,33 @@
1
+ {
2
+ "border": {
3
+ "radius": {
4
+ "none": {
5
+ "value": "{border.radius.0}"
6
+ },
7
+ "sm": {
8
+ "value": "{border.radius.0}"
9
+ },
10
+ "md": {
11
+ "value": "{border.radius.0}"
12
+ },
13
+ "lg": {
14
+ "value": "{border.radius.0}"
15
+ }
16
+ },
17
+ "width": {
18
+ "sm": {
19
+ "value": "{border.width.1}"
20
+ },
21
+ "md": {
22
+ "value": "{border.width.2}"
23
+ },
24
+ "lg": {
25
+ "value": "{border.width.4}"
26
+ },
27
+ "xl": {
28
+ "value": "{border.width.8}"
29
+ }
30
+ }
31
+ }
32
+ }
33
+
@@ -0,0 +1,39 @@
1
+ {
2
+ "box-shadow": {
3
+ "sm": {
4
+ "x": {
5
+ "value": "{shadow.sm.x}"
6
+ },
7
+ "y": {
8
+ "value": "{shadow.sm.y}"
9
+ },
10
+ "blur": {
11
+ "value": "{shadow.sm.blur}"
12
+ },
13
+ "spread": {
14
+ "value": "{shadow.sm.spread}"
15
+ },
16
+ "color": {
17
+ "value": "{shadow.sm.color}"
18
+ }
19
+ },
20
+ "md": {
21
+ "x": {
22
+ "value": "{shadow.md.x}"
23
+ },
24
+ "y": {
25
+ "value": "{shadow.md.y}"
26
+ },
27
+ "blur": {
28
+ "value": "{shadow.md.blur}"
29
+ },
30
+ "spread": {
31
+ "value": "{shadow.md.spread}"
32
+ },
33
+ "color": {
34
+ "value": "{shadow.md.color}"
35
+ }
36
+ }
37
+ }
38
+ }
39
+
@@ -0,0 +1,445 @@
1
+ {
2
+ "typography": {
3
+ "display-default": {
4
+ "font-family": {
5
+ "value": "{typography.font-family.helvetica}"
6
+ },
7
+ "font-weight": {
8
+ "value": "{typography.font-weight.700}"
9
+ },
10
+ "font-size": {
11
+ "value": "{typography.font-size.100}"
12
+ },
13
+ "line-height": {
14
+ "value": "{typography.line-height.110}"
15
+ },
16
+ "letter-spacing": {
17
+ "value": "{typography.letter-spacing.minus-2}"
18
+ },
19
+ "text-transform": {
20
+ "value": "{typography.text-transform.none}"
21
+ }
22
+ },
23
+ "display-default-mobile": {
24
+ "font-family": {
25
+ "value": "{typography.display-default.font-family}"
26
+ },
27
+ "font-weight": {
28
+ "value": "{typography.display-default.font-weight}"
29
+ },
30
+ "font-size": {
31
+ "value": "{typography.font-size.48}"
32
+ },
33
+ "line-height": {
34
+ "value": "{typography.line-height.56}"
35
+ },
36
+ "letter-spacing": {
37
+ "value": "{typography.letter-spacing.minus-1-half}"
38
+ },
39
+ "text-transform": {
40
+ "value": "{typography.display-default.text-transform}"
41
+ }
42
+ },
43
+ "display-sm": {
44
+ "font-family": {
45
+ "value": "{typography.font-family.helvetica}"
46
+ },
47
+ "font-weight": {
48
+ "value": "{typography.font-weight.400}"
49
+ },
50
+ "font-size": {
51
+ "value": "{typography.font-size.40}"
52
+ },
53
+ "line-height": {
54
+ "value": "{typography.line-height.48}"
55
+ },
56
+ "letter-spacing": {
57
+ "value": "{typography.letter-spacing.minus-1-half}"
58
+ },
59
+ "text-transform": {
60
+ "value": "{typography.text-transform.none}"
61
+ }
62
+ },
63
+ "display-sm-mobile": {
64
+ "font-family": {
65
+ "value": "{typography.display-sm.font-family}"
66
+ },
67
+ "font-weight": {
68
+ "value": "{typography.display-sm.font-weight}"
69
+ },
70
+ "font-size": {
71
+ "value": "{typography.font-size.32}"
72
+ },
73
+ "line-height": {
74
+ "value": "{typography.line-height.40}"
75
+ },
76
+ "letter-spacing": {
77
+ "value": "{typography.letter-spacing.minus-1}"
78
+ },
79
+ "text-transform": {
80
+ "value": "{typography.text-transform.none}"
81
+ }
82
+ },
83
+ "headline-lg": {
84
+ "font-family": {
85
+ "value": "{typography.font-family.helvetica}"
86
+ },
87
+ "font-weight": {
88
+ "value": "{typography.font-weight.700}"
89
+ },
90
+ "font-size": {
91
+ "value": "{typography.font-size.48}"
92
+ },
93
+ "line-height": {
94
+ "value": "{typography.line-height.56}"
95
+ },
96
+ "letter-spacing": {
97
+ "value": "{typography.letter-spacing.half}"
98
+ },
99
+ "text-transform": {
100
+ "value": "{typography.text-transform.none}"
101
+ }
102
+ },
103
+ "headline-lg-mobile": {
104
+ "font-family": {
105
+ "value": "{typography.headline-lg.font-family}"
106
+ },
107
+ "font-weight": {
108
+ "value": "{typography.headline-lg.font-weight}"
109
+ },
110
+ "font-size": {
111
+ "value": "{typography.font-size.40}"
112
+ },
113
+ "line-height": {
114
+ "value": "{typography.line-height.48}"
115
+ },
116
+ "letter-spacing": {
117
+ "value": "{typography.letter-spacing.half}"
118
+ },
119
+ "text-transform": {
120
+ "value": "{typography.text-transform.none}"
121
+ }
122
+ },
123
+ "headline-default": {
124
+ "font-family": {
125
+ "value": "{typography.font-family.helvetica}"
126
+ },
127
+ "font-weight": {
128
+ "value": "{typography.font-weight.700}"
129
+ },
130
+ "font-size": {
131
+ "value": "{typography.font-size.40}"
132
+ },
133
+ "line-height": {
134
+ "value": "{typography.line-height.48}"
135
+ },
136
+ "letter-spacing": {
137
+ "value": "{typography.letter-spacing.half}"
138
+ },
139
+ "text-transform": {
140
+ "value": "{typography.text-transform.none}"
141
+ }
142
+ },
143
+ "headline-default-mobile": {
144
+ "font-family": {
145
+ "value": "{typography.headline-default.font-family}"
146
+ },
147
+ "font-weight": {
148
+ "value": "{typography.headline-default.font-weight}"
149
+ },
150
+ "font-size": {
151
+ "value": "{typography.font-size.32}"
152
+ },
153
+ "line-height": {
154
+ "value": "{typography.line-height.40}"
155
+ },
156
+ "letter-spacing": {
157
+ "value": "{typography.letter-spacing.half}"
158
+ },
159
+ "text-transform": {
160
+ "value": "{typography.headline-default.text-transform}"
161
+ }
162
+ },
163
+ "headline-sm": {
164
+ "font-family": {
165
+ "value": "{typography.font-family.helvetica}"
166
+ },
167
+ "font-weight": {
168
+ "value": "{typography.font-weight.700}"
169
+ },
170
+ "font-size": {
171
+ "value": "{typography.font-size.32}"
172
+ },
173
+ "line-height": {
174
+ "value": "{typography.line-height.40}"
175
+ },
176
+ "letter-spacing": {
177
+ "value": "{typography.letter-spacing.half}"
178
+ },
179
+ "text-transform": {
180
+ "value": "{typography.text-transform.none}"
181
+ }
182
+ },
183
+ "headline-sm-mobile": {
184
+ "font-family": {
185
+ "value": "{typography.headline-sm.font-family}"
186
+ },
187
+ "font-weight": {
188
+ "value": "{typography.headline-sm.font-weight}"
189
+ },
190
+ "font-size": {
191
+ "value": "{typography.font-size.28}"
192
+ },
193
+ "line-height": {
194
+ "value": "{typography.line-height.36}"
195
+ },
196
+ "letter-spacing": {
197
+ "value": "{typography.letter-spacing.half}"
198
+ },
199
+ "text-transform": {
200
+ "value": "{typography.text-transform.none}"
201
+ }
202
+ },
203
+ "title-lg": {
204
+ "font-family": {
205
+ "value": "{typography.font-family.helvetica}"
206
+ },
207
+ "font-weight": {
208
+ "value": "{typography.font-weight.700}"
209
+ },
210
+ "font-size": {
211
+ "value": "{typography.font-size.32}"
212
+ },
213
+ "line-height": {
214
+ "value": "{typography.line-height.40}"
215
+ },
216
+ "letter-spacing": {
217
+ "value": "{typography.letter-spacing.minus-1}"
218
+ },
219
+ "text-transform": {
220
+ "value": "{typography.text-transform.none}"
221
+ }
222
+ },
223
+ "title-lg-mobile": {
224
+ "font-family": {
225
+ "value": "{typography.title-lg.font-family}"
226
+ },
227
+ "font-weight": {
228
+ "value": "{typography.title-lg.font-weight}"
229
+ },
230
+ "font-size": {
231
+ "value": "{typography.font-size.28}"
232
+ },
233
+ "line-height": {
234
+ "value": "{typography.line-height.36}"
235
+ },
236
+ "letter-spacing": {
237
+ "value": "{typography.letter-spacing.minus-half}"
238
+ },
239
+ "text-transform": {
240
+ "value": "{typography.text-transform.none}"
241
+ }
242
+ },
243
+ "title-default": {
244
+ "font-family": {
245
+ "value": "{typography.font-family.helvetica}"
246
+ },
247
+ "font-weight": {
248
+ "value": "{typography.font-weight.700}"
249
+ },
250
+ "font-size": {
251
+ "value": "{typography.font-size.28}"
252
+ },
253
+ "line-height": {
254
+ "value": "{typography.line-height.36}"
255
+ },
256
+ "letter-spacing": {
257
+ "value": "{typography.letter-spacing.minus-half}"
258
+ },
259
+ "text-transform": {
260
+ "value": "{typography.text-transform.none}"
261
+ }
262
+ },
263
+ "title-sm": {
264
+ "font-family": {
265
+ "value": "{typography.font-family.helvetica}"
266
+ },
267
+ "font-weight": {
268
+ "value": "{typography.font-weight.700}"
269
+ },
270
+ "font-size": {
271
+ "value": "{typography.font-size.24}"
272
+ },
273
+ "line-height": {
274
+ "value": "{typography.line-height.32}"
275
+ },
276
+ "letter-spacing": {
277
+ "value": "{typography.letter-spacing.minus-half}"
278
+ },
279
+ "text-transform": {
280
+ "value": "{typography.text-transform.none}"
281
+ }
282
+ },
283
+ "label-lg": {
284
+ "font-family": {
285
+ "value": "{typography.font-family.helvetica}"
286
+ },
287
+ "font-weight": {
288
+ "value": "{typography.font-weight.700}"
289
+ },
290
+ "font-size": {
291
+ "value": "{typography.font-size.20}"
292
+ },
293
+ "line-height": {
294
+ "value": "{typography.line-height.28}"
295
+ },
296
+ "letter-spacing": {
297
+ "value": "{typography.letter-spacing.0}"
298
+ },
299
+ "text-transform": {
300
+ "value": "{typography.text-transform.none}"
301
+ }
302
+ },
303
+ "label-default": {
304
+ "font-family": {
305
+ "value": "{typography.font-family.helvetica}"
306
+ },
307
+ "font-weight": {
308
+ "value": "{typography.font-weight.700}"
309
+ },
310
+ "font-size": {
311
+ "value": "{typography.font-size.16}"
312
+ },
313
+ "line-height": {
314
+ "value": "{typography.line-height.24}"
315
+ },
316
+ "letter-spacing": {
317
+ "value": "{typography.letter-spacing.0}"
318
+ },
319
+ "text-transform": {
320
+ "value": "{typography.text-transform.none}"
321
+ }
322
+ },
323
+ "label-sm": {
324
+ "font-family": {
325
+ "value": "{typography.font-family.helvetica}"
326
+ },
327
+ "font-weight": {
328
+ "value": "{typography.font-weight.700}"
329
+ },
330
+ "font-size": {
331
+ "value": "{typography.font-size.14}"
332
+ },
333
+ "line-height": {
334
+ "value": "{typography.line-height.20}"
335
+ },
336
+ "letter-spacing": {
337
+ "value": "{typography.letter-spacing.0}"
338
+ },
339
+ "text-transform": {
340
+ "value": "{typography.text-transform.none}"
341
+ }
342
+ },
343
+ "body-lg": {
344
+ "font-family": {
345
+ "value": "{typography.font-family.helvetica}"
346
+ },
347
+ "font-weight": {
348
+ "value": "{typography.font-weight.400}"
349
+ },
350
+ "font-size": {
351
+ "value": "{typography.font-size.20}"
352
+ },
353
+ "line-height": {
354
+ "value": "{typography.line-height.28}"
355
+ },
356
+ "letter-spacing": {
357
+ "value": "{typography.letter-spacing.0}"
358
+ },
359
+ "text-transform": {
360
+ "value": "{typography.text-transform.none}"
361
+ }
362
+ },
363
+ "body-default": {
364
+ "font-family": {
365
+ "value": "{typography.font-family.helvetica}"
366
+ },
367
+ "font-weight": {
368
+ "value": "{typography.font-weight.400}"
369
+ },
370
+ "font-size": {
371
+ "value": "{typography.font-size.16}"
372
+ },
373
+ "line-height": {
374
+ "value": "{typography.line-height.24}"
375
+ },
376
+ "letter-spacing": {
377
+ "value": "{typography.letter-spacing.0}"
378
+ },
379
+ "text-transform": {
380
+ "value": "{typography.text-transform.none}"
381
+ }
382
+ },
383
+ "body-sm": {
384
+ "font-family": {
385
+ "value": "{typography.font-family.helvetica}"
386
+ },
387
+ "font-weight": {
388
+ "value": "{typography.font-weight.400}"
389
+ },
390
+ "font-size": {
391
+ "value": "{typography.font-size.14}"
392
+ },
393
+ "line-height": {
394
+ "value": "{typography.line-height.20}"
395
+ },
396
+ "letter-spacing": {
397
+ "value": "{typography.letter-spacing.0}"
398
+ },
399
+ "text-transform": {
400
+ "value": "{typography.text-transform.none}"
401
+ }
402
+ },
403
+ "meta-default": {
404
+ "font-family": {
405
+ "value": "{typography.font-family.helvetica}"
406
+ },
407
+ "font-weight": {
408
+ "value": "{typography.font-weight.700}"
409
+ },
410
+ "font-size": {
411
+ "value": "{typography.font-size.14}"
412
+ },
413
+ "line-height": {
414
+ "value": "{typography.line-height.20}"
415
+ },
416
+ "letter-spacing": {
417
+ "value": "{typography.letter-spacing.2}"
418
+ },
419
+ "text-transform": {
420
+ "value": "{typography.text-transform.uppercase}"
421
+ }
422
+ },
423
+ "meta-sm": {
424
+ "font-family": {
425
+ "value": "{typography.font-family.helvetica}"
426
+ },
427
+ "font-weight": {
428
+ "value": "{typography.font-weight.700}"
429
+ },
430
+ "font-size": {
431
+ "value": "{typography.font-size.12}"
432
+ },
433
+ "line-height": {
434
+ "value": "{typography.line-height.16}"
435
+ },
436
+ "letter-spacing": {
437
+ "value": "{typography.letter-spacing.2}"
438
+ },
439
+ "text-transform": {
440
+ "value": "{typography.text-transform.uppercase}"
441
+ }
442
+ }
443
+ }
444
+ }
445
+