@hashicorp/design-system-components 1.4.0 → 1.4.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 1.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#740](https://github.com/hashicorp/design-system/pull/740) [`cd1a09307`](https://github.com/hashicorp/design-system/commit/cd1a09307aef9617e7a31a5d9e722417f4c9045e) Thanks [@alex-ju](https://github.com/alex-ju)! - Add `indeterminate` style to `Checkbox` component
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`92c83961f`](https://github.com/hashicorp/design-system/commit/92c83961f0e8b01e52e3c596c85871ec5cf8c94d)]:
|
|
10
|
+
- @hashicorp/design-system-tokens@1.3.0
|
|
11
|
+
|
|
3
12
|
## 1.4.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -5,7 +5,7 @@ import { assert } from '@ember/debug';
|
|
|
5
5
|
|
|
6
6
|
const DENSITIES = ['short', 'medium', 'tall'];
|
|
7
7
|
const DEFAULT_DENSITY = 'medium';
|
|
8
|
-
const VALIGNMENTS = ['top', 'middle'
|
|
8
|
+
const VALIGNMENTS = ['top', 'middle'];
|
|
9
9
|
const DEFAULT_VALIGN = 'top';
|
|
10
10
|
|
|
11
11
|
export default class HdsTableIndexComponent extends Component {
|
|
@@ -20,11 +20,21 @@ export default class HdsTableIndexComponent extends Component {
|
|
|
20
20
|
/**
|
|
21
21
|
* @param isStriped
|
|
22
22
|
* @type {boolean}
|
|
23
|
-
* @default
|
|
24
|
-
* @description Determines whether the table rows should have alternating background colors; defaults to
|
|
23
|
+
* @default false
|
|
24
|
+
* @description Determines whether the table rows should have alternating background colors; defaults to false.
|
|
25
25
|
*/
|
|
26
26
|
get isStriped() {
|
|
27
|
-
return this.args.isStriped ??
|
|
27
|
+
return this.args.isStriped ?? false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param isFixedLayout
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @default false
|
|
34
|
+
* @description Determines whether the table-display should be set to fixed; meaning, the table columns are of equal width no matter the content; defaults to false.
|
|
35
|
+
*/
|
|
36
|
+
get isFixedLayout() {
|
|
37
|
+
return this.args.isFixedLayout ?? false;
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
/**
|
|
@@ -50,7 +60,7 @@ export default class HdsTableIndexComponent extends Component {
|
|
|
50
60
|
* @param valign
|
|
51
61
|
* @type {string}
|
|
52
62
|
* @default 'top'
|
|
53
|
-
* @description Determines the vertical alignment of the table cells; options are
|
|
63
|
+
* @description Determines the vertical alignment of the table cells; options are: "top", "middle". If no valign is defined, "top" is used.
|
|
54
64
|
*/
|
|
55
65
|
get valign() {
|
|
56
66
|
let { valign = DEFAULT_VALIGN } = this.args;
|
|
@@ -78,6 +88,11 @@ export default class HdsTableIndexComponent extends Component {
|
|
|
78
88
|
classes.push('hds-table--striped');
|
|
79
89
|
}
|
|
80
90
|
|
|
91
|
+
// add a class based on the @isFixedLayout argument
|
|
92
|
+
if (this.isFixedLayout) {
|
|
93
|
+
classes.push('hds-table--layout-fixed');
|
|
94
|
+
}
|
|
95
|
+
|
|
81
96
|
// add a class based on the @density argument
|
|
82
97
|
if (this.density) {
|
|
83
98
|
classes.push(`hds-table--density-${this.density}`);
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
// base (default)
|
|
24
24
|
|
|
25
|
-
&:not(:checked) {
|
|
25
|
+
&:not(:checked, :indeterminate) {
|
|
26
26
|
background-color: var(--token-form-control-base-surface-color-default);
|
|
27
27
|
border-color: var(--token-form-control-base-border-color-default);
|
|
28
28
|
box-shadow: var(--hds-elevation-inset-box-shadow);
|
|
@@ -34,16 +34,24 @@
|
|
|
34
34
|
border-color: var(--token-form-control-checked-border-color-default);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
&:indeterminate {
|
|
38
|
+
background-color: var(--token-form-control-checked-surface-color-default);
|
|
39
|
+
background-image: var(--token-form-checkbox-background-image-data-url-indeterminate);
|
|
40
|
+
border-color: var(--token-form-control-checked-border-color-default);
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
// hover
|
|
38
44
|
|
|
39
|
-
&:hover:not(:checked),
|
|
40
|
-
&.mock-hover:not(:checked) {
|
|
45
|
+
&:hover:not(:checked, :indeterminate),
|
|
46
|
+
&.mock-hover:not(:checked, :indeterminate) {
|
|
41
47
|
background-color: var(--token-form-control-base-surface-color-hover);
|
|
42
48
|
border-color: var(--token-form-control-base-border-color-hover);
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
&:hover:checked,
|
|
46
|
-
&.mock-hover:checked
|
|
52
|
+
&.mock-hover:checked,
|
|
53
|
+
&:hover:indeterminate,
|
|
54
|
+
&.mock-hover:indeterminate {
|
|
47
55
|
background-color: var(--token-form-control-checked-border-color-default);
|
|
48
56
|
border-color: var(--token-form-control-checked-border-color-hover);
|
|
49
57
|
}
|
|
@@ -58,7 +66,7 @@
|
|
|
58
66
|
|
|
59
67
|
// DISABLED
|
|
60
68
|
|
|
61
|
-
&:disabled:not(:checked) {
|
|
69
|
+
&:disabled:not(:checked, :indeterminate) {
|
|
62
70
|
background-color: var(--token-form-control-disabled-surface-color);
|
|
63
71
|
border-color: var(--token-form-control-disabled-border-color);
|
|
64
72
|
box-shadow: none;
|
|
@@ -72,4 +80,13 @@
|
|
|
72
80
|
box-shadow: none;
|
|
73
81
|
cursor: not-allowed;
|
|
74
82
|
}
|
|
83
|
+
|
|
84
|
+
&:disabled:indeterminate {
|
|
85
|
+
background-color: var(--token-form-control-disabled-surface-color);
|
|
86
|
+
background-image: var(--token-form-checkbox-background-image-data-url-indeterminate-disabled);
|
|
87
|
+
background-repeat: no-repeat;
|
|
88
|
+
border-color: var(--token-form-control-disabled-border-color);
|
|
89
|
+
box-shadow: none;
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
}
|
|
75
92
|
}
|
|
@@ -16,12 +16,16 @@ $hds-table-cell-padding-tall: 20px 16px;
|
|
|
16
16
|
|
|
17
17
|
.hds-table {
|
|
18
18
|
width: 100%;
|
|
19
|
-
table-layout: fixed;
|
|
20
19
|
border: $hds-table-border-width solid $hds-table-border-color;
|
|
21
20
|
border-radius: $hds-table-border-radius;
|
|
22
21
|
border-spacing: 0;
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
// TABLE DISPLAY
|
|
25
|
+
.hds-table--layout-fixed {
|
|
26
|
+
table-layout: fixed;
|
|
27
|
+
}
|
|
28
|
+
|
|
25
29
|
// TABLE HEADER
|
|
26
30
|
.hds-table__thead {
|
|
27
31
|
.hds-table__tr {
|
|
@@ -131,21 +135,6 @@ $hds-table-cell-padding-tall: 20px 16px;
|
|
|
131
135
|
vertical-align: middle;
|
|
132
136
|
}
|
|
133
137
|
|
|
134
|
-
.hds-table--valign-bottom .hds-table__tbody td {
|
|
135
|
-
vertical-align: bottom;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.hds-table--valign-baseline .hds-table__tbody td {
|
|
139
|
-
vertical-align: baseline;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.hds-table--valign-sub .hds-table__tbody td {
|
|
143
|
-
vertical-align: sub;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.hds-table--valign-text-top .hds-table__tbody td {
|
|
147
|
-
vertical-align: text-top;
|
|
148
|
-
}
|
|
149
138
|
|
|
150
139
|
.hds-table__tbody {
|
|
151
140
|
.hds-table__tr {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "HashiCorp Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test:ember:percy": "percy exec ember test"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hashicorp/design-system-tokens": "^1.
|
|
39
|
+
"@hashicorp/design-system-tokens": "^1.3.0",
|
|
40
40
|
"@hashicorp/ember-flight-icons": "^3.0.2",
|
|
41
41
|
"dialog-polyfill": "^0.5.6",
|
|
42
42
|
"ember-auto-import": "^2.4.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@embroider/test-setup": "^1.8.3",
|
|
59
59
|
"@glimmer/component": "^1.1.2",
|
|
60
60
|
"@glimmer/tracking": "^1.1.2",
|
|
61
|
-
"@percy/cli": "^1.
|
|
61
|
+
"@percy/cli": "^1.16.0",
|
|
62
62
|
"@percy/ember": "^4.0.0",
|
|
63
63
|
"babel-eslint": "^10.1.0",
|
|
64
64
|
"broccoli-asset-rev": "^3.0.0",
|