@1024pix/pix-ui 38.0.0 → 38.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/.circleci/config.yml +31 -39
- package/.nvmrc +1 -1
- package/.storybook/main.js +7 -5
- package/.storybook/preview.js +35 -32
- package/CHANGELOG.md +20 -0
- package/app/stories/form.stories.js +4 -0
- package/app/stories/{pix-background-header.stories.mdx → pix-background-header.mdx} +6 -6
- package/app/stories/pix-background-header.stories.js +4 -0
- package/app/stories/{pix-banner.stories.mdx → pix-banner.mdx} +19 -30
- package/app/stories/pix-banner.stories.js +49 -46
- package/app/stories/{pix-block.stories.mdx → pix-block.mdx} +5 -7
- package/app/stories/pix-block.stories.js +14 -11
- package/app/stories/{pix-button-link.stories.mdx → pix-button-link.mdx} +6 -14
- package/app/stories/pix-button-link.stories.js +87 -87
- package/app/stories/{pix-button-upload.stories.mdx → pix-button-upload.mdx} +5 -8
- package/app/stories/pix-button-upload.stories.js +62 -59
- package/app/stories/{pix-button.stories.mdx → pix-button.mdx} +15 -28
- package/app/stories/pix-button.stories.js +152 -149
- package/app/stories/pix-checkbox.mdx +71 -0
- package/app/stories/pix-checkbox.stories.js +69 -66
- package/app/stories/pix-collapsible.mdx +31 -0
- package/app/stories/pix-collapsible.stories.js +16 -13
- package/app/stories/{pix-dropdown.stories.mdx → pix-dropdown.mdx} +9 -17
- package/app/stories/pix-dropdown.stories.js +114 -110
- package/app/stories/{pix-filter-banner.stories.mdx → pix-filter-banner.mdx} +5 -7
- package/app/stories/pix-filter-banner.stories.js +36 -33
- package/app/stories/{pix-filterable-and-searchable-select.stories.mdx → pix-filterable-and-searchable-select.mdx} +7 -17
- package/app/stories/pix-filterable-and-searchable-select.stories.js +136 -133
- package/app/stories/{pix-icon-button.stories.mdx → pix-icon-button.mdx} +8 -16
- package/app/stories/pix-icon-button.stories.js +60 -57
- package/app/stories/{pix-indicator-card.stories.mdx → pix-indicator-card.mdx} +6 -10
- package/app/stories/pix-indicator-card.stories.js +37 -34
- package/app/stories/{pix-input-code.stories.mdx → pix-input-code.mdx} +5 -7
- package/app/stories/pix-input-code.stories.js +55 -52
- package/app/stories/{pix-input-password.stories.mdx → pix-input-password.mdx} +22 -23
- package/app/stories/pix-input-password.stories.js +60 -57
- package/app/stories/{pix-input.stories.mdx → pix-input.mdx} +14 -20
- package/app/stories/pix-input.stories.js +55 -52
- package/app/stories/pix-message.mdx +54 -0
- package/app/stories/pix-message.stories.js +40 -36
- package/app/stories/{pix-modal.stories.mdx → pix-modal.mdx} +5 -7
- package/app/stories/pix-modal.stories.js +31 -30
- package/app/stories/{pix-multi-select.stories.mdx → pix-multi-select.mdx} +9 -21
- package/app/stories/pix-multi-select.stories.js +106 -99
- package/app/stories/{pix-pagination.stories.mdx → pix-pagination.mdx} +8 -16
- package/app/stories/pix-pagination.stories.js +114 -111
- package/app/stories/{pix-progress-gauge.stories.mdx → pix-progress-gauge.mdx} +6 -10
- package/app/stories/pix-progress-gauge.stories.js +43 -40
- package/app/stories/{pix-radio-button.stories.mdx → pix-radio-button.mdx} +13 -15
- package/app/stories/pix-radio-button.stories.js +35 -32
- package/app/stories/pix-return-to.mdx +34 -0
- package/app/stories/pix-return-to.stories.js +32 -32
- package/app/stories/{pix-search-input.stories.mdx → pix-search-input.mdx} +5 -7
- package/app/stories/pix-search-input.stories.js +56 -52
- package/app/stories/{pix-select.stories.mdx → pix-select.mdx} +12 -28
- package/app/stories/pix-select.stories.js +171 -168
- package/app/stories/pix-selectable-tag.mdx +37 -0
- package/app/stories/pix-selectable-tag.stories.js +37 -34
- package/app/stories/{pix-sidebar.stories.mdx → pix-sidebar.mdx} +5 -7
- package/app/stories/pix-sidebar.stories.js +28 -25
- package/app/stories/{pix-stars.stories.mdx → pix-stars.mdx} +5 -7
- package/app/stories/pix-stars.stories.js +29 -26
- package/app/stories/{pix-tag.stories.mdx → pix-tag.mdx} +9 -10
- package/app/stories/pix-tag.stories.js +39 -39
- package/app/stories/{pix-textarea.stories.mdx → pix-textarea.mdx} +6 -7
- package/app/stories/pix-textarea.stories.js +37 -39
- package/app/stories/pix-toggle.mdx +28 -0
- package/app/stories/pix-toggle.stories.js +52 -49
- package/app/stories/{pix-tooltip.stories.mdx → pix-tooltip.mdx} +14 -28
- package/app/stories/pix-tooltip.stories.js +57 -54
- package/docs/{architecture.stories.mdx → architecture.mdx} +1 -1
- package/docs/{breaking-changes.stories.mdx → breaking-changes.mdx} +1 -1
- package/docs/changelog.mdx +6 -0
- package/docs/{colors-palette.stories.mdx → colors-palette.mdx} +1 -3
- package/docs/{create-component.stories.mdx → create-component.mdx} +24 -30
- package/docs/{design-system.stories.mdx → design-system.mdx} +1 -1
- package/docs/{design-tokens.stories.mdx → design-tokens.mdx} +1 -1
- package/docs/{good-practices-a11y.stories.mdx → good-practices-a11y.mdx} +1 -1
- package/docs/{good-practices-design.stories.mdx → good-practices-design.mdx} +1 -1
- package/docs/{good-practices-responsive.stories.mdx → good-practices-responsive.mdx} +1 -1
- package/docs/{good-practices-style-css.stories.mdx → good-practices-style-css.mdx} +1 -1
- package/docs/{good-practices-tests.stories.mdx → good-practices-tests.mdx} +1 -1
- package/docs/{make-a-release.stories.mdx → make-a-release.mdx} +1 -1
- package/docs/{pix-design-tokens-dev.stories.mdx → pix-design-tokens-dev.mdx} +1 -1
- package/docs/{shadow.stories.mdx → shadow.mdx} +1 -1
- package/docs/{spacing.stories.mdx → spacing.mdx} +1 -1
- package/docs/{storybook.stories.mdx → storybook.mdx} +1 -1
- package/docs/{test-component-without-release.stories.mdx → test-component-without-release.mdx} +1 -1
- package/docs/{typography.stories.mdx → typography.mdx} +1 -3
- package/docs/{use-component.stories.mdx → use-component.mdx} +1 -1
- package/docs/{use-install.stories.mdx → use-install.mdx} +1 -1
- package/package.json +19 -21
- package/app/stories/pix-checkbox.stories.mdx +0 -73
- package/app/stories/pix-collapsible.stories.mdx +0 -36
- package/app/stories/pix-message.stories.mdx +0 -64
- package/app/stories/pix-return-to.stories.mdx +0 -33
- package/app/stories/pix-selectable-tag.stories.mdx +0 -43
- package/app/stories/pix-toggle.stories.mdx +0 -36
- package/docs/changelog.stories.mdx +0 -6
|
@@ -1,5 +1,157 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Basics/Button',
|
|
5
|
+
argTypes: {
|
|
6
|
+
type: {
|
|
7
|
+
name: 'type',
|
|
8
|
+
description: 'type du bouton',
|
|
9
|
+
type: { required: false },
|
|
10
|
+
control: { disable: true },
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: 'string' },
|
|
13
|
+
defaultValue: { summary: 'button' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
triggerAction: {
|
|
17
|
+
name: 'triggerAction',
|
|
18
|
+
description: 'fonction à appeler en cas de clic, optionnel si le bouton est de type submit',
|
|
19
|
+
type: { required: true },
|
|
20
|
+
control: { disable: true },
|
|
21
|
+
},
|
|
22
|
+
loadingColor: {
|
|
23
|
+
name: 'loadingColor',
|
|
24
|
+
description: 'couleur de chargement: `white`, `grey`',
|
|
25
|
+
type: { name: 'string', required: false },
|
|
26
|
+
options: ['white', 'grey'],
|
|
27
|
+
control: { type: 'select' },
|
|
28
|
+
table: {
|
|
29
|
+
type: { summary: 'string' },
|
|
30
|
+
defaultValue: { summary: 'white' },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
shape: {
|
|
34
|
+
name: 'shape',
|
|
35
|
+
description: 'forme: `rounded`,`squircle`',
|
|
36
|
+
type: { name: 'string', required: false },
|
|
37
|
+
options: ['rounded', 'squircle'],
|
|
38
|
+
control: { type: 'select' },
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: 'string' },
|
|
41
|
+
defaultValue: { summary: 'squircle' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
backgroundColor: {
|
|
45
|
+
name: 'backgroundColor',
|
|
46
|
+
description:
|
|
47
|
+
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
48
|
+
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
49
|
+
type: { name: 'string', required: false },
|
|
50
|
+
control: { type: 'select' },
|
|
51
|
+
table: {
|
|
52
|
+
type: { summary: 'string' },
|
|
53
|
+
defaultValue: { summary: 'blue' },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
iconBefore: {
|
|
57
|
+
name: 'iconBefore',
|
|
58
|
+
description: `Nom de l'icône font-awesome à afficher **avant** le label`,
|
|
59
|
+
type: { name: 'string', required: false },
|
|
60
|
+
control: { type: 'select' },
|
|
61
|
+
options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
|
|
62
|
+
table: {
|
|
63
|
+
type: { summary: 'string' },
|
|
64
|
+
defaultValue: { summary: null },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
iconAfter: {
|
|
68
|
+
name: 'iconAfter',
|
|
69
|
+
description: `Nom de l'icône font-awesome à afficher **après** le label`,
|
|
70
|
+
type: { name: 'string', required: false },
|
|
71
|
+
control: { type: 'select' },
|
|
72
|
+
options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
|
|
73
|
+
table: {
|
|
74
|
+
type: { summary: 'string' },
|
|
75
|
+
defaultValue: { summary: null },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
prefixIconBefore: {
|
|
79
|
+
name: 'prefixIconBefore',
|
|
80
|
+
description: `Permet d'ajouter un préfix à l'icone devant le label pour appliquer un style particulier`,
|
|
81
|
+
type: { name: 'string', required: false },
|
|
82
|
+
control: { type: 'select' },
|
|
83
|
+
options: ['fas', 'far'],
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: 'string' },
|
|
86
|
+
defaultValue: { summary: null },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
prefixIconAfter: {
|
|
90
|
+
name: 'prefixIconAfter',
|
|
91
|
+
description: `Permet d'ajouter un préfix à l'icone derrière le label pour appliquer un style particulier`,
|
|
92
|
+
type: { name: 'string', required: false },
|
|
93
|
+
control: { type: 'select' },
|
|
94
|
+
options: ['fas', 'far'],
|
|
95
|
+
table: {
|
|
96
|
+
type: { summary: 'string' },
|
|
97
|
+
defaultValue: { summary: null },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
isDisabled: {
|
|
101
|
+
name: 'isDisabled',
|
|
102
|
+
type: { name: 'boolean', required: false },
|
|
103
|
+
control: { type: 'boolean' },
|
|
104
|
+
table: {
|
|
105
|
+
type: { summary: 'boolean' },
|
|
106
|
+
defaultValue: { summary: 'false' },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
isLoading: {
|
|
110
|
+
name: 'isLoading',
|
|
111
|
+
description:
|
|
112
|
+
'Affiche un loader. Si `@triggerAction` retourne une promesse alors le loading est géré automatiquement.',
|
|
113
|
+
type: { name: 'boolean', required: false },
|
|
114
|
+
control: { type: 'boolean' },
|
|
115
|
+
table: {
|
|
116
|
+
type: { summary: 'boolean' },
|
|
117
|
+
defaultValue: { summary: 'false' },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
size: {
|
|
121
|
+
name: 'size',
|
|
122
|
+
description: 'taille: `big`,`small`',
|
|
123
|
+
options: ['big', 'small'],
|
|
124
|
+
type: { name: 'string', required: false },
|
|
125
|
+
control: { type: 'select' },
|
|
126
|
+
table: {
|
|
127
|
+
type: { summary: 'string' },
|
|
128
|
+
defaultValue: { summary: 'big' },
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
isBorderVisible: {
|
|
132
|
+
name: 'isBorderVisible',
|
|
133
|
+
description:
|
|
134
|
+
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
135
|
+
type: { name: 'boolean', required: false },
|
|
136
|
+
control: { type: 'boolean' },
|
|
137
|
+
table: {
|
|
138
|
+
type: { summary: 'boolean' },
|
|
139
|
+
defaultValue: { summary: 'false' },
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
route: {
|
|
143
|
+
name: 'route',
|
|
144
|
+
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
145
|
+
type: { name: 'string', required: false },
|
|
146
|
+
},
|
|
147
|
+
model: {
|
|
148
|
+
name: 'model',
|
|
149
|
+
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
150
|
+
type: { required: false },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
3
155
|
const Template = (args) => ({
|
|
4
156
|
template: hbs`<section style={{this.style}}>
|
|
5
157
|
<PixButton
|
|
@@ -159,152 +311,3 @@ size.args = {
|
|
|
159
311
|
label: 'Bouton small',
|
|
160
312
|
size: 'small',
|
|
161
313
|
};
|
|
162
|
-
|
|
163
|
-
export const argsTypes = {
|
|
164
|
-
type: {
|
|
165
|
-
name: 'type',
|
|
166
|
-
description: 'type du bouton',
|
|
167
|
-
type: { required: false },
|
|
168
|
-
control: { disable: true },
|
|
169
|
-
table: {
|
|
170
|
-
type: { summary: 'string' },
|
|
171
|
-
defaultValue: { summary: 'button' },
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
triggerAction: {
|
|
175
|
-
name: 'triggerAction',
|
|
176
|
-
description: 'fonction à appeler en cas de clic, optionnel si le bouton est de type submit',
|
|
177
|
-
type: { required: true },
|
|
178
|
-
control: { disable: true },
|
|
179
|
-
},
|
|
180
|
-
loadingColor: {
|
|
181
|
-
name: 'loadingColor',
|
|
182
|
-
description: 'couleur de chargement: `white`, `grey`',
|
|
183
|
-
type: { name: 'string', required: false },
|
|
184
|
-
options: ['white', 'grey'],
|
|
185
|
-
control: { type: 'select' },
|
|
186
|
-
table: {
|
|
187
|
-
type: { summary: 'string' },
|
|
188
|
-
defaultValue: { summary: 'white' },
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
shape: {
|
|
192
|
-
name: 'shape',
|
|
193
|
-
description: 'forme: `rounded`,`squircle`',
|
|
194
|
-
type: { name: 'string', required: false },
|
|
195
|
-
options: ['rounded', 'squircle'],
|
|
196
|
-
control: { type: 'select' },
|
|
197
|
-
table: {
|
|
198
|
-
type: { summary: 'string' },
|
|
199
|
-
defaultValue: { summary: 'squircle' },
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
backgroundColor: {
|
|
203
|
-
name: 'backgroundColor',
|
|
204
|
-
description:
|
|
205
|
-
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
206
|
-
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
207
|
-
type: { name: 'string', required: false },
|
|
208
|
-
control: { type: 'select' },
|
|
209
|
-
table: {
|
|
210
|
-
type: { summary: 'string' },
|
|
211
|
-
defaultValue: { summary: 'blue' },
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
iconBefore: {
|
|
215
|
-
name: 'iconBefore',
|
|
216
|
-
description: `Nom de l'icône font-awesome à afficher **avant** le label`,
|
|
217
|
-
type: { name: 'string', required: false },
|
|
218
|
-
control: { type: 'select' },
|
|
219
|
-
options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
|
|
220
|
-
table: {
|
|
221
|
-
type: { summary: 'string' },
|
|
222
|
-
defaultValue: { summary: null },
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
iconAfter: {
|
|
226
|
-
name: 'iconAfter',
|
|
227
|
-
description: `Nom de l'icône font-awesome à afficher **après** le label`,
|
|
228
|
-
type: { name: 'string', required: false },
|
|
229
|
-
control: { type: 'select' },
|
|
230
|
-
options: ['trash-can', 'heart', 'magnifying-glass', 'plus', 'xmark'],
|
|
231
|
-
table: {
|
|
232
|
-
type: { summary: 'string' },
|
|
233
|
-
defaultValue: { summary: null },
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
prefixIconBefore: {
|
|
237
|
-
name: 'prefixIconBefore',
|
|
238
|
-
description: `Permet d'ajouter un préfix à l'icone devant le label pour appliquer un style particulier`,
|
|
239
|
-
type: { name: 'string', required: false },
|
|
240
|
-
control: { type: 'select' },
|
|
241
|
-
options: ['fas', 'far'],
|
|
242
|
-
table: {
|
|
243
|
-
type: { summary: 'string' },
|
|
244
|
-
defaultValue: { summary: null },
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
prefixIconAfter: {
|
|
248
|
-
name: 'prefixIconAfter',
|
|
249
|
-
description: `Permet d'ajouter un préfix à l'icone derrière le label pour appliquer un style particulier`,
|
|
250
|
-
type: { name: 'string', required: false },
|
|
251
|
-
control: { type: 'select' },
|
|
252
|
-
options: ['fas', 'far'],
|
|
253
|
-
table: {
|
|
254
|
-
type: { summary: 'string' },
|
|
255
|
-
defaultValue: { summary: null },
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
isDisabled: {
|
|
259
|
-
name: 'isDisabled',
|
|
260
|
-
type: { name: 'boolean', required: false },
|
|
261
|
-
control: { type: 'boolean' },
|
|
262
|
-
table: {
|
|
263
|
-
type: { summary: 'boolean' },
|
|
264
|
-
defaultValue: { summary: 'false' },
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
isLoading: {
|
|
268
|
-
name: 'isLoading',
|
|
269
|
-
description:
|
|
270
|
-
'Affiche un loader. Si `@triggerAction` retourne une promesse alors le loading est géré automatiquement.',
|
|
271
|
-
type: { name: 'boolean', required: false },
|
|
272
|
-
control: { type: 'boolean' },
|
|
273
|
-
table: {
|
|
274
|
-
type: { summary: 'boolean' },
|
|
275
|
-
defaultValue: { summary: 'false' },
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
size: {
|
|
279
|
-
name: 'size',
|
|
280
|
-
description: 'taille: `big`,`small`',
|
|
281
|
-
options: ['big', 'small'],
|
|
282
|
-
type: { name: 'string', required: false },
|
|
283
|
-
control: { type: 'select' },
|
|
284
|
-
table: {
|
|
285
|
-
type: { summary: 'string' },
|
|
286
|
-
defaultValue: { summary: 'big' },
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
isBorderVisible: {
|
|
290
|
-
name: 'isBorderVisible',
|
|
291
|
-
description:
|
|
292
|
-
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
293
|
-
type: { name: 'boolean', required: false },
|
|
294
|
-
control: { type: 'boolean' },
|
|
295
|
-
table: {
|
|
296
|
-
type: { summary: 'boolean' },
|
|
297
|
-
defaultValue: { summary: 'false' },
|
|
298
|
-
},
|
|
299
|
-
},
|
|
300
|
-
route: {
|
|
301
|
-
name: 'route',
|
|
302
|
-
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
303
|
-
type: { name: 'string', required: false },
|
|
304
|
-
},
|
|
305
|
-
model: {
|
|
306
|
-
name: 'model',
|
|
307
|
-
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
308
|
-
type: { required: false },
|
|
309
|
-
},
|
|
310
|
-
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-checkbox.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
|
+
|
|
6
|
+
# PixCheckbox
|
|
7
|
+
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
<Story of={ComponentStories.Default} height={60} />
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Liste de checkboxes
|
|
15
|
+
|
|
16
|
+
Il n'est pas rare d'avoir plusieurs champs checkbox qui se suivent.<br/>
|
|
17
|
+
En ce sens, nous avons déjà prévu un espace vertical pour séparer 2 composants qui se suivent.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
<Story of={ComponentStories.multiple} height={140} />
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## États de la Checkbox
|
|
24
|
+
|
|
25
|
+
<br />
|
|
26
|
+
|
|
27
|
+
### Checkbox interminée
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<Story of={ComponentStories.indeterminateCheckbox} height={60} />
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Checkbox désactivée
|
|
34
|
+
|
|
35
|
+
<Story of={ComponentStories.checkboxDisabled} height={60} />
|
|
36
|
+
<Story of={ComponentStories.checkboxCheckedDisabled} height={60} />
|
|
37
|
+
<Story of={ComponentStories.checkboxInterminateDisabled} height={60} />
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Autres tailles de police du label
|
|
41
|
+
|
|
42
|
+
<br />
|
|
43
|
+
|
|
44
|
+
### Small
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<Story of={ComponentStories.checkboxWithSmallLabel} height={60} />
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Large
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
<Story of={ComponentStories.checkboxWithLargeLabel} height={60} />
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<PixCheckbox
|
|
60
|
+
@screenReaderOnly="{{false}}"
|
|
61
|
+
@isIndeterminate="{{false}}"
|
|
62
|
+
@labelSize="small"
|
|
63
|
+
disabled
|
|
64
|
+
>
|
|
65
|
+
Recevoir la newsletter
|
|
66
|
+
</PixCheckbox>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Arguments
|
|
70
|
+
|
|
71
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/Checkbox',
|
|
5
|
+
argTypes: {
|
|
6
|
+
id: {
|
|
7
|
+
name: 'id',
|
|
8
|
+
description:
|
|
9
|
+
'Identifiant du champ permettant de lui attacher un label. Généré automatiquement si non renseigné.',
|
|
10
|
+
type: { name: 'string' },
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
name: 'label',
|
|
14
|
+
description: "Le label de l'input",
|
|
15
|
+
},
|
|
16
|
+
class: {
|
|
17
|
+
name: 'class',
|
|
18
|
+
description: "Permet d'ajouter une classe au parent du composant.",
|
|
19
|
+
type: { name: 'string' },
|
|
20
|
+
},
|
|
21
|
+
screenReaderOnly: {
|
|
22
|
+
name: 'screenReaderOnly',
|
|
23
|
+
description:
|
|
24
|
+
"Permet de ne pas afficher le label à l'écran. Sert à garder un label qui sera lisible par les lecteurs d'écran.",
|
|
25
|
+
type: { name: 'boolean', required: true },
|
|
26
|
+
table: {
|
|
27
|
+
type: { summary: 'boolean' },
|
|
28
|
+
defaultValue: { summary: false },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
isIndeterminate: {
|
|
32
|
+
name: 'isIndeterminate',
|
|
33
|
+
description:
|
|
34
|
+
"Rendre la checkbox indéterminée, état indiquant que la/les case(s) n'est/ne sont ni cochée(s) ni décochée(s) (exemple: une checkbox parente indiquant la sélection partielle de plusieurs checkbox enfants)",
|
|
35
|
+
type: { name: 'boolean', required: true },
|
|
36
|
+
table: {
|
|
37
|
+
type: { summary: 'boolean' },
|
|
38
|
+
defaultValue: { summary: false },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
labelSize: {
|
|
42
|
+
name: 'labelSize',
|
|
43
|
+
description: 'Correspond à la taille de la police du label.',
|
|
44
|
+
type: { name: 'string', required: false },
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: { summary: 'default' },
|
|
47
|
+
},
|
|
48
|
+
control: { type: 'select' },
|
|
49
|
+
options: ['small', 'default', 'large'],
|
|
50
|
+
},
|
|
51
|
+
checked: {
|
|
52
|
+
name: 'checked',
|
|
53
|
+
description: 'Permet de cocher la checkbox',
|
|
54
|
+
type: { name: 'boolean', required: false },
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: 'boolean' },
|
|
57
|
+
defaultValue: { summary: false },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
disabled: {
|
|
61
|
+
name: 'disabled',
|
|
62
|
+
description: 'Permet de désactiver la checkbox',
|
|
63
|
+
type: { name: 'boolean', required: false },
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: 'boolean' },
|
|
66
|
+
defaultValue: { summary: false },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
3
72
|
export const Template = (args) => {
|
|
4
73
|
return {
|
|
5
74
|
template: hbs`
|
|
@@ -105,69 +174,3 @@ export const multiple = MultipleTemplate.bind({});
|
|
|
105
174
|
multiple.args = {
|
|
106
175
|
label: 'Recevoir la newsletter',
|
|
107
176
|
};
|
|
108
|
-
|
|
109
|
-
export const argTypes = {
|
|
110
|
-
id: {
|
|
111
|
-
name: 'id',
|
|
112
|
-
description:
|
|
113
|
-
'Identifiant du champ permettant de lui attacher un label. Généré automatiquement si non renseigné.',
|
|
114
|
-
type: { name: 'string' },
|
|
115
|
-
},
|
|
116
|
-
label: {
|
|
117
|
-
name: 'label',
|
|
118
|
-
description: "Le label de l'input",
|
|
119
|
-
},
|
|
120
|
-
class: {
|
|
121
|
-
name: 'class',
|
|
122
|
-
description: "Permet d'ajouter une classe au parent du composant.",
|
|
123
|
-
type: { name: 'string' },
|
|
124
|
-
},
|
|
125
|
-
screenReaderOnly: {
|
|
126
|
-
name: 'screenReaderOnly',
|
|
127
|
-
description:
|
|
128
|
-
"Permet de ne pas afficher le label à l'écran. Sert à garder un label qui sera lisible par les lecteurs d'écran.",
|
|
129
|
-
type: { name: 'boolean', required: true },
|
|
130
|
-
table: {
|
|
131
|
-
type: { summary: 'boolean' },
|
|
132
|
-
defaultValue: { summary: false },
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
isIndeterminate: {
|
|
136
|
-
name: 'isIndeterminate',
|
|
137
|
-
description:
|
|
138
|
-
"Rendre la checkbox indéterminée, état indiquant que la/les case(s) n'est/ne sont ni cochée(s) ni décochée(s) (exemple: une checkbox parente indiquant la sélection partielle de plusieurs checkbox enfants)",
|
|
139
|
-
type: { name: 'boolean', required: true },
|
|
140
|
-
table: {
|
|
141
|
-
type: { summary: 'boolean' },
|
|
142
|
-
defaultValue: { summary: false },
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
labelSize: {
|
|
146
|
-
name: 'labelSize',
|
|
147
|
-
description: 'Correspond à la taille de la police du label.',
|
|
148
|
-
type: { name: 'string', required: false },
|
|
149
|
-
table: {
|
|
150
|
-
defaultValue: { summary: 'default' },
|
|
151
|
-
},
|
|
152
|
-
control: { type: 'select' },
|
|
153
|
-
options: ['small', 'default', 'large'],
|
|
154
|
-
},
|
|
155
|
-
checked: {
|
|
156
|
-
name: 'checked',
|
|
157
|
-
description: 'Permet de cocher la checkbox',
|
|
158
|
-
type: { name: 'boolean', required: false },
|
|
159
|
-
table: {
|
|
160
|
-
type: { summary: 'boolean' },
|
|
161
|
-
defaultValue: { summary: false },
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
disabled: {
|
|
165
|
-
name: 'disabled',
|
|
166
|
-
description: 'Permet de désactiver la checkbox',
|
|
167
|
-
type: { name: 'boolean', required: false },
|
|
168
|
-
table: {
|
|
169
|
-
type: { summary: 'boolean' },
|
|
170
|
-
defaultValue: { summary: false },
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-collapsible.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
|
+
|
|
6
|
+
# PixCollapsible
|
|
7
|
+
|
|
8
|
+
Un `PixCollapsible` est un élément comprenant un libellé et un contenu.
|
|
9
|
+
Par défaut le contenu est masqué et cliquer sur le libellé permet de montrer le contenu du `PixCollapsible`.
|
|
10
|
+
|
|
11
|
+
> Il est possible de cumuler les `PixCollapsible` de sorte à former un accordéon, il suffit de les mettre dans une même div parente.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<Story of={ComponentStories.collapsible} height={150} />
|
|
15
|
+
|
|
16
|
+
<Story of={ComponentStories.collapsibleWithBlockTitle} height={150} />
|
|
17
|
+
|
|
18
|
+
<Story of={ComponentStories.multipleCollapsible} height={260} />
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<PixCollapsible @title="Titre du contenu à dérouler en cliquant" @iconTitle="user">
|
|
25
|
+
<p>Contenu du PixCollapsible</p>
|
|
26
|
+
</PixCollapsible>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Arguments
|
|
30
|
+
|
|
31
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Others/Collapsible',
|
|
5
|
+
argTypes: {
|
|
6
|
+
title: {
|
|
7
|
+
name: 'title',
|
|
8
|
+
description: 'Intitulé du contenu du PixCollapsible',
|
|
9
|
+
type: { name: 'string', required: true },
|
|
10
|
+
},
|
|
11
|
+
titleIcon: {
|
|
12
|
+
name: 'titleIcon',
|
|
13
|
+
description: "Ajoute l'icône donnée en paramètre avant le titre du PixCollapsible",
|
|
14
|
+
type: { name: 'string', required: false },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
3
19
|
const Template = (args) => {
|
|
4
20
|
return {
|
|
5
21
|
template: hbs`<PixCollapsible @title={{this.title}} @titleIcon={{this.titleIcon}}>
|
|
@@ -47,16 +63,3 @@ export const multipleCollapsible = (args) => {
|
|
|
47
63
|
context: args,
|
|
48
64
|
};
|
|
49
65
|
};
|
|
50
|
-
|
|
51
|
-
export const argTypes = {
|
|
52
|
-
title: {
|
|
53
|
-
name: 'title',
|
|
54
|
-
description: 'Intitulé du contenu du PixCollapsible',
|
|
55
|
-
type: { name: 'string', required: true },
|
|
56
|
-
},
|
|
57
|
-
titleIcon: {
|
|
58
|
-
name: 'titleIcon',
|
|
59
|
-
description: "Ajoute l'icône donnée en paramètre avant le titre du PixCollapsible",
|
|
60
|
-
type: { name: 'string', required: false },
|
|
61
|
-
},
|
|
62
|
-
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-dropdown.stories';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<Meta title="Form/Dropdown" component="PixDropdown" argTypes={stories.argTypes} />
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
6
5
|
|
|
7
6
|
# Pix Dropdown
|
|
8
7
|
|
|
@@ -18,27 +17,20 @@ Les options sont représentées par un tableau d'objet contenant les propriété
|
|
|
18
17
|
|
|
19
18
|
## Default
|
|
20
19
|
|
|
21
|
-
<
|
|
22
|
-
<Story name="Dropdown" story={stories.Default} height={200} />
|
|
23
|
-
</Canvas>
|
|
20
|
+
<Story of={ComponentStories.Default} height={200} />
|
|
24
21
|
|
|
25
22
|
## With label
|
|
26
23
|
|
|
27
|
-
<
|
|
28
|
-
<Story story={stories.withLabel} height={200} />
|
|
29
|
-
</Canvas>
|
|
24
|
+
<Story of={ComponentStories.withLabel} height={200} />
|
|
30
25
|
|
|
31
26
|
## Searchable
|
|
32
27
|
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
</Canvas>
|
|
28
|
+
<Story of={ComponentStories.searchableDropdown} height={200} />
|
|
29
|
+
|
|
36
30
|
|
|
37
31
|
## Infinite scroll
|
|
38
32
|
|
|
39
|
-
<
|
|
40
|
-
<Story name="Paginated" story={stories.paginatedDropdown} height={200} />
|
|
41
|
-
</Canvas>
|
|
33
|
+
<Story of={ComponentStories.paginatedDropdown} height={200} />
|
|
42
34
|
|
|
43
35
|
## Usage
|
|
44
36
|
|
|
@@ -62,4 +54,4 @@ Les options sont représentées par un tableau d'objet contenant les propriété
|
|
|
62
54
|
|
|
63
55
|
## Arguments
|
|
64
56
|
|
|
65
|
-
<
|
|
57
|
+
<ArgTypes of={ComponentStories} />
|