@1024pix/pix-ui 41.2.0 → 42.0.1
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/addon/components/pix-button-base.js +1 -1
- package/addon/components/pix-button.hbs +31 -42
- package/addon/components/pix-input-code.hbs +0 -1
- package/addon/components/pix-input-password.hbs +1 -1
- package/addon/components/pix-input.hbs +2 -2
- package/addon/components/pix-search-input.hbs +0 -2
- package/addon/components/pix-select.hbs +4 -5
- package/addon/components/pix-select.js +1 -3
- package/addon/styles/_pix-button-base.scss +13 -13
- package/addon/styles/_pix-checkbox.scss +1 -0
- package/addon/styles/_pix-filterable-and-searchable-select.scss +8 -18
- package/addon/styles/_pix-input-code.scss +2 -4
- package/addon/styles/_pix-input-password.scss +8 -10
- package/addon/styles/_pix-input.scss +15 -32
- package/addon/styles/_pix-multi-select.scss +2 -6
- package/addon/styles/_pix-radio-button.scss +1 -0
- package/addon/styles/_pix-return-to.scss +1 -20
- package/addon/styles/_pix-search-input.scss +3 -3
- package/addon/styles/_pix-select.scss +5 -14
- package/addon/styles/_pix-textarea.scss +5 -7
- package/addon/styles/addon.scss +1 -0
- package/addon/styles/{pix-design-tokens → component-state}/_form.scss +53 -56
- package/addon/styles/component-state/index.scss +1 -0
- package/addon/styles/normalize-reset/_reset.scss +1 -1
- package/addon/styles/pix-design-tokens/index.scss +0 -1
- package/app/stories/form.stories.js +7 -5
- package/app/stories/pix-background-header.stories.js +2 -0
- package/app/stories/pix-button-link.stories.js +11 -3
- package/app/stories/pix-button.stories.js +10 -20
- package/app/stories/pix-checkbox.stories.js +6 -10
- package/app/stories/pix-filter-banner.stories.js +21 -3
- package/app/stories/pix-filterable-and-searchable-select.stories.js +15 -17
- package/app/stories/pix-indicator-card.stories.js +17 -17
- package/app/stories/pix-modal.stories.js +12 -2
- package/app/stories/pix-multi-select.stories.js +56 -61
- package/app/stories/pix-progress-gauge.stories.js +2 -1
- package/app/stories/pix-radio-button.stories.js +16 -16
- package/app/stories/pix-search-input.stories.js +8 -10
- package/app/stories/pix-select.stories.js +55 -58
- package/app/stories/pix-selectable-tag.stories.js +8 -2
- package/app/stories/pix-sidebar.stories.js +9 -3
- package/app/stories/pix-toggle.stories.js +13 -21
- package/app/stories/pix-tooltip.stories.js +2 -0
- package/package.json +7 -6
|
@@ -1,90 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
%pix-input-default {
|
|
2
|
+
@extend %pix-body-s;
|
|
3
|
+
|
|
4
|
+
padding: 0 var(--pix-spacing-3x);
|
|
5
|
+
color: var(--pix-neutral-900);
|
|
6
|
+
border-radius: var(--pix-spacing-1x);
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
%pix-input-error-message {
|
|
10
|
+
@extend %pix-body-xs;
|
|
11
|
+
|
|
12
|
+
margin-top: var(--pix-spacing-1x);
|
|
13
|
+
color: var(--pix-error-700);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
background-color: var(--pix-neutral-20);
|
|
18
|
-
border-color: var(--pix-neutral-100);
|
|
19
|
-
cursor: not-allowed;
|
|
16
|
+
%pix-form-success-state {
|
|
17
|
+
border: 2px solid var(--pix-success-700);
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
border-color: var(--pix-primary-500);
|
|
25
|
-
outline: 2px solid var(--pix-primary-300);
|
|
26
|
-
}
|
|
20
|
+
%pix-form-error-state {
|
|
21
|
+
border: 2px solid var(--pix-error-700);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
%pix-form-element-state {
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: var(--pix-neutral-20);
|
|
27
|
+
border-color: var(--pix-neutral-900);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
30
|
&:active {
|
|
31
31
|
background-color: var(--pix-neutral-0);
|
|
32
32
|
border-color: var(--pix-primary-500);
|
|
33
33
|
outline: none;
|
|
34
34
|
}
|
|
35
|
-
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
&:focus-within {
|
|
36
|
+
&:focus-within, &:focus {
|
|
39
37
|
border-color: var(--pix-primary-500);
|
|
40
38
|
outline: 2px solid var(--pix-primary-300);
|
|
41
39
|
}
|
|
42
|
-
}
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@mixin subLabel() {
|
|
54
|
-
@include label();
|
|
41
|
+
&[aria-disabled],
|
|
42
|
+
&[disabled],
|
|
43
|
+
&[readonly] {
|
|
44
|
+
color: var(--pix-neutral-500);
|
|
45
|
+
background-color: var(--pix-neutral-20);
|
|
46
|
+
border-color: var(--pix-neutral-100);
|
|
47
|
+
cursor: not-allowed;
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: var(--pix-neutral-20);
|
|
51
|
+
border-color: var(--pix-neutral-100);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
font-size: 0.75rem;
|
|
55
|
+
&[readonly] {
|
|
56
|
+
cursor: default;
|
|
57
|
+
}
|
|
66
58
|
}
|
|
67
59
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
60
|
+
%pix-label {
|
|
61
|
+
@extend %pix-body-s;
|
|
71
62
|
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
display: block;
|
|
64
|
+
margin-bottom: var(--pix-spacing-1x);
|
|
65
|
+
color: var(--pix-neutral-900);
|
|
66
|
+
font-weight: var(--pix-font-medium);
|
|
74
67
|
}
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
%pix-sublabel {
|
|
77
70
|
@extend %pix-body-s;
|
|
78
71
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
display: block;
|
|
73
|
+
margin-bottom: var(--pix-spacing-1x);
|
|
74
|
+
color: var(--pix-neutral-500);
|
|
82
75
|
}
|
|
83
76
|
|
|
77
|
+
|
|
78
|
+
// Only on StoryBook
|
|
84
79
|
.pix-form__label {
|
|
85
|
-
@
|
|
80
|
+
@extend %pix-body-m;
|
|
86
81
|
|
|
87
|
-
|
|
82
|
+
display: block;
|
|
83
|
+
margin-bottom: var(--pix-spacing-3x);
|
|
84
|
+
color: var(--pix-neutral-900);
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
.pix-form__actions {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'form';
|
|
@@ -16,7 +16,11 @@ export const form = (args) => {
|
|
|
16
16
|
@validationStatus={{this.validationStatus}}
|
|
17
17
|
/>
|
|
18
18
|
<br />
|
|
19
|
-
<PixInputPassword
|
|
19
|
+
<PixInputPassword
|
|
20
|
+
@id='password'
|
|
21
|
+
@label='Mot de passe'
|
|
22
|
+
@errorMessage={{this.genericErrorMessage}}
|
|
23
|
+
/>
|
|
20
24
|
<br />
|
|
21
25
|
|
|
22
26
|
<PixMultiSelect
|
|
@@ -45,6 +49,7 @@ export const form = (args) => {
|
|
|
45
49
|
{{condiment.label}}
|
|
46
50
|
</PixMultiSelect>
|
|
47
51
|
<br /><br />
|
|
52
|
+
{{! template-lint-disable no-inline-styles }}
|
|
48
53
|
|
|
49
54
|
<PixSelect
|
|
50
55
|
@id='form__searchable-pix-select'
|
|
@@ -72,10 +77,7 @@ export const form = (args) => {
|
|
|
72
77
|
<PixRadioButton @label='Carotte' @value='carotte' name='légume' />
|
|
73
78
|
<br />
|
|
74
79
|
|
|
75
|
-
<PixCheckbox
|
|
76
|
-
@id='spam-pub'
|
|
77
|
-
@labelSize='small'
|
|
78
|
-
>
|
|
80
|
+
<PixCheckbox @id='spam-pub' @labelSize='small'>
|
|
79
81
|
Acceptez-vous de vous faire spammer de PUB ?
|
|
80
82
|
</PixCheckbox>
|
|
81
83
|
|
|
@@ -7,8 +7,10 @@ export default {
|
|
|
7
7
|
export const backgroundHeader = (args) => {
|
|
8
8
|
return {
|
|
9
9
|
template: hbs`<PixBackgroundHeader>
|
|
10
|
+
{{! template-lint-disable no-inline-styles }}
|
|
10
11
|
|
|
11
12
|
<PixBlock style='margin: 0 0 32px; padding: 14px 24px;'>Un panel avec du text</PixBlock>
|
|
13
|
+
{{! template-lint-disable no-inline-styles }}
|
|
12
14
|
|
|
13
15
|
<PixBlock style='padding: 14px 24px;'>
|
|
14
16
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a interdum mauris. Morbi ac diam
|
|
@@ -40,13 +40,21 @@ export default {
|
|
|
40
40
|
backgroundColor: {
|
|
41
41
|
name: 'backgroundColor',
|
|
42
42
|
description:
|
|
43
|
-
'color: `
|
|
44
|
-
options: [
|
|
43
|
+
'color: `primary`, `secondary`, `success`, `error`, `neutral`, `transparent-light`, `transparent-dark`',
|
|
44
|
+
options: [
|
|
45
|
+
'primary',
|
|
46
|
+
'secondary',
|
|
47
|
+
'success',
|
|
48
|
+
'error',
|
|
49
|
+
'neutral',
|
|
50
|
+
'transparent-light',
|
|
51
|
+
'transparent-dark',
|
|
52
|
+
],
|
|
45
53
|
type: { name: 'string', required: false },
|
|
46
54
|
control: { type: 'select' },
|
|
47
55
|
table: {
|
|
48
56
|
type: { summary: 'string' },
|
|
49
|
-
defaultValue: { summary: '
|
|
57
|
+
defaultValue: { summary: 'primary' },
|
|
50
58
|
},
|
|
51
59
|
},
|
|
52
60
|
size: {
|
|
@@ -147,23 +147,13 @@ export default {
|
|
|
147
147
|
defaultValue: { summary: 'false' },
|
|
148
148
|
},
|
|
149
149
|
},
|
|
150
|
-
route: {
|
|
151
|
-
name: 'route',
|
|
152
|
-
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
153
|
-
type: { name: 'string', required: false },
|
|
154
|
-
},
|
|
155
|
-
model: {
|
|
156
|
-
name: 'model',
|
|
157
|
-
description: 'Déprécié et remplacé par le composant PixButtonLink',
|
|
158
|
-
type: { required: false },
|
|
159
|
-
},
|
|
160
150
|
},
|
|
161
151
|
};
|
|
162
152
|
|
|
163
153
|
const Template = (args) => ({
|
|
164
154
|
template: hbs`<section style={{this.style}}>
|
|
165
155
|
<PixButton
|
|
166
|
-
@triggerAction={{
|
|
156
|
+
@triggerAction={{this.triggerAction}}
|
|
167
157
|
@loadingColor={{this.loadingColor}}
|
|
168
158
|
@shape={{this.shape}}
|
|
169
159
|
@backgroundColor={{this.backgroundColor}}
|
|
@@ -182,7 +172,7 @@ const Template = (args) => ({
|
|
|
182
172
|
{{#each this.extraButtons as |button|}}
|
|
183
173
|
<section style={{button.style}}>
|
|
184
174
|
<PixButton
|
|
185
|
-
@triggerAction={{
|
|
175
|
+
@triggerAction={{this.triggerAction}}
|
|
186
176
|
@loadingColor={{button.loadingColor}}
|
|
187
177
|
@shape={{button.shape}}
|
|
188
178
|
@backgroundColor={{button.backgroundColor}}
|
|
@@ -236,23 +226,23 @@ colors.args = {
|
|
|
236
226
|
extraButtons: [
|
|
237
227
|
{
|
|
238
228
|
...Default.args,
|
|
239
|
-
label: 'Bouton avec background
|
|
240
|
-
backgroundColor: '
|
|
229
|
+
label: 'Bouton avec background success',
|
|
230
|
+
backgroundColor: 'success',
|
|
241
231
|
},
|
|
242
232
|
{
|
|
243
233
|
...Default.args,
|
|
244
|
-
label: 'Bouton avec background
|
|
245
|
-
backgroundColor: '
|
|
234
|
+
label: 'Bouton avec background secondary',
|
|
235
|
+
backgroundColor: 'secondary',
|
|
246
236
|
},
|
|
247
237
|
{
|
|
248
238
|
...Default.args,
|
|
249
|
-
label: 'Bouton avec background
|
|
250
|
-
backgroundColor: '
|
|
239
|
+
label: 'Bouton avec background error',
|
|
240
|
+
backgroundColor: 'error',
|
|
251
241
|
},
|
|
252
242
|
{
|
|
253
243
|
...Default.args,
|
|
254
|
-
label: 'Bouton avec background
|
|
255
|
-
backgroundColor: '
|
|
244
|
+
label: 'Bouton avec background neutral',
|
|
245
|
+
backgroundColor: 'neutral',
|
|
256
246
|
},
|
|
257
247
|
{
|
|
258
248
|
...Default.args,
|
|
@@ -71,8 +71,7 @@ export default {
|
|
|
71
71
|
|
|
72
72
|
export const Template = (args) => {
|
|
73
73
|
return {
|
|
74
|
-
template: hbs
|
|
75
|
-
<PixCheckbox
|
|
74
|
+
template: hbs`<PixCheckbox
|
|
76
75
|
@id={{this.id}}
|
|
77
76
|
@class={{this.class}}
|
|
78
77
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
@@ -82,8 +81,7 @@ export const Template = (args) => {
|
|
|
82
81
|
disabled={{this.disabled}}
|
|
83
82
|
>
|
|
84
83
|
{{this.label}}
|
|
85
|
-
</PixCheckbox
|
|
86
|
-
`,
|
|
84
|
+
</PixCheckbox>`,
|
|
87
85
|
context: args,
|
|
88
86
|
};
|
|
89
87
|
};
|
|
@@ -142,9 +140,8 @@ checkboxInterminateDisabled.args = {
|
|
|
142
140
|
|
|
143
141
|
export const MultipleTemplate = (args) => {
|
|
144
142
|
return {
|
|
145
|
-
template: hbs
|
|
146
|
-
|
|
147
|
-
@id="one"
|
|
143
|
+
template: hbs`<PixCheckbox
|
|
144
|
+
@id='one'
|
|
148
145
|
@class={{this.class}}
|
|
149
146
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
150
147
|
@isIndeterminate={{this.isIndeterminate}}
|
|
@@ -155,7 +152,7 @@ export const MultipleTemplate = (args) => {
|
|
|
155
152
|
{{this.label}}
|
|
156
153
|
</PixCheckbox>
|
|
157
154
|
<PixCheckbox
|
|
158
|
-
@id=
|
|
155
|
+
@id='two'
|
|
159
156
|
@class={{this.class}}
|
|
160
157
|
@screenReaderOnly={{this.screenReaderOnly}}
|
|
161
158
|
@isIndeterminate={{this.isIndeterminate}}
|
|
@@ -164,8 +161,7 @@ export const MultipleTemplate = (args) => {
|
|
|
164
161
|
disabled={{this.disabled}}
|
|
165
162
|
>
|
|
166
163
|
{{this.label}}
|
|
167
|
-
</PixCheckbox
|
|
168
|
-
`,
|
|
164
|
+
</PixCheckbox>`,
|
|
169
165
|
context: args,
|
|
170
166
|
};
|
|
171
167
|
};
|
|
@@ -46,9 +46,27 @@ export const filterBanner = (args) => {
|
|
|
46
46
|
@onClearFilters={{this.onClearFilters}}
|
|
47
47
|
@isClearFilterButtonDisabled={{this.isClearFilterButtonDisabled}}
|
|
48
48
|
>
|
|
49
|
-
<PixSelect
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
<PixSelect
|
|
50
|
+
@options={{this.options}}
|
|
51
|
+
@onChange={{this.onChange}}
|
|
52
|
+
@label='mon label'
|
|
53
|
+
@screenReaderOnly={{true}}
|
|
54
|
+
@placeholder='placeholer'
|
|
55
|
+
/>
|
|
56
|
+
<PixSelect
|
|
57
|
+
@options={{this.options}}
|
|
58
|
+
@onChange={{this.onChange}}
|
|
59
|
+
@label='mon label'
|
|
60
|
+
@screenReaderOnly={{true}}
|
|
61
|
+
@placeholder='placeholer'
|
|
62
|
+
/>
|
|
63
|
+
<PixSelect
|
|
64
|
+
@options={{this.options}}
|
|
65
|
+
@onChange={{this.onChange}}
|
|
66
|
+
@label='mon label'
|
|
67
|
+
@screenReaderOnly={{true}}
|
|
68
|
+
@placeholder='placeholer'
|
|
69
|
+
/>
|
|
52
70
|
</PixFilterBanner>`,
|
|
53
71
|
context: args,
|
|
54
72
|
};
|
|
@@ -139,23 +139,21 @@ export default {
|
|
|
139
139
|
|
|
140
140
|
const Template = (args) => {
|
|
141
141
|
return {
|
|
142
|
-
template: hbs
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
/>
|
|
158
|
-
`,
|
|
142
|
+
template: hbs`<PixFilterableAndSearchableSelect
|
|
143
|
+
@label={{this.label}}
|
|
144
|
+
@subLabel={{this.subLabel}}
|
|
145
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
146
|
+
@placeholder={{this.placeholder}}
|
|
147
|
+
@hideDefaultOption={{this.hideDefaultOption}}
|
|
148
|
+
@options={{this.options}}
|
|
149
|
+
@onChange={{this.onChange}}
|
|
150
|
+
@categoriesLabel={{this.categoriesLabel}}
|
|
151
|
+
@categoriesPlaceholder={{this.categoriesPlaceholder}}
|
|
152
|
+
@isSearchable={{this.isSearchable}}
|
|
153
|
+
@value={{this.value}}
|
|
154
|
+
@requiredText={{this.requiredText}}
|
|
155
|
+
@errorMessage={{this.errorMessage}}
|
|
156
|
+
/>`,
|
|
159
157
|
context: args,
|
|
160
158
|
};
|
|
161
159
|
};
|
|
@@ -39,23 +39,23 @@ export default {
|
|
|
39
39
|
|
|
40
40
|
const Template = (args) => {
|
|
41
41
|
return {
|
|
42
|
-
template: hbs`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
template: hbs`{{! template-lint-disable no-inline-styles }}
|
|
43
|
+
<div style='min-width:300px'>
|
|
44
|
+
<PixIndicatorCard
|
|
45
|
+
@title={{this.title}}
|
|
46
|
+
@color={{this.color}}
|
|
47
|
+
@icon={{this.icon}}
|
|
48
|
+
@iconPrefix={{this.iconPrefix}}
|
|
49
|
+
@info={{this.info}}
|
|
50
|
+
@isLoading={{this.isLoading}}
|
|
51
|
+
@loadingMessage={{this.loadingMessage}}
|
|
52
|
+
>
|
|
53
|
+
<:default>{{this.value}}</:default>
|
|
54
|
+
<:sub>
|
|
55
|
+
<span>En cours : 1</span><span>En attente : 2</span><span>Envoyés : 3</span>
|
|
56
|
+
</:sub>
|
|
57
|
+
</PixIndicatorCard>
|
|
58
|
+
</div>`,
|
|
59
59
|
context: args,
|
|
60
60
|
};
|
|
61
61
|
};
|
|
@@ -19,12 +19,22 @@ export default {
|
|
|
19
19
|
</p>
|
|
20
20
|
</:content>
|
|
21
21
|
<:footer>
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
{{! template-lint-disable no-inline-styles }}
|
|
23
|
+
|
|
24
|
+
<div
|
|
25
|
+
style='display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 16px'
|
|
26
|
+
>
|
|
27
|
+
<PixButton
|
|
28
|
+
@backgroundColor='transparent-light'
|
|
29
|
+
@isBorderVisible='true'
|
|
30
|
+
@triggerAction={{fn (mut this.showModal) (not this.showModal)}}
|
|
31
|
+
>Annuler</PixButton>
|
|
24
32
|
<PixButton @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Valider</PixButton>
|
|
25
33
|
</div>
|
|
26
34
|
</:footer>
|
|
27
35
|
</PixModal>
|
|
36
|
+
{{! template-lint-disable no-inline-styles }}
|
|
37
|
+
|
|
28
38
|
<div style='display:flex; justify-content:center; align-items:center; height:105vh;'>
|
|
29
39
|
<PixButton @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Ouvrir la modale</PixButton>
|
|
30
40
|
</div>`,
|
|
@@ -4,32 +4,30 @@ import { action } from '@storybook/addon-actions';
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Form/Multi Select',
|
|
6
6
|
render: (args) => ({
|
|
7
|
-
template: hbs`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
>{{option.label}}</PixMultiSelect>
|
|
32
|
-
`,
|
|
7
|
+
template: hbs`{{! template-lint-disable no-forbidden-elements }}
|
|
8
|
+
<style>
|
|
9
|
+
.custom { border : none; }
|
|
10
|
+
</style>
|
|
11
|
+
<h4><strong>⚠️ La sélection des éléments ne fonctionne pas dans Storybook.</strong></h4>
|
|
12
|
+
{{#if this.id}}
|
|
13
|
+
<div>
|
|
14
|
+
<label for={{this.id}}>Un label en dehors du composant</label>
|
|
15
|
+
</div>
|
|
16
|
+
{{/if}}
|
|
17
|
+
<PixMultiSelect
|
|
18
|
+
@id={{this.id}}
|
|
19
|
+
@label={{this.label}}
|
|
20
|
+
@placeholder={{this.placeholder}}
|
|
21
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
22
|
+
@onChange={{this.onChange}}
|
|
23
|
+
@emptyMessage={{this.emptyMessage}}
|
|
24
|
+
@className={{this.className}}
|
|
25
|
+
@isSearchable={{this.isSearchable}}
|
|
26
|
+
@strictSearch={{this.strictSearch}}
|
|
27
|
+
@values={{this.values}}
|
|
28
|
+
@options={{this.options}}
|
|
29
|
+
as |option|
|
|
30
|
+
>{{option.label}}</PixMultiSelect>`,
|
|
33
31
|
context: args,
|
|
34
32
|
}),
|
|
35
33
|
argTypes: {
|
|
@@ -141,24 +139,23 @@ export const Default = {
|
|
|
141
139
|
|
|
142
140
|
export const multiSelectWithChildComponent = (args) => {
|
|
143
141
|
return {
|
|
144
|
-
template: hbs
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
`,
|
|
142
|
+
template: hbs`<h4><strong>⚠️ La sélection des éléments ne fonctionne pas dans Storybook.</strong></h4>
|
|
143
|
+
<PixMultiSelect
|
|
144
|
+
@label={{this.label}}
|
|
145
|
+
@placeholder={{this.placeholder}}
|
|
146
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
147
|
+
@onChange={{this.onChange}}
|
|
148
|
+
@emptyMessage={{this.emptyMessage}}
|
|
149
|
+
@className={{this.className}}
|
|
150
|
+
@options={{this.options}}
|
|
151
|
+
as |option|
|
|
152
|
+
>
|
|
153
|
+
<PixStars
|
|
154
|
+
@alt={{concat 'Étoiles ' option.value ' sur ' option.total}}
|
|
155
|
+
@count={{option.value}}
|
|
156
|
+
@total={{option.total}}
|
|
157
|
+
/>
|
|
158
|
+
</PixMultiSelect>`,
|
|
162
159
|
context: args,
|
|
163
160
|
};
|
|
164
161
|
};
|
|
@@ -202,23 +199,21 @@ export const multiSelectWithId = {
|
|
|
202
199
|
};
|
|
203
200
|
|
|
204
201
|
const TemplateWithYield = (args) => ({
|
|
205
|
-
template: hbs
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
>
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
</PixMultiSelect>
|
|
221
|
-
`,
|
|
202
|
+
template: hbs`<PixMultiSelect
|
|
203
|
+
@id={{this.id}}
|
|
204
|
+
@label={{this.label}}
|
|
205
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
206
|
+
@onChange={{this.onChange}}
|
|
207
|
+
@emptyMessage={{this.emptyMessage}}
|
|
208
|
+
@className={{this.className}}
|
|
209
|
+
@isSearchable={{this.isSearchable}}
|
|
210
|
+
@strictSearch={{this.strictSearch}}
|
|
211
|
+
@values={{this.values}}
|
|
212
|
+
@options={{this.options}}
|
|
213
|
+
>
|
|
214
|
+
<:placeholder>filtres (2)</:placeholder>
|
|
215
|
+
<:default as |option|>{{option.label}}</:default>
|
|
216
|
+
</PixMultiSelect>`,
|
|
222
217
|
context: args,
|
|
223
218
|
});
|
|
224
219
|
|
|
@@ -95,7 +95,8 @@ Tertiary.args = {
|
|
|
95
95
|
|
|
96
96
|
export const darkModeProgressGauge = (args) => {
|
|
97
97
|
return {
|
|
98
|
-
template: hbs
|
|
98
|
+
template: hbs`{{! template-lint-disable no-inline-styles }}
|
|
99
|
+
<section style='width: 100%; padding: 35px 35px 5px;background-color: #253858'>
|
|
99
100
|
<PixProgressGauge
|
|
100
101
|
@value={{this.value}}
|
|
101
102
|
@color={{this.color}}
|