@1024pix/pix-ui 55.3.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-banner-alert.js +3 -0
- 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-banner-alert.scss +20 -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
|
},
|
|
@@ -4,6 +4,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
4
4
|
const TYPE_INFO = 'information';
|
|
5
5
|
const TYPE_ERROR = 'error';
|
|
6
6
|
const TYPE_WARNING = 'warning';
|
|
7
|
+
const TYPE_ENVIRONMENT = 'environment';
|
|
7
8
|
const TYPE_COMMUNICATION = 'communication';
|
|
8
9
|
const TYPE_COMMUNICATION_ORGA = 'communication-orga';
|
|
9
10
|
const TYPE_COMMUNICATION_CERTIF = 'communication-certif';
|
|
@@ -12,6 +13,7 @@ const types = [
|
|
|
12
13
|
TYPE_INFO,
|
|
13
14
|
TYPE_ERROR,
|
|
14
15
|
TYPE_WARNING,
|
|
16
|
+
TYPE_ENVIRONMENT,
|
|
15
17
|
TYPE_COMMUNICATION,
|
|
16
18
|
TYPE_COMMUNICATION_ORGA,
|
|
17
19
|
TYPE_COMMUNICATION_CERTIF,
|
|
@@ -21,6 +23,7 @@ const icons = {
|
|
|
21
23
|
[TYPE_INFO]: 'info',
|
|
22
24
|
[TYPE_ERROR]: 'error',
|
|
23
25
|
[TYPE_WARNING]: 'warning',
|
|
26
|
+
[TYPE_ENVIRONMENT]: 'displaySettings',
|
|
24
27
|
[TYPE_COMMUNICATION]: 'campaign',
|
|
25
28
|
[TYPE_COMMUNICATION_ORGA]: 'campaign',
|
|
26
29
|
[TYPE_COMMUNICATION_CERTIF]: 'campaign',
|
|
@@ -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'];
|
|
@@ -87,5 +87,25 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
|
|
91
|
+
&--environment {
|
|
92
|
+
color: var(--pix-primary-700);
|
|
93
|
+
background-color: var(--pix-primary-10);
|
|
94
|
+
|
|
95
|
+
.pix-icon-button {
|
|
96
|
+
color: currentcolor;
|
|
97
|
+
background-color: var(--pix-primary-10);
|
|
98
|
+
|
|
99
|
+
&:hover:enabled,
|
|
100
|
+
&:focus:enabled,
|
|
101
|
+
&:active:enabled {
|
|
102
|
+
background-color: var(--pix-primary-100);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:focus:enabled {
|
|
106
|
+
outline-color: var(--pix-primary-700);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
90
110
|
}
|
|
91
111
|
|
|
@@ -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 {
|