@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,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,277 @@
1
+ {
2
+ "typography": {
3
+ "display-default": {
4
+ "font-family": {
5
+ "value": "{typography.font-family.greycliff}"
6
+ },
7
+ "font-weight": {
8
+ "value": "{typography.font-weight.600}"
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.0}"
18
+ }
19
+ },
20
+ "display-sm": {
21
+ "font-family": {
22
+ "value": "{typography.font-family.greycliff}"
23
+ },
24
+ "font-weight": {
25
+ "value": "{typography.font-weight.600}"
26
+ },
27
+ "font-size": {
28
+ "value": "{typography.font-size.100}"
29
+ },
30
+ "line-height": {
31
+ "value": "{typography.line-height.110}"
32
+ },
33
+ "letter-spacing": {
34
+ "value": "{typography.letter-spacing.0}"
35
+ }
36
+ },
37
+ "headline-lg": {
38
+ "font-family": {
39
+ "value": "{typography.font-family.greycliff}"
40
+ },
41
+ "font-weight": {
42
+ "value": "{typography.font-weight.600}"
43
+ },
44
+ "font-size": {
45
+ "value": "{typography.font-size.48}"
46
+ },
47
+ "line-height": {
48
+ "value": "{typography.line-height.56}"
49
+ },
50
+ "letter-spacing": {
51
+ "value": "{typography.letter-spacing.half}"
52
+ }
53
+ },
54
+ "headline-default": {
55
+ "font-family": {
56
+ "value": "{typography.font-family.greycliff}"
57
+ },
58
+ "font-weight": {
59
+ "value": "{typography.font-weight.600}"
60
+ },
61
+ "font-size": {
62
+ "value": "{typography.font-size.40}"
63
+ },
64
+ "line-height": {
65
+ "value": "{typography.line-height.48}"
66
+ },
67
+ "letter-spacing": {
68
+ "value": "{typography.letter-spacing.half}"
69
+ }
70
+ },
71
+ "headline-sm": {
72
+ "font-family": {
73
+ "value": "{typography.font-family.greycliff}"
74
+ },
75
+ "font-weight": {
76
+ "value": "{typography.font-weight.600}"
77
+ },
78
+ "font-size": {
79
+ "value": "{typography.font-size.32}"
80
+ },
81
+ "line-height": {
82
+ "value": "{typography.line-height.40}"
83
+ },
84
+ "letter-spacing": {
85
+ "value": "{typography.letter-spacing.half}"
86
+ }
87
+ },
88
+ "title-lg": {
89
+ "font-family": {
90
+ "value": "{typography.font-family.system}"
91
+ },
92
+ "font-weight": {
93
+ "value": "{typography.font-weight.600}"
94
+ },
95
+ "font-size": {
96
+ "value": "{typography.font-size.32}"
97
+ },
98
+ "line-height": {
99
+ "value": "{typography.line-height.40}"
100
+ },
101
+ "letter-spacing": {
102
+ "value": "{typography.letter-spacing.half}"
103
+ }
104
+ },
105
+ "title-default": {
106
+ "font-family": {
107
+ "value": "{typography.font-family.system}"
108
+ },
109
+ "font-weight": {
110
+ "value": "{typography.font-weight.600}"
111
+ },
112
+ "font-size": {
113
+ "value": "{typography.font-size.28}"
114
+ },
115
+ "line-height": {
116
+ "value": "{typography.line-height.36}"
117
+ },
118
+ "letter-spacing": {
119
+ "value": "{typography.letter-spacing.half}"
120
+ }
121
+ },
122
+ "title-sm": {
123
+ "font-family": {
124
+ "value": "{typography.font-family.system}"
125
+ },
126
+ "font-weight": {
127
+ "value": "{typography.font-weight.600}"
128
+ },
129
+ "font-size": {
130
+ "value": "{typography.font-size.24}"
131
+ },
132
+ "line-height": {
133
+ "value": "{typography.line-height.32}"
134
+ },
135
+ "letter-spacing": {
136
+ "value": "{typography.letter-spacing.half}"
137
+ }
138
+ },
139
+ "label-lg": {
140
+ "font-family": {
141
+ "value": "{typography.font-family.system}"
142
+ },
143
+ "font-weight": {
144
+ "value": "{typography.font-weight.600}"
145
+ },
146
+ "font-size": {
147
+ "value": "{typography.font-size.20}"
148
+ },
149
+ "line-height": {
150
+ "value": "{typography.line-height.28}"
151
+ },
152
+ "letter-spacing": {
153
+ "value": "{typography.letter-spacing.0}"
154
+ }
155
+ },
156
+ "label-default": {
157
+ "font-family": {
158
+ "value": "{typography.font-family.system}"
159
+ },
160
+ "font-weight": {
161
+ "value": "{typography.font-weight.600}"
162
+ },
163
+ "font-size": {
164
+ "value": "{typography.font-size.16}"
165
+ },
166
+ "line-height": {
167
+ "value": "{typography.line-height.24}"
168
+ },
169
+ "letter-spacing": {
170
+ "value": "{typography.letter-spacing.0}"
171
+ }
172
+ },
173
+ "label-sm": {
174
+ "font-family": {
175
+ "value": "{typography.font-family.system}"
176
+ },
177
+ "font-weight": {
178
+ "value": "{typography.font-weight.600}"
179
+ },
180
+ "font-size": {
181
+ "value": "{typography.font-size.14}"
182
+ },
183
+ "line-height": {
184
+ "value": "{typography.line-height.20}"
185
+ },
186
+ "letter-spacing": {
187
+ "value": "{typography.letter-spacing.0}"
188
+ }
189
+ },
190
+ "body-lg": {
191
+ "font-family": {
192
+ "value": "{typography.font-family.system}"
193
+ },
194
+ "font-weight": {
195
+ "value": "{typography.font-weight.400}"
196
+ },
197
+ "font-size": {
198
+ "value": "{typography.font-size.20}"
199
+ },
200
+ "line-height": {
201
+ "value": "{typography.line-height.28}"
202
+ },
203
+ "letter-spacing": {
204
+ "value": "{typography.letter-spacing.0}"
205
+ }
206
+ },
207
+ "body-default": {
208
+ "font-family": {
209
+ "value": "{typography.font-family.system}"
210
+ },
211
+ "font-weight": {
212
+ "value": "{typography.font-weight.400}"
213
+ },
214
+ "font-size": {
215
+ "value": "{typography.font-size.16}"
216
+ },
217
+ "line-height": {
218
+ "value": "{typography.line-height.24}"
219
+ },
220
+ "letter-spacing": {
221
+ "value": "{typography.letter-spacing.0}"
222
+ }
223
+ },
224
+ "body-sm": {
225
+ "font-family": {
226
+ "value": "{typography.font-family.system}"
227
+ },
228
+ "font-weight": {
229
+ "value": "{typography.font-weight.400}"
230
+ },
231
+ "font-size": {
232
+ "value": "{typography.font-size.14}"
233
+ },
234
+ "line-height": {
235
+ "value": "{typography.line-height.20}"
236
+ },
237
+ "letter-spacing": {
238
+ "value": "{typography.letter-spacing.0}"
239
+ }
240
+ },
241
+ "meta-default": {
242
+ "font-family": {
243
+ "value": "{typography.font-family.system}"
244
+ },
245
+ "font-weight": {
246
+ "value": "{typography.font-weight.600}"
247
+ },
248
+ "font-size": {
249
+ "value": "{typography.font-size.14}"
250
+ },
251
+ "line-height": {
252
+ "value": "{typography.line-height.20}"
253
+ },
254
+ "letter-spacing": {
255
+ "value": "{typography.letter-spacing.2}"
256
+ }
257
+ },
258
+ "meta-sm": {
259
+ "font-family": {
260
+ "value": "{typography.font-family.system}"
261
+ },
262
+ "font-weight": {
263
+ "value": "{typography.font-weight.600}"
264
+ },
265
+ "font-size": {
266
+ "value": "{typography.font-size.12}"
267
+ },
268
+ "line-height": {
269
+ "value": "{typography.line-height.16}"
270
+ },
271
+ "letter-spacing": {
272
+ "value": "{typography.letter-spacing.2}"
273
+ }
274
+ }
275
+ }
276
+ }
277
+
@@ -0,0 +1,94 @@
1
+ {
2
+ "button": {
3
+ "color": {
4
+ "background": {
5
+ "default": {
6
+ "value": "{color.background.brand}"
7
+ },
8
+ "hover": {
9
+ "value": "{color.background.brand-hover}"
10
+ },
11
+ "active": {
12
+ "value": "{color.background.brand-hover}"
13
+ },
14
+ "disabled": {
15
+ "value": "{color.background.default}"
16
+ }
17
+ },
18
+ "content": {
19
+ "default": {
20
+ "value": "{color.content.brand-knockout}"
21
+ },
22
+ "hover": {
23
+ "value": "{color.content.brand-knockout}"
24
+ },
25
+ "active": {
26
+ "value": "{color.content.brand-knockout}"
27
+ },
28
+ "disabled": {
29
+ "value": "{color.content.disabled}"
30
+ }
31
+ },
32
+ "border": {
33
+ "default": {
34
+ "value": "{color.border.default}"
35
+ },
36
+ "hover": {
37
+ "value": "{color.border.brand}"
38
+ },
39
+ "active": {
40
+ "value": "{color.border.brand}"
41
+ },
42
+ "disabled": {
43
+ "value": "{color.border.default}"
44
+ }
45
+ }
46
+ },
47
+ "primary": {
48
+ "color": {
49
+ "background": {
50
+ "default": {
51
+ "value": "{color.brand.purple.500}"
52
+ },
53
+ "hover": {
54
+ "value": "{color.brand.purple.600}"
55
+ },
56
+ "active": {
57
+ "value": "{color.brand.purple.700}"
58
+ },
59
+ "disabled": {
60
+ "value": "{color.background.brand-disabled}"
61
+ }
62
+ },
63
+ "content": {
64
+ "default": {
65
+ "value": "{color.neutral.white}"
66
+ },
67
+ "hover": {
68
+ "value": "{color.neutral.white}"
69
+ },
70
+ "active": {
71
+ "value": "{color.neutral.white}"
72
+ },
73
+ "disabled": {
74
+ "value": "{color.content.default}"
75
+ }
76
+ },
77
+ "border": {
78
+ "default": {
79
+ "value": "{color.brand.purple.500}"
80
+ },
81
+ "hover": {
82
+ "value": "{color.brand.purple.700}"
83
+ },
84
+ "active": {
85
+ "value": "{color.brand.purple.700}"
86
+ },
87
+ "disabled": {
88
+ "value": "{color.border.default}"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "focus-ring": {
3
+ "color": {
4
+ "default": {
5
+ "value": "rgba(106, 91, 197, 0.4)"
6
+ },
7
+ "contrast": {
8
+ "value": "{color.brand.purple.200}"
9
+ },
10
+ "contrast-shadow": {
11
+ "value": "{color.brand.purple.800}"
12
+ }
13
+ },
14
+ "width": {
15
+ "default": {
16
+ "value": "0.2rem"
17
+ }
18
+ },
19
+ "offset": {
20
+ "default": {
21
+ "value": "0px"
22
+ }
23
+ }
24
+ }
25
+ }
26
+
@@ -0,0 +1,69 @@
1
+ {
2
+ "form": {
3
+ "color": {
4
+ "background": {
5
+ "default": {
6
+ "value": "{color.background.default}"
7
+ },
8
+ "focus": {
9
+ "value": "{color.background.default}"
10
+ },
11
+ "hover": {
12
+ "value": "{color.background.subtle}"
13
+ },
14
+ "active": {
15
+ "value": "{color.background.default}"
16
+ },
17
+ "disabled": {
18
+ "value": "{color.background.default}"
19
+ }
20
+ },
21
+ "content": {
22
+ "default": {
23
+ "value": "{color.content.default}"
24
+ },
25
+ "focus": {
26
+ "value": "{color.content.default}"
27
+ },
28
+ "hover": {
29
+ "value": "{color.content.default}"
30
+ },
31
+ "active": {
32
+ "value": "{color.content.default}"
33
+ },
34
+ "disabled": {
35
+ "value": "{color.content.disabled}"
36
+ }
37
+ },
38
+ "border": {
39
+ "default": {
40
+ "value": "{color.border.default}"
41
+ },
42
+ "focus": {
43
+ "value": "{color.border.brand}"
44
+ },
45
+ "hover": {
46
+ "value": "{color.border.default-hover}"
47
+ },
48
+ "active": {
49
+ "value": "{color.border.brand}"
50
+ },
51
+ "disabled": {
52
+ "value": "{color.border.default}"
53
+ },
54
+ "error": {
55
+ "value": "{color.border.utility.error}"
56
+ }
57
+ }
58
+ },
59
+ "input": {
60
+ "accent": {
61
+ "color": {
62
+ "default": {
63
+ "value": "{color.brand.purple.500}"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "link": {
3
+ "color": {
4
+ "content": {
5
+ "default": {
6
+ "value": "{color.brand.purple.500}"
7
+ },
8
+ "hover": {
9
+ "value": "{color.brand.purple.600}"
10
+ },
11
+ "active": {
12
+ "value": "{color.brand.purple.600}"
13
+ },
14
+ "visited": {
15
+ "value": "{color.brand.purple.500}"
16
+ }
17
+ }
18
+ },
19
+ "knockout": {
20
+ "color": {
21
+ "content": {
22
+ "default": {
23
+ "value": "{color.content.knockout}"
24
+ },
25
+ "hover": {
26
+ "value": "{color.content.knockout}"
27
+ },
28
+ "active": {
29
+ "value": "{color.content.knockout}"
30
+ },
31
+ "visited": {
32
+ "value": "{color.content.knockout}"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+
@@ -0,0 +1,92 @@
1
+ {
2
+ "color": {
3
+ "brand": {
4
+ "100": {
5
+ "value": "oklch(94.96% 0.050 15.5)"
6
+ },
7
+ "200": {
8
+ "value": "oklch(89.21% 0.097 15.5)"
9
+ },
10
+ "300": {
11
+ "value": "oklch(82.67% 0.147 15.5)"
12
+ },
13
+ "400": {
14
+ "value": "oklch(77.04% 0.189 15.5)"
15
+ },
16
+ "500": {
17
+ "value": "oklch(62.8% 0.258 15.5)"
18
+ },
19
+ "600": {
20
+ "value": "oklch(60.03% 0.246 15.5)"
21
+ },
22
+ "700": {
23
+ "value": "oklch(51.18% 0.229 15.5)"
24
+ },
25
+ "800": {
26
+ "value": "oklch(42.79% 0.203 15.5)"
27
+ },
28
+ "900": {
29
+ "value": "oklch(36.89% 0.183 15.5)"
30
+ },
31
+ "purple": {
32
+ "100": {
33
+ "value": "oklch(94.96% 0.028 280.5)"
34
+ },
35
+ "200": {
36
+ "value": "oklch(89.21% 0.054 280.5)"
37
+ },
38
+ "300": {
39
+ "value": "oklch(82.67% 0.082 280.5)"
40
+ },
41
+ "400": {
42
+ "value": "oklch(77.04% 0.105 280.5)"
43
+ },
44
+ "500": {
45
+ "value": "oklch(65.0% 0.144 280.5)"
46
+ },
47
+ "600": {
48
+ "value": "oklch(60.03% 0.137 280.5)"
49
+ },
50
+ "700": {
51
+ "value": "oklch(51.18% 0.128 280.5)"
52
+ },
53
+ "800": {
54
+ "value": "oklch(42.79% 0.113 280.5)"
55
+ },
56
+ "900": {
57
+ "value": "oklch(36.89% 0.102 280.5)"
58
+ }
59
+ },
60
+ "pink": {
61
+ "100": {
62
+ "value": "oklch(94.96% 0.050 15.5)"
63
+ },
64
+ "200": {
65
+ "value": "oklch(89.21% 0.097 15.5)"
66
+ },
67
+ "300": {
68
+ "value": "oklch(82.67% 0.147 15.5)"
69
+ },
70
+ "400": {
71
+ "value": "oklch(77.04% 0.189 15.5)"
72
+ },
73
+ "500": {
74
+ "value": "oklch(62.8% 0.258 15.5)"
75
+ },
76
+ "600": {
77
+ "value": "oklch(60.03% 0.246 15.5)"
78
+ },
79
+ "700": {
80
+ "value": "oklch(51.18% 0.229 15.5)"
81
+ },
82
+ "800": {
83
+ "value": "oklch(42.79% 0.203 15.5)"
84
+ },
85
+ "900": {
86
+ "value": "oklch(36.89% 0.183 15.5)"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+
@@ -0,0 +1,10 @@
1
+ {
2
+ "typography": {
3
+ "font-family": {
4
+ "system": {
5
+ "value": "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif"
6
+ }
7
+ }
8
+ }
9
+ }
10
+
@@ -0,0 +1,36 @@
1
+ {
2
+ "color": {
3
+ "background": {
4
+ "default": {
5
+ "value": "{color.neutral.white}"
6
+ },
7
+ "subtle": {
8
+ "value": "{color.neutral.100}"
9
+ },
10
+ "knockout": {
11
+ "value": "{color.neutral.black}"
12
+ },
13
+ "brand": {
14
+ "value": "{color.brand.100}"
15
+ },
16
+ "brand-hover": {
17
+ "value": "{color.brand.200}"
18
+ },
19
+ "utility": {
20
+ "error": {
21
+ "value": "{color.utility.red.100}"
22
+ },
23
+ "warning": {
24
+ "value": "{color.utility.yellow.100}"
25
+ },
26
+ "success": {
27
+ "value": "{color.utility.green.100}"
28
+ },
29
+ "info": {
30
+ "value": "{color.utility.blue.100}"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+