@hashicorp/design-system-components 2.7.0 → 2.8.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 (55) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/HOW-TO-TEST-A-COMPONENT-IN-CLOUD-UI.md +21 -0
  3. package/NEW-COMPONENT-CHECKLIST.md +1 -0
  4. package/README.md +1 -1
  5. package/addon/components/hds/accordion/index.hbs +8 -0
  6. package/addon/components/hds/accordion/item/button.hbs +11 -0
  7. package/addon/components/hds/accordion/item/button.js +31 -0
  8. package/addon/components/hds/accordion/item/index.hbs +25 -0
  9. package/addon/components/hds/accordion/item/index.js +58 -0
  10. package/addon/components/hds/alert/description.hbs +1 -1
  11. package/addon/components/hds/alert/index.hbs +1 -1
  12. package/addon/components/hds/alert/title.hbs +1 -1
  13. package/addon/components/hds/card/container.js +2 -2
  14. package/addon/components/hds/dropdown/list-item/checkmark.hbs +3 -3
  15. package/addon/components/hds/dropdown/list-item/separator.hbs +6 -1
  16. package/addon/components/hds/flyout/index.js +8 -1
  17. package/addon/components/hds/form/masked-input/base.hbs +34 -0
  18. package/addon/components/hds/form/masked-input/base.js +72 -0
  19. package/addon/components/hds/form/masked-input/field.hbs +30 -0
  20. package/addon/components/hds/form/text-input/base.js +6 -1
  21. package/addon/components/hds/form/text-input/field.hbs +1 -0
  22. package/addon/components/hds/modal/index.js +13 -2
  23. package/addon/components/hds/side-nav/list/link.hbs +5 -3
  24. package/app/components/hds/accordion/index.js +6 -0
  25. package/app/components/hds/accordion/item/button.js +6 -0
  26. package/app/components/hds/accordion/item/index.js +6 -0
  27. package/app/components/hds/form/masked-input/base.js +6 -0
  28. package/app/components/hds/form/masked-input/field.js +6 -0
  29. package/app/styles/@hashicorp/design-system-components.scss +1 -0
  30. package/app/styles/components/accordion.scss +120 -0
  31. package/app/styles/components/alert.scss +2 -23
  32. package/app/styles/components/application-state.scss +1 -7
  33. package/app/styles/components/badge.scss +1 -4
  34. package/app/styles/components/button-set.scss +1 -4
  35. package/app/styles/components/button.scss +0 -8
  36. package/app/styles/components/disclosure-primitive.scss +0 -1
  37. package/app/styles/components/dropdown.scss +4 -11
  38. package/app/styles/components/flyout.scss +1 -2
  39. package/app/styles/components/form/error.scss +2 -1
  40. package/app/styles/components/form/index.scss +1 -0
  41. package/app/styles/components/form/masked-input.scss +46 -0
  42. package/app/styles/components/form/text-input.scss +5 -0
  43. package/app/styles/components/form/textarea.scss +2 -2
  44. package/app/styles/components/link/standalone.scss +2 -9
  45. package/app/styles/components/modal.scss +1 -2
  46. package/app/styles/components/page-header.scss +3 -0
  47. package/app/styles/components/pagination.scss +2 -9
  48. package/app/styles/components/reveal.scss +2 -0
  49. package/app/styles/components/side-nav/content.scss +1 -7
  50. package/app/styles/components/side-nav/header.scss +1 -2
  51. package/app/styles/components/table.scss +4 -4
  52. package/app/styles/components/tabs.scss +1 -8
  53. package/app/styles/components/tooltip.scss +1 -0
  54. package/app/styles/mixins/_button.scss +7 -0
  55. package/package.json +24 -22
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ //
7
+ // ACCORDION
8
+ //
9
+
10
+ @use "../mixins/button" as *;
11
+ @use "../mixins/focus-ring" as *;
12
+
13
+ $accordion-item-padding: 16px;
14
+ $accordion-item-border-radius: 6px;
15
+
16
+ // ACCORDION COMPONENT (wrapper)
17
+
18
+ .hds-accordion {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 12px;
22
+ }
23
+
24
+ // ACCORDION ITEM COMPONENT (nested child)
25
+
26
+ .hds-accordion-item {
27
+ background: var(--token-color-surface-primary);
28
+ border-radius: $accordion-item-border-radius;
29
+
30
+ &.hds-accordion-item--does-not-contain-interactive {
31
+ box-shadow: var(--token-surface-mid-box-shadow);
32
+
33
+ &:hover,
34
+ &.mock-hover {
35
+ box-shadow: var(--token-surface-high-box-shadow);
36
+ }
37
+ }
38
+
39
+ &.hds-accordion-item--contains-interactive {
40
+ box-shadow: var(--token-surface-base-box-shadow);
41
+ }
42
+ }
43
+
44
+ // TOGGLE BLOCK
45
+
46
+ .hds-accordion-item__toggle {
47
+ position: relative;
48
+ display: flex;
49
+ gap: 12px;
50
+ align-items: center;
51
+ padding:
52
+ $accordion-item-padding
53
+ $accordion-item-padding
54
+ $accordion-item-padding
55
+ 12px; // by design
56
+ }
57
+
58
+ .hds-accordion-item__button {
59
+ padding: 0;
60
+
61
+ &:hover { cursor: pointer; }
62
+
63
+ // entire toggle area is interactive
64
+ &.hds-accordion-item__button--parent-does-not-contain-interactive {
65
+ @include hds-focus-ring-with-pseudo-element();
66
+ position: static;
67
+ margin: -1px 0;
68
+ color: var(--token-color-foreground-primary);
69
+ background: transparent;
70
+ border: 1px solid transparent;
71
+
72
+ // expand button target to cover entire AccordionItem Toggle block (depending on the `@containsInteractive/@parentContainsInteractive` argument)
73
+ &::after {
74
+ position: absolute;
75
+ display: block;
76
+ border-radius: $accordion-item-border-radius;
77
+ content: "";
78
+ inset: 0;
79
+ }
80
+ }
81
+
82
+ // only chevron button area is interactive
83
+ &.hds-accordion-item__button--parent-contains-interactive {
84
+ @include hds-button();
85
+ width: 24px;
86
+ height: 24px;
87
+
88
+ &:focus,
89
+ &.mock-focus {
90
+ @include hds-button-state-focus();
91
+ }
92
+
93
+ // `hds-button-color-secondary` determines the focus color and needs to be placed after `hds-button-state-focus`
94
+ @include hds-button-color-secondary();
95
+ }
96
+
97
+ // animate chevron icon
98
+ &.hds-accordion-item__button--is-open {
99
+ .flight-icon-chevron-down {
100
+ transform: rotate(-180deg);
101
+ }
102
+ }
103
+
104
+ .flight-icon-chevron-down {
105
+ @media (prefers-reduced-motion: no-preference) {
106
+ transition: transform 0.3s;
107
+ }
108
+ }
109
+ }
110
+
111
+ // Consumer added content that appears next to the chevron button:
112
+ .hds-accordion-item__toggle-content {
113
+ flex: 1;
114
+ }
115
+
116
+ // CONTENT BLOCK
117
+
118
+ .hds-accordion-item__content {
119
+ padding: 4px $accordion-item-padding $accordion-item-padding $accordion-item-padding;
120
+ }
@@ -37,32 +37,14 @@
37
37
  .hds-alert__text {
38
38
  display: flex;
39
39
  flex-direction: column;
40
+ gap: 4px;
40
41
  justify-content: center;
41
42
  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
- line-height: var(--token-typography-body-200-line-height);
45
-
46
- .hds-alert--type-compact & {
47
- font-size: var(--token-typography-body-100-font-size);
48
- font-family: var(--token-typography-body-100-font-family);
49
- line-height: var(--token-typography-body-100-line-height);
50
- }
51
- }
52
-
53
- .hds-alert__title {
54
- font-weight: var(--token-typography-font-weight-semibold);
55
43
  }
56
44
 
57
45
  .hds-alert__description {
58
- color: var(--token-color-foreground-primary);
59
- font-weight: var(--token-typography-font-weight-regular);
60
46
  word-break: break-word;
61
47
 
62
- .hds-alert__title + & {
63
- margin-top: 4px;
64
- }
65
-
66
48
  // we add very basic styling for elements that may be injected via the "description" string
67
49
 
68
50
  strong {
@@ -106,15 +88,12 @@
106
88
 
107
89
  .hds-alert__actions {
108
90
  display: flex;
91
+ gap: 16px;
109
92
  align-items: center;
110
93
 
111
94
  > * {
112
95
  margin-top: 16px;
113
96
  }
114
-
115
- > * + * {
116
- margin-left: 8px;
117
- }
118
97
  }
119
98
 
120
99
  // DISMISS
@@ -33,23 +33,17 @@ $hds-application-state-padding: 12px 0;
33
33
  }
34
34
 
35
35
  .hds-application-state__body {
36
- display: flex;
37
36
  padding: $hds-application-state-padding;
38
37
  color: var(--token-color-foreground-faint);
39
38
  }
40
39
 
41
40
  .hds-application-state__footer {
42
41
  display: flex;
42
+ gap: 8px;
43
43
  justify-content: space-between;
44
44
 
45
45
  &.hds-application-state__footer--has-divider {
46
46
  padding: $hds-application-state-padding;
47
47
  border-top: 1px solid var(--token-color-border-strong);
48
48
  }
49
-
50
- // in case users do something outside design guidelines
51
- .hds-link-standalone + .hds-link-standalone {
52
- margin-left: 8px;
53
- }
54
49
  }
55
-
@@ -69,6 +69,7 @@ $size-props: (
69
69
 
70
70
  @each $size in $hds-badge-sizes {
71
71
  .hds-badge--size-#{$size} {
72
+ gap: map-get($size-props, $size, "gap");
72
73
  min-height: map-get($size-props, $size, "height");
73
74
  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});
74
75
 
@@ -81,10 +82,6 @@ $size-props: (
81
82
  font-size: map-get($size-props, $size, "font-size");
82
83
  line-height: map-get($size-props, $size, "line-height");
83
84
  }
84
-
85
- .hds-badge__icon + .hds-badge__text {
86
- margin-inline-start: map-get($size-props, $size, "gap");
87
- }
88
85
  }
89
86
  }
90
87
 
@@ -9,8 +9,5 @@
9
9
 
10
10
  .hds-button-set {
11
11
  display: flex;
12
-
13
- > * + * {
14
- margin-left: 16px;
15
- }
12
+ gap: 16px;
16
13
  }
@@ -64,14 +64,6 @@
64
64
 
65
65
  .hds-button__text {
66
66
  flex: 1 0 0;
67
-
68
- .hds-button__icon + & {
69
- margin-left: 0.375rem;
70
- }
71
-
72
- & + .hds-button__icon {
73
- margin-left: 0.375rem;
74
- }
75
67
  }
76
68
 
77
69
 
@@ -9,5 +9,4 @@
9
9
 
10
10
  .hds-disclosure-primitive {
11
11
  position: relative;
12
- width: fit-content;
13
12
  }
@@ -29,6 +29,7 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
29
29
 
30
30
  .hds-dropdown-toggle-icon {
31
31
  display: flex;
32
+ gap: 2px;
32
33
  align-items: center;
33
34
  justify-content: center;
34
35
  padding: 1px;
@@ -56,10 +57,6 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
56
57
  &.mock-disabled {
57
58
  @include hds-button-state-disabled();
58
59
  }
59
-
60
- .hds-dropdown-toggle-chevron {
61
- padding-left: 4px;
62
- }
63
60
  }
64
61
 
65
62
  .hds-dropdown-toggle-icon__wrapper {
@@ -146,19 +143,18 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
146
143
 
147
144
  .hds-dropdown-toggle-button__icon {
148
145
  flex: none;
149
- margin-right: 0.375rem;
150
146
  }
151
147
 
152
148
  .hds-dropdown-toggle-button__badge,
153
149
  .hds-dropdown-toggle-button__count {
154
- margin: -3px 0 -3px 6px;
150
+ margin: -3px 0 -3px 0;
155
151
  }
156
152
 
157
153
  // TOGGLE / CHEVRON
158
154
 
159
155
  .hds-dropdown-toggle-chevron {
160
156
  margin-left: auto;
161
- padding-left: 8px;
157
+ padding-left: 2px;
162
158
 
163
159
  .flight-icon-chevron-down {
164
160
  @media (prefers-reduced-motion: no-preference) {
@@ -258,11 +254,8 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
258
254
  }
259
255
 
260
256
  > .hds-button-set {
257
+ gap: 8px;
261
258
  margin: 8px 0;
262
-
263
- > * + * {
264
- margin-left: 8px;
265
- }
266
259
  }
267
260
  }
268
261
 
@@ -53,6 +53,7 @@
53
53
  .hds-flyout__header {
54
54
  display: flex;
55
55
  flex: none;
56
+ gap: 16px;
56
57
  align-items: flex-start;
57
58
  padding: 16px 24px;
58
59
  color: var(--token-color-foreground-strong);
@@ -61,7 +62,6 @@
61
62
  .hds-flyout__icon {
62
63
  flex: none;
63
64
  align-self: center;
64
- margin-right: 16px;
65
65
  }
66
66
 
67
67
  .hds-flyout__title {
@@ -75,7 +75,6 @@
75
75
 
76
76
  .hds-flyout__dismiss {
77
77
  align-self: center;
78
- margin-left: 16px;
79
78
  }
80
79
 
81
80
  .hds-flyout__description {
@@ -9,6 +9,7 @@
9
9
 
10
10
  .hds-form-error {
11
11
  display: flex;
12
+ gap: 8px;
12
13
  align-items: flex-start;
13
14
  color: var(--token-form-error-color);
14
15
  }
@@ -17,7 +18,7 @@
17
18
  flex: none;
18
19
  width: var(--token-form-error-icon-size);
19
20
  height: var(--token-form-error-icon-size);
20
- margin: 2px 8px 2px 0;
21
+ margin: 2px 0 2px 0;
21
22
  }
22
23
 
23
24
  .hds-form-error__content {
@@ -15,6 +15,7 @@
15
15
  @use "./group";
16
16
  @use "./indicator";
17
17
  @use "./checkbox";
18
+ @use "./masked-input";
18
19
  @use "./radio";
19
20
  @use "./radio-card";
20
21
  @use "./select";
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ //
7
+ // MASKED-INPUT
8
+ //
9
+
10
+ $hds-form-masked-input-button-size: 24px;
11
+
12
+ .hds-form-masked-input {
13
+ position: relative;
14
+ width: 100%;
15
+
16
+ .hds-form-masked-input__control {
17
+ padding-right: calc(var(--token-form-control-padding) + $hds-form-masked-input-button-size);
18
+ }
19
+ }
20
+
21
+ .hds-form-masked-input--is-masked {
22
+ .hds-form-masked-input__control {
23
+ -webkit-text-security: disc;
24
+ }
25
+ }
26
+
27
+ .hds-form-masked-input--is-not-masked {
28
+ .hds-form-masked-input__control {
29
+ -webkit-text-security: none;
30
+ }
31
+ }
32
+
33
+ // notice: by design, for this button we don't apply a custom style for the focused state
34
+ // but we rely on the standard outlined styling provided by the browser
35
+ .hds-form-masked-input__toggle-button {
36
+ position: absolute;
37
+ top: calc(var(--token-form-control-padding) - var(--token-form-control-border-width));
38
+ right: calc(var(--token-form-control-padding) - var(--token-form-control-border-width));
39
+ width: $hds-form-masked-input-button-size;
40
+ height: $hds-form-masked-input-button-size;
41
+ padding: 2px;
42
+ color: var(--token-color-foreground-primary);
43
+ background-color: transparent;
44
+ border-color: transparent;
45
+ cursor: pointer;
46
+ }
@@ -141,5 +141,10 @@
141
141
  // stylelint-disable-next-line property-no-vendor-prefix
142
142
  -webkit-appearance: none;
143
143
  }
144
+
145
+ // IS LOADING
146
+ &.hds-form-text-input--is-loading {
147
+ background-image: var(--token-form-text-input-background-image-data-url-search-loading);
148
+ }
144
149
  }
145
150
  }
@@ -48,9 +48,9 @@
48
48
  // READONLY
49
49
 
50
50
  &:read-only {
51
- color: var(--token-form-control-disabled-foreground-color);
51
+ color: var(--token-form-control-readonly-foreground-color);
52
52
  background-color: var(--token-form-control-readonly-surface-color);
53
- border-color: var(--token-form-control-disabled-border-color);
53
+ border-color: var(--token-form-control-readonly-border-color);
54
54
  box-shadow: none;
55
55
  }
56
56
 
@@ -17,6 +17,7 @@ $hds-link-standalone-border-width: 1px;
17
17
 
18
18
  .hds-link-standalone {
19
19
  display: flex;
20
+ gap: 0.375rem;
20
21
  align-items: center;
21
22
  justify-content: center;
22
23
  width: fit-content;
@@ -33,14 +34,6 @@ $hds-link-standalone-border-width: 1px;
33
34
  text-decoration: underline;
34
35
  text-decoration-color: transparent;
35
36
  transition: text-decoration-color 0.25s ease-in;
36
-
37
- .hds-link-standalone__icon + & {
38
- margin-left: 0.375rem;
39
- }
40
-
41
- & + .hds-link-standalone__icon {
42
- margin-left: 0.375rem;
43
- }
44
37
  }
45
38
 
46
39
  // SIZE
@@ -49,7 +42,7 @@ $hds-link-standalone-border-width: 1px;
49
42
  $size-props: (
50
43
  "small": (
51
44
  "font-size": 0.8125rem, // 13px;
52
- "icon-size": 1rem, // 16px
45
+ "icon-size": 0.75rem, // 12px
53
46
  "line-height": 1.231, // ~16px
54
47
  ),
55
48
  "medium": (
@@ -42,6 +42,7 @@
42
42
  .hds-modal__header {
43
43
  display: flex;
44
44
  flex: none;
45
+ gap: 16px;
45
46
  align-items: flex-start;
46
47
  padding: 16px 24px;
47
48
  border-top-left-radius: inherit;
@@ -51,7 +52,6 @@
51
52
  .hds-modal__icon {
52
53
  flex: none;
53
54
  align-self: center;
54
- margin-right: 16px;
55
55
  }
56
56
 
57
57
  .hds-modal__title {
@@ -64,7 +64,6 @@
64
64
 
65
65
  .hds-modal__dismiss {
66
66
  align-self: center;
67
- margin-left: 16px;
68
67
  }
69
68
 
70
69
  .hds-modal__body {
@@ -8,6 +8,9 @@
8
8
  //
9
9
 
10
10
  .hds-page-header {
11
+ // `container-type: inline-size` creates a new stacking context; to control the position of Page Header content on the z-axis
12
+ // we set this element to `relative` to allow consumers to define the `z-index` value that works in their context
13
+ position: relative;
11
14
  display: flex;
12
15
  flex-direction: column;
13
16
  gap: 16px;
@@ -120,8 +120,9 @@ $pagination-layout-breakpoint: 1000px;
120
120
  }
121
121
  }
122
122
 
123
- // only the "Previous" & "Next" (`Arrow`) controls can be disabled
124
123
  .hds-pagination-nav__arrow {
124
+ gap: var(--token-pagination-nav-control-icon-spacing);
125
+ // only the "Previous" & "Next" (`Arrow`) controls can be disabled
125
126
  // notice: when `@disabled={{true}}` is applied, the code always renders a `<button>` element
126
127
  // so no need to add the [disabled] selector here (elsewhere it's done to cover the `a[disabled]` case)
127
128
  &:disabled,
@@ -134,19 +135,11 @@ $pagination-layout-breakpoint: 1000px;
134
135
  .hds-pagination-nav__arrow--direction-prev {
135
136
  flex-direction: row;
136
137
  justify-content: flex-start;
137
-
138
- .hds-pagination-nav__arrow-label {
139
- margin-left: var(--token-pagination-nav-control-icon-spacing);
140
- }
141
138
  }
142
139
 
143
140
  .hds-pagination-nav__arrow--direction-next {
144
141
  flex-direction: row-reverse;
145
142
  justify-content: flex-end;
146
-
147
- .hds-pagination-nav__arrow-label {
148
- margin-right: 6px;
149
- }
150
143
  }
151
144
 
152
145
  .hds-pagination-nav__number--is-selected {
@@ -7,6 +7,8 @@
7
7
  // REVEAL COMPONENT
8
8
  //
9
9
 
10
+ .hds-reveal { width: fit-content; }
11
+
10
12
  .hds-reveal__toggle-button {
11
13
  // overriding some styles of the tertiary button, per design specs
12
14
  min-height: 1.75rem; // 28px, Override default so padding difference will be visible
@@ -67,6 +67,7 @@
67
67
 
68
68
  .hds-side-nav__list-item-link { // <a>/<button> element (via Hds::Interactive)
69
69
  display: flex;
70
+ gap: var(--token-side-nav-body-list-item-content-spacing-horizontal);
70
71
  align-items: center;
71
72
  width: 100%;
72
73
  min-height: var(--token-side-nav-body-list-item-height);
@@ -118,11 +119,6 @@
118
119
  background: var(--token-color-surface-strong);
119
120
  }
120
121
  }
121
-
122
- .hds-badge,
123
- .hds-badge-count {
124
- margin-left: var(--token-side-nav-body-list-item-content-spacing-horizontal);
125
- }
126
122
  }
127
123
 
128
124
  // special override for the "back-link" element (no visible active state, by design)
@@ -149,11 +145,9 @@
149
145
 
150
146
  .hds-side-nav__list-item-icon-leading {
151
147
  flex: none;
152
- margin-right: var(--token-side-nav-body-list-item-content-spacing-horizontal);
153
148
  }
154
149
 
155
150
  .hds-side-nav__list-item-icon-trailing {
156
151
  flex: none;
157
152
  margin-left: auto;
158
- padding-left: var(--token-side-nav-body-list-item-content-spacing-horizontal);
159
153
  }
@@ -77,8 +77,7 @@
77
77
 
78
78
  .hds-side-nav-header__actions-container {
79
79
  display: flex;
80
-
81
- > * + * { margin-left: var(--token-side-nav-header-actions-spacing); }
80
+ gap: var(--token-side-nav-header-actions-spacing);
82
81
  }
83
82
 
84
83
  // dropdown overrides
@@ -15,9 +15,9 @@ $hds-table-border-width: 1px;
15
15
  $hds-table-inner-border-radius: $hds-table-border-radius - $hds-table-border-width;
16
16
  $hds-table-border-color: var(--token-color-border-primary);
17
17
  $hds-table-header-height: 48px;
18
- $hds-table-cell-padding-medium: 12px 16px;
19
- $hds-table-cell-padding-short: 4px 16px;
20
- $hds-table-cell-padding-tall: 20px 16px;
18
+ $hds-table-cell-padding-medium: 14px 16px 13px 16px; // the 1px difference is to account for the bottom border
19
+ $hds-table-cell-padding-short: 6px 16px 5px 16px; // the 1px difference is to account for the bottom border
20
+ $hds-table-cell-padding-tall: 22px 16px 21px 16px; // the 1px difference is to account for the bottom border
21
21
 
22
22
  .hds-table {
23
23
  width: 100%;
@@ -51,7 +51,7 @@ $hds-table-cell-padding-tall: 20px 16px;
51
51
 
52
52
  .hds-table__th,
53
53
  .hds-table__th-sort {
54
- height: $hds-table-header-height;
54
+ min-height: $hds-table-header-height;
55
55
  }
56
56
  }
57
57
 
@@ -73,6 +73,7 @@
73
73
  );
74
74
  position: static;
75
75
  display: flex;
76
+ gap: var(--token-tabs-tab-gutter);
76
77
  align-items: center;
77
78
  padding: 0;
78
79
  color: inherit;
@@ -89,14 +90,6 @@
89
90
  }
90
91
  }
91
92
 
92
- .hds-tabs__tab-icon {
93
- margin-right: var(--token-tabs-tab-gutter);
94
- }
95
-
96
- .hds-tabs__tab-count {
97
- margin-left: var(--token-tabs-tab-gutter);
98
- }
99
-
100
93
  .hds-tabs__tab-indicator {
101
94
  position: absolute;
102
95
  right: 0;
@@ -32,6 +32,7 @@
32
32
  padding: 0;
33
33
  color: inherit;
34
34
  font: inherit;
35
+ text-align: inherit;
35
36
  background-color: inherit;
36
37
  border: none;
37
38
  }
@@ -36,9 +36,16 @@ $size-props: (
36
36
  @mixin hds-button() {
37
37
  position: relative;
38
38
  display: flex;
39
+ gap: 0.375rem;
39
40
  align-items: center;
40
41
  justify-content: center;
41
42
  width: auto;
43
+ // notice: we set the font-weight of the button text to "regular" (on purpose)
44
+ // because of the antialising of the browser that renders the text quite different
45
+ // from what it looks like in Figma, so we prefer to have them visually similar
46
+ // even if they differ in their internal implementation (in Figma the font-weight is medium/500)
47
+ // for more context about this decision: https://hashicorp.atlassian.net/browse/HDS-2099
48
+ font-weight: var(--token-typography-font-weight-regular);
42
49
  font-family: var(--token-typography-font-stack-text);
43
50
  text-decoration: none;
44
51
  border: $hds-button-border-width solid transparent; // We need this to be transparent for a11y