@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": "#031d30",
6
- "type": "color"
7
- },
8
- "2": {
9
- "value": "#032540",
10
- "type": "color"
11
- },
12
- "3": {
13
- "value": "#043256",
14
- "type": "color"
15
- },
16
- "4": {
17
- "value": "#063f6c",
18
- "type": "color"
19
- },
20
- "5": {
21
- "value": "#074d84",
22
- "type": "color"
23
- },
24
- "6": {
25
- "value": "#075490",
26
- "type": "color"
27
- },
28
- "7": {
29
- "value": "#0c72c1",
30
- "type": "color"
31
- },
32
- "8": {
33
- "value": "#98c3e5",
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": "#62a4d7",
50
- "type": "color"
51
- },
52
- "13": {
53
- "value": "#cde2f2",
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": "#022106",
68
- "type": "color"
69
- },
70
- "2": {
71
- "value": "#022b08",
72
- "type": "color"
73
- },
74
- "3": {
75
- "value": "#03380a",
76
- "type": "color"
77
- },
78
- "4": {
79
- "value": "#04480d",
80
- "type": "color"
81
- },
82
- "5": {
83
- "value": "#045810",
84
- "type": "color"
85
- },
86
- "6": {
87
- "value": "#056011",
88
- "type": "color"
89
- },
90
- "7": {
91
- "value": "#068117",
92
- "type": "color"
93
- },
94
- "8": {
95
- "value": "#90cc98",
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": "#54b061",
112
- "type": "color"
113
- },
114
- "13": {
115
- "value": "#cbe7cf",
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": "#2e1508",
130
- "type": "color"
131
- },
132
- "2": {
133
- "value": "#3a1b0a",
134
- "type": "color"
135
- },
136
- "3": {
137
- "value": "#50240d",
138
- "type": "color"
139
- },
140
- "4": {
141
- "value": "#652e10",
142
- "type": "color"
143
- },
144
- "5": {
145
- "value": "#7a3814",
146
- "type": "color"
147
- },
148
- "6": {
149
- "value": "#863d16",
150
- "type": "color"
151
- },
152
- "7": {
153
- "value": "#b5531e",
154
- "type": "color"
155
- },
156
- "8": {
157
- "value": "#e6b398",
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": "#d98a5f",
174
- "type": "color"
175
- },
176
- "13": {
177
- "value": "#f3dbcd",
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": "#251238",
192
- "type": "color"
193
- },
194
- "2": {
195
- "value": "#301748",
196
- "type": "color"
197
- },
198
- "3": {
199
- "value": "#402060",
200
- "type": "color"
201
- },
202
- "4": {
203
- "value": "#52287a",
204
- "type": "color"
205
- },
206
- "5": {
207
- "value": "#643196",
208
- "type": "color"
209
- },
210
- "6": {
211
- "value": "#6b399d",
212
- "type": "color"
213
- },
214
- "7": {
215
- "value": "#865daf",
216
- "type": "color"
217
- },
218
- "8": {
219
- "value": "#c9b7db",
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": "#ae93c9",
236
- "type": "color"
237
- },
238
- "13": {
239
- "value": "#e4dbed",
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": "#3b0808",
254
- "type": "color"
255
- },
256
- "2": {
257
- "value": "#4b0a0a",
258
- "type": "color"
259
- },
260
- "3": {
261
- "value": "#620e0e",
262
- "type": "color"
263
- },
264
- "4": {
265
- "value": "#7c1212",
266
- "type": "color"
267
- },
268
- "5": {
269
- "value": "#961515",
270
- "type": "color"
271
- },
272
- "6": {
273
- "value": "#a31717",
274
- "type": "color"
275
- },
276
- "7": {
277
- "value": "#c93c3c",
278
- "type": "color"
279
- },
280
- "8": {
281
- "value": "#e9b0b0",
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": "#dd8585",
298
- "type": "color"
299
- },
300
- "13": {
301
- "value": "#f5d9d9",
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": "#221b06",
316
- "type": "color"
317
- },
318
- "2": {
319
- "value": "#2b2307",
320
- "type": "color"
321
- },
322
- "3": {
323
- "value": "#3a300a",
324
- "type": "color"
325
- },
326
- "4": {
327
- "value": "#4a3d0d",
328
- "type": "color"
329
- },
330
- "5": {
331
- "value": "#5a4a0f",
332
- "type": "color"
333
- },
334
- "6": {
335
- "value": "#635011",
336
- "type": "color"
337
- },
338
- "7": {
339
- "value": "#856d17",
340
- "type": "color"
341
- },
342
- "8": {
343
- "value": "#e4ba27",
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": "#bd9a20",
360
- "type": "color"
361
- },
362
- "13": {
363
- "value": "#f4de8f",
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": "#001c36",
6
- "type": "color"
7
- },
8
- "2": {
9
- "value": "#002445",
10
- "type": "color"
11
- },
12
- "3": {
13
- "value": "#00315c",
14
- "type": "color"
15
- },
16
- "4": {
17
- "value": "#003d75",
18
- "type": "color"
19
- },
20
- "5": {
21
- "value": "#004b8f",
22
- "type": "color"
23
- },
24
- "6": {
25
- "value": "#00529d",
26
- "type": "color"
27
- },
28
- "7": {
29
- "value": "#1972c1",
30
- "type": "color"
31
- },
32
- "8": {
33
- "value": "#9cc2e4",
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": "#69a2d6",
50
- "type": "color"
51
- },
52
- "13": {
53
- "value": "#cee1f2",
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": "#131c27",
68
- "type": "color"
69
- },
70
- "2": {
71
- "value": "#192433",
72
- "type": "color"
73
- },
74
- "3": {
75
- "value": "#243142",
76
- "type": "color"
77
- },
78
- "4": {
79
- "value": "#333e4e",
80
- "type": "color"
81
- },
82
- "5": {
83
- "value": "#424d5b",
84
- "type": "color"
85
- },
86
- "6": {
87
- "value": "#495361",
88
- "type": "color"
89
- },
90
- "7": {
91
- "value": "#67707c",
92
- "type": "color"
93
- },
94
- "8": {
95
- "value": "#bbbfc4",
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": "#989ea5",
112
- "type": "color"
113
- },
114
- "13": {
115
- "value": "#dddfe1",
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": "#2f1213",
130
- "type": "color"
131
- },
132
- "2": {
133
- "value": "#3c1819",
134
- "type": "color"
135
- },
136
- "3": {
137
- "value": "#522021",
138
- "type": "color"
139
- },
140
- "4": {
141
- "value": "#68292a",
142
- "type": "color"
143
- },
144
- "5": {
145
- "value": "#7f3234",
146
- "type": "color"
147
- },
148
- "6": {
149
- "value": "#8b3639",
150
- "type": "color"
151
- },
152
- "7": {
153
- "value": "#bc494c",
154
- "type": "color"
155
- },
156
- "8": {
157
- "value": "#f9a9ab",
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": "#f67679",
174
- "type": "color"
175
- },
176
- "13": {
177
- "value": "#fcd5d6",
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": "#231a05",
192
- "type": "color"
193
- },
194
- "2": {
195
- "value": "#2d2206",
196
- "type": "color"
197
- },
198
- "3": {
199
- "value": "#3d2e09",
200
- "type": "color"
201
- },
202
- "4": {
203
- "value": "#4f3b0b",
204
- "type": "color"
205
- },
206
- "5": {
207
- "value": "#60470d",
208
- "type": "color"
209
- },
210
- "6": {
211
- "value": "#684e0f",
212
- "type": "color"
213
- },
214
- "7": {
215
- "value": "#8e6914",
216
- "type": "color"
217
- },
218
- "8": {
219
- "value": "#e9b742",
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": "#c9951c",
236
- "type": "color"
237
- },
238
- "13": {
239
- "value": "#f5dda7",
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": "#061d30",
254
- "type": "color"
255
- },
256
- "2": {
257
- "value": "#07253c",
258
- "type": "color"
259
- },
260
- "3": {
261
- "value": "#0a3251",
262
- "type": "color"
263
- },
264
- "4": {
265
- "value": "#0d4068",
266
- "type": "color"
267
- },
268
- "5": {
269
- "value": "#0f4e7f",
270
- "type": "color"
271
- },
272
- "6": {
273
- "value": "#11558a",
274
- "type": "color"
275
- },
276
- "7": {
277
- "value": "#1773b9",
278
- "type": "color"
279
- },
280
- "8": {
281
- "value": "#81c5f9",
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": "#38a4f6",
298
- "type": "color"
299
- },
300
- "13": {
301
- "value": "#c4e4fc",
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
- }