@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.
Files changed (60) hide show
  1. package/.stylelintignore +26 -0
  2. package/CHANGELOG.md +31 -0
  3. package/addon/components/hds/badge/index.hbs +1 -1
  4. package/addon/components/hds/badge/index.js +3 -3
  5. package/addon/components/hds/badge-count/index.js +3 -3
  6. package/addon/components/hds/breadcrumb/item.js +1 -1
  7. package/addon/components/hds/card/container.js +5 -5
  8. package/addon/components/hds/dropdown/toggle/button.hbs +1 -0
  9. package/addon/components/hds/form/field/index.js +1 -1
  10. package/addon/components/hds/form/radio-card/description.hbs +1 -0
  11. package/addon/components/hds/form/radio-card/group.hbs +26 -0
  12. package/addon/components/hds/form/radio-card/index.hbs +20 -0
  13. package/addon/components/hds/form/radio-card/index.js +90 -0
  14. package/addon/components/hds/form/radio-card/label.hbs +1 -0
  15. package/addon/components/hds/form/text-input/base.js +1 -1
  16. package/addon/components/hds/icon-tile/index.hbs +3 -3
  17. package/addon/components/hds/icon-tile/index.js +3 -3
  18. package/addon/components/hds/stepper/step/indicator.js +1 -1
  19. package/addon/components/hds/stepper/task/indicator.js +1 -1
  20. package/app/components/hds/form/radio-card/description.js +1 -0
  21. package/app/components/hds/form/radio-card/group.js +1 -0
  22. package/app/components/hds/form/radio-card/index.js +1 -0
  23. package/app/components/hds/form/radio-card/label.js +1 -0
  24. package/app/styles/@hashicorp/design-system-components.scss +12 -12
  25. package/app/styles/@hashicorp/design-system-power-select-overrides.scss +225 -0
  26. package/app/styles/components/alert.scss +39 -37
  27. package/app/styles/components/avatar.scss +6 -6
  28. package/app/styles/components/badge-count.scss +19 -20
  29. package/app/styles/components/badge.scss +21 -22
  30. package/app/styles/components/breadcrumb.scss +123 -123
  31. package/app/styles/components/button-set.scss +5 -5
  32. package/app/styles/components/button.scss +56 -49
  33. package/app/styles/components/card/container.scss +5 -4
  34. package/app/styles/components/card/index.scss +1 -1
  35. package/app/styles/components/dropdown.scss +76 -66
  36. package/app/styles/components/empty-state.scss +8 -5
  37. package/app/styles/components/form/checkbox.scss +11 -8
  38. package/app/styles/components/form/error.scss +3 -3
  39. package/app/styles/components/form/field.scss +5 -4
  40. package/app/styles/components/form/group.scss +3 -2
  41. package/app/styles/components/form/helper-text.scss +1 -1
  42. package/app/styles/components/form/index.scss +1 -1
  43. package/app/styles/components/form/label.scss +2 -2
  44. package/app/styles/components/form/legend.scss +1 -1
  45. package/app/styles/components/form/radio-card.scss +146 -0
  46. package/app/styles/components/form/radio.scss +11 -8
  47. package/app/styles/components/form/select.scss +14 -12
  48. package/app/styles/components/form/text-input.scss +14 -13
  49. package/app/styles/components/form/textarea.scss +7 -7
  50. package/app/styles/components/form/toggle.scss +38 -36
  51. package/app/styles/components/icon-tile.scss +35 -37
  52. package/app/styles/components/link/inline.scss +3 -3
  53. package/app/styles/components/link/standalone.scss +13 -15
  54. package/app/styles/components/stepper/index.scss +2 -2
  55. package/app/styles/components/stepper/step-indicator.scss +23 -18
  56. package/app/styles/components/stepper/task-indicator.scss +45 -45
  57. package/app/styles/components/tag.scss +15 -15
  58. package/app/styles/components/toast.scss +3 -3
  59. package/app/styles/mixins/_focus-ring.scss +8 -8
  60. package/package.json +14 -8
@@ -5,20 +5,19 @@
5
5
  //
6
6
  //
7
7
 
8
- $hds-icon-tile-sizes: ( 'small', 'medium', 'large' );
9
- $hds-icon-tile-types: ( 'object','resource','logo' );
10
- $hds-icon-tile-colors-products: ( 'boundary', 'consul', 'hcp', 'nomad', 'packer', 'terraform', 'vagrant', 'vault', 'waypoint' );
11
-
12
- $hds-icon-tile-border-width: 1px;
13
- $hds-icon-tile-box-shadow: 0px 1px 1px rgba(#656A76, 0.05);
8
+ $hds-icon-tile-sizes: ( "small", "medium", "large" );
9
+ $hds-icon-tile-types: ( "object","resource","logo" );
10
+ $hds-icon-tile-colors-products: ( "boundary", "consul", "hcp", "nomad", "packer", "terraform", "vagrant", "vault", "waypoint" );
11
+ $hds-icon-tile-border-width: 1px;
12
+ $hds-icon-tile-box-shadow: 0 1px 1px rgba(#656a76, 0.05);
14
13
 
15
14
 
16
15
  .hds-icon-tile {
17
- border-radius: 4px;
16
+ position: relative;
17
+ display: flex;
18
18
  border: $hds-icon-tile-border-width solid transparent;
19
+ border-radius: 4px;
19
20
  box-shadow: $hds-icon-tile-box-shadow;
20
- display: flex;
21
- position: relative;
22
21
  }
23
22
 
24
23
  .hds-icon-tile__icon,
@@ -28,14 +27,14 @@
28
27
  }
29
28
 
30
29
  .hds-icon-tile__extra {
30
+ position: absolute;
31
+ right: -6px;
32
+ bottom: -6px;
33
+ display: flex;
34
+ box-sizing: content-box; // the border is outside
31
35
  background-color: var(--token-color-surface-primary);
32
36
  border: 1px solid var(--token-color-border-primary);
33
- bottom: -6px;
34
37
  box-shadow: $hds-icon-tile-box-shadow;
35
- box-sizing: content-box; // the border is outside
36
- right: -6px;
37
- display: flex;
38
- position: absolute;
39
38
  }
40
39
 
41
40
  .hds-icon-tile__extra-icon {
@@ -53,27 +52,27 @@ $size-props: (
53
52
  "border-radius": 5px,
54
53
  "icon-size": 1rem, // 16px
55
54
  "logo-size": 1.125rem, // 18px
56
- 'extra-size': 1.125rem, // 18px
57
- 'extra-border-radius': 4px,
58
- 'extra-icon-size': 0.75rem,
55
+ "extra-size": 1.125rem, // 18px
56
+ "extra-border-radius": 4px,
57
+ "extra-icon-size": 0.75rem,
59
58
  ),
60
59
  "medium": (
61
- "size": 2.5rem, // 40px
62
- "border-radius": 6px,
63
- "icon-size": 1.5rem, // 24px
64
- "logo-size": 1.75rem, // 28px
65
- 'extra-size': 1.5rem, // 24px
66
- 'extra-border-radius': 5px,
67
- 'extra-icon-size': 1rem,
60
+ "size": 2.5rem, // 40px
61
+ "border-radius": 6px,
62
+ "icon-size": 1.5rem, // 24px
63
+ "logo-size": 1.75rem, // 28px
64
+ "extra-size": 1.5rem, // 24px
65
+ "extra-border-radius": 5px,
66
+ "extra-icon-size": 1rem,
68
67
  ),
69
68
  "large": (
70
69
  "size": 3rem, // 48px
71
70
  "border-radius": 6px,
72
71
  "icon-size": 1.5rem, // 24px
73
72
  "logo-size": 2rem, // 32px
74
- 'extra-size': 1.5rem, // 24px
75
- 'extra-border-radius': 5px,
76
- 'extra-icon-size': 1rem,
73
+ "extra-size": 1.5rem, // 24px
74
+ "extra-border-radius": 5px,
75
+ "extra-icon-size": 1rem,
77
76
  )
78
77
  );
79
78
 
@@ -84,24 +83,24 @@ $size-props: (
84
83
  border-radius: map-get($size-props, $size, "border-radius");
85
84
 
86
85
  .hds-icon-tile__icon {
87
- height: map-get($size-props, $size, "icon-size");
88
86
  width: map-get($size-props, $size, "icon-size");
87
+ height: map-get($size-props, $size, "icon-size");
89
88
  }
90
89
 
91
90
  .hds-icon-tile__logo {
92
- height: map-get($size-props, $size, "logo-size");
93
91
  width: map-get($size-props, $size, "logo-size");
92
+ height: map-get($size-props, $size, "logo-size");
94
93
  }
95
94
 
96
95
  .hds-icon-tile__extra {
97
- border-radius: map-get($size-props, $size, "extra-border-radius");
98
- height: map-get($size-props, $size, "extra-size");
99
96
  width: map-get($size-props, $size, "extra-size");
97
+ height: map-get($size-props, $size, "extra-size");
98
+ border-radius: map-get($size-props, $size, "extra-border-radius");
100
99
  }
101
100
 
102
101
  .hds-icon-tile__extra-icon {
103
- height: map-get($size-props, $size, "extra-icon-size");
104
102
  width: map-get($size-props, $size, "extra-icon-size");
103
+ height: map-get($size-props, $size, "extra-icon-size");
105
104
  }
106
105
  }
107
106
  }
@@ -118,26 +117,25 @@ $size-props: (
118
117
  // ICON - COLOR
119
118
 
120
119
  .hds-icon-tile--icon {
121
-
122
120
  &.hds-icon-tile--color-neutral {
121
+ color: var(--token-color-foreground-faint);
123
122
  background-color: var(--token-color-surface-faint);
124
123
  border-color: var(--token-color-border-primary);
125
- color: var(--token-color-foreground-faint);
126
124
  }
127
125
 
128
126
  @each $product in $hds-icon-tile-colors-products {
129
- @if ($product == 'hcp') {
127
+ @if ($product == "hcp") {
130
128
  // exception for HCP (we use neutral colors, we don't have specific product colors for foreground/background)
131
129
  &.hds-icon-tile--color-hcp {
130
+ color: var(--token-color-palette-#{$product}-brand);
132
131
  background-color: var(--token-color-surface-faint);
133
132
  border-color: var(--token-color-border-primary);
134
- color: var(--token-color-palette-#{$product}-brand);
135
133
  }
136
134
  } @else {
137
135
  &.hds-icon-tile--color-#{$product} {
136
+ color: var(--token-color-#{$product}-foreground);
138
137
  background: linear-gradient(135deg, var(--token-color-#{$product}-gradient-faint-start) 0%, var(--token-color-#{$product}-gradient-faint-stop) 100%);
139
138
  border-color: var(--token-color-#{$product}-border);
140
- color: var(--token-color-#{$product}-foreground);
141
139
  }
142
140
  }
143
141
  }
@@ -13,23 +13,23 @@
13
13
  &:focus,
14
14
  &.mock-focus,
15
15
  &:focus-visible {
16
+ text-decoration: none;
16
17
  outline: 2px solid var(--token-color-focus-action-internal);
17
18
  outline-offset: 1px;
18
- text-decoration: none;
19
19
  }
20
20
  }
21
21
 
22
22
  .hds-link-inline__icon {
23
23
  display: inline-block;
24
+ width: 1em;
24
25
  height: 1em;
25
26
  vertical-align: text-bottom; // don't use "middle" here or it will extend beyond the focus ring
26
- width: 1em;
27
27
 
28
28
  .hds-link-inline--icon-leading > & {
29
29
  margin-right: 0.25em;
30
30
  }
31
31
 
32
- .hds-link-inline--icon-trailing > & {
32
+ .hds-link-inline--icon-trailing > & {
33
33
  margin-left: 0.25em;
34
34
  }
35
35
  }
@@ -8,22 +8,21 @@
8
8
 
9
9
  @use "../../mixins/focus-ring" as *;
10
10
 
11
- $hds-link-standalone-sizes: ( 'small', 'medium', 'large' );
12
-
11
+ $hds-link-standalone-sizes: ( "small", "medium", "large" );
13
12
  $hds-link-standalone-focus-border-radius: 5px;
14
13
  $hds-link-standalone-border-width: 1px;
15
14
 
16
15
  .hds-link-standalone {
16
+ display: flex;
17
17
  align-items: center;
18
+ justify-content: center;
19
+ width: fit-content;
20
+ font-weight: var(--token-typography-font-weight-medium);
21
+ font-family: var(--token-typography-font-stack-text);
18
22
  background-color: transparent; // needs to exist for a11y
19
23
  border: $hds-link-standalone-border-width solid transparent; // needs to exist AND be transparent for a11y
20
- display: flex;
21
- font-family: var(--token-typography-font-stack-text);
22
- font-weight: var(--token-typography-font-weight-medium);
23
- justify-content: center;
24
24
  // notice: the text decoration is applied directly to the "text" container because of a bug in Safari (see https://github.com/hashicorp/design-system-components/issues/159)
25
25
  text-decoration-color: transparent;
26
- width: fit-content;
27
26
  }
28
27
 
29
28
  .hds-link-standalone__text {
@@ -36,7 +35,7 @@ $hds-link-standalone-border-width: 1px;
36
35
  margin-left: 0.375rem;
37
36
  }
38
37
 
39
- & +.hds-link-standalone__icon {
38
+ & + .hds-link-standalone__icon {
40
39
  margin-left: 0.375rem;
41
40
  }
42
41
  }
@@ -64,10 +63,9 @@ $size-props: (
64
63
 
65
64
  @each $size in $hds-link-standalone-sizes {
66
65
  .hds-link-standalone--size-#{$size} {
67
-
68
66
  .hds-link-standalone__icon {
69
- height: map-get($size-props, $size, "icon-size");
70
67
  width: map-get($size-props, $size, "icon-size");
68
+ height: map-get($size-props, $size, "icon-size");
71
69
  }
72
70
 
73
71
  .hds-link-standalone__text {
@@ -89,7 +87,7 @@ $size-props: (
89
87
  color: var(--token-color-foreground-action-hover);
90
88
 
91
89
  .hds-link-standalone__text {
92
- text-decoration-color: #4E81E8; // custom color by design
90
+ text-decoration-color: #4e81e8; // custom color by design
93
91
  }
94
92
  }
95
93
 
@@ -98,7 +96,7 @@ $size-props: (
98
96
  color: var(--token-color-foreground-action-active);
99
97
 
100
98
  .hds-link-standalone__text {
101
- text-decoration-color: #396ED6; // custom color by design
99
+ text-decoration-color: #396ed6; // custom color by design
102
100
  }
103
101
 
104
102
  &::before {
@@ -113,7 +111,7 @@ $size-props: (
113
111
  &:hover,
114
112
  &.mock-hover {
115
113
  .hds-link-standalone__text {
116
- text-decoration-color: #4D4D4F; // custom color by design
114
+ text-decoration-color: #4d4d4f; // custom color by design
117
115
  }
118
116
  }
119
117
 
@@ -122,7 +120,7 @@ $size-props: (
122
120
  color: var(--token-color-foreground-primary);
123
121
 
124
122
  .hds-link-standalone__text {
125
- text-decoration-color: #6E7075; // custom color by design
123
+ text-decoration-color: #6e7075; // custom color by design
126
124
  }
127
125
 
128
126
  &::before {
@@ -153,4 +151,4 @@ $hds-link-standalone-focus-shift: 4px;
153
151
  &.hds-link-standalone--icon-position-trailing::before {
154
152
  left: -$shift-extra;
155
153
  }
156
- }
154
+ }
@@ -1,2 +1,2 @@
1
- @use './step-indicator.scss';
2
- @use './task-indicator.scss';
1
+ @use "./step-indicator.scss";
2
+ @use "./task-indicator.scss";
@@ -9,15 +9,16 @@ $hds-stepper-indicator-step-size: 24px;
9
9
 
10
10
  // Base stepper indicator styling
11
11
  .hds-stepper-indicator-step {
12
- height: $hds-stepper-indicator-step-size;
13
12
  position: relative;
14
13
  width: $hds-stepper-indicator-step-size;
14
+ height: $hds-stepper-indicator-step-size;
15
15
  }
16
16
 
17
17
  .hds-stepper-indicator-step__svg-hexagon {
18
- filter: drop-shadow(0 1px 1px rgba(101, 106, 118, 0.05));
19
- height: 100%;
20
18
  width: 100%;
19
+ height: 100%;
20
+ filter: drop-shadow(0 1px 1px rgba(101, 106, 118, 5%));
21
+
21
22
  path {
22
23
  fill: --status-fill-color;
23
24
  stroke: --status-stroke-color;
@@ -25,32 +26,32 @@ $hds-stepper-indicator-step-size: 24px;
25
26
  }
26
27
 
27
28
  .hds-stepper-indicator-step__status {
28
- align-items: center;
29
- display: flex;
30
- justify-content: center;
31
29
  position: absolute;
32
30
  top: 0;
33
31
  right: 0;
34
32
  bottom: 0;
35
33
  left: 0;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
36
37
  }
37
38
 
38
39
  .hds-stepper-indicator-step__icon {
39
- color: --status-text-color;
40
40
  width: 12px;
41
41
  height: 12px;
42
+ color: --status-text-color;
42
43
  }
43
44
 
44
45
  .hds-stepper-indicator-step__text {
46
+ width: 20px;
47
+ overflow: hidden;
45
48
  color: --status-text-color;
46
- font-family: var(--token-typography-font-stack-text);
47
49
  font-weight: var(--token-typography-font-weight-medium);
48
50
  font-size: 0.8125rem;
49
- overflow: hidden;
51
+ font-family: var(--token-typography-font-stack-text);
52
+ white-space: nowrap;
50
53
  text-align: center;
51
54
  user-select: none;
52
- white-space: nowrap;
53
- width: 20px;
54
55
  }
55
56
 
56
57
  // STATUS
@@ -86,7 +87,8 @@ $non-interactive-props: (
86
87
  .hds-stepper-indicator-step--status-#{$status} {
87
88
  .hds-stepper-indicator-step__status {
88
89
  color: map-get($non-interactive-props, $status, "text-color");
89
- };
90
+ }
91
+
90
92
  .hds-stepper-indicator-step__svg-hexagon path {
91
93
  fill: map-get($non-interactive-props, $status, "fill-color");
92
94
  stroke: map-get($non-interactive-props, $status, "stroke-color");
@@ -138,41 +140,44 @@ $status-props: (
138
140
 
139
141
  .hds-stepper-indicator-step--is-interactive {
140
142
  cursor: pointer;
141
-
142
- @each $status in $hds-stepper-indicator-step-statuses {
143
+
144
+ @each $status in $hds-stepper-indicator-step-statuses {
143
145
  // For each status set the text, svg fill, and svg stroke color based on $status-props
144
146
  &.hds-stepper-indicator-step--status-#{$status} {
145
147
  .hds-stepper-indicator-step__status {
146
148
  color: map-get($status-props, $status, "text-color-default");
147
149
  }
150
+
148
151
  .hds-stepper-indicator-step__svg-hexagon path {
149
152
  fill: map-get($status-props, $status, "fill-color-default");
150
153
  stroke: map-get($status-props, $status, "stroke-color-default");
151
154
  }
152
-
155
+
153
156
  &:hover,
154
157
  &.mock-hover {
155
158
  .hds-stepper-indicator-step__status {
156
159
  color: map-get($status-props, $status, "text-color-hover");
157
160
  }
161
+
158
162
  .hds-stepper-indicator-step__svg-hexagon {
159
163
  path {
160
164
  fill: map-get($status-props, $status, "fill-color-hover");
161
165
  stroke: map-get($status-props, $status, "stroke-color-hover");
162
- };
166
+ }
163
167
  }
164
168
  }
165
-
169
+
166
170
  &:active,
167
171
  &.mock-active {
168
172
  .hds-stepper-indicator-step__status {
169
173
  color: map-get($status-props, $status, "text-color-active");
170
174
  }
175
+
171
176
  .hds-stepper-indicator-step__svg-hexagon {
172
177
  path {
173
178
  fill: map-get($status-props, $status, "fill-color-active");
174
179
  stroke: map-get($status-props, $status, "stroke-color-active");
175
- };
180
+ }
176
181
  }
177
182
  }
178
183
  }
@@ -9,62 +9,62 @@ $hds-stepper-indicator-task-size: 16px;
9
9
 
10
10
  // Determine states and corresponding styles
11
11
  $status-props: (
12
- "incomplete": (
13
- "color-default": var(--token-color-palette-neutral-300),
14
- "color-hover": var(--token-color-palette-blue-300),
15
- "color-active": var(--token-color-palette-blue-400),
16
- ),
17
- "progress": (
18
- "color-default": var(--token-color-palette-blue-200),
19
- "color-hover": var(--token-color-palette-blue-300),
20
- "color-active": var(--token-color-palette-blue-400),
21
- ),
22
- "processing": (
23
- "color-default": var(--token-color-palette-blue-200),
24
- "color-hover": var(--token-color-palette-blue-300),
25
- "color-active": var(--token-color-palette-blue-400),
26
- ),
27
- "complete": (
28
- "color-default": var(--token-color-palette-green-200),
29
- "color-hover": var(--token-color-palette-green-300),
30
- "color-active": var(--token-color-palette-green-400),
31
- )
12
+ "incomplete": (
13
+ "color-default": var(--token-color-palette-neutral-300),
14
+ "color-hover": var(--token-color-palette-blue-300),
15
+ "color-active": var(--token-color-palette-blue-400),
16
+ ),
17
+ "progress": (
18
+ "color-default": var(--token-color-palette-blue-200),
19
+ "color-hover": var(--token-color-palette-blue-300),
20
+ "color-active": var(--token-color-palette-blue-400),
21
+ ),
22
+ "processing": (
23
+ "color-default": var(--token-color-palette-blue-200),
24
+ "color-hover": var(--token-color-palette-blue-300),
25
+ "color-active": var(--token-color-palette-blue-400),
26
+ ),
27
+ "complete": (
28
+ "color-default": var(--token-color-palette-green-200),
29
+ "color-hover": var(--token-color-palette-green-300),
30
+ "color-active": var(--token-color-palette-green-400),
31
+ )
32
32
  );
33
33
 
34
34
  // Base styling for indicator::task
35
35
  .hds-stepper-indicator-task {
36
- align-items: center;
37
- color: var(--token-color-foreground-strong);
38
- display: flex;
39
- height: $hds-stepper-indicator-task-size;
40
- justify-content: center;
41
- position: relative;
42
- width: $hds-stepper-indicator-task-size;
36
+ position: relative;
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ width: $hds-stepper-indicator-task-size;
41
+ height: $hds-stepper-indicator-task-size;
42
+ color: var(--token-color-foreground-strong);
43
43
  }
44
44
 
45
45
  .hds-stepper-indicator-task__icon {
46
- height: 12px;
47
- width: 12px;
46
+ width: 12px;
47
+ height: 12px;
48
48
  }
49
49
 
50
50
  .hds-stepper-indicator-task--is-interactive {
51
- cursor: pointer;
51
+ cursor: pointer;
52
52
 
53
- @each $status in $hds-stepper-indicator-task-statuses {
54
- // For each status set the icon color based on the $status-props
55
- &.hds-stepper-indicator-task--status-#{$status} {
56
- color: map-get($status-props, $status, "color-default");
57
- &:hover,
58
- &.mock-hover {
59
- color: map-get($status-props, $status, "color-hover");
60
- };
61
- &:active,
62
- &.mock-active {
63
- color: map-get($status-props, $status, "color-active");
64
- };
65
- }
66
- }
67
- }
53
+ @each $status in $hds-stepper-indicator-task-statuses {
54
+ // For each status set the icon color based on the $status-props
55
+ &.hds-stepper-indicator-task--status-#{$status} {
56
+ color: map-get($status-props, $status, "color-default");
68
57
 
58
+ &:hover,
59
+ &.mock-hover {
60
+ color: map-get($status-props, $status, "color-hover");
61
+ }
69
62
 
63
+ &:active,
64
+ &.mock-active {
65
+ color: map-get($status-props, $status, "color-active");
66
+ }
67
+ }
68
+ }
69
+ }
70
70
 
@@ -11,47 +11,47 @@
11
11
  $hds-tag-border-radius: 50px;
12
12
 
13
13
  .hds-tag {
14
+ display: inline-flex;
14
15
  align-items: stretch;
15
- background-color: var(--token-color-surface-interactive);
16
- border: 1px solid var(--token-color-border-strong);
17
- border-radius: $hds-tag-border-radius;
18
16
  color: var(--token-color-foreground-primary);
19
- display: inline-flex;
20
- font-family: var(--token-typography-font-stack-text);
21
- font-size: 0.8125rem; // 13px
22
17
  font-weight: var(--token-typography-font-weight-medium);
18
+ font-size: 0.8125rem; // 13px
19
+ font-family: var(--token-typography-font-stack-text);
23
20
  line-height: 1rem; // 16px
24
21
  vertical-align: middle;
22
+ background-color: var(--token-color-surface-interactive);
23
+ border: 1px solid var(--token-color-border-strong);
24
+ border-radius: $hds-tag-border-radius;
25
25
  }
26
26
 
27
27
  .hds-tag__dismiss {
28
28
  flex: 0 0 auto;
29
+ margin: 0; // reset default button margin
30
+ padding: 6px 2px 6px 8px;
31
+ border: none; // reset default button border
29
32
  border-radius: inherit;
30
33
  border-top-right-radius: 0;
31
34
  border-bottom-right-radius: 0;
32
- border: none; // reset default button border
33
- margin: 0; // reset default button margin
34
- padding: 6px 2px 6px 8px;
35
35
  }
36
36
 
37
37
  .hds-tag__dismiss-icon {
38
- color: var(--token-color-foreground-primary);
39
- height: 12px;
40
38
  width: 12px;
39
+ height: 12px;
40
+ color: var(--token-color-foreground-primary);
41
41
  }
42
42
 
43
43
  .hds-tag__text,
44
44
  .hds-tag__link {
45
- border-radius: inherit;
46
45
  flex: 1 0 0;
47
46
  padding: 3px 10px 5px 10px;
47
+ border-radius: inherit;
48
48
  }
49
49
 
50
50
  .hds-tag__dismiss ~ .hds-tag__text,
51
51
  .hds-tag__dismiss ~ .hds-tag__link {
52
+ padding: 3px 8px 5px 6px;
52
53
  border-top-left-radius: 0;
53
54
  border-bottom-left-radius: 0;
54
- padding: 3px 8px 5px 6px;
55
55
  }
56
56
 
57
57
  // INTERACTIVE ELEMENTS
@@ -67,7 +67,7 @@ $hds-tag-border-radius: 50px;
67
67
  }
68
68
 
69
69
  &:active,
70
- &.mock-active{
70
+ &.mock-active {
71
71
  background-color: var(--token-color-surface-interactive-active);
72
72
  }
73
73
 
@@ -90,7 +90,7 @@ $hds-tag-border-radius: 50px;
90
90
  }
91
91
 
92
92
  &:active,
93
- &.mock-active{
93
+ &.mock-active {
94
94
  color: var(--token-color-foreground-action-active);
95
95
  }
96
96
  }
@@ -6,11 +6,11 @@
6
6
  //
7
7
 
8
8
  .hds-toast {
9
- // we apply an elevation to the "alert/inline" element
10
- box-shadow: var(--token-elevation-higher-box-shadow);
9
+ width: fit-content;
11
10
 
12
11
  // per design specs
13
12
  min-width: min(360px, 80vw);
14
13
  max-width: min(500px, 80vw);
15
- width: fit-content;
14
+ // we apply an elevation to the "alert/inline" element
15
+ box-shadow: var(--token-elevation-higher-box-shadow);
16
16
  }
@@ -27,20 +27,20 @@
27
27
  }
28
28
 
29
29
  @mixin hds-focus-ring-with-pseudo-element($top: 0, $right: 0, $bottom: 0, $left: 0, $radius: 5px, $color: action) {
30
- isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
30
+ position: relative;
31
31
  outline-style: solid; // used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656)
32
32
  outline-color: transparent;
33
- position: relative;
33
+ isolation: isolate; // used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container)
34
34
 
35
35
  &::before {
36
- border-radius: $radius;
37
- bottom: $bottom;
38
- content: '';
39
- left: $left;
40
36
  position: absolute;
41
- right: $right;
42
37
  top: $top;
38
+ right: $right;
39
+ bottom: $bottom;
40
+ left: $left;
43
41
  z-index: -1;
42
+ border-radius: $radius;
43
+ content: "";
44
44
  }
45
45
 
46
46
  // default focus for browsers that still rely on ":focus"
@@ -69,4 +69,4 @@
69
69
  box-shadow: none;
70
70
  }
71
71
  }
72
- }
72
+ }