@digdir/designsystemet 1.9.0 → 1.10.0

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 (38) hide show
  1. package/dist/bin/designsystemet.js +13 -16
  2. package/dist/{color.base.template-5XWYH2F5.json → color.base.template-Z7YWN2TF.json} +1 -1
  3. package/dist/config.schema.json +32 -32
  4. package/dist/src/index.js +13 -16
  5. package/dist/src/scripts/update-preview-tokens.js +20 -54
  6. package/dist/src/tokens/build.js +13 -16
  7. package/dist/src/tokens/create/generators/$designsystemet.js +6 -15
  8. package/dist/src/tokens/create/write.js +6 -15
  9. package/dist/src/tokens/format.js +13 -16
  10. package/dist/src/tokens/index.js +13 -16
  11. package/dist/src/tokens/process/configs/color.js +0 -1
  12. package/dist/src/tokens/process/configs/semantic.js +0 -1
  13. package/dist/src/tokens/process/configs/size-mode.js +0 -1
  14. package/dist/src/tokens/process/configs/size.js +0 -1
  15. package/dist/src/tokens/process/configs/type-scale.js +0 -1
  16. package/dist/src/tokens/process/configs/typography.js +0 -1
  17. package/dist/src/tokens/process/configs.js +0 -1
  18. package/dist/src/tokens/process/formats/css/color.js +0 -1
  19. package/dist/src/tokens/process/formats/css/semantic.js +0 -1
  20. package/dist/src/tokens/process/formats/css/size-mode.js +0 -1
  21. package/dist/src/tokens/process/formats/css/size.js +0 -1
  22. package/dist/src/tokens/process/formats/css/type-scale.js +0 -1
  23. package/dist/src/tokens/process/formats/css/typography.js +0 -1
  24. package/dist/src/tokens/process/formats/css.js +0 -1
  25. package/dist/src/tokens/process/output/declarations.js +6 -16
  26. package/dist/src/tokens/process/output/theme.js +6 -15
  27. package/dist/src/tokens/process/platform.js +0 -1
  28. package/dist/src/tokens/process/utils/getMultidimensionalThemes.d.ts.map +1 -1
  29. package/dist/src/tokens/process/utils/getMultidimensionalThemes.js +5 -1
  30. package/dist/src/tokens/process/utils/kebab-case.d.ts +5 -0
  31. package/dist/src/tokens/process/utils/kebab-case.d.ts.map +1 -0
  32. package/dist/src/tokens/process/utils/kebab-case.js +7 -0
  33. package/dist/src/tokens/template/design-tokens/semantic/color.base.template.js +1 -1
  34. package/package.json +7 -16
  35. package/configs/digdir.config.json +0 -63
  36. package/dist/src/scripts/update-design-tokens.d.ts +0 -2
  37. package/dist/src/scripts/update-design-tokens.d.ts.map +0 -1
  38. package/dist/src/scripts/update-design-tokens.js +0 -37
@@ -861,7 +861,7 @@ import pc5 from "picocolors";
861
861
  // package.json
862
862
  var package_default = {
863
863
  name: "@digdir/designsystemet",
864
- version: "1.9.0",
864
+ version: "1.10.0",
865
865
  description: "CLI for Designsystemet",
866
866
  author: "Designsystemet team",
867
867
  engines: {
@@ -913,23 +913,18 @@ var package_default = {
913
913
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
914
914
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
915
915
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
916
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/design-tokens --dry",
916
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
917
917
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
918
- "digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
919
- "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
920
918
  "update:template": "tsx ./src/scripts/update-template.ts",
921
919
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
922
- "update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
923
- verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
920
+ verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
924
921
  },
925
922
  dependencies: {
926
923
  "@commander-js/extra-typings": "^14.0.0",
927
924
  "@digdir/designsystemet-types": "workspace:^",
928
925
  "@tokens-studio/sd-transforms": "2.0.3",
929
- "apca-w3": "^0.1.9",
930
- "change-case": "^5.4.4",
931
926
  "chroma-js": "^3.2.0",
932
- "colorjs.io": "^0.6.0-alpha.1",
927
+ "colorjs.io": "^0.6.0",
933
928
  commander: "^14.0.2",
934
929
  "fast-glob": "^3.3.3",
935
930
  hsluv: "^1.0.1",
@@ -938,19 +933,15 @@ var package_default = {
938
933
  postcss: "^8.5.6",
939
934
  ramda: "^0.32.0",
940
935
  "style-dictionary": "^5.1.1",
941
- zod: "^4.1.13",
936
+ zod: "^4.3.5",
942
937
  "zod-validation-error": "^4.0.2"
943
938
  },
944
939
  devDependencies: {
945
940
  "@tokens-studio/types": "0.5.2",
946
- "@types/apca-w3": "^0.1.3",
947
941
  "@types/chroma-js": "^3.1.2",
948
- "@types/fs-extra": "^11.0.4",
949
- "@types/node": "^22.19.1",
942
+ "@types/node": "^22.19.3",
950
943
  "@types/object-hash": "^3.0.6",
951
944
  "@types/ramda": "^0.31.1",
952
- "fs-extra": "^11.3.2",
953
- tslib: "^2.8.1",
954
945
  tsup: "^8.5.1",
955
946
  tsx: "^4.21.0",
956
947
  typescript: "^5.9.3"
@@ -1976,9 +1967,15 @@ var TypographyValues;
1976
1967
  })(TypographyValues || (TypographyValues = {}));
1977
1968
 
1978
1969
  // src/tokens/process/utils/getMultidimensionalThemes.ts
1979
- import { kebabCase } from "change-case";
1980
1970
  import pc3 from "picocolors";
1981
1971
  import * as R17 from "ramda";
1972
+
1973
+ // src/tokens/process/utils/kebab-case.ts
1974
+ function kebabCase(str) {
1975
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
1976
+ }
1977
+
1978
+ // src/tokens/process/utils/getMultidimensionalThemes.ts
1982
1979
  var getMultidimensionalThemes = (processed$themes, dimensions) => {
1983
1980
  const verboseLogging = buildOptions?.verbose;
1984
1981
  const grouped$themes = groupThemes(processed$themes);
@@ -6,25 +6,21 @@
6
6
  "type": "string"
7
7
  },
8
8
  "outDir": {
9
- "description": "Path to the output directory for the created design tokens",
10
- "type": "string"
9
+ "type": "string",
10
+ "description": "Path to the output directory for the created design tokens"
11
11
  },
12
12
  "themes": {
13
- "description": "An object with one or more themes. Each property defines a theme, and the property name is used as the theme name.",
14
13
  "type": "object",
15
14
  "propertyNames": {
16
15
  "type": "string"
17
16
  },
18
17
  "additionalProperties": {
19
- "description": "An object defining a theme. The property name holding the object becomes the theme name.",
20
18
  "type": "object",
21
19
  "properties": {
22
20
  "colors": {
23
- "description": "Defines the colors for this theme",
24
21
  "type": "object",
25
22
  "properties": {
26
23
  "main": {
27
- "description": "An object with one or more color definitions. The property name is used as the color name.",
28
24
  "type": "object",
29
25
  "propertyNames": {
30
26
  "type": "string",
@@ -32,11 +28,11 @@
32
28
  },
33
29
  "additionalProperties": {
34
30
  "description": "A hex color, which is used for creating a color scale. Invalid color names: neutral, success, warning, danger, info"
35
- }
31
+ },
32
+ "description": "An object with one or more color definitions. The property name is used as the color name."
36
33
  },
37
34
  "support": {
38
35
  "default": {},
39
- "description": "An object with one or more color definitions. The property name is used as the color name.",
40
36
  "type": "object",
41
37
  "propertyNames": {
42
38
  "type": "string",
@@ -44,7 +40,8 @@
44
40
  },
45
41
  "additionalProperties": {
46
42
  "description": "A hex color, which is used for creating a color scale. Invalid color names: neutral, success, warning, danger, info"
47
- }
43
+ },
44
+ "description": "An object with one or more color definitions. The property name is used as the color name."
48
45
  },
49
46
  "neutral": {
50
47
  "description": "A hex color, which is used for creating a color scale."
@@ -55,38 +52,36 @@
55
52
  "support",
56
53
  "neutral"
57
54
  ],
58
- "additionalProperties": false
55
+ "additionalProperties": false,
56
+ "description": "Defines the colors for this theme"
59
57
  },
60
58
  "typography": {
61
- "description": "Defines the typography for a given theme",
62
59
  "type": "object",
63
60
  "properties": {
64
61
  "fontFamily": {
65
- "description": "Sets the font-family for this theme",
66
- "type": "string"
62
+ "type": "string",
63
+ "description": "Sets the font-family for this theme"
67
64
  }
68
65
  },
69
66
  "required": [
70
67
  "fontFamily"
71
68
  ],
72
- "additionalProperties": false
69
+ "additionalProperties": false,
70
+ "description": "Defines the typography for a given theme"
73
71
  },
74
72
  "borderRadius": {
75
- "description": "Defines the border-radius for this theme",
76
- "type": "number"
73
+ "type": "number",
74
+ "description": "Defines the border-radius for this theme"
77
75
  },
78
76
  "overrides": {
79
- "description": "Overrides for generated design tokens. Currently only supports colors defined in your theme",
80
77
  "type": "object",
81
78
  "properties": {
82
79
  "colors": {
83
- "description": "An object with color names as keys",
84
80
  "type": "object",
85
81
  "propertyNames": {
86
82
  "type": "string"
87
83
  },
88
84
  "additionalProperties": {
89
- "description": "The name of the color to add overrides for, e.g. \"accent\"",
90
85
  "type": "object",
91
86
  "propertyNames": {
92
87
  "type": "string",
@@ -110,7 +105,6 @@
110
105
  ]
111
106
  },
112
107
  "additionalProperties": {
113
- "description": "Override values for semantic color tokens like \"background-subtle\", \"border-default\", etc.",
114
108
  "type": "object",
115
109
  "properties": {
116
110
  "light": {
@@ -120,9 +114,12 @@
120
114
  "description": "A hex color that overrides dark mode"
121
115
  }
122
116
  },
123
- "additionalProperties": false
124
- }
125
- }
117
+ "additionalProperties": false,
118
+ "description": "Override values for semantic color tokens like \"background-subtle\", \"border-default\", etc."
119
+ },
120
+ "description": "The name of the color to add overrides for, e.g. \"accent\""
121
+ },
122
+ "description": "An object with color names as keys"
126
123
  },
127
124
  "severity": {
128
125
  "description": "An object with severity color names as keys",
@@ -141,7 +138,6 @@
141
138
  }
142
139
  },
143
140
  "linkVisited": {
144
- "description": "Overrides for the \"link-visited\" color",
145
141
  "type": "object",
146
142
  "properties": {
147
143
  "light": {
@@ -151,10 +147,10 @@
151
147
  "description": "A hex color that overrides dark mode"
152
148
  }
153
149
  },
154
- "additionalProperties": false
150
+ "additionalProperties": false,
151
+ "description": "Overrides for the \"link-visited\" color"
155
152
  },
156
153
  "focus": {
157
- "description": "Overrides for the focus colors",
158
154
  "type": "object",
159
155
  "properties": {
160
156
  "inner": {
@@ -184,21 +180,25 @@
184
180
  "additionalProperties": false
185
181
  }
186
182
  },
187
- "additionalProperties": false
183
+ "additionalProperties": false,
184
+ "description": "Overrides for the focus colors"
188
185
  }
189
186
  },
190
- "additionalProperties": false
187
+ "additionalProperties": false,
188
+ "description": "Overrides for generated design tokens. Currently only supports colors defined in your theme"
191
189
  }
192
190
  },
193
191
  "required": [
194
192
  "colors"
195
193
  ],
196
- "additionalProperties": false
197
- }
194
+ "additionalProperties": false,
195
+ "description": "An object defining a theme. The property name holding the object becomes the theme name."
196
+ },
197
+ "description": "An object with one or more themes. Each property defines a theme, and the property name is used as the theme name."
198
198
  },
199
199
  "clean": {
200
- "description": "Delete the output directory before building or creating tokens",
201
- "type": "boolean"
200
+ "type": "boolean",
201
+ "description": "Delete the output directory before building or creating tokens"
202
202
  }
203
203
  },
204
204
  "required": [
package/dist/src/index.js CHANGED
@@ -2445,7 +2445,7 @@ import * as R9 from "ramda";
2445
2445
  // package.json
2446
2446
  var package_default = {
2447
2447
  name: "@digdir/designsystemet",
2448
- version: "1.9.0",
2448
+ version: "1.10.0",
2449
2449
  description: "CLI for Designsystemet",
2450
2450
  author: "Designsystemet team",
2451
2451
  engines: {
@@ -2497,23 +2497,18 @@ var package_default = {
2497
2497
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
2498
2498
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
2499
2499
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
2500
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/design-tokens --dry",
2500
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
2501
2501
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
2502
- "digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
2503
- "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
2504
2502
  "update:template": "tsx ./src/scripts/update-template.ts",
2505
2503
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
2506
- "update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
2507
- verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
2504
+ verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
2508
2505
  },
2509
2506
  dependencies: {
2510
2507
  "@commander-js/extra-typings": "^14.0.0",
2511
2508
  "@digdir/designsystemet-types": "workspace:^",
2512
2509
  "@tokens-studio/sd-transforms": "2.0.3",
2513
- "apca-w3": "^0.1.9",
2514
- "change-case": "^5.4.4",
2515
2510
  "chroma-js": "^3.2.0",
2516
- "colorjs.io": "^0.6.0-alpha.1",
2511
+ "colorjs.io": "^0.6.0",
2517
2512
  commander: "^14.0.2",
2518
2513
  "fast-glob": "^3.3.3",
2519
2514
  hsluv: "^1.0.1",
@@ -2522,19 +2517,15 @@ var package_default = {
2522
2517
  postcss: "^8.5.6",
2523
2518
  ramda: "^0.32.0",
2524
2519
  "style-dictionary": "^5.1.1",
2525
- zod: "^4.1.13",
2520
+ zod: "^4.3.5",
2526
2521
  "zod-validation-error": "^4.0.2"
2527
2522
  },
2528
2523
  devDependencies: {
2529
2524
  "@tokens-studio/types": "0.5.2",
2530
- "@types/apca-w3": "^0.1.3",
2531
2525
  "@types/chroma-js": "^3.1.2",
2532
- "@types/fs-extra": "^11.0.4",
2533
- "@types/node": "^22.19.1",
2526
+ "@types/node": "^22.19.3",
2534
2527
  "@types/object-hash": "^3.0.6",
2535
2528
  "@types/ramda": "^0.31.1",
2536
- "fs-extra": "^11.3.2",
2537
- tslib: "^2.8.1",
2538
2529
  tsup: "^8.5.1",
2539
2530
  tsx: "^4.21.0",
2540
2531
  typescript: "^5.9.3"
@@ -3481,9 +3472,15 @@ var typographyVariables = ({ theme, typography: typography2 }) => {
3481
3472
  };
3482
3473
 
3483
3474
  // src/tokens/process/utils/getMultidimensionalThemes.ts
3484
- import { kebabCase } from "change-case";
3485
3475
  import pc3 from "picocolors";
3486
3476
  import * as R21 from "ramda";
3477
+
3478
+ // src/tokens/process/utils/kebab-case.ts
3479
+ function kebabCase(str) {
3480
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
3481
+ }
3482
+
3483
+ // src/tokens/process/utils/getMultidimensionalThemes.ts
3487
3484
  var getMultidimensionalThemes = (processed$themes, dimensions) => {
3488
3485
  const verboseLogging = buildOptions?.verbose;
3489
3486
  const grouped$themes = groupThemes(processed$themes);
@@ -2,67 +2,27 @@
2
2
  import path from "path";
3
3
  import pc4 from "picocolors";
4
4
 
5
- // configs/digdir.config.json
6
- var digdir_config_default = {
7
- $schema: "../dist/config.schema.json",
8
- outDir: "./temp/digdir/design-tokens",
5
+ // ../../designsystemet.config.json
6
+ var designsystemet_config_default = {
7
+ $schema: "packages/cli/dist/config.schema.json",
8
+ outDir: "design-tokens",
9
9
  clean: true,
10
10
  themes: {
11
- digdir: {
11
+ designsystemet: {
12
12
  colors: {
13
13
  main: {
14
14
  accent: "#0062BA"
15
15
  },
16
16
  support: {
17
- brand1: "#F45F63",
18
- brand2: "#E5AA20",
19
- brand3: "#1E98F5"
17
+ brand1: "#0D7A5F",
18
+ brand2: "#5B3FA0"
20
19
  },
21
- neutral: "#1E2B3C"
20
+ neutral: "#24272B"
22
21
  },
23
22
  borderRadius: 4,
24
23
  typography: {
25
24
  fontFamily: "Inter"
26
25
  }
27
- },
28
- altinn: {
29
- colors: {
30
- main: {
31
- accent: "#0062BA"
32
- },
33
- support: {
34
- brand1: "#0162BA",
35
- brand2: "#3F3161",
36
- brand3: "#E02F4A"
37
- },
38
- neutral: "#1E2B3C"
39
- }
40
- },
41
- uutilsynet: {
42
- colors: {
43
- main: {
44
- accent: "#0062BA"
45
- },
46
- support: {
47
- brand1: "#5B60D1",
48
- brand2: "#FEA769",
49
- brand3: "#5DA290"
50
- },
51
- neutral: "#1E2B3C"
52
- }
53
- },
54
- portal: {
55
- colors: {
56
- main: {
57
- accent: "#38628C"
58
- },
59
- support: {
60
- brand1: "#D9ECFF",
61
- brand2: "#FFCA99",
62
- brand3: "#D96C79"
63
- },
64
- neutral: "#203040"
65
- }
66
26
  }
67
27
  }
68
28
  };
@@ -3132,9 +3092,15 @@ var typographyVariables = ({ theme, typography: typography2 }) => {
3132
3092
  };
3133
3093
 
3134
3094
  // src/tokens/process/utils/getMultidimensionalThemes.ts
3135
- import { kebabCase } from "change-case";
3136
3095
  import pc from "picocolors";
3137
3096
  import * as R19 from "ramda";
3097
+
3098
+ // src/tokens/process/utils/kebab-case.ts
3099
+ function kebabCase(str) {
3100
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
3101
+ }
3102
+
3103
+ // src/tokens/process/utils/getMultidimensionalThemes.ts
3138
3104
  var getMultidimensionalThemes = (processed$themes, dimensions) => {
3139
3105
  const verboseLogging = buildOptions?.verbose;
3140
3106
  const grouped$themes = groupThemes(processed$themes);
@@ -3601,13 +3567,13 @@ var formatTheme = async (themeConfig) => {
3601
3567
  };
3602
3568
  formatTheme({
3603
3569
  name: "test",
3604
- borderRadius: digdir_config_default.themes.digdir.borderRadius,
3570
+ borderRadius: designsystemet_config_default.themes.designsystemet.borderRadius,
3605
3571
  colors: {
3606
- main: digdir_config_default.themes.digdir.colors.main,
3607
- support: digdir_config_default.themes.digdir.colors.support,
3608
- neutral: digdir_config_default.themes.digdir.colors.neutral
3572
+ main: designsystemet_config_default.themes.designsystemet.colors.main,
3573
+ support: designsystemet_config_default.themes.designsystemet.colors.support,
3574
+ neutral: designsystemet_config_default.themes.designsystemet.colors.neutral
3609
3575
  },
3610
- typography: digdir_config_default.themes.digdir.typography
3576
+ typography: designsystemet_config_default.themes.designsystemet.typography
3611
3577
  });
3612
3578
  export {
3613
3579
  formatTheme
@@ -49,7 +49,7 @@ import pc4 from "picocolors";
49
49
  // package.json
50
50
  var package_default = {
51
51
  name: "@digdir/designsystemet",
52
- version: "1.9.0",
52
+ version: "1.10.0",
53
53
  description: "CLI for Designsystemet",
54
54
  author: "Designsystemet team",
55
55
  engines: {
@@ -101,23 +101,18 @@ var package_default = {
101
101
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
102
102
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
103
103
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
104
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/design-tokens --dry",
104
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
105
105
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
106
- "digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
107
- "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
108
106
  "update:template": "tsx ./src/scripts/update-template.ts",
109
107
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
110
- "update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
111
- verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
108
+ verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
112
109
  },
113
110
  dependencies: {
114
111
  "@commander-js/extra-typings": "^14.0.0",
115
112
  "@digdir/designsystemet-types": "workspace:^",
116
113
  "@tokens-studio/sd-transforms": "2.0.3",
117
- "apca-w3": "^0.1.9",
118
- "change-case": "^5.4.4",
119
114
  "chroma-js": "^3.2.0",
120
- "colorjs.io": "^0.6.0-alpha.1",
115
+ "colorjs.io": "^0.6.0",
121
116
  commander: "^14.0.2",
122
117
  "fast-glob": "^3.3.3",
123
118
  hsluv: "^1.0.1",
@@ -126,19 +121,15 @@ var package_default = {
126
121
  postcss: "^8.5.6",
127
122
  ramda: "^0.32.0",
128
123
  "style-dictionary": "^5.1.1",
129
- zod: "^4.1.13",
124
+ zod: "^4.3.5",
130
125
  "zod-validation-error": "^4.0.2"
131
126
  },
132
127
  devDependencies: {
133
128
  "@tokens-studio/types": "0.5.2",
134
- "@types/apca-w3": "^0.1.3",
135
129
  "@types/chroma-js": "^3.1.2",
136
- "@types/fs-extra": "^11.0.4",
137
- "@types/node": "^22.19.1",
130
+ "@types/node": "^22.19.3",
138
131
  "@types/object-hash": "^3.0.6",
139
132
  "@types/ramda": "^0.31.1",
140
- "fs-extra": "^11.3.2",
141
- tslib: "^2.8.1",
142
133
  tsup: "^8.5.1",
143
134
  tsx: "^4.21.0",
144
135
  typescript: "^5.9.3"
@@ -1164,9 +1155,15 @@ var TypographyValues;
1164
1155
  })(TypographyValues || (TypographyValues = {}));
1165
1156
 
1166
1157
  // src/tokens/process/utils/getMultidimensionalThemes.ts
1167
- import { kebabCase } from "change-case";
1168
1158
  import pc2 from "picocolors";
1169
1159
  import * as R13 from "ramda";
1160
+
1161
+ // src/tokens/process/utils/kebab-case.ts
1162
+ function kebabCase(str) {
1163
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
1164
+ }
1165
+
1166
+ // src/tokens/process/utils/getMultidimensionalThemes.ts
1170
1167
  var getMultidimensionalThemes = (processed$themes, dimensions) => {
1171
1168
  const verboseLogging = buildOptions?.verbose;
1172
1169
  const grouped$themes = groupThemes(processed$themes);
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@digdir/designsystemet",
4
- version: "1.9.0",
4
+ version: "1.10.0",
5
5
  description: "CLI for Designsystemet",
6
6
  author: "Designsystemet team",
7
7
  engines: {
@@ -53,23 +53,18 @@ var package_default = {
53
53
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
54
54
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
55
55
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
56
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/design-tokens --dry",
56
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
57
57
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
58
- "digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
59
- "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
60
58
  "update:template": "tsx ./src/scripts/update-template.ts",
61
59
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
62
- "update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
63
- verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
60
+ verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
64
61
  },
65
62
  dependencies: {
66
63
  "@commander-js/extra-typings": "^14.0.0",
67
64
  "@digdir/designsystemet-types": "workspace:^",
68
65
  "@tokens-studio/sd-transforms": "2.0.3",
69
- "apca-w3": "^0.1.9",
70
- "change-case": "^5.4.4",
71
66
  "chroma-js": "^3.2.0",
72
- "colorjs.io": "^0.6.0-alpha.1",
67
+ "colorjs.io": "^0.6.0",
73
68
  commander: "^14.0.2",
74
69
  "fast-glob": "^3.3.3",
75
70
  hsluv: "^1.0.1",
@@ -78,19 +73,15 @@ var package_default = {
78
73
  postcss: "^8.5.6",
79
74
  ramda: "^0.32.0",
80
75
  "style-dictionary": "^5.1.1",
81
- zod: "^4.1.13",
76
+ zod: "^4.3.5",
82
77
  "zod-validation-error": "^4.0.2"
83
78
  },
84
79
  devDependencies: {
85
80
  "@tokens-studio/types": "0.5.2",
86
- "@types/apca-w3": "^0.1.3",
87
81
  "@types/chroma-js": "^3.1.2",
88
- "@types/fs-extra": "^11.0.4",
89
- "@types/node": "^22.19.1",
82
+ "@types/node": "^22.19.3",
90
83
  "@types/object-hash": "^3.0.6",
91
84
  "@types/ramda": "^0.31.1",
92
- "fs-extra": "^11.3.2",
93
- tslib: "^2.8.1",
94
85
  tsup: "^8.5.1",
95
86
  tsx: "^4.21.0",
96
87
  typescript: "^5.9.3"
@@ -46,7 +46,7 @@ var readFile = async (path2, dry, allowFileNotFound) => {
46
46
  // package.json
47
47
  var package_default = {
48
48
  name: "@digdir/designsystemet",
49
- version: "1.9.0",
49
+ version: "1.10.0",
50
50
  description: "CLI for Designsystemet",
51
51
  author: "Designsystemet team",
52
52
  engines: {
@@ -98,23 +98,18 @@ var package_default = {
98
98
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
99
99
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
100
100
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
101
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/design-tokens --dry",
101
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
102
102
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
103
- "digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
104
- "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
105
103
  "update:template": "tsx ./src/scripts/update-template.ts",
106
104
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
107
- "update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
108
- verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
105
+ verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
109
106
  },
110
107
  dependencies: {
111
108
  "@commander-js/extra-typings": "^14.0.0",
112
109
  "@digdir/designsystemet-types": "workspace:^",
113
110
  "@tokens-studio/sd-transforms": "2.0.3",
114
- "apca-w3": "^0.1.9",
115
- "change-case": "^5.4.4",
116
111
  "chroma-js": "^3.2.0",
117
- "colorjs.io": "^0.6.0-alpha.1",
112
+ "colorjs.io": "^0.6.0",
118
113
  commander: "^14.0.2",
119
114
  "fast-glob": "^3.3.3",
120
115
  hsluv: "^1.0.1",
@@ -123,19 +118,15 @@ var package_default = {
123
118
  postcss: "^8.5.6",
124
119
  ramda: "^0.32.0",
125
120
  "style-dictionary": "^5.1.1",
126
- zod: "^4.1.13",
121
+ zod: "^4.3.5",
127
122
  "zod-validation-error": "^4.0.2"
128
123
  },
129
124
  devDependencies: {
130
125
  "@tokens-studio/types": "0.5.2",
131
- "@types/apca-w3": "^0.1.3",
132
126
  "@types/chroma-js": "^3.1.2",
133
- "@types/fs-extra": "^11.0.4",
134
- "@types/node": "^22.19.1",
127
+ "@types/node": "^22.19.3",
135
128
  "@types/object-hash": "^3.0.6",
136
129
  "@types/ramda": "^0.31.1",
137
- "fs-extra": "^11.3.2",
138
- tslib: "^2.8.1",
139
130
  tsup: "^8.5.1",
140
131
  tsx: "^4.21.0",
141
132
  typescript: "^5.9.3"