@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,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
2
|
-
import * as
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-icon-button.stories.js';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# Pix Icon Button
|
|
7
7
|
|
|
@@ -11,33 +11,25 @@ Le PixIconButton permet de créer un bouton contenant une icône font-awesome.
|
|
|
11
11
|
|
|
12
12
|
Le bouton en version big et sans fond grisé.
|
|
13
13
|
|
|
14
|
-
<
|
|
15
|
-
<Story name="Default" story={stories.Default} height={60} />
|
|
16
|
-
</Canvas>
|
|
14
|
+
<Story of={ComponentStories.Default} height={60} />
|
|
17
15
|
|
|
18
16
|
## Small
|
|
19
17
|
|
|
20
18
|
Le bouton en version small.
|
|
21
19
|
|
|
22
|
-
<
|
|
23
|
-
<Story name="Small" story={stories.small} height={60} />
|
|
24
|
-
</Canvas>
|
|
20
|
+
<Story of={ComponentStories.small} height={60} />
|
|
25
21
|
|
|
26
22
|
## With Background
|
|
27
23
|
|
|
28
24
|
Le bouton avec le fond grisé.
|
|
29
25
|
|
|
30
|
-
<
|
|
31
|
-
<Story name="With Background" story={stories.withBackground} height={60} />
|
|
32
|
-
</Canvas>
|
|
26
|
+
<Story of={ComponentStories.withBackground} height={60} />
|
|
33
27
|
|
|
34
28
|
## Disabled
|
|
35
29
|
|
|
36
30
|
Exemple avec le bouton disabled
|
|
37
31
|
|
|
38
|
-
<
|
|
39
|
-
<Story name="Disabled" story={stories.disabled} height={60} />
|
|
40
|
-
</Canvas>
|
|
32
|
+
<Story of={ComponentStories.disabled} height={60} />
|
|
41
33
|
|
|
42
34
|
## Accessibilité / aria-label
|
|
43
35
|
|
|
@@ -89,4 +81,4 @@ Bouton d'action
|
|
|
89
81
|
/>
|
|
90
82
|
```
|
|
91
83
|
|
|
92
|
-
<
|
|
84
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
3
|
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Basics/Icon button',
|
|
6
|
+
argTypes: {
|
|
7
|
+
ariaLabel: {
|
|
8
|
+
name: 'ariaLabel',
|
|
9
|
+
description: "l'action du bouton, pour l'accessibilité",
|
|
10
|
+
type: { name: 'string', required: true },
|
|
11
|
+
},
|
|
12
|
+
icon: {
|
|
13
|
+
name: 'icon',
|
|
14
|
+
description: 'Icône font-awesome',
|
|
15
|
+
type: { name: 'string', required: true },
|
|
16
|
+
table: { defaultValue: { summary: 'plus' } },
|
|
17
|
+
},
|
|
18
|
+
iconPrefix: {
|
|
19
|
+
name: 'iconPrefix',
|
|
20
|
+
description: "Prefix de l'icône font-awesome",
|
|
21
|
+
type: { name: 'string', required: false },
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: ['far', 'fas'],
|
|
24
|
+
},
|
|
25
|
+
triggerAction: {
|
|
26
|
+
name: 'triggerAction',
|
|
27
|
+
description: 'Fonction à appeler au clic du bouton',
|
|
28
|
+
type: { required: true },
|
|
29
|
+
},
|
|
30
|
+
withBackground: {
|
|
31
|
+
name: 'withBackground',
|
|
32
|
+
description: 'Affichage du fond grisé',
|
|
33
|
+
type: { name: 'boolean', required: false },
|
|
34
|
+
table: {
|
|
35
|
+
type: { summary: 'boolean' },
|
|
36
|
+
defaultValue: { summary: 'false' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
name: 'size',
|
|
41
|
+
description: 'Size: `small`, `big`',
|
|
42
|
+
type: { name: 'string', required: false },
|
|
43
|
+
control: { type: 'select' },
|
|
44
|
+
options: ['big', 'small'],
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: 'string' },
|
|
47
|
+
defaultValue: { summary: 'big' },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
color: {
|
|
51
|
+
name: 'color',
|
|
52
|
+
description: ' ⚠️ **Propriété dépréciée** ⚠️ Color: `light-grey`, `dark-grey`',
|
|
53
|
+
type: { name: 'string', required: false },
|
|
54
|
+
control: { type: 'select' },
|
|
55
|
+
options: ['light-grey', 'dark-grey'],
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: 'string' },
|
|
58
|
+
defaultValue: { summary: 'light-grey' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
4
64
|
const Template = (args) => {
|
|
5
65
|
return {
|
|
6
66
|
template: hbs`<PixIconButton
|
|
@@ -46,60 +106,3 @@ disabled.args = {
|
|
|
46
106
|
disabled: true,
|
|
47
107
|
triggerAction,
|
|
48
108
|
};
|
|
49
|
-
|
|
50
|
-
export const argTypes = {
|
|
51
|
-
ariaLabel: {
|
|
52
|
-
name: 'ariaLabel',
|
|
53
|
-
description: "l'action du bouton, pour l'accessibilité",
|
|
54
|
-
type: { name: 'string', required: true },
|
|
55
|
-
},
|
|
56
|
-
icon: {
|
|
57
|
-
name: 'icon',
|
|
58
|
-
description: 'Icône font-awesome',
|
|
59
|
-
type: { name: 'string', required: true },
|
|
60
|
-
table: { defaultValue: { summary: 'plus' } },
|
|
61
|
-
},
|
|
62
|
-
iconPrefix: {
|
|
63
|
-
name: 'iconPrefix',
|
|
64
|
-
description: "Prefix de l'icône font-awesome",
|
|
65
|
-
type: { name: 'string', required: false },
|
|
66
|
-
control: { type: 'select' },
|
|
67
|
-
options: ['far', 'fas'],
|
|
68
|
-
},
|
|
69
|
-
triggerAction: {
|
|
70
|
-
name: 'triggerAction',
|
|
71
|
-
description: 'Fonction à appeler au clic du bouton',
|
|
72
|
-
type: { required: true },
|
|
73
|
-
},
|
|
74
|
-
withBackground: {
|
|
75
|
-
name: 'withBackground',
|
|
76
|
-
description: 'Affichage du fond grisé',
|
|
77
|
-
type: { name: 'boolean', required: false },
|
|
78
|
-
table: {
|
|
79
|
-
type: { summary: 'boolean' },
|
|
80
|
-
defaultValue: { summary: 'false' },
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
size: {
|
|
84
|
-
name: 'size',
|
|
85
|
-
description: 'Size: `small`, `big`',
|
|
86
|
-
type: { name: 'string', required: false },
|
|
87
|
-
control: { type: 'select' },
|
|
88
|
-
options: ['big', 'small'],
|
|
89
|
-
table: {
|
|
90
|
-
type: { summary: 'string' },
|
|
91
|
-
defaultValue: { summary: 'big' },
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
color: {
|
|
95
|
-
name: 'color',
|
|
96
|
-
description: ' ⚠️ **Propriété dépréciée** ⚠️ Color: `light-grey`, `dark-grey`',
|
|
97
|
-
type: { name: 'string', required: false },
|
|
98
|
-
control: { type: 'select' },
|
|
99
|
-
options: ['light-grey', 'dark-grey'],
|
|
100
|
-
table: {
|
|
101
|
-
type: { summary: 'string' },
|
|
102
|
-
defaultValue: { summary: 'light-grey' },
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
@@ -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-indicator-card.stories.js';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# Pix Indicator Card
|
|
7
7
|
|
|
@@ -13,15 +13,11 @@ Une carte est un bloc en 2 parties dont les bords sont arrondis et ayant une omb
|
|
|
13
13
|
|
|
14
14
|
## Default
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
<Story name="Default" story={stories.Default} height={200} />
|
|
18
|
-
</Canvas>
|
|
16
|
+
<Story of={ComponentStories.Default} height={200} />
|
|
19
17
|
|
|
20
18
|
## WithIconPrefix
|
|
21
19
|
|
|
22
|
-
<
|
|
23
|
-
<Story name="WithIconPrefix" story={stories.withIconPrefix} height={200} />
|
|
24
|
-
</Canvas>
|
|
20
|
+
<Story of={ComponentStories.withIconPrefix} height={200} />
|
|
25
21
|
|
|
26
22
|
## Usage
|
|
27
23
|
|
|
@@ -42,4 +38,4 @@ Une carte est un bloc en 2 parties dont les bords sont arrondis et ayant une omb
|
|
|
42
38
|
</PixIndicatorCard>
|
|
43
39
|
```
|
|
44
40
|
|
|
45
|
-
<
|
|
41
|
+
<ArgTypes of={ComponentStories}/>
|
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Others/Indicator Card',
|
|
5
|
+
argTypes: {
|
|
6
|
+
title: {
|
|
7
|
+
name: 'Title',
|
|
8
|
+
description: 'Titre de la carte',
|
|
9
|
+
},
|
|
10
|
+
color: {
|
|
11
|
+
name: 'Color',
|
|
12
|
+
description: "Couleur de l'icone",
|
|
13
|
+
table: { defaultValue: { summary: 'grey' } },
|
|
14
|
+
control: { type: 'select' },
|
|
15
|
+
options: ['grey', 'blue', 'green', 'purple'],
|
|
16
|
+
},
|
|
17
|
+
icon: {
|
|
18
|
+
name: 'Icon',
|
|
19
|
+
description: "Icone dans l'encart",
|
|
20
|
+
},
|
|
21
|
+
iconPrefix: {
|
|
22
|
+
name: 'IconPrefix',
|
|
23
|
+
description:
|
|
24
|
+
"Préfixe pour l'icone dans l'encart - permet d'utiliser une variation de l'icone font awesome différente de celle par défaut.",
|
|
25
|
+
table: { defaultValue: { summary: 'fas' } },
|
|
26
|
+
control: { type: 'select' },
|
|
27
|
+
options: ['far', 'fas'],
|
|
28
|
+
},
|
|
29
|
+
value: {
|
|
30
|
+
name: 'Value',
|
|
31
|
+
description: 'Contenu principal',
|
|
32
|
+
},
|
|
33
|
+
info: {
|
|
34
|
+
name: 'Info',
|
|
35
|
+
description: "Contenu de la bulle d'info",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
3
40
|
const Template = (args) => {
|
|
4
41
|
return {
|
|
5
42
|
template: hbs`
|
|
@@ -39,37 +76,3 @@ withIconPrefix.args = {
|
|
|
39
76
|
...Default.args,
|
|
40
77
|
iconPrefix: 'far',
|
|
41
78
|
};
|
|
42
|
-
|
|
43
|
-
export const argTypes = {
|
|
44
|
-
title: {
|
|
45
|
-
name: 'Title',
|
|
46
|
-
description: 'Titre de la carte',
|
|
47
|
-
},
|
|
48
|
-
color: {
|
|
49
|
-
name: 'Color',
|
|
50
|
-
description: "Couleur de l'icone",
|
|
51
|
-
table: { defaultValue: { summary: 'grey' } },
|
|
52
|
-
control: { type: 'select' },
|
|
53
|
-
options: ['grey', 'blue', 'green', 'purple'],
|
|
54
|
-
},
|
|
55
|
-
icon: {
|
|
56
|
-
name: 'Icon',
|
|
57
|
-
description: "Icone dans l'encart",
|
|
58
|
-
},
|
|
59
|
-
iconPrefix: {
|
|
60
|
-
name: 'IconPrefix',
|
|
61
|
-
description:
|
|
62
|
-
"Préfixe pour l'icone dans l'encart - permet d'utiliser une variation de l'icone font awesome différente de celle par défaut.",
|
|
63
|
-
table: { defaultValue: { summary: 'fas' } },
|
|
64
|
-
control: { type: 'select' },
|
|
65
|
-
options: ['far', 'fas'],
|
|
66
|
-
},
|
|
67
|
-
value: {
|
|
68
|
-
name: 'Value',
|
|
69
|
-
description: 'Contenu principal',
|
|
70
|
-
},
|
|
71
|
-
info: {
|
|
72
|
-
name: 'Info',
|
|
73
|
-
description: "Contenu de la bulle d'info",
|
|
74
|
-
},
|
|
75
|
-
};
|
|
@@ -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-input-code.stories.js';
|
|
4
4
|
|
|
5
|
-
<Meta
|
|
5
|
+
<Meta of={ComponentStories} />
|
|
6
6
|
|
|
7
7
|
# Pix Input Code
|
|
8
8
|
|
|
@@ -18,9 +18,7 @@ Le composant peut être numérique ou alphanumérique précisé avec la proprié
|
|
|
18
18
|
|
|
19
19
|
## Default
|
|
20
20
|
|
|
21
|
-
<
|
|
22
|
-
<Story name="Default" story={stories.Default} height={70} />
|
|
23
|
-
</Canvas>
|
|
21
|
+
<Story of={ComponentStories.Default} height={70} />
|
|
24
22
|
|
|
25
23
|
## Usage
|
|
26
24
|
|
|
@@ -32,4 +30,4 @@ email" @explanationOfUse="Détails d'utilisation du PixInputCode" @numInputs={{6
|
|
|
32
30
|
|
|
33
31
|
## Arguments
|
|
34
32
|
|
|
35
|
-
<
|
|
33
|
+
<ArgTypes story="Default" />
|
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/Inputs/Code',
|
|
5
|
+
argTypes: {
|
|
6
|
+
ariaLabel: {
|
|
7
|
+
name: 'ariaLabel',
|
|
8
|
+
description:
|
|
9
|
+
"L'aria-label de chaque champ. L'aria-label est automatiquement complété à la fin par ` <numero>`, où `<numero>` correspond à la position du champ dans le PixInputCode.",
|
|
10
|
+
type: { name: 'string', required: true },
|
|
11
|
+
},
|
|
12
|
+
legend: {
|
|
13
|
+
name: 'legend',
|
|
14
|
+
description:
|
|
15
|
+
"La description du composant. Ce champ n'est pas visible. Indiquer ce à quoi correspond votre PixInputCode.",
|
|
16
|
+
type: { name: 'string', required: true },
|
|
17
|
+
},
|
|
18
|
+
explanationOfUse: {
|
|
19
|
+
name: 'explanationOfUse',
|
|
20
|
+
description:
|
|
21
|
+
"Explication du fonctionnement des champs du PixInputCode. Ce champ n'est pas visible. Le texte par défaut est uniquement en Français. Veillez à donc le surchager avec vos traductions. Par ailleurs, le texte par défaut change selon le type du champ du PixInputCode",
|
|
22
|
+
type: { name: 'string', required: false },
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'string' },
|
|
25
|
+
defaultValue: {
|
|
26
|
+
summary:
|
|
27
|
+
'Pour se déplacer de champ en champ vous pouvez utiliser la tabulation ou bien les flèches gauche et droite de votre clavier. Pour remplir un champ vous pouvez utiliser des chiffres de 1 à 9 ou bien les flèches haut et bas de votre clavier pour incrémenter de 1 la valeur du champ.',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
inputType: {
|
|
32
|
+
name: 'inputType',
|
|
33
|
+
description: 'Le type de chaque champ : `number` ou `text`',
|
|
34
|
+
type: { name: 'string', required: false },
|
|
35
|
+
options: ['number', 'text'],
|
|
36
|
+
control: { type: 'select' },
|
|
37
|
+
table: {
|
|
38
|
+
defaultValue: { summary: 'number' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
numInputs: {
|
|
42
|
+
name: 'numInputs',
|
|
43
|
+
description: 'Le nombre de champ',
|
|
44
|
+
type: { name: 'number', required: false },
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: { summary: 6 },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
onAllInputsFilled: {
|
|
50
|
+
name: 'onAllInputsFilled',
|
|
51
|
+
description: 'Fonction appelée (avec le code en paramètre) une fois tous les champs remplis',
|
|
52
|
+
type: { required: false },
|
|
53
|
+
control: { disable: true },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
3
58
|
export const Template = (args) => {
|
|
4
59
|
return {
|
|
5
60
|
template: hbs`<PixInputCode
|
|
@@ -18,55 +73,3 @@ Default.args = {
|
|
|
18
73
|
ariaLabel: 'Champ',
|
|
19
74
|
legend: "Code de validation d'adresse e-mail",
|
|
20
75
|
};
|
|
21
|
-
|
|
22
|
-
export const argTypes = {
|
|
23
|
-
ariaLabel: {
|
|
24
|
-
name: 'ariaLabel',
|
|
25
|
-
description:
|
|
26
|
-
"L'aria-label de chaque champ. L'aria-label est automatiquement complété à la fin par ` <numero>`, où `<numero>` correspond à la position du champ dans le PixInputCode.",
|
|
27
|
-
type: { name: 'string', required: true },
|
|
28
|
-
},
|
|
29
|
-
legend: {
|
|
30
|
-
name: 'legend',
|
|
31
|
-
description:
|
|
32
|
-
"La description du composant. Ce champ n'est pas visible. Indiquer ce à quoi correspond votre PixInputCode.",
|
|
33
|
-
type: { name: 'string', required: true },
|
|
34
|
-
},
|
|
35
|
-
explanationOfUse: {
|
|
36
|
-
name: 'explanationOfUse',
|
|
37
|
-
description:
|
|
38
|
-
"Explication du fonctionnement des champs du PixInputCode. Ce champ n'est pas visible. Le texte par défaut est uniquement en Français. Veillez à donc le surchager avec vos traductions. Par ailleurs, le texte par défaut change selon le type du champ du PixInputCode",
|
|
39
|
-
type: { name: 'string', required: false },
|
|
40
|
-
table: {
|
|
41
|
-
type: { summary: 'string' },
|
|
42
|
-
defaultValue: {
|
|
43
|
-
summary:
|
|
44
|
-
'Pour se déplacer de champ en champ vous pouvez utiliser la tabulation ou bien les flèches gauche et droite de votre clavier. Pour remplir un champ vous pouvez utiliser des chiffres de 1 à 9 ou bien les flèches haut et bas de votre clavier pour incrémenter de 1 la valeur du champ.',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
inputType: {
|
|
49
|
-
name: 'inputType',
|
|
50
|
-
description: 'Le type de chaque champ : `number` ou `text`',
|
|
51
|
-
type: { name: 'string', required: false },
|
|
52
|
-
options: ['number', 'text'],
|
|
53
|
-
control: { type: 'select' },
|
|
54
|
-
table: {
|
|
55
|
-
defaultValue: { summary: 'number' },
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
numInputs: {
|
|
59
|
-
name: 'numInputs',
|
|
60
|
-
description: 'Le nombre de champ',
|
|
61
|
-
type: { name: 'number', required: false },
|
|
62
|
-
table: {
|
|
63
|
-
defaultValue: { summary: 6 },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
onAllInputsFilled: {
|
|
67
|
-
name: 'onAllInputsFilled',
|
|
68
|
-
description: 'Fonction appelée (avec le code en paramètre) une fois tous les champs remplis',
|
|
69
|
-
type: { required: false },
|
|
70
|
-
control: { disable: true },
|
|
71
|
-
},
|
|
72
|
-
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-input-password.stories';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<Meta title="Form/Inputs/Password" component="PixInputPassword" argTypes={stories.argTypes} />
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
6
5
|
|
|
7
6
|
# Pix Input Password
|
|
8
7
|
|
|
@@ -22,39 +21,39 @@ Si vous utilisez le `PixInputPassword` sans label alors il faut renseigner le pa
|
|
|
22
21
|
|
|
23
22
|
## Default
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
|
|
25
|
+
<Story of={ComponentStories.Default} height={100} />
|
|
26
|
+
|
|
28
27
|
|
|
29
28
|
## With label and information
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
|
|
31
|
+
<Story of={ComponentStories.withLabelAndInformation} height={110} />
|
|
32
|
+
|
|
34
33
|
|
|
35
34
|
## Error state (with error message)
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
|
|
37
|
+
<Story of={ComponentStories.errorState} height={110} />
|
|
38
|
+
|
|
40
39
|
|
|
41
40
|
## Success state
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
|
|
43
|
+
<Story of={ComponentStories.successState} height={100} />
|
|
44
|
+
|
|
46
45
|
|
|
47
46
|
## With prefix
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
|
|
49
|
+
<Story of={ComponentStories.withPrefix} height={100} />
|
|
50
|
+
|
|
52
51
|
|
|
53
52
|
## With required label
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
|
|
55
|
+
<Story of={ComponentStories.withRequiredLabel} height={100} />
|
|
56
|
+
|
|
58
57
|
|
|
59
58
|
## Usage
|
|
60
59
|
|
|
@@ -73,4 +72,4 @@ Si vous utilisez le `PixInputPassword` sans label alors il faut renseigner le pa
|
|
|
73
72
|
|
|
74
73
|
## Arguments
|
|
75
74
|
|
|
76
|
-
<
|
|
75
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/Inputs/Password',
|
|
5
|
+
argTypes: {
|
|
6
|
+
id: {
|
|
7
|
+
name: 'id',
|
|
8
|
+
description: 'Identifiant du champ permettant de lui attacher un label',
|
|
9
|
+
type: { name: 'string', required: true },
|
|
10
|
+
},
|
|
11
|
+
value: {
|
|
12
|
+
name: 'value',
|
|
13
|
+
description: "Valeur de l'input",
|
|
14
|
+
type: { name: 'string', required: false },
|
|
15
|
+
},
|
|
16
|
+
label: {
|
|
17
|
+
name: 'label',
|
|
18
|
+
description: "Label de l'input. Requis si ariaLabel n'est pas définit.",
|
|
19
|
+
type: { name: 'string', required: true },
|
|
20
|
+
},
|
|
21
|
+
ariaLabel: {
|
|
22
|
+
name: 'ariaLabel',
|
|
23
|
+
description: "L'action du champ, pour l'accessibilité. Requis si label n'est pas définit.",
|
|
24
|
+
type: { name: 'string', required: true },
|
|
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
|
+
prefix: {
|
|
46
|
+
name: 'prefix',
|
|
47
|
+
description: 'Affiche un préfixe avant la zone de saisie du champ',
|
|
48
|
+
type: { name: 'string', required: false },
|
|
49
|
+
},
|
|
50
|
+
requiredLabel: {
|
|
51
|
+
name: 'requiredLabel',
|
|
52
|
+
description:
|
|
53
|
+
'Label indiquant que le champ est requis, le paramètre @label devient obligatoire avec ce paramètre.',
|
|
54
|
+
type: { name: 'string', required: false },
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: 'string' },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const Template = (args) => {
|
|
4
63
|
return {
|
|
5
64
|
template: hbs`<PixInputPassword
|
|
6
65
|
@ariaLabel={{this.ariaLabel}}
|
|
@@ -57,59 +116,3 @@ withRequiredLabel.args = {
|
|
|
57
116
|
label: 'Mot de passe',
|
|
58
117
|
requiredLabel: 'Champ obligatoire',
|
|
59
118
|
};
|
|
60
|
-
|
|
61
|
-
export const argTypes = {
|
|
62
|
-
id: {
|
|
63
|
-
name: 'id',
|
|
64
|
-
description: 'Identifiant du champ permettant de lui attacher un label',
|
|
65
|
-
type: { name: 'string', required: true },
|
|
66
|
-
},
|
|
67
|
-
value: {
|
|
68
|
-
name: 'value',
|
|
69
|
-
description: "Valeur de l'input",
|
|
70
|
-
type: { name: 'string', required: false },
|
|
71
|
-
},
|
|
72
|
-
label: {
|
|
73
|
-
name: 'label',
|
|
74
|
-
description: "Label de l'input. Requis si ariaLabel n'est pas définit.",
|
|
75
|
-
type: { name: 'string', required: true },
|
|
76
|
-
},
|
|
77
|
-
ariaLabel: {
|
|
78
|
-
name: 'ariaLabel',
|
|
79
|
-
description: "L'action du champ, pour l'accessibilité. Requis si label n'est pas définit.",
|
|
80
|
-
type: { name: 'string', required: true },
|
|
81
|
-
},
|
|
82
|
-
information: {
|
|
83
|
-
name: 'information',
|
|
84
|
-
description: 'Un descriptif complétant le label',
|
|
85
|
-
type: { name: 'string', required: false },
|
|
86
|
-
},
|
|
87
|
-
validationStatus: {
|
|
88
|
-
name: 'validationStatus',
|
|
89
|
-
description:
|
|
90
|
-
"Définit l'état du champ, neutre par défaut, en succès ou erreur selon l'action de l'utilisateur",
|
|
91
|
-
type: { name: 'string', required: false },
|
|
92
|
-
options: ['default', 'success', 'error'],
|
|
93
|
-
control: { type: 'select' },
|
|
94
|
-
},
|
|
95
|
-
errorMessage: {
|
|
96
|
-
name: 'errorMessage',
|
|
97
|
-
description:
|
|
98
|
-
"Affiche le message d'erreur donné. Doit s'accompagner du paramètre validationStatus en 'error'",
|
|
99
|
-
type: { name: 'string', required: false },
|
|
100
|
-
},
|
|
101
|
-
prefix: {
|
|
102
|
-
name: 'prefix',
|
|
103
|
-
description: 'Affiche un préfixe avant la zone de saisie du champ',
|
|
104
|
-
type: { name: 'string', required: false },
|
|
105
|
-
},
|
|
106
|
-
requiredLabel: {
|
|
107
|
-
name: 'requiredLabel',
|
|
108
|
-
description:
|
|
109
|
-
'Label indiquant que le champ est requis, le paramètre @label devient obligatoire avec ce paramètre.',
|
|
110
|
-
type: { name: 'string', required: false },
|
|
111
|
-
table: {
|
|
112
|
-
type: { summary: 'string' },
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
};
|