@hashicorp/design-system-components 0.9.1 → 0.11.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 (47) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/NEW-COMPONENT-CHECKLIST.md +84 -14
  3. package/README.md +2 -2
  4. package/addon/components/hds/alert/index.hbs +35 -0
  5. package/addon/components/hds/alert/index.js +128 -0
  6. package/addon/components/hds/disclosure/index.hbs +1 -1
  7. package/addon/components/hds/disclosure/index.js +4 -0
  8. package/addon/components/hds/dropdown/index.hbs +10 -13
  9. package/addon/components/hds/dropdown/index.js +45 -0
  10. package/addon/components/hds/dropdown/list-item/copy-item.hbs +20 -0
  11. package/addon/components/hds/dropdown/list-item/copy-item.js +55 -0
  12. package/addon/components/hds/dropdown/list-item/description.hbs +3 -0
  13. package/addon/components/hds/dropdown/list-item/description.js +38 -0
  14. package/addon/components/hds/dropdown/list-item/generic.hbs +3 -0
  15. package/addon/components/hds/dropdown/list-item/interactive.hbs +44 -0
  16. package/addon/components/hds/dropdown/list-item/interactive.js +59 -0
  17. package/addon/components/hds/dropdown/list-item/separator.hbs +1 -0
  18. package/addon/components/hds/dropdown/list-item/title.hbs +3 -0
  19. package/addon/components/hds/dropdown/list-item/title.js +35 -0
  20. package/addon/components/hds/dropdown/{toggle-button.hbs → toggle/button.hbs} +3 -3
  21. package/addon/components/hds/dropdown/{toggle-button.js → toggle/button.js} +21 -3
  22. package/addon/components/hds/dropdown/toggle/icon.hbs +12 -0
  23. package/addon/components/hds/dropdown/{toggle-icon.js → toggle/icon.js} +28 -13
  24. package/addon/components/hds/toast/index.hbs +15 -0
  25. package/addon/components/hds/yield/index.hbs +3 -0
  26. package/app/components/hds/{dropdown/list-item.js → alert/index.js} +1 -1
  27. package/app/components/hds/dropdown/list-item/copy-item.js +1 -0
  28. package/app/components/hds/dropdown/list-item/description.js +1 -0
  29. package/app/components/hds/dropdown/list-item/generic.js +1 -0
  30. package/app/components/hds/dropdown/list-item/interactive.js +1 -0
  31. package/app/components/hds/dropdown/list-item/separator.js +1 -0
  32. package/app/components/hds/dropdown/list-item/title.js +1 -0
  33. package/app/components/hds/dropdown/{toggle-button.js → toggle/button.js} +1 -1
  34. package/app/components/hds/dropdown/{toggle-icon.js → toggle/icon.js} +1 -1
  35. package/app/components/hds/toast/index.js +1 -0
  36. package/app/components/hds/yield/index.js +1 -0
  37. package/app/styles/@hashicorp/design-system-components.scss +2 -0
  38. package/app/styles/components/alert.scss +261 -0
  39. package/app/styles/components/breadcrumb.scss +14 -11
  40. package/app/styles/components/button.scss +36 -30
  41. package/app/styles/components/dropdown.scss +152 -151
  42. package/app/styles/components/link/standalone.scss +1 -2
  43. package/app/styles/components/toast.scss +16 -0
  44. package/package.json +27 -26
  45. package/addon/components/hds/dropdown/list-item.hbs +0 -84
  46. package/addon/components/hds/dropdown/list-item.js +0 -120
  47. package/addon/components/hds/dropdown/toggle-icon.hbs +0 -22
@@ -2,8 +2,7 @@
2
2
  // BUTTON COMPONENT
3
3
  //
4
4
  // properties within each class are sorted alphabetically
5
- // notice: pseudo-classes for the states *must* follow the order link > visited > focus > hover > active
6
- // see https://github.com/hashicorp/design-system-components/issues/132
5
+ // notice: pseudo-classes for the states *must* follow the order link > visited > hover > focus > active
7
6
  //
8
7
  //
9
8
 
@@ -145,6 +144,14 @@ $size-props: (
145
144
  box-shadow: var(--token-elevation-low-box-shadow);
146
145
  color: var(--token-color-foreground-high-contrast);
147
146
 
147
+ &:hover,
148
+ &.is-hover {
149
+ background-color: var(--token-color-palette-blue-300);
150
+ border-color: var(--token-color-palette-blue-400);
151
+ color: var(--token-color-foreground-high-contrast);
152
+ cursor: pointer;
153
+ }
154
+
148
155
  &:focus,
149
156
  &.is-focus {
150
157
  background-color: var(--token-color-palette-blue-200);
@@ -163,13 +170,7 @@ $size-props: (
163
170
  top: -$shift;
164
171
  }
165
172
  }
166
- &:hover,
167
- &.is-hover {
168
- background-color: var(--token-color-palette-blue-300);
169
- border-color: var(--token-color-palette-blue-400);
170
- color: var(--token-color-foreground-high-contrast);
171
- cursor: pointer;
172
- }
173
+
173
174
  &:active,
174
175
  &.is-active {
175
176
  background-color: var(--token-color-palette-blue-400);
@@ -188,6 +189,14 @@ $size-props: (
188
189
  box-shadow: var(--token-elevation-low-box-shadow);
189
190
  color: var(--token-color-foreground-primary);
190
191
 
192
+ &:hover,
193
+ &.is-hover {
194
+ background-color: var(--token-color-surface-primary);
195
+ border-color: var(--token-color-border-strong);
196
+ color: var(--token-color-foreground-primary);
197
+ cursor: pointer;
198
+ }
199
+
191
200
  &:focus,
192
201
  &.is-focus {
193
202
  background-color: var(--token-color-surface-faint);
@@ -197,13 +206,7 @@ $size-props: (
197
206
  border-color: var(--token-color-focus-action-external);
198
207
  }
199
208
  }
200
- &:hover,
201
- &.is-hover {
202
- background-color: var(--token-color-surface-primary);
203
- border-color: var(--token-color-border-strong);
204
- color: var(--token-color-foreground-primary);
205
- cursor: pointer;
206
- }
209
+
207
210
  &:active,
208
211
  &.is-active {
209
212
  background-color: var(--token-color-surface-interactive-active);
@@ -221,6 +224,14 @@ $size-props: (
221
224
  border-color: transparent;
222
225
  color: var(--token-color-foreground-action);
223
226
 
227
+ &:hover,
228
+ &.is-hover {
229
+ background-color: var(--token-color-surface-primary);
230
+ border-color: var(--token-color-border-strong);
231
+ color: var(--token-color-foreground-action-hover);
232
+ cursor: pointer;
233
+ }
234
+
224
235
  &:focus,
225
236
  &.is-focus {
226
237
  border-color: var(--token-color-focus-action-internal);
@@ -229,13 +240,7 @@ $size-props: (
229
240
  border-color: var(--token-color-focus-action-external);
230
241
  }
231
242
  }
232
- &:hover,
233
- &.is-hover {
234
- background-color: var(--token-color-surface-primary);
235
- border-color: var(--token-color-border-strong);
236
- color: var(--token-color-foreground-action-hover);
237
- cursor: pointer;
238
- }
243
+
239
244
  &:active,
240
245
  &.is-active {
241
246
  background-color: var(--token-color-surface-interactive-active);
@@ -271,6 +276,14 @@ $size-props: (
271
276
  box-shadow: var(--token-elevation-low-box-shadow);
272
277
  color: var(--token-color-foreground-critical-on-surface);
273
278
 
279
+ &:hover,
280
+ &.is-hover {
281
+ background-color: var(--token-color-palette-red-300);
282
+ border-color: var(--token-color-palette-red-400);
283
+ color: var(--token-color-foreground-high-contrast);
284
+ cursor: pointer;
285
+ }
286
+
274
287
  &:focus,
275
288
  &.is-focus {
276
289
  background-color: var(--token-color-surface-critical);
@@ -280,13 +293,6 @@ $size-props: (
280
293
  border-color: var(--token-color-focus-critical-external);
281
294
  }
282
295
  }
283
- &:hover,
284
- &.is-hover {
285
- background-color: var(--token-color-palette-red-300);
286
- border-color: var(--token-color-palette-red-400);
287
- color: var(--token-color-foreground-high-contrast);
288
- cursor: pointer;
289
- }
290
296
 
291
297
  &:active,
292
298
  &.is-active {
@@ -15,35 +15,38 @@
15
15
  //
16
16
  // properties within each class are sorted alphabetically
17
17
  // notice: pseudo-classes for the states *must* follow the order link > visited > hover > focus > active
18
- // see https://github.com/hashicorp/design-system-components/issues/132
19
18
  //
20
19
  //
21
20
 
22
21
  @use '../mixins/focus-ring' as *;
23
22
 
23
+ $hds-dropdown-toggle-base-height: 36px;
24
+ $hds-dropdown-toggle-border-radius: 5px;
25
+
26
+
24
27
  // TOGGLE/ICON
28
+
25
29
  .hds-dropdown-toggle-icon {
26
30
  align-items: center;
27
31
  background-color: transparent;
28
32
  border: 1px solid transparent; // We need this to be transparent for a11y
29
- border-radius: 5px;
33
+ border-radius: $hds-dropdown-toggle-border-radius;
30
34
  display: flex;
31
- height: 36px;
35
+ height: $hds-dropdown-toggle-base-height;
32
36
  justify-content: center;
37
+ min-width: $hds-dropdown-toggle-base-height;
33
38
  outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
34
39
  outline-color: transparent; // We need this to be transparent for a11y
35
40
  padding: 1px;
36
- min-width: 36px;
37
41
 
38
- &:hover,
42
+ &:hover,
39
43
  &.is-hover {
40
44
  background-color: var(--token-color-surface-interactive);
41
45
  border-color: var(--token-color-border-strong);
42
46
  cursor: pointer;
43
47
  }
44
48
 
45
- // this is the :focus
46
- @include hds-focus-ring-with-pseudo-element($top: -1px, $right: -1px, $bottom: -1px, $left: -1px, $radius: 5px);
49
+ @include hds-focus-ring-with-pseudo-element($top: -1px, $right: -1px, $bottom: -1px, $left: -1px, $radius: $hds-dropdown-toggle-border-radius);
47
50
 
48
51
  &:active,
49
52
  &.is-active {
@@ -54,7 +57,7 @@
54
57
 
55
58
  .hds-dropdown-toggle-icon__wrapper {
56
59
  align-items: center;
57
- border-radius: 3px; // 5px- 1px padding - 1px border
60
+ border-radius: 3px; // $hds-dropdown-toggle-border-radius - 1px padding - 1px border
58
61
  display: flex;
59
62
  justify-content: center;
60
63
  height: 32px;
@@ -63,21 +66,43 @@
63
66
 
64
67
  img {
65
68
  border-radius: inherit;
69
+ height: 100%;
66
70
  object-fit: cover; // this will make sure it's correct even if the item isn't square
71
+ width: 100%;
67
72
  }
68
73
  }
69
74
 
70
75
  .hds-dropdown-toggle-icon__chevron {
71
- margin-left: 0.25rem;
76
+ margin-left: 4px;
77
+
78
+ @media (prefers-reduced-motion: no-preference) {
79
+ transition: transform .3s;
80
+ }
81
+
82
+ .hds-dropdown-toggle-icon--is-open & {
83
+ transform: rotate(-180deg);
84
+ }
72
85
  }
73
86
 
74
87
  // TOGGLE/BUTTON
75
- .hds-dropdown-toggle--with-button-component {
88
+
89
+ .hds-dropdown-toggle-button {
76
90
  box-shadow: none; // we override this to remove the elevation style
77
91
 
78
92
  .hds-button__icon {
93
+ margin-left: 8px; // this overrides the rule `.hds-button__text + .hds-button__icon`
79
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
80
- margin-left: 0.5rem; // this overrides the rule `.hds-button__text + .hds-button__icon`
95
+
96
+ @media (prefers-reduced-motion: no-preference) {
97
+ transition: transform .3s;
98
+ }
99
+ }
100
+ }
101
+
102
+
103
+ .hds-dropdown-toggle-button--is-open {
104
+ .hds-button__icon {
105
+ transform: rotate(-180deg);
81
106
  }
82
107
  }
83
108
 
@@ -92,71 +117,37 @@
92
117
  box-shadow: var(--token-surface-high-box-shadow);
93
118
  list-style: none;
94
119
  margin: 0;
95
- max-width: 25rem;
96
- min-width: 12.5rem;
120
+ max-width: 400px;
121
+ min-width: 200px;
97
122
  padding: 4px 0;
98
- &.hds-dropdown-list--position-right {
99
- position: absolute;
100
- right: 0;
101
- top: calc(100% + 0.25rem);
102
- z-index: 2; // https://github.com/hashicorp/design-system/issues/114
103
- }
104
-
105
- &.hds-dropdown-list--position-left {
106
- position: absolute;
107
- left: 0;
108
- top: calc(100% + 0.25rem);
109
- z-index: 2; // https://github.com/hashicorp/design-system/issues/114
110
- }
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)
111
124
  }
112
125
 
113
- // LIST > LIST-ITEM
114
- // HDS::DROPDOWN::LIST-ITEM
115
-
116
- .hds-dropdown-list-item--title {
117
- color: var(--token-color-foreground-strong);
118
- font-family: var(--token-typography-body-100-font-family);
119
- font-size: var(--token-typography-body-100-font-size);
120
- font-weight: var(--token-typography-font-weight-semibold);
121
- line-height: var(--token-typography-body-100-line-height);
122
- padding: 10px 16px 4px;
126
+ .hds-dropdown-list--fixed-width {
127
+ max-width: initial;
128
+ min-width: initial;
123
129
  }
124
130
 
125
- .hds-dropdown-list-item--generic {
126
- padding-left: 16px;
127
- padding-right: 16px;
131
+ .hds-dropdown-list--position-right {
132
+ position: absolute;
133
+ right: 0;
134
+ top: calc(100% + 4px);
135
+ z-index: 2; // https://github.com/hashicorp/design-system/issues/114
128
136
  }
129
137
 
130
- .hds-dropdown-list-item--description {
131
- color: var(--token-color-foreground-faint);
132
- font-family: var(--token-typography-body-100-font-family);
133
- font-size: var(--token-typography-body-100-font-size);
134
- font-weight: var(--token-typography-font-weight-regular);
135
- line-height: var(--token-typography-body-100-line-height);
136
- padding: 2px 16px 4px;
138
+ .hds-dropdown-list--position-left {
139
+ left: 0;
140
+ position: absolute;
141
+ top: calc(100% + 4px);
142
+ z-index: 2; // https://github.com/hashicorp/design-system/issues/114
137
143
  }
138
144
 
139
- .hds-dropdown-list-item--separator {
140
- position: relative;
141
- height: 4px;
142
- width: 100%;
143
145
 
144
- &::before {
145
- position: absolute;
146
- right: 6px;
147
- left: 6px;
148
- bottom: 0;
149
- border-bottom: 1px solid var(--token-color-border-primary);
150
- content: '';
151
- }
152
- }
146
+ // LIST > LIST-ITEM
147
+ // HDS::DROPDOWN::LIST-ITEM
153
148
 
154
149
  .hds-dropdown-list-item__copy-item-title {
155
150
  color: var(--token-color-foreground-faint);
156
- font-family: var(--token-typography-body-100-font-family);
157
- font-size: var(--token-typography-body-100-font-size); // 13
158
- font-weight: var(--token-typography-font-weight-semibold);
159
- line-height: var(--token-typography-body-100-line-height); // 18
160
151
  padding: 2px 0 4px;
161
152
  }
162
153
 
@@ -164,17 +155,16 @@
164
155
  padding: 10px 16px 12px;
165
156
  width: 100%;
166
157
 
167
- button {
158
+ button {
168
159
  background-color: transparent;
169
160
  border-radius: 5px;
170
161
  border: 1px solid var(--token-color-border-primary);
171
- color: var(--token-color-foreground-primary);
162
+ color: var(--token-color-foreground-primary);
172
163
  display: flex;
173
- font-family: var(--token-typography-font-stack-code);
174
164
  justify-content: space-between;
175
165
  padding: 12px 8px;
176
166
  width: 100%;
177
-
167
+
178
168
  &:hover,
179
169
  &.is-hover {
180
170
  background-color: var(--token-color-surface-interactive-hover);
@@ -182,55 +172,61 @@
182
172
  }
183
173
 
184
174
  @include hds-focus-ring-basic();
185
-
175
+
186
176
  &:focus,
187
177
  &.is-focus {
188
- //TODO this focus is just way too complex
178
+ //TODO this focus is just way too complex
189
179
  background-color: var(--token-color-surface-action);
190
180
  border-color: var(--token-color-focus-action-internal);
191
181
  }
192
-
193
- &:active,
182
+
183
+ &:active,
194
184
  &.is-active {
195
185
  background-color: var(--token-color-surface-interactive-active);
196
186
  }
197
187
 
198
188
  &.is-success {
199
- border-color: var(--token-color-border-success);
200
189
  background-color: var(--token-color-surface-success);
201
-
190
+ border-color: var(--token-color-border-success);
191
+
202
192
  .hds-dropdown-list-item__copy-item-icon {
203
193
  color: var(--token-color-foreground-success);
204
194
  }
205
- }
206
-
207
- .hds-dropdown-list-item__copy-item-text {
208
- font-size: var(--token-typography-code-100-font-size);
209
- font-weight: var(--token-typography-font-weight-regular);
210
- line-height: var(--token-typography-code-100-line-height);
211
- // max-width: 250px; // TODO we should be able to figure out the proportions here
212
- overflow: hidden;
213
- text-align: left;
214
- text-overflow: ellipsis;
215
- white-space: nowrap;
216
- }
217
-
218
- .hds-dropdown-list-item__copy-item-icon {
219
- color: var(--token-color-foreground-action);
220
- margin-left: 0.5rem;
221
195
  }
222
196
  }
223
197
  }
224
198
 
199
+ .hds-dropdown-list-item__copy-item-text {
200
+ overflow: hidden;
201
+ text-align: left;
202
+ text-overflow: ellipsis;
203
+ white-space: nowrap;
204
+ }
205
+
206
+ .hds-dropdown-list-item__copy-item-icon {
207
+ color: var(--token-color-foreground-action);
208
+ flex: none;
209
+ margin-left: 8px;
210
+ }
211
+
212
+ .hds-dropdown-list-item--description {
213
+ color: var(--token-color-foreground-faint);
214
+ padding: 2px 16px 4px;
215
+ }
216
+
217
+ .hds-dropdown-list-item--generic {
218
+ padding-left: 16px;
219
+ padding-right: 16px;
220
+ }
221
+
222
+
225
223
  .hds-dropdown-list-item--interactive {
226
- position: relative;
227
224
  isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
228
225
  min-height: 36px;
226
+ position: relative;
229
227
 
230
- // need to reset a few extra things to make the button visually appear the same as the links
231
- // TODO this is 0.125rem taller than the link...
228
+ // need to reset a few extra things to make the button visually appear the same as the link
232
229
  button {
233
- border: 1px inset transparent; // cause of the extra height
234
230
  background-color: transparent;
235
231
  width: 100%;
236
232
 
@@ -243,10 +239,11 @@
243
239
  // shared styles for links and buttons
244
240
  a, button {
245
241
  align-items: center;
242
+ 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
246
243
  display: flex;
247
244
  outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
248
245
  outline-color: transparent;
249
- padding: 8px 10px 8px 16px;
246
+ padding: 7px 9px 7px 15px; // notice: we're subtracting 1px because of the transparent border
250
247
  text-decoration: none;
251
248
 
252
249
  // this is used for the left "hover" indicator
@@ -254,7 +251,7 @@
254
251
  border-radius: 1px;
255
252
  bottom: 6px;
256
253
  content: '';
257
- left: 0.25rem;
254
+ left: 4px;
258
255
  position: absolute;
259
256
  top: 6px;
260
257
  width: 2px;
@@ -267,59 +264,81 @@
267
264
  border-radius: 5px;
268
265
  bottom: 0px;
269
266
  content: '';
270
- left: 0.625rem;
267
+ left: 10px;
271
268
  position: absolute;
272
- right: 0.25rem;
273
- z-index: -1;
269
+ right: 4px;
274
270
  top: 0;
271
+ z-index: -1;
275
272
  }
276
273
 
277
274
  // Notice: to avoid too much duplication we define two local CSS variables
278
275
  // and define their values in the color variants below
279
276
 
277
+ &:hover,
278
+ &.is-hover {
279
+ color: var(--current-color-hover);
280
+ &::before {
281
+ background-color: currentColor;
282
+ }
283
+ }
284
+
280
285
  // default focus for browsers that still rely on ":focus"
281
286
  &:focus,
282
287
  &.is-focus {
288
+ color: var(--current-color-focus);
283
289
  &::after {
284
290
  background-color: var(--current-background-color);
285
291
  box-shadow: var(--current-focus-ring-box-shadow);
286
- left: 0.25rem;
292
+ left: 4px;
287
293
  }
288
294
  }
289
295
  // undo the previous declaration for browsers that support ":focus-visible" but wouldn't normally show default focus styles
290
296
  &:focus:not(:focus-visible) {
291
297
  &::after {
298
+ background-color: transparent;
292
299
  box-shadow: none;
293
300
  }
294
301
  }
295
302
  // set focus for browsers that support ":focus-visible"
296
303
  &:focus-visible {
304
+ color: var(--current-color-focus);
297
305
  &::after {
298
306
  background-color: var(--current-background-color);
299
307
  box-shadow: var(--current-focus-ring-box-shadow);
300
- left: 0.25rem;
308
+ left: 4px;
301
309
  }
302
310
  }
311
+
303
312
  // remove the focus ring on "active + focused" state (by design)
304
313
  &:focus:active,
314
+ &:focus-visible:active,
305
315
  &.is-focus.is-active {
306
316
  &::after {
317
+ background-color: var(--current-background-color);
307
318
  box-shadow: none;
319
+ left: 10px;
320
+ }
321
+ }
322
+
323
+ &:active,
324
+ &.is-active {
325
+ color: var(--current-color-active);
326
+ &::before {
327
+ background-color: currentColor;
328
+ }
329
+ &::after {
330
+ background-color: var(--current-background-color);
308
331
  }
309
332
  }
310
333
  }
311
334
  }
312
335
 
313
336
  .hds-dropdown-list-item__interactive-text {
314
- font-family: var(--token-typography-body-200-font-family);
315
- font-size: var(--token-typography-body-200-font-size);
316
- font-weight: var(--token-typography-font-weight-medium);
317
- line-height: var(--token-typography-body-200-line-height);
318
337
  text-align: left; // the button element was centering text
319
338
  }
320
339
 
321
340
  .hds-dropdown-list-item__interactive-icon {
322
- margin-right: 0.5rem;
341
+ margin-right: 8px;
323
342
  }
324
343
 
325
344
  .hds-dropdown-list-item--color-action {
@@ -327,30 +346,12 @@
327
346
  color: var(--token-color-foreground-primary);
328
347
 
329
348
  // assign the values to the local CSS variables used above
349
+ --current-color-hover: var(--token-color-foreground-action-hover);
350
+ --current-color-focus: var(--token-color-foreground-action-active);
351
+ --current-color-active: var(--token-color-foreground-action-active);
330
352
  &::after {
331
353
  --current-background-color: var(--token-color-surface-action);
332
- --current-focus-ring-box-shadow: var(
333
- --token-focus-ring-action-box-shadow
334
- );
335
- }
336
-
337
- &:hover,
338
- &.is-hover {
339
- color: var(--token-color-foreground-action-hover);
340
- &::before {
341
- background-color: currentColor;
342
- }
343
- }
344
-
345
- &:active,
346
- &.is-active {
347
- color: var(--token-color-foreground-action-active);
348
- &::before {
349
- background-color: currentColor;
350
- }
351
- &::after {
352
- background-color: var(--token-color-surface-action);
353
- }
354
+ --current-focus-ring-box-shadow: var(--token-focus-ring-action-box-shadow);
354
355
  }
355
356
  }
356
357
  }
@@ -360,33 +361,33 @@
360
361
  color: var(--token-color-foreground-critical);
361
362
 
362
363
  // assign the values to the local CSS variables used above
364
+ --current-color-hover: var(--token-color-palette-red-300);
365
+ --current-color-focus: var(--token-color-palette-red-400);
366
+ --current-color-active: var(--token-color-palette-red-400);
363
367
  &::after {
364
368
  --current-background-color: var(--token-color-surface-critical);
365
- --current-focus-ring-box-shadow: var(
366
- --token-focus-ring-critical-box-shadow
367
- );
369
+ --current-focus-ring-box-shadow: var(--token-focus-ring-critical-box-shadow);
368
370
  }
371
+ }
372
+ }
369
373
 
370
- &:hover,
371
- &.is-hover {
372
- color: var(
373
- --token-color-palette-red-300
374
- ); // TODO we need to add this token to the design system
375
- &::before {
376
- background-color: currentColor;
377
- }
378
- }
379
- &:active,
380
- &.is-active {
381
- color: var(
382
- --token-color-palette-red-400
383
- ); // TODO we need to add this token to the design system
384
- &::before {
385
- background-color: currentColor;
386
- }
387
- &::after {
388
- background-color: var(--token-color-surface-critical);
389
- }
390
- }
374
+ .hds-dropdown-list-item--separator {
375
+ height: 4px;
376
+ position: relative;
377
+ width: 100%;
378
+
379
+ &::before {
380
+ border-bottom: 1px solid var(--token-color-border-primary);
381
+ bottom: 0;
382
+ content: '';
383
+ left: 6px;
384
+ position: absolute;
385
+ right: 6px;
391
386
  }
392
387
  }
388
+
389
+ .hds-dropdown-list-item--title {
390
+ color: var(--token-color-foreground-strong);
391
+ padding: 10px 16px 4px;
392
+ }
393
+
@@ -2,8 +2,7 @@
2
2
  // LINK > STANDALONE COMPONENT
3
3
  //
4
4
  // properties within each class are sorted alphabetically
5
- // notice: pseudo-classes for the states *must* follow the order link > visited > focus > hover > active
6
- // see https://github.com/hashicorp/design-system-components/issues/132
5
+ // notice: pseudo-classes for the states *must* follow the order link > visited > hover > focus > active
7
6
  //
8
7
  //
9
8
 
@@ -0,0 +1,16 @@
1
+ //
2
+ // TOAST
3
+ //
4
+ // properties within each class are sorted alphabetically
5
+ //
6
+ //
7
+
8
+ .hds-toast {
9
+ // we apply an elevation to the "alert/inline" element
10
+ box-shadow: var(--token-elevation-higher-box-shadow);
11
+
12
+ // per design specs
13
+ min-width: min(360px, 80vw);
14
+ max-width: min(500px, 80vw);
15
+ width: fit-content;
16
+ }