@1024pix/pix-ui 45.3.5 → 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.
- package/addon/components/pix-checkbox.hbs +10 -9
- package/addon/components/pix-label.js +1 -0
- package/addon/components/pix-radio-button.hbs +8 -7
- package/addon/styles/_pix-button-base.scss +4 -7
- package/addon/styles/_pix-checkbox.scss +0 -3
- package/addon/styles/_pix-label.scss +6 -0
- package/addon/styles/_pix-radio-button.scss +0 -4
- package/app/stories/pix-label.stories.js +9 -0
- package/package.json +1 -1
|
@@ -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>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
color: var(--pix-neutral-0);
|
|
6
|
-
font-weight: var(--pix-font-
|
|
6
|
+
font-weight: var(--pix-font-bold);
|
|
7
7
|
font-size: 0.875rem;
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
text-decoration: none;
|
|
@@ -165,15 +165,12 @@
|
|
|
165
165
|
&--transparent-light {
|
|
166
166
|
color: var(--pix-primary-700);
|
|
167
167
|
background-color: transparent;
|
|
168
|
-
|
|
169
|
-
&.pix-button--border {
|
|
170
|
-
border: 2px solid var(--pix-primary-700);
|
|
171
|
-
}
|
|
168
|
+
border: 2px solid var(--pix-primary-700);
|
|
172
169
|
|
|
173
170
|
&:not([aria-disabled="true"]) {
|
|
174
171
|
&:hover {
|
|
175
|
-
color: var(--pix-neutral-
|
|
176
|
-
background-color: var(--pix-primary-
|
|
172
|
+
color: var(--pix-neutral-700);
|
|
173
|
+
background-color: var(--pix-primary-100);
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
&:focus,
|
|
@@ -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
|
|