@amsterdam/design-system-css 0.16.0 → 1.0.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 (63) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/alert/alert.css +1 -1
  3. package/dist/alert/alert.css.map +1 -1
  4. package/dist/avatar/avatar.css +1 -1
  5. package/dist/avatar/avatar.css.map +1 -1
  6. package/dist/button/button.css +1 -1
  7. package/dist/button/button.css.map +1 -1
  8. package/dist/checkbox/checkbox.css +1 -1
  9. package/dist/checkbox/checkbox.css.map +1 -1
  10. package/dist/date-input/date-input.css +1 -1
  11. package/dist/date-input/date-input.css.map +1 -1
  12. package/dist/dialog/dialog.css +1 -1
  13. package/dist/dialog/dialog.css.map +1 -1
  14. package/dist/file-input/file-input.css +1 -1
  15. package/dist/file-input/file-input.css.map +1 -1
  16. package/dist/hint/hint.css +1 -1
  17. package/dist/hint/hint.css.map +1 -1
  18. package/dist/image/image.css +1 -1
  19. package/dist/image/image.css.map +1 -1
  20. package/dist/index.css +1 -1
  21. package/dist/index.css.map +1 -1
  22. package/dist/invalid-form-alert/invalid-form-alert.css.map +1 -1
  23. package/dist/page-header/page-header.css +1 -1
  24. package/dist/page-header/page-header.css.map +1 -1
  25. package/dist/password-input/password-input.css +1 -1
  26. package/dist/password-input/password-input.css.map +1 -1
  27. package/dist/radio/radio.css +1 -1
  28. package/dist/radio/radio.css.map +1 -1
  29. package/dist/search-field/search-field.css +1 -1
  30. package/dist/search-field/search-field.css.map +1 -1
  31. package/dist/select/select.css +1 -1
  32. package/dist/select/select.css.map +1 -1
  33. package/dist/switch/switch.css +1 -1
  34. package/dist/switch/switch.css.map +1 -1
  35. package/dist/text-area/text-area.css +1 -1
  36. package/dist/text-area/text-area.css.map +1 -1
  37. package/dist/text-input/text-input.css +1 -1
  38. package/dist/text-input/text-input.css.map +1 -1
  39. package/dist/time-input/time-input.css +1 -1
  40. package/dist/time-input/time-input.css.map +1 -1
  41. package/package.json +4 -4
  42. package/src/components/alert/alert.scss +6 -9
  43. package/src/components/aspect-ratio/README.md +1 -0
  44. package/src/components/avatar/avatar.scss +14 -10
  45. package/src/components/button/README.md +6 -6
  46. package/src/components/button/button.scss +7 -18
  47. package/src/components/checkbox/checkbox.scss +229 -125
  48. package/src/components/date-input/date-input.scss +9 -9
  49. package/src/components/dialog/dialog.scss +3 -1
  50. package/src/components/file-input/file-input.scss +6 -10
  51. package/src/components/hint/hint.scss +1 -1
  52. package/src/components/icon-button/README.md +6 -5
  53. package/src/components/image/image.scss +1 -2
  54. package/src/components/invalid-form-alert/invalid-form-alert.scss +5 -0
  55. package/src/components/page-header/page-header.scss +9 -1
  56. package/src/components/password-input/password-input.scss +13 -9
  57. package/src/components/radio/radio.scss +6 -4
  58. package/src/components/search-field/search-field.scss +5 -3
  59. package/src/components/select/select.scss +14 -8
  60. package/src/components/switch/switch.scss +1 -1
  61. package/src/components/text-area/text-area.scss +9 -9
  62. package/src/components/text-input/text-input.scss +13 -9
  63. package/src/components/time-input/time-input.scss +9 -9
@@ -13,27 +13,7 @@
13
13
  @include input-label-focus;
14
14
  }
15
15
 
16
- .ams-checkbox__checkmark {
17
- align-items: center;
18
- block-size: calc(var(--ams-checkbox-font-size) * var(--ams-checkbox-line-height));
19
- display: flex;
20
- flex-shrink: 0;
21
- inline-size: 1.5rem;
22
-
23
- &::after {
24
- background-position: center;
25
- background-repeat: no-repeat;
26
- background-size: 1rem;
27
- block-size: 1.5rem;
28
- border-color: var(--ams-checkbox-checkmark-border-color);
29
- border-style: solid;
30
- border-width: var(--ams-checkbox-checkmark-border-width);
31
- box-sizing: border-box;
32
- content: "";
33
- inline-size: 100%;
34
- }
35
- }
36
-
16
+ // Default
37
17
  .ams-checkbox__label {
38
18
  color: var(--ams-checkbox-color);
39
19
  cursor: var(--ams-checkbox-cursor);
@@ -47,166 +27,290 @@
47
27
 
48
28
  @include hyphenation;
49
29
  @include text-rendering;
30
+ }
50
31
 
51
- &:hover {
52
- color: var(--ams-checkbox-hover-color);
53
- text-decoration-line: underline;
54
- text-decoration-thickness: var(--ams-checkbox-hover-text-decoration-thickness);
55
- text-underline-offset: 0.375rem;
32
+ .ams-checkbox__icon-container {
33
+ block-size: var(--ams-checkbox-icon-container-block-size);
34
+ display: flex;
35
+ flex: none;
36
+ inline-size: var(--ams-checkbox-icon-container-inline-size);
37
+ }
56
38
 
57
- .ams-checkbox__checkmark::after {
58
- border-color: var(--ams-checkbox-checkmark-hover-border-color);
59
- border-width: var(--ams-checkbox-checkmark-hover-border-width);
60
- }
39
+ .ams-checkbox__rectangle {
40
+ fill: var(--ams-checkbox-rectangle-fill);
41
+ stroke: var(--ams-checkbox-rectangle-stroke);
42
+ }
43
+
44
+ .ams-checkbox__hover-indicator {
45
+ stroke: none;
46
+ }
47
+
48
+ .ams-checkbox__checked-indicator {
49
+ display: none;
50
+ stroke: var(--ams-checkbox-checked-indicator-stroke);
51
+ }
52
+
53
+ .ams-checkbox__indeterminate-indicator {
54
+ display: none;
55
+ stroke: var(--ams-checkbox-indeterminate-indicator-stroke);
56
+ }
57
+
58
+ // Default hover
59
+ .ams-checkbox__label:hover {
60
+ color: var(--ams-checkbox-hover-color);
61
+ text-decoration-line: underline;
62
+ text-decoration-thickness: var(--ams-checkbox-hover-text-decoration-thickness);
63
+ text-underline-offset: 0.375rem;
64
+
65
+ .ams-checkbox__rectangle {
66
+ stroke: var(--ams-checkbox-rectangle-hover-stroke);
67
+ }
68
+
69
+ .ams-checkbox__hover-indicator {
70
+ stroke: var(--ams-checkbox-hover-indicator-hover-stroke);
61
71
  }
62
72
  }
63
73
 
64
- // Default checked
65
- .ams-checkbox__input:checked {
66
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
67
- background-color: var(--ams-checkbox-checkmark-checked-background-color);
68
- background-image: var(--ams-checkbox-checkmark-checked-background-image);
69
- border: none;
74
+ // Invalid
75
+ .ams-checkbox__input[aria-invalid="true"] + .ams-checkbox__label {
76
+ .ams-checkbox__rectangle {
77
+ stroke: var(--ams-checkbox-rectangle-invalid-stroke);
70
78
  }
71
79
  }
72
80
 
73
- // Default indeterminate
74
- .ams-checkbox__input:indeterminate {
75
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
76
- background-color: var(--ams-checkbox-checkmark-indeterminate-background-color);
77
- background-image: var(--ams-checkbox-checkmark-indeterminate-background-image);
78
- background-position: center;
79
- background-repeat: no-repeat;
80
- background-size: 1rem;
81
- border: none;
81
+ // Indeterminate
82
+ .ams-checkbox__input:indeterminate + .ams-checkbox__label {
83
+ .ams-checkbox__rectangle {
84
+ fill: var(--ams-checkbox-rectangle-indeterminate-fill);
85
+ }
86
+
87
+ .ams-checkbox__indeterminate-indicator {
88
+ display: block;
82
89
  }
83
90
  }
84
91
 
85
- // Invalid unchecked
86
- .ams-checkbox__input:invalid,
87
- .ams-checkbox__input[aria-invalid="true"] {
88
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
89
- border-color: var(--ams-checkbox-checkmark-invalid-border-color);
92
+ // Disabled
93
+ .ams-checkbox__input:disabled + .ams-checkbox__label {
94
+ color: var(--ams-checkbox-disabled-color);
95
+ cursor: var(--ams-checkbox-disabled-cursor);
96
+
97
+ .ams-checkbox__rectangle {
98
+ stroke: var(--ams-checkbox-rectangle-disabled-stroke);
99
+ }
100
+
101
+ .ams-checkbox__hover-indicator {
102
+ stroke: none;
90
103
  }
91
104
  }
92
105
 
93
- // Disabled unchecked
94
- .ams-checkbox__input:disabled {
95
- + .ams-checkbox__label {
96
- color: var(--ams-checkbox-disabled-color);
97
- cursor: var(--ams-checkbox-disabled-cursor);
106
+ // Checked
107
+ .ams-checkbox__input:checked:not(:indeterminate) + .ams-checkbox__label {
108
+ .ams-checkbox__rectangle {
109
+ fill: var(--ams-checkbox-rectangle-checked-fill);
110
+ }
98
111
 
99
- .ams-checkbox__checkmark::after {
100
- border-color: var(--ams-checkbox-checkmark-disabled-border-color);
101
- border-width: var(--ams-checkbox-checkmark-disabled-border-width);
102
- }
112
+ .ams-checkbox__checked-indicator {
113
+ display: block;
103
114
  }
104
115
  }
105
116
 
106
117
  // Invalid checked
107
- .ams-checkbox__input:invalid:checked,
108
- .ams-checkbox__input[aria-invalid="true"]:checked {
109
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
110
- background-color: var(--ams-checkbox-checkmark-invalid-checked-background-color);
118
+ .ams-checkbox__input[aria-invalid="true"]:checked + .ams-checkbox__label {
119
+ .ams-checkbox__rectangle {
120
+ fill: var(--ams-checkbox-rectangle-checked-invalid-fill);
111
121
  }
112
122
  }
113
123
 
114
124
  // Invalid indeterminate
115
- .ams-checkbox__input:invalid:indeterminate,
116
- .ams-checkbox__input[aria-invalid="true"]:indeterminate {
117
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
118
- background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-background-color);
125
+ .ams-checkbox__input[aria-invalid="true"]:indeterminate + .ams-checkbox__label {
126
+ .ams-checkbox__rectangle {
127
+ fill: var(--ams-checkbox-rectangle-indeterminate-invalid-fill);
119
128
  }
120
129
  }
121
130
 
122
- // Disabled label
123
- .ams-checkbox__input:disabled + .ams-checkbox__label:hover {
124
- text-decoration: none;
125
- }
126
-
127
131
  // Disabled checked
128
- .ams-checkbox__input:disabled:checked {
129
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
130
- background-color: var(--ams-checkbox-checkmark-disabled-checked-background-color);
132
+ .ams-checkbox__input:disabled:checked + .ams-checkbox__label {
133
+ .ams-checkbox__rectangle {
134
+ fill: var(--ams-checkbox-rectangle-checked-disabled-fill);
131
135
  }
132
136
  }
133
137
 
134
138
  // Disabled indeterminate
135
- .ams-checkbox__input:disabled:indeterminate {
136
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
137
- background-color: var(--ams-checkbox-checkmark-disabled-indeterminate-background-color);
139
+ .ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label {
140
+ .ams-checkbox__rectangle {
141
+ fill: var(--ams-checkbox-rectangle-indeterminate-disabled-fill);
138
142
  }
139
143
  }
140
144
 
141
- // Disabled invalid unchecked
142
- .ams-checkbox__input:invalid:disabled,
143
- .ams-checkbox__input[aria-invalid="true"]:disabled {
144
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
145
- // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
146
- border-color: var(--ams-checkbox-checkmark-disabled-border-color);
145
+ // HOVER
146
+
147
+ // Checked hover
148
+ .ams-checkbox__input:checked + .ams-checkbox__label:hover {
149
+ .ams-checkbox__rectangle {
150
+ fill: var(--ams-checkbox-rectangle-checked-hover-fill);
147
151
  }
148
152
  }
149
153
 
150
- // HOVER STATES
154
+ // Indeterminate hover
155
+ .ams-checkbox__input:indeterminate + .ams-checkbox__label:hover {
156
+ .ams-checkbox__rectangle {
157
+ fill: var(--ams-checkbox-rectangle-indeterminate-hover-fill);
158
+ }
159
+ }
151
160
 
152
- // Invalid unchecked hover
153
- :is(.ams-checkbox__input:invalid, .ams-checkbox__input[aria-invalid="true"])
154
- + .ams-checkbox__label:hover
155
- .ams-checkbox__checkmark::after {
156
- border-color: var(--ams-checkbox-checkmark-invalid-hover-border-color);
161
+ // Invalid hover
162
+ .ams-checkbox__input[aria-invalid="true"] + .ams-checkbox__label:hover {
163
+ .ams-checkbox__rectangle {
164
+ stroke: var(--ams-checkbox-rectangle-invalid-hover-stroke);
165
+ }
166
+
167
+ .ams-checkbox__hover-indicator {
168
+ stroke: var(--ams-checkbox-hover-indicator-invalid-hover-stroke);
169
+ }
157
170
  }
158
171
 
159
- // Default checked hover
160
- .ams-checkbox__input:checked + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
161
- background-color: var(--ams-checkbox-checkmark-checked-hover-background-color);
172
+ // Disabled invalid hover
173
+ .ams-checkbox__input[aria-invalid="true"]:disabled + .ams-checkbox__label:hover {
174
+ .ams-checkbox__rectangle {
175
+ stroke: var(--ams-checkbox-rectangle-hover-disabled-invalid-stroke);
176
+ }
162
177
  }
163
178
 
164
- // Default indeterminate hover
165
- .ams-checkbox__input:indeterminate + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
166
- background-color: var(--ams-checkbox-checkmark-indeterminate-hover-background-color);
179
+ // Disabled checked hover
180
+ .ams-checkbox__input:disabled:checked + .ams-checkbox__label:hover {
181
+ .ams-checkbox__rectangle {
182
+ fill: var(--ams-checkbox-rectangle-checked-disabled-hover-fill);
183
+ }
184
+ }
185
+
186
+ // Disabled indeterminate hover
187
+ .ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label:hover {
188
+ .ams-checkbox__rectangle {
189
+ fill: var(--ams-checkbox-rectangle-indeterminate-disabled-hover-fill);
190
+ }
191
+ }
192
+
193
+ // Disabled hover
194
+ .ams-checkbox__input:disabled + .ams-checkbox__label:hover {
195
+ text-decoration: none;
196
+
197
+ .ams-checkbox__hover-indicator {
198
+ stroke: none;
199
+ }
167
200
  }
168
201
 
169
202
  // Invalid checked hover
170
- :is(.ams-checkbox__input:invalid:checked, .ams-checkbox__input[aria-invalid="true"]:checked)
171
- + .ams-checkbox__label:hover
172
- .ams-checkbox__checkmark::after {
173
- background-color: var(--ams-checkbox-checkmark-invalid-checked-hover-background-color);
203
+ .ams-checkbox__input[aria-invalid="true"]:checked + .ams-checkbox__label:hover {
204
+ .ams-checkbox__rectangle {
205
+ fill: var(--ams-checkbox-rectangle-checked-invalid-hover-fill);
206
+ }
174
207
  }
175
208
 
176
209
  // Invalid indeterminate hover
177
- :is(.ams-checkbox__input:invalid:indeterminate, .ams-checkbox__input[aria-invalid="true"]:indeterminate)
178
- + .ams-checkbox__label:hover
179
- .ams-checkbox__checkmark::after {
180
- background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-hover-background-color);
210
+ .ams-checkbox__input[aria-invalid="true"]:indeterminate + .ams-checkbox__label:hover {
211
+ .ams-checkbox__rectangle {
212
+ fill: var(--ams-checkbox-rectangle-indeterminate-invalid-hover-fill);
213
+ }
181
214
  }
182
215
 
183
- // Disabled checked hover
184
- .ams-checkbox__input:disabled:checked + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
185
- background-color: var(--ams-checkbox-checkmark-disabled-checked-hover-background-color);
216
+ // Disabled invalid checked hover
217
+ .ams-checkbox__input[aria-invalid="true"]:disabled:checked + .ams-checkbox__label:hover {
218
+ .ams-checkbox__rectangle {
219
+ fill: var(--ams-checkbox-rectangle-checked-hover-disabled-invalid-fill);
220
+ }
186
221
  }
187
222
 
188
- // Disabled indeterminate hover
189
- .ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
190
- background-color: var(--ams-checkbox-checkmark-disabled-indeterminate-hover-background-color);
223
+ // Disabled invalid indeterminate hover
224
+ .ams-checkbox__input[aria-invalid="true"]:disabled:indeterminate + .ams-checkbox__label:hover {
225
+ .ams-checkbox__rectangle {
226
+ fill: var(--ams-checkbox-rectangle-indeterminate-hover-disabled-invalid-fill);
227
+ }
191
228
  }
192
229
 
193
- // Disabled invalid unchecked hover
194
- :is(.ams-checkbox__input:invalid:disabled, .ams-checkbox__input[aria-invalid="true"]:disabled)
195
- + .ams-checkbox__label:hover
196
- .ams-checkbox__checkmark::after {
197
- // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
198
- border-color: var(--ams-checkbox-checkmark-disabled-border-color);
230
+ // FORCED COLORS
231
+
232
+ // Default
233
+ @media (forced-colors: active) {
234
+ .ams-checkbox__label,
235
+ .ams-checkbox__label:hover,
236
+ .ams-checkbox__input[aria-invalid="true"] + .ams-checkbox__label,
237
+ .ams-checkbox__input[aria-invalid="true"] + .ams-checkbox__label:hover {
238
+ .ams-checkbox__rectangle {
239
+ fill: Canvas;
240
+ stroke: FieldText;
241
+ }
242
+
243
+ .ams-checkbox__hover-indicator {
244
+ stroke: none;
245
+ }
246
+ }
199
247
  }
200
248
 
201
- // DISABLED INVALID STATES
249
+ // Checked
250
+ @media (forced-colors: active) {
251
+ .ams-checkbox__input:checked:not(:indeterminate) + .ams-checkbox__label,
252
+ .ams-checkbox__input:checked + .ams-checkbox__label:hover,
253
+ .ams-checkbox__input[aria-invalid="true"]:checked + .ams-checkbox__label,
254
+ .ams-checkbox__input[aria-invalid="true"]:checked + .ams-checkbox__label:hover {
255
+ .ams-checkbox__rectangle {
256
+ fill: ActiveText;
257
+ stroke: ActiveText;
258
+ }
202
259
 
203
- // Disabled invalid checked & indeterminate
204
- .ams-checkbox__input:invalid:disabled:checked,
205
- .ams-checkbox__input:invalid:disabled:indeterminate,
206
- .ams-checkbox__input[aria-invalid="true"]:disabled:checked,
207
- .ams-checkbox__input[aria-invalid="true"]:disabled:indeterminate {
208
- + .ams-checkbox__label .ams-checkbox__checkmark::after {
209
- // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
210
- background-color: var(--ams-checkbox-checkmark-disabled-checked-background-color);
260
+ .ams-checkbox__checked-indicator {
261
+ stroke: Canvas;
262
+ }
263
+ }
264
+ }
265
+
266
+ // Indeterminate
267
+ @media (forced-colors: active) {
268
+ .ams-checkbox__input:indeterminate + .ams-checkbox__label,
269
+ .ams-checkbox__input:indeterminate + .ams-checkbox__label:hover,
270
+ .ams-checkbox__input[aria-invalid="true"]:indeterminate + .ams-checkbox__label,
271
+ .ams-checkbox__input[aria-invalid="true"]:indeterminate + .ams-checkbox__label:hover {
272
+ .ams-checkbox__rectangle {
273
+ fill: ActiveText;
274
+ stroke: ActiveText;
275
+ }
276
+
277
+ .ams-checkbox__indeterminate-indicator {
278
+ stroke: Canvas;
279
+ }
280
+ }
281
+ }
282
+
283
+ // Disabled
284
+ @media (forced-colors: active) {
285
+ .ams-checkbox__input:disabled + .ams-checkbox__label,
286
+ .ams-checkbox__input:disabled + .ams-checkbox__label:hover,
287
+ .ams-checkbox__input[aria-invalid="true"]:disabled + .ams-checkbox__label,
288
+ .ams-checkbox__input[aria-invalid="true"]:disabled + .ams-checkbox__label:hover {
289
+ .ams-checkbox__rectangle {
290
+ stroke: GrayText;
291
+ }
292
+ }
293
+ }
294
+
295
+ // Disabled checked
296
+ @media (forced-colors: active) {
297
+ .ams-checkbox__input:disabled:checked + .ams-checkbox__label,
298
+ .ams-checkbox__input:disabled:checked + .ams-checkbox__label:hover,
299
+ .ams-checkbox__input[aria-invalid="true"]:disabled:checked + .ams-checkbox__label:hover {
300
+ .ams-checkbox__rectangle {
301
+ fill: GrayText;
302
+ stroke: GrayText;
303
+ }
304
+ }
305
+ }
306
+
307
+ // Disabled indeterminate
308
+ @media (forced-colors: active) {
309
+ .ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label,
310
+ .ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label:hover,
311
+ .ams-checkbox__input[aria-invalid="true"]:disabled:indeterminate + .ams-checkbox__label:hover {
312
+ .ams-checkbox__rectangle {
313
+ fill: GrayText;
314
+ }
211
315
  }
212
316
  }
@@ -8,14 +8,15 @@
8
8
  @mixin reset-input {
9
9
  -webkit-appearance: none; // Reset appearance for Safari < 15.4
10
10
  appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
11
- border: none;
12
11
  border-radius: 0; // Reset rounded borders on iOS devices
13
12
  margin-block: 0;
14
13
  }
15
14
 
16
15
  .ams-date-input {
17
16
  background-color: var(--ams-date-input-background-color);
18
- box-shadow: var(--ams-date-input-box-shadow);
17
+ border-color: var(--ams-date-input-border-color);
18
+ border-style: var(--ams-date-input-border-style);
19
+ border-width: var(--ams-date-input-border-width);
19
20
  box-sizing: border-box;
20
21
  color: var(--ams-date-input-color);
21
22
  font-family: var(--ams-date-input-font-family);
@@ -37,10 +38,6 @@
37
38
 
38
39
  @include text-rendering;
39
40
  @include reset-input;
40
-
41
- &:hover {
42
- box-shadow: var(--ams-date-input-hover-box-shadow);
43
- }
44
41
  }
45
42
 
46
43
  // This changes the default calendar icon on Chromium browsers only
@@ -55,8 +52,6 @@
55
52
  }
56
53
 
57
54
  .ams-date-input:disabled {
58
- background-color: var(--ams-date-input-disabled-background-color);
59
- box-shadow: var(--ams-date-input-disabled-box-shadow);
60
55
  color: var(--ams-date-input-disabled-color);
61
56
  cursor: var(--ams-date-input-disabled-cursor);
62
57
  }
@@ -68,9 +63,14 @@
68
63
 
69
64
  .ams-date-input:invalid,
70
65
  .ams-date-input[aria-invalid="true"] {
71
- box-shadow: var(--ams-date-input-invalid-box-shadow);
66
+ border-color: var(--ams-date-input-invalid-border-color);
72
67
 
73
68
  &:hover {
69
+ border-color: var(--ams-date-input-invalid-hover-border-color);
74
70
  box-shadow: var(--ams-date-input-invalid-hover-box-shadow);
75
71
  }
76
72
  }
73
+
74
+ .ams-date-input:not(:disabled):hover {
75
+ box-shadow: var(--ams-date-input-hover-box-shadow);
76
+ }
@@ -15,7 +15,9 @@
15
15
  so do not apply these styles without an `open` attribute. */
16
16
  .ams-dialog:not(dialog:not([open])) {
17
17
  background-color: var(--ams-dialog-background-color);
18
- border: var(--ams-dialog-border);
18
+ border-color: var(--ams-dialog-border-color);
19
+ border-style: var(--ams-dialog-border-style);
20
+ border-width: var(--ams-dialog-border-width);
19
21
  box-sizing: border-box;
20
22
  display: flex; // We’d like to use CSS Grid here, but that doesn’t work as expected in Safari.
21
23
  flex-direction: column;
@@ -6,13 +6,14 @@
6
6
  @use "../../common/text-rendering" as *;
7
7
 
8
8
  @mixin reset-button {
9
- border: none;
10
9
  border-radius: 0; // Reset rounded borders on iOS devices
11
10
  }
12
11
 
13
12
  .ams-file-input {
14
13
  background-color: var(--ams-file-input-background-color);
15
- border: var(--ams-file-input-border);
14
+ border-color: var(--ams-file-input-border-color);
15
+ border-style: var(--ams-file-input-border-style);
16
+ border-width: var(--ams-file-input-border-width);
16
17
  box-sizing: border-box;
17
18
  color: var(--ams-file-input-color);
18
19
  cursor: var(--ams-file-input-cursor);
@@ -38,7 +39,9 @@
38
39
  -webkit-appearance: none; // Reset appearance for Safari < 15.4
39
40
  appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
40
41
  background-color: var(--ams-file-input-file-selector-button-background-color);
41
- box-shadow: var(--ams-file-input-file-selector-button-box-shadow);
42
+ border-color: var(--ams-file-input-file-selector-button-border-color);
43
+ border-style: var(--ams-file-input-file-selector-button-border-style);
44
+ border-width: var(--ams-file-input-file-selector-button-border-width);
42
45
  box-sizing: border-box;
43
46
  color: var(--ams-file-input-file-selector-button-color);
44
47
  cursor: var(--ams-file-input-file-selector-button-cursor);
@@ -50,16 +53,9 @@
50
53
  padding-inline: var(--ams-file-input-file-selector-button-padding-inline);
51
54
 
52
55
  @include reset-button;
53
-
54
- @media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
55
- border: var(
56
- --ams-file-input-file-selector-button-forced-color-mode-border
57
- ); // add border because forced colors changes box-shadow to none
58
- }
59
56
  }
60
57
 
61
58
  .ams-file-input:disabled::file-selector-button {
62
- box-shadow: var(--ams-file-input-file-selector-button-disabled-box-shadow);
63
59
  color: var(--ams-file-input-disabled-color);
64
60
  cursor: var(--ams-file-input-file-selector-button-disabled-cursor);
65
61
  }
@@ -4,6 +4,6 @@
4
4
  */
5
5
 
6
6
  .ams-hint {
7
- color: var(--ams-hint-color);
8
7
  display: inline-block;
8
+ font-weight: var(--ams-hint-font-weight);
9
9
  }
@@ -2,14 +2,15 @@
2
2
 
3
3
  # Icon Button
4
4
 
5
- A button containing only an icon.
5
+ An icon in a button that can be aligned with text.
6
6
 
7
7
  ## Guidelines
8
8
 
9
- - Use this button only if the icon is entirely clear and understandable.
10
- Many icons are interpreted differently by different users.
11
- Only use universally recognized icons, such as a close icon or a play icon.
12
- - Provide a label text that describes what the button does for screen reader users.
9
+ - Choose an Icon Button instead of a regular Button if it must align with text.
10
+ Match the size of the Icon Button to that text.
11
+ - Only [functional icons](https://designsystem.amsterdam/?path=/docs/brand-assets-icons--docs#functional-icons) can be used in an Icon Button.
12
+ For other icons, use a [Button](https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs) to allow the user to read its label.
13
+ - Icon Button still needs a label to describe the button to users of screen readers.
13
14
 
14
15
  ## Relevant WCAG requirements
15
16
 
@@ -7,8 +7,7 @@
7
7
  aspect-ratio: var(--ams-image-aspect-ratio);
8
8
  block-size: auto; /* [1] */
9
9
  font-style: italic; /* [3] */
10
- inline-size: fit-content;
11
- max-inline-size: 100%; /* [1] */
10
+ inline-size: 100%; /* [1] */
12
11
  object-fit: cover; /* [4] */
13
12
  vertical-align: middle; /* [2] */
14
13
  }
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
1
6
  .ams-invalid-form-alert {
2
7
  outline-offset: var(--ams-invalid-form-alert-outline-offset);
3
8
 
@@ -35,6 +35,14 @@
35
35
  inline-size: fit-content;
36
36
  outline-offset: var(--ams-page-header-logo-link-outline-offset);
37
37
  text-decoration: none;
38
+
39
+ @media (forced-colors: active) {
40
+ .ams-logo__emblem,
41
+ .ams-logo__text-primary,
42
+ .ams-logo__text-secondary {
43
+ fill: LinkText;
44
+ }
45
+ }
38
46
  }
39
47
 
40
48
  .ams-page-header__logo-link--hidden {
@@ -56,7 +64,7 @@
56
64
  color: var(--ams-page-header-brand-name-color);
57
65
  font-size: var(--ams-page-header-brand-name-font-size);
58
66
  font-weight: var(--ams-page-header-brand-name-font-weight);
59
- line-height: 1.35;
67
+ line-height: var(--ams-page-header-brand-name-line-height);
60
68
  text-wrap: var(--ams-page-header-brand-name-text-wrap);
61
69
  }
62
70
 
@@ -8,21 +8,22 @@
8
8
  @mixin reset-input {
9
9
  -webkit-appearance: none; // Reset appearance for Safari < 15.4
10
10
  appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
11
- border: none;
12
11
  border-radius: 0; // Reset rounded borders on iOS devices
13
12
  margin-block: 0;
14
13
  }
15
14
 
16
15
  .ams-password-input {
17
16
  background-color: var(--ams-password-input-background-color);
18
- box-shadow: var(--ams-password-input-box-shadow);
17
+ border-color: var(--ams-password-input-border-color);
18
+ border-style: var(--ams-password-input-border-style);
19
+ border-width: var(--ams-password-input-border-width);
19
20
  box-sizing: border-box;
20
21
  color: var(--ams-password-input-color);
21
22
  font-family: var(--ams-password-input-font-family);
22
23
  font-size: var(--ams-password-input-font-size);
23
24
  font-weight: var(--ams-password-input-font-weight);
24
- inline-size: 100%;
25
25
  line-height: var(--ams-password-input-line-height);
26
+ max-inline-size: 100%;
26
27
  outline-offset: var(--ams-password-input-outline-offset);
27
28
  padding-block: var(--ams-password-input-padding-block);
28
29
  padding-inline: var(--ams-password-input-padding-inline);
@@ -30,10 +31,10 @@
30
31
 
31
32
  @include text-rendering;
32
33
  @include reset-input;
34
+ }
33
35
 
34
- &:hover {
35
- box-shadow: var(--ams-password-input-hover-box-shadow);
36
- }
36
+ .ams-password-input:not([size]) {
37
+ inline-size: 100%;
37
38
  }
38
39
 
39
40
  .ams-password-input::placeholder {
@@ -42,17 +43,20 @@
42
43
  }
43
44
 
44
45
  .ams-password-input:disabled {
45
- background-color: var(--ams-password-input-disabled-background-color);
46
- box-shadow: var(--ams-password-input-disabled-box-shadow);
47
46
  color: var(--ams-password-input-disabled-color);
48
47
  cursor: var(--ams-password-input-disabled-cursor);
49
48
  }
50
49
 
51
50
  .ams-password-input:invalid,
52
51
  .ams-password-input[aria-invalid="true"] {
53
- box-shadow: var(--ams-password-input-invalid-box-shadow);
52
+ border-color: var(--ams-password-input-invalid-border-color);
54
53
 
55
54
  &:hover {
55
+ border-color: var(--ams-password-input-invalid-hover-border-color);
56
56
  box-shadow: var(--ams-password-input-invalid-hover-box-shadow);
57
57
  }
58
58
  }
59
+
60
+ .ams-password-input:not(:disabled):hover {
61
+ box-shadow: var(--ams-password-input-hover-box-shadow);
62
+ }