@sankhyalabs/ezui 0.0.0-feat-dev-KB-66041.2 → 0.0.0-feat-dev-KB-66041.3

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 (80) hide show
  1. package/dist/cjs/ez-chart.cjs.entry.js +3 -3
  2. package/dist/cjs/ez-dialog.cjs.entry.js +3 -1
  3. package/dist/cjs/{ez-dropdown_2.cjs.entry.js → ez-dropdown.cjs.entry.js} +0 -61
  4. package/dist/cjs/ez-grid.cjs.entry.js +2 -7
  5. package/dist/cjs/ez-modal-container.cjs.entry.js +5 -1
  6. package/dist/cjs/ez-modal.cjs.entry.js +5 -1
  7. package/dist/cjs/ez-popup.cjs.entry.js +5 -1
  8. package/dist/cjs/ez-search-plus.cjs.entry.js +48 -19
  9. package/dist/cjs/ez-search-result-list.cjs.entry.js +2 -3
  10. package/dist/cjs/ez-skeleton.cjs.entry.js +67 -0
  11. package/dist/cjs/ez-text-input.cjs.entry.js +39 -27
  12. package/dist/cjs/ez-tooltip.cjs.entry.js +8 -3
  13. package/dist/cjs/ezui.cjs.js +1 -1
  14. package/dist/cjs/index-a7b0c73d.js +6 -2
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/components/ez-chart/ez-chart.js +2 -2
  17. package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js +1 -0
  18. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +3 -3
  19. package/dist/collection/components/ez-dialog/ez-dialog.js +3 -1
  20. package/dist/collection/components/ez-grid/ez-grid.js +2 -7
  21. package/dist/collection/components/ez-modal/ez-modal.js +5 -1
  22. package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
  23. package/dist/collection/components/ez-popup/ez-popup.js +5 -1
  24. package/dist/collection/components/ez-search-plus/ez-search-plus.css +1 -1
  25. package/dist/collection/components/ez-search-plus/ez-search-plus.js +56 -24
  26. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +4 -10
  27. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +1 -2
  28. package/dist/collection/components/ez-text-input/ez-text-input.css +2 -0
  29. package/dist/collection/components/ez-text-input/ez-text-input.js +40 -26
  30. package/dist/collection/components/ez-tooltip/ez-tooltip.css +1 -0
  31. package/dist/collection/components/ez-tooltip/ez-tooltip.js +29 -6
  32. package/dist/custom-elements/index.js +122 -68
  33. package/dist/esm/ez-chart.entry.js +3 -3
  34. package/dist/esm/ez-dialog.entry.js +3 -1
  35. package/dist/esm/{ez-dropdown_2.entry.js → ez-dropdown.entry.js} +1 -61
  36. package/dist/esm/ez-grid.entry.js +2 -7
  37. package/dist/esm/ez-modal-container.entry.js +5 -1
  38. package/dist/esm/ez-modal.entry.js +5 -1
  39. package/dist/esm/ez-popup.entry.js +5 -1
  40. package/dist/esm/ez-search-plus.entry.js +48 -19
  41. package/dist/esm/ez-search-result-list.entry.js +2 -3
  42. package/dist/esm/ez-skeleton.entry.js +63 -0
  43. package/dist/esm/ez-text-input.entry.js +39 -27
  44. package/dist/esm/ez-tooltip.entry.js +8 -3
  45. package/dist/esm/ezui.js +1 -1
  46. package/dist/esm/index-baa5e267.js +6 -2
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/ezui/ezui.esm.js +1 -1
  49. package/dist/ezui/p-03c106f6.entry.js +1 -0
  50. package/dist/ezui/p-13249c07.entry.js +1 -0
  51. package/dist/ezui/p-2b4df33d.entry.js +1 -0
  52. package/dist/ezui/p-4cf0aaeb.entry.js +1 -0
  53. package/dist/ezui/p-6754489a.entry.js +1 -0
  54. package/dist/ezui/p-6825bdc7.entry.js +1 -0
  55. package/dist/ezui/p-7742802c.entry.js +1 -0
  56. package/dist/ezui/{p-8cf78590.entry.js → p-91b118a7.entry.js} +1 -1
  57. package/dist/ezui/p-9c5cd3b2.entry.js +1 -0
  58. package/dist/ezui/p-bac0f920.entry.js +1 -0
  59. package/dist/ezui/p-c00df4be.entry.js +1 -0
  60. package/dist/ezui/{p-5b205c80.entry.js → p-d47dabdf.entry.js} +1 -1
  61. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +2 -0
  62. package/dist/types/components/ez-chart/interfaces/ChartTypeValue.d.ts +1 -0
  63. package/dist/types/components/ez-dialog/ez-dialog.d.ts +1 -0
  64. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
  65. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
  66. package/dist/types/components/ez-popup/ez-popup.d.ts +2 -0
  67. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +6 -4
  68. package/dist/types/components/ez-text-input/ez-text-input.d.ts +6 -2
  69. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +6 -2
  70. package/dist/types/components.d.ts +19 -11
  71. package/package.json +1 -1
  72. package/dist/ezui/p-248d4f54.entry.js +0 -1
  73. package/dist/ezui/p-2f45506d.entry.js +0 -1
  74. package/dist/ezui/p-3176a6ef.entry.js +0 -1
  75. package/dist/ezui/p-4e0628a7.entry.js +0 -1
  76. package/dist/ezui/p-81145609.entry.js +0 -1
  77. package/dist/ezui/p-84b1c99e.entry.js +0 -1
  78. package/dist/ezui/p-9142b27a.entry.js +0 -1
  79. package/dist/ezui/p-d47d8fe6.entry.js +0 -1
  80. package/dist/ezui/p-ea54d056.entry.js +0 -1
@@ -191,14 +191,14 @@ class BaseHighChartsRender {
191
191
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (name && { name })), (type && { type })), (data && { data })), (color && { color })), (showDataLabel && { dataLabels: { enabled: showDataLabel } })), (yAxis !== undefined && { yAxis }));
192
192
  }
193
193
  chartAxisToAxisOptions(axis) {
194
- const { categories, color, text, invertedPosition, formatter } = axis;
195
- return Object.assign(Object.assign(Object.assign(Object.assign({}, (categories && { categories })), (text && {
194
+ const { categories, color, text, invertedPosition, formatter, type } = axis;
195
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (categories && { categories })), (text && {
196
196
  title: Object.assign({ text }, (color && { style: { color } }))
197
197
  })), (formatter && {
198
198
  labels: {
199
199
  formatter: function () { return formatter(this.value); },
200
200
  }
201
- })), (invertedPosition && { opposite: invertedPosition }));
201
+ })), (invertedPosition && { opposite: invertedPosition })), (type && { type }));
202
202
  }
203
203
  }
204
204
 
@@ -160,7 +160,7 @@ const EzDialog = class {
160
160
  }
161
161
  componentDidLoad() {
162
162
  core.ElementIDUtils.addIDInfo(this._element);
163
- new core.KeyboardManager({ propagate: false, element: this._element })
163
+ this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element })
164
164
  .bind("Enter", () => this.handleButtonClick(true), { description: "Botão de confirmação ou OK", element: this._element })
165
165
  .bind("Escape", () => this.handleButtonClick(false), { description: "Botão de fechar ou x", element: this._element })
166
166
  .bind("Esc", () => this.handleButtonClick(false), { description: "Botão de fechar ou x", element: this._element });
@@ -192,8 +192,10 @@ const EzDialog = class {
192
192
  });
193
193
  }
194
194
  disconnectedCallback() {
195
+ var _a;
195
196
  FocusResolver.FocusResolver.resolveFocus(this._lastActiveElement);
196
197
  this._lastActiveElement = undefined;
198
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
197
199
  }
198
200
  render() {
199
201
  if (this.opened && this._currentMessage) {
@@ -524,65 +524,4 @@ const EzDropdown = class {
524
524
  };
525
525
  EzDropdown.style = ezDropdownCss;
526
526
 
527
- const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
528
-
529
- const ezSkeletonCss = ".skeleton {\n\tbackground: var(--skeleton-background, #eff1f6) no-repeat;\n\n\tborder-radius: var(--skeleton-border-radius, 4px);\n\twidth: var(--skeleton-width, 100%);\n\theight: var(--skeleton-height, 20px);\n\tdisplay: inline-block;\n\tmargin-bottom: var(--skeleton-margin-bottom, 0px);\t\n\tbox-sizing: border-box;\n\toutline: none;\n\toverflow: hidden;\n\tposition: relative;\n\t-webkit-will-change: transform;\n -moz-will-change: transform;\n\twill-change: transform;\n\n\t&:after,\n\t&:before {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.circle {\n\t\twidth: var(--skeleton-width, 40px);\n\t\theight: var(--skeleton-height, 40px);\n\t\tmargin-bottom: var(--skeleton-margin-bottom, 5px);\n\t\tborder-radius: var(--skeleton-border-radius, 50%);\n\t}\n\n\t&.rect {\n\t\tborder-radius: var(--skeleton-border-radius, 0px);\n\t}\n\n\t&.progress,\n\t&.progress-dark {\n\t\t-webkit-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tbackground-size: 200px 100%;\n\t}\n\n\t&.progress {\n\t\tbackground-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -moz-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -ms-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n\t}\n\n\t&.progress-dark {\n\t\tbackground-image: -webkit-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -moz-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -ms-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent); \n\t\tbackground-image: linear-gradient(90deg,transparent,rgba(0, 0, 0, 0.2),transparent);\n\t}\n\n\t&.pulse {\n\t\t-webkit-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation-delay: 0.5s;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t&.pulse,\n\t\t&.progress-dark,\n\t\t&.progress {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&.progress,\n\t\t&.progress-dark {\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n}\n\n@-webkit-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-moz-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-ms-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@keyframes progress {\n\t0% { background-position: -200px 0; }\n\t100% { background-position: calc(200px + 100%) 0; }\n}\n\n@-webkit-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-moz-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-ms-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@keyframes pulse {\n\t0% { opacity: 1; }\n\t50% { opacity: 0.4; }\n\t100% { opacity: 1; }\n}";
530
-
531
- const EzSkeleton = class {
532
- constructor(hostRef) {
533
- index.registerInstance(this, hostRef);
534
- this.items = [];
535
- this.count = 1;
536
- this.variant = 'text';
537
- this.width = null;
538
- this.height = null;
539
- this.marginBottom = null;
540
- this.animation = 'progress';
541
- }
542
- componentWillLoad() {
543
- this.init();
544
- }
545
- componentWillUpdate() {
546
- this.init();
547
- }
548
- init() {
549
- this.items.length = this.count;
550
- this.items.fill(1);
551
- if (!ALLOWED_ANIMATIONS.includes(this.animation)) {
552
- this.animation = 'progress';
553
- }
554
- }
555
- get style() {
556
- let dimenssionsStyles = {
557
- width: null,
558
- height: null,
559
- marginBottom: null
560
- };
561
- if (this.width) {
562
- dimenssionsStyles.width = this.width;
563
- }
564
- if (this.height) {
565
- dimenssionsStyles.height = this.height;
566
- }
567
- if (this.marginBottom) {
568
- dimenssionsStyles.marginBottom = this.marginBottom;
569
- }
570
- return dimenssionsStyles;
571
- }
572
- render() {
573
- return this.items.map((_, index$1) => {
574
- return (index.h("span", { key: index$1, class: {
575
- circle: this.variant === 'circle',
576
- rect: this.variant === 'rect',
577
- progress: this.animation === 'progress',
578
- 'progress-dark': this.animation === 'progress-dark',
579
- pulse: this.animation === 'pulse',
580
- skeleton: true
581
- }, "data-busy": "true", "data-valuemin": "0", "data-valuemax": "100", "data-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
582
- });
583
- }
584
- };
585
- EzSkeleton.style = ezSkeletonCss;
586
-
587
527
  exports.ez_dropdown = EzDropdown;
588
- exports.ez_skeleton = EzSkeleton;
@@ -66759,13 +66759,8 @@ const EzGrid = class {
66759
66759
  }, { description: "Avança para a próxima página.", element: this._element });
66760
66760
  }
66761
66761
  async removeShortcuts() {
66762
- if (this._keyboardManager) {
66763
- this._keyboardManager
66764
- .unbind("ctrl + .")
66765
- .unbind("ctrl + ,")
66766
- .unbind("ctrl + alt + ArrowLeft")
66767
- .unbind("ctrl + alt + ArrowRight");
66768
- }
66762
+ var _a;
66763
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
66769
66764
  }
66770
66765
  render() {
66771
66766
  var _a;
@@ -54,11 +54,15 @@ const EzModalContainer = class {
54
54
  this.ezModalAction.emit(ModalAction$1.LOAD);
55
55
  this._modalRef.focus();
56
56
  });
57
- new core.KeyboardManager({ propagate: false, element: this._element })
57
+ this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element })
58
58
  .bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
59
59
  .bind("Escape", () => this.closeModal())
60
60
  .bind("Esc", () => this.closeModal());
61
61
  }
62
+ disconnectedCallback() {
63
+ var _a;
64
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
65
+ }
62
66
  closeModal() {
63
67
  this.ezModalAction.emit("CLOSE");
64
68
  }
@@ -36,7 +36,7 @@ const EzModal = class {
36
36
  }
37
37
  componentDidLoad() {
38
38
  this.observeOpened();
39
- new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
39
+ this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
40
40
  .bind("Enter", this.ezModalAction.emit.bind("OK"))
41
41
  .bind("Escape", () => this.closeModal())
42
42
  .bind("Esc", () => this.closeModal());
@@ -44,6 +44,10 @@ const EzModal = class {
44
44
  componentDidRender() {
45
45
  this.modalFocus();
46
46
  }
47
+ disconnectedCallback() {
48
+ var _a;
49
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
50
+ }
47
51
  modalFocus() {
48
52
  if (!this.opened) {
49
53
  return;
@@ -35,11 +35,15 @@ const EzPopup = class {
35
35
  if (this.opened && this._popupRef) {
36
36
  this._popupRef.focus();
37
37
  }
38
- new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
38
+ this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
39
39
  .bind("Enter", this.ezPopupAction.emit.bind("OK"))
40
40
  .bind("Escape", () => this.closePopup())
41
41
  .bind("Esc", () => this.closePopup());
42
42
  }
43
+ disconnectedCallback() {
44
+ var _a;
45
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
46
+ }
43
47
  closePopup() {
44
48
  this.opened = false;
45
49
  this.manageOverflow();
@@ -11,7 +11,7 @@ require('./CheckMode-ecb90b87.js');
11
11
  const types = require('./types-6a5df0c7.js');
12
12
  require('./FormLayout-c2451c7f.js');
13
13
 
14
- const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{width:107px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
14
+ const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
15
15
 
16
16
  const EzSearchPlus = class {
17
17
  constructor(hostRef) {
@@ -53,9 +53,10 @@ const EzSearchPlus = class {
53
53
  async observeValue(newValue, oldValue) {
54
54
  const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
55
55
  const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
56
- if (newNormalizedValue == oldNormalizedValue)
56
+ if (newNormalizedValue === oldNormalizedValue) {
57
57
  return;
58
- if (newNormalizedValue == undefined) {
58
+ }
59
+ if (newNormalizedValue === undefined) {
59
60
  this.codeValue = undefined;
60
61
  this.descriptionValue = undefined;
61
62
  this.ezChange.emit(undefined);
@@ -64,13 +65,17 @@ const EzSearchPlus = class {
64
65
  this.codeValue = newNormalizedValue;
65
66
  try {
66
67
  this.descriptionValue = await this.normalizeCodeToDescriptionValue(newValue);
68
+ if (this.descriptionValue === null || this.descriptionValue === undefined) {
69
+ throw new Error("Valor não encontrado!");
70
+ }
67
71
  }
68
72
  catch (err) {
69
73
  this.value = undefined;
70
74
  console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
71
75
  throw err;
72
76
  }
73
- this.ezChange.emit(this.buildCurrentValue());
77
+ this.value = this.buildCurrentValue();
78
+ this.ezChange.emit(this.value);
74
79
  }
75
80
  canShowLoadSpinDescription() {
76
81
  return this.isLoadingDescription;
@@ -204,6 +209,9 @@ const EzSearchPlus = class {
204
209
  if (!loadedOption) {
205
210
  return "";
206
211
  }
212
+ if (Array.isArray(loadedOption)) {
213
+ return loadedOption[0].label;
214
+ }
207
215
  return loadedOption.label;
208
216
  }
209
217
  finally {
@@ -245,7 +253,7 @@ const EzSearchPlus = class {
245
253
  }
246
254
  async handleTextInputChangeHandler(event) {
247
255
  if (!this.searchDescriptionIsOpen) {
248
- this._popover.show();
256
+ this._popover.showUnder(this.el);
249
257
  }
250
258
  const argument = event.target.value;
251
259
  await this.debounceLoaderOptions(argument);
@@ -260,11 +268,31 @@ const EzSearchPlus = class {
260
268
  }, this.SEARCH_DESCRIPTION_TIMEOUT);
261
269
  });
262
270
  }
271
+ updateKeyOption(option) {
272
+ return (Object.assign(Object.assign({}, option), { presentationValue: option.value, presentationLabel: option.label }));
273
+ }
274
+ parseSearchOptions(options = []) {
275
+ if (Array.isArray(options)) {
276
+ const firstOption = options[0];
277
+ if (!firstOption) {
278
+ return [];
279
+ }
280
+ if ("label" in firstOption || "value" in firstOption) {
281
+ return options.map((option) => this.updateKeyOption(option));
282
+ }
283
+ return options;
284
+ }
285
+ if ("label" in options || "value" in options) {
286
+ [this.updateKeyOption(options)];
287
+ }
288
+ return [options];
289
+ }
263
290
  async processOptionsLoader(argument) {
264
291
  try {
265
292
  this.showLoading = true;
266
293
  const searchArgument = { mode: types.SearchMode.PREDICTIVE, argument };
267
- this.visibleOptions = await this.optionLoader(searchArgument);
294
+ const options = await this.optionLoader(searchArgument);
295
+ this.visibleOptions = this.parseSearchOptions(options);
268
296
  }
269
297
  finally {
270
298
  this.showLoading = false;
@@ -296,12 +324,13 @@ const EzSearchPlus = class {
296
324
  await ((_a = this._searchList) === null || _a === void 0 ? void 0 : _a.selectCurrentItem());
297
325
  }
298
326
  async cancelSelection() {
299
- var _a, _b, _c, _d;
300
- if (this._textInputDescriptionValue && this._textInputDescriptionValue.value != ((_a = this.value) === null || _a === void 0 ? void 0 : _a.label)) {
301
- this._textInputDescriptionValue.value = (_b = this.value) === null || _b === void 0 ? void 0 : _b.label;
327
+ var _a, _b, _c;
328
+ const description = typeof this.value === 'object' ? (_a = this.value) === null || _a === void 0 ? void 0 : _a.label : "";
329
+ if (this._textInputDescriptionValue && description && this._textInputDescriptionValue.value != description) {
330
+ this._textInputDescriptionValue.value = description;
302
331
  }
303
- await ((_c = this._searchList) === null || _c === void 0 ? void 0 : _c.cancelSelection());
304
- (_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
332
+ await ((_b = this._searchList) === null || _b === void 0 ? void 0 : _b.cancelSelection());
333
+ (_c = this._popover) === null || _c === void 0 ? void 0 : _c.hide();
305
334
  }
306
335
  async handleInputTab() {
307
336
  await this.cancelSelection();
@@ -313,13 +342,13 @@ const EzSearchPlus = class {
313
342
  }
314
343
  async initKeyboardManager() {
315
344
  this._keyboardManager = new core.KeyboardManager();
316
- const opts = { element: this.el, propagate: true };
345
+ const defaultOpts = { element: this.el, propagate: true };
317
346
  this._keyboardManager
318
- .bind("ArrowUp", () => this.handleArrowUp(), opts)
319
- .bind("ArrowDown", () => this.handleArrowDown(), opts)
320
- .bind("Enter", () => this.selectCurrentItem(), opts)
321
- .bind("Tab", () => this.handleInputTab(), opts)
322
- .bind("Escape", () => this.handleInputEsc(), opts);
347
+ .bind("ArrowUp", () => this.handleArrowUp(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
348
+ .bind("ArrowDown", () => this.handleArrowDown(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
349
+ .bind("Enter", () => this.selectCurrentItem(), defaultOpts)
350
+ .bind("Tab", () => this.handleInputTab(), defaultOpts)
351
+ .bind("Escape", () => this.handleInputEsc(), defaultOpts);
323
352
  }
324
353
  disconnectedCallback() {
325
354
  this._keyboardManager
@@ -354,10 +383,10 @@ const EzSearchPlus = class {
354
383
  render() {
355
384
  core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
356
385
  return (index.h(index.Host, null, index.h("div", { class: "ez-search-plus__container" }, index.h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
357
- "ez-search-plus__code-input": true,
386
+ "ez-search-plus__code-input": !this.hideDescriptionInput,
358
387
  "ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
359
388
  "ez-search-plus__code-input-full": this.hideDescriptionInput
360
- }, "data-element-id": core.ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), hasInvalid: !core.StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && index.h("div", { class: "description-input-container" }, index.h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", enabled: !this.disableDescriptionInput && this.enabled, label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, value: this.descriptionValue, onInput: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInputDescriptionValue, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: event => this.searchDescriptionIsOpen = event.detail }, index.h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) }))))));
389
+ }, "data-element-id": core.ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), canShowError: this.canShowError, hasInvalid: !core.StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && (index.h("div", { class: "description-input-container" }, index.h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", enabled: !this.disableDescriptionInput && this.enabled, label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, value: this.descriptionValue, onInput: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this.el, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: (event) => this.searchDescriptionIsOpen = event.detail }, index.h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) })))))));
361
390
  }
362
391
  get el() { return index.getElement(this); }
363
392
  static get watchers() { return {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
- const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
8
+ const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.loading__container{display:flex;flex-direction:column;margin:var(--space--small)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
9
9
 
10
10
  const EzSearchResultList = class {
11
11
  constructor(hostRef) {
@@ -89,8 +89,7 @@ const EzSearchResultList = class {
89
89
  render() {
90
90
  return (index.h(index.Host, null, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
91
91
  && this.visibleOptions.length === 0
92
- && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
93
- && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
92
+ && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading && (index.h("div", { class: "loading__container" }, index.h("ez-skeleton", { count: 4, height: '20px' }))), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
94
93
  }
95
94
  };
96
95
  EzSearchResultList.style = ezSearchResultListCss;
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+
7
+ const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
8
+
9
+ const ezSkeletonCss = ".skeleton {\n\tbackground: var(--skeleton-background, #eff1f6) no-repeat;\n\n\tborder-radius: var(--skeleton-border-radius, 4px);\n\twidth: var(--skeleton-width, 100%);\n\theight: var(--skeleton-height, 20px);\n\tdisplay: inline-block;\n\tmargin-bottom: var(--skeleton-margin-bottom, 0px);\t\n\tbox-sizing: border-box;\n\toutline: none;\n\toverflow: hidden;\n\tposition: relative;\n\t-webkit-will-change: transform;\n -moz-will-change: transform;\n\twill-change: transform;\n\n\t&:after,\n\t&:before {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.circle {\n\t\twidth: var(--skeleton-width, 40px);\n\t\theight: var(--skeleton-height, 40px);\n\t\tmargin-bottom: var(--skeleton-margin-bottom, 5px);\n\t\tborder-radius: var(--skeleton-border-radius, 50%);\n\t}\n\n\t&.rect {\n\t\tborder-radius: var(--skeleton-border-radius, 0px);\n\t}\n\n\t&.progress,\n\t&.progress-dark {\n\t\t-webkit-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tbackground-size: 200px 100%;\n\t}\n\n\t&.progress {\n\t\tbackground-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -moz-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -ms-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n\t}\n\n\t&.progress-dark {\n\t\tbackground-image: -webkit-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -moz-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -ms-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent); \n\t\tbackground-image: linear-gradient(90deg,transparent,rgba(0, 0, 0, 0.2),transparent);\n\t}\n\n\t&.pulse {\n\t\t-webkit-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation-delay: 0.5s;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t&.pulse,\n\t\t&.progress-dark,\n\t\t&.progress {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&.progress,\n\t\t&.progress-dark {\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n}\n\n@-webkit-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-moz-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-ms-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@keyframes progress {\n\t0% { background-position: -200px 0; }\n\t100% { background-position: calc(200px + 100%) 0; }\n}\n\n@-webkit-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-moz-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-ms-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@keyframes pulse {\n\t0% { opacity: 1; }\n\t50% { opacity: 0.4; }\n\t100% { opacity: 1; }\n}";
10
+
11
+ const EzSkeleton = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.items = [];
15
+ this.count = 1;
16
+ this.variant = 'text';
17
+ this.width = null;
18
+ this.height = null;
19
+ this.marginBottom = null;
20
+ this.animation = 'progress';
21
+ }
22
+ componentWillLoad() {
23
+ this.init();
24
+ }
25
+ componentWillUpdate() {
26
+ this.init();
27
+ }
28
+ init() {
29
+ this.items.length = this.count;
30
+ this.items.fill(1);
31
+ if (!ALLOWED_ANIMATIONS.includes(this.animation)) {
32
+ this.animation = 'progress';
33
+ }
34
+ }
35
+ get style() {
36
+ let dimenssionsStyles = {
37
+ width: null,
38
+ height: null,
39
+ marginBottom: null
40
+ };
41
+ if (this.width) {
42
+ dimenssionsStyles.width = this.width;
43
+ }
44
+ if (this.height) {
45
+ dimenssionsStyles.height = this.height;
46
+ }
47
+ if (this.marginBottom) {
48
+ dimenssionsStyles.marginBottom = this.marginBottom;
49
+ }
50
+ return dimenssionsStyles;
51
+ }
52
+ render() {
53
+ return this.items.map((_, index$1) => {
54
+ return (index.h("span", { key: index$1, class: {
55
+ circle: this.variant === 'circle',
56
+ rect: this.variant === 'rect',
57
+ progress: this.animation === 'progress',
58
+ 'progress-dark': this.animation === 'progress-dark',
59
+ pulse: this.animation === 'pulse',
60
+ skeleton: true
61
+ }, "data-busy": "true", "data-valuemin": "0", "data-valuemax": "100", "data-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
62
+ });
63
+ }
64
+ };
65
+ EzSkeleton.style = ezSkeletonCss;
66
+
67
+ exports.ez_skeleton = EzSkeleton;