@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
@@ -4,16 +4,21 @@
4
4
  */
5
5
 
6
6
  .ams-alert {
7
- align-items: flex-start;
8
7
  background-color: var(--ams-alert-background-color);
9
- border-style: var(--ams-alert-border-style);
10
- border-width: var(--ams-alert-border-width);
8
+ box-shadow: var(--ams-alert-box-shadow);
11
9
  display: flex;
12
- flex-direction: row;
13
- gap: var(--ams-alert-gap);
14
- justify-content: space-between;
15
- padding-block: var(--ams-alert-padding-block);
16
- padding-inline: var(--ams-alert-padding-inline);
10
+
11
+ @media (forced-colors: active) {
12
+ border-style: solid;
13
+ border-width: var(--ams-alert-forced-colors-border-width);
14
+ }
15
+ }
16
+
17
+ .ams-alert__severity-indicator {
18
+ background-color: var(--ams-alert-severity-indicator-background-color);
19
+ flex: none;
20
+ padding-block: var(--ams-alert-severity-indicator-padding-block);
21
+ padding-inline: var(--ams-alert-severity-indicator-padding-inline);
17
22
  }
18
23
 
19
24
  .ams-alert__content {
@@ -21,20 +26,30 @@
21
26
  flex: auto;
22
27
  flex-direction: column;
23
28
  gap: var(--ams-alert-content-gap);
29
+ padding-block: var(--ams-alert-content-padding-block);
30
+ padding-inline: var(--ams-alert-content-padding-inline);
24
31
  }
25
32
 
26
33
  .ams-alert--error {
27
- border-color: var(--ams-alert-error-border-color);
28
- }
34
+ box-shadow: var(--ams-alert-error-box-shadow);
29
35
 
30
- .ams-alert--info {
31
- border-color: var(--ams-alert-info-border-color);
36
+ > .ams-alert__severity-indicator {
37
+ background-color: var(--ams-alert-error-severity-indicator-background-color);
38
+ }
32
39
  }
33
40
 
34
41
  .ams-alert--success {
35
- border-color: var(--ams-alert-success-border-color);
42
+ box-shadow: var(--ams-alert-success-box-shadow);
43
+
44
+ > .ams-alert__severity-indicator {
45
+ background-color: var(--ams-alert-success-severity-indicator-background-color);
46
+ }
36
47
  }
37
48
 
38
49
  .ams-alert--warning {
39
- border-color: var(--ams-alert-warning-border-color);
50
+ box-shadow: var(--ams-alert-warning-box-shadow);
51
+
52
+ > .ams-alert__severity-indicator {
53
+ background-color: var(--ams-alert-warning-severity-indicator-background-color);
54
+ }
40
55
  }
@@ -9,14 +9,14 @@ Constrains media content to a supported aspect ratio.
9
9
  Each available aspect ratio has an associated class name.
10
10
  The class can be applied to any component or element.
11
11
 
12
- | Class name | Example |
13
- | :-------------------------- | :-------------------------------------------------------------------------- |
14
- | `ams-aspect-ratio--x-tall` | <div className="ams-docs-token-example--space ams-aspect-ratio--x-tall" /> |
15
- | `ams-aspect-ratio--tall` | <div className="ams-docs-token-example--space ams-aspect-ratio--tall" /> |
16
- | `ams-aspect-ratio--square` | <div className="ams-docs-token-example--space ams-aspect-ratio--square" /> |
17
- | `ams-aspect-ratio--wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--wide" /> |
18
- | `ams-aspect-ratio--x-wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--x-wide" /> |
19
- | `ams-aspect-ratio--2x-wide` | <div className="ams-docs-token-example--space ams-aspect-ratio--2x-wide" /> |
12
+ | Class name | Example |
13
+ | :---------------------- | :---------------------------------------------------------------------- |
14
+ | `ams-aspect-ratio-9-16` | <div className="ams-docs-token-example--space ams-aspect-ratio-9-16" /> |
15
+ | `ams-aspect-ratio-3-4` | <div className="ams-docs-token-example--space ams-aspect-ratio-3-4" /> |
16
+ | `ams-aspect-ratio-1-1` | <div className="ams-docs-token-example--space ams-aspect-ratio-1-1" /> |
17
+ | `ams-aspect-ratio-4-3` | <div className="ams-docs-token-example--space ams-aspect-ratio-4-3" /> |
18
+ | `ams-aspect-ratio-16-9` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-9" /> |
19
+ | `ams-aspect-ratio-16-5` | <div className="ams-docs-token-example--space ams-aspect-ratio-16-5" /> |
20
20
 
21
21
  ## Guidelines
22
22
 
@@ -4,9 +4,12 @@
4
4
  */
5
5
 
6
6
  .ams-aspect-ratio {
7
- @each $name in ("x-tall", "tall", "square", "wide", "x-wide", "2x-wide") {
8
- &--#{$name} {
9
- aspect-ratio: var(--ams-aspect-ratio-#{$name}) !important;
7
+ // If you modify this list, you must also update the
8
+ // aspectRatioOptions in packages/react/src/common/types.ts
9
+ @each $value in ("9-16", "3-4", "1-1", "4-3", "16-9", "16-5") {
10
+ &-#{$value} {
11
+ /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
12
+ aspect-ratio: var(--ams-aspect-ratio-#{$value}) !important;
10
13
  }
11
14
  }
12
15
  }
@@ -6,10 +6,11 @@ A circular badge representing a person.
6
6
 
7
7
  ## Design
8
8
 
9
- The avatar contains 1 or 2 initial letters from the person's full name, a picture, or a generic icon.
10
- The default background colour is dark blue.
9
+ - The avatar contains 1 or 2 initial letters from the persons full name, a picture, or a generic icon.
11
10
 
12
11
  ## Guidelines
13
12
 
14
- - Display an avatar for the person currently using the application,
15
- or to associate a person with a content item.
13
+ - Show an avatar for the user of the application, or to associate a person with a content item.
14
+ - To personalize the Avatar, the user can be allowed to choose one of the [highlight colours](/docs/brand-design-tokens-colour--docs).
15
+ The default is purple.
16
+ The design system does not define a meaning to any of these background colours.
@@ -5,7 +5,9 @@
5
5
 
6
6
  .ams-avatar {
7
7
  aspect-ratio: var(--ams-avatar-aspect-ratio);
8
+ background-color: var(--ams-avatar-background-color);
8
9
  border-radius: 50%;
10
+ color: var(--ams-avatar-color);
9
11
  display: inline-flex;
10
12
  font-family: var(--ams-avatar-font-family);
11
13
  font-size: var(--ams-avatar-font-size);
@@ -37,19 +39,9 @@
37
39
  vertical-align: middle; /* Remove ‘phantom’ white space when image doesn’t load */
38
40
  }
39
41
 
40
- .ams-avatar--black {
41
- background-color: var(--ams-avatar-black-background-color);
42
- color: var(--ams-avatar-black-color);
43
- }
44
-
45
- .ams-avatar--blue {
46
- background-color: var(--ams-avatar-blue-background-color);
47
- color: var(--ams-avatar-blue-color);
48
- }
49
-
50
- .ams-avatar--dark-green {
51
- background-color: var(--ams-avatar-dark-green-background-color);
52
- color: var(--ams-avatar-dark-green-color);
42
+ .ams-avatar--azure {
43
+ background-color: var(--ams-avatar-azure-background-color);
44
+ color: var(--ams-avatar-azure-color);
53
45
  }
54
46
 
55
47
  .ams-avatar--green {
@@ -57,24 +49,9 @@
57
49
  color: var(--ams-avatar-green-color);
58
50
  }
59
51
 
60
- .ams-avatar--grey-1 {
61
- background-color: var(--ams-avatar-grey-1-background-color);
62
- color: var(--ams-avatar-grey-1-color);
63
- }
64
-
65
- .ams-avatar--grey-2 {
66
- background-color: var(--ams-avatar-grey-2-background-color);
67
- color: var(--ams-avatar-grey-2-color);
68
- }
69
-
70
- .ams-avatar--grey-3 {
71
- background-color: var(--ams-avatar-grey-3-background-color);
72
- color: var(--ams-avatar-grey-3-color);
73
- }
74
-
75
- .ams-avatar--light-blue {
76
- background-color: var(--ams-avatar-light-blue-background-color);
77
- color: var(--ams-avatar-light-blue-color);
52
+ .ams-avatar--lime {
53
+ background-color: var(--ams-avatar-lime-background-color);
54
+ color: var(--ams-avatar-lime-color);
78
55
  }
79
56
 
80
57
  .ams-avatar--magenta {
@@ -87,21 +64,6 @@
87
64
  color: var(--ams-avatar-orange-color);
88
65
  }
89
66
 
90
- .ams-avatar--purple {
91
- background-color: var(--ams-avatar-purple-background-color);
92
- color: var(--ams-avatar-purple-color);
93
- }
94
-
95
- .ams-avatar--red {
96
- background-color: var(--ams-avatar-red-background-color);
97
- color: var(--ams-avatar-red-color);
98
- }
99
-
100
- .ams-avatar--white {
101
- background-color: var(--ams-avatar-white-background-color);
102
- color: var(--ams-avatar-white-color);
103
- }
104
-
105
67
  .ams-avatar--yellow {
106
68
  background-color: var(--ams-avatar-yellow-background-color);
107
69
  color: var(--ams-avatar-yellow-color);
@@ -2,11 +2,12 @@
2
2
 
3
3
  # Badge
4
4
 
5
- A prominently coloured box containing 1 or 2 words.
6
- Guides the user in taking a specific action or describes its surrounding content.
5
+ A prominent label that indicates a category, property or instruction.
7
6
 
8
- ## Design
7
+ ## Guidelines
9
8
 
10
- The badge can contain a short text or a number.
11
- The default background colour is dark green.
12
- Suggestions on when to use the other colours will follow soon.
9
+ - Let the badge contain a short text or a number.
10
+ - Use any of the feedback or highlight [colours](/docs/brand-design-tokens-colour--docs) for the background.
11
+ The default is green.
12
+ Red, orange and green are especially useful for showing an error, warning, or success.
13
+ However, they can also be combined with the other colours without carrying these meanings.
@@ -3,53 +3,31 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @use "../../common/hyphenation" as *;
7
+ @use "../../common/text-rendering" as *;
8
+
6
9
  .ams-badge {
10
+ background-color: var(--ams-badge-background-color);
11
+ color: var(--ams-badge-color);
7
12
  display: inline-block;
8
13
  font-family: var(--ams-badge-font-family);
9
14
  font-size: var(--ams-badge-font-size);
10
15
  font-weight: var(--ams-badge-font-weight);
11
16
  line-height: var(--ams-badge-line-height);
12
17
  padding-inline: var(--ams-badge-padding-inline);
13
- }
14
-
15
- .ams-badge--black {
16
- background-color: var(--ams-badge-black-background-color);
17
- color: var(--ams-badge-black-color);
18
- }
19
-
20
- .ams-badge--blue {
21
- background-color: var(--ams-badge-blue-background-color);
22
- color: var(--ams-badge-blue-color);
23
- }
24
-
25
- .ams-badge--dark-green {
26
- background-color: var(--ams-badge-dark-green-background-color);
27
- color: var(--ams-badge-dark-green-color);
28
- }
29
-
30
- .ams-badge--green {
31
- background-color: var(--ams-badge-green-background-color);
32
- color: var(--ams-badge-green-color);
33
- }
34
18
 
35
- .ams-badge--grey-1 {
36
- background-color: var(--ams-badge-grey-1-background-color);
37
- color: var(--ams-badge-grey-1-color);
19
+ @include hyphenation;
20
+ @include text-rendering;
38
21
  }
39
22
 
40
- .ams-badge--grey-2 {
41
- background-color: var(--ams-badge-grey-2-background-color);
42
- color: var(--ams-badge-grey-2-color);
23
+ .ams-badge--azure {
24
+ background-color: var(--ams-badge-azure-background-color);
25
+ color: var(--ams-badge-azure-color);
43
26
  }
44
27
 
45
- .ams-badge--grey-3 {
46
- background-color: var(--ams-badge-grey-3-background-color);
47
- color: var(--ams-badge-grey-3-color);
48
- }
49
-
50
- .ams-badge--light-blue {
51
- background-color: var(--ams-badge-light-blue-background-color);
52
- color: var(--ams-badge-light-blue-color);
28
+ .ams-badge--lime {
29
+ background-color: var(--ams-badge-lime-background-color);
30
+ color: var(--ams-badge-lime-color);
53
31
  }
54
32
 
55
33
  .ams-badge--magenta {
@@ -72,11 +50,6 @@
72
50
  color: var(--ams-badge-red-color);
73
51
  }
74
52
 
75
- .ams-badge--white {
76
- background-color: var(--ams-badge-white-background-color);
77
- color: var(--ams-badge-white-color);
78
- }
79
-
80
53
  .ams-badge--yellow {
81
54
  background-color: var(--ams-badge-yellow-background-color);
82
55
  color: var(--ams-badge-yellow-color);
@@ -34,6 +34,6 @@
34
34
  }
35
35
  }
36
36
 
37
- .ams-blockquote--inverse-color {
37
+ .ams-blockquote--inverse {
38
38
  color: var(--ams-blockquote-inverse-color);
39
39
  }
@@ -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-ol {
@@ -22,6 +23,7 @@
22
23
  break-after: avoid;
23
24
  break-inside: avoid;
24
25
 
26
+ @include hyphenation;
25
27
  @include text-rendering;
26
28
  @include reset-ol;
27
29
  }
@@ -19,52 +19,52 @@ $ams-breakout-row-span-max: 4;
19
19
  @include ams-grid--gap-vertical--none;
20
20
  }
21
21
 
22
- .ams-breakout--gap-vertical--small {
23
- @include ams-grid--gap-vertical--small;
24
- }
25
-
26
22
  .ams-breakout--gap-vertical--large {
27
23
  @include ams-grid--gap-vertical--large;
28
24
  }
29
25
 
30
- // Grid padding
31
-
32
- .ams-breakout--padding-bottom--small {
33
- @include ams-grid--padding-bottom--small;
26
+ .ams-breakout--gap-vertical--2x-large {
27
+ @include ams-grid--gap-vertical--2x-large;
34
28
  }
35
29
 
36
- .ams-breakout--padding-bottom--medium {
37
- @include ams-grid--padding-bottom--medium;
38
- }
30
+ // Grid padding
39
31
 
40
32
  .ams-breakout--padding-bottom--large {
41
33
  @include ams-grid--padding-bottom--large;
42
34
  }
43
35
 
44
- .ams-breakout--padding-top--small {
45
- @include ams-grid--padding-top--small;
36
+ .ams-breakout--padding-bottom--x-large {
37
+ @include ams-grid--padding-bottom--x-large;
46
38
  }
47
39
 
48
- .ams-breakout--padding-top--medium {
49
- @include ams-grid--padding-top--medium;
40
+ .ams-breakout--padding-bottom--2x-large {
41
+ @include ams-grid--padding-bottom--2x-large;
50
42
  }
51
43
 
52
44
  .ams-breakout--padding-top--large {
53
45
  @include ams-grid--padding-top--large;
54
46
  }
55
47
 
56
- .ams-breakout--padding-vertical--small {
57
- @include ams-grid--padding-vertical--small;
48
+ .ams-breakout--padding-top--x-large {
49
+ @include ams-grid--padding-top--x-large;
58
50
  }
59
51
 
60
- .ams-breakout--padding-vertical--medium {
61
- @include ams-grid--padding-vertical--medium;
52
+ .ams-breakout--padding-top--2x-large {
53
+ @include ams-grid--padding-top--2x-large;
62
54
  }
63
55
 
64
56
  .ams-breakout--padding-vertical--large {
65
57
  @include ams-grid--padding-vertical--large;
66
58
  }
67
59
 
60
+ .ams-breakout--padding-vertical--x-large {
61
+ @include ams-grid--padding-vertical--x-large;
62
+ }
63
+
64
+ .ams-breakout--padding-vertical--2x-large {
65
+ @include ams-grid--padding-vertical--2x-large;
66
+ }
67
+
68
68
  // Column span
69
69
  // The order of these declaration blocks ensures the intended specificity.
70
70
 
@@ -114,15 +114,15 @@ $ams-breakout-row-span-max: 4;
114
114
 
115
115
  .ams-breakout__cell--has-spotlight {
116
116
  display: grid; /* Stretches the empty Spotlight vertically. */
117
- margin-block: calc(var(--ams-space-grid-md) * -1);
118
- margin-inline: calc(var(--ams-space-grid-lg) * -1);
117
+ margin-block: calc(var(--ams-space-xl) * -1);
118
+ margin-inline: calc(var(--ams-space-2xl) * -1);
119
119
 
120
120
  .ams-breakout--gap-vertical--small > & {
121
- margin-block: calc(var(--ams-space-grid-sm) * -1);
121
+ margin-block: calc(var(--ams-space-l) * -1);
122
122
  }
123
123
 
124
124
  .ams-breakout--gap-vertical--large > & {
125
- margin-block: calc(var(--ams-space-grid-lg) * -1);
125
+ margin-block: calc(var(--ams-space-2xl) * -1);
126
126
  }
127
127
  }
128
128
 
@@ -9,7 +9,7 @@ Allows the user to perform actions and operate the user interface.
9
9
  - Choose a short label that describes the function of the button.
10
10
  - Use the correct type of button for the corresponding application, e.g. `type="submit"` for the primary form button.
11
11
  - Make sure one can operate a button through a keyboard.
12
- - Wrap 2 or more consecutive buttons and/or links in an [Action Group](?path=/docs/components-buttons-action-group--docs).
12
+ - Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs).
13
13
  - Primary, secondary and tertiary buttons can be used side by side.
14
14
  Skipping levels is allowed.
15
15
 
@@ -3,10 +3,11 @@
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-button {
9
- border: 0;
10
+ border: none;
10
11
  margin-block: 0; // [1]
11
12
  margin-inline: 0; // [1]
12
13
 
@@ -18,6 +19,7 @@
18
19
  display: inline-flex;
19
20
  font-family: var(--ams-button-font-family);
20
21
  font-size: var(--ams-button-font-size);
22
+ font-weight: var(--ams-button-font-weight);
21
23
  gap: var(--ams-button-gap);
22
24
  justify-content: center;
23
25
  line-height: var(--ams-button-line-height);
@@ -26,6 +28,7 @@
26
28
  padding-inline: var(--ams-button-padding-inline);
27
29
  touch-action: manipulation;
28
30
 
31
+ @include hyphenation;
29
32
  @include text-rendering;
30
33
  @include reset-button;
31
34
 
@@ -2,27 +2,28 @@
2
2
 
3
3
  # Card
4
4
 
5
- Use a card on an overview page to link to an article page, such as a news article, a job vacancy, or a search result.
6
- The card typically includes the title, introduction, and an image of the content.
7
- The link is mandatory.
5
+ A brief section of a heading, some text, and optionally an image, that leads to a related page.
8
6
 
9
7
  ## Guidelines
10
8
 
11
- - The title of a card is a link within a heading.
12
- The same guidelines as for regular [links](/docs/components-navigation-link--docs) and [headings](/docs/components-text-heading--docs) apply here.
13
- The link is active across the entire area of the card.
9
+ - The mandatory title of a card is a link within a Heading.
10
+ The guidelines for regular [links](/docs/components-navigation-link--docs) and [headings](/docs/components-text-heading--docs) apply.
11
+ The link is made active across the entire area of the card.
14
12
  - A card needs more content than just a title.
15
- Supplement this with textual and/or visual content.
16
- - Place the text in a regular paragraph.
17
- Only use the smallest text size for a tagline or date.
18
- - This component may not be the best option if the content does not represent a detailed page.
19
- For referencing a thematic page, use a [top task link](/docs/components-navigation-top-task-link--docs).
20
- You can also use a [regular link](/docs/components-navigation-link--docs).
13
+ Add a short text and optionally an image and metadata.
14
+ - Use the Card Heading, Card Heading Group and Card Image subcomponents.
15
+ They apply the correct spacing.
16
+ - Card Heading requires a `level`, because there is no sensible default.
17
+ Its visual size of `heading-4` can be overridden.
18
+ - Place the text in a regular [Paragraph](/docs/components-text-paragraph--docs).
19
+ Use a small Paragraph for a publication date.
20
+ - This component is not the best option if the target content does not represent an article-like page.
21
+ In that case, use a Heading, a Paragraph and a [Standalone Link](/docs/components-navigation-standalone-link--docs) instead.
21
22
 
22
23
  ### Screen readers
23
24
 
24
- With a screen reader, you can navigate using headings and links in a document.
25
- The title of a card is a link within a heading, allowing you to utilize both navigation methods.
25
+ Screen reader users may navigate a page using headings and links.
26
+ A Card works well in both approaches as its title carries a link.
26
27
  A screen reader reads the title first, followed by the rest of the content.
27
28
 
28
29
  ### Using links with routing libraries
@@ -5,36 +5,23 @@
5
5
 
6
6
  .ams-card {
7
7
  display: grid;
8
- gap: var(--ams-card-gap);
9
8
  outline-offset: var(--ams-card-outline-offset);
10
- position: relative;
9
+ position: relative; // Allows stretching the card link below.
11
10
  touch-action: manipulation;
12
11
 
13
- /* Set native outline on card if card has focus visible within */
12
+ // Set native outline to Card if it has a visible focus inside.
14
13
  &:has(:focus-visible) {
15
14
  outline-color: -webkit-focus-ring-color;
16
15
  outline-style: auto;
17
16
  outline-width: 0.0625rem;
18
17
  }
19
18
 
20
- /*
21
- Remove link focus outline only if :has is supported,
22
- which means the outline on the whole card is set
23
- */
24
- &:has(:focus-visible) a:focus {
25
- outline: none;
19
+ > .ams-card__heading:has(+ *) {
20
+ margin-block-end: var(--ams-card-heading-margin-block-end);
26
21
  }
27
22
 
28
- /*
29
- This trick, together with position: relative on the outer wrapper, makes the whole card clickable.
30
- Taken from https://inclusive-components.design/cards/
31
- */
32
- a::after {
33
- content: "";
34
- display: block;
35
- inset-block: 0;
36
- inset-inline: 0;
37
- position: absolute;
23
+ > .ams-card__image:has(+ *) {
24
+ margin-block-end: var(--ams-card-image-margin-block-end);
38
25
  }
39
26
  }
40
27
 
@@ -42,6 +29,7 @@
42
29
  display: flex;
43
30
  flex-direction: column-reverse;
44
31
  gap: var(--ams-card-heading-group-gap);
32
+ margin-block-end: var(--ams-card-heading-group-margin-block-end);
45
33
  }
46
34
 
47
35
  .ams-card__link {
@@ -50,8 +38,25 @@
50
38
  text-decoration-thickness: var(--ams-card-link-text-decoration-thickness);
51
39
  text-underline-offset: var(--ams-card-link-text-underline-offset);
52
40
 
41
+ // Make the whole Card clickable by making the link cover its entire area.
42
+ // Source: https://inclusive-components.design/cards/
43
+ &::after {
44
+ content: "";
45
+ display: block;
46
+ inset-block: 0;
47
+ inset-inline: 0;
48
+ position: absolute;
49
+ }
50
+
53
51
  &:hover {
54
52
  color: var(--ams-card-link-hover-color);
55
53
  text-decoration-line: var(--ams-card-link-hover-text-decoration-line);
56
54
  }
55
+
56
+ // Remove the outline from the link; it’s already on the Card.
57
+ // Reuses the `.ams-card:has(:focus-visible)` selector above, so that
58
+ // browsers that support it apply both styles, while those that don’t apply neither.
59
+ .ams-card:has(:focus-visible) &:focus {
60
+ outline: none;
61
+ }
57
62
  }
@@ -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
  .ams-character-count {
@@ -12,6 +13,7 @@
12
13
  font-weight: var(--ams-character-count-font-weight);
13
14
  line-height: var(--ams-character-count-line-height);
14
15
 
16
+ @include hyphenation;
15
17
  @include text-rendering;
16
18
  }
17
19