@1024pix/pix-ui 44.3.8 → 45.0.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 +2 -2
- package/addon/components/pix-filterable-and-searchable-select.hbs +5 -4
- package/addon/components/pix-input-base.js +44 -0
- package/addon/components/pix-input-password.hbs +46 -39
- package/addon/components/pix-input-password.js +12 -27
- package/addon/components/pix-input.hbs +25 -23
- package/addon/components/pix-input.js +10 -16
- package/addon/components/pix-label.js +2 -4
- package/addon/components/pix-multi-select.hbs +7 -6
- package/addon/components/pix-multi-select.js +0 -3
- package/addon/components/pix-pagination.hbs +3 -2
- package/addon/components/pix-radio-button.hbs +2 -2
- package/addon/components/pix-search-input.hbs +7 -6
- package/addon/components/pix-search-input.js +6 -19
- package/addon/components/pix-select.hbs +135 -129
- package/addon/components/pix-textarea.hbs +23 -19
- package/addon/components/pix-textarea.js +6 -0
- package/addon/components/pix-toggle.hbs +3 -3
- package/addon/components/pix-toggle.js +5 -0
- package/addon/styles/_pix-input-password.scss +19 -13
- package/addon/styles/_pix-input.scss +9 -2
- package/addon/styles/_pix-label.scss +0 -1
- package/addon/styles/_pix-multi-select.scss +9 -1
- package/addon/styles/_pix-search-input.scss +8 -1
- package/addon/styles/_pix-select.scss +9 -1
- package/addon/styles/_pix-toggle.scss +8 -1
- package/app/stories/form.stories.js +31 -24
- package/app/stories/pix-checkbox.mdx +2 -2
- package/app/stories/pix-checkbox.stories.js +52 -33
- package/app/stories/pix-filter-banner.stories.js +9 -6
- package/app/stories/pix-filterable-and-searchable-select.mdx +9 -8
- package/app/stories/pix-filterable-and-searchable-select.stories.js +13 -11
- package/app/stories/pix-input-password.mdx +8 -5
- package/app/stories/pix-input-password.stories.js +50 -28
- package/app/stories/pix-input.mdx +14 -8
- package/app/stories/pix-input.stories.js +46 -21
- package/app/stories/pix-label.stories.js +3 -2
- package/app/stories/pix-multi-select.mdx +7 -5
- package/app/stories/pix-multi-select.stories.js +74 -36
- package/app/stories/pix-radio-button.mdx +3 -1
- package/app/stories/pix-radio-button.stories.js +47 -40
- package/app/stories/pix-search-input.mdx +6 -4
- package/app/stories/pix-search-input.stories.js +57 -22
- package/app/stories/pix-select.mdx +4 -3
- package/app/stories/pix-select.stories.js +64 -57
- package/app/stories/pix-textarea.mdx +6 -2
- package/app/stories/pix-textarea.stories.js +42 -20
- package/app/stories/pix-toggle.stories.js +12 -10
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@ export default {
|
|
|
5
5
|
argTypes: {
|
|
6
6
|
id: {
|
|
7
7
|
name: 'id',
|
|
8
|
-
description: '
|
|
9
|
-
type: { name: 'string', required:
|
|
8
|
+
description: 'id généré automatiquement, peut être définit manuellement si besoin',
|
|
9
|
+
type: { name: 'string', required: false },
|
|
10
10
|
},
|
|
11
11
|
value: {
|
|
12
12
|
name: 'value',
|
|
@@ -18,18 +18,42 @@ export default {
|
|
|
18
18
|
description: 'Nombre de caractères maximal à taper dans le champ',
|
|
19
19
|
type: { name: 'number', required: false },
|
|
20
20
|
},
|
|
21
|
+
errorMessage: {
|
|
22
|
+
name: 'errorMessage',
|
|
23
|
+
description: 'Affiche une erreur en dessous du champ.',
|
|
24
|
+
type: { name: 'string', required: false },
|
|
25
|
+
},
|
|
26
|
+
|
|
21
27
|
label: {
|
|
22
28
|
name: 'label',
|
|
23
29
|
description: 'Donne un label au champ.',
|
|
24
|
-
type: { name: 'string', required:
|
|
30
|
+
type: { name: 'string', required: true },
|
|
25
31
|
},
|
|
26
32
|
subLabel: {
|
|
27
33
|
name: 'subLabel',
|
|
28
|
-
description: '
|
|
34
|
+
description: 'Un descriptif complétant le label',
|
|
35
|
+
type: { name: 'string', required: false },
|
|
36
|
+
},
|
|
37
|
+
requiredLabel: {
|
|
38
|
+
name: 'requiredLabel',
|
|
39
|
+
description: 'Label indiquant que le champ est requis.',
|
|
29
40
|
type: { name: 'string', required: false },
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: 'string' },
|
|
43
|
+
},
|
|
30
44
|
},
|
|
31
|
-
|
|
32
|
-
name: '
|
|
45
|
+
screenReaderOnly: {
|
|
46
|
+
name: 'screenReaderOnly',
|
|
47
|
+
description: "Permet de rendre le label lisible uniquement par les lecteurs d'écran",
|
|
48
|
+
control: { type: 'boolean' },
|
|
49
|
+
type: { name: 'boolean', required: false },
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'boolean' },
|
|
52
|
+
defaultValue: { summary: false },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
size: {
|
|
56
|
+
name: 'size',
|
|
33
57
|
description: 'Correspond à la taille de la police du label.',
|
|
34
58
|
type: { name: 'string', required: false },
|
|
35
59
|
table: {
|
|
@@ -38,16 +62,14 @@ export default {
|
|
|
38
62
|
control: { type: 'select' },
|
|
39
63
|
options: ['small', 'large', 'default'],
|
|
40
64
|
},
|
|
41
|
-
|
|
42
|
-
name: '
|
|
43
|
-
description:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
description: 'Affiche une erreur en dessous du champ.',
|
|
50
|
-
type: { name: 'string', required: false },
|
|
65
|
+
inlineLabel: {
|
|
66
|
+
name: 'inlineLabel',
|
|
67
|
+
description: 'Permet de ne pas afficher la marge pour les éléments de formulaire inline',
|
|
68
|
+
type: { name: 'boolean', required: false },
|
|
69
|
+
table: {
|
|
70
|
+
defaultValue: { summary: false },
|
|
71
|
+
},
|
|
72
|
+
control: { type: 'boolean' },
|
|
51
73
|
},
|
|
52
74
|
},
|
|
53
75
|
};
|
|
@@ -58,12 +80,12 @@ const Template = (args) => {
|
|
|
58
80
|
@id={{this.id}}
|
|
59
81
|
@value={{this.value}}
|
|
60
82
|
@maxlength={{this.maxlength}}
|
|
61
|
-
@
|
|
62
|
-
@
|
|
83
|
+
@errorMessage={{this.errorMessage}}
|
|
84
|
+
@size={{this.size}}
|
|
63
85
|
@subLabel={{this.subLabel}}
|
|
64
86
|
@requiredLabel={{this.requiredLabel}}
|
|
65
|
-
@
|
|
66
|
-
|
|
87
|
+
@inlineLabel={{this.inlineLabel}}
|
|
88
|
+
><:label>{{this.label}}</:label></PixTextarea>`,
|
|
67
89
|
context: args,
|
|
68
90
|
};
|
|
69
91
|
};
|
|
@@ -14,8 +14,8 @@ export default {
|
|
|
14
14
|
description: 'Le sous label du PixToggle',
|
|
15
15
|
type: { name: 'string', required: true },
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
name: '
|
|
17
|
+
size: {
|
|
18
|
+
name: 'size',
|
|
19
19
|
description: 'Correspond à la taille de la police du label.',
|
|
20
20
|
type: { name: 'string', required: false },
|
|
21
21
|
table: {
|
|
@@ -45,8 +45,8 @@ export default {
|
|
|
45
45
|
type: { required: true },
|
|
46
46
|
control: { disable: true },
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
name: '
|
|
48
|
+
inlineLabel: {
|
|
49
|
+
name: 'inlineLabel',
|
|
50
50
|
description: "Permet d'afficher le PixToggle sur une seule ligne",
|
|
51
51
|
control: { type: 'boolean' },
|
|
52
52
|
type: { name: 'boolean', required: false },
|
|
@@ -71,23 +71,25 @@ export default {
|
|
|
71
71
|
export const Template = (args) => {
|
|
72
72
|
return {
|
|
73
73
|
template: hbs`<PixToggle
|
|
74
|
-
@label={{this.label}}
|
|
75
|
-
@labelSize={{this.labelSize}}
|
|
76
|
-
@subLabel={{this.subLabel}}
|
|
77
74
|
@onLabel={{this.onLabel}}
|
|
78
75
|
@offLabel={{this.offLabel}}
|
|
79
76
|
@toggled={{this.toggled}}
|
|
80
77
|
@onChange={{this.onChange}}
|
|
81
|
-
@
|
|
78
|
+
@size={{this.size}}
|
|
79
|
+
@subLabel={{this.subLabel}}
|
|
80
|
+
@inlineLabel={{this.inlineLabel}}
|
|
82
81
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
83
|
-
|
|
82
|
+
>
|
|
83
|
+
<:label>{{this.label}}</:label>
|
|
84
|
+
</PixToggle>`,
|
|
84
85
|
context: args,
|
|
85
86
|
};
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
export const TemplateWithYields = (args) => {
|
|
89
90
|
return {
|
|
90
|
-
template: hbs`<PixToggle @
|
|
91
|
+
template: hbs`<PixToggle @toggled={{this.toggled}} @onChange={{this.onChange}}>
|
|
92
|
+
<:label>{{this.label}}</:label>
|
|
91
93
|
<:on><FaIcon @icon='sun' /></:on>
|
|
92
94
|
<:off><FaIcon @icon='moon' /></:off>
|
|
93
95
|
</PixToggle>`,
|