@amsterdam/design-system-css 0.5.0 → 0.6.1

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 (157) hide show
  1. package/CHANGELOG.md +45 -4
  2. package/dist/accordion/accordion.css +1 -1
  3. package/dist/accordion/accordion.css.map +1 -1
  4. package/dist/alert/alert.css +1 -1
  5. package/dist/alert/alert.css.map +1 -1
  6. package/dist/blockquote/blockquote.css.map +1 -1
  7. package/dist/button/button.css +1 -1
  8. package/dist/button/button.css.map +1 -1
  9. package/dist/checkbox/checkbox.css +1 -1
  10. package/dist/checkbox/checkbox.css.map +1 -1
  11. package/dist/column/column.css +1 -0
  12. package/dist/column/column.css.map +1 -0
  13. package/dist/dialog/dialog.css +1 -1
  14. package/dist/dialog/dialog.css.map +1 -1
  15. package/dist/fieldset/fieldset.css +1 -0
  16. package/dist/fieldset/fieldset.css.map +1 -0
  17. package/dist/form-label/form-label.css.map +1 -1
  18. package/dist/gap/gap.css +1 -0
  19. package/dist/gap/gap.css.map +1 -0
  20. package/dist/grid/grid.css +1 -1
  21. package/dist/grid/grid.css.map +1 -1
  22. package/dist/header/header.css +1 -1
  23. package/dist/header/header.css.map +1 -1
  24. package/dist/heading/heading.css.map +1 -1
  25. package/dist/index.css +1 -1
  26. package/dist/index.css.map +1 -1
  27. package/dist/link-list/link-list.css.map +1 -1
  28. package/dist/margin/margin.css +1 -0
  29. package/dist/margin/margin.css.map +1 -0
  30. package/dist/mega-menu/mega-menu.css.map +1 -1
  31. package/dist/ordered-list/ordered-list.css +1 -1
  32. package/dist/ordered-list/ordered-list.css.map +1 -1
  33. package/dist/page-heading/page-heading.css.map +1 -1
  34. package/dist/pagination/pagination.css +1 -1
  35. package/dist/pagination/pagination.css.map +1 -1
  36. package/dist/radio/radio.css +1 -0
  37. package/dist/radio/radio.css.map +1 -0
  38. package/dist/row/row.css +1 -0
  39. package/dist/row/row.css.map +1 -0
  40. package/dist/search-field/search-field.css +1 -1
  41. package/dist/search-field/search-field.css.map +1 -1
  42. package/dist/skip-link/skip-link.css +1 -1
  43. package/dist/skip-link/skip-link.css.map +1 -1
  44. package/dist/switch/switch.css +1 -1
  45. package/dist/switch/switch.css.map +1 -1
  46. package/dist/table/table.css +1 -1
  47. package/dist/table/table.css.map +1 -1
  48. package/dist/tabs/tabs.css +1 -0
  49. package/dist/tabs/tabs.css.map +1 -0
  50. package/dist/text-area/text-area.css +1 -0
  51. package/dist/text-area/text-area.css.map +1 -0
  52. package/dist/text-input/text-input.css +1 -1
  53. package/dist/text-input/text-input.css.map +1 -1
  54. package/dist/top-task-link/top-task-link.css.map +1 -1
  55. package/dist/unordered-list/unordered-list.css +1 -1
  56. package/dist/unordered-list/unordered-list.css.map +1 -1
  57. package/package.json +3 -3
  58. package/src/common/breakpoint.scss +1 -1
  59. package/src/common/calculate-fluid-style.scss +1 -1
  60. package/src/common/hide-input.scss +11 -0
  61. package/src/common/hyphenation.scss +5 -0
  62. package/src/common/input-label-focus.scss +21 -0
  63. package/src/common/size.scss +13 -0
  64. package/src/components/accordion/README.md +2 -0
  65. package/src/components/accordion/accordion.scss +5 -5
  66. package/src/components/alert/README.md +4 -2
  67. package/src/components/alert/alert.scss +3 -5
  68. package/src/components/aspect-ratio/README.md +2 -0
  69. package/src/components/aspect-ratio/aspect-ratio.scss +1 -1
  70. package/src/components/badge/README.md +2 -0
  71. package/src/components/badge/badge.scss +1 -1
  72. package/src/components/blockquote/README.md +2 -0
  73. package/src/components/blockquote/blockquote.scss +1 -1
  74. package/src/components/breadcrumb/README.md +2 -0
  75. package/src/components/breadcrumb/breadcrumb.scss +1 -1
  76. package/src/components/button/README.md +3 -1
  77. package/src/components/button/button.scss +56 -10
  78. package/src/components/card/README.md +5 -3
  79. package/src/components/card/card.scss +1 -1
  80. package/src/components/checkbox/README.md +3 -1
  81. package/src/components/checkbox/checkbox.scss +16 -19
  82. package/src/components/column/README.md +5 -0
  83. package/src/components/column/column.scss +16 -0
  84. package/src/components/dialog/README.md +2 -0
  85. package/src/components/dialog/dialog.scss +3 -2
  86. package/src/components/fieldset/README.md +18 -0
  87. package/src/components/fieldset/fieldset.scss +34 -0
  88. package/src/components/footer/README.md +2 -0
  89. package/src/components/form-label/README.md +2 -0
  90. package/src/components/form-label/form-label.scss +1 -1
  91. package/src/components/gap/README.md +5 -0
  92. package/src/components/gap/gap.scss +16 -0
  93. package/src/components/grid/README.md +5 -3
  94. package/src/components/grid/grid.scss +14 -13
  95. package/src/components/header/README.md +2 -0
  96. package/src/components/header/header.scss +5 -5
  97. package/src/components/heading/README.md +2 -0
  98. package/src/components/heading/heading.scss +1 -1
  99. package/src/components/icon/README.md +3 -1
  100. package/src/components/icon/icon.scss +1 -1
  101. package/src/components/icon-button/README.md +3 -1
  102. package/src/components/icon-button/icon-button.scss +1 -1
  103. package/src/components/image/README.md +3 -1
  104. package/src/components/image/image.scss +2 -2
  105. package/src/components/index.scss +9 -1
  106. package/src/components/link/README.md +2 -0
  107. package/src/components/link/link.scss +1 -1
  108. package/src/components/link-list/README.md +3 -1
  109. package/src/components/link-list/link-list.scss +1 -1
  110. package/src/components/logo/README.md +4 -1
  111. package/src/components/logo/logo.scss +1 -1
  112. package/src/components/margin/README.md +5 -0
  113. package/src/components/margin/margin.scss +12 -0
  114. package/src/components/mark/README.md +2 -0
  115. package/src/components/mark/mark.scss +1 -1
  116. package/src/components/mega-menu/README.md +2 -0
  117. package/src/components/mega-menu/mega-menu.scss +3 -1
  118. package/src/components/ordered-list/README.md +2 -0
  119. package/src/components/ordered-list/ordered-list.scss +6 -2
  120. package/src/components/overlap/README.md +2 -0
  121. package/src/components/overlap/overlap.scss +1 -1
  122. package/src/components/page-heading/README.md +3 -1
  123. package/src/components/page-heading/page-heading.scss +1 -1
  124. package/src/components/page-menu/README.md +3 -1
  125. package/src/components/page-menu/page-menu.scss +1 -1
  126. package/src/components/pagination/README.md +3 -1
  127. package/src/components/pagination/pagination.scss +2 -2
  128. package/src/components/paragraph/README.md +2 -0
  129. package/src/components/paragraph/paragraph.scss +1 -1
  130. package/src/components/radio/README.md +18 -0
  131. package/src/components/radio/radio.scss +157 -0
  132. package/src/components/row/README.md +3 -0
  133. package/src/components/row/row.scss +17 -0
  134. package/src/components/screen/README.md +6 -4
  135. package/src/components/screen/screen.scss +1 -1
  136. package/src/components/search-field/README.md +3 -1
  137. package/src/components/search-field/search-field.scss +7 -5
  138. package/src/components/skip-link/README.md +2 -0
  139. package/src/components/skip-link/skip-link.scss +3 -3
  140. package/src/components/spotlight/README.md +2 -0
  141. package/src/components/spotlight/spotlight.scss +1 -1
  142. package/src/components/switch/README.md +3 -1
  143. package/src/components/switch/switch.scss +11 -10
  144. package/src/components/table/README.md +3 -1
  145. package/src/components/table/table.scss +3 -3
  146. package/src/components/tabs/README.md +32 -0
  147. package/src/components/tabs/tabs.scss +41 -0
  148. package/src/components/text-area/README.md +17 -0
  149. package/src/components/text-area/text-area.scss +70 -0
  150. package/src/components/text-input/README.md +2 -0
  151. package/src/components/text-input/text-input.scss +3 -3
  152. package/src/components/top-task-link/README.md +5 -3
  153. package/src/components/top-task-link/top-task-link.scss +1 -1
  154. package/src/components/unordered-list/README.md +2 -0
  155. package/src/components/unordered-list/unordered-list.scss +6 -2
  156. package/src/components/visually-hidden/README.md +2 -0
  157. package/src/components/visually-hidden/visually-hidden.scss +1 -1
@@ -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 {
@@ -23,8 +23,8 @@
23
23
  font-weight: var(--amsterdam-search-field-input-font-weight);
24
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
 
@@ -58,8 +58,10 @@
58
58
  color: var(--amsterdam-search-field-button-color);
59
59
  cursor: pointer;
60
60
  outline-offset: var(--amsterdam-search-field-button-outline-offset);
61
- padding-block: 0.5rem;
62
- 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);
63
65
  touch-action: manipulation;
64
66
 
65
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,8 +12,8 @@
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
 
@@ -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.
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @mixin reset {
7
+ box-sizing: border-box;
8
+ margin-block: 0;
9
+ -webkit-text-size-adjust: 100%;
10
+ }
11
+
12
+ .amsterdam-text-area {
13
+ border: none;
14
+ box-shadow: var(--amsterdam-text-area-box-shadow);
15
+ color: var(--amsterdam-text-area-color);
16
+ font-family: var(--amsterdam-text-area-font-family);
17
+ font-size: var(--amsterdam-text-area-font-size);
18
+ font-weight: var(--amsterdam-text-area-font-weight);
19
+ line-height: var(--amsterdam-text-area-line-height);
20
+ max-width: 100%;
21
+ min-height: var(--amsterdam-text-area-min-height);
22
+ outline-offset: var(--amsterdam-text-area-outline-offset);
23
+ padding-block: var(--amsterdam-text-area-padding-block);
24
+ padding-inline: var(--amsterdam-text-area-padding-inline);
25
+ touch-action: manipulation;
26
+ width: 100%;
27
+
28
+ @include reset;
29
+
30
+ &:hover {
31
+ box-shadow: var(--amsterdam-text-area-hover-box-shadow);
32
+ }
33
+ }
34
+
35
+ .amsterdam-text-area::placeholder {
36
+ color: var(--amsterdam-text-area-placeholder-color);
37
+ }
38
+
39
+ .amsterdam-text-area:disabled {
40
+ background-color: var(--amsterdam-text-area-disabled-background-color);
41
+ box-shadow: var(--amsterdam-text-area-disabled-box-shadow);
42
+ color: var(--amsterdam-text-area-disabled-color);
43
+ cursor: var(--amsterdam-text-area-disabled-cursor);
44
+ }
45
+
46
+ .amsterdam-text-area:invalid,
47
+ .amsterdam-text-area[aria-invalid="true"] {
48
+ box-shadow: var(--amsterdam-text-area-invalid-box-shadow);
49
+
50
+ &:hover {
51
+ // TODO: this should be the (currently non-existent) dark red hover color
52
+ box-shadow: var(--amsterdam-text-area-invalid-hover-box-shadow);
53
+ }
54
+ }
55
+
56
+ .amsterdam-text-area--resize-none {
57
+ resize: none;
58
+ }
59
+
60
+ .amsterdam-text-area--resize-horizontal {
61
+ resize: inline;
62
+ }
63
+
64
+ .amsterdam-text-area--resize-vertical {
65
+ resize: block;
66
+ }
67
+
68
+ .amsterdam-text-area--cols {
69
+ width: auto;
70
+ }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Text Input
2
4
 
3
5
  A form field in which a user can enter text.
@@ -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 {
@@ -18,8 +18,8 @@
18
18
  font-weight: var(--amsterdam-text-input-font-weight);
19
19
  line-height: var(--amsterdam-text-input-line-height);
20
20
  outline-offset: var(--amsterdam-text-input-outline-offset);
21
- padding-block: 0.5rem;
22
- padding-inline: 1rem;
21
+ padding-block: var(--amsterdam-text-input-padding-block);
22
+ padding-inline: var(--amsterdam-text-input-padding-inline);
23
23
  touch-action: manipulation;
24
24
  width: 100%;
25
25
 
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Top Task Link
2
4
 
3
5
  A prominent navigation element to quickly start a task.
@@ -10,12 +12,12 @@ A prominent navigation element to quickly start a task.
10
12
  - Keep both texts concise.
11
13
  A title consists of a few words, and the description consists of 1 or 2 short sentences.
12
14
  The description should end with a period or another appropriate punctuation mark.
13
- - For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](?path=/docs/react_layout-grid--docs).
15
+ - For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](/docs/components-layout-grid--docs).
14
16
  If you have more Top Task Links, place them in the next row.
15
17
  Try to distribute the amount of links on wide windows over rows of 3 or 4 links.
16
18
  If this is not possible, leave the last cells of the grid empty.
17
- - If you have a group of links for which a description is unnecessary or illogical, use a [Link List](?path=/docs/react_navigation-link--docs).
19
+ - If you have a group of links for which a description is unnecessary or illogical, use a [Link List](/docs/components-navigation-link--docs).
18
20
 
19
21
  ## Relevant WCAG requirements
20
22
 
21
- The Top Task Link is subject to the same requirements as [regular links](https://amsterdam.github.io/design-system/?path=/docs/react_navigation-link--docs).
23
+ The Top Task Link is subject to the same requirements as [regular links](/docs/components-navigation-link--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
  @import "../../common/hyphenation";
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Unordered List
2
4
 
3
5
  A list is a vertical group of related content.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- /** Apply border box sizing, reset whitespace and list styles. */
6
+ /** Apply border box sizing, reset white space and list styles. */
7
7
  @mixin reset {
8
8
  box-sizing: border-box;
9
9
  list-style: none;
@@ -36,6 +36,10 @@
36
36
  }
37
37
  }
38
38
 
39
+ .amsterdam-unordered-list--inverse-color:not(.amsterdam-unordered-list--no-markers) {
40
+ color: var(--amsterdam-unordered-list-inverse-color);
41
+ }
42
+
39
43
  /** A nested list has a different marker and less indentation for correct alignment. */
40
44
  :is(.amsterdam-ordered-list, .amsterdam-unordered-list) .amsterdam-unordered-list {
41
45
  list-style-type: var(--amsterdam-unordered-list-unordered-list-list-style-type);
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Visually Hidden
2
4
 
3
5
  Hides content from sighted users but keeps it accessible to non-visual user agents, such as screen readers.
@@ -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
  // Source: https://css-tricks.com/inclusively-hidden/