@1024pix/pix-ui 44.2.4 → 44.2.6

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.
@@ -16,8 +16,8 @@
16
16
  class="pix-search-input__input"
17
17
  name={{@inputName}}
18
18
  placeholder={{@placeholder}}
19
- value={{@value}}
20
- oninput={{this.onSearch}}
19
+ value={{this.initialValue}}
20
+ {{on "input" this.onSearch}}
21
21
  ...attributes
22
22
  />
23
23
  </div>
@@ -1,14 +1,16 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { action } from '@ember/object';
3
3
  import { guidFor } from '@ember/object/internals';
4
- import debounce from 'lodash.debounce';
4
+ import { debounceTask } from 'ember-lifeline';
5
5
 
6
6
  export default class PixSearchInput extends Component {
7
+ initialValue = this.args.value;
8
+
7
9
  constructor() {
8
10
  super(...arguments);
9
11
 
10
12
  this.debounceTimeBeforeSearch = parseInt(this.args.debounceTimeInMs);
11
- if (isNaN(this.debounceTimeBeforeSearch)) {
13
+ if (Number.isNaN(this.debounceTimeBeforeSearch)) {
12
14
  throw new Error('ERROR in PixSearchInput component, @debounceTimeInMs param is not provided');
13
15
  }
14
16
  if (!this.args.triggerFiltering) {
@@ -21,10 +23,6 @@ export default class PixSearchInput extends Component {
21
23
  }
22
24
 
23
25
  this.searchInputId = this.args.id || guidFor(this);
24
- this.debouncedTriggerFiltering = debounce(
25
- this.args.triggerFiltering,
26
- this.debounceTimeBeforeSearch,
27
- );
28
26
  }
29
27
 
30
28
  get label() {
@@ -35,8 +33,17 @@ export default class PixSearchInput extends Component {
35
33
  return this.args.label ? null : this.args.ariaLabel;
36
34
  }
37
35
 
36
+ debouncedTriggerFiltering(value) {
37
+ this.args.triggerFiltering(this.searchInputId, value);
38
+ }
39
+
38
40
  @action
39
- async onSearch(event) {
40
- await this.debouncedTriggerFiltering(this.searchInputId, event.target.value);
41
+ onSearch(event) {
42
+ debounceTask(
43
+ this,
44
+ 'debouncedTriggerFiltering',
45
+ event.target.value,
46
+ this.debounceTimeBeforeSearch,
47
+ );
41
48
  }
42
49
  }
@@ -1,4 +1,5 @@
1
1
  // See https://www.figma.com/file/8RJ3aCSfdeQ8AZZVBBYKS8/Design-System-Pix?node-id=16%3A2
2
+ // stylelint-disable color-no-hex
2
3
  :root {
3
4
  --pix-primary-10: #f7f5ff;
4
5
  --pix-primary-100: #cec3f4;
@@ -57,7 +58,7 @@
57
58
  --pix-security-light: #ff3f94;
58
59
  --pix-environment-dark: #5e2563;
59
60
  --pix-environment-light: #564da6;
60
- --pix-shadow: #07142E;
61
+ --pix-shadow: #07142e;
61
62
  }
62
63
 
63
64
  // @deprecated - SCSS variables are replaced by CSS variables
@@ -199,3 +200,4 @@ $pix-content-gradient: linear-gradient(180deg, #1a8c89 0%, #52d987 100%);
199
200
  $pix-communication-gradient: linear-gradient(180deg, #3d68ff 0%, #12a3ff 100%);
200
201
  $pix-security-gradient: linear-gradient(180deg, #ac008d 0%, #ff3f94 100%);
201
202
  $pix-environment-gradient: linear-gradient(180deg, #5e2563 0%, #564da6 100%);
203
+ // stylelint-enable color-no-hex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "44.2.4",
3
+ "version": "44.2.6",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -53,15 +53,15 @@
53
53
  "ember-cli-htmlbars": "^6.1.1",
54
54
  "ember-cli-sass": "^11.0.1",
55
55
  "ember-click-outside": "^6.0.1",
56
+ "ember-lifeline": "^7.0.0",
56
57
  "ember-popperjs": "^3.0.0",
57
- "ember-truth-helpers": "^4.0.0",
58
- "lodash.debounce": "^4.0.8"
58
+ "ember-truth-helpers": "^4.0.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@1024pix/ember-testing-library": "^1.0.0",
62
62
  "@1024pix/eslint-config": "^1.2.2",
63
63
  "@1024pix/storybook-ember": "^7.1.1",
64
- "@1024pix/stylelint-config": "^5.0.2",
64
+ "@1024pix/stylelint-config": "^5.1.1",
65
65
  "@babel/eslint-parser": "^7.19.1",
66
66
  "@babel/plugin-proposal-decorators": "^7.20.5",
67
67
  "@ember/optional-features": "^2.0.0",