@1024pix/pix-ui 45.3.3 → 45.3.5
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/app/stories/pix-checkbox.mdx +8 -15
- package/app/stories/pix-checkbox.stories.js +27 -20
- package/app/stories/pix-input-code.stories.js +1 -1
- package/app/stories/pix-radio-button.mdx +1 -3
- package/app/stories/pix-radio-button.stories.js +31 -23
- package/app/stories/pix-search-input.stories.js +1 -1
- package/app/stories/pix-select.stories.js +2 -2
- package/app/stories/pix-sidebar.stories.js +1 -1
- package/app/stories/pix-toggle.stories.js +2 -2
- package/package.json +3 -5
|
@@ -7,18 +7,16 @@ import * as ComponentStories from './pix-checkbox.stories';
|
|
|
7
7
|
|
|
8
8
|
La PixCheckbox permet de créer des checkbox basiques ou des checkbox mixées (checkbox servant d'indicateur lors d'une sélection multiple).
|
|
9
9
|
|
|
10
|
+
<Story of={ComponentStories.Default} height={60} />
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
<Story of={ComponentStories.DefaultChecked} height={60} />
|
|
13
13
|
|
|
14
14
|
### Liste de checkboxes
|
|
15
15
|
|
|
16
16
|
Il n'est pas rare d'avoir plusieurs champs checkbox qui se suivent.<br/>
|
|
17
17
|
En ce sens, nous avons déjà prévu un espace vertical pour séparer 2 composants qui se suivent.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
<Story of={ComponentStories.multiple} height={140} />
|
|
21
|
-
|
|
19
|
+
<Story of={ComponentStories.multiple} height={140} />
|
|
22
20
|
|
|
23
21
|
## États de la Checkbox
|
|
24
22
|
|
|
@@ -26,16 +24,13 @@ En ce sens, nous avons déjà prévu un espace vertical pour séparer 2 composan
|
|
|
26
24
|
|
|
27
25
|
### Checkbox interminée
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
<Story of={ComponentStories.indeterminateCheckbox} height={60} />
|
|
31
|
-
|
|
27
|
+
<Story of={ComponentStories.isIndeterminate} height={60} />
|
|
32
28
|
|
|
33
29
|
### Checkbox désactivée
|
|
34
30
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
<Story of={ComponentStories.isDisabled} height={60} />
|
|
32
|
+
<Story of={ComponentStories.checkedIsDisabled} height={60} />
|
|
33
|
+
<Story of={ComponentStories.isIndeterminateIsDisabled} height={60} />
|
|
39
34
|
|
|
40
35
|
## Autres tailles de police du label
|
|
41
36
|
|
|
@@ -43,9 +38,7 @@ En ce sens, nous avons déjà prévu un espace vertical pour séparer 2 composan
|
|
|
43
38
|
|
|
44
39
|
### Small
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
<Story of={ComponentStories.checkboxWithSmallLabel} height={60} />
|
|
48
|
-
|
|
41
|
+
<Story of={ComponentStories.withSmallLabel} height={60} />
|
|
49
42
|
|
|
50
43
|
## Usage
|
|
51
44
|
|
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
},
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
const Template = (args) => {
|
|
91
91
|
return {
|
|
92
92
|
template: hbs`<PixCheckbox
|
|
93
93
|
@id={{this.id}}
|
|
@@ -95,7 +95,7 @@ export const Template = (args) => {
|
|
|
95
95
|
@isIndeterminate={{this.isIndeterminate}}
|
|
96
96
|
@checked={{this.checked}}
|
|
97
97
|
@isDisabled={{this.isDisabled}}
|
|
98
|
-
disabled={{this.
|
|
98
|
+
disabled={{this.disabled}}
|
|
99
99
|
@size={{this.size}}
|
|
100
100
|
@inlineLabel={{this.inlineLabel}}
|
|
101
101
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
@@ -112,53 +112,60 @@ Default.args = {
|
|
|
112
112
|
label: 'Recevoir la newsletter',
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
export const
|
|
116
|
-
|
|
115
|
+
export const DefaultChecked = Template.bind({});
|
|
116
|
+
DefaultChecked.args = {
|
|
117
|
+
id: 'accept-newsletter',
|
|
118
|
+
label: 'Recevoir la newsletter',
|
|
119
|
+
checked: true,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const isIndeterminate = Template.bind({});
|
|
123
|
+
isIndeterminate.args = {
|
|
117
124
|
id: 'accept-newsletter-2',
|
|
118
125
|
label: 'Recevoir la newsletter',
|
|
119
126
|
isIndeterminate: true,
|
|
120
127
|
checked: true,
|
|
121
128
|
};
|
|
122
129
|
|
|
123
|
-
export const
|
|
124
|
-
|
|
130
|
+
export const withSmallLabel = Template.bind({});
|
|
131
|
+
withSmallLabel.args = {
|
|
125
132
|
id: 'accept-newsletter-2',
|
|
126
133
|
label: 'Recevoir la newsletter',
|
|
127
134
|
size: 'small',
|
|
128
135
|
};
|
|
129
136
|
|
|
130
|
-
export const
|
|
131
|
-
|
|
137
|
+
export const withLargeLabel = Template.bind({});
|
|
138
|
+
withLargeLabel.args = {
|
|
132
139
|
id: 'accept-newsletter-2',
|
|
133
140
|
label: 'Recevoir la newsletter',
|
|
134
141
|
size: 'large',
|
|
135
142
|
};
|
|
136
143
|
|
|
137
|
-
export const
|
|
138
|
-
|
|
144
|
+
export const isDisabled = Template.bind({});
|
|
145
|
+
isDisabled.args = {
|
|
139
146
|
id: 'accept-newsletter-2',
|
|
140
147
|
label: 'Recevoir la newsletter',
|
|
141
|
-
|
|
148
|
+
isDisabled: true,
|
|
142
149
|
};
|
|
143
150
|
|
|
144
|
-
export const
|
|
145
|
-
|
|
151
|
+
export const checkedIsDisabled = Template.bind({});
|
|
152
|
+
checkedIsDisabled.args = {
|
|
146
153
|
id: 'accept-newsletter-2',
|
|
147
154
|
label: 'Recevoir la newsletter',
|
|
148
|
-
|
|
155
|
+
isDisabled: true,
|
|
149
156
|
checked: true,
|
|
150
157
|
};
|
|
151
158
|
|
|
152
|
-
export const
|
|
153
|
-
|
|
159
|
+
export const isIndeterminateIsDisabled = Template.bind({});
|
|
160
|
+
isIndeterminateIsDisabled.args = {
|
|
154
161
|
id: 'accept-newsletter-2',
|
|
155
162
|
label: 'Recevoir la newsletter',
|
|
156
|
-
|
|
163
|
+
isDisabled: true,
|
|
157
164
|
checked: true,
|
|
158
165
|
isIndeterminate: true,
|
|
159
166
|
};
|
|
160
167
|
|
|
161
|
-
|
|
168
|
+
const MultipleTemplate = (args) => {
|
|
162
169
|
return {
|
|
163
170
|
template: hbs`<PixCheckbox
|
|
164
171
|
@id='one'
|
|
@@ -167,7 +174,7 @@ export const MultipleTemplate = (args) => {
|
|
|
167
174
|
@isIndeterminate={{this.isIndeterminate}}
|
|
168
175
|
@size={{this.size}}
|
|
169
176
|
@checked={{this.checked}}
|
|
170
|
-
disabled={{this.
|
|
177
|
+
disabled={{this.disabled}}
|
|
171
178
|
@isDisabled={{this.isDisabled}}
|
|
172
179
|
>
|
|
173
180
|
<:label>{{this.label}}</:label>
|
|
@@ -179,7 +186,7 @@ export const MultipleTemplate = (args) => {
|
|
|
179
186
|
@isIndeterminate={{this.isIndeterminate}}
|
|
180
187
|
@size={{this.size}}
|
|
181
188
|
@checked={{this.checked}}
|
|
182
|
-
disabled={{this.
|
|
189
|
+
disabled={{this.disabled}}
|
|
183
190
|
@isDisabled={{this.isDisabled}}
|
|
184
191
|
>
|
|
185
192
|
<:label>{{this.label}}</:label>
|
|
@@ -24,15 +24,13 @@ Pour les considérer comme un seul groupe d'inputs, **il est nécessaire qu'ils
|
|
|
24
24
|
|
|
25
25
|
<Story of={ComponentStories.multiple} height={140} />
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
## Disabled
|
|
29
28
|
|
|
30
29
|
État inactif du bouton radio.
|
|
31
30
|
|
|
32
31
|
<Story of={ComponentStories.isDisabled} height={60} />
|
|
33
32
|
|
|
34
|
-
<Story of={ComponentStories.
|
|
35
|
-
|
|
33
|
+
<Story of={ComponentStories.checkedIsDisabled} height={60} />
|
|
36
34
|
|
|
37
35
|
## Usage
|
|
38
36
|
|
|
@@ -19,6 +19,15 @@ export default {
|
|
|
19
19
|
description: "Valeur permettant d'identifier l'option sélectionnée",
|
|
20
20
|
type: { name: 'string', required: false },
|
|
21
21
|
},
|
|
22
|
+
checked: {
|
|
23
|
+
name: 'checked',
|
|
24
|
+
description: 'Permet de cocher la radio',
|
|
25
|
+
type: { name: 'boolean', required: false },
|
|
26
|
+
table: {
|
|
27
|
+
type: { summary: 'boolean' },
|
|
28
|
+
defaultValue: { summary: false },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
22
31
|
isDisabled: {
|
|
23
32
|
name: 'isDisabled',
|
|
24
33
|
description: 'Pour désactiver/activer le bouton radio',
|
|
@@ -79,7 +88,8 @@ const Template = (args) => {
|
|
|
79
88
|
@value={{this.value}}
|
|
80
89
|
@id={{this.id}}
|
|
81
90
|
@class={{this.class}}
|
|
82
|
-
|
|
91
|
+
checked={{this.checked}}
|
|
92
|
+
disabled={{this.disabled}}
|
|
83
93
|
@isDisabled={{this.isDisabled}}
|
|
84
94
|
@size={{this.size}}
|
|
85
95
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
@@ -96,39 +106,37 @@ Default.args = {
|
|
|
96
106
|
label: 'Poivron',
|
|
97
107
|
};
|
|
98
108
|
|
|
99
|
-
export const
|
|
100
|
-
|
|
109
|
+
export const defaultChecked = Template.bind({});
|
|
110
|
+
defaultChecked.args = {
|
|
101
111
|
...Default.args,
|
|
102
|
-
|
|
112
|
+
checked: true,
|
|
103
113
|
};
|
|
104
114
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
>{{this.label}}</:label></PixRadioButton>`,
|
|
110
|
-
context: args,
|
|
111
|
-
};
|
|
115
|
+
export const isDisabled = Template.bind({});
|
|
116
|
+
isDisabled.args = {
|
|
117
|
+
...Default.args,
|
|
118
|
+
isDisabled: true,
|
|
112
119
|
};
|
|
113
120
|
|
|
114
|
-
export const
|
|
115
|
-
|
|
121
|
+
export const checkedIsDisabled = Template.bind({});
|
|
122
|
+
checkedIsDisabled.args = {
|
|
116
123
|
...Default.args,
|
|
117
|
-
|
|
124
|
+
isDisabled: true,
|
|
125
|
+
checked: true,
|
|
118
126
|
};
|
|
119
127
|
|
|
120
|
-
export const defaultChecked = checked.bind({});
|
|
121
|
-
defaultChecked.args = Default.args;
|
|
122
|
-
|
|
123
128
|
/* Multiple components story */
|
|
124
129
|
const multipleTemplate = (args) => {
|
|
125
130
|
return {
|
|
126
|
-
template: hbs`<PixRadioButton disabled={{this.
|
|
127
|
-
>{{this.label}}</:label
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
template: hbs`<PixRadioButton disabled={{this.disabled}} @isDisabled={{this.isDisabled}} name='radio'>
|
|
132
|
+
<:label>{{this.label}}</:label>
|
|
133
|
+
</PixRadioButton>
|
|
134
|
+
<PixRadioButton disabled={{this.disabled}} @isDisabled={{this.isDisabled}} name='radio'>
|
|
135
|
+
<:label>{{this.label}}</:label>
|
|
136
|
+
</PixRadioButton>
|
|
137
|
+
<PixRadioButton disabled={{this.disabled}} @isDisabled={{this.isDisabled}} name='radio'>
|
|
138
|
+
<:label>{{this.label}}</:label>
|
|
139
|
+
</PixRadioButton>`,
|
|
132
140
|
context: args,
|
|
133
141
|
};
|
|
134
142
|
};
|
|
@@ -196,7 +196,7 @@ export default {
|
|
|
196
196
|
},
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
const Template = (args) => {
|
|
200
200
|
return {
|
|
201
201
|
template: hbs`{{#if this.id}}
|
|
202
202
|
<div>
|
|
@@ -230,7 +230,7 @@ export const Template = (args) => {
|
|
|
230
230
|
};
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
-
|
|
233
|
+
const TemplatePopover = (args) => {
|
|
234
234
|
return {
|
|
235
235
|
template: hbs`{{! template-lint-disable no-inline-styles }}
|
|
236
236
|
<div style='display:flex;height:330px'>
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
const Template = (args) => {
|
|
72
72
|
return {
|
|
73
73
|
template: hbs`<PixToggle
|
|
74
74
|
@onLabel={{this.onLabel}}
|
|
@@ -86,7 +86,7 @@ export const Template = (args) => {
|
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const TemplateWithYields = (args) => {
|
|
90
90
|
return {
|
|
91
91
|
template: hbs`<PixToggle @toggled={{this.toggled}} @onChange={{this.onChange}}>
|
|
92
92
|
<:label>{{this.label}}</:label>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/pix-ui",
|
|
3
|
-
"version": "45.3.
|
|
3
|
+
"version": "45.3.5",
|
|
4
4
|
"description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@1024pix/ember-testing-library": "^1.1.0",
|
|
62
|
-
"@1024pix/eslint-config": "^1.2.
|
|
62
|
+
"@1024pix/eslint-config": "^1.2.11",
|
|
63
63
|
"@1024pix/stylelint-config": "^5.1.10",
|
|
64
64
|
"@babel/eslint-parser": "^7.19.1",
|
|
65
65
|
"@babel/plugin-proposal-decorators": "^7.20.5",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@testing-library/user-event": "^14.4.3",
|
|
93
93
|
"chromatic": "^11.0.0",
|
|
94
94
|
"core-js": "^3.26.1",
|
|
95
|
-
"ember-cli": "^
|
|
95
|
+
"ember-cli": "^5.0.0",
|
|
96
96
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
97
97
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
98
98
|
"ember-cli-sri": "^2.1.1",
|
|
@@ -126,8 +126,6 @@
|
|
|
126
126
|
"sass": "^1.56.1",
|
|
127
127
|
"storybook": "^8.0.0",
|
|
128
128
|
"stylelint": "^16.0.2",
|
|
129
|
-
"stylelint-config-rational-order": "^0.1.2",
|
|
130
|
-
"stylelint-config-standard-scss": "^13.0.0",
|
|
131
129
|
"webpack": "^5.75.0"
|
|
132
130
|
},
|
|
133
131
|
"bugs": {
|