@sankhyalabs/ezui 1.1.159 → 1.1.161

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 (110) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +63 -28
  2. package/dist/cjs/ez-date-input.cjs.entry.js +71 -25
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +94 -31
  4. package/dist/cjs/ez-filter-input.cjs.entry.js +10 -4
  5. package/dist/cjs/ez-form.cjs.entry.js +54 -9
  6. package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
  7. package/dist/cjs/ez-grid.cjs.entry.js +16 -9
  8. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
  11. package/dist/cjs/ez-search.cjs.entry.js +20 -5
  12. package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
  13. package/dist/cjs/ez-text-area.cjs.entry.js +8 -2
  14. package/dist/cjs/ez-text-input.cjs.entry.js +30 -21
  15. package/dist/cjs/ez-time-input.cjs.entry.js +75 -40
  16. package/dist/cjs/ezui.cjs.js +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +2 -2
  19. package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
  20. package/dist/collection/components/ez-combo-box/ez-combo-box.js +81 -28
  21. package/dist/collection/components/ez-date-input/ez-date-input.js +87 -25
  22. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +108 -31
  23. package/dist/collection/components/ez-filter-input/ez-filter-input.js +26 -4
  24. package/dist/collection/components/ez-form/DataBinder.js +12 -3
  25. package/dist/collection/components/ez-form/ez-form.js +43 -6
  26. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -3
  27. package/dist/collection/components/ez-grid/ez-grid.css +4 -0
  28. package/dist/collection/components/ez-grid/ez-grid.js +21 -14
  29. package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
  30. package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
  31. package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
  32. package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
  33. package/dist/collection/components/ez-list/ez-list.css +84 -46
  34. package/dist/collection/components/ez-modal/ez-modal.css +2 -2
  35. package/dist/collection/components/ez-number-input/ez-number-input.js +83 -25
  36. package/dist/collection/components/ez-search/ez-search.js +38 -5
  37. package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
  38. package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
  39. package/dist/collection/components/ez-text-input/ez-text-input.css +1 -1
  40. package/dist/collection/components/ez-text-input/ez-text-input.js +45 -38
  41. package/dist/collection/components/ez-time-input/ez-time-input.js +95 -59
  42. package/dist/custom-elements/index.d.ts +12 -12
  43. package/dist/custom-elements/index.js +1121 -810
  44. package/dist/esm/ez-combo-box.entry.js +63 -28
  45. package/dist/esm/ez-date-input.entry.js +71 -25
  46. package/dist/esm/ez-date-time-input.entry.js +94 -31
  47. package/dist/esm/ez-filter-input.entry.js +10 -4
  48. package/dist/esm/ez-form.entry.js +54 -9
  49. package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
  50. package/dist/esm/ez-grid.entry.js +16 -9
  51. package/dist/esm/ez-list.entry.js +1 -1
  52. package/dist/esm/ez-modal.entry.js +1 -1
  53. package/dist/esm/ez-number-input.entry.js +69 -25
  54. package/dist/esm/ez-search.entry.js +20 -5
  55. package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
  56. package/dist/esm/ez-text-area.entry.js +8 -2
  57. package/dist/esm/ez-text-input.entry.js +30 -21
  58. package/dist/esm/ez-time-input.entry.js +76 -41
  59. package/dist/esm/ezui.js +1 -1
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/ezui/ezui.esm.js +1 -1
  62. package/dist/ezui/p-003d53b1.entry.js +1 -0
  63. package/dist/ezui/p-1fecaeb8.entry.js +1 -0
  64. package/dist/ezui/p-267fa515.entry.js +1 -0
  65. package/dist/ezui/p-2acf7d59.entry.js +1 -0
  66. package/dist/ezui/p-403de0a4.entry.js +1 -0
  67. package/dist/ezui/p-4c3d136c.entry.js +1 -0
  68. package/dist/ezui/p-53bbba8e.entry.js +1 -0
  69. package/dist/ezui/p-6668c3b0.entry.js +1 -0
  70. package/dist/ezui/p-7fd6deec.entry.js +1 -0
  71. package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
  72. package/dist/ezui/{p-be87ac5e.entry.js → p-8d73594f.entry.js} +1 -1
  73. package/dist/ezui/p-988ff301.entry.js +1 -0
  74. package/dist/ezui/p-cf56d3e8.entry.js +1 -0
  75. package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
  76. package/dist/ezui/p-ff7b4b13.entry.js +1 -0
  77. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +13 -7
  78. package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -3
  79. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +15 -7
  80. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +5 -1
  81. package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
  82. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  83. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
  84. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  85. package/dist/types/components/ez-grid/ez-grid.d.ts +9 -6
  86. package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
  87. package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
  88. package/dist/types/components/ez-number-input/ez-number-input.d.ts +14 -5
  89. package/dist/types/components/ez-search/ez-search.d.ts +6 -1
  90. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
  91. package/dist/types/components/ez-text-input/ez-text-input.d.ts +7 -6
  92. package/dist/types/components/ez-time-input/ez-time-input.d.ts +17 -13
  93. package/dist/types/components.d.ts +84 -61
  94. package/package.json +1 -1
  95. package/react/components.d.ts +2 -2
  96. package/react/components.js +2 -2
  97. package/react/components.js.map +1 -1
  98. package/dist/ezui/p-1859a3d8.entry.js +0 -1
  99. package/dist/ezui/p-49fdfa4b.entry.js +0 -1
  100. package/dist/ezui/p-4fdceb7d.entry.js +0 -1
  101. package/dist/ezui/p-6d4b1628.entry.js +0 -1
  102. package/dist/ezui/p-8f4fac31.entry.js +0 -1
  103. package/dist/ezui/p-91377c65.entry.js +0 -1
  104. package/dist/ezui/p-b524dfca.entry.js +0 -1
  105. package/dist/ezui/p-bc8aa27f.entry.js +0 -1
  106. package/dist/ezui/p-bea6f8a6.entry.js +0 -1
  107. package/dist/ezui/p-c2de757f.entry.js +0 -1
  108. package/dist/ezui/p-ec21ecce.entry.js +0 -1
  109. package/dist/ezui/p-ecee9d8d.entry.js +0 -1
  110. package/dist/ezui/p-fc9b9487.entry.js +0 -1
@@ -1,78 +1,102 @@
1
1
  :host {
2
-
3
2
  /* @doc Define a camada de visibilidae do componente. */
4
3
  --ez-list__host--z-index: var(--visible, 1);
4
+
5
5
  /* @doc Define o raio da borda do componente. */
6
6
  --ez-list__host--border-radius: var(--border--radius-medium, 12px);
7
+
7
8
  /* @doc Define o espaçamento entre a lista e o componente. */
8
9
  --ez-list__host--padding: var(--space--medium, 12px);
9
10
 
10
11
  /* @doc Define o espaçamento interno do ícone. */
11
- --ez-list__icon__padding: var(--space--small, 6px);
12
+ --ez-list__icon--padding: var(--space--small, 6px);
13
+
12
14
  /* @doc Define a cor do ícone de arrasto do item da lista. */
13
15
  --ez-list__icon--color: #AFB6C0;
14
16
 
15
17
  /* @doc Define o espaçamento externo do item da lista. */
16
- --ez-list__item__margin: 0 var(--space--small, 6px);
18
+ --ez-list__item--margin: 0 var(--space--small, 6px);
19
+
17
20
  /* @doc Define a cor do texto do item da lista. */
18
21
  --ez-list__item--color: var(--title--primary, #2b3a54);
22
+
19
23
  /* @doc Define o estilo borda inferior do item da lista. */
20
24
  --ez-list__item--border-bottom: var(--border--small, 1px solid);
25
+
21
26
  /* @doc Define a cor da borda inferior do item da lista. */
22
27
  --ez-list__item--border-color: var(--title--primary, #2b3a54);
28
+
23
29
  /* @doc Define o estilo do texto do item da lista. */
24
30
  --ez-list__item--font-family: var(--font-pattern, "Sora");
31
+
25
32
  /* @doc Define o tamanho do texto do item da lista. */
26
33
  --ez-list__item--font-size: var(--text--medium, 14px);
27
34
 
28
35
  /* @doc Define o espaçamento lateral direito para items selecionados. */
29
36
  --ez-list__selectable--padding-right: var(--space--small, 6px);
37
+
30
38
  /* @doc Define o espaçamento lateral esquerdo para items selecionados. */
31
39
  --ez-list__selectable--padding-left: var(--space--small, 6px);
32
40
 
33
41
  /*@doc Define o raio da borda de items selecionados.*/
34
- --ez-list__selected-item__border-radius: var(--border--radius-small, 6px);
42
+ --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);
43
+
35
44
  /*@doc Define a cor de fundo de items selecionados.*/
36
- --ez-list__selected-item__background: var(--color--primary-300, #E2F4EF);
45
+ --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);
37
46
 
38
47
  /* @doc Define o estilo do texto do grupo da lista. */
39
48
  --ez-list__group--font-family: var(--font-pattern, "Sora");
49
+
40
50
  /* @doc Define o tamanho do texto do grupo da lista. */
41
51
  --ez-list__group--font-size: var(--text--medium, 14px);
52
+
42
53
  /* @doc Define o peso do texto do grupo da lista. */
43
54
  --ez-list__group--font-weight: var(--text-weight--large, 600);
55
+
44
56
  /* @doc Define o espaçamento inferior do grupo da lista. */
45
57
  --ez-list__group--padding-bottom: var(--space-small, 6px);
46
58
 
47
59
  /* @doc Define o estilo do texto da área de transferência de grupos. */
48
- --ez-list__group__overlay--font-family: var(--font-pattern, "Sora");
60
+ --ez-list__group-overlay--font-family: var(--font-pattern, "Sora");
61
+
49
62
  /* @doc Define o tamanho do texto da área de transferência de grupos. */
50
- --ez-list__group__overlay--font-size: var(--text--medium, 14px);
63
+ --ez-list__group-overlay--font-size: var(--text--medium, 14px);
51
64
 
52
65
  /*@doc Define o raio da borda da barra de rolagem do container de grupos.*/
53
- --ez-list__group-container__scrollbar--border-radius: var(--border--radius-large, 24px);
66
+ --ez-list__group-container-scrollbar--border-radius: var(--border--radius-small, 6px);
67
+
54
68
  /*@doc Define a largura da barra de rolagem do container de grupos.*/
55
- --ez-list__group-container__scrollbar--width: var(--space--medium, 12px);
69
+ --ez-list__group-container-scrollbar--width: var(--space--medium, 12px);
70
+
56
71
  /*@doc Define a cor da barra de rolagem do container de grupos.*/
57
- --ez-list__group-container__scrollbar--background-color: var(--text--primary, #626e82);
72
+ --ez-list__group-container-scrollbar--background-color-primary: var(--scrollbar--primary, #2B3A54);
73
+
74
+ /*@doc Define a cor de fundo da barra de rolagem do container de grupos.*/
75
+ --ez-list__group-container-scrollbar--background-color-secondary: var(--scrollbar--secondary, #E5EAF0);
58
76
 
59
77
  /* @doc Define a cor da borda pontilhada sobre os elementos da lista. */
60
78
  --ez-list__over--border--color: var(--color--primary, #008561);
61
79
 
62
- /*@doc Define o espaçamento do container de itens arrastáveis .*/
63
- --ez-list__draggable__list--padding-bottom: var(--space--small, 6px);
64
-
65
80
  /*@doc Define a altura do container para arrasto para última posição .*/
66
81
  --ez-list__last-droppable-space--height: var(--space--small, 6px);
67
82
 
68
83
  /*@doc Define o raio da borda da barra de rolagem do componente.*/
69
- --ez-list__draggable__scrollbar--border-radius: var(--border--radius-large, 24px);
84
+ --ez-list__draggable-scrollbar--border-radius: var(--border--radius-small, 6px);
85
+
70
86
  /*@doc Define a largura da barra de rolagem do componente.*/
71
- --ez-list__draggable__scrollbar--width: var(--space--medium, 12px);
87
+ --ez-list__draggable-scrollbar--width: var(--space--medium, 12px);
88
+
72
89
  /*@doc Define a cor da barra de rolagem do componente.*/
73
- --ez-list__draggable__scrollbar--background-color: var(--text--primary, #626e82);
90
+ --ez-list__draggable-scrollbar--background-color-primary: var(--scrollbar--primary, #2B3A54);
91
+
92
+ /*@doc Define a cor de fundo da barra de rolagem do componente.*/
93
+ --ez-list__draggable-scrollbar--background-color-secondary: var(--scrollbar--secondary, #E5EAF0);
94
+
95
+ /*@doc Define o espaçamento do container de itens arrastáveis .*/
96
+ --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);
97
+
74
98
  /* @doc Define a imagem do ícone de drag. */
75
- --ez-list__draggable__icon--image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>');
99
+ --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>');
76
100
 
77
101
  max-height: 100%;
78
102
  width: 100%;
@@ -94,6 +118,7 @@ p {
94
118
  font-family: var(--ez-list__item--font-family);
95
119
  font-size: var(--ez-list__item--font-size);
96
120
  flex: 1;
121
+ width: 100%;
97
122
  }
98
123
 
99
124
  .dragging {
@@ -118,8 +143,9 @@ p {
118
143
 
119
144
  .item-content {
120
145
  display: flex;
121
- justify-content: center;
146
+ justify-content: flex-start;
122
147
  align-items: center;
148
+ width: calc(100% - 41px);
123
149
  }
124
150
 
125
151
  .draggable-list {
@@ -128,12 +154,16 @@ p {
128
154
  margin: 0;
129
155
  width: 100%;
130
156
  max-height: 100%;
157
+ scrollbar-width: thin;
158
+
159
+ /*public*/
160
+ scrollbar-color: var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary);
131
161
  }
132
162
 
133
163
  .draggable-list li {
134
164
  background-color: #fff;
135
165
  display: flex;
136
- margin: var(--ez-list__item__margin);
166
+ margin: var(--ez-list__item--margin);
137
167
  font-family: var(--ez-list__item--font-family);
138
168
  font-size: var(--ez-list__item--font-size);
139
169
  color: var(--ez-list__item--color);
@@ -159,19 +189,19 @@ p {
159
189
 
160
190
  /* Precisamos dos tokens do scrollbar */
161
191
  .draggable-list::-webkit-scrollbar-track {
162
- background-color: #f0f2f5;
192
+ background-color: var(--ez-list__draggable-scrollbar--background-color-secondary);
163
193
  }
164
194
 
165
195
  .draggable-list::-webkit-scrollbar-thumb {
166
- background-color: var(--ez-list__draggable__scrollbar--background-color);
167
- border-radius: var(--ez-list__draggable__scrollbar--border-radius);
196
+ background-color: var(--ez-list__draggable-scrollbar--background-color-primary);
197
+ border-radius: var(--ez-list__draggable-scrollbar--border-radius);
168
198
  }
169
199
 
170
200
  .draggable-list::-webkit-scrollbar {
171
- background-color: #f0f2f5;
172
- width: var(--ez-list__draggable__scrollbar--width);
173
- max-width: var(--ez-list__draggable__scrollbar--width);
174
- min-width: var(--ez-list__draggable__scrollbar--width);
201
+ background-color: var(--ez-list__draggable-scrollbar--background-color-secondary);
202
+ width: var(--ez-list__draggable-scrollbar--width);
203
+ max-width: var(--ez-list__draggable-scrollbar--width);
204
+ min-width: var(--ez-list__draggable-scrollbar--width);
175
205
  }
176
206
 
177
207
  .draggable-icon {
@@ -188,8 +218,8 @@ p {
188
218
  background-color: var(--ez-list__icon--color);
189
219
  width: 18px;
190
220
  height: 18px;
191
- -webkit-mask-image: var(--ez-list__draggable__icon--image);
192
- mask-image: var(--ez-list__draggable__icon--image);
221
+ -webkit-mask-image: var(--ez-list__draggable-icon--image);
222
+ mask-image: var(--ez-list__draggable-icon--image);
193
223
  }
194
224
 
195
225
  * {
@@ -213,6 +243,10 @@ p {
213
243
  overflow-y: auto;
214
244
  outline: none;
215
245
  width: 100%;
246
+ scrollbar-width: thin;
247
+
248
+ /*public*/
249
+ scrollbar-color: var(--ez-list__group-container-scrollbar--background-color-primary) var(--ez-list__group-container-scrollbar--background-color-secondary);
216
250
  }
217
251
 
218
252
  .group-name {
@@ -234,19 +268,19 @@ p {
234
268
 
235
269
  /* Precisamos dos tokens do scrollbar */
236
270
  .group-container::-webkit-scrollbar-track {
237
- background-color: #f0f2f5;
271
+ background-color: var(--ez-list__group-container-scrollbar--background-color-secondary);
238
272
  }
239
273
 
240
274
  .group-container::-webkit-scrollbar-thumb {
241
- background-color: var(--ez-list__group-container__scrollbar--background-color);
242
- border-radius: var(--ez-list__group-container__scrollbar--border-radius);
275
+ background-color: var(--ez-list__group-container-scrollbar--background-color-primary);
276
+ border-radius: var(--ez-list__group-container-scrollbar--border-radius);
243
277
  }
244
278
 
245
279
  .group-container::-webkit-scrollbar {
246
- background-color: #f0f2f5;
247
- width: var(--ez-list__group-container__scrollbar--width);
248
- max-width: var(--ez-list__group-container__scrollbar--width);
249
- min-width: var(--ez-list__group-container__scrollbar--width);
280
+ background-color: var(--ez-list__group-container-scrollbar--background-color-secondary);
281
+ width: var(--ez-list__group-container-scrollbar--width);
282
+ max-width: var(--ez-list__group-container-scrollbar--width);
283
+ min-width: var(--ez-list__group-container-scrollbar--width);
250
284
  }
251
285
 
252
286
  .section-container {
@@ -260,6 +294,10 @@ p {
260
294
  max-height: 100%;
261
295
  overflow-y: auto;
262
296
  outline: none;
297
+ scrollbar-width: thin;
298
+
299
+ /*public*/
300
+ scrollbar-color: var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary);
263
301
  }
264
302
 
265
303
  .group-items-container {
@@ -270,24 +308,24 @@ p {
270
308
  }
271
309
 
272
310
  .items-container::-webkit-scrollbar-track {
273
- background-color: #f0f2f5;
311
+ background-color: var(--ez-list__draggable-scrollbar--background-color-secondary);
274
312
  }
275
313
 
276
314
  .items-container::-webkit-scrollbar-thumb {
277
- background-color: var(--ez-list__draggable__scrollbar--background-color);
278
- border-radius: var(--ez-list__draggable__scrollbar--border-radius);
315
+ background-color: var(--ez-list__draggable-scrollbar--background-color-primary);
316
+ border-radius: var(--ez-list__draggable-scrollbar--border-radius);
279
317
  }
280
318
 
281
319
  .items-container::-webkit-scrollbar {
282
- background-color: #f0f2f5;
283
- width: var(--ez-list__draggable__scrollbar--width);
284
- max-width: var(--ez-list__draggable__scrollbar--width);
285
- min-width: var(--ez-list__draggable__scrollbar--width);
320
+ background-color: var(--ez-list__draggable-scrollbar--background-color-secondary);
321
+ width: var(--ez-list__draggable-scrollbar--width);
322
+ max-width: var(--ez-list__draggable-scrollbar--width);
323
+ min-width: var(--ez-list__draggable-scrollbar--width);
286
324
  }
287
325
 
288
326
  .group-overlay {
289
- font-family: var(--ez-list__group__overlay--font-family);
290
- font-size: var(--ez-list__group__overlay--font-size);
327
+ font-family: var(--ez-list__group-overlay--font-family);
328
+ font-size: var(--ez-list__group-overlay--font-size);
291
329
  background: rgba(226, 244, 239, 0.8);
292
330
  border: 1px solid #008561;
293
331
  border-radius: 8px;
@@ -318,8 +356,8 @@ p {
318
356
  }
319
357
 
320
358
  .selected-item {
321
- background: var(--ez-list__selected-item__background);
322
- border-radius: var(--ez-list__selected-item__border-radius);
359
+ background: var(--ez-list__selected-item--background-color);
360
+ border-radius: var(--ez-list__selected-item--border-radius);
323
361
  }
324
362
 
325
363
  .slot-item {
@@ -54,8 +54,8 @@
54
54
  .modal__content {
55
55
  display: flex;
56
56
  flex-wrap: wrap;
57
- /* Cálculo deve ser revisto pois foi feito apenas para lista de tarefas */
58
- max-height: calc(100% - 48px);
57
+ box-sizing: border-box;
58
+ max-height: 100%;
59
59
  height: 100%;
60
60
  overflow-y: auto;
61
61
  background-color: rgb(255, 255, 255);
@@ -3,6 +3,7 @@ import { Component, h, Event, Prop, Element, Method, Watch } from "@stencil/core
3
3
  import CSSVarsUtils from "../../utils/CSSVarsUtils";
4
4
  export class EzNumberInput {
5
5
  constructor() {
6
+ this._focused = false;
6
7
  /**
7
8
  * Deixa o campo disponível ou não para uso.
8
9
  */
@@ -24,66 +25,107 @@ export class EzNumberInput {
24
25
  async setBlur() {
25
26
  this._textInput.setBlur();
26
27
  }
28
+ /**
29
+ * Retorna informando se o campo está inválido (true | false)
30
+ */
31
+ async isInvalid() {
32
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
33
+ }
27
34
  observeLabel() {
28
35
  if (this._textInput) {
29
36
  this._textInput.label = this.label;
30
37
  }
31
38
  }
32
39
  observeErrorMessage() {
40
+ var _a;
33
41
  if (this._textInput) {
34
42
  this._textInput.errorMessage = this.errorMessage;
43
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
44
+ this.setInputValue();
45
+ }
35
46
  }
36
47
  }
37
- observeValue() {
38
- if (this._textInput) {
39
- this._textInput.value = this.getTextValue(this.value) || '';
48
+ observeValue(newValue, oldValue) {
49
+ if (this._textInput && newValue != oldValue) {
50
+ const newValueValidated = this.validateValue(newValue);
51
+ const oldValueValidated = this.validateValue(oldValue);
52
+ if (newValueValidated != oldValueValidated) {
53
+ const textValue = this.getTextValue(newValueValidated) || '';
54
+ if ((this._textInput.value || '') !== textValue) {
55
+ const parsedNumber = this.getParsedNumber(textValue);
56
+ if (parsedNumber !== undefined || !this._focused) {
57
+ this._textInput.value = textValue;
58
+ this._focused = false;
59
+ this.errorMessage = "";
60
+ }
61
+ }
62
+ const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
63
+ this.ezChange.emit(valueEmitted);
64
+ }
65
+ }
66
+ }
67
+ validateValue(value) {
68
+ return isNaN(value) || value === undefined ? null : value;
69
+ }
70
+ getTextValue(value) {
71
+ if (value != undefined) {
72
+ return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
40
73
  }
74
+ return undefined;
41
75
  }
42
76
  changeValue(newValue) {
43
77
  this.errorMessage = "";
44
- if (newValue !== this.value) {
45
- this.value = newValue;
46
- this.ezChange.emit(this.value);
47
- return true;
78
+ if (this.value != newValue) {
79
+ this.value = newValue === undefined ? null : newValue;
48
80
  }
49
81
  else {
50
- this.observeValue();
82
+ this.ezCancelWaitingChange.emit();
51
83
  }
52
- return false;
53
84
  }
54
- parseNumber() {
55
- const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : undefined;
85
+ setError(msg) {
86
+ this.value = null;
87
+ this.errorMessage = msg;
88
+ this.ezCancelWaitingChange.emit();
89
+ }
90
+ handleBlur() {
91
+ const parsedNumber = this.getParsedNumber();
56
92
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {
57
- this.ezCancelWaitingChange.emit();
58
- this.errorMessage = "O valor digitado não é um número válido";
93
+ this.setError("O valor digitado não é um número válido");
59
94
  }
60
95
  else {
61
96
  try {
62
- if (!this.changeValue(parsedNumber)) {
63
- this.ezCancelWaitingChange.emit();
64
- }
97
+ this.changeValue(parsedNumber);
65
98
  }
66
99
  catch (e) {
67
- this.ezCancelWaitingChange.emit();
68
- this.errorMessage = e.message;
100
+ this.setError(e.message);
69
101
  return;
70
102
  }
71
103
  }
72
104
  }
73
- getTextValue(value) {
74
- if (value) {
75
- return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
105
+ handleInput() {
106
+ const parsedNumber = this.getParsedNumber();
107
+ if (parsedNumber !== this.value) {
108
+ this._focused = true;
109
+ this.ezStartChange.emit({ waitmessage: "", blocking: false });
76
110
  }
77
- return undefined;
78
111
  }
79
- startChange() {
80
- this.ezStartChange.emit({ waitmessage: "", blocking: false });
112
+ getParsedNumber(value) {
113
+ var _a;
114
+ if (value === void 0) { value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value; }
115
+ return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
116
+ }
117
+ setInputValue() {
118
+ const textValue = this.getTextValue(this.value) || '';
119
+ if ((this._textInput.value || '') !== textValue) {
120
+ this._textInput.value = textValue;
121
+ }
81
122
  }
82
123
  componentDidLoad() {
83
124
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
125
+ this.setInputValue();
84
126
  }
85
127
  render() {
86
- return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onInput: () => this.startChange(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
128
+ return (h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
87
129
  }
88
130
  static get is() { return "ez-number-input"; }
89
131
  static get encapsulation() { return "shadow"; }
@@ -299,6 +341,22 @@ export class EzNumberInput {
299
341
  "text": "Remove o foco no componente de input",
300
342
  "tags": []
301
343
  }
344
+ },
345
+ "isInvalid": {
346
+ "complexType": {
347
+ "signature": "() => Promise<boolean>",
348
+ "parameters": [],
349
+ "references": {
350
+ "Promise": {
351
+ "location": "global"
352
+ }
353
+ },
354
+ "return": "Promise<boolean>"
355
+ },
356
+ "docs": {
357
+ "text": "Retorna informando se o campo est\u00E1 inv\u00E1lido (true | false)",
358
+ "tags": []
359
+ }
302
360
  }
303
361
  }; }
304
362
  static get elementRef() { return "_elem"; }
@@ -23,6 +23,11 @@ export class EzSearch {
23
23
  */
24
24
  this.mode = "regular";
25
25
  }
26
+ observeErrorMessage() {
27
+ if (this._comboElement) {
28
+ this._comboElement.errorMessage = this.errorMessage;
29
+ }
30
+ }
26
31
  observeValue() {
27
32
  if (this._comboElement) {
28
33
  this._comboElement.value = this.value;
@@ -40,16 +45,25 @@ export class EzSearch {
40
45
  async setBlur() {
41
46
  this._comboElement.setBlur();
42
47
  }
43
- onComboChange(evt) {
44
- evt.stopPropagation();
45
- this.value = evt.detail;
46
- this.ezChange.emit(evt.detail);
48
+ /**
49
+ * Retorna informando se o campo está inválido (true | false)
50
+ */
51
+ async isInvalid() {
52
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
53
+ }
54
+ onComboChange(event) {
55
+ event.stopPropagation();
56
+ this.value = event.detail;
57
+ this.ezChange.emit(event.detail);
58
+ if (this.errorMessage !== this._comboElement.errorMessage) {
59
+ this.errorMessage = this._comboElement.errorMessage;
60
+ }
47
61
  }
48
62
  componentDidLoad() {
49
63
  CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
50
64
  }
51
65
  render() {
52
- 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, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
66
+ 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: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
53
67
  }
54
68
  ;
55
69
  static get is() { return "ez-search"; }
@@ -295,10 +309,29 @@ export class EzSearch {
295
309
  "text": "Remove o foco no componente de pesquisa",
296
310
  "tags": []
297
311
  }
312
+ },
313
+ "isInvalid": {
314
+ "complexType": {
315
+ "signature": "() => Promise<boolean>",
316
+ "parameters": [],
317
+ "references": {
318
+ "Promise": {
319
+ "location": "global"
320
+ }
321
+ },
322
+ "return": "Promise<boolean>"
323
+ },
324
+ "docs": {
325
+ "text": "Retorna informando se o campo est\u00E1 inv\u00E1lido (true | false)",
326
+ "tags": []
327
+ }
298
328
  }
299
329
  }; }
300
330
  static get elementRef() { return "_elem"; }
301
331
  static get watchers() { return [{
332
+ "propName": "errorMessage",
333
+ "methodName": "observeErrorMessage"
334
+ }, {
302
335
  "propName": "value",
303
336
  "methodName": "observeValue"
304
337
  }]; }
@@ -67,7 +67,7 @@ textarea {
67
67
  resize: none;
68
68
  margin-top: calc(var(--space--medium, 12px) + 4px);
69
69
  width: 100%;
70
- font-weight: var(--text-weight--large, 600);
70
+ font-weight: var(--text-area--font-weight);
71
71
  font-family: var(--text-area--font-family);
72
72
  font-size: var(--text-area--font-size);
73
73
  color: var(--text-area--color);
@@ -73,6 +73,12 @@ export class EzTextArea {
73
73
  async setBlur() {
74
74
  this._inputElem.blur();
75
75
  }
76
+ /**
77
+ * Retorna informando se o campo está inválido (true | false)
78
+ */
79
+ async isInvalid() {
80
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
81
+ }
76
82
  //---------------------------------------------
77
83
  // Private methods
78
84
  //---------------------------------------------
@@ -134,7 +140,7 @@ export class EzTextArea {
134
140
  this.label && this.mode != "slim" ?
135
141
  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)
136
142
  : null,
137
- 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 })),
143
+ 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 })),
138
144
  this.canShowError && this.mode != "slim" &&
139
145
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
140
146
  }
@@ -336,6 +342,22 @@ export class EzTextArea {
336
342
  "text": "Remove o foco no componente de input",
337
343
  "tags": []
338
344
  }
345
+ },
346
+ "isInvalid": {
347
+ "complexType": {
348
+ "signature": "() => Promise<boolean>",
349
+ "parameters": [],
350
+ "references": {
351
+ "Promise": {
352
+ "location": "global"
353
+ }
354
+ },
355
+ "return": "Promise<boolean>"
356
+ },
357
+ "docs": {
358
+ "text": "Retorna informando se o campo est\u00E1 inv\u00E1lido (true | false)",
359
+ "tags": []
360
+ }
339
361
  }
340
362
  }; }
341
363
  static get elementRef() { return "_hostElement"; }
@@ -73,7 +73,6 @@ input {
73
73
  width: 100%;
74
74
  box-sizing: border-box;
75
75
  padding: var(--space--medium, 6px);
76
- font-weight: var(--text-weight--large, 600);
77
76
 
78
77
  /*public*/
79
78
  height: var(--ez-text-input--height);
@@ -84,6 +83,7 @@ input {
84
83
  border-color: var(--ez-text-input__input--border-color);
85
84
  background-color: var(--ez-text-input__input--background-color);
86
85
  color: var(--ez-text-input--color);
86
+ font-weight: var(--ez-text-input--font-weight);
87
87
  }
88
88
 
89
89
  input:disabled {