@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,8 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-input.stories';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<Meta title="Form/Inputs/Input" component="PixInput" argTypes={stories.argTypes} />
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
6
5
|
|
|
7
6
|
# Pix Input
|
|
8
7
|
|
|
@@ -36,33 +35,28 @@ screen.getByLabelText('Prénom exemple: Barry');
|
|
|
36
35
|
|
|
37
36
|
## Default
|
|
38
37
|
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
</Canvas>
|
|
38
|
+
<Story of={ComponentStories.Default} height={100} />
|
|
39
|
+
|
|
42
40
|
|
|
43
41
|
## With label and information
|
|
44
42
|
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
</Canvas>
|
|
43
|
+
<Story of={ComponentStories.withLabel} height={110} />
|
|
44
|
+
|
|
48
45
|
|
|
49
46
|
## Error state (with error message)
|
|
50
47
|
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
</Canvas>
|
|
48
|
+
<Story of={ComponentStories.errorState} height={110} />
|
|
49
|
+
|
|
54
50
|
|
|
55
51
|
## Success state
|
|
56
52
|
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
</Canvas>
|
|
53
|
+
<Story of={ComponentStories.successState} height={100} />
|
|
54
|
+
|
|
60
55
|
|
|
61
56
|
## With required label
|
|
62
57
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
</Canvas>
|
|
58
|
+
<Story of={ComponentStories.withRequiredLabel} height={100} />
|
|
59
|
+
|
|
66
60
|
|
|
67
61
|
## Usage
|
|
68
62
|
|
|
@@ -79,4 +73,4 @@ screen.getByLabelText('Prénom exemple: Barry');
|
|
|
79
73
|
|
|
80
74
|
## Arguments
|
|
81
75
|
|
|
82
|
-
<
|
|
76
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/Inputs/Input',
|
|
5
|
+
argTypes: {
|
|
6
|
+
ariaLabel: {
|
|
7
|
+
name: 'ariaLabel',
|
|
8
|
+
description: "L'action du champ, pour l'accessibilité. Requis si label n'est pas définit.",
|
|
9
|
+
type: { name: 'string', required: false },
|
|
10
|
+
},
|
|
11
|
+
id: {
|
|
12
|
+
name: 'id',
|
|
13
|
+
description: 'Identifiant du champ permettant de lui attacher un label',
|
|
14
|
+
type: { name: 'string', required: true },
|
|
15
|
+
},
|
|
16
|
+
value: {
|
|
17
|
+
name: 'value',
|
|
18
|
+
description: "Valeur de l'input",
|
|
19
|
+
type: { name: 'string', required: false },
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
name: 'label',
|
|
23
|
+
description: "Le label de l'input",
|
|
24
|
+
type: { name: 'string', required: false },
|
|
25
|
+
},
|
|
26
|
+
information: {
|
|
27
|
+
name: 'information',
|
|
28
|
+
description: 'Un descriptif complétant le label',
|
|
29
|
+
type: { name: 'string', required: false },
|
|
30
|
+
},
|
|
31
|
+
validationStatus: {
|
|
32
|
+
name: 'validationStatus',
|
|
33
|
+
description:
|
|
34
|
+
"Définit l'état du champ, neutre par défaut, en succès ou erreur selon l'action de l'utilisateur",
|
|
35
|
+
type: { name: 'string', required: false },
|
|
36
|
+
options: ['default', 'success', 'error'],
|
|
37
|
+
control: { type: 'select' },
|
|
38
|
+
},
|
|
39
|
+
errorMessage: {
|
|
40
|
+
name: 'errorMessage',
|
|
41
|
+
description:
|
|
42
|
+
"Affiche le message d'erreur donné. Doit s'accompagner du paramètre validationStatus en 'error'",
|
|
43
|
+
type: { name: 'string', required: false },
|
|
44
|
+
},
|
|
45
|
+
requiredLabel: {
|
|
46
|
+
name: 'requiredLabel',
|
|
47
|
+
description:
|
|
48
|
+
'Label indiquant que le champ est requis, le paramètre @label devient obligatoire avec ce paramètre.',
|
|
49
|
+
type: { name: 'string', required: false },
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'string' },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const Template = (args) => {
|
|
4
58
|
return {
|
|
5
59
|
template: hbs`<PixInput
|
|
6
60
|
@id={{this.id}}
|
|
@@ -50,54 +104,3 @@ withRequiredLabel.args = {
|
|
|
50
104
|
label: 'Prénom',
|
|
51
105
|
requiredLabel: 'Champ obligatoire',
|
|
52
106
|
};
|
|
53
|
-
|
|
54
|
-
export const argTypes = {
|
|
55
|
-
ariaLabel: {
|
|
56
|
-
name: 'ariaLabel',
|
|
57
|
-
description: "L'action du champ, pour l'accessibilité. Requis si label n'est pas définit.",
|
|
58
|
-
type: { name: 'string', required: false },
|
|
59
|
-
},
|
|
60
|
-
id: {
|
|
61
|
-
name: 'id',
|
|
62
|
-
description: 'Identifiant du champ permettant de lui attacher un label',
|
|
63
|
-
type: { name: 'string', required: true },
|
|
64
|
-
},
|
|
65
|
-
value: {
|
|
66
|
-
name: 'value',
|
|
67
|
-
description: "Valeur de l'input",
|
|
68
|
-
type: { name: 'string', required: false },
|
|
69
|
-
},
|
|
70
|
-
label: {
|
|
71
|
-
name: 'label',
|
|
72
|
-
description: "Le label de l'input",
|
|
73
|
-
type: { name: 'string', required: false },
|
|
74
|
-
},
|
|
75
|
-
information: {
|
|
76
|
-
name: 'information',
|
|
77
|
-
description: 'Un descriptif complétant le label',
|
|
78
|
-
type: { name: 'string', required: false },
|
|
79
|
-
},
|
|
80
|
-
validationStatus: {
|
|
81
|
-
name: 'validationStatus',
|
|
82
|
-
description:
|
|
83
|
-
"Définit l'état du champ, neutre par défaut, en succès ou erreur selon l'action de l'utilisateur",
|
|
84
|
-
type: { name: 'string', required: false },
|
|
85
|
-
options: ['default', 'success', 'error'],
|
|
86
|
-
control: { type: 'select' },
|
|
87
|
-
},
|
|
88
|
-
errorMessage: {
|
|
89
|
-
name: 'errorMessage',
|
|
90
|
-
description:
|
|
91
|
-
"Affiche le message d'erreur donné. Doit s'accompagner du paramètre validationStatus en 'error'",
|
|
92
|
-
type: { name: 'string', required: false },
|
|
93
|
-
},
|
|
94
|
-
requiredLabel: {
|
|
95
|
-
name: 'requiredLabel',
|
|
96
|
-
description:
|
|
97
|
-
'Label indiquant que le champ est requis, le paramètre @label devient obligatoire avec ce paramètre.',
|
|
98
|
-
type: { name: 'string', required: false },
|
|
99
|
-
table: {
|
|
100
|
-
type: { summary: 'string' },
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-message.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
|
+
|
|
6
|
+
# Pix Message
|
|
7
|
+
|
|
8
|
+
Un bandeau d'information avec une icône facultative.
|
|
9
|
+
|
|
10
|
+
## Default / Info
|
|
11
|
+
|
|
12
|
+
Le bandeau est de type informatif sans icône (par défaut).
|
|
13
|
+
|
|
14
|
+
<Story of={ComponentStories.Default} height={110} />
|
|
15
|
+
|
|
16
|
+
## With icon
|
|
17
|
+
|
|
18
|
+
Le bandeau avec une icône.
|
|
19
|
+
|
|
20
|
+
<Story of={ComponentStories.withIcon} height={110} />
|
|
21
|
+
|
|
22
|
+
## Warning
|
|
23
|
+
|
|
24
|
+
Le bandeau en cas d'alerte.
|
|
25
|
+
|
|
26
|
+
<Story of={ComponentStories.warning} height={110} />
|
|
27
|
+
|
|
28
|
+
## Success
|
|
29
|
+
|
|
30
|
+
Le bandeau en cas de validation.
|
|
31
|
+
|
|
32
|
+
<Story of={ComponentStories.success} height={110} />
|
|
33
|
+
|
|
34
|
+
## Error
|
|
35
|
+
|
|
36
|
+
Le bandeau en cas de d'erreur.
|
|
37
|
+
|
|
38
|
+
<Story of={ComponentStories.error} height={110} />
|
|
39
|
+
|
|
40
|
+
## Alert
|
|
41
|
+
|
|
42
|
+
⚠️ Ce type est déprécié, utilisez le type `error` à la place.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Par défaut
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<PixMessage> Ceci est un message à caractère informatif. </PixMessage>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Arguments
|
|
53
|
+
|
|
54
|
+
<ArgTypes />
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Notification/Message',
|
|
5
|
+
render: (args) => ({
|
|
5
6
|
template: hbs`<PixMessage @type={{this.type}} @withIcon={{this.withIcon}}>
|
|
6
7
|
Ceci est un message
|
|
7
8
|
{{this.type}}
|
|
@@ -10,48 +11,51 @@ const Template = (args) => {
|
|
|
10
11
|
de l'afficher sur deux lignes.
|
|
11
12
|
</PixMessage>`,
|
|
12
13
|
context: args,
|
|
13
|
-
}
|
|
14
|
+
}),
|
|
15
|
+
argTypes: {
|
|
16
|
+
type: {
|
|
17
|
+
name: 'type',
|
|
18
|
+
description: 'Type du message',
|
|
19
|
+
type: { name: 'string', required: false },
|
|
20
|
+
table: { defaultValue: { summary: 'info' } },
|
|
21
|
+
control: { type: 'select' },
|
|
22
|
+
options: ['info', 'success', 'warning', 'alert', 'error'],
|
|
23
|
+
},
|
|
24
|
+
withIcon: {
|
|
25
|
+
name: 'withIcon',
|
|
26
|
+
description: 'Icône du message',
|
|
27
|
+
table: { defaultValue: { summary: false } },
|
|
28
|
+
type: { name: 'boolean', required: false },
|
|
29
|
+
control: { type: 'boolean' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
14
32
|
};
|
|
15
33
|
|
|
16
|
-
export const Default =
|
|
17
|
-
|
|
18
|
-
export const error = Template.bind({});
|
|
19
|
-
error.args = {
|
|
20
|
-
type: 'error',
|
|
21
|
-
withIcon: true,
|
|
22
|
-
};
|
|
34
|
+
export const Default = {};
|
|
23
35
|
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
export const error = {
|
|
37
|
+
args: {
|
|
38
|
+
type: 'error',
|
|
39
|
+
withIcon: true,
|
|
40
|
+
},
|
|
28
41
|
};
|
|
29
42
|
|
|
30
|
-
export const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
export const warning = {
|
|
44
|
+
args: {
|
|
45
|
+
type: 'warning',
|
|
46
|
+
withIcon: true,
|
|
47
|
+
},
|
|
34
48
|
};
|
|
35
49
|
|
|
36
|
-
export const
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
export const success = {
|
|
51
|
+
args: {
|
|
52
|
+
type: 'success',
|
|
53
|
+
withIcon: true,
|
|
54
|
+
},
|
|
39
55
|
};
|
|
40
56
|
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
description: 'Type du message',
|
|
45
|
-
type: { name: 'string', required: false },
|
|
46
|
-
table: { defaultValue: { summary: 'info' } },
|
|
47
|
-
control: { type: 'select' },
|
|
48
|
-
options: ['info', 'success', 'warning', 'alert', 'error'],
|
|
49
|
-
},
|
|
50
|
-
withIcon: {
|
|
51
|
-
name: 'withIcon',
|
|
52
|
-
description: 'Icône du message',
|
|
53
|
-
table: { defaultValue: { summary: false } },
|
|
54
|
-
type: { name: 'boolean', required: false },
|
|
55
|
-
control: { type: 'boolean' },
|
|
57
|
+
export const withIcon = {
|
|
58
|
+
args: {
|
|
59
|
+
withIcon: true,
|
|
56
60
|
},
|
|
57
61
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as ComponentStories from './pix-modal.stories.js';
|
|
4
4
|
|
|
5
|
-
<Meta
|
|
5
|
+
<Meta of={ComponentStories} />
|
|
6
6
|
|
|
7
7
|
# PixModal
|
|
8
8
|
|
|
@@ -15,9 +15,7 @@ Ce composant possède deux `yield` :
|
|
|
15
15
|
- `:footer` peut également accueillir tout type de contenu HTML, mais est destiné aux boutons permettant d'interagir
|
|
16
16
|
avec la modale, ce qui permettra de les positionner correctement dans tous les cas de figure.
|
|
17
17
|
|
|
18
|
-
<
|
|
19
|
-
<Story name="Default" story={stories.Default} height={500} />
|
|
20
|
-
</Canvas>
|
|
18
|
+
<Story of={ComponentStories.Default} height={500} />
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
23
21
|
|
|
@@ -52,4 +50,4 @@ Ce composant possède deux `yield` :
|
|
|
52
50
|
|
|
53
51
|
## Arguments
|
|
54
52
|
|
|
55
|
-
<
|
|
53
|
+
<ArgTypes />
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Basics/Modal',
|
|
5
|
+
render: (args) => ({
|
|
5
6
|
template: hbs`<PixModal
|
|
6
7
|
@showModal={{this.showModal}}
|
|
7
8
|
@title={{this.title}}
|
|
@@ -28,35 +29,35 @@ export const Template = (args) => {
|
|
|
28
29
|
<PixButton @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Ouvrir la modale</PixButton>
|
|
29
30
|
</div>`,
|
|
30
31
|
context: args,
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
}),
|
|
33
|
+
argTypes: {
|
|
34
|
+
title: {
|
|
35
|
+
name: 'title',
|
|
36
|
+
description: 'Titre de la modale',
|
|
37
|
+
type: { name: 'string', required: true },
|
|
38
|
+
},
|
|
39
|
+
onCloseButtonClick: {
|
|
40
|
+
name: 'onCloseButtonClick',
|
|
41
|
+
description: 'Fonction à exécuter à la fermeture de la modale',
|
|
42
|
+
type: { name: 'function', required: true },
|
|
43
|
+
},
|
|
44
|
+
showModal: {
|
|
45
|
+
name: 'showModal',
|
|
46
|
+
description: "Gérer l'ouverture de la modale",
|
|
47
|
+
type: { name: 'boolean', required: true },
|
|
48
|
+
control: { type: 'boolean' },
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: 'boolean' },
|
|
51
|
+
defaultValue: { summary: false },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
39
55
|
};
|
|
40
56
|
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
onCloseButtonClick: {
|
|
48
|
-
name: 'onCloseButtonClick',
|
|
49
|
-
description: 'Fonction à exécuter à la fermeture de la modale',
|
|
50
|
-
type: { name: 'function', required: true },
|
|
51
|
-
},
|
|
52
|
-
showModal: {
|
|
53
|
-
name: 'showModal',
|
|
54
|
-
description: "Gérer l'ouverture de la modale",
|
|
55
|
-
type: { name: 'boolean', required: true },
|
|
56
|
-
control: { type: 'boolean' },
|
|
57
|
-
table: {
|
|
58
|
-
type: { summary: 'boolean' },
|
|
59
|
-
defaultValue: { summary: false },
|
|
60
|
-
},
|
|
57
|
+
export const Default = {
|
|
58
|
+
args: {
|
|
59
|
+
showModal: true,
|
|
60
|
+
title: "Qu'est-ce qu'une modale ?",
|
|
61
|
+
onCloseButtonClick: () => {},
|
|
61
62
|
},
|
|
62
63
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
2
|
-
import * as
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-multi-select.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# Pix Multi Select
|
|
7
7
|
|
|
@@ -12,33 +12,21 @@ L'ajout de `class` et d'autres attributs comme `aria-label` sont possibles.
|
|
|
12
12
|
|
|
13
13
|
## With child component
|
|
14
14
|
|
|
15
|
-
<
|
|
16
|
-
<Story name="With child component" story={stories.multiSelectWithChildComponent} height={310} />
|
|
17
|
-
</Canvas>
|
|
15
|
+
<Story of={ComponentStories.multiSelectWithChildComponent} height={310} />
|
|
18
16
|
|
|
19
17
|
## Searchable
|
|
20
18
|
|
|
21
|
-
<
|
|
22
|
-
<Story name="Searchable" story={stories.multiSelectSearchable} height={330} />
|
|
23
|
-
</Canvas>
|
|
19
|
+
<Story of={ComponentStories.multiSelectSearchable} height={330} />
|
|
24
20
|
|
|
25
21
|
## withCustomClass
|
|
26
22
|
|
|
27
|
-
<
|
|
28
|
-
<Story name="withCustomClass" story={stories.multiSelectWithCustomClass} height={330} />
|
|
29
|
-
</Canvas>
|
|
23
|
+
<Story of={ComponentStories.multiSelectWithCustomClass} height={330} />
|
|
30
24
|
|
|
31
25
|
## withId
|
|
32
26
|
|
|
33
|
-
<
|
|
34
|
-
<Story name="withId" story={stories.multiSelectWithId} height={330} />
|
|
35
|
-
</Canvas>
|
|
27
|
+
<Story of={ComponentStories.multiSelectWithId} height={330} />
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<Canvas>
|
|
40
|
-
<Story name="withYield" story={stories.multiSelectWithYield} height={330} />
|
|
41
|
-
</Canvas>
|
|
29
|
+
<Story of={ComponentStories.multiSelectWithYield} height={330} />
|
|
42
30
|
|
|
43
31
|
## Usage
|
|
44
32
|
|
|
@@ -62,4 +50,4 @@ L'ajout de `class` et d'autres attributs comme `aria-label` sont possibles.
|
|
|
62
50
|
|
|
63
51
|
## Arguments
|
|
64
52
|
|
|
65
|
-
<
|
|
53
|
+
<ArgTypes />
|