@1024pix/pix-ui 34.0.0 → 34.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +15 -15
- package/CHANGELOG.md +22 -0
- package/addon/components/pix-button.hbs +2 -2
- package/addon/components/pix-button.js +2 -6
- package/addon/components/pix-filter-banner.hbs +1 -2
- package/addon/components/pix-filter-banner.js +2 -0
- package/addon/components/pix-input.js +0 -8
- package/addon/components/pix-modal.js +2 -2
- package/addon/components/pix-sidebar.js +2 -2
- package/addon/styles/_pix-input-password.scss +2 -0
- package/addon/styles/_pix-input.scss +2 -0
- package/addon/styles/_pix-selectable-tag.scss +1 -1
- package/addon/styles/_pix-tag.scss +0 -2
- package/app/stories/pix-filter-banner.stories.js +11 -0
- package/app/stories/pix-input.stories.js +1 -1
- package/app/stories/pix-input.stories.mdx +1 -1
- package/package.json +6 -7
- package/addon/utils/unique-id.js +0 -5
package/.circleci/config.yml
CHANGED
|
@@ -30,25 +30,25 @@ workflows:
|
|
|
30
30
|
jobs:
|
|
31
31
|
install:
|
|
32
32
|
docker:
|
|
33
|
-
- image: cimg/node:16.
|
|
33
|
+
- image: cimg/node:16.20.0-browsers
|
|
34
34
|
resource_class: medium+
|
|
35
|
+
working_directory: ~/pix-ui
|
|
35
36
|
steps:
|
|
36
37
|
- checkout
|
|
37
38
|
- run: npm ci
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
key: node_modules
|
|
39
|
+
- persist_to_workspace:
|
|
40
|
+
root: ~/pix-ui
|
|
41
41
|
paths:
|
|
42
|
-
-
|
|
42
|
+
- .
|
|
43
|
+
|
|
43
44
|
lint-and-test:
|
|
44
45
|
docker:
|
|
45
|
-
- image: cimg/node:16.
|
|
46
|
+
- image: cimg/node:16.20.0-browsers
|
|
46
47
|
resource_class: medium+
|
|
48
|
+
working_directory: ~/pix-ui
|
|
47
49
|
steps:
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
name: Restore node modules
|
|
51
|
-
key: node_modules
|
|
50
|
+
- attach_workspace:
|
|
51
|
+
at: ~/pix-ui
|
|
52
52
|
- browser-tools/install-chrome
|
|
53
53
|
- browser-tools/install-chromedriver
|
|
54
54
|
- run: npm run lint:js
|
|
@@ -56,12 +56,12 @@ jobs:
|
|
|
56
56
|
- run: npm run lint:scss
|
|
57
57
|
- run: npm test
|
|
58
58
|
- run: npx ember try:one embroider-safe
|
|
59
|
+
|
|
59
60
|
chromatic-deployment:
|
|
60
61
|
docker:
|
|
61
|
-
- image: cimg/node:16.
|
|
62
|
+
- image: cimg/node:16.20.0-browsers
|
|
63
|
+
working_directory: ~/pix-ui
|
|
62
64
|
steps:
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
name: Restore node modules
|
|
66
|
-
key: node_modules
|
|
65
|
+
- attach_workspace:
|
|
66
|
+
at: ~/pix-ui
|
|
67
67
|
- run: npm run chromatic -- --auto-accept-changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v34.2.0 (26/05/2023)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :rocket: Amélioration
|
|
7
|
+
- [#406](https://github.com/1024pix/pix-ui/pull/406) [FEATURE] Enlever l'obligation d'avoir un label ou un ariaLabel pour le PixInput (PIX-8126)
|
|
8
|
+
|
|
9
|
+
### :building_construction: Tech
|
|
10
|
+
- [#401](https://github.com/1024pix/pix-ui/pull/401) [TECH] Suppression de l'utilitaire uniqueId (PIX-8003)
|
|
11
|
+
|
|
12
|
+
### :coffee: Autre
|
|
13
|
+
- [#410](https://github.com/1024pix/pix-ui/pull/410) [BUMP] Update dependency stylelint to v15 (dossier racine)
|
|
14
|
+
- [#411](https://github.com/1024pix/pix-ui/pull/411) chore(deps): bump socket.io-parser from 4.2.1 to 4.2.3
|
|
15
|
+
- [#405](https://github.com/1024pix/pix-ui/pull/405) [BUMP] Update dependency @embroider/test-setup to v3 (dossier racine)
|
|
16
|
+
- [#398](https://github.com/1024pix/pix-ui/pull/398) [BUMP] Update Node.js to v16.20.0
|
|
17
|
+
- [#404](https://github.com/1024pix/pix-ui/pull/404) [BUMP] Update dependency @fortawesome/ember-fontawesome to v1 (dossier racine)
|
|
18
|
+
|
|
19
|
+
## v34.1.0 (05/05/2023)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### :rocket: Amélioration
|
|
23
|
+
- [#397](https://github.com/1024pix/pix-ui/pull/397) [FEATURE] Améliorer le composant PixFilterbanner (PIX-7854)
|
|
24
|
+
|
|
3
25
|
## v34.0.0 (04/05/2023)
|
|
4
26
|
|
|
5
27
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
class={{this.className}}
|
|
14
14
|
{{on "click" this.triggerAction}}
|
|
15
15
|
...attributes
|
|
16
|
-
disabled={{this.
|
|
17
|
-
aria-disabled="{{this.
|
|
16
|
+
disabled={{this.isDisabled}}
|
|
17
|
+
aria-disabled="{{this.isDisabled}}"
|
|
18
18
|
>
|
|
19
19
|
{{#if this.isLoading}}
|
|
20
20
|
<div class="loader loader--{{this.loadingColor}}">
|
|
@@ -21,21 +21,17 @@ export default class PixButton extends PixButtonBase {
|
|
|
21
21
|
return this.args.loadingColor || this.args['loading-color'] || 'white';
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
get
|
|
24
|
+
get isDisabled() {
|
|
25
25
|
return this.isLoading || this.args.isDisabled;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
get ariaDisabled() {
|
|
29
|
-
return this.isButtonLoadingOrDisabled;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
28
|
get className() {
|
|
33
29
|
return super.baseClassNames.join(' ');
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
@action
|
|
37
33
|
async triggerAction(params) {
|
|
38
|
-
if (this.type === 'submit' && !this.args.triggerAction) return;
|
|
34
|
+
if (this.isDisabled || (this.type === 'submit' && !this.args.triggerAction)) return;
|
|
39
35
|
if (!this.args.triggerAction) {
|
|
40
36
|
throw new Error('@triggerAction params is required for PixButton !');
|
|
41
37
|
}
|
|
@@ -4,9 +4,11 @@ export default class PixFilterBanner extends Component {
|
|
|
4
4
|
get displayTitle() {
|
|
5
5
|
return Boolean(this.args.title);
|
|
6
6
|
}
|
|
7
|
+
|
|
7
8
|
get displayDetails() {
|
|
8
9
|
return Boolean(this.args.details);
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
get displayClearFilters() {
|
|
11
13
|
return Boolean(this.args.clearFiltersLabel);
|
|
12
14
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
|
|
3
|
-
const ERROR_MESSAGE = 'ERROR in PixInput component, you must provide @label or @ariaLabel params';
|
|
4
|
-
|
|
5
3
|
const INPUT_VALIDATION_STATUS_MAP = {
|
|
6
4
|
default: '',
|
|
7
5
|
error: 'pix-input__input--error',
|
|
@@ -17,16 +15,10 @@ export default class PixInput extends Component {
|
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
get label() {
|
|
20
|
-
if (!this.args.label && !this.args.ariaLabel) {
|
|
21
|
-
throw new Error(ERROR_MESSAGE);
|
|
22
|
-
}
|
|
23
18
|
return this.args.label;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
get ariaLabel() {
|
|
27
|
-
if (!this.args.label && !this.args.ariaLabel) {
|
|
28
|
-
throw new Error(ERROR_MESSAGE);
|
|
29
|
-
}
|
|
30
22
|
return this.args.label ? null : this.args.ariaLabel;
|
|
31
23
|
}
|
|
32
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import
|
|
3
|
+
import { guidFor } from '@ember/object/internals';
|
|
4
4
|
|
|
5
5
|
export default class PixModal extends Component {
|
|
6
6
|
constructor(...args) {
|
|
@@ -23,6 +23,6 @@ export default class PixModal extends Component {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
get id() {
|
|
26
|
-
return
|
|
26
|
+
return guidFor(this);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import
|
|
3
|
+
import { guidFor } from '@ember/object/internals';
|
|
4
4
|
|
|
5
5
|
export default class PixSidebar extends Component {
|
|
6
6
|
constructor(...args) {
|
|
@@ -23,6 +23,6 @@ export default class PixSidebar extends Component {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
get id() {
|
|
26
|
-
return
|
|
26
|
+
return guidFor(this);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
$checkmark-width: 0.625rem;
|
|
2
2
|
$checkmark-width-with-space: $checkmark-width + 0.438rem;
|
|
3
|
+
|
|
3
4
|
@mixin checkmarkColor($borderColor) {
|
|
4
5
|
input[type='checkbox']:checked + label::before {
|
|
5
6
|
position: absolute;
|
|
@@ -17,7 +18,6 @@ $checkmark-width-with-space: $checkmark-width + 0.438rem;
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
.pix-selectable-tag {
|
|
20
|
-
|
|
21
21
|
@extend %pix-body-s;
|
|
22
22
|
|
|
23
23
|
display: inline-block;
|
|
@@ -8,6 +8,7 @@ export const filterBanner = (args) => {
|
|
|
8
8
|
@details={{this.details}}
|
|
9
9
|
@clearFiltersLabel={{this.clearFiltersLabel}}
|
|
10
10
|
@onClearFilters={{this.onClearFilters}}
|
|
11
|
+
@isClearFilterButtonDisabled={{this.isClearFilterButtonDisabled}}
|
|
11
12
|
>
|
|
12
13
|
<PixSelect @options={{this.options}} @onChange={{this.onChange}} @label="mon label" @screenReaderOnly={{true}} @placeholder="placeholer"/>
|
|
13
14
|
<PixSelect @options={{this.options}} @onChange={{this.onChange}} @label="mon label" @screenReaderOnly={{true}} @placeholder="placeholer"/>
|
|
@@ -49,4 +50,14 @@ export const argTypes = {
|
|
|
49
50
|
description: 'fonction à appeler pour déclencher l’action de suppression des filtres',
|
|
50
51
|
type: { required: false },
|
|
51
52
|
},
|
|
53
|
+
isClearFilterButtonDisabled: {
|
|
54
|
+
name: 'isClearFilterButtonDisabled',
|
|
55
|
+
description: 'Désactiver le button de la suppresion des filtres',
|
|
56
|
+
type: { name: 'boolean', required: true },
|
|
57
|
+
control: { type: 'boolean' },
|
|
58
|
+
table: {
|
|
59
|
+
type: { summary: 'boolean' },
|
|
60
|
+
defaultValue: { summary: false },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
52
63
|
};
|
|
@@ -55,7 +55,7 @@ export const argTypes = {
|
|
|
55
55
|
ariaLabel: {
|
|
56
56
|
name: 'ariaLabel',
|
|
57
57
|
description: "L'action du champ, pour l'accessibilité. Requis si label n'est pas définit.",
|
|
58
|
-
type: { name: 'string', required:
|
|
58
|
+
type: { name: 'string', required: false },
|
|
59
59
|
},
|
|
60
60
|
id: {
|
|
61
61
|
name: 'id',
|
|
@@ -10,7 +10,7 @@ Le PixInput permet de créer un champ de texte.
|
|
|
10
10
|
|
|
11
11
|
## Accessibilité
|
|
12
12
|
|
|
13
|
-
Si vous utilisez le `PixInput` sans label alors il faut renseigner le paramètre `ariaLabel
|
|
13
|
+
Si vous utilisez le `PixInput` sans label alors il faut renseigner le paramètre `ariaLabel`. Il est possible d'ajouter un label en dehors du composant en précisant bien un attribut `for` correspondant à l'`@id` passé au PixInput.
|
|
14
14
|
|
|
15
15
|
> Si vous renseignez les paramètres label et ariaLabel ensemble, ariaLabel sera nullifié.
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/pix-ui",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.2.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"
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@1024pix/ember-testing-library": "^0.6.0",
|
|
63
|
-
"@1024pix/stylelint-config": "^
|
|
63
|
+
"@1024pix/stylelint-config": "^3.0.0",
|
|
64
64
|
"@babel/eslint-parser": "^7.19.1",
|
|
65
65
|
"@babel/plugin-proposal-decorators": "^7.20.5",
|
|
66
66
|
"@ember/optional-features": "^2.0.0",
|
|
67
67
|
"@ember/render-modifiers": "^2.0.5",
|
|
68
68
|
"@ember/string": "^3.0.1",
|
|
69
69
|
"@ember/test-helpers": "^2.8.1",
|
|
70
|
-
"@embroider/test-setup": "^
|
|
71
|
-
"@fortawesome/ember-fontawesome": "^0.
|
|
70
|
+
"@embroider/test-setup": "^3.0.0",
|
|
71
|
+
"@fortawesome/ember-fontawesome": "^1.0.0",
|
|
72
72
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
73
73
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
74
74
|
"@glimmer/component": "^1.1.2",
|
|
@@ -120,9 +120,8 @@
|
|
|
120
120
|
"qunit": "^2.19.3",
|
|
121
121
|
"qunit-dom": "^2.0.0",
|
|
122
122
|
"sass": "^1.56.1",
|
|
123
|
-
"stylelint": "^
|
|
124
|
-
"stylelint-config-
|
|
125
|
-
"stylelint-config-standard-scss": "^6.1.0",
|
|
123
|
+
"stylelint": "^15.0.0",
|
|
124
|
+
"stylelint-config-standard-scss": "^9.0.0",
|
|
126
125
|
"webpack": "^5.75.0"
|
|
127
126
|
},
|
|
128
127
|
"overrides": {
|