@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,33 +1,136 @@
1
1
  {
2
2
  "ams": {
3
3
  "inputs": {
4
- "background-color": { "value": "{ams.color.background}" },
5
- "border-color": { "value": "currentColor" },
6
- "border-style": { "value": "solid" },
7
- "border-width": { "value": "{ams.border.width.m}" },
8
- "color": { "value": "{ams.color.text.default}" },
9
- "font-family": { "value": "{ams.typography.font-family}" },
10
- "font-size": { "value": "{ams.typography.body-text.font-size}" },
11
- "font-weight": { "value": "{ams.typography.body-text.font-weight}" },
12
- "line-height": { "value": "1.4" },
13
- "outline-offset": { "value": "{ams.focus.outline-offset}" },
14
- "padding-block": { "value": "{ams.space.s}" },
15
- "padding-inline": { "value": "{ams.space.m}" },
4
+ "background-color": {
5
+ "$value": "{ams.color.background}",
6
+ "$type": "color"
7
+ },
8
+ "border-color": {
9
+ "$value": "currentColor",
10
+ "$type": "color"
11
+ },
12
+ "border-style": {
13
+ "$value": "solid",
14
+ "$extensions": {
15
+ "nl.amsterdam.type": "borderStyle"
16
+ }
17
+ },
18
+ "border-width": {
19
+ "$value": "{ams.border.width.m}",
20
+ "$extensions": {
21
+ "nl.amsterdam.type": "borderWidth"
22
+ }
23
+ },
24
+ "color": {
25
+ "$value": "{ams.color.text.default}",
26
+ "$type": "color"
27
+ },
28
+ "font-family": {
29
+ "$value": "{ams.typography.font-family}",
30
+ "$type": "fontFamily"
31
+ },
32
+ "font-size": {
33
+ "$value": "{ams.typography.body-text.font-size}",
34
+ "$extensions": {
35
+ "nl.amsterdam.type": "fontSize"
36
+ }
37
+ },
38
+ "font-weight": {
39
+ "$value": "{ams.typography.body-text.font-weight}",
40
+ "$type": "fontWeight"
41
+ },
42
+ "line-height": {
43
+ "$value": "1.4",
44
+ "$extensions": {
45
+ "nl.amsterdam.type": "lineHeight"
46
+ }
47
+ },
48
+ "outline-offset": {
49
+ "$value": "{ams.focus.outline-offset}",
50
+ "$type": "dimension",
51
+ "$extensions": {
52
+ "nl.amsterdam.subtype": "space"
53
+ }
54
+ },
55
+ "padding-block": {
56
+ "$value": "{ams.space.s}",
57
+ "$type": "dimension",
58
+ "$extensions": {
59
+ "nl.amsterdam.subtype": "space"
60
+ }
61
+ },
62
+ "padding-inline": {
63
+ "$value": "{ams.space.m}",
64
+ "$type": "dimension",
65
+ "$extensions": {
66
+ "nl.amsterdam.subtype": "space"
67
+ }
68
+ },
16
69
  "disabled": {
17
- "color": { "value": "{ams.color.interactive.disabled}" }
70
+ "color": {
71
+ "$value": "{ams.color.interactive.disabled}",
72
+ "$type": "color"
73
+ }
18
74
  },
19
75
  "hover": {
20
- "box-shadow": { "value": "inset 0 0 0 {ams.border.width.s}" }
76
+ "box-shadow": {
77
+ "$type": "shadow",
78
+ "$value": {
79
+ "inset": true,
80
+ "offsetX": {
81
+ "value": 0,
82
+ "unit": "rem"
83
+ },
84
+ "offsetY": {
85
+ "value": 0,
86
+ "unit": "rem"
87
+ },
88
+ "blur": {
89
+ "value": 0,
90
+ "unit": "rem"
91
+ },
92
+ "spread": "{ams.border.width.s}",
93
+ "color": "currentColor"
94
+ }
95
+ }
21
96
  },
22
97
  "invalid": {
23
- "border-color": { "value": "{ams.color.interactive.invalid.default}" },
98
+ "border-color": {
99
+ "$value": "{ams.color.interactive.invalid.default}",
100
+ "$type": "color"
101
+ },
24
102
  "hover": {
25
- "border-color": { "value": "{ams.color.interactive.invalid.hover}" },
26
- "box-shadow": { "value": "inset 0 0 0 {ams.border.width.s} {ams.color.interactive.invalid.hover}" }
103
+ "border-color": {
104
+ "$value": "{ams.color.interactive.invalid.hover}",
105
+ "$type": "color"
106
+ },
107
+ "box-shadow": {
108
+ "$type": "shadow",
109
+ "$value": {
110
+ "inset": true,
111
+ "offsetX": {
112
+ "value": 0,
113
+ "unit": "rem"
114
+ },
115
+ "offsetY": {
116
+ "value": 0,
117
+ "unit": "rem"
118
+ },
119
+ "blur": {
120
+ "value": 0,
121
+ "unit": "rem"
122
+ },
123
+ "spread": "{ams.border.width.s}",
124
+ "color": "{ams.color.interactive.invalid.hover}"
125
+ }
126
+ }
27
127
  }
28
128
  },
29
129
  "placeholder": {
30
- "color": { "value": "{ams.color.text.secondary}" }
130
+ "color": {
131
+ "$value": "{ams.color.text.secondary}",
132
+ "$type": "color"
133
+ }
31
134
  }
32
135
  }
33
136
  }
@@ -1,30 +1,90 @@
1
1
  {
2
2
  "ams": {
3
3
  "links": {
4
- "color": { "value": "{ams.color.interactive.default}" },
5
- "text-decoration-thickness": { "comment": "2px", "value": "0.125rem" },
6
- "text-underline-offset": { "comment": "2.5px", "value": "0.15625rem" },
4
+ "color": {
5
+ "$value": "{ams.color.interactive.default}",
6
+ "$type": "color"
7
+ },
8
+ "text-decoration-thickness": {
9
+ "$value": {
10
+ "value": 0.125,
11
+ "unit": "rem"
12
+ },
13
+ "$type": "dimension",
14
+ "$extensions": {
15
+ "nl.amsterdam.hint": "2px"
16
+ }
17
+ },
18
+ "text-underline-offset": {
19
+ "$value": {
20
+ "value": 0.15625,
21
+ "unit": "rem"
22
+ },
23
+ "$type": "dimension",
24
+ "$extensions": {
25
+ "nl.amsterdam.hint": "2.5px",
26
+ "nl.amsterdam.subtype": "space"
27
+ }
28
+ },
7
29
  "hover": {
8
- "color": { "value": "{ams.color.interactive.hover}" },
9
- "text-decoration-thickness": { "comment": "3px", "value": "0.1875rem" },
10
- "text-underline-offset": { "comment": "1.5px", "value": "0.09375rem" }
30
+ "color": {
31
+ "$value": "{ams.color.interactive.hover}",
32
+ "$type": "color"
33
+ },
34
+ "text-decoration-thickness": {
35
+ "$value": {
36
+ "value": 0.1875,
37
+ "unit": "rem"
38
+ },
39
+ "$type": "dimension",
40
+ "$extensions": {
41
+ "nl.amsterdam.hint": "3px"
42
+ }
43
+ },
44
+ "text-underline-offset": {
45
+ "$value": {
46
+ "value": 0.09375,
47
+ "unit": "rem"
48
+ },
49
+ "$type": "dimension",
50
+ "$extensions": {
51
+ "nl.amsterdam.hint": "1.5px",
52
+ "nl.amsterdam.subtype": "space"
53
+ }
54
+ }
11
55
  },
12
56
  "subtle": {
13
- "text-decoration-line": { "value": "none" },
57
+ "text-decoration-line": {
58
+ "$value": "none"
59
+ },
14
60
  "hover": {
15
- "text-decoration-line": { "value": "underline" }
61
+ "text-decoration-line": {
62
+ "$value": "underline"
63
+ }
16
64
  }
17
65
  },
18
66
  "contrast": {
19
- "color": { "value": "{ams.color.interactive.contrast}" },
67
+ "color": {
68
+ "$value": "{ams.color.interactive.contrast}",
69
+ "$type": "color"
70
+ },
20
71
  "hover": {
21
- "color": { "value": "{ams.color.interactive.contrast}" }
72
+ "color": {
73
+ "$value": "{ams.color.interactive.contrast}",
74
+ "$type": "color"
75
+ }
22
76
  }
23
77
  },
24
78
  "inverse": {
25
- "color": { "value": "{ams.color.interactive.inverse}" },
79
+ "color": {
80
+ "$value": "{ams.color.interactive.inverse}",
81
+ "$type": "color"
82
+ },
26
83
  "hover": {
27
- "color": { "value": "{ams.color.interactive.inverse}" }
84
+ "color": {
85
+ "$value": "{ams.color.interactive.inverse}",
86
+ "$type": "color"
87
+ }
28
88
  }
29
89
  }
30
90
  }
@@ -2,15 +2,37 @@
2
2
  "ams": {
3
3
  "accordion": {
4
4
  "button": {
5
- "font-family": { "value": "{ams.typography.font-family}" },
6
- "font-size": { "value": "{ams.typography.heading.3.font-size}" },
7
- "font-weight": { "value": "{ams.typography.heading.font-weight}" },
8
- "line-height": { "value": "{ams.typography.heading.3.line-height}" },
9
- "text-wrap": { "value": "{ams.typography.heading.text-wrap}" }
5
+ "font-family": {
6
+ "$value": "{ams.typography.font-family}",
7
+ "$type": "fontFamily"
8
+ },
9
+ "font-size": {
10
+ "$value": "{ams.typography.heading.3.font-size}",
11
+ "$extensions": {
12
+ "nl.amsterdam.type": "fontSize"
13
+ }
14
+ },
15
+ "font-weight": {
16
+ "$value": "{ams.typography.heading.font-weight}",
17
+ "$type": "fontWeight"
18
+ },
19
+ "line-height": {
20
+ "$value": "{ams.typography.heading.3.line-height}",
21
+ "$extensions": {
22
+ "nl.amsterdam.type": "lineHeight"
23
+ }
24
+ },
25
+ "text-wrap": {
26
+ "$value": "{ams.typography.heading.text-wrap}"
27
+ }
10
28
  },
11
29
  "panel": {
12
- "padding-block": { "value": "0" },
13
- "padding-inline": { "value": "0" }
30
+ "padding-block": {
31
+ "$value": "0"
32
+ },
33
+ "padding-inline": {
34
+ "$value": "0"
35
+ }
14
36
  }
15
37
  }
16
38
  }
@@ -1,16 +1,54 @@
1
1
  {
2
2
  "ams": {
3
3
  "accordion": {
4
- "gap": { "value": "{ams.space.s}" },
4
+ "gap": {
5
+ "$value": "{ams.space.s}",
6
+ "$type": "dimension",
7
+ "$extensions": {
8
+ "nl.amsterdam.subtype": "space"
9
+ }
10
+ },
5
11
  "button": {
6
- "color": { "value": "{ams.color.interactive.default}" },
7
- "cursor": { "value": "{ams.cursor.interactive}" },
8
- "gap": { "value": "{ams.space.s}" },
9
- "outline-offset": { "value": "{ams.focus.outline-offset}" },
10
- "padding-block": { "value": "{ams.space.s}" },
11
- "padding-inline": { "value": "0" },
12
+ "color": {
13
+ "$value": "{ams.color.interactive.default}",
14
+ "$type": "color"
15
+ },
16
+ "cursor": {
17
+ "$value": "{ams.cursor.interactive}"
18
+ },
19
+ "gap": {
20
+ "$value": "{ams.space.s}",
21
+ "$type": "dimension",
22
+ "$extensions": {
23
+ "nl.amsterdam.subtype": "space"
24
+ }
25
+ },
26
+ "outline-offset": {
27
+ "$value": "{ams.focus.outline-offset}",
28
+ "$type": "dimension",
29
+ "$extensions": {
30
+ "nl.amsterdam.subtype": "space"
31
+ }
32
+ },
33
+ "padding-block": {
34
+ "$value": "{ams.space.s}",
35
+ "$type": "dimension",
36
+ "$extensions": {
37
+ "nl.amsterdam.subtype": "space"
38
+ }
39
+ },
40
+ "padding-inline": {
41
+ "$value": "0",
42
+ "$type": "dimension",
43
+ "$extensions": {
44
+ "nl.amsterdam.subtype": "space"
45
+ }
46
+ },
12
47
  "hover": {
13
- "color": { "value": "{ams.color.interactive.hover}" }
48
+ "color": {
49
+ "$value": "{ams.color.interactive.hover}",
50
+ "$type": "color"
51
+ }
14
52
  }
15
53
  }
16
54
  }
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "ams": {
3
3
  "action-group": {
4
- "gap": { "value": "{ams.space.m}" }
4
+ "gap": {
5
+ "$value": "{ams.space.m}",
6
+ "$type": "dimension",
7
+ "$extensions": {
8
+ "nl.amsterdam.subtype": "space"
9
+ }
10
+ }
5
11
  }
6
12
  }
7
13
  }
@@ -1,36 +1,103 @@
1
1
  {
2
2
  "ams": {
3
3
  "alert": {
4
- "background-color": { "value": "{ams.color.background}" },
5
- "border-color": { "value": "{ams.color.feedback.info}" },
6
- "border-style": { "value": "solid" },
7
- "border-width": { "value": "{ams.border.width.xl}" },
4
+ "background-color": {
5
+ "$value": "{ams.color.background}",
6
+ "$type": "color"
7
+ },
8
+ "border-color": {
9
+ "$value": "{ams.color.feedback.info}",
10
+ "$type": "color"
11
+ },
12
+ "border-style": {
13
+ "$value": "solid",
14
+ "$extensions": {
15
+ "nl.amsterdam.type": "borderStyle"
16
+ }
17
+ },
18
+ "border-width": {
19
+ "$value": "{ams.border.width.xl}",
20
+ "$extensions": {
21
+ "nl.amsterdam.type": "borderWidth"
22
+ }
23
+ },
8
24
  "severity-indicator": {
9
- "background-color": { "value": "{ams.color.feedback.info}" },
10
- "padding-block": { "value": "{ams.space.m}" },
11
- "padding-inline": { "value": "{ams.space.s}" }
25
+ "background-color": {
26
+ "$value": "{ams.color.feedback.info}",
27
+ "$type": "color"
28
+ },
29
+ "padding-block": {
30
+ "$value": "{ams.space.m}",
31
+ "$type": "dimension",
32
+ "$extensions": {
33
+ "nl.amsterdam.subtype": "space"
34
+ }
35
+ },
36
+ "padding-inline": {
37
+ "$value": "{ams.space.s}",
38
+ "$type": "dimension",
39
+ "$extensions": {
40
+ "nl.amsterdam.subtype": "space"
41
+ }
42
+ }
12
43
  },
13
44
  "content": {
14
- "gap": { "value": "{ams.space.s}" },
15
- "padding-block": { "value": "{ams.space.m}" },
16
- "padding-inline": { "value": "{ams.space.m}" }
45
+ "gap": {
46
+ "$value": "{ams.space.s}",
47
+ "$type": "dimension",
48
+ "$extensions": {
49
+ "nl.amsterdam.subtype": "space"
50
+ }
51
+ },
52
+ "padding-block": {
53
+ "$value": "{ams.space.m}",
54
+ "$type": "dimension",
55
+ "$extensions": {
56
+ "nl.amsterdam.subtype": "space"
57
+ }
58
+ },
59
+ "padding-inline": {
60
+ "$value": "{ams.space.m}",
61
+ "$type": "dimension",
62
+ "$extensions": {
63
+ "nl.amsterdam.subtype": "space"
64
+ }
65
+ }
17
66
  },
18
67
  "error": {
19
- "border-color": { "value": "{ams.color.feedback.error}" },
68
+ "border-color": {
69
+ "$value": "{ams.color.feedback.error}",
70
+ "$type": "color"
71
+ },
20
72
  "severity-indicator": {
21
- "background-color": { "value": "{ams.color.feedback.error}" }
73
+ "background-color": {
74
+ "$value": "{ams.color.feedback.error}",
75
+ "$type": "color"
76
+ }
22
77
  }
23
78
  },
24
79
  "success": {
25
- "border-color": { "value": "{ams.color.feedback.success}" },
80
+ "border-color": {
81
+ "$value": "{ams.color.feedback.success}",
82
+ "$type": "color"
83
+ },
26
84
  "severity-indicator": {
27
- "background-color": { "value": "{ams.color.feedback.success}" }
85
+ "background-color": {
86
+ "$value": "{ams.color.feedback.success}",
87
+ "$type": "color"
88
+ }
28
89
  }
29
90
  },
30
91
  "warning": {
31
- "border-color": { "value": "{ams.color.feedback.warning}" },
92
+ "border-color": {
93
+ "$value": "{ams.color.feedback.warning}",
94
+ "$type": "color"
95
+ },
32
96
  "severity-indicator": {
33
- "background-color": { "value": "{ams.color.feedback.warning}" }
97
+ "background-color": {
98
+ "$value": "{ams.color.feedback.warning}",
99
+ "$type": "color"
100
+ }
34
101
  }
35
102
  }
36
103
  }