@1024pix/pix-ui 14.0.0 → 14.2.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/CHANGELOG.md +18 -0
- package/addon/components/pix-icon-button.js +2 -2
- package/addon/components/pix-input.hbs +1 -5
- package/addon/components/pix-input.js +0 -8
- package/addon/components/pix-stars.hbs +2 -3
- package/addon/styles/_pix-input.scss +0 -31
- package/app/stories/pix-input.stories.js +0 -26
- package/app/stories/pix-input.stories.mdx +0 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v14.2.0 (06/05/2022)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :coffee: Autre
|
|
7
|
+
- [#216](https://github.com/1024pix/pix-ui/pull/216) A11Y: add role=img on the stars container + add aria-label
|
|
8
|
+
|
|
9
|
+
## v14.1.1 (15/04/2022)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### :bug: Correction
|
|
13
|
+
- [#214](https://github.com/1024pix/pix-ui/pull/214) [BUGFIX] Ajouter params à la méthode triggerAction à PixIconButton (PIX-4790)
|
|
14
|
+
|
|
15
|
+
## v14.1.0 (12/04/2022)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :rocket: Amélioration
|
|
19
|
+
- [#213](https://github.com/1024pix/pix-ui/pull/213) [FEATURE] Retirer l'option d'ajouter une icône dans le composant Pix Input (PIX-4766).
|
|
20
|
+
|
|
3
21
|
## v14.0.0 (12/04/2022)
|
|
4
22
|
|
|
5
23
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<div class="pix-input__container">
|
|
17
17
|
<input
|
|
18
18
|
id={{this.id}}
|
|
19
|
-
class={{
|
|
19
|
+
class={{if @errorMessage "pix-input__input--error"}}
|
|
20
20
|
value={{@value}}
|
|
21
21
|
aria-label={{this.ariaLabel}}
|
|
22
22
|
aria-required="{{if @requiredLabel true false}}"
|
|
@@ -28,10 +28,6 @@
|
|
|
28
28
|
{{#if @errorMessage}}
|
|
29
29
|
<FaIcon @icon="times" class="pix-input__error-icon" />
|
|
30
30
|
{{/if}}
|
|
31
|
-
|
|
32
|
-
{{#if @icon}}
|
|
33
|
-
<FaIcon @icon={{@icon}} class="pix-input__icon {{if @isIconLeft 'pix-input__icon--left'}}" />
|
|
34
|
-
{{/if}}
|
|
35
31
|
</div>
|
|
36
32
|
|
|
37
33
|
{{#if @errorMessage}}
|
|
@@ -10,14 +10,6 @@ export default class PixInput extends Component {
|
|
|
10
10
|
return this.args.id;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
get className() {
|
|
14
|
-
const classNames = [];
|
|
15
|
-
this.args.errorMessage && classNames.push('pix-input__input--error');
|
|
16
|
-
this.args.icon && classNames.push('pix-input__input--icon');
|
|
17
|
-
this.args.isIconLeft && classNames.push('pix-input__input--icon-left');
|
|
18
|
-
return classNames.join(' ');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
13
|
get label() {
|
|
22
14
|
if (!this.args.label && !this.args.ariaLabel) {
|
|
23
15
|
throw new Error(ERROR_MESSAGE);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
<div class={{this.pixStarsClass}} ...attributes>
|
|
2
|
-
<span class="sr-only">{{@alt}}</span>
|
|
1
|
+
<div class={{this.pixStarsClass}} ...attributes role="img" aria-label={{@alt}}>
|
|
3
2
|
{{#each this.stars as |star|}}
|
|
4
|
-
<svg class="pix-stars__{{star}}" data-test-status={{star}} viewBox="0 0 36 36">
|
|
3
|
+
<svg class="pix-stars__{{star}}" data-test-status={{star}} viewBox="0 0 36 36" role="img">
|
|
5
4
|
<defs>
|
|
6
5
|
<linearGradient id="pix-stars-default" x1="68.643%" y1="0%" x2="68.643%" y2="100%">
|
|
7
6
|
<stop stop-color="#FEDC41" offset="0%"></stop>
|
|
@@ -25,25 +25,6 @@
|
|
|
25
25
|
position: relative;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
svg.pix-input__icon {
|
|
29
|
-
position: absolute;
|
|
30
|
-
bottom: 9px;
|
|
31
|
-
right: 6px;
|
|
32
|
-
color: $grey-25;
|
|
33
|
-
font-size: 1.125rem;
|
|
34
|
-
width: 18px;
|
|
35
|
-
height: 18px;
|
|
36
|
-
|
|
37
|
-
&--left {
|
|
38
|
-
left: 6px;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
svg ~ svg.pix-input__icon {
|
|
43
|
-
right: calc(6px + 12px + 2px);
|
|
44
|
-
margin-right: 8px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
28
|
svg.pix-input__error-icon {
|
|
48
29
|
position: absolute;
|
|
49
30
|
bottom: 10px;
|
|
@@ -84,17 +65,5 @@
|
|
|
84
65
|
padding-right: 32px;
|
|
85
66
|
@include formElementInError();
|
|
86
67
|
}
|
|
87
|
-
|
|
88
|
-
&.pix-input__input--icon {
|
|
89
|
-
padding-right: 32px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.pix-input__input--icon.pix-input__input--icon-left {
|
|
93
|
-
padding-left: 32px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&.pix-input__input--error.pix-input__input--icon:not(.pix-input__input--icon-left) {
|
|
97
|
-
padding-right: 32px;
|
|
98
|
-
}
|
|
99
68
|
}
|
|
100
69
|
}
|
|
@@ -8,8 +8,6 @@ export const Template = (args) => {
|
|
|
8
8
|
@label={{label}}
|
|
9
9
|
@information={{information}}
|
|
10
10
|
@errorMessage={{errorMessage}}
|
|
11
|
-
@icon={{icon}}
|
|
12
|
-
@isIconLeft={{isIconLeft}}
|
|
13
11
|
placeholder='Jeanne, Pierre ...'
|
|
14
12
|
@requiredLabel={{requiredLabel}}
|
|
15
13
|
@ariaLabel={{ariaLabel}}
|
|
@@ -40,13 +38,6 @@ withErrorMessage.args = {
|
|
|
40
38
|
errorMessage: "un message d'erreur",
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
export const withIcon = Template.bind({});
|
|
44
|
-
withIcon.args = {
|
|
45
|
-
id: 'firstName',
|
|
46
|
-
label: 'Prénom',
|
|
47
|
-
icon: 'eye',
|
|
48
|
-
};
|
|
49
|
-
|
|
50
41
|
export const withRequiredLabel = Template.bind({});
|
|
51
42
|
withRequiredLabel.args = {
|
|
52
43
|
id: 'firstName',
|
|
@@ -91,23 +82,6 @@ export const argTypes = {
|
|
|
91
82
|
type: { name: 'string', required: false },
|
|
92
83
|
defaultValue: null,
|
|
93
84
|
},
|
|
94
|
-
icon: {
|
|
95
|
-
name: 'icon',
|
|
96
|
-
description: "Affiche l'icône choisie à la fin de l'input",
|
|
97
|
-
type: { name: 'string', required: false },
|
|
98
|
-
defaultValue: null,
|
|
99
|
-
},
|
|
100
|
-
isIconLeft: {
|
|
101
|
-
name: 'isIconLeft',
|
|
102
|
-
description: "Permet d'afficher l'icône choisie sur la gauche",
|
|
103
|
-
type: { name: 'boolean', required: false },
|
|
104
|
-
control: { type: 'boolean' },
|
|
105
|
-
defaultValue: false,
|
|
106
|
-
table: {
|
|
107
|
-
type: { summary: 'boolean' },
|
|
108
|
-
defaultValue: { summary: 'false' },
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
85
|
requiredLabel: {
|
|
112
86
|
name: 'requiredLabel',
|
|
113
87
|
description:
|
|
@@ -39,12 +39,6 @@ Si vous utilisez le `PixInput` sans label alors il faut renseigner le paramètre
|
|
|
39
39
|
<Story story={stories.withErrorMessage} height={130} />
|
|
40
40
|
</Canvas>
|
|
41
41
|
|
|
42
|
-
## With icon
|
|
43
|
-
|
|
44
|
-
<Canvas>
|
|
45
|
-
<Story story={stories.withIcon} height={130} />
|
|
46
|
-
</Canvas>
|
|
47
|
-
|
|
48
42
|
## With required label
|
|
49
43
|
|
|
50
44
|
<Canvas>
|
|
@@ -59,8 +53,6 @@ Si vous utilisez le `PixInput` sans label alors il faut renseigner le paramètre
|
|
|
59
53
|
@label='Prénom'
|
|
60
54
|
@information='Complément du label'
|
|
61
55
|
@errorMessage='Un message d`erreur'
|
|
62
|
-
@icon='eye'
|
|
63
|
-
@isIconLeft={{false}}
|
|
64
56
|
@requiredLabel='Champ obligatoire'
|
|
65
57
|
/>
|
|
66
58
|
```
|