@1024pix/pix-ui 22.0.0 → 23.0.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/CHANGELOG.md +16 -0
- package/addon/components/pix-modal.hbs +6 -6
- package/addon/components/pix-sidebar.hbs +6 -6
- package/addon/styles/_pix-modal.scss +5 -19
- package/app/stories/form.stories.js +12 -12
- package/app/stories/pix-banner.stories.js +4 -4
- package/app/stories/pix-block.stories.js +1 -1
- package/app/stories/pix-button-link.stories.js +11 -11
- package/app/stories/pix-button-upload.stories.js +5 -5
- package/app/stories/pix-button.stories.js +10 -10
- package/app/stories/pix-checkbox.stories.js +5 -5
- package/app/stories/pix-collapsible.stories.js +5 -5
- package/app/stories/pix-dropdown.stories.js +13 -13
- package/app/stories/pix-filter-banner.stories.js +4 -4
- package/app/stories/pix-filterable-and-searchable-select.stories.js +12 -12
- package/app/stories/pix-icon-button.stories.js +8 -8
- package/app/stories/pix-input-code.stories.js +5 -5
- package/app/stories/pix-input-password.stories.js +7 -7
- package/app/stories/pix-input.stories.js +6 -6
- package/app/stories/pix-message.stories.js +2 -2
- package/app/stories/pix-modal.stories.js +7 -9
- package/app/stories/pix-pagination.stories.js +4 -4
- package/app/stories/pix-progress-gauge.stories.js +10 -10
- package/app/stories/pix-radio-button.stories.js +2 -2
- package/app/stories/pix-return-to.stories.js +2 -2
- package/app/stories/pix-selectable-tag.stories.js +5 -5
- package/app/stories/pix-sidebar.stories.js +6 -6
- package/app/stories/pix-stars.stories.js +1 -1
- package/app/stories/pix-tag.stories.js +2 -2
- package/app/stories/pix-textarea.stories.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v23.0.0 (08/12/2022)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :rocket: Amélioration
|
|
7
|
+
- [#285](https://github.com/1024pix/pix-ui/pull/285) [FEATURE] Améliorer l'accessibilité de PixModal (PIX-6265)
|
|
8
|
+
- [#287](https://github.com/1024pix/pix-ui/pull/287) [FEATURE] Améliorer l'accessiblité de PixSidebar (PIX-6424)
|
|
9
|
+
|
|
10
|
+
### :coffee: Autre
|
|
11
|
+
- [#302](https://github.com/1024pix/pix-ui/pull/302) [DOCS] Modifie l'exemple de la Modal pour utiliser `gap`
|
|
12
|
+
|
|
13
|
+
## v22.0.1 (08/12/2022)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### :building_construction: Tech
|
|
17
|
+
- [#300](https://github.com/1024pix/pix-ui/pull/300) [TECH] Réparer l'affichage des stories
|
|
18
|
+
|
|
3
19
|
## v22.0.0 (08/12/2022)
|
|
4
20
|
|
|
5
21
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
aria-modal="true"
|
|
13
13
|
...attributes
|
|
14
14
|
>
|
|
15
|
-
<
|
|
15
|
+
<div class="pix-modal__header">
|
|
16
16
|
<h1 id="modal-title--{{this.id}}" class="pix-modal__title">{{@title}}</h1>
|
|
17
17
|
<PixIconButton
|
|
18
18
|
@icon="xmark"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
@withBackground={{true}}
|
|
23
23
|
class="pix-modal__close-button"
|
|
24
24
|
/>
|
|
25
|
-
</
|
|
26
|
-
<
|
|
25
|
+
</div>
|
|
26
|
+
<div id="modal-content--{{this.id}}" class="pix-modal__content">
|
|
27
27
|
{{yield to="content"}}
|
|
28
|
-
</
|
|
29
|
-
<
|
|
28
|
+
</div>
|
|
29
|
+
<div class="pix-modal__footer">
|
|
30
30
|
{{yield to="footer"}}
|
|
31
|
-
</
|
|
31
|
+
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
aria-modal="true"
|
|
13
13
|
...attributes
|
|
14
14
|
>
|
|
15
|
-
<
|
|
15
|
+
<div class="pix-sidebar__header">
|
|
16
16
|
<h1 id="sidebar-title--{{this.id}}" class="pix-sidebar__title">{{@title}}</h1>
|
|
17
17
|
<PixIconButton
|
|
18
18
|
@icon="xmark"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
@withBackground={{true}}
|
|
23
23
|
class="pix-sidebar__close-button"
|
|
24
24
|
/>
|
|
25
|
-
</
|
|
26
|
-
<
|
|
25
|
+
</div>
|
|
26
|
+
<div id="sidebar-content--{{this.id}}" class="pix-sidebar__content">
|
|
27
27
|
{{yield to="content"}}
|
|
28
|
-
</
|
|
29
|
-
<
|
|
28
|
+
</div>
|
|
29
|
+
<div class="pix-sidebar__footer">
|
|
30
30
|
{{yield to="footer"}}
|
|
31
|
-
</
|
|
31
|
+
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// if the content is less than 100vh
|
|
16
16
|
// Inspired by https://mui.com/material-ui/react-dialog/#scrolling-long-content
|
|
17
17
|
&::after {
|
|
18
|
-
content:
|
|
18
|
+
content: '';
|
|
19
19
|
display: inline-block;
|
|
20
20
|
vertical-align: middle;
|
|
21
21
|
height: 100%;
|
|
@@ -39,8 +39,10 @@ $button-margin: 16px;
|
|
|
39
39
|
display: inline-block;
|
|
40
40
|
vertical-align: middle; // Centered vertically with the .pix-modal__overlay::after which is 100% height
|
|
41
41
|
width: 512px;
|
|
42
|
-
max-width: calc(
|
|
43
|
-
|
|
42
|
+
max-width: calc(
|
|
43
|
+
100% - #{2 * $spacing-xs}
|
|
44
|
+
); // Horizontal margin sets here to have extra space for the .pix-modal__overlay::after on mobile
|
|
45
|
+
text-align: initial;
|
|
44
46
|
background-color: $pix-neutral-10;
|
|
45
47
|
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
|
|
46
48
|
border-radius: 4px;
|
|
@@ -94,21 +96,5 @@ $button-margin: 16px;
|
|
|
94
96
|
|
|
95
97
|
&__footer {
|
|
96
98
|
padding: 0 $modal-padding $modal-padding - $button-margin;
|
|
97
|
-
|
|
98
|
-
@include device-is('tablet') {
|
|
99
|
-
display: flex;
|
|
100
|
-
justify-content: flex-end;
|
|
101
|
-
flex-wrap: wrap;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.pix-button {
|
|
105
|
-
margin-bottom: $button-margin;
|
|
106
|
-
width: 100%;
|
|
107
|
-
|
|
108
|
-
@include device-is('tablet') {
|
|
109
|
-
margin: 0 0 $button-margin $button-margin;
|
|
110
|
-
width: auto;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
99
|
}
|
|
114
100
|
}
|
|
@@ -7,20 +7,20 @@ export const form = (args) => {
|
|
|
7
7
|
<PixInput
|
|
8
8
|
@id='firstName'
|
|
9
9
|
@label='Prénom'
|
|
10
|
-
@errorMessage={{genericErrorMessage}}
|
|
10
|
+
@errorMessage={{this.genericErrorMessage}}
|
|
11
11
|
@requiredLabel='champ obligatoire'
|
|
12
12
|
/>
|
|
13
13
|
<br />
|
|
14
|
-
<PixInputPassword @id='password' @label='Mot de passe' @errorMessage={{genericErrorMessage}} />
|
|
14
|
+
<PixInputPassword @id='password' @label='Mot de passe' @errorMessage={{this.genericErrorMessage}} />
|
|
15
15
|
<br />
|
|
16
16
|
|
|
17
17
|
<PixMultiSelect
|
|
18
18
|
@innerText='Votre notation en étoiles...'
|
|
19
19
|
@id='form__pix-mutli-select'
|
|
20
20
|
@label='A quel point aimez vous Pix UI ?'
|
|
21
|
-
@onSelect={{onSelect}}
|
|
22
|
-
@selected={{selected}}
|
|
23
|
-
@options={{options}}
|
|
21
|
+
@onSelect={{this.onSelect}}
|
|
22
|
+
@selected={{this.selected}}
|
|
23
|
+
@options={{this.options}}
|
|
24
24
|
as |star|
|
|
25
25
|
>
|
|
26
26
|
<PixStars @count={{star.value}} @total={{star.total}} />
|
|
@@ -31,10 +31,10 @@ export const form = (args) => {
|
|
|
31
31
|
@innerText='Mes condiements'
|
|
32
32
|
@id='form__pix-mutli-select-searchable'
|
|
33
33
|
@label='Choississez vos condiments'
|
|
34
|
-
@onSelect={{onSelect}}
|
|
35
|
-
@selected={{selected}}
|
|
34
|
+
@onSelect={{this.onSelect}}
|
|
35
|
+
@selected={{this.selected}}
|
|
36
36
|
@isSearchable={{true}}
|
|
37
|
-
@options={{optionsSearch}}
|
|
37
|
+
@options={{this.optionsSearch}}
|
|
38
38
|
as |condiment|
|
|
39
39
|
>
|
|
40
40
|
{{condiment.label}}
|
|
@@ -44,7 +44,7 @@ export const form = (args) => {
|
|
|
44
44
|
<PixSelect
|
|
45
45
|
@id='form__searchable-pix-select'
|
|
46
46
|
@label='Votre fruit préféré est : '
|
|
47
|
-
@options={{selectOptions}}
|
|
47
|
+
@options={{this.selectOptions}}
|
|
48
48
|
@isSearchable={{true}}
|
|
49
49
|
@isValidationActive={{true}}
|
|
50
50
|
placeholder='Fraises, Mangues...'
|
|
@@ -54,7 +54,7 @@ export const form = (args) => {
|
|
|
54
54
|
|
|
55
55
|
<PixDropdown
|
|
56
56
|
@id='form__searchable-pix-dropdown'
|
|
57
|
-
@options={{selectOptions}}
|
|
57
|
+
@options={{this.selectOptions}}
|
|
58
58
|
@placeholder='Choisir votre fruit'
|
|
59
59
|
@isSearchable={{true}}
|
|
60
60
|
@searchPlaceholder='Rechercher'
|
|
@@ -70,7 +70,7 @@ export const form = (args) => {
|
|
|
70
70
|
@value=''
|
|
71
71
|
@maxlength={{200}}
|
|
72
72
|
@label='Un commentaire ?'
|
|
73
|
-
@errorMessage={{genericErrorMessage}}
|
|
73
|
+
@errorMessage={{this.genericErrorMessage}}
|
|
74
74
|
/>
|
|
75
75
|
<br />
|
|
76
76
|
|
|
@@ -89,7 +89,7 @@ export const form = (args) => {
|
|
|
89
89
|
|
|
90
90
|
<div class='pix-form__actions'>
|
|
91
91
|
<PixButton
|
|
92
|
-
@triggerAction={{cancel}}
|
|
92
|
+
@triggerAction={{this.cancel}}
|
|
93
93
|
@backgroundColor='transparent-light'
|
|
94
94
|
@isBorderVisible={{true}}
|
|
95
95
|
>
|
|
@@ -3,10 +3,10 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixBanner
|
|
6
|
-
@type={{type}}
|
|
7
|
-
@actionLabel={{actionLabel}}
|
|
8
|
-
@actionUrl={{actionUrl}}
|
|
9
|
-
@canCloseBanner={{canCloseBanner}}
|
|
6
|
+
@type={{this.type}}
|
|
7
|
+
@actionLabel={{this.actionLabel}}
|
|
8
|
+
@actionUrl={{this.actionUrl}}
|
|
9
|
+
@canCloseBanner={{this.canCloseBanner}}
|
|
10
10
|
>
|
|
11
11
|
Parcours de rentrée 2020 : les codes sont disponibles dans l'onglet campagne. N’oubliez pas de les
|
|
12
12
|
diffuser aux élèves avant la Toussaint.
|
|
@@ -5,11 +5,11 @@ export const htmlLinkTemplate = (args) => {
|
|
|
5
5
|
template: hbs`<PixButtonLink
|
|
6
6
|
@href='https://pix.fr'
|
|
7
7
|
target='NEW'
|
|
8
|
-
@shape={{shape}}
|
|
9
|
-
@backgroundColor={{backgroundColor}}
|
|
10
|
-
@size={{size}}
|
|
11
|
-
@isBorderVisible={{isBorderVisible}}
|
|
12
|
-
@isDisabled={{isDisabled}}
|
|
8
|
+
@shape={{this.shape}}
|
|
9
|
+
@backgroundColor={{this.backgroundColor}}
|
|
10
|
+
@size={{this.size}}
|
|
11
|
+
@isBorderVisible={{this.isBorderVisible}}
|
|
12
|
+
@isDisabled={{this.isDisabled}}
|
|
13
13
|
>
|
|
14
14
|
Lien HTML classique
|
|
15
15
|
</PixButtonLink>`,
|
|
@@ -22,12 +22,12 @@ export const emberLinkTemplate = (args) => {
|
|
|
22
22
|
template: hbs`<PixButtonLink
|
|
23
23
|
@route=''
|
|
24
24
|
@model=''
|
|
25
|
-
@query={{query}}
|
|
26
|
-
@shape={{shape}}
|
|
27
|
-
@backgroundColor={{backgroundColor}}
|
|
28
|
-
@size={{size}}
|
|
29
|
-
@isBorderVisible={{isBorderVisible}}
|
|
30
|
-
@isDisabled={{isDisabled}}
|
|
25
|
+
@query={{this.query}}
|
|
26
|
+
@shape={{this.shape}}
|
|
27
|
+
@backgroundColor={{this.backgroundColor}}
|
|
28
|
+
@size={{this.size}}
|
|
29
|
+
@isBorderVisible={{this.isBorderVisible}}
|
|
30
|
+
@isDisabled={{this.isDisabled}}
|
|
31
31
|
>
|
|
32
32
|
Lien route Ember (LinkTo)
|
|
33
33
|
</PixButtonLink>`,
|
|
@@ -5,11 +5,11 @@ export const buttonUpload = (args) => {
|
|
|
5
5
|
return {
|
|
6
6
|
template: hbs`<PixButtonUpload
|
|
7
7
|
@id='id'
|
|
8
|
-
@onChange={{onChange}}
|
|
9
|
-
@shape={{shape}}
|
|
10
|
-
@backgroundColor={{backgroundColor}}
|
|
11
|
-
@size={{size}}
|
|
12
|
-
@isBorderVisible={{isBorderVisible}}
|
|
8
|
+
@onChange={{this.onChange}}
|
|
9
|
+
@shape={{this.shape}}
|
|
10
|
+
@backgroundColor={{this.backgroundColor}}
|
|
11
|
+
@size={{this.size}}
|
|
12
|
+
@isBorderVisible={{this.isBorderVisible}}
|
|
13
13
|
>
|
|
14
14
|
Cliquer pour uploader un fichier
|
|
15
15
|
</PixButtonUpload>`,
|
|
@@ -3,22 +3,22 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
const Template = (args) => ({
|
|
4
4
|
template: hbs`<section style={{this.style}}>
|
|
5
5
|
<PixButton
|
|
6
|
-
@triggerAction={{action triggerAction}}
|
|
7
|
-
@loadingColor={{loadingColor}}
|
|
8
|
-
@shape={{shape}}
|
|
9
|
-
@backgroundColor={{backgroundColor}}
|
|
10
|
-
@isDisabled={{isDisabled}}
|
|
11
|
-
@isLoading={{isLoading}}
|
|
12
|
-
@size={{size}}
|
|
13
|
-
@isBorderVisible={{isBorderVisible}}
|
|
6
|
+
@triggerAction={{action this.triggerAction}}
|
|
7
|
+
@loadingColor={{this.loadingColor}}
|
|
8
|
+
@shape={{this.shape}}
|
|
9
|
+
@backgroundColor={{this.backgroundColor}}
|
|
10
|
+
@isDisabled={{this.isDisabled}}
|
|
11
|
+
@isLoading={{this.isLoading}}
|
|
12
|
+
@size={{this.size}}
|
|
13
|
+
@isBorderVisible={{this.isBorderVisible}}
|
|
14
14
|
>
|
|
15
15
|
{{this.label}}
|
|
16
16
|
</PixButton>
|
|
17
17
|
</section>
|
|
18
|
-
{{#each extraButtons as |button|}}
|
|
18
|
+
{{#each this.extraButtons as |button|}}
|
|
19
19
|
<section style={{button.style}}>
|
|
20
20
|
<PixButton
|
|
21
|
-
@triggerAction={{action triggerAction}}
|
|
21
|
+
@triggerAction={{action this.triggerAction}}
|
|
22
22
|
@loadingColor={{button.loadingColor}}
|
|
23
23
|
@shape={{button.shape}}
|
|
24
24
|
@backgroundColor={{button.backgroundColor}}
|
|
@@ -3,11 +3,11 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixCheckbox
|
|
6
|
-
@id={{id}}
|
|
7
|
-
@screenReaderOnly={{screenReaderOnly}}
|
|
8
|
-
@isIndeterminate={{isIndeterminate}}
|
|
9
|
-
@labelSize={{labelSize}}
|
|
10
|
-
@checked={{checked}}
|
|
6
|
+
@id={{this.id}}
|
|
7
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
8
|
+
@isIndeterminate={{this.isIndeterminate}}
|
|
9
|
+
@labelSize={{this.labelSize}}
|
|
10
|
+
@checked={{this.checked}}
|
|
11
11
|
>
|
|
12
12
|
{{label}}
|
|
13
13
|
</PixCheckbox>`,
|
|
@@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
export const collapsible = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixCollapsible @title={{title}} @titleIcon={{titleIcon}}>
|
|
5
|
+
template: hbs`<PixCollapsible @title={{this.title}} @titleIcon={{this.titleIcon}}>
|
|
6
6
|
<div>Contenu du PixCollapsible</div>
|
|
7
7
|
</PixCollapsible>`,
|
|
8
8
|
context: args,
|
|
@@ -11,7 +11,7 @@ export const collapsible = (args) => {
|
|
|
11
11
|
|
|
12
12
|
export const collapsibleWithBlockTitle = (args) => {
|
|
13
13
|
return {
|
|
14
|
-
template: hbs`<PixCollapsible @titleIcon={{titleIcon}}>
|
|
14
|
+
template: hbs`<PixCollapsible @titleIcon={{this.titleIcon}}>
|
|
15
15
|
<:title>
|
|
16
16
|
<span>Titre avec <em>contenu de type block</em></span>
|
|
17
17
|
</:title>
|
|
@@ -26,15 +26,15 @@ export const collapsibleWithBlockTitle = (args) => {
|
|
|
26
26
|
export const multipleCollapsible = (args) => {
|
|
27
27
|
return {
|
|
28
28
|
template: hbs`<div>
|
|
29
|
-
<PixCollapsible @title='Titre A' @titleIcon={{titleIcon}}>
|
|
29
|
+
<PixCollapsible @title='Titre A' @titleIcon={{this.titleIcon}}>
|
|
30
30
|
<div>Contenu A</div>
|
|
31
31
|
</PixCollapsible>
|
|
32
32
|
|
|
33
|
-
<PixCollapsible @title='Titre B' @titleIcon={{titleIcon}}>
|
|
33
|
+
<PixCollapsible @title='Titre B' @titleIcon={{this.titleIcon}}>
|
|
34
34
|
<div>Contenu B</div>
|
|
35
35
|
</PixCollapsible>
|
|
36
36
|
|
|
37
|
-
<PixCollapsible @title='Titre C' @titleIcon={{titleIcon}}>
|
|
37
|
+
<PixCollapsible @title='Titre C' @titleIcon={{this.titleIcon}}>
|
|
38
38
|
<div>Contenu C</div>
|
|
39
39
|
</PixCollapsible>
|
|
40
40
|
</div>`,
|
|
@@ -5,19 +5,19 @@ export const Template = (args) => {
|
|
|
5
5
|
return {
|
|
6
6
|
template: hbs`<div style='width: 300px;'>
|
|
7
7
|
<PixDropdown
|
|
8
|
-
@id={{id}}
|
|
9
|
-
@options={{options}}
|
|
10
|
-
@onSelect={{onSelect}}
|
|
11
|
-
@placeholder={{placeholder}}
|
|
12
|
-
@selectedOption={{selectedOption}}
|
|
13
|
-
@isSearchable={{isSearchable}}
|
|
14
|
-
@searchPlaceholder={{searchPlaceholder}}
|
|
15
|
-
@label={{label}}
|
|
16
|
-
@clearLabel={{clearLabel}}
|
|
17
|
-
@expandLabel={{expandLabel}}
|
|
18
|
-
@collapseLabel={{collapseLabel}}
|
|
19
|
-
@pageSize={{pageSize}}
|
|
20
|
-
@requiredLabel={{requiredLabel}}
|
|
8
|
+
@id={{this.id}}
|
|
9
|
+
@options={{this.options}}
|
|
10
|
+
@onSelect={{this.onSelect}}
|
|
11
|
+
@placeholder={{this.placeholder}}
|
|
12
|
+
@selectedOption={{this.selectedOption}}
|
|
13
|
+
@isSearchable={{this.isSearchable}}
|
|
14
|
+
@searchPlaceholder={{this.searchPlaceholder}}
|
|
15
|
+
@label={{this.label}}
|
|
16
|
+
@clearLabel={{this.clearLabel}}
|
|
17
|
+
@expandLabel={{this.expandLabel}}
|
|
18
|
+
@collapseLabel={{this.collapseLabel}}
|
|
19
|
+
@pageSize={{this.pageSize}}
|
|
20
|
+
@requiredLabel={{this.requiredLabel}}
|
|
21
21
|
/>
|
|
22
22
|
</div>`,
|
|
23
23
|
context: args,
|
|
@@ -4,10 +4,10 @@ import { action } from '@storybook/addon-actions';
|
|
|
4
4
|
export const filterBanner = (args) => {
|
|
5
5
|
return {
|
|
6
6
|
template: hbs`<PixFilterBanner
|
|
7
|
-
@title={{title}}
|
|
8
|
-
@details={{details}}
|
|
9
|
-
@clearFiltersLabel={{clearFiltersLabel}}
|
|
10
|
-
@onClearFilters={{onClearFilters}}
|
|
7
|
+
@title={{this.title}}
|
|
8
|
+
@details={{this.details}}
|
|
9
|
+
@clearFiltersLabel={{this.clearFiltersLabel}}
|
|
10
|
+
@onClearFilters={{this.onClearFilters}}
|
|
11
11
|
>
|
|
12
12
|
<PixSelect @options={{this.options}} @onChange={{this.onChange}} />
|
|
13
13
|
<PixSelect @options={{this.options}} @onChange={{this.onChange}} />
|
|
@@ -4,18 +4,18 @@ const Template = (args) => {
|
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`
|
|
6
6
|
<PixFilterableAndSearchableSelect
|
|
7
|
-
@label={{label}}
|
|
8
|
-
@subLabel={{subLabel}}
|
|
9
|
-
@screenReaderOnly={{screenReaderOnly}}
|
|
10
|
-
@placeholder={{placeholder}}
|
|
11
|
-
@options={{options}}
|
|
12
|
-
@onChange={{onChange}}
|
|
13
|
-
@categoriesLabel={{categoriesLabel}}
|
|
14
|
-
@categoriesPlaceholder={{categoriesPlaceholder}}
|
|
15
|
-
@isSearchable={{isSearchable}}
|
|
16
|
-
@value={{value}}
|
|
17
|
-
@requiredText={{requiredText}}
|
|
18
|
-
@errorMessage={{errorMessage}}
|
|
7
|
+
@label={{this.label}}
|
|
8
|
+
@subLabel={{this.subLabel}}
|
|
9
|
+
@screenReaderOnly={{this.screenReaderOnly}}
|
|
10
|
+
@placeholder={{this.placeholder}}
|
|
11
|
+
@options={{this.options}}
|
|
12
|
+
@onChange={{this.onChange}}
|
|
13
|
+
@categoriesLabel={{this.categoriesLabel}}
|
|
14
|
+
@categoriesPlaceholder={{this.categoriesPlaceholder}}
|
|
15
|
+
@isSearchable={{this.isSearchable}}
|
|
16
|
+
@value={{this.value}}
|
|
17
|
+
@requiredText={{this.requiredText}}
|
|
18
|
+
@errorMessage={{this.errorMessage}}
|
|
19
19
|
/>
|
|
20
20
|
`,
|
|
21
21
|
context: args,
|
|
@@ -4,14 +4,14 @@ import { action } from '@storybook/addon-actions';
|
|
|
4
4
|
const Template = (args) => {
|
|
5
5
|
return {
|
|
6
6
|
template: hbs`<PixIconButton
|
|
7
|
-
@ariaLabel={{ariaLabel}}
|
|
8
|
-
@icon={{icon}}
|
|
9
|
-
@iconPrefix={{iconPrefix}}
|
|
10
|
-
@triggerAction={{triggerAction}}
|
|
11
|
-
@withBackground={{withBackground}}
|
|
12
|
-
@size={{size}}
|
|
13
|
-
disabled={{disabled}}
|
|
14
|
-
aria-disabled={{disabled}}
|
|
7
|
+
@ariaLabel={{this.ariaLabel}}
|
|
8
|
+
@icon={{this.icon}}
|
|
9
|
+
@iconPrefix={{this.iconPrefix}}
|
|
10
|
+
@triggerAction={{this.triggerAction}}
|
|
11
|
+
@withBackground={{this.withBackground}}
|
|
12
|
+
@size={{this.size}}
|
|
13
|
+
disabled={{this.disabled}}
|
|
14
|
+
aria-disabled={{this.disabled}}
|
|
15
15
|
/>`,
|
|
16
16
|
context: args,
|
|
17
17
|
};
|
|
@@ -3,11 +3,11 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixInputCode
|
|
6
|
-
@ariaLabel={{ariaLabel}}
|
|
7
|
-
@legend={{legend}}
|
|
8
|
-
@inputType={{inputType}}
|
|
9
|
-
@numInputs={{numInputs}}
|
|
10
|
-
@explanationOfUse={{explanationOfUse}}
|
|
6
|
+
@ariaLabel={{this.ariaLabel}}
|
|
7
|
+
@legend={{this.legend}}
|
|
8
|
+
@inputType={{this.inputType}}
|
|
9
|
+
@numInputs={{this.numInputs}}
|
|
10
|
+
@explanationOfUse={{this.explanationOfUse}}
|
|
11
11
|
/>`,
|
|
12
12
|
context: args,
|
|
13
13
|
};
|
|
@@ -3,13 +3,13 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixInputPassword
|
|
6
|
-
@ariaLabel={{ariaLabel}}
|
|
7
|
-
@id={{id}}
|
|
8
|
-
@label={{label}}
|
|
9
|
-
@information={{information}}
|
|
10
|
-
@errorMessage={{errorMessage}}
|
|
11
|
-
@prefix={{prefix}}
|
|
12
|
-
@requiredLabel={{requiredLabel}}
|
|
6
|
+
@ariaLabel={{this.ariaLabel}}
|
|
7
|
+
@id={{this.id}}
|
|
8
|
+
@label={{this.label}}
|
|
9
|
+
@information={{this.information}}
|
|
10
|
+
@errorMessage={{this.errorMessage}}
|
|
11
|
+
@prefix={{this.prefix}}
|
|
12
|
+
@requiredLabel={{this.requiredLabel}}
|
|
13
13
|
/>`,
|
|
14
14
|
context: args,
|
|
15
15
|
};
|
|
@@ -3,13 +3,13 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixInput
|
|
6
|
-
@id={{id}}
|
|
7
|
-
@label={{label}}
|
|
8
|
-
@information={{information}}
|
|
9
|
-
@errorMessage={{errorMessage}}
|
|
6
|
+
@id={{this.id}}
|
|
7
|
+
@label={{this.label}}
|
|
8
|
+
@information={{this.information}}
|
|
9
|
+
@errorMessage={{this.errorMessage}}
|
|
10
10
|
placeholder='Jeanne, Pierre ...'
|
|
11
|
-
@requiredLabel={{requiredLabel}}
|
|
12
|
-
@ariaLabel={{ariaLabel}}
|
|
11
|
+
@requiredLabel={{this.requiredLabel}}
|
|
12
|
+
@ariaLabel={{this.ariaLabel}}
|
|
13
13
|
/>`,
|
|
14
14
|
context: args,
|
|
15
15
|
};
|
|
@@ -2,9 +2,9 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
const Template = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixMessage @type={{type}} @withIcon={{withIcon}}>
|
|
5
|
+
template: hbs`<PixMessage @type={{this.type}} @withIcon={{this.withIcon}}>
|
|
6
6
|
Ceci est un message
|
|
7
|
-
{{type}}
|
|
7
|
+
{{this.type}}
|
|
8
8
|
avec un texte tellement long qu'il est nécessaire
|
|
9
9
|
<br />
|
|
10
10
|
de l'afficher sur deux lignes.
|
|
@@ -3,9 +3,9 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixModal
|
|
6
|
-
@showModal={{showModal}}
|
|
6
|
+
@showModal={{this.showModal}}
|
|
7
7
|
@title={{this.title}}
|
|
8
|
-
@onCloseButtonClick={{fn (mut showModal) (not showModal)}}
|
|
8
|
+
@onCloseButtonClick={{fn (mut this.showModal) (not this.showModal)}}
|
|
9
9
|
>
|
|
10
10
|
<:content>
|
|
11
11
|
<p>
|
|
@@ -18,16 +18,14 @@ export const Template = (args) => {
|
|
|
18
18
|
</p>
|
|
19
19
|
</:content>
|
|
20
20
|
<:footer>
|
|
21
|
-
<
|
|
22
|
-
@backgroundColor='transparent-light'
|
|
23
|
-
@
|
|
24
|
-
|
|
25
|
-
>Annuler</PixButton>
|
|
26
|
-
<PixButton @triggerAction={{fn (mut showModal) (not showModal)}}>Valider</PixButton>
|
|
21
|
+
<div style="display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 16px">
|
|
22
|
+
<PixButton @backgroundColor='transparent-light' @isBorderVisible='true' @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Annuler</PixButton>
|
|
23
|
+
<PixButton @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Valider</PixButton>
|
|
24
|
+
</div>
|
|
27
25
|
</:footer>
|
|
28
26
|
</PixModal>
|
|
29
27
|
<div style='display:flex; justify-content:center; align-items:center; height:105vh;'>
|
|
30
|
-
<PixButton @triggerAction={{fn (mut showModal) (not showModal)}}>Ouvrir la modale</PixButton>
|
|
28
|
+
<PixButton @triggerAction={{fn (mut this.showModal) (not this.showModal)}}>Ouvrir la modale</PixButton>
|
|
31
29
|
</div>`,
|
|
32
30
|
context: args,
|
|
33
31
|
};
|
|
@@ -3,10 +3,10 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixPagination
|
|
6
|
-
@pagination={{pagination}}
|
|
7
|
-
@locale={{locale}}
|
|
8
|
-
@pageOptions={{pageOptions}}
|
|
9
|
-
@isCondensed={{isCondensed}}
|
|
6
|
+
@pagination={{this.pagination}}
|
|
7
|
+
@locale={{this.locale}}
|
|
8
|
+
@pageOptions={{this.pageOptions}}
|
|
9
|
+
@isCondensed={{this.isCondensed}}
|
|
10
10
|
/>`,
|
|
11
11
|
context: args,
|
|
12
12
|
};
|
|
@@ -3,11 +3,11 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Default = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixProgressGauge
|
|
6
|
-
@value={{value}}
|
|
7
|
-
@color={{color}}
|
|
8
|
-
@isArrowLeft={{isArrowLeft}}
|
|
9
|
-
@subtitle={{subtitle}}
|
|
10
|
-
@tooltipText={{tooltipText}}
|
|
6
|
+
@value={{this.value}}
|
|
7
|
+
@color={{this.color}}
|
|
8
|
+
@isArrowLeft={{this.isArrowLeft}}
|
|
9
|
+
@subtitle={{this.subtitle}}
|
|
10
|
+
@tooltipText={{this.tooltipText}}
|
|
11
11
|
/>`,
|
|
12
12
|
context: args,
|
|
13
13
|
};
|
|
@@ -20,11 +20,11 @@ export const whiteProgressGauge = (args) => {
|
|
|
20
20
|
return {
|
|
21
21
|
template: hbs`<section style='width: 100%; padding: 35px 35px 5px;background-color: lightgray'>
|
|
22
22
|
<PixProgressGauge
|
|
23
|
-
@value={{value}}
|
|
24
|
-
@color={{color}}
|
|
25
|
-
@isArrowLeft={{isArrowLeft}}
|
|
26
|
-
@subtitle={{subtitle}}
|
|
27
|
-
@tooltipText={{tooltipText}}
|
|
23
|
+
@value={{this.value}}
|
|
24
|
+
@color={{this.color}}
|
|
25
|
+
@isArrowLeft={{this.isArrowLeft}}
|
|
26
|
+
@subtitle={{this.subtitle}}
|
|
27
|
+
@tooltipText={{this.tooltipText}}
|
|
28
28
|
/>
|
|
29
29
|
</section>`,
|
|
30
30
|
context: args,
|
|
@@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
const Template = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixRadioButton @label={{label}} @value={{value}} @isDisabled={{isDisabled}} />`,
|
|
5
|
+
template: hbs`<PixRadioButton @label={{this.label}} @value={{this.value}} @isDisabled={{this.isDisabled}} />`,
|
|
6
6
|
context: args,
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -20,7 +20,7 @@ isDisabled.args = {
|
|
|
20
20
|
|
|
21
21
|
const checked = (args) => {
|
|
22
22
|
return {
|
|
23
|
-
template: hbs`<PixRadioButton @label={{label}} @isDisabled={{isDisabled}} checked />`,
|
|
23
|
+
template: hbs`<PixRadioButton @label={{this.label}} @isDisabled={{this.isDisabled}} checked />`,
|
|
24
24
|
context: args,
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
export const returnTo = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixReturnTo @route='profile' @shade={{shade}} />`,
|
|
5
|
+
template: hbs`<PixReturnTo @route='profile' @shade={{this.shade}} />`,
|
|
6
6
|
context: args,
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -12,7 +12,7 @@ returnTo.args = {
|
|
|
12
12
|
|
|
13
13
|
export const returnToWithText = (args) => {
|
|
14
14
|
return {
|
|
15
|
-
template: hbs`<PixReturnTo @route='profile' @shade={{shade}}>
|
|
15
|
+
template: hbs`<PixReturnTo @route='profile' @shade={{this.shade}}>
|
|
16
16
|
Retour vers mon profil
|
|
17
17
|
</PixReturnTo>`,
|
|
18
18
|
context: args,
|
|
@@ -2,14 +2,14 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
export const selectableTagDefault = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixSelectableTag @label='non sélectionné' @id='123' @onChange={{onChange}} @checked={{false}} />`,
|
|
5
|
+
template: hbs`<PixSelectableTag @label='non sélectionné' @id='123' @onChange={{this.onChange}} @checked={{false}} />`,
|
|
6
6
|
context: args,
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const selectableTagSelected = (args) => {
|
|
11
11
|
return {
|
|
12
|
-
template: hbs`<PixSelectableTag @label='Sélectionné' @id='456' @onChange={{onChange}} @checked={{true}} />`,
|
|
12
|
+
template: hbs`<PixSelectableTag @label='Sélectionné' @id='456' @onChange={{this.onChange}} @checked={{true}} />`,
|
|
13
13
|
context: args,
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -17,9 +17,9 @@ export const selectableTagSelected = (args) => {
|
|
|
17
17
|
export const selectableTagMultiple = (args) => {
|
|
18
18
|
return {
|
|
19
19
|
template: hbs`<div style='display:flex;justify-content:space-around;width:400px;height:100%;padding:10px'>
|
|
20
|
-
<PixSelectableTag @label='Lorem ipsum' @id='1' @onChange={{onChange}} @checked={{false}} />
|
|
21
|
-
<PixSelectableTag @label='Lorem ipsum' @id='2' @onChange={{onChange}} @checked={{false}} />
|
|
22
|
-
<PixSelectableTag @label='Lorem ipsum' @id='3' @onChange={{onChange}} @checked={{false}} />
|
|
20
|
+
<PixSelectableTag @label='Lorem ipsum' @id='1' @onChange={{this.onChange}} @checked={{false}} />
|
|
21
|
+
<PixSelectableTag @label='Lorem ipsum' @id='2' @onChange={{this.onChange}} @checked={{false}} />
|
|
22
|
+
<PixSelectableTag @label='Lorem ipsum' @id='3' @onChange={{this.onChange}} @checked={{false}} />
|
|
23
23
|
</div>`,
|
|
24
24
|
context: args,
|
|
25
25
|
};
|
|
@@ -3,9 +3,9 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const Template = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixSidebar
|
|
6
|
-
@showSidebar={{showSidebar}}
|
|
7
|
-
@title={{title}}
|
|
8
|
-
@onClose={{fn (mut showSidebar) (not showSidebar)}}
|
|
6
|
+
@showSidebar={{this.showSidebar}}
|
|
7
|
+
@title={{this.title}}
|
|
8
|
+
@onClose={{fn (mut this.showSidebar) (not this.showSidebar)}}
|
|
9
9
|
>
|
|
10
10
|
<:content>
|
|
11
11
|
<p>
|
|
@@ -18,14 +18,14 @@ export const Template = (args) => {
|
|
|
18
18
|
<PixButton
|
|
19
19
|
@backgroundColor='transparent-light'
|
|
20
20
|
@isBorderVisible='true'
|
|
21
|
-
@triggerAction={{fn (mut showSidebar) (not showSidebar)}}
|
|
21
|
+
@triggerAction={{fn (mut this.showSidebar) (not this.showSidebar)}}
|
|
22
22
|
>Annuler</PixButton>
|
|
23
|
-
<PixButton @triggerAction={{fn (mut showSidebar) (not showSidebar)}}>Valider</PixButton>
|
|
23
|
+
<PixButton @triggerAction={{fn (mut this.showSidebar) (not this.showSidebar)}}>Valider</PixButton>
|
|
24
24
|
</div>
|
|
25
25
|
</:footer>
|
|
26
26
|
</PixSidebar>
|
|
27
27
|
<div style='display:flex; justify-content:center; align-items:center; height:105vh;'>
|
|
28
|
-
<PixButton @triggerAction={{fn (mut showSidebar) (not showSidebar)}} style='height:45px'>Ouvrir la
|
|
28
|
+
<PixButton @triggerAction={{fn (mut this.showSidebar) (not this.showSidebar)}} style='height:45px'>Ouvrir la
|
|
29
29
|
sidebar</PixButton>
|
|
30
30
|
</div>`,
|
|
31
31
|
context: args,
|
|
@@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
export const stars = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixStars @count={{count}} @total={{total}} @alt={{alt}} @color={{color}} />`,
|
|
5
|
+
template: hbs`<PixStars @count={{this.count}} @total={{this.total}} @alt={{this.alt}} @color={{this.color}} />`,
|
|
6
6
|
context: args,
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
2
2
|
|
|
3
3
|
export const tag = (args) => {
|
|
4
4
|
return {
|
|
5
|
-
template: hbs`<PixTag @color={{color}} @compact={{compact}}>
|
|
5
|
+
template: hbs`<PixTag @color={{this.color}} @compact={{this.compact}}>
|
|
6
6
|
Contenu du tag
|
|
7
7
|
</PixTag>`,
|
|
8
8
|
context: args,
|
|
@@ -11,7 +11,7 @@ export const tag = (args) => {
|
|
|
11
11
|
|
|
12
12
|
export const compactTag = (args) => {
|
|
13
13
|
return {
|
|
14
|
-
template: hbs`<PixTag @color={{color}} @compact={{compact}}>
|
|
14
|
+
template: hbs`<PixTag @color={{this.color}} @compact={{this.compact}}>
|
|
15
15
|
Contenu du tag
|
|
16
16
|
</PixTag>`,
|
|
17
17
|
context: args,
|
|
@@ -3,11 +3,11 @@ import { hbs } from 'ember-cli-htmlbars';
|
|
|
3
3
|
export const textarea = (args) => {
|
|
4
4
|
return {
|
|
5
5
|
template: hbs`<PixTextarea
|
|
6
|
-
@id={{id}}
|
|
7
|
-
@value={{value}}
|
|
8
|
-
@maxlength={{maxlength}}
|
|
9
|
-
@label={{label}}
|
|
10
|
-
@errorMessage={{errorMessage}}
|
|
6
|
+
@id={{this.id}}
|
|
7
|
+
@value={{this.value}}
|
|
8
|
+
@maxlength={{this.maxlength}}
|
|
9
|
+
@label={{this.label}}
|
|
10
|
+
@errorMessage={{this.errorMessage}}
|
|
11
11
|
/>`,
|
|
12
12
|
context: args,
|
|
13
13
|
};
|