@sankhyalabs/ezui 1.1.115 → 1.1.116

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 (72) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +6 -2
  2. package/dist/cjs/ez-date-input.cjs.entry.js +6 -2
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +6 -2
  4. package/dist/cjs/ez-filter-input.cjs.entry.js +73 -0
  5. package/dist/cjs/ez-number-input.cjs.entry.js +5 -1
  6. package/dist/cjs/ez-search.cjs.entry.js +17 -13
  7. package/dist/cjs/ez-text-area.cjs.entry.js +28 -9
  8. package/dist/cjs/ez-text-input.cjs.entry.js +11 -6
  9. package/dist/cjs/ez-time-input.cjs.entry.js +7 -2
  10. package/dist/cjs/ezui.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/test-du.cjs.entry.js +2 -1
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/ez-combo-box/ez-combo-box.js +24 -2
  15. package/dist/collection/components/ez-date-input/ez-date-input.js +24 -2
  16. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +24 -2
  17. package/dist/collection/components/ez-filter-input/ez-filter-input.css +4 -0
  18. package/dist/collection/components/ez-filter-input/ez-filter-input.js +248 -0
  19. package/dist/collection/components/ez-number-input/ez-number-input.js +23 -1
  20. package/dist/collection/components/ez-search/ez-search.js +35 -13
  21. package/dist/collection/components/ez-text-area/ez-text-area.css +71 -1
  22. package/dist/collection/components/ez-text-area/ez-text-area.js +67 -9
  23. package/dist/collection/components/ez-text-input/ez-text-input.css +78 -0
  24. package/dist/collection/components/ez-text-input/ez-text-input.js +29 -6
  25. package/dist/collection/components/ez-time-input/ez-time-input.js +25 -2
  26. package/dist/collection/components/test-du/test-du.js +2 -1
  27. package/dist/custom-elements/index.d.ts +6 -0
  28. package/dist/custom-elements/index.js +166 -47
  29. package/dist/esm/ez-combo-box.entry.js +6 -2
  30. package/dist/esm/ez-date-input.entry.js +6 -2
  31. package/dist/esm/ez-date-time-input.entry.js +6 -2
  32. package/dist/esm/ez-filter-input.entry.js +69 -0
  33. package/dist/esm/ez-number-input.entry.js +5 -1
  34. package/dist/esm/ez-search.entry.js +17 -13
  35. package/dist/esm/ez-text-area.entry.js +28 -9
  36. package/dist/esm/ez-text-input.entry.js +11 -6
  37. package/dist/esm/ez-time-input.entry.js +7 -2
  38. package/dist/esm/ezui.js +1 -1
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/test-du.entry.js +2 -1
  41. package/dist/ezui/ezui.esm.js +1 -1
  42. package/dist/ezui/p-01169201.entry.js +1 -0
  43. package/dist/ezui/p-055f1b6a.entry.js +1 -0
  44. package/dist/ezui/p-2f14fe3d.entry.js +1 -0
  45. package/dist/ezui/p-43feac7d.entry.js +1 -0
  46. package/dist/ezui/p-6f39077b.entry.js +1 -0
  47. package/dist/ezui/p-83d5f1ca.entry.js +1 -0
  48. package/dist/ezui/p-8c447785.entry.js +1 -0
  49. package/dist/ezui/p-8f2d46f8.entry.js +1 -0
  50. package/dist/ezui/p-d3d3e2ac.entry.js +1 -0
  51. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
  52. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  53. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  54. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +52 -0
  55. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  56. package/dist/types/components/ez-search/ez-search.d.ts +24 -20
  57. package/dist/types/components/ez-text-area/ez-text-area.d.ts +11 -0
  58. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
  59. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  60. package/dist/types/components.d.ts +153 -0
  61. package/package.json +1 -1
  62. package/react/components.d.ts +1 -0
  63. package/react/components.js +1 -0
  64. package/react/components.js.map +1 -1
  65. package/dist/ezui/p-25e87823.entry.js +0 -1
  66. package/dist/ezui/p-3a8bf0a8.entry.js +0 -1
  67. package/dist/ezui/p-44d4f8d6.entry.js +0 -1
  68. package/dist/ezui/p-8248690a.entry.js +0 -1
  69. package/dist/ezui/p-9aecc079.entry.js +0 -1
  70. package/dist/ezui/p-bc2834fa.entry.js +0 -1
  71. package/dist/ezui/p-c27495d9.entry.js +0 -1
  72. package/dist/ezui/p-fb73f557.entry.js +0 -1
@@ -6,19 +6,24 @@ export class EzTextArea {
6
6
  */
7
7
  this.enabled = true;
8
8
  /**
9
- * Ajusta o número de linhas e consequentemente o height do textarea. Valor default: 4
9
+ * Permite exibir a mensagem de erro.
10
10
  */
11
- this.rows = 4;
11
+ this.canShowError = true;
12
+ /**
13
+ * Define o modo do tamanho do campo; opções: slim e regular.
14
+ */
15
+ this.mode = "regular";
12
16
  }
13
17
  showError() {
18
+ var _a, _b;
14
19
  const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
15
20
  if (hasError) {
16
21
  this._container.classList.add('hasError');
17
- this._messageBoxElem.classList.add('hasError');
22
+ (_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add('hasError');
18
23
  }
19
24
  else {
20
25
  this._container.classList.remove('hasError');
21
- this._messageBoxElem.classList.remove('hasError');
26
+ (_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove('hasError');
22
27
  }
23
28
  }
24
29
  updateInputValue() {
@@ -27,8 +32,18 @@ export class EzTextArea {
27
32
  this.adjustFloatingLabel();
28
33
  this.ezChange.emit(this.value);
29
34
  }
35
+ adjustRowsForMode() {
36
+ if (this._initialRows == undefined) {
37
+ this._initialRows = this.rows > 0 ? this.rows : undefined;
38
+ }
39
+ this.rows = this._initialRows > 0 ? this._initialRows : this.mode != "slim" ? 4 : 2;
40
+ }
41
+ adjustRowsValue() {
42
+ this.rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
43
+ this._initialRows = this.rows;
44
+ }
30
45
  adjustFloatingLabel() {
31
- if (this.label) {
46
+ if (this.label && this._labelElem) {
32
47
  const hasValue = this.value && this.value.toString().length > 0;
33
48
  const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
34
49
  if (hasValue || this.isFocused()) {
@@ -88,15 +103,17 @@ export class EzTextArea {
88
103
  componentDidLoad() {
89
104
  this.showError();
90
105
  this.adjustFloatingLabel();
106
+ this.adjustRowsForMode();
91
107
  }
92
108
  render() {
93
109
  return (h(Host, null,
94
110
  h("div", { class: "textarea", ref: (el) => this._container = el },
95
- this.label ?
111
+ this.label && this.mode != "slim" ?
96
112
  h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
97
113
  : null,
98
- h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })),
99
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
114
+ h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode == "slim" ? "textarea--slim" : "", placeholder: this.mode == "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })),
115
+ this.canShowError && this.mode != "slim" &&
116
+ h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
100
117
  }
101
118
  static get is() { return "ez-text-area"; }
102
119
  static get encapsulation() { return "shadow"; }
@@ -208,8 +225,43 @@ export class EzTextArea {
208
225
  "text": "Ajusta o n\u00FAmero de linhas e consequentemente o height do textarea. Valor default: 4"
209
226
  },
210
227
  "attribute": "rows",
228
+ "reflect": true
229
+ },
230
+ "canShowError": {
231
+ "type": "boolean",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "boolean",
235
+ "resolved": "boolean",
236
+ "references": {}
237
+ },
238
+ "required": false,
239
+ "optional": false,
240
+ "docs": {
241
+ "tags": [],
242
+ "text": "Permite exibir a mensagem de erro."
243
+ },
244
+ "attribute": "can-show-error",
245
+ "reflect": true,
246
+ "defaultValue": "true"
247
+ },
248
+ "mode": {
249
+ "type": "string",
250
+ "mutable": false,
251
+ "complexType": {
252
+ "original": "string",
253
+ "resolved": "string",
254
+ "references": {}
255
+ },
256
+ "required": false,
257
+ "optional": false,
258
+ "docs": {
259
+ "tags": [],
260
+ "text": "Define o modo do tamanho do campo; op\u00E7\u00F5es: slim e regular."
261
+ },
262
+ "attribute": "mode",
211
263
  "reflect": true,
212
- "defaultValue": "4"
264
+ "defaultValue": "\"regular\""
213
265
  }
214
266
  }; }
215
267
  static get events() { return [{
@@ -269,5 +321,11 @@ export class EzTextArea {
269
321
  }, {
270
322
  "propName": "value",
271
323
  "methodName": "updateInputValue"
324
+ }, {
325
+ "propName": "mode",
326
+ "methodName": "adjustRowsForMode"
327
+ }, {
328
+ "propName": "rows",
329
+ "methodName": "adjustRowsValue"
272
330
  }]; }
273
331
  }
@@ -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
+ /*@doc Define a altura do componente em modo "slim".*/
10
+ --ez-text-input--height--slim: 32px;
9
11
 
10
12
  /* general */
11
13
  /*@doc Define o raio da borda do input do componente.*/
@@ -110,6 +112,10 @@ input.hasError {
110
112
  border-color: var(--ez-text-input__input--error--border-color);
111
113
  }
112
114
 
115
+ input:disabled.hasError {
116
+ color: var(--ez-text-input__input--disabled--color);
117
+ }
118
+
113
119
  input.text--right {
114
120
  text-align: right;
115
121
  }
@@ -193,4 +199,76 @@ input.text--right {
193
199
  .input--with--label {
194
200
  /*public*/
195
201
  padding-bottom: 0;
202
+ }
203
+
204
+ .input--slim {
205
+ /*public*/
206
+ padding-top: var(--space--small, 3px);
207
+ padding-bottom: var(--space--small, 3px);
208
+ height: var(--ez-text-input--height--slim);
209
+ }
210
+
211
+ .input--slim::-webkit-input-placeholder { /* Edge */
212
+ /*public*/
213
+ font-family: var(--ez-text-input--font-family);
214
+ font-size: var(--ez-text-input--font-size);
215
+ font-weight: var(--ez-text-input--font-weight);
216
+ color: var(--ez-text-input--color);
217
+ }
218
+
219
+ .input--slim:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
220
+ /*public*/
221
+ font-family: var(--ez-text-input--font-family);
222
+ font-size: var(--ez-text-input--font-size);
223
+ font-weight: var(--ez-text-input--font-weight);
224
+ color: var(--ez-text-input--color);
225
+ }
226
+
227
+ .input--slim::-moz-placeholder { /* Mozilla Firefox 19+ */
228
+ /*public*/
229
+ font-family: var(--ez-text-input--font-family);
230
+ font-size: var(--ez-text-input--font-size);
231
+ font-weight: var(--ez-text-input--font-weight);
232
+ color: var(--ez-text-input--color);
233
+ }
234
+
235
+ .input--slim:-ms-input-placeholder { /* Internet Explorer 10-11 */
236
+ /*public*/
237
+ font-family: var(--ez-text-input--font-family);
238
+ font-size: var(--ez-text-input--font-size);
239
+ font-weight: var(--ez-text-input--font-weight);
240
+ color: var(--ez-text-input--color);
241
+ }
242
+
243
+ .input--slim::placeholder {
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
+ }
250
+
251
+ .input--slim:disabled::-webkit-input-placeholder { /* WebKit browsers */
252
+ /*public*/
253
+ color: var(--ez-text-input__input--disabled--color);
254
+ }
255
+
256
+ .input--slim:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
257
+ /*public*/
258
+ color: var(--ez-text-input__input--disabled--color);
259
+ }
260
+
261
+ .input--slim:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */
262
+ /*public*/
263
+ color: var(--ez-text-input__input--disabled--color);
264
+ }
265
+
266
+ .input--slim:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */
267
+ /*public*/
268
+ color: var(--ez-text-input__input--disabled--color);
269
+ }
270
+
271
+ .input--slim:disabled::placeholder {
272
+ /*public*/
273
+ color: var(--ez-text-input__input--disabled--color);
196
274
  }
@@ -10,16 +10,21 @@ export class EzTextInput {
10
10
  * Permite exibir a mensagem de erro.
11
11
  */
12
12
  this.canShowError = true;
13
+ /**
14
+ * Define o modo do tamanho do campo; opções: slim e regular.
15
+ */
16
+ this.mode = "regular";
13
17
  }
14
18
  showError() {
19
+ var _a, _b;
15
20
  const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
16
21
  if (hasError) {
17
22
  this._inputElem.classList.add("hasError");
18
- this._messageBoxElem.classList.add("hasError");
23
+ (_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
19
24
  }
20
25
  else {
21
26
  this._inputElem.classList.remove("hasError");
22
- this._messageBoxElem.classList.remove("hasError");
27
+ (_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
23
28
  }
24
29
  }
25
30
  prepareMask() {
@@ -124,7 +129,7 @@ export class EzTextInput {
124
129
  content.style.overflow = "hidden";
125
130
  content.style.top = "0px";
126
131
  content.style.width = "var(--ez-text-input__icon--width)";
127
- content.style.height = "var(--ez-text-input--height)";
132
+ content.style.height = this.mode != "slim" ? "var(--ez-text-input--height)" : "var(--ez-text-input--height--slim)";
128
133
  if (slot.name == "leftIcon") {
129
134
  content.style.left = "0px";
130
135
  content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
@@ -177,12 +182,12 @@ export class EzTextInput {
177
182
  render() {
178
183
  return (h(Host, null,
179
184
  h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
180
- this.label ?
185
+ this.label && this.mode != "slim" ?
181
186
  h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
182
187
  : null,
183
- h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
188
+ h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode == "slim" ? "input--slim" : "", placeholder: this.mode == "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
184
189
  h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
185
- this.canShowError &&
190
+ this.canShowError && this.mode != "slim" &&
186
191
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
187
192
  }
188
193
  static get is() { return "ez-text-input"; }
@@ -331,6 +336,24 @@ export class EzTextInput {
331
336
  },
332
337
  "attribute": "restrict",
333
338
  "reflect": false
339
+ },
340
+ "mode": {
341
+ "type": "string",
342
+ "mutable": false,
343
+ "complexType": {
344
+ "original": "string",
345
+ "resolved": "string",
346
+ "references": {}
347
+ },
348
+ "required": false,
349
+ "optional": false,
350
+ "docs": {
351
+ "tags": [],
352
+ "text": "Define o modo do tamanho do campo; op\u00E7\u00F5es: slim e regular."
353
+ },
354
+ "attribute": "mode",
355
+ "reflect": true,
356
+ "defaultValue": "\"regular\""
334
357
  }
335
358
  }; }
336
359
  static get events() { return [{
@@ -12,6 +12,10 @@ export class EzTimeInput {
12
12
  * Define se o componente irá ou não considerar os segundos
13
13
  */
14
14
  this.showSeconds = false;
15
+ /**
16
+ * Define o modo do tamanho do campo; opções: slim e regular.
17
+ */
18
+ this.mode = "regular";
15
19
  }
16
20
  prepareMask() {
17
21
  if (this.showSeconds) {
@@ -73,7 +77,8 @@ export class EzTimeInput {
73
77
  }
74
78
  }
75
79
  clearField() {
76
- this.viewValue = this.value = undefined;
80
+ this.viewValue = '';
81
+ this.value = undefined;
77
82
  }
78
83
  handleChange() {
79
84
  this.viewValue = this._inputElem.value;
@@ -97,7 +102,7 @@ export class EzTimeInput {
97
102
  }
98
103
  render() {
99
104
  return (h(Host, null,
100
- h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage },
105
+ h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage, mode: this.mode },
101
106
  h("ez-icon", { slot: "leftIcon", href: getSpritePath("timer-outline") }))));
102
107
  }
103
108
  static get is() { return "ez-time-input"; }
@@ -213,6 +218,24 @@ export class EzTimeInput {
213
218
  "attribute": "show-seconds",
214
219
  "reflect": true,
215
220
  "defaultValue": "false"
221
+ },
222
+ "mode": {
223
+ "type": "string",
224
+ "mutable": false,
225
+ "complexType": {
226
+ "original": "string",
227
+ "resolved": "string",
228
+ "references": {}
229
+ },
230
+ "required": false,
231
+ "optional": false,
232
+ "docs": {
233
+ "tags": [],
234
+ "text": "Define o modo do tamanho do campo; op\u00E7\u00F5es: slim e regular."
235
+ },
236
+ "attribute": "mode",
237
+ "reflect": true,
238
+ "defaultValue": "\"regular\""
216
239
  }
217
240
  }; }
218
241
  static get methods() { return {
@@ -7,7 +7,8 @@ export class TestDu {
7
7
  private _ezDateTimeInput// : HTMLEzDateTimeInput;
8
8
  private _ezNumberInput// : HTMLEzNumberInput
9
9
  private _ezSearch// : HTMLEzSearch
10
- private _ezUpload// : HTMLEzUpload*/
10
+ private _ezUpload// : HTMLEzUpload
11
+ private _ezFilterInput// : HTMLEzFilterInput*/
11
12
  componentWillLoad() {
12
13
  this.dataUnit = new DataUnit("testes_com_formulario");
13
14
  this.dataUnit.metadata = {
@@ -62,6 +62,12 @@ export const EzDialog: {
62
62
  new (): EzDialog;
63
63
  };
64
64
 
65
+ interface EzFilterInput extends Components.EzFilterInput, HTMLElement {}
66
+ export const EzFilterInput: {
67
+ prototype: EzFilterInput;
68
+ new (): EzFilterInput;
69
+ };
70
+
65
71
  interface EzForm extends Components.EzForm, HTMLElement {}
66
72
  export const EzForm: {
67
73
  prototype: EzForm;