@digdir/designsystemet 1.4.0 → 1.5.1

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 (60) hide show
  1. package/dist/bin/designsystemet.js +485 -163
  2. package/dist/global-Y35YADVH.json +100 -0
  3. package/dist/src/index.js +524 -200
  4. package/dist/src/scripts/update-preview-tokens.js +429 -118
  5. package/dist/src/tokens/build.js +426 -108
  6. package/dist/src/tokens/create/defaults.js +27 -23
  7. package/dist/src/tokens/create/generators/$designsystemet.js +3 -3
  8. package/dist/src/tokens/create/write.js +3 -3
  9. package/dist/src/tokens/create.js +27 -23
  10. package/dist/src/tokens/format.js +524 -200
  11. package/dist/src/tokens/index.js +524 -200
  12. package/dist/src/tokens/process/configs/color.js +366 -66
  13. package/dist/src/tokens/process/configs/semantic.d.ts.map +1 -1
  14. package/dist/src/tokens/process/configs/semantic.js +368 -68
  15. package/dist/src/tokens/process/configs/shared.js +9 -2
  16. package/dist/src/tokens/process/configs/size-mode.d.ts +3 -0
  17. package/dist/src/tokens/process/configs/size-mode.d.ts.map +1 -0
  18. package/dist/src/tokens/process/configs/size-mode.js +1067 -0
  19. package/dist/src/tokens/process/configs/size.d.ts +3 -0
  20. package/dist/src/tokens/process/configs/size.d.ts.map +1 -0
  21. package/dist/src/tokens/process/configs/size.js +1069 -0
  22. package/dist/src/tokens/process/configs/type-scale.d.ts +3 -0
  23. package/dist/src/tokens/process/configs/type-scale.d.ts.map +1 -0
  24. package/dist/src/tokens/process/configs/type-scale.js +1067 -0
  25. package/dist/src/tokens/process/configs/typography.d.ts.map +1 -1
  26. package/dist/src/tokens/process/configs/typography.js +364 -64
  27. package/dist/src/tokens/process/configs.d.ts +3 -0
  28. package/dist/src/tokens/process/configs.d.ts.map +1 -1
  29. package/dist/src/tokens/process/configs.js +373 -71
  30. package/dist/src/tokens/process/formats/css/color.js +381 -79
  31. package/dist/src/tokens/process/formats/css/semantic.d.ts +0 -14
  32. package/dist/src/tokens/process/formats/css/semantic.d.ts.map +1 -1
  33. package/dist/src/tokens/process/formats/css/semantic.js +407 -109
  34. package/dist/src/tokens/process/formats/css/size-mode.d.ts +4 -0
  35. package/dist/src/tokens/process/formats/css/size-mode.d.ts.map +1 -0
  36. package/dist/src/tokens/process/formats/css/size-mode.js +1068 -0
  37. package/dist/src/tokens/process/formats/css/size.d.ts +17 -0
  38. package/dist/src/tokens/process/formats/css/size.d.ts.map +1 -0
  39. package/dist/src/tokens/process/formats/css/size.js +1069 -0
  40. package/dist/src/tokens/process/formats/css/type-scale.d.ts +3 -0
  41. package/dist/src/tokens/process/formats/css/type-scale.d.ts.map +1 -0
  42. package/dist/src/tokens/process/formats/css/type-scale.js +1069 -0
  43. package/dist/src/tokens/process/formats/css/typography.js +365 -63
  44. package/dist/src/tokens/process/formats/css.d.ts +3 -0
  45. package/dist/src/tokens/process/formats/css.d.ts.map +1 -1
  46. package/dist/src/tokens/process/formats/css.js +364 -64
  47. package/dist/src/tokens/process/output/declarations.js +373 -71
  48. package/dist/src/tokens/process/output/theme.d.ts.map +1 -1
  49. package/dist/src/tokens/process/output/theme.js +60 -11
  50. package/dist/src/tokens/process/platform.d.ts +16 -0
  51. package/dist/src/tokens/process/platform.d.ts.map +1 -1
  52. package/dist/src/tokens/process/platform.js +402 -95
  53. package/dist/src/tokens/process/transformers.js +9 -2
  54. package/dist/src/tokens/process/utils/getMultidimensionalThemes.js +373 -71
  55. package/dist/src/tokens/template/design-tokens/primitives/modes/size/global.js +1 -1
  56. package/dist/src/tokens/utils.d.ts +4 -1
  57. package/dist/src/tokens/utils.d.ts.map +1 -1
  58. package/dist/src/tokens/utils.js +24 -1
  59. package/package.json +3 -3
  60. package/dist/global-XVXVBKM6.json +0 -96
@@ -0,0 +1,100 @@
1
+ {
2
+ "_size": {
3
+ "0": {
4
+ "$type": "dimension",
5
+ "$value": "floor({_size.unit} * 0)"
6
+ },
7
+ "1": {
8
+ "$type": "dimension",
9
+ "$value": "floor({_size.unit} * 1)"
10
+ },
11
+ "2": {
12
+ "$type": "dimension",
13
+ "$value": "floor({_size.unit} * 2)"
14
+ },
15
+ "3": {
16
+ "$type": "dimension",
17
+ "$value": "floor({_size.unit} * 3)"
18
+ },
19
+ "4": {
20
+ "$type": "dimension",
21
+ "$value": "floor({_size.unit} * 4)"
22
+ },
23
+ "5": {
24
+ "$type": "dimension",
25
+ "$value": "floor({_size.unit} * 5)"
26
+ },
27
+ "6": {
28
+ "$type": "dimension",
29
+ "$value": "floor({_size.unit} * 6)"
30
+ },
31
+ "7": {
32
+ "$type": "dimension",
33
+ "$value": "floor({_size.unit} * 7)"
34
+ },
35
+ "8": {
36
+ "$type": "dimension",
37
+ "$value": "floor({_size.unit} * 8)"
38
+ },
39
+ "9": {
40
+ "$type": "dimension",
41
+ "$value": "floor({_size.unit} * 9)"
42
+ },
43
+ "10": {
44
+ "$type": "dimension",
45
+ "$value": "floor({_size.unit} * 10)"
46
+ },
47
+ "11": {
48
+ "$type": "dimension",
49
+ "$value": "floor({_size.unit} * 11)"
50
+ },
51
+ "12": {
52
+ "$type": "dimension",
53
+ "$value": "floor({_size.unit} * 12)"
54
+ },
55
+ "13": {
56
+ "$type": "dimension",
57
+ "$value": "floor({_size.unit} * 13)"
58
+ },
59
+ "14": {
60
+ "$type": "dimension",
61
+ "$value": "floor({_size.unit} * 14)"
62
+ },
63
+ "15": {
64
+ "$type": "dimension",
65
+ "$value": "floor({_size.unit} * 15)"
66
+ },
67
+ "18": {
68
+ "$type": "dimension",
69
+ "$value": "floor({_size.unit} * 18)"
70
+ },
71
+ "22": {
72
+ "$type": "dimension",
73
+ "$value": "floor({_size.unit} * 22)"
74
+ },
75
+ "26": {
76
+ "$type": "dimension",
77
+ "$value": "floor({_size.unit} * 26)"
78
+ },
79
+ "30": {
80
+ "$type": "dimension",
81
+ "$value": "floor({_size.unit} * 30)"
82
+ },
83
+ "mode-font-size": {
84
+ "$type": "number",
85
+ "$value": "{size._mode-font-size}"
86
+ },
87
+ "base": {
88
+ "$type": "number",
89
+ "$value": "{size._base}"
90
+ },
91
+ "step": {
92
+ "$type": "number",
93
+ "$value": "{size._step}"
94
+ },
95
+ "unit": {
96
+ "$type": "number",
97
+ "$value": "{_size.step} / {_size.base} * {_size.mode-font-size}"
98
+ }
99
+ }
100
+ }