@amsterdam/design-system-css 0.7.1 → 0.9.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 +64 -0
- package/README.md +21 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/badge/badge.css +1 -1
- package/dist/badge/badge.css.map +1 -1
- 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/card/card.css +1 -1
- package/dist/card/card.css.map +1 -1
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/date-input/date-input.css +1 -0
- package/dist/date-input/date-input.css.map +1 -0
- package/dist/description-list/description-list.css +1 -0
- package/dist/description-list/description-list.css.map +1 -0
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/document/document.css +1 -0
- package/dist/document/document.css.map +1 -0
- package/dist/error-message/error-message.css +1 -0
- package/dist/error-message/error-message.css.map +1 -0
- package/dist/field/field.css +1 -0
- package/dist/field/field.css.map +1 -0
- package/dist/field-set/field-set.css +1 -0
- package/dist/field-set/field-set.css.map +1 -0
- package/dist/file-input/file-input.css +1 -0
- package/dist/file-input/file-input.css.map +1 -0
- package/dist/form-field-character-counter/form-field-character-counter.css +1 -1
- package/dist/form-field-character-counter/form-field-character-counter.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/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/label/label.css +1 -0
- package/dist/label/label.css.map +1 -0
- 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/logo/logo.css +1 -1
- package/dist/logo/logo.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/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/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 +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/select/select.css +1 -0
- package/dist/select/select.css.map +1 -0
- package/dist/switch/switch.css +1 -1
- package/dist/switch/switch.css.map +1 -1
- package/dist/table/table.css +1 -1
- package/dist/table/table.css.map +1 -1
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/text-area/text-area.css +1 -1
- package/dist/text-area/text-area.css.map +1 -1
- package/dist/text-input/text-input.css +1 -1
- package/dist/text-input/text-input.css.map +1 -1
- package/dist/time-input/time-input.css +1 -0
- package/dist/time-input/time-input.css.map +1 -0
- 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/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +16 -4
- package/package.json +5 -5
- package/src/common/hide-input.scss +1 -1
- package/src/common/text-rendering.scss +15 -0
- package/src/components/accordion/accordion.scss +23 -15
- package/src/components/avatar/avatar.scss +2 -2
- package/src/components/badge/badge.scss +35 -5
- package/src/components/blockquote/blockquote.scss +2 -1
- package/src/components/breadcrumb/breadcrumb.scss +12 -10
- package/src/components/button/button.scss +8 -5
- package/src/components/card/card.scss +1 -1
- package/src/components/checkbox/checkbox.scss +12 -15
- package/src/components/date-input/README.md +11 -0
- package/src/components/date-input/date-input.scss +77 -0
- package/src/components/description-list/README.md +18 -0
- package/src/components/description-list/description-list.scss +55 -0
- package/src/components/dialog/README.md +7 -0
- package/src/components/dialog/dialog.scss +7 -7
- package/src/components/document/document.scss +14 -0
- package/src/components/error-message/README.md +11 -0
- package/src/components/error-message/error-message.scss +22 -0
- package/src/components/field/README.md +9 -0
- package/src/components/field/field.scss +16 -0
- package/src/components/field-set/README.md +17 -0
- package/src/components/field-set/field-set.scss +48 -0
- package/src/components/file-input/README.md +9 -0
- package/src/components/file-input/file-input.scss +69 -0
- package/src/components/form-field-character-counter/form-field-character-counter.scss +2 -4
- package/src/components/header/header.scss +5 -5
- package/src/components/heading/heading.scss +2 -1
- package/src/components/icon/icon.scss +12 -12
- package/src/components/image/image.scss +3 -3
- package/src/components/index.scss +10 -2
- package/src/components/{form-label → label}/README.md +1 -1
- package/src/components/label/label.scss +18 -0
- package/src/components/link/link.scss +2 -4
- package/src/components/link-list/link-list.scss +6 -5
- package/src/components/logo/logo.scss +1 -1
- package/src/components/ordered-list/ordered-list.scss +10 -3
- package/src/components/page-heading/page-heading.scss +2 -1
- package/src/components/page-menu/page-menu.scss +8 -1
- package/src/components/pagination/README.md +1 -0
- package/src/components/pagination/pagination.scss +10 -7
- package/src/components/paragraph/paragraph.scss +5 -3
- package/src/components/radio/radio.scss +9 -12
- package/src/components/screen/screen.scss +8 -3
- package/src/components/search-field/search-field.scss +34 -8
- package/src/components/select/README.md +9 -0
- package/src/components/select/select.scss +62 -0
- package/src/components/switch/switch.scss +12 -9
- package/src/components/table/table.scss +1 -1
- package/src/components/tabs/tabs.scss +9 -3
- package/src/components/text-area/text-area.scss +13 -6
- package/src/components/text-input/text-input.scss +10 -3
- package/src/components/time-input/README.md +11 -0
- package/src/components/time-input/time-input.scss +78 -0
- package/src/components/top-task-link/top-task-link.scss +2 -1
- package/src/components/unordered-list/unordered-list.scss +10 -3
- package/src/components/visually-hidden/visually-hidden.scss +2 -2
- package/dist/fieldset/fieldset.css +0 -1
- package/dist/fieldset/fieldset.css.map +0 -1
- package/dist/form-label/form-label.css +0 -1
- package/dist/form-label/form-label.css.map +0 -1
- package/src/components/fieldset/README.md +0 -18
- package/src/components/fieldset/fieldset.scss +0 -34
- package/src/components/form-label/form-label.scss +0 -21
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
7
8
|
|
|
8
9
|
@mixin reset {
|
|
9
10
|
box-sizing: border-box;
|
|
10
11
|
margin-block: 0;
|
|
11
|
-
-webkit-text-size-adjust: 100%;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.ams-page-heading {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
line-height: var(--ams-page-heading-line-height);
|
|
22
22
|
|
|
23
23
|
@include hyphenation;
|
|
24
|
+
@include text-rendering;
|
|
24
25
|
@include reset;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
8
|
@mixin reset-list {
|
|
7
9
|
box-sizing: border-box;
|
|
8
10
|
margin-block: 0;
|
|
@@ -11,7 +13,6 @@
|
|
|
11
13
|
|
|
12
14
|
@mixin reset-item {
|
|
13
15
|
box-sizing: border-box;
|
|
14
|
-
-webkit-text-size-adjust: 100%;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.ams-page-menu {
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
column-gap: var(--ams-page-menu-column-gap);
|
|
20
21
|
display: flex;
|
|
21
22
|
flex-direction: row;
|
|
23
|
+
flex-wrap: wrap;
|
|
22
24
|
list-style: none;
|
|
23
25
|
row-gap: var(--ams-page-menu-row-gap);
|
|
24
26
|
|
|
@@ -29,6 +31,10 @@
|
|
|
29
31
|
justify-content: end;
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
.ams-page-menu--no-wrap {
|
|
35
|
+
flex-wrap: nowrap;
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
@mixin page-menu-item {
|
|
33
39
|
color: var(--ams-page-menu-item-color);
|
|
34
40
|
display: inline-flex;
|
|
@@ -49,6 +55,7 @@
|
|
|
49
55
|
|
|
50
56
|
.ams-page-menu__link {
|
|
51
57
|
@include page-menu-item;
|
|
58
|
+
@include text-rendering;
|
|
52
59
|
@include reset-item;
|
|
53
60
|
}
|
|
54
61
|
|
|
@@ -15,6 +15,7 @@ Pagination indicates the current page and allows users to navigate to other page
|
|
|
15
15
|
- Redirect users to the first page if they enter a URL with a page number that doesn’t exist.
|
|
16
16
|
- Pagination can be combined with a counter at the top of the page indicating “Page # of ##.”
|
|
17
17
|
- Start a page with an overview list at the top after changing the page.
|
|
18
|
+
- Make sure that the visible and accessible labels for the ‘previous’ and ‘next’ buttons convey the same meaning at all times – e.g. don’t update one and forget the other.
|
|
18
19
|
|
|
19
20
|
## Relevant WCAG Rules
|
|
20
21
|
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset-list {
|
|
7
9
|
list-style-type: none;
|
|
8
10
|
margin-block: 0;
|
|
9
11
|
padding-inline-start: 0;
|
|
@@ -19,20 +21,19 @@
|
|
|
19
21
|
justify-content: center;
|
|
20
22
|
line-height: var(--ams-pagination-line-height);
|
|
21
23
|
|
|
22
|
-
@include list
|
|
24
|
+
@include reset-list;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
@mixin button
|
|
27
|
+
@mixin reset-button {
|
|
26
28
|
all: unset;
|
|
27
29
|
box-sizing: border-box;
|
|
28
30
|
outline: revert;
|
|
29
|
-
-webkit-text-size-adjust: 100%;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.ams-pagination__button {
|
|
33
34
|
/* The reset is included at the top of the block here, if you set it
|
|
34
35
|
at the bottom `all: unset` overrides the `gap` property. */
|
|
35
|
-
@include button
|
|
36
|
+
@include reset-button;
|
|
36
37
|
|
|
37
38
|
cursor: pointer;
|
|
38
39
|
display: flex;
|
|
@@ -55,9 +56,11 @@
|
|
|
55
56
|
|
|
56
57
|
// Override for icon size
|
|
57
58
|
span.ams-icon svg {
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
block-size: 1rem;
|
|
60
|
+
inline-size: 1rem;
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
@include text-rendering;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
.ams-pagination__button--current {
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
8
|
@mixin reset {
|
|
7
9
|
box-sizing: border-box;
|
|
8
10
|
margin-block: 0;
|
|
9
|
-
-webkit-text-size-adjust: 100%;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.ams-paragraph {
|
|
13
14
|
color: var(--ams-paragraph-color);
|
|
14
15
|
font-family: var(--ams-paragraph-font-family);
|
|
15
|
-
font-size: var(--ams-paragraph-
|
|
16
|
+
font-size: var(--ams-paragraph-font-size);
|
|
16
17
|
font-weight: var(--ams-paragraph-font-weight);
|
|
17
|
-
line-height: var(--ams-paragraph-
|
|
18
|
+
line-height: var(--ams-paragraph-line-height);
|
|
18
19
|
|
|
20
|
+
@include text-rendering;
|
|
19
21
|
@include reset;
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
@import "../../common/input-label-focus";
|
|
7
7
|
@import "../../common/hide-input";
|
|
8
|
+
@import "../../common/text-rendering";
|
|
8
9
|
|
|
9
10
|
.ams-radio__input {
|
|
10
11
|
@include hide-input;
|
|
@@ -13,30 +14,26 @@
|
|
|
13
14
|
|
|
14
15
|
.ams-radio__circle {
|
|
15
16
|
align-items: center;
|
|
17
|
+
block-size: calc(var(--ams-radio-font-size) * var(--ams-radio-line-height));
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-shrink: 0;
|
|
18
|
-
|
|
19
|
-
width: 1.5rem;
|
|
20
|
+
inline-size: 1.5rem;
|
|
20
21
|
|
|
21
22
|
&::after {
|
|
22
23
|
background-position: center;
|
|
23
24
|
background-repeat: no-repeat;
|
|
24
25
|
background-size: 1rem;
|
|
26
|
+
block-size: 1.5rem;
|
|
25
27
|
border-color: var(--ams-radio-circle-border-color);
|
|
26
28
|
border-radius: 100%;
|
|
27
29
|
border-style: solid;
|
|
28
|
-
border-width:
|
|
30
|
+
border-width: var(--ams-radio-circle-border-width);
|
|
29
31
|
box-sizing: border-box;
|
|
30
32
|
content: "";
|
|
31
|
-
|
|
32
|
-
width: 100%;
|
|
33
|
+
inline-size: 100%;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
@mixin reset {
|
|
37
|
-
-webkit-text-size-adjust: 100%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
37
|
.ams-radio__label {
|
|
41
38
|
color: var(--ams-radio-color);
|
|
42
39
|
cursor: pointer;
|
|
@@ -51,7 +48,7 @@
|
|
|
51
48
|
&:hover {
|
|
52
49
|
color: var(--ams-radio-hover-color);
|
|
53
50
|
text-decoration-line: underline;
|
|
54
|
-
text-decoration-thickness:
|
|
51
|
+
text-decoration-thickness: var(--ams-radio-hover-text-decoration-thickness);
|
|
55
52
|
text-underline-offset: 0.375rem;
|
|
56
53
|
|
|
57
54
|
.ams-radio__circle::after {
|
|
@@ -59,7 +56,7 @@
|
|
|
59
56
|
}
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
@include
|
|
59
|
+
@include text-rendering;
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
// Default checked
|
|
@@ -84,7 +81,7 @@
|
|
|
84
81
|
|
|
85
82
|
.ams-radio__circle::after {
|
|
86
83
|
border-color: var(--ams-radio-circle-disabled-border-color);
|
|
87
|
-
border-width:
|
|
84
|
+
border-width: var(--ams-radio-circle-disabled-border-width);
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
}
|
|
@@ -8,15 +8,20 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.ams-screen {
|
|
11
|
+
background-color: var(--ams-screen-background-color);
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
|
|
11
14
|
@include reset;
|
|
15
|
+
}
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
.ams-screen--full-height {
|
|
18
|
+
min-block-size: 100vh;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
.ams-screen--wide {
|
|
17
|
-
max-
|
|
22
|
+
max-inline-size: var(--ams-screen-wide-max-inline-size);
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
.ams-screen--x-wide {
|
|
21
|
-
max-
|
|
26
|
+
max-inline-size: var(--ams-screen-x-wide-max-inline-size);
|
|
22
27
|
}
|
|
@@ -3,32 +3,38 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
8
|
.ams-search-field {
|
|
7
9
|
display: flex;
|
|
8
10
|
isolation: isolate; // create new stacking context, so the input’s z-index doesn’t escape the component
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
@mixin reset {
|
|
13
|
+
@mixin reset-input {
|
|
14
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
15
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
12
18
|
box-sizing: border-box;
|
|
13
19
|
margin-block: 0;
|
|
14
|
-
-webkit-text-size-adjust: 100%;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
.ams-search-field__input {
|
|
18
|
-
|
|
23
|
+
background-color: var(--ams-search-field-input-background-color);
|
|
19
24
|
box-shadow: var(--ams-search-field-input-box-shadow);
|
|
20
25
|
color: var(--ams-search-field-input-color);
|
|
21
26
|
font-family: var(--ams-search-field-input-font-family);
|
|
22
27
|
font-size: var(--ams-search-field-input-font-size);
|
|
23
28
|
font-weight: var(--ams-search-field-input-font-weight);
|
|
29
|
+
inline-size: 100%;
|
|
24
30
|
line-height: var(--ams-search-field-input-line-height);
|
|
25
31
|
outline-offset: var(--ams-search-field-input-outline-offset);
|
|
26
32
|
padding-block: var(--ams-search-field-input-padding-block);
|
|
27
33
|
padding-inline: var(--ams-search-field-input-padding-inline);
|
|
28
34
|
touch-action: manipulation;
|
|
29
|
-
width: 100%;
|
|
30
35
|
|
|
31
|
-
@include
|
|
36
|
+
@include text-rendering;
|
|
37
|
+
@include reset-input;
|
|
32
38
|
|
|
33
39
|
&:hover {
|
|
34
40
|
box-shadow: var(--ams-search-field-input-hover-box-shadow);
|
|
@@ -39,22 +45,40 @@
|
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
.ams-search-field__input:invalid,
|
|
49
|
+
.ams-search-field__input[aria-invalid="true"] {
|
|
50
|
+
box-shadow: var(--ams-search-field-input-invalid-box-shadow);
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
// TODO: this should be the (currently non-existent) dark red hover color
|
|
54
|
+
box-shadow: var(--ams-search-field-input-invalid-hover-box-shadow);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
42
58
|
.ams-search-field__input::placeholder {
|
|
43
59
|
color: var(--ams-search-field-input-placeholder-color);
|
|
60
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
44
61
|
}
|
|
45
62
|
|
|
46
63
|
.ams-search-field__input::-webkit-search-cancel-button {
|
|
47
64
|
appearance: none;
|
|
48
65
|
background-image: var(--ams-search-field-input-cancel-button-background-image);
|
|
66
|
+
block-size: var(--ams-search-field-input-cancel-button-block-size);
|
|
49
67
|
cursor: pointer;
|
|
50
|
-
|
|
68
|
+
inline-size: var(--ams-search-field-input-cancel-button-inline-size);
|
|
51
69
|
margin-inline-start: 0.5rem;
|
|
52
|
-
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@mixin reset-button {
|
|
73
|
+
border: 0;
|
|
74
|
+
|
|
75
|
+
// Reset margins added by Safari on iOS
|
|
76
|
+
margin-block: 0;
|
|
77
|
+
margin-inline: 0;
|
|
53
78
|
}
|
|
54
79
|
|
|
55
80
|
.ams-search-field__button {
|
|
56
81
|
background-color: var(--ams-search-field-button-background-color);
|
|
57
|
-
border: 0;
|
|
58
82
|
color: var(--ams-search-field-button-color);
|
|
59
83
|
cursor: pointer;
|
|
60
84
|
outline-offset: var(--ams-search-field-button-outline-offset);
|
|
@@ -64,6 +88,8 @@
|
|
|
64
88
|
padding-inline: var(--ams-search-field-button-padding-inline);
|
|
65
89
|
touch-action: manipulation;
|
|
66
90
|
|
|
91
|
+
@include reset-button;
|
|
92
|
+
|
|
67
93
|
&:hover {
|
|
68
94
|
background-color: var(--ams-search-field-button-hover-background-color);
|
|
69
95
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset {
|
|
7
|
+
appearance: none; // Reset native appearance to hide default chevron
|
|
8
|
+
border: 0;
|
|
9
|
+
border-radius: 0; // Reset rounded borders for Safari on MacOS
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ams-select {
|
|
13
|
+
background-color: var(--ams-select-background-color);
|
|
14
|
+
box-shadow: var(--ams-select-box-shadow);
|
|
15
|
+
color: var(--ams-select-color);
|
|
16
|
+
font-family: var(--ams-select-font-family);
|
|
17
|
+
font-size: var(--ams-select-font-size);
|
|
18
|
+
font-weight: var(--ams-select-font-weight);
|
|
19
|
+
inline-size: 100%;
|
|
20
|
+
line-height: var(--ams-select-line-height);
|
|
21
|
+
outline-offset: var(--ams-select-outline-offset);
|
|
22
|
+
padding-block: var(--ams-select-padding-block);
|
|
23
|
+
padding-inline: var(--ams-select-padding-inline);
|
|
24
|
+
touch-action: manipulation;
|
|
25
|
+
|
|
26
|
+
&:not([multiple]) {
|
|
27
|
+
background-image: var(--ams-select-background-image);
|
|
28
|
+
background-position: var(--ams-select-background-position);
|
|
29
|
+
background-repeat: no-repeat;
|
|
30
|
+
background-size: 1em 1em;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
box-shadow: var(--ams-select-hover-box-shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include reset;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ams-select:invalid,
|
|
41
|
+
.ams-select[aria-invalid="true"] {
|
|
42
|
+
box-shadow: var(--ams-select-invalid-box-shadow);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ams-select:disabled {
|
|
46
|
+
box-shadow: var(--ams-select-disabled-box-shadow);
|
|
47
|
+
color: var(--ams-select-disabled-color);
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
|
|
50
|
+
&:not([multiple]) {
|
|
51
|
+
background-image: var(--ams-select-disabled-background-image);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ams-select:invalid:hover,
|
|
56
|
+
.ams-select[aria-invalid="true"]:hover {
|
|
57
|
+
box-shadow: var(--ams-select-invalid-hover-box-shadow);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ams-select__option:disabled {
|
|
61
|
+
color: var(--ams-select-option-disabled-color);
|
|
62
|
+
}
|
|
@@ -16,29 +16,31 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.ams-switch__label {
|
|
19
|
+
--ams-switch-track-padding: 0.0625rem;
|
|
20
|
+
|
|
19
21
|
background-color: var(--ams-switch-background-color);
|
|
20
|
-
border-radius: calc(var(--ams-switch-thumb-
|
|
22
|
+
border-radius: calc(var(--ams-switch-thumb-inline-size) * 2);
|
|
21
23
|
cursor: pointer;
|
|
22
24
|
display: inline-block;
|
|
25
|
+
inline-size: var(--ams-switch-inline-size);
|
|
23
26
|
outline-offset: var(--ams-switch-outline-offset);
|
|
24
|
-
padding-block:
|
|
25
|
-
padding-inline:
|
|
27
|
+
padding-block: var(--ams-switch-track-padding);
|
|
28
|
+
padding-inline: var(--ams-switch-track-padding);
|
|
26
29
|
transition: background-color 0.2s ease-in-out;
|
|
27
|
-
width: var(--ams-switch-width);
|
|
28
30
|
|
|
29
31
|
@include reset;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.ams-switch__label::before {
|
|
33
35
|
background-color: var(--ams-switch-thumb-background-color);
|
|
36
|
+
block-size: var(--ams-switch-thumb-block-size);
|
|
34
37
|
border-radius: 50%;
|
|
35
38
|
content: "";
|
|
36
39
|
display: block;
|
|
37
|
-
|
|
40
|
+
inline-size: var(--ams-switch-thumb-inline-size);
|
|
38
41
|
transition-duration: 0.1s;
|
|
39
42
|
transition-property: box-shadow, transform;
|
|
40
43
|
transition-timing-function: ease-in-out;
|
|
41
|
-
width: var(--ams-switch-thumb-width);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.ams-switch__input:checked + .ams-switch__label {
|
|
@@ -51,10 +53,11 @@
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.ams-switch__input:checked + .ams-switch__label::before {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
transform: translate(
|
|
57
|
+
calc(var(--ams-switch-inline-size) - var(--ams-switch-thumb-inline-size) - 2 * var(--ams-switch-track-padding))
|
|
58
|
+
);
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.ams-switch:hover .ams-switch__input:enabled + .ams-switch__label::before {
|
|
59
|
-
box-shadow:
|
|
62
|
+
box-shadow: var(--ams-switch-thumb-hover-box-shadow);
|
|
60
63
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
.ams-table__cell,
|
|
26
26
|
.ams-table__header-cell {
|
|
27
|
-
border-
|
|
27
|
+
border-block-end: var(--ams-table-cell-border-block-end);
|
|
28
28
|
padding-block: var(--ams-table-cell-padding-block);
|
|
29
29
|
padding-inline: var(--ams-table-cell-padding-inline);
|
|
30
30
|
text-align: start;
|
|
@@ -5,15 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
@import "../../common/breakpoint";
|
|
7
7
|
|
|
8
|
+
@mixin reset-button {
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
border: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
.ams-tabs__list {
|
|
9
|
-
|
|
14
|
+
background-color: var(--ams-tabs-list-background-color);
|
|
15
|
+
border-block-end: var(--ams-tabs-list-border-block-end);
|
|
10
16
|
display: flex;
|
|
11
17
|
overflow-x: auto;
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
.ams-tabs__button {
|
|
15
|
-
background-color: var(--ams-tabs-button-background-color);
|
|
16
|
-
border: var(--ams-tabs-button-border);
|
|
17
21
|
color: var(--ams-tabs-button-color);
|
|
18
22
|
cursor: var(--ams-tabs-button-cursor);
|
|
19
23
|
font-family: var(--ams-tabs-button-font-family);
|
|
@@ -24,6 +28,8 @@
|
|
|
24
28
|
padding-block: var(--ams-tabs-button-padding-block);
|
|
25
29
|
padding-inline: var(--ams-tabs-button-padding-inline);
|
|
26
30
|
|
|
31
|
+
@include reset-button;
|
|
32
|
+
|
|
27
33
|
&:disabled {
|
|
28
34
|
color: var(--ams-tabs-button-disabled-color);
|
|
29
35
|
cursor: var(--ams-tab-button-disabled-cursor);
|
|
@@ -3,28 +3,34 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
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
|
|
7
13
|
box-sizing: border-box;
|
|
8
14
|
margin-block: 0;
|
|
9
|
-
-webkit-text-size-adjust: 100%;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
.ams-text-area {
|
|
13
|
-
|
|
18
|
+
background-color: var(--ams-text-area-background-color);
|
|
14
19
|
box-shadow: var(--ams-text-area-box-shadow);
|
|
15
20
|
color: var(--ams-text-area-color);
|
|
16
21
|
font-family: var(--ams-text-area-font-family);
|
|
17
22
|
font-size: var(--ams-text-area-font-size);
|
|
18
23
|
font-weight: var(--ams-text-area-font-weight);
|
|
24
|
+
inline-size: 100%;
|
|
19
25
|
line-height: var(--ams-text-area-line-height);
|
|
20
|
-
max-
|
|
21
|
-
min-
|
|
26
|
+
max-inline-size: 100%; // This prevents overflow when using the `cols` prop
|
|
27
|
+
min-block-size: var(--ams-text-area-min-block-size);
|
|
22
28
|
outline-offset: var(--ams-text-area-outline-offset);
|
|
23
29
|
padding-block: var(--ams-text-area-padding-block);
|
|
24
30
|
padding-inline: var(--ams-text-area-padding-inline);
|
|
25
31
|
touch-action: manipulation;
|
|
26
|
-
width: 100%;
|
|
27
32
|
|
|
33
|
+
@include text-rendering;
|
|
28
34
|
@include reset;
|
|
29
35
|
|
|
30
36
|
&:hover {
|
|
@@ -34,6 +40,7 @@
|
|
|
34
40
|
|
|
35
41
|
.ams-text-area::placeholder {
|
|
36
42
|
color: var(--ams-text-area-placeholder-color);
|
|
43
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
.ams-text-area:disabled {
|
|
@@ -66,5 +73,5 @@
|
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
.ams-text-area--cols {
|
|
69
|
-
|
|
76
|
+
inline-size: auto;
|
|
70
77
|
}
|
|
@@ -3,26 +3,32 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
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
|
|
7
13
|
box-sizing: border-box;
|
|
8
14
|
margin-block: 0;
|
|
9
|
-
-webkit-text-size-adjust: 100%;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
.ams-text-input {
|
|
13
|
-
|
|
18
|
+
background-color: var(--ams-text-input-background-color);
|
|
14
19
|
box-shadow: var(--ams-text-input-box-shadow);
|
|
15
20
|
color: var(--ams-text-input-color);
|
|
16
21
|
font-family: var(--ams-text-input-font-family);
|
|
17
22
|
font-size: var(--ams-text-input-font-size);
|
|
18
23
|
font-weight: var(--ams-text-input-font-weight);
|
|
24
|
+
inline-size: 100%;
|
|
19
25
|
line-height: var(--ams-text-input-line-height);
|
|
20
26
|
outline-offset: var(--ams-text-input-outline-offset);
|
|
21
27
|
padding-block: var(--ams-text-input-padding-block);
|
|
22
28
|
padding-inline: var(--ams-text-input-padding-inline);
|
|
23
29
|
touch-action: manipulation;
|
|
24
|
-
width: 100%;
|
|
25
30
|
|
|
31
|
+
@include text-rendering;
|
|
26
32
|
@include reset;
|
|
27
33
|
|
|
28
34
|
&:hover {
|
|
@@ -32,6 +38,7 @@
|
|
|
32
38
|
|
|
33
39
|
.ams-text-input::placeholder {
|
|
34
40
|
color: var(--ams-text-input-placeholder-color);
|
|
41
|
+
opacity: 100%; // This resets the lower opacity set by Firefox
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
.ams-text-input:disabled {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Time Input
|
|
4
|
+
|
|
5
|
+
Helps users enter time.
|
|
6
|
+
|
|
7
|
+
## Visual considerations
|
|
8
|
+
|
|
9
|
+
This component uses a native time input, which is styled differently in different browsers and operating systems.
|
|
10
|
+
Recreating the native functionality is quite difficult and prone to accessibility errors, which is why we’ve chosen not to do that.
|
|
11
|
+
This does mean that this component does not look identical on all browsers and operating systems.
|