@1024pix/pix-ui 14.8.1 → 15.0.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.
@@ -1,5 +1,8 @@
1
1
  version: 2.1
2
2
 
3
+ orbs:
4
+ browser-tools: circleci/browser-tools@1.3.0
5
+
3
6
  workflows:
4
7
  version: 2
5
8
  build-and-test:
@@ -13,8 +16,11 @@ workflows:
13
16
  jobs:
14
17
  build-and-test:
15
18
  docker:
16
- - image: circleci/node:12.14.0-browsers
19
+ - image: cimg/node:16.14.0-browsers
17
20
  steps:
21
+ - run: sudo npm i -g npm@8.13.2
22
+ - browser-tools/install-chrome
23
+ - browser-tools/install-chromedriver
18
24
  - checkout
19
25
  - run: npm ci
20
26
  - run: npm run lint:js
@@ -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@v2
14
- - uses: actions/setup-node@v1
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/.nvmrc CHANGED
@@ -1 +1 @@
1
- 16.13.0
1
+ 16.14.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v15.0.2 (11/07/2022)
4
+
5
+
6
+ ### :building_construction: Tech
7
+ - [#237](https://github.com/1024pix/pix-ui/pull/237) [TECH] Changer les pré-requis engine du package.json (PIX-5319)
8
+
9
+ ### :bug: Correction
10
+ - [#236](https://github.com/1024pix/pix-ui/pull/236) [BUGFIX] Correction du déploiement de Storybook
11
+
12
+ ## v15.0.1 (08/07/2022)
13
+
14
+
15
+ ### :bug: Correction
16
+ - [#234](https://github.com/1024pix/pix-ui/pull/234) [BUGFIX] Laisser les filtres à côté du label dans le FilterBanner (PIX-5301)
17
+ - [#231](https://github.com/1024pix/pix-ui/pull/231) [BUGFIX] PixButton de type submit affiche un loader si @isLoading=true
18
+
19
+ ## v15.0.0 (05/07/2022)
20
+
21
+
22
+ ### :building_construction: Tech
23
+ - [#229](https://github.com/1024pix/pix-ui/pull/229) [TECH] Retirer la taille par defaut du composant PixMultiSelect
24
+ - [#224](https://github.com/1024pix/pix-ui/pull/224) [TECH] Fixer la version NodeJS à 16.14.0
25
+
3
26
  ## v14.8.1 (30/06/2022)
4
27
 
5
28
 
@@ -8,36 +8,23 @@
8
8
  {{yield}}
9
9
  </LinkTo>
10
10
  {{else}}
11
- {{#if this.enableTriggerAction}}
12
- <button
13
- type={{this.type}}
14
- class={{this.className}}
15
- {{on "click" this.triggerAction}}
16
- ...attributes
17
- disabled={{this.isButtonLoadingOrDisabled}}
18
- aria-disabled="{{this.ariaDisabled}}"
19
- >
20
- {{#if this.isLoading}}
21
- <div class="loader loader--{{this.loadingColor}}">
22
- <div class="bounce1"></div>
23
- <div class="bounce2"></div>
24
- <div class="bounce3"></div>
25
- </div>
26
- <span class="loader__not-visible-text">{{yield}}</span>
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
- </button>
41
- {{/if}}
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
  }
@@ -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
- display: flex;
64
- align-items: center;
65
- justify-content: flex-end;
71
+ flex-direction: row;
72
+ border: none;
66
73
  }
67
74
 
68
75
  &__details {
@@ -1,8 +1,6 @@
1
1
  .pix-multi-select {
2
2
  display: inline-block;
3
3
  position: relative;
4
- min-width: 250px;
5
- width: 100%;
6
4
 
7
5
  &__label {
8
6
  @include label();
@@ -62,7 +60,6 @@
62
60
  color: $pix-neutral-30;
63
61
  right: 10px;
64
62
  top: calc(50% - 6px);
65
- padding: 0 0 2px;
66
63
  position: absolute;
67
64
  pointer-events: none;
68
65
 
@@ -55,8 +55,7 @@
55
55
  font-size: 11px;
56
56
  color: $pix-neutral-30;
57
57
  right: 10px;
58
- top: calc(50% - 4px);
59
- padding: 0 0 2px;
58
+ top: calc(50% - 6px);
60
59
  position: absolute;
61
60
  pointer-events: none;
62
61
  }
@@ -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
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "14.8.1",
3
+ "version": "15.0.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"
@@ -8,7 +8,8 @@
8
8
  "license": "MIT",
9
9
  "author": "GIP Pix",
10
10
  "engines": {
11
- "node": "^16.13.0"
11
+ "node": "16.14.0",
12
+ "npm": ">=8.3.1 <=8.13.2"
12
13
  },
13
14
  "ember": {
14
15
  "edition": "octane"
@@ -33,6 +34,7 @@
33
34
  "lint:hbs:fix": "npm run lint:hbs -- --fix",
34
35
  "lint:js": "eslint .",
35
36
  "lint:js:fix": "npm run lint:js -- --fix",
37
+ "preinstall": "npx check-engine",
36
38
  "start": "ember serve",
37
39
  "storybook": "ember build && ember serve & start-storybook -p 9001 -s dist",
38
40
  "test": "ember test",