@hashicorp/design-system-components 1.0.4 → 1.2.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/.stylelintignore +26 -0
- package/CHANGELOG.md +31 -0
- package/addon/components/hds/badge/index.hbs +1 -1
- package/addon/components/hds/badge/index.js +3 -3
- package/addon/components/hds/badge-count/index.js +3 -3
- package/addon/components/hds/breadcrumb/item.js +1 -1
- package/addon/components/hds/card/container.js +5 -5
- package/addon/components/hds/dropdown/toggle/button.hbs +1 -0
- package/addon/components/hds/form/field/index.js +1 -1
- package/addon/components/hds/form/radio-card/description.hbs +1 -0
- package/addon/components/hds/form/radio-card/group.hbs +26 -0
- package/addon/components/hds/form/radio-card/index.hbs +20 -0
- package/addon/components/hds/form/radio-card/index.js +90 -0
- package/addon/components/hds/form/radio-card/label.hbs +1 -0
- package/addon/components/hds/form/text-input/base.js +1 -1
- package/addon/components/hds/icon-tile/index.hbs +3 -3
- package/addon/components/hds/icon-tile/index.js +3 -3
- package/addon/components/hds/stepper/step/indicator.js +1 -1
- package/addon/components/hds/stepper/task/indicator.js +1 -1
- package/app/components/hds/form/radio-card/description.js +1 -0
- package/app/components/hds/form/radio-card/group.js +1 -0
- package/app/components/hds/form/radio-card/index.js +1 -0
- package/app/components/hds/form/radio-card/label.js +1 -0
- package/app/styles/@hashicorp/design-system-components.scss +12 -12
- package/app/styles/@hashicorp/design-system-power-select-overrides.scss +225 -0
- package/app/styles/components/alert.scss +39 -37
- package/app/styles/components/avatar.scss +6 -6
- package/app/styles/components/badge-count.scss +19 -20
- package/app/styles/components/badge.scss +21 -22
- package/app/styles/components/breadcrumb.scss +123 -123
- package/app/styles/components/button-set.scss +5 -5
- package/app/styles/components/button.scss +56 -49
- package/app/styles/components/card/container.scss +5 -4
- package/app/styles/components/card/index.scss +1 -1
- package/app/styles/components/dropdown.scss +76 -66
- package/app/styles/components/empty-state.scss +8 -5
- package/app/styles/components/form/checkbox.scss +11 -8
- package/app/styles/components/form/error.scss +3 -3
- package/app/styles/components/form/field.scss +5 -4
- package/app/styles/components/form/group.scss +3 -2
- package/app/styles/components/form/helper-text.scss +1 -1
- package/app/styles/components/form/index.scss +1 -1
- package/app/styles/components/form/label.scss +2 -2
- package/app/styles/components/form/legend.scss +1 -1
- package/app/styles/components/form/radio-card.scss +146 -0
- package/app/styles/components/form/radio.scss +11 -8
- package/app/styles/components/form/select.scss +14 -12
- package/app/styles/components/form/text-input.scss +14 -13
- package/app/styles/components/form/textarea.scss +7 -7
- package/app/styles/components/form/toggle.scss +38 -36
- package/app/styles/components/icon-tile.scss +35 -37
- package/app/styles/components/link/inline.scss +3 -3
- package/app/styles/components/link/standalone.scss +13 -15
- package/app/styles/components/stepper/index.scss +2 -2
- package/app/styles/components/stepper/step-indicator.scss +23 -18
- package/app/styles/components/stepper/task-indicator.scss +45 -45
- package/app/styles/components/tag.scss +15 -15
- package/app/styles/components/toast.scss +3 -3
- package/app/styles/mixins/_focus-ring.scss +8 -8
- package/package.json +14 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* stylelint-disable selector-class-pattern */
|
|
1
2
|
// >>>>>>>>>> WARNING <<<<<<<<<<<
|
|
2
3
|
//
|
|
3
4
|
// Notice: in this component we're using directly the `Hds::Button` component
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
//
|
|
19
20
|
//
|
|
20
21
|
|
|
21
|
-
@use
|
|
22
|
+
@use "../mixins/focus-ring" as *;
|
|
22
23
|
|
|
23
24
|
$hds-dropdown-toggle-base-height: 36px;
|
|
24
25
|
$hds-dropdown-toggle-border-radius: 5px;
|
|
@@ -27,17 +28,17 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
27
28
|
// TOGGLE/ICON
|
|
28
29
|
|
|
29
30
|
.hds-dropdown-toggle-icon {
|
|
31
|
+
display: flex;
|
|
30
32
|
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
min-width: $hds-dropdown-toggle-base-height;
|
|
35
|
+
height: $hds-dropdown-toggle-base-height;
|
|
36
|
+
padding: 1px;
|
|
31
37
|
background-color: transparent;
|
|
32
38
|
border: 1px solid transparent; // We need this to be transparent for a11y
|
|
33
39
|
border-radius: $hds-dropdown-toggle-border-radius;
|
|
34
|
-
display: flex;
|
|
35
|
-
height: $hds-dropdown-toggle-base-height;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
min-width: $hds-dropdown-toggle-base-height;
|
|
38
40
|
outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
|
|
39
41
|
outline-color: transparent; // We need this to be transparent for a11y
|
|
40
|
-
padding: 1px;
|
|
41
42
|
|
|
42
43
|
&:hover,
|
|
43
44
|
&.mock-hover {
|
|
@@ -56,19 +57,19 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
.hds-dropdown-toggle-icon__wrapper {
|
|
59
|
-
align-items: center;
|
|
60
|
-
border-radius: 3px; // $hds-dropdown-toggle-border-radius - 1px padding - 1px border
|
|
61
60
|
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
62
|
justify-content: center;
|
|
63
|
+
width: 32px;
|
|
63
64
|
height: 32px;
|
|
64
65
|
padding: 1px;
|
|
65
|
-
|
|
66
|
+
border-radius: 3px; // $hds-dropdown-toggle-border-radius - 1px padding - 1px border
|
|
66
67
|
|
|
67
68
|
img {
|
|
68
|
-
|
|
69
|
+
width: 100%;
|
|
69
70
|
height: 100%;
|
|
70
71
|
object-fit: cover; // this will make sure it's correct even if the item isn't square
|
|
71
|
-
|
|
72
|
+
border-radius: inherit;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -76,7 +77,7 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
76
77
|
margin-left: 4px;
|
|
77
78
|
|
|
78
79
|
@media (prefers-reduced-motion: no-preference) {
|
|
79
|
-
transition: transform .3s;
|
|
80
|
+
transition: transform 0.3s;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
.hds-dropdown-toggle-icon--is-open & {
|
|
@@ -90,11 +91,11 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
90
91
|
box-shadow: none; // we override this to remove the elevation style
|
|
91
92
|
|
|
92
93
|
.hds-button__icon {
|
|
93
|
-
margin-left: 8px; // this overrides the rule `.hds-button__text + .hds-button__icon`
|
|
94
94
|
margin-right: -6px; // we apply a negative margin to counter the padding-right of the button and reduce the visual space between the icon and the right border
|
|
95
|
+
margin-left: 8px; // this overrides the rule `.hds-button__text + .hds-button__icon`
|
|
95
96
|
|
|
96
97
|
@media (prefers-reduced-motion: no-preference) {
|
|
97
|
-
transition: transform .3s;
|
|
98
|
+
transition: transform 0.3s;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
}
|
|
@@ -112,33 +113,33 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
112
113
|
// GOES INSIDE HDS::DISCLOSURE's :content block
|
|
113
114
|
|
|
114
115
|
.hds-dropdown-list {
|
|
116
|
+
width: max-content; // notice: this is important because being in a position absolute means the layout algorithm assigns a width of 0 and this impacts on the flex algorithm of the children (in some cases they don't use the full width)
|
|
117
|
+
min-width: 200px;
|
|
118
|
+
max-width: 400px;
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: 4px 0;
|
|
121
|
+
list-style: none;
|
|
115
122
|
background-color: var(--token-color-surface-primary);
|
|
116
123
|
border-radius: 6px;
|
|
117
124
|
box-shadow: var(--token-surface-high-box-shadow);
|
|
118
|
-
list-style: none;
|
|
119
|
-
margin: 0;
|
|
120
|
-
max-width: 400px;
|
|
121
|
-
min-width: 200px;
|
|
122
|
-
padding: 4px 0;
|
|
123
|
-
width: max-content; // notice: this is important because being in a position absolute means the layout algorithm assigns a width of 0 and this impacts on the flex algorithm of the children (in some cases they don't use the full width)
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
.hds-dropdown-list--fixed-width {
|
|
127
|
-
max-width: initial;
|
|
128
128
|
min-width: initial;
|
|
129
|
+
max-width: initial;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
.hds-dropdown-list--position-right {
|
|
132
133
|
position: absolute;
|
|
133
|
-
right: 0;
|
|
134
134
|
top: calc(100% + 4px);
|
|
135
|
+
right: 0;
|
|
135
136
|
z-index: 2; // https://github.com/hashicorp/design-system/issues/114
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
.hds-dropdown-list--position-left {
|
|
139
|
-
left: 0;
|
|
140
140
|
position: absolute;
|
|
141
141
|
top: calc(100% + 4px);
|
|
142
|
+
left: 0;
|
|
142
143
|
z-index: 2; // https://github.com/hashicorp/design-system/issues/114
|
|
143
144
|
}
|
|
144
145
|
|
|
@@ -147,23 +148,23 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
147
148
|
// HDS::DROPDOWN::LIST-ITEM
|
|
148
149
|
|
|
149
150
|
.hds-dropdown-list-item__copy-item-title {
|
|
150
|
-
color: var(--token-color-foreground-faint);
|
|
151
151
|
padding: 2px 0 4px;
|
|
152
|
+
color: var(--token-color-foreground-faint);
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
.hds-dropdown-list-item--copy-item {
|
|
155
|
-
padding: 10px 16px 12px;
|
|
156
156
|
width: 100%;
|
|
157
|
+
padding: 10px 16px 12px;
|
|
157
158
|
|
|
158
159
|
button {
|
|
159
|
-
background-color: transparent;
|
|
160
|
-
border-radius: 5px;
|
|
161
|
-
border: 1px solid var(--token-color-border-primary);
|
|
162
|
-
color: var(--token-color-foreground-primary);
|
|
163
160
|
display: flex;
|
|
164
161
|
justify-content: space-between;
|
|
165
|
-
padding: 12px 8px;
|
|
166
162
|
width: 100%;
|
|
163
|
+
padding: 12px 8px;
|
|
164
|
+
color: var(--token-color-foreground-primary);
|
|
165
|
+
background-color: transparent;
|
|
166
|
+
border: 1px solid var(--token-color-border-primary);
|
|
167
|
+
border-radius: 5px;
|
|
167
168
|
|
|
168
169
|
&:hover,
|
|
169
170
|
&.mock-hover {
|
|
@@ -175,8 +176,8 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
175
176
|
|
|
176
177
|
&:focus,
|
|
177
178
|
&.mock-focus {
|
|
178
|
-
//TODO this focus is just way too complex
|
|
179
|
-
background-color:
|
|
179
|
+
// TODO this focus is just way too complex
|
|
180
|
+
background-color: var(--token-color-surface-action);
|
|
180
181
|
border-color: var(--token-color-focus-action-internal);
|
|
181
182
|
}
|
|
182
183
|
|
|
@@ -198,77 +199,77 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
198
199
|
|
|
199
200
|
.hds-dropdown-list-item__copy-item-text {
|
|
200
201
|
overflow: hidden;
|
|
202
|
+
white-space: nowrap;
|
|
201
203
|
text-align: left;
|
|
202
204
|
text-overflow: ellipsis;
|
|
203
|
-
white-space: nowrap;
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
.hds-dropdown-list-item__copy-item-icon {
|
|
207
|
-
color: var(--token-color-foreground-action);
|
|
208
208
|
flex: none;
|
|
209
209
|
margin-left: 8px;
|
|
210
|
+
color: var(--token-color-foreground-action);
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
.hds-dropdown-list-item--description {
|
|
213
|
-
color: var(--token-color-foreground-faint);
|
|
214
214
|
padding: 2px 16px 4px;
|
|
215
|
+
color: var(--token-color-foreground-faint);
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
.hds-dropdown-list-item--generic {
|
|
218
|
-
padding-left: 16px;
|
|
219
219
|
padding-right: 16px;
|
|
220
|
+
padding-left: 16px;
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
|
|
223
224
|
.hds-dropdown-list-item--interactive {
|
|
224
|
-
isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
|
|
225
|
-
min-height: 36px;
|
|
226
225
|
position: relative;
|
|
226
|
+
min-height: 36px;
|
|
227
|
+
isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
|
|
227
228
|
|
|
228
229
|
// need to reset a few extra things to make the button visually appear the same as the link
|
|
229
230
|
button {
|
|
230
|
-
background-color: transparent;
|
|
231
231
|
width: 100%;
|
|
232
|
+
background-color: transparent;
|
|
232
233
|
|
|
233
234
|
&:hover {
|
|
234
235
|
cursor: pointer;
|
|
235
236
|
}
|
|
236
|
-
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
// shared styles for links and buttons
|
|
240
|
-
a,
|
|
240
|
+
a,
|
|
241
|
+
button {
|
|
242
|
+
display: flex;
|
|
241
243
|
align-items: center;
|
|
244
|
+
padding: 7px 9px 7px 15px; // notice: we're subtracting 1px because of the transparent border
|
|
245
|
+
text-decoration: none;
|
|
242
246
|
border: 1px solid transparent; // because a border for the button is needed for a11y, we apply it to both the button and the link so they have the same height
|
|
243
|
-
display: flex;
|
|
244
247
|
outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
|
|
245
248
|
outline-color: transparent;
|
|
246
|
-
padding: 7px 9px 7px 15px; // notice: we're subtracting 1px because of the transparent border
|
|
247
|
-
text-decoration: none;
|
|
248
249
|
|
|
249
250
|
// this is used for the left "hover" indicator
|
|
250
251
|
&::before {
|
|
251
|
-
border-radius: 1px;
|
|
252
|
-
bottom: 6px;
|
|
253
|
-
content: '';
|
|
254
|
-
left: 4px;
|
|
255
252
|
position: absolute;
|
|
256
253
|
top: 6px;
|
|
257
|
-
|
|
254
|
+
bottom: 6px;
|
|
255
|
+
left: 4px;
|
|
258
256
|
z-index: -1;
|
|
257
|
+
width: 2px;
|
|
258
|
+
border-radius: 1px;
|
|
259
|
+
content: "";
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
// Notice: this is used for the active/focus states which have very specific positions
|
|
262
263
|
// and also has a background color, so we can't use the existing focus-ring mixins
|
|
263
264
|
&::after {
|
|
264
|
-
border-radius: 5px;
|
|
265
|
-
bottom: 0px;
|
|
266
|
-
content: '';
|
|
267
|
-
left: 10px;
|
|
268
265
|
position: absolute;
|
|
269
|
-
right: 4px;
|
|
270
266
|
top: 0;
|
|
267
|
+
right: 4px;
|
|
268
|
+
bottom: 0;
|
|
269
|
+
left: 10px;
|
|
271
270
|
z-index: -1;
|
|
271
|
+
border-radius: 5px;
|
|
272
|
+
content: "";
|
|
272
273
|
}
|
|
273
274
|
|
|
274
275
|
// Notice: to avoid too much duplication we define two local CSS variables
|
|
@@ -277,6 +278,7 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
277
278
|
&:hover,
|
|
278
279
|
&.mock-hover {
|
|
279
280
|
color: var(--current-color-hover);
|
|
281
|
+
|
|
280
282
|
&::before {
|
|
281
283
|
background-color: currentColor;
|
|
282
284
|
}
|
|
@@ -286,10 +288,11 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
286
288
|
&:focus,
|
|
287
289
|
&.mock-focus {
|
|
288
290
|
color: var(--current-color-focus);
|
|
291
|
+
|
|
289
292
|
&::after {
|
|
293
|
+
left: 4px;
|
|
290
294
|
background-color: var(--current-background-color);
|
|
291
295
|
box-shadow: var(--current-focus-ring-box-shadow);
|
|
292
|
-
left: 4px;
|
|
293
296
|
}
|
|
294
297
|
}
|
|
295
298
|
// undo the previous declaration for browsers that support ":focus-visible" but wouldn't normally show default focus styles
|
|
@@ -302,10 +305,11 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
302
305
|
// set focus for browsers that support ":focus-visible"
|
|
303
306
|
&:focus-visible {
|
|
304
307
|
color: var(--current-color-focus);
|
|
308
|
+
|
|
305
309
|
&::after {
|
|
310
|
+
left: 4px;
|
|
306
311
|
background-color: var(--current-background-color);
|
|
307
312
|
box-shadow: var(--current-focus-ring-box-shadow);
|
|
308
|
-
left: 4px;
|
|
309
313
|
}
|
|
310
314
|
}
|
|
311
315
|
|
|
@@ -314,18 +318,20 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
314
318
|
&:focus-visible:active,
|
|
315
319
|
&.mock-focus.mock-active {
|
|
316
320
|
&::after {
|
|
321
|
+
left: 10px;
|
|
317
322
|
background-color: var(--current-background-color);
|
|
318
323
|
box-shadow: none;
|
|
319
|
-
left: 10px;
|
|
320
324
|
}
|
|
321
325
|
}
|
|
322
326
|
|
|
323
327
|
&:active,
|
|
324
328
|
&.mock-active {
|
|
325
329
|
color: var(--current-color-active);
|
|
330
|
+
|
|
326
331
|
&::before {
|
|
327
332
|
background-color: currentColor;
|
|
328
333
|
}
|
|
334
|
+
|
|
329
335
|
&::after {
|
|
330
336
|
background-color: var(--current-background-color);
|
|
331
337
|
}
|
|
@@ -342,13 +348,15 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
342
348
|
}
|
|
343
349
|
|
|
344
350
|
.hds-dropdown-list-item--color-action {
|
|
345
|
-
a,
|
|
351
|
+
a,
|
|
352
|
+
button {
|
|
346
353
|
color: var(--token-color-foreground-primary);
|
|
347
354
|
|
|
348
355
|
// assign the values to the local CSS variables used above
|
|
349
356
|
--current-color-hover: var(--token-color-foreground-action-hover);
|
|
350
357
|
--current-color-focus: var(--token-color-foreground-action-active);
|
|
351
358
|
--current-color-active: var(--token-color-foreground-action-active);
|
|
359
|
+
|
|
352
360
|
&::after {
|
|
353
361
|
--current-background-color: var(--token-color-surface-action);
|
|
354
362
|
--current-focus-ring-box-shadow: var(--token-focus-ring-action-box-shadow);
|
|
@@ -357,13 +365,15 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
357
365
|
}
|
|
358
366
|
|
|
359
367
|
.hds-dropdown-list-item--color-critical {
|
|
360
|
-
a,
|
|
368
|
+
a,
|
|
369
|
+
button {
|
|
361
370
|
color: var(--token-color-foreground-critical);
|
|
362
371
|
|
|
363
372
|
// assign the values to the local CSS variables used above
|
|
364
373
|
--current-color-hover: var(--token-color-palette-red-300);
|
|
365
374
|
--current-color-focus: var(--token-color-palette-red-400);
|
|
366
375
|
--current-color-active: var(--token-color-palette-red-400);
|
|
376
|
+
|
|
367
377
|
&::after {
|
|
368
378
|
--current-background-color: var(--token-color-surface-critical);
|
|
369
379
|
--current-focus-ring-box-shadow: var(--token-focus-ring-critical-box-shadow);
|
|
@@ -372,8 +382,8 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
372
382
|
}
|
|
373
383
|
|
|
374
384
|
.hds-dropdown-list-item__interactive-loading-wrapper {
|
|
375
|
-
align-items: center;
|
|
376
385
|
display: flex;
|
|
386
|
+
align-items: center;
|
|
377
387
|
padding: 8px 10px 8px 16px;
|
|
378
388
|
|
|
379
389
|
.hds-dropdown-list-item__interactive-text {
|
|
@@ -386,22 +396,22 @@ $hds-dropdown-toggle-border-radius: 5px;
|
|
|
386
396
|
}
|
|
387
397
|
|
|
388
398
|
.hds-dropdown-list-item--separator {
|
|
389
|
-
height: 4px;
|
|
390
399
|
position: relative;
|
|
391
400
|
width: 100%;
|
|
401
|
+
height: 4px;
|
|
392
402
|
|
|
393
403
|
&::before {
|
|
394
|
-
border-bottom: 1px solid var(--token-color-border-primary);
|
|
395
|
-
bottom: 0;
|
|
396
|
-
content: '';
|
|
397
|
-
left: 6px;
|
|
398
404
|
position: absolute;
|
|
399
405
|
right: 6px;
|
|
406
|
+
bottom: 0;
|
|
407
|
+
left: 6px;
|
|
408
|
+
border-bottom: 1px solid var(--token-color-border-primary);
|
|
409
|
+
content: "";
|
|
400
410
|
}
|
|
401
411
|
}
|
|
402
412
|
|
|
403
413
|
.hds-dropdown-list-item--title {
|
|
404
|
-
color: var(--token-color-foreground-strong);
|
|
405
414
|
padding: 10px 16px 4px;
|
|
415
|
+
color: var(--token-color-foreground-strong);
|
|
406
416
|
}
|
|
407
417
|
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
.hds-empty-state {
|
|
2
|
-
color: var(--token-color-foreground-faint);
|
|
3
2
|
display: block;
|
|
4
|
-
margin: 0 auto;
|
|
5
3
|
max-width: 40ch;
|
|
4
|
+
margin: 0 auto;
|
|
6
5
|
padding: 0;
|
|
7
|
-
|
|
6
|
+
color: var(--token-color-foreground-faint);
|
|
7
|
+
|
|
8
8
|
> * {
|
|
9
9
|
margin: 0;
|
|
10
10
|
padding: 0;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
|
|
13
14
|
.hds-empty-state__body {
|
|
14
|
-
font-size: 1rem;
|
|
15
15
|
font-weight: 400;
|
|
16
|
+
font-size: 1rem;
|
|
16
17
|
line-height: 1.5;
|
|
18
|
+
|
|
17
19
|
+ * {
|
|
18
20
|
margin-block-start: 1rem;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
23
|
+
|
|
21
24
|
.hds-empty-state__header {
|
|
22
|
-
font-size: 1.25rem;
|
|
23
25
|
font-weight: 700;
|
|
26
|
+
font-size: 1.25rem;
|
|
24
27
|
line-height: 1.2;
|
|
25
28
|
}
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
// "BASE" CONTROL
|
|
9
9
|
|
|
10
10
|
.hds-form-checkbox {
|
|
11
|
-
|
|
11
|
+
width: var(--token-form-checkbox-size);
|
|
12
|
+
height: var(--token-form-checkbox-size);
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
12
15
|
background-position: center center;
|
|
13
16
|
background-size: var(--token-form-checkbox-background-image-size) var(--token-form-checkbox-background-image-size);
|
|
14
|
-
border-width: var(--token-form-checkbox-border-width);
|
|
15
17
|
border-style: solid;
|
|
18
|
+
border-width: var(--token-form-checkbox-border-width);
|
|
16
19
|
border-radius: var(--token-form-checkbox-border-radius);
|
|
17
20
|
cursor: pointer;
|
|
18
|
-
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 0;
|
|
21
|
-
width: var(--token-form-checkbox-size);
|
|
21
|
+
appearance: none;
|
|
22
22
|
|
|
23
23
|
// STATUS
|
|
24
24
|
|
|
@@ -29,10 +29,11 @@
|
|
|
29
29
|
border-color: var(--token-form-control-base-border-color-default);
|
|
30
30
|
box-shadow: var(--hds-elevation-inset-box-shadow);
|
|
31
31
|
}
|
|
32
|
+
|
|
32
33
|
&:checked {
|
|
33
34
|
background-color: var(--token-form-control-checked-surface-color-default);
|
|
34
|
-
border-color: var(--token-form-control-checked-border-color-default);
|
|
35
35
|
background-image: var(--token-form-checkbox-background-image-data-url);
|
|
36
|
+
border-color: var(--token-form-control-checked-border-color-default);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
// hover
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
background-color: var(--token-form-control-base-surface-color-hover);
|
|
43
44
|
border-color: var(--token-form-control-base-border-color-hover);
|
|
44
45
|
}
|
|
46
|
+
|
|
45
47
|
&:hover:checked,
|
|
46
48
|
&.mock-hover:checked {
|
|
47
49
|
background-color: var(--token-form-control-checked-border-color-default);
|
|
@@ -64,11 +66,12 @@
|
|
|
64
66
|
box-shadow: none;
|
|
65
67
|
cursor: not-allowed;
|
|
66
68
|
}
|
|
69
|
+
|
|
67
70
|
&:disabled:checked {
|
|
68
71
|
background-color: var(--token-form-control-disabled-surface-color);
|
|
72
|
+
background-image: var(--token-form-checkbox-background-image-data-url-disabled);
|
|
69
73
|
border-color: var(--token-form-control-disabled-border-color);
|
|
70
74
|
box-shadow: none;
|
|
71
|
-
background-image: var(--token-form-checkbox-background-image-data-url-disabled);
|
|
72
75
|
cursor: not-allowed;
|
|
73
76
|
}
|
|
74
77
|
}
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
.hds-form-error {
|
|
8
|
+
display: flex;
|
|
8
9
|
align-items: flex-start;
|
|
9
10
|
color: var(--token-form-error-color);
|
|
10
|
-
display: flex;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.hds-form-error__icon {
|
|
14
14
|
flex: none;
|
|
15
|
+
width: var(--token-form-error-icon-size);
|
|
15
16
|
height: var(--token-form-error-icon-size);
|
|
16
17
|
margin: 2px 8px 2px 0;
|
|
17
|
-
width: var(--token-form-error-icon-size);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.hds-form-error__content {
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
|
|
24
24
|
.hds-form-error__message {
|
|
25
25
|
margin: 0;
|
|
26
|
-
}
|
|
26
|
+
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
&:not(:first-child) {
|
|
33
33
|
margin-top: 8px;
|
|
34
34
|
}
|
|
35
|
+
|
|
35
36
|
&:not(:last-child) {
|
|
36
37
|
margin-bottom: 8px;
|
|
37
38
|
}
|
|
@@ -45,13 +46,14 @@
|
|
|
45
46
|
|
|
46
47
|
.hds-form-field--layout-flag {
|
|
47
48
|
display: grid;
|
|
48
|
-
grid-template-columns: auto 1fr;
|
|
49
|
-
grid-template-rows: auto auto auto;
|
|
50
49
|
grid-auto-flow: row;
|
|
50
|
+
// stylelint-disable-next-line declaration-colon-space-after
|
|
51
51
|
grid-template-areas:
|
|
52
52
|
"control label"
|
|
53
53
|
"control helper-text"
|
|
54
54
|
"control error";
|
|
55
|
+
grid-template-rows: auto auto auto;
|
|
56
|
+
grid-template-columns: auto 1fr;
|
|
55
57
|
justify-items: start;
|
|
56
58
|
|
|
57
59
|
.hds-form-field__label {
|
|
@@ -74,13 +76,12 @@
|
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
.hds-form-field__error {
|
|
77
|
-
margin-top: 4px;
|
|
78
79
|
grid-area: error;
|
|
80
|
+
margin-top: 4px;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
|
|
83
|
-
|
|
84
85
|
// Debug (please don't remove)
|
|
85
86
|
//
|
|
86
87
|
// .hds-form-field--layout-vertical,
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
.hds-form-group { // notice: this is a <fieldset> element
|
|
8
|
-
border: none;
|
|
9
8
|
display: block;
|
|
10
9
|
margin: 0;
|
|
11
10
|
padding: 0;
|
|
11
|
+
border: none;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.hds-form-group__legend { // notice: this is a <legend> element
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
flex-wrap: wrap;
|
|
38
38
|
margin-bottom: -4px;
|
|
39
39
|
}
|
|
40
|
+
|
|
40
41
|
.hds-form-group__control-field {
|
|
41
42
|
margin-right: 16px;
|
|
42
43
|
margin-bottom: 4px;
|
|
@@ -49,4 +50,4 @@
|
|
|
49
50
|
|
|
50
51
|
.hds-form-group__error {
|
|
51
52
|
margin-top: 8px;
|
|
52
|
-
}
|
|
53
|
+
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
.hds-form-label {
|
|
8
|
-
color: var(--token-form-label-color);
|
|
9
8
|
display: block;
|
|
10
|
-
max-width: 100%;
|
|
11
9
|
width: max-content; // to avoid it extends the full width of the parent container, leading to invisible interactive area
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
color: var(--token-form-label-color);
|
|
12
12
|
|
|
13
13
|
// if a "badge" element (included the 'required' indicator) is child of the label
|
|
14
14
|
// we need to make sure that it correctly aligns with the label text because the
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
.hds-form-legend {
|
|
8
|
-
color: var(--token-form-legend-color);
|
|
9
8
|
display: block;
|
|
9
|
+
color: var(--token-form-legend-color);
|
|
10
10
|
|
|
11
11
|
// if a "badge" element (included the 'required' indicator) is child of the legend
|
|
12
12
|
// we need to make sure that it correctly aligns with the legend text because the
|