@hashicorp/design-system-components 1.0.4 → 1.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/.stylelintignore +26 -0
- package/CHANGELOG.md +17 -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/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/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 +0 -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.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 +12 -4
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
@use "../mixins/focus-ring" as *;
|
|
9
9
|
|
|
10
10
|
.hds-alert {
|
|
11
|
-
align-items: flex-start;
|
|
12
11
|
display: flex;
|
|
12
|
+
align-items: flex-start;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// ICON
|
|
16
16
|
|
|
17
17
|
.hds-alert__icon {
|
|
18
18
|
flex: none;
|
|
19
|
+
width: 20px;
|
|
19
20
|
height: 20px;
|
|
20
21
|
margin-right: 12px;
|
|
21
|
-
width: 20px;
|
|
22
22
|
|
|
23
23
|
.hds-alert--type-compact & {
|
|
24
|
-
height: 14px;
|
|
25
24
|
width: 14px;
|
|
25
|
+
height: 14px;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
// TEXT (TITLE & DESCRIPTION)
|
|
36
36
|
|
|
37
37
|
.hds-alert__text {
|
|
38
|
-
color: var(--token-color-foreground-warning-on-surface);
|
|
39
38
|
display: flex;
|
|
40
39
|
flex-direction: column;
|
|
41
|
-
font-family: var(--token-typography-body-200-font-family);
|
|
42
|
-
font-size: var(--token-typography-body-200-font-size);
|
|
43
40
|
justify-content: center;
|
|
41
|
+
color: var(--token-color-foreground-warning-on-surface);
|
|
42
|
+
font-size: var(--token-typography-body-200-font-size);
|
|
43
|
+
font-family: var(--token-typography-body-200-font-family);
|
|
44
44
|
line-height: var(--token-typography-body-200-line-height);
|
|
45
45
|
|
|
46
46
|
.hds-alert--type-compact & {
|
|
47
|
-
font-family: var(--token-typography-body-100-font-family);
|
|
48
47
|
font-size: var(--token-typography-body-100-font-size);
|
|
48
|
+
font-family: var(--token-typography-body-100-font-family);
|
|
49
49
|
line-height: var(--token-typography-body-100-line-height);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -69,15 +69,16 @@
|
|
|
69
69
|
font-weight: var(--token-typography-font-weight-semibold);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
code,
|
|
73
|
-
|
|
74
|
-
border: 1px solid var(--token-color-palette-neutral-200);
|
|
75
|
-
border-radius: 5px;
|
|
72
|
+
code,
|
|
73
|
+
pre {
|
|
76
74
|
display: inline;
|
|
77
|
-
|
|
75
|
+
padding: 1px 5px;
|
|
78
76
|
font-size: 0.9em; // as discussed with designers, we reduce the size for optical/visual balance
|
|
77
|
+
font-family: var(--token-typography-code-100-font-family);
|
|
79
78
|
line-height: 1em;
|
|
80
|
-
|
|
79
|
+
background-color: var(--token-color-surface-primary);
|
|
80
|
+
border: 1px solid var(--token-color-palette-neutral-200);
|
|
81
|
+
border-radius: 5px;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
// Notice: in the future this may become a "Link::Inline" component (for now we declare directly the same styles here)
|
|
@@ -86,9 +87,9 @@
|
|
|
86
87
|
|
|
87
88
|
&:focus,
|
|
88
89
|
&:focus-visible {
|
|
90
|
+
text-decoration: none;
|
|
89
91
|
outline: 2px solid var(--token-color-focus-action-internal);
|
|
90
92
|
outline-offset: 1px;
|
|
91
|
-
text-decoration: none;
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
&:hover {
|
|
@@ -104,8 +105,8 @@
|
|
|
104
105
|
// ACTIONS
|
|
105
106
|
|
|
106
107
|
.hds-alert__actions {
|
|
107
|
-
align-items: center;
|
|
108
108
|
display: flex;
|
|
109
|
+
align-items: center;
|
|
109
110
|
|
|
110
111
|
> * {
|
|
111
112
|
margin-top: 16px;
|
|
@@ -119,14 +120,14 @@
|
|
|
119
120
|
// DISMISS
|
|
120
121
|
|
|
121
122
|
.hds-alert__dismiss {
|
|
122
|
-
background-color: transparent;
|
|
123
|
-
border: none;
|
|
124
|
-
color: var(--token-color-foreground-faint);
|
|
125
|
-
cursor: pointer;
|
|
126
123
|
flex: none;
|
|
127
|
-
margin-left: 16px;
|
|
128
124
|
margin-top: 2px; // for alignment with the main icon and text
|
|
125
|
+
margin-left: 16px;
|
|
129
126
|
padding: 0;
|
|
127
|
+
color: var(--token-color-foreground-faint);
|
|
128
|
+
background-color: transparent;
|
|
129
|
+
border: none;
|
|
130
|
+
cursor: pointer;
|
|
130
131
|
|
|
131
132
|
.hds-alert--type-compact & {
|
|
132
133
|
margin-top: 1px;
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
|
|
144
145
|
&:active {
|
|
145
146
|
color: var(--token-color-foreground-secondary);
|
|
147
|
+
|
|
146
148
|
&::before {
|
|
147
149
|
background-color: rgba(#dedfe3, 0.4);
|
|
148
150
|
border: 1px solid var(--token-color-border-strong);
|
|
@@ -158,21 +160,22 @@
|
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
.hds-alert--type-inline {
|
|
161
|
-
|
|
163
|
+
padding: 16px;
|
|
162
164
|
border-style: solid;
|
|
163
165
|
border-width: 1px;
|
|
164
|
-
|
|
166
|
+
border-radius: 6px;
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
.hds-alert--type-compact {
|
|
168
170
|
.hds-alert__icon {
|
|
169
|
-
margin-right: 8px;
|
|
170
171
|
margin-top: 2px; // notice: the icon size for the "compact" type is 14px, not 20px, so this 2px extra are needed to reach the exact same height as the "description" text line-height
|
|
172
|
+
margin-right: 8px;
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
// extra safety
|
|
174
176
|
.hds-alert__title {
|
|
175
177
|
display: none;
|
|
178
|
+
|
|
176
179
|
& + .hds-alert__description {
|
|
177
180
|
margin-top: 0;
|
|
178
181
|
}
|
|
@@ -182,10 +185,9 @@
|
|
|
182
185
|
// COLORS (& TYPES)
|
|
183
186
|
|
|
184
187
|
.hds-alert--color-neutral {
|
|
185
|
-
|
|
186
188
|
&.hds-alert--type-page {
|
|
187
189
|
background-color: var(--token-color-surface-faint);
|
|
188
|
-
box-shadow:
|
|
190
|
+
box-shadow: 0 1px 0 0 var(--token-color-palette-alpha-300);
|
|
189
191
|
}
|
|
190
192
|
|
|
191
193
|
&.hds-alert--type-inline {
|
|
@@ -204,10 +206,9 @@
|
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
.hds-alert--color-highlight {
|
|
207
|
-
|
|
208
209
|
&.hds-alert--type-page {
|
|
209
210
|
background-color: var(--token-color-surface-highlight);
|
|
210
|
-
box-shadow:
|
|
211
|
+
box-shadow: 0 1px 0 0 var(--token-color-border-highlight);
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
&.hds-alert--type-inline {
|
|
@@ -215,16 +216,16 @@
|
|
|
215
216
|
border-color: var(--token-color-border-highlight);
|
|
216
217
|
}
|
|
217
218
|
|
|
218
|
-
.hds-alert__icon,
|
|
219
|
+
.hds-alert__icon,
|
|
220
|
+
.hds-alert__title {
|
|
219
221
|
color: var(--token-color-foreground-highlight-on-surface);
|
|
220
222
|
}
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
.hds-alert--color-success {
|
|
224
|
-
|
|
225
226
|
&.hds-alert--type-page {
|
|
226
227
|
background-color: var(--token-color-surface-success);
|
|
227
|
-
box-shadow:
|
|
228
|
+
box-shadow: 0 1px 0 0 var(--token-color-border-success);
|
|
228
229
|
}
|
|
229
230
|
|
|
230
231
|
&.hds-alert--type-inline {
|
|
@@ -232,16 +233,16 @@
|
|
|
232
233
|
border-color: var(--token-color-border-success);
|
|
233
234
|
}
|
|
234
235
|
|
|
235
|
-
.hds-alert__icon,
|
|
236
|
+
.hds-alert__icon,
|
|
237
|
+
.hds-alert__title {
|
|
236
238
|
color: var(--token-color-foreground-success-on-surface);
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
.hds-alert--color-warning {
|
|
241
|
-
|
|
242
243
|
&.hds-alert--type-page {
|
|
243
244
|
background-color: var(--token-color-surface-warning);
|
|
244
|
-
box-shadow:
|
|
245
|
+
box-shadow: 0 1px 0 0 var(--token-color-border-warning);
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
&.hds-alert--type-inline {
|
|
@@ -249,16 +250,16 @@
|
|
|
249
250
|
border-color: var(--token-color-border-warning);
|
|
250
251
|
}
|
|
251
252
|
|
|
252
|
-
.hds-alert__icon,
|
|
253
|
+
.hds-alert__icon,
|
|
254
|
+
.hds-alert__title {
|
|
253
255
|
color: var(--token-color-foreground-warning-on-surface);
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
.hds-alert--color-critical {
|
|
258
|
-
|
|
259
260
|
&.hds-alert--type-page {
|
|
260
261
|
background-color: var(--token-color-surface-critical);
|
|
261
|
-
box-shadow:
|
|
262
|
+
box-shadow: 0 1px 0 0 var(--token-color-border-critical);
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
&.hds-alert--type-inline {
|
|
@@ -266,7 +267,8 @@
|
|
|
266
267
|
border-color: var(--token-color-border-critical);
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
.hds-alert__icon,
|
|
270
|
+
.hds-alert__icon,
|
|
271
|
+
.hds-alert__title {
|
|
270
272
|
color: var(--token-color-foreground-critical-on-surface);
|
|
271
273
|
}
|
|
272
274
|
}
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
.hds-avatar {
|
|
8
|
-
align-items: center;
|
|
9
|
-
box-sizing: border-box;
|
|
10
8
|
display: inline-flex;
|
|
11
|
-
|
|
9
|
+
align-items: center;
|
|
12
10
|
justify-content: center;
|
|
11
|
+
box-sizing: border-box;
|
|
13
12
|
width: 32px;
|
|
13
|
+
height: 32px;
|
|
14
14
|
|
|
15
15
|
img {
|
|
16
|
-
border-radius: 2px;
|
|
17
|
-
height: inherit;
|
|
18
16
|
width: inherit;
|
|
17
|
+
height: inherit;
|
|
18
|
+
border-radius: 2px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
svg {
|
|
22
22
|
display: inline-block;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
}
|
|
@@ -4,21 +4,20 @@
|
|
|
4
4
|
// properties within each class are sorted alphabetically
|
|
5
5
|
//
|
|
6
6
|
|
|
7
|
-
@use
|
|
8
|
-
|
|
9
|
-
$hds-badge-count-types: ( 'flat','inverted','outlined' );
|
|
10
|
-
$hds-badge-count-sizes: ( 'small', 'medium', 'large' );
|
|
7
|
+
@use "sass:math";
|
|
11
8
|
|
|
9
|
+
$hds-badge-count-types: ( "flat","inverted","outlined" );
|
|
10
|
+
$hds-badge-count-sizes: ( "small", "medium", "large" );
|
|
12
11
|
$hds-badge-count-border-width: 1px;
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
.hds-badge-count {
|
|
16
|
-
align-items: center;
|
|
17
|
-
border: $hds-badge-count-border-width solid transparent;
|
|
18
15
|
display: inline-flex;
|
|
19
|
-
|
|
20
|
-
font-weight: var(--token-typography-font-weight-medium);
|
|
16
|
+
align-items: center;
|
|
21
17
|
max-width: 100%;
|
|
18
|
+
font-weight: var(--token-typography-font-weight-medium);
|
|
19
|
+
font-family: var(--token-typography-font-stack-text);
|
|
20
|
+
border: $hds-badge-count-border-width solid transparent;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
// SIZE
|
|
@@ -28,14 +27,14 @@ $size-props: (
|
|
|
28
27
|
"small": (
|
|
29
28
|
"font-size": 0.8125rem, // 13px
|
|
30
29
|
"height": 1.25rem,
|
|
31
|
-
"line-height": 1.
|
|
30
|
+
"line-height": 1.2308, // 16px
|
|
32
31
|
"padding-vertical": 0.125rem,
|
|
33
32
|
"padding-horizontal": 0.5rem,
|
|
34
33
|
),
|
|
35
34
|
"medium": (
|
|
36
35
|
"font-size": 0.8125rem, // 13px
|
|
37
36
|
"height": 1.5rem,
|
|
38
|
-
"line-height": 1.
|
|
37
|
+
"line-height": 1.2308, // 16px
|
|
39
38
|
"padding-vertical": 0.25rem,
|
|
40
39
|
"padding-horizontal": 0.75rem,
|
|
41
40
|
),
|
|
@@ -50,11 +49,11 @@ $size-props: (
|
|
|
50
49
|
|
|
51
50
|
@each $size in $hds-badge-count-sizes {
|
|
52
51
|
.hds-badge-count--size-#{$size} {
|
|
53
|
-
border-radius: math.div(map-get($size-props, $size, "height"), 2);
|
|
54
|
-
font-size: map-get($size-props, $size, "font-size");
|
|
55
|
-
line-height: map-get($size-props, $size, "line-height");
|
|
56
52
|
min-height: map-get($size-props, $size, "height");
|
|
57
53
|
padding: calc(#{map-get($size-props, $size, "padding-vertical")} - #{$hds-badge-count-border-width}) calc(#{map-get($size-props, $size, "padding-horizontal")} - #{$hds-badge-count-border-width});
|
|
54
|
+
font-size: map-get($size-props, $size, "font-size");
|
|
55
|
+
line-height: map-get($size-props, $size, "line-height");
|
|
56
|
+
border-radius: math.div(map-get($size-props, $size, "height"), 2);
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -63,36 +62,36 @@ $size-props: (
|
|
|
63
62
|
|
|
64
63
|
.hds-badge-count--color-neutral {
|
|
65
64
|
&.hds-badge-count--type-filled {
|
|
66
|
-
background-color: var(--token-color-surface-strong);
|
|
67
65
|
color: var(--token-color-foreground-primary);
|
|
66
|
+
background-color: var(--token-color-surface-strong);
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
&.hds-badge-count--type-inverted {
|
|
71
|
-
background-color: var(--token-color-foreground-faint);
|
|
72
70
|
color: var(--token-color-foreground-high-contrast);
|
|
71
|
+
background-color: var(--token-color-foreground-faint);
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
&.hds-badge-count--type-outlined {
|
|
75
|
+
color: var(--token-color-foreground-primary);
|
|
76
76
|
background-color: transparent;
|
|
77
77
|
border-color: var(--token-color-foreground-faint);
|
|
78
|
-
color: var(--token-color-foreground-primary);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
.hds-badge-count--color-neutral-dark-mode {
|
|
83
82
|
&.hds-badge-count--type-filled {
|
|
84
|
-
background-color: var(--token-color-foreground-faint);
|
|
85
83
|
color: var(--token-color-foreground-high-contrast);
|
|
84
|
+
background-color: var(--token-color-foreground-faint);
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
&.hds-badge-count--type-inverted {
|
|
89
|
-
background-color: var(--token-color-surface-faint);
|
|
90
88
|
color: var(--token-color-foreground-primary);
|
|
89
|
+
background-color: var(--token-color-surface-faint);
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
&.hds-badge-count--type-outlined {
|
|
93
|
+
color: var(--token-color-foreground-high-contrast);
|
|
94
94
|
background-color: transparent;
|
|
95
95
|
border-color: var(--token-color-palette-neutral-100);
|
|
96
|
-
color: var(--token-color-foreground-high-contrast);
|
|
97
96
|
}
|
|
98
|
-
}
|
|
97
|
+
}
|
|
@@ -5,20 +5,19 @@
|
|
|
5
5
|
//
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$hds-badge-border-width: 1px;
|
|
8
|
+
$hds-badge-types: ( "flat","inverted","outlined" );
|
|
9
|
+
$hds-badge-colors-accents: ( "highlight", "success", "warning", "critical" );
|
|
10
|
+
$hds-badge-sizes: ( "small", "medium", "large" );
|
|
11
|
+
$hds-badge-border-width: 1px;
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
.hds-badge {
|
|
16
|
-
align-items: center;
|
|
17
|
-
border-radius: 5px;
|
|
18
|
-
border: $hds-badge-border-width solid transparent;
|
|
19
15
|
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
20
17
|
max-width: 100%;
|
|
21
18
|
vertical-align: middle;
|
|
19
|
+
border: $hds-badge-border-width solid transparent;
|
|
20
|
+
border-radius: 5px;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
.hds-badge__icon {
|
|
@@ -28,8 +27,8 @@
|
|
|
28
27
|
|
|
29
28
|
.hds-badge__text {
|
|
30
29
|
flex: 1 0 0;
|
|
31
|
-
font-family: var(--token-typography-font-stack-text);
|
|
32
30
|
font-weight: var(--token-typography-font-weight-medium);
|
|
31
|
+
font-family: var(--token-typography-font-stack-text);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
|
|
@@ -42,7 +41,7 @@ $size-props: (
|
|
|
42
41
|
"gap": 0.25rem,
|
|
43
42
|
"height": 1.25rem,
|
|
44
43
|
"icon-size": 0.75rem,
|
|
45
|
-
"line-height": 1.
|
|
44
|
+
"line-height": 1.2308, // 16px
|
|
46
45
|
"padding-vertical": 0.125rem,
|
|
47
46
|
"padding-horizontal": 0.375rem,
|
|
48
47
|
),
|
|
@@ -51,7 +50,7 @@ $size-props: (
|
|
|
51
50
|
"gap": 0.25rem,
|
|
52
51
|
"height": 1.5rem,
|
|
53
52
|
"icon-size": 1rem,
|
|
54
|
-
"line-height": 1.
|
|
53
|
+
"line-height": 1.2308, // 16px
|
|
55
54
|
"padding-vertical": 0.25rem,
|
|
56
55
|
"padding-horizontal": 0.5rem,
|
|
57
56
|
),
|
|
@@ -72,8 +71,8 @@ $size-props: (
|
|
|
72
71
|
padding: calc(#{map-get($size-props, $size, "padding-vertical")} - #{$hds-badge-border-width}) calc(#{map-get($size-props, $size, "padding-horizontal")} - #{$hds-badge-border-width});
|
|
73
72
|
|
|
74
73
|
.hds-badge__icon {
|
|
75
|
-
height: map-get($size-props, $size, "icon-size");
|
|
76
74
|
width: map-get($size-props, $size, "icon-size");
|
|
75
|
+
height: map-get($size-props, $size, "icon-size");
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
.hds-badge__text {
|
|
@@ -92,56 +91,56 @@ $size-props: (
|
|
|
92
91
|
|
|
93
92
|
.hds-badge--color-neutral {
|
|
94
93
|
&.hds-badge--type-filled {
|
|
95
|
-
background-color: var(--token-color-surface-strong);
|
|
96
94
|
color: var(--token-color-foreground-primary);
|
|
95
|
+
background-color: var(--token-color-surface-strong);
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
&.hds-badge--type-inverted {
|
|
100
|
-
background-color: var(--token-color-foreground-faint);
|
|
101
99
|
color: var(--token-color-foreground-high-contrast);
|
|
100
|
+
background-color: var(--token-color-foreground-faint);
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
&.hds-badge--type-outlined {
|
|
104
|
+
color: var(--token-color-foreground-primary);
|
|
105
105
|
background-color: transparent;
|
|
106
106
|
border-color: var(--token-color-foreground-faint);
|
|
107
|
-
color: var(--token-color-foreground-primary);
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
.hds-badge--color-neutral-dark-mode {
|
|
112
111
|
&.hds-badge--type-filled {
|
|
113
|
-
background-color: var(--token-color-foreground-faint);
|
|
114
112
|
color: var(--token-color-foreground-high-contrast);
|
|
113
|
+
background-color: var(--token-color-foreground-faint);
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
&.hds-badge--type-inverted {
|
|
118
|
-
background-color: var(--token-color-surface-faint);
|
|
119
117
|
color: var(--token-color-foreground-primary);
|
|
118
|
+
background-color: var(--token-color-surface-faint);
|
|
120
119
|
}
|
|
121
120
|
|
|
122
121
|
&.hds-badge--type-outlined {
|
|
122
|
+
color: var(--token-color-foreground-high-contrast);
|
|
123
123
|
background-color: transparent;
|
|
124
124
|
border-color: var(--token-color-palette-neutral-100);
|
|
125
|
-
color: var(--token-color-foreground-high-contrast);
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
@each $color in $hds-badge-colors-accents {
|
|
130
129
|
.hds-badge--color-#{$color} {
|
|
131
130
|
&.hds-badge--type-filled {
|
|
132
|
-
background-color: var(--token-color-surface-#{$color});
|
|
133
131
|
color: var(--token-color-foreground-#{$color}-on-surface);
|
|
132
|
+
background-color: var(--token-color-surface-#{$color});
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
&.hds-badge--type-inverted {
|
|
137
|
-
background-color: var(--token-color-foreground-#{$color});
|
|
138
136
|
color: var(--token-color-foreground-high-contrast);
|
|
137
|
+
background-color: var(--token-color-foreground-#{$color});
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
&.hds-badge--type-outlined {
|
|
141
|
+
color: var(--token-color-foreground-#{$color});
|
|
142
142
|
background-color: transparent;
|
|
143
143
|
border-color: currentColor;
|
|
144
|
-
color: var(--token-color-foreground-#{$color});
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
|
-
}
|
|
146
|
+
}
|