@amsterdam/design-system-css 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +2 -2
- 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/aspect-ratio/aspect-ratio.css +1 -1
- package/dist/aspect-ratio/aspect-ratio.css.map +1 -1
- package/dist/avatar/avatar.css +1 -0
- package/dist/avatar/avatar.css.map +1 -0
- 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/column/column.css +1 -1
- package/dist/column/column.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/fieldset/fieldset.css +1 -1
- package/dist/fieldset/fieldset.css.map +1 -1
- package/dist/form-field-character-counter/form-field-character-counter.css +1 -0
- package/dist/form-field-character-counter/form-field-character-counter.css.map +1 -0
- package/dist/form-label/form-label.css +1 -1
- package/dist/form-label/form-label.css.map +1 -1
- package/dist/gap/gap.css +1 -1
- package/dist/gap/gap.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 -1
- package/dist/icon-button/icon-button.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/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/margin/margin.css +1 -1
- package/dist/margin/margin.css.map +1 -1
- package/dist/mark/mark.css +1 -1
- package/dist/mark/mark.css.map +1 -1
- package/dist/mega-menu/mega-menu.css +1 -1
- package/dist/mega-menu/mega-menu.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/overlap/overlap.css +1 -1
- package/dist/overlap/overlap.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/row/row.css +1 -1
- package/dist/row/row.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/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/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/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 +2 -2
- package/package.json +3 -3
- package/src/common/breakpoint.scss +2 -2
- package/src/common/hyphenation.scss +3 -3
- package/src/common/size.scss +1 -1
- package/src/components/accordion/accordion.scss +16 -16
- package/src/components/alert/alert.scss +15 -15
- package/src/components/aspect-ratio/aspect-ratio.scss +13 -13
- package/src/components/avatar/README.md +15 -0
- package/src/components/avatar/avatar.scss +74 -0
- package/src/components/badge/badge.scss +30 -30
- package/src/components/blockquote/blockquote.scss +8 -8
- package/src/components/breadcrumb/breadcrumb.scss +17 -17
- package/src/components/button/button.scss +37 -37
- package/src/components/card/card.scss +10 -10
- package/src/components/checkbox/checkbox.scss +80 -82
- package/src/components/column/column.scss +4 -4
- package/src/components/dialog/dialog.scss +16 -32
- package/src/components/fieldset/fieldset.scss +7 -7
- package/src/components/form-field-character-counter/README.md +19 -0
- package/src/components/form-field-character-counter/form-field-character-counter.scss +22 -0
- package/src/components/form-label/form-label.scss +6 -6
- package/src/components/gap/gap.scss +4 -4
- package/src/components/grid/grid.scss +41 -41
- package/src/components/header/header.scss +21 -21
- package/src/components/heading/heading.scss +24 -24
- package/src/components/icon/icon.scss +23 -23
- package/src/components/icon-button/icon-button.scss +18 -18
- package/src/components/image/image.scss +1 -1
- package/src/components/index.scss +2 -0
- package/src/components/link/link.scss +32 -32
- package/src/components/link-list/link-list.scss +27 -27
- package/src/components/logo/logo.scss +8 -8
- package/src/components/margin/margin.scss +3 -3
- package/src/components/mark/mark.scss +2 -2
- package/src/components/mega-menu/mega-menu.scss +5 -5
- package/src/components/ordered-list/ordered-list.scss +19 -19
- package/src/components/overlap/overlap.scss +1 -1
- package/src/components/page-heading/page-heading.scss +8 -8
- package/src/components/page-menu/page-menu.scss +20 -20
- package/src/components/pagination/pagination.scss +17 -17
- package/src/components/paragraph/paragraph.scss +14 -14
- package/src/components/radio/radio.scss +48 -48
- package/src/components/row/row.scss +4 -4
- package/src/components/screen/screen.scss +5 -5
- package/src/components/search-field/search-field.scss +25 -25
- package/src/components/skip-link/skip-link.scss +11 -11
- package/src/components/spotlight/spotlight.scss +16 -16
- package/src/components/switch/switch.scss +18 -18
- package/src/components/table/table.scss +16 -16
- package/src/components/tabs/tabs.scss +20 -20
- package/src/components/text-area/text-area.scss +27 -27
- package/src/components/text-input/text-input.scss +21 -21
- package/src/components/top-task-link/top-task-link.scss +20 -20
- package/src/components/unordered-list/unordered-list.scss +19 -19
- package/src/components/visually-hidden/visually-hidden.scss +1 -1
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
-webkit-text-size-adjust: 100%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
14
|
-
font-family: var(--
|
|
15
|
-
font-size: var(--
|
|
16
|
-
font-weight: var(--
|
|
17
|
-
line-height: var(--
|
|
13
|
+
.ams-breadcrumb {
|
|
14
|
+
font-family: var(--ams-breadcrumb-font-family, inherit);
|
|
15
|
+
font-size: var(--ams-breadcrumb-font-size);
|
|
16
|
+
font-weight: var(--ams-breadcrumb-font-weight);
|
|
17
|
+
line-height: var(--ams-breadcrumb-line-height);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.ams-breadcrumb__list {
|
|
21
21
|
break-after: avoid;
|
|
22
22
|
break-inside: avoid;
|
|
23
23
|
|
|
24
24
|
@include reset;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.ams-breadcrumb__item {
|
|
28
28
|
display: inline;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
32
|
-
background-image: var(--
|
|
31
|
+
.ams-breadcrumb__item:not(:last-child)::after {
|
|
32
|
+
background-image: var(--ams-breadcrumb-separator-background-image);
|
|
33
33
|
background-repeat: no-repeat;
|
|
34
34
|
content: "";
|
|
35
35
|
display: inline-block;
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
width: 1ex;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
42
|
-
color: var(--
|
|
43
|
-
outline-offset: var(--
|
|
44
|
-
text-decoration-line: var(--
|
|
45
|
-
text-decoration-thickness: var(--
|
|
46
|
-
text-underline-offset: var(--
|
|
41
|
+
.ams-breadcrumb__link {
|
|
42
|
+
color: var(--ams-breadcrumb-item-link-color);
|
|
43
|
+
outline-offset: var(--ams-breadcrumb-item-link-outline-offset);
|
|
44
|
+
text-decoration-line: var(--ams-breadcrumb-item-link-text-decoration-line);
|
|
45
|
+
text-decoration-thickness: var(--ams-breadcrumb-item-link-text-decoration-thickness);
|
|
46
|
+
text-underline-offset: var(--ams-breadcrumb-item-link-text-underline-offset);
|
|
47
47
|
|
|
48
48
|
&:hover {
|
|
49
|
-
color: var(--
|
|
50
|
-
text-decoration-line: var(--
|
|
49
|
+
color: var(--ams-breadcrumb-item-link-hover-color);
|
|
50
|
+
text-decoration-line: var(--ams-breadcrumb-item-link-hover-text-decoration-line);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -7,84 +7,84 @@
|
|
|
7
7
|
-webkit-text-size-adjust: 100%;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.ams-button {
|
|
11
11
|
border: none;
|
|
12
|
-
cursor: var(--
|
|
12
|
+
cursor: var(--ams-button-cursor);
|
|
13
13
|
display: inline-flex;
|
|
14
|
-
font-family: var(--
|
|
15
|
-
font-size: var(--
|
|
16
|
-
gap: var(--
|
|
17
|
-
line-height: var(--
|
|
18
|
-
outline-offset: var(--
|
|
19
|
-
padding-block: var(--
|
|
20
|
-
padding-inline: var(--
|
|
14
|
+
font-family: var(--ams-button-font-family);
|
|
15
|
+
font-size: var(--ams-button-font-size);
|
|
16
|
+
gap: var(--ams-button-gap);
|
|
17
|
+
line-height: var(--ams-button-line-height);
|
|
18
|
+
outline-offset: var(--ams-button-outline-offset);
|
|
19
|
+
padding-block: var(--ams-button-padding-block);
|
|
20
|
+
padding-inline: var(--ams-button-padding-inline);
|
|
21
21
|
touch-action: manipulation;
|
|
22
22
|
|
|
23
23
|
&:disabled,
|
|
24
24
|
&[aria-disabled="true"] {
|
|
25
|
-
cursor: var(--
|
|
25
|
+
cursor: var(--ams-button-disabled-cursor);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@include reset;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
@mixin
|
|
31
|
+
@mixin ams-button-forced-color-mode {
|
|
32
32
|
@media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
|
|
33
33
|
border: 2px solid ButtonBorder; // add border because forced colors changes box-shadow to none
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.
|
|
38
|
-
background-color: var(--
|
|
39
|
-
box-shadow: var(--
|
|
40
|
-
color: var(--
|
|
37
|
+
.ams-button--primary {
|
|
38
|
+
background-color: var(--ams-button-primary-background-color);
|
|
39
|
+
box-shadow: var(--ams-button-primary-box-shadow);
|
|
40
|
+
color: var(--ams-button-primary-color);
|
|
41
41
|
|
|
42
42
|
&:disabled,
|
|
43
43
|
[aria-disabled="true"] {
|
|
44
|
-
background-color: var(--
|
|
45
|
-
box-shadow: var(--
|
|
44
|
+
background-color: var(--ams-button-primary-disabled-background-color);
|
|
45
|
+
box-shadow: var(--ams-button-primary-disabled-box-shadow);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&:hover:not(:disabled, [aria-disabled="true"]) {
|
|
49
|
-
background-color: var(--
|
|
50
|
-
box-shadow: var(--
|
|
49
|
+
background-color: var(--ams-button-primary-hover-background-color);
|
|
50
|
+
box-shadow: var(--ams-button-primary-hover-box-shadow);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
@include
|
|
53
|
+
@include ams-button-forced-color-mode;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
57
|
-
background-color: var(--
|
|
58
|
-
box-shadow: var(--
|
|
59
|
-
color: var(--
|
|
56
|
+
.ams-button--secondary {
|
|
57
|
+
background-color: var(--ams-button-secondary-background-color);
|
|
58
|
+
box-shadow: var(--ams-button-secondary-box-shadow);
|
|
59
|
+
color: var(--ams-button-secondary-color);
|
|
60
60
|
|
|
61
61
|
&:disabled,
|
|
62
62
|
[aria-disabled="true"] {
|
|
63
|
-
background-color: var(--
|
|
64
|
-
box-shadow: var(--
|
|
65
|
-
color: var(--
|
|
63
|
+
background-color: var(--ams-button-secondary-disabled-background-color);
|
|
64
|
+
box-shadow: var(--ams-button-secondary-disabled-box-shadow);
|
|
65
|
+
color: var(--ams-button-secondary-disabled-color);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&:hover:not(:disabled, [aria-disabled="true"]) {
|
|
69
|
-
box-shadow: var(--
|
|
70
|
-
color: var(--
|
|
69
|
+
box-shadow: var(--ams-button-secondary-hover-box-shadow);
|
|
70
|
+
color: var(--ams-button-secondary-hover-color);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
@include
|
|
73
|
+
@include ams-button-forced-color-mode;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.
|
|
77
|
-
background-color: var(--
|
|
78
|
-
color: var(--
|
|
76
|
+
.ams-button--tertiary {
|
|
77
|
+
background-color: var(--ams-button-tertiary-background-color);
|
|
78
|
+
color: var(--ams-button-tertiary-color);
|
|
79
79
|
|
|
80
80
|
&:disabled,
|
|
81
81
|
[aria-disabled="true"] {
|
|
82
|
-
background-color: var(--
|
|
83
|
-
color: var(--
|
|
82
|
+
background-color: var(--ams-button-tertiary-disabled-background-color);
|
|
83
|
+
color: var(--ams-button-tertiary-disabled-color);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&:hover:not(:disabled, [aria-disabled="true"]) {
|
|
87
|
-
box-shadow: var(--
|
|
88
|
-
color: var(--
|
|
87
|
+
box-shadow: var(--ams-button-tertiary-hover-box-shadow);
|
|
88
|
+
color: var(--ams-button-tertiary-hover-color);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.ams-card {
|
|
7
7
|
display: grid;
|
|
8
8
|
gap: 0.5rem;
|
|
9
|
-
outline-offset: var(--
|
|
9
|
+
outline-offset: var(--ams-card-outline-offset);
|
|
10
10
|
position: relative;
|
|
11
11
|
touch-action: manipulation;
|
|
12
12
|
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.ams-card__heading-group {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column-reverse;
|
|
43
43
|
gap: 0.5rem;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
47
|
-
color: var(--
|
|
48
|
-
text-decoration-line: var(--
|
|
49
|
-
text-decoration-thickness: var(--
|
|
50
|
-
text-underline-offset: var(--
|
|
46
|
+
.ams-card__link {
|
|
47
|
+
color: var(--ams-card-link-color);
|
|
48
|
+
text-decoration-line: var(--ams-card-link-text-decoration-line);
|
|
49
|
+
text-decoration-thickness: var(--ams-card-link-text-decoration-thickness);
|
|
50
|
+
text-underline-offset: var(--ams-card-link-text-underline-offset);
|
|
51
51
|
|
|
52
52
|
&:hover {
|
|
53
|
-
color: var(--
|
|
54
|
-
text-decoration-line: var(--
|
|
53
|
+
color: var(--ams-card-link-hover-color);
|
|
54
|
+
text-decoration-line: var(--ams-card-link-hover-text-decoration-line);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -6,23 +6,23 @@
|
|
|
6
6
|
@import "../../common/input-label-focus";
|
|
7
7
|
@import "../../common/hide-input";
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.ams-checkbox__input {
|
|
10
10
|
@include hide-input;
|
|
11
11
|
@include input-label-focus;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.ams-checkbox__checkmark {
|
|
15
15
|
align-items: center;
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-shrink: 0;
|
|
18
|
-
height: calc(var(--
|
|
18
|
+
height: calc(var(--ams-checkbox-font-size) * var(--ams-checkbox-line-height));
|
|
19
19
|
width: 1.5rem;
|
|
20
20
|
|
|
21
21
|
&::after {
|
|
22
22
|
background-position: center;
|
|
23
23
|
background-repeat: no-repeat;
|
|
24
24
|
background-size: 1rem;
|
|
25
|
-
border-color: var(--
|
|
25
|
+
border-color: var(--ams-checkbox-checkmark-border-color);
|
|
26
26
|
border-style: solid;
|
|
27
27
|
border-width: 0.125rem;
|
|
28
28
|
box-sizing: border-box;
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
-webkit-text-size-adjust: 100%;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.
|
|
40
|
-
color: var(--
|
|
39
|
+
.ams-checkbox__label {
|
|
40
|
+
color: var(--ams-checkbox-color);
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
display: inline-flex;
|
|
43
|
-
font-family: var(--
|
|
44
|
-
font-size: var(--
|
|
45
|
-
font-weight: var(--
|
|
43
|
+
font-family: var(--ams-checkbox-font-family);
|
|
44
|
+
font-size: var(--ams-checkbox-font-size);
|
|
45
|
+
font-weight: var(--ams-checkbox-font-weight);
|
|
46
46
|
gap: 0.5rem;
|
|
47
|
-
line-height: var(--
|
|
48
|
-
outline-offset: var(--
|
|
47
|
+
line-height: var(--ams-checkbox-line-height);
|
|
48
|
+
outline-offset: var(--ams-checkbox-outline-offset);
|
|
49
49
|
|
|
50
50
|
&:hover {
|
|
51
|
-
color: var(--
|
|
51
|
+
color: var(--ams-checkbox-hover-color);
|
|
52
52
|
text-decoration-line: underline;
|
|
53
53
|
text-decoration-thickness: 0.125rem;
|
|
54
54
|
text-underline-offset: 0.375rem;
|
|
55
55
|
|
|
56
|
-
.
|
|
57
|
-
border-color: var(--
|
|
56
|
+
.ams-checkbox__checkmark::after {
|
|
57
|
+
border-color: var(--ams-checkbox-checkmark-hover-border-color);
|
|
58
58
|
border-width: 0.1875rem;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Default checked
|
|
66
|
-
.
|
|
67
|
-
+ .
|
|
68
|
-
background-color: var(--
|
|
69
|
-
background-image: var(--
|
|
66
|
+
.ams-checkbox__input:checked {
|
|
67
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
68
|
+
background-color: var(--ams-checkbox-checkmark-checked-background-color);
|
|
69
|
+
background-image: var(--ams-checkbox-checkmark-checked-background-image);
|
|
70
70
|
border: none;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// Default indeterminate
|
|
75
|
-
.
|
|
76
|
-
+ .
|
|
77
|
-
background-color: var(--
|
|
78
|
-
background-image: var(--
|
|
75
|
+
.ams-checkbox__input:indeterminate {
|
|
76
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
77
|
+
background-color: var(--ams-checkbox-checkmark-indeterminate-background-color);
|
|
78
|
+
background-image: var(--ams-checkbox-checkmark-indeterminate-background-image);
|
|
79
79
|
background-position: center;
|
|
80
80
|
background-repeat: no-repeat;
|
|
81
81
|
background-size: 1rem;
|
|
@@ -84,135 +84,133 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// Invalid unchecked
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
+ .
|
|
90
|
-
border-color: var(--
|
|
87
|
+
.ams-checkbox__input:invalid,
|
|
88
|
+
.ams-checkbox__input[aria-invalid="true"] {
|
|
89
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
90
|
+
border-color: var(--ams-checkbox-checkmark-invalid-border-color);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Disabled unchecked
|
|
95
|
-
.
|
|
96
|
-
+ .
|
|
97
|
-
color: var(--
|
|
95
|
+
.ams-checkbox__input:disabled {
|
|
96
|
+
+ .ams-checkbox__label {
|
|
97
|
+
color: var(--ams-checkbox-disabled-color);
|
|
98
98
|
cursor: not-allowed;
|
|
99
99
|
|
|
100
|
-
.
|
|
101
|
-
border-color: var(--
|
|
100
|
+
.ams-checkbox__checkmark::after {
|
|
101
|
+
border-color: var(--ams-checkbox-checkmark-disabled-border-color);
|
|
102
102
|
border-width: 0.125rem;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Invalid checked
|
|
108
|
-
.
|
|
109
|
-
.
|
|
110
|
-
+ .
|
|
111
|
-
background-color: var(--
|
|
108
|
+
.ams-checkbox__input:invalid:checked,
|
|
109
|
+
.ams-checkbox__input[aria-invalid="true"]:checked {
|
|
110
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
111
|
+
background-color: var(--ams-checkbox-checkmark-invalid-checked-background-color);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
// Invalid indeterminate
|
|
116
|
-
.
|
|
117
|
-
.
|
|
118
|
-
+ .
|
|
119
|
-
background-color: var(--
|
|
116
|
+
.ams-checkbox__input:invalid:indeterminate,
|
|
117
|
+
.ams-checkbox__input[aria-invalid="true"]:indeterminate {
|
|
118
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
119
|
+
background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-background-color);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// Disabled label
|
|
124
|
-
.
|
|
124
|
+
.ams-checkbox__input:disabled + .ams-checkbox__label:hover {
|
|
125
125
|
text-decoration: none;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// Disabled checked
|
|
129
|
-
.
|
|
130
|
-
+ .
|
|
131
|
-
background-color: var(--
|
|
129
|
+
.ams-checkbox__input:disabled:checked {
|
|
130
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
131
|
+
background-color: var(--ams-checkbox-checkmark-disabled-checked-background-color);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
// Disabled indeterminate
|
|
136
|
-
.
|
|
137
|
-
+ .
|
|
138
|
-
background-color: var(--
|
|
136
|
+
.ams-checkbox__input:disabled:indeterminate {
|
|
137
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
138
|
+
background-color: var(--ams-checkbox-checkmark-disabled-indeterminate-background-color);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// Disabled invalid unchecked
|
|
143
|
-
.
|
|
144
|
-
.
|
|
145
|
-
+ .
|
|
143
|
+
.ams-checkbox__input:invalid:disabled,
|
|
144
|
+
.ams-checkbox__input[aria-invalid="true"]:disabled {
|
|
145
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
146
146
|
// TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
|
|
147
|
-
border-color: var(--
|
|
147
|
+
border-color: var(--ams-checkbox-checkmark-disabled-border-color);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// HOVER STATES
|
|
152
152
|
|
|
153
153
|
// Invalid unchecked hover
|
|
154
|
-
:is(.
|
|
155
|
-
+ .
|
|
156
|
-
.
|
|
154
|
+
:is(.ams-checkbox__input:invalid, .ams-checkbox__input[aria-invalid="true"])
|
|
155
|
+
+ .ams-checkbox__label:hover
|
|
156
|
+
.ams-checkbox__checkmark::after {
|
|
157
157
|
// TODO: this should be the (currently non-existent) dark red hover color
|
|
158
|
-
border-color: var(--
|
|
158
|
+
border-color: var(--ams-checkbox-checkmark-invalid-hover-border-color);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// Default checked hover
|
|
162
|
-
.
|
|
163
|
-
background-color: var(--
|
|
162
|
+
.ams-checkbox__input:checked + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
|
|
163
|
+
background-color: var(--ams-checkbox-checkmark-checked-hover-background-color);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
// Default indeterminate hover
|
|
167
|
-
.
|
|
168
|
-
background-color: var(--
|
|
167
|
+
.ams-checkbox__input:indeterminate + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
|
|
168
|
+
background-color: var(--ams-checkbox-checkmark-indeterminate-hover-background-color);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// Invalid checked hover
|
|
172
|
-
:is(.
|
|
173
|
-
+ .
|
|
174
|
-
.
|
|
172
|
+
:is(.ams-checkbox__input:invalid:checked, .ams-checkbox__input[aria-invalid="true"]:checked)
|
|
173
|
+
+ .ams-checkbox__label:hover
|
|
174
|
+
.ams-checkbox__checkmark::after {
|
|
175
175
|
// TODO: this should be the (currently non-existent) dark red hover color
|
|
176
|
-
background-color: var(--
|
|
176
|
+
background-color: var(--ams-checkbox-checkmark-invalid-checked-hover-background-color);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// Invalid indeterminate hover
|
|
180
|
-
:is(.
|
|
181
|
-
+ .
|
|
182
|
-
.
|
|
180
|
+
:is(.ams-checkbox__input:invalid:indeterminate, .ams-checkbox__input[aria-invalid="true"]:indeterminate)
|
|
181
|
+
+ .ams-checkbox__label:hover
|
|
182
|
+
.ams-checkbox__checkmark::after {
|
|
183
183
|
// TODO: this should be the (currently non-existent) dark red hover color
|
|
184
|
-
background-color: var(--
|
|
184
|
+
background-color: var(--ams-checkbox-checkmark-invalid-indeterminate-hover-background-color);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// Disabled checked hover
|
|
188
|
-
.
|
|
189
|
-
background-color: var(--
|
|
188
|
+
.ams-checkbox__input:disabled:checked + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
|
|
189
|
+
background-color: var(--ams-checkbox-checkmark-disabled-checked-hover-background-color);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// Disabled indeterminate hover
|
|
193
|
-
.
|
|
194
|
-
|
|
195
|
-
.amsterdam-checkbox__checkmark::after {
|
|
196
|
-
background-color: var(--amsterdam-checkbox-checkmark-disabled-indeterminate-hover-background-color);
|
|
193
|
+
.ams-checkbox__input:disabled:indeterminate + .ams-checkbox__label:hover .ams-checkbox__checkmark::after {
|
|
194
|
+
background-color: var(--ams-checkbox-checkmark-disabled-indeterminate-hover-background-color);
|
|
197
195
|
}
|
|
198
196
|
|
|
199
197
|
// Disabled invalid unchecked hover
|
|
200
|
-
:is(.
|
|
201
|
-
+ .
|
|
202
|
-
.
|
|
198
|
+
:is(.ams-checkbox__input:invalid:disabled, .ams-checkbox__input[aria-invalid="true"]:disabled)
|
|
199
|
+
+ .ams-checkbox__label:hover
|
|
200
|
+
.ams-checkbox__checkmark::after {
|
|
203
201
|
// TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
|
|
204
|
-
border-color: var(--
|
|
202
|
+
border-color: var(--ams-checkbox-checkmark-disabled-border-color);
|
|
205
203
|
}
|
|
206
204
|
|
|
207
205
|
// DISABLED INVALID STATES
|
|
208
206
|
|
|
209
207
|
// Disabled invalid checked & indeterminate
|
|
210
|
-
.
|
|
211
|
-
.
|
|
212
|
-
.
|
|
213
|
-
.
|
|
214
|
-
+ .
|
|
208
|
+
.ams-checkbox__input:invalid:disabled:checked,
|
|
209
|
+
.ams-checkbox__input:invalid:disabled:indeterminate,
|
|
210
|
+
.ams-checkbox__input[aria-invalid="true"]:disabled:checked,
|
|
211
|
+
.ams-checkbox__input[aria-invalid="true"]:disabled:indeterminate {
|
|
212
|
+
+ .ams-checkbox__label .ams-checkbox__checkmark::after {
|
|
215
213
|
// TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
|
|
216
|
-
background-color: var(--
|
|
214
|
+
background-color: var(--ams-checkbox-checkmark-disabled-checked-background-color);
|
|
217
215
|
}
|
|
218
216
|
}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
@import "../../common/size";
|
|
7
7
|
|
|
8
|
-
.
|
|
8
|
+
.ams-column {
|
|
9
9
|
display: grid;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@each $size, $label in $
|
|
13
|
-
.
|
|
14
|
-
gap: var(--
|
|
12
|
+
@each $size, $label in $ams-sizes {
|
|
13
|
+
.ams-column--#{$label} {
|
|
14
|
+
gap: var(--ams-column-gap-#{$size});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/breakpoint";
|
|
7
|
-
@import "../../common/hyphenation";
|
|
8
7
|
|
|
9
|
-
.
|
|
10
|
-
background-color: var(--
|
|
11
|
-
border: var(--
|
|
8
|
+
.ams-dialog {
|
|
9
|
+
background-color: var(--ams-dialog-background-color);
|
|
10
|
+
border: var(--ams-dialog-border);
|
|
12
11
|
inset: 0;
|
|
13
|
-
max-inline-size: var(--
|
|
12
|
+
max-inline-size: var(--ams-dialog-max-inline-size);
|
|
14
13
|
padding-block: 0;
|
|
15
14
|
padding-inline: 0;
|
|
16
15
|
position: fixed;
|
|
@@ -21,18 +20,18 @@
|
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
.
|
|
23
|
+
.ams-dialog__form {
|
|
25
24
|
display: grid;
|
|
26
|
-
gap: var(--
|
|
25
|
+
gap: var(--ams-dialog-form-gap);
|
|
27
26
|
grid-template-rows: auto 1fr auto;
|
|
28
|
-
max-block-size: var(--
|
|
27
|
+
max-block-size: var(--ams-dialog-form-max-block-size);
|
|
29
28
|
|
|
30
29
|
// TODO Decide on these widths
|
|
31
|
-
padding-block: var(--
|
|
32
|
-
padding-inline: var(--
|
|
30
|
+
padding-block: var(--ams-dialog-form-padding-block);
|
|
31
|
+
padding-inline: var(--ams-dialog-form-padding-inline);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
.
|
|
34
|
+
.ams-dialog__article {
|
|
36
35
|
display: grid;
|
|
37
36
|
gap: 1.5rem; /* Until we have a consistent way of spacing text elements */
|
|
38
37
|
max-block-size: 100%; /* safari */
|
|
@@ -40,34 +39,19 @@
|
|
|
40
39
|
overscroll-behavior-y: contain;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
.
|
|
42
|
+
.ams-dialog__header {
|
|
44
43
|
align-items: flex-start;
|
|
45
44
|
display: flex;
|
|
46
|
-
gap: var(--
|
|
45
|
+
gap: var(--ams-dialog-header-gap);
|
|
46
|
+
justify-content: space-between;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
-webkit-text-size-adjust: 100%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.amsterdam-dialog__title {
|
|
54
|
-
color: var(--amsterdam-dialog-title-color);
|
|
55
|
-
flex: auto;
|
|
56
|
-
font-family: var(--amsterdam-dialog-title-font-family);
|
|
57
|
-
font-size: var(--amsterdam-dialog-title-font-size);
|
|
58
|
-
font-weight: var(--amsterdam-dialog-title-font-weight);
|
|
59
|
-
line-height: var(--amsterdam-dialog-title-line-height);
|
|
60
|
-
|
|
61
|
-
@include hyphenation;
|
|
62
|
-
@include reset;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.amsterdam-dialog__footer {
|
|
49
|
+
.ams-dialog__footer {
|
|
66
50
|
display: flex;
|
|
67
51
|
flex-direction: column;
|
|
68
|
-
grid-gap: var(--
|
|
52
|
+
grid-gap: var(--ams-dialog-footer-gap);
|
|
69
53
|
|
|
70
|
-
@media screen and (min-width: $
|
|
54
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
71
55
|
flex-direction: row;
|
|
72
56
|
justify-content: end;
|
|
73
57
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
padding-inline: 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.ams-fieldset {
|
|
16
16
|
@include reset;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
-webkit-text-size-adjust: 100%;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
25
|
-
color: var(--
|
|
26
|
-
font-family: var(--
|
|
27
|
-
font-size: var(--
|
|
28
|
-
font-weight: var(--
|
|
29
|
-
line-height: var(--
|
|
24
|
+
.ams-fieldset__legend {
|
|
25
|
+
color: var(--ams-fieldset-legend-color);
|
|
26
|
+
font-family: var(--ams-fieldset-legend-font-family);
|
|
27
|
+
font-size: var(--ams-fieldset-legend-font-size);
|
|
28
|
+
font-weight: var(--ams-fieldset-legend-font-weight);
|
|
29
|
+
line-height: var(--ams-fieldset-legend-line-height);
|
|
30
30
|
margin-block-end: 1rem; /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
|
|
31
31
|
|
|
32
32
|
@include hyphenation;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Form Field Character Counter
|
|
4
|
+
|
|
5
|
+
Help users know how much text they can enter when there is a limit on the number of characters.
|
|
6
|
+
|
|
7
|
+
Users will get updates at a pace that works best for the way they interact with the textarea. This means:
|
|
8
|
+
|
|
9
|
+
- sighted users will see a count message that updates as they type
|
|
10
|
+
- screen reader users will hear the count announcement when they stop typing.
|
|
11
|
+
|
|
12
|
+
This component does not restrict the user from entering information. The user can enter more than the character limit, but are told they’ve entered too many characters. This lets them type or copy and paste their full answer, then edit it down.
|
|
13
|
+
|
|
14
|
+
## Guidelines
|
|
15
|
+
|
|
16
|
+
- Only use a character counter when there is a good reason for limiting the number of characters users can enter.
|
|
17
|
+
For example, if there is an indication that users are likely to enter more information than they need to.
|
|
18
|
+
Or when there is a legal or technical reason that means an entry must be no more than a certain number of characters.
|
|
19
|
+
- If your users keep hitting the character limit imposed by the backend of your service then try to increase the limit rather than use a character counter.
|