@1024pix/pix-ui 15.0.0 → 16.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/.github/workflows/deploy-storybook.yml +7 -6
- package/CHANGELOG.md +22 -0
- package/addon/components/pix-banner.hbs +1 -1
- package/addon/components/pix-banner.js +3 -3
- package/addon/components/pix-button.hbs +18 -31
- package/addon/components/pix-button.js +5 -10
- package/addon/components/pix-dropdown.hbs +2 -2
- package/addon/components/pix-filter-banner.hbs +1 -1
- package/addon/components/pix-input-password.hbs +1 -1
- package/addon/components/pix-input.hbs +1 -1
- package/addon/components/pix-message.js +5 -5
- package/addon/components/pix-modal.hbs +1 -1
- package/addon/components/pix-multi-select.hbs +1 -1
- package/addon/styles/_pix-filter-banner.scss +12 -5
- package/app/stories/pix-button.stories.js +7 -8
- package/app/stories/pix-icon-button.stories.js +2 -3
- package/app/stories/pix-icon-button.stories.mdx +1 -1
- package/app/stories/pix-tooltip.stories.js +1 -1
- package/app/stories/pix-tooltip.stories.mdx +2 -2
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: Deploy Pix UI Storybook
|
|
2
2
|
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
5
|
push:
|
|
6
6
|
tags:
|
|
7
7
|
- '*'
|
|
@@ -10,12 +10,13 @@ jobs:
|
|
|
10
10
|
deploy:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
14
|
-
- uses: actions/setup-node@
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
- uses: actions/setup-node@v3
|
|
15
15
|
with:
|
|
16
|
-
node-version: 14
|
|
16
|
+
node-version: 16.14.0
|
|
17
|
+
- run: npm i -g npm@8.13.2
|
|
17
18
|
- run: npm ci
|
|
18
19
|
- name: Deploy storybook to Github Pages
|
|
19
20
|
run: npm run deploy-storybook -- --ci
|
|
20
21
|
env:
|
|
21
|
-
GH_TOKEN: 1024pix:${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
GH_TOKEN: 1024pix:${{ secrets.GITHUB_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v16.0.0 (13/07/2022)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :building_construction: Tech
|
|
7
|
+
- [#238](https://github.com/1024pix/pix-ui/pull/238) [TECH] Monter de version fontawesome (PIX-5325)
|
|
8
|
+
|
|
9
|
+
## v15.0.2 (11/07/2022)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### :building_construction: Tech
|
|
13
|
+
- [#237](https://github.com/1024pix/pix-ui/pull/237) [TECH] Changer les pré-requis engine du package.json (PIX-5319)
|
|
14
|
+
|
|
15
|
+
### :bug: Correction
|
|
16
|
+
- [#236](https://github.com/1024pix/pix-ui/pull/236) [BUGFIX] Correction du déploiement de Storybook
|
|
17
|
+
|
|
18
|
+
## v15.0.1 (08/07/2022)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### :bug: Correction
|
|
22
|
+
- [#234](https://github.com/1024pix/pix-ui/pull/234) [BUGFIX] Laisser les filtres à côté du label dans le FilterBanner (PIX-5301)
|
|
23
|
+
- [#231](https://github.com/1024pix/pix-ui/pull/231) [BUGFIX] PixButton de type submit affiche un loader si @isLoading=true
|
|
24
|
+
|
|
3
25
|
## v15.0.0 (05/07/2022)
|
|
4
26
|
|
|
5
27
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{{#if this.isExternalLink}}
|
|
7
7
|
<a class="pix-banner__action" href={{@actionUrl}} target="_blank" rel="noopener noreferrer">
|
|
8
8
|
{{@actionLabel}}
|
|
9
|
-
<FaIcon class="external-link" @icon="
|
|
9
|
+
<FaIcon class="external-link" @icon="up-right-from-square" />
|
|
10
10
|
</a>
|
|
11
11
|
{{else}}
|
|
12
12
|
<LinkTo class="pix-banner__action" @route={{@actionUrl}}>{{@actionLabel}}</LinkTo>
|
|
@@ -16,9 +16,9 @@ const types = [
|
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const icons = {
|
|
19
|
-
[TYPE_INFO]: 'info
|
|
20
|
-
[TYPE_ERROR]: 'exclamation
|
|
21
|
-
[TYPE_WARNING]: 'exclamation
|
|
19
|
+
[TYPE_INFO]: 'circle-info',
|
|
20
|
+
[TYPE_ERROR]: 'triangle-exclamation',
|
|
21
|
+
[TYPE_WARNING]: 'circle-exclamation',
|
|
22
22
|
[TYPE_COMMUNICATION]: 'bullhorn',
|
|
23
23
|
[TYPE_COMMUNICATION_ORGA]: 'bullhorn',
|
|
24
24
|
[TYPE_COMMUNICATION_CERTIF]: 'bullhorn',
|
|
@@ -8,36 +8,23 @@
|
|
|
8
8
|
{{yield}}
|
|
9
9
|
</LinkTo>
|
|
10
10
|
{{else}}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{{
|
|
21
|
-
<div class="
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{{else}}
|
|
28
|
-
{{yield}}
|
|
29
|
-
{{/if}}
|
|
30
|
-
</button>
|
|
31
|
-
{{else}}
|
|
32
|
-
<button
|
|
33
|
-
type={{this.type}}
|
|
34
|
-
class={{this.className}}
|
|
35
|
-
...attributes
|
|
36
|
-
disabled={{this.isButtonLoadingOrDisabled}}
|
|
37
|
-
aria-disabled="{{this.ariaDisabled}}"
|
|
38
|
-
>
|
|
11
|
+
<button
|
|
12
|
+
type={{this.type}}
|
|
13
|
+
class={{this.className}}
|
|
14
|
+
{{on "click" this.triggerAction}}
|
|
15
|
+
...attributes
|
|
16
|
+
disabled={{this.isButtonLoadingOrDisabled}}
|
|
17
|
+
aria-disabled="{{this.ariaDisabled}}"
|
|
18
|
+
>
|
|
19
|
+
{{#if this.isLoading}}
|
|
20
|
+
<div class="loader loader--{{this.loadingColor}}">
|
|
21
|
+
<div class="bounce1"></div>
|
|
22
|
+
<div class="bounce2"></div>
|
|
23
|
+
<div class="bounce3"></div>
|
|
24
|
+
</div>
|
|
25
|
+
<span class="loader__not-visible-text">{{yield}}</span>
|
|
26
|
+
{{else}}
|
|
39
27
|
{{yield}}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
{{/if}}
|
|
29
|
+
</button>
|
|
43
30
|
{{/if}}
|
|
@@ -33,22 +33,17 @@ export default class PixButton extends PixButtonBase {
|
|
|
33
33
|
return super.baseClassNames.join(' ');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
get enableTriggerAction() {
|
|
37
|
-
return !(this.type === 'submit' && !this.args.triggerAction);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
36
|
@action
|
|
41
37
|
async triggerAction(params) {
|
|
38
|
+
if (this.type === 'submit' && !this.args.triggerAction) return;
|
|
39
|
+
if (!this.args.triggerAction) {
|
|
40
|
+
throw new Error('@triggerAction params is required for PixButton !');
|
|
41
|
+
}
|
|
42
42
|
try {
|
|
43
43
|
this.isTriggering = true;
|
|
44
44
|
await this.args.triggerAction(params);
|
|
45
|
+
} finally {
|
|
45
46
|
this.isTriggering = false;
|
|
46
|
-
} catch (e) {
|
|
47
|
-
this.isTriggering = false;
|
|
48
|
-
if (!this.args.triggerAction) {
|
|
49
|
-
throw new Error('@triggerAction params is required for PixButton !');
|
|
50
|
-
}
|
|
51
|
-
throw new Error(e);
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
aria-label={{@clearLabel}}
|
|
34
34
|
{{on "click" this.clearSelection}}
|
|
35
35
|
>
|
|
36
|
-
<FaIcon @icon="
|
|
36
|
+
<FaIcon @icon="xmark" />
|
|
37
37
|
</button>
|
|
38
38
|
{{/if}}
|
|
39
39
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
{{#if @isSearchable}}
|
|
64
64
|
<div class="pix-dropdown__menu--search">
|
|
65
|
-
<FaIcon class="pix-dropdown__menu--search-icon" @icon="
|
|
65
|
+
<FaIcon class="pix-dropdown__menu--search-icon" @icon="magnifying-glass" />
|
|
66
66
|
<label
|
|
67
67
|
class="pix-dropdown__menu--search-input-label"
|
|
68
68
|
for={{this.searchInputId}}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@size="small"
|
|
24
24
|
@triggerAction={{@onClearFilters}}
|
|
25
25
|
>
|
|
26
|
-
<FaIcon class="pix-filter-banner-button__icon" @icon="trash-
|
|
26
|
+
<FaIcon class="pix-filter-banner-button__icon" @icon="trash-can" @prefix="far" />
|
|
27
27
|
{{@clearFiltersLabel}}
|
|
28
28
|
</PixButton>
|
|
29
29
|
</div>
|
|
@@ -19,11 +19,11 @@ export default class PixMessage extends Component {
|
|
|
19
19
|
|
|
20
20
|
get iconClass() {
|
|
21
21
|
const classes = {
|
|
22
|
-
[TYPE_INFO]: 'info
|
|
23
|
-
[TYPE_SUCCESS]: 'check
|
|
24
|
-
[TYPE_WARNING]: 'exclamation
|
|
25
|
-
[TYPE_ALERT]: 'exclamation
|
|
26
|
-
[TYPE_ERROR]: 'exclamation
|
|
22
|
+
[TYPE_INFO]: 'circle-info',
|
|
23
|
+
[TYPE_SUCCESS]: 'circle-check',
|
|
24
|
+
[TYPE_WARNING]: 'circle-exclamation',
|
|
25
|
+
[TYPE_ALERT]: 'triangle-exclamation',
|
|
26
|
+
[TYPE_ERROR]: 'triangle-exclamation',
|
|
27
27
|
};
|
|
28
28
|
return classes[this.type];
|
|
29
29
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<label class="pix-multi-select-header {{if this.isBig 'pix-multi-select-header--big'}}">
|
|
9
9
|
|
|
10
10
|
<span class="pix-multi-select-header__title">{{@title}}</span>
|
|
11
|
-
<FaIcon @icon="
|
|
11
|
+
<FaIcon @icon="magnifying-glass" class="pix-multi-select-header__search-icon" />
|
|
12
12
|
|
|
13
13
|
<input
|
|
14
14
|
id={{@id}}
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
gap: $spacing-s;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
&__container-action {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: center;
|
|
30
|
+
border-top: 1px solid $pix-neutral-15;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
26
34
|
&__details {
|
|
27
35
|
color: $pix-neutral-60;
|
|
28
36
|
font-family: $font-roboto;
|
|
@@ -30,7 +38,6 @@
|
|
|
30
38
|
padding: $spacing-xs 0 $spacing-xs 0;
|
|
31
39
|
margin: 0;
|
|
32
40
|
font-size: 0.875rem;
|
|
33
|
-
border-top: 1px solid $pix-neutral-15;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
&__button {
|
|
@@ -44,7 +51,6 @@
|
|
|
44
51
|
|
|
45
52
|
@include device-is('tablet') {
|
|
46
53
|
.pix-filter-banner {
|
|
47
|
-
justify-content: space-between;
|
|
48
54
|
align-items: center;
|
|
49
55
|
flex-direction: row;
|
|
50
56
|
gap: $spacing-m;
|
|
@@ -57,12 +63,13 @@
|
|
|
57
63
|
&__container-filter {
|
|
58
64
|
flex-direction: row;
|
|
59
65
|
flex-wrap: wrap;
|
|
66
|
+
align-items: center;
|
|
67
|
+
flex-grow: 2;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
&__container-action {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
justify-content: flex-end;
|
|
71
|
+
flex-direction: row;
|
|
72
|
+
border: none;
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
&__details {
|
|
@@ -42,13 +42,6 @@ Default.args = {
|
|
|
42
42
|
size: 'big',
|
|
43
43
|
backgroundColor: 'blue',
|
|
44
44
|
label: 'Bouton',
|
|
45
|
-
triggerAction: () => {
|
|
46
|
-
return new Promise((resolve) => {
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
resolve();
|
|
49
|
-
}, 2000);
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
45
|
};
|
|
53
46
|
|
|
54
47
|
export const borders = Template.bind({});
|
|
@@ -124,10 +117,16 @@ loader.args = {
|
|
|
124
117
|
label: 'Bouton avec loader au clic',
|
|
125
118
|
backgroundColor: 'yellow',
|
|
126
119
|
loadingColor: 'grey',
|
|
120
|
+
triggerAction: () => {
|
|
121
|
+
return new Promise((resolve) => {
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
resolve();
|
|
124
|
+
}, 2000);
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
127
|
extraButtons: [
|
|
128
128
|
{
|
|
129
129
|
...Default.args,
|
|
130
|
-
triggerAction: () => {},
|
|
131
130
|
isLoading: true,
|
|
132
131
|
},
|
|
133
132
|
],
|
|
@@ -20,7 +20,7 @@ const Template = (args) => {
|
|
|
20
20
|
export const Default = Template.bind({});
|
|
21
21
|
Default.args = {
|
|
22
22
|
ariaLabel: 'Action du bouton',
|
|
23
|
-
icon: '
|
|
23
|
+
icon: 'xmark',
|
|
24
24
|
triggerAction: () => {
|
|
25
25
|
return new Promise().resolves();
|
|
26
26
|
},
|
|
@@ -43,13 +43,12 @@ export const argTypes = {
|
|
|
43
43
|
name: 'ariaLabel',
|
|
44
44
|
description: "l'action du bouton, pour l'accessibilité",
|
|
45
45
|
type: { name: 'string', required: true },
|
|
46
|
-
table: { defaultValue: { summary: 'times' } },
|
|
47
46
|
},
|
|
48
47
|
icon: {
|
|
49
48
|
name: 'icon',
|
|
50
49
|
description: 'Icône font-awesome',
|
|
51
50
|
type: { name: 'string', required: true },
|
|
52
|
-
table: { defaultValue: { summary: '
|
|
51
|
+
table: { defaultValue: { summary: 'plus' } },
|
|
53
52
|
},
|
|
54
53
|
iconPrefix: {
|
|
55
54
|
name: 'iconPrefix',
|
|
@@ -37,7 +37,7 @@ Si vous utilisez un élément `<div>` ou `<span>`, il faut ajouter `tabindex="0"
|
|
|
37
37
|
</PixTooltip>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Les tooltips doivent prendre un `@id` et être référencées par leur élément déclencheur
|
|
40
|
+
Les tooltips doivent prendre un `@id` et être référencées par leur élément déclencheur
|
|
41
41
|
|
|
42
42
|
- soit via `aria-describedby` si l'élément possèdent déjà un label, car le tooltip agit alors comme une description supplémentaire.
|
|
43
43
|
|
|
@@ -131,7 +131,7 @@ Infobulle contenant des éléments HTML
|
|
|
131
131
|
<button>Tooltip par défaut</button>
|
|
132
132
|
</:triggerElement>
|
|
133
133
|
<:tooltip>
|
|
134
|
-
<FaIcon @icon="
|
|
134
|
+
<FaIcon @icon="up-right-from-square" /> Avec des <strong>éléments</strong> HTML/Ember
|
|
135
135
|
</:tooltip>
|
|
136
136
|
</PixTooltip>
|
|
137
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/pix-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "GIP Pix",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": "16.14.0",
|
|
12
|
-
"npm": "8.13.2"
|
|
12
|
+
"npm": ">=8.3.1 <=8.13.2"
|
|
13
13
|
},
|
|
14
14
|
"ember": {
|
|
15
15
|
"edition": "octane"
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@ember/test-helpers": "^2.6.0",
|
|
59
59
|
"@formatjs/intl": "^2.1.0",
|
|
60
60
|
"@fortawesome/ember-fontawesome": "^0.2.3",
|
|
61
|
-
"@fortawesome/free-regular-svg-icons": "^
|
|
62
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
61
|
+
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
|
62
|
+
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
|
63
63
|
"@glimmer/component": "^1.0.4",
|
|
64
64
|
"@glimmer/tracking": "^1.0.4",
|
|
65
65
|
"@storybook/addon-a11y": "^6.3.7",
|