@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,86 +0,0 @@
1
- {
2
- "font-family": {
3
- "main": {
4
- "type": "fontFamilies",
5
- "value": "Inter"
6
- }
7
- },
8
- "line-height": {
9
- "300": {
10
- "type": "lineHeights",
11
- "value": "130%"
12
- },
13
- "500": {
14
- "type": "lineHeights",
15
- "value": "150%"
16
- },
17
- "600": {
18
- "type": "lineHeights",
19
- "value": "160%"
20
- },
21
- "700": {
22
- "type": "lineHeights",
23
- "value": "170%"
24
- }
25
- },
26
- "font-weight": {
27
- "medium": {
28
- "type": "fontWeights",
29
- "value": "500"
30
- },
31
- "semibold": {
32
- "type": "fontWeights",
33
- "value": "600"
34
- },
35
- "regular": {
36
- "type": "fontWeights",
37
- "value": "400"
38
- }
39
- },
40
- "font-size": {
41
- "f-3": {
42
- "type": "fontSizes",
43
- "value": "12"
44
- },
45
- "f-2": {
46
- "type": "fontSizes",
47
- "value": "13"
48
- },
49
- "f-1": {
50
- "type": "fontSizes",
51
- "value": "14"
52
- },
53
- "f0": {
54
- "type": "fontSizes",
55
- "value": "16"
56
- },
57
- "f1": {
58
- "type": "fontSizes",
59
- "value": "18"
60
- },
61
- "f2": {
62
- "type": "fontSizes",
63
- "value": "21"
64
- },
65
- "f3": {
66
- "type": "fontSizes",
67
- "value": "24"
68
- },
69
- "f4": {
70
- "type": "fontSizes",
71
- "value": "30"
72
- },
73
- "f5": {
74
- "type": "fontSizes",
75
- "value": "36"
76
- },
77
- "f6": {
78
- "type": "fontSizes",
79
- "value": "48"
80
- },
81
- "f7": {
82
- "type": "fontSizes",
83
- "value": "60"
84
- }
85
- }
86
- }
@@ -1,314 +0,0 @@
1
- {
2
- "<theme>": {
3
- "accent": {
4
- "1": {
5
- "value": "#000409",
6
- "type": "color"
7
- },
8
- "2": {
9
- "value": "#001427",
10
- "type": "color"
11
- },
12
- "3": {
13
- "value": "#002445",
14
- "type": "color"
15
- },
16
- "4": {
17
- "value": "#00315c",
18
- "type": "color"
19
- },
20
- "5": {
21
- "value": "#003d75",
22
- "type": "color"
23
- },
24
- "6": {
25
- "value": "#4b90ce",
26
- "type": "color"
27
- },
28
- "7": {
29
- "value": "#7eb0dc",
30
- "type": "color"
31
- },
32
- "8": {
33
- "value": "#b0cfea",
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": "#a9cae8",
50
- "type": "color"
51
- },
52
- "13": {
53
- "value": "#e8f1f9",
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": "#020405",
68
- "type": "color"
69
- },
70
- "2": {
71
- "value": "#0e141b",
72
- "type": "color"
73
- },
74
- "3": {
75
- "value": "#192433",
76
- "type": "color"
77
- },
78
- "4": {
79
- "value": "#243142",
80
- "type": "color"
81
- },
82
- "5": {
83
- "value": "#333e4e",
84
- "type": "color"
85
- },
86
- "6": {
87
- "value": "#858c96",
88
- "type": "color"
89
- },
90
- "7": {
91
- "value": "#a6abb2",
92
- "type": "color"
93
- },
94
- "8": {
95
- "value": "#c9ccd0",
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": "#c3c6cb",
112
- "type": "color"
113
- },
114
- "13": {
115
- "value": "#eff0f1",
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": "#060303",
130
- "type": "color"
131
- },
132
- "2": {
133
- "value": "#230d0e",
134
- "type": "color"
135
- },
136
- "3": {
137
- "value": "#3c1819",
138
- "type": "color"
139
- },
140
- "4": {
141
- "value": "#522021",
142
- "type": "color"
143
- },
144
- "5": {
145
- "value": "#68292a",
146
- "type": "color"
147
- },
148
- "6": {
149
- "value": "#eb5b5f",
150
- "type": "color"
151
- },
152
- "7": {
153
- "value": "#f78d8f",
154
- "type": "color"
155
- },
156
- "8": {
157
- "value": "#fabcbd",
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": "#fab4b5",
174
- "type": "color"
175
- },
176
- "13": {
177
- "value": "#feeced",
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": "#050301",
192
- "type": "color"
193
- },
194
- "2": {
195
- "value": "#191303",
196
- "type": "color"
197
- },
198
- "3": {
199
- "value": "#2d2206",
200
- "type": "color"
201
- },
202
- "4": {
203
- "value": "#3d2e09",
204
- "type": "color"
205
- },
206
- "5": {
207
- "value": "#4f3b0b",
208
- "type": "color"
209
- },
210
- "6": {
211
- "value": "#b28419",
212
- "type": "color"
213
- },
214
- "7": {
215
- "value": "#daa21f",
216
- "type": "color"
217
- },
218
- "8": {
219
- "value": "#eec76c",
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": "#ecc059",
236
- "type": "color"
237
- },
238
- "13": {
239
- "value": "#faefd6",
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": "#010407",
254
- "type": "color"
255
- },
256
- "2": {
257
- "value": "#041421",
258
- "type": "color"
259
- },
260
- "3": {
261
- "value": "#07253c",
262
- "type": "color"
263
- },
264
- "4": {
265
- "value": "#0a3251",
266
- "type": "color"
267
- },
268
- "5": {
269
- "value": "#0d4068",
270
- "type": "color"
271
- },
272
- "6": {
273
- "value": "#1c90e8",
274
- "type": "color"
275
- },
276
- "7": {
277
- "value": "#57b2f8",
278
- "type": "color"
279
- },
280
- "8": {
281
- "value": "#9cd2fb",
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": "#90ccfa",
298
- "type": "color"
299
- },
300
- "13": {
301
- "value": "#e3f2fe",
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
- }