@1024pix/pix-ui 61.0.0 → 61.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.
@@ -27,6 +27,10 @@ export default class PixCheckbox extends Component {
27
27
  return this.args.state === 'error';
28
28
  }
29
29
 
30
+ get hasDeclarativeState() {
31
+ return this.args.state === 'declarative' || this.args.state === 'declarative-selected';
32
+ }
33
+
30
34
  get inputClasses() {
31
35
  const classes = ['pix-checkbox__input'];
32
36
 
@@ -68,6 +72,10 @@ export default class PixCheckbox extends Component {
68
72
  return this.formatMessage('state.error');
69
73
  }
70
74
 
75
+ get stateDeclarativeMessage() {
76
+ return this.formatMessage('state.declarative');
77
+ }
78
+
71
79
  formatMessage(message) {
72
80
  return formatMessage(this.args.locale ?? 'fr', `input.${message}`);
73
81
  }
@@ -107,6 +115,8 @@ export default class PixCheckbox extends Component {
107
115
  {{this.stateSuccessMessage}}
108
116
  {{else if this.hasErrorState}}
109
117
  {{this.stateErrorMessage}}
118
+ {{else if this.hasDeclarativeState}}
119
+ {{this.stateDeclarativeMessage}}
110
120
  {{/if}}
111
121
  </span>
112
122
  </div>
@@ -13,6 +13,10 @@ export default class PixLabelWrapped extends Component {
13
13
  if (this.args.state === 'success') classes.push('pix-label-wrapped--state-modulix-success');
14
14
  if (this.args.state === 'error') classes.push('pix-label-wrapped--state-modulix-error');
15
15
  if (this.args.state === 'neutral') classes.push('pix-label-wrapped--state-modulix-neutral');
16
+ if (this.args.state === 'declarative')
17
+ classes.push('pix-label-wrapped--state-modulix-declarative');
18
+ if (this.args.state === 'declarative-selected')
19
+ classes.push('pix-label-wrapped--state-modulix-declarative-selected');
16
20
  } else {
17
21
  if (this.args.state === 'success') classes.push('pix-label-wrapped--state-success');
18
22
  if (this.args.state === 'error') classes.push('pix-label-wrapped--state-error');
@@ -23,6 +23,10 @@
23
23
  }
24
24
 
25
25
  &.pix-label-wrapped {
26
+ &.pix-label-wrapped--state-modulix-declarative {
27
+ border-color: var(--pix-neutral-500);
28
+ }
29
+
26
30
  &--disabled {
27
31
  --state-background-color: var(--pix-neutral-20);
28
32
  --state-border-color: var(--pix-neutral-100);
@@ -55,6 +59,20 @@
55
59
  color: var(--pix-success-700);
56
60
  }
57
61
 
62
+ &.pix-label-wrapped--state-modulix-declarative {
63
+ --state-border-color: transparent;
64
+ --state-background-color: var(--pix-primary-100);
65
+
66
+ color: var(--pix-neutral-900);
67
+ }
68
+
69
+ &.pix-label-wrapped--state-modulix-declarative-selected {
70
+ --state-border-color: var(--pix-neutral-500);
71
+ --state-background-color: var(--pix-neutral-0);
72
+
73
+ color: var(--pix-neutral-900);
74
+ }
75
+
58
76
  & .pix-label-wrapped__state-icon {
59
77
  z-index: 1;
60
78
  width: 1rem;
@@ -3,6 +3,7 @@ export default {
3
3
  state: {
4
4
  success: 'Sélection correcte',
5
5
  error: 'Sélection incorrecte',
6
+ declarative: 'Sélection sans bonne ou mauvaise réponse',
6
7
  },
7
8
  },
8
9
  select: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "61.0.0",
3
+ "version": "61.1.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"