@1024pix/pix-ui 37.0.0 → 38.1.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 +1 -1
- package/.storybook/main.js +7 -5
- package/.storybook/preview.js +35 -32
- package/CHANGELOG.md +20 -0
- package/addon/styles/_pix-button-base.scss +1 -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 +17 -20
- 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-progress-gauge.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# PixProgressGauge
|
|
7
7
|
|
|
@@ -11,17 +11,13 @@ Permet d'afficher un barre de progression sur un barème de 100%. Des paramètre
|
|
|
11
11
|
|
|
12
12
|
> **⚠️** **Il est nécessaire d'avoir un `label` pour rendre le composant accessible !**
|
|
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
|
## Dark mode
|
|
19
17
|
|
|
20
18
|
Démonstration d'une barre de progression blanche en dark mode avec un sous titre.
|
|
21
19
|
|
|
22
|
-
<
|
|
23
|
-
<Story name="Dark" story={stories.darkModeProgressGauge} height={100} />
|
|
24
|
-
</Canvas>
|
|
20
|
+
<Story of={ComponentStories.darkModeProgressGauge} height={100} />
|
|
25
21
|
|
|
26
22
|
## Usage
|
|
27
23
|
|
|
@@ -37,4 +33,4 @@ Démonstration d'une barre de progression blanche en dark mode avec un sous titr
|
|
|
37
33
|
|
|
38
34
|
## Arguments
|
|
39
35
|
|
|
40
|
-
<
|
|
36
|
+
<ArgTypes />
|
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Others/Progress Gauge',
|
|
5
|
+
argTypes: {
|
|
6
|
+
value: {
|
|
7
|
+
name: 'value',
|
|
8
|
+
description: 'Valeur atteinte sur 100',
|
|
9
|
+
type: { name: 'number', required: true },
|
|
10
|
+
table: { defaultValue: { summary: null } },
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
name: 'label',
|
|
14
|
+
description:
|
|
15
|
+
"Afficher un label caché permettant d'expliciter le contexte de la jauge de progression",
|
|
16
|
+
type: { name: 'string', required: true },
|
|
17
|
+
table: { defaultValue: { summary: 'null' } },
|
|
18
|
+
},
|
|
19
|
+
themeMode: {
|
|
20
|
+
name: 'themeMode',
|
|
21
|
+
description:
|
|
22
|
+
"Permet d'indiquer si le thème de la barre de progression est en dark mode ou light mode. Modifie la couleur de fond de la barre de progression. Peut prendre les valeurs `light` ou `dark`",
|
|
23
|
+
type: { name: 'string', required: false },
|
|
24
|
+
table: { defaultValue: { summary: 'light' } },
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
options: ['dark', 'light'],
|
|
27
|
+
},
|
|
28
|
+
color: {
|
|
29
|
+
name: 'color',
|
|
30
|
+
description:
|
|
31
|
+
"Modifie la couleur du contenu de la barre de progression. Peut prendre les valeurs `blue`, 'green' ou `purple`",
|
|
32
|
+
type: { name: 'string', required: false },
|
|
33
|
+
table: { defaultValue: { summary: 'blue' } },
|
|
34
|
+
control: { type: 'select' },
|
|
35
|
+
options: ['blue', 'green', 'purple'],
|
|
36
|
+
},
|
|
37
|
+
subtitle: {
|
|
38
|
+
name: 'subtitle',
|
|
39
|
+
description: 'Afficher un sous-titre sous la barre de progression',
|
|
40
|
+
type: { name: 'string', required: false },
|
|
41
|
+
table: { defaultValue: { summary: 'null' } },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
3
46
|
export const Default = (args) => {
|
|
4
47
|
return {
|
|
5
48
|
template: hbs`<PixProgressGauge
|
|
@@ -37,43 +80,3 @@ darkModeProgressGauge.args = {
|
|
|
37
80
|
themeMode: 'dark',
|
|
38
81
|
subtitle: 'Avancement',
|
|
39
82
|
};
|
|
40
|
-
|
|
41
|
-
export const argTypes = {
|
|
42
|
-
value: {
|
|
43
|
-
name: 'value',
|
|
44
|
-
description: 'Valeur atteinte sur 100',
|
|
45
|
-
type: { name: 'number', required: true },
|
|
46
|
-
table: { defaultValue: { summary: null } },
|
|
47
|
-
},
|
|
48
|
-
label: {
|
|
49
|
-
name: 'label',
|
|
50
|
-
description:
|
|
51
|
-
"Afficher un label caché permettant d'expliciter le contexte de la jauge de progression",
|
|
52
|
-
type: { name: 'string', required: true },
|
|
53
|
-
table: { defaultValue: { summary: 'null' } },
|
|
54
|
-
},
|
|
55
|
-
themeMode: {
|
|
56
|
-
name: 'themeMode',
|
|
57
|
-
description:
|
|
58
|
-
"Permet d'indiquer si le thème de la barre de progression est en dark mode ou light mode. Modifie la couleur de fond de la barre de progression. Peut prendre les valeurs `light` ou `dark`",
|
|
59
|
-
type: { name: 'string', required: false },
|
|
60
|
-
table: { defaultValue: { summary: 'light' } },
|
|
61
|
-
control: { type: 'select' },
|
|
62
|
-
options: ['dark', 'light'],
|
|
63
|
-
},
|
|
64
|
-
color: {
|
|
65
|
-
name: 'color',
|
|
66
|
-
description:
|
|
67
|
-
"Modifie la couleur du contenu de la barre de progression. Peut prendre les valeurs `blue`, 'green' ou `purple`",
|
|
68
|
-
type: { name: 'string', required: false },
|
|
69
|
-
table: { defaultValue: { summary: 'blue' } },
|
|
70
|
-
control: { type: 'select' },
|
|
71
|
-
options: ['blue', 'green', 'purple'],
|
|
72
|
-
},
|
|
73
|
-
subtitle: {
|
|
74
|
-
name: 'subtitle',
|
|
75
|
-
description: 'Afficher un sous-titre sous la barre de progression',
|
|
76
|
-
type: { name: 'string', required: false },
|
|
77
|
-
table: { defaultValue: { summary: 'null' } },
|
|
78
|
-
},
|
|
79
|
-
};
|
|
@@ -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-radio-button.stories.js';
|
|
4
4
|
|
|
5
|
-
<Meta
|
|
5
|
+
<Meta of={ComponentStories} />
|
|
6
6
|
|
|
7
7
|
# Pix Radio Button
|
|
8
8
|
|
|
@@ -13,28 +13,26 @@ Il est préférable de ne pas sélectionner d’option par défaut pour que le c
|
|
|
13
13
|
|
|
14
14
|
## Default
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</Canvas>
|
|
16
|
+
<Story of={ComponentStories.Default} height={60} />
|
|
17
|
+
|
|
18
|
+
<Story of={ComponentStories.defaultChecked} height={60} />
|
|
20
19
|
|
|
21
20
|
### Liste de radios
|
|
22
21
|
|
|
23
22
|
Puisqu'on ne souhaite en aucune avoir un input radio unique, il est déjà prévu l'espacement vertical avec un input radio suivant.<br/>
|
|
24
23
|
Pour les considérer comme un seul groupe d'inputs, **il est nécessaire qu'ils aient chacun un attribut `name` avec une valeur commune**.
|
|
25
24
|
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
</Canvas>
|
|
25
|
+
<Story of={ComponentStories.multiple} height={140} />
|
|
26
|
+
|
|
29
27
|
|
|
30
28
|
## Disabled
|
|
31
29
|
|
|
32
30
|
État inactif du bouton radio.
|
|
33
31
|
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
<Story of={ComponentStories.isDisabled} height={60} />
|
|
33
|
+
|
|
34
|
+
<Story of={ComponentStories.disabledChecked} height={60} />
|
|
35
|
+
|
|
38
36
|
|
|
39
37
|
## Usage
|
|
40
38
|
|
|
@@ -44,4 +42,4 @@ Pour les considérer comme un seul groupe d'inputs, **il est nécessaire qu'ils
|
|
|
44
42
|
|
|
45
43
|
## Arguments
|
|
46
44
|
|
|
47
|
-
<
|
|
45
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/Radio Button',
|
|
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 du bouton radio',
|
|
15
|
+
type: { name: 'string', required: true },
|
|
16
|
+
},
|
|
17
|
+
class: {
|
|
18
|
+
name: 'class',
|
|
19
|
+
description: "Permet d'ajouter une classe CSS au parent du composant.",
|
|
20
|
+
type: { name: 'string' },
|
|
21
|
+
},
|
|
22
|
+
value: {
|
|
23
|
+
name: 'value',
|
|
24
|
+
description: "Valeur permettant d'identifier l'option sélectionnée",
|
|
25
|
+
type: { name: 'string', required: false },
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
name: 'disabled',
|
|
29
|
+
description: 'Pour désactiver/activer le bouton radio',
|
|
30
|
+
type: { name: 'boolean', required: false },
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: 'false' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
3
38
|
/* Default stories */
|
|
4
39
|
const Template = (args) => {
|
|
5
40
|
return {
|
|
@@ -61,35 +96,3 @@ export const multiple = multipleTemplate.bind({});
|
|
|
61
96
|
multiple.args = {
|
|
62
97
|
...Default.args,
|
|
63
98
|
};
|
|
64
|
-
|
|
65
|
-
export const argTypes = {
|
|
66
|
-
id: {
|
|
67
|
-
name: 'id',
|
|
68
|
-
description:
|
|
69
|
-
'Identifiant du champ permettant de lui attacher un label. Généré automatiquement si non renseigné.',
|
|
70
|
-
type: { name: 'string' },
|
|
71
|
-
},
|
|
72
|
-
label: {
|
|
73
|
-
name: 'label',
|
|
74
|
-
description: 'Le label du bouton radio',
|
|
75
|
-
type: { name: 'string', required: true },
|
|
76
|
-
},
|
|
77
|
-
class: {
|
|
78
|
-
name: 'class',
|
|
79
|
-
description: "Permet d'ajouter une classe CSS au parent du composant.",
|
|
80
|
-
type: { name: 'string' },
|
|
81
|
-
},
|
|
82
|
-
value: {
|
|
83
|
-
name: 'value',
|
|
84
|
-
description: "Valeur permettant d'identifier l'option sélectionnée",
|
|
85
|
-
type: { name: 'string', required: false },
|
|
86
|
-
},
|
|
87
|
-
disabled: {
|
|
88
|
-
name: 'disabled',
|
|
89
|
-
description: 'Pour désactiver/activer le bouton radio',
|
|
90
|
-
type: { name: 'boolean', required: false },
|
|
91
|
-
table: {
|
|
92
|
-
defaultValue: { summary: 'false' },
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-return-to.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
|
+
|
|
6
|
+
# Pix Return To
|
|
7
|
+
|
|
8
|
+
Le `ReturnTo` est un lien de retour vers uneOpixRe page précédente.
|
|
9
|
+
|
|
10
|
+
> Il est nécessaire de passer une @route au composant.
|
|
11
|
+
|
|
12
|
+
> Il est possible d'afficher uniquement l'icone flèche en omettant de mettre du contenu enfant dans la balise.
|
|
13
|
+
|
|
14
|
+
Lien sans texte
|
|
15
|
+
|
|
16
|
+
<Story of={ComponentStories.returnTo} height={60} />
|
|
17
|
+
|
|
18
|
+
Lien avec texte
|
|
19
|
+
|
|
20
|
+
<Story of={ComponentStories.returnToWithText} height={60} />
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
Liens avec texte
|
|
26
|
+
<PixReturnTo @route="profile"> Un lien de retour </PixReturnTo>
|
|
27
|
+
|
|
28
|
+
Liens sans texte
|
|
29
|
+
<PixReturnTo @route="profile" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Arguments
|
|
33
|
+
|
|
34
|
+
<ArgTypes />
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Basics/Return To',
|
|
5
|
+
render: (args) => ({
|
|
6
|
+
template: hbs`<PixReturnTo @route='profile' @shade={{this.shade}}>{{this.content}}</PixReturnTo>`,
|
|
6
7
|
context: args,
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
}),
|
|
9
|
+
argTypes: {
|
|
10
|
+
route: {
|
|
11
|
+
name: 'route',
|
|
12
|
+
description: 'Route de redirection',
|
|
13
|
+
type: { name: 'string', required: true },
|
|
14
|
+
},
|
|
15
|
+
model: {
|
|
16
|
+
name: 'model',
|
|
17
|
+
description: 'Model Ember',
|
|
18
|
+
type: { required: false },
|
|
19
|
+
},
|
|
20
|
+
shade: {
|
|
21
|
+
name: 'shade',
|
|
22
|
+
description: 'Couleur du lien',
|
|
23
|
+
type: { name: 'string', required: false },
|
|
24
|
+
table: { defaultValue: { summary: 'black' } },
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
options: ['white', 'black', 'blue'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
11
29
|
};
|
|
12
30
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</PixReturnTo>`,
|
|
18
|
-
context: args,
|
|
19
|
-
};
|
|
31
|
+
export const returnTo = {
|
|
32
|
+
args: {
|
|
33
|
+
shade: 'blue',
|
|
34
|
+
},
|
|
20
35
|
};
|
|
21
36
|
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
description: 'Route de redirection',
|
|
26
|
-
type: { name: 'string', required: true },
|
|
27
|
-
},
|
|
28
|
-
model: {
|
|
29
|
-
name: 'model',
|
|
30
|
-
description: 'Model Ember',
|
|
31
|
-
type: { required: false },
|
|
32
|
-
},
|
|
33
|
-
shade: {
|
|
34
|
-
name: 'shade',
|
|
35
|
-
description: 'Couleur du lien',
|
|
36
|
-
type: { name: 'string', required: false },
|
|
37
|
-
table: { defaultValue: { summary: 'black' } },
|
|
38
|
-
control: { type: 'select' },
|
|
39
|
-
options: ['white', 'black', 'blue'],
|
|
37
|
+
export const returnToWithText = {
|
|
38
|
+
args: {
|
|
39
|
+
content: 'Retour vers mon profil',
|
|
40
40
|
},
|
|
41
41
|
};
|
|
@@ -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-search-input.stories.js';
|
|
4
4
|
|
|
5
|
-
<Meta
|
|
5
|
+
<Meta of={ComponentStories} />
|
|
6
6
|
|
|
7
7
|
# PixSearchInput
|
|
8
8
|
|
|
@@ -12,9 +12,7 @@ A la différence d'un [PixSelect](?path=/docs/form-select--default#withsearch) s
|
|
|
12
12
|
|
|
13
13
|
Ce composant permet d'appeler la fonction triggerFiltering passée en paramètre selon un debounce (temps d'attente avant le prochain appel) fournis.
|
|
14
14
|
|
|
15
|
-
<
|
|
16
|
-
<Story name="Default" story={stories.Default} height={80} />
|
|
17
|
-
</Canvas>
|
|
15
|
+
<Story of={ComponentStories.Default} height={80} />
|
|
18
16
|
|
|
19
17
|
## Usage
|
|
20
18
|
|
|
@@ -31,4 +29,4 @@ Ce composant permet d'appeler la fonction triggerFiltering passée en paramètre
|
|
|
31
29
|
|
|
32
30
|
## Arguments
|
|
33
31
|
|
|
34
|
-
<
|
|
32
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
3
|
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Others/SearchInput',
|
|
6
|
+
argTypes: {
|
|
7
|
+
id: {
|
|
8
|
+
name: 'id',
|
|
9
|
+
description:
|
|
10
|
+
"Un identifiant unique placé sur le composant. Si l'id n'est pas fourni un id par défaut sera mis.",
|
|
11
|
+
type: { name: 'string', required: false },
|
|
12
|
+
table: {
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
label: {
|
|
17
|
+
name: 'label',
|
|
18
|
+
description:
|
|
19
|
+
"Label du champ. ** ⚠️ Le `label` est obligatoire si l'`ariaLabel` n'est pas donné. ⚠️ **",
|
|
20
|
+
type: { name: 'string', required: false },
|
|
21
|
+
table: {
|
|
22
|
+
type: { summary: 'string' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
ariaLabel: {
|
|
26
|
+
name: 'ariaLabel',
|
|
27
|
+
description:
|
|
28
|
+
"Label du champ. ** ⚠️ L'`ariaLabel` est obligatoire si le `label` n'est pas donné. ⚠️ **",
|
|
29
|
+
type: { name: 'string', required: false },
|
|
30
|
+
table: {
|
|
31
|
+
type: { summary: 'string' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
placeholder: {
|
|
35
|
+
name: 'placeholder',
|
|
36
|
+
description: 'Placeholder du champ.',
|
|
37
|
+
type: { name: 'string', required: false },
|
|
38
|
+
table: {
|
|
39
|
+
type: { summary: 'string' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
debounceTimeInMs: {
|
|
43
|
+
name: 'debounceTimeInMs',
|
|
44
|
+
description:
|
|
45
|
+
"Temps d'attente en millisecondes entre 2 appels à la fonction triggerFiltering.",
|
|
46
|
+
type: { name: 'string', required: true },
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'string' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
triggerFiltering: {
|
|
52
|
+
name: 'triggerFiltering',
|
|
53
|
+
description: 'Fonction appelée quand le champ est modifié.',
|
|
54
|
+
type: { required: true },
|
|
55
|
+
control: { disable: true },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
4
60
|
export const Template = (args) => {
|
|
5
61
|
return {
|
|
6
62
|
template: hbs`
|
|
@@ -26,55 +82,3 @@ Default.args = {
|
|
|
26
82
|
debounceTimeInMs: 500,
|
|
27
83
|
triggerFiltering: action('triggerFiltering'),
|
|
28
84
|
};
|
|
29
|
-
|
|
30
|
-
export const argTypes = {
|
|
31
|
-
id: {
|
|
32
|
-
name: 'id',
|
|
33
|
-
description:
|
|
34
|
-
"Un identifiant unique placé sur le composant. Si l'id n'est pas fourni un id par défaut sera mis.",
|
|
35
|
-
type: { name: 'string', required: false },
|
|
36
|
-
table: {
|
|
37
|
-
type: { summary: 'string' },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
label: {
|
|
41
|
-
name: 'label',
|
|
42
|
-
description:
|
|
43
|
-
"Label du champ. ** ⚠️ Le `label` est obligatoire si l'`ariaLabel` n'est pas donné. ⚠️ **",
|
|
44
|
-
type: { name: 'string', required: false },
|
|
45
|
-
table: {
|
|
46
|
-
type: { summary: 'string' },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
ariaLabel: {
|
|
50
|
-
name: 'ariaLabel',
|
|
51
|
-
description:
|
|
52
|
-
"Label du champ. ** ⚠️ L'`ariaLabel` est obligatoire si le `label` n'est pas donné. ⚠️ **",
|
|
53
|
-
type: { name: 'string', required: false },
|
|
54
|
-
table: {
|
|
55
|
-
type: { summary: 'string' },
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
placeholder: {
|
|
59
|
-
name: 'placeholder',
|
|
60
|
-
description: 'Placeholder du champ.',
|
|
61
|
-
type: { name: 'string', required: false },
|
|
62
|
-
table: {
|
|
63
|
-
type: { summary: 'string' },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
debounceTimeInMs: {
|
|
67
|
-
name: 'debounceTimeInMs',
|
|
68
|
-
description: "Temps d'attente en millisecondes entre 2 appels à la fonction triggerFiltering.",
|
|
69
|
-
type: { name: 'string', required: true },
|
|
70
|
-
table: {
|
|
71
|
-
type: { summary: 'string' },
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
triggerFiltering: {
|
|
75
|
-
name: 'triggerFiltering',
|
|
76
|
-
description: 'Fonction appelée quand le champ est modifié.',
|
|
77
|
-
type: { required: true },
|
|
78
|
-
control: { disable: true },
|
|
79
|
-
},
|
|
80
|
-
};
|
|
@@ -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-select.stories.js';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
4
|
+
<Meta of={ComponentStories} />
|
|
5
5
|
|
|
6
6
|
# Pix Select
|
|
7
7
|
|
|
@@ -19,53 +19,37 @@ Les options sont représentées par un tableau d'objet contenant les propriété
|
|
|
19
19
|
|
|
20
20
|
## Default
|
|
21
21
|
|
|
22
|
-
<
|
|
23
|
-
<Story name="Default" story={stories.Default} height={200} />
|
|
24
|
-
</Canvas>
|
|
22
|
+
<Story of={ComponentStories.Default} height={200} />
|
|
25
23
|
|
|
26
24
|
## WithId
|
|
27
25
|
|
|
28
|
-
<
|
|
29
|
-
<Story name="WithId" story={stories.WithId} height={200} />
|
|
30
|
-
</Canvas>
|
|
26
|
+
<Story of={ComponentStories.WithId} height={200} />
|
|
31
27
|
|
|
32
28
|
## WithCustomClass
|
|
33
29
|
|
|
34
|
-
<
|
|
35
|
-
<Story name="WithCustomClass" story={stories.WithCustomClass} height={200} />
|
|
36
|
-
</Canvas>
|
|
30
|
+
<Story of={ComponentStories.WithCustomClass} height={200} />
|
|
37
31
|
|
|
38
32
|
## WithCategories
|
|
39
33
|
|
|
40
|
-
<
|
|
41
|
-
<Story name="Select with categories" story={stories.WithCategories} height={200} />
|
|
42
|
-
</Canvas>
|
|
34
|
+
<Story of={ComponentStories.WithCategories} height={200} />
|
|
43
35
|
|
|
44
36
|
## WithSearch
|
|
45
37
|
|
|
46
|
-
<
|
|
47
|
-
<Story name="Select with search" story={stories.WithSearch} height={200} />
|
|
48
|
-
</Canvas>
|
|
38
|
+
<Story of={ComponentStories.WithSearch} height={200} />
|
|
49
39
|
|
|
50
40
|
## WithCategoriesAndSearch
|
|
51
41
|
|
|
52
|
-
<
|
|
53
|
-
<Story name="WithCategoriesAndSearch" story={stories.WithCategoriesAndSearch} height={200} />
|
|
54
|
-
</Canvas>
|
|
42
|
+
<Story of={ComponentStories.WithCategoriesAndSearch} height={200} />
|
|
55
43
|
|
|
56
44
|
## WithDropDownAtTheTop
|
|
57
45
|
|
|
58
46
|
Ici nous avons forcé le placement de la dropdown en haut du select mais sachez que ce placement se fait automatiquement par défaut.
|
|
59
47
|
|
|
60
|
-
<
|
|
61
|
-
<Story name="WithDropDownAtTheTop" story={stories.WithDropDownAtTheTop} />
|
|
62
|
-
</Canvas>
|
|
48
|
+
<Story of={ComponentStories.WithDropDownAtTheTop} />
|
|
63
49
|
|
|
64
50
|
## WithIcon
|
|
65
51
|
|
|
66
|
-
<
|
|
67
|
-
<Story name="WithIcon" story={stories.WithIcon} />
|
|
68
|
-
</Canvas>
|
|
52
|
+
<Story of={ComponentStories.WithIcon} />
|
|
69
53
|
|
|
70
54
|
## Usage
|
|
71
55
|
|
|
@@ -92,4 +76,4 @@ Ici nous avons forcé le placement de la dropdown en haut du select mais sachez
|
|
|
92
76
|
|
|
93
77
|
## Arguments
|
|
94
78
|
|
|
95
|
-
<
|
|
79
|
+
<ArgTypes of={ComponentStories} />
|