@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.
@@ -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 certif, orga or primary`,
9
- ['primary', 'orga', 'certif'].includes(value),
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 ?? 'default';
7
+ const value = this.args.variant ?? 'primary';
9
8
  warn(
10
- `PixBlock: @variant "${value}" should be default, certif, orga or admin`,
11
- ['default', 'orga', 'certif', 'admin'].includes(value),
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
- <div class={{this.tableClass}} ...attributes>
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
- </div>
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 certif, orga or primary`,
10
- ['primary', 'orga', 'certif'].includes(value),
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
 
@@ -5,7 +5,7 @@
5
5
  background-color: var(--pix-neutral-0);
6
6
  border-radius: var(--pix-spacing-2x);
7
7
 
8
- &--default {
8
+ &--primary {
9
9
  padding: var(--pix-spacing-6x);
10
10
  border: solid 1px var(--pix-primary-100);
11
11
  }
@@ -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
- min-width: 100%;
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "55.3.0",
3
+ "version": "55.5.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"