@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-76625.0 → 0.0.0-bugfix-dev-KB-83282.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cjs/ez-card-item_2.cjs.entry.js +7 -1415
  2. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +387 -0
  3. package/dist/cjs/ez-combo-box.cjs.entry.js +58 -184
  4. package/dist/cjs/ez-grid.cjs.entry.js +58 -0
  5. package/dist/cjs/ez-popover-core_2.cjs.entry.js +1504 -0
  6. package/dist/cjs/ez-search.cjs.entry.js +158 -28
  7. package/dist/cjs/ezui.cjs.js +1 -1
  8. package/dist/cjs/index-a7b0c73d.js +6 -6
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +2 -2
  11. package/dist/collection/components/ez-card-item/ez-card-item.css +3 -1
  12. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
  13. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
  14. package/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -250
  15. package/dist/collection/components/ez-combo-box/ez-combo-box.js +61 -194
  16. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +3 -0
  17. package/dist/collection/components/ez-grid/ez-grid.js +56 -1
  18. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +27 -33
  19. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +2 -2
  20. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +18 -77
  21. package/dist/collection/components/ez-search/ez-search.css +219 -0
  22. package/dist/collection/components/ez-search/ez-search.js +167 -28
  23. package/dist/custom-elements/index.d.ts +6 -6
  24. package/dist/custom-elements/index.js +468 -359
  25. package/dist/esm/ez-card-item_2.entry.js +7 -1415
  26. package/dist/esm/ez-combo-box-list_3.entry.js +381 -0
  27. package/dist/esm/ez-combo-box.entry.js +59 -185
  28. package/dist/esm/ez-grid.entry.js +59 -1
  29. package/dist/esm/ez-popover-core_2.entry.js +1499 -0
  30. package/dist/esm/ez-search.entry.js +159 -29
  31. package/dist/esm/ezui.js +1 -1
  32. package/dist/esm/index-baa5e267.js +6 -6
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/ezui/ezui.esm.js +1 -1
  35. package/dist/ezui/p-3a009184.entry.js +1 -0
  36. package/dist/ezui/{p-a5950a0d.entry.js → p-53116373.entry.js} +46 -46
  37. package/dist/ezui/p-58783dcf.entry.js +1 -0
  38. package/dist/ezui/p-65f471bc.entry.js +1 -0
  39. package/dist/ezui/p-7bd15498.entry.js +1 -0
  40. package/dist/ezui/p-f5931caa.entry.js +1 -0
  41. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
  42. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -16
  43. package/dist/types/components/ez-grid/ez-grid.d.ts +5 -0
  44. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +4 -5
  45. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +2 -12
  46. package/dist/types/components/ez-search/ez-search.d.ts +13 -3
  47. package/dist/types/components.d.ts +127 -66
  48. package/package.json +1 -1
  49. package/react/components.d.ts +1 -1
  50. package/react/components.js +1 -1
  51. package/react/components.js.map +1 -1
  52. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -236
  53. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +0 -184
  54. package/dist/cjs/searchFormatters-b7e1ed1e.js +0 -23
  55. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +0 -227
  56. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +0 -289
  57. package/dist/collection/components/ez-search/utils/searchFormatters.js +0 -18
  58. package/dist/esm/ez-custom-form-input_2.entry.js +0 -231
  59. package/dist/esm/ez-popover-plus_3.entry.js +0 -178
  60. package/dist/esm/searchFormatters-8229207e.js +0 -20
  61. package/dist/ezui/p-31da1b57.entry.js +0 -1
  62. package/dist/ezui/p-37201156.entry.js +0 -1
  63. package/dist/ezui/p-40a60148.js +0 -1
  64. package/dist/ezui/p-64b461b3.entry.js +0 -1
  65. package/dist/ezui/p-b7706b43.entry.js +0 -1
  66. package/dist/ezui/p-dc8b36c3.entry.js +0 -1
  67. package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +0 -23
  68. package/dist/types/components/ez-search/utils/searchFormatters.d.ts +0 -2
@@ -9,18 +9,18 @@ export class EzPopoverCore {
9
9
  this.overlayType = "light";
10
10
  this.anchorElement = undefined;
11
11
  this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
12
- this.useAnchorSize = false;
13
- this.minWidth = 150;
14
12
  }
15
- observeOpened(newValue, oldValue) {
16
- if (newValue !== oldValue) {
17
- if (newValue) {
18
- this.openPopover();
19
- }
20
- else {
21
- this.hidePopover();
22
- }
13
+ async observeOpened(newValue, oldValue) {
14
+ if (newValue === oldValue)
15
+ return;
16
+ if (newValue) {
17
+ this.openPopover();
23
18
  }
19
+ else {
20
+ this.hidePopover();
21
+ }
22
+ this.ezVisibilityChange.emit(newValue);
23
+ return;
24
24
  }
25
25
  /**
26
26
  * Atualiza a posição do popover.
@@ -79,37 +79,17 @@ export class EzPopoverCore {
79
79
  verticalGap: this.parseSizePixel(top, this.options.verticalGap),
80
80
  });
81
81
  }
82
- getElement(element) {
83
- if (typeof element === 'string') {
84
- return document.getElementById(element);
85
- }
86
- return element;
87
- }
88
- getAnchorElement() {
89
- if (!this.anchorElement) {
90
- return this._host;
91
- }
92
- if (Array.isArray(this.anchorElement)) {
93
- for (const element of this.anchorElement) {
94
- const htmlElement = this.getElement(element);
95
- if (htmlElement) {
96
- return htmlElement;
97
- }
98
- }
99
- }
100
- return this.getElement(this.anchorElement);
101
- }
102
82
  async updatePositionPopover() {
103
83
  if (!this._box || !this.opened) {
104
84
  return;
105
85
  }
106
- const currentAnchorElement = this.getAnchorElement();
107
- if (this.useAnchorSize) {
108
- const anchorSize = currentAnchorElement.getBoundingClientRect().width;
109
- const width = anchorSize < this.minWidth ? this.minWidth : anchorSize;
110
- this._box.style.width = `${width}px`;
86
+ if (!this.anchorElement) {
87
+ this.anchorElement = this._host;
88
+ }
89
+ if (typeof this.anchorElement === 'string') {
90
+ this.anchorElement = document.getElementById(this.anchorElement);
111
91
  }
112
- await computePosition(currentAnchorElement, this._box, {
92
+ await computePosition(this.anchorElement, this._box, {
113
93
  placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
114
94
  middleware: [flip(), shift({ padding: 5 })],
115
95
  strategy: 'fixed',
@@ -285,12 +265,9 @@ export class EzPopoverCore {
285
265
  "type": "string",
286
266
  "mutable": true,
287
267
  "complexType": {
288
- "original": "Array<HTMLElement | string> | HTMLElement | string",
289
- "resolved": "(string | HTMLElement)[] | HTMLElement | string",
268
+ "original": "HTMLElement | string",
269
+ "resolved": "HTMLElement | string",
290
270
  "references": {
291
- "Array": {
292
- "location": "global"
293
- },
294
271
  "HTMLElement": {
295
272
  "location": "global"
296
273
  }
@@ -324,42 +301,6 @@ export class EzPopoverCore {
324
301
  "text": "Define as op\u00E7\u00F5es do elemento."
325
302
  },
326
303
  "defaultValue": "{ horizontalGap: 0, verticalGap: 0, fromRight: false }"
327
- },
328
- "useAnchorSize": {
329
- "type": "boolean",
330
- "mutable": false,
331
- "complexType": {
332
- "original": "boolean",
333
- "resolved": "boolean",
334
- "references": {}
335
- },
336
- "required": false,
337
- "optional": false,
338
- "docs": {
339
- "tags": [],
340
- "text": "Define se o elemento manter\u00E1 o mesmo tamanho do componente de ancora."
341
- },
342
- "attribute": "use-anchor-size",
343
- "reflect": true,
344
- "defaultValue": "false"
345
- },
346
- "minWidth": {
347
- "type": "number",
348
- "mutable": false,
349
- "complexType": {
350
- "original": "number",
351
- "resolved": "number",
352
- "references": {}
353
- },
354
- "required": false,
355
- "optional": false,
356
- "docs": {
357
- "tags": [],
358
- "text": "Define a largura m\u00EDnima do elemento (apenas ser\u00E1 considerada caso a propriedade useAnchorSize seja verdadeira)."
359
- },
360
- "attribute": "min-width",
361
- "reflect": true,
362
- "defaultValue": "150"
363
304
  }
364
305
  };
365
306
  }
@@ -56,12 +56,36 @@
56
56
  /*@doc Define a cor do label.*/
57
57
  --ez-search__label--color: var(--title--primary, #2B3A54);
58
58
 
59
+ /* list */
60
+ /*@doc Define a cor do texto da lista de opções.*/
61
+ --ez-search__list-title--primary: var(--title--primary, #2B3A54);
62
+ /*@doc Define a cor do texto do value da lista de opções.*/
63
+ --ez-search__list-text--primary: var(--text--primary, #626e82);
64
+ /*@doc Define a altura do box da lista de opções.*/
65
+ --ez-search__list-height: calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);
66
+ /*@doc Define a largura mínima da lista de opções.*/
67
+ --ez-search__list-min-width: 64px;
68
+
59
69
  /* espaçamento */
60
70
  /*@doc Define um espaçamento mediano entre elementos do componente.*/
61
71
  --ez-search--space--medium: var(--space--medium, 12px);
62
72
  /*@doc Define um espaçamento pequeno entre elementos do componente.*/
63
73
  --ez-search--space--small: var(--space--small, 6px);
64
74
 
75
+ /* scrollbar */
76
+ /*@doc Define a cor da barra de rolagem do componente.*/
77
+ --ez-search__scrollbar--color-default: var(--scrollbar--default, #626e82);
78
+ /*@doc Define a cor de fundo da barra de rolagem do componente.*/
79
+ --ez-search__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);
80
+ /*@doc Define a cor do hover na barra de rolagem do componente.*/
81
+ --ez-search__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);
82
+ /*@doc Define a cor do active na barra de rolagem do componente.*/
83
+ --ez-search__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);
84
+ /*@doc Define o raio da borda da barra de rolagem do componente.*/
85
+ --ez-search__scrollbar--border-radius: var(--border--radius-small, 6px);
86
+ /*@doc Define a largura da barra de rolagem do componente.*/
87
+ --ez-search__scrollbar--width: var(--space--small, 6px);
88
+
65
89
  /***************
66
90
  host style
67
91
  ***************/
@@ -88,6 +112,182 @@ ez-icon {
88
112
  --ez-text-input__input--disabled--color: var(--title--primary, #2B3A54);
89
113
  }
90
114
 
115
+ .list-container {
116
+ /*public*/
117
+ min-width: var(--ez-search__list-min-width);
118
+ overflow: auto;
119
+
120
+ /*private*/
121
+ position: relative;
122
+ width: 100%;
123
+ }
124
+
125
+ .list-wrapper {
126
+ display: flex;
127
+ flex-direction: column;
128
+ box-sizing: border-box;
129
+ width: 0;
130
+
131
+ /*public*/
132
+ z-index: var(--more-visible, 2);
133
+ max-height: 350px;
134
+ min-width: 150px;
135
+ background-color: var(--ez-search--background-color--xlight);
136
+ border-radius: var(--ez-search--border-radius);
137
+ box-shadow: var(--shadow, 0px 0px 16px 0px #000);
138
+ }
139
+
140
+ .list-options {
141
+ margin-top: 0px;
142
+ box-sizing: border-box;
143
+ width: 100%;
144
+ height: 100%;
145
+ padding: 0;
146
+ display: flex;
147
+ flex-direction: column;
148
+ scroll-behavior: smooth;
149
+ overflow-y: auto;
150
+ overflow-x: hidden;
151
+ scrollbar-width: thin;
152
+
153
+ /*public*/
154
+ scrollbar-color: var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background);
155
+
156
+ }
157
+
158
+ .list-options::-webkit-scrollbar {
159
+ /*public*/
160
+ background-color: var(--scrollbar--background);
161
+ width: var(--space--small);
162
+ max-width: var(--space--small);
163
+ min-width: var(--space--small);
164
+ height: var(--space--small);
165
+ max-height: var(--space--small);
166
+ min-height: var(--space--small);
167
+ }
168
+
169
+ .list-options::-webkit-scrollbar-track {
170
+ /*public*/
171
+ background-color: var(--ez-search__scrollbar--color-background);
172
+ border-radius: var(--ez-search__scrollbar--border-radius);
173
+ }
174
+
175
+ .list-options::-webkit-scrollbar-thumb {
176
+ /*public*/
177
+ background-color: var(--ez-search__scrollbar--color-default);
178
+ border-radius: var(--ez-search__scrollbar--border-radius);
179
+ }
180
+
181
+ .list-options::-webkit-scrollbar-thumb:vertical:hover,
182
+ .list-options::-webkit-scrollbar-thumb:horizontal:hover {
183
+ /*public*/
184
+ background-color: var(--ez-search__scrollbar--color-hover);
185
+ }
186
+
187
+ .list-options::-webkit-scrollbar-thumb:vertical:active,
188
+ .list-options::-webkit-scrollbar-thumb:horizontal:active {
189
+ /*public*/
190
+ background-color: var(--ez-search__scrollbar--color-clicked);
191
+ }
192
+
193
+ .item {
194
+ display: flex;
195
+ align-items: center;
196
+ width: 100%;
197
+ box-sizing: border-box;
198
+ list-style-type: none;
199
+ cursor: pointer;
200
+
201
+ /*public*/
202
+ border-radius: var(--ez-search--border-radius-small);
203
+ gap: var(--space--small, 6px);
204
+ }
205
+
206
+ .item__value,
207
+ .item__label {
208
+ flex-basis: auto;
209
+ white-space: nowrap;
210
+ overflow: hidden;
211
+ text-overflow: ellipsis;
212
+
213
+ /*public*/
214
+ color: var(--ez-search__list-title--primary);
215
+ font-family: var(--ez-search--font-family);
216
+ font-size: var(--ez-search--font-size);
217
+ line-height: var(--ez-search--line-height);
218
+ }
219
+
220
+ .item__label {
221
+ /*public*/
222
+ font-weight: var(--ez-search--font-weight--medium);
223
+ }
224
+
225
+ .item__label--bold {
226
+ /*public*/
227
+ font-weight: var(--ez-search--font-weight--large);
228
+ }
229
+
230
+ .item__value {
231
+ text-align: center;
232
+
233
+ /*public*/
234
+ color: var(--ez-search__list-text--primary);
235
+ font-weight: var(--ez-search--font-weight--large);
236
+ }
237
+
238
+ .item__value--hidden {
239
+ visibility: hidden;
240
+ position: absolute;
241
+ white-space: nowrap;
242
+ z-index: -1;
243
+ top: 0;
244
+ left: 0;
245
+ }
246
+
247
+ .item__label {
248
+ text-align: left;
249
+ }
250
+
251
+ .message {
252
+ text-align: center;
253
+ display: flex;
254
+ justify-content: center;
255
+ align-items: center;
256
+ list-style-type: none;
257
+
258
+ /*public*/
259
+ min-height: var(--ez-search__list-height);
260
+ }
261
+
262
+ .message__no-result {
263
+ /*public*/
264
+ color: var(--ez-search__list-title--primary);
265
+ font-family: var(--ez-search--font-family);
266
+ font-size: var(--ez-search--font-size);
267
+ }
268
+
269
+ .message__loading {
270
+ border-radius: 50%;
271
+ width: 14px;
272
+ height: 14px;
273
+ -webkit-animation: spin 1s linear infinite;
274
+ animation: spin 1s linear infinite;
275
+
276
+ /*public*/
277
+ border: 3px solid var(--ez-search__list-title--primary);
278
+ border-top: 3px solid transparent;
279
+ }
280
+
281
+ .item__list > li:hover {
282
+ /*public*/
283
+ background-color: var(--ez-search--background-medium);
284
+ }
285
+
286
+ .preselected {
287
+ /*public*/
288
+ background-color: var(--background--medium);
289
+ }
290
+
91
291
  .btn {
92
292
  outline: none;
93
293
  border: none;
@@ -123,4 +323,23 @@ ez-icon {
123
323
 
124
324
  ez-text-input:hover .btn__close, ez-text-input:focus .btn__close {
125
325
  visibility: visible;
326
+ }
327
+
328
+
329
+ @-webkit-keyframes spin {
330
+ 0% { -webkit-transform: rotate(0deg); }
331
+ 100% { -webkit-transform: rotate(360deg); }
332
+ }
333
+
334
+ @keyframes spin {
335
+ 0% { transform: rotate(0deg); }
336
+ 100% { transform: rotate(360deg); }
337
+ }
338
+
339
+ @supports not (scrollbar-width: thin) {
340
+ /* Estilos para navegadores que NÃO suportam scrollbar-width */
341
+ .item {
342
+ /* Estilos alternativos, por exemplo, para navegadores que não suportam scrollbar-width */
343
+ padding-right: 8px;
344
+ }
126
345
  }