@sankhyalabs/ezui 5.20.0-dev.2 → 5.20.0-dev.4

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 (62) hide show
  1. package/README.md +4 -5
  2. package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
  3. package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +155 -11
  5. package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
  6. package/dist/cjs/ez-form-view.cjs.entry.js +4 -2
  7. package/dist/cjs/ez-grid.cjs.entry.js +3 -3
  8. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-search.cjs.entry.js +31 -611
  10. package/dist/cjs/ez-split-panel.cjs.entry.js +3 -2
  11. package/dist/cjs/ezui.cjs.js +1 -1
  12. package/dist/cjs/index-a7b0c73d.js +6 -2
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
  16. package/dist/collection/components/ez-card-item/ez-card-item.css +0 -16
  17. package/dist/collection/components/ez-combo-box/ez-combo-box.js +173 -12
  18. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
  19. package/dist/collection/components/ez-grid/ez-grid.css +1 -0
  20. package/dist/collection/components/ez-grid/ez-grid.js +2 -2
  21. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  22. package/dist/collection/components/ez-search/ez-search.css +0 -330
  23. package/dist/collection/components/ez-search/ez-search.js +55 -689
  24. package/dist/collection/components/ez-split-panel/ez-split-panel.css +7 -0
  25. package/dist/collection/components/ez-split-panel/ez-split-panel.js +19 -1
  26. package/dist/custom-elements/index.js +240 -665
  27. package/dist/esm/ez-alert-list.entry.js +33 -28
  28. package/dist/esm/ez-card-item.entry.js +48 -0
  29. package/dist/esm/ez-combo-box.entry.js +156 -12
  30. package/dist/esm/ez-filter-input_2.entry.js +132 -0
  31. package/dist/esm/ez-form-view.entry.js +4 -2
  32. package/dist/esm/ez-grid.entry.js +3 -3
  33. package/dist/esm/ez-icon.entry.js +1 -1
  34. package/dist/esm/ez-search.entry.js +33 -613
  35. package/dist/esm/ez-split-panel.entry.js +3 -2
  36. package/dist/esm/ezui.js +1 -1
  37. package/dist/esm/index-baa5e267.js +6 -2
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/ezui/ezui.esm.js +1 -1
  40. package/dist/ezui/p-05f5a778.entry.js +1 -0
  41. package/dist/ezui/p-13dbad96.entry.js +1 -0
  42. package/dist/ezui/p-5613fe63.entry.js +1 -0
  43. package/dist/ezui/p-60848ef6.entry.js +1 -0
  44. package/dist/ezui/{p-6e2f8e6b.entry.js → p-844ee673.entry.js} +1 -1
  45. package/dist/ezui/{p-f56dd1da.entry.js → p-93c3df4f.entry.js} +1 -1
  46. package/dist/ezui/p-940ed30b.entry.js +1 -0
  47. package/dist/ezui/p-a32aaac6.entry.js +1 -0
  48. package/dist/ezui/p-a5ac7151.entry.js +1 -0
  49. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
  50. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -0
  51. package/dist/types/components/ez-search/ez-search.d.ts +10 -100
  52. package/dist/types/components.d.ts +22 -23
  53. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +1 -2
  54. package/package.json +16 -8
  55. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -182
  56. package/dist/esm/ez-card-item_3.entry.js +0 -176
  57. package/dist/ezui/p-133fae4a.entry.js +0 -1
  58. package/dist/ezui/p-43b03119.entry.js +0 -1
  59. package/dist/ezui/p-4a7f113d.entry.js +0 -1
  60. package/dist/ezui/p-76ba9d67.entry.js +0 -1
  61. package/dist/ezui/p-796c1a88.entry.js +0 -1
  62. package/dist/ezui/p-ba875f37.entry.js +0 -1
@@ -1,6 +1,7 @@
1
- import { ElementIDUtils, FloatingManager, ObjectUtils } from "@sankhyalabs/core";
1
+ import { ElementIDUtils, FloatingManager, ObjectUtils, StringUtils } from "@sankhyalabs/core";
2
2
  import { h, Host } from "@stencil/core";
3
- import { CSSVarsUtils } from "../../utils";
3
+ import { ApplicationUtils, CSSVarsUtils } from "../../utils";
4
+ import { REQUIRED_INFO } from "../../utils/constants";
4
5
  export class EzComboBox {
5
6
  constructor() {
6
7
  this._changeDeboucingTimeout = null;
@@ -8,6 +9,7 @@ export class EzComboBox {
8
9
  this._maxWidthValue = 0;
9
10
  this._tabPressed = false;
10
11
  this._textEmptyList = "Nenhum resultado encontrado";
12
+ this._textEmptySearch = "Nenhum resultado de {0} encontrado";
11
13
  this._lookupMode = false;
12
14
  this._preSelection = undefined;
13
15
  this._visibleOptions = undefined;
@@ -20,6 +22,7 @@ export class EzComboBox {
20
22
  this.enabled = true;
21
23
  this.options = undefined;
22
24
  this.errorMessage = undefined;
25
+ this.searchMode = undefined;
23
26
  this.showSelectedValue = false;
24
27
  this.showOptionValue = false;
25
28
  this.suppressSearch = false;
@@ -43,7 +46,7 @@ export class EzComboBox {
43
46
  observeValue(newValue, oldValue) {
44
47
  if (this._textInput && newValue != oldValue) {
45
48
  try {
46
- if (typeof newValue === "string") {
49
+ if (this.searchMode && typeof newValue === "string") {
47
50
  this.setInputValue();
48
51
  return;
49
52
  }
@@ -206,7 +209,7 @@ export class EzComboBox {
206
209
  }
207
210
  updateVisibleOptions() {
208
211
  let opts = this._source || [];
209
- if (this._criteria) {
212
+ if (!this.searchMode && this._criteria) {
210
213
  const upperCriteria = this._criteria.toUpperCase();
211
214
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
212
215
  }
@@ -281,7 +284,7 @@ export class EzComboBox {
281
284
  return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
282
285
  }
283
286
  nextOption() {
284
- if (!this.isOptionsVisible()) {
287
+ if (this.searchMode && !this.isOptionsVisible()) {
285
288
  return;
286
289
  }
287
290
  this.showOptions();
@@ -304,6 +307,9 @@ export class EzComboBox {
304
307
  this.selectOption(this._visibleOptions[this._preSelection]);
305
308
  this._preSelection = undefined;
306
309
  }
310
+ else {
311
+ this.controlListWithOnlyOne();
312
+ }
307
313
  }
308
314
  updateSource(source) {
309
315
  this._startLoading = false;
@@ -322,6 +328,7 @@ export class EzComboBox {
322
328
  this.updateVisibleOptions();
323
329
  if (this._tabPressed) {
324
330
  this._tabPressed = false;
331
+ this.controlEmptySearch();
325
332
  }
326
333
  }
327
334
  else {
@@ -329,6 +336,10 @@ export class EzComboBox {
329
336
  }
330
337
  }
331
338
  }
339
+ clearSource() {
340
+ this._source = [];
341
+ this.updateVisibleOptions();
342
+ }
332
343
  selectOption(newOption) {
333
344
  var _a, _b;
334
345
  const currentValue = this.getSelectedOption(this.value);
@@ -340,6 +351,10 @@ export class EzComboBox {
340
351
  else {
341
352
  this.resetOptions();
342
353
  }
354
+ if (this.searchMode) {
355
+ this._visibleOptions = [];
356
+ this.clearSource();
357
+ }
343
358
  }
344
359
  loadOptions(mode, argument = "") {
345
360
  this._criteria = argument;
@@ -375,6 +390,93 @@ export class EzComboBox {
375
390
  clearSearch() {
376
391
  this.value = null;
377
392
  }
393
+ controlListWithOnlyOne() {
394
+ var _a;
395
+ if (this.searchMode) {
396
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
397
+ if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
398
+ this.selectOption(source[0]);
399
+ }
400
+ }
401
+ }
402
+ controlEmptySearch() {
403
+ var _a;
404
+ if (this.searchMode) {
405
+ if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
406
+ this.clearSearch();
407
+ ApplicationUtils.info(this._textEmptyList);
408
+ }
409
+ else {
410
+ this.controlListWithOnlyOne();
411
+ }
412
+ }
413
+ }
414
+ validateDescriptionValue() {
415
+ if (!this.searchMode || StringUtils.isEmpty(this.value)) {
416
+ return;
417
+ }
418
+ let value = this.value;
419
+ if (typeof value === "object") {
420
+ return;
421
+ }
422
+ if (StringUtils.isEmpty(value)) {
423
+ return;
424
+ }
425
+ this.loadDescriptionValue(value);
426
+ }
427
+ async loadDescriptionValue(argument) {
428
+ var _a, _b;
429
+ if (argument == undefined) {
430
+ return;
431
+ }
432
+ if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
433
+ this.loadOptionValue(argument);
434
+ return;
435
+ }
436
+ const searchArgument = {
437
+ mode: SearchMode.PREDICTIVE,
438
+ argument
439
+ };
440
+ const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
441
+ if (source == undefined) {
442
+ return;
443
+ }
444
+ if (source instanceof Promise) {
445
+ source.then((result) => {
446
+ this.setDescriptionValue(result);
447
+ });
448
+ }
449
+ else {
450
+ this.setDescriptionValue(source);
451
+ }
452
+ }
453
+ setDescriptionValue(source) {
454
+ const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
455
+ if (value == undefined || !Object.keys(value).length) {
456
+ this.showNoResultMessage();
457
+ return;
458
+ }
459
+ this._lookupMode = true;
460
+ this.value = value;
461
+ }
462
+ loadOptionValue(argument) {
463
+ var _a;
464
+ const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
465
+ if (source != undefined) {
466
+ this.selectOption(source);
467
+ }
468
+ else {
469
+ this.showNoResultMessage();
470
+ }
471
+ }
472
+ async showNoResultMessage() {
473
+ this.clearSearch();
474
+ ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
475
+ }
476
+ getFieldLabel() {
477
+ var _a;
478
+ return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
479
+ }
378
480
  resetOptions() {
379
481
  this.hideOptions();
380
482
  this._criteria = undefined;
@@ -400,7 +502,12 @@ export class EzComboBox {
400
502
  });
401
503
  }
402
504
  }
403
- this.loadOptions(SearchMode.PRELOAD);
505
+ if (this.searchMode) {
506
+ this.updateSource([]);
507
+ }
508
+ else {
509
+ this.loadOptions(SearchMode.PRELOAD);
510
+ }
404
511
  }
405
512
  componentDidRender() {
406
513
  var _a;
@@ -410,6 +517,7 @@ export class EzComboBox {
410
517
  (_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
411
518
  ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
412
519
  });
520
+ this.validateDescriptionValue();
413
521
  }
414
522
  componentDidLoad() {
415
523
  CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
@@ -429,7 +537,13 @@ export class EzComboBox {
429
537
  // Event handlers
430
538
  //---------------------------------------------
431
539
  handlerIconClick() {
432
- this.showOptions();
540
+ this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
541
+ }
542
+ buildNumberArgument(argument) {
543
+ if (this.isTextSearch) {
544
+ return NaN;
545
+ }
546
+ return Number(argument || undefined);
433
547
  }
434
548
  onTextInputChangeHandler(event) {
435
549
  var _a;
@@ -446,12 +560,36 @@ export class EzComboBox {
446
560
  }
447
561
  this._criteria = argument;
448
562
  if (argument) {
449
- this.updateVisibleOptions();
450
- this.showOptions();
563
+ if (this.searchMode) {
564
+ this._showLoading = false;
565
+ this.clearSource();
566
+ const enoughChars = argument.length >= this.limitCharsToSearch;
567
+ const argumentNumber = this.buildNumberArgument(argument);
568
+ if (enoughChars || !isNaN(argumentNumber)) {
569
+ this._showLoading = true;
570
+ this._changeDeboucingTimeout = window.setTimeout(() => {
571
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
572
+ }, this._deboucingTime);
573
+ this.showOptions();
574
+ }
575
+ else {
576
+ this.hideOptions();
577
+ }
578
+ }
579
+ else {
580
+ this.updateVisibleOptions();
581
+ this.showOptions();
582
+ }
451
583
  }
452
584
  else {
453
585
  this.hideOptions();
454
- this.updateVisibleOptions();
586
+ if (this.searchMode) {
587
+ this._showLoading = false;
588
+ this.clearSource();
589
+ }
590
+ else {
591
+ this.updateVisibleOptions();
592
+ }
455
593
  }
456
594
  }
457
595
  clearDeboucingTimeout() {
@@ -461,7 +599,9 @@ export class EzComboBox {
461
599
  }
462
600
  }
463
601
  onTextInputClickHandler() {
464
- this.showOptions();
602
+ if (!this.searchMode) {
603
+ this.showOptions();
604
+ }
465
605
  }
466
606
  keyDownHandler(event) {
467
607
  this._tabPressed = false;
@@ -493,6 +633,7 @@ export class EzComboBox {
493
633
  break;
494
634
  case "Tab":
495
635
  this._tabPressed = true;
636
+ this.controlListWithOnlyOne();
496
637
  break;
497
638
  }
498
639
  //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
@@ -509,8 +650,11 @@ export class EzComboBox {
509
650
  return !this._showLoading && this._visibleOptions.length > 0;
510
651
  }
511
652
  render() {
653
+ var _a;
512
654
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
513
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
655
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
656
+ ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
657
+ : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
514
658
  && this._visibleOptions.length === 0
515
659
  && h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
516
660
  && h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
@@ -644,6 +788,23 @@ export class EzComboBox {
644
788
  "attribute": "error-message",
645
789
  "reflect": true
646
790
  },
791
+ "searchMode": {
792
+ "type": "boolean",
793
+ "mutable": false,
794
+ "complexType": {
795
+ "original": "boolean",
796
+ "resolved": "boolean",
797
+ "references": {}
798
+ },
799
+ "required": false,
800
+ "optional": false,
801
+ "docs": {
802
+ "tags": [],
803
+ "text": "Se true ativa o modo pesquisa do ez-combo-box."
804
+ },
805
+ "attribute": "search-mode",
806
+ "reflect": false
807
+ },
647
808
  "showSelectedValue": {
648
809
  "type": "boolean",
649
810
  "mutable": false,
@@ -3,9 +3,11 @@ import { ObjectUtils } from "@sankhyalabs/core";
3
3
  export const buildFile = ({ name, label, readOnly, contextName, props }) => {
4
4
  const uploadProps = ObjectUtils.removeEmptyValues({
5
5
  subTitle: props.subTitle,
6
- requestHeaders: props.STORAGESTRATEGY ? {
6
+ requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
7
7
  STORAGESTRATEGY: props.STORAGESTRATEGY
8
- } : null
8
+ })), (props.INTERNAL_FILENAME && {
9
+ INTERNAL_FILENAME: props.INTERNAL_FILENAME
10
+ })),
9
11
  });
10
12
  return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
11
13
  };
@@ -4,6 +4,7 @@
4
4
  grid-template-rows: auto 1fr auto;
5
5
  height: 100%;
6
6
  width: 100%;
7
+ min-height: 300px;
7
8
 
8
9
  /*public*/
9
10
  /*@doc Define a cor de fundo do header do componente.*/
@@ -7,9 +7,9 @@ import { ApplicationUtils } from '../../utils';
7
7
  import InMemoryFilterColumnDataSource from './utils/InMemoryFilterColumnDataSource';
8
8
  const windowInstace = window;
9
9
  const matches = (text, filter) => {
10
- const normalizedText = StringUtils.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
10
+ const normalizedText = StringUtils.replaceAccentuatedCharsLower(text === null || text === void 0 ? void 0 : text.toLocaleLowerCase());
11
11
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
12
- return normalizedText.includes(normalizedFilter);
12
+ return normalizedText === null || normalizedText === void 0 ? void 0 : normalizedText.includes(normalizedFilter);
13
13
  };
14
14
  export class EzGrid {
15
15
  constructor() {
@@ -64,7 +64,7 @@ svg {
64
64
  .ez-icon-alert-mail:before { content: "\ea08"; }
65
65
  .ez-icon-alert-popup:before { content: "\ea09"; }
66
66
  .ez-icon-anexo:before { content: "\ea0a"; }
67
- .ez-icon-antecipação:before { content: "\ea0b"; }
67
+ .ez-icon-antecipacao:before { content: "\ea0b"; }
68
68
  .ez-icon-apps:before { content: "\ea0c"; }
69
69
  .ez-icon-arrow-forward:before { content: "\ea0d"; }
70
70
  .ez-icon-arrow-upward:before { content: "\ea0e"; }
@@ -1,333 +1,3 @@
1
1
  :host {
2
- /* dimensions */
3
- /*@doc Define altura do input.*/
4
- --ez-search--height: 42px;
5
- /*@doc Define largura do input.*/
6
- --ez-search--width: 100%;
7
- /*@doc Define largura do slot do ícone do input.*/
8
- --ez-search__icon--width: 48px;
9
-
10
- /* general */
11
- /*@doc Define o raio da borda do input.*/
12
- --ez-search--border-radius: var(--border--radius-medium, 12px);
13
- /*@doc Define o raio da borda do input quando pequeno.*/
14
- --ez-search--border-radius-small: var(--border--radius-small, 6px);
15
- /*@doc Define o tamanho da fonte dentro do input.*/
16
- --ez-search--font-size: var(--text--medium, 14px);
17
- /*@doc Define a família da fonte dentro do input.*/
18
- --ez-search--font-family: var(--font-pattern, Arial);
19
- /*@doc Define o peso da fonte dentro do input quando pesada.*/
20
- --ez-search--font-weight--large: var(--text-weight--large, 500);
21
- /*@doc Define o peso da fonte dentro do input quando média.*/
22
- --ez-search--font-weight--medium: var(--text-weight--medium, 400);
23
- /*@doc Define a cor de fundo da lista de opções.*/
24
- --ez-search--background-color--xlight: var(--background--xlight, #fff);
25
- /*@doc Define a cor de fundo dos itens da lista de opções.*/
26
- --ez-search--background-medium: var(--background--medium, #f0f3f7);
27
- /*@doc Define a altura da linha do texto dentro do input.*/
28
- --ez-search--line-height: calc(var(--text--medium, 14px) + 4px);
29
-
30
- /* input */
31
- /*@doc Define a cor de fundo do input.*/
32
- --ez-search__input--background-color: var(--background--medium, #e0e0e0);
33
- /*@doc Define o estilo da borda do input.*/
34
- --ez-search__input--border: var(--border--medium, 2px solid);
35
- /*@doc Define a cor da borda do input.*/
36
- --ez-search__input--border-color: var(--ez-search__input--background-color);
37
- /*no modo normal usamos a borda com a mesma cor do bg*/
38
- /*@doc Define a cor da borda do input quando focado.*/
39
- --ez-search__input--focus--border-color: var(--color--primary, #008561);
40
- /*@doc Define a cor de fundo do input quando desabilitado.*/
41
- --ez-search__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
42
- /*@doc Define a cor do texto dentro do input quando desabilitado.*/
43
- --ez-search__input--disabled--color: var(--text--disable, #AFB6C0);
44
- /*@doc Define a cor da borda do input quando com erro.*/
45
- --ez-search__input--error--border-color: #CC2936;
46
-
47
- /* buttons */
48
- /*@doc Define a cor do botão de pesquisa do componente.*/
49
- --ez-search__btn--color: var(--title--primary, #2B3A54);
50
- /*@doc Define a cor do botão de pesquisa do componente quando desabilitado.*/
51
- --ez-search__btn-disabled--color: var(--text--disable, #AFB6C0);
52
- /*@doc Define a cor do botão de pesquisa do componente quando o mouse está sobre ele.*/
53
- --ez-search__btn-hover--color: var(--color--primary, #4e4e4e);
54
-
55
- /* label */
56
- /*@doc Define a cor do label.*/
57
- --ez-search__label--color: var(--title--primary, #2B3A54);
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
-
69
- /* espaçamento */
70
- /*@doc Define um espaçamento mediano entre elementos do componente.*/
71
- --ez-search--space--medium: var(--space--medium, 12px);
72
- /*@doc Define um espaçamento pequeno entre elementos do componente.*/
73
- --ez-search--space--small: var(--space--small, 6px);
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--medium, 12px);
88
-
89
- /***************
90
- host style
91
- ***************/
92
- /*private*/
93
- display: flex;
94
- flex-wrap: wrap;
95
- position: relative;
96
-
97
- /*public*/
98
- width: var(--ez-search--width);
99
- }
100
-
101
- ez-icon {
102
- --ez-icon--color: inherit;
103
-
104
- /*public*/
105
- font-weight: var(--text-weight--large, 600);
106
- }
107
-
108
- .suppressed-search-input{
109
- /*public*/
110
- --ez-text-input__input--border-color: var(--color--strokes, #dce0e8);
111
- --ez-text-input__input--disabled--background-color: var(--background--xlight, #fff);
112
- --ez-text-input__input--disabled--color: var(--title--primary, #2B3A54);
113
- }
114
-
115
- .list-container {
116
- /*public*/
117
- min-width: var(--ez-search__list-min-width);
118
-
119
- /*private*/
120
- position: relative;
121
2
  width: 100%;
122
- }
123
-
124
- .list-wrapper {
125
- display: flex;
126
- flex-direction: column;
127
- box-sizing: border-box;
128
- width: 0;
129
-
130
- /*public*/
131
- z-index: var(--more-visible, 2);
132
- max-height: 350px;
133
- background-color: var(--ez-search--background-color--xlight);
134
- border-radius: var(--ez-search--border-radius);
135
- box-shadow: var(--shadow, 0px 0px 16px 0px #000);
136
- padding: var(--ez-search--space--small);
137
- }
138
-
139
- .list-options {
140
- box-sizing: border-box;
141
- width: 100%;
142
- height: 100%;
143
- padding: 0;
144
- display: flex;
145
- flex-direction: column;
146
- scroll-behavior: smooth;
147
- overflow: auto;
148
- scrollbar-width: thin;
149
- gap: 3px;
150
-
151
- /*public*/
152
- scrollbar-color: var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background);
153
- }
154
-
155
- .list-options::-webkit-scrollbar {
156
- /*public*/
157
- background-color: var(--ez-search__scrollbar--color-background);
158
- width: var(--ez-search__scrollbar--width);
159
- max-width: var(--ez-search__scrollbar--width);
160
- min-width: var(--ez-search__scrollbar--width);
161
- }
162
-
163
- .list-options::-webkit-scrollbar-track {
164
- /*public*/
165
- background-color: var(--ez-search__scrollbar--color-background);
166
- border-radius: var(--ez-search__scrollbar--border-radius);
167
- }
168
-
169
- .list-options::-webkit-scrollbar-thumb {
170
- /*public*/
171
- background-color: var(--ez-search__scrollbar--color-default);
172
- border-radius: var(--ez-search__scrollbar--border-radius);
173
- }
174
-
175
- .list-options::-webkit-scrollbar-thumb:vertical:hover,
176
- .list-options::-webkit-scrollbar-thumb:horizontal:hover {
177
- /*public*/
178
- background-color: var(--ez-search__scrollbar--color-hover);
179
- }
180
-
181
- .list-options::-webkit-scrollbar-thumb:vertical:active,
182
- .list-options::-webkit-scrollbar-thumb:horizontal:active {
183
- /*public*/
184
- background-color: var(--ez-search__scrollbar--color-clicked);
185
- }
186
-
187
- .item {
188
- display: flex;
189
- align-items: center;
190
- width: 100%;
191
- box-sizing: border-box;
192
- list-style-type: none;
193
- cursor: pointer;
194
-
195
- /*public*/
196
- border-radius: var(--ez-search--border-radius-small);
197
- padding: var(--ez-search--space--small);
198
- min-height: var(--ez-search__list-height);
199
- gap: var(--space--small, 6px);
200
- }
201
-
202
- .item__value,
203
- .item__label {
204
- flex-basis: auto;
205
- white-space: nowrap;
206
- overflow: hidden;
207
- text-overflow: ellipsis;
208
-
209
- /*public*/
210
- color: var(--ez-search__list-title--primary);
211
- font-family: var(--ez-search--font-family);
212
- font-size: var(--ez-search--font-size);
213
- line-height: var(--ez-search--line-height);
214
- }
215
-
216
- .item__label {
217
- /*public*/
218
- font-weight: var(--ez-search--font-weight--medium);
219
- }
220
-
221
- .item__label--bold {
222
- /*public*/
223
- font-weight: var(--ez-search--font-weight--large);
224
- }
225
-
226
- .item__value {
227
- text-align: center;
228
-
229
- /*public*/
230
- color: var(--ez-search__list-text--primary);
231
- font-weight: var(--ez-search--font-weight--large);
232
- }
233
-
234
- .item__value--hidden {
235
- visibility: hidden;
236
- position: absolute;
237
- white-space: nowrap;
238
- z-index: -1;
239
- top: 0;
240
- left: 0;
241
- }
242
-
243
- .item__label {
244
- text-align: left;
245
- }
246
-
247
- .message {
248
- text-align: center;
249
- display: flex;
250
- justify-content: center;
251
- align-items: center;
252
- list-style-type: none;
253
-
254
- /*public*/
255
- min-height: var(--ez-search__list-height);
256
- }
257
-
258
- .message__no-result {
259
- /*public*/
260
- color: var(--ez-search__list-title--primary);
261
- font-family: var(--ez-search--font-family);
262
- font-size: var(--ez-search--font-size);
263
- }
264
-
265
- .message__loading {
266
- border-radius: 50%;
267
- width: 14px;
268
- height: 14px;
269
- -webkit-animation: spin 1s linear infinite;
270
- animation: spin 1s linear infinite;
271
-
272
- /*public*/
273
- border: 3px solid var(--ez-search__list-title--primary);
274
- border-top: 3px solid transparent;
275
- }
276
-
277
- .item__list > li:hover {
278
- /*public*/
279
- background-color: var(--ez-search--background-medium);
280
- }
281
-
282
- .preselected {
283
- /*public*/
284
- background-color: var(--background--medium);
285
- }
286
-
287
- .btn {
288
- outline: none;
289
- border: none;
290
- background: none;
291
- cursor: pointer;
292
-
293
- /*public*/
294
- color: var(--ez-search__btn--color);
295
- }
296
-
297
- .btn:disabled {
298
- cursor: unset;
299
-
300
- /*public*/
301
- color: var(--ez-search__btn-disabled--color);
302
- }
303
-
304
- .btn:disabled:hover {
305
- cursor: unset;
306
-
307
- /*public*/
308
- color: var(--ez-search__btn-disabled--color);
309
- }
310
-
311
- .btn:hover {
312
- /*public*/
313
- color: var(--ez-search__btn-hover--color);
314
- }
315
-
316
- .btn__close {
317
- visibility: hidden;
318
- }
319
-
320
- ez-text-input:hover .btn__close, ez-text-input:focus .btn__close {
321
- visibility: visible;
322
- }
323
-
324
-
325
- @-webkit-keyframes spin {
326
- 0% { -webkit-transform: rotate(0deg); }
327
- 100% { -webkit-transform: rotate(360deg); }
328
- }
329
-
330
- @keyframes spin {
331
- 0% { transform: rotate(0deg); }
332
- 100% { transform: rotate(360deg); }
333
3
  }