@amsterdam/design-system-css 0.2.0 → 0.4.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 +51 -0
- package/LICENSE.md +1 -1
- package/README.md +2 -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/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.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/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -0
- package/dist/header/header.css.map +1 -0
- 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/image/image.css +1 -1
- package/dist/image/image.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.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/logo/logo.css +1 -1
- package/dist/logo/logo.css.map +1 -1
- package/dist/mark/mark.css +1 -0
- package/dist/mark/mark.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/overlap/overlap.css +1 -0
- package/dist/overlap/overlap.css.map +1 -0
- package/dist/page-menu/page-menu.css +1 -1
- package/dist/page-menu/page-menu.css.map +1 -1
- package/dist/search-field/search-field.css +1 -0
- package/dist/search-field/search-field.css.map +1 -0
- package/dist/skip-link/skip-link.css +1 -0
- package/dist/skip-link/skip-link.css.map +1 -0
- package/dist/spotlight/spotlight.css +1 -0
- package/dist/spotlight/spotlight.css.map +1 -0
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/dist/text-input/text-input.css +1 -0
- package/dist/text-input/text-input.css.map +1 -0
- package/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +4 -2
- package/package.json +5 -5
- package/src/components/accordion/README.md +45 -38
- 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 +58 -0
- package/src/components/blockquote/README.md +8 -8
- package/src/components/breadcrumb/README.md +10 -7
- package/src/components/breadcrumb/breadcrumb.scss +6 -15
- package/src/components/button/README.md +17 -14
- package/src/components/card/README.md +18 -6
- package/src/components/checkbox/README.md +19 -18
- package/src/components/checkbox/checkbox.scss +3 -3
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +0 -17
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/grid/README.md +20 -0
- package/src/components/grid/grid.scss +44 -0
- package/src/components/header/README.md +14 -0
- package/src/components/header/header.scss +85 -0
- package/src/components/heading/README.md +14 -11
- package/src/components/heading/heading.scss +20 -0
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +5 -18
- 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 -12
- package/src/components/image/image.scss +4 -0
- package/src/components/index.scss +12 -2
- package/src/components/link/README.md +26 -24
- package/src/components/link-list/README.md +16 -0
- package/src/components/link-list/link-list.scss +80 -0
- package/src/components/logo/README.md +21 -20
- package/src/components/logo/logo.scss +1 -0
- package/src/components/mark/README.md +17 -0
- package/src/components/mark/mark.scss +8 -0
- 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/overlap/README.md +3 -0
- package/src/components/overlap/overlap.scss +12 -0
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-menu/README.md +10 -9
- package/src/components/page-menu/page-menu.scss +2 -18
- package/src/components/pagination/README.md +13 -10
- package/src/components/paragraph/README.md +16 -14
- package/src/components/screen/README.md +12 -12
- package/src/components/search-field/README.md +33 -0
- package/src/components/search-field/search-field.scss +73 -0
- package/src/components/skip-link/README.md +26 -0
- package/src/components/skip-link/skip-link.scss +28 -0
- package/src/components/spotlight/README.md +15 -0
- package/src/components/spotlight/spotlight.scss +36 -0
- 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 +14 -0
- package/src/components/text-input/text-input.scss +57 -0
- package/src/components/top-task-link/README.md +15 -14
- package/src/components/unordered-list/README.md +5 -5
- package/src/components/visually-hidden/README.md +3 -2
- package/src/components/visually-hidden/visually-hidden.scss +4 -6
- package/dist/grid/grid-cell.css +0 -1
- package/dist/grid/grid-cell.css.map +0 -1
- package/dist/highlight/highlight.css +0 -1
- package/dist/highlight/highlight.css.map +0 -1
- 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/grid/README.grid-cell.md +0 -14
- package/src/components/grid/README.grid.md +0 -17
- package/src/components/grid/grid-cell.scss +0 -46
- package/src/components/heading/heading-css.md +0 -3
- package/src/components/highlight/README.md +0 -15
- package/src/components/highlight/highlight.scss +0 -36
- package/src/components/paragraph/paragraph-css.md +0 -3
|
@@ -68,26 +68,9 @@
|
|
|
68
68
|
display: flex;
|
|
69
69
|
flex-direction: column;
|
|
70
70
|
grid-gap: var(--amsterdam-dialog-footer-gap);
|
|
71
|
-
padding-block: var(--amsterdam-dialog-footer-padding-block);
|
|
72
71
|
|
|
73
72
|
@media screen and (min-width: $amsterdam-breakpoint-medium) {
|
|
74
73
|
flex-direction: row;
|
|
75
74
|
justify-content: end;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
|
|
79
|
-
.amsterdam-dialog__close {
|
|
80
|
-
background-color: var(--amsterdam-dialog-close-background-color);
|
|
81
|
-
border: 0;
|
|
82
|
-
cursor: pointer;
|
|
83
|
-
padding-block: 0;
|
|
84
|
-
padding-inline: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.amsterdam-dialog__close svg {
|
|
88
|
-
fill: var(--amsterdam-dialog-close-fill);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.amsterdam-dialog__close:hover svg {
|
|
92
|
-
fill: var(--amsterdam-dialog-close-hover-fill);
|
|
93
|
-
}
|
|
@@ -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.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Grid
|
|
2
|
+
|
|
3
|
+
Divides the screen into columns to align the elements of a page.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
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
|
+
|
|
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.
|
|
14
|
+
|
|
15
|
+
Within the grid, you create cells containing the desired content.
|
|
16
|
+
A cell often spans multiple columns of the grid.
|
|
17
|
+
|
|
18
|
+
## Design
|
|
19
|
+
|
|
20
|
+
The [design choices](?path=/docs/docs-designrichtlijnen-grid--docs) are described in the design guidelines.
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
--amsterdam-grid-padding-inline: var(--amsterdam-grid-compact-padding-inline);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.amsterdam-grid--gap-vertical--none {
|
|
32
|
+
row-gap: initial;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
.amsterdam-grid--gap-vertical--small {
|
|
32
36
|
row-gap: calc(var(--amsterdam-grid-gap) / 2);
|
|
33
37
|
}
|
|
@@ -71,3 +75,43 @@
|
|
|
71
75
|
.amsterdam-grid--padding-vertical--large {
|
|
72
76
|
padding-block: calc(var(--amsterdam-grid-gap) * 2);
|
|
73
77
|
}
|
|
78
|
+
|
|
79
|
+
.amsterdam-grid__cell--span-all {
|
|
80
|
+
grid-column: 1 / -1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// The order of the following declaration blocks ensures the intended specificity.
|
|
84
|
+
|
|
85
|
+
@for $i from 1 through 12 {
|
|
86
|
+
.amsterdam-grid__cell--span-#{$i} {
|
|
87
|
+
grid-column-end: span $i;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.amsterdam-grid__cell--start-#{$i} {
|
|
91
|
+
grid-column-start: $i;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@media screen and (min-width: $amsterdam-breakpoint-medium) {
|
|
96
|
+
@for $i from 1 through 12 {
|
|
97
|
+
.amsterdam-grid__cell--span-#{$i}-medium {
|
|
98
|
+
grid-column-end: span $i;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.amsterdam-grid__cell--start-#{$i}-medium {
|
|
102
|
+
grid-column-start: $i;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media screen and (min-width: $amsterdam-breakpoint-wide) {
|
|
108
|
+
@for $i from 1 through 12 {
|
|
109
|
+
.amsterdam-grid__cell--span-#{$i}-wide {
|
|
110
|
+
grid-column-end: span $i;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.amsterdam-grid__cell--start-#{$i}-wide {
|
|
114
|
+
grid-column-start: $i;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Header
|
|
2
|
+
|
|
3
|
+
Arranges the City’s logo, the title of the website, and a page menu.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- Use the Header when the site is hosted on amsterdam.nl or one of its subdomains.
|
|
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 few page menu items as possible.
|
|
10
|
+
|
|
11
|
+
## References
|
|
12
|
+
|
|
13
|
+
- A Header is a [landmark](https://www.w3.org/TR/wai-aria-practices-1.1/#aria_landmark_roles) and can be use to group navigation elements.
|
|
14
|
+
- [WCAG 3.2.3](https://wcag.com/designers/3-2-3-consistent-navigation/) Consistent Navigation: Navigation menus that appear on multiple pages are consistent.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/breakpoint";
|
|
7
|
+
|
|
8
|
+
.amsterdam-header {
|
|
9
|
+
align-items: center;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
padding-block: 1rem;
|
|
13
|
+
row-gap: 1.5rem;
|
|
14
|
+
|
|
15
|
+
@media screen and (min-width: $amsterdam-breakpoint-wide) {
|
|
16
|
+
column-gap: var(--amsterdam-header-column-gap);
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.amsterdam-header__logo {
|
|
22
|
+
flex: none;
|
|
23
|
+
outline-offset: var(--amsterdam-link-outline-offset);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.amsterdam-header__links {
|
|
27
|
+
display: none;
|
|
28
|
+
|
|
29
|
+
@media screen and (min-width: $amsterdam-breakpoint-medium) {
|
|
30
|
+
display: block;
|
|
31
|
+
flex: 10 0 auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media screen and (min-width: $amsterdam-breakpoint-wide) {
|
|
35
|
+
order: 3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.amsterdam-header__menu {
|
|
40
|
+
flex: 1;
|
|
41
|
+
padding-inline-start: var(--amsterdam-page-menu-column-gap);
|
|
42
|
+
text-align: end;
|
|
43
|
+
|
|
44
|
+
@media screen and (min-width: $amsterdam-breakpoint-wide) {
|
|
45
|
+
order: 4;
|
|
46
|
+
padding-inline-start: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.amsterdam-header__title {
|
|
51
|
+
flex: 1 1 100%;
|
|
52
|
+
|
|
53
|
+
@media screen and (min-width: $amsterdam-breakpoint-wide) {
|
|
54
|
+
min-width: 0;
|
|
55
|
+
order: 2;
|
|
56
|
+
|
|
57
|
+
.amsterdam-header__title-heading {
|
|
58
|
+
display: block;
|
|
59
|
+
line-height: 1;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Temporary, will move to megamenu (and/or iconButton)
|
|
69
|
+
.amsterdam-header__menu-button {
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23004699' fill-rule='evenodd' d='M0 3.238h32V7.81H0V3.238zm0 10.476h32v4.572H0v-4.572zM0 24.19h32v4.572H0V24.19z'/></svg>");
|
|
72
|
+
background-position: center right;
|
|
73
|
+
background-repeat: no-repeat;
|
|
74
|
+
background-size: 19px 19px;
|
|
75
|
+
border: 0;
|
|
76
|
+
color: var(--amsterdam-page-menu-item-color);
|
|
77
|
+
font-family: var(--amsterdam-page-menu-item-font-family);
|
|
78
|
+
font-size: var(--amsterdam-page-menu-item-spacious-font-size);
|
|
79
|
+
font-weight: var(--amsterdam-page-menu-item-font-weight);
|
|
80
|
+
line-height: var(--amsterdam-page-menu-item-spacious-line-height);
|
|
81
|
+
margin-block: 0;
|
|
82
|
+
padding-inline: 0 30px;
|
|
83
|
+
text-align: center;
|
|
84
|
+
touch-action: manipulation;
|
|
85
|
+
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
# Heading
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A heading conveys information about the content below it.
|
|
4
|
+
Use headings to allow the user to grasp the structure of the page quickly.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- A heading describes the content beneath it.
|
|
9
|
+
- Do not use a heading for formatting and styling. Use it to represent the page’s structure.
|
|
10
|
+
- Use headings hierarchically, and do not skip heading levels.
|
|
11
|
+
So, an `h1` heading should be followed by an `h2`, not an `h3`.
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Relevant WCAG Requirements
|
|
12
14
|
|
|
13
15
|
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-content-structure-separation-programmatic):
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- [WCAG 2.4.
|
|
17
|
-
- [WCAG 2.4.
|
|
16
|
+
Text that looks like a heading is also recognized as a heading by a computer.
|
|
17
|
+
Using the correct heading level makes the page structure clear for all users.
|
|
18
|
+
- [WCAG 2.4.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-skip): Headings can be used to navigate to the next section with the keyboard.
|
|
19
|
+
- [WCAG 2.4.6](https://www.w3.org/WAI/WCAG21/quickref/#headings-and-labels): Use headings to describe the purpose or subject of the underlying content.
|
|
20
|
+
- [WCAG 2.4.10](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-headings): Use headings to structure the content.
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## References
|
|
20
23
|
|
|
21
24
|
- [W3C - Headings](https://www.w3.org/WAI/tutorials/page-structure/headings/)
|
|
22
25
|
- [W3C - Headings & labels](https://www.w3.org/TR/WCAG21/#headings-and-labels)
|
|
@@ -59,6 +59,26 @@
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
.amsterdam-heading--5 {
|
|
63
|
+
font-size: var(--amsterdam-heading-spacious-level-5-font-size);
|
|
64
|
+
line-height: var(--amsterdam-heading-spacious-level-5-line-height);
|
|
65
|
+
|
|
66
|
+
.amsterdam-theme--compact & {
|
|
67
|
+
font-size: var(--amsterdam-heading-compact-level-5-font-size);
|
|
68
|
+
line-height: var(--amsterdam-heading-compact-level-5-line-height);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.amsterdam-heading--6 {
|
|
73
|
+
font-size: var(--amsterdam-heading-spacious-level-6-font-size);
|
|
74
|
+
line-height: var(--amsterdam-heading-spacious-level-6-line-height);
|
|
75
|
+
|
|
76
|
+
.amsterdam-theme--compact & {
|
|
77
|
+
font-size: var(--amsterdam-heading-compact-level-6-font-size);
|
|
78
|
+
line-height: var(--amsterdam-heading-compact-level-6-line-height);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
62
82
|
.amsterdam-heading--inverse-color {
|
|
63
83
|
color: var(--amsterdam-heading-inverse-color);
|
|
64
84
|
}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
# Icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Icons are visual symbols used to represent ideas, themes, or actions.
|
|
4
|
+
They communicate the message at a glance and draw attention to important (interactive) information.
|
|
5
|
+
Always use an `Icon` component to encapsulate an SVG icon for proper styling and sizing.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Interactive Elements
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Use an icon to support textual interactive elements like buttons and links.
|
|
10
|
+
Always try to provide accompanying text for an icon.
|
|
11
|
+
Only use icons without accompanying text if they adhere to international standards, such as menu (hamburger icon), search (magnifying glass), next, previous, play, pause, etc.
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## Color
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Icons are black or white.
|
|
16
|
+
When used as part of an interactive element, they are dark blue.
|
|
17
|
+
When disabled, they are grey.
|
|
18
|
+
They must adhere to the same contrast ratio for accessibility as typography against a background colour.
|
|
19
|
+
The icon defaults to the colour of the container it is in.
|
|
12
20
|
|
|
13
|
-
##
|
|
21
|
+
## Alignment
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
Icons are aligned to the left of the text by default and vertically centred to the middle of the first line of text.
|
|
16
24
|
|
|
17
|
-
##
|
|
25
|
+
## Size
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
Icons use the same text levels as all typographic components to determine their size.
|
|
28
|
+
This ensures easy alignment between icons and text.
|
|
29
|
+
[Refer to the typography documentation for more information](/docs/docs-designrichtlijnen-typografie--docs#tekstniveaus).
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
fill: currentColor;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.amsterdam-icon--square {
|
|
16
|
+
aspect-ratio: 1 / 1;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.amsterdam-icon--size-3 {
|
|
16
21
|
height: calc(var(--amsterdam-icon-spacious-size-3-font-size) * var(--amsterdam-icon-spacious-size-3-line-height));
|
|
17
22
|
}
|
|
@@ -48,15 +53,6 @@
|
|
|
48
53
|
width: var(--amsterdam-icon-spacious-size-6-font-size);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
.amsterdam-icon--size-7 {
|
|
52
|
-
height: calc(var(--amsterdam-icon-spacious-size-7-font-size) * var(--amsterdam-icon-spacious-size-7-line-height));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.amsterdam-icon--size-7 svg {
|
|
56
|
-
height: var(--amsterdam-icon-spacious-size-7-font-size);
|
|
57
|
-
width: var(--amsterdam-icon-spacious-size-7-font-size);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
56
|
.amsterdam-theme--compact {
|
|
61
57
|
.amsterdam-icon--size-3 {
|
|
62
58
|
height: calc(var(--amsterdam-icon-compact-size-3-font-size) * var(--amsterdam-icon-compact-size-3-line-height));
|
|
@@ -93,13 +89,4 @@
|
|
|
93
89
|
height: var(--amsterdam-icon-compact-size-6-font-size);
|
|
94
90
|
width: var(--amsterdam-icon-compact-size-6-font-size);
|
|
95
91
|
}
|
|
96
|
-
|
|
97
|
-
.amsterdam-icon--size-7 {
|
|
98
|
-
height: calc(var(--amsterdam-icon-compact-size-7-font-size) * var(--amsterdam-icon-compact-size-7-line-height));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.amsterdam-icon--size-7 svg {
|
|
102
|
-
height: var(--amsterdam-icon-compact-size-7-font-size);
|
|
103
|
-
width: var(--amsterdam-icon-compact-size-7-font-size);
|
|
104
|
-
}
|
|
105
92
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Icon Button
|
|
2
|
+
|
|
3
|
+
A button containing only an icon.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- Use this button only if the icon is entirely clear and understandable.
|
|
8
|
+
Many icons are interpreted differently by different users.
|
|
9
|
+
Only use universally recognized icons, such as a close icon or a play icon.
|
|
10
|
+
- Provide a label text that describes what the button does for screen reader users.
|
|
11
|
+
|
|
12
|
+
## Relevant WCAG Requirements
|
|
13
|
+
|
|
14
|
+
The Icon Button follows [the same requirements and guidelines as a regular button](https://amsterdam.github.io/design-system/?path=/docs/react_buttons-button--docs).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset {
|
|
7
|
+
border: 0;
|
|
8
|
+
padding-block: 0;
|
|
9
|
+
padding-inline: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.amsterdam-icon-button {
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
color: var(--amsterdam-icon-button-color);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
outline-offset: var(--amsterdam-icon-button-outline-offset);
|
|
17
|
+
touch-action: manipulation;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background-color: var(--amsterdam-icon-button-hover-background-color);
|
|
21
|
+
color: var(--amsterdam-icon-button-hover-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
color: var(--amsterdam-icon-button-disabled-color);
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include reset;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.amsterdam-icon-button--on-background-light {
|
|
34
|
+
color: var(--amsterdam-icon-button-on-background-light-color);
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--amsterdam-icon-button-on-background-light-hover-background-color);
|
|
38
|
+
color: var(--amsterdam-icon-button-on-background-light-hover-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
color: var(--amsterdam-icon-button-on-background-light-disabled-color);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.amsterdam-icon-button--on-background-dark {
|
|
48
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-background-color);
|
|
49
|
+
color: var(--amsterdam-icon-button-on-background-dark-color);
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-hover-background-color);
|
|
53
|
+
color: var(--amsterdam-icon-button-on-background-dark-hover-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:disabled {
|
|
57
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-disabled-background-color);
|
|
58
|
+
color: var(--amsterdam-icon-button-on-background-dark-disabled-color);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# Image
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Displays an image.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
-
|
|
7
|
+
- Do not forget to include a description of the image in the `alt` attribute.
|
|
8
|
+
This ensures that screen reader users can also access this information.
|
|
9
|
+
Additionally, it can aid in search engine optimization.
|
|
10
|
+
- A description is unnecessary for decorative images; use `alt=""` for these.
|
|
11
|
+
Examples are images that add little to the nearby text or pictures that purely contribute to the design or atmosphere of the page (source: [W3C Web Accessibility Initiative](https://www.w3.org/WAI/tutorials/images/decorative/)).
|
|
12
|
+
- Optionally specify multiple candidates for the image through the `srcSet` attribute.
|
|
13
|
+
For example, provide small, medium, and large variants for various screen sizes.
|
|
14
|
+
This prevents unnecessary downloading of large files.
|
|
15
|
+
Do this especially for the main image of a page, where the difference between sizes on a narrow and wide screen is most significant.
|
|
16
|
+
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](?path=/docs/layout-aspect-ratio--docs) component.
|
|
13
17
|
|
|
14
|
-
##
|
|
18
|
+
## Relevant WCAG Requirements
|
|
15
19
|
|
|
16
|
-
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content):
|
|
17
|
-
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text):
|
|
18
|
-
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception):
|
|
20
|
+
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content): Non-text content must have a text alternative.
|
|
21
|
+
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text): Use text instead of images of text.
|
|
22
|
+
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception): Use images of text only when there is no alternative.
|
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./link-list/link-list";
|
|
8
|
+
@import "./badge/badge";
|
|
9
|
+
@import "./table/table";
|
|
10
|
+
@import "./mega-menu/mega-menu";
|
|
11
|
+
@import "./icon-button/icon-button";
|
|
12
|
+
@import "./skip-link/skip-link";
|
|
13
|
+
@import "./overlap/overlap";
|
|
14
|
+
@import "./header/header";
|
|
15
|
+
@import "./mark/mark";
|
|
16
|
+
@import "./text-input/text-input";
|
|
17
|
+
@import "./search-field/search-field";
|
|
7
18
|
@import "./logo/logo";
|
|
8
19
|
@import "./dialog/dialog";
|
|
9
20
|
@import "./image/image";
|
|
@@ -18,9 +29,8 @@
|
|
|
18
29
|
@import "./checkbox/checkbox";
|
|
19
30
|
@import "./form-label/form-label";
|
|
20
31
|
@import "./grid/grid";
|
|
21
|
-
@import "./grid/grid-cell";
|
|
22
32
|
@import "./heading/heading";
|
|
23
|
-
@import "./
|
|
33
|
+
@import "./spotlight/spotlight";
|
|
24
34
|
@import "./icon/icon";
|
|
25
35
|
@import "./link/link";
|
|
26
36
|
@import "./ordered-list/ordered-list";
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
# Link
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A link is a navigation element and can be used independently or inline with text.
|
|
4
|
+
It is the lightweight variant for navigation.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Use a link in the following cases:
|
|
8
9
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- To navigate to another page within the website or application
|
|
11
|
+
- To navigate to another website (see [External links](#external-links))
|
|
12
|
+
- To navigate to an element on the same page
|
|
13
|
+
- To link to emails or phone numbers (start the link with `mailto:` or `tel:`)
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
A link is a navigation component.
|
|
16
|
+
Use a button instead of a link when an action is desired.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
TODO: According to the spec, you should use a link for downloads as well. Last time I checked, different browsers handled this differently,
|
|
18
|
-
which led to unexpected results. Maybe that changed in the meantime. Do we want to figure this out and describe this in the docs as well?
|
|
19
|
-
-->
|
|
18
|
+
### External links
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Always include `rel="external"` for an external link.
|
|
21
|
+
Avoid `target="_blank"`, but use `rel="external noopener"` if necessary.
|
|
22
|
+
For more information: [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### Visited style
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Visited links indicate that a user has already opened the link.
|
|
27
|
+
We discourage using styles for visited links because they often make the page less clear and navigation more challenging.
|
|
28
|
+
The inline link does have a visited style.
|
|
29
|
+
It is not part of navigation elements that are frequently scanned.
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Relevante WCAG eisen
|
|
31
|
+
## Relevant WCAG Requirements
|
|
30
32
|
|
|
31
33
|
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum)
|
|
32
34
|
- [WCAG 2.4.4](https://www.w3.org/TR/WCAG21/#link-purpose-in-context)
|
|
33
35
|
- [WCAG 2.5.3](https://www.w3.org/TR/WCAG21/#label-in-name)
|
|
34
36
|
- [WCAG 3.1.2](https://www.w3.org/TR/WCAG21/#language-of-parts)
|
|
35
37
|
|
|
36
|
-
##
|
|
38
|
+
## References
|
|
37
39
|
|
|
38
|
-
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/):
|
|
39
|
-
- [_A comprehensive guide to designing perfect links in UX_,
|
|
40
|
-
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_
|
|
41
|
-
- [_Hover, focus, active_,
|
|
42
|
-
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a):
|
|
40
|
+
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/): Avoid `target="_blank"` or use `rel="external noopener"` if necessary.
|
|
41
|
+
- [_A comprehensive guide to designing perfect links in UX_, on Prototypr](https://blog.prototypr.io/a-guide-to-designing-perfect-links-in-ux-414558f35730): Best practices for links.
|
|
42
|
+
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_ by Norman Nielsen Group](https://www.nngroup.com/articles/writing-links/): How to write good links? An extensive article on links.
|
|
43
|
+
- [_Hover, focus, active_, by Wunder](https://wunder.io/wunderpedia/accessibility/accessible-uis/hover-focus-active/): A good explanation of the states that elements like links and buttons have in browsers.
|
|
44
|
+
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a): Comprehensive overview of all possibilities of links in HTML.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Link List
|
|
2
|
+
|
|
3
|
+
A collection of related links.
|
|
4
|
+
|
|
5
|
+
## Design
|
|
6
|
+
|
|
7
|
+
Every list item starts with a chevron.
|
|
8
|
+
It emphasizes the list structure and thematic coherence.
|
|
9
|
+
The chevron is part of the link.
|
|
10
|
+
Therefore, it is blue and clickable.
|
|
11
|
+
|
|
12
|
+
## Guidelines
|
|
13
|
+
|
|
14
|
+
Use a Link List to present multiple links within a theme.
|
|
15
|
+
|
|
16
|
+
For additional guidelines, refer to the [Link](?path=/docs/navigation-link--docs) component.
|