@sankhyalabs/ezui 1.1.66 → 1.1.69

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 (86) hide show
  1. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-button_16.cjs.entry.js +48 -56
  3. package/dist/cjs/ez-dialog.cjs.entry.js +3 -0
  4. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-number-input.cjs.entry.js +9 -9
  6. package/dist/cjs/ez-popover.cjs.entry.js +1 -5
  7. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-time-input.cjs.entry.js +6 -6
  9. package/dist/cjs/ezui.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/components/ez-action-chip/ez-action-chip.css +2 -1
  12. package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
  13. package/dist/collection/components/ez-button/ez-button.css +47 -45
  14. package/dist/collection/components/ez-button/ez-button.js +5 -5
  15. package/dist/collection/components/ez-calendar/ez-calendar.css +2 -2
  16. package/dist/collection/components/ez-check/ez-check.css +78 -78
  17. package/dist/collection/components/ez-check/ez-check.js +7 -7
  18. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
  19. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +1 -1
  20. package/dist/collection/components/ez-combo-box/ez-combo-box.js +6 -6
  21. package/dist/collection/components/ez-date-input/ez-date-input.js +9 -9
  22. package/dist/collection/components/ez-dialog/ez-dialog.js +5 -2
  23. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +6 -6
  24. package/dist/collection/components/ez-icon/ez-icon.css +3 -1
  25. package/dist/collection/components/ez-icon/ez-icon.js +5 -3
  26. package/dist/collection/components/ez-label-chip/ez-label-chip.css +2 -1
  27. package/dist/collection/components/ez-label-chip/ez-label-chip.js +1 -1
  28. package/dist/collection/components/ez-modal/ez-modal.css +1 -1
  29. package/dist/collection/components/ez-modal/ez-modal.js +4 -4
  30. package/dist/collection/components/ez-number-input/ez-number-input.js +11 -11
  31. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +1 -1
  32. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +9 -9
  33. package/dist/collection/components/ez-popover/ez-popover.css +1 -1
  34. package/dist/collection/components/ez-popover/ez-popover.js +0 -4
  35. package/dist/collection/components/ez-popup/ez-popup.css +2 -2
  36. package/dist/collection/components/ez-popup/ez-popup.js +3 -3
  37. package/dist/collection/components/ez-search/ez-search.js +5 -5
  38. package/dist/collection/components/ez-tabselector/ez-tabselector.js +1 -1
  39. package/dist/collection/components/ez-text-area/ez-text-area.css +6 -0
  40. package/dist/collection/components/ez-text-area/ez-text-area.js +9 -9
  41. package/dist/collection/components/ez-text-input/ez-text-input.css +68 -60
  42. package/dist/collection/components/ez-text-input/ez-text-input.js +14 -38
  43. package/dist/collection/components/ez-time-input/ez-time-input.css +8 -0
  44. package/dist/collection/components/ez-time-input/ez-time-input.js +9 -9
  45. package/dist/collection/components/ez-toast/ez-toast.css +2 -2
  46. package/dist/collection/components/ez-upload/ez-upload.css +4 -1
  47. package/dist/collection/components/ez-upload/ez-upload.js +3 -3
  48. package/dist/custom-elements/index.js +78 -87
  49. package/dist/esm/ez-action-chip.entry.js +1 -1
  50. package/dist/esm/ez-button_16.entry.js +48 -56
  51. package/dist/esm/ez-dialog.entry.js +3 -0
  52. package/dist/esm/ez-modal.entry.js +1 -1
  53. package/dist/esm/ez-number-input.entry.js +9 -9
  54. package/dist/esm/ez-popover.entry.js +1 -5
  55. package/dist/esm/ez-popup.entry.js +1 -1
  56. package/dist/esm/ez-time-input.entry.js +6 -6
  57. package/dist/esm/ezui.js +1 -1
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/ezui/ezui.esm.js +1 -1
  60. package/dist/ezui/p-169d99a1.entry.js +1 -0
  61. package/dist/ezui/{p-4f4b8aae.entry.js → p-1c33a56d.entry.js} +1 -1
  62. package/dist/ezui/{p-d8a47f23.entry.js → p-74e4415e.entry.js} +1 -1
  63. package/dist/ezui/{p-6a6f9712.entry.js → p-ee5058c1.entry.js} +1 -1
  64. package/dist/ezui/{p-7f528c19.entry.js → p-f7d7fb7f.entry.js} +1 -1
  65. package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +1 -1
  66. package/dist/types/components/ez-button/ez-button.d.ts +1 -1
  67. package/dist/types/components/ez-check/ez-check.d.ts +3 -3
  68. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +1 -1
  69. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +3 -3
  70. package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -2
  71. package/dist/types/components/ez-dialog/ez-dialog.d.ts +4 -1
  72. package/dist/types/components/ez-icon/ez-icon.d.ts +6 -0
  73. package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +1 -1
  74. package/dist/types/components/ez-modal/ez-modal.d.ts +3 -3
  75. package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -1
  76. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +3 -3
  77. package/dist/types/components/ez-popup/ez-popup.d.ts +2 -2
  78. package/dist/types/components/ez-search/ez-search.d.ts +3 -3
  79. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  80. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -4
  81. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -8
  82. package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -2
  83. package/dist/types/components/ez-upload/ez-upload.d.ts +3 -3
  84. package/dist/types/components.d.ts +88 -81
  85. package/package.json +2 -1
  86. package/dist/ezui/p-afc553a4.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  :host {
2
2
  display: flex;
3
3
  /* General */
4
- /*@doc Define a camada que o componente será exibido.*/
4
+ /*@doc Define a camada em que o componente será exibido.*/
5
5
  --popup-z-index: var(--most-visible, 3);
6
6
 
7
7
  /* Popup */
@@ -25,7 +25,7 @@
25
25
  --popup__title--font-weight: var(--text-weight--large, 600);
26
26
 
27
27
  /* Buttons */
28
- /* @doc Define a cor de fundo do botão de fechamento. */
28
+ /* @doc Define a cor do ícone do botão de fechamento. */
29
29
  --popup__btn__close--background-color: var(--title--primary, #2b3a54);
30
30
  /* @doc Contém o ícone do botão de fechamento. */
31
31
  --popup__btn__close--image: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>');
@@ -18,7 +18,7 @@ export class EzPopup {
18
18
  */
19
19
  this.opened = false;
20
20
  /**
21
- * Define o componente utilizará um cabeçalho com botão de fechamento.
21
+ * Define se o componente utilizará um cabeçalho com botão de fechamento.
22
22
  */
23
23
  this.useHeader = false;
24
24
  }
@@ -99,7 +99,7 @@ export class EzPopup {
99
99
  "optional": false,
100
100
  "docs": {
101
101
  "tags": [],
102
- "text": "Define o componente utilizar\u00E1 um cabe\u00E7alho com bot\u00E3o de fechamento."
102
+ "text": "Define se o componente utilizar\u00E1 um cabe\u00E7alho com bot\u00E3o de fechamento."
103
103
  },
104
104
  "attribute": "use-header",
105
105
  "reflect": true,
@@ -117,7 +117,7 @@ export class EzPopup {
117
117
  "optional": false,
118
118
  "docs": {
119
119
  "tags": [],
120
- "text": "Define se o t\u00EDtulo do componente."
120
+ "text": "T\u00EDtulo do componente."
121
121
  },
122
122
  "attribute": "ez-title",
123
123
  "reflect": false
@@ -25,7 +25,7 @@ export class EzSearch {
25
25
  this.ezChange.emit(evt.detail);
26
26
  }
27
27
  render() {
28
- return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errormessage: this.errormessage, optionloader: this.optionloader, searchmode: true, onEzChange: evt => this.onComboChange(evt), showselectedvalue: this.showselectedvalue, showoptionvalue: this.showoptionvalue }));
28
+ return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionloader: this.optionloader, searchmode: true, onEzChange: evt => this.onComboChange(evt), showselectedvalue: this.showselectedvalue, showoptionvalue: this.showoptionvalue }));
29
29
  }
30
30
  ;
31
31
  static get is() { return "ez-search"; }
@@ -71,7 +71,7 @@ export class EzSearch {
71
71
  "optional": false,
72
72
  "docs": {
73
73
  "tags": [],
74
- "text": "Label \u00E9 o t\u00EDtulo do campo"
74
+ "text": "T\u00EDtulo do campo"
75
75
  },
76
76
  "attribute": "label",
77
77
  "reflect": true
@@ -94,7 +94,7 @@ export class EzSearch {
94
94
  "reflect": true,
95
95
  "defaultValue": "true"
96
96
  },
97
- "errormessage": {
97
+ "errorMessage": {
98
98
  "type": "string",
99
99
  "mutable": true,
100
100
  "complexType": {
@@ -108,7 +108,7 @@ export class EzSearch {
108
108
  "tags": [],
109
109
  "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
110
110
  },
111
- "attribute": "errormessage",
111
+ "attribute": "error-message",
112
112
  "reflect": true
113
113
  },
114
114
  "optionloader": {
@@ -195,7 +195,7 @@ export class EzSearch {
195
195
  "composed": true,
196
196
  "docs": {
197
197
  "tags": [],
198
- "text": "Este \u00E9 o evento emitido ao clicar para abrir o popup"
198
+ "text": "Evento emitido ao clicar para abrir o popup"
199
199
  },
200
200
  "complexType": {
201
201
  "original": "any",
@@ -263,7 +263,7 @@ export class EzTabselector {
263
263
  "composed": true,
264
264
  "docs": {
265
265
  "tags": [],
266
- "text": "Este \u00E9 o evento emitido ao clicar para abrir o popup (onChange)."
266
+ "text": "Evento emitido ao clicar para abrir o popup (onChange)."
267
267
  },
268
268
  "complexType": {
269
269
  "original": "string",
@@ -1,12 +1,18 @@
1
1
  :host {
2
2
  /* dimensions */
3
+ /*@doc Define a largura do componente.*/
3
4
  --ta--width: 100%;
4
5
 
5
6
  /* general */
7
+ /*@doc Define o raio da borda do input do componente.*/
6
8
  --ta--border-radius: var(--border--radius-medium, 12px);
9
+ /*@doc Define o tamanho da fonte do input e label do componente.*/
7
10
  --ta--font-size: var(--text--medium, 14px);
11
+ /*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
8
12
  --ta--font-family: var(--font-pattern, Arial);
13
+ /*@doc Define o peso da fonte do label do componente.*/
9
14
  --ta--font-weight: var(--text-weight--large, 500);
15
+ /*@doc Define a cor da fonte do input e label do componente.*/
10
16
  --ta--color: var(--title--primary, #000);
11
17
 
12
18
  /* input */
@@ -6,12 +6,12 @@ export class EzTextArea {
6
6
  */
7
7
  this.enabled = true;
8
8
  /**
9
- * Ajusta o numero de linhas e consequentemente o height do textarea. Valor default: 4
9
+ * Ajusta o número de linhas e consequentemente o height do textarea. Valor default: 4
10
10
  */
11
11
  this.rows = 4;
12
12
  }
13
13
  showError() {
14
- const hasError = typeof this.errormessage === 'string' && this.errormessage !== '';
14
+ const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
15
15
  if (hasError) {
16
16
  this._container.classList.add('hasError');
17
17
  this._messageBoxElem.classList.add('hasError');
@@ -95,7 +95,7 @@ export class EzTextArea {
95
95
  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)
96
96
  : null,
97
97
  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 })),
98
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errormessage }, this.errormessage)));
98
+ h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
99
99
  }
100
100
  static get is() { return "ez-text-area"; }
101
101
  static get encapsulation() { return "shadow"; }
@@ -118,7 +118,7 @@ export class EzTextArea {
118
118
  "optional": false,
119
119
  "docs": {
120
120
  "tags": [],
121
- "text": "Label \u00E9 o t\u00EDtulo do campo"
121
+ "text": "T\u00EDtulo do campo"
122
122
  },
123
123
  "attribute": "label",
124
124
  "reflect": true
@@ -175,7 +175,7 @@ export class EzTextArea {
175
175
  "attribute": "loading",
176
176
  "reflect": true
177
177
  },
178
- "errormessage": {
178
+ "errorMessage": {
179
179
  "type": "string",
180
180
  "mutable": true,
181
181
  "complexType": {
@@ -189,7 +189,7 @@ export class EzTextArea {
189
189
  "tags": [],
190
190
  "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
191
191
  },
192
- "attribute": "errormessage",
192
+ "attribute": "error-message",
193
193
  "reflect": true
194
194
  },
195
195
  "rows": {
@@ -204,7 +204,7 @@ export class EzTextArea {
204
204
  "optional": false,
205
205
  "docs": {
206
206
  "tags": [],
207
- "text": "Ajusta o numero de linhas e consequentemente o height do textarea. Valor default: 4"
207
+ "text": "Ajusta o n\u00FAmero de linhas e consequentemente o height do textarea. Valor default: 4"
208
208
  },
209
209
  "attribute": "rows",
210
210
  "reflect": true,
@@ -219,7 +219,7 @@ export class EzTextArea {
219
219
  "composed": true,
220
220
  "docs": {
221
221
  "tags": [],
222
- "text": "Um evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
222
+ "text": "Evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
223
223
  },
224
224
  "complexType": {
225
225
  "original": "string",
@@ -263,7 +263,7 @@ export class EzTextArea {
263
263
  }; }
264
264
  static get elementRef() { return "_hostElement"; }
265
265
  static get watchers() { return [{
266
- "propName": "errormessage",
266
+ "propName": "errorMessage",
267
267
  "methodName": "showError"
268
268
  }, {
269
269
  "propName": "value",
@@ -1,50 +1,58 @@
1
1
  :host {
2
2
  /* dimensions */
3
- --it--height: 42px;
4
- --it--width: 100%;
5
- --it__icon--width: 48px;
3
+ /*@doc Define a altura do componente.*/
4
+ --text-input--height: 42px;
5
+ /*@doc Define a largura do componente.*/
6
+ --text-input--width: 100%;
7
+ /*@doc Define a largura do slot que contém o ícone.*/
8
+ --text-input__icon--width: 48px;
6
9
 
7
10
  /* general */
8
- --it--border-radius: var(--border--radius-medium, 12px);
9
- --it--font-size: var(--text--medium, 14px);
10
- --it--font-family: var(--font-pattern, Arial);
11
- --it--font-weight: var(--text-weight--large, 500);
12
- --it--color: var(--title--primary, #000);
11
+ /*@doc Define o raio da borda do input do componente.*/
12
+ --text-input--border-radius: var(--border--radius-medium, 12px);
13
+ /*@doc Define o tamanho da fonte do input e label do componente.*/
14
+ --text-input--font-size: var(--text--medium, 14px);
15
+ /*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
16
+ --text-input--font-family: var(--font-pattern, Arial);
17
+ /*@doc Define o peso da fonte do label do componente.*/
18
+ --text-input--font-weight: var(--text-weight--large, 500);
19
+ /*@doc Define a cor da fonte do input e label do componente.*/
20
+ --text-input--color: var(--title--primary, #000);
13
21
 
14
22
  /* input */
15
23
  /*@doc Define a cor de fundo do input.*/
16
- --it__input--background-color: var(--background--medium, #e0e0e0);
24
+ --text-input__input--background-color: var(--background--medium, #e0e0e0);
17
25
  /*@doc Define o estilo da borda do input.*/
18
- --it__input--border: var(--border--medium, 2px solid);
26
+ --text-input__input--border: var(--border--medium, 2px solid);
19
27
  /*@doc Define a cor da borda do input.*/
20
- --it__input--border-color: var(--it__input--background-color);
28
+ --text-input__input--border-color: var(--text-input__input--background-color);
21
29
  /*no modo normal usamos a borda com a mesma cor do bg*/
22
30
  /*@doc Define a cor da borda do input quando focado.*/
23
- --it__input--focus--border-color: var(--color--alert-cold-800, #042EFF);
31
+ --text-input__input--focus--border-color: var(--color--alert-cold-800, #042EFF);
24
32
  /*@doc Define a cor de fundo do input quando desabilitado.*/
25
- --it__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
33
+ --text-input__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
26
34
  /*@doc Define a cor do texto do input.*/
27
- --it__input--disabled--color: var(--text--disable, #AFB6C0);
35
+ --text-input__input--disabled--color: var(--text--disable, #AFB6C0);
28
36
  /*@doc Define a cor da borda do input quando com erro.*/
29
- --it__input--error--border-color: #CC2936;
37
+ --text-input__input--error--border-color: #CC2936;
30
38
 
31
39
  /* message box */
32
40
  /*@doc Define o tamanho da fonte da mensagem abaixo do input.*/
33
- --it__message_box--font-size: var(--text--small, 12px);
41
+ --text-input__message_box--font-size: var(--text--small, 12px);
34
42
  /*@doc Define a cor da fonte da mensagem quando info.*/
35
- --it__message_box--info--color: var(--color--success, #22085d);
43
+ --text-input__message_box--info--color: var(--color--success, #22085d);
36
44
  /*@doc Define a cor da fonte da mensagem quando erro.*/
37
- --it__message_box--error--color: var(--color--error, #FF0000);
45
+ --text-input__message_box--error--color: var(--color--error, #FF0000);
38
46
 
39
47
  /* label */
40
48
  /*@doc Define o posicionamento do label.*/
41
- --it__label--floating--top: 6px;
49
+ --text-input__label--floating--top: 6px;
42
50
  /*@doc Define o posicionamento do label.*/
43
- --it__label--padding-top: 12px;
51
+ --text-input__label--padding-top: 12px;
44
52
  /*@doc Define o espaçamento esquerdo do label.*/
45
- --it__label--padding-left: 14px;
53
+ --text-input__label--padding-left: 14px;
46
54
  /*@doc Define o espaçamento direito do label.*/
47
- --it__label--padding-right: 12px;
55
+ --text-input__label--padding-right: 12px;
48
56
 
49
57
 
50
58
  /***************
@@ -55,7 +63,7 @@
55
63
  flex-wrap: wrap;
56
64
  position: relative;
57
65
  /*public*/
58
- width: var(--it--width);
66
+ width: var(--text-input--width);
59
67
  }
60
68
 
61
69
  input {
@@ -66,40 +74,40 @@ input {
66
74
  font-weight: var(--text-weight--large, 600);
67
75
 
68
76
  /*public*/
69
- height: var(--it--height);
70
- border-radius: var(--it--border-radius);
71
- font-family: var(--it--font-family);
72
- font-size: var(--it--font-size);
73
- border: var(--it__input--border);
74
- border-color: var(--it__input--border-color);
75
- background-color: var(--it__input--background-color);
76
- color: var(--it--color);
77
+ height: var(--text-input--height);
78
+ border-radius: var(--text-input--border-radius);
79
+ font-family: var(--text-input--font-family);
80
+ font-size: var(--text-input--font-size);
81
+ border: var(--text-input__input--border);
82
+ border-color: var(--text-input__input--border-color);
83
+ background-color: var(--text-input__input--background-color);
84
+ color: var(--text-input--color);
77
85
  }
78
86
 
79
87
  input:disabled {
80
88
  /*public*/
81
- background-color: var(--it__input--disabled--background-color);
82
- color: var(--it__input--disabled--color);
89
+ background-color: var(--text-input__input--disabled--background-color);
90
+ color: var(--text-input__input--disabled--color);
83
91
  }
84
92
 
85
93
  input:focus {
86
94
  /*private*/
87
95
  outline: none;
88
96
  /*public*/
89
- border-color: var(--it__input--focus--border-color);
97
+ border-color: var(--text-input__input--focus--border-color);
90
98
  }
91
99
 
92
100
  input.icon--left {
93
- padding-left: var(--it__icon--width);
101
+ padding-left: var(--text-input__icon--width);
94
102
  }
95
103
 
96
104
  input.icon--right {
97
- padding-right: var(--it__icon--width);
105
+ padding-right: var(--text-input__icon--width);
98
106
  }
99
107
 
100
108
  input.hasError {
101
- color: var(--it--color);
102
- border-color: var(--it__input--error--border-color);
109
+ color: var(--text-input--color);
110
+ border-color: var(--text-input__input--error--border-color);
103
111
  }
104
112
 
105
113
  input.text--right {
@@ -118,14 +126,14 @@ input.text--right {
118
126
  white-space: nowrap;
119
127
 
120
128
  /*public*/
121
- font-family: var(--it--font-family);
122
- font-size: var(--it__message_box--font-size);
123
- color: var(--it__message_box--info--color);
129
+ font-family: var(--text-input--font-family);
130
+ font-size: var(--text-input__message_box--font-size);
131
+ color: var(--text-input__message_box--info--color);
124
132
  }
125
133
 
126
134
  .hasError {
127
135
  /*public*/
128
- color: var(--it__message_box--error--color);
136
+ color: var(--text-input__message_box--error--color);
129
137
  }
130
138
 
131
139
  .input__label {
@@ -138,49 +146,49 @@ input.text--right {
138
146
  white-space: nowrap;
139
147
  -webkit-transition: font-size .05s, top .05s;
140
148
  transition: font-size .05s, top .05s;
141
- width: calc(100% - var(--it__label--padding-right));
142
- left: var(--it--space--medium);
149
+ width: calc(100% - var(--text-input__label--padding-right));
150
+ left: var(--text-input--space--medium);
143
151
 
144
152
  /*public*/
145
- font-family: var(--it--font-family);
146
- font-size: var(--it--font-size);
147
- font-weight: var(--it--font-weight);
148
- color: var(--it--color);
149
- top: var(--it__label--padding-top);
150
- left: var(--it__label--padding-left);
151
- padding-right: var(--it__label--padding-right);
153
+ font-family: var(--text-input--font-family);
154
+ font-size: var(--text-input--font-size);
155
+ font-weight: var(--text-input--font-weight);
156
+ color: var(--text-input--color);
157
+ top: var(--text-input__label--padding-top);
158
+ left: var(--text-input__label--padding-left);
159
+ padding-right: var(--text-input__label--padding-right);
152
160
  }
153
161
 
154
162
  .input__label--floated {
155
- font-family: var(--it--font-family);
163
+ font-family: var(--text-input--font-family);
156
164
  font-size: var(--text--extra-small);
157
165
  color: var(--text--primary);
158
- top: var(--it__label--floating--top);
166
+ top: var(--text-input__label--floating--top);
159
167
  }
160
168
 
161
169
  .input__label--disabled {
162
- color: var(--it__input--disabled--color);
170
+ color: var(--text-input__input--disabled--color);
163
171
  }
164
172
 
165
173
  .input__label--left {
166
174
  /*public*/
167
175
  text-align: left;
168
- left: calc(var(--it__icon--width) + 2px);
176
+ left: calc(var(--text-input__icon--width) + 2px);
169
177
  /*borda*/
170
- width: calc(100% - var(--it__icon--width));
178
+ width: calc(100% - var(--text-input__icon--width));
171
179
  }
172
180
 
173
181
  .input__label--right {
174
182
  /*public*/
175
- right: var(--it__icon--width);
176
- width: calc(100% - var(--it__icon--width));
183
+ right: var(--text-input__icon--width);
184
+ width: calc(100% - var(--text-input__icon--width));
177
185
  }
178
186
 
179
187
  /* ISSO TA ERRADO CRIAR INPUT__LABEL--BOTH */
180
188
  .input__label--left.input__label--right {
181
- left: calc(var(--it__icon--width) + 2px);
189
+ left: calc(var(--text-input__icon--width) + 2px);
182
190
  /*borda*/
183
- width: calc(100% - var(--it__icon--width) * 2);
191
+ width: calc(100% - var(--text-input__icon--width) * 2);
184
192
  }
185
193
 
186
194
  .input--with--label {
@@ -1,5 +1,4 @@
1
1
  import { Component, Prop, h, Watch, Host, Method, Event, Element } from '@stencil/core';
2
- import { isValidNumber } from '../../utils/utils';
3
2
  import { MaskFormatter } from '@sankhyalabs/core';
4
3
  export class EzTextInput {
5
4
  constructor() {
@@ -9,7 +8,7 @@ export class EzTextInput {
9
8
  this.enabled = true;
10
9
  }
11
10
  showError() {
12
- const hasError = typeof this.errormessage === 'string' && this.errormessage !== '';
11
+ const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
13
12
  if (hasError) {
14
13
  this._inputElem.classList.add('hasError');
15
14
  this._messageBoxElem.classList.add('hasError');
@@ -84,16 +83,13 @@ export class EzTextInput {
84
83
  this._inputElem.value = this._maskFormatter.format(value);
85
84
  }
86
85
  catch (e) {
87
- this.errormessage = e.message;
86
+ this.errorMessage = e.message;
88
87
  }
89
88
  }
90
89
  this.value = this._inputElem.value;
91
90
  this.adjustFloatingLabel();
92
91
  }
93
92
  isValidValue(value) {
94
- if (this.onlynumber) {
95
- return value == "" || isValidNumber(value);
96
- }
97
93
  if (this.restrict) {
98
94
  return Array.from(value).reduce((valid, c) => valid && this.restrict.indexOf(c) > -1, true);
99
95
  }
@@ -122,11 +118,11 @@ export class EzTextInput {
122
118
  content.style.justifyContent = "center";
123
119
  content.style.overflow = "hidden";
124
120
  content.style.top = "0px";
125
- content.style.width = "var(--it__icon--width)";
126
- content.style.height = "var(--it--height)";
121
+ content.style.width = "var(--text-input__icon--width)";
122
+ content.style.height = "var(--text-input--height)";
127
123
  if (slot.name == "leftIcon") {
128
124
  content.style.left = "0px";
129
- content.style.borderRadius = "var(--it--border-radius) 0 0 var(--it--border-radius)";
125
+ content.style.borderRadius = "var(--text-input--border-radius) 0 0 var(--text-input--border-radius)";
130
126
  this._inputElem.classList.add('icon--left');
131
127
  if (this._labelElem) {
132
128
  this._labelElem.classList.add('input__label--left');
@@ -134,7 +130,7 @@ export class EzTextInput {
134
130
  }
135
131
  else if (slot.name == "rightIcon") {
136
132
  content.style.right = "0px";
137
- content.style.borderRadius = "0 var(--it--border-radius) var(--it--border-radius) 0";
133
+ content.style.borderRadius = "0 var(--text-input--border-radius) var(--text-input--border-radius) 0";
138
134
  this._inputElem.classList.add('icon--right');
139
135
  if (this._labelElem) {
140
136
  this._labelElem.classList.add('input__label--right');
@@ -152,9 +148,6 @@ export class EzTextInput {
152
148
  // Lifecycle web component
153
149
  //---------------------------------------------
154
150
  componentDidLoad() {
155
- if (this.onlynumber) {
156
- this._inputElem.classList.add('text--right');
157
- }
158
151
  this.showError();
159
152
  this.prepareMask();
160
153
  this.adjustFloatingLabel();
@@ -167,7 +160,7 @@ export class EzTextInput {
167
160
  this.value = this._maskFormatter.format(this.value);
168
161
  }
169
162
  catch (e) {
170
- this.errormessage = e.message;
163
+ this.errorMessage = e.message;
171
164
  }
172
165
  }
173
166
  if (!this.isValidValue(this.value)) {
@@ -184,7 +177,7 @@ export class EzTextInput {
184
177
  : null,
185
178
  h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
186
179
  h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
187
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errormessage }, this.errormessage)));
180
+ h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
188
181
  }
189
182
  static get is() { return "ez-text-input"; }
190
183
  static get encapsulation() { return "shadow"; }
@@ -207,7 +200,7 @@ export class EzTextInput {
207
200
  "optional": false,
208
201
  "docs": {
209
202
  "tags": [],
210
- "text": "Label \u00E9 o t\u00EDtulo do campo"
203
+ "text": "T\u00EDtulo do campo"
211
204
  },
212
205
  "attribute": "label",
213
206
  "reflect": true
@@ -264,7 +257,7 @@ export class EzTextInput {
264
257
  "attribute": "loading",
265
258
  "reflect": true
266
259
  },
267
- "errormessage": {
260
+ "errorMessage": {
268
261
  "type": "string",
269
262
  "mutable": true,
270
263
  "complexType": {
@@ -278,24 +271,7 @@ export class EzTextInput {
278
271
  "tags": [],
279
272
  "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
280
273
  },
281
- "attribute": "errormessage",
282
- "reflect": true
283
- },
284
- "onlynumber": {
285
- "type": "boolean",
286
- "mutable": false,
287
- "complexType": {
288
- "original": "boolean",
289
- "resolved": "boolean",
290
- "references": {}
291
- },
292
- "required": false,
293
- "optional": false,
294
- "docs": {
295
- "tags": [],
296
- "text": "Faz com que o componente s\u00F3 aceite n\u00FAmeros"
297
- },
298
- "attribute": "onlynumber",
274
+ "attribute": "error-message",
299
275
  "reflect": true
300
276
  },
301
277
  "mask": {
@@ -310,7 +286,7 @@ export class EzTextInput {
310
286
  "optional": false,
311
287
  "docs": {
312
288
  "tags": [],
313
- "text": "Aplica uma m\u00E1scara no conte\u00FAdo conforme um o padr\u00E3o estabelecido"
289
+ "text": "Aplica uma m\u00E1scara no conte\u00FAdo conforme o padr\u00E3o estabelecido"
314
290
  },
315
291
  "attribute": "mask",
316
292
  "reflect": false
@@ -341,7 +317,7 @@ export class EzTextInput {
341
317
  "composed": true,
342
318
  "docs": {
343
319
  "tags": [],
344
- "text": "Um evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
320
+ "text": "Evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
345
321
  },
346
322
  "complexType": {
347
323
  "original": "string",
@@ -385,7 +361,7 @@ export class EzTextInput {
385
361
  }; }
386
362
  static get elementRef() { return "_hostElement"; }
387
363
  static get watchers() { return [{
388
- "propName": "errormessage",
364
+ "propName": "errorMessage",
389
365
  "methodName": "showError"
390
366
  }, {
391
367
  "propName": "mask",
@@ -1,14 +1,22 @@
1
1
  :host {
2
2
  /* dimensions */
3
+ /*@doc Define a altura do componente.*/
3
4
  --eztime--height: 42px;
5
+ /*@doc Define a largura do componente.*/
4
6
  --eztime--width: 100%;
7
+ /*@doc Define a largura do slot que contém o ícone.*/
5
8
  --eztime__icon--width: 48px;
6
9
 
7
10
  /* general */
11
+ /*@doc Define o raio da borda do input do componente.*/
8
12
  --eztime--border-radius: var(--border--radius-medium, 12px);
13
+ /*@doc Define o tamanho da fonte do input e label do componente.*/
9
14
  --eztime--font-size: var(--text--medium, 14px);
15
+ /*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
10
16
  --eztime--font-family: var(--font-pattern, Arial);
17
+ /*@doc Define o peso da fonte do label do componente.*/
11
18
  --eztime--font-weight: var(--text-weight--large, 500);
19
+ /*@doc Define o espaçamento do label.*/
12
20
  --eztime--space--medium: var(--space--medium, 6px);
13
21
 
14
22
  /* input */