@sankhyalabs/ezui 1.1.71 → 1.1.74

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 (84) hide show
  1. package/dist/assets/actions-sprite.svg +257 -0
  2. package/dist/cjs/CSSVarsUtils-f8827674.js +18 -0
  3. package/dist/cjs/ez-action-chip.cjs.entry.js +2 -2
  4. package/dist/cjs/ez-button_16.cjs.entry.js +12 -8
  5. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-label-chip.cjs.entry.js +12 -12
  7. package/dist/cjs/ez-list.cjs.entry.js +174 -0
  8. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-time-input.cjs.entry.js +7 -70
  13. package/dist/cjs/ez-toast.cjs.entry.js +5 -2
  14. package/dist/cjs/ezui.cjs.js +2 -2
  15. package/dist/cjs/{index-0f668cc5.js → index-4d2896bb.js} +10 -1
  16. package/dist/cjs/loader.cjs.js +2 -2
  17. package/dist/collection/collection-manifest.json +1 -0
  18. package/dist/collection/components/assets/actions-sprite.svg +257 -0
  19. package/dist/collection/components/ez-action-chip/ez-action-chip.css +21 -21
  20. package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
  21. package/dist/collection/components/ez-date-input/ez-date-input.css +0 -9
  22. package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
  23. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +1 -1
  24. package/dist/collection/components/ez-label-chip/ez-label-chip.css +49 -49
  25. package/dist/collection/components/ez-label-chip/ez-label-chip.js +11 -11
  26. package/dist/collection/components/ez-list/ez-list.css +131 -0
  27. package/dist/collection/components/ez-list/ez-list.js +252 -0
  28. package/dist/collection/components/ez-search/ez-search.js +9 -9
  29. package/dist/collection/components/ez-text-area/ez-text-area.css +48 -48
  30. package/dist/collection/components/ez-time-input/ez-time-input.css +0 -168
  31. package/dist/collection/components/ez-time-input/ez-time-input.js +8 -75
  32. package/dist/collection/components/ez-toast/ez-toast.css +9 -9
  33. package/dist/collection/components/ez-toast/ez-toast.js +4 -1
  34. package/dist/collection/utils/CSSVarsUtils.js +14 -0
  35. package/dist/custom-elements/index.d.ts +6 -0
  36. package/dist/custom-elements/index.js +220 -92
  37. package/dist/esm/CSSVarsUtils-e0128b01.js +16 -0
  38. package/dist/esm/ez-action-chip.entry.js +2 -2
  39. package/dist/esm/ez-button_16.entry.js +12 -8
  40. package/dist/esm/ez-dialog.entry.js +1 -1
  41. package/dist/esm/ez-label-chip.entry.js +12 -12
  42. package/dist/esm/ez-list.entry.js +170 -0
  43. package/dist/esm/ez-modal.entry.js +1 -1
  44. package/dist/esm/ez-number-input.entry.js +1 -1
  45. package/dist/esm/ez-popover.entry.js +1 -1
  46. package/dist/esm/ez-popup.entry.js +1 -1
  47. package/dist/esm/ez-time-input.entry.js +7 -70
  48. package/dist/esm/ez-toast.entry.js +5 -2
  49. package/dist/esm/ezui.js +2 -2
  50. package/dist/esm/{index-89fc9bfd.js → index-33153059.js} +10 -2
  51. package/dist/esm/loader.js +2 -2
  52. package/dist/ezui/ezui.esm.js +1 -1
  53. package/dist/ezui/p-061d21ba.entry.js +1 -0
  54. package/dist/ezui/p-0d476efb.entry.js +1 -0
  55. package/dist/ezui/{p-a88ee12f.entry.js → p-15743b09.entry.js} +1 -1
  56. package/dist/ezui/p-25953d44.entry.js +1 -0
  57. package/dist/ezui/p-34d288d0.entry.js +1 -0
  58. package/dist/ezui/p-47406a6e.entry.js +1 -0
  59. package/dist/ezui/p-4df6f855.js +1 -0
  60. package/dist/ezui/{p-a7e23f65.entry.js → p-50464bdf.entry.js} +1 -1
  61. package/dist/ezui/{p-1bc9ddad.entry.js → p-67410dfa.entry.js} +1 -1
  62. package/dist/ezui/{p-74e4415e.entry.js → p-7f3bc6d9.entry.js} +1 -1
  63. package/dist/ezui/{p-b692a0ab.entry.js → p-8818da66.entry.js} +1 -1
  64. package/dist/ezui/p-907de194.entry.js +1 -0
  65. package/dist/ezui/p-d1889704.js +1 -0
  66. package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +2 -2
  67. package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -0
  68. package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +2 -2
  69. package/dist/types/components/ez-list/ez-list.d.ts +34 -0
  70. package/dist/types/components/ez-search/ez-search.d.ts +5 -5
  71. package/dist/types/components/ez-time-input/ez-time-input.d.ts +1 -8
  72. package/dist/types/components/ez-toast/ez-toast.d.ts +3 -0
  73. package/dist/types/components.d.ts +51 -6
  74. package/dist/types/utils/CSSVarsUtils.d.ts +4 -0
  75. package/package.json +1 -1
  76. package/react/components.d.ts +1 -0
  77. package/react/components.js +1 -0
  78. package/react/components.js.map +1 -1
  79. package/dist/ezui/p-1c33a56d.entry.js +0 -1
  80. package/dist/ezui/p-5aa8871e.entry.js +0 -1
  81. package/dist/ezui/p-762ac7a0.js +0 -1
  82. package/dist/ezui/p-8d547517.entry.js +0 -1
  83. package/dist/ezui/p-9702db61.entry.js +0 -1
  84. package/dist/ezui/p-f7d7fb7f.entry.js +0 -1
@@ -1,54 +1,54 @@
1
1
  :host {
2
2
  /* dimensions */
3
3
  /*@doc Define a largura do componente.*/
4
- --ta--width: 100%;
4
+ --text-area--width: 100%;
5
5
 
6
6
  /* general */
7
7
  /*@doc Define o raio da borda do input do componente.*/
8
- --ta--border-radius: var(--border--radius-medium, 12px);
8
+ --text-area--border-radius: var(--border--radius-medium, 12px);
9
9
  /*@doc Define o tamanho da fonte do input e label do componente.*/
10
- --ta--font-size: var(--text--medium, 14px);
10
+ --text-area--font-size: var(--text--medium, 14px);
11
11
  /*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
12
- --ta--font-family: var(--font-pattern, Arial);
12
+ --text-area--font-family: var(--font-pattern, Arial);
13
13
  /*@doc Define o peso da fonte do label do componente.*/
14
- --ta--font-weight: var(--text-weight--large, 500);
14
+ --text-area--font-weight: var(--text-weight--large, 500);
15
15
  /*@doc Define a cor da fonte do input e label do componente.*/
16
- --ta--color: var(--title--primary, #000);
16
+ --text-area--color: var(--title--primary, #000);
17
17
 
18
18
  /* input */
19
19
  /*@doc Define a cor de fundo do input.*/
20
- --ta__input--background-color: var(--background--medium, #e0e0e0);
20
+ --text-area__input--background-color: var(--background--medium, #e0e0e0);
21
21
  /*@doc Define o estilo da borda do input.*/
22
- --ta__input--border: var(--border--medium, 2px solid);
22
+ --text-area__input--border: var(--border--medium, 2px solid);
23
23
  /*@doc Define a cor da borda do input.*/
24
- --ta__input--border-color: var(--ta__input--background-color);
24
+ --text-area__input--border-color: var(--text-area__input--background-color);
25
25
  /*no modo normal usamos a borda com a mesma cor do bg*/
26
26
  /*@doc Define a cor da borda do input quando focado.*/
27
- --ta__input--focus--border-color: var(--color--primary, #008561);
27
+ --text-area__input--focus--border-color: var(--color--primary, #008561);
28
28
  /*@doc Define a cor de fundo do input quando desabilitado.*/
29
- --ta__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
29
+ --text-area__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
30
30
  /*@doc Define a cor do texto do input.*/
31
- --ta__input--disabled--color: var(--text--disable, #AFB6C0);
31
+ --text-area__input--disabled--color: var(--text--disable, #AFB6C0);
32
32
  /*@doc Define a cor da borda do input quando com erro.*/
33
- --ta__input--error--border-color: #CC2936;
33
+ --text-area__input--error--border-color: #CC2936;
34
34
 
35
35
  /* message box */
36
36
  /*@doc Define o tamanho da fonte da mensagem abaixo do input.*/
37
- --ta__message_box--font-size: var(--text--small, 12px);
37
+ --text-area__message_box--font-size: var(--text--small, 12px);
38
38
  /*@doc Define a cor da fonte da mensagem quando info.*/
39
- --ta__message_box--info--color: var(--color--success, #22085d);
39
+ --text-area__message_box--info--color: var(--color--success, #22085d);
40
40
  /*@doc Define a cor da fonte da mensagem quando erro.*/
41
- --ta__message_box--error--color: var(--color--error, #FF0000);
41
+ --text-area__message_box--error--color: var(--color--error, #FF0000);
42
42
 
43
43
  /* label */
44
44
  /*@doc Define o posicionamento do label.*/
45
- --ta__label--floating--top: 6px;
45
+ --text-area__label--floating--top: 6px;
46
46
  /*@doc Define o espaçamento superior do label.*/
47
- --ta__label--padding-top: 12px;
47
+ --text-area__label--padding-top: 12px;
48
48
  /*@doc Define o espaçamento esquerdo do label.*/
49
- --ta__label--padding-left: 14px;
49
+ --text-area__label--padding-left: 14px;
50
50
  /*@doc Define o espaçamento direito do label.*/
51
- --ta__label--padding-right: 12px;
51
+ --text-area__label--padding-right: 12px;
52
52
 
53
53
  /***************
54
54
  host style
@@ -58,7 +58,7 @@
58
58
  flex-wrap: wrap;
59
59
  position: relative;
60
60
  /*public*/
61
- width: var(--ta--width);
61
+ width: var(--text-area--width);
62
62
  }
63
63
 
64
64
  textarea {
@@ -68,9 +68,9 @@ textarea {
68
68
  margin-top: calc(var(--space--medium, 12px) + 4px);
69
69
  width: 100%;
70
70
  font-weight: var(--text-weight--large, 600);
71
- font-family: var(--ta--font-family);
72
- font-size: var(--ta--font-size);
73
- color: var(--ta--color);
71
+ font-family: var(--text-area--font-family);
72
+ font-size: var(--text-area--font-size);
73
+ color: var(--text-area--color);
74
74
  padding: 0;
75
75
  background: none;
76
76
  }
@@ -83,7 +83,7 @@ textarea:focus {
83
83
  textarea:disabled {
84
84
  /*public*/
85
85
  background-color: transparent;
86
- color: var(--ta__input--disabled--color);
86
+ color: var(--text-area__input--disabled--color);
87
87
  }
88
88
 
89
89
  .textarea {
@@ -94,19 +94,19 @@ textarea:disabled {
94
94
  padding-right: var(--space--extra-small);
95
95
 
96
96
  /*public*/
97
- border-radius: var(--ta--border-radius);
98
- border: var(--ta__input--border);
99
- border-color: var(--ta__input--border-color);
100
- background-color: var(--ta__input--background-color);
97
+ border-radius: var(--text-area--border-radius);
98
+ border: var(--text-area__input--border);
99
+ border-color: var(--text-area__input--border-color);
100
+ background-color: var(--text-area__input--background-color);
101
101
  }
102
102
 
103
103
  .textarea--focus {
104
- border-color: var(--ta__input--focus--border-color);
104
+ border-color: var(--text-area__input--focus--border-color);
105
105
  }
106
106
 
107
107
  .textarea.hasError {
108
- color: var(--ta--color);
109
- border-color: var(--ta__input--error--border-color);
108
+ color: var(--text-area--color);
109
+ border-color: var(--text-area__input--error--border-color);
110
110
  }
111
111
 
112
112
  .message-box {
@@ -120,14 +120,14 @@ textarea:disabled {
120
120
  white-space: nowrap;
121
121
 
122
122
  /*public*/
123
- font-family: var(--ta--font-family);
124
- font-size: var(--ta__message_box--font-size);
125
- color: var(--ta__message_box--info--color);
123
+ font-family: var(--text-area--font-family);
124
+ font-size: var(--text-area__message_box--font-size);
125
+ color: var(--text-area__message_box--info--color);
126
126
  }
127
127
 
128
128
  .hasError {
129
129
  /*public*/
130
- color: var(--ta__message_box--error--color);
130
+ color: var(--text-area__message_box--error--color);
131
131
  }
132
132
 
133
133
  .textarea__label {
@@ -140,26 +140,26 @@ textarea:disabled {
140
140
  white-space: nowrap;
141
141
  -webkit-transition: font-size .05s, top .05s;
142
142
  transition: font-size .05s, top .05s;
143
- width: calc(100% - var(--ta__label--padding-right));
144
- left: var(--ta--space--medium);
143
+ width: calc(100% - var(--text-area__label--padding-right));
144
+ left: var(--text-area--space--medium);
145
145
 
146
146
  /*public*/
147
- font-family: var(--ta--font-family);
148
- font-size: var(--ta--font-size);
149
- font-weight: var(--ta--font-weight);
150
- color: var(--ta--color);
151
- top: var(--ta__label--padding-top);
152
- left: var(--ta__label--padding-left);
153
- padding-right: var(--ta__label--padding-right);
147
+ font-family: var(--text-area--font-family);
148
+ font-size: var(--text-area--font-size);
149
+ font-weight: var(--text-area--font-weight);
150
+ color: var(--text-area--color);
151
+ top: var(--text-area__label--padding-top);
152
+ left: var(--text-area__label--padding-left);
153
+ padding-right: var(--text-area__label--padding-right);
154
154
  }
155
155
 
156
156
  .textarea__label--floated {
157
- font-family: var(--ta--font-family);
157
+ font-family: var(--text-area--font-family);
158
158
  font-size: var(--text--extra-small);
159
159
  color: var(--text--primary);
160
- top: var(--ta__label--floating--top);
160
+ top: var(--text-area__label--floating--top);
161
161
  }
162
162
 
163
163
  .textarea__label--disabled {
164
- color: var(--ta__input--disabled--color);
164
+ color: var(--text-area__input--disabled--color);
165
165
  }
@@ -1,53 +1,4 @@
1
1
  :host {
2
- /* dimensions */
3
- /*@doc Define a altura do componente.*/
4
- --eztime--height: 42px;
5
- /*@doc Define a largura do componente.*/
6
- --eztime--width: 100%;
7
- /*@doc Define a largura do slot que contém o ícone.*/
8
- --eztime__icon--width: 48px;
9
-
10
- /* general */
11
- /*@doc Define o raio da borda do input do componente.*/
12
- --eztime--border-radius: var(--border--radius-medium, 12px);
13
- /*@doc Define o tamanho da fonte do input e label do componente.*/
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.*/
16
- --eztime--font-family: var(--font-pattern, Arial);
17
- /*@doc Define o peso da fonte do label do componente.*/
18
- --eztime--font-weight: var(--text-weight--large, 500);
19
- /*@doc Define o espaçamento do label.*/
20
- --eztime--space--medium: var(--space--medium, 6px);
21
-
22
- /* input */
23
- /*@doc Define a cor de fundo do input.*/
24
- --eztime__input--background-color: var(--background--medium, #e0e0e0);
25
- /*@doc Define o estilo da borda do input.*/
26
- --eztime__input--border: var(--border--medium, 2px solid);
27
- /*@doc Define a cor da borda do input.*/
28
- --eztime__input--border-color: var(--eztime__input--background-color);
29
- /*no modo normal usamos a borda com a mesma cor do bg*/
30
- /*@doc Define a cor da borda do input quando focado.*/
31
- --eztime__input--focus--border-color: var(--color--primary, #008561);
32
- /*@doc Define a cor de fundo do input quando desabilitado.*/
33
- --eztime__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
34
- /*@doc Define a cor do texto do input.*/
35
- --eztime__input--disabled--color: var(--text--disable, #AFB6C0);
36
- /*@doc Define a cor da borda do input quando com erro.*/
37
- --eztime__input--error--border-color: #CC2936;
38
-
39
- /* label */
40
- /*@doc Define a cor do texto do label.*/
41
- --eztime__label--color: var(--title--primary, #919191);
42
-
43
- /* message box */
44
- /*@doc Define o tamanho da fonte da mensagem abaixo do input.*/
45
- --eztime__message_box--font-size: var(--text--small, 12px);
46
- /*@doc Define a cor da fonte da mensagem quando info.*/
47
- --eztime__message_box--info--color: var(--color--success, #22085d);
48
- /*@doc Define a cor da fonte da mensagem quando erro.*/
49
- --eztime__message_box--error--color: var(--color--error, #FF0000);
50
-
51
2
  /***************
52
3
  host style
53
4
  ***************/
@@ -55,124 +6,5 @@
55
6
  display: flex;
56
7
  flex-wrap: wrap;
57
8
  position: relative;
58
- /*public*/
59
- width: var(--eztime--width);
60
- }
61
-
62
- .invisible {
63
- visibility: hidden;
64
- }
65
-
66
- input {
67
- /*private*/
68
9
  width: 100%;
69
- box-sizing: border-box;
70
- padding: var(--space--medium, 6px);
71
- font-weight: var(--text-weight--large, 600);
72
- /*public*/
73
- height: var(--eztime--height);
74
- border-radius: var(--eztime--border-radius);
75
- font-family: var(--eztime--font-family);
76
- font-size: var(--eztime--font-size);
77
- border: var(--eztime__input--border);
78
- border-color: var(--eztime__input--border-color);
79
- background-color: var(--eztime__input--background-color);
80
- }
81
-
82
- input:disabled {
83
- /*public*/
84
- background-color: var(--eztime__input--disabled--background-color);
85
- color: var(--eztime__input--disabled--color);
86
- }
87
-
88
- input:focus {
89
- /*private*/
90
- outline: none;
91
- /*public*/
92
- border-color: var(--eztime__input--focus--border-color);
93
- }
94
-
95
- input.icon--left {
96
- padding-left: var(--eztime__icon--width);
97
- }
98
-
99
- input.icon--right {
100
- padding-right: var(--eztime__icon--width);
101
- }
102
-
103
- input::placeholder {
104
- color: var(--eztime__placeholder--color);
105
- font-weight: var(--eztime__placeholder--font-weight);
106
- }
107
-
108
- input:disabled::placeholder {
109
- color: var(--eztime__placeholder--disabled--color);
110
- }
111
-
112
- input.hasError {
113
- color: inherit;
114
- border-color: var(--eztime__input--error--border-color);
115
- }
116
-
117
- input.text--right {
118
- text-align: right;
119
- }
120
-
121
- .message-box {
122
- /*private*/
123
- min-height: 16px;
124
- min-width: 100%;
125
- margin-top: 2px;
126
- line-height: 12px;
127
- /*public*/
128
- font-family: var(--eztime--font-family);
129
- font-size: var(--eztime__message_box--font-size);
130
- color: var(--eztime__message_box--info--color);
131
- }
132
-
133
- .hasError {
134
- /*public*/
135
- color: var(--eztime__message_box--error--color);
136
- }
137
-
138
- .input__label {
139
- /*public*/
140
- font-size: var(--eztime--font-size);
141
- font-weight: var(--eztime--font-weight);
142
- position: absolute;
143
- color: var(it__label--color);
144
- top: var(--eztime--space--medium);
145
- font-family: var(--eztime--font-family);
146
- -webkit-transition: font-size .3s, top .3s;
147
- transition: font-size .3s, top .3s;
148
- z-index: var(--visible);
149
- white-space: nowrap;
150
- overflow: hidden;
151
- text-overflow: ellipsis;
152
- left: var(--eztime__icon--width);
153
- width: calc(100% - 10px - var(--eztime__icon--width));
154
- }
155
-
156
- .input__label--floated {
157
- font-family: var(--eztime--font-family);
158
- font-size: var(--text--extra-small);
159
- top: var(--space--small);
160
- color: var(--text--primary);
161
- }
162
-
163
- .input__label--left {
164
- /*public*/
165
- left: var(--eztime__icon--width);
166
- width: calc(100% - 10px - var(--eztime__icon--width));
167
- }
168
-
169
- .input__label--right {
170
- /*public*/
171
- padding-right: var(--eztime__icon--width);
172
- width: calc(100% - 10px - var(--eztime__icon--width));
173
- }
174
-
175
- .input--with--label {
176
- /*public*/
177
- padding-bottom: 0;
178
10
  }
@@ -1,5 +1,6 @@
1
- import { Component, Prop, h, Watch, Host, Method } from '@stencil/core';
2
- import { TimeFormatter, MaskFormatter, NumberUtils } from '@sankhyalabs/core';
1
+ import { Element, Component, Prop, h, Watch, Host, Method, getAssetPath } from "@stencil/core";
2
+ import { TimeFormatter, MaskFormatter, NumberUtils } from "@sankhyalabs/core";
3
+ import CSSVarsUtils from "../../utils/CSSVarsUtils";
3
4
  export class EzTimeInput {
4
5
  constructor() {
5
6
  /**
@@ -11,17 +12,6 @@ export class EzTimeInput {
11
12
  */
12
13
  this.showSeconds = false;
13
14
  }
14
- showError() {
15
- const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
16
- if (hasError) {
17
- this._inputElem.classList.add('hasError');
18
- this._messageBoxElem.classList.add('hasError');
19
- }
20
- else {
21
- this._inputElem.classList.remove('hasError');
22
- this._messageBoxElem.classList.remove('hasError');
23
- }
24
- }
25
15
  prepareMask() {
26
16
  if (this.showSeconds) {
27
17
  if (this._maskFormatter == undefined) {
@@ -40,23 +30,6 @@ export class EzTimeInput {
40
30
  }
41
31
  }
42
32
  }
43
- adjustFloatingLabel() {
44
- if (this.label) {
45
- if (!this._inputElem.classList.contains("input--with--label")) {
46
- this._inputElem.classList.add("input--with--label");
47
- }
48
- if (this.viewValue && this.viewValue.toString().length > 0) {
49
- if (!this._labelElem.classList.contains("input__label--floated")) {
50
- this._labelElem.classList.add("input__label--floated");
51
- }
52
- }
53
- else {
54
- if (this._labelElem.classList.contains("input__label--floated")) {
55
- this._labelElem.classList.remove("input__label--floated");
56
- }
57
- }
58
- }
59
- }
60
33
  onValueChanged() {
61
34
  if (this.value === NaN) {
62
35
  this.value = undefined;
@@ -79,12 +52,6 @@ export class EzTimeInput {
79
52
  this._inputElem.blur();
80
53
  }
81
54
  //---------------------------------------------
82
- // Test Methods
83
- //---------------------------------------------
84
- setInputElemnt(input) {
85
- this._iconElement = input;
86
- }
87
- //---------------------------------------------
88
55
  // Event handlers
89
56
  //---------------------------------------------
90
57
  handleFocusout() {
@@ -94,7 +61,6 @@ export class EzTimeInput {
94
61
  this.clearField();
95
62
  this.errorMessage = "Favor inserir um horário válido.";
96
63
  }
97
- this.adjustFloatingLabel();
98
64
  }
99
65
  prepareValue(value) {
100
66
  try {
@@ -112,40 +78,12 @@ export class EzTimeInput {
112
78
  this.viewValue = this._inputElem.value;
113
79
  this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
114
80
  }
115
- adjustIconStyle() {
116
- if (this._iconElement) {
117
- this._iconElement.style.position = "absolute";
118
- this._iconElement.style.display = "flex";
119
- this._iconElement.style.alignItems = "center";
120
- this._iconElement.style.justifyContent = "center";
121
- this._iconElement.style.overflow = "hidden";
122
- this._iconElement.style.top = "0px";
123
- this._iconElement.style.width = "var(--eztime__icon--width)";
124
- this._iconElement.style.height = "var(--eztime--height)";
125
- this._iconElement.style.left = "0px";
126
- this._iconElement.style.borderRadius = "var(--eztime--border-radius) 0 0 var(--eztime--border-radius)";
127
- this._inputElem.classList.add('icon--left');
128
- if (this._labelElem) {
129
- this._labelElem.classList.add("input__label--left");
130
- }
131
- }
132
- this.showError();
133
- }
134
- doFocus() {
135
- if (this.label && this._labelElem) {
136
- if (!this._labelElem.classList.contains("input__label--floated")) {
137
- this._labelElem.classList.add("input__label--floated");
138
- }
139
- }
140
- }
141
81
  //---------------------------------------------
142
82
  // Lifecycle web component
143
83
  //---------------------------------------------
144
84
  componentDidLoad() {
145
85
  this.onValueChanged();
146
- this.adjustIconStyle();
147
- this.adjustFloatingLabel();
148
- this.showError();
86
+ CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
149
87
  }
150
88
  componentWillLoad() {
151
89
  this.prepareMask();
@@ -158,12 +96,8 @@ export class EzTimeInput {
158
96
  }
159
97
  render() {
160
98
  return (h(Host, null,
161
- h("ez-icon", { ref: (el) => this._iconElement = el, href: "/themes/default/images/icons/actions-sprite.svg#timer-outline" }),
162
- this.label ?
163
- h("label", { onClick: () => this._inputElem.focus(), class: this.value ? "input__label input__label--floated" : "input__label", ref: (el) => this._labelElem = el, title: this.label }, this.label)
164
- : null,
165
- h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.viewValue, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
166
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
99
+ 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 },
100
+ h("ez-icon", { slot: "leftIcon", href: getAssetPath("./assets/actions-sprite.svg") + "#timer-outline" }))));
167
101
  }
168
102
  static get is() { return "ez-time-input"; }
169
103
  static get encapsulation() { return "shadow"; }
@@ -173,6 +107,7 @@ export class EzTimeInput {
173
107
  static get styleUrls() { return {
174
108
  "$": ["ez-time-input.css"]
175
109
  }; }
110
+ static get assetsDirs() { return ["../assets"]; }
176
111
  static get properties() { return {
177
112
  "label": {
178
113
  "type": "string",
@@ -313,10 +248,8 @@ export class EzTimeInput {
313
248
  }
314
249
  }
315
250
  }; }
251
+ static get elementRef() { return "_elem"; }
316
252
  static get watchers() { return [{
317
- "propName": "errorMessage",
318
- "methodName": "showError"
319
- }, {
320
253
  "propName": "showSeconds",
321
254
  "methodName": "prepareMask"
322
255
  }, {
@@ -2,28 +2,28 @@
2
2
 
3
3
  /* Buttons */
4
4
  /*@doc Contém o ícone de fechamento do toast.*/
5
- --toast__btn__close__image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>');
5
+ --ez-toast__btn__close__image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>');
6
6
 
7
7
  /* Container */
8
8
  /*@doc Define a camada em que o container será exibido.*/
9
- --toast__container-z-index: var(--more-visible, 2);
9
+ --ez-toast__container-z-index: var(--more-visible, 2);
10
10
  /*@doc Define a cor de fundo do container.*/
11
- --toast__container--background-color: var(--color--secondary, #383c45);
11
+ --ez-toast__container--background-color: var(--color--secondary, #383c45);
12
12
 
13
13
  /* Icon */
14
14
  /*@doc Define o espaçamento à esquerda do ícone.*/
15
- --toast__icon--padding-left: var(--space--small, 6px);
15
+ --ez-toast__icon--padding-left: var(--space--small, 6px);
16
16
  }
17
17
 
18
18
  .toast__container {
19
19
  position: fixed;
20
20
  display: flex;
21
21
  bottom: 100px;
22
- z-index: var(--toast__container-z-index);
22
+ z-index: var(--ez-toast__container-z-index);
23
23
  left: 100px;
24
24
  width: 30%;
25
25
  box-sizing: border-box;
26
- background-color: var(--toast__container--background-color);
26
+ background-color: var(--ez-toast__container--background-color);
27
27
  border-radius: 6px;
28
28
  align-items: center;
29
29
  padding: 12px;
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  .message__conteiner--icon {
45
- padding-left: var(--toast__icon--padding-left);
45
+ padding-left: var(--ez-toast__icon--padding-left);
46
46
  width: 80%;
47
47
  }
48
48
 
@@ -63,8 +63,8 @@
63
63
  background-color: #FFFFFF;
64
64
  width: 12px;
65
65
  height: 12px;
66
- -webkit-mask-image: var(--toast__btn__close__image);
67
- mask-image: var(--toast__btn__close__image);
66
+ -webkit-mask-image: var(--ez-toast__btn__close__image);
67
+ mask-image: var(--ez-toast__btn__close__image);
68
68
  }
69
69
 
70
70
  .toast__container--oppened {
@@ -10,6 +10,9 @@ export class EzToast {
10
10
  */
11
11
  this.useIcon = false;
12
12
  }
13
+ /**
14
+ * Exibe o componente na tela.
15
+ */
13
16
  async show() {
14
17
  this.container.classList.add("toast__container--oppened");
15
18
  this.container.style.animation = `fadein 0.5s, fadeout 0.5s ${this.fadeTime / 1000}s`;
@@ -105,7 +108,7 @@ export class EzToast {
105
108
  "return": "Promise<void>"
106
109
  },
107
110
  "docs": {
108
- "text": "",
111
+ "text": "Exibe o componente na tela.",
109
112
  "tags": []
110
113
  }
111
114
  }
@@ -0,0 +1,14 @@
1
+ export default class CSSVarsUtils {
2
+ static applyVarsTextInput(host, textInput) {
3
+ if (textInput) {
4
+ CSSVarsUtils.applyIfExists(host, textInput, '--text-input__input--background-color');
5
+ CSSVarsUtils.applyIfExists(host, textInput, '--text-input__input--border-color');
6
+ }
7
+ }
8
+ static applyIfExists(host, textInput, varName) {
9
+ const prop = getComputedStyle(host).getPropertyValue(varName);
10
+ if (prop) {
11
+ textInput.style.setProperty(varName, prop);
12
+ }
13
+ }
14
+ }
@@ -68,6 +68,12 @@ export const EzLabelChip: {
68
68
  new (): EzLabelChip;
69
69
  };
70
70
 
71
+ interface EzList extends Components.EzList, HTMLElement {}
72
+ export const EzList: {
73
+ prototype: EzList;
74
+ new (): EzList;
75
+ };
76
+
71
77
  interface EzModal extends Components.EzModal, HTMLElement {}
72
78
  export const EzModal: {
73
79
  prototype: EzModal;