@amsterdam/design-system-css 0.4.0 → 0.6.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 (177) hide show
  1. package/CHANGELOG.md +51 -2
  2. package/LICENSE.txt +287 -0
  3. package/README.md +11 -0
  4. package/dist/accordion/accordion.css +1 -1
  5. package/dist/accordion/accordion.css.map +1 -1
  6. package/dist/alert/alert.css +1 -1
  7. package/dist/alert/alert.css.map +1 -1
  8. package/dist/badge/badge.css +1 -1
  9. package/dist/badge/badge.css.map +1 -1
  10. package/dist/blockquote/blockquote.css +1 -1
  11. package/dist/blockquote/blockquote.css.map +1 -1
  12. package/dist/breadcrumb/breadcrumb.css +1 -1
  13. package/dist/breadcrumb/breadcrumb.css.map +1 -1
  14. package/dist/button/button.css +1 -1
  15. package/dist/button/button.css.map +1 -1
  16. package/dist/checkbox/checkbox.css +1 -1
  17. package/dist/checkbox/checkbox.css.map +1 -1
  18. package/dist/column/column.css +1 -0
  19. package/dist/column/column.css.map +1 -0
  20. package/dist/dialog/dialog.css +1 -1
  21. package/dist/dialog/dialog.css.map +1 -1
  22. package/dist/fieldset/fieldset.css +1 -0
  23. package/dist/fieldset/fieldset.css.map +1 -0
  24. package/dist/form-label/form-label.css +1 -1
  25. package/dist/form-label/form-label.css.map +1 -1
  26. package/dist/gap/gap.css +1 -0
  27. package/dist/gap/gap.css.map +1 -0
  28. package/dist/grid/grid.css +1 -1
  29. package/dist/grid/grid.css.map +1 -1
  30. package/dist/header/header.css +1 -1
  31. package/dist/header/header.css.map +1 -1
  32. package/dist/heading/heading.css +1 -1
  33. package/dist/heading/heading.css.map +1 -1
  34. package/dist/icon/icon.css +1 -1
  35. package/dist/icon/icon.css.map +1 -1
  36. package/dist/index.css +1 -1
  37. package/dist/index.css.map +1 -1
  38. package/dist/link/link.css +1 -1
  39. package/dist/link/link.css.map +1 -1
  40. package/dist/link-list/link-list.css +1 -1
  41. package/dist/link-list/link-list.css.map +1 -1
  42. package/dist/margin/margin.css +1 -0
  43. package/dist/margin/margin.css.map +1 -0
  44. package/dist/mega-menu/mega-menu.css.map +1 -1
  45. package/dist/ordered-list/ordered-list.css +1 -1
  46. package/dist/ordered-list/ordered-list.css.map +1 -1
  47. package/dist/page-heading/page-heading.css +1 -1
  48. package/dist/page-heading/page-heading.css.map +1 -1
  49. package/dist/page-menu/page-menu.css +1 -1
  50. package/dist/page-menu/page-menu.css.map +1 -1
  51. package/dist/pagination/pagination.css +1 -1
  52. package/dist/pagination/pagination.css.map +1 -1
  53. package/dist/paragraph/paragraph.css +1 -1
  54. package/dist/paragraph/paragraph.css.map +1 -1
  55. package/dist/radio/radio.css +1 -0
  56. package/dist/radio/radio.css.map +1 -0
  57. package/dist/row/row.css +1 -0
  58. package/dist/row/row.css.map +1 -0
  59. package/dist/search-field/search-field.css +1 -1
  60. package/dist/search-field/search-field.css.map +1 -1
  61. package/dist/skip-link/skip-link.css +1 -1
  62. package/dist/skip-link/skip-link.css.map +1 -1
  63. package/dist/switch/switch.css +1 -1
  64. package/dist/switch/switch.css.map +1 -1
  65. package/dist/table/table.css +1 -1
  66. package/dist/table/table.css.map +1 -1
  67. package/dist/tabs/tabs.css +1 -0
  68. package/dist/tabs/tabs.css.map +1 -0
  69. package/dist/text-area/text-area.css +1 -0
  70. package/dist/text-area/text-area.css.map +1 -0
  71. package/dist/text-input/text-input.css +1 -1
  72. package/dist/text-input/text-input.css.map +1 -1
  73. package/dist/top-task-link/top-task-link.css +1 -1
  74. package/dist/top-task-link/top-task-link.css.map +1 -1
  75. package/dist/unordered-list/unordered-list.css +1 -1
  76. package/dist/unordered-list/unordered-list.css.map +1 -1
  77. package/package.json +9 -10
  78. package/src/common/breakpoint.scss +1 -1
  79. package/src/common/calculate-fluid-style.scss +1 -1
  80. package/src/common/hide-input.scss +11 -0
  81. package/src/common/hyphenation.scss +10 -0
  82. package/src/common/input-label-focus.scss +21 -0
  83. package/src/common/size.scss +13 -0
  84. package/src/components/accordion/README.md +2 -0
  85. package/src/components/accordion/accordion.scss +7 -12
  86. package/src/components/alert/README.md +4 -2
  87. package/src/components/alert/alert.scss +3 -5
  88. package/src/components/aspect-ratio/README.md +2 -0
  89. package/src/components/aspect-ratio/aspect-ratio.scss +1 -1
  90. package/src/components/badge/README.md +2 -0
  91. package/src/components/badge/badge.scss +3 -8
  92. package/src/components/blockquote/README.md +2 -0
  93. package/src/components/blockquote/blockquote.scss +6 -8
  94. package/src/components/breadcrumb/README.md +2 -0
  95. package/src/components/breadcrumb/breadcrumb.scss +3 -8
  96. package/src/components/button/README.md +3 -1
  97. package/src/components/button/button.scss +60 -15
  98. package/src/components/card/README.md +5 -3
  99. package/src/components/card/card.scss +1 -1
  100. package/src/components/checkbox/README.md +3 -1
  101. package/src/components/checkbox/checkbox.scss +19 -31
  102. package/src/components/column/README.md +5 -0
  103. package/src/components/column/column.scss +16 -0
  104. package/src/components/dialog/README.md +2 -0
  105. package/src/components/dialog/dialog.scss +7 -9
  106. package/src/components/fieldset/README.md +18 -0
  107. package/src/components/fieldset/fieldset.scss +34 -0
  108. package/src/components/footer/README.md +2 -0
  109. package/src/components/form-label/README.md +2 -0
  110. package/src/components/form-label/form-label.scss +6 -8
  111. package/src/components/gap/README.md +5 -0
  112. package/src/components/gap/gap.scss +16 -0
  113. package/src/components/grid/README.md +5 -3
  114. package/src/components/grid/grid.scss +14 -21
  115. package/src/components/header/README.md +2 -0
  116. package/src/components/header/header.scss +7 -7
  117. package/src/components/heading/README.md +2 -0
  118. package/src/components/heading/heading.scss +16 -43
  119. package/src/components/icon/README.md +3 -1
  120. package/src/components/icon/icon.scss +13 -51
  121. package/src/components/icon-button/README.md +3 -1
  122. package/src/components/icon-button/icon-button.scss +1 -1
  123. package/src/components/image/README.md +3 -1
  124. package/src/components/image/image.scss +2 -2
  125. package/src/components/index.scss +9 -1
  126. package/src/components/link/README.md +2 -0
  127. package/src/components/link/link.scss +3 -36
  128. package/src/components/link-list/README.md +3 -1
  129. package/src/components/link-list/link-list.scss +10 -21
  130. package/src/components/logo/README.md +4 -1
  131. package/src/components/logo/logo.scss +1 -1
  132. package/src/components/margin/README.md +5 -0
  133. package/src/components/margin/margin.scss +12 -0
  134. package/src/components/mark/README.md +2 -0
  135. package/src/components/mark/mark.scss +1 -1
  136. package/src/components/mega-menu/README.md +2 -0
  137. package/src/components/mega-menu/mega-menu.scss +3 -1
  138. package/src/components/ordered-list/README.md +2 -0
  139. package/src/components/ordered-list/ordered-list.scss +8 -9
  140. package/src/components/overlap/README.md +2 -0
  141. package/src/components/overlap/overlap.scss +1 -1
  142. package/src/components/page-heading/README.md +3 -1
  143. package/src/components/page-heading/page-heading.scss +6 -8
  144. package/src/components/page-menu/README.md +3 -1
  145. package/src/components/page-menu/page-menu.scss +3 -8
  146. package/src/components/pagination/README.md +3 -1
  147. package/src/components/pagination/pagination.scss +4 -9
  148. package/src/components/paragraph/README.md +2 -0
  149. package/src/components/paragraph/paragraph.scss +7 -22
  150. package/src/components/radio/README.md +18 -0
  151. package/src/components/radio/radio.scss +157 -0
  152. package/src/components/row/README.md +3 -0
  153. package/src/components/row/row.scss +17 -0
  154. package/src/components/screen/README.md +6 -4
  155. package/src/components/screen/screen.scss +1 -1
  156. package/src/components/search-field/README.md +3 -1
  157. package/src/components/search-field/search-field.scss +9 -12
  158. package/src/components/skip-link/README.md +2 -0
  159. package/src/components/skip-link/skip-link.scss +3 -8
  160. package/src/components/spotlight/README.md +2 -0
  161. package/src/components/spotlight/spotlight.scss +1 -1
  162. package/src/components/switch/README.md +3 -1
  163. package/src/components/switch/switch.scss +11 -10
  164. package/src/components/table/README.md +3 -1
  165. package/src/components/table/table.scss +3 -3
  166. package/src/components/tabs/README.md +32 -0
  167. package/src/components/tabs/tabs.scss +41 -0
  168. package/src/components/text-area/README.md +17 -0
  169. package/src/components/text-area/text-area.scss +70 -0
  170. package/src/components/text-input/README.md +2 -0
  171. package/src/components/text-input/text-input.scss +5 -10
  172. package/src/components/top-task-link/README.md +5 -3
  173. package/src/components/top-task-link/top-task-link.scss +7 -14
  174. package/src/components/unordered-list/README.md +2 -0
  175. package/src/components/unordered-list/unordered-list.scss +8 -9
  176. package/src/components/visually-hidden/README.md +2 -0
  177. package/src/components/visually-hidden/visually-hidden.scss +1 -1
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Pagination
2
4
 
3
5
  Pagination is a navigation element used to navigate between multiple pages of overview lists.
@@ -16,4 +18,4 @@ Pagination indicates the current page and allows users to navigate to other page
16
18
 
17
19
  ## Relevant WCAG Rules
18
20
 
19
- Pagination is an interactive element, and the [general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
21
+ Pagination is an interactive element, and the [general requirements and guidelines for interactive elements](/docs/docs-design-guidelines-interactive-elements--docs) apply.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  @mixin list-reset {
@@ -14,17 +14,12 @@
14
14
  display: flex;
15
15
  flex-wrap: wrap;
16
16
  font-family: var(--amsterdam-pagination-font-family);
17
- font-size: var(--amsterdam-pagination-spacious-font-size);
17
+ font-size: var(--amsterdam-pagination-font-size);
18
18
  font-weight: var(--amsterdam-pagination-font-weight);
19
19
  justify-content: center;
20
- line-height: var(--amsterdam-pagination-spacious-line-height);
20
+ line-height: var(--amsterdam-pagination-line-height);
21
21
 
22
22
  @include list-reset;
23
-
24
- .amsterdam-theme--compact & {
25
- font-size: var(--amsterdam-pagination-compact-font-size);
26
- line-height: var(--amsterdam-pagination-compact-line-height);
27
- }
28
23
  }
29
24
 
30
25
  @mixin button-reset {
@@ -43,7 +38,7 @@
43
38
  display: flex;
44
39
  gap: 0.5rem;
45
40
  outline-offset: var(--amsterdam-pagination-button-outline-offset);
46
- padding-inline: 0.75rem;
41
+ padding-inline: var(--amsterdam-pagination-button-padding-inline);
47
42
  text-decoration-line: var(--amsterdam-pagination-button-text-decoration-line);
48
43
  text-decoration-thickness: var(--amsterdam-pagination-button-text-decoration-thickness);
49
44
  text-underline-offset: var(--amsterdam-pagination-button-text-underline-offset);
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Paragraph
2
4
 
3
5
  Represents a paragraph of running text, form instructions, and other standalone text fragments.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  @mixin reset {
@@ -12,36 +12,21 @@
12
12
  .amsterdam-paragraph {
13
13
  color: var(--amsterdam-paragraph-color);
14
14
  font-family: var(--amsterdam-paragraph-font-family);
15
- font-size: var(--amsterdam-paragraph-spacious-medium-font-size);
15
+ font-size: var(--amsterdam-paragraph-medium-font-size);
16
16
  font-weight: var(--amsterdam-paragraph-font-weight);
17
- line-height: var(--amsterdam-paragraph-spacious-medium-line-height);
17
+ line-height: var(--amsterdam-paragraph-medium-line-height);
18
18
 
19
19
  @include reset;
20
-
21
- .amsterdam-theme--compact & {
22
- font-size: var(--amsterdam-paragraph-compact-medium-font-size);
23
- line-height: var(--amsterdam-paragraph-compact-medium-line-height);
24
- }
25
20
  }
26
21
 
27
22
  .amsterdam-paragraph--small {
28
- font-size: var(--amsterdam-paragraph-spacious-small-font-size);
29
- line-height: var(--amsterdam-paragraph-spacious-small-line-height);
30
-
31
- .amsterdam-theme--compact & {
32
- font-size: var(--amsterdam-paragraph-compact-small-font-size);
33
- line-height: var(--amsterdam-paragraph-compact-small-line-height);
34
- }
23
+ font-size: var(--amsterdam-paragraph-small-font-size);
24
+ line-height: var(--amsterdam-paragraph-small-line-height);
35
25
  }
36
26
 
37
27
  .amsterdam-paragraph--large {
38
- font-size: var(--amsterdam-paragraph-spacious-large-font-size);
39
- line-height: var(--amsterdam-paragraph-spacious-large-line-height);
40
-
41
- .amsterdam-theme--compact & {
42
- font-size: var(--amsterdam-paragraph-compact-large-font-size);
43
- line-height: var(--amsterdam-paragraph-compact-large-line-height);
44
- }
28
+ font-size: var(--amsterdam-paragraph-large-font-size);
29
+ line-height: var(--amsterdam-paragraph-large-line-height);
45
30
  }
46
31
 
47
32
  .amsterdam-paragraph--inverse-color {
@@ -0,0 +1,18 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Radio
4
+
5
+ Allows users to select one option from a list.
6
+
7
+ ## Guidelines
8
+
9
+ - Do not assume that users will know how many options they can select based on the visual difference between radios and checkboxes alone.
10
+ If needed, add a hint explaining this, for example, ‘Select one option’.
11
+ - Order radio options alphabetically by default.
12
+ In some cases, it can be helpful to order them from most-to-least common options.
13
+ For example, you could order options for ‘Where do you live?’ based on population size.
14
+ However you should do this with extreme caution as it can reinforce bias.
15
+ If in doubt, order alphabetically.
16
+ - Labels should be concise. Try to keep labels shorter than 4 words.
17
+
18
+ Use a [Checkbox](/docs/components-forms-checkbox--docs) when a user can select more than 1 option from a list.
@@ -0,0 +1,157 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @import "../../common/input-label-focus";
7
+ @import "../../common/hide-input";
8
+
9
+ .amsterdam-radio__input {
10
+ @include hide-input;
11
+ @include input-label-focus;
12
+ }
13
+
14
+ .amsterdam-radio__circle {
15
+ align-items: center;
16
+ display: flex;
17
+ flex-shrink: 0;
18
+ height: calc(var(--amsterdam-radio-font-size) * var(--amsterdam-radio-line-height));
19
+ width: 1.5rem;
20
+
21
+ &::after {
22
+ background-position: center;
23
+ background-repeat: no-repeat;
24
+ background-size: 1rem;
25
+ border-color: var(--amsterdam-radio-circle-border-color);
26
+ border-radius: 100%;
27
+ border-style: solid;
28
+ border-width: 0.125rem;
29
+ box-sizing: border-box;
30
+ content: "";
31
+ height: 1.5rem;
32
+ width: 100%;
33
+ }
34
+ }
35
+
36
+ @mixin reset {
37
+ -webkit-text-size-adjust: 100%;
38
+ }
39
+
40
+ .amsterdam-radio__label {
41
+ color: var(--amsterdam-radio-color);
42
+ cursor: pointer;
43
+ display: inline-flex;
44
+ font-family: var(--amsterdam-radio-font-family);
45
+ font-size: var(--amsterdam-radio-font-size);
46
+ font-weight: var(--amsterdam-radio-font-weight);
47
+ gap: 0.5rem;
48
+ line-height: var(--amsterdam-radio-line-height);
49
+ outline-offset: var(--amsterdam-radio-outline-offset);
50
+
51
+ &:hover {
52
+ color: var(--amsterdam-radio-hover-color);
53
+ text-decoration-line: underline;
54
+ text-decoration-thickness: 0.125rem;
55
+ text-underline-offset: 0.375rem;
56
+
57
+ .amsterdam-radio__circle::after {
58
+ border-color: var(--amsterdam-radio-circle-hover-border-color);
59
+ }
60
+ }
61
+
62
+ @include reset;
63
+ }
64
+
65
+ // Default checked
66
+ .amsterdam-radio__input:checked {
67
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
68
+ background-image: var(--amsterdam-radio-circle-checked-background-image);
69
+ }
70
+ }
71
+
72
+ // Invalid unchecked
73
+ .amsterdam-radio__input[aria-invalid="true"] {
74
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
75
+ border-color: var(--amsterdam-radio-circle-invalid-border-color);
76
+ }
77
+ }
78
+
79
+ // Disabled unchecked
80
+ .amsterdam-radio__input:disabled {
81
+ + .amsterdam-radio__label {
82
+ color: var(--amsterdam-radio-disabled-color);
83
+ cursor: not-allowed;
84
+
85
+ .amsterdam-radio__circle::after {
86
+ border-color: var(--amsterdam-radio-circle-disabled-border-color);
87
+ border-width: 0.125rem;
88
+ }
89
+ }
90
+ }
91
+
92
+ // Invalid checked
93
+ .amsterdam-radio__input[aria-invalid="true"]:checked {
94
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
95
+ background-image: var(--amsterdam-radio-circle-invalid-checked-background-image);
96
+ }
97
+ }
98
+
99
+ // Disabled label
100
+ .amsterdam-radio__input:disabled + .amsterdam-radio__label:hover {
101
+ text-decoration: none;
102
+ }
103
+
104
+ // Disabled checked
105
+ .amsterdam-radio__input:disabled:checked {
106
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
107
+ background-image: var(--amsterdam-radio-circle-disabled-checked-background-image);
108
+ }
109
+ }
110
+
111
+ // Disabled invalid unchecked
112
+ .amsterdam-radio__input[aria-invalid="true"]:disabled {
113
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
114
+ // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
115
+ border-color: var(--amsterdam-radio-circle-disabled-border-color);
116
+ }
117
+ }
118
+
119
+ // HOVER STATES
120
+
121
+ // Invalid unchecked hover
122
+ .amsterdam-radio__input[aria-invalid="true"] + .amsterdam-radio__label:hover .amsterdam-radio__circle::after {
123
+ // TODO: this should be the (currently non-existent) dark red hover color
124
+ border-color: var(--amsterdam-radio-circle-invalid-hover-border-color);
125
+ }
126
+
127
+ // Default checked hover
128
+ .amsterdam-radio__input:checked + .amsterdam-radio__label:hover .amsterdam-radio__circle::after {
129
+ background-image: var(--amsterdam-radio-circle-checked-hover-background-image);
130
+ }
131
+
132
+ // Invalid checked hover
133
+ .amsterdam-radio__input[aria-invalid="true"]:checked + .amsterdam-radio__label:hover .amsterdam-radio__circle::after {
134
+ // TODO: this should be the (currently non-existent) dark red hover color
135
+ background-image: var(--amsterdam-radio-circle-invalid-checked-hover-background-image);
136
+ }
137
+
138
+ // Disabled checked hover
139
+ .amsterdam-radio__input:disabled:checked + .amsterdam-radio__label:hover .amsterdam-radio__circle::after {
140
+ background-image: var(--amsterdam-radio-circle-disabled-checked-hover-background-image);
141
+ }
142
+
143
+ // Disabled invalid unchecked hover
144
+ .amsterdam-radio__input[aria-invalid="true"]:disabled + .amsterdam-radio__label:hover .amsterdam-radio__circle::after {
145
+ // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
146
+ border-color: var(--amsterdam-radio-circle-disabled-border-color);
147
+ }
148
+
149
+ // DISABLED INVALID STATES
150
+
151
+ // Disabled invalid checked
152
+ .amsterdam-radio__input[aria-invalid="true"]:disabled:checked {
153
+ + .amsterdam-radio__label .amsterdam-radio__circle::after {
154
+ // TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
155
+ background-image: var(--amsterdam-radio-circle-disabled-checked-background-image);
156
+ }
157
+ }
@@ -0,0 +1,3 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Row
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @import "../../common/size";
7
+
8
+ .amsterdam-row {
9
+ display: flex;
10
+ flex-direction: row;
11
+ }
12
+
13
+ @each $size, $label in $amsterdam-sizes {
14
+ .amsterdam-row--#{$label} {
15
+ gap: var(--amsterdam-row-gap-#{$size});
16
+ }
17
+ }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Screen
2
4
 
3
5
  Manages the maximum width and alignment of the entire website or application.
@@ -6,10 +8,10 @@ Manages the maximum width and alignment of the entire website or application.
6
8
 
7
9
  This should be the outermost component of your website or application.
8
10
  Within it, combine components such as
9
- [Grid](?path=/docs/react_layout-grid--docs),
10
- [Header](?path=/docs/react_containers-header--docs),
11
- [Footer](?path=/docs/react_containers-footer--docs),
12
- [Spotlight](?path=/docs/react_containers-spotlight--docs),
11
+ [Grid](/docs/components-layout-grid--docs),
12
+ [Header](/docs/components-containers-header--docs),
13
+ [Footer](/docs/components-containers-footer--docs),
14
+ [Spotlight](/docs/components-containers-spotlight--docs),
13
15
  and Figure.
14
16
 
15
17
  ## Design
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  @mixin reset {
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Search Field
2
4
 
3
5
  Allows users to quickly find relevant content by entering a (part of a) word or phrase to search through the content.
@@ -30,4 +32,4 @@ These features can be disruptive for a user searching for part of a word, and `a
30
32
  - [WCAG 1.3.5](https://www.w3.org/TR/WCAG22/#identify-input-purpose): It is clear both to the user and programmatically what the purpose of a form field is.
31
33
  - [WCAG 2.4.6](https://www.w3.org/TR/WCAG22/#headings-and-labels): There is a label describing the purpose of the input.
32
34
 
33
- Search Field is an interactive element; therefore, [the general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
35
+ Search Field is an interactive element; therefore, [the general requirements and guidelines for interactive elements](/docs/docs-design-guidelines-interactive-elements--docs) apply.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  .amsterdam-search-field {
@@ -19,22 +19,17 @@
19
19
  box-shadow: var(--amsterdam-search-field-input-box-shadow);
20
20
  color: var(--amsterdam-search-field-input-color);
21
21
  font-family: var(--amsterdam-search-field-input-font-family);
22
- font-size: var(--amsterdam-search-field-input-spacious-font-size);
22
+ font-size: var(--amsterdam-search-field-input-font-size);
23
23
  font-weight: var(--amsterdam-search-field-input-font-weight);
24
- line-height: var(--amsterdam-search-field-input-spacious-line-height);
24
+ line-height: var(--amsterdam-search-field-input-line-height);
25
25
  outline-offset: var(--amsterdam-search-field-input-outline-offset);
26
- padding-block: 0.5rem;
27
- padding-inline: 1rem;
26
+ padding-block: var(--amsterdam-search-field-input-padding-block);
27
+ padding-inline: var(--amsterdam-search-field-input-padding-inline);
28
28
  touch-action: manipulation;
29
29
  width: 100%;
30
30
 
31
31
  @include reset;
32
32
 
33
- .amsterdam-theme--compact & {
34
- font-size: var(--amsterdam-search-field-input-compact-font-size);
35
- line-height: var(--amsterdam-search-field-input-compact-line-height);
36
- }
37
-
38
33
  &:hover {
39
34
  box-shadow: var(--amsterdam-search-field-input-hover-box-shadow);
40
35
  }
@@ -63,8 +58,10 @@
63
58
  color: var(--amsterdam-search-field-button-color);
64
59
  cursor: pointer;
65
60
  outline-offset: var(--amsterdam-search-field-button-outline-offset);
66
- padding-block: 0.5rem;
67
- padding-inline: 0.5rem;
61
+
62
+ // TODO Check if these paddings are necessary
63
+ padding-block: var(--amsterdam-search-field-button-padding-block);
64
+ padding-inline: var(--amsterdam-search-field-button-padding-inline);
68
65
  touch-action: manipulation;
69
66
 
70
67
  &:hover {
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Skip Link
2
4
 
3
5
  Use a Skip Link to navigate to the main content quickly with the keyboard.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  .amsterdam-skip-link {
@@ -12,17 +12,12 @@
12
12
  font-weight: var(--amsterdam-skip-link-font-weight);
13
13
  line-height: var(--amsterdam-skip-link-line-height);
14
14
  outline-offset: var(--amsterdam-skip-link-outline-offset);
15
- padding-block: 0.5rem;
16
- padding-inline: 1rem;
15
+ padding-block: var(--amsterdam-skip-link-padding-block);
16
+ padding-inline: var(--amsterdam-skip-link-padding-inline);
17
17
  text-align: center;
18
18
  text-decoration: none;
19
19
 
20
20
  &:hover {
21
21
  background-color: var(--amsterdam-skip-link-hover-background-color);
22
22
  }
23
-
24
- .amsterdam-theme--compact & {
25
- font-size: var(--amsterdam-skip-link-compact-font-size);
26
- line-height: var(--amsterdam-skip-link-compact-line-height);
27
- }
28
23
  }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Spotlight
2
4
 
3
5
  Emphasizes a section on a page through a distinctive background colour.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  .amsterdam-spotlight--blue {
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Switch
2
4
 
3
5
  A switch is a control element to toggle between two different states quickly.
@@ -14,7 +16,7 @@ A switch applies to a page or the entire system, such as an on/off switch.
14
16
 
15
17
  - [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html): it is both clear for a user and programmatically what the purpose of a form field is.
16
18
 
17
- The Switch is an interactive element; general requirements and guidelines for interactive elements apply [here](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs).
19
+ The Switch is an interactive element; general requirements and guidelines for interactive elements apply [here](/docs/docs-design-guidelines-interactive-elements--docs).
18
20
 
19
21
  ## References
20
22
 
@@ -1,12 +1,18 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @import "../../common/input-label-focus";
7
+ @import "../../common/hide-input";
8
+
1
9
  @mixin reset {
2
10
  box-sizing: border-box;
3
11
  }
4
12
 
5
13
  .amsterdam-switch__input {
6
- appearance: none;
7
- margin-block: 0;
8
- margin-inline: 0;
9
- opacity: 0%; /* to hide native input field in older iOS */
14
+ @include hide-input;
15
+ @include input-label-focus;
10
16
  }
11
17
 
12
18
  .amsterdam-switch__label {
@@ -14,6 +20,7 @@
14
20
  border-radius: calc(var(--amsterdam-switch-thumb-width) * 2);
15
21
  cursor: pointer;
16
22
  display: inline-block;
23
+ outline-offset: var(--amsterdam-switch-outline-offset);
17
24
  padding-block: 1px;
18
25
  padding-inline: 1px;
19
26
  transition: background-color 0.2s ease-in-out;
@@ -43,12 +50,6 @@
43
50
  cursor: not-allowed;
44
51
  }
45
52
 
46
- .amsterdam-switch__input:focus-visible + .amsterdam-switch__label {
47
- outline-color: -webkit-focus-ring-color;
48
- outline-offset: var(--amsterdam-switch-outline-offset);
49
- outline-style: auto;
50
- }
51
-
52
53
  .amsterdam-switch__input:checked + .amsterdam-switch__label::before {
53
54
  // The 2px is to account for the 1px padding-inline on the label
54
55
  transform: translate(calc(var(--amsterdam-switch-width) - var(--amsterdam-switch-thumb-width) - 2px));
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Table
2
4
 
3
5
  Use the table component to let users compare information in rows and columns.
@@ -8,4 +10,4 @@ Table is used to display simple information that does not need to be filtered or
8
10
  - Use `<Table.Caption>` to describe a table in the same way you would use a heading.
9
11
  A caption helps users find, navigate and understand tables.
10
12
  - Never use the table component to layout content on a page.
11
- Instead, use [Grid](https://amsterdam.github.io/design-system/?path=/docs/react_layout-grid--docs).
13
+ Instead, use [Grid](/docs/components-layout-grid--docs).
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  .amsterdam-table {
@@ -25,8 +25,8 @@
25
25
  .amsterdam-table__cell,
26
26
  .amsterdam-table__header-cell {
27
27
  border-bottom: var(--amsterdam-table-cell-border-bottom);
28
- padding-block: 1rem;
29
- padding-inline: 1rem;
28
+ padding-block: var(--amsterdam-table-cell-padding-block);
29
+ padding-inline: var(--amsterdam-table-cell-padding-inline);
30
30
  text-align: start;
31
31
  vertical-align: top;
32
32
  }
@@ -0,0 +1,32 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Tabs
4
+
5
+ Tabs are used to bundle related content in a compact overview within a page. Each tab has a short name, and these names indicate the relationship between the information displayed in each tab.
6
+
7
+ ## How to Use
8
+
9
+ - The content of each tab is viewable independently, not in the context of one another.
10
+ - The content within each tab should have a similar structure.
11
+ - Use when there is limited visual space and content needs to be divided into sections.
12
+
13
+ You can navigate tabs with your keyboard:
14
+
15
+ | key | element |
16
+ | :------------- | :--------------------------------------------- |
17
+ | Enter or Space | Open or close the tab that has the focus |
18
+ | Tab | Go to the next element that can have focus |
19
+ | Shift + Tab | Go to the next element that can have focus |
20
+ | Left arrow | If the tabs have focus: go to the previous tab |
21
+ | Right arrow | If the tabs have focus: go to the next tab |
22
+ | Home | If the tabs have focus: go to the first tab |
23
+ | End | If the tabs have focus, go to the last tab |
24
+
25
+ ### Caution
26
+
27
+ Do not use tabs if the content in each tab functions just as well on separate pages.
28
+
29
+ ## References
30
+
31
+ - [W3C - Tabs Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/)
32
+ - [MDN - Tab Aria Roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role)
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @import "../../common/breakpoint";
7
+
8
+ .amsterdam-tabs__list {
9
+ border-bottom: var(--amsterdam-tabs-list-border-bottom);
10
+ display: flex;
11
+ overflow-x: auto;
12
+ }
13
+
14
+ .amsterdam-tabs__button {
15
+ background-color: var(--amsterdam-tabs-button-background-color);
16
+ border: var(--amsterdam-tabs-button-border);
17
+ color: var(--amsterdam-tabs-button-color);
18
+ cursor: var(--amsterdam-tabs-button-cursor);
19
+ font-family: var(--amsterdam-tabs-button-font-family);
20
+ font-size: var(--amsterdam-tabs-button-font-size);
21
+ font-weight: var(--amsterdam-tabs-button-font-weight);
22
+ line-height: var(--amsterdam-tabs-button-line-height);
23
+ outline-offset: var(--amsterdam-tabs-button-outline-offset);
24
+ padding-block: var(--amsterdam-tabs-button-padding-block);
25
+ padding-inline: var(--amsterdam-tabs-button-padding-inline);
26
+
27
+ &:disabled {
28
+ color: var(--amsterdam-tabs-button-disabled-color);
29
+ cursor: var(--amsterdam-tab-button-disabled-cursor);
30
+ }
31
+
32
+ &:hover:not([aria-selected="true"], [disabled]) {
33
+ box-shadow: var(--amsterdam-tabs-button-hover-box-shadow);
34
+ color: var(--amsterdam-tabs-button-hover-color);
35
+ }
36
+
37
+ &[aria-selected="true"] {
38
+ background-color: var(--amsterdam-tabs-button-selected-background-color);
39
+ color: var(--amsterdam-tabs-button-selected-color);
40
+ }
41
+ }
@@ -0,0 +1,17 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # TextArea
4
+
5
+ A form field that allows the user to input text over multiple lines.
6
+
7
+ ## Guidelines
8
+
9
+ - Use a TextArea when users need to enter more than 1 sentence of text, such as a comment or description.
10
+ - The height of the TextArea should be appropriate for the information to be entered.
11
+ - A TextArea must have a label, and in most cases, this label should be visible.
12
+ - Use `spellcheck="false"` for fields that may contain sensitive information, such as passwords and personal data.
13
+ Some browser extensions for spell-checking send this information to external servers.
14
+
15
+ ## Accessibility
16
+
17
+ - [WCAG 2.1](https://www.w3.org/WAI/WCAG21/Techniques/html/H91.html) requires that the TextArea has a label or title attribute.