@hashicorp/design-system-components 1.0.3 → 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 +26 -0
- package/addon/components/hds/avatar/index.hbs +7 -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/empty-state/body.hbs +3 -0
- package/addon/components/hds/empty-state/footer.hbs +3 -0
- package/addon/components/hds/empty-state/header.hbs +3 -0
- package/addon/components/hds/empty-state/index.hbs +9 -0
- package/addon/components/hds/form/field/index.js +1 -1
- package/addon/components/hds/form/label/index.hbs +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/components/hds/avatar/index.js +1 -0
- package/app/components/hds/empty-state/body.js +1 -0
- package/app/components/hds/empty-state/footer.js +1 -0
- package/app/components/hds/empty-state/header.js +1 -0
- package/app/components/hds/empty-state/index.js +1 -0
- package/app/styles/@hashicorp/design-system-components.scss +14 -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 +24 -0
- 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 +28 -0
- 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 +13 -5
|
@@ -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
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
47
|
-
|
|
46
|
+
width: 12px;
|
|
47
|
+
height: 12px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.hds-stepper-indicator-task--is-interactive {
|
|
51
|
-
|
|
51
|
+
cursor: pointer;
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "HashiCorp Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"build": "ember build --environment=production",
|
|
24
24
|
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
25
25
|
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
|
26
|
+
"lint:css": "stylelint \"app/styles/**/*.scss\"",
|
|
27
|
+
"lint:css:fix": "npm-run-all \"lint:css --fix\"",
|
|
26
28
|
"lint:hbs": "ember-template-lint .",
|
|
27
29
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
28
30
|
"lint:js": "eslint . --cache",
|
|
@@ -34,8 +36,8 @@
|
|
|
34
36
|
"test:ember:percy": "percy exec ember test"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@hashicorp/design-system-tokens": "^1.0.
|
|
38
|
-
"@hashicorp/ember-flight-icons": "^2.0.
|
|
39
|
+
"@hashicorp/design-system-tokens": "^1.0.1",
|
|
40
|
+
"@hashicorp/ember-flight-icons": "^2.0.12",
|
|
39
41
|
"ember-auto-import": "^2.4.1",
|
|
40
42
|
"ember-cli-babel": "^7.26.11",
|
|
41
43
|
"ember-cli-htmlbars": "^6.0.1",
|
|
@@ -50,8 +52,8 @@
|
|
|
50
52
|
"@embroider/test-setup": "^1.5.0",
|
|
51
53
|
"@glimmer/component": "^1.0.4",
|
|
52
54
|
"@glimmer/tracking": "^1.0.4",
|
|
53
|
-
"@percy/cli": "^1.
|
|
54
|
-
"@percy/ember": "^
|
|
55
|
+
"@percy/cli": "^1.10.3",
|
|
56
|
+
"@percy/ember": "^4.0.0",
|
|
55
57
|
"babel-eslint": "^10.1.0",
|
|
56
58
|
"broccoli-asset-rev": "^3.0.0",
|
|
57
59
|
"ember-a11y-refocus": "^2.1.0",
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"ember-export-application-global": "^2.0.1",
|
|
71
73
|
"ember-load-initializers": "^2.1.2",
|
|
72
74
|
"ember-page-title": "^7.0.0",
|
|
75
|
+
"ember-power-select": "^6.0.0",
|
|
73
76
|
"ember-prism": "^0.12.0",
|
|
74
77
|
"ember-qunit": "^5.1.5",
|
|
75
78
|
"ember-resolver": "^8.0.3",
|
|
@@ -91,6 +94,11 @@
|
|
|
91
94
|
"prettier": "^2.6.1",
|
|
92
95
|
"qunit": "^2.18.0",
|
|
93
96
|
"qunit-dom": "^2.0.0",
|
|
97
|
+
"stylelint": "^14.11.0",
|
|
98
|
+
"stylelint-config-prettier-scss": "0.0.1",
|
|
99
|
+
"stylelint-config-rational-order": "^0.1.2",
|
|
100
|
+
"stylelint-config-standard-scss": "^5.0.0",
|
|
101
|
+
"stylelint-prettier": "^2.0.0",
|
|
94
102
|
"version-bump-prompt": "^6.1.0",
|
|
95
103
|
"webpack": "^5.70.0"
|
|
96
104
|
},
|