@amsterdam/design-system-css 2.0.1 → 2.1.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 +23 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/app/app.css +40 -0
- package/dist/app/app.css.map +1 -0
- package/dist/app-navigation/app-navigation.css +249 -0
- package/dist/app-navigation/app-navigation.css.map +1 -0
- package/dist/badge/badge.css.map +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/breakout/breakout.css +1 -1
- package/dist/breakout/breakout.css.map +1 -1
- package/dist/button/button.css +101 -1
- package/dist/button/button.css.map +1 -1
- package/dist/call-to-action-link/call-to-action-link.css.map +1 -1
- package/dist/card/card.css +1 -1
- package/dist/card/card.css.map +1 -1
- package/dist/character-count/character-count.css.map +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/description-list/description-list.css +1 -1
- package/dist/description-list/description-list.css.map +1 -1
- package/dist/error-message/error-message.css.map +1 -1
- package/dist/field-set/field-set.css +1 -1
- package/dist/field-set/field-set.css.map +1 -1
- package/dist/figure/figure.css.map +1 -1
- package/dist/file-input/file-input.css.map +1 -1
- package/dist/file-list/file-list.css.map +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/image-slider/image-slider.css.map +1 -1
- package/dist/index.css +4709 -1
- package/dist/index.css.map +1 -1
- package/dist/label/label.css +1 -1
- package/dist/label/label.css.map +1 -1
- package/dist/link/link.css.map +1 -1
- package/dist/link-list/link-list.css.map +1 -1
- package/dist/menu/menu.css +1 -1
- package/dist/menu/menu.css.map +1 -1
- package/dist/ordered-list/ordered-list.css.map +1 -1
- package/dist/page-footer/page-footer.css.map +1 -1
- package/dist/page-header/page-header.css +1 -1
- package/dist/page-header/page-header.css.map +1 -1
- package/dist/page-heading/page-heading.deprecated.css.map +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/paragraph/paragraph.css.map +1 -1
- package/dist/password-input/password-input.css.map +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/standalone-link/standalone-link.css.map +1 -1
- package/dist/table-of-contents/table-of-contents.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.map +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.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 -0
- package/package.json +3 -3
- package/src/common/calculate-fluid-style.scss +2 -0
- package/src/common/hyphenation.scss +3 -0
- package/src/common/text-rendering.scss +3 -0
- package/src/components/breadcrumb/breadcrumb.scss +6 -1
- package/src/components/breakout/breakout.scss +9 -1
- package/src/components/card/card.scss +17 -8
- package/src/components/checkbox/checkbox.scss +2 -0
- package/src/components/date-input/date-input.scss +4 -4
- package/src/components/description-list/description-list.scss +0 -6
- package/src/components/field-set/field-set.scss +15 -1
- package/src/components/grid/_mixins.scss +2 -0
- package/src/components/heading/heading.scss +12 -0
- package/src/components/image-slider/image-slider.scss +10 -4
- package/src/components/label/label.scss +12 -0
- package/src/components/menu/README.md +16 -2
- package/src/components/menu/menu.scss +38 -4
- package/src/components/page-header/page-header.scss +14 -0
- package/src/components/page-heading/page-heading.deprecated.scss +2 -0
- package/src/components/tabs/tabs.scss +4 -0
- package/src/components/text-area/text-area.scss +7 -0
- package/src/components/time-input/time-input.scss +4 -4
- package/src/components/visually-hidden/visually-hidden.scss +4 -1
|
@@ -12,11 +12,23 @@
|
|
|
12
12
|
|
|
13
13
|
.ams-heading {
|
|
14
14
|
box-sizing: border-box;
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* If break-after is supported, use it to avoid a Heading from being the last item on a page when printed.
|
|
18
|
+
* If it is not supported, it is ignored.
|
|
19
|
+
*/
|
|
20
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
15
21
|
break-after: avoid;
|
|
16
22
|
break-inside: avoid;
|
|
17
23
|
color: var(--ams-heading-color);
|
|
18
24
|
font-family: var(--ams-heading-font-family);
|
|
19
25
|
font-weight: var(--ams-heading-font-weight);
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* If text-wrap is not supported, it is ignored.
|
|
29
|
+
* This means the wrapped text will look less balanced, which is fine.
|
|
30
|
+
*/
|
|
31
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
20
32
|
text-wrap: var(--ams-heading-text-wrap);
|
|
21
33
|
|
|
22
34
|
@include hyphenation;
|
|
@@ -33,12 +33,18 @@
|
|
|
33
33
|
overflow-x: auto;
|
|
34
34
|
overscroll-behavior-x: contain;
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
/*
|
|
37
|
+
* Required for the goToSlide function to work properly.
|
|
38
|
+
* Ensures that the offset of the slides is calculated relative to the scroller container.
|
|
39
|
+
*/
|
|
40
40
|
position: relative;
|
|
41
41
|
scroll-snap-type: x mandatory;
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* Hide the scrollbar in Firefox.
|
|
45
|
+
* Firefox has full support for this property.
|
|
46
|
+
*/
|
|
47
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
42
48
|
scrollbar-width: none;
|
|
43
49
|
|
|
44
50
|
&::-webkit-scrollbar {
|
|
@@ -12,8 +12,20 @@
|
|
|
12
12
|
font-size: var(--ams-label-font-size);
|
|
13
13
|
font-weight: var(--ams-label-font-weight);
|
|
14
14
|
line-height: var(--ams-label-line-height);
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* If text-wrap is not supported, it is ignored.
|
|
18
|
+
* This means the wrapped text will look less balanced, which is fine.
|
|
19
|
+
*/
|
|
20
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
15
21
|
text-wrap: var(--ams-label-text-wrap);
|
|
16
22
|
|
|
17
23
|
@include hyphenation;
|
|
18
24
|
@include text-rendering;
|
|
19
25
|
}
|
|
26
|
+
|
|
27
|
+
.ams-label__heading {
|
|
28
|
+
font-size: var(--ams-label-font-size);
|
|
29
|
+
font-weight: var(--ams-label-font-weight);
|
|
30
|
+
margin-block: 0;
|
|
31
|
+
}
|
|
@@ -4,5 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
A primary navigation leading to key areas of an application or website.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## Design
|
|
8
|
+
|
|
9
|
+
- The menu has a blue background.
|
|
10
|
+
Links have a white icon and a label.
|
|
11
|
+
- In a narrow window, the menu occupies the full width.
|
|
12
|
+
The icon and label of the link sit next to each other.
|
|
13
|
+
- In a wide window, the menu has a maximum width of 8rem.
|
|
14
|
+
It adds whitespace at the top to align with the baseline of Page Header.
|
|
15
|
+
The icon is larger and positioned above the label.
|
|
16
|
+
|
|
17
|
+
## Guidelines
|
|
18
|
+
|
|
19
|
+
- Include this component twice: one in the Page Header and one to the side of the Page.
|
|
20
|
+
Do not use it anywhere else.
|
|
21
|
+
- Set the `inWideWindow` prop to the latter to ensure only one of them is visible, and to get the correct appearance.
|
|
22
|
+
- Use filled icons for the links.
|
|
@@ -14,10 +14,40 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ams-menu {
|
|
17
|
+
background-color: var(--ams-menu-background-color);
|
|
17
18
|
font-family: var(--ams-menu-font-family);
|
|
18
19
|
font-size: var(--ams-menu-font-size);
|
|
19
20
|
font-weight: var(--ams-menu-font-weight);
|
|
20
21
|
line-height: var(--ams-menu-line-height);
|
|
22
|
+
|
|
23
|
+
// Menu must overlap the horizontal padding of Page Header to span the entire window.
|
|
24
|
+
// We accept that this approach with a negative margin tightly couples the component to that context.
|
|
25
|
+
margin-inline: calc(var(--ams-grid-padding-inline) * -1);
|
|
26
|
+
padding-block: var(--ams-menu-padding-block);
|
|
27
|
+
|
|
28
|
+
// We subtract the menu link padding to align the items with surrounding content.
|
|
29
|
+
padding-inline: calc(var(--ams-grid-padding-inline) - var(--ams-menu-link-padding-inline));
|
|
30
|
+
|
|
31
|
+
@media screen and (min-width: $ams-breakpoint-medium) {
|
|
32
|
+
margin-inline: calc(var(--ams-grid-medium-padding-inline) * -1);
|
|
33
|
+
padding-inline: var(--ams-grid-medium-padding-inline);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
37
|
+
display: none;
|
|
38
|
+
margin-inline: 0; // Override negative margin above.
|
|
39
|
+
max-inline-size: var(--ams-menu-wide-max-inline-size);
|
|
40
|
+
padding-block: var(--ams-menu-wide-padding-block);
|
|
41
|
+
padding-inline: var(--ams-menu-wide-padding-inline);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ams-menu--in-wide-window {
|
|
46
|
+
display: none;
|
|
47
|
+
|
|
48
|
+
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
21
51
|
}
|
|
22
52
|
|
|
23
53
|
.ams-menu__list {
|
|
@@ -35,7 +65,7 @@
|
|
|
35
65
|
.ams-menu__link {
|
|
36
66
|
align-items: flex-start;
|
|
37
67
|
color: var(--ams-menu-link-color);
|
|
38
|
-
display: flex;
|
|
68
|
+
display: inline-flex; // Inline display prevents an excessive hit area next to the link text.
|
|
39
69
|
gap: var(--ams-menu-link-gap);
|
|
40
70
|
outline-offset: var(--ams-menu-link-outline-offset);
|
|
41
71
|
padding-block: var(--ams-menu-link-padding-block);
|
|
@@ -55,16 +85,19 @@
|
|
|
55
85
|
|
|
56
86
|
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
57
87
|
align-items: center;
|
|
88
|
+
display: flex; // The links do stretch in the vertical layout of Menu.
|
|
58
89
|
flex-direction: column;
|
|
59
|
-
gap:
|
|
90
|
+
gap: var(--ams-menu-link-wide-gap);
|
|
91
|
+
text-align: center;
|
|
60
92
|
|
|
61
93
|
.ams-menu__icon {
|
|
62
|
-
--ams-icon-font-size: var(--ams-icon-heading-
|
|
63
|
-
--ams-icon-line-height: var(--ams-icon-heading-
|
|
94
|
+
--ams-icon-font-size: var(--ams-icon-heading-2-font-size);
|
|
95
|
+
--ams-icon-line-height: var(--ams-icon-heading-2-line-height);
|
|
64
96
|
}
|
|
65
97
|
}
|
|
66
98
|
}
|
|
67
99
|
|
|
100
|
+
/** @deprecated The menu has a dark background now, so this is no longer needed. */
|
|
68
101
|
.ams-menu__link--contrast {
|
|
69
102
|
color: var(--ams-menu-link-contrast-color);
|
|
70
103
|
|
|
@@ -73,6 +106,7 @@
|
|
|
73
106
|
}
|
|
74
107
|
}
|
|
75
108
|
|
|
109
|
+
/** @deprecated The menu has a dark background now, so this is no longer needed. */
|
|
76
110
|
.ams-menu__link--inverse {
|
|
77
111
|
color: var(--ams-menu-link-inverse-color);
|
|
78
112
|
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
|
|
48
48
|
.ams-page-header__logo-link--hidden {
|
|
49
49
|
opacity: 0%;
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
|
|
52
|
+
/* Safari support is added with the prefixed property. */
|
|
53
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
50
54
|
user-select: none; // The hidden logo link section should not be selectable
|
|
51
55
|
}
|
|
52
56
|
|
|
@@ -65,6 +69,12 @@
|
|
|
65
69
|
font-size: var(--ams-page-header-brand-name-font-size);
|
|
66
70
|
font-weight: var(--ams-page-header-brand-name-font-weight);
|
|
67
71
|
line-height: var(--ams-page-header-brand-name-line-height);
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
* If text-wrap is not supported, it is ignored.
|
|
75
|
+
* This means the wrapped text will look less balanced, which is fine.
|
|
76
|
+
*/
|
|
77
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
68
78
|
text-wrap: var(--ams-page-header-brand-name-text-wrap);
|
|
69
79
|
}
|
|
70
80
|
|
|
@@ -181,6 +191,10 @@
|
|
|
181
191
|
.ams-page-header__mega-menu-button-hidden-label {
|
|
182
192
|
font-weight: var(--ams-page-header-mega-menu-button-label-open-font-weight);
|
|
183
193
|
pointer-events: none;
|
|
194
|
+
-webkit-user-select: none;
|
|
195
|
+
|
|
196
|
+
/* Safari support is added with the prefixed property. */
|
|
197
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
184
198
|
user-select: none;
|
|
185
199
|
visibility: hidden;
|
|
186
200
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
/* @deprecated We no longer use this size of headings. Use `.ams-heading.ams-heading--1` instead. */
|
|
14
14
|
.ams-page-heading {
|
|
15
15
|
box-sizing: border-box;
|
|
16
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
16
17
|
break-after: avoid;
|
|
17
18
|
break-inside: avoid;
|
|
18
19
|
color: var(--ams-page-heading-color);
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
font-size: var(--ams-page-heading-font-size);
|
|
21
22
|
font-weight: var(--ams-page-heading-font-weight);
|
|
22
23
|
line-height: var(--ams-page-heading-line-height);
|
|
24
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
23
25
|
text-wrap: var(--ams-page-heading-text-wrap);
|
|
24
26
|
|
|
25
27
|
@include hyphenation;
|
|
@@ -77,6 +77,10 @@
|
|
|
77
77
|
.ams-tabs__button-label-hidden {
|
|
78
78
|
font-weight: var(--ams-tabs-button-selected-font-weight);
|
|
79
79
|
pointer-events: none;
|
|
80
|
+
-webkit-user-select: none;
|
|
81
|
+
|
|
82
|
+
/* Safari support is added with the prefixed property. */
|
|
83
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
80
84
|
user-select: none;
|
|
81
85
|
visibility: hidden;
|
|
82
86
|
}
|
|
@@ -65,15 +65,22 @@
|
|
|
65
65
|
box-shadow: var(--ams-text-area-invalid-hover-box-shadow);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/*
|
|
69
|
+
* Resizing is not fully supported in Safari on iOS.
|
|
70
|
+
* This is acceptable, it is not crucial functionality.
|
|
71
|
+
*/
|
|
68
72
|
.ams-text-area--resize-none {
|
|
73
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
69
74
|
resize: none;
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
.ams-text-area--resize-horizontal {
|
|
78
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
73
79
|
resize: inline;
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
.ams-text-area--resize-vertical {
|
|
83
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
77
84
|
resize: block;
|
|
78
85
|
}
|
|
79
86
|
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
// This changes the default calendar icon on Chromium browsers only
|
|
55
55
|
.ams-time-input::-webkit-calendar-picker-indicator {
|
|
56
56
|
appearance: none;
|
|
57
|
-
background-image: var(--ams-time-input-
|
|
58
|
-
cursor: var(--ams-time-input-
|
|
57
|
+
background-image: var(--ams-time-input-calendar-picker-indicator-background-image);
|
|
58
|
+
cursor: var(--ams-time-input-calendar-picker-indicator-cursor);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.ams-time-input:hover::-webkit-calendar-picker-indicator {
|
|
62
|
-
background-image: var(--ams-time-input-hover-
|
|
62
|
+
background-image: var(--ams-time-input-hover-calendar-picker-indicator-background-image);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ams-time-input:disabled {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.ams-time-input:disabled::-webkit-calendar-picker-indicator {
|
|
71
|
-
background-image: var(--ams-time-input-disabled-
|
|
71
|
+
background-image: var(--ams-time-input-disabled-calendar-picker-indicator-background-image);
|
|
72
72
|
visibility: visible;
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
// Source: https://css-tricks.com/inclusively-hidden/
|
|
7
7
|
.ams-visually-hidden:not(:active, :focus) {
|
|
8
8
|
block-size: 1px;
|
|
9
|
-
clip: rect(0 0 0 0);
|
|
10
9
|
clip-path: inset(50%);
|
|
11
10
|
inline-size: 1px;
|
|
12
11
|
overflow: hidden;
|
|
13
12
|
position: absolute;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
|
|
15
|
+
/* Safari support is added with the prefixed property. */
|
|
16
|
+
/* stylelint-disable-next-line plugin/use-baseline */
|
|
14
17
|
user-select: none;
|
|
15
18
|
white-space: nowrap;
|
|
16
19
|
}
|