@amsterdam/design-system-css 0.3.0 → 0.5.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.
- package/CHANGELOG.md +38 -0
- package/LICENSE.md +1 -1
- package/LICENSE.txt +287 -0
- package/README.md +13 -1
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.css.map +1 -1
- package/dist/badge/badge.css +1 -0
- package/dist/badge/badge.css.map +1 -0
- package/dist/blockquote/blockquote.css +1 -1
- package/dist/blockquote/blockquote.css.map +1 -1
- package/dist/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.css.map +1 -1
- package/dist/button/button.css +1 -1
- package/dist/button/button.css.map +1 -1
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/form-label/form-label.css +1 -1
- package/dist/form-label/form-label.css.map +1 -1
- package/dist/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -1
- package/dist/header/header.css.map +1 -1
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/icon/icon.css +1 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon-button/icon-button.css +1 -0
- package/dist/icon-button/icon-button.css.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/link/link.css +1 -1
- package/dist/link/link.css.map +1 -1
- package/dist/link-list/link-list.css +1 -0
- package/dist/link-list/link-list.css.map +1 -0
- package/dist/mega-menu/mega-menu.css +1 -0
- package/dist/mega-menu/mega-menu.css.map +1 -0
- package/dist/ordered-list/ordered-list.css +1 -1
- package/dist/ordered-list/ordered-list.css.map +1 -1
- package/dist/page-heading/page-heading.css +1 -1
- package/dist/page-heading/page-heading.css.map +1 -1
- package/dist/page-menu/page-menu.css +1 -1
- package/dist/page-menu/page-menu.css.map +1 -1
- package/dist/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/paragraph/paragraph.css +1 -1
- package/dist/paragraph/paragraph.css.map +1 -1
- package/dist/search-field/search-field.css +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/skip-link/skip-link.css +1 -1
- package/dist/skip-link/skip-link.css.map +1 -1
- package/dist/spotlight/spotlight.css +1 -1
- package/dist/spotlight/spotlight.css.map +1 -1
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/dist/text-input/text-input.css +1 -1
- package/dist/text-input/text-input.css.map +1 -1
- package/dist/top-task-link/top-task-link.css +1 -1
- package/dist/top-task-link/top-task-link.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/documentation/coding-conventions.md +4 -2
- package/package.json +9 -10
- package/src/common/hyphenation.scss +5 -0
- package/src/components/accordion/README.md +45 -38
- package/src/components/accordion/accordion.scss +2 -7
- package/src/components/alert/README.md +15 -11
- package/src/components/alert/alert.scss +8 -38
- package/src/components/aspect-ratio/README.md +12 -12
- package/src/components/badge/README.md +10 -0
- package/src/components/badge/badge.scss +53 -0
- package/src/components/blockquote/README.md +8 -8
- package/src/components/blockquote/blockquote.scss +5 -7
- package/src/components/breadcrumb/README.md +10 -7
- package/src/components/breadcrumb/breadcrumb.scss +2 -7
- package/src/components/button/README.md +17 -14
- package/src/components/button/button.scss +2 -7
- package/src/components/card/README.md +18 -19
- package/src/components/checkbox/README.md +19 -18
- package/src/components/checkbox/checkbox.scss +3 -12
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +4 -23
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/form-label/form-label.scss +5 -7
- package/src/components/grid/README.md +12 -13
- package/src/components/grid/grid.scss +2 -6
- package/src/components/header/README.md +2 -2
- package/src/components/header/header.scss +2 -2
- package/src/components/heading/README.md +14 -11
- package/src/components/heading/heading.scss +15 -42
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +17 -50
- package/src/components/icon-button/README.md +14 -0
- package/src/components/icon-button/icon-button.scss +60 -0
- package/src/components/image/README.md +16 -17
- package/src/components/index.scss +5 -0
- package/src/components/link/README.md +26 -24
- package/src/components/link/link.scss +2 -35
- package/src/components/link-list/README.md +16 -0
- package/src/components/link-list/link-list.scss +69 -0
- package/src/components/logo/README.md +21 -20
- package/src/components/mark/README.md +10 -11
- package/src/components/mega-menu/README.md +1 -0
- package/src/components/mega-menu/mega-menu.scss +14 -0
- package/src/components/ordered-list/README.md +5 -5
- package/src/components/ordered-list/ordered-list.scss +2 -7
- package/src/components/overlap/README.md +1 -1
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-heading/page-heading.scss +5 -7
- package/src/components/page-menu/README.md +10 -9
- package/src/components/page-menu/page-menu.scss +2 -7
- package/src/components/pagination/README.md +13 -10
- package/src/components/pagination/pagination.scss +2 -7
- package/src/components/paragraph/README.md +16 -14
- package/src/components/paragraph/paragraph.scss +6 -21
- package/src/components/screen/README.md +12 -12
- package/src/components/search-field/README.md +18 -18
- package/src/components/search-field/search-field.scss +4 -17
- package/src/components/skip-link/README.md +18 -25
- package/src/components/skip-link/skip-link.scss +0 -5
- package/src/components/spotlight/README.md +5 -5
- package/src/components/spotlight/spotlight.scss +4 -4
- package/src/components/switch/README.md +11 -9
- package/src/components/table/README.md +11 -0
- package/src/components/table/table.scss +36 -0
- package/src/components/text-input/README.md +10 -8
- package/src/components/text-input/text-input.scss +2 -7
- package/src/components/top-task-link/README.md +15 -14
- package/src/components/top-task-link/top-task-link.scss +6 -13
- package/src/components/unordered-list/README.md +5 -5
- package/src/components/unordered-list/unordered-list.scss +2 -7
- package/src/components/visually-hidden/README.md +3 -2
- package/src/components/button/button-css.md +0 -12
- package/src/components/checkbox/checkbox-css.md +0 -3
- package/src/components/footer/footer-css.md +0 -11
- package/src/components/heading/heading-css.md +0 -3
- package/src/components/paragraph/paragraph-css.md +0 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Aspect Ratio
|
|
2
2
|
|
|
3
|
-
Aspect Ratio
|
|
3
|
+
Aspect Ratio updates the height of an element with its width.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
These are the proportions we use:
|
|
6
6
|
|
|
7
|
-
|
|
|
8
|
-
| :-------- |
|
|
9
|
-
| `2x-wide` |
|
|
10
|
-
| `x-wide` |
|
|
11
|
-
| `wide` |
|
|
12
|
-
| `square` |
|
|
13
|
-
| `tall` |
|
|
14
|
-
| `x-tall` |
|
|
7
|
+
| keyword | ratio |
|
|
8
|
+
| :-------- | ----: |
|
|
9
|
+
| `2x-wide` | 32:9 |
|
|
10
|
+
| `x-wide` | 16:9 |
|
|
11
|
+
| `wide` | 5:4 |
|
|
12
|
+
| `square` | 1:1 |
|
|
13
|
+
| `tall` | 4:5 |
|
|
14
|
+
| `x-tall` | 9:16 |
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Guidelines
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Use this component to constrain images, videos and other elements to one of the available aspect ratios.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
A prominently coloured box containing 1 or 2 words.
|
|
4
|
+
Guides the user in taking a specific action or describes its surrounding content.
|
|
5
|
+
|
|
6
|
+
## Design
|
|
7
|
+
|
|
8
|
+
The badge can contain a short text or a number.
|
|
9
|
+
The default background colour is dark green.
|
|
10
|
+
Suggestions on when to use the other colours will follow soon.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2024 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-badge {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
font-family: var(--amsterdam-badge-font-family);
|
|
9
|
+
font-size: var(--amsterdam-badge-font-size);
|
|
10
|
+
font-weight: var(--amsterdam-badge-font-weight);
|
|
11
|
+
line-height: var(--amsterdam-badge-line-height);
|
|
12
|
+
padding-inline: var(--amsterdam-badge-padding-inline);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.amsterdam-badge--blue {
|
|
16
|
+
background-color: var(--amsterdam-badge-blue-background-color);
|
|
17
|
+
color: var(--amsterdam-badge-blue-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.amsterdam-badge--dark-blue {
|
|
21
|
+
background-color: var(--amsterdam-badge-dark-blue-background-color);
|
|
22
|
+
color: var(--amsterdam-badge-dark-blue-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.amsterdam-badge--dark-green {
|
|
26
|
+
background-color: var(--amsterdam-badge-dark-green-background-color);
|
|
27
|
+
color: var(--amsterdam-badge-dark-green-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.amsterdam-badge--green {
|
|
31
|
+
background-color: var(--amsterdam-badge-green-background-color);
|
|
32
|
+
color: var(--amsterdam-badge-green-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.amsterdam-badge--magenta {
|
|
36
|
+
background-color: var(--amsterdam-badge-magenta-background-color);
|
|
37
|
+
color: var(--amsterdam-badge-magenta-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.amsterdam-badge--orange {
|
|
41
|
+
background-color: var(--amsterdam-badge-orange-background-color);
|
|
42
|
+
color: var(--amsterdam-badge-orange-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.amsterdam-badge--purple {
|
|
46
|
+
background-color: var(--amsterdam-badge-purple-background-color);
|
|
47
|
+
color: var(--amsterdam-badge-purple-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.amsterdam-badge--yellow {
|
|
51
|
+
background-color: var(--amsterdam-badge-yellow-background-color);
|
|
52
|
+
color: var(--amsterdam-badge-yellow-color);
|
|
53
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Blockquote
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
We use blockquotes to emphasize citations.
|
|
4
|
+
A quote appears differently from the main text to make it stand out.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- Quote someone’s literal written or oral text.
|
|
9
|
+
- A quote has a width of half or a whole column of text.
|
|
10
|
+
- The component adds the correct quotation marks.
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
- Een citaat heeft een breedte van een halve of hele tekstkolom.
|
|
12
|
+
## Relevant WCAG requirements
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- [WCAG 3.1.2](https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts.html): wanneer het citaat in een andere taal is geschreven dan de pagina, dan moet het `lang` attribuut gebruikt worden om de taal duidelijk te maken.
|
|
14
|
+
- [WCAG 3.1.2](https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts.html): if the citation is in a language other than that of the surrounding content, indicate so through the `lang` attribute.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
|
|
6
8
|
@mixin reset {
|
|
7
9
|
box-sizing: border-box;
|
|
8
10
|
margin-block: 0;
|
|
@@ -14,9 +16,9 @@
|
|
|
14
16
|
break-inside: avoid;
|
|
15
17
|
color: var(--amsterdam-blockquote-color);
|
|
16
18
|
font-family: var(--amsterdam-blockquote-font-family);
|
|
17
|
-
font-size: var(--amsterdam-blockquote-
|
|
19
|
+
font-size: var(--amsterdam-blockquote-font-size);
|
|
18
20
|
font-weight: var(--amsterdam-blockquote-font-weight);
|
|
19
|
-
line-height: var(--amsterdam-blockquote-
|
|
21
|
+
line-height: var(--amsterdam-blockquote-line-height);
|
|
20
22
|
quotes: "“" "”";
|
|
21
23
|
|
|
22
24
|
&::before {
|
|
@@ -27,11 +29,7 @@
|
|
|
27
29
|
content: close-quote;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
font-size: var(--amsterdam-blockquote-spacious-font-size);
|
|
32
|
-
line-height: var(--amsterdam-blockquote-spacious-line-height);
|
|
33
|
-
}
|
|
34
|
-
|
|
32
|
+
@include hyphenation;
|
|
35
33
|
@include reset;
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# Breadcrumb
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The breadcrumb is a secondary navigation pattern that helps a user understand the structure between levels in the website up to the current page.
|
|
4
|
+
Users can use it to navigate.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
###
|
|
8
|
+
### Use like this
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Only use the breadcrumb trail if it adds something functional for the user and the structure is ‘static’.
|
|
10
11
|
|
|
11
|
-
###
|
|
12
|
+
### Avoid this
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Do not display the breadcrumb trail on a form page.
|
|
15
|
+
It distracts the user from their task, or one can accidentally interpret it as a Progress Indicator.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
It is a secondary navigation pattern.
|
|
18
|
+
It can’t replace the main navigation.
|
|
@@ -12,14 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
.amsterdam-breadcrumb {
|
|
14
14
|
font-family: var(--amsterdam-breadcrumb-font-family, inherit);
|
|
15
|
-
font-size: var(--amsterdam-breadcrumb-
|
|
15
|
+
font-size: var(--amsterdam-breadcrumb-font-size);
|
|
16
16
|
font-weight: var(--amsterdam-breadcrumb-font-weight);
|
|
17
|
-
line-height: var(--amsterdam-breadcrumb-
|
|
18
|
-
|
|
19
|
-
.amsterdam-theme--compact & {
|
|
20
|
-
font-size: var(--amsterdam-breadcrumb-compact-font-size);
|
|
21
|
-
line-height: var(--amsterdam-breadcrumb-compact-line-height);
|
|
22
|
-
}
|
|
17
|
+
line-height: var(--amsterdam-breadcrumb-line-height);
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
.amsterdam-breadcrumb__list {
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Allows the user to perform actions and operate the user interface.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
7
|
+
- A label text that describes the function of the button.
|
|
8
|
+
- A clear contrasting colour scheme so that it is easy to recognize and quickly locate.
|
|
9
|
+
- Use the correct type of button for the corresponding application.
|
|
10
|
+
For example, a button within a form must always be of the type `submit`.
|
|
11
|
+
- Make sure one can operate a button through a keyboard.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Relevant WCAG requirements
|
|
13
14
|
|
|
14
|
-
- [WCAG
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
15
|
+
- [WCAG requirement 2.1.3](https://www.w3.org/TR/WCAG21/#keyboard-no-exception):
|
|
16
|
+
You can activate the button with `Enter` or `Space`, and it is possible with ‘Tab’ the button to focus.
|
|
17
|
+
Using `Space` does not result in scrolling the page.
|
|
18
|
+
- [WCAG requirement 2.4.6](https://www.w3.org/TR/WCAG21/#headings-and-labels): the label of the button must be clear
|
|
19
|
+
- [WCAG requirement 2.5.2](https://www.w3.org/TR/WCAG21/#pointer-cancellation):
|
|
20
|
+
- do not use the `mousedown` event to activate the button, instead use the `click` event
|
|
21
|
+
- `mousedown` may only be used if `mouseup` undoes the effect, for example, a “fast forward” button to fast-forward audio or video.
|
|
22
|
+
- [WCAG requirement 2.5.5](https://www.w3.org/TR/WCAG21/#target-size): The button must be large enough to click, and small buttons should not be too close to another button.
|
|
20
23
|
|
|
21
|
-
##
|
|
24
|
+
## References
|
|
22
25
|
|
|
23
26
|
- [W3C - Focus Visible](https://www.w3.org/WAI/WCAG21/Understanding/focus-visible.html)
|
|
24
27
|
- [W3C - Headings & labels](https://www.w3.org/TR/WCAG21/#headings-and-labels)
|
|
@@ -10,15 +10,10 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.amsterdam-button {
|
|
13
|
-
font-size: var(--amsterdam-button-
|
|
14
|
-
line-height: var(--amsterdam-button-
|
|
13
|
+
font-size: var(--amsterdam-button-font-size);
|
|
14
|
+
line-height: var(--amsterdam-button-line-height);
|
|
15
15
|
|
|
16
16
|
@include reset;
|
|
17
|
-
|
|
18
|
-
.amsterdam-theme--compact & {
|
|
19
|
-
font-size: var(--amsterdam-breadcrumb-compact-font-size);
|
|
20
|
-
line-height: var(--amsterdam-breadcrumb-compact-line-height);
|
|
21
|
-
}
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
.amsterdam-button--secondary {
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
De link is verplicht.
|
|
3
|
+
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.
|
|
4
|
+
The card typically includes the title, introduction, and an image of the content.
|
|
5
|
+
The link is mandatory.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Guidelines
|
|
9
8
|
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
- The title of a card is a link within a heading.
|
|
10
|
+
The same guidelines as for regular [links](?path=/docs/react_navigation-link--docs) and [headings](?path=/docs/react_text-heading--docs) apply here.
|
|
11
|
+
The link is active across the entire area of the card.
|
|
12
|
+
- A card needs more content than just a title.
|
|
13
|
+
Supplement this with textual and/or visual content.
|
|
14
|
+
- Place the text in a regular paragraph.
|
|
15
|
+
Only use the smallest text size for a tagline or date.
|
|
16
|
+
- This component may not be the best option if the content does not represent a detailed page.
|
|
17
|
+
For referencing a thematic page, use a [top task link](?path=/docs/react_navigation-top-task-link--docs).
|
|
18
|
+
You can also use a [regular link](?path=/docs/react_navigation-link--docs).
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## Screen Readers
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
With a screen reader, you can navigate using headings and links in a document.
|
|
23
|
+
The title of a card is a link within a heading, allowing you to utilize both navigation methods.
|
|
24
|
+
A screen reader reads the title first, followed by the rest of the content.
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
# Checkbox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Allows users to make a selection or agree to terms.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
7
|
+
- Checkboxes are used for one or multiple choices that do not exclude each other.
|
|
8
|
+
- Each checkbox operates independently of other checkboxes in a list at the same hierarchical level.
|
|
9
|
+
Checking an additional checkbox does not affect other selections in that list.
|
|
10
|
+
- You can use a checkbox for bulk selection or deselection of an entire list of checkboxes.
|
|
11
|
+
Still, it should be clear that the bulk selection checkbox is at a different hierarchical level than the list being fully selected or deselected.
|
|
12
|
+
- Use a group of checkboxes to filter data on a page, in a menu, or within a component.
|
|
13
|
+
- A checkbox can answer a closed question if multiple answers are possible.
|
|
14
|
+
- A list of checkboxes is vertically stacked to enhance readability and usability.
|
|
15
|
+
- A list of checkboxes should be in a `fieldset` with a `legend` describing what the list is about.
|
|
16
|
+
For example, if the checkboxes are used to get answers to a question, the `legend` is the question.
|
|
14
17
|
|
|
15
|
-
## Checkbox
|
|
18
|
+
## Checkbox Labels
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
A label starts with a capital letter.
|
|
21
|
+
It does not have punctuation at the end if it is a single sentence, word, or fragment.
|
|
22
|
+
It is written in the first person when asking the user to agree to the terms and conditions.
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
- ... heeft geen interpunctie aan het einde als het een enkele zin, woord of fragment is.
|
|
21
|
-
- ... is in de eerste persoon geschreven als het gaat om de vraag of de gebruiker akkoord gaat met de algemene voorwaarden
|
|
24
|
+
## Relevant WCAG Requirements
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html): It is clear for both users and programmatically what the purpose of a form field is.
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Checkbox is een interactief element, hier gelden [de algemene eisen en richtlijnen voor interactieve elementen](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) voor.
|
|
28
|
+
Checkbox 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.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
align-items: center;
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-shrink: 0;
|
|
22
|
-
height: calc(var(--amsterdam-checkbox-
|
|
22
|
+
height: calc(var(--amsterdam-checkbox-font-size) * var(--amsterdam-checkbox-line-height));
|
|
23
23
|
width: 1.5rem;
|
|
24
24
|
|
|
25
25
|
&::after {
|
|
@@ -31,10 +31,6 @@
|
|
|
31
31
|
height: 1.5rem;
|
|
32
32
|
width: 100%;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
.amsterdam-theme--compact & {
|
|
36
|
-
height: calc(var(--amsterdam-checkbox-compact-font-size) * var(--amsterdam-checkbox-compact-line-height));
|
|
37
|
-
}
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
@mixin reset {
|
|
@@ -46,10 +42,10 @@
|
|
|
46
42
|
cursor: pointer;
|
|
47
43
|
display: inline-flex;
|
|
48
44
|
font-family: var(--amsterdam-checkbox-font-family);
|
|
49
|
-
font-size: var(--amsterdam-checkbox-
|
|
45
|
+
font-size: var(--amsterdam-checkbox-font-size);
|
|
50
46
|
font-weight: 400;
|
|
51
47
|
gap: 0.5rem;
|
|
52
|
-
line-height: var(--amsterdam-checkbox-
|
|
48
|
+
line-height: var(--amsterdam-checkbox-line-height);
|
|
53
49
|
|
|
54
50
|
&:hover {
|
|
55
51
|
color: var(--amsterdam-checkbox-hover-color);
|
|
@@ -63,11 +59,6 @@
|
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
.amsterdam-theme--compact & {
|
|
67
|
-
font-size: var(--amsterdam-checkbox-compact-font-size);
|
|
68
|
-
line-height: var(--amsterdam-checkbox-compact-line-height);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
62
|
@include reset;
|
|
72
63
|
}
|
|
73
64
|
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Dialog
|
|
2
2
|
|
|
3
|
-
A Dialog allows the user to focus on one task or a piece of information
|
|
3
|
+
A Dialog allows the user to focus on one task or a piece of information by popping up and blocking the page content until the modal task is completed or until the user dismisses the action.
|
|
4
4
|
|
|
5
5
|
## Guidelines
|
|
6
6
|
|
|
7
|
-
- Use
|
|
8
|
-
- Use
|
|
7
|
+
- Use dialogs sparingly because they interrupt the user’s workflow.
|
|
8
|
+
- Use a dialog for short and non-frequent tasks.
|
|
9
|
+
Consider using the main flow for regular tasks.
|
|
9
10
|
|
|
10
11
|
## Keyboard Support
|
|
11
12
|
|
|
12
|
-
| key | function
|
|
13
|
-
| :---------- |
|
|
14
|
-
| Tab | Moves focus to next focusable element inside the dialog. |
|
|
15
|
-
| Shift + Tab | Moves focus to previous focusable element inside the dialog. |
|
|
16
|
-
| Escape | Closes the dialog.
|
|
13
|
+
| key | function |
|
|
14
|
+
| :---------- | :--------------------------------------------------------------- |
|
|
15
|
+
| Tab | Moves focus to the next focusable element inside the dialog. |
|
|
16
|
+
| Shift + Tab | Moves focus to the previous focusable element inside the dialog. |
|
|
17
|
+
| Escape | Closes the dialog. |
|
|
17
18
|
|
|
18
19
|
## References
|
|
19
20
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/breakpoint";
|
|
7
|
+
@import "../../common/hyphenation";
|
|
7
8
|
|
|
8
9
|
.amsterdam-dialog {
|
|
9
10
|
background-color: var(--amsterdam-dialog-background-color);
|
|
@@ -52,15 +53,11 @@
|
|
|
52
53
|
color: var(--amsterdam-dialog-title-color);
|
|
53
54
|
flex: auto;
|
|
54
55
|
font-family: var(--amsterdam-dialog-title-font-family);
|
|
55
|
-
font-size: var(--amsterdam-dialog-title-
|
|
56
|
+
font-size: var(--amsterdam-dialog-title-font-size);
|
|
56
57
|
font-weight: var(--amsterdam-dialog-title-font-weight);
|
|
57
|
-
line-height: var(--amsterdam-dialog-title-
|
|
58
|
-
|
|
59
|
-
.amsterdam-theme--compact & {
|
|
60
|
-
font-size: var(--amsterdam-dialog-title-compact-font-size);
|
|
61
|
-
line-height: var(--amsterdam-dialog-title-compact-line-height);
|
|
62
|
-
}
|
|
58
|
+
line-height: var(--amsterdam-dialog-title-line-height);
|
|
63
59
|
|
|
60
|
+
@include hyphenation;
|
|
64
61
|
@include reset;
|
|
65
62
|
}
|
|
66
63
|
|
|
@@ -74,19 +71,3 @@
|
|
|
74
71
|
justify-content: end;
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
|
-
|
|
78
|
-
.amsterdam-dialog__close {
|
|
79
|
-
background-color: var(--amsterdam-dialog-close-background-color);
|
|
80
|
-
border: 0;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
padding-block: 0;
|
|
83
|
-
padding-inline: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.amsterdam-dialog__close svg {
|
|
87
|
-
fill: var(--amsterdam-dialog-close-fill);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.amsterdam-dialog__close:hover svg {
|
|
91
|
-
fill: var(--amsterdam-dialog-close-hover-fill);
|
|
92
|
-
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# Footer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The footer is the closing section on every web page.
|
|
4
|
+
Its content provides service information.
|
|
5
|
+
A part is prescribed, and a part is filled based on the website’s objectives.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Guidelines
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- The footer is mandatory, and there is one on every page.
|
|
10
|
+
- The first column focuses on contact information.
|
|
11
|
+
The information is as specific as possible and tailored to the respective website or page (e.g., including a chat option if available).
|
|
12
|
+
- The second column contains links to relevant (online) sites or sources.
|
|
13
|
+
- The third column refers to newsletters, social media, etc.
|
|
14
|
+
- The last part of the footer is intended for links to privacy policies, cookie statements, explanations about the website, etc.
|
|
15
|
+
It is not intended for links to contact information, for example.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
# Form Label
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describes a form control.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
Always associate a form element (such as an `input` or `textarea`) with a label.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
|
|
6
8
|
@mixin reset {
|
|
7
9
|
-webkit-text-size-adjust: 100%;
|
|
8
10
|
}
|
|
@@ -10,14 +12,10 @@
|
|
|
10
12
|
.amsterdam-form-label {
|
|
11
13
|
color: var(--amsterdam-form-label-color);
|
|
12
14
|
font-family: var(--amsterdam-form-label-font-family);
|
|
13
|
-
font-size: var(--amsterdam-form-label-
|
|
15
|
+
font-size: var(--amsterdam-form-label-font-size);
|
|
14
16
|
font-weight: var(--amsterdam-form-label-font-weight);
|
|
15
|
-
line-height: var(--amsterdam-form-label-
|
|
17
|
+
line-height: var(--amsterdam-form-label-line-height);
|
|
16
18
|
|
|
19
|
+
@include hyphenation;
|
|
17
20
|
@include reset;
|
|
18
|
-
|
|
19
|
-
.amsterdam-theme--compact & {
|
|
20
|
-
font-size: var(--amsterdam-form-label-compact-font-size);
|
|
21
|
-
line-height: var(--amsterdam-form-label-compact-line-height);
|
|
22
|
-
}
|
|
23
21
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
# Grid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Divides the screen into columns to align the elements of a page.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Every page should use the grid as the foundation for its layout.
|
|
8
|
+
It is placed directly within the [Screen](?path=/docs/layout-screen--docs).
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
De kolommen van alle grids moeten wel precies op elkaar aansluiten.
|
|
10
|
+
A [Footer](?path=/docs/react_containers-footer--docs) and a [Spotlight](?path=/docs/react_containers-spotlight--docs) are slightly wider than the grid.
|
|
11
|
+
You close one instance of the grid before these components.
|
|
12
|
+
Inside and optionally after them, you start a new one.
|
|
13
|
+
Multiple instances of the grid component are possible on a page, but the columns of all grids must align precisely.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Within the grid, you create cells containing the desired content.
|
|
16
|
+
A cell often spans multiple columns of the grid.
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## Design
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
The [design choices](?path=/docs/docs-designrichtlijnen-grid--docs) are described in the design guidelines.
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
@import "../../common/breakpoint";
|
|
7
7
|
|
|
8
8
|
.amsterdam-grid {
|
|
9
|
-
--amsterdam-grid-gap: var(--amsterdam-grid-spacious-gap);
|
|
10
|
-
--amsterdam-grid-padding-inline: var(--amsterdam-grid-spacious-padding-inline);
|
|
11
|
-
|
|
12
9
|
display: grid;
|
|
13
10
|
gap: var(--amsterdam-grid-gap);
|
|
14
11
|
grid-template-columns: repeat(var(--amsterdam-grid-column-count), 1fr);
|
|
@@ -23,9 +20,8 @@
|
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
.amsterdam-grid--
|
|
27
|
-
|
|
28
|
-
--amsterdam-grid-padding-inline: var(--amsterdam-grid-compact-padding-inline);
|
|
23
|
+
.amsterdam-grid--gap-vertical--none {
|
|
24
|
+
row-gap: initial;
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
.amsterdam-grid--gap-vertical--small {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Header
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Arranges the City’s logo, the title of the website, and a page menu.
|
|
4
4
|
|
|
5
5
|
## Guidelines
|
|
6
6
|
|
|
7
7
|
- Use the Header when the site is hosted on amsterdam.nl or one of its subdomains.
|
|
8
8
|
- The page menu can contain a maximum of 5 items, including menu and search.
|
|
9
|
-
- When you have a long subsite title, use no or as
|
|
9
|
+
- When you have a long subsite title, use no or as few page menu items as possible.
|
|
10
10
|
|
|
11
11
|
## References
|
|
12
12
|
|