@amsterdam/design-system-tokens 3.0.0 → 3.2.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 (107) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +45 -1
  3. package/build.js +25 -35
  4. package/dist/compact.css +2 -2
  5. package/dist/compact.d.ts +3 -3
  6. package/dist/compact.mjs +2 -2
  7. package/dist/compact.scss +2 -2
  8. package/dist/compact.theme.css +2 -2
  9. package/dist/index.css +118 -47
  10. package/dist/index.d.ts +174 -9
  11. package/dist/index.json +197 -32
  12. package/dist/index.mjs +176 -70
  13. package/dist/index.scss +118 -47
  14. package/dist/index.theme.css +118 -47
  15. package/package.json +2 -2
  16. package/src/brand/ams/aspect-ratio.tokens.json +18 -6
  17. package/src/brand/ams/border.compact.tokens.json +36 -4
  18. package/src/brand/ams/border.tokens.json +36 -4
  19. package/src/brand/ams/color.deprecated.tokens.json +3 -2
  20. package/src/brand/ams/color.tokens.json +106 -23
  21. package/src/brand/ams/cursor.tokens.json +6 -2
  22. package/src/brand/ams/focus.tokens.json +10 -1
  23. package/src/brand/ams/space.compact.tokens.json +30 -6
  24. package/src/brand/ams/space.tokens.json +24 -6
  25. package/src/brand/ams/typography.compact.tokens.json +110 -18
  26. package/src/brand/ams/typography.deprecated.compact.tokens.json +10 -4
  27. package/src/brand/ams/typography.deprecated.tokens.json +20 -8
  28. package/src/brand/ams/typography.tokens.json +131 -24
  29. package/src/common/ams/inputs.tokens.json +121 -18
  30. package/src/common/ams/links.tokens.json +72 -12
  31. package/src/components/ams/accordion.deprecated.tokens.json +29 -7
  32. package/src/components/ams/accordion.tokens.json +46 -8
  33. package/src/components/ams/action-group.tokens.json +7 -1
  34. package/src/components/ams/alert.tokens.json +83 -16
  35. package/src/components/ams/avatar.tokens.json +139 -31
  36. package/src/components/ams/badge.tokens.json +98 -21
  37. package/src/components/ams/blockquote.tokens.json +28 -6
  38. package/src/components/ams/breadcrumb.tokens.json +68 -15
  39. package/src/components/ams/button.tokens.json +176 -34
  40. package/src/components/ams/call-to-action-link.tokens.json +73 -14
  41. package/src/components/ams/card.tokens.json +60 -11
  42. package/src/components/ams/character-count.tokens.json +28 -6
  43. package/src/components/ams/checkbox.deprecated.tokens.json +23 -7
  44. package/src/components/ams/checkbox.tokens.json +154 -36
  45. package/src/components/ams/column.tokens.json +35 -5
  46. package/src/components/ams/date-input.deprecated.tokens.json +14 -8
  47. package/src/components/ams/date-input.tokens.json +92 -25
  48. package/src/components/ams/description-list.tokens.json +86 -13
  49. package/src/components/ams/dialog.tokens.json +144 -23
  50. package/src/components/ams/error-message.tokens.json +31 -6
  51. package/src/components/ams/field-set.deprecated.tokens.json +8 -1
  52. package/src/components/ams/field-set.tokens.json +69 -13
  53. package/src/components/ams/field.deprecated.tokens.json +8 -1
  54. package/src/components/ams/field.tokens.json +24 -4
  55. package/src/components/ams/figure.tokens.json +35 -7
  56. package/src/components/ams/file-input.tokens.json +143 -29
  57. package/src/components/ams/file-list.tokens.json +49 -9
  58. package/src/components/ams/grid.compact.tokens.json +7 -1
  59. package/src/components/ams/grid.tokens.json +79 -13
  60. package/src/components/ams/heading.tokens.json +91 -17
  61. package/src/components/ams/hint.tokens.json +8 -2
  62. package/src/components/ams/icon-button.tokens.json +69 -17
  63. package/src/components/ams/icon.deprecated.tokens.json +10 -4
  64. package/src/components/ams/icon.tokens.json +112 -19
  65. package/src/components/ams/image-slider.tokens.json +60 -10
  66. package/src/components/ams/image.tokens.json +3 -1
  67. package/src/components/ams/invalid-form-alert.tokens.json +7 -1
  68. package/src/components/ams/label.tokens.json +31 -7
  69. package/src/components/ams/link-list.tokens.json +106 -21
  70. package/src/components/ams/link.tokens.json +73 -15
  71. package/src/components/ams/logo.tokens.json +23 -5
  72. package/src/components/ams/mark.tokens.json +4 -1
  73. package/src/components/ams/menu.deprecated.tokens.json +12 -8
  74. package/src/components/ams/menu.tokens.json +119 -21
  75. package/src/components/ams/ordered-list.tokens.json +110 -22
  76. package/src/components/ams/page-footer.tokens.json +98 -18
  77. package/src/components/ams/page-header.compact.tokens.json +19 -3
  78. package/src/components/ams/page-header.tokens.json +214 -34
  79. package/src/components/ams/page-heading.deprecated.tokens.json +38 -8
  80. package/src/components/ams/page.tokens.json +24 -5
  81. package/src/components/ams/pagination.tokens.json +70 -14
  82. package/src/components/ams/paragraph.tokens.json +55 -11
  83. package/src/components/ams/password-input.tokens.json +92 -19
  84. package/src/components/ams/progress-list.tokens.json +372 -0
  85. package/src/components/ams/radio.tokens.json +142 -33
  86. package/src/components/ams/row.tokens.json +35 -5
  87. package/src/components/ams/search-field.tokens.json +101 -22
  88. package/src/components/ams/select.tokens.json +97 -24
  89. package/src/components/ams/skip-link.tokens.json +53 -10
  90. package/src/components/ams/spotlight.tokens.json +28 -7
  91. package/src/components/ams/standalone-link.deprecated.tokens.json +16 -10
  92. package/src/components/ams/standalone-link.tokens.json +75 -16
  93. package/src/components/ams/switch.tokens.json +57 -12
  94. package/src/components/ams/table-of-contents.deprecated.tokens.json +16 -3
  95. package/src/components/ams/table-of-contents.tokens.json +80 -15
  96. package/src/components/ams/table.tokens.json +49 -10
  97. package/src/components/ams/tabs.tokens.json +130 -17
  98. package/src/components/ams/text-area.tokens.json +97 -20
  99. package/src/components/ams/text-input.tokens.json +90 -19
  100. package/src/components/ams/time-input.deprecated.tokens.json +14 -8
  101. package/src/components/ams/time-input.tokens.json +90 -25
  102. package/src/components/ams/unordered-list.tokens.json +112 -22
  103. package/style-dictionary/dimensionToString.js +25 -0
  104. package/style-dictionary/transforms/dtcg-dimension.js +30 -0
  105. package/style-dictionary/transforms/name-custom-camel.js +27 -0
  106. package/style-dictionary/transforms/name-custom-kebab.js +27 -0
  107. package/style-dictionary/transforms/shadow-dtcg-dimension-normalize.js +50 -0
@@ -1,14 +1,33 @@
1
1
  {
2
2
  "ams": {
3
3
  "page": {
4
- "background-color": { "value": "{ams.color.background}" },
5
- "max-inline-size": { "value": "90rem" },
4
+ "background-color": {
5
+ "$value": "{ams.color.background}",
6
+ "$type": "color"
7
+ },
8
+ "max-inline-size": {
9
+ "$value": {
10
+ "value": 90,
11
+ "unit": "rem"
12
+ },
13
+ "$type": "dimension"
14
+ },
6
15
  "with-menu": {
7
- "max-inline-size": { "value": "120rem" },
16
+ "max-inline-size": {
17
+ "$value": {
18
+ "value": 120,
19
+ "unit": "rem"
20
+ },
21
+ "$type": "dimension"
22
+ },
8
23
  "area-skip-link": {
9
24
  "margin-inline-end": {
10
- "value": "{ams.grid.padding-inline}",
11
- "comment": "Must be the Grid inline padding, to make sure Skip Link and Grid line up"
25
+ "$value": "{ams.grid.padding-inline}",
26
+ "$type": "dimension",
27
+ "$extensions": {
28
+ "nl.amsterdam.hint": "Must be the Grid inline padding, to make sure Skip Link and Grid line up.",
29
+ "nl.amsterdam.subtype": "space"
30
+ }
12
31
  }
13
32
  }
14
33
  }
@@ -1,24 +1,80 @@
1
1
  {
2
2
  "ams": {
3
3
  "pagination": {
4
- "font-family": { "value": "{ams.typography.font-family}" },
5
- "font-size": { "value": "{ams.typography.body-text.font-size}" },
6
- "font-weight": { "value": "{ams.typography.body-text.font-weight}" },
7
- "line-height": { "value": "{ams.typography.body-text.line-height}" },
4
+ "font-family": {
5
+ "$value": "{ams.typography.font-family}",
6
+ "$type": "fontFamily"
7
+ },
8
+ "font-size": {
9
+ "$value": "{ams.typography.body-text.font-size}",
10
+ "$extensions": {
11
+ "nl.amsterdam.type": "fontSize"
12
+ }
13
+ },
14
+ "font-weight": {
15
+ "$value": "{ams.typography.body-text.font-weight}",
16
+ "$type": "fontWeight"
17
+ },
18
+ "line-height": {
19
+ "$value": "{ams.typography.body-text.line-height}",
20
+ "$extensions": {
21
+ "nl.amsterdam.type": "lineHeight"
22
+ }
23
+ },
8
24
  "link": {
9
- "color": { "value": "{ams.links.color}" },
10
- "gap": { "value": "{ams.space.xs}" },
11
- "outline-offset": { "value": "{ams.focus.outline-offset}" },
12
- "padding-inline": { "value": "{ams.space.s}" },
13
- "text-decoration-line": { "value": "{ams.links.subtle.text-decoration-line}" },
14
- "text-decoration-thickness": { "value": "{ams.links.text-decoration-thickness}" },
15
- "text-underline-offset": { "value": "{ams.links.text-underline-offset}" },
25
+ "color": {
26
+ "$value": "{ams.links.color}",
27
+ "$type": "color"
28
+ },
29
+ "gap": {
30
+ "$value": "{ams.space.xs}",
31
+ "$type": "dimension",
32
+ "$extensions": {
33
+ "nl.amsterdam.subtype": "space"
34
+ }
35
+ },
36
+ "outline-offset": {
37
+ "$value": "{ams.focus.outline-offset}",
38
+ "$type": "dimension",
39
+ "$extensions": {
40
+ "nl.amsterdam.subtype": "space"
41
+ }
42
+ },
43
+ "padding-inline": {
44
+ "$value": "{ams.space.s}",
45
+ "$type": "dimension",
46
+ "$extensions": {
47
+ "nl.amsterdam.subtype": "space"
48
+ }
49
+ },
50
+ "text-decoration-line": {
51
+ "$value": "{ams.links.subtle.text-decoration-line}"
52
+ },
53
+ "text-decoration-thickness": {
54
+ "$value": "{ams.links.text-decoration-thickness}",
55
+ "$type": "dimension"
56
+ },
57
+ "text-underline-offset": {
58
+ "$value": "{ams.links.text-underline-offset}",
59
+ "$type": "dimension",
60
+ "$extensions": {
61
+ "nl.amsterdam.subtype": "space"
62
+ }
63
+ },
16
64
  "current": {
17
- "font-weight": { "value": "{ams.typography.body-text.bold.font-weight}" }
65
+ "font-weight": {
66
+ "$value": "{ams.typography.body-text.bold.font-weight}",
67
+ "$type": "fontWeight"
68
+ }
18
69
  },
19
70
  "hover": {
20
- "color": { "value": "{ams.links.hover.color}" },
21
- "text-decoration-line": { "value": "{ams.links.subtle.hover.text-decoration-line}" }
71
+ "color": {
72
+ "$value": "{ams.links.hover.color}",
73
+ "$type": "color"
74
+ },
75
+ "text-decoration-line": {
76
+ "$value": "{ams.links.subtle.hover.text-decoration-line}"
77
+ }
22
78
  }
23
79
  }
24
80
  }
@@ -1,22 +1,66 @@
1
1
  {
2
2
  "ams": {
3
3
  "paragraph": {
4
- "color": { "value": "{ams.color.text.default}" },
5
- "font-family": { "value": "{ams.typography.font-family}" },
6
- "font-size": { "value": "{ams.typography.body-text.font-size}" },
7
- "font-weight": { "value": "{ams.typography.body-text.font-weight}" },
8
- "line-height": { "value": "{ams.typography.body-text.line-height}" },
4
+ "color": {
5
+ "$value": "{ams.color.text.default}",
6
+ "$type": "color"
7
+ },
8
+ "font-family": {
9
+ "$value": "{ams.typography.font-family}",
10
+ "$type": "fontFamily"
11
+ },
12
+ "font-size": {
13
+ "$value": "{ams.typography.body-text.font-size}",
14
+ "$extensions": {
15
+ "nl.amsterdam.type": "fontSize"
16
+ }
17
+ },
18
+ "font-weight": {
19
+ "$value": "{ams.typography.body-text.font-weight}",
20
+ "$type": "fontWeight"
21
+ },
22
+ "line-height": {
23
+ "$value": "{ams.typography.body-text.line-height}",
24
+ "$extensions": {
25
+ "nl.amsterdam.type": "lineHeight"
26
+ }
27
+ },
9
28
  "inverse": {
10
- "color": { "value": "{ams.color.text.inverse}" }
29
+ "color": {
30
+ "$value": "{ams.color.text.inverse}",
31
+ "$type": "color"
32
+ }
11
33
  },
12
34
  "small": {
13
- "font-size": { "value": "{ams.typography.body-text.small.font-size}" },
14
- "line-height": { "value": "{ams.typography.body-text.small.line-height}" }
35
+ "font-size": {
36
+ "$value": "{ams.typography.body-text.small.font-size}",
37
+ "$extensions": {
38
+ "nl.amsterdam.type": "fontSize"
39
+ }
40
+ },
41
+ "line-height": {
42
+ "$value": "{ams.typography.body-text.small.line-height}",
43
+ "$extensions": {
44
+ "nl.amsterdam.type": "lineHeight"
45
+ }
46
+ }
15
47
  },
16
48
  "large": {
17
- "font-size": { "value": "{ams.typography.body-text.large.font-size}" },
18
- "line-height": { "value": "{ams.typography.body-text.large.line-height}" },
19
- "text-wrap": { "value": "balance" }
49
+ "font-size": {
50
+ "$value": "{ams.typography.body-text.large.font-size}",
51
+ "$extensions": {
52
+ "nl.amsterdam.type": "fontSize"
53
+ }
54
+ },
55
+ "line-height": {
56
+ "$value": "{ams.typography.body-text.large.line-height}",
57
+ "$extensions": {
58
+ "nl.amsterdam.type": "lineHeight"
59
+ }
60
+ },
61
+ "text-wrap": {
62
+ "$value": "balance"
63
+ }
20
64
  }
21
65
  }
22
66
  }
@@ -1,34 +1,107 @@
1
1
  {
2
2
  "ams": {
3
3
  "password-input": {
4
- "background-color": { "value": "{ams.inputs.background-color}" },
5
- "border-color": { "value": "{ams.inputs.border-color}" },
6
- "border-style": { "value": "{ams.inputs.border-style}" },
7
- "border-width": { "value": "{ams.inputs.border-width}" },
8
- "color": { "value": "{ams.inputs.color}" },
9
- "font-family": { "value": "{ams.inputs.font-family}" },
10
- "font-size": { "value": "{ams.inputs.font-size}" },
11
- "font-weight": { "value": "{ams.inputs.font-weight}" },
12
- "line-height": { "value": "{ams.inputs.line-height}" },
13
- "outline-offset": { "value": "{ams.inputs.outline-offset}" },
14
- "padding-block": { "value": "{ams.inputs.padding-block}" },
15
- "padding-inline": { "value": "{ams.inputs.padding-inline}" },
4
+ "background-color": {
5
+ "$value": "{ams.inputs.background-color}",
6
+ "$type": "color"
7
+ },
8
+ "border-color": {
9
+ "$value": "{ams.inputs.border-color}",
10
+ "$type": "color"
11
+ },
12
+ "border-style": {
13
+ "$value": "{ams.inputs.border-style}",
14
+ "$extensions": {
15
+ "nl.amsterdam.type": "borderStyle"
16
+ }
17
+ },
18
+ "border-width": {
19
+ "$value": "{ams.inputs.border-width}",
20
+ "$extensions": {
21
+ "nl.amsterdam.type": "borderWidth"
22
+ }
23
+ },
24
+ "color": {
25
+ "$value": "{ams.inputs.color}",
26
+ "$type": "color"
27
+ },
28
+ "font-family": {
29
+ "$value": "{ams.inputs.font-family}",
30
+ "$type": "fontFamily"
31
+ },
32
+ "font-size": {
33
+ "$value": "{ams.inputs.font-size}",
34
+ "$extensions": {
35
+ "nl.amsterdam.type": "fontSize"
36
+ }
37
+ },
38
+ "font-weight": {
39
+ "$value": "{ams.inputs.font-weight}",
40
+ "$type": "fontWeight"
41
+ },
42
+ "line-height": {
43
+ "$value": "{ams.inputs.line-height}",
44
+ "$extensions": {
45
+ "nl.amsterdam.type": "lineHeight"
46
+ }
47
+ },
48
+ "outline-offset": {
49
+ "$value": "{ams.inputs.outline-offset}",
50
+ "$type": "dimension",
51
+ "$extensions": {
52
+ "nl.amsterdam.subtype": "space"
53
+ }
54
+ },
55
+ "padding-block": {
56
+ "$value": "{ams.inputs.padding-block}",
57
+ "$type": "dimension",
58
+ "$extensions": {
59
+ "nl.amsterdam.subtype": "space"
60
+ }
61
+ },
62
+ "padding-inline": {
63
+ "$value": "{ams.inputs.padding-inline}",
64
+ "$type": "dimension",
65
+ "$extensions": {
66
+ "nl.amsterdam.subtype": "space"
67
+ }
68
+ },
16
69
  "disabled": {
17
- "color": { "value": "{ams.inputs.disabled.color}" },
18
- "cursor": { "value": "{ams.cursor.disabled}" }
70
+ "color": {
71
+ "$value": "{ams.inputs.disabled.color}",
72
+ "$type": "color"
73
+ },
74
+ "cursor": {
75
+ "$value": "{ams.cursor.disabled}"
76
+ }
19
77
  },
20
78
  "hover": {
21
- "box-shadow": { "value": "{ams.inputs.hover.box-shadow}" }
79
+ "box-shadow": {
80
+ "$type": "shadow",
81
+ "$value": "{ams.inputs.hover.box-shadow}"
82
+ }
22
83
  },
23
84
  "invalid": {
24
- "border-color": { "value": "{ams.inputs.invalid.border-color}" },
85
+ "border-color": {
86
+ "$value": "{ams.inputs.invalid.border-color}",
87
+ "$type": "color"
88
+ },
25
89
  "hover": {
26
- "border-color": { "value": "{ams.inputs.invalid.hover.border-color}" },
27
- "box-shadow": { "value": "{ams.inputs.invalid.hover.box-shadow}" }
90
+ "border-color": {
91
+ "$value": "{ams.inputs.invalid.hover.border-color}",
92
+ "$type": "color"
93
+ },
94
+ "box-shadow": {
95
+ "$type": "shadow",
96
+ "$value": "{ams.inputs.invalid.hover.box-shadow}"
97
+ }
28
98
  }
29
99
  },
30
100
  "placeholder": {
31
- "color": { "value": "{ams.inputs.placeholder.color}" }
101
+ "color": {
102
+ "$value": "{ams.inputs.placeholder.color}",
103
+ "$type": "color"
104
+ }
32
105
  }
33
106
  }
34
107
  }