@amsterdam/design-system-css 0.11.0 → 0.12.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 +37 -16
- package/README.md +69 -40
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/action-group/action-group.css +1 -0
- package/dist/action-group/action-group.css.map +1 -0
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/blockquote/blockquote.css.map +1 -1
- package/dist/breakout/breakout.css +1 -0
- package/dist/breakout/breakout.css.map +1 -0
- package/dist/button/button.css +1 -1
- package/dist/button/button.css.map +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/description-list/description-list.css +1 -1
- package/dist/description-list/description-list.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/field/field.css +1 -1
- package/dist/field/field.css.map +1 -1
- package/dist/file-input/file-input.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/hint/hint.css +1 -0
- package/dist/hint/hint.css.map +1 -0
- package/dist/icon-button/icon-button.css +1 -1
- package/dist/icon-button/icon-button.css.map +1 -1
- package/dist/image-slider/image-slider.css +1 -0
- package/dist/image-slider/image-slider.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 -1
- package/dist/link-list/link-list.css.map +1 -1
- package/dist/ordered-list/ordered-list.css +1 -1
- package/dist/ordered-list/ordered-list.css.map +1 -1
- package/dist/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/password-input/password-input.css +1 -0
- package/dist/password-input/password-input.css.map +1 -0
- package/dist/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/screen/screen.css +1 -1
- package/dist/screen/screen.css.map +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/select/select.css.map +1 -1
- package/dist/switch/switch.css +1 -1
- package/dist/switch/switch.css.map +1 -1
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/unordered-list/unordered-list.css +1 -1
- package/dist/unordered-list/unordered-list.css.map +1 -1
- package/package.json +11 -6
- package/src/components/accordion/accordion.scss +10 -1
- package/src/components/action-group/README.md +14 -0
- package/src/components/action-group/action-group.scss +15 -0
- package/src/components/avatar/README.md +3 -3
- package/src/components/avatar/avatar.scss +9 -0
- package/src/components/blockquote/blockquote.scss +4 -4
- package/src/components/breadcrumb/README.md +7 -9
- package/src/components/breakout/README.md +5 -0
- package/src/components/breakout/breakout.scss +163 -0
- package/src/components/button/README.md +5 -4
- package/src/components/button/button.scss +16 -7
- package/src/components/card/README.md +5 -1
- package/src/components/checkbox/README.md +1 -1
- package/src/components/checkbox/checkbox.scss +2 -2
- package/src/components/description-list/README.md +6 -5
- package/src/components/description-list/description-list.scss +23 -7
- package/src/components/dialog/README.md +5 -7
- package/src/components/dialog/dialog.scss +13 -30
- package/src/components/field/README.md +1 -1
- package/src/components/field/field.scss +1 -0
- package/src/components/field-set/README.md +2 -0
- package/src/components/file-input/file-input.scss +2 -2
- package/src/components/footer/README.md +4 -4
- package/src/components/gap/README.md +9 -7
- package/src/components/grid/README.md +11 -12
- package/src/components/grid/_mixins.scss +110 -0
- package/src/components/grid/grid.scss +33 -37
- package/src/components/header/README.md +9 -11
- package/src/components/header/header.scss +1 -0
- package/src/components/hint/README.md +9 -0
- package/src/components/hint/hint.scss +9 -0
- package/src/components/icon-button/icon-button.scss +18 -14
- package/src/components/image-slider/README.md +25 -0
- package/src/components/image-slider/image-slider.scss +89 -0
- package/src/components/index.scss +5 -0
- package/src/components/label/README.md +3 -1
- package/src/components/link/README.md +5 -0
- package/src/components/link/link.scss +10 -10
- package/src/components/link-list/README.md +2 -3
- package/src/components/link-list/link-list.scss +6 -6
- package/src/components/margin/README.md +6 -6
- package/src/components/mark/README.md +1 -6
- package/src/components/ordered-list/README.md +5 -0
- package/src/components/ordered-list/ordered-list.scss +3 -5
- package/src/components/page-menu/README.md +5 -1
- package/src/components/pagination/pagination.scss +6 -6
- package/src/components/password-input/README.md +29 -0
- package/src/components/password-input/password-input.scss +59 -0
- package/src/components/radio/README.md +2 -2
- package/src/components/radio/radio.scss +123 -90
- package/src/components/screen/README.md +9 -8
- package/src/components/screen/screen.scss +1 -0
- package/src/components/search-field/README.md +1 -1
- package/src/components/search-field/search-field.scss +3 -3
- package/src/components/select/select.scss +2 -2
- package/src/components/skip-link/README.md +0 -5
- package/src/components/spotlight/README.md +2 -1
- package/src/components/switch/README.md +2 -2
- package/src/components/switch/switch.scss +9 -6
- package/src/components/tabs/README.md +3 -1
- package/src/components/tabs/tabs.scss +12 -0
- package/src/components/text-input/README.md +1 -1
- package/src/components/top-task-link/README.md +4 -0
- package/src/components/unordered-list/README.md +6 -0
- package/src/components/unordered-list/unordered-list.scss +3 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Image Slider
|
|
4
|
+
|
|
5
|
+
Displays a small set of images in a limited space.
|
|
6
|
+
|
|
7
|
+
## Design
|
|
8
|
+
|
|
9
|
+
The first or selected image shows at its maximum size.
|
|
10
|
+
Every image displays a thumbnail at about 20% of its width.
|
|
11
|
+
Users can use buttons, thumbnails or swiping to navigate between the images.
|
|
12
|
+
The buttons re not displayed on a narrow touch device.
|
|
13
|
+
The images do not slide automatically.
|
|
14
|
+
|
|
15
|
+
## How to use
|
|
16
|
+
|
|
17
|
+
- Use this for a series of images that belong together.
|
|
18
|
+
- Provide at least 2 images and at most 5.
|
|
19
|
+
- Feature the most essential image first.
|
|
20
|
+
- Assume that some or many users will not navigate between the slides and only see the first image.
|
|
21
|
+
Display all images separately if you want each of them to receive attention.
|
|
22
|
+
- A full-width Image Slider should run from one edge of the Screen to the other;
|
|
23
|
+
position it next to a Grid, not in a Cell spanning all columns.
|
|
24
|
+
Smaller sliders are fine in a Grid Cell.
|
|
25
|
+
- Consult the [Image](/docs/components-media-image--docs) docs for guidelines on the individual images.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
@import "../../common/breakpoint";
|
|
6
|
+
|
|
7
|
+
.ams-image-slider {
|
|
8
|
+
display: grid;
|
|
9
|
+
gap: var(--ams-image-slider-gap);
|
|
10
|
+
grid-template-rows: 1fr auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ams-image-slider__item {
|
|
14
|
+
scroll-snap-align: center;
|
|
15
|
+
scroll-snap-stop: always;
|
|
16
|
+
|
|
17
|
+
/** temporary fix for covering the entire gallery */
|
|
18
|
+
.ams-image {
|
|
19
|
+
inline-size: 100%;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ams-image-slider__scroller {
|
|
24
|
+
align-items: center;
|
|
25
|
+
display: grid;
|
|
26
|
+
gap: var(--ams-image-slider-scroller-gap);
|
|
27
|
+
grid-auto-columns: 100%;
|
|
28
|
+
grid-auto-flow: column;
|
|
29
|
+
grid-column: 1/-1;
|
|
30
|
+
grid-row: 1;
|
|
31
|
+
outline-offset: var(--ams-image-slider-scroller-outline-offset);
|
|
32
|
+
overflow-x: auto;
|
|
33
|
+
overscroll-behavior-x: contain;
|
|
34
|
+
scroll-snap-type: x mandatory;
|
|
35
|
+
scrollbar-width: none;
|
|
36
|
+
|
|
37
|
+
&::-webkit-scrollbar {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media not (prefers-reduced-motion) {
|
|
42
|
+
scroll-behavior: smooth;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ams-image-slider__controls {
|
|
47
|
+
display: flex;
|
|
48
|
+
grid-column: 1/-1;
|
|
49
|
+
grid-row: 1;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
|
|
52
|
+
@media (pointer: coarse) and (max-width: $ams-breakpoint-medium) {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ams-image-slider__control {
|
|
58
|
+
place-self: center;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ams-image-slider__thumbnails {
|
|
63
|
+
display: grid;
|
|
64
|
+
gap: var(--ams-image-slider-thumbnails-gap);
|
|
65
|
+
grid-template-columns: repeat(5, 1fr);
|
|
66
|
+
max-inline-size: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ams-image-slider__thumbnail {
|
|
70
|
+
background-color: var(--ams-image-slider-thumbnails-thumbnail-background-color);
|
|
71
|
+
background-position: center;
|
|
72
|
+
background-size: cover;
|
|
73
|
+
border: none;
|
|
74
|
+
cursor: var(--ams-image-slider-thumbnails-thumbnail-cursor);
|
|
75
|
+
opacity: var(--ams-image-slider-thumbnails-thumbnail-opacity);
|
|
76
|
+
outline-offset: var(--ams-button-outline-offset);
|
|
77
|
+
padding-block: 0;
|
|
78
|
+
padding-inline: 0;
|
|
79
|
+
position: relative;
|
|
80
|
+
scroll-snap-align: start;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
opacity: var(--ams-image-slider-thumbnails-thumbnail-hover-opacity);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ams-image-slider__thumbnail--in-view {
|
|
88
|
+
opacity: var(--ams-image-slider-thumbnails-thumbnail-in-view-opacity);
|
|
89
|
+
}
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./action-group/action-group";
|
|
8
|
+
@import "./breakout/breakout";
|
|
9
|
+
@import "./hint/hint";
|
|
10
|
+
@import "./password-input/password-input";
|
|
7
11
|
@import "./form-error-list/form-error-list";
|
|
12
|
+
@import "./image-slider/image-slider";
|
|
8
13
|
@import "./table-of-contents/table-of-contents";
|
|
9
14
|
@import "./error-message/error-message";
|
|
10
15
|
@import "./file-input/file-input";
|
|
@@ -6,4 +6,6 @@ Describes a form control.
|
|
|
6
6
|
|
|
7
7
|
## Guidelines
|
|
8
8
|
|
|
9
|
-
Always associate a form element (such as an `input` or `textarea`) with a label.
|
|
9
|
+
- Always associate a form element (such as an `input` or `textarea`) with a label.
|
|
10
|
+
- Set `optional` to `true` if the input is not required.
|
|
11
|
+
- Use `hint` to show a custom hint text.
|
|
@@ -13,6 +13,7 @@ Use a link in the following cases:
|
|
|
13
13
|
- To navigate to another website (see [External links](#external-links))
|
|
14
14
|
- To navigate to an element on the same page
|
|
15
15
|
- To link to emails or phone numbers (start the link with `mailto:` or `tel:`)
|
|
16
|
+
- Wrap 2 or more consecutive buttons and/or links in an [Action Group](https://designsystem.amsterdam/?path=/docs/components-buttons-action-group--docs).
|
|
16
17
|
|
|
17
18
|
A link is a navigation component.
|
|
18
19
|
Use a button instead of a link when an action is desired.
|
|
@@ -30,6 +31,10 @@ We discourage using styles for visited links because they often make the page le
|
|
|
30
31
|
The inline link does have a visited style.
|
|
31
32
|
It is not part of navigation elements that are frequently scanned.
|
|
32
33
|
|
|
34
|
+
### Using links with routing libraries
|
|
35
|
+
|
|
36
|
+
Check out the [developer guide](/docs/docs-developer-guide-routing-libraries--docs) on how to integrate links with external routing libraries.
|
|
37
|
+
|
|
33
38
|
## Relevant WCAG requirements
|
|
34
39
|
|
|
35
40
|
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum)
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
font-weight: var(--ams-link-font-weight);
|
|
12
12
|
outline-offset: var(--ams-link-outline-offset);
|
|
13
13
|
|
|
14
|
+
@include text-rendering;
|
|
15
|
+
|
|
14
16
|
&:hover {
|
|
15
17
|
color: var(--ams-link-hover-color);
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
@include text-rendering;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.ams-link--standalone {
|
|
@@ -50,26 +50,26 @@
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.ams-link--
|
|
54
|
-
color: var(--ams-link-
|
|
53
|
+
.ams-link--contrast-color {
|
|
54
|
+
color: var(--ams-link-contrast-color-color);
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
57
|
-
color: var(--ams-link-
|
|
57
|
+
color: var(--ams-link-contrast-color-hover-color);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&:visited {
|
|
61
|
-
color: var(--ams-link-
|
|
61
|
+
color: var(--ams-link-contrast-color-visited-color);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.ams-link--
|
|
66
|
-
color: var(--ams-link-
|
|
65
|
+
.ams-link--inverse-color {
|
|
66
|
+
color: var(--ams-link-inverse-color-color);
|
|
67
67
|
|
|
68
68
|
&:hover {
|
|
69
|
-
color: var(--ams-link-
|
|
69
|
+
color: var(--ams-link-inverse-color-hover-color);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&:visited {
|
|
73
|
-
color: var(--ams-link-
|
|
73
|
+
color: var(--ams-link-inverse-color-visited-color);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -13,6 +13,5 @@ Therefore, it is blue and clickable.
|
|
|
13
13
|
|
|
14
14
|
## Guidelines
|
|
15
15
|
|
|
16
|
-
Use a Link List to present multiple links within a theme.
|
|
17
|
-
|
|
18
|
-
For additional guidelines, refer to the [Link](/docs/components-navigation-link--docs) component.
|
|
16
|
+
- Use a Link List to present multiple links within a theme.
|
|
17
|
+
- For additional guidelines, refer to the [Link](/docs/components-navigation-link--docs) component.
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
@include hyphenation;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.ams-link-list__link--
|
|
57
|
-
color: var(--ams-link-list-link-
|
|
56
|
+
.ams-link-list__link--contrast-color {
|
|
57
|
+
color: var(--ams-link-list-link-contrast-color-color);
|
|
58
58
|
|
|
59
59
|
&:hover {
|
|
60
|
-
color: var(--ams-link-list-link-
|
|
60
|
+
color: var(--ams-link-list-link-contrast-color-hover-color);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.ams-link-list__link--
|
|
65
|
-
color: var(--ams-link-list-link-
|
|
64
|
+
.ams-link-list__link--inverse-color {
|
|
65
|
+
color: var(--ams-link-list-link-inverse-color-color);
|
|
66
66
|
|
|
67
67
|
&:hover {
|
|
68
|
-
color: var(--ams-link-list-link-
|
|
68
|
+
color: var(--ams-link-list-link-inverse-color-hover-color);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -8,13 +8,13 @@ Adds white space below a single element.
|
|
|
8
8
|
|
|
9
9
|
The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are available for the height of the bottom margin.
|
|
10
10
|
|
|
11
|
-
| Class name |
|
|
11
|
+
| Class name | Example |
|
|
12
12
|
| ------------ | -------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `ams-mb--xs` | <div className="ams-docs-token-
|
|
14
|
-
| `ams-mb--sm` | <div className="ams-docs-token-
|
|
15
|
-
| `ams-mb--md` | <div className="ams-docs-token-
|
|
16
|
-
| `ams-mb--lg` | <div className="ams-docs-token-
|
|
17
|
-
| `ams-mb--xl` | <div className="ams-docs-token-
|
|
13
|
+
| `ams-mb--xs` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-xs);" /> |
|
|
14
|
+
| `ams-mb--sm` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-sm);" /> |
|
|
15
|
+
| `ams-mb--md` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-md);" /> |
|
|
16
|
+
| `ams-mb--lg` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-lg);" /> |
|
|
17
|
+
| `ams-mb--xl` | <div className="ams-docs-token-example--space" style="inline-size: var(--ams-margin-xl);" /> |
|
|
18
18
|
|
|
19
19
|
## Guidelines
|
|
20
20
|
|
|
@@ -7,13 +7,8 @@ Provides strong emphasis on the text and draws attention to it.
|
|
|
7
7
|
|
|
8
8
|
## Guidelines
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Use a maximum of 1 mark per page.
|
|
10
|
+
- Use a maximum of 1 Mark per page.
|
|
13
11
|
- Limit the marked text to 1 sentence.
|
|
14
|
-
|
|
15
|
-
### Avoid This
|
|
16
|
-
|
|
17
12
|
- Do not use it in titles and subtitles.
|
|
18
13
|
Use a significant and engaging title if the entire paragraph is important.
|
|
19
14
|
- Do not mark an entire paragraph.
|
|
@@ -7,3 +7,8 @@ This list can have 2 levels.
|
|
|
7
7
|
The first level has numbers as list markers.
|
|
8
8
|
The second level uses letters in alphabetical order.
|
|
9
9
|
List items indent their text by a fixed distance.
|
|
10
|
+
|
|
11
|
+
## Design
|
|
12
|
+
|
|
13
|
+
The list uses ascending numbers as markers, providing enough space for numbers up to 99.
|
|
14
|
+
Extra white space between items enhances the distinction, mainly when they consist of multiple lines of text.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
@import "../../common/text-rendering";
|
|
7
7
|
|
|
8
|
-
/** Apply border box sizing, reset white space and list styles. */
|
|
9
8
|
@mixin reset {
|
|
10
9
|
box-sizing: border-box;
|
|
11
10
|
list-style-type: none;
|
|
@@ -13,7 +12,6 @@
|
|
|
13
12
|
padding-inline-start: 0;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
/** A list is a grid column with a gap between items. */
|
|
17
15
|
.ams-ordered-list {
|
|
18
16
|
display: grid;
|
|
19
17
|
gap: var(--ams-ordered-list-gap);
|
|
@@ -22,7 +20,6 @@
|
|
|
22
20
|
@include reset;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
/** A list with markers sets typography for its text content. */
|
|
26
23
|
.ams-ordered-list:not(.ams-ordered-list--no-markers) {
|
|
27
24
|
color: var(--ams-ordered-list-color);
|
|
28
25
|
font-family: var(--ams-ordered-list-font-family);
|
|
@@ -31,7 +28,6 @@
|
|
|
31
28
|
line-height: var(--ams-ordered-list-line-height);
|
|
32
29
|
list-style-type: var(--ams-ordered-list-list-style-type);
|
|
33
30
|
|
|
34
|
-
/** List items are responsible for indentation and marker positioning. */
|
|
35
31
|
.ams-ordered-list__item {
|
|
36
32
|
margin-inline-start: var(--ams-ordered-list-item-margin-inline-start);
|
|
37
33
|
padding-inline-start: var(--ams-ordered-list-item-padding-inline-start);
|
|
@@ -47,9 +43,11 @@
|
|
|
47
43
|
line-height: var(--ams-ordered-list-small-line-height);
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
/** A nested list has a different marker and less indentation for correct alignment. */
|
|
51
46
|
:is(.ams-ordered-list, .ams-unordered-list) .ams-ordered-list {
|
|
47
|
+
gap: var(--ams-ordered-list-ordered-list-gap);
|
|
52
48
|
list-style-type: var(--ams-ordered-list-ordered-list-list-style-type);
|
|
49
|
+
padding-block-end: var(--ams-ordered-list-ordered-list-padding-block-end);
|
|
50
|
+
padding-block-start: var(--ams-ordered-list-ordered-list-padding-block-start);
|
|
53
51
|
|
|
54
52
|
.ams-ordered-list__item {
|
|
55
53
|
margin-inline-start: var(--ams-ordered-list-ordered-list-item-margin-inline-start);
|
|
@@ -13,8 +13,12 @@ A small set of links for use in the Header and Footer.
|
|
|
13
13
|
- The ‘Menu’ button opens the Mega Menu.
|
|
14
14
|
- On narrow screens, menu items other than ‘Search’ and ‘Menu’ move from the Page Menu to the Mega Menu.
|
|
15
15
|
|
|
16
|
+
### Using links with routing libraries
|
|
17
|
+
|
|
18
|
+
Check out the [developer guide](/docs/docs-developer-guide-routing-libraries--docs) on how to integrate links with external routing libraries.
|
|
19
|
+
|
|
16
20
|
## Relevant WCAG requirements
|
|
17
21
|
|
|
18
22
|
- [Consistent Navigation (Level AA)](https://www.w3.org/WAI/WCAG21/Understanding/consistent-navigation.html)
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
Page Menu is an interactive element, and the [general requirements and guidelines for interactivity](/docs/docs-developer-guide-interactivity--docs) apply.
|
|
@@ -45,22 +45,22 @@
|
|
|
45
45
|
text-underline-offset: var(--ams-pagination-button-text-underline-offset);
|
|
46
46
|
touch-action: manipulation;
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
color: var(--ams-pagination-button-hover-color);
|
|
50
|
-
text-decoration-line: var(--ams-pagination-button-hover-text-decoration-line);
|
|
51
|
-
}
|
|
48
|
+
@include text-rendering;
|
|
52
49
|
|
|
53
50
|
&:disabled {
|
|
54
51
|
display: none;
|
|
55
52
|
}
|
|
56
53
|
|
|
54
|
+
&:hover {
|
|
55
|
+
color: var(--ams-pagination-button-hover-color);
|
|
56
|
+
text-decoration-line: var(--ams-pagination-button-hover-text-decoration-line);
|
|
57
|
+
}
|
|
58
|
+
|
|
57
59
|
// Override for icon size
|
|
58
60
|
span.ams-icon svg {
|
|
59
61
|
block-size: 1rem;
|
|
60
62
|
inline-size: 1rem;
|
|
61
63
|
}
|
|
62
|
-
|
|
63
|
-
@include text-rendering;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.ams-pagination__button--current {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Password Input
|
|
4
|
+
|
|
5
|
+
Helps users enter a password.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
- Use this component when the input requires sensitive information, like passwords or PINs.
|
|
10
|
+
It ensures that the input is not readable by others who might be looking at the screen.
|
|
11
|
+
- The characters entered are hidden, represented by squares.
|
|
12
|
+
|
|
13
|
+
This component sets `autocorrect="off"` and `spellcheck="false"` to stop browsers automatically changing user input.
|
|
14
|
+
Passwords shouldn’t be checked for spelling or grammar.
|
|
15
|
+
This may also prevent posting the password to third-party plugins.
|
|
16
|
+
These props cannot be overridden.
|
|
17
|
+
|
|
18
|
+
Consider setting the following attributes:
|
|
19
|
+
|
|
20
|
+
1. Allow the user’s password manager to automatically fill the password through `autocomplete="current-password"`.
|
|
21
|
+
When asking for a new password, use `autocomplete="new-password"` instead.
|
|
22
|
+
2. Do not add a `minlength` attribute to ensure passwords meet a minimum length requirement.
|
|
23
|
+
This would prematurely indicate an error to the user – while they are still typing.
|
|
24
|
+
3. Do not add a `maxlength` attribute either.
|
|
25
|
+
Users will not get any feedback when their text input has been truncated, e.g. after pasting from a password manager.
|
|
26
|
+
4. If the password is a numeric PIN, add `inputmode="numeric"`.
|
|
27
|
+
Devices with virtual keyboards then switch to a numeric keypad layout which makes entering the password easier.
|
|
28
|
+
|
|
29
|
+
Follow the [guidelines for asking for passwords](https://design-system.service.gov.uk/patterns/passwords/) of the GOV.UK Design System.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset {
|
|
9
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
11
|
+
border: 0;
|
|
12
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
margin-block: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ams-password-input {
|
|
18
|
+
background-color: var(--ams-password-input-background-color);
|
|
19
|
+
box-shadow: var(--ams-password-input-box-shadow);
|
|
20
|
+
color: var(--ams-password-input-color);
|
|
21
|
+
font-family: var(--ams-password-input-font-family);
|
|
22
|
+
font-size: var(--ams-password-input-font-size);
|
|
23
|
+
font-weight: var(--ams-password-input-font-weight);
|
|
24
|
+
inline-size: 100%;
|
|
25
|
+
line-height: var(--ams-password-input-line-height);
|
|
26
|
+
outline-offset: var(--ams-password-input-outline-offset);
|
|
27
|
+
padding-block: var(--ams-password-input-padding-block);
|
|
28
|
+
padding-inline: var(--ams-password-input-padding-inline);
|
|
29
|
+
touch-action: manipulation;
|
|
30
|
+
|
|
31
|
+
@include text-rendering;
|
|
32
|
+
@include reset;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
box-shadow: var(--ams-password-input-hover-box-shadow);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ams-password-input::placeholder {
|
|
40
|
+
color: var(--ams-password-input-placeholder-color);
|
|
41
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ams-password-input:disabled {
|
|
45
|
+
background-color: var(--ams-password-input-disabled-background-color);
|
|
46
|
+
box-shadow: var(--ams-password-input-disabled-box-shadow);
|
|
47
|
+
color: var(--ams-password-input-disabled-color);
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ams-password-input:invalid,
|
|
52
|
+
.ams-password-input[aria-invalid="true"] {
|
|
53
|
+
box-shadow: var(--ams-password-input-invalid-box-shadow);
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
// TODO: this should be the (currently non-existent) dark red hover color
|
|
57
|
+
box-shadow: var(--ams-password-input-invalid-hover-box-shadow);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -6,9 +6,9 @@ Allows users to select one option from a list.
|
|
|
6
6
|
|
|
7
7
|
## Guidelines
|
|
8
8
|
|
|
9
|
-
- Do not assume that users will know how many options they can select based on the visual difference between
|
|
9
|
+
- Do not assume that users will know how many options they can select based on the visual difference between Radios and Checkboxes alone.
|
|
10
10
|
If needed, add a hint explaining this, for example, ‘Select one option’.
|
|
11
|
-
- Order
|
|
11
|
+
- Order Radios alphabetically by default.
|
|
12
12
|
In some cases, it can be helpful to order them from most-to-least common options.
|
|
13
13
|
For example, you could order options for ‘Where do you live?’ based on population size.
|
|
14
14
|
However you should do this with extreme caution as it can reinforce bias.
|