@1024pix/pix-ui 14.8.0 → 15.0.1

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
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 16.13.0
1
+ 16.14.0
@@ -1,5 +1,3 @@
1
- import './fonts.css';
2
-
3
1
  export const parameters = {
4
2
  a11y: {
5
3
  element: '#root',
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v15.0.1 (08/07/2022)
4
+
5
+
6
+ ### :bug: Correction
7
+ - [#234](https://github.com/1024pix/pix-ui/pull/234) [BUGFIX] Laisser les filtres à côté du label dans le FilterBanner (PIX-5301)
8
+ - [#231](https://github.com/1024pix/pix-ui/pull/231) [BUGFIX] PixButton de type submit affiche un loader si @isLoading=true
9
+
10
+ ## v15.0.0 (05/07/2022)
11
+
12
+
13
+ ### :building_construction: Tech
14
+ - [#229](https://github.com/1024pix/pix-ui/pull/229) [TECH] Retirer la taille par defaut du composant PixMultiSelect
15
+ - [#224](https://github.com/1024pix/pix-ui/pull/224) [TECH] Fixer la version NodeJS à 16.14.0
16
+
17
+ ## v14.8.1 (30/06/2022)
18
+
19
+
20
+ ### :building_construction: Tech
21
+ - [#228](https://github.com/1024pix/pix-ui/pull/228) [TECH] Import et utilisation des polices Google Fonts dans le projet
22
+
3
23
  ## v14.7.1 (28/06/2022)
4
24
 
5
25
 
@@ -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
  }
@@ -1,3 +1,45 @@
1
+ @font-face {
2
+ font-family: "Open Sans";
3
+ src: url("../@1024pix/pix-ui/fonts/OpenSans/OpenSans-Regular.ttf");
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ }
7
+
8
+ @font-face {
9
+ font-family: "Open Sans";
10
+ src: url("../@1024pix/pix-ui/fonts/OpenSans/OpenSans-SemiBold.ttf");
11
+ font-weight: 600;
12
+ font-style: normal;
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "Open Sans";
17
+ src: url("../@1024pix/pix-ui/fonts/OpenSans/OpenSans-Light.ttf");
18
+ font-weight: 300;
19
+ font-style: normal;
20
+ }
21
+
22
+ @font-face {
23
+ font-family: "Roboto";
24
+ src: url("../@1024pix/pix-ui/fonts/Roboto/Roboto-Regular.ttf");
25
+ font-weight: normal;
26
+ font-style: normal;
27
+ }
28
+
29
+ @font-face {
30
+ font-family: "Roboto";
31
+ src: url("../@1024pix/pix-ui/fonts/Roboto/Roboto-Medium.ttf");
32
+ font-weight: 500;
33
+ font-style: normal;
34
+ }
35
+
36
+ @font-face {
37
+ font-family: "Roboto";
38
+ src: url("../@1024pix/pix-ui/fonts/Roboto/Roboto-Light.ttf");
39
+ font-weight: 300;
40
+ font-style: normal;
41
+ }
42
+
1
43
  $font-open-sans: 'Open Sans', Arial, sans-serif;
2
44
  $font-roboto: 'Roboto', Arial, sans-serif;
3
45
 
@@ -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.0",
3
+ "version": "15.0.1",
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.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",
@@ -1 +0,0 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@300;400;500;700;900&display=swap');