@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-77126.0 → 0.0.0-bugfix-dev-KB-77074.0

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 (149) hide show
  1. package/dist/cjs/RecordValidationProcessor-10846595.js +108 -0
  2. package/dist/cjs/ez-card-item_3.cjs.entry.js +19 -12
  3. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +10 -46
  5. package/dist/cjs/ez-date-input.cjs.entry.js +2 -8
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -8
  7. package/dist/cjs/ez-dialog.cjs.entry.js +2 -10
  8. package/dist/cjs/ez-form-view.cjs.entry.js +2 -2
  9. package/dist/cjs/ez-form.cjs.entry.js +324 -4
  10. package/dist/cjs/ez-grid.cjs.entry.js +70542 -14645
  11. package/dist/cjs/ez-list.cjs.entry.js +100 -151
  12. package/dist/cjs/ez-number-input.cjs.entry.js +0 -7
  13. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-search.cjs.entry.js +12 -28
  16. package/dist/cjs/ez-text-area.cjs.entry.js +4 -66
  17. package/dist/cjs/ez-text-input.cjs.entry.js +7 -49
  18. package/dist/cjs/ez-time-input.cjs.entry.js +0 -6
  19. package/dist/cjs/ezui.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -1
  22. package/dist/collection/components/ez-card-item/ez-card-item.css +5 -14
  23. package/dist/collection/components/ez-combo-box/ez-combo-box.js +14 -75
  24. package/dist/collection/components/ez-date-input/ez-date-input.js +4 -35
  25. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +4 -35
  26. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  27. package/dist/collection/components/ez-dialog/ez-dialog.js +1 -9
  28. package/dist/collection/components/ez-filter-input/ez-filter-input.css +11 -0
  29. package/dist/collection/components/ez-filter-input/ez-filter-input.js +52 -22
  30. package/dist/collection/components/ez-form/ez-form.js +0 -1
  31. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  32. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +25 -80
  33. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +0 -8
  34. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +46 -167
  35. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +0 -7
  36. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +0 -1
  37. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +0 -1
  38. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +0 -1
  39. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +0 -1
  40. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +1 -4
  41. package/dist/collection/components/ez-grid/ez-grid.js +3 -90
  42. package/dist/collection/components/ez-list/ez-list.css +5 -5
  43. package/dist/collection/components/ez-list/ez-list.js +170 -152
  44. package/dist/collection/components/ez-number-input/ez-number-input.js +0 -25
  45. package/dist/collection/components/ez-popover/ez-popover.css +10 -3
  46. package/dist/collection/components/ez-popup/ez-popup.js +1 -1
  47. package/dist/collection/components/ez-search/ez-search.css +1 -1
  48. package/dist/collection/components/ez-search/ez-search.js +14 -55
  49. package/dist/collection/components/ez-text-area/ez-text-area.css +0 -49
  50. package/dist/collection/components/ez-text-area/ez-text-area.js +2 -102
  51. package/dist/collection/components/ez-text-input/ez-text-input.css +53 -27
  52. package/dist/collection/components/ez-text-input/ez-text-input.js +6 -84
  53. package/dist/collection/components/ez-time-input/ez-time-input.js +0 -24
  54. package/dist/collection/utils/form/DataBinder.js +3 -18
  55. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  56. package/dist/custom-elements/index.js +70890 -15272
  57. package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
  58. package/dist/esm/ez-card-item_3.entry.js +19 -12
  59. package/dist/esm/ez-chart.entry.js +1 -1
  60. package/dist/esm/ez-combo-box.entry.js +11 -47
  61. package/dist/esm/ez-date-input.entry.js +2 -8
  62. package/dist/esm/ez-date-time-input.entry.js +2 -8
  63. package/dist/esm/ez-dialog.entry.js +2 -10
  64. package/dist/esm/ez-form-view.entry.js +2 -2
  65. package/dist/esm/ez-form.entry.js +323 -3
  66. package/dist/esm/ez-grid.entry.js +70542 -14645
  67. package/dist/esm/ez-list.entry.js +101 -152
  68. package/dist/esm/ez-number-input.entry.js +0 -7
  69. package/dist/esm/ez-popover.entry.js +1 -1
  70. package/dist/esm/ez-popup.entry.js +1 -1
  71. package/dist/esm/ez-search.entry.js +12 -28
  72. package/dist/esm/ez-text-area.entry.js +4 -66
  73. package/dist/esm/ez-text-input.entry.js +7 -49
  74. package/dist/esm/ez-time-input.entry.js +0 -6
  75. package/dist/esm/ezui.js +1 -1
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/ezui/ezui.esm.js +1 -1
  78. package/dist/ezui/p-188f1c4c.entry.js +1 -0
  79. package/dist/ezui/p-49456b34.entry.js +1 -0
  80. package/dist/ezui/p-5a90d7d1.entry.js +1 -0
  81. package/dist/ezui/p-5b205c80.entry.js +1 -0
  82. package/dist/ezui/p-62732269.entry.js +1 -0
  83. package/dist/ezui/p-86b6aa01.entry.js +1 -0
  84. package/dist/ezui/p-b3b94f72.entry.js +1 -0
  85. package/dist/ezui/p-b95632e8.entry.js +1 -0
  86. package/dist/ezui/p-bcd47eda.entry.js +1 -0
  87. package/dist/ezui/p-c3c3d640.entry.js +304 -0
  88. package/dist/ezui/p-cdc472cc.entry.js +1 -0
  89. package/dist/ezui/p-d2c06f38.entry.js +1 -0
  90. package/dist/ezui/p-d8f64bb7.entry.js +1 -0
  91. package/dist/ezui/p-dc4ada32.entry.js +1 -0
  92. package/dist/ezui/p-e85c48d7.entry.js +1 -0
  93. package/dist/ezui/p-f299c608.entry.js +1 -0
  94. package/dist/ezui/p-f42855b9.js +1 -0
  95. package/dist/ezui/p-f80ac647.entry.js +1 -0
  96. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -7
  97. package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -6
  98. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -6
  99. package/dist/types/components/ez-dialog/ez-dialog.d.ts +0 -2
  100. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +11 -4
  101. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  102. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +0 -12
  103. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -7
  104. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
  105. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -19
  106. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -3
  107. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  108. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  109. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  110. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  111. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
  112. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  113. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +0 -1
  114. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  115. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -11
  116. package/dist/types/components/ez-list/ez-list.d.ts +26 -3
  117. package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -4
  118. package/dist/types/components/ez-search/ez-search.d.ts +1 -6
  119. package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -17
  120. package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -9
  121. package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -4
  122. package/dist/types/components.d.ts +42 -107
  123. package/dist/types/utils/form/DataBinder.d.ts +0 -3
  124. package/package.json +4 -11
  125. package/dist/cjs/DataBinder-3b083480.js +0 -445
  126. package/dist/cjs/FocusResolver-885f2173.js +0 -35
  127. package/dist/collection/utils/FocusResolver.js +0 -31
  128. package/dist/esm/DataBinder-02fa9bb9.js +0 -441
  129. package/dist/esm/FocusResolver-1ccbf850.js +0 -33
  130. package/dist/ezui/p-0a75bb05.entry.js +0 -1
  131. package/dist/ezui/p-0db68715.entry.js +0 -1
  132. package/dist/ezui/p-19098a3f.entry.js +0 -1
  133. package/dist/ezui/p-1f830a2f.entry.js +0 -1
  134. package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
  135. package/dist/ezui/p-3dd919b7.entry.js +0 -1
  136. package/dist/ezui/p-455e737c.js +0 -1
  137. package/dist/ezui/p-8d0f02c7.entry.js +0 -309
  138. package/dist/ezui/p-91266ddd.entry.js +0 -1
  139. package/dist/ezui/p-97af4b13.entry.js +0 -1
  140. package/dist/ezui/p-a5b91a77.entry.js +0 -1
  141. package/dist/ezui/p-a80b1287.entry.js +0 -1
  142. package/dist/ezui/p-b54e17d2.entry.js +0 -1
  143. package/dist/ezui/p-bfad39eb.entry.js +0 -1
  144. package/dist/ezui/p-c27b2e17.entry.js +0 -1
  145. package/dist/ezui/p-cd2e78f0.entry.js +0 -1
  146. package/dist/ezui/p-d0ca26fe.entry.js +0 -1
  147. package/dist/ezui/p-dc628ed3.js +0 -1
  148. package/dist/ezui/p-ffd246f5.entry.js +0 -1
  149. package/dist/types/utils/FocusResolver.d.ts +0 -5
@@ -16,7 +16,6 @@ export class EzNumberInput {
16
16
  this.precision = undefined;
17
17
  this.prettyPrecision = undefined;
18
18
  this.mode = "regular";
19
- this.autoFocus = false;
20
19
  }
21
20
  /**
22
21
  * Aplica o foco no campo.
@@ -157,17 +156,11 @@ export class EzNumberInput {
157
156
  const textValue = this.getTextValue(this.value) || '';
158
157
  if ((this._value || '') !== textValue) {
159
158
  this._value = textValue;
160
- this._textInput.value = this._value;
161
159
  }
162
160
  }
163
161
  componentDidLoad() {
164
162
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
165
163
  this.setInputValue();
166
- if (this.autoFocus) {
167
- requestAnimationFrame(() => {
168
- this.setFocus({ selectText: true });
169
- });
170
- }
171
164
  }
172
165
  render() {
173
166
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
@@ -347,24 +340,6 @@ export class EzNumberInput {
347
340
  "attribute": "mode",
348
341
  "reflect": true,
349
342
  "defaultValue": "\"regular\""
350
- },
351
- "autoFocus": {
352
- "type": "boolean",
353
- "mutable": false,
354
- "complexType": {
355
- "original": "boolean",
356
- "resolved": "boolean",
357
- "references": {}
358
- },
359
- "required": false,
360
- "optional": false,
361
- "docs": {
362
- "tags": [],
363
- "text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
364
- },
365
- "attribute": "auto-focus",
366
- "reflect": false,
367
- "defaultValue": "false"
368
343
  }
369
344
  };
370
345
  }
@@ -9,6 +9,12 @@
9
9
  --ez-popover__box--background-color: var(--background--xlight, #fff);
10
10
  /*@doc Define a camada de visibilidade do popover.*/
11
11
  --ez-popover__box--z-index: var(--most-visible, 3);
12
+ /*@doc Define a altura do popover.*/
13
+ --ez-popover__height: fit-content;
14
+ /*@doc Define a altura máxima do popover.*/
15
+ --ez-popover__max-height: fit-content;
16
+ /*@doc Define a margin do popover.*/
17
+ --ez-popover__margin: 0;
12
18
 
13
19
  /***************
14
20
  host style
@@ -24,13 +30,14 @@
24
30
  z-index: var(--ez-popover__box--z-index);
25
31
  display: flex;
26
32
  flex-direction: column;
27
-
28
- height: fit-content;
29
-
33
+
30
34
  /*public*/
35
+ height: var(--ez-popover__height);
36
+ max-height: var(--ez-popover__max-height);
31
37
  background-color: var(--ez-popover__box--background-color);
32
38
  border-radius: var(--ez-popover__box--border-radius);
33
39
  box-shadow: var(--ez-popover__box--box-shadow);
40
+ margin: var(--ez-popover__margin);
34
41
  }
35
42
 
36
43
  .popover__box--fit-content {
@@ -25,7 +25,7 @@ export class EzPopup {
25
25
  this._popupRef.focus();
26
26
  }
27
27
  new KeyboardManager({ propagate: false, element: this._element })
28
- .bind("Enter", this.ezPopupAction.emit.bind("OK"))
28
+ .bind("Enter", () => this.ezPopupAction.emit("OK"))
29
29
  .bind("Escape", () => this.closePopup())
30
30
  .bind("Esc", () => this.closePopup());
31
31
  }
@@ -85,7 +85,7 @@
85
85
  --ez-search__scrollbar--border-radius: var(--border--radius-small, 6px);
86
86
  /*@doc Define a largura da barra de rolagem do componente.*/
87
87
  --ez-search__scrollbar--width: var(--space--medium, 12px);
88
-
88
+
89
89
  /***************
90
90
  host style
91
91
  ***************/
@@ -39,7 +39,6 @@ export class EzSearch {
39
39
  this.suppressSearch = false;
40
40
  this.ensureClearButtonVisible = false;
41
41
  this.suppressPreLoad = false;
42
- this.autoFocus = false;
43
42
  }
44
43
  observeErrorMessage() {
45
44
  var _a;
@@ -98,9 +97,9 @@ export class EzSearch {
98
97
  /**
99
98
  * Aplica o foco no campo.
100
99
  */
101
- async setFocus(options) {
100
+ async setFocus() {
102
101
  if (this._textInput) {
103
- this._textInput.setFocus(options);
102
+ this._textInput.setFocus();
104
103
  }
105
104
  }
106
105
  /**
@@ -373,16 +372,15 @@ export class EzSearch {
373
372
  replaceHighlight(value) {
374
373
  const startHighlight = new RegExp(this._startHighlightTag, 'g');
375
374
  const endHighlight = new RegExp(this._endHighlightTag, 'g');
376
- return String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
375
+ return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
377
376
  }
378
- selectOption(newOption, focusOnInput = true) {
377
+ selectOption(newOption) {
379
378
  var _a, _b;
380
379
  const currentValue = this.getSelectedOption(this.value);
381
380
  const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
382
- const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
383
- if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
384
- || (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
385
- const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
381
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
382
+ || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
383
+ const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
386
384
  this.value = adjustedOpt;
387
385
  this._currentValue = adjustedOpt;
388
386
  }
@@ -392,11 +390,6 @@ export class EzSearch {
392
390
  }
393
391
  this._visibleOptions = [];
394
392
  this.clearSource();
395
- if (focusOnInput) {
396
- setTimeout(() => {
397
- this.setFocus();
398
- }, 0);
399
- }
400
393
  }
401
394
  loadOptions(mode, argument = "") {
402
395
  this._criteria = argument;
@@ -433,7 +426,7 @@ export class EzSearch {
433
426
  this.value = null;
434
427
  this._currentValue = null;
435
428
  }
436
- controlListWithOnlyOne(focusOnInput = true) {
429
+ controlListWithOnlyOne() {
437
430
  var _a, _b;
438
431
  const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
439
432
  if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
@@ -444,7 +437,7 @@ export class EzSearch {
444
437
  value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
445
438
  label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
446
439
  };
447
- this.selectOption(option, focusOnInput);
440
+ this.selectOption(option);
448
441
  }
449
442
  }
450
443
  controlEmptySearch() {
@@ -570,11 +563,6 @@ export class EzSearch {
570
563
  }
571
564
  });
572
565
  });
573
- if (this.autoFocus) {
574
- requestAnimationFrame(() => {
575
- this.setFocus({ selectText: true });
576
- });
577
- }
578
566
  }
579
567
  //---------------------------------------------
580
568
  // Event handlers
@@ -644,16 +632,12 @@ export class EzSearch {
644
632
  }
645
633
  switch (event.key) {
646
634
  case "ArrowDown":
647
- event.stopPropagation();
648
- if (this.canShowListOptions())
649
- event.preventDefault();
650
635
  this.nextOption();
636
+ event.stopPropagation();
651
637
  break;
652
638
  case "ArrowUp":
653
- event.stopPropagation();
654
- if (this.canShowListOptions())
655
- event.preventDefault();
656
639
  this.previousOption();
640
+ event.stopPropagation();
657
641
  break;
658
642
  case "Enter":
659
643
  this.handleEventPropagation(event);
@@ -664,7 +648,7 @@ export class EzSearch {
664
648
  break;
665
649
  case "Tab":
666
650
  this._tabPressed = true;
667
- this.controlListWithOnlyOne(false);
651
+ this.controlListWithOnlyOne();
668
652
  break;
669
653
  }
670
654
  //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
@@ -1071,24 +1055,6 @@ export class EzSearch {
1071
1055
  "attribute": "suppress-pre-load",
1072
1056
  "reflect": false,
1073
1057
  "defaultValue": "false"
1074
- },
1075
- "autoFocus": {
1076
- "type": "boolean",
1077
- "mutable": false,
1078
- "complexType": {
1079
- "original": "boolean",
1080
- "resolved": "boolean",
1081
- "references": {}
1082
- },
1083
- "required": false,
1084
- "optional": false,
1085
- "docs": {
1086
- "tags": [],
1087
- "text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
1088
- },
1089
- "attribute": "auto-focus",
1090
- "reflect": false,
1091
- "defaultValue": "false"
1092
1058
  }
1093
1059
  };
1094
1060
  }
@@ -1144,18 +1110,11 @@ export class EzSearch {
1144
1110
  },
1145
1111
  "setFocus": {
1146
1112
  "complexType": {
1147
- "signature": "(options?: TFocusOptions) => Promise<void>",
1148
- "parameters": [{
1149
- "tags": [],
1150
- "text": ""
1151
- }],
1113
+ "signature": "() => Promise<void>",
1114
+ "parameters": [],
1152
1115
  "references": {
1153
1116
  "Promise": {
1154
1117
  "location": "global"
1155
- },
1156
- "TFocusOptions": {
1157
- "location": "import",
1158
- "path": "../ez-text-input/ez-text-input"
1159
1118
  }
1160
1119
  },
1161
1120
  "return": "Promise<void>"
@@ -51,20 +51,6 @@
51
51
  /*@doc Define o espaçamento direito do label.*/
52
52
  --text-area__label--padding-right: 12px;
53
53
 
54
- /* scrollbar */
55
- /*@doc Define a cor da barra de rolagem do componente.*/
56
- --text-area__scrollbar--color-default: var(--scrollbar--default, #626e82);
57
- /*@doc Define a cor de fundo da barra de rolagem do componente.*/
58
- --text-area__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);
59
- /*@doc Define a cor do hover na barra de rolagem do componente.*/
60
- --text-area__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);
61
- /*@doc Define a cor do active na barra de rolagem do componente.*/
62
- --text-area__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);
63
- /*@doc Define o raio da borda da barra de rolagem do componente.*/
64
- --text-area__scrollbar--border-radius: var(--border--radius-small, 6px);
65
- /*@doc Define a largura da barra de rolagem do componente.*/
66
- --text-area__scrollbar--width: var(--space--medium, 12px);
67
-
68
54
  /***************
69
55
  host style
70
56
  ***************/
@@ -91,9 +77,6 @@ textarea {
91
77
  font-size: var(--text-area--font-size);
92
78
  color: var(--text-area--color);
93
79
  margin-top: calc(var(--space--medium, 12px) + 4px);
94
-
95
- scrollbar-width: thin;
96
- scrollbar-color: var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background);
97
80
  }
98
81
 
99
82
  textarea:focus {
@@ -109,38 +92,6 @@ textarea:disabled {
109
92
  cursor: not-allowed;
110
93
  }
111
94
 
112
- textarea::-webkit-scrollbar {
113
- background-color: var(--text-area__scrollbar--color-background);
114
-
115
- width: var(--text-area__scrollbar--width);
116
- max-width: var(--text-area__scrollbar--width);
117
- min-width: var(--text-area__scrollbar--width);
118
- }
119
-
120
- textarea::-webkit-scrollbar-thumb {
121
- /*public*/
122
- background-color: var(--text-area__scrollbar--color-default);
123
- border-radius: var(--text-area__scrollbar--border-radius);
124
- }
125
-
126
- textarea::-webkit-scrollbar-track {
127
- /*public*/
128
- background-color: var(--text-area__scrollbar--color-background);
129
- border-radius: var(--text-area__scrollbar--border-radius);
130
- }
131
-
132
- textarea::-webkit-scrollbar-thumb:vertical:hover,
133
- textarea::-webkit-scrollbar-thumb:horizontal:hover {
134
- /*public*/
135
- background-color: var(--text-area__scrollbar--color-hover);
136
- }
137
-
138
- textarea::-webkit-scrollbar-thumb:vertical:active,
139
- textarea::-webkit-scrollbar-thumb:horizontal:active {
140
- /*public*/
141
- background-color: var(--text-area__scrollbar--color-clicked);
142
- }
143
-
144
95
  .textarea {
145
96
  /*private*/
146
97
  width: 100%;
@@ -2,8 +2,6 @@ import { ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h, Host } from '@stencil/core';
3
3
  export class EzTextArea {
4
4
  constructor() {
5
- this.LINE_HEIGHT = 24;
6
- this.HEIGHT_RATIO = 1.4;
7
5
  this.label = undefined;
8
6
  this.value = undefined;
9
7
  this.enabled = true;
@@ -12,8 +10,6 @@ export class EzTextArea {
12
10
  this.canShowError = true;
13
11
  this.mode = "regular";
14
12
  this.enableResize = false;
15
- this.autoRows = false;
16
- this.autoFocus = false;
17
13
  }
18
14
  observeErrorMessage() {
19
15
  var _a, _b, _c, _d;
@@ -51,17 +47,8 @@ export class EzTextArea {
51
47
  observeRows() {
52
48
  const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
53
49
  if (rows !== this.rows) {
54
- this.updateRows(rows);
55
- }
56
- }
57
- observeAutoRows() {
58
- var _a, _b;
59
- if (this.autoRows) {
60
- (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
61
- this.initializeResizeObserver();
62
- }
63
- else {
64
- (_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
50
+ this.rows = rows;
51
+ this._initialRows = rows;
65
52
  }
66
53
  }
67
54
  //---------------------------------------------
@@ -130,42 +117,6 @@ export class EzTextArea {
130
117
  isFocused() {
131
118
  return this._hostElement.shadowRoot.activeElement !== null;
132
119
  }
133
- updateRows(newRows) {
134
- this.rows = newRows;
135
- this._initialRows = newRows;
136
- }
137
- calculateMaxRows() {
138
- const parentElement = this._hostElement.parentElement;
139
- if (!parentElement) {
140
- return;
141
- }
142
- const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
143
- if (height > 0) {
144
- const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
145
- if (maxRows !== this.rows) {
146
- this.updateRows(maxRows);
147
- }
148
- }
149
- }
150
- initializeResizeObserver() {
151
- if (!this.autoRows) {
152
- return;
153
- }
154
- const parentElement = this._hostElement.parentElement;
155
- if (parentElement) {
156
- try {
157
- if (this._resizeObserver != undefined) {
158
- this._resizeObserver.unobserve(parentElement);
159
- }
160
- this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
161
- this._resizeObserver.observe(parentElement);
162
- }
163
- catch (e) {
164
- console.warn(e);
165
- }
166
- this.calculateMaxRows();
167
- }
168
- }
169
120
  //---------------------------------------------
170
121
  // Event handlers
171
122
  //---------------------------------------------
@@ -188,13 +139,6 @@ export class EzTextArea {
188
139
  this._container.classList.add("textarea--focus");
189
140
  }
190
141
  }
191
- connectedCallback() {
192
- this.initializeResizeObserver();
193
- }
194
- disconnectedCallback() {
195
- var _a;
196
- (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
197
- }
198
142
  //---------------------------------------------
199
143
  // Lifecycle web component
200
144
  //---------------------------------------------
@@ -202,11 +146,6 @@ export class EzTextArea {
202
146
  this.observeErrorMessage();
203
147
  this.adjustFloatingLabel();
204
148
  this.observeMode();
205
- if (this.autoFocus) {
206
- requestAnimationFrame(() => {
207
- this.setFocus();
208
- });
209
- }
210
149
  }
211
150
  render() {
212
151
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
@@ -372,42 +311,6 @@ export class EzTextArea {
372
311
  "attribute": "enable-resize",
373
312
  "reflect": true,
374
313
  "defaultValue": "false"
375
- },
376
- "autoRows": {
377
- "type": "boolean",
378
- "mutable": false,
379
- "complexType": {
380
- "original": "boolean",
381
- "resolved": "boolean",
382
- "references": {}
383
- },
384
- "required": false,
385
- "optional": false,
386
- "docs": {
387
- "tags": [],
388
- "text": "Ativa a op\u00E7\u00E3o de fazer as linhas do componente serem baseados na altura m\u00E1xima."
389
- },
390
- "attribute": "auto-rows",
391
- "reflect": true,
392
- "defaultValue": "false"
393
- },
394
- "autoFocus": {
395
- "type": "boolean",
396
- "mutable": false,
397
- "complexType": {
398
- "original": "boolean",
399
- "resolved": "boolean",
400
- "references": {}
401
- },
402
- "required": false,
403
- "optional": false,
404
- "docs": {
405
- "tags": [],
406
- "text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
407
- },
408
- "attribute": "auto-focus",
409
- "reflect": false,
410
- "defaultValue": "false"
411
314
  }
412
315
  };
413
316
  }
@@ -520,9 +423,6 @@ export class EzTextArea {
520
423
  }, {
521
424
  "propName": "rows",
522
425
  "methodName": "observeRows"
523
- }, {
524
- "propName": "autoRows",
525
- "methodName": "observeAutoRows"
526
426
  }];
527
427
  }
528
428
  }
@@ -6,6 +6,8 @@
6
6
  --ez-text-input--width: 100%;
7
7
  /*@doc Define a largura do slot que contém o ícone.*/
8
8
  --ez-text-input__icon--width: 48px;
9
+ --ez-text-input__icon--left--width: var(--ez-text-input__icon--width);
10
+ --ez-text-input__icon--right--width: var(--ez-text-input__icon--width);
9
11
  /*@doc Define a altura do componente em modo "slim".*/
10
12
  --ez-text-input--height--slim: 32px;
11
13
 
@@ -46,9 +48,6 @@
46
48
  --ez-text-input__input--noborder-color: white;
47
49
  /*@doc Define o padding do input*/
48
50
  --ez-text-input__input--padding: var(--space--medium, 6px);
49
- /*@doc Define a cor do placeholder do input.*/
50
- --ez-text-input__placeholder--color: var(--text--secondary, #a2abb9);
51
-
52
51
 
53
52
  /* message box */
54
53
  /*@doc Define o tamanho da fonte da mensagem abaixo do input.*/
@@ -105,6 +104,8 @@ input {
105
104
  color: var(--ez-text-input--color);
106
105
  font-weight: var(--ez-text-input--font-weight);
107
106
  padding: var(--ez-text-input__input--padding);
107
+ text-overflow: ellipsis;
108
+ overflow: hidden;
108
109
  }
109
110
 
110
111
  input:disabled {
@@ -122,11 +123,11 @@ input:focus {
122
123
  }
123
124
 
124
125
  input.icon--left {
125
- padding-left: var(--ez-text-input__icon--width);
126
+ padding-left: var(--ez-text-input__icon--left--width);
126
127
  }
127
128
 
128
129
  input.icon--right {
129
- padding-right: var(--ez-text-input__icon--width);
130
+ padding-right: var(--ez-text-input__icon--right--width);
130
131
  }
131
132
 
132
133
  input.hasError {
@@ -203,25 +204,23 @@ input:read-only {
203
204
  cursor: not-allowed;
204
205
  }
205
206
 
207
+ .input__label--left.input__label--right {
208
+ left: calc(var(--ez-text-input__icon--left--width) + 2px);
209
+ /*borda*/
210
+ width: calc(100% - (var(--ez-text-input__icon--right--width) + var(--ez-text-input__icon--left--width)));
211
+ }
206
212
  .input__label--left {
207
213
  /*public*/
208
214
  text-align: left;
209
- left: calc(var(--ez-text-input__icon--width) + 2px);
215
+ left: calc(var(--ez-text-input__icon--left--width) + 2px);
210
216
  /*borda*/
211
- width: calc(100% - var(--ez-text-input__icon--width));
217
+ width: calc(100% - var(--ez-text-input__icon--left--width));
212
218
  }
213
219
 
214
220
  .input__label--right {
215
221
  /*public*/
216
- right: var(--ez-text-input__icon--width);
217
- width: calc(100% - var(--ez-text-input__icon--width));
218
- }
219
-
220
- /* ISSO TA ERRADO CRIAR INPUT__LABEL--BOTH */
221
- .input__label--left.input__label--right {
222
- left: calc(var(--ez-text-input__icon--width) + 2px);
223
- /*borda*/
224
- width: calc(100% - var(--ez-text-input__icon--width) * 2);
222
+ right: var(--ez-text-input__icon--right--width);
223
+ width: calc(100% - var(--ez-text-input__icon--right--width));
225
224
  }
226
225
 
227
226
  .input--with--label {
@@ -241,18 +240,45 @@ input:read-only {
241
240
  font-weight: bold;
242
241
  }
243
242
 
244
- .input--slim::-webkit-input-placeholder, /* Edge */
245
- .input--slim:-moz-placeholder, /* Firefox 4-18 */
246
- .input--slim::-moz-placeholder, /* Firefox 19+ */
247
- .input--slim:-ms-input-placeholder, /* IE 10-11 */
248
- .input--slim::placeholder { /* Modern browsers */
249
- /*public*/
250
- font-family: var(--ez-text-input--font-family);
251
- font-size: var(--ez-text-input--font-size);
252
- font-weight: var(--ez-text-input--font-weight);
253
- color: var(--ez-text-input__placeholder--color);
254
- }
243
+ .input--slim::-webkit-input-placeholder { /* Edge */
244
+ /*public*/
245
+ font-family: var(--ez-text-input--font-family);
246
+ font-size: var(--ez-text-input--font-size);
247
+ font-weight: var(--ez-text-input--font-weight);
248
+ color: var(--ez-text-input--color);
249
+ }
255
250
 
251
+ .input--slim:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
252
+ /*public*/
253
+ font-family: var(--ez-text-input--font-family);
254
+ font-size: var(--ez-text-input--font-size);
255
+ font-weight: var(--ez-text-input--font-weight);
256
+ color: var(--ez-text-input--color);
257
+ }
258
+
259
+ .input--slim::-moz-placeholder { /* Mozilla Firefox 19+ */
260
+ /*public*/
261
+ font-family: var(--ez-text-input--font-family);
262
+ font-size: var(--ez-text-input--font-size);
263
+ font-weight: var(--ez-text-input--font-weight);
264
+ color: var(--ez-text-input--color);
265
+ }
266
+
267
+ .input--slim:-ms-input-placeholder { /* Internet Explorer 10-11 */
268
+ /*public*/
269
+ font-family: var(--ez-text-input--font-family);
270
+ font-size: var(--ez-text-input--font-size);
271
+ font-weight: var(--ez-text-input--font-weight);
272
+ color: var(--ez-text-input--color);
273
+ }
274
+
275
+ .input--slim::placeholder {
276
+ /*public*/
277
+ font-family: var(--ez-text-input--font-family);
278
+ font-size: var(--ez-text-input--font-size);
279
+ font-weight: var(--ez-text-input--font-weight);
280
+ color: var(--ez-text-input--color);
281
+ }
256
282
 
257
283
  .input--slim:disabled::-webkit-input-placeholder, /* WebKit browsers */
258
284
  .input--slim:disabled:-moz-placeholder, /* Mozilla Firefox 4 to 18 */