@digdir/designsystemet 0.1.0-next.21 → 0.1.0-next.23

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 (96) hide show
  1. package/dist/bin/designsystemet.js +2 -2
  2. package/dist/src/colors/colorUtils.js +10 -10
  3. package/dist/src/init/createTokensPackage.js +27 -4
  4. package/dist/src/init/generateMetadataJson.js +6 -4
  5. package/dist/src/init/generateThemesJson.js +56 -5
  6. package/dist/src/init/nextStepsMarkdown.js +2 -2
  7. package/dist/src/init/template/default-files/design-tokens/primitives/globals.json +32 -68
  8. package/dist/src/init/template/default-files/design-tokens/primitives/size/default.json +175 -0
  9. package/dist/src/init/template/default-files/design-tokens/semantic/color.json +280 -270
  10. package/dist/src/init/template/default-files/design-tokens/semantic/style.json +307 -286
  11. package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/contrast/theme-template.json +314 -0
  12. package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/dark/global.json +376 -0
  13. package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/dark/theme-template.json +314 -0
  14. package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/light/global.json +376 -0
  15. package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/light/theme-template.json +314 -0
  16. package/dist/src/init/template/template-files/design-tokens/primitives/modes/typography/primary/theme-template.json +30 -0
  17. package/dist/src/init/template/template-files/design-tokens/primitives/modes/typography/secondary/theme-template.json +30 -0
  18. package/dist/src/init/template/template-files/design-tokens/themes/theme-template.json +170 -150
  19. package/dist/src/init/template/template-files/package.json +1 -1
  20. package/dist/src/migrations/codemods/css/plugins.js +14 -15
  21. package/dist/src/migrations/codemods/jsx/classname-prefix.js +8 -7
  22. package/dist/src/tokens/actions.js +1 -1
  23. package/dist/src/tokens/build.js +26 -15
  24. package/dist/src/tokens/configs.js +20 -16
  25. package/dist/src/tokens/formats/css.js +42 -31
  26. package/dist/src/tokens/formats/js-tokens.js +8 -4
  27. package/dist/src/tokens/transformers.js +7 -3
  28. package/dist/src/tokens/utils/entryfile.js +31 -0
  29. package/dist/src/tokens/utils/permutateThemes.js +2 -2
  30. package/dist/src/tokens/utils/utils.js +11 -0
  31. package/dist/types/bin/designsystemet.d.ts +3 -0
  32. package/dist/types/bin/designsystemet.d.ts.map +1 -0
  33. package/dist/types/src/colors/colorUtils.d.ts +126 -0
  34. package/dist/types/src/colors/colorUtils.d.ts.map +1 -0
  35. package/dist/types/src/colors/index.d.ts +4 -0
  36. package/dist/types/src/colors/index.d.ts.map +1 -0
  37. package/dist/types/src/colors/themeUtils.d.ts +102 -0
  38. package/dist/types/src/colors/themeUtils.d.ts.map +1 -0
  39. package/dist/types/src/colors/types.d.ts +16 -0
  40. package/dist/types/src/colors/types.d.ts.map +1 -0
  41. package/dist/types/src/init/createTokensPackage.d.ts +5 -0
  42. package/dist/types/src/init/createTokensPackage.d.ts.map +1 -0
  43. package/dist/types/src/init/generateMetadataJson.d.ts +6 -0
  44. package/dist/types/src/init/generateMetadataJson.d.ts.map +1 -0
  45. package/dist/types/src/init/generateThemesJson.d.ts +3 -0
  46. package/dist/types/src/init/generateThemesJson.d.ts.map +1 -0
  47. package/dist/types/src/init/index.d.ts +3 -0
  48. package/dist/types/src/init/index.d.ts.map +1 -0
  49. package/dist/types/src/init/nextStepsMarkdown.d.ts +3 -0
  50. package/dist/types/src/init/nextStepsMarkdown.d.ts.map +1 -0
  51. package/dist/types/src/init/template/prettier.config.d.mts +9 -0
  52. package/dist/types/src/init/template/prettier.config.d.mts.map +1 -0
  53. package/dist/types/src/init/utils.d.ts +4 -0
  54. package/dist/types/src/init/utils.d.ts.map +1 -0
  55. package/dist/types/src/migrations/beta-to-v1.d.ts +3 -0
  56. package/dist/types/src/migrations/beta-to-v1.d.ts.map +1 -0
  57. package/dist/types/src/migrations/codemods/css/plugins.d.ts +6 -0
  58. package/dist/types/src/migrations/codemods/css/plugins.d.ts.map +1 -0
  59. package/dist/types/src/migrations/codemods/css/run.d.ts +8 -0
  60. package/dist/types/src/migrations/codemods/css/run.d.ts.map +1 -0
  61. package/dist/types/src/migrations/codemods/jsx/classname-prefix.d.ts +10 -0
  62. package/dist/types/src/migrations/codemods/jsx/classname-prefix.d.ts.map +1 -0
  63. package/dist/types/src/migrations/codemods/jsx/run.d.ts +7 -0
  64. package/dist/types/src/migrations/codemods/jsx/run.d.ts.map +1 -0
  65. package/dist/types/src/migrations/index.d.ts +6 -0
  66. package/dist/types/src/migrations/index.d.ts.map +1 -0
  67. package/dist/types/src/migrations/react-beta-to-v1.d.ts +3 -0
  68. package/dist/types/src/migrations/react-beta-to-v1.d.ts.map +1 -0
  69. package/dist/types/src/tokens/actions.d.ts +6 -0
  70. package/dist/types/src/tokens/actions.d.ts.map +1 -0
  71. package/dist/types/src/tokens/build.d.ts +11 -0
  72. package/dist/types/src/tokens/build.d.ts.map +1 -0
  73. package/dist/types/src/tokens/configs.d.ts +31 -0
  74. package/dist/types/src/tokens/configs.d.ts.map +1 -0
  75. package/dist/types/src/tokens/formats/css.d.ts +5 -0
  76. package/dist/types/src/tokens/formats/css.d.ts.map +1 -0
  77. package/dist/types/src/tokens/formats/js-tokens.d.ts +6 -0
  78. package/dist/types/src/tokens/formats/js-tokens.d.ts.map +1 -0
  79. package/dist/types/src/tokens/transformers.d.ts +5 -0
  80. package/dist/types/src/tokens/transformers.d.ts.map +1 -0
  81. package/dist/types/src/tokens/utils/entryfile.d.ts +11 -0
  82. package/dist/types/src/tokens/utils/entryfile.d.ts.map +1 -0
  83. package/dist/types/src/tokens/utils/noCase.d.ts +11 -0
  84. package/dist/types/src/tokens/utils/noCase.d.ts.map +1 -0
  85. package/dist/types/src/tokens/utils/permutateThemes.d.ts +17 -0
  86. package/dist/types/src/tokens/utils/permutateThemes.d.ts.map +1 -0
  87. package/dist/types/src/tokens/utils/utils.d.ts +25 -0
  88. package/dist/types/src/tokens/utils/utils.d.ts.map +1 -0
  89. package/package.json +24 -22
  90. package/dist/src/init/template/default-files/design-tokens/primitives/typography/default.json +0 -86
  91. package/dist/src/init/template/template-files/design-tokens/primitives/colors/contrast/theme-template.json +0 -314
  92. package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/global.json +0 -376
  93. package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/theme-template.json +0 -314
  94. package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/global.json +0 -376
  95. package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/theme-template.json +0 -314
  96. /package/dist/src/init/template/template-files/design-tokens/primitives/{colors → modes/colors}/contrast/global.json +0 -0
@@ -0,0 +1,314 @@
1
+ {
2
+ "<theme>": {
3
+ "accent": {
4
+ "1": {
5
+ "$type": "color",
6
+ "$value": "#fefeff"
7
+ },
8
+ "2": {
9
+ "$type": "color",
10
+ "$value": "#eef4fa"
11
+ },
12
+ "3": {
13
+ "$type": "color",
14
+ "$value": "#d1e3f3"
15
+ },
16
+ "4": {
17
+ "$type": "color",
18
+ "$value": "#bad5ec"
19
+ },
20
+ "5": {
21
+ "$type": "color",
22
+ "$value": "#a1c5e5"
23
+ },
24
+ "6": {
25
+ "$type": "color",
26
+ "$value": "#97bfe3"
27
+ },
28
+ "7": {
29
+ "$type": "color",
30
+ "$value": "#3885c9"
31
+ },
32
+ "8": {
33
+ "$type": "color",
34
+ "$value": "#014e93"
35
+ },
36
+ "9": {
37
+ "$type": "color",
38
+ "$value": "#0163ba"
39
+ },
40
+ "10": {
41
+ "$type": "color",
42
+ "$value": "#015097"
43
+ },
44
+ "11": {
45
+ "$type": "color",
46
+ "$value": "#013f75"
47
+ },
48
+ "12": {
49
+ "$type": "color",
50
+ "$value": "#0163ba"
51
+ },
52
+ "13": {
53
+ "$type": "color",
54
+ "$value": "#002d54"
55
+ },
56
+ "contrast-1": {
57
+ "$type": "color",
58
+ "$value": "#ffffff"
59
+ },
60
+ "contrast-2": {
61
+ "$type": "color",
62
+ "$value": "#dbe9f5"
63
+ }
64
+ },
65
+ "neutral": {
66
+ "1": {
67
+ "$type": "color",
68
+ "$value": "#fefefe"
69
+ },
70
+ "2": {
71
+ "$type": "color",
72
+ "$value": "#f3f4f5"
73
+ },
74
+ "3": {
75
+ "$type": "color",
76
+ "$value": "#e1e3e5"
77
+ },
78
+ "4": {
79
+ "$type": "color",
80
+ "$value": "#ced1d4"
81
+ },
82
+ "5": {
83
+ "$type": "color",
84
+ "$value": "#bdc1c6"
85
+ },
86
+ "6": {
87
+ "$type": "color",
88
+ "$value": "#b8bcc1"
89
+ },
90
+ "7": {
91
+ "$type": "color",
92
+ "$value": "#7a818c"
93
+ },
94
+ "8": {
95
+ "$type": "color",
96
+ "$value": "#444e5d"
97
+ },
98
+ "9": {
99
+ "$type": "color",
100
+ "$value": "#1e2b3c"
101
+ },
102
+ "10": {
103
+ "$type": "color",
104
+ "$value": "#303c4b"
105
+ },
106
+ "11": {
107
+ "$type": "color",
108
+ "$value": "#444e5d"
109
+ },
110
+ "12": {
111
+ "$type": "color",
112
+ "$value": "#5b6471"
113
+ },
114
+ "13": {
115
+ "$type": "color",
116
+ "$value": "#202c3d"
117
+ },
118
+ "contrast-1": {
119
+ "$type": "color",
120
+ "$value": "#ffffff"
121
+ },
122
+ "contrast-2": {
123
+ "$type": "color",
124
+ "$value": "#bbbfc4"
125
+ }
126
+ },
127
+ "brand1": {
128
+ "1": {
129
+ "$type": "color",
130
+ "$value": "#fffefe"
131
+ },
132
+ "2": {
133
+ "$type": "color",
134
+ "$value": "#fef0f1"
135
+ },
136
+ "3": {
137
+ "$type": "color",
138
+ "$value": "#fcdbdc"
139
+ },
140
+ "4": {
141
+ "$type": "color",
142
+ "$value": "#fbc4c5"
143
+ },
144
+ "5": {
145
+ "$type": "color",
146
+ "$value": "#f9acae"
147
+ },
148
+ "6": {
149
+ "$type": "color",
150
+ "$value": "#f8a5a7"
151
+ },
152
+ "7": {
153
+ "$type": "color",
154
+ "$value": "#d95558"
155
+ },
156
+ "8": {
157
+ "$type": "color",
158
+ "$value": "#833336"
159
+ },
160
+ "9": {
161
+ "$type": "color",
162
+ "$value": "#f35f63"
163
+ },
164
+ "10": {
165
+ "$type": "color",
166
+ "$value": "#d05255"
167
+ },
168
+ "11": {
169
+ "$type": "color",
170
+ "$value": "#af4547"
171
+ },
172
+ "12": {
173
+ "$type": "color",
174
+ "$value": "#a74144"
175
+ },
176
+ "13": {
177
+ "$type": "color",
178
+ "$value": "#4b1e1f"
179
+ },
180
+ "contrast-1": {
181
+ "$type": "color",
182
+ "$value": "#000000"
183
+ },
184
+ "contrast-2": {
185
+ "$type": "color",
186
+ "$value": "#000000"
187
+ }
188
+ },
189
+ "brand2": {
190
+ "1": {
191
+ "$type": "color",
192
+ "$value": "#fffefc"
193
+ },
194
+ "2": {
195
+ "$type": "color",
196
+ "$value": "#fbf3e0"
197
+ },
198
+ "3": {
199
+ "$type": "color",
200
+ "$value": "#f5dfad"
201
+ },
202
+ "4": {
203
+ "$type": "color",
204
+ "$value": "#f0ce7f"
205
+ },
206
+ "5": {
207
+ "$type": "color",
208
+ "$value": "#e9ba4c"
209
+ },
210
+ "6": {
211
+ "$type": "color",
212
+ "$value": "#e7b43d"
213
+ },
214
+ "7": {
215
+ "$type": "color",
216
+ "$value": "#a57a17"
217
+ },
218
+ "8": {
219
+ "$type": "color",
220
+ "$value": "#63490e"
221
+ },
222
+ "9": {
223
+ "$type": "color",
224
+ "$value": "#e4a920"
225
+ },
226
+ "10": {
227
+ "$type": "color",
228
+ "$value": "#c9951c"
229
+ },
230
+ "11": {
231
+ "$type": "color",
232
+ "$value": "#af8119"
233
+ },
234
+ "12": {
235
+ "$type": "color",
236
+ "$value": "#7e5d12"
237
+ },
238
+ "13": {
239
+ "$type": "color",
240
+ "$value": "#382a08"
241
+ },
242
+ "contrast-1": {
243
+ "$type": "color",
244
+ "$value": "#000000"
245
+ },
246
+ "contrast-2": {
247
+ "$type": "color",
248
+ "$value": "#2b2006"
249
+ }
250
+ },
251
+ "brand3": {
252
+ "1": {
253
+ "$type": "color",
254
+ "$value": "#fdfeff"
255
+ },
256
+ "2": {
257
+ "$type": "color",
258
+ "$value": "#eaf6fe"
259
+ },
260
+ "3": {
261
+ "$type": "color",
262
+ "$value": "#c8e6fd"
263
+ },
264
+ "4": {
265
+ "$type": "color",
266
+ "$value": "#a9d7fb"
267
+ },
268
+ "5": {
269
+ "$type": "color",
270
+ "$value": "#84c7fa"
271
+ },
272
+ "6": {
273
+ "$type": "color",
274
+ "$value": "#7ac2f9"
275
+ },
276
+ "7": {
277
+ "$type": "color",
278
+ "$value": "#1a85d6"
279
+ },
280
+ "8": {
281
+ "$type": "color",
282
+ "$value": "#105082"
283
+ },
284
+ "9": {
285
+ "$type": "color",
286
+ "$value": "#1e98f5"
287
+ },
288
+ "10": {
289
+ "$type": "color",
290
+ "$value": "#1a83d3"
291
+ },
292
+ "11": {
293
+ "$type": "color",
294
+ "$value": "#166eb2"
295
+ },
296
+ "12": {
297
+ "$type": "color",
298
+ "$value": "#1466a5"
299
+ },
300
+ "13": {
301
+ "$type": "color",
302
+ "$value": "#092e4b"
303
+ },
304
+ "contrast-1": {
305
+ "$type": "color",
306
+ "$value": "#000000"
307
+ },
308
+ "contrast-2": {
309
+ "$type": "color",
310
+ "$value": "#010407"
311
+ }
312
+ }
313
+ }
314
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "<theme>": {
3
+ "main": {
4
+ "$type": "fontFamilies",
5
+ "$value": "Inter"
6
+ },
7
+ "bold": {
8
+ "$extensions": {
9
+ "studio.tokens": {
10
+ "modify": {}
11
+ }
12
+ },
13
+ "$type": "fontWeights",
14
+ "$value": "Medium"
15
+ },
16
+ "extra-bold": {
17
+ "$extensions": {
18
+ "studio.tokens": {
19
+ "modify": {}
20
+ }
21
+ },
22
+ "$type": "fontWeights",
23
+ "$value": "Semi bold"
24
+ },
25
+ "regular": {
26
+ "$type": "fontWeights",
27
+ "$value": "Regular"
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "<theme>": {
3
+ "main": {
4
+ "$type": "fontFamilies",
5
+ "$value": "IBM Plex Mono"
6
+ },
7
+ "bold": {
8
+ "$extensions": {
9
+ "studio.tokens": {
10
+ "modify": {}
11
+ }
12
+ },
13
+ "$type": "fontWeights",
14
+ "$value": "Medium"
15
+ },
16
+ "extra-bold": {
17
+ "$extensions": {
18
+ "studio.tokens": {
19
+ "modify": {}
20
+ }
21
+ },
22
+ "$type": "fontWeights",
23
+ "$value": "SemiBold"
24
+ },
25
+ "regular": {
26
+ "$type": "fontWeights",
27
+ "$value": "Regular"
28
+ }
29
+ }
30
+ }