@amsterdam/design-system-css 2.2.0 → 3.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +3 -3
  3. package/dist/badge/badge.css +1 -1
  4. package/dist/badge/badge.css.map +1 -1
  5. package/dist/date-input/date-input.css +1 -1
  6. package/dist/date-input/date-input.css.map +1 -1
  7. package/dist/error-message/error-message.css +1 -1
  8. package/dist/error-message/error-message.css.map +1 -1
  9. package/dist/field/field.css +1 -1
  10. package/dist/field/field.css.map +1 -1
  11. package/dist/field-set/field-set.css +1 -1
  12. package/dist/field-set/field-set.css.map +1 -1
  13. package/dist/file-input/file-input.css +1 -1
  14. package/dist/file-input/file-input.css.map +1 -1
  15. package/dist/image-slider/image-slider.css +1 -1
  16. package/dist/image-slider/image-slider.css.map +1 -1
  17. package/dist/index.css +1 -1
  18. package/dist/index.css.map +1 -1
  19. package/dist/label/label.css +1 -1
  20. package/dist/label/label.css.map +1 -1
  21. package/dist/page-header/page-header.css +1 -1
  22. package/dist/page-header/page-header.css.map +1 -1
  23. package/dist/paragraph/paragraph.css +1 -1
  24. package/dist/paragraph/paragraph.css.map +1 -1
  25. package/dist/progress-list/progress-list.css +1 -0
  26. package/dist/progress-list/progress-list.css.map +1 -0
  27. package/dist/time-input/time-input.css +1 -1
  28. package/dist/time-input/time-input.css.map +1 -1
  29. package/package.json +4 -4
  30. package/src/components/alert/README.md +1 -1
  31. package/src/components/avatar/README.md +1 -1
  32. package/src/components/badge/badge.scss +2 -1
  33. package/src/components/date-input/date-input.scss +0 -5
  34. package/src/components/error-message/error-message.scss +1 -1
  35. package/src/components/field/README.md +1 -0
  36. package/src/components/field/field.scss +12 -3
  37. package/src/components/field-set/README.md +1 -0
  38. package/src/components/field-set/field-set.scss +25 -1
  39. package/src/components/file-input/file-input.scss +0 -6
  40. package/src/components/gap/README.md +1 -1
  41. package/src/components/grid/README.md +1 -0
  42. package/src/components/icon/README.md +1 -1
  43. package/src/components/image-slider/image-slider.scss +0 -10
  44. package/src/components/index.scss +1 -0
  45. package/src/components/label/label.scss +1 -0
  46. package/src/components/link/README.md +1 -1
  47. package/src/components/logo/README.md +3 -3
  48. package/src/components/margin/README.md +1 -1
  49. package/src/components/menu/README.md +3 -2
  50. package/src/components/page/README.md +2 -2
  51. package/src/components/page-footer/README.md +17 -14
  52. package/src/components/page-header/README.md +6 -4
  53. package/src/components/page-header/page-header.scss +7 -0
  54. package/src/components/paragraph/paragraph.scss +18 -3
  55. package/src/components/progress-list/README.md +14 -0
  56. package/src/components/progress-list/progress-list.scss +248 -0
  57. package/src/components/time-input/time-input.scss +0 -5
@@ -3,15 +3,15 @@
3
3
  # Page Header
4
4
 
5
5
  Displays the City’s logo at the top of every page, and optionally a navigation menu.
6
- Includes the name of the application if it is not the general website.
6
+ Includes the name of the website if it is not the general one.
7
7
 
8
8
  ## Guidelines
9
9
 
10
- - The Page Header must be used on all websites and applications for the City of Amsterdam.
10
+ - The Page Header must be used on all websites for the City of Amsterdam.
11
11
  - It includes the logo of the City or the organization, the site title (except for the general website), and a menu with links to commonly used pages.
12
12
  - The Page Header is important because it conveys our corporate identity and is the first thing people see.
13
- Using it consistently helps users recognise and trust the website.
14
- - The Page Header is the same on every page of the application, although full-screen pages may hide it, e.g. a video or a map.
13
+ Using it consistently helps users recognize and trust the website.
14
+ - The Page Header is the same on every page of the website, although full-screen pages may hide it, e.g. a video or a map.
15
15
  - The inline menu can contain a maximum of 5 items.
16
16
  The last two will often be ‘Search’ and ‘Menu’.
17
17
  - An icon can be added to such a menu item if it helps clarify it, e.g. for searching and for logging in and out.
@@ -21,6 +21,8 @@ Includes the name of the application if it is not the general website.
21
21
  - An icon can be added to the end of a link to make its destination easier to guess.
22
22
  - For websites with a brand name that feature the standard Amsterdam logo, only the emblem is shown on narrow screens.
23
23
  - If the collapsible menu contains [Headings](https://designsystem.amsterdam/?path=/docs/components-text-heading--docs), give them level 2 and a size of ‘level-3’.
24
+ - There’s no need to add whitespace to the Grid in the collapsible menu.
25
+ Its container already does this.
24
26
 
25
27
  ## References
26
28
 
@@ -151,6 +151,10 @@
151
151
  }
152
152
  }
153
153
 
154
+ .ams-page-header__mega-menu-button-item {
155
+ display: initial; // Override the `hidden` attribute; the mega menu list item is only shown when CSS loads.
156
+ }
157
+
154
158
  .ams-page-header__mega-menu-button-item--hide-on-wide-window {
155
159
  @media screen and (min-width: $ams-breakpoint-wide) {
156
160
  display: none;
@@ -232,6 +236,7 @@
232
236
 
233
237
  .ams-page-header__mega-menu {
234
238
  inline-size: 100%;
239
+ padding-block: var(--ams-page-header-mega-menu-padding-block);
235
240
  pointer-events: auto; // Set pointer events back to auto to allow the mega menu to be activated
236
241
 
237
242
  // Remove inline padding from Grids that are used in the mega menu.
@@ -246,6 +251,8 @@
246
251
  }
247
252
 
248
253
  .ams-page-header__grid-cell-narrow-window-only {
254
+ display: initial; // Override the `hidden` attribute; this cell duplicates the non-fixed links in the Page Header Menu.
255
+
249
256
  @media screen and (min-width: $ams-breakpoint-wide) {
250
257
  display: none;
251
258
  }
@@ -23,14 +23,29 @@
23
23
  @include reset-p;
24
24
  }
25
25
 
26
+ .ams-paragraph--large {
27
+ font-size: var(--ams-paragraph-large-font-size);
28
+ line-height: var(--ams-paragraph-large-line-height);
29
+
30
+ /*
31
+ * If text-wrap is not supported, it is ignored.
32
+ * This means the wrapped text will look less balanced, which is fine.
33
+ */
34
+ /* stylelint-disable-next-line plugin/use-baseline */
35
+ text-wrap: var(--ams-paragraph-large-text-wrap);
36
+ }
37
+
38
+ .ams-paragraph__b {
39
+ font-weight: inherit;
40
+ }
41
+
26
42
  .ams-paragraph--small {
27
43
  font-size: var(--ams-paragraph-small-font-size);
28
44
  line-height: var(--ams-paragraph-small-line-height);
29
45
  }
30
46
 
31
- .ams-paragraph--large {
32
- font-size: var(--ams-paragraph-large-font-size);
33
- line-height: var(--ams-paragraph-large-line-height);
47
+ .ams-paragraph__small {
48
+ font-size: inherit;
34
49
  }
35
50
 
36
51
  .ams-paragraph--inverse {
@@ -0,0 +1,14 @@
1
+ <!-- @license CC0-1.0 -->
2
+
3
+ # Progress List
4
+
5
+ Displays the progress of a sequence of steps, with optional additional details per step.
6
+
7
+ ## Guidelines
8
+
9
+ - Choose the correct level for the steps’ headings.
10
+ - Assign a status to each step: _completed_ or _current_.
11
+ Steps without a status are considered _upcoming_.
12
+ - Maintain a correct chronological order.
13
+ Only one step may be _current_; preceding steps must be _completed_.
14
+ - Progress List must only be used on a white background.
@@ -0,0 +1,248 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @use "../../common/breakpoint" as *;
7
+
8
+ @mixin reset-ol {
9
+ list-style: none;
10
+ margin-block: 0;
11
+ padding-inline-start: 0;
12
+ }
13
+
14
+ @mixin indicator {
15
+ display: grid;
16
+ flex: none;
17
+ place-items: start center;
18
+ }
19
+
20
+ @mixin marker-shape {
21
+ aspect-ratio: 1;
22
+ border-radius: 50%;
23
+ box-sizing: border-box;
24
+ display: grid;
25
+ place-content: center;
26
+ z-index: 1;
27
+ }
28
+
29
+ @mixin connector {
30
+ block-size: 100%;
31
+ grid-area: 1 / 1;
32
+ }
33
+
34
+ .ams-progress-list {
35
+ @include reset-ol;
36
+ }
37
+
38
+ /* Step */
39
+
40
+ .ams-progress-list__step {
41
+ display: flex;
42
+ gap: var(--ams-progress-list-step-gap);
43
+
44
+ @media screen and (min-width: $ams-breakpoint-medium) {
45
+ gap: var(--ams-progress-list-step-medium-gap);
46
+ }
47
+ }
48
+
49
+ /* Indicator: layout container for marker and connector */
50
+
51
+ .ams-progress-list__indicator {
52
+ @include indicator;
53
+ }
54
+
55
+ /* Marker: layout container for shape */
56
+
57
+ .ams-progress-list__marker {
58
+ display: flex;
59
+ grid-area: 1 / 1; /* Overlaps marker and connector */
60
+ place-items: center;
61
+
62
+ .ams-progress-list--heading-2 & {
63
+ block-size: var(--ams-progress-list-heading-2-step-marker-block-size);
64
+ }
65
+
66
+ .ams-progress-list--heading-3 & {
67
+ block-size: var(--ams-progress-list-heading-3-step-marker-block-size);
68
+ }
69
+
70
+ .ams-progress-list--heading-4 & {
71
+ block-size: var(--ams-progress-list-heading-4-step-marker-block-size);
72
+ }
73
+ }
74
+
75
+ /* Shape: visual circle in marker */
76
+
77
+ .ams-progress-list__marker-shape {
78
+ @include marker-shape;
79
+
80
+ background-color: var(--ams-progress-list-step-marker-shape-background-color);
81
+ block-size: var(--ams-progress-list-step-marker-shape-block-size);
82
+ border: var(--ams-progress-list-step-marker-shape-border-width)
83
+ var(--ams-progress-list-step-marker-shape-border-style) var(--ams-progress-list-step-marker-shape-border-color);
84
+
85
+ /* Outline adds space between shape and connector */
86
+ outline: var(--ams-progress-list-step-marker-shape-outline-width)
87
+ var(--ams-progress-list-step-marker-shape-outline-style) var(--ams-progress-list-step-marker-shape-outline-color);
88
+
89
+ .ams-progress-list__step--completed & {
90
+ background-color: var(--ams-progress-list-step-completed-marker-shape-background-color);
91
+ border-color: var(--ams-progress-list-step-completed-marker-shape-border-color);
92
+ }
93
+
94
+ .ams-progress-list__step--current & {
95
+ background-color: var(--ams-progress-list-step-current-marker-shape-background-color);
96
+ border-color: var(--ams-progress-list-step-current-marker-shape-border-color);
97
+ }
98
+ }
99
+
100
+ /* Connector */
101
+
102
+ .ams-progress-list__connector {
103
+ @include connector;
104
+
105
+ border-inline: var(--ams-progress-list-step-connector-border-inline-width)
106
+ var(--ams-progress-list-step-connector-border-inline-style)
107
+ var(--ams-progress-list-step-connector-border-inline-color);
108
+
109
+ .ams-progress-list--heading-2 & {
110
+ margin-block-start: var(--ams-progress-list-heading-2-step-marker-margin-block-start);
111
+ }
112
+
113
+ .ams-progress-list--heading-3 & {
114
+ margin-block-start: var(--ams-progress-list-heading-3-step-marker-margin-block-start);
115
+ }
116
+
117
+ .ams-progress-list--heading-4 & {
118
+ margin-block-start: var(--ams-progress-list-heading-4-step-marker-margin-block-start);
119
+ }
120
+
121
+ .ams-progress-list__step--completed & {
122
+ border-inline-color: var(--ams-progress-list-step-completed-connector-border-inline-color);
123
+ border-inline-style: var(--ams-progress-list-step-completed-connector-border-inline-style);
124
+ }
125
+
126
+ .ams-progress-list__step--current.ams-progress-list__step--has-substeps & {
127
+ border-inline-color: var(--ams-progress-list-step-current-connector-border-inline-color);
128
+ border-inline-style: solid;
129
+ }
130
+
131
+ /* Hide connector for last step, unless it has substeps. */
132
+ .ams-progress-list > :last-child:not(.ams-progress-list__step--has-substeps) & {
133
+ display: none;
134
+ }
135
+ }
136
+
137
+ /* Content */
138
+
139
+ .ams-progress-list__content {
140
+ flex: auto;
141
+ min-inline-size: 0; /* Ensure content can shrink to fit container */
142
+
143
+ /* Add white space below all but the last step and steps with substeps. */
144
+ .ams-progress-list__step:not(:last-child, .ams-progress-list__step--has-substeps) & {
145
+ margin-block-end: var(--ams-progress-list-step-content-margin-block-end);
146
+ }
147
+ }
148
+
149
+ /* Heading */
150
+
151
+ .ams-progress-list__heading {
152
+ margin-block-end: var(--ams-progress-list-step-heading-margin-block-end);
153
+ }
154
+
155
+ /* Substeps is its own block in BEM and has the same elements as above */
156
+
157
+ .ams-progress-list-substeps {
158
+ @include reset-ol;
159
+
160
+ * + & {
161
+ /* Add white space if there is content preceding substeps */
162
+ padding-block-start: var(--ams-progress-list-substeps-padding-block-start);
163
+ }
164
+ }
165
+
166
+ .ams-progress-list-substeps__step {
167
+ display: flex;
168
+ }
169
+
170
+ .ams-progress-list-substeps__indicator {
171
+ @include indicator;
172
+
173
+ margin-inline-end: var(--ams-progress-list-substeps-step-indicator-margin-inline-end);
174
+ margin-inline-start: calc(
175
+ -1 * var(--ams-progress-list-step-gap) - var(--ams-progress-list-step-marker-shape-block-size)
176
+ );
177
+
178
+ @media screen and (min-width: $ams-breakpoint-medium) {
179
+ margin-inline-end: var(--ams-progress-list-substeps-step-indicator-medium-margin-inline-end);
180
+ margin-inline-start: calc(
181
+ -1 * var(--ams-progress-list-step-medium-gap) - var(--ams-progress-list-step-marker-shape-block-size)
182
+ );
183
+ }
184
+ }
185
+
186
+ .ams-progress-list-substeps__marker {
187
+ block-size: var(--ams-progress-list-substeps-step-marker-block-size);
188
+ display: grid;
189
+ grid-area: 1/1;
190
+ inline-size: var(--ams-progress-list-substeps-step-marker-inline-size);
191
+ place-items: center;
192
+ }
193
+
194
+ .ams-progress-list-substeps__marker-shape {
195
+ @include marker-shape;
196
+
197
+ background-color: var(--ams-progress-list-substeps-step-marker-shape-background-color);
198
+ block-size: var(--ams-progress-list-substeps-step-marker-shape-block-size);
199
+ border: var(--ams-progress-list-substeps-step-marker-shape-border-width)
200
+ var(--ams-progress-list-substeps-step-marker-shape-border-style)
201
+ var(--ams-progress-list-substeps-step-marker-shape-border-color);
202
+
203
+ /* Outline is used to create space between shape and connector */
204
+ outline: var(--ams-progress-list-substeps-step-marker-shape-outline-width)
205
+ var(--ams-progress-list-substeps-step-marker-shape-outline-style)
206
+ var(--ams-progress-list-substeps-step-marker-shape-outline-color);
207
+
208
+ .ams-progress-list-substeps__step--completed & {
209
+ background-color: var(--ams-progress-list-substeps-step-completed-marker-shape-background-color);
210
+ border-color: var(--ams-progress-list-substeps-step-completed-marker-shape-border-color);
211
+ }
212
+
213
+ .ams-progress-list-substeps__step--current & {
214
+ background-color: var(--ams-progress-list-substeps-step-current-marker-shape-background-color);
215
+ border-color: var(--ams-progress-list-substeps-step-current-marker-shape-border-color);
216
+ }
217
+ }
218
+
219
+ .ams-progress-list-substeps__connector {
220
+ @include connector;
221
+
222
+ /* Cover underlying connector of parent step to prevent it from shining through. Our value for this token is white. */
223
+ background-color: var(--ams-progress-list-substeps-step-connector-background-color);
224
+ border: var(--ams-progress-list-substeps-step-connector-border-inline-width)
225
+ var(--ams-progress-list-substeps-step-connector-border-inline-style)
226
+ var(--ams-progress-list-substeps-step-connector-border-inline-color);
227
+ margin-block-start: var(--ams-progress-list-substeps-step-connector-margin-block-start);
228
+
229
+ .ams-progress-list-substeps__step--completed & {
230
+ border-inline-color: var(--ams-progress-list-substeps-step-completed-connector-border-inline-color);
231
+ border-inline-style: var(--ams-progress-list-substeps-step-completed-connector-border-inline-style);
232
+ }
233
+
234
+ /* Hide connector when it belongs to the last substep of last main step. Our value for this token is white. */
235
+ .ams-progress-list__step:last-child .ams-progress-list-substeps__step:last-child & {
236
+ border-inline-color: var(--ams-progress-list-substeps-step-connector-last-child-border-inline-color);
237
+ }
238
+ }
239
+
240
+ .ams-progress-list-substeps__content {
241
+ /* Add white space below all substeps except for the last. Our value for this token is medium space. */
242
+ margin-block-end: var(--ams-progress-list-substeps-step-content-margin-block-end);
243
+
244
+ /* Add white space below the last substep. Our value for this token is large space. */
245
+ .ams-progress-list-substeps__step:last-child & {
246
+ margin-block-end: var(--ams-progress-list-substeps-last-child-content-margin-block-end);
247
+ }
248
+ }
@@ -67,11 +67,6 @@
67
67
  cursor: var(--ams-time-input-disabled-cursor);
68
68
  }
69
69
 
70
- .ams-time-input:disabled::-webkit-calendar-picker-indicator {
71
- background-image: var(--ams-time-input-disabled-calendar-picker-indicator-background-image);
72
- visibility: visible;
73
- }
74
-
75
70
  .ams-time-input:not(:disabled):invalid,
76
71
  .ams-time-input:not(:disabled)[aria-invalid="true"] {
77
72
  border-color: var(--ams-time-input-invalid-border-color);