@1024pix/pix-ui 55.4.0 → 55.5.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/addon/components/pix-app-layout.js +3 -2
- package/addon/components/pix-block.js +4 -5
- package/addon/components/pix-table.hbs +2 -2
- package/addon/components/pix-table.js +3 -2
- package/addon/helpers/variants.js +1 -0
- package/addon/styles/_pix-block.scss +1 -1
- package/addon/styles/_pix-table.scss +6 -6
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VARIANTS } from '@1024pix/pix-ui/helpers/variants';
|
|
1
2
|
import { warn } from '@ember/debug';
|
|
2
3
|
import Component from '@glimmer/component';
|
|
3
4
|
|
|
@@ -5,8 +6,8 @@ export default class PixAppLayout extends Component {
|
|
|
5
6
|
get variant() {
|
|
6
7
|
const value = this.args.variant ?? 'primary';
|
|
7
8
|
warn(
|
|
8
|
-
`PixAppLayout: @variant "${value}" should be
|
|
9
|
-
|
|
9
|
+
`PixAppLayout: @variant "${value}" should be ${VARIANTS.join(', ')}`,
|
|
10
|
+
VARIANTS.includes(value),
|
|
10
11
|
{
|
|
11
12
|
id: 'pix-ui.pix-app-layout.variant.not-valid',
|
|
12
13
|
},
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { VARIANTS } from '@1024pix/pix-ui/helpers/variants';
|
|
1
2
|
import { warn } from '@ember/debug';
|
|
2
3
|
import Component from '@glimmer/component';
|
|
3
4
|
|
|
4
5
|
export default class PixBlockComponent extends Component {
|
|
5
|
-
text = 'pix-block';
|
|
6
|
-
|
|
7
6
|
get variant() {
|
|
8
|
-
const value = this.args.variant ?? '
|
|
7
|
+
const value = this.args.variant ?? 'primary';
|
|
9
8
|
warn(
|
|
10
|
-
`PixBlock: @variant "${value}" should be
|
|
11
|
-
|
|
9
|
+
`PixBlock: @variant "${value}" should be ${VARIANTS.join(', ')}`,
|
|
10
|
+
VARIANTS.includes(value),
|
|
12
11
|
{
|
|
13
12
|
id: 'pix-ui.pix-block.variant.not-valid',
|
|
14
13
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<PixBlock @variant={{@variant}} class={{this.tableClass}} ...attributes>
|
|
2
2
|
<table>
|
|
3
3
|
<caption class="screen-reader-only">{{this.caption}}</caption>
|
|
4
4
|
<thead class={{this.headerClass}}>
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
{{/each}}
|
|
18
18
|
</tbody>
|
|
19
19
|
</table>
|
|
20
|
-
</
|
|
20
|
+
</PixBlock>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VARIANTS } from '@1024pix/pix-ui/helpers/variants';
|
|
1
2
|
import { warn } from '@ember/debug';
|
|
2
3
|
import { action } from '@ember/object';
|
|
3
4
|
import Component from '@glimmer/component';
|
|
@@ -6,8 +7,8 @@ export default class PixTable extends Component {
|
|
|
6
7
|
get variant() {
|
|
7
8
|
const value = this.args.variant ?? 'primary';
|
|
8
9
|
warn(
|
|
9
|
-
`PixTable: @variant "${value}" should be
|
|
10
|
-
|
|
10
|
+
`PixTable: @variant "${value}" should be ${VARIANTS.join(', ')}`,
|
|
11
|
+
VARIANTS.includes(value),
|
|
11
12
|
{
|
|
12
13
|
id: 'pix-ui.pix-table.variant.not-valid',
|
|
13
14
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VARIANTS = ['primary', 'orga', 'certif', 'admin'];
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
@use "pix-design-tokens/typography";
|
|
3
3
|
|
|
4
4
|
.pix-table {
|
|
5
|
-
width: 100%;
|
|
6
|
-
padding: var(--pix-spacing-4x);
|
|
5
|
+
min-width: 100%;
|
|
7
6
|
overflow: auto;
|
|
8
|
-
background-color: var(--pix-neutral-0);
|
|
9
|
-
border: solid 1px var(--pix-neutral-100);
|
|
10
|
-
border-radius: var(--pix-spacing-2x);
|
|
11
7
|
|
|
12
8
|
@extend %pix-body-s;
|
|
13
9
|
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
table {
|
|
35
|
-
|
|
31
|
+
width: 100%;
|
|
36
32
|
border-collapse: collapse;
|
|
37
33
|
|
|
38
34
|
tbody > tr:nth-of-type(even):not(.pix-table__clickable-row:hover, .pix-table__clickable-row:focus, .pix-table__clickable-row:active) {
|
|
@@ -51,6 +47,10 @@
|
|
|
51
47
|
&--certif {
|
|
52
48
|
background: var(--pix-certif-50);
|
|
53
49
|
}
|
|
50
|
+
|
|
51
|
+
&--admin {
|
|
52
|
+
background: var(--pix-primary-100);
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.pix-table-header-container {
|