@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
@@ -1,376 +0,0 @@
1
- {
2
- "global": {
3
- "blue": {
4
- "1": {
5
- "value": "#fefeff",
6
- "type": "color"
7
- },
8
- "2": {
9
- "value": "#edf5fa",
10
- "type": "color"
11
- },
12
- "3": {
13
- "value": "#d3e5f4",
14
- "type": "color"
15
- },
16
- "4": {
17
- "value": "#b7d5ed",
18
- "type": "color"
19
- },
20
- "5": {
21
- "value": "#9bc5e5",
22
- "type": "color"
23
- },
24
- "6": {
25
- "value": "#94c1e3",
26
- "type": "color"
27
- },
28
- "7": {
29
- "value": "#2f86c9",
30
- "type": "color"
31
- },
32
- "8": {
33
- "value": "#075089",
34
- "type": "color"
35
- },
36
- "9": {
37
- "value": "#0c72c1",
38
- "type": "color"
39
- },
40
- "10": {
41
- "value": "#085ea0",
42
- "type": "color"
43
- },
44
- "11": {
45
- "value": "#074b80",
46
- "type": "color"
47
- },
48
- "12": {
49
- "value": "#0966ac",
50
- "type": "color"
51
- },
52
- "13": {
53
- "value": "#043256",
54
- "type": "color"
55
- },
56
- "contrast-1": {
57
- "value": "#fefeff",
58
- "type": "color"
59
- },
60
- "contrast-2": {
61
- "value": "#f3f8fc",
62
- "type": "color"
63
- }
64
- },
65
- "green": {
66
- "1": {
67
- "value": "#fcfefc",
68
- "type": "color"
69
- },
70
- "2": {
71
- "value": "#ecf6ed",
72
- "type": "color"
73
- },
74
- "3": {
75
- "value": "#cfe9d3",
76
- "type": "color"
77
- },
78
- "4": {
79
- "value": "#b3dcb8",
80
- "type": "color"
81
- },
82
- "5": {
83
- "value": "#95ce9d",
84
- "type": "color"
85
- },
86
- "6": {
87
- "value": "#8bca94",
88
- "type": "color"
89
- },
90
- "7": {
91
- "value": "#189528",
92
- "type": "color"
93
- },
94
- "8": {
95
- "value": "#045a10",
96
- "type": "color"
97
- },
98
- "9": {
99
- "value": "#078d19",
100
- "type": "color"
101
- },
102
- "10": {
103
- "value": "#067615",
104
- "type": "color"
105
- },
106
- "11": {
107
- "value": "#056011",
108
- "type": "color"
109
- },
110
- "12": {
111
- "value": "#067314",
112
- "type": "color"
113
- },
114
- "13": {
115
- "value": "#03380a",
116
- "type": "color"
117
- },
118
- "contrast-1": {
119
- "value": "#000000",
120
- "type": "color"
121
- },
122
- "contrast-2": {
123
- "value": "#000401",
124
- "type": "color"
125
- }
126
- },
127
- "orange": {
128
- "1": {
129
- "value": "#fffefd",
130
- "type": "color"
131
- },
132
- "2": {
133
- "value": "#fbf1ec",
134
- "type": "color"
135
- },
136
- "3": {
137
- "value": "#f4ddd0",
138
- "type": "color"
139
- },
140
- "4": {
141
- "value": "#eecab7",
142
- "type": "color"
143
- },
144
- "5": {
145
- "value": "#e7b69c",
146
- "type": "color"
147
- },
148
- "6": {
149
- "value": "#e5b094",
150
- "type": "color"
151
- },
152
- "7": {
153
- "value": "#cc632b",
154
- "type": "color"
155
- },
156
- "8": {
157
- "value": "#7e3a15",
158
- "type": "color"
159
- },
160
- "9": {
161
- "value": "#c95c21",
162
- "type": "color"
163
- },
164
- "10": {
165
- "value": "#a94d1c",
166
- "type": "color"
167
- },
168
- "11": {
169
- "value": "#8a3f17",
170
- "type": "color"
171
- },
172
- "12": {
173
- "value": "#a1491a",
174
- "type": "color"
175
- },
176
- "13": {
177
- "value": "#50240d",
178
- "type": "color"
179
- },
180
- "contrast-1": {
181
- "value": "#000000",
182
- "type": "color"
183
- },
184
- "contrast-2": {
185
- "value": "#0d0602",
186
- "type": "color"
187
- }
188
- },
189
- "purple": {
190
- "1": {
191
- "value": "#fefefe",
192
- "type": "color"
193
- },
194
- "2": {
195
- "value": "#f5f2f9",
196
- "type": "color"
197
- },
198
- "3": {
199
- "value": "#e7dfef",
200
- "type": "color"
201
- },
202
- "4": {
203
- "value": "#d9cce6",
204
- "type": "color"
205
- },
206
- "5": {
207
- "value": "#ccbadd",
208
- "type": "color"
209
- },
210
- "6": {
211
- "value": "#c7b4da",
212
- "type": "color"
213
- },
214
- "7": {
215
- "value": "#9572b9",
216
- "type": "color"
217
- },
218
- "8": {
219
- "value": "#663399",
220
- "type": "color"
221
- },
222
- "9": {
223
- "value": "#663399",
224
- "type": "color"
225
- },
226
- "10": {
227
- "value": "#4f2777",
228
- "type": "color"
229
- },
230
- "11": {
231
- "value": "#381b54",
232
- "type": "color"
233
- },
234
- "12": {
235
- "value": "#7b4ea7",
236
- "type": "color"
237
- },
238
- "13": {
239
- "value": "#402060",
240
- "type": "color"
241
- },
242
- "contrast-1": {
243
- "value": "#fefefe",
244
- "type": "color"
245
- },
246
- "contrast-2": {
247
- "value": "#eee8f3",
248
- "type": "color"
249
- }
250
- },
251
- "red": {
252
- "1": {
253
- "value": "#fffefe",
254
- "type": "color"
255
- },
256
- "2": {
257
- "value": "#fbf1f1",
258
- "type": "color"
259
- },
260
- "3": {
261
- "value": "#f5dcdc",
262
- "type": "color"
263
- },
264
- "4": {
265
- "value": "#f0c7c7",
266
- "type": "color"
267
- },
268
- "5": {
269
- "value": "#eab3b3",
270
- "type": "color"
271
- },
272
- "6": {
273
- "value": "#e8acac",
274
- "type": "color"
275
- },
276
- "7": {
277
- "value": "#d25b5b",
278
- "type": "color"
279
- },
280
- "8": {
281
- "value": "#9a1616",
282
- "type": "color"
283
- },
284
- "9": {
285
- "value": "#bf1b1b",
286
- "type": "color"
287
- },
288
- "10": {
289
- "value": "#9a1616",
290
- "type": "color"
291
- },
292
- "11": {
293
- "value": "#771111",
294
- "type": "color"
295
- },
296
- "12": {
297
- "value": "#c22020",
298
- "type": "color"
299
- },
300
- "13": {
301
- "value": "#620e0e",
302
- "type": "color"
303
- },
304
- "contrast-1": {
305
- "value": "#fffefe",
306
- "type": "color"
307
- },
308
- "contrast-2": {
309
- "value": "#f6dfdf",
310
- "type": "color"
311
- }
312
- },
313
- "yellow": {
314
- "1": {
315
- "value": "#fffefc",
316
- "type": "color"
317
- },
318
- "2": {
319
- "value": "#fbf2d3",
320
- "type": "color"
321
- },
322
- "3": {
323
- "value": "#f5e19b",
324
- "type": "color"
325
- },
326
- "4": {
327
- "value": "#efcf5d",
328
- "type": "color"
329
- },
330
- "5": {
331
- "value": "#e6bc27",
332
- "type": "color"
333
- },
334
- "6": {
335
- "value": "#e0b726",
336
- "type": "color"
337
- },
338
- "7": {
339
- "value": "#9a7e1a",
340
- "type": "color"
341
- },
342
- "8": {
343
- "value": "#5d4c10",
344
- "type": "color"
345
- },
346
- "9": {
347
- "value": "#eabf28",
348
- "type": "color"
349
- },
350
- "10": {
351
- "value": "#d0aa24",
352
- "type": "color"
353
- },
354
- "11": {
355
- "value": "#b7951f",
356
- "type": "color"
357
- },
358
- "12": {
359
- "value": "#776114",
360
- "type": "color"
361
- },
362
- "13": {
363
- "value": "#3a300a",
364
- "type": "color"
365
- },
366
- "contrast-1": {
367
- "value": "#000000",
368
- "type": "color"
369
- },
370
- "contrast-2": {
371
- "value": "#382d0a",
372
- "type": "color"
373
- }
374
- }
375
- }
376
- }
@@ -1,314 +0,0 @@
1
- {
2
- "<theme>": {
3
- "accent": {
4
- "1": {
5
- "value": "#fefeff",
6
- "type": "color"
7
- },
8
- "2": {
9
- "value": "#eef4fa",
10
- "type": "color"
11
- },
12
- "3": {
13
- "value": "#d4e5f3",
14
- "type": "color"
15
- },
16
- "4": {
17
- "value": "#bad5ec",
18
- "type": "color"
19
- },
20
- "5": {
21
- "value": "#a1c5e5",
22
- "type": "color"
23
- },
24
- "6": {
25
- "value": "#97bfe3",
26
- "type": "color"
27
- },
28
- "7": {
29
- "value": "#3a85ca",
30
- "type": "color"
31
- },
32
- "8": {
33
- "value": "#004d93",
34
- "type": "color"
35
- },
36
- "9": {
37
- "value": "#0062BA",
38
- "type": "color"
39
- },
40
- "10": {
41
- "value": "#005099",
42
- "type": "color"
43
- },
44
- "11": {
45
- "value": "#003d75",
46
- "type": "color"
47
- },
48
- "12": {
49
- "value": "#0163ba",
50
- "type": "color"
51
- },
52
- "13": {
53
- "value": "#00315c",
54
- "type": "color"
55
- },
56
- "contrast-1": {
57
- "value": "#fefeff",
58
- "type": "color"
59
- },
60
- "contrast-2": {
61
- "value": "#ddeaf6",
62
- "type": "color"
63
- }
64
- },
65
- "neutral": {
66
- "1": {
67
- "value": "#fefefe",
68
- "type": "color"
69
- },
70
- "2": {
71
- "value": "#f3f4f5",
72
- "type": "color"
73
- },
74
- "3": {
75
- "value": "#e1e3e5",
76
- "type": "color"
77
- },
78
- "4": {
79
- "value": "#ced1d4",
80
- "type": "color"
81
- },
82
- "5": {
83
- "value": "#bdc1c6",
84
- "type": "color"
85
- },
86
- "6": {
87
- "value": "#b8bcc1",
88
- "type": "color"
89
- },
90
- "7": {
91
- "value": "#7a818c",
92
- "type": "color"
93
- },
94
- "8": {
95
- "value": "#444e5d",
96
- "type": "color"
97
- },
98
- "9": {
99
- "value": "#1E2B3C",
100
- "type": "color"
101
- },
102
- "10": {
103
- "value": "#303c4b",
104
- "type": "color"
105
- },
106
- "11": {
107
- "value": "#444e5d",
108
- "type": "color"
109
- },
110
- "12": {
111
- "value": "#5b6471",
112
- "type": "color"
113
- },
114
- "13": {
115
- "value": "#243142",
116
- "type": "color"
117
- },
118
- "contrast-1": {
119
- "value": "#fefefe",
120
- "type": "color"
121
- },
122
- "contrast-2": {
123
- "value": "#bbbfc4",
124
- "type": "color"
125
- }
126
- },
127
- "brand1": {
128
- "1": {
129
- "value": "#fffefe",
130
- "type": "color"
131
- },
132
- "2": {
133
- "value": "#fef0f1",
134
- "type": "color"
135
- },
136
- "3": {
137
- "value": "#fcdadb",
138
- "type": "color"
139
- },
140
- "4": {
141
- "value": "#fbc4c5",
142
- "type": "color"
143
- },
144
- "5": {
145
- "value": "#f9adaf",
146
- "type": "color"
147
- },
148
- "6": {
149
- "value": "#f9a5a7",
150
- "type": "color"
151
- },
152
- "7": {
153
- "value": "#d95558",
154
- "type": "color"
155
- },
156
- "8": {
157
- "value": "#843336",
158
- "type": "color"
159
- },
160
- "9": {
161
- "value": "#F45F63",
162
- "type": "color"
163
- },
164
- "10": {
165
- "value": "#d15155",
166
- "type": "color"
167
- },
168
- "11": {
169
- "value": "#b04447",
170
- "type": "color"
171
- },
172
- "12": {
173
- "value": "#a84144",
174
- "type": "color"
175
- },
176
- "13": {
177
- "value": "#522021",
178
- "type": "color"
179
- },
180
- "contrast-1": {
181
- "value": "#000000",
182
- "type": "color"
183
- },
184
- "contrast-2": {
185
- "value": "#000000",
186
- "type": "color"
187
- }
188
- },
189
- "brand2": {
190
- "1": {
191
- "value": "#fffefc",
192
- "type": "color"
193
- },
194
- "2": {
195
- "value": "#fbf3e0",
196
- "type": "color"
197
- },
198
- "3": {
199
- "value": "#f5dfac",
200
- "type": "color"
201
- },
202
- "4": {
203
- "value": "#f0ce7e",
204
- "type": "color"
205
- },
206
- "5": {
207
- "value": "#eaba4a",
208
- "type": "color"
209
- },
210
- "6": {
211
- "value": "#e8b338",
212
- "type": "color"
213
- },
214
- "7": {
215
- "value": "#a57a17",
216
- "type": "color"
217
- },
218
- "8": {
219
- "value": "#634a0e",
220
- "type": "color"
221
- },
222
- "9": {
223
- "value": "#E5AA20",
224
- "type": "color"
225
- },
226
- "10": {
227
- "value": "#c9951c",
228
- "type": "color"
229
- },
230
- "11": {
231
- "value": "#ae8118",
232
- "type": "color"
233
- },
234
- "12": {
235
- "value": "#7e5d12",
236
- "type": "color"
237
- },
238
- "13": {
239
- "value": "#3d2e09",
240
- "type": "color"
241
- },
242
- "contrast-1": {
243
- "value": "#000000",
244
- "type": "color"
245
- },
246
- "contrast-2": {
247
- "value": "#2b2006",
248
- "type": "color"
249
- }
250
- },
251
- "brand3": {
252
- "1": {
253
- "value": "#fdfeff",
254
- "type": "color"
255
- },
256
- "2": {
257
- "value": "#eaf6fe",
258
- "type": "color"
259
- },
260
- "3": {
261
- "value": "#c8e6fd",
262
- "type": "color"
263
- },
264
- "4": {
265
- "value": "#a9d7fb",
266
- "type": "color"
267
- },
268
- "5": {
269
- "value": "#84c7fa",
270
- "type": "color"
271
- },
272
- "6": {
273
- "value": "#7ac2f9",
274
- "type": "color"
275
- },
276
- "7": {
277
- "value": "#1a85d6",
278
- "type": "color"
279
- },
280
- "8": {
281
- "value": "#105082",
282
- "type": "color"
283
- },
284
- "9": {
285
- "value": "#1E98F5",
286
- "type": "color"
287
- },
288
- "10": {
289
- "value": "#1a83d3",
290
- "type": "color"
291
- },
292
- "11": {
293
- "value": "#166eb2",
294
- "type": "color"
295
- },
296
- "12": {
297
- "value": "#1466a5",
298
- "type": "color"
299
- },
300
- "13": {
301
- "value": "#0a3251",
302
- "type": "color"
303
- },
304
- "contrast-1": {
305
- "value": "#000000",
306
- "type": "color"
307
- },
308
- "contrast-2": {
309
- "value": "#010407",
310
- "type": "color"
311
- }
312
- }
313
- }
314
- }