@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,7 +1,90 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Basics/ButtonLink',
|
|
5
|
+
|
|
6
|
+
argTypes: {
|
|
7
|
+
href: {
|
|
8
|
+
name: 'href',
|
|
9
|
+
description: 'Paramètre à renseigner pour utiliser lien HTML.',
|
|
10
|
+
type: { name: 'string', required: false },
|
|
11
|
+
},
|
|
12
|
+
route: {
|
|
13
|
+
name: 'route',
|
|
14
|
+
description:
|
|
15
|
+
"Paramètre à renseigner pour utiliser un composant LinkTo à la place d'un lien classique. Il prend comme valeur la route de redirection",
|
|
16
|
+
type: { name: 'string', required: false },
|
|
17
|
+
},
|
|
18
|
+
model: {
|
|
19
|
+
name: 'model',
|
|
20
|
+
description: 'Model Ember lié à la route utilisée',
|
|
21
|
+
type: { required: false },
|
|
22
|
+
},
|
|
23
|
+
query: {
|
|
24
|
+
name: 'query',
|
|
25
|
+
description:
|
|
26
|
+
"Paramètre facultatif du <LinkTo> Ember permettant d'ajouter des paires de clé/valeur dans les paramètres d'une URL",
|
|
27
|
+
type: { required: false },
|
|
28
|
+
},
|
|
29
|
+
shape: {
|
|
30
|
+
name: 'shape',
|
|
31
|
+
description: 'forme: `rounded`,`squircle`',
|
|
32
|
+
type: { name: 'string', required: false },
|
|
33
|
+
options: ['rounded', 'squircle'],
|
|
34
|
+
control: { type: 'select' },
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: 'string' },
|
|
37
|
+
defaultValue: { summary: 'squircle' },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
backgroundColor: {
|
|
41
|
+
name: 'backgroundColor',
|
|
42
|
+
description:
|
|
43
|
+
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
44
|
+
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
45
|
+
type: { name: 'string', required: false },
|
|
46
|
+
control: { type: 'select' },
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'string' },
|
|
49
|
+
defaultValue: { summary: 'blue' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
name: 'size',
|
|
54
|
+
description: 'taille: `big`,`small`',
|
|
55
|
+
options: ['big', 'small'],
|
|
56
|
+
type: { name: 'string', required: false },
|
|
57
|
+
control: { type: 'select' },
|
|
58
|
+
table: {
|
|
59
|
+
type: { summary: 'string' },
|
|
60
|
+
defaultValue: { summary: 'big' },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
isBorderVisible: {
|
|
64
|
+
name: 'isBorderVisible',
|
|
65
|
+
description:
|
|
66
|
+
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
67
|
+
type: { name: 'boolean', required: false },
|
|
68
|
+
control: { type: 'boolean' },
|
|
69
|
+
table: {
|
|
70
|
+
type: { summary: 'boolean' },
|
|
71
|
+
defaultValue: { summary: 'false' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
isDisabled: {
|
|
75
|
+
name: 'isDisabled',
|
|
76
|
+
type: { name: 'boolean', required: false },
|
|
77
|
+
control: { type: 'boolean' },
|
|
78
|
+
table: {
|
|
79
|
+
type: { summary: 'boolean' },
|
|
80
|
+
defaultValue: { summary: 'false' },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const htmlLink = {
|
|
87
|
+
render: (args) => ({
|
|
5
88
|
template: hbs`<PixButtonLink
|
|
6
89
|
@href='https://pix.fr'
|
|
7
90
|
target='NEW'
|
|
@@ -14,10 +97,10 @@ export const htmlLinkTemplate = (args) => {
|
|
|
14
97
|
Lien HTML classique
|
|
15
98
|
</PixButtonLink>`,
|
|
16
99
|
context: args,
|
|
17
|
-
}
|
|
100
|
+
}),
|
|
18
101
|
};
|
|
19
102
|
|
|
20
|
-
export const
|
|
103
|
+
export const emberLink = (args) => {
|
|
21
104
|
return {
|
|
22
105
|
template: hbs`<PixButtonLink
|
|
23
106
|
@route=''
|
|
@@ -34,86 +117,3 @@ export const emberLinkTemplate = (args) => {
|
|
|
34
117
|
context: args,
|
|
35
118
|
};
|
|
36
119
|
};
|
|
37
|
-
|
|
38
|
-
export const htmlLink = htmlLinkTemplate.bind({});
|
|
39
|
-
|
|
40
|
-
export const emberLink = emberLinkTemplate.bind({});
|
|
41
|
-
|
|
42
|
-
export const argTypes = {
|
|
43
|
-
href: {
|
|
44
|
-
name: 'href',
|
|
45
|
-
description: 'Paramètre à renseigner pour utiliser lien HTML.',
|
|
46
|
-
type: { name: 'string', required: false },
|
|
47
|
-
},
|
|
48
|
-
route: {
|
|
49
|
-
name: 'route',
|
|
50
|
-
description:
|
|
51
|
-
"Paramètre à renseigner pour utiliser un composant LinkTo à la place d'un lien classique. Il prend comme valeur la route de redirection",
|
|
52
|
-
type: { name: 'string', required: false },
|
|
53
|
-
},
|
|
54
|
-
model: {
|
|
55
|
-
name: 'model',
|
|
56
|
-
description: 'Model Ember lié à la route utilisée',
|
|
57
|
-
type: { required: false },
|
|
58
|
-
},
|
|
59
|
-
query: {
|
|
60
|
-
name: 'query',
|
|
61
|
-
description:
|
|
62
|
-
"Paramètre facultatif du <LinkTo> Ember permettant d'ajouter des paires de clé/valeur dans les paramètres d'une URL",
|
|
63
|
-
type: { required: false },
|
|
64
|
-
},
|
|
65
|
-
shape: {
|
|
66
|
-
name: 'shape',
|
|
67
|
-
description: 'forme: `rounded`,`squircle`',
|
|
68
|
-
type: { name: 'string', required: false },
|
|
69
|
-
options: ['rounded', 'squircle'],
|
|
70
|
-
control: { type: 'select' },
|
|
71
|
-
table: {
|
|
72
|
-
type: { summary: 'string' },
|
|
73
|
-
defaultValue: { summary: 'squircle' },
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
backgroundColor: {
|
|
77
|
-
name: 'backgroundColor',
|
|
78
|
-
description:
|
|
79
|
-
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
80
|
-
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
81
|
-
type: { name: 'string', required: false },
|
|
82
|
-
control: { type: 'select' },
|
|
83
|
-
table: {
|
|
84
|
-
type: { summary: 'string' },
|
|
85
|
-
defaultValue: { summary: 'blue' },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
size: {
|
|
89
|
-
name: 'size',
|
|
90
|
-
description: 'taille: `big`,`small`',
|
|
91
|
-
options: ['big', 'small'],
|
|
92
|
-
type: { name: 'string', required: false },
|
|
93
|
-
control: { type: 'select' },
|
|
94
|
-
table: {
|
|
95
|
-
type: { summary: 'string' },
|
|
96
|
-
defaultValue: { summary: 'big' },
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
isBorderVisible: {
|
|
100
|
-
name: 'isBorderVisible',
|
|
101
|
-
description:
|
|
102
|
-
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
103
|
-
type: { name: 'boolean', required: false },
|
|
104
|
-
control: { type: 'boolean' },
|
|
105
|
-
table: {
|
|
106
|
-
type: { summary: 'boolean' },
|
|
107
|
-
defaultValue: { summary: 'false' },
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
isDisabled: {
|
|
111
|
-
name: 'isDisabled',
|
|
112
|
-
type: { name: 'boolean', required: false },
|
|
113
|
-
control: { type: 'boolean' },
|
|
114
|
-
table: {
|
|
115
|
-
type: { summary: 'boolean' },
|
|
116
|
-
defaultValue: { summary: 'false' },
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-button-upload.stories';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<Meta title="Basics/ButtonUpload" component="PixButtonUpload" argTypes={stories.argTypes} />
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
6
5
|
|
|
7
6
|
# PixButtonUpload
|
|
8
7
|
|
|
@@ -12,9 +11,7 @@ Hérite des styles de base de `PixButton` (`shape`, `backgroundColor`, `size`, `
|
|
|
12
11
|
|
|
13
12
|
Toutes les [propriétés HTML d'un input de type file](https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/file) sont supportées.
|
|
14
13
|
|
|
15
|
-
<
|
|
16
|
-
<Story name="PixButtonUpload" story={stories.buttonUpload} height={60} />
|
|
17
|
-
</Canvas>
|
|
14
|
+
<Story of={ComponentStories.buttonUpload} height={60} />
|
|
18
15
|
|
|
19
16
|
```html
|
|
20
17
|
<PixButtonUpload @id="file-upload" @onChange="{{this.uploadFile}}" accept=".csv">
|
|
@@ -26,4 +23,4 @@ Le callback `@onChange` prend en paramètre le tableau de fichiers uploadés.
|
|
|
26
23
|
|
|
27
24
|
## Arguments
|
|
28
25
|
|
|
29
|
-
<
|
|
26
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
3
|
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Basics/ButtonUpload',
|
|
6
|
+
argTypes: {
|
|
7
|
+
id: {
|
|
8
|
+
name: 'id',
|
|
9
|
+
description: "identifiant du bouton d'upload",
|
|
10
|
+
type: { name: 'string', required: true },
|
|
11
|
+
},
|
|
12
|
+
onChange: {
|
|
13
|
+
name: 'onChange',
|
|
14
|
+
description:
|
|
15
|
+
"fonction à exécuter au moment de l'upload du fichier, elle prend en entrée la liste des fichiers uploadés.",
|
|
16
|
+
type: { name: 'function', required: true },
|
|
17
|
+
},
|
|
18
|
+
shape: {
|
|
19
|
+
name: 'shape',
|
|
20
|
+
description: 'forme: `rounded`,`squircle`',
|
|
21
|
+
type: { name: 'string', required: false },
|
|
22
|
+
options: ['rounded', 'squircle'],
|
|
23
|
+
control: { type: 'select' },
|
|
24
|
+
table: {
|
|
25
|
+
type: { summary: 'string' },
|
|
26
|
+
defaultValue: { summary: 'squircle' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
backgroundColor: {
|
|
30
|
+
name: 'backgroundColor',
|
|
31
|
+
description:
|
|
32
|
+
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
33
|
+
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
34
|
+
type: { name: 'string', required: false },
|
|
35
|
+
control: { type: 'select' },
|
|
36
|
+
table: {
|
|
37
|
+
type: { summary: 'string' },
|
|
38
|
+
defaultValue: { summary: 'blue' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
name: 'size',
|
|
43
|
+
description: 'taille: `big`,`small`',
|
|
44
|
+
options: ['big', 'small'],
|
|
45
|
+
type: { name: 'string', required: false },
|
|
46
|
+
control: { type: 'select' },
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'string' },
|
|
49
|
+
defaultValue: { summary: 'big' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
isBorderVisible: {
|
|
53
|
+
name: 'isBorderVisible',
|
|
54
|
+
description:
|
|
55
|
+
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
56
|
+
type: { name: 'boolean', required: false },
|
|
57
|
+
control: { type: 'boolean' },
|
|
58
|
+
table: {
|
|
59
|
+
type: { summary: 'boolean' },
|
|
60
|
+
defaultValue: { summary: 'false' },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
4
66
|
export const buttonUpload = (args) => {
|
|
5
67
|
return {
|
|
6
68
|
template: hbs`<PixButtonUpload
|
|
@@ -21,62 +83,3 @@ buttonUpload.args = {
|
|
|
21
83
|
id: 'file-upload',
|
|
22
84
|
onChange: action('onChange'),
|
|
23
85
|
};
|
|
24
|
-
|
|
25
|
-
export const argTypes = {
|
|
26
|
-
id: {
|
|
27
|
-
name: 'id',
|
|
28
|
-
description: "identifiant du bouton d'upload",
|
|
29
|
-
type: { name: 'string', required: true },
|
|
30
|
-
},
|
|
31
|
-
onChange: {
|
|
32
|
-
name: 'onChange',
|
|
33
|
-
description:
|
|
34
|
-
"fonction à exécuter au moment de l'upload du fichier, elle prend en entrée la liste des fichiers uploadés.",
|
|
35
|
-
type: { name: 'function', required: true },
|
|
36
|
-
},
|
|
37
|
-
shape: {
|
|
38
|
-
name: 'shape',
|
|
39
|
-
description: 'forme: `rounded`,`squircle`',
|
|
40
|
-
type: { name: 'string', required: false },
|
|
41
|
-
options: ['rounded', 'squircle'],
|
|
42
|
-
control: { type: 'select' },
|
|
43
|
-
table: {
|
|
44
|
-
type: { summary: 'string' },
|
|
45
|
-
defaultValue: { summary: 'squircle' },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
backgroundColor: {
|
|
49
|
-
name: 'backgroundColor',
|
|
50
|
-
description:
|
|
51
|
-
'color: `blue`, `green`, `yellow`, `red`, `grey`, `transparent-light`, `transparent-dark`',
|
|
52
|
-
options: ['blue', 'green', 'yellow', 'red', 'grey', 'transparent-light', 'transparent-dark'],
|
|
53
|
-
type: { name: 'string', required: false },
|
|
54
|
-
control: { type: 'select' },
|
|
55
|
-
table: {
|
|
56
|
-
type: { summary: 'string' },
|
|
57
|
-
defaultValue: { summary: 'blue' },
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
size: {
|
|
61
|
-
name: 'size',
|
|
62
|
-
description: 'taille: `big`,`small`',
|
|
63
|
-
options: ['big', 'small'],
|
|
64
|
-
type: { name: 'string', required: false },
|
|
65
|
-
control: { type: 'select' },
|
|
66
|
-
table: {
|
|
67
|
-
type: { summary: 'string' },
|
|
68
|
-
defaultValue: { summary: 'big' },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
isBorderVisible: {
|
|
72
|
-
name: 'isBorderVisible',
|
|
73
|
-
description:
|
|
74
|
-
'Paramètre utilisé seulement quand le `backgroundColor` est `transparent-light` ou `transparent-dark`',
|
|
75
|
-
type: { name: 'boolean', required: false },
|
|
76
|
-
control: { type: 'boolean' },
|
|
77
|
-
table: {
|
|
78
|
-
type: { summary: 'boolean' },
|
|
79
|
-
defaultValue: { summary: 'false' },
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
@@ -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-button.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# Pix Button
|
|
7
7
|
|
|
@@ -9,25 +9,19 @@ import * as stories from './pix-button.stories.js';
|
|
|
9
9
|
|
|
10
10
|
Le bouton par défaut qui empêche les clics multiples.
|
|
11
11
|
|
|
12
|
-
<
|
|
13
|
-
<Story name="Default" story={stories.Default} height={75} />
|
|
14
|
-
</Canvas>
|
|
12
|
+
<Story of={ComponentStories.Default} />
|
|
15
13
|
|
|
16
14
|
## Borders
|
|
17
15
|
|
|
18
16
|
Le bouton avec bordures et fond transparent
|
|
19
17
|
|
|
20
|
-
<
|
|
21
|
-
<Story story={stories.borders} height={150} />
|
|
22
|
-
</Canvas>
|
|
18
|
+
<Story of={ComponentStories.borders} height={150} />
|
|
23
19
|
|
|
24
20
|
## Colors
|
|
25
21
|
|
|
26
22
|
Le bouton avec toutes ses variations de couleur
|
|
27
23
|
|
|
28
|
-
<
|
|
29
|
-
<Story story={stories.colors} height={500} />
|
|
30
|
-
</Canvas>
|
|
24
|
+
<Story of={ComponentStories.colors} height={500} />
|
|
31
25
|
|
|
32
26
|
## Icons
|
|
33
27
|
|
|
@@ -35,17 +29,14 @@ Le bouton avec des icônes `font-awesome` à afficher avant (`@iconBefore`) ou a
|
|
|
35
29
|
|
|
36
30
|
> ℹ️ Accessibilité : dans le cas où les icônes ont une valeur d'information (ex: un bouton `⬅️ Précédent`), il est important d'apporter un aria-label au bouton (ex: "Retour à la page précédente").
|
|
37
31
|
|
|
38
|
-
<
|
|
39
|
-
<Story story={stories.icons} height={75} />
|
|
40
|
-
</Canvas>
|
|
32
|
+
<Story of={ComponentStories.icons} height={75} />
|
|
41
33
|
|
|
42
34
|
## Disabled
|
|
43
35
|
|
|
44
36
|
Le bouton désactivé
|
|
45
37
|
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
</Canvas>
|
|
38
|
+
<Story of={ComponentStories.disabled} height={75} />
|
|
39
|
+
|
|
49
40
|
|
|
50
41
|
## Link
|
|
51
42
|
|
|
@@ -61,25 +52,21 @@ Le loader peut être affiché de deux façons :
|
|
|
61
52
|
- En passant une promesse dans l'attribut `@triggerAction`
|
|
62
53
|
- En passant directement l'attribut `@isLoading={{true}}`
|
|
63
54
|
|
|
64
|
-
<
|
|
65
|
-
<Story story={stories.loader} height={150} />
|
|
66
|
-
</Canvas>
|
|
55
|
+
<Story of={ComponentStories.loader} height={150} />
|
|
67
56
|
|
|
68
57
|
## Shape
|
|
69
58
|
|
|
70
59
|
Le bouton rounded
|
|
71
60
|
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
</Canvas>
|
|
61
|
+
<Story of={ComponentStories.shape} height={75} />
|
|
62
|
+
|
|
75
63
|
|
|
76
64
|
## Size
|
|
77
65
|
|
|
78
66
|
Le bouton en small
|
|
79
67
|
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
</Canvas>
|
|
68
|
+
<Story of={ComponentStories.size} height={75} />
|
|
69
|
+
|
|
83
70
|
|
|
84
71
|
## Usage
|
|
85
72
|
|
|
@@ -102,4 +89,4 @@ Un petit bouton avec les bords arrondis en fond transparent avec une bordure
|
|
|
102
89
|
|
|
103
90
|
## Arguments
|
|
104
91
|
|
|
105
|
-
<
|
|
92
|
+
<ArgTypes of={ComponentStories} />
|