@digdir/designsystemet 1.11.1 → 1.12.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 (100) hide show
  1. package/dist/bin/config.js +24 -4
  2. package/dist/bin/designsystemet.js +909 -1220
  3. package/dist/src/colors/index.js +27 -1
  4. package/dist/src/colors/types.d.ts +24 -21
  5. package/dist/src/colors/types.d.ts.map +1 -1
  6. package/dist/src/colors/types.js +27 -0
  7. package/dist/src/config.js +24 -4
  8. package/dist/src/index.js +815 -1119
  9. package/dist/src/scripts/createJsonSchema.js +24 -4
  10. package/dist/src/scripts/update-preview-tokens.d.ts.map +1 -1
  11. package/dist/src/scripts/update-preview-tokens.js +1356 -1662
  12. package/dist/src/tokens/build.js +4 -5
  13. package/dist/src/tokens/create/generators/$designsystemet.js +4 -5
  14. package/dist/src/tokens/create/generators/$metadata.d.ts +2 -2
  15. package/dist/src/tokens/create/generators/$metadata.d.ts.map +1 -1
  16. package/dist/src/tokens/create/generators/$metadata.js +3 -7
  17. package/dist/src/tokens/create/generators/$themes.d.ts +17 -2
  18. package/dist/src/tokens/create/generators/$themes.d.ts.map +1 -1
  19. package/dist/src/tokens/create/generators/$themes.js +3 -3
  20. package/dist/src/tokens/create/generators/primitives/color-scheme.d.ts +5 -0
  21. package/dist/src/tokens/create/generators/primitives/color-scheme.d.ts.map +1 -0
  22. package/dist/src/tokens/create/generators/{color.js → primitives/color-scheme.js} +29 -6
  23. package/dist/src/tokens/create/generators/primitives/globals.d.ts +3 -0
  24. package/dist/src/tokens/create/generators/primitives/globals.d.ts.map +1 -0
  25. package/dist/src/tokens/create/generators/primitives/globals.js +148 -0
  26. package/dist/src/tokens/create/generators/primitives/size.d.ts +4 -0
  27. package/dist/src/tokens/create/generators/primitives/size.d.ts.map +1 -0
  28. package/dist/src/tokens/create/generators/primitives/size.js +157 -0
  29. package/dist/src/tokens/create/generators/primitives/typography.d.ts +4 -0
  30. package/dist/src/tokens/create/generators/primitives/typography.d.ts.map +1 -0
  31. package/dist/src/tokens/create/generators/primitives/typography.js +220 -0
  32. package/dist/src/tokens/create/generators/semantic/color-modes.d.ts +8 -0
  33. package/dist/src/tokens/create/generators/semantic/color-modes.d.ts.map +1 -0
  34. package/dist/src/tokens/create/generators/semantic/color-modes.js +61 -0
  35. package/dist/src/tokens/create/generators/semantic/color.d.ts +5 -0
  36. package/dist/src/tokens/create/generators/semantic/color.d.ts.map +1 -0
  37. package/dist/src/tokens/create/generators/{semantic.js → semantic/color.js} +50 -194
  38. package/dist/src/tokens/create/generators/semantic/style.d.ts +3 -0
  39. package/dist/src/tokens/create/generators/semantic/style.d.ts.map +1 -0
  40. package/dist/src/tokens/create/generators/semantic/style.js +384 -0
  41. package/dist/src/tokens/create/generators/{theme.d.ts → themes/theme.d.ts} +1 -1
  42. package/dist/src/tokens/create/generators/themes/theme.d.ts.map +1 -0
  43. package/dist/src/tokens/create/generators/{theme.js → themes/theme.js} +87 -129
  44. package/dist/src/tokens/create/write.d.ts.map +1 -1
  45. package/dist/src/tokens/create/write.js +13 -17
  46. package/dist/src/tokens/create.d.ts +1 -1
  47. package/dist/src/tokens/create.d.ts.map +1 -1
  48. package/dist/src/tokens/create.js +1340 -1647
  49. package/dist/src/tokens/format.d.ts.map +1 -1
  50. package/dist/src/tokens/format.js +1360 -1667
  51. package/dist/src/tokens/index.js +1360 -1667
  52. package/dist/src/tokens/process/output/declarations.js +4 -5
  53. package/dist/src/tokens/process/output/theme.js +4 -5
  54. package/dist/src/tokens/types.d.ts +7 -0
  55. package/dist/src/tokens/types.d.ts.map +1 -1
  56. package/package.json +5 -6
  57. package/dist/color.base.template-Z7YWN2TF.json +0 -22
  58. package/dist/color.template-LMPUQ72A.json +0 -66
  59. package/dist/color.template-XQNSHLTU.json +0 -66
  60. package/dist/global-Y35YADVH.json +0 -100
  61. package/dist/globals-76VAFMDF.json +0 -143
  62. package/dist/large-CIIHO7AY.json +0 -96
  63. package/dist/large-UUOZ6DYI.json +0 -16
  64. package/dist/medium-OQ7S7P4P.json +0 -16
  65. package/dist/medium-VSB2S4X3.json +0 -96
  66. package/dist/small-AEXJ6U7Z.json +0 -96
  67. package/dist/small-ZY4KOJWX.json +0 -16
  68. package/dist/src/scripts/update-template.d.ts +0 -2
  69. package/dist/src/scripts/update-template.d.ts.map +0 -1
  70. package/dist/src/scripts/update-template.js +0 -1366
  71. package/dist/src/tokens/create/defaults.d.ts +0 -7
  72. package/dist/src/tokens/create/defaults.d.ts.map +0 -1
  73. package/dist/src/tokens/create/defaults.js +0 -998
  74. package/dist/src/tokens/create/generators/color.d.ts +0 -5
  75. package/dist/src/tokens/create/generators/color.d.ts.map +0 -1
  76. package/dist/src/tokens/create/generators/semantic.d.ts +0 -32
  77. package/dist/src/tokens/create/generators/semantic.d.ts.map +0 -1
  78. package/dist/src/tokens/create/generators/theme.d.ts.map +0 -1
  79. package/dist/src/tokens/create/generators/typography.d.ts +0 -3
  80. package/dist/src/tokens/create/generators/typography.d.ts.map +0 -1
  81. package/dist/src/tokens/create/generators/typography.js +0 -33
  82. package/dist/src/tokens/template/design-tokens/primitives/globals.js +0 -5
  83. package/dist/src/tokens/template/design-tokens/primitives/modes/size/global.js +0 -5
  84. package/dist/src/tokens/template/design-tokens/primitives/modes/size/large.js +0 -5
  85. package/dist/src/tokens/template/design-tokens/primitives/modes/size/medium.js +0 -5
  86. package/dist/src/tokens/template/design-tokens/primitives/modes/size/small.js +0 -5
  87. package/dist/src/tokens/template/design-tokens/primitives/modes/typography/size/large.js +0 -5
  88. package/dist/src/tokens/template/design-tokens/primitives/modes/typography/size/medium.js +0 -5
  89. package/dist/src/tokens/template/design-tokens/primitives/modes/typography/size/small.js +0 -5
  90. package/dist/src/tokens/template/design-tokens/primitives/modes/typography/typography.template.js +0 -5
  91. package/dist/src/tokens/template/design-tokens/semantic/color.base.template.js +0 -5
  92. package/dist/src/tokens/template/design-tokens/semantic/color.template.js +0 -5
  93. package/dist/src/tokens/template/design-tokens/semantic/modes/color.template.js +0 -5
  94. package/dist/src/tokens/template/design-tokens/semantic/style.js +0 -5
  95. package/dist/src/tokens/template/design-tokens/themes/theme.base.template.js +0 -5
  96. package/dist/src/tokens/template/design-tokens/themes/theme.template.js +0 -5
  97. package/dist/style-FP5XVCUD.json +0 -378
  98. package/dist/theme.base.template-Y4RMFBQY.json +0 -55
  99. package/dist/theme.template-CTQRNOMO.json +0 -66
  100. package/dist/typography.template-4N5YLH7F.json +0 -22
@@ -4,7 +4,7 @@ import pc3 from "picocolors";
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "@digdir/designsystemet",
7
- version: "1.11.1",
7
+ version: "1.12.1",
8
8
  description: "CLI for Designsystemet",
9
9
  author: "Designsystemet team",
10
10
  engines: {
@@ -56,9 +56,8 @@ var package_default = {
56
56
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
57
57
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
58
58
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
59
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
59
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../design-tokens --dry",
60
60
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
61
- "update:template": "tsx ./src/scripts/update-template.ts",
62
61
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
63
62
  verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
64
63
  },
@@ -75,14 +74,14 @@ var package_default = {
75
74
  picocolors: "^1.1.1",
76
75
  postcss: "^8.5.6",
77
76
  ramda: "^0.32.0",
78
- "style-dictionary": "^5.2.0",
77
+ "style-dictionary": "^5.3.0",
79
78
  zod: "^4.3.6",
80
79
  "zod-validation-error": "^5.0.0"
81
80
  },
82
81
  devDependencies: {
83
82
  "@tokens-studio/types": "0.5.2",
84
83
  "@types/chroma-js": "^3.1.2",
85
- "@types/node": "^24.10.9",
84
+ "@types/node": "^24.10.13",
86
85
  "@types/object-hash": "^3.0.6",
87
86
  "@types/ramda": "^0.31.1",
88
87
  tsup: "^8.5.1",
@@ -5,7 +5,7 @@ import * as R2 from "ramda";
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@digdir/designsystemet",
8
- version: "1.11.1",
8
+ version: "1.12.1",
9
9
  description: "CLI for Designsystemet",
10
10
  author: "Designsystemet team",
11
11
  engines: {
@@ -57,9 +57,8 @@ var package_default = {
57
57
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
58
58
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
59
59
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
60
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
60
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../design-tokens --dry",
61
61
  test: "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
62
- "update:template": "tsx ./src/scripts/update-template.ts",
63
62
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
64
63
  verify: "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
65
64
  },
@@ -76,14 +75,14 @@ var package_default = {
76
75
  picocolors: "^1.1.1",
77
76
  postcss: "^8.5.6",
78
77
  ramda: "^0.32.0",
79
- "style-dictionary": "^5.2.0",
78
+ "style-dictionary": "^5.3.0",
80
79
  zod: "^4.3.6",
81
80
  "zod-validation-error": "^5.0.0"
82
81
  },
83
82
  devDependencies: {
84
83
  "@tokens-studio/types": "0.5.2",
85
84
  "@types/chroma-js": "^3.1.2",
86
- "@types/node": "^24.10.9",
85
+ "@types/node": "^24.10.13",
87
86
  "@types/object-hash": "^3.0.6",
88
87
  "@types/ramda": "^0.31.1",
89
88
  tsup: "^8.5.1",
@@ -4,6 +4,12 @@ import type { GetStyleDictionaryConfig } from './process/configs/shared.js';
4
4
  export type Token = {
5
5
  $value: string | Record<string, string>[];
6
6
  $type: string;
7
+ } | {
8
+ $type: 'boxShadow';
9
+ $value: Record<'x' | 'y' | 'blur' | 'spread' | 'color', string>[];
10
+ } | {
11
+ $type: 'typography';
12
+ $value: Record<'fontFamily' | 'fontWeight' | 'lineHeight' | 'fontSize' | 'letterSpacing', string>;
7
13
  };
8
14
  export type TokenSet = {
9
15
  [key: string]: Token | TokenSet;
@@ -20,6 +26,7 @@ export declare const colorCategories: {
20
26
  };
21
27
  export type ColorCategories = keyof typeof colorCategories;
22
28
  export type BuiltInColors = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
29
+ export type SizeModes = 'small' | 'medium' | 'large';
23
30
  /**
24
31
  * A multi-dimensional theme is a concrete permutation of the possible theme dimensions
25
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,MAAM,MAAM,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACjF,MAAM,MAAM,QAAQ,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;CACjC,CAA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AM,CAAC;IACd,6CAA6C;IAC7C,SAAS,EAAE,wBAAwB,CAAC;IACpC,0FAA0F;IAC1F,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,0BAA0B;IAC1B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,MAAM,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAAE,WAAW,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet",
3
- "version": "1.11.1",
3
+ "version": "1.12.1",
4
4
  "description": "CLI for Designsystemet",
5
5
  "author": "Designsystemet team",
6
6
  "engines": {
@@ -48,15 +48,15 @@
48
48
  "picocolors": "^1.1.1",
49
49
  "postcss": "^8.5.6",
50
50
  "ramda": "^0.32.0",
51
- "style-dictionary": "^5.2.0",
51
+ "style-dictionary": "^5.3.0",
52
52
  "zod": "^4.3.6",
53
53
  "zod-validation-error": "^5.0.0",
54
- "@digdir/designsystemet-types": "^1.11.1"
54
+ "@digdir/designsystemet-types": "^1.12.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@tokens-studio/types": "0.5.2",
58
58
  "@types/chroma-js": "^3.1.2",
59
- "@types/node": "^24.10.9",
59
+ "@types/node": "^24.10.13",
60
60
  "@types/object-hash": "^3.0.6",
61
61
  "@types/ramda": "^0.31.1",
62
62
  "tsup": "^8.5.1",
@@ -79,9 +79,8 @@
79
79
  "test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
80
80
  "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
81
81
  "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
82
- "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../internal/digdir/design-tokens --dry",
82
+ "test:generate-config-from-tokens": "pnpm run designsystemet generate-config-from-tokens -d ../../design-tokens --dry",
83
83
  "test": "node -v && pnpm test:tokens-create-and-build-options && pnpm test:generate-config-from-tokens && pnpm test:tokens-create-and-build-config",
84
- "update:template": "tsx ./src/scripts/update-template.ts",
85
84
  "update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
86
85
  "verify": "pnpm test && pnpm update:template && pnpm --filter @internal/digdir update:theme-digdir"
87
86
  }
@@ -1,22 +0,0 @@
1
- {
2
- "color": {
3
- "focus": {
4
- "inner": {
5
- "$type": "color",
6
- "$value": "{color.focus.inner-color}"
7
- },
8
- "outer": {
9
- "$type": "color",
10
- "$value": "{color.focus.outer-color}"
11
- }
12
- }
13
- },
14
- "link": {
15
- "color": {
16
- "visited": {
17
- "$type": "color",
18
- "$value": "{color.link.visited}"
19
- }
20
- }
21
- }
22
- }
@@ -1,66 +0,0 @@
1
- {
2
- "background-default": {
3
- "$type": "color",
4
- "$value": "{color.<color>.background-default}"
5
- },
6
- "background-tinted": {
7
- "$type": "color",
8
- "$value": "{color.<color>.background-tinted}"
9
- },
10
- "surface-default": {
11
- "$type": "color",
12
- "$value": "{color.<color>.surface-default}"
13
- },
14
- "surface-tinted": {
15
- "$type": "color",
16
- "$value": "{color.<color>.surface-tinted}"
17
- },
18
- "surface-hover": {
19
- "$type": "color",
20
- "$value": "{color.<color>.surface-hover}"
21
- },
22
- "surface-active": {
23
- "$type": "color",
24
- "$value": "{color.<color>.surface-active}"
25
- },
26
- "border-subtle": {
27
- "$type": "color",
28
- "$value": "{color.<color>.border-subtle}"
29
- },
30
- "border-default": {
31
- "$type": "color",
32
- "$value": "{color.<color>.border-default}"
33
- },
34
- "border-strong": {
35
- "$type": "color",
36
- "$value": "{color.<color>.border-strong}"
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
- },
46
- "base-default": {
47
- "$type": "color",
48
- "$value": "{color.<color>.base-default}"
49
- },
50
- "base-hover": {
51
- "$type": "color",
52
- "$value": "{color.<color>.base-hover}"
53
- },
54
- "base-active": {
55
- "$type": "color",
56
- "$value": "{color.<color>.base-active}"
57
- },
58
- "base-contrast-subtle": {
59
- "$type": "color",
60
- "$value": "{color.<color>.base-contrast-subtle}"
61
- },
62
- "base-contrast-default": {
63
- "$type": "color",
64
- "$value": "{color.<color>.base-contrast-default}"
65
- }
66
- }
@@ -1,66 +0,0 @@
1
- {
2
- "background-default": {
3
- "$type": "color",
4
- "$value": "{color.<color>.1}"
5
- },
6
- "background-tinted": {
7
- "$type": "color",
8
- "$value": "{color.<color>.2}"
9
- },
10
- "surface-default": {
11
- "$type": "color",
12
- "$value": "{color.<color>.3}"
13
- },
14
- "surface-tinted": {
15
- "$type": "color",
16
- "$value": "{color.<color>.4}"
17
- },
18
- "surface-hover": {
19
- "$type": "color",
20
- "$value": "{color.<color>.5}"
21
- },
22
- "surface-active": {
23
- "$type": "color",
24
- "$value": "{color.<color>.6}"
25
- },
26
- "border-subtle": {
27
- "$type": "color",
28
- "$value": "{color.<color>.7}"
29
- },
30
- "border-default": {
31
- "$type": "color",
32
- "$value": "{color.<color>.8}"
33
- },
34
- "border-strong": {
35
- "$type": "color",
36
- "$value": "{color.<color>.9}"
37
- },
38
- "text-subtle": {
39
- "$type": "color",
40
- "$value": "{color.<color>.10}"
41
- },
42
- "text-default": {
43
- "$type": "color",
44
- "$value": "{color.<color>.11}"
45
- },
46
- "base-default": {
47
- "$type": "color",
48
- "$value": "{color.<color>.12}"
49
- },
50
- "base-hover": {
51
- "$type": "color",
52
- "$value": "{color.<color>.13}"
53
- },
54
- "base-active": {
55
- "$type": "color",
56
- "$value": "{color.<color>.14}"
57
- },
58
- "base-contrast-subtle": {
59
- "$type": "color",
60
- "$value": "{color.<color>.15}"
61
- },
62
- "base-contrast-default": {
63
- "$type": "color",
64
- "$value": "{color.<color>.16}"
65
- }
66
- }
@@ -1,100 +0,0 @@
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
- }
@@ -1,143 +0,0 @@
1
- {
2
- "border-width": {
3
- "1": {
4
- "$type": "borderWidth",
5
- "$value": "1px"
6
- },
7
- "3": {
8
- "$type": "borderWidth",
9
- "$value": "3px"
10
- }
11
- },
12
- "shadow": {
13
- "100": {
14
- "$type": "boxShadow",
15
- "$value": [
16
- {
17
- "color": "rgba(0,0,0,0.16)",
18
- "x": "0",
19
- "y": "0",
20
- "blur": "1",
21
- "spread": "0"
22
- },
23
- {
24
- "x": "0",
25
- "y": "1",
26
- "blur": "2",
27
- "spread": "0",
28
- "color": "rgba(0,0,0,0.12)"
29
- }
30
- ]
31
- },
32
- "200": {
33
- "$type": "boxShadow",
34
- "$value": [
35
- {
36
- "color": "rgba(0,0,0,0.15)",
37
- "x": "0",
38
- "y": "0",
39
- "blur": "1",
40
- "spread": "0"
41
- },
42
- {
43
- "color": "rgba(0,0,0,0.12)",
44
- "x": "0",
45
- "y": "1",
46
- "blur": "2",
47
- "spread": "0"
48
- },
49
- {
50
- "x": "0",
51
- "y": "2",
52
- "blur": "4",
53
- "spread": "0",
54
- "color": "rgba(0,0,0,0.1)"
55
- }
56
- ]
57
- },
58
- "300": {
59
- "$type": "boxShadow",
60
- "$value": [
61
- {
62
- "color": "rgba(0,0,0,0.14)",
63
- "x": "0",
64
- "y": "0",
65
- "blur": "1",
66
- "spread": "0"
67
- },
68
- {
69
- "color": "rgba(0,0,0,0.12)",
70
- "x": "0",
71
- "y": "2",
72
- "blur": "4",
73
- "spread": "0"
74
- },
75
- {
76
- "x": "0",
77
- "y": "4",
78
- "blur": "8",
79
- "spread": "0",
80
- "color": "rgba(0,0,0,0.12)"
81
- }
82
- ]
83
- },
84
- "400": {
85
- "$type": "boxShadow",
86
- "$value": [
87
- {
88
- "color": "rgba(0,0,0,0.13)",
89
- "x": "0",
90
- "y": "0",
91
- "blur": "1",
92
- "spread": "0"
93
- },
94
- {
95
- "color": "rgba(0,0,0,0.13)",
96
- "x": "0",
97
- "y": "3",
98
- "blur": "5",
99
- "spread": "0"
100
- },
101
- {
102
- "x": "0",
103
- "y": "6",
104
- "blur": "12",
105
- "spread": "0",
106
- "color": "rgba(0,0,0,0.14)"
107
- }
108
- ]
109
- },
110
- "500": {
111
- "$type": "boxShadow",
112
- "$value": [
113
- {
114
- "color": "rgba(0,0,0,0.12)",
115
- "x": "0",
116
- "y": "0",
117
- "blur": "1",
118
- "spread": "0"
119
- },
120
- {
121
- "color": "rgba(0,0,0,0.16)",
122
- "x": "0",
123
- "y": "4",
124
- "blur": "8",
125
- "spread": "0"
126
- },
127
- {
128
- "x": "0",
129
- "y": "12",
130
- "blur": "24",
131
- "spread": "0",
132
- "color": "rgba(0,0,0,0.16)"
133
- }
134
- ]
135
- }
136
- },
137
- "opacity": {
138
- "30": {
139
- "$type": "opacity",
140
- "$value": "30%"
141
- }
142
- }
143
- }
@@ -1,96 +0,0 @@
1
- {
2
- "line-height": {
3
- "sm": {
4
- "$type": "lineHeights",
5
- "$value": "130%"
6
- },
7
- "md": {
8
- "$type": "lineHeights",
9
- "$value": "150%"
10
- },
11
- "lg": {
12
- "$type": "lineHeights",
13
- "$value": "170%"
14
- }
15
- },
16
- "font-size": {
17
- "1": {
18
- "$type": "fontSizes",
19
- "$value": "13"
20
- },
21
- "2": {
22
- "$type": "fontSizes",
23
- "$value": "16"
24
- },
25
- "3": {
26
- "$type": "fontSizes",
27
- "$value": "18"
28
- },
29
- "4": {
30
- "$type": "fontSizes",
31
- "$value": "21"
32
- },
33
- "5": {
34
- "$type": "fontSizes",
35
- "$value": "24"
36
- },
37
- "6": {
38
- "$type": "fontSizes",
39
- "$value": "30"
40
- },
41
- "7": {
42
- "$type": "fontSizes",
43
- "$value": "36"
44
- },
45
- "8": {
46
- "$type": "fontSizes",
47
- "$value": "48"
48
- },
49
- "9": {
50
- "$type": "fontSizes",
51
- "$value": "60"
52
- },
53
- "10": {
54
- "$type": "fontSizes",
55
- "$value": "72"
56
- }
57
- },
58
- "letter-spacing": {
59
- "1": {
60
- "$type": "letterSpacing",
61
- "$value": "-1%"
62
- },
63
- "2": {
64
- "$type": "letterSpacing",
65
- "$value": "-0.5%"
66
- },
67
- "3": {
68
- "$type": "letterSpacing",
69
- "$value": "-0.25%"
70
- },
71
- "4": {
72
- "$type": "letterSpacing",
73
- "$value": "-0.15%"
74
- },
75
- "5": {
76
- "$type": "letterSpacing",
77
- "$value": "0%"
78
- },
79
- "6": {
80
- "$type": "letterSpacing",
81
- "$value": "0.15%"
82
- },
83
- "7": {
84
- "$type": "letterSpacing",
85
- "$value": "0.25%"
86
- },
87
- "8": {
88
- "$type": "letterSpacing",
89
- "$value": "0.5%"
90
- },
91
- "9": {
92
- "$type": "letterSpacing",
93
- "$value": "1.5%"
94
- }
95
- }
96
- }
@@ -1,16 +0,0 @@
1
- {
2
- "size": {
3
- "_mode-font-size": {
4
- "$type": "dimension",
5
- "$value": "21"
6
- },
7
- "_base": {
8
- "$type": "dimension",
9
- "$value": "18"
10
- },
11
- "_step": {
12
- "$type": "dimension",
13
- "$value": "4"
14
- }
15
- }
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "size": {
3
- "_mode-font-size": {
4
- "$type": "dimension",
5
- "$value": "18"
6
- },
7
- "_base": {
8
- "$type": "dimension",
9
- "$value": "18"
10
- },
11
- "_step": {
12
- "$type": "dimension",
13
- "$value": "4"
14
- }
15
- }
16
- }