@amsterdam/design-system-css 0.8.0 → 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 +36 -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/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 -1
- package/dist/date-input/date-input.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- 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/header/header.css +1 -1
- package/dist/header/header.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/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/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 -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/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 -1
- package/dist/time-input/time-input.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 +10 -4
- package/package.json +6 -3
- package/src/common/hide-input.scss +1 -1
- package/src/components/accordion/accordion.scss +1 -1
- package/src/components/avatar/avatar.scss +2 -2
- package/src/components/badge/badge.scss +35 -5
- package/src/components/breadcrumb/breadcrumb.scss +9 -9
- package/src/components/button/button.scss +1 -0
- package/src/components/card/card.scss +1 -1
- package/src/components/checkbox/checkbox.scss +4 -4
- package/src/components/date-input/date-input.scss +6 -7
- package/src/components/dialog/README.md +7 -0
- package/src/components/dialog/dialog.scss +7 -7
- 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/header/header.scss +5 -5
- package/src/components/icon/icon.scss +12 -12
- package/src/components/image/image.scss +3 -3
- package/src/components/index.scss +4 -1
- package/src/components/link-list/link-list.scss +2 -2
- package/src/components/logo/logo.scss +1 -1
- package/src/components/ordered-list/ordered-list.scss +5 -0
- package/src/components/pagination/README.md +1 -0
- package/src/components/pagination/pagination.scss +2 -2
- package/src/components/paragraph/paragraph.scss +2 -2
- package/src/components/radio/radio.scss +4 -4
- package/src/components/screen/screen.scss +3 -3
- package/src/components/search-field/search-field.scss +16 -6
- package/src/components/select/select.scss +8 -6
- package/src/components/switch/switch.scss +12 -9
- package/src/components/table/table.scss +1 -1
- package/src/components/tabs/tabs.scss +1 -1
- package/src/components/text-area/text-area.scss +9 -5
- package/src/components/text-input/text-input.scss +6 -2
- package/src/components/time-input/time-input.scss +7 -8
- package/src/components/unordered-list/unordered-list.scss +5 -0
- 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/src/components/fieldset/README.md +0 -18
- package/src/components/fieldset/fieldset.scss +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/text-area/text-area.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/components/text-area/text-area.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAgBA,eACE,uDACA,2CACA,iCACA,6CACA,yCACA,6CACA,iBACA,6CACA,qBACA,mDACA,mDACA,iDACA,mDACA,0BCpBA,kCACA,2BACA,8BACA,sBDLA,wBACA,gBACA,SACA,gBACA,sBACA,eAsBA,qBACE,iDAIJ,4BACE,6CACA,aAGF,wBACE,gEACA,oDACA,0CACA,4CAGF,yDAEE,mDAEA,qEAEE,yDAIJ,4BACE,YAGF,kCACE,cAGF,gCACE,aAGF,qBACE","file":"text-area.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ams-text-input{background-color:var(--ams-text-input-background-color);
|
|
1
|
+
.ams-text-input{background-color:var(--ams-text-input-background-color);box-shadow:var(--ams-text-input-box-shadow);color:var(--ams-text-input-color);font-family:var(--ams-text-input-font-family);font-size:var(--ams-text-input-font-size);font-weight:var(--ams-text-input-font-weight);inline-size:100%;line-height:var(--ams-text-input-line-height);outline-offset:var(--ams-text-input-outline-offset);padding-block:var(--ams-text-input-padding-block);padding-inline:var(--ams-text-input-padding-inline);touch-action:manipulation;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;-webkit-appearance:none;appearance:none;border:0;border-radius:0;box-sizing:border-box;margin-block:0}.ams-text-input:hover{box-shadow:var(--ams-text-input-hover-box-shadow)}.ams-text-input::placeholder{color:var(--ams-text-input-placeholder-color);opacity:100%}.ams-text-input:disabled{background-color:var(--ams-text-input-disabled-background-color);box-shadow:var(--ams-text-input-disabled-box-shadow);color:var(--ams-text-input-disabled-color);cursor:not-allowed}.ams-text-input:invalid,.ams-text-input[aria-invalid=true]{box-shadow:var(--ams-text-input-invalid-box-shadow)}.ams-text-input:invalid:hover,.ams-text-input[aria-invalid=true]:hover{box-shadow:var(--ams-text-input-invalid-hover-box-shadow)}/*# sourceMappingURL=text-input.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/text-input/text-input.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/components/text-input/text-input.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAgBA,gBACE,wDACA,4CACA,kCACA,8CACA,0CACA,8CACA,iBACA,8CACA,oDACA,kDACA,oDACA,0BClBA,kCACA,2BACA,8BACA,sBDLA,wBACA,gBACA,SACA,gBACA,sBACA,eAoBA,sBACE,kDAIJ,6BACE,8CACA,aAGF,yBACE,iEACA,qDACA,2CACA,mBAGF,2DAEE,oDAEA,uEAEE","file":"text-input.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ams-time-input{background-color:var(--ams-time-input-background-color);box-shadow:var(--ams-time-input-box-shadow);color:var(--ams-time-input-color);font-family:var(--ams-time-input-font-family);font-size:var(--ams-time-input-font-size);font-weight:var(--ams-time-input-font-weight);line-height:var(--ams-time-input-line-height);min-
|
|
1
|
+
.ams-time-input{background-color:var(--ams-time-input-background-color);box-shadow:var(--ams-time-input-box-shadow);color:var(--ams-time-input-color);font-family:var(--ams-time-input-font-family);font-size:var(--ams-time-input-font-size);font-weight:var(--ams-time-input-font-weight);line-height:var(--ams-time-input-line-height);min-block-size:calc(var(--ams-time-input-font-size)*var(--ams-time-input-line-height) + 2*var(--ams-time-input-padding-block));min-inline-size:calc(4ch + 2*var(--ams-time-input-padding-inline));outline-offset:var(--ams-time-input-outline-offset);padding-block:var(--ams-time-input-padding-block);padding-inline:var(--ams-time-input-padding-inline);touch-action:manipulation;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;-webkit-appearance:none;appearance:none;border:0;border-radius:0;box-sizing:border-box;inline-size:auto;margin-block:0}.ams-time-input:hover{box-shadow:var(--ams-time-input-hover-box-shadow)}.ams-time-input::-webkit-calendar-picker-indicator{appearance:none;background-image:var(--ams-time-input-calender-picker-indicator-background-image);cursor:pointer}.ams-time-input:hover::-webkit-calendar-picker-indicator{background-image:var(--ams-time-input-hover-calender-picker-indicator-background-image)}.ams-time-input:disabled{background-color:var(--ams-time-input-disabled-background-color);box-shadow:var(--ams-time-input-disabled-box-shadow);color:var(--ams-time-input-disabled-color);cursor:not-allowed}.ams-time-input:disabled::-webkit-calendar-picker-indicator{background-image:var(--ams-time-input-disabled-calender-picker-indicator-background-image);visibility:visible}.ams-time-input:invalid,.ams-time-input[aria-invalid=true]{box-shadow:var(--ams-time-input-invalid-box-shadow)}.ams-time-input:invalid:hover,.ams-time-input[aria-invalid=true]:hover{box-shadow:var(--ams-time-input-invalid-hover-box-shadow)}/*# sourceMappingURL=time-input.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/time-input/time-input.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/components/time-input/time-input.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAiBA,gBACE,wDACA,4CACA,kCACA,8CACA,0CACA,8CACA,8CAGA,+HAKA,mEACA,oDACA,kDACA,oDACA,0BC1BA,kCACA,2BACA,8BACA,sBDLA,wBACA,gBACA,SACA,gBACA,sBACA,iBACA,eA2BA,sBACE,kDAKJ,mDACE,gBACA,kFACA,eAGF,yDACE,wFAGF,yBACE,iEACA,qDACA,2CACA,mBAGF,4DACE,2FACA,mBAGF,2DAEE,oDAEA,uEAEE","file":"time-input.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ams-unordered-list{display:grid;gap:var(--ams-unordered-list-gap);text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;box-sizing:border-box;list-style:none;margin-block:0;padding-inline-start:0}.ams-unordered-list:not(.ams-unordered-list--no-markers){color:var(--ams-unordered-list-color);font-family:var(--ams-unordered-list-font-family);font-size:var(--ams-unordered-list-font-size);font-weight:var(--ams-unordered-list-font-weight);line-height:var(--ams-unordered-list-line-height);list-style-type:var(--ams-unordered-list-list-style-type)}.ams-unordered-list:not(.ams-unordered-list--no-markers) .ams-unordered-list__item{margin-inline-start:var(--ams-unordered-list-item-margin-inline-start);padding-inline-start:var(--ams-unordered-list-item-padding-inline-start)}.ams-unordered-list--inverse-color:not(.ams-unordered-list--no-markers){color:var(--ams-unordered-list-inverse-color)}:is(.ams-ordered-list,.ams-unordered-list) .ams-unordered-list{list-style-type:var(--ams-unordered-list-unordered-list-list-style-type)}:is(.ams-ordered-list,.ams-unordered-list) .ams-unordered-list .ams-unordered-list__item{margin-inline-start:var(--ams-unordered-list-unordered-list-item-margin-inline-start);padding-inline-start:var(--ams-unordered-list-unordered-list-item-padding-inline-start)}/*# sourceMappingURL=unordered-list.css.map */
|
|
1
|
+
.ams-unordered-list{display:grid;gap:var(--ams-unordered-list-gap);text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;box-sizing:border-box;list-style:none;margin-block:0;padding-inline-start:0}.ams-unordered-list:not(.ams-unordered-list--no-markers){color:var(--ams-unordered-list-color);font-family:var(--ams-unordered-list-font-family);font-size:var(--ams-unordered-list-font-size);font-weight:var(--ams-unordered-list-font-weight);line-height:var(--ams-unordered-list-line-height);list-style-type:var(--ams-unordered-list-list-style-type)}.ams-unordered-list:not(.ams-unordered-list--no-markers) .ams-unordered-list__item{margin-inline-start:var(--ams-unordered-list-item-margin-inline-start);padding-inline-start:var(--ams-unordered-list-item-padding-inline-start)}.ams-unordered-list--inverse-color:not(.ams-unordered-list--no-markers){color:var(--ams-unordered-list-inverse-color)}.ams-unordered-list--small:not(.ams-unordered-list--no-markers){font-size:var(--ams-unordered-list-small-font-size);line-height:var(--ams-unordered-list-small-line-height)}:is(.ams-ordered-list,.ams-unordered-list) .ams-unordered-list{list-style-type:var(--ams-unordered-list-unordered-list-list-style-type)}:is(.ams-ordered-list,.ams-unordered-list) .ams-unordered-list .ams-unordered-list__item{margin-inline-start:var(--ams-unordered-list-unordered-list-item-margin-inline-start);padding-inline-start:var(--ams-unordered-list-unordered-list-item-padding-inline-start)}/*# sourceMappingURL=unordered-list.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/unordered-list/unordered-list.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAgBA,oBACE,aACA,kCCRA,kCACA,2BACA,8BACA,sBDJA,sBACA,gBACA,eACA,uBAaF,yDACE,sCACA,kDACA,8CACA,kDACA,kDACA,0DAGA,mFACE,uEACA,yEAIJ,wEACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/components/unordered-list/unordered-list.scss","../../src/common/text-rendering.scss"],"names":[],"mappings":"AAgBA,oBACE,aACA,kCCRA,kCACA,2BACA,8BACA,sBDJA,sBACA,gBACA,eACA,uBAaF,yDACE,sCACA,kDACA,8CACA,kDACA,kDACA,0DAGA,mFACE,uEACA,yEAIJ,wEACE,8CAGF,gEACE,oDACA,wDAIF,+DACE,yEAEA,yFACE,sFACA","file":"unordered-list.css"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ams-visually-hidden:not(:active,:focus){clip:rect(0 0 0 0);clip-path:inset(50%);
|
|
1
|
+
.ams-visually-hidden:not(:active,:focus){block-size:1px;clip:rect(0 0 0 0);clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}/*# sourceMappingURL=visually-hidden.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/components/visually-hidden/visually-hidden.scss"],"names":[],"mappings":"AAMA,yCACE,mBACA,qBACA,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/components/visually-hidden/visually-hidden.scss"],"names":[],"mappings":"AAMA,yCACE,eACA,mBACA,qBACA,gBACA,gBACA,kBACA","file":"visually-hidden.css"}
|
|
@@ -13,8 +13,8 @@ Still, we define its thickness and offset for the initial state.
|
|
|
13
13
|
```css
|
|
14
14
|
.ams-link {
|
|
15
15
|
text-decoration: none;
|
|
16
|
-
text-decoration-thickness:
|
|
17
|
-
text-underline-offset:
|
|
16
|
+
text-decoration-thickness: 0.125rem;
|
|
17
|
+
text-underline-offset: 0.1667em;
|
|
18
18
|
|
|
19
19
|
&:hover {
|
|
20
20
|
text-decoration: underline;
|
|
@@ -30,8 +30,8 @@ Still, we define its thickness and offset for the initial state.
|
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
text-decoration: underline;
|
|
33
|
-
text-decoration-thickness:
|
|
34
|
-
text-underline-offset:
|
|
33
|
+
text-decoration-thickness: 0.125rem;
|
|
34
|
+
text-underline-offset: 0.1667em;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
```
|
|
@@ -41,3 +41,9 @@ Still, we define its thickness and offset for the initial state.
|
|
|
41
41
|
We use Sass mixins to extract common patterns, especially if they need more than 1 declaration.
|
|
42
42
|
We collect reset styles in mixins as well.
|
|
43
43
|
Both the name of the mixins and their documentation help explain the approach.
|
|
44
|
+
|
|
45
|
+
## Form validation styling
|
|
46
|
+
|
|
47
|
+
We style both the native invalid state (`:invalid`) as the invalid state you can set manually, using `aria-invalid`.
|
|
48
|
+
We’re currently not sure how our users will implement forms, which is why both options are supported.
|
|
49
|
+
[Native form validation isn’t without its issues](https://adrianroselli.com/2019/02/avoid-default-field-validation.html) though, so we might only support manual validation in the future.
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.9.0",
|
|
3
3
|
"author": "Community for NL Design System",
|
|
4
4
|
"description": "CSS files for components for the City of Amsterdam based on the NL Design System architecture",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
"directory": "packages/css"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"sass": "1.
|
|
18
|
-
|
|
17
|
+
"sass": "1.77.4"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"@amsterdam/design-system-tokens": "0.9.0",
|
|
21
|
+
"@amsterdam/design-system-assets": "0.2.1"
|
|
19
22
|
},
|
|
20
23
|
"scripts": {
|
|
21
24
|
"build": "sass src/components:dist/ --style=compressed",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
font-size: var(--ams-accordion-button-font-size);
|
|
30
30
|
font-weight: var(--ams-accordion-button-font-weight);
|
|
31
31
|
gap: var(--ams-accordion-button-gap);
|
|
32
|
+
inline-size: 100%;
|
|
32
33
|
line-height: var(--ams-accordion-button-line-height);
|
|
33
34
|
padding-block: var(--ams-accordion-button-padding-block);
|
|
34
35
|
padding-inline: var(--ams-accordion-button-padding-inline);
|
|
35
|
-
width: 100%;
|
|
36
36
|
|
|
37
37
|
&:focus {
|
|
38
38
|
outline-offset: var(--ams-accordion-button-focus-outline-offset);
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
font-family: var(--ams-avatar-font-family);
|
|
11
11
|
font-size: var(--ams-avatar-font-size);
|
|
12
|
+
inline-size: calc(var(--ams-avatar-line-height) * var(--ams-avatar-font-size));
|
|
12
13
|
line-height: var(--ams-avatar-line-height);
|
|
13
14
|
padding-block: var(--ams-avatar-padding-block);
|
|
14
15
|
padding-inline: var(--ams-avatar-padding-inline);
|
|
15
16
|
place-content: center;
|
|
16
|
-
width: calc(var(--ams-avatar-line-height) * var(--ams-avatar-font-size));
|
|
17
17
|
|
|
18
18
|
svg {
|
|
19
19
|
fill: currentColor;
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.ams-avatar--has-image {
|
|
24
|
+
inline-size: calc(var(--ams-avatar-line-height) * var(--ams-avatar-font-size) + 2 * var(--ams-avatar-padding-inline));
|
|
24
25
|
overflow: hidden;
|
|
25
26
|
padding-block: 0;
|
|
26
27
|
padding-inline: 0;
|
|
27
28
|
vertical-align: middle; /* Remove ‘phantom’ white space when image doesn’t load */
|
|
28
|
-
width: calc(var(--ams-avatar-line-height) * var(--ams-avatar-font-size) + 2 * var(--ams-avatar-padding-inline));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.ams-avatar--blue {
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
padding-inline: var(--ams-badge-padding-inline);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.ams-badge--black {
|
|
16
|
+
background-color: var(--ams-badge-black-background-color);
|
|
17
|
+
color: var(--ams-badge-black-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.ams-badge--blue {
|
|
16
21
|
background-color: var(--ams-badge-blue-background-color);
|
|
17
22
|
color: var(--ams-badge-blue-color);
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
.ams-badge--dark-blue {
|
|
21
|
-
background-color: var(--ams-badge-dark-blue-background-color);
|
|
22
|
-
color: var(--ams-badge-dark-blue-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
25
|
.ams-badge--dark-green {
|
|
26
26
|
background-color: var(--ams-badge-dark-green-background-color);
|
|
27
27
|
color: var(--ams-badge-dark-green-color);
|
|
@@ -32,6 +32,26 @@
|
|
|
32
32
|
color: var(--ams-badge-green-color);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
.ams-badge--grey-1 {
|
|
36
|
+
background-color: var(--ams-badge-grey-1-background-color);
|
|
37
|
+
color: var(--ams-badge-grey-1-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ams-badge--grey-2 {
|
|
41
|
+
background-color: var(--ams-badge-grey-2-background-color);
|
|
42
|
+
color: var(--ams-badge-grey-2-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ams-badge--grey-3 {
|
|
46
|
+
background-color: var(--ams-badge-grey-3-background-color);
|
|
47
|
+
color: var(--ams-badge-grey-3-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ams-badge--light-blue {
|
|
51
|
+
background-color: var(--ams-badge-light-blue-background-color);
|
|
52
|
+
color: var(--ams-badge-light-blue-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
35
55
|
.ams-badge--magenta {
|
|
36
56
|
background-color: var(--ams-badge-magenta-background-color);
|
|
37
57
|
color: var(--ams-badge-magenta-color);
|
|
@@ -47,6 +67,16 @@
|
|
|
47
67
|
color: var(--ams-badge-purple-color);
|
|
48
68
|
}
|
|
49
69
|
|
|
70
|
+
.ams-badge--red {
|
|
71
|
+
background-color: var(--ams-badge-red-background-color);
|
|
72
|
+
color: var(--ams-badge-red-color);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ams-badge--white {
|
|
76
|
+
background-color: var(--ams-badge-white-background-color);
|
|
77
|
+
color: var(--ams-badge-white-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
50
80
|
.ams-badge--yellow {
|
|
51
81
|
background-color: var(--ams-badge-yellow-background-color);
|
|
52
82
|
color: var(--ams-badge-yellow-color);
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
.ams-breadcrumb__item:not(:last-child)::after {
|
|
34
34
|
background-image: var(--ams-breadcrumb-separator-background-image);
|
|
35
35
|
background-repeat: no-repeat;
|
|
36
|
+
block-size: 1ex;
|
|
36
37
|
content: "";
|
|
37
38
|
display: inline-block;
|
|
38
|
-
|
|
39
|
+
inline-size: 1ex;
|
|
39
40
|
margin-inline: 0.5rem;
|
|
40
|
-
width: 1ex;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ams-breadcrumb__link {
|
|
44
|
-
color: var(--ams-breadcrumb-
|
|
45
|
-
outline-offset: var(--ams-breadcrumb-
|
|
46
|
-
text-decoration-line: var(--ams-breadcrumb-
|
|
47
|
-
text-decoration-thickness: var(--ams-breadcrumb-
|
|
48
|
-
text-underline-offset: var(--ams-breadcrumb-
|
|
44
|
+
color: var(--ams-breadcrumb-link-color);
|
|
45
|
+
outline-offset: var(--ams-breadcrumb-link-outline-offset);
|
|
46
|
+
text-decoration-line: var(--ams-breadcrumb-link-text-decoration-line);
|
|
47
|
+
text-decoration-thickness: var(--ams-breadcrumb-link-text-decoration-thickness);
|
|
48
|
+
text-underline-offset: var(--ams-breadcrumb-link-text-underline-offset);
|
|
49
49
|
|
|
50
50
|
&:hover {
|
|
51
|
-
color: var(--ams-breadcrumb-
|
|
52
|
-
text-decoration-line: var(--ams-breadcrumb-
|
|
51
|
+
color: var(--ams-breadcrumb-link-hover-color);
|
|
52
|
+
text-decoration-line: var(--ams-breadcrumb-link-hover-text-decoration-line);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
font-family: var(--ams-button-font-family);
|
|
16
16
|
font-size: var(--ams-button-font-size);
|
|
17
17
|
gap: var(--ams-button-gap);
|
|
18
|
+
justify-content: center;
|
|
18
19
|
line-height: var(--ams-button-line-height);
|
|
19
20
|
outline-offset: var(--ams-button-outline-offset);
|
|
20
21
|
padding-block: var(--ams-button-padding-block);
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
|
|
15
15
|
.ams-checkbox__checkmark {
|
|
16
16
|
align-items: center;
|
|
17
|
+
block-size: calc(var(--ams-checkbox-font-size) * var(--ams-checkbox-line-height));
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-shrink: 0;
|
|
19
|
-
|
|
20
|
-
width: 1.5rem;
|
|
20
|
+
inline-size: 1.5rem;
|
|
21
21
|
|
|
22
22
|
&::after {
|
|
23
23
|
background-position: center;
|
|
24
24
|
background-repeat: no-repeat;
|
|
25
25
|
background-size: 1rem;
|
|
26
|
+
block-size: 1.5rem;
|
|
26
27
|
border-color: var(--ams-checkbox-checkmark-border-color);
|
|
27
28
|
border-style: solid;
|
|
28
29
|
border-width: var(--ams-checkbox-checkmark-border-width);
|
|
29
30
|
box-sizing: border-box;
|
|
30
31
|
content: "";
|
|
31
|
-
|
|
32
|
-
width: 100%;
|
|
32
|
+
inline-size: 100%;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
@import "../../common/text-rendering";
|
|
7
7
|
|
|
8
8
|
@mixin reset {
|
|
9
|
-
// Reset
|
|
10
|
-
|
|
11
|
-
appearance: none;
|
|
9
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
10
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
12
11
|
border: 0;
|
|
13
12
|
border-radius: 0; // Reset rounded borders on iOS devices
|
|
14
13
|
box-sizing: border-box;
|
|
@@ -24,13 +23,13 @@
|
|
|
24
23
|
font-weight: var(--ams-date-input-font-weight);
|
|
25
24
|
line-height: var(--ams-date-input-line-height);
|
|
26
25
|
|
|
27
|
-
// Set min
|
|
28
|
-
min-
|
|
26
|
+
// Set min block size for iOS, otherwise an empty box is a lot smaller than a filled one.
|
|
27
|
+
min-block-size: calc(
|
|
29
28
|
(var(--ams-date-input-font-size) * var(--ams-date-input-line-height)) + 2 * var(--ams-date-input-padding-block)
|
|
30
29
|
);
|
|
31
30
|
|
|
32
|
-
// Set min
|
|
33
|
-
min-
|
|
31
|
+
// Set min inline size for iOS, so the size is closer to the filled in size.
|
|
32
|
+
min-inline-size: calc(8ch + (2 * var(--ams-date-input-padding-inline)));
|
|
34
33
|
outline-offset: var(--ams-date-input-outline-offset);
|
|
35
34
|
padding-block: var(--ams-date-input-padding-block);
|
|
36
35
|
padding-inline: var(--ams-date-input-padding-inline);
|
|
@@ -10,6 +10,13 @@ A Dialog allows the user to focus on one task or a piece of information by poppi
|
|
|
10
10
|
- Use a dialog for short and non-frequent tasks.
|
|
11
11
|
Consider using the main flow for regular tasks.
|
|
12
12
|
|
|
13
|
+
## The order of buttons
|
|
14
|
+
|
|
15
|
+
If your Dialog needs more than one button, put the one for the primary action first and the other buttons behind it.
|
|
16
|
+
Sighted users will read the primary action first, in line with the natural reading order.
|
|
17
|
+
The same goes for users of screen readers, who will hear the primary action first, and users of a keyboard, who will focus the primary action first.
|
|
18
|
+
Also, this approach keeps the order of buttons consistent on both narrow and wide screens: if the buttons do not fit next to each other, they get stacked vertically with the primary action on top.
|
|
19
|
+
|
|
13
20
|
## Keyboard Support
|
|
14
21
|
|
|
15
22
|
| key | function |
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
@import "../../common/breakpoint";
|
|
7
|
-
|
|
8
6
|
.ams-dialog {
|
|
9
7
|
background-color: var(--ams-dialog-background-color);
|
|
10
8
|
border: var(--ams-dialog-border);
|
|
@@ -48,11 +46,13 @@
|
|
|
48
46
|
|
|
49
47
|
.ams-dialog__footer {
|
|
50
48
|
display: flex;
|
|
51
|
-
flex-
|
|
52
|
-
|
|
49
|
+
flex-wrap: wrap; // [1]
|
|
50
|
+
gap: var(--ams-dialog-footer-gap);
|
|
51
|
+
margin-inline-end: auto; // [1]
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
flex
|
|
56
|
-
justify-content: end;
|
|
53
|
+
> * {
|
|
54
|
+
flex: auto; // [1]
|
|
57
55
|
}
|
|
58
56
|
}
|
|
57
|
+
|
|
58
|
+
// [1] This combination stacks the buttons vertically and stretches them, until they fit next to each other.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Error Message
|
|
4
|
+
|
|
5
|
+
Show an error message when there is a form field validation error.
|
|
6
|
+
In the error message explain what went wrong and how to fix it.
|
|
7
|
+
|
|
8
|
+
For guidance and examples on using error messages in a form,
|
|
9
|
+
refer to the [Field](/docs/components-forms-field--docs) and [Field Set](/docs/components-forms-field-set--docs) documentation.
|
|
10
|
+
|
|
11
|
+
Read the documentation by [NL Design System](https://www.nldesignsystem.nl/richtlijnen/formulieren/foutmeldingen) and [Gov.uk](https://design-system.service.gov.uk/components/error-message/) for more information on the contents of error messages and when to show them.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
margin-block: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ams-error-message {
|
|
14
|
+
color: var(--ams-error-message-color);
|
|
15
|
+
font-family: var(--ams-error-message-font-family);
|
|
16
|
+
font-size: var(--ams-error-message-font-size);
|
|
17
|
+
font-weight: var(--ams-error-message-font-weight);
|
|
18
|
+
line-height: var(--ams-error-message-line-height);
|
|
19
|
+
|
|
20
|
+
@include text-rendering;
|
|
21
|
+
@include reset;
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Field
|
|
4
|
+
|
|
5
|
+
Wraps a single input and its related elements. May indicate that the input has a validation error.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
Only use Field to wrap a single input. Use [Field Set](/docs/components-forms-field-set--docs) to wrap multiple inputs.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.ams-field {
|
|
7
|
+
break-inside: avoid;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--ams-field-gap);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ams-field--invalid {
|
|
14
|
+
border-inline-start: var(--ams-field-invalid-border-inline-start);
|
|
15
|
+
padding-inline-start: var(--ams-field-invalid-padding-inline-start);
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Field Set
|
|
4
|
+
|
|
5
|
+
A component to group related form inputs.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
|
|
9
|
+
- Use Field Set 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 Field Set when asking for an address.
|
|
10
|
+
|
|
11
|
+
## Relevant WCAG Requirements
|
|
12
|
+
|
|
13
|
+
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Field Set labels the purpose of a group of inputs.
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
- [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG22/Techniques/html/H71)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/hyphenation";
|
|
7
|
+
@import "../../common/text-rendering";
|
|
8
|
+
|
|
9
|
+
@mixin reset {
|
|
10
|
+
border: 0;
|
|
11
|
+
margin-inline: 0;
|
|
12
|
+
padding-block: 0;
|
|
13
|
+
padding-inline: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ams-field-set {
|
|
17
|
+
break-inside: avoid;
|
|
18
|
+
|
|
19
|
+
@include reset;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ams-field-set--invalid {
|
|
23
|
+
border-inline-start: var(--ams-field-set-invalid-border-inline-start);
|
|
24
|
+
padding-inline-start: var(--ams-field-set-invalid-padding-inline-start);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin reset-legend {
|
|
28
|
+
float: inline-start; // [1]
|
|
29
|
+
inline-size: 100%; // [1]
|
|
30
|
+
padding-inline: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// [1] This combination allows the fieldset border to go around the legend, instead of through it.
|
|
34
|
+
|
|
35
|
+
.ams-field-set__legend {
|
|
36
|
+
color: var(--ams-field-set-legend-color);
|
|
37
|
+
font-family: var(--ams-field-set-legend-font-family);
|
|
38
|
+
font-size: var(--ams-field-set-legend-font-size);
|
|
39
|
+
font-weight: var(--ams-field-set-legend-font-weight);
|
|
40
|
+
line-height: var(--ams-field-set-legend-line-height);
|
|
41
|
+
margin-block-end: var(
|
|
42
|
+
--ams-field-set-legend-margin-block-end
|
|
43
|
+
); /* Because of a bug in Chrome we can’t use display grid or flex for this gap */
|
|
44
|
+
|
|
45
|
+
@include hyphenation;
|
|
46
|
+
@include text-rendering;
|
|
47
|
+
@include reset-legend;
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# File Input
|
|
4
|
+
|
|
5
|
+
Allows the user to upload one or more files from their device.
|
|
6
|
+
|
|
7
|
+
## Visual considerations
|
|
8
|
+
|
|
9
|
+
The filename label and button are displayed in the language of the browser and can vary between browsers and operating systems.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
@mixin reset-button {
|
|
9
|
+
border: 0;
|
|
10
|
+
border-radius: 0; // Reset rounded borders on iOS devices
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ams-file-input {
|
|
15
|
+
background-color: var(--ams-file-input-background-color);
|
|
16
|
+
border: var(--ams-file-input-border);
|
|
17
|
+
color: var(--ams-file-input-color);
|
|
18
|
+
cursor: var(--ams-file-input-cursor);
|
|
19
|
+
font-family: var(--ams-file-input-font-family);
|
|
20
|
+
font-size: var(--ams-file-input-font-size);
|
|
21
|
+
font-weight: var(--ams-file-input-font-weight);
|
|
22
|
+
line-height: var(--ams-file-input-line-height);
|
|
23
|
+
max-inline-size: calc(100% - var(--ams-file-input-padding-inline) * 2);
|
|
24
|
+
outline-offset: 0.25rem; // Double the default focus outline offset to compensate for the dashed border
|
|
25
|
+
padding-block: var(--ams-file-input-padding-block);
|
|
26
|
+
padding-inline: var(--ams-file-input-padding-inline);
|
|
27
|
+
touch-action: manipulation;
|
|
28
|
+
|
|
29
|
+
@include text-rendering;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ams-file-input:disabled {
|
|
33
|
+
color: var(--ams-file-input-disabled-color);
|
|
34
|
+
cursor: var(--ams-file-input-disabled-cursor);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ams-file-input::file-selector-button {
|
|
38
|
+
-webkit-appearance: none; // Reset appearance for Safari < 15.4
|
|
39
|
+
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
|
|
40
|
+
background-color: var(--ams-file-input-file-selector-button-background-color);
|
|
41
|
+
box-shadow: var(--ams-file-input-file-selector-button-box-shadow);
|
|
42
|
+
color: var(--ams-file-input-file-selector-button-color);
|
|
43
|
+
cursor: var(--ams-file-input-file-selector-button-cursor);
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
font-size: inherit; // iOS specific fix
|
|
46
|
+
font-weight: inherit;
|
|
47
|
+
margin-inline-end: var(--ams-file-input-file-selector-button-margin-inline-end);
|
|
48
|
+
padding-block: var(--ams-file-input-file-selector-button-padding-block);
|
|
49
|
+
padding-inline: var(--ams-file-input-file-selector-button-padding-inline);
|
|
50
|
+
|
|
51
|
+
@media screen and (-ms-high-contrast: active), screen and (forced-colors: active) {
|
|
52
|
+
border: var(
|
|
53
|
+
--ams-file-input-file-selector-button-forced-color-mode-border
|
|
54
|
+
); // add border because forced colors changes box-shadow to none
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include reset-button;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ams-file-input:disabled::file-selector-button {
|
|
61
|
+
box-shadow: var(--ams-file-input-file-selector-button-disabled-box-shadow);
|
|
62
|
+
color: var(--ams-file-input-disabled-color);
|
|
63
|
+
cursor: var(--ams-file-input-file-selector-button-disabled-cursor);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ams-file-input:not(:disabled):hover::file-selector-button {
|
|
67
|
+
box-shadow: var(--ams-file-input-file-selector-button-hover-box-shadow);
|
|
68
|
+
color: var(--ams-file-input-file-selector-button-hover-color);
|
|
69
|
+
}
|
|
@@ -51,27 +51,27 @@
|
|
|
51
51
|
flex: 1 1 100%;
|
|
52
52
|
|
|
53
53
|
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
54
|
-
min-
|
|
54
|
+
min-inline-size: 0;
|
|
55
55
|
order: 2;
|
|
56
56
|
|
|
57
57
|
.ams-header__title-heading {
|
|
58
58
|
display: block;
|
|
59
|
+
inline-size: 100%;
|
|
59
60
|
line-height: 1;
|
|
60
61
|
overflow: hidden;
|
|
61
62
|
text-overflow: ellipsis;
|
|
62
63
|
white-space: nowrap;
|
|
63
|
-
width: 100%;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// Temporary
|
|
68
|
+
// Temporary – will move to Mega Menu and/or Icon Button
|
|
69
69
|
.ams-header__menu-button {
|
|
70
70
|
background-color: transparent;
|
|
71
71
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23004699' fill-rule='evenodd' d='M0 3.238h32V7.81H0V3.238zm0 10.476h32v4.572H0v-4.572zM0 24.19h32v4.572H0V24.19z'/></svg>");
|
|
72
72
|
background-position: center right;
|
|
73
73
|
background-repeat: no-repeat;
|
|
74
|
-
background-size:
|
|
74
|
+
background-size: 1.1875rem 1.1875rem;
|
|
75
75
|
border: 0;
|
|
76
76
|
color: var(--ams-page-menu-item-color);
|
|
77
77
|
font-family: var(--ams-page-menu-item-font-family);
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
font-weight: var(--ams-page-menu-item-font-weight);
|
|
80
80
|
line-height: var(--ams-page-menu-item-line-height);
|
|
81
81
|
margin-block: 0;
|
|
82
|
-
padding-inline: 0
|
|
82
|
+
padding-inline: 0 1.875rem;
|
|
83
83
|
text-align: center;
|
|
84
84
|
touch-action: manipulation;
|
|
85
85
|
}
|