@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,6 +1,142 @@
|
|
|
1
1
|
import { hbs } from 'ember-cli-htmlbars';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
3
|
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Form/Filterable and searchable select',
|
|
6
|
+
argTypes: {
|
|
7
|
+
label: {
|
|
8
|
+
name: 'label',
|
|
9
|
+
description: 'Label du composant global.',
|
|
10
|
+
type: { name: 'string', required: true },
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: 'string' },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
subLabel: {
|
|
16
|
+
name: 'subLabel',
|
|
17
|
+
description: 'Sous Label du composant global qui donne une description.',
|
|
18
|
+
type: { name: 'string', required: false },
|
|
19
|
+
table: {
|
|
20
|
+
type: { summary: 'string' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
options: {
|
|
24
|
+
name: 'options',
|
|
25
|
+
description:
|
|
26
|
+
'Les options sont représentées par un tableau d‘objet contenant les propriétés ``value``, ``label`` et ``category``. Ce dernier étant optionnel.',
|
|
27
|
+
type: { name: 'array', required: true },
|
|
28
|
+
},
|
|
29
|
+
value: {
|
|
30
|
+
name: 'value',
|
|
31
|
+
description: 'Option sélectionnée',
|
|
32
|
+
options: ['1', '2', '3', '4', '5', '6'],
|
|
33
|
+
control: { type: 'select' },
|
|
34
|
+
type: { name: 'string', required: false },
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: 'string' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
onChange: {
|
|
40
|
+
name: 'onChange',
|
|
41
|
+
description: 'Fonction à appeler quand une option est sélectionnée.',
|
|
42
|
+
type: { required: true },
|
|
43
|
+
control: { disable: true },
|
|
44
|
+
},
|
|
45
|
+
isSearchable: {
|
|
46
|
+
name: 'isSearchable',
|
|
47
|
+
description: 'Rend le champ du select cherchable',
|
|
48
|
+
control: { type: 'boolean' },
|
|
49
|
+
type: { name: 'boolean', required: false },
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'boolean' },
|
|
52
|
+
defaultValue: { summary: false },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
screenReaderOnly: {
|
|
56
|
+
name: 'screenReaderOnly',
|
|
57
|
+
description: "Permet de rendre le label lisible uniquement par les lecteurs d'écran",
|
|
58
|
+
control: { type: 'boolean' },
|
|
59
|
+
type: { name: 'boolean', required: false },
|
|
60
|
+
table: {
|
|
61
|
+
type: { summary: 'boolean' },
|
|
62
|
+
defaultValue: { summary: false },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
placeholder: {
|
|
66
|
+
name: 'placeholder',
|
|
67
|
+
description: "Placeholder du select. Il sert aussi de label pour l'option par défaut",
|
|
68
|
+
type: { name: 'string', required: true },
|
|
69
|
+
table: {
|
|
70
|
+
type: { summary: 'string' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
hideDefaultOption: {
|
|
74
|
+
name: 'hideDefaultOption',
|
|
75
|
+
description: "Cache l'option par défaut du select",
|
|
76
|
+
type: { name: 'boolean', required: false },
|
|
77
|
+
table: {
|
|
78
|
+
type: { summary: 'boolean' },
|
|
79
|
+
defaultValue: { summary: false },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
searchLabel: {
|
|
83
|
+
name: 'searchLabel',
|
|
84
|
+
description:
|
|
85
|
+
'Label de la recherche dans le menu déroulant du select. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**',
|
|
86
|
+
type: { name: 'string', required: false },
|
|
87
|
+
table: {
|
|
88
|
+
type: { summary: 'string' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
searchPlaceholder: {
|
|
92
|
+
name: 'searchPlaceholder',
|
|
93
|
+
description:
|
|
94
|
+
'Placeholder de la recherche dans le menu déroulant du select. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**',
|
|
95
|
+
type: { name: 'string', required: false },
|
|
96
|
+
table: {
|
|
97
|
+
type: { summary: 'string' },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
emptySearchMessage: {
|
|
101
|
+
name: 'emptySearchMessage',
|
|
102
|
+
description:
|
|
103
|
+
"Message affiché si la recherche dans le select ne retourne pas d'options. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**",
|
|
104
|
+
type: { name: 'string', required: false },
|
|
105
|
+
table: {
|
|
106
|
+
type: { summary: 'string' },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
requiredText: {
|
|
110
|
+
name: 'requiredText',
|
|
111
|
+
description: "Affiche l'astérisque au label et ajoute sa signification",
|
|
112
|
+
type: { name: 'string', required: false },
|
|
113
|
+
table: {
|
|
114
|
+
type: { summary: 'string' },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
errorMessage: {
|
|
118
|
+
name: 'errorMessage',
|
|
119
|
+
description: 'Message affiché si une erreur survient',
|
|
120
|
+
type: { name: 'string', required: false },
|
|
121
|
+
table: {
|
|
122
|
+
type: { summary: 'string' },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
categoriesPlaceholder: {
|
|
126
|
+
name: 'categoriesPlaceholder',
|
|
127
|
+
description:
|
|
128
|
+
'Pour le filtre de categories, cela rempli le contenu interne du composant, `categoriesPlaceholder` pour `isSearchable` `true`, sinon rawContent du `button`',
|
|
129
|
+
type: { name: 'string', required: true },
|
|
130
|
+
},
|
|
131
|
+
categoriesLabel: {
|
|
132
|
+
name: 'categoriesLabel',
|
|
133
|
+
description:
|
|
134
|
+
"Pour le composant de filtre sur les catégories, cela donne un label au champ qui sera celui vocalisé par le lecteur d'écran",
|
|
135
|
+
type: { name: 'string', required: true },
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
4
140
|
const Template = (args) => {
|
|
5
141
|
return {
|
|
6
142
|
template: hbs`
|
|
@@ -53,136 +189,3 @@ WithLabelsOnlyForScreenReaders.args = {
|
|
|
53
189
|
screenReaderOnly: true,
|
|
54
190
|
isSearchable: true,
|
|
55
191
|
};
|
|
56
|
-
|
|
57
|
-
export const argTypes = {
|
|
58
|
-
label: {
|
|
59
|
-
name: 'label',
|
|
60
|
-
description: 'Label du composant global.',
|
|
61
|
-
type: { name: 'string', required: true },
|
|
62
|
-
table: {
|
|
63
|
-
type: { summary: 'string' },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
subLabel: {
|
|
67
|
-
name: 'subLabel',
|
|
68
|
-
description: 'Sous Label du composant global qui donne une description.',
|
|
69
|
-
type: { name: 'string', required: false },
|
|
70
|
-
table: {
|
|
71
|
-
type: { summary: 'string' },
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
options: {
|
|
75
|
-
name: 'options',
|
|
76
|
-
description:
|
|
77
|
-
'Les options sont représentées par un tableau d‘objet contenant les propriétés ``value``, ``label`` et ``category``. Ce dernier étant optionnel.',
|
|
78
|
-
type: { name: 'array', required: true },
|
|
79
|
-
},
|
|
80
|
-
value: {
|
|
81
|
-
name: 'value',
|
|
82
|
-
description: 'Option sélectionnée',
|
|
83
|
-
options: ['1', '2', '3', '4', '5', '6'],
|
|
84
|
-
control: { type: 'select' },
|
|
85
|
-
type: { name: 'string', required: false },
|
|
86
|
-
table: {
|
|
87
|
-
type: { summary: 'string' },
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
onChange: {
|
|
91
|
-
name: 'onChange',
|
|
92
|
-
description: 'Fonction à appeler quand une option est sélectionnée.',
|
|
93
|
-
type: { required: true },
|
|
94
|
-
control: { disable: true },
|
|
95
|
-
},
|
|
96
|
-
isSearchable: {
|
|
97
|
-
name: 'isSearchable',
|
|
98
|
-
description: 'Rend le champ du select cherchable',
|
|
99
|
-
control: { type: 'boolean' },
|
|
100
|
-
type: { name: 'boolean', required: false },
|
|
101
|
-
table: {
|
|
102
|
-
type: { summary: 'boolean' },
|
|
103
|
-
defaultValue: { summary: false },
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
screenReaderOnly: {
|
|
107
|
-
name: 'screenReaderOnly',
|
|
108
|
-
description: "Permet de rendre le label lisible uniquement par les lecteurs d'écran",
|
|
109
|
-
control: { type: 'boolean' },
|
|
110
|
-
type: { name: 'boolean', required: false },
|
|
111
|
-
table: {
|
|
112
|
-
type: { summary: 'boolean' },
|
|
113
|
-
defaultValue: { summary: false },
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
placeholder: {
|
|
117
|
-
name: 'placeholder',
|
|
118
|
-
description: "Placeholder du select. Il sert aussi de label pour l'option par défaut",
|
|
119
|
-
type: { name: 'string', required: true },
|
|
120
|
-
table: {
|
|
121
|
-
type: { summary: 'string' },
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
hideDefaultOption: {
|
|
125
|
-
name: 'hideDefaultOption',
|
|
126
|
-
description: "Cache l'option par défaut du select",
|
|
127
|
-
type: { name: 'boolean', required: false },
|
|
128
|
-
table: {
|
|
129
|
-
type: { summary: 'boolean' },
|
|
130
|
-
defaultValue: { summary: false },
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
searchLabel: {
|
|
134
|
-
name: 'searchLabel',
|
|
135
|
-
description:
|
|
136
|
-
'Label de la recherche dans le menu déroulant du select. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**',
|
|
137
|
-
type: { name: 'string', required: false },
|
|
138
|
-
table: {
|
|
139
|
-
type: { summary: 'string' },
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
searchPlaceholder: {
|
|
143
|
-
name: 'searchPlaceholder',
|
|
144
|
-
description:
|
|
145
|
-
'Placeholder de la recherche dans le menu déroulant du select. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**',
|
|
146
|
-
type: { name: 'string', required: false },
|
|
147
|
-
table: {
|
|
148
|
-
type: { summary: 'string' },
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
emptySearchMessage: {
|
|
152
|
-
name: 'emptySearchMessage',
|
|
153
|
-
description:
|
|
154
|
-
"Message affiché si la recherche dans le select ne retourne pas d'options. **⚠️ Obligatoire uniquement si le `isSearchable` est à true. ⚠️**",
|
|
155
|
-
type: { name: 'string', required: false },
|
|
156
|
-
table: {
|
|
157
|
-
type: { summary: 'string' },
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
requiredText: {
|
|
161
|
-
name: 'requiredText',
|
|
162
|
-
description: "Affiche l'astérisque au label et ajoute sa signification",
|
|
163
|
-
type: { name: 'string', required: false },
|
|
164
|
-
table: {
|
|
165
|
-
type: { summary: 'string' },
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
errorMessage: {
|
|
169
|
-
name: 'errorMessage',
|
|
170
|
-
description: 'Message affiché si une erreur survient',
|
|
171
|
-
type: { name: 'string', required: false },
|
|
172
|
-
table: {
|
|
173
|
-
type: { summary: 'string' },
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
categoriesPlaceholder: {
|
|
177
|
-
name: 'categoriesPlaceholder',
|
|
178
|
-
description:
|
|
179
|
-
'Pour le filtre de categories, cela rempli le contenu interne du composant, `categoriesPlaceholder` pour `isSearchable` `true`, sinon rawContent du `button`',
|
|
180
|
-
type: { name: 'string', required: true },
|
|
181
|
-
},
|
|
182
|
-
categoriesLabel: {
|
|
183
|
-
name: 'categoriesLabel',
|
|
184
|
-
description:
|
|
185
|
-
"Pour le composant de filtre sur les catégories, cela donne un label au champ qui sera celui vocalisé par le lecteur d'écran",
|
|
186
|
-
type: { name: 'string', required: true },
|
|
187
|
-
},
|
|
188
|
-
};
|
|
@@ -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" />
|