@1024pix/pix-ui 46.13.0 → 46.13.2
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/package.json +6 -6
- package/app/stories/form.mdx +0 -11
- package/app/stories/form.stories.js +0 -142
- package/app/stories/pix-background-header.mdx +0 -29
- package/app/stories/pix-background-header.stories.js +0 -33
- package/app/stories/pix-banner.mdx +0 -86
- package/app/stories/pix-banner.stories.js +0 -112
- package/app/stories/pix-block.mdx +0 -32
- package/app/stories/pix-block.stories.js +0 -22
- package/app/stories/pix-button-link.mdx +0 -39
- package/app/stories/pix-button-link.stories.js +0 -114
- package/app/stories/pix-button-upload.mdx +0 -26
- package/app/stories/pix-button-upload.stories.js +0 -81
- package/app/stories/pix-button.mdx +0 -79
- package/app/stories/pix-button.stories.js +0 -270
- package/app/stories/pix-checkbox-variant-tile.mdx +0 -49
- package/app/stories/pix-checkbox-variant-tile.stories.js +0 -102
- package/app/stories/pix-checkbox.mdx +0 -75
- package/app/stories/pix-checkbox.stories.js +0 -220
- package/app/stories/pix-collapsible.mdx +0 -37
- package/app/stories/pix-collapsible.stories.js +0 -104
- package/app/stories/pix-filter-banner.mdx +0 -26
- package/app/stories/pix-filter-banner.stories.js +0 -87
- package/app/stories/pix-filterable-and-searchable-select.mdx +0 -62
- package/app/stories/pix-filterable-and-searchable-select.stories.js +0 -202
- package/app/stories/pix-icon-button.mdx +0 -84
- package/app/stories/pix-icon-button.stories.js +0 -108
- package/app/stories/pix-icon.mdx +0 -20
- package/app/stories/pix-icon.stories.js +0 -51
- package/app/stories/pix-indicator-card.mdx +0 -41
- package/app/stories/pix-indicator-card.stories.js +0 -78
- package/app/stories/pix-input-code.mdx +0 -33
- package/app/stories/pix-input-code.stories.js +0 -75
- package/app/stories/pix-input-password.mdx +0 -76
- package/app/stories/pix-input-password.stories.js +0 -145
- package/app/stories/pix-input.mdx +0 -104
- package/app/stories/pix-input.stories.js +0 -175
- package/app/stories/pix-label.mdx +0 -47
- package/app/stories/pix-label.stories.js +0 -112
- package/app/stories/pix-message.mdx +0 -54
- package/app/stories/pix-message.stories.js +0 -61
- package/app/stories/pix-modal.mdx +0 -53
- package/app/stories/pix-modal.stories.js +0 -73
- package/app/stories/pix-multi-select.mdx +0 -55
- package/app/stories/pix-multi-select.stories.js +0 -290
- package/app/stories/pix-pagination.mdx +0 -56
- package/app/stories/pix-pagination.stories.js +0 -148
- package/app/stories/pix-progress-gauge.mdx +0 -40
- package/app/stories/pix-progress-gauge.stories.js +0 -117
- package/app/stories/pix-radio-button-variant-tile.mdx +0 -46
- package/app/stories/pix-radio-button-variant-tile.stories.js +0 -92
- package/app/stories/pix-radio-button.mdx +0 -59
- package/app/stories/pix-radio-button.stories.js +0 -165
- package/app/stories/pix-return-to.mdx +0 -34
- package/app/stories/pix-return-to.stories.js +0 -41
- package/app/stories/pix-search-input.mdx +0 -41
- package/app/stories/pix-search-input.stories.js +0 -117
- package/app/stories/pix-select.mdx +0 -80
- package/app/stories/pix-select.stories.js +0 -445
- package/app/stories/pix-selectable-tag.mdx +0 -37
- package/app/stories/pix-selectable-tag.stories.js +0 -69
- package/app/stories/pix-sidebar.mdx +0 -49
- package/app/stories/pix-sidebar.stories.js +0 -74
- package/app/stories/pix-stars.mdx +0 -22
- package/app/stories/pix-stars.stories.js +0 -45
- package/app/stories/pix-tag.mdx +0 -26
- package/app/stories/pix-tag.stories.js +0 -25
- package/app/stories/pix-textarea.mdx +0 -50
- package/app/stories/pix-textarea.stories.js +0 -146
- package/app/stories/pix-toggle.mdx +0 -28
- package/app/stories/pix-toggle.stories.js +0 -134
- package/app/stories/pix-tooltip.mdx +0 -183
- package/app/stories/pix-tooltip.stories.js +0 -215
- package/app/styles/app.scss +0 -0
- package/scripts/migrate-colors-scss-vars-to-css-vars.sh +0 -120
- package/scripts/migrate-spacing-scss-vars-to-css-vars.sh +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/pix-ui",
|
|
3
|
-
"version": "46.13.
|
|
3
|
+
"version": "46.13.2",
|
|
4
4
|
"description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"ember-load-initializers": "^2.1.2",
|
|
104
104
|
"ember-page-title": "^8.0.0",
|
|
105
105
|
"ember-qunit": "^8.0.0",
|
|
106
|
-
"ember-resolver": "^
|
|
106
|
+
"ember-resolver": "^13.0.0",
|
|
107
107
|
"ember-sinon": "^5.0.0",
|
|
108
108
|
"ember-source": "^4.0.1",
|
|
109
109
|
"ember-source-channel-url": "^3.0.0",
|
|
@@ -141,11 +141,11 @@
|
|
|
141
141
|
},
|
|
142
142
|
"files": [
|
|
143
143
|
"addon/",
|
|
144
|
-
"app/",
|
|
144
|
+
"app/components",
|
|
145
|
+
"app/modifiers",
|
|
146
|
+
"app/services",
|
|
145
147
|
"config/icons.js",
|
|
146
|
-
"public/"
|
|
147
|
-
"scripts/migrate-colors-scss-vars-to-css-vars.sh",
|
|
148
|
-
"scripts/migrate-spacing-scss-vars-to-css-vars.sh"
|
|
148
|
+
"public/"
|
|
149
149
|
],
|
|
150
150
|
"storybook-deployer": {
|
|
151
151
|
"commitMessage": "Deploy Storybook [skip ci]"
|
package/app/stories/form.mdx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Canvas } from '@storybook/addon-docs';
|
|
2
|
-
import * as stories from './form.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={stories} />
|
|
5
|
-
|
|
6
|
-
# Formulaire avec les composants Pix UI
|
|
7
|
-
|
|
8
|
-
Un formulaire complet avec les composants Pix UI :
|
|
9
|
-
|
|
10
|
-
<Story of={stories.form} height={700} />
|
|
11
|
-
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
-
import { action } from '@storybook/addon-actions';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Form/Exemple de formulaire',
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const form = (args) => {
|
|
9
|
-
return {
|
|
10
|
-
template: hbs`<form>
|
|
11
|
-
<PixInput
|
|
12
|
-
@id='firstName'
|
|
13
|
-
@errorMessage={{this.genericErrorMessage}}
|
|
14
|
-
@requiredLabel='champ obligatoire'
|
|
15
|
-
@validationStatus={{this.validationStatus}}
|
|
16
|
-
>
|
|
17
|
-
<:label>Prénom</:label>
|
|
18
|
-
</PixInput>
|
|
19
|
-
<br />
|
|
20
|
-
<PixInputPassword @id='password' @errorMessage={{this.genericErrorMessage}}>
|
|
21
|
-
<:label>Mot de passe</:label>
|
|
22
|
-
</PixInputPassword>
|
|
23
|
-
<br />
|
|
24
|
-
|
|
25
|
-
<PixMultiSelect
|
|
26
|
-
@id='form__pix-multi-select'
|
|
27
|
-
@onSelect={{this.onSelect}}
|
|
28
|
-
@selected={{this.selected}}
|
|
29
|
-
@options={{this.options}}
|
|
30
|
-
>
|
|
31
|
-
<:label>A quel point aimez-vous Pix UI ?</:label>
|
|
32
|
-
<:placeholder>Votre notation en étoiles...</:placeholder>
|
|
33
|
-
<:default as |star|>
|
|
34
|
-
<PixStars @count={{star.value}} @total={{star.total}} />
|
|
35
|
-
</:default>
|
|
36
|
-
</PixMultiSelect>
|
|
37
|
-
<br /><br />
|
|
38
|
-
|
|
39
|
-
<PixMultiSelect
|
|
40
|
-
@id='form__pix-multi-select-searchable'
|
|
41
|
-
@onSelect={{this.onSelect}}
|
|
42
|
-
@selected={{this.selected}}
|
|
43
|
-
@isSearchable={{true}}
|
|
44
|
-
@options={{this.optionsSearch}}
|
|
45
|
-
>
|
|
46
|
-
<:label>Choississez vos condiments</:label>
|
|
47
|
-
<:placeholder>Mes condiments</:placeholder>
|
|
48
|
-
<:default as |condiment|>
|
|
49
|
-
{{condiment.label}}
|
|
50
|
-
</:default>
|
|
51
|
-
</PixMultiSelect>
|
|
52
|
-
<br /><br />
|
|
53
|
-
{{! template-lint-disable no-inline-styles }}
|
|
54
|
-
|
|
55
|
-
<PixSelect
|
|
56
|
-
@id='form__searchable-pix-select'
|
|
57
|
-
@options={{this.selectOptions}}
|
|
58
|
-
@isSearchable={{true}}
|
|
59
|
-
@isValidationActive={{true}}
|
|
60
|
-
placeholder='Fraises, Mangues...'
|
|
61
|
-
style='width:100%'
|
|
62
|
-
>
|
|
63
|
-
<:label>Votre fruit préféré est :</:label>
|
|
64
|
-
</PixSelect>
|
|
65
|
-
<br />
|
|
66
|
-
|
|
67
|
-
<PixTextarea
|
|
68
|
-
@id='form__pix-textarea'
|
|
69
|
-
@maxlength={{200}}
|
|
70
|
-
@requiredLabel='Champ obligatoire'
|
|
71
|
-
@errorMessage={{this.genericErrorMessage}}
|
|
72
|
-
>
|
|
73
|
-
<:label>Un commentaire ?</:label>
|
|
74
|
-
</PixTextarea>
|
|
75
|
-
<br />
|
|
76
|
-
|
|
77
|
-
<label class='pix-form__label'> Votre légume préféré est : </label>
|
|
78
|
-
<PixRadioButton @value='chou' name='légume'>
|
|
79
|
-
<:label>Chou</:label>
|
|
80
|
-
</PixRadioButton>
|
|
81
|
-
<PixRadioButton @value='carotte' name='légume'>
|
|
82
|
-
<:label>Carotte</:label>
|
|
83
|
-
</PixRadioButton>
|
|
84
|
-
|
|
85
|
-
<br />
|
|
86
|
-
|
|
87
|
-
<PixCheckbox @id='spam-pub' @size='small'>
|
|
88
|
-
<:label>Acceptez-vous de vous faire spammer de PUB ?</:label>
|
|
89
|
-
</PixCheckbox>
|
|
90
|
-
|
|
91
|
-
<br /><br />
|
|
92
|
-
|
|
93
|
-
<ul class='pix-form__actions'>
|
|
94
|
-
<li>
|
|
95
|
-
<PixButtonLink @route='' @model='' @variant='secondary' @isBorderVisible={{true}}>
|
|
96
|
-
Annuler
|
|
97
|
-
</PixButtonLink>
|
|
98
|
-
</li>
|
|
99
|
-
<li>
|
|
100
|
-
<PixButton @type='submit'>Envoyer mes réponses</PixButton>
|
|
101
|
-
</li>
|
|
102
|
-
<li>
|
|
103
|
-
<PixButtonUpload @id='file-upload' accept='.csv'>
|
|
104
|
-
Importer un fichier
|
|
105
|
-
</PixButtonUpload>
|
|
106
|
-
</li>
|
|
107
|
-
</ul>
|
|
108
|
-
</form>`,
|
|
109
|
-
context: args,
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
form.args = {
|
|
113
|
-
genericErrorMessage: '',
|
|
114
|
-
selected: ['1', '4'],
|
|
115
|
-
options: [
|
|
116
|
-
{ value: '1', total: 3 },
|
|
117
|
-
{ value: '2', total: 3 },
|
|
118
|
-
{ value: '3', total: 3 },
|
|
119
|
-
],
|
|
120
|
-
optionsSearch: [
|
|
121
|
-
{ value: 'Cornichon', label: 'Cornichon' },
|
|
122
|
-
{ value: 'Ail', label: 'Ail' },
|
|
123
|
-
{ value: 'Oignon', label: 'Oignon' },
|
|
124
|
-
{ value: 'Aigre-Doux', label: 'Aigre-douc' },
|
|
125
|
-
{ value: 'Soja sucré', label: 'Soja sucré' },
|
|
126
|
-
],
|
|
127
|
-
cancel: action('cancel'),
|
|
128
|
-
onSelect: action('onSelect'),
|
|
129
|
-
selectOptions: [
|
|
130
|
-
{ value: 'Figues', label: 'Figues' },
|
|
131
|
-
{ value: 'Bananes', label: 'Bananes' },
|
|
132
|
-
{ value: 'Noix', label: 'Noix' },
|
|
133
|
-
{ value: 'Papayes', label: 'Papayes' },
|
|
134
|
-
{ value: 'Fèves de chocolat', label: 'Fèves de chocolat' },
|
|
135
|
-
{ value: 'Dattes', label: 'Dattes' },
|
|
136
|
-
{ value: 'Mangues', label: 'Mangues' },
|
|
137
|
-
{ value: 'Jujube', label: 'Jujube' },
|
|
138
|
-
{ value: 'Avocat', label: 'Avocat' },
|
|
139
|
-
{ value: 'Fraises', label: 'Fraises' },
|
|
140
|
-
{ value: 'Kaki', label: 'Kaki' },
|
|
141
|
-
],
|
|
142
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
-
import * as ComponentStories from './pix-background-header.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={ComponentStories} />
|
|
5
|
-
|
|
6
|
-
# Pix Background Header
|
|
7
|
-
|
|
8
|
-
Un `BackgroundHeader` est une bannière donnant un fond de couleur bleu en haut d'une page.
|
|
9
|
-
Les enfants de la bannière se mettrons en colonne.
|
|
10
|
-
|
|
11
|
-
> Pour le moment ce composant n'est pas paramétrable car nous n'avons pas d'autres types de bannières.
|
|
12
|
-
|
|
13
|
-
> Le `BackgroundHeader` se couple bien avec un ou plusieurs `PixBlock`.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<Story of={ComponentStories.backgroundHeader} height={500} />
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
```html
|
|
22
|
-
<PixBackgroundHeader>
|
|
23
|
-
<PixBlock> Lorem ipsum </PixBlock>
|
|
24
|
-
</PixBackgroundHeader>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Arguments
|
|
28
|
-
|
|
29
|
-
Le composant ne prend pas d'arguments
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Layout/Background Header',
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const backgroundHeader = (args) => {
|
|
8
|
-
return {
|
|
9
|
-
template: hbs`<PixBackgroundHeader>
|
|
10
|
-
{{! template-lint-disable no-inline-styles }}
|
|
11
|
-
|
|
12
|
-
<PixBlock style='margin: 0 0 32px; padding: 14px 24px;'>Un panel avec du text</PixBlock>
|
|
13
|
-
{{! template-lint-disable no-inline-styles }}
|
|
14
|
-
|
|
15
|
-
<PixBlock style='padding: 14px 24px;'>
|
|
16
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a interdum mauris. Morbi ac diam
|
|
17
|
-
varius, maximus massa id, venenatis lectus. Fusce interdum tincidunt mattis. Nullam porta
|
|
18
|
-
sollicitudin lorem, sodales cursus arcu finibus in. Nam pretium congue diam sollicitudin
|
|
19
|
-
faucibus. Aliquam nec augue massa. Pellentesque eleifend nec arcu eu tincidunt. Pellentesque at
|
|
20
|
-
quam dignissim, lacinia sem et, pharetra magna. Etiam venenatis felis augue, id sollicitudin
|
|
21
|
-
sapien interdum at. Cras bibendum fermentum eros, rutrum varius turpis venenatis vitae.
|
|
22
|
-
Suspendisse aliquet iaculis sem in blandit. Mauris vitae erat lobortis est volutpat bibendum non
|
|
23
|
-
molestie purus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur
|
|
24
|
-
ridiculus mus. Sed consequat porttitor metus a imperdiet. Duis quis enim fermentum, sodales
|
|
25
|
-
massa sit amet, blandit elit. Aliquam felis purus, dictum sed pretium vel, aliquam sit amet
|
|
26
|
-
felis. Nunc convallis pellentesque convallis. Suspendisse potenti. Aenean iaculis, nunc placerat
|
|
27
|
-
aliquam posuere, tellus enim facilisis metus, non egestas sapien arcu et leo.
|
|
28
|
-
</PixBlock>
|
|
29
|
-
|
|
30
|
-
</PixBackgroundHeader>`,
|
|
31
|
-
context: args,
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
-
import * as ComponentStories from './pix-banner.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={ComponentStories} />
|
|
5
|
-
|
|
6
|
-
# Pix Banner
|
|
7
|
-
|
|
8
|
-
Une `Banner` permet de mettre en avant une information importante.
|
|
9
|
-
|
|
10
|
-
> Il est possible de surcharger le style d'une `<PixBanner>` via l'attribut `class` ainsi que de passer n'importe quel attribut sur sa `div` wrapper (par exemple, un `aria-label`)
|
|
11
|
-
|
|
12
|
-
## Default
|
|
13
|
-
|
|
14
|
-
Bannière Information (par défaut).
|
|
15
|
-
|
|
16
|
-
<Story of={ComponentStories.Default} height={75}/>
|
|
17
|
-
|
|
18
|
-
## Warning
|
|
19
|
-
|
|
20
|
-
Bannière pour les alertes.
|
|
21
|
-
|
|
22
|
-
<Story of={ComponentStories.warning} height={75} />
|
|
23
|
-
|
|
24
|
-
## Error
|
|
25
|
-
|
|
26
|
-
Bannière pour les erreurs.
|
|
27
|
-
|
|
28
|
-
<Story of={ComponentStories.error} height={75} />
|
|
29
|
-
|
|
30
|
-
## Communication
|
|
31
|
-
|
|
32
|
-
Bannière pour Pix App
|
|
33
|
-
<Story of={ComponentStories.communicationPixApp} height={75} />
|
|
34
|
-
Bannière pour Pix Orga
|
|
35
|
-
<Story of={ComponentStories.communicationPixOrga} height={75} />
|
|
36
|
-
Bannière pour Pix Certif
|
|
37
|
-
<Story of={ComponentStories.communicationPixCertif} height={75} />
|
|
38
|
-
|
|
39
|
-
## With Internal Link
|
|
40
|
-
|
|
41
|
-
Bannière contenant un lien interne.
|
|
42
|
-
|
|
43
|
-
<Story of={ComponentStories.withInternalLink} height={100} />
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## With External Link
|
|
47
|
-
|
|
48
|
-
Bannière contenant un lien externe.
|
|
49
|
-
|
|
50
|
-
<Story of={ComponentStories.withExternalLink} height={100} />
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## With Close Icon
|
|
54
|
-
|
|
55
|
-
Bannière contenant un bouton qui permet de fermer la bannière.
|
|
56
|
-
|
|
57
|
-
<Story of={ComponentStories.withCloseIcon} height={100} />
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Usage
|
|
61
|
-
|
|
62
|
-
```html
|
|
63
|
-
<PixBanner> Bannière Info par défaut </PixBanner>
|
|
64
|
-
|
|
65
|
-
<PixBanner @type="communication"> Bannière Communication pour Pix App </PixBanner>
|
|
66
|
-
|
|
67
|
-
<PixBanner @type="warning"> Bannière Warning </PixBanner>
|
|
68
|
-
|
|
69
|
-
<PixBanner @type="error"> Bannière Error </PixBanner>
|
|
70
|
-
|
|
71
|
-
<PixBanner @actionLabel="Liste des campagnes" @actionUrl="authenticated.campaigns">
|
|
72
|
-
Bannière avec une route pour lien
|
|
73
|
-
</PixBanner>
|
|
74
|
-
|
|
75
|
-
<PixBanner @actionLabel="Ajouter des élèves" @actionUrl="https://orga.pix.fr/eleves">
|
|
76
|
-
Bannière avec une route externe
|
|
77
|
-
</PixBanner>
|
|
78
|
-
|
|
79
|
-
<PixBanner @type="warning" @canCloseBanner="true">
|
|
80
|
-
Bannière possédant un bouton de fermeture
|
|
81
|
-
</PixBanner>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Arguments
|
|
85
|
-
|
|
86
|
-
<ArgTypes of={ComponentStories} />
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Notification/Banner',
|
|
5
|
-
argTypes: {
|
|
6
|
-
actionLabel: {
|
|
7
|
-
name: 'actionLabel',
|
|
8
|
-
description: 'Nom de l‘action',
|
|
9
|
-
type: { name: 'string', required: false },
|
|
10
|
-
},
|
|
11
|
-
actionUrl: {
|
|
12
|
-
name: 'actionUrl',
|
|
13
|
-
description: 'Lien de l‘action',
|
|
14
|
-
type: { name: 'string', required: false },
|
|
15
|
-
},
|
|
16
|
-
type: {
|
|
17
|
-
name: 'type',
|
|
18
|
-
description: 'Définit le type de bannière',
|
|
19
|
-
type: { name: 'string', required: false },
|
|
20
|
-
table: { defaultValue: { summary: 'information' } },
|
|
21
|
-
control: {
|
|
22
|
-
type: 'select',
|
|
23
|
-
},
|
|
24
|
-
options: [
|
|
25
|
-
'information',
|
|
26
|
-
'warning',
|
|
27
|
-
'error',
|
|
28
|
-
'communication',
|
|
29
|
-
'communication-orga',
|
|
30
|
-
'communication-certif',
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
canCloseBanner: {
|
|
34
|
-
name: 'canCloseBanner',
|
|
35
|
-
description: 'Afficher la croix pour fermer la bannière',
|
|
36
|
-
type: { name: 'boolean', required: false },
|
|
37
|
-
table: {
|
|
38
|
-
type: { summary: 'boolean' },
|
|
39
|
-
defaultValue: { summary: false },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
onCloseBannerTriggerAction: {
|
|
43
|
-
name: 'onCloseBannerTriggerAction',
|
|
44
|
-
description:
|
|
45
|
-
'Fonction à appeler lors de la fermeture de la bannière. Doit être utilisé avec le paramètre canCloseBanner',
|
|
46
|
-
type: { required: false },
|
|
47
|
-
control: { disable: true },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const Template = (args) => {
|
|
53
|
-
return {
|
|
54
|
-
template: hbs`<PixBanner
|
|
55
|
-
@type={{this.type}}
|
|
56
|
-
@actionLabel={{this.actionLabel}}
|
|
57
|
-
@actionUrl={{this.actionUrl}}
|
|
58
|
-
@canCloseBanner={{this.canCloseBanner}}
|
|
59
|
-
>
|
|
60
|
-
Parcours de rentrée 2020 : les codes sont disponibles dans l'onglet campagne. N’oubliez pas de les
|
|
61
|
-
diffuser aux élèves avant la Toussaint.
|
|
62
|
-
</PixBanner>`,
|
|
63
|
-
context: args,
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const Default = Template.bind({});
|
|
68
|
-
|
|
69
|
-
export const warning = Template.bind({});
|
|
70
|
-
warning.args = {
|
|
71
|
-
type: 'warning',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const error = Template.bind({});
|
|
75
|
-
error.args = {
|
|
76
|
-
type: 'error',
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const communicationPixApp = Template.bind({});
|
|
80
|
-
communicationPixApp.args = {
|
|
81
|
-
type: 'communication',
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const communicationPixOrga = Template.bind({});
|
|
85
|
-
communicationPixOrga.args = {
|
|
86
|
-
type: 'communication-orga',
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const communicationPixCertif = Template.bind({});
|
|
90
|
-
communicationPixCertif.args = {
|
|
91
|
-
type: 'communication-certif',
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export const withExternalLink = Template.bind({});
|
|
95
|
-
withExternalLink.args = {
|
|
96
|
-
type: 'information',
|
|
97
|
-
actionLabel: 'Voir le nouveau site',
|
|
98
|
-
actionUrl: 'www.test.fr/',
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const withInternalLink = Template.bind({});
|
|
102
|
-
withInternalLink.args = {
|
|
103
|
-
type: 'information',
|
|
104
|
-
actionLabel: 'Voir la liste des participants',
|
|
105
|
-
actionUrl: 'campaign.list',
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export const withCloseIcon = Template.bind({});
|
|
109
|
-
withCloseIcon.args = {
|
|
110
|
-
type: 'information',
|
|
111
|
-
canCloseBanner: true,
|
|
112
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
-
import * as ComponentStories from './pix-block.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={ComponentStories} />
|
|
5
|
-
|
|
6
|
-
# Pix Block
|
|
7
|
-
|
|
8
|
-
Un \`Block\` est un bloc de fond blanc dont les bords sont arrondis et ayant une ombre projetée.
|
|
9
|
-
|
|
10
|
-
> Un \`Block\` prendra toute la largeur de son parent, dans la limite maximale de 980px.
|
|
11
|
-
|
|
12
|
-
> Donnez donc un parent de la taille que vous souhaitez, votre bloc prendra la même taille.
|
|
13
|
-
|
|
14
|
-
> Il est souvent utilisé dans le PixBackgroundHeader.
|
|
15
|
-
|
|
16
|
-
<Story of={ComponentStories.block} height={60} />
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
```html
|
|
21
|
-
<PixBlock @shadow="light">
|
|
22
|
-
<div>Un bloc avec une ombre faible</div>
|
|
23
|
-
</PixBlock>
|
|
24
|
-
|
|
25
|
-
<PixBlock @shadow="heavy">
|
|
26
|
-
<div>Un bloc avec une ombre forte</div>
|
|
27
|
-
</PixBlock>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Arguments
|
|
31
|
-
|
|
32
|
-
<ArgTypes of={ComponentStories} />
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Layout/Block',
|
|
5
|
-
argTypes: {
|
|
6
|
-
shadow: {
|
|
7
|
-
name: 'shadow',
|
|
8
|
-
description: 'Ombre sur le bloc',
|
|
9
|
-
type: { name: 'string', required: false },
|
|
10
|
-
table: { defaultValue: { summary: 'light' } },
|
|
11
|
-
control: { type: 'select' },
|
|
12
|
-
options: ['light', 'heavy'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const block = (args) => ({
|
|
18
|
-
template: hbs`<PixBlock @shadow={{this.shadow}}>
|
|
19
|
-
Lorem ipsum
|
|
20
|
-
</PixBlock>`,
|
|
21
|
-
context: args,
|
|
22
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as ComponentStories from './pix-button-link.stories';
|
|
4
|
-
|
|
5
|
-
<Meta of={ComponentStories} />
|
|
6
|
-
|
|
7
|
-
# ButtonLink
|
|
8
|
-
|
|
9
|
-
Affiche un lien avec le style d'un bouton Pix. Il peut être de type HTML ou Route EmberJS.
|
|
10
|
-
|
|
11
|
-
Hérite des styles de base de `PixButton` (`variant`, `size`, `isBorderVisible`, `isDisabled`)
|
|
12
|
-
|
|
13
|
-
## Lien HTML
|
|
14
|
-
|
|
15
|
-
Affiche un bouton avec les propriétés de lien HTML définies.
|
|
16
|
-
|
|
17
|
-
Prend en entrée la propriété `@href`.
|
|
18
|
-
Redirige directement les attributs de la balise HTML `<a>` (eg. `target`...).
|
|
19
|
-
|
|
20
|
-
<Story of={ComponentStories.htmlLink} />
|
|
21
|
-
|
|
22
|
-
```html
|
|
23
|
-
<PixButtonLink @href="https://pix.fr" target="_blank"> Libellé du lien </PixButtonLink>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Route EmberJS
|
|
27
|
-
|
|
28
|
-
Affiche un bouton vers la route EmberJS définie en paramètre.
|
|
29
|
-
Equivalent au `<LinkTo />` de EmberJS avec le style d'un bouton Pix.
|
|
30
|
-
|
|
31
|
-
Prend en entrée la propriété `@route` et `@model`.
|
|
32
|
-
|
|
33
|
-
Un bouton de route EmberJS peut être désactivé via la propriété `@isDisabled`.
|
|
34
|
-
|
|
35
|
-
<Story of={ComponentStories.emberLink} />
|
|
36
|
-
|
|
37
|
-
## Arguments
|
|
38
|
-
|
|
39
|
-
<ArgTypes of={ComponentStories} />
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Basics/ButtonLink',
|
|
5
|
-
|
|
6
|
-
argTypes: {
|
|
7
|
-
href: {
|
|
8
|
-
name: 'href',
|
|
9
|
-
description: 'Paramètre à renseigner pour utiliser lien HTML.',
|
|
10
|
-
type: { name: 'string', required: false },
|
|
11
|
-
},
|
|
12
|
-
route: {
|
|
13
|
-
name: 'route',
|
|
14
|
-
description:
|
|
15
|
-
"Paramètre à renseigner pour utiliser un composant LinkTo à la place d'un lien classique. Il prend comme valeur la route de redirection",
|
|
16
|
-
type: { name: 'string', required: false },
|
|
17
|
-
},
|
|
18
|
-
model: {
|
|
19
|
-
name: 'model',
|
|
20
|
-
description: 'Model Ember lié à la route utilisée',
|
|
21
|
-
type: { required: false },
|
|
22
|
-
},
|
|
23
|
-
query: {
|
|
24
|
-
name: 'query',
|
|
25
|
-
description:
|
|
26
|
-
"Paramètre facultatif du <LinkTo> Ember permettant d'ajouter des paires de clé/valeur dans les paramètres d'une URL",
|
|
27
|
-
type: { required: false },
|
|
28
|
-
},
|
|
29
|
-
variant: {
|
|
30
|
-
name: 'variant',
|
|
31
|
-
description:
|
|
32
|
-
'color: `primary`, `primary-bis`, `secondary`,`tertiary`, `success`, `error`, `transparent-dark`',
|
|
33
|
-
options: [
|
|
34
|
-
'primary',
|
|
35
|
-
'primary-bis',
|
|
36
|
-
'secondary',
|
|
37
|
-
'tertiary',
|
|
38
|
-
'success',
|
|
39
|
-
'error',
|
|
40
|
-
'transparent-dark',
|
|
41
|
-
],
|
|
42
|
-
type: { name: 'string', required: false },
|
|
43
|
-
control: { type: 'select' },
|
|
44
|
-
table: {
|
|
45
|
-
type: { summary: 'string' },
|
|
46
|
-
defaultValue: { summary: 'primary' },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
name: 'size',
|
|
51
|
-
description: 'taille: `large`,`small`',
|
|
52
|
-
options: ['large', 'small'],
|
|
53
|
-
type: { name: 'string', required: false },
|
|
54
|
-
control: { type: 'select' },
|
|
55
|
-
table: {
|
|
56
|
-
type: { summary: 'string' },
|
|
57
|
-
defaultValue: { summary: 'small' },
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
isBorderVisible: {
|
|
61
|
-
name: 'isBorderVisible',
|
|
62
|
-
description:
|
|
63
|
-
'Paramètre utilisé seulement quand le `variant` est `secondary` ou `transparent-dark`',
|
|
64
|
-
type: { name: 'boolean', required: false },
|
|
65
|
-
control: { type: 'boolean' },
|
|
66
|
-
table: {
|
|
67
|
-
type: { summary: 'boolean' },
|
|
68
|
-
defaultValue: { summary: 'false' },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
isDisabled: {
|
|
72
|
-
name: 'isDisabled',
|
|
73
|
-
type: { name: 'boolean', required: false },
|
|
74
|
-
control: { type: 'boolean' },
|
|
75
|
-
table: {
|
|
76
|
-
type: { summary: 'boolean' },
|
|
77
|
-
defaultValue: { summary: 'false' },
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const htmlLink = {
|
|
84
|
-
render: (args) => ({
|
|
85
|
-
template: hbs`<PixButtonLink
|
|
86
|
-
@href='https://pix.fr'
|
|
87
|
-
target='NEW'
|
|
88
|
-
@variant={{this.variant}}
|
|
89
|
-
@size={{this.size}}
|
|
90
|
-
@isBorderVisible={{this.isBorderVisible}}
|
|
91
|
-
@isDisabled={{this.isDisabled}}
|
|
92
|
-
>
|
|
93
|
-
Lien HTML classique
|
|
94
|
-
</PixButtonLink>`,
|
|
95
|
-
context: args,
|
|
96
|
-
}),
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const emberLink = (args) => {
|
|
100
|
-
return {
|
|
101
|
-
template: hbs`<PixButtonLink
|
|
102
|
-
@route=''
|
|
103
|
-
@model=''
|
|
104
|
-
@query={{this.query}}
|
|
105
|
-
@variant={{this.variant}}
|
|
106
|
-
@size={{this.size}}
|
|
107
|
-
@isBorderVisible={{this.isBorderVisible}}
|
|
108
|
-
@isDisabled={{this.isDisabled}}
|
|
109
|
-
>
|
|
110
|
-
Lien route Ember (LinkTo)
|
|
111
|
-
</PixButtonLink>`,
|
|
112
|
-
context: args,
|
|
113
|
-
};
|
|
114
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
-
import * as ComponentStories from './pix-button-upload.stories';
|
|
3
|
-
|
|
4
|
-
<Meta of={ComponentStories} />
|
|
5
|
-
|
|
6
|
-
# PixButtonUpload
|
|
7
|
-
|
|
8
|
-
Affiche un bouton d'upload de fichiers.
|
|
9
|
-
|
|
10
|
-
Hérite des styles de base de `PixButton` (`variant`, `size`, `isBorderVisible`)
|
|
11
|
-
|
|
12
|
-
Toutes les [propriétés HTML d'un input de type file](https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/file) sont supportées.
|
|
13
|
-
|
|
14
|
-
<Story of={ComponentStories.buttonUpload} height={60} />
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<PixButtonUpload @id="file-upload" @onChange="{{this.uploadFile}}" accept=".csv">
|
|
18
|
-
Libellé du bouton
|
|
19
|
-
</PixButtonUpload>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Le callback `@onChange` prend en paramètre le tableau de fichiers uploadés.
|
|
23
|
-
|
|
24
|
-
## Arguments
|
|
25
|
-
|
|
26
|
-
<ArgTypes of={ComponentStories} />
|