@digdir/designsystemet 1.0.0-next.47 → 1.0.0-next.49

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 (72) hide show
  1. package/dist/bin/config.d.ts +60 -60
  2. package/dist/bin/config.d.ts.map +1 -1
  3. package/dist/bin/config.js +3 -3
  4. package/dist/bin/designsystemet.js +21 -17
  5. package/dist/config.schema.json +4 -5
  6. package/dist/src/colors/colorMetadata.d.ts +4 -0
  7. package/dist/src/colors/colorMetadata.d.ts.map +1 -0
  8. package/dist/src/colors/colorMetadata.js +189 -0
  9. package/dist/src/colors/index.d.ts +1 -0
  10. package/dist/src/colors/index.d.ts.map +1 -1
  11. package/dist/src/colors/index.js +1 -0
  12. package/dist/src/colors/theme.d.ts +6 -12
  13. package/dist/src/colors/theme.d.ts.map +1 -1
  14. package/dist/src/colors/theme.js +36 -47
  15. package/dist/src/colors/types.d.ts +18 -21
  16. package/dist/src/colors/types.d.ts.map +1 -1
  17. package/dist/src/colors/utils.d.ts +10 -23
  18. package/dist/src/colors/utils.d.ts.map +1 -1
  19. package/dist/src/colors/utils.js +7 -44
  20. package/dist/src/migrations/beta-to-v1.js +1 -1
  21. package/dist/src/migrations/codemods/css/plugins.d.ts.map +1 -1
  22. package/dist/src/migrations/codemods/css/plugins.js +7 -8
  23. package/dist/src/migrations/codemods/css/run.d.ts.map +1 -1
  24. package/dist/src/migrations/codemods/css/run.js +9 -1
  25. package/dist/src/migrations/color-rename-next49.d.ts +3 -0
  26. package/dist/src/migrations/color-rename-next49.d.ts.map +1 -0
  27. package/dist/src/migrations/color-rename-next49.js +38 -0
  28. package/dist/src/migrations/index.d.ts +1 -0
  29. package/dist/src/migrations/index.d.ts.map +1 -1
  30. package/dist/src/migrations/index.js +3 -1
  31. package/dist/src/scripts/copy-internal-tokens.d.ts +2 -0
  32. package/dist/src/scripts/copy-internal-tokens.d.ts.map +1 -0
  33. package/dist/src/scripts/copy-internal-tokens.js +28 -0
  34. package/dist/src/scripts/createJsonSchema.d.ts.map +1 -0
  35. package/dist/src/tokens/build/builtin-colors.css +20 -20
  36. package/dist/src/tokens/build/configs.d.ts.map +1 -1
  37. package/dist/src/tokens/build/configs.js +5 -41
  38. package/dist/src/tokens/build/types.d.ts +1 -1
  39. package/dist/src/tokens/build/types.d.ts.map +1 -1
  40. package/dist/src/tokens/build.d.ts +2 -3
  41. package/dist/src/tokens/build.d.ts.map +1 -1
  42. package/dist/src/tokens/build.js +25 -21
  43. package/dist/src/tokens/create.d.ts.map +1 -1
  44. package/dist/src/tokens/create.js +3 -17
  45. package/dist/src/tokens/design-tokens/default/primitives/globals.json +3 -3
  46. package/dist/src/tokens/design-tokens/default/primitives/modes/typography/size/large.json +9 -13
  47. package/dist/src/tokens/design-tokens/default/primitives/modes/typography/size/medium.json +9 -13
  48. package/dist/src/tokens/design-tokens/default/primitives/modes/typography/size/small.json +9 -13
  49. package/dist/src/tokens/design-tokens/default/semantic/style.json +25 -25
  50. package/dist/src/tokens/design-tokens/template/$metadata.json +1 -2
  51. package/dist/src/tokens/design-tokens/template/$themes.json +1315 -1295
  52. package/dist/src/tokens/design-tokens/template/semantic/color-base-file.json +81 -65
  53. package/dist/src/tokens/design-tokens/template/semantic/modes/category-color/category-color-template.json +18 -14
  54. package/dist/src/tokens/design-tokens/template/semantic/semantic-color-template.json +19 -15
  55. package/dist/src/tokens/design-tokens/template/themes/theme-color-template.json +8 -4
  56. package/dist/src/tokens/template.d.ts.map +1 -1
  57. package/dist/src/tokens/template.js +6 -7
  58. package/dist/src/tokens/utils.js +1 -1
  59. package/dist/src/tokens/write/generate$metadata.d.ts.map +1 -1
  60. package/dist/src/tokens/write/generate$metadata.js +1 -2
  61. package/dist/src/tokens/write/generate$themes.js +11 -117
  62. package/dist/src/tokens/write.d.ts +0 -2
  63. package/dist/src/tokens/write.d.ts.map +1 -1
  64. package/dist/src/tokens/write.js +4 -8
  65. package/package.json +27 -31
  66. package/dist/src/build-scripts/createJsonSchema.d.ts.map +0 -1
  67. package/dist/src/colors/luminance.d.ts +0 -54
  68. package/dist/src/colors/luminance.d.ts.map +0 -1
  69. package/dist/src/colors/luminance.js +0 -56
  70. package/dist/src/tokens/design-tokens/default/Figma/components.json +0 -22
  71. /package/dist/src/{build-scripts → scripts}/createJsonSchema.d.ts +0 -0
  72. /package/dist/src/{build-scripts → scripts}/createJsonSchema.js +0 -0
@@ -5,7 +5,7 @@
5
5
  "$type": "color",
6
6
  "$value": "{global.green.1}"
7
7
  },
8
- "background-subtle": {
8
+ "background-tinted": {
9
9
  "$type": "color",
10
10
  "$value": "{global.green.2}"
11
11
  },
@@ -13,53 +13,57 @@
13
13
  "$type": "color",
14
14
  "$value": "{global.green.3}"
15
15
  },
16
- "surface-hover": {
16
+ "surface-tinted": {
17
17
  "$type": "color",
18
18
  "$value": "{global.green.4}"
19
19
  },
20
- "surface-active": {
20
+ "surface-hover": {
21
21
  "$type": "color",
22
22
  "$value": "{global.green.5}"
23
23
  },
24
- "border-subtle": {
24
+ "surface-active": {
25
25
  "$type": "color",
26
26
  "$value": "{global.green.6}"
27
27
  },
28
- "border-default": {
28
+ "border-subtle": {
29
29
  "$type": "color",
30
30
  "$value": "{global.green.7}"
31
31
  },
32
- "border-strong": {
32
+ "border-default": {
33
33
  "$type": "color",
34
34
  "$value": "{global.green.8}"
35
35
  },
36
- "base-default": {
36
+ "border-strong": {
37
37
  "$type": "color",
38
38
  "$value": "{global.green.9}"
39
39
  },
40
- "base-hover": {
40
+ "text-subtle": {
41
41
  "$type": "color",
42
42
  "$value": "{global.green.10}"
43
43
  },
44
- "base-active": {
44
+ "text-default": {
45
45
  "$type": "color",
46
46
  "$value": "{global.green.11}"
47
47
  },
48
- "text-subtle": {
48
+ "base-default": {
49
49
  "$type": "color",
50
50
  "$value": "{global.green.12}"
51
51
  },
52
- "text-default": {
52
+ "base-hover": {
53
53
  "$type": "color",
54
54
  "$value": "{global.green.13}"
55
55
  },
56
- "contrast-default": {
56
+ "base-active": {
57
57
  "$type": "color",
58
- "$value": "{global.green.contrast-1}"
58
+ "$value": "{global.green.14}"
59
59
  },
60
- "contrast-subtle": {
60
+ "base-contrast-subtle": {
61
61
  "$type": "color",
62
- "$value": "{global.green.contrast-2}"
62
+ "$value": "{global.green.15}"
63
+ },
64
+ "base-contrast-default": {
65
+ "$type": "color",
66
+ "$value": "{global.green.16}"
63
67
  }
64
68
  },
65
69
  "danger": {
@@ -67,7 +71,7 @@
67
71
  "$type": "color",
68
72
  "$value": "{global.red.1}"
69
73
  },
70
- "background-subtle": {
74
+ "background-tinted": {
71
75
  "$type": "color",
72
76
  "$value": "{global.red.2}"
73
77
  },
@@ -75,53 +79,57 @@
75
79
  "$type": "color",
76
80
  "$value": "{global.red.3}"
77
81
  },
78
- "surface-hover": {
82
+ "surface-tinted": {
79
83
  "$type": "color",
80
84
  "$value": "{global.red.4}"
81
85
  },
82
- "surface-active": {
86
+ "surface-hover": {
83
87
  "$type": "color",
84
88
  "$value": "{global.red.5}"
85
89
  },
86
- "border-subtle": {
90
+ "surface-active": {
87
91
  "$type": "color",
88
92
  "$value": "{global.red.6}"
89
93
  },
90
- "border-default": {
94
+ "border-subtle": {
91
95
  "$type": "color",
92
96
  "$value": "{global.red.7}"
93
97
  },
94
- "border-strong": {
98
+ "border-default": {
95
99
  "$type": "color",
96
100
  "$value": "{global.red.8}"
97
101
  },
98
- "base-default": {
102
+ "border-strong": {
99
103
  "$type": "color",
100
104
  "$value": "{global.red.9}"
101
105
  },
102
- "base-hover": {
106
+ "text-subtle": {
103
107
  "$type": "color",
104
108
  "$value": "{global.red.10}"
105
109
  },
106
- "base-active": {
110
+ "text-default": {
107
111
  "$type": "color",
108
112
  "$value": "{global.red.11}"
109
113
  },
110
- "text-subtle": {
114
+ "base-default": {
111
115
  "$type": "color",
112
116
  "$value": "{global.red.12}"
113
117
  },
114
- "text-default": {
118
+ "base-hover": {
115
119
  "$type": "color",
116
120
  "$value": "{global.red.13}"
117
121
  },
118
- "contrast-default": {
122
+ "base-active": {
123
+ "$type": "color",
124
+ "$value": "{global.red.14}"
125
+ },
126
+ "base-contrast-subtle": {
119
127
  "$type": "color",
120
- "$value": "{global.red.contrast-1}"
128
+ "$value": "{global.red.15}"
121
129
  },
122
- "contrast-subtle": {
130
+ "base-contrast-default": {
123
131
  "$type": "color",
124
- "$value": "{global.red.contrast-2}"
132
+ "$value": "{global.red.16}"
125
133
  }
126
134
  },
127
135
  "info": {
@@ -129,7 +137,7 @@
129
137
  "$type": "color",
130
138
  "$value": "{global.blue.1}"
131
139
  },
132
- "background-subtle": {
140
+ "background-tinted": {
133
141
  "$type": "color",
134
142
  "$value": "{global.blue.2}"
135
143
  },
@@ -137,115 +145,123 @@
137
145
  "$type": "color",
138
146
  "$value": "{global.blue.3}"
139
147
  },
140
- "surface-hover": {
148
+ "surface-tinted": {
141
149
  "$type": "color",
142
150
  "$value": "{global.blue.4}"
143
151
  },
144
- "surface-active": {
152
+ "surface-hover": {
145
153
  "$type": "color",
146
154
  "$value": "{global.blue.5}"
147
155
  },
148
- "border-subtle": {
156
+ "surface-active": {
149
157
  "$type": "color",
150
158
  "$value": "{global.blue.6}"
151
159
  },
152
- "border-default": {
160
+ "border-subtle": {
153
161
  "$type": "color",
154
162
  "$value": "{global.blue.7}"
155
163
  },
156
- "border-strong": {
164
+ "border-default": {
157
165
  "$type": "color",
158
166
  "$value": "{global.blue.8}"
159
167
  },
160
- "base-default": {
168
+ "border-strong": {
161
169
  "$type": "color",
162
170
  "$value": "{global.blue.9}"
163
171
  },
164
- "base-hover": {
172
+ "text-subtle": {
165
173
  "$type": "color",
166
174
  "$value": "{global.blue.10}"
167
175
  },
168
- "base-active": {
176
+ "text-default": {
169
177
  "$type": "color",
170
178
  "$value": "{global.blue.11}"
171
179
  },
172
- "text-subtle": {
180
+ "base-default": {
173
181
  "$type": "color",
174
182
  "$value": "{global.blue.12}"
175
183
  },
176
- "text-default": {
184
+ "base-hover": {
177
185
  "$type": "color",
178
186
  "$value": "{global.blue.13}"
179
187
  },
180
- "contrast-default": {
188
+ "base-active": {
181
189
  "$type": "color",
182
- "$value": "{global.blue.contrast-1}"
190
+ "$value": "{global.blue.14}"
183
191
  },
184
- "contrast-subtle": {
192
+ "base-contrast-subtle": {
185
193
  "$type": "color",
186
- "$value": "{global.blue.contrast-2}"
194
+ "$value": "{global.blue.15}"
195
+ },
196
+ "base-contrast-default": {
197
+ "$type": "color",
198
+ "$value": "{global.blue.16}"
187
199
  }
188
200
  },
189
201
  "warning": {
190
202
  "background-default": {
191
203
  "$type": "color",
192
- "$value": "{global.yellow.1}"
204
+ "$value": "{global.orange.1}"
193
205
  },
194
- "background-subtle": {
206
+ "background-tinted": {
195
207
  "$type": "color",
196
- "$value": "{global.yellow.2}"
208
+ "$value": "{global.orange.2}"
197
209
  },
198
210
  "surface-default": {
199
211
  "$type": "color",
200
- "$value": "{global.yellow.3}"
212
+ "$value": "{global.orange.3}"
213
+ },
214
+ "surface-tinted": {
215
+ "$type": "color",
216
+ "$value": "{global.orange.4}"
201
217
  },
202
218
  "surface-hover": {
203
219
  "$type": "color",
204
- "$value": "{global.yellow.4}"
220
+ "$value": "{global.orange.5}"
205
221
  },
206
222
  "surface-active": {
207
223
  "$type": "color",
208
- "$value": "{global.yellow.5}"
224
+ "$value": "{global.orange.6}"
209
225
  },
210
226
  "border-subtle": {
211
227
  "$type": "color",
212
- "$value": "{global.yellow.6}"
228
+ "$value": "{global.orange.7}"
213
229
  },
214
230
  "border-default": {
215
231
  "$type": "color",
216
- "$value": "{global.yellow.7}"
232
+ "$value": "{global.orange.8}"
217
233
  },
218
234
  "border-strong": {
219
- "$type": "color",
220
- "$value": "{global.yellow.8}"
221
- },
222
- "base-default": {
223
235
  "$type": "color",
224
236
  "$value": "{global.orange.9}"
225
237
  },
226
- "base-hover": {
238
+ "text-subtle": {
227
239
  "$type": "color",
228
240
  "$value": "{global.orange.10}"
229
241
  },
230
- "base-active": {
242
+ "text-default": {
231
243
  "$type": "color",
232
244
  "$value": "{global.orange.11}"
233
245
  },
234
- "text-subtle": {
246
+ "base-default": {
235
247
  "$type": "color",
236
248
  "$value": "{global.orange.12}"
237
249
  },
238
- "text-default": {
250
+ "base-hover": {
239
251
  "$type": "color",
240
252
  "$value": "{global.orange.13}"
241
253
  },
242
- "contrast-default": {
254
+ "base-active": {
255
+ "$type": "color",
256
+ "$value": "{global.orange.14}"
257
+ },
258
+ "base-contrast-subtle": {
243
259
  "$type": "color",
244
- "$value": "{global.orange.contrast-1}"
260
+ "$value": "{global.orange.15}"
245
261
  },
246
- "contrast-subtle": {
262
+ "base-contrast-default": {
247
263
  "$type": "color",
248
- "$value": "{global.orange.contrast-2}"
264
+ "$value": "{global.orange.16}"
249
265
  }
250
266
  },
251
267
  "focus": {
@@ -3,14 +3,18 @@
3
3
  "$type": "color",
4
4
  "$value": "{color.<color>.background-default}"
5
5
  },
6
- "background-subtle": {
6
+ "background-tinted": {
7
7
  "$type": "color",
8
- "$value": "{color.<color>.background-subtle}"
8
+ "$value": "{color.<color>.background-tinted}"
9
9
  },
10
10
  "surface-default": {
11
11
  "$type": "color",
12
12
  "$value": "{color.<color>.surface-default}"
13
13
  },
14
+ "surface-tinted": {
15
+ "$type": "color",
16
+ "$value": "{color.<color>.surface-tinted}"
17
+ },
14
18
  "surface-hover": {
15
19
  "$type": "color",
16
20
  "$value": "{color.<color>.surface-hover}"
@@ -31,6 +35,14 @@
31
35
  "$type": "color",
32
36
  "$value": "{color.<color>.border-strong}"
33
37
  },
38
+ "text-subtle": {
39
+ "$type": "color",
40
+ "$value": "{color.<color>.text-subtle}"
41
+ },
42
+ "text-default": {
43
+ "$type": "color",
44
+ "$value": "{color.<color>.text-default}"
45
+ },
34
46
  "base-default": {
35
47
  "$type": "color",
36
48
  "$value": "{color.<color>.base-default}"
@@ -43,20 +55,12 @@
43
55
  "$type": "color",
44
56
  "$value": "{color.<color>.base-active}"
45
57
  },
46
- "text-subtle": {
47
- "$type": "color",
48
- "$value": "{color.<color>.text-subtle}"
49
- },
50
- "text-default": {
51
- "$type": "color",
52
- "$value": "{color.<color>.text-default}"
53
- },
54
- "contrast-default": {
58
+ "base-contrast-subtle": {
55
59
  "$type": "color",
56
- "$value": "{color.<color>.contrast-default}"
60
+ "$value": "{color.<color>.base-contrast-subtle}"
57
61
  },
58
- "contrast-subtle": {
62
+ "base-contrast-default": {
59
63
  "$type": "color",
60
- "$value": "{color.<color>.contrast-subtle}"
64
+ "$value": "{color.<color>.base-contrast-default}"
61
65
  }
62
66
  }
@@ -3,7 +3,7 @@
3
3
  "$type": "color",
4
4
  "$value": "{color.<color>.1}"
5
5
  },
6
- "background-subtle": {
6
+ "background-tinted": {
7
7
  "$type": "color",
8
8
  "$value": "{color.<color>.2}"
9
9
  },
@@ -11,52 +11,56 @@
11
11
  "$type": "color",
12
12
  "$value": "{color.<color>.3}"
13
13
  },
14
- "surface-hover": {
14
+ "surface-tinted": {
15
15
  "$type": "color",
16
16
  "$value": "{color.<color>.4}"
17
17
  },
18
- "surface-active": {
18
+ "surface-hover": {
19
19
  "$type": "color",
20
20
  "$value": "{color.<color>.5}"
21
21
  },
22
- "border-subtle": {
22
+ "surface-active": {
23
23
  "$type": "color",
24
24
  "$value": "{color.<color>.6}"
25
25
  },
26
- "border-default": {
26
+ "border-subtle": {
27
27
  "$type": "color",
28
28
  "$value": "{color.<color>.7}"
29
29
  },
30
- "border-strong": {
30
+ "border-default": {
31
31
  "$type": "color",
32
32
  "$value": "{color.<color>.8}"
33
33
  },
34
- "base-default": {
34
+ "border-strong": {
35
35
  "$type": "color",
36
36
  "$value": "{color.<color>.9}"
37
37
  },
38
- "base-hover": {
38
+ "text-subtle": {
39
39
  "$type": "color",
40
40
  "$value": "{color.<color>.10}"
41
41
  },
42
- "base-active": {
42
+ "text-default": {
43
43
  "$type": "color",
44
44
  "$value": "{color.<color>.11}"
45
45
  },
46
- "text-subtle": {
46
+ "base-default": {
47
47
  "$type": "color",
48
48
  "$value": "{color.<color>.12}"
49
49
  },
50
- "text-default": {
50
+ "base-hover": {
51
51
  "$type": "color",
52
52
  "$value": "{color.<color>.13}"
53
53
  },
54
- "contrast-default": {
54
+ "base-active": {
55
+ "$type": "color",
56
+ "$value": "{color.<color>.14}"
57
+ },
58
+ "base-contrast-subtle": {
55
59
  "$type": "color",
56
- "$value": "{color.<color>.contrast-1}"
60
+ "$value": "{color.<color>.15}"
57
61
  },
58
- "contrast-subtle": {
62
+ "base-contrast-default": {
59
63
  "$type": "color",
60
- "$value": "{color.<color>.contrast-2}"
64
+ "$value": "{color.<color>.16}"
61
65
  }
62
66
  }
@@ -51,12 +51,16 @@
51
51
  "$type": "color",
52
52
  "$value": "{<theme>.<color>.13}"
53
53
  },
54
- "contrast-1": {
54
+ "14": {
55
55
  "$type": "color",
56
- "$value": "{<theme>.<color>.contrast-1}"
56
+ "$value": "{<theme>.<color>.14}"
57
57
  },
58
- "contrast-2": {
58
+ "15": {
59
59
  "$type": "color",
60
- "$value": "{<theme>.<color>.contrast-2}"
60
+ "$value": "{<theme>.<color>.15}"
61
+ },
62
+ "16": {
63
+ "$type": "color",
64
+ "$value": "{<theme>.<color>.16}"
61
65
  }
62
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/tokens/template.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,eAAe,qBAyG3B,CAAC"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/tokens/template.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,eAAe,qBAwG3B,CAAC"}
@@ -3,7 +3,7 @@ import path from "node:path";
3
3
  import * as R from "ramda";
4
4
  import originalColorJson from "../../../../design-tokens/semantic/color.json" with { type: "json" };
5
5
  import originalColorCategoryJson from "../../../../design-tokens/semantic/modes/main-color/accent.json" with { type: "json" };
6
- import originalThemeJson from "../../../../design-tokens/themes/theme.json" with { type: "json" };
6
+ import originalThemeJson from "../../../../design-tokens/themes/digdir.json" with { type: "json" };
7
7
  import { stringify } from "./write.js";
8
8
  const DIRNAME = import.meta.dirname || __dirname;
9
9
  const SOURCE_FILES_PATH = path.join(DIRNAME, "../../../../design-tokens");
@@ -16,7 +16,6 @@ const argsFromToPaths = (path_) => [
16
16
  const options = { recursive: true };
17
17
  const endsWithOneOf = (suffixes, str) => R.any((suffix) => R.endsWith(suffix, str), suffixes);
18
18
  const updateTemplates = async () => {
19
- await fs.cp(...argsFromToPaths("Figma"), options);
20
19
  await fs.cp(...argsFromToPaths("primitives/globals.json"), options);
21
20
  await fs.cp(...argsFromToPaths("primitives/modes/size"), options);
22
21
  await fs.cp(...argsFromToPaths("primitives/modes/typography/size"), options);
@@ -47,12 +46,12 @@ const updateTemplates = async () => {
47
46
  await fs.mkdir(path.join(TEMPLATE_FILES_PATH, "themes"), options);
48
47
  await fs.writeFile(
49
48
  path.join(TEMPLATE_FILES_PATH, `themes/theme-base-file.json`),
50
- JSON.stringify(themeBaseFile, null, 2).replaceAll("theme", "<theme>")
49
+ JSON.stringify(themeBaseFile, null, 2).replaceAll("digdir", "<theme>")
51
50
  );
52
51
  const themeColorTemplate = originalThemeJson.color.accent;
53
52
  await fs.writeFile(
54
53
  path.join(TEMPLATE_FILES_PATH, `themes/theme-color-template.json`),
55
- JSON.stringify(themeColorTemplate, null, 2).replaceAll("theme.accent", "<theme>.<color>")
54
+ JSON.stringify(themeColorTemplate, null, 2).replaceAll("digdir.accent", "<theme>.<color>")
56
55
  );
57
56
  const themesFile = await fs.readFile(path.join(SOURCE_FILES_PATH, "$themes.json"), "utf-8");
58
57
  const themesTemplate = JSON.parse(themesFile).filter((themeobj) => {
@@ -78,13 +77,13 @@ const updateTemplates = async () => {
78
77
  await fs.writeFile(path.join(TEMPLATE_FILES_PATH, `$themes.json`), stringify(themesTemplate));
79
78
  const metadataFile = await fs.readFile(path.join(SOURCE_FILES_PATH, "$metadata.json"), "utf-8");
80
79
  const tokenSetOrderTemplate = JSON.parse(metadataFile).tokenSetOrder.filter((tokenSet) => {
81
- if (endsWithOneOf(["theme2", "theme3", "theme4"], tokenSet)) {
80
+ if (endsWithOneOf(["altinn", "portal", "uutilsynet"], tokenSet)) {
82
81
  return false;
83
82
  }
84
83
  return true;
85
84
  }).map((tokenSet) => {
86
- if (endsWithOneOf(["theme"], tokenSet)) {
87
- return tokenSet.replace("/theme", "/<theme>");
85
+ if (endsWithOneOf(["digdir"], tokenSet)) {
86
+ return tokenSet.replace("/digdir", "/<theme>");
88
87
  }
89
88
  return tokenSet;
90
89
  });
@@ -65,7 +65,7 @@ const cleanDir = async (dir, dry) => {
65
65
  console.log(`${chalk.blue("cleanDir")} ${dir}`);
66
66
  return Promise.resolve();
67
67
  }
68
- console.log(`${chalk.red("Cleaning outputDir: ")} ${dir}`);
68
+ console.log(`${chalk.red(`Cleaning outputDir: ${dir.trim()}`)} `);
69
69
  return await fs.rm(dir, { recursive: true, force: true });
70
70
  };
71
71
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"generate$metadata.d.ts","sourceRoot":"","sources":["../../../../src/tokens/write/generate$metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAEvC,KAAK,QAAQ,GAAG;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAyBtG"}
1
+ {"version":3,"file":"generate$metadata.d.ts","sourceRoot":"","sources":["../../../../src/tokens/write/generate$metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAEvC,KAAK,QAAQ,GAAG;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAwBtG"}
@@ -19,8 +19,7 @@ function generateMetadataJson(schemes, themes, colors) {
19
19
  "semantic/color",
20
20
  ...Object.entries(colors.main).map(([color]) => `semantic/modes/main-color/${color}`),
21
21
  ...Object.entries(colors.support).map(([color]) => `semantic/modes/support-color/${color}`),
22
- "semantic/style",
23
- "Figma/components"
22
+ "semantic/style"
24
23
  ]
25
24
  };
26
25
  }