@1024pix/pix-ui 45.4.0 → 45.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.
@@ -1,13 +1,4 @@
1
1
  <div class="pix-checkbox {{@class}}">
2
- <input
3
- type="checkbox"
4
- id={{this.id}}
5
- class={{this.inputClasses}}
6
- checked={{@checked}}
7
- aria-disabled={{@isDisabled}}
8
- ...attributes
9
- />
10
-
11
2
  <PixLabel
12
3
  @for={{this.id}}
13
4
  @requiredLabel={{@requiredLabel}}
@@ -15,7 +6,17 @@
15
6
  @inlineLabel={{true}}
16
7
  @screenReaderOnly={{@screenReaderOnly}}
17
8
  @isDisabled={{@isDisabled}}
9
+ @wrappedElement={{true}}
18
10
  >
11
+ <input
12
+ type="checkbox"
13
+ id={{this.id}}
14
+ class={{this.inputClasses}}
15
+ checked={{@checked}}
16
+ aria-disabled={{@isDisabled}}
17
+ ...attributes
18
+ />
19
+
19
20
  {{yield to="label"}}
20
21
  </PixLabel>
21
22
  </div>
@@ -5,6 +5,7 @@ export default class PixLabel extends Component {
5
5
  const classes = ['pix-label'];
6
6
 
7
7
  if (this.args.screenReaderOnly) classes.push('screen-reader-only');
8
+ if (this.args.wrappedElement) classes.push('pix-label--wrapped-element');
8
9
  if (this.args.inlineLabel) classes.push('pix-label--inline-label');
9
10
  if (this.args.isDisabled) classes.push('pix-label--disabled');
10
11
 
@@ -1,11 +1,4 @@
1
1
  <div class="pix-radio-button {{@class}}">
2
- <input
3
- type="radio"
4
- id={{this.id}}
5
- class="pix-radio-button__input"
6
- value={{@value}}
7
- ...attributes
8
- />
9
2
  <PixLabel
10
3
  @for={{this.id}}
11
4
  @requiredLabel={{@requiredLabel}}
@@ -13,7 +6,15 @@
13
6
  @screenReaderOnly={{@screenReaderOnly}}
14
7
  @isDisabled={{@isDisabled}}
15
8
  @inlineLabel={{true}}
9
+ @wrappedElement={{true}}
16
10
  >
11
+ <input
12
+ type="radio"
13
+ id={{this.id}}
14
+ class="pix-radio-button__input"
15
+ value={{@value}}
16
+ ...attributes
17
+ />
17
18
  {{yield to="label"}}
18
19
  </PixLabel>
19
20
  </div>
@@ -1,9 +1,6 @@
1
1
  .pix-checkbox {
2
2
  position: relative;
3
3
  z-index: 0;
4
- display: flex;
5
- gap: var(--pix-spacing-3x);
6
- align-items: center;
7
4
 
8
5
  & + .pix-checkbox {
9
6
  margin-top: var(--pix-spacing-4x);
@@ -3,6 +3,12 @@
3
3
  color: var(--pix-neutral-900);
4
4
  font-weight: var(--pix-font-medium);
5
5
 
6
+ &--wrapped-element {
7
+ display: flex;
8
+ gap: var(--pix-spacing-3x);
9
+ align-items: center;
10
+ }
11
+
6
12
  &--disabled {
7
13
  color: var(--pix-neutral-500);
8
14
  }
@@ -1,8 +1,4 @@
1
1
  .pix-radio-button {
2
- display: flex;
3
- gap: var(--pix-spacing-3x);
4
- align-items: center;
5
-
6
2
  & + .pix-radio-button {
7
3
  margin-top: var(--pix-spacing-4x);
8
4
  }
@@ -56,6 +56,15 @@ export default {
56
56
  },
57
57
  control: { type: 'boolean' },
58
58
  },
59
+ wrappedElement: {
60
+ name: 'wrappedElement',
61
+ description: "Permet de définir si le label englobe l'input associé",
62
+ type: { name: 'boolean', required: false },
63
+ table: {
64
+ defaultValue: { summary: false },
65
+ },
66
+ control: { type: 'boolean' },
67
+ },
59
68
  },
60
69
  };
61
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "45.4.0",
3
+ "version": "45.4.1",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"