@ptcwebops/ptcw-design 1.4.6 → 1.4.7

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.
Files changed (46) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/ptc-card.cjs.entry.js +1 -1
  3. package/dist/cjs/ptc-link.cjs.entry.js +5 -8
  4. package/dist/cjs/ptc-pagenation.cjs.entry.js +23 -116
  5. package/dist/cjs/ptc-pricing-block.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +3 -3
  7. package/dist/cjs/ptc-search-field.cjs.entry.js +5 -11
  8. package/dist/cjs/ptcw-design.cjs.js +1 -1
  9. package/dist/collection/components/ptc-card/ptc-card.css +1 -4
  10. package/dist/collection/components/ptc-link/ptc-link.css +64 -8
  11. package/dist/collection/components/ptc-link/ptc-link.js +24 -9
  12. package/dist/collection/components/ptc-pagenation/ptc-pagenation.js +24 -129
  13. package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.css +0 -7
  14. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +1 -1
  15. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.js +2 -2
  16. package/dist/collection/components/ptc-search-field/ptc-search-field.css +1 -18
  17. package/dist/collection/components/ptc-search-field/ptc-search-field.js +6 -13
  18. package/dist/custom-elements/index.js +41 -143
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/ptc-card.entry.js +1 -1
  21. package/dist/esm/ptc-link.entry.js +5 -8
  22. package/dist/esm/ptc-pagenation.entry.js +23 -116
  23. package/dist/esm/ptc-pricing-block.entry.js +1 -1
  24. package/dist/esm/ptc-pricing-tabs.entry.js +3 -3
  25. package/dist/esm/ptc-search-field.entry.js +5 -11
  26. package/dist/esm/ptcw-design.js +1 -1
  27. package/dist/ptcw-design/p-13a1d14b.entry.js +1 -0
  28. package/dist/ptcw-design/p-33f864ef.entry.js +1 -0
  29. package/dist/ptcw-design/p-3be1b670.entry.js +1 -0
  30. package/dist/ptcw-design/p-ac872890.entry.js +1 -0
  31. package/dist/ptcw-design/p-eac345a1.entry.js +1 -0
  32. package/dist/ptcw-design/p-f58c2ac1.entry.js +1 -0
  33. package/dist/ptcw-design/ptcw-design.css +1 -1
  34. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  35. package/dist/types/components/ptc-link/ptc-link.d.ts +5 -1
  36. package/dist/types/components/ptc-pagenation/ptc-pagenation.d.ts +1 -6
  37. package/dist/types/components/ptc-search-field/ptc-search-field.d.ts +1 -2
  38. package/dist/types/components.d.ts +12 -4
  39. package/package.json +1 -1
  40. package/readme.md +1 -1
  41. package/dist/ptcw-design/p-62680bc6.entry.js +0 -1
  42. package/dist/ptcw-design/p-730cf30c.entry.js +0 -1
  43. package/dist/ptcw-design/p-7a4e460c.entry.js +0 -1
  44. package/dist/ptcw-design/p-a6d831ba.entry.js +0 -1
  45. package/dist/ptcw-design/p-c03947f8.entry.js +0 -1
  46. package/dist/ptcw-design/p-ddce141a.entry.js +0 -1
@@ -5,7 +5,7 @@ export class PtcSearchField {
5
5
  this.placeholderLabel = undefined;
6
6
  this.darkTheme = undefined;
7
7
  this.elevation = 'small';
8
- this.enableClear = false;
8
+ this.enableMobileClear = false;
9
9
  this.styles = undefined;
10
10
  }
11
11
  textChangedHandler(event) {
@@ -30,12 +30,7 @@ export class PtcSearchField {
30
30
  'searchTerm': this.getSearchValue()
31
31
  });
32
32
  }
33
- if (this.getSearchValue() && this.enableClear) {
34
- }
35
- }
36
- keyUpHandler() {
37
- if (!this.darkTheme) {
38
- this.enableClear = !(this.getSearchValue() == "");
33
+ if (this.getSearchValue() && this.enableMobileClear) {
39
34
  }
40
35
  }
41
36
  getSearchValue() {
@@ -49,22 +44,20 @@ export class PtcSearchField {
49
44
  async clearSearchValue() {
50
45
  this.textValue = "";
51
46
  let input = this.el.shadowRoot.querySelector('input');
52
- ;
53
47
  if (input) {
54
48
  input.value = "";
55
- this.enableClear = false;
56
49
  }
57
50
  }
58
51
  render() {
59
52
  const classMap = this.getCssClassMap();
60
53
  const clearIconColor = this.darkTheme ? "white" : "black";
61
- return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), h("div", { class: "search-div" }, h("div", { class: 'input-wrap' }, h("input", { type: "text", value: this.textValue, placeholder: this.placeholderLabel, onKeyDown: (e) => { this.keyDownHandler(e); }, onKeyUp: () => { this.keyUpHandler(); }, onChange: (e) => { this.textChangedHandler(e); } }), this.enableClear && h("div", { class: "icon-wrapper" }, h("icon-asset", { class: "cls", type: "ptc", color: clearIconColor, name: "times", size: "xxx-small", onClick: (e) => { this.clearSearchValue(); this.buttonClickHandler(e); } }))), h("button", { type: "button", color: "blackgrey", class: "search-btn", onClick: (e) => { this.buttonClickHandler(e); } }, h("icon-asset", { type: "ptc", size: "medium", name: "new-search", color: "white" })))));
54
+ return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), h("div", { class: "search-div" }, h("input", { type: "text", value: this.textValue, placeholder: this.placeholderLabel, onKeyDown: (e) => { this.keyDownHandler(e); }, onChange: (e) => { this.textChangedHandler(e); } }), this.enableMobileClear && h("div", { class: "icon-wrapper" }, h("icon-asset", { class: "cls", type: "ptc", color: clearIconColor, name: "times", size: "xxx-small", onClick: (e) => { this.clearSearchValue(); this.buttonClickHandler(e); } })), h("button", { type: "button", color: "blackgrey", class: "search-btn", onClick: (e) => { this.buttonClickHandler(e); } }, h("icon-asset", { type: "ptc", size: "medium", name: "new-search", color: "white" })))));
62
55
  }
63
56
  getCssClassMap() {
64
57
  return {
65
58
  ['dark']: this.darkTheme ? true : false,
66
59
  [this.elevation]: true,
67
- ['enable-clear']: this.enableClear
60
+ ['enable-clear']: this.enableMobileClear
68
61
  };
69
62
  }
70
63
  static get is() { return "ptc-search-field"; }
@@ -150,7 +143,7 @@ export class PtcSearchField {
150
143
  "reflect": false,
151
144
  "defaultValue": "'small'"
152
145
  },
153
- "enableClear": {
146
+ "enableMobileClear": {
154
147
  "type": "boolean",
155
148
  "mutable": false,
156
149
  "complexType": {
@@ -164,7 +157,7 @@ export class PtcSearchField {
164
157
  "tags": [],
165
158
  "text": ""
166
159
  },
167
- "attribute": "enable-clear",
160
+ "attribute": "enable-mobile-clear",
168
161
  "reflect": false,
169
162
  "defaultValue": "false"
170
163
  },