@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
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
inline-size: auto; // Reset inline size of 10em set by Android devices
|
|
15
|
+
margin-block: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ams-time-input {
|
|
19
|
+
background-color: var(--ams-time-input-background-color);
|
|
20
|
+
box-shadow: var(--ams-time-input-box-shadow);
|
|
21
|
+
color: var(--ams-time-input-color);
|
|
22
|
+
font-family: var(--ams-time-input-font-family);
|
|
23
|
+
font-size: var(--ams-time-input-font-size);
|
|
24
|
+
font-weight: var(--ams-time-input-font-weight);
|
|
25
|
+
line-height: var(--ams-time-input-line-height);
|
|
26
|
+
|
|
27
|
+
// Set min block size for iOS, otherwise an empty box is a lot smaller than a filled one.
|
|
28
|
+
min-block-size: calc(
|
|
29
|
+
(var(--ams-time-input-font-size) * var(--ams-time-input-line-height)) + 2 * var(--ams-time-input-padding-block)
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
// Set min inline size for iOS, so the size is closer to the filled in size.
|
|
33
|
+
min-inline-size: calc(4ch + (2 * var(--ams-time-input-padding-inline)));
|
|
34
|
+
outline-offset: var(--ams-time-input-outline-offset);
|
|
35
|
+
padding-block: var(--ams-time-input-padding-block);
|
|
36
|
+
padding-inline: var(--ams-time-input-padding-inline);
|
|
37
|
+
touch-action: manipulation;
|
|
38
|
+
|
|
39
|
+
@include text-rendering;
|
|
40
|
+
@include reset;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
box-shadow: var(--ams-time-input-hover-box-shadow);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// This changes the default calendar icon on Chromium browsers only
|
|
48
|
+
.ams-time-input::-webkit-calendar-picker-indicator {
|
|
49
|
+
appearance: none;
|
|
50
|
+
background-image: var(--ams-time-input-calender-picker-indicator-background-image);
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ams-time-input:hover::-webkit-calendar-picker-indicator {
|
|
55
|
+
background-image: var(--ams-time-input-hover-calender-picker-indicator-background-image);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ams-time-input:disabled {
|
|
59
|
+
background-color: var(--ams-time-input-disabled-background-color);
|
|
60
|
+
box-shadow: var(--ams-time-input-disabled-box-shadow);
|
|
61
|
+
color: var(--ams-time-input-disabled-color);
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ams-time-input:disabled::-webkit-calendar-picker-indicator {
|
|
66
|
+
background-image: var(--ams-time-input-disabled-calender-picker-indicator-background-image);
|
|
67
|
+
visibility: visible;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ams-time-input:invalid,
|
|
71
|
+
.ams-time-input[aria-invalid="true"] {
|
|
72
|
+
box-shadow: var(--ams-time-input-invalid-box-shadow);
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
// TODO: this should be the (currently non-existent) dark red hover color
|
|
76
|
+
box-shadow: var(--ams-time-input-invalid-hover-box-shadow);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
7
8
|
|
|
8
9
|
.ams-top-task-link {
|
|
9
10
|
break-inside: avoid;
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
|
|
17
18
|
@mixin reset {
|
|
18
19
|
box-sizing: border-box;
|
|
19
|
-
-webkit-text-size-adjust: 100%;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ams-top-task-link__label {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
text-underline-offset: var(--ams-top-task-link-label-text-underline-offset);
|
|
31
31
|
|
|
32
32
|
@include hyphenation;
|
|
33
|
+
@include text-rendering;
|
|
33
34
|
@include reset;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
6
8
|
/** Apply border box sizing, reset white space and list styles. */
|
|
7
9
|
@mixin reset {
|
|
8
10
|
box-sizing: border-box;
|
|
9
11
|
list-style: none;
|
|
10
12
|
margin-block: 0;
|
|
11
13
|
padding-inline-start: 0;
|
|
12
|
-
-webkit-text-size-adjust: 100%;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/** A list is a grid column with a gap between items. */
|
|
16
17
|
.ams-unordered-list {
|
|
17
|
-
@include reset;
|
|
18
|
-
|
|
19
18
|
display: grid;
|
|
20
19
|
gap: var(--ams-unordered-list-gap);
|
|
20
|
+
|
|
21
|
+
@include text-rendering;
|
|
22
|
+
@include reset;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
/** A list with markers sets typography for its text content. */
|
|
@@ -40,6 +42,11 @@
|
|
|
40
42
|
color: var(--ams-unordered-list-inverse-color);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
.ams-unordered-list--small:not(.ams-unordered-list--no-markers) {
|
|
46
|
+
font-size: var(--ams-unordered-list-small-font-size);
|
|
47
|
+
line-height: var(--ams-unordered-list-small-line-height);
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
/** A nested list has a different marker and less indentation for correct alignment. */
|
|
44
51
|
:is(.ams-ordered-list, .ams-unordered-list) .ams-unordered-list {
|
|
45
52
|
list-style-type: var(--ams-unordered-list-unordered-list-list-style-type);
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
// Source: https://css-tricks.com/inclusively-hidden/
|
|
7
7
|
.ams-visually-hidden:not(:active, :focus) {
|
|
8
|
+
block-size: 1px;
|
|
8
9
|
clip: rect(0 0 0 0);
|
|
9
10
|
clip-path: inset(50%);
|
|
10
|
-
|
|
11
|
+
inline-size: 1px;
|
|
11
12
|
overflow: hidden;
|
|
12
13
|
position: absolute;
|
|
13
14
|
white-space: nowrap;
|
|
14
|
-
width: 1px;
|
|
15
15
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ams-fieldset{border:none;margin-inline:0;padding-block:0;padding-inline:0}.ams-fieldset__legend{color:var(--ams-fieldset-legend-color);font-family:var(--ams-fieldset-legend-font-family);font-size:var(--ams-fieldset-legend-font-size);font-weight:var(--ams-fieldset-legend-font-weight);line-height:var(--ams-fieldset-legend-line-height);margin-block-end:1rem;hyphenate-limit-chars:var(--ams-hyphenation-hyphenate-limit-chars);hyphens:var(--ams-hyphenation-hyphens);overflow-wrap:var(--ams-hyphenation-overflow-wrap);padding-inline:0;-webkit-text-size-adjust:100%}/*# sourceMappingURL=fieldset.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/fieldset/fieldset.scss","../../src/common/hyphenation.scss"],"names":[],"mappings":"AAcA,cANE,YACA,gBACA,gBACA,iBAYF,sBACE,uCACA,mDACA,+CACA,mDACA,mDACA,sBCvBA,mEACA,uCACA,mDDWA,iBACA","file":"fieldset.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ams-form-label{color:var(--ams-form-label-color);font-family:var(--ams-form-label-font-family);font-size:var(--ams-form-label-font-size);font-weight:var(--ams-form-label-font-weight);line-height:var(--ams-form-label-line-height);hyphenate-limit-chars:var(--ams-hyphenation-hyphenate-limit-chars);hyphens:var(--ams-hyphenation-hyphens);overflow-wrap:var(--ams-hyphenation-overflow-wrap);-webkit-text-size-adjust:100%}/*# sourceMappingURL=form-label.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/form-label/form-label.scss","../../src/common/hyphenation.scss"],"names":[],"mappings":"AAWA,gBACE,kCACA,8CACA,0CACA,8CACA,8CCVA,mEACA,uCACA","file":"form-label.css"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- @license CC0-1.0 -->
|
|
2
|
-
|
|
3
|
-
# Fieldset
|
|
4
|
-
|
|
5
|
-
A component to group related form inputs.
|
|
6
|
-
|
|
7
|
-
## Guidelines
|
|
8
|
-
|
|
9
|
-
- Use Fieldset when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single fieldset when asking for an address.
|
|
10
|
-
- When grouping radio inputs, use `role="radiogroup"` on Fieldset to have this grouping explicitly announced as a radio group. Fieldset has a default role of `group`.
|
|
11
|
-
|
|
12
|
-
## Relevant WCAG Requirements
|
|
13
|
-
|
|
14
|
-
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Fieldset labels the purpose of a group of inputs.
|
|
15
|
-
|
|
16
|
-
## References
|
|
17
|
-
|
|
18
|
-
- [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG22/Techniques/html/H71)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2+
|
|
3
|
-
* Copyright Gemeente Amsterdam
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
@import "../../common/hyphenation";
|
|
7
|
-
|
|
8
|
-
@mixin reset {
|
|
9
|
-
border: none;
|
|
10
|
-
margin-inline: 0;
|
|
11
|
-
padding-block: 0;
|
|
12
|
-
padding-inline: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ams-fieldset {
|
|
16
|
-
@include reset;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin legend-reset {
|
|
20
|
-
padding-inline: 0;
|
|
21
|
-
-webkit-text-size-adjust: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
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
|
-
margin-block-end: 1rem; /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
|
|
31
|
-
|
|
32
|
-
@include hyphenation;
|
|
33
|
-
@include legend-reset;
|
|
34
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2+
|
|
3
|
-
* Copyright Gemeente Amsterdam
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
@import "../../common/hyphenation";
|
|
7
|
-
|
|
8
|
-
@mixin reset {
|
|
9
|
-
-webkit-text-size-adjust: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ams-form-label {
|
|
13
|
-
color: var(--ams-form-label-color);
|
|
14
|
-
font-family: var(--ams-form-label-font-family);
|
|
15
|
-
font-size: var(--ams-form-label-font-size);
|
|
16
|
-
font-weight: var(--ams-form-label-font-weight);
|
|
17
|
-
line-height: var(--ams-form-label-line-height);
|
|
18
|
-
|
|
19
|
-
@include hyphenation;
|
|
20
|
-
@include reset;
|
|
21
|
-
}
|