@amsterdam/design-system-css 0.14.1 → 0.16.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 (223) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +3 -1
  3. package/dist/accordion/accordion.css +1 -1
  4. package/dist/accordion/accordion.css.map +1 -1
  5. package/dist/action-group/action-group.css +1 -1
  6. package/dist/action-group/action-group.css.map +1 -1
  7. package/dist/alert/alert.css +1 -1
  8. package/dist/alert/alert.css.map +1 -1
  9. package/dist/aspect-ratio/aspect-ratio.css +1 -1
  10. package/dist/aspect-ratio/aspect-ratio.css.map +1 -1
  11. package/dist/avatar/avatar.css +1 -1
  12. package/dist/avatar/avatar.css.map +1 -1
  13. package/dist/badge/badge.css +1 -1
  14. package/dist/badge/badge.css.map +1 -1
  15. package/dist/blockquote/blockquote.css +1 -1
  16. package/dist/blockquote/blockquote.css.map +1 -1
  17. package/dist/breadcrumb/breadcrumb.css +1 -1
  18. package/dist/breadcrumb/breadcrumb.css.map +1 -1
  19. package/dist/breakout/breakout.css +1 -1
  20. package/dist/breakout/breakout.css.map +1 -1
  21. package/dist/button/button.css +1 -1
  22. package/dist/button/button.css.map +1 -1
  23. package/dist/card/card.css +1 -1
  24. package/dist/card/card.css.map +1 -1
  25. package/dist/character-count/character-count.css +1 -1
  26. package/dist/character-count/character-count.css.map +1 -1
  27. package/dist/checkbox/checkbox.css +1 -1
  28. package/dist/checkbox/checkbox.css.map +1 -1
  29. package/dist/column/column.css +1 -1
  30. package/dist/column/column.css.map +1 -1
  31. package/dist/date-input/date-input.css +1 -1
  32. package/dist/date-input/date-input.css.map +1 -1
  33. package/dist/description-list/description-list.css +1 -1
  34. package/dist/description-list/description-list.css.map +1 -1
  35. package/dist/dialog/dialog.css +1 -1
  36. package/dist/dialog/dialog.css.map +1 -1
  37. package/dist/error-message/error-message.css +1 -1
  38. package/dist/error-message/error-message.css.map +1 -1
  39. package/dist/field-set/field-set.css +1 -1
  40. package/dist/field-set/field-set.css.map +1 -1
  41. package/dist/figure/figure.css +1 -1
  42. package/dist/figure/figure.css.map +1 -1
  43. package/dist/file-input/file-input.css +1 -1
  44. package/dist/file-input/file-input.css.map +1 -1
  45. package/dist/file-list/file-list.css +1 -1
  46. package/dist/file-list/file-list.css.map +1 -1
  47. package/dist/gap/gap.css +1 -1
  48. package/dist/gap/gap.css.map +1 -1
  49. package/dist/grid/grid.css +1 -1
  50. package/dist/grid/grid.css.map +1 -1
  51. package/dist/heading/heading.css +1 -1
  52. package/dist/heading/heading.css.map +1 -1
  53. package/dist/icon/icon.css +1 -1
  54. package/dist/icon/icon.css.map +1 -1
  55. package/dist/icon-button/icon-button.css +1 -1
  56. package/dist/icon-button/icon-button.css.map +1 -1
  57. package/dist/image-slider/image-slider.css +1 -1
  58. package/dist/image-slider/image-slider.css.map +1 -1
  59. package/dist/index.css +1 -1
  60. package/dist/index.css.map +1 -1
  61. package/dist/invalid-form-alert/invalid-form-alert.css +1 -0
  62. package/dist/invalid-form-alert/invalid-form-alert.css.map +1 -0
  63. package/dist/label/label.css +1 -1
  64. package/dist/label/label.css.map +1 -1
  65. package/dist/link/link.css +1 -1
  66. package/dist/link/link.css.map +1 -1
  67. package/dist/link-list/link-list.css +1 -1
  68. package/dist/link-list/link-list.css.map +1 -1
  69. package/dist/margin/margin.css +1 -1
  70. package/dist/margin/margin.css.map +1 -1
  71. package/dist/ordered-list/ordered-list.css +1 -1
  72. package/dist/ordered-list/ordered-list.css.map +1 -1
  73. package/dist/page/page.css +1 -0
  74. package/dist/page/page.css.map +1 -0
  75. package/dist/page-footer/page-footer.css +1 -0
  76. package/dist/page-footer/page-footer.css.map +1 -0
  77. package/dist/page-header/page-header.css +1 -0
  78. package/dist/page-header/page-header.css.map +1 -0
  79. package/dist/page-heading/page-heading.css +1 -1
  80. package/dist/page-heading/page-heading.css.map +1 -1
  81. package/dist/pagination/pagination.css +1 -1
  82. package/dist/pagination/pagination.css.map +1 -1
  83. package/dist/paragraph/paragraph.css +1 -1
  84. package/dist/paragraph/paragraph.css.map +1 -1
  85. package/dist/password-input/password-input.css +1 -1
  86. package/dist/password-input/password-input.css.map +1 -1
  87. package/dist/radio/radio.css +1 -1
  88. package/dist/radio/radio.css.map +1 -1
  89. package/dist/row/row.css +1 -1
  90. package/dist/row/row.css.map +1 -1
  91. package/dist/search-field/search-field.css +1 -1
  92. package/dist/search-field/search-field.css.map +1 -1
  93. package/dist/select/select.css +1 -1
  94. package/dist/select/select.css.map +1 -1
  95. package/dist/spotlight/spotlight.css +1 -1
  96. package/dist/spotlight/spotlight.css.map +1 -1
  97. package/dist/standalone-link/standalone-link.css +1 -0
  98. package/dist/standalone-link/standalone-link.css.map +1 -0
  99. package/dist/switch/switch.css +1 -1
  100. package/dist/switch/switch.css.map +1 -1
  101. package/dist/table-of-contents/table-of-contents.css +1 -1
  102. package/dist/table-of-contents/table-of-contents.css.map +1 -1
  103. package/dist/tabs/tabs.css +1 -1
  104. package/dist/tabs/tabs.css.map +1 -1
  105. package/dist/text-area/text-area.css +1 -1
  106. package/dist/text-area/text-area.css.map +1 -1
  107. package/dist/text-input/text-input.css +1 -1
  108. package/dist/text-input/text-input.css.map +1 -1
  109. package/dist/time-input/time-input.css +1 -1
  110. package/dist/time-input/time-input.css.map +1 -1
  111. package/dist/unordered-list/unordered-list.css +1 -1
  112. package/dist/unordered-list/unordered-list.css.map +1 -1
  113. package/dist/visually-hidden/visually-hidden.css +1 -1
  114. package/dist/visually-hidden/visually-hidden.css.map +1 -1
  115. package/package.json +4 -4
  116. package/src/common/hyphenation.scss +3 -3
  117. package/src/components/accordion/accordion.scss +6 -6
  118. package/src/components/action-group/README.md +1 -1
  119. package/src/components/action-group/action-group.scss +1 -1
  120. package/src/components/alert/README.md +13 -15
  121. package/src/components/alert/alert.scss +29 -14
  122. package/src/components/aspect-ratio/README.md +8 -8
  123. package/src/components/aspect-ratio/aspect-ratio.scss +6 -3
  124. package/src/components/avatar/README.md +5 -4
  125. package/src/components/avatar/avatar.scss +8 -46
  126. package/src/components/badge/README.md +7 -6
  127. package/src/components/badge/badge.scss +13 -40
  128. package/src/components/blockquote/blockquote.scss +1 -1
  129. package/src/components/breadcrumb/breadcrumb.scss +2 -0
  130. package/src/components/breakout/breakout.scss +23 -23
  131. package/src/components/button/README.md +1 -1
  132. package/src/components/button/button.scss +4 -1
  133. package/src/components/card/README.md +15 -14
  134. package/src/components/card/card.scss +24 -19
  135. package/src/components/character-count/character-count.scss +2 -0
  136. package/src/components/checkbox/checkbox.scss +6 -7
  137. package/src/components/column/column.scss +9 -8
  138. package/src/components/date-input/date-input.scss +3 -4
  139. package/src/components/description-list/description-list.scss +12 -10
  140. package/src/components/dialog/README.md +3 -5
  141. package/src/components/dialog/dialog.scss +38 -5
  142. package/src/components/error-message/error-message.scss +2 -0
  143. package/src/components/field-set/field-set.scss +8 -7
  144. package/src/components/figure/figure.scss +3 -1
  145. package/src/components/file-input/file-input.scss +2 -2
  146. package/src/components/file-list/file-list.scss +2 -1
  147. package/src/components/gap/README.md +13 -9
  148. package/src/components/gap/gap.scss +8 -12
  149. package/src/components/grid/README.md +9 -8
  150. package/src/components/grid/_mixins.scss +27 -25
  151. package/src/components/grid/grid.scss +19 -19
  152. package/src/components/heading/README.md +7 -7
  153. package/src/components/heading/heading.scss +20 -19
  154. package/src/components/icon/README.md +5 -5
  155. package/src/components/icon/icon.scss +41 -27
  156. package/src/components/icon-button/icon-button.scss +16 -15
  157. package/src/components/image-slider/README.md +1 -1
  158. package/src/components/image-slider/image-slider.scss +11 -3
  159. package/src/components/index.scss +5 -7
  160. package/src/components/{form-error-list → invalid-form-alert}/README.md +9 -9
  161. package/src/components/{form-error-list/form-error-list.scss → invalid-form-alert/invalid-form-alert.scss} +4 -4
  162. package/src/components/label/label.scss +1 -0
  163. package/src/components/link/README.md +9 -11
  164. package/src/components/link/link.scss +13 -46
  165. package/src/components/link-list/link-list.scss +7 -8
  166. package/src/components/logo/README.md +1 -1
  167. package/src/components/margin/README.md +16 -10
  168. package/src/components/margin/margin.scss +6 -8
  169. package/src/components/ordered-list/ordered-list.scss +3 -1
  170. package/src/components/page/README.md +23 -0
  171. package/src/components/page/page.scss +12 -0
  172. package/src/components/{footer → page-footer}/README.md +7 -4
  173. package/src/components/page-footer/page-footer.scss +56 -0
  174. package/src/components/{header → page-header}/README.md +6 -5
  175. package/src/components/page-header/page-header.scss +237 -0
  176. package/src/components/page-heading/README.md +1 -1
  177. package/src/components/page-heading/page-heading.scss +2 -1
  178. package/src/components/pagination/pagination.scss +23 -34
  179. package/src/components/paragraph/paragraph.scss +3 -1
  180. package/src/components/password-input/password-input.scss +2 -3
  181. package/src/components/radio/radio.scss +4 -5
  182. package/src/components/row/row.scss +9 -9
  183. package/src/components/search-field/search-field.scss +2 -3
  184. package/src/components/select/select.scss +2 -2
  185. package/src/components/skip-link/README.md +3 -3
  186. package/src/components/spotlight/README.md +5 -3
  187. package/src/components/spotlight/spotlight.scss +6 -10
  188. package/src/components/standalone-link/README.md +11 -0
  189. package/src/components/standalone-link/standalone-link.scss +53 -0
  190. package/src/components/switch/switch.scss +2 -2
  191. package/src/components/table-of-contents/table-of-contents.scss +2 -0
  192. package/src/components/tabs/README.md +1 -1
  193. package/src/components/tabs/tabs.scss +6 -3
  194. package/src/components/text-area/text-area.scss +1 -2
  195. package/src/components/text-input/text-input.scss +2 -3
  196. package/src/components/time-input/time-input.scss +3 -4
  197. package/src/components/unordered-list/unordered-list.scss +3 -1
  198. package/src/components/visually-hidden/visually-hidden.scss +1 -0
  199. package/dist/footer/footer.css +0 -1
  200. package/dist/footer/footer.css.map +0 -1
  201. package/dist/form-error-list/form-error-list.css +0 -1
  202. package/dist/form-error-list/form-error-list.css.map +0 -1
  203. package/dist/header/header.css +0 -1
  204. package/dist/header/header.css.map +0 -1
  205. package/dist/mega-menu/mega-menu.css +0 -1
  206. package/dist/mega-menu/mega-menu.css.map +0 -1
  207. package/dist/page-menu/page-menu.css +0 -1
  208. package/dist/page-menu/page-menu.css.map +0 -1
  209. package/dist/screen/screen.css +0 -1
  210. package/dist/screen/screen.css.map +0 -1
  211. package/dist/top-task-link/top-task-link.css +0 -1
  212. package/dist/top-task-link/top-task-link.css.map +0 -1
  213. package/src/common/size.scss +0 -14
  214. package/src/components/footer/footer.scss +0 -8
  215. package/src/components/header/header.scss +0 -216
  216. package/src/components/mega-menu/README.md +0 -3
  217. package/src/components/mega-menu/mega-menu.scss +0 -16
  218. package/src/components/page-menu/README.md +0 -24
  219. package/src/components/page-menu/page-menu.scss +0 -67
  220. package/src/components/screen/README.md +0 -23
  221. package/src/components/screen/screen.scss +0 -23
  222. package/src/components/top-task-link/README.md +0 -27
  223. package/src/components/top-task-link/top-task-link.scss +0 -45
@@ -5,6 +5,7 @@
5
5
 
6
6
  @use "../../common/input-label-focus" as *;
7
7
  @use "../../common/hide-input" as *;
8
+ @use "../../common/hyphenation" as *;
8
9
  @use "../../common/text-rendering" as *;
9
10
 
10
11
  .ams-checkbox__input {
@@ -35,7 +36,7 @@
35
36
 
36
37
  .ams-checkbox__label {
37
38
  color: var(--ams-checkbox-color);
38
- cursor: pointer;
39
+ cursor: var(--ams-checkbox-cursor);
39
40
  display: inline-flex;
40
41
  font-family: var(--ams-checkbox-font-family);
41
42
  font-size: var(--ams-checkbox-font-size);
@@ -44,6 +45,7 @@
44
45
  line-height: var(--ams-checkbox-line-height);
45
46
  outline-offset: var(--ams-checkbox-outline-offset);
46
47
 
48
+ @include hyphenation;
47
49
  @include text-rendering;
48
50
 
49
51
  &:hover {
@@ -64,7 +66,7 @@
64
66
  + .ams-checkbox__label .ams-checkbox__checkmark::after {
65
67
  background-color: var(--ams-checkbox-checkmark-checked-background-color);
66
68
  background-image: var(--ams-checkbox-checkmark-checked-background-image);
67
- border: 0;
69
+ border: none;
68
70
  }
69
71
  }
70
72
 
@@ -76,7 +78,7 @@
76
78
  background-position: center;
77
79
  background-repeat: no-repeat;
78
80
  background-size: 1rem;
79
- border: 0;
81
+ border: none;
80
82
  }
81
83
  }
82
84
 
@@ -92,7 +94,7 @@
92
94
  .ams-checkbox__input:disabled {
93
95
  + .ams-checkbox__label {
94
96
  color: var(--ams-checkbox-disabled-color);
95
- cursor: not-allowed;
97
+ cursor: var(--ams-checkbox-disabled-cursor);
96
98
 
97
99
  .ams-checkbox__checkmark::after {
98
100
  border-color: var(--ams-checkbox-checkmark-disabled-border-color);
@@ -151,7 +153,6 @@
151
153
  :is(.ams-checkbox__input:invalid, .ams-checkbox__input[aria-invalid="true"])
152
154
  + .ams-checkbox__label:hover
153
155
  .ams-checkbox__checkmark::after {
154
- // TODO: this should be the (currently non-existent) dark red hover color
155
156
  border-color: var(--ams-checkbox-checkmark-invalid-hover-border-color);
156
157
  }
157
158
 
@@ -169,7 +170,6 @@
169
170
  :is(.ams-checkbox__input:invalid:checked, .ams-checkbox__input[aria-invalid="true"]:checked)
170
171
  + .ams-checkbox__label:hover
171
172
  .ams-checkbox__checkmark::after {
172
- // TODO: this should be the (currently non-existent) dark red hover color
173
173
  background-color: var(--ams-checkbox-checkmark-invalid-checked-hover-background-color);
174
174
  }
175
175
 
@@ -177,7 +177,6 @@
177
177
  :is(.ams-checkbox__input:invalid:indeterminate, .ams-checkbox__input[aria-invalid="true"]:indeterminate)
178
178
  + .ams-checkbox__label:hover
179
179
  .ams-checkbox__checkmark::after {
180
- // TODO: this should be the (currently non-existent) dark red hover color
181
180
  background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-hover-background-color);
182
181
  }
183
182
 
@@ -3,22 +3,23 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- @use "../../common/size" as *;
7
-
8
6
  .ams-column {
9
7
  display: flex;
10
8
  flex-direction: column;
11
- gap: var(--ams-column-gap-md);
9
+ gap: var(--ams-column-gap-medium);
12
10
  }
13
11
 
14
- @each $size, $label in $ams-sizes {
15
- @if $size != "md" {
16
- .ams-column--gap-#{$label} {
17
- gap: var(--ams-column-gap-#{$size});
18
- }
12
+ @each $size in ("x-small", "small", "large", "x-large") {
13
+ .ams-column--gap-#{$size} {
14
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
15
+ gap: var(--ams-column-gap-#{$size});
19
16
  }
20
17
  }
21
18
 
19
+ .ams-column--gap-none {
20
+ gap: 0;
21
+ }
22
+
22
23
  .ams-column--align-around {
23
24
  justify-content: space-around;
24
25
  }
@@ -8,7 +8,7 @@
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: 0;
11
+ border: none;
12
12
  border-radius: 0; // Reset rounded borders on iOS devices
13
13
  margin-block: 0;
14
14
  }
@@ -47,7 +47,7 @@
47
47
  .ams-date-input::-webkit-calendar-picker-indicator {
48
48
  appearance: none;
49
49
  background-image: var(--ams-date-input-calender-picker-indicator-background-image);
50
- cursor: pointer;
50
+ cursor: var(--ams-date-input-calender-picker-indicator-cursor);
51
51
  }
52
52
 
53
53
  .ams-date-input:hover::-webkit-calendar-picker-indicator {
@@ -58,7 +58,7 @@
58
58
  background-color: var(--ams-date-input-disabled-background-color);
59
59
  box-shadow: var(--ams-date-input-disabled-box-shadow);
60
60
  color: var(--ams-date-input-disabled-color);
61
- cursor: not-allowed;
61
+ cursor: var(--ams-date-input-disabled-cursor);
62
62
  }
63
63
 
64
64
  .ams-date-input:disabled::-webkit-calendar-picker-indicator {
@@ -71,7 +71,6 @@
71
71
  box-shadow: var(--ams-date-input-invalid-box-shadow);
72
72
 
73
73
  &:hover {
74
- // TODO: this should be the (currently non-existent) dark red hover color
75
74
  box-shadow: var(--ams-date-input-invalid-hover-box-shadow);
76
75
  }
77
76
  }
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  @use "../../common/breakpoint" as *;
7
+ @use "../../common/hyphenation" as *;
7
8
  @use "../../common/text-rendering" as *;
8
9
 
9
10
  @mixin reset-dl {
@@ -25,6 +26,7 @@
25
26
  row-gap: var(--ams-description-list-row-gap);
26
27
 
27
28
  @include reset-dl;
29
+ @include hyphenation;
28
30
  @include text-rendering;
29
31
  }
30
32
 
@@ -34,23 +36,23 @@
34
36
  grid-template-columns: auto 1fr;
35
37
  }
36
38
 
37
- .ams-description-list--terms-width-sm,
38
- .ams-description-list--terms-width-sm .ams-description-list__section {
39
- grid-template-columns: 1fr 4fr;
39
+ .ams-description-list--narrow,
40
+ .ams-description-list--narrow .ams-description-list__section {
41
+ grid-template-columns: var(--ams-description-list-narrow-grid-template-columns);
40
42
  }
41
43
 
42
- .ams-description-list--terms-width-md,
43
- .ams-description-list--terms-width-md .ams-description-list__section {
44
- grid-template-columns: 1fr 2fr;
44
+ .ams-description-list--medium,
45
+ .ams-description-list--medium .ams-description-list__section {
46
+ grid-template-columns: var(--ams-description-list-medium-grid-template-columns);
45
47
  }
46
48
 
47
- .ams-description-list--terms-width-lg,
48
- .ams-description-list--terms-width-lg .ams-description-list__section {
49
- grid-template-columns: 1fr 1fr;
49
+ .ams-description-list--wide,
50
+ .ams-description-list--wide .ams-description-list__section {
51
+ grid-template-columns: var(--ams-description-list-wide-grid-template-columns);
50
52
  }
51
53
  }
52
54
 
53
- .ams-description-list--inverse-color {
55
+ .ams-description-list--inverse {
54
56
  color: var(--ams-description-list-inverse-color);
55
57
  }
56
58
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Dialog
4
4
 
5
- A Dialog allows the user to focus on one task or a piece of information by popping up and blocking the page content until the modal task is completed or until the user dismisses the action.
5
+ A popup window in which the user must perform an action to proceed.
6
6
 
7
7
  ## Guidelines
8
8
 
@@ -10,6 +10,8 @@ A Dialog allows the user to focus on one task or a piece of information by poppi
10
10
  - Use a dialog for short and non-frequent tasks.
11
11
  Consider using the main flow for regular tasks.
12
12
  - Wrap multiple buttons in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs).
13
+ - To open the Dialog, use `Dialog.open(dialogId)` from the React package.
14
+ - To close it, either call the `Dialog.close` function or add a `<form>` as in the ‘confirmation’ example.
13
15
 
14
16
  ## Keyboard support
15
17
 
@@ -19,10 +21,6 @@ A Dialog allows the user to focus on one task or a piece of information by poppi
19
21
  | Shift + Tab | Moves focus to the previous focusable element inside the dialog. |
20
22
  | Escape | Closes the dialog. |
21
23
 
22
- ## Closing Dialog without submit
23
-
24
- You can close a Dialog without submitting by using `<button type="button" onClick={Dialog.close}>`.
25
-
26
24
  ## References
27
25
 
28
26
  - [HTMLDialogElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement)
@@ -3,8 +3,12 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/breakpoint" as *;
7
+
6
8
  @mixin reset-dialog {
7
9
  inset-block: 0;
10
+ padding-block: 0;
11
+ padding-inline: 0;
8
12
  }
9
13
 
10
14
  /* A dialog must have `display: none` until the `open` attribute is set,
@@ -13,20 +17,26 @@ so do not apply these styles without an `open` attribute. */
13
17
  background-color: var(--ams-dialog-background-color);
14
18
  border: var(--ams-dialog-border);
15
19
  box-sizing: border-box;
16
- display: flex; // Using flex here, because grid works strangely in Safari
20
+ display: flex; // We’d like to use CSS Grid here, but that doesn’t work as expected in Safari.
17
21
  flex-direction: column;
18
22
  gap: var(--ams-dialog-gap);
19
23
  inline-size: var(--ams-dialog-inline-size);
20
24
  max-block-size: var(--ams-dialog-max-block-size);
21
25
  max-inline-size: var(--ams-dialog-max-inline-size);
22
- padding-block: var(--ams-dialog-padding-block);
23
- padding-inline: var(--ams-dialog-padding-inline);
24
26
 
25
27
  @include reset-dialog;
26
28
 
27
- /* No token because dialog does not inherit from any element in FireFox and Safari */
29
+ @media screen and (min-width: $ams-breakpoint-medium) {
30
+ inline-size: var(--ams-dialog-medium-inline-size);
31
+ max-block-size: var(--ams-dialog-medium-max-block-size);
32
+ }
33
+
34
+ /*
35
+ * The fallback value is for browsers where ::backdrop does not inherit from its originating element.
36
+ * @see https://caniuse.com/mdn-css_selectors_backdrop_inherit_from_originating_element
37
+ */
28
38
  &::backdrop {
29
- background: #0006;
39
+ background: var(--ams-dialog-backdrop-background-color, rgb(24 24 24 / 62.5%));
30
40
  }
31
41
  }
32
42
 
@@ -35,9 +45,32 @@ so do not apply these styles without an `open` attribute. */
35
45
  display: flex;
36
46
  gap: var(--ams-dialog-header-gap);
37
47
  justify-content: space-between;
48
+ padding-block: var(--ams-dialog-header-padding-block);
49
+ padding-inline: var(--ams-dialog-header-padding-inline);
50
+
51
+ @media screen and (min-width: $ams-breakpoint-medium) {
52
+ padding-block: var(--ams-dialog-header-medium-padding-block);
53
+ padding-inline: var(--ams-dialog-header-medium-padding-inline);
54
+ }
38
55
  }
39
56
 
40
57
  .ams-dialog__body {
41
58
  overflow-y: auto;
42
59
  overscroll-behavior-y: contain;
60
+ padding-block: var(--ams-dialog-body-padding-block);
61
+ padding-inline: var(--ams-dialog-body-padding-inline);
62
+
63
+ @media screen and (min-width: $ams-breakpoint-medium) {
64
+ padding-inline: var(--ams-dialog-body-medium-padding-inline);
65
+ }
66
+ }
67
+
68
+ .ams-dialog__footer {
69
+ padding-block: var(--ams-dialog-footer-padding-block);
70
+ padding-inline: var(--ams-dialog-footer-padding-inline);
71
+
72
+ @media screen and (min-width: $ams-breakpoint-medium) {
73
+ padding-block: var(--ams-dialog-footer-medium-padding-block);
74
+ padding-inline: var(--ams-dialog-footer-medium-padding-inline);
75
+ }
43
76
  }
@@ -3,6 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
9
  @mixin reset-p {
@@ -19,6 +20,7 @@
19
20
  gap: var(--ams-error-message-gap);
20
21
  line-height: var(--ams-error-message-line-height);
21
22
 
23
+ @include hyphenation;
22
24
  @include text-rendering;
23
25
  @include reset-p;
24
26
  }
@@ -7,7 +7,7 @@
7
7
  @use "../../common/text-rendering" as *;
8
8
 
9
9
  @mixin reset-fieldset {
10
- border: 0;
10
+ border: none;
11
11
  margin-inline: 0;
12
12
  padding-block: 0;
13
13
  padding-inline: 0;
@@ -30,23 +30,24 @@
30
30
  padding-inline: 0;
31
31
 
32
32
  + * {
33
- clear: both; // Reset the applied float for the legend’s first sibling
33
+ clear: both; // [2]
34
34
  }
35
35
  }
36
36
 
37
- // [1] This combination allows the fieldset border to go around the legend, instead of through it.
38
-
39
37
  .ams-field-set__legend {
40
38
  color: var(--ams-field-set-legend-color);
41
39
  font-family: var(--ams-field-set-legend-font-family);
42
40
  font-size: var(--ams-field-set-legend-font-size);
43
41
  font-weight: var(--ams-field-set-legend-font-weight);
44
42
  line-height: var(--ams-field-set-legend-line-height);
45
- margin-block-end: var(
46
- --ams-field-set-legend-margin-block-end
47
- ); /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
43
+ margin-block-end: var(--ams-field-set-legend-margin-block-end); // [3]
44
+ text-wrap: var(--ams-field-set-legend-text-wrap);
48
45
 
49
46
  @include hyphenation;
50
47
  @include text-rendering;
51
48
  @include reset-legend;
52
49
  }
50
+
51
+ // [1] This combination allows the fieldset border to go around the legend, instead of through it.
52
+ // [2] Reset the applied float for the legend’s first sibling.
53
+ // [3] We can’t use grid or flex display and a gap because of a bug in Chrome.
@@ -3,6 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
9
  @mixin reset-figure {
@@ -25,9 +26,10 @@
25
26
  font-weight: var(--ams-figure-caption-font-weight);
26
27
  line-height: var(--ams-figure-caption-line-height);
27
28
 
29
+ @include hyphenation;
28
30
  @include text-rendering;
29
31
  }
30
32
 
31
- .ams-figure__caption--inverse-color {
33
+ .ams-figure__caption--inverse {
32
34
  color: var(--ams-figure-caption-inverse-color);
33
35
  }
@@ -6,7 +6,7 @@
6
6
  @use "../../common/text-rendering" as *;
7
7
 
8
8
  @mixin reset-button {
9
- border: 0;
9
+ border: none;
10
10
  border-radius: 0; // Reset rounded borders on iOS devices
11
11
  }
12
12
 
@@ -21,7 +21,7 @@
21
21
  font-weight: var(--ams-file-input-font-weight);
22
22
  inline-size: 100%;
23
23
  line-height: var(--ams-file-input-line-height);
24
- outline-offset: calc(var(--ams-focus-outline-offset) * 2); // Compensate for the dashed border
24
+ outline-offset: var(--ams-file-input-outline-offset);
25
25
  padding-block: var(--ams-file-input-padding-block);
26
26
  padding-inline: var(--ams-file-input-padding-inline);
27
27
  touch-action: manipulation;
@@ -3,6 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
6
7
  @use "../../common/text-rendering" as *;
7
8
 
8
9
  @mixin reset-ul {
@@ -17,13 +18,13 @@
17
18
  gap: var(--ams-file-list-gap);
18
19
  padding-block: var(--ams-file-list-padding-block);
19
20
 
21
+ @include hyphenation;
20
22
  @include text-rendering;
21
23
  @include reset-ul;
22
24
  }
23
25
 
24
26
  .ams-file-list__item {
25
27
  display: flex;
26
- flex-direction: row;
27
28
  font-family: var(--ams-file-list-file-font-family);
28
29
  font-size: var(--ams-file-list-file-font-size);
29
30
  font-weight: var(--ams-file-list-file-font-weight);
@@ -6,15 +6,19 @@ Adds white space between a set of elements.
6
6
 
7
7
  ## Class names
8
8
 
9
- The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are available for the width or height of the gap.
10
-
11
- | Class name | Example |
12
- | ------------- | ----------------------------------------------------------------------------------------- |
13
- | `ams-gap--xs` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xs);" /> |
14
- | `ams-gap--sm` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-sm);" /> |
15
- | `ams-gap--md` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-md);" /> |
16
- | `ams-gap--lg` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-lg);" /> |
17
- | `ams-gap--xl` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-gap-xl);" /> |
9
+ Five options are available for the width or height of the gap:
10
+
11
+ - `ams-gap-xs`
12
+ - `ams-gap-s`
13
+ - `ams-gap-m`
14
+ - `ams-gap-l`
15
+ - `ams-gap-xl`
16
+
17
+ Because spacing is responsive, the gaps are as well.
18
+ They are also smaller in Compact Mode.
19
+ Consult the [Space](/docs/brand-design-tokens-space--docs) docs for an indication of their sizes.
20
+
21
+ The `2xl` space is intended for whitespace around a [Grid](/docs/components-layout-grid--docs) only, which can be produced through a `padding*` of `large`.
18
22
 
19
23
  ## Guidelines
20
24
 
@@ -3,17 +3,13 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- @use "sass:map";
7
- @use "../../common/size" as *;
8
-
9
- [class|="ams-gap-"] {
10
- display: grid !important;
11
- }
12
-
13
- @each $size in map.keys($ams-sizes) {
14
- @if $size != "no" {
15
- .ams-gap--#{$size} {
16
- grid-gap: var(--ams-gap-#{$size}) !important;
17
- }
6
+ // If you modify this list, you must also update the object in
7
+ // packages/react/src/common/shortSize.ts
8
+ // Note that we don’t offer a 2xl gap on purpose.
9
+ @each $size in ("xs", "s", "m", "l", "xl") {
10
+ .ams-gap-#{$size} {
11
+ display: grid !important;
12
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
13
+ gap: var(--ams-space-#{$size}) !important;
18
14
  }
19
15
  }
@@ -6,14 +6,15 @@ Divides the screen into columns to align the elements of a page.
6
6
 
7
7
  ## Guidelines
8
8
 
9
- - Every page should use the grid as the foundation for its layout.
10
- It is placed directly within the [Screen](/docs/components-layout-screen--docs).
11
- - A [Footer](/docs/components-containers-footer--docs) and a [Spotlight](/docs/components-containers-spotlight--docs) are slightly wider than the grid.
12
- You close one instance of the grid before these components.
13
- Inside and optionally after them, you start a new one.
14
- Multiple instances of the grid component are possible on a page, but the columns of all grids must align precisely.
15
- - Within the grid, you create cells containing the desired content.
16
- A cell often spans multiple columns of the grid.
9
+ - Every page uses the Grid component as the foundation for its layout.
10
+ It is a direct child of the [Page](/docs/components-containers-page--docs) container.
11
+ - The Grid provides 4, 8, or 12 columns, depending on the width of the window.
12
+ - Its children are `Grid.Cell` components that define how many columns they span, and optionally where they start.
13
+ Both its `span` and `start` properties accept a single value, or separate values for the narrow, medium and wide variations of the Grid.
14
+ - A single page can have several Grids.
15
+ This allows mixing a Grid with a [Spotlight](/docs/components-containers-spotlight--docs), [Breakout](/docs/components-layout-breakout--docs) or full width [Image](/docs/components-media-image--docs) which ‘bleed out’ of the main layout.
16
+ - Grids must not be nested.
17
+ The component is currently intended for the full width of the page only.
17
18
  - The Gap utility classes must not be used on the Grid component.
18
19
 
19
20
  ## Design
@@ -1,23 +1,25 @@
1
- @use "../../common/breakpoint" as *;
2
-
3
1
  /**
4
2
  * @license EUPL-1.2+
5
3
  * Copyright Gemeente Amsterdam
6
4
  */
7
5
 
6
+ @use "../../common/breakpoint" as *;
7
+
8
8
  @mixin ams-grid {
9
9
  column-gap: var(--ams-grid-column-gap);
10
10
  display: grid;
11
11
  grid-template-columns: repeat(var(--ams-grid-column-count), 1fr);
12
12
  padding-inline: var(--ams-grid-padding-inline);
13
- row-gap: var(--ams-grid-row-gap-md);
13
+ row-gap: var(--ams-grid-row-gap-xl);
14
14
 
15
15
  @media screen and (min-width: $ams-breakpoint-medium) {
16
16
  grid-template-columns: repeat(var(--ams-grid-medium-column-count), 1fr);
17
+ padding-inline: var(--ams-grid-medium-padding-inline);
17
18
  }
18
19
 
19
20
  @media screen and (min-width: $ams-breakpoint-wide) {
20
21
  grid-template-columns: repeat(var(--ams-grid-wide-column-count), 1fr);
22
+ padding-inline: var(--ams-grid-wide-padding-inline);
21
23
  }
22
24
  }
23
25
 
@@ -27,50 +29,50 @@
27
29
  row-gap: initial;
28
30
  }
29
31
 
30
- @mixin ams-grid--gap-vertical--small {
31
- row-gap: var(--ams-grid-row-gap-sm);
32
+ @mixin ams-grid--gap-vertical--large {
33
+ row-gap: var(--ams-grid-row-gap-l);
32
34
  }
33
35
 
34
- @mixin ams-grid--gap-vertical--large {
35
- row-gap: var(--ams-grid-row-gap-lg);
36
+ @mixin ams-grid--gap-vertical--2x-large {
37
+ row-gap: var(--ams-grid-row-gap-2xl);
36
38
  }
37
39
 
38
40
  // Grid padding
39
41
 
40
- @mixin ams-grid--padding-bottom--small {
41
- padding-block-end: var(--ams-grid-padding-block-sm);
42
+ @mixin ams-grid--padding-bottom--large {
43
+ padding-block-end: var(--ams-grid-padding-block-l);
42
44
  }
43
45
 
44
- @mixin ams-grid--padding-bottom--medium {
45
- padding-block-end: var(--ams-grid-padding-block-md);
46
+ @mixin ams-grid--padding-bottom--x-large {
47
+ padding-block-end: var(--ams-grid-padding-block-xl);
46
48
  }
47
49
 
48
- @mixin ams-grid--padding-bottom--large {
49
- padding-block-end: var(--ams-grid-padding-block-lg);
50
+ @mixin ams-grid--padding-bottom--2x-large {
51
+ padding-block-end: var(--ams-grid-padding-block-2xl);
50
52
  }
51
53
 
52
- @mixin ams-grid--padding-top--small {
53
- padding-block-start: var(--ams-grid-padding-block-sm);
54
+ @mixin ams-grid--padding-top--large {
55
+ padding-block-start: var(--ams-grid-padding-block-l);
54
56
  }
55
57
 
56
- @mixin ams-grid--padding-top--medium {
57
- padding-block-start: var(--ams-grid-padding-block-md);
58
+ @mixin ams-grid--padding-top--x-large {
59
+ padding-block-start: var(--ams-grid-padding-block-xl);
58
60
  }
59
61
 
60
- @mixin ams-grid--padding-top--large {
61
- padding-block-start: var(--ams-grid-padding-block-lg);
62
+ @mixin ams-grid--padding-top--2x-large {
63
+ padding-block-start: var(--ams-grid-padding-block-2xl);
62
64
  }
63
65
 
64
- @mixin ams-grid--padding-vertical--small {
65
- padding-block: var(--ams-grid-padding-block-sm);
66
+ @mixin ams-grid--padding-vertical--large {
67
+ padding-block: var(--ams-grid-padding-block-l);
66
68
  }
67
69
 
68
- @mixin ams-grid--padding-vertical--medium {
69
- padding-block: var(--ams-grid-padding-block-md);
70
+ @mixin ams-grid--padding-vertical--x-large {
71
+ padding-block: var(--ams-grid-padding-block-xl);
70
72
  }
71
73
 
72
- @mixin ams-grid--padding-vertical--large {
73
- padding-block: var(--ams-grid-padding-block-lg);
74
+ @mixin ams-grid--padding-vertical--2x-large {
75
+ padding-block: var(--ams-grid-padding-block-2xl);
74
76
  }
75
77
 
76
78
  @mixin ams-grid__cell--span-all {