@sankhyalabs/ezui 6.4.0-dev.2 → 6.4.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 (166) hide show
  1. package/dist/cjs/{ApplicationUtils-6a76ac09.js → ApplicationUtils-e920876b.js} +1 -1
  2. package/dist/cjs/{app-globals-0a67e214.js → app-globals-cc9fa51a.js} +1 -1
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
  4. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  7. package/dist/cjs/{ez-card-item_2.cjs.entry.js → ez-card-item.cjs.entry.js} +0 -205
  8. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +324 -0
  9. package/dist/cjs/ez-classic-input.cjs.entry.js +26 -9
  10. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
  11. package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +2 -2
  12. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-form.cjs.entry.js +3 -3
  20. package/dist/cjs/ez-grid.cjs.entry.js +3 -3
  21. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
  27. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-popover-core.cjs.entry.js +211 -0
  29. package/dist/cjs/ez-progress-bar.cjs.entry.js +32 -0
  30. package/dist/cjs/ez-search-plus.cjs.entry.js +2 -2
  31. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-search.cjs.entry.js +2 -2
  33. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  38. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  39. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  41. package/dist/cjs/ezui.cjs.js +3 -3
  42. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  43. package/dist/cjs/index-a7b0c73d.js +16 -4
  44. package/dist/cjs/{index-425b1f67.js → index-a8b00749.js} +12 -0
  45. package/dist/cjs/loader.cjs.js +3 -3
  46. package/dist/cjs/{search-column-78dd20d5.js → search-column-ac3e37a1.js} +2 -2
  47. package/dist/collection/collection-manifest.json +2 -0
  48. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css +99 -0
  49. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +798 -0
  50. package/dist/collection/components/ez-classic-combo-box/interfaces/IOption.js +1 -0
  51. package/dist/collection/components/ez-classic-input/ez-classic-input.css +29 -0
  52. package/dist/collection/components/ez-classic-input/ez-classic-input.js +42 -8
  53. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  54. package/dist/collection/components/ez-progress-bar/ez-progress-bar.css +72 -0
  55. package/dist/collection/components/ez-progress-bar/ez-progress-bar.js +88 -0
  56. package/dist/collection/utils/i18n/locales/en-us.js +4 -0
  57. package/dist/collection/utils/i18n/locales/es-es.js +4 -0
  58. package/dist/collection/utils/i18n/locales/pt-br.js +4 -0
  59. package/dist/custom-elements/index.d.ts +12 -0
  60. package/dist/custom-elements/index.js +388 -12
  61. package/dist/esm/{ApplicationUtils-1fd662ab.js → ApplicationUtils-70608555.js} +1 -1
  62. package/dist/esm/{app-globals-8a94d86c.js → app-globals-ba0c56ec.js} +1 -1
  63. package/dist/esm/ez-actions-button.entry.js +2 -2
  64. package/dist/esm/ez-alert-list.entry.js +1 -1
  65. package/dist/esm/ez-avatar.entry.js +1 -1
  66. package/dist/esm/ez-calendar.entry.js +1 -1
  67. package/dist/esm/{ez-card-item_2.entry.js → ez-card-item.entry.js} +1 -205
  68. package/dist/esm/ez-classic-combo-box.entry.js +320 -0
  69. package/dist/esm/ez-classic-input.entry.js +26 -9
  70. package/dist/esm/ez-collapsible-box.entry.js +2 -2
  71. package/dist/esm/ez-combo-box-list_4.entry.js +2 -2
  72. package/dist/esm/ez-combo-box.entry.js +2 -2
  73. package/dist/esm/ez-date-input.entry.js +1 -1
  74. package/dist/esm/ez-date-time-input.entry.js +1 -1
  75. package/dist/esm/ez-dialog.entry.js +1 -1
  76. package/dist/esm/ez-double-list.entry.js +1 -1
  77. package/dist/esm/ez-file-item.entry.js +1 -1
  78. package/dist/esm/ez-form-view.entry.js +1 -1
  79. package/dist/esm/ez-form.entry.js +3 -3
  80. package/dist/esm/ez-grid.entry.js +3 -3
  81. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  82. package/dist/esm/ez-link-builder_6.entry.js +1 -1
  83. package/dist/esm/ez-list.entry.js +1 -1
  84. package/dist/esm/ez-modal-container.entry.js +1 -1
  85. package/dist/esm/ez-modal.entry.js +1 -1
  86. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  87. package/dist/esm/ez-number-input.entry.js +1 -1
  88. package/dist/esm/ez-popover-core.entry.js +207 -0
  89. package/dist/esm/ez-progress-bar.entry.js +28 -0
  90. package/dist/esm/ez-search-plus.entry.js +2 -2
  91. package/dist/esm/ez-search-result-list.entry.js +1 -1
  92. package/dist/esm/ez-search.entry.js +2 -2
  93. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  94. package/dist/esm/ez-skeleton.entry.js +1 -1
  95. package/dist/esm/ez-sortable-list.entry.js +1 -1
  96. package/dist/esm/ez-split-button.entry.js +1 -1
  97. package/dist/esm/ez-split-item.entry.js +2 -2
  98. package/dist/esm/ez-time-input.entry.js +1 -1
  99. package/dist/esm/ez-tree.entry.js +1 -1
  100. package/dist/esm/ez-upload.entry.js +2 -2
  101. package/dist/esm/ezui.js +3 -3
  102. package/dist/esm/filter-column.entry.js +1 -1
  103. package/dist/esm/{index-498e0126.js → index-5004bd27.js} +12 -0
  104. package/dist/esm/index-baa5e267.js +16 -4
  105. package/dist/esm/loader.js +3 -3
  106. package/dist/esm/{search-column-729f3655.js → search-column-eadd8a51.js} +2 -2
  107. package/dist/ezui/ezui.esm.js +1 -1
  108. package/dist/ezui/{p-9dc31fc6.js → p-0e539c0f.js} +1 -1
  109. package/dist/ezui/{p-7e5c7b4c.js → p-0e6cbfc8.js} +1 -1
  110. package/dist/ezui/{p-e5e623d9.entry.js → p-0ff1bee4.entry.js} +1 -1
  111. package/dist/ezui/{p-31450a28.entry.js → p-25e71e8c.entry.js} +1 -1
  112. package/dist/ezui/{p-0c1a288c.entry.js → p-26e898c9.entry.js} +1 -1
  113. package/dist/ezui/{p-da4419a6.entry.js → p-2a265ae2.entry.js} +1 -1
  114. package/dist/ezui/{p-86b065e6.entry.js → p-314e3bfe.entry.js} +1 -1
  115. package/dist/ezui/{p-52d9b604.entry.js → p-35ca0988.entry.js} +1 -1
  116. package/dist/ezui/{p-2879c45f.entry.js → p-3b296bad.entry.js} +1 -1
  117. package/dist/ezui/p-3bf7f94b.entry.js +1 -0
  118. package/dist/ezui/{p-d512cb84.entry.js → p-4476b0ac.entry.js} +1 -1
  119. package/dist/ezui/{p-5dd12c80.entry.js → p-4638d099.entry.js} +1 -1
  120. package/dist/ezui/{p-1e21d31b.entry.js → p-47962426.entry.js} +1 -1
  121. package/dist/ezui/{p-24732fea.entry.js → p-47c7b561.entry.js} +1 -1
  122. package/dist/ezui/p-4c619e2d.js +1 -0
  123. package/dist/ezui/{p-5172793a.entry.js → p-50a2fa06.entry.js} +1 -1
  124. package/dist/ezui/{p-82fa431b.entry.js → p-59700a63.entry.js} +1 -1
  125. package/dist/ezui/{p-94630d41.entry.js → p-5ac4e99a.entry.js} +1 -1
  126. package/dist/ezui/{p-d845fa56.entry.js → p-5bdaa387.entry.js} +1 -1
  127. package/dist/ezui/{p-762a1033.entry.js → p-5bf5da85.entry.js} +1 -1
  128. package/dist/ezui/{p-39b16566.entry.js → p-69c1f7db.entry.js} +1 -1
  129. package/dist/ezui/{p-ec04285e.entry.js → p-6d3fa2dd.entry.js} +1 -1
  130. package/dist/ezui/{p-5ac7c4b3.entry.js → p-740b4ff5.entry.js} +1 -1
  131. package/dist/ezui/{p-66b00dec.entry.js → p-777b23fa.entry.js} +1 -1
  132. package/dist/ezui/{p-559b915a.entry.js → p-7999daa0.entry.js} +1 -1
  133. package/dist/ezui/{p-af47458b.js → p-8031e29e.js} +1 -1
  134. package/dist/ezui/{p-7aed8d32.entry.js → p-875d0bd2.entry.js} +1 -1
  135. package/dist/ezui/{p-3cecb4cb.entry.js → p-9adcab8a.entry.js} +1 -1
  136. package/dist/ezui/{p-bc22f56d.entry.js → p-9ae1f716.entry.js} +1 -1
  137. package/dist/ezui/p-9b2e6438.entry.js +1 -0
  138. package/dist/ezui/{p-4e6e0740.entry.js → p-9e35c475.entry.js} +1 -1
  139. package/dist/ezui/p-a3075f52.entry.js +1 -0
  140. package/dist/ezui/{p-57b40333.entry.js → p-a429a86c.entry.js} +1 -1
  141. package/dist/ezui/{p-5b9060ad.entry.js → p-ab52e931.entry.js} +1 -1
  142. package/dist/ezui/{p-60f5483c.entry.js → p-b1c4bbf2.entry.js} +1 -1
  143. package/dist/ezui/{p-e20ad35d.entry.js → p-b297d3f8.entry.js} +1 -1
  144. package/dist/ezui/{p-451a17ad.entry.js → p-b881cb64.entry.js} +1 -1
  145. package/dist/ezui/{p-3751da14.entry.js → p-b9158a92.entry.js} +1 -1
  146. package/dist/ezui/p-baf90704.entry.js +1 -0
  147. package/dist/ezui/p-d6f50207.entry.js +1 -0
  148. package/dist/ezui/{p-c2d38fbf.entry.js → p-db324ab1.entry.js} +1 -1
  149. package/dist/ezui/{p-4c5cb0da.entry.js → p-e1ee0b5a.entry.js} +1 -1
  150. package/dist/ezui/{p-02e1efa8.entry.js → p-f5ed1a75.entry.js} +1 -1
  151. package/dist/types/components/ez-classic-combo-box/ez-classic-combo-box.d.ts +115 -0
  152. package/dist/types/components/ez-classic-combo-box/interfaces/IOption.d.ts +4 -0
  153. package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +7 -0
  154. package/dist/types/components/ez-progress-bar/ez-progress-bar.d.ts +11 -0
  155. package/dist/types/components.d.ts +236 -20
  156. package/dist/types/utils/i18n/locales/en-us.d.ts +4 -0
  157. package/dist/types/utils/i18n/locales/es-es.d.ts +4 -0
  158. package/dist/types/utils/i18n/locales/pt-br.d.ts +4 -0
  159. package/dist/types/utils/i18n/translations.d.ts +12 -0
  160. package/package.json +1 -1
  161. package/react/components.d.ts +2 -0
  162. package/react/components.js +2 -0
  163. package/react/components.js.map +1 -1
  164. package/dist/ezui/p-07819d50.js +0 -1
  165. package/dist/ezui/p-5e495d47.entry.js +0 -1
  166. package/dist/ezui/p-e78e87f5.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const DialogType = require('./DialogType-2114c337.js');
4
- const index = require('./index-425b1f67.js');
4
+ const index = require('./index-a8b00749.js');
5
5
 
6
6
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
7
7
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-425b1f67.js');
3
+ const index = require('./index-a8b00749.js');
4
4
 
5
5
  async function initializeApp() {
6
6
  await index.initI18n();
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- require('./ApplicationUtils-6a76ac09.js');
7
+ require('./ApplicationUtils-e920876b.js');
8
8
  const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- require('./index-425b1f67.js');
11
+ require('./index-a8b00749.js');
12
12
  require('./FormLayout-18853e70.js');
13
13
 
14
14
  const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__actions-list--z-index:var(--ez-elevation--8, 8);--ez-actions-button__actions-max-height:415px;--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;overflow-y:auto;scrollbar-width:thin;z-index:var(--ez-actions-button__actions-list--z-index);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--max-height{max-height:var(--ez-actions-button__actions-max-height)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px);--ez-button--border:none}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--ez-actions-button__actions-list--z-index) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none;--ez-button--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}.ez-actions-button--bottom-padding{padding-bottom:var(--space--small, 6px)}";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const index$1 = require('./index-425b1f67.js');
7
+ const index$1 = require('./index-a8b00749.js');
8
8
 
9
9
  const ezAlertListCss = ":host {\n display: flex;\n\n /* Alert List */\n \n /*@doc Define a largura da lista minimizado */\n --ez-alert-list__container--width: 680px;\n /*@doc Define a altura da lista minimizado */\n --ez-alert-list__container--height: 220px;\n \n /*@doc Define a largura da lista maximizada */\n --ez-alert-list__container--width--expanded: 920px;\n /*@doc Define a altura da lista maximizada */\n --ez-alert-list__container--height--expanded: 540px;\n\n /* Title */\n /*@doc Define a fonte do título do componente */\n --ez-alert-list__title--font-family: var(--font-pattern, \"Roboto\");\n /*@doc Define o tamanho da fonte do título do popup.*/\n --ez-alert-list__title--font-size: var(--title--large, 20px);\n /*@doc Define a cor da fonte do título do popup.*/\n --ez-alert-list__title--color: var(--title--primary, #2b3a54);\n /*@doc Define o peso da fonte do título do popup.*/\n --ez-alert-list__title--font-weight: var(--text-weight--extra-large, 700);\n\n /* @doc Define a borda inferior do item da lista. */\n --ez-list__item--border-bottom: var(--border--small, 1px solid);\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color: var(--color--strokes, #DCE0E8);\n\n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: break-space;\n}\n\n.alert-list__content {\n display: flex;\n flex-direction: column;\n \n gap: var(--space--xs);\n margin: var(--space--large, 24px);\n width: 100%;\n}\n\n.alert-list__container {\n z-index: var(--ez-elevation--8, 8);\n display: flex;\n height: var(--ez-alert-list__container--height);\n width: var(--ez-alert-list__container--width);\n border-radius: var(--border--radius-medium);\n background-color: var(--background--xlight);\n box-shadow: var(--shadow--medium);\n\n &.expanded {\n height: var(--ez-alert-list__container--height--expanded);\n width: var(--ez-alert-list__container--width--expanded);\n }\n\n @media (max-height: 640px) {\n max-height: calc(100vh - var(--space--3xl));\n } \n}\n\n.alert-list__header {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.alert-list__title {\n font-family: var(--ez-alert-list__title--font-family);\n font-size: var(--ez-alert-list__title--font-size);\n font-weight: var(--ez-alert-list__title--font-weight);\n color: var(--ez-alert-list__title--color);\n}\n\n.alert-list__header__buttons {\n display: flex;\n gap: var(--space--xs);\n}\n\n.alert-list__expandable-content {\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n";
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
- const index$1 = require('./index-425b1f67.js');
6
+ const index$1 = require('./index-a8b00749.js');
7
7
  require('@sankhyalabs/core');
8
8
 
9
9
  const ezAvatarCss = ":host{--ez-avatar--background-color:var(--color--ocean-green-600, #008561);--ez-avatar--color:var(--color--gray-70, #fff);--ez-avatar--border-radius-circle:50%;--ez-avatar--border-radius-square:25%;--ez-avatar--background-color-hover:var(--color--ocean-green-700, #00684C)}button,figure{display:flex;align-items:center;justify-content:center;border:var(--ez-avatar--border);background-color:var(--ez-avatar--background-color);color:var(--ez-avatar--color);font-weight:var(--font-weight--medium, 500);font-family:var(--font-pattern, 'Roboto');transition:background-color 0.2s linear, color 0.2s linear;margin:0;padding:0}button:hover{cursor:pointer;background-color:var(--ez-avatar--background-color-hover)}.avatar--320{--avatar-size:320px;width:20rem;height:20rem}.avatar--300{--avatar-size:300px;width:18.75rem;height:18.75rem}.avatar--280{--avatar-size:280px;width:17.5rem;height:17.5rem}.avatar--260{--avatar-size:260px;width:16.25rem;height:16.25rem}.avatar--240{--avatar-size:240px;width:15rem;height:15rem}.avatar--220{--avatar-size:220px;width:13.75rem;height:13.75rem}.avatar--200{--avatar-size:200px;width:12.5rem;height:12.5rem}.avatar--180{--avatar-size:180px;width:11.25rem;height:11.25rem}.avatar--160{--avatar-size:160px;width:10rem;height:10rem}.avatar--140{--avatar-size:140px;width:8.75rem;height:8.75rem}.avatar--120{--avatar-size:120px;width:7.5rem;height:7.5rem}.avatar--100{--avatar-size:100px;width:6.25rem;height:6.25rem}.avatar--80{--avatar-size:80px;width:5rem;height:5rem}.avatar--60{--avatar-size:60px;width:3.75rem;height:3.75rem}.avatar-initial{font-size:calc(0.375 * var(--avatar-size));}.avatar--circle{border-radius:var(--ez-avatar--border-radius-circle)}.avatar--square{border-radius:var(--ez-avatar--border-radius-square)}.avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit}.avatar--has-image{background-color:transparent}ez-icon{--ez-icon--color:var(--color--gray-70, #fff);font-weight:var(--font-weight--medium, 500)}";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const index$1 = require('./index-425b1f67.js');
7
+ const index$1 = require('./index-a8b00749.js');
8
8
 
9
9
  const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
10
10
 
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const floatingUi_dom_esm = require('./floating-ui.dom.esm-017acce4.js');
8
7
 
9
8
  const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--font-weight--semi-bold, 600);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--font-weight--semi-bold, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define a cor da fonte do valor do detalhe do componente.*/\n --ez-card-item__detail-value--color: var(--color--petroleum-500, #404E65);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: 0.95;\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-value--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
10
9
 
@@ -60,208 +59,4 @@ const EzCardItem = class {
60
59
  };
61
60
  EzCardItem.style = ezCardItemCss;
62
61
 
63
- const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);--ez-popover__box--overlay-z-index:var(--elevation--24, 24);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--ez-popover__box--overlay-z-index)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
64
-
65
- const EzPopoverCore = class {
66
- constructor(hostRef) {
67
- index.registerInstance(this, hostRef);
68
- this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
69
- this.autoClose = true;
70
- this.boxWidth = "fit-content";
71
- this.opened = false;
72
- this.overlayType = "light";
73
- this.anchorElement = undefined;
74
- this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
75
- this.useAnchorSize = false;
76
- this.minWidth = 150;
77
- }
78
- observeOpened(newValue, oldValue) {
79
- if (newValue === oldValue) {
80
- return;
81
- }
82
- if (newValue) {
83
- this.openPopover();
84
- }
85
- else {
86
- this.hidePopover();
87
- }
88
- }
89
- /**
90
- * Atualiza a posição do popover.
91
- */
92
- async updatePosition(top, left) {
93
- this.updateOptionPosition(top, left);
94
- await this.updatePositionPopover();
95
- }
96
- /**
97
- * Exibe o ez-popover.
98
- */
99
- async show(top, left) {
100
- this.updateOptionPosition(top, left);
101
- this.opened = true;
102
- }
103
- /**
104
- * Ancora a exibição do popOver a um elemento HTML.
105
- */
106
- async showUnder(element, options) {
107
- if (options) {
108
- this.options = options;
109
- }
110
- this.anchorElement = element;
111
- this.opened = true;
112
- }
113
- /**
114
- * Oculta o ez-popover.
115
- */
116
- async hide() {
117
- this.opened = false;
118
- }
119
- /**
120
- * Altera as opções.
121
- */
122
- async setOptions(options) {
123
- Object.assign(this.options, options);
124
- }
125
- /**
126
- * Altera o elemento de ancoragem.
127
- */
128
- async setAnchorElement(anchor) {
129
- this.anchorElement = anchor;
130
- }
131
- parseSizePixel(sizePixel, defaultValue) {
132
- if (!sizePixel) {
133
- return defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0;
134
- }
135
- if (typeof sizePixel === "string") {
136
- return Number(sizePixel.replace("px", ""));
137
- }
138
- return sizePixel !== null && sizePixel !== void 0 ? sizePixel : 0;
139
- }
140
- updateOptionPosition(top, left) {
141
- Object.assign(this.options, {
142
- horizontalGap: this.parseSizePixel(left, this.options.horizontalGap),
143
- verticalGap: this.parseSizePixel(top, this.options.verticalGap),
144
- });
145
- }
146
- getElement(element) {
147
- if (typeof element === 'string') {
148
- return document.getElementById(element);
149
- }
150
- return element;
151
- }
152
- getAnchorElement() {
153
- if (!this.anchorElement) {
154
- return this._host;
155
- }
156
- if (Array.isArray(this.anchorElement)) {
157
- for (const element of this.anchorElement) {
158
- const htmlElement = this.getElement(element);
159
- if (htmlElement) {
160
- return htmlElement;
161
- }
162
- }
163
- return this._host;
164
- }
165
- return this.getElement(this.anchorElement);
166
- }
167
- async updatePositionPopover() {
168
- if (!this._box || !this.opened) {
169
- return;
170
- }
171
- const currentAnchorElement = this.getAnchorElement();
172
- await floatingUi_dom_esm.computePosition(currentAnchorElement, this._box, {
173
- placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
174
- middleware: [floatingUi_dom_esm.flip(), floatingUi_dom_esm.shift({ padding: 5 })],
175
- strategy: 'fixed',
176
- }).then(({ x, y, placement }) => {
177
- const newTop = placement.includes("bottom") ? y + this.options.verticalGap : y - this.options.verticalGap;
178
- const newLeft = placement.includes("start") ? x + this.options.horizontalGap : x - this.options.horizontalGap;
179
- Object.assign(this._box.style, {
180
- top: `${newTop}px`,
181
- left: `${newLeft}px`,
182
- });
183
- });
184
- }
185
- hidePopover() {
186
- if (!this._box) {
187
- return;
188
- }
189
- this._box.style.display = '';
190
- this.hideOverlay();
191
- this.ezVisibilityChange.emit(false);
192
- }
193
- async openPopover() {
194
- if (!this._box || !this.opened) {
195
- return;
196
- }
197
- this._box.style.display = 'flex';
198
- this._box.style.visibility = 'hidden';
199
- if (this.useAnchorSize) {
200
- const currentAnchorElement = this.getAnchorElement();
201
- const anchorSize = currentAnchorElement.getBoundingClientRect().width;
202
- const width = anchorSize < this.minWidth ? this.minWidth : anchorSize;
203
- this._box.style.width = `${width}px`;
204
- }
205
- await this.updatePositionPopover();
206
- this.openOverlay();
207
- this.ezVisibilityChange.emit(true);
208
- this._box.style.visibility = 'visible';
209
- }
210
- openOverlay() {
211
- if (!this._overlay || !this._overlayIsActive) {
212
- return;
213
- }
214
- this._overlay.style.display = 'block';
215
- }
216
- hideOverlay() {
217
- if (!this._overlay) {
218
- return;
219
- }
220
- this._overlay.style.display = 'none';
221
- }
222
- checkStatusOverlay() {
223
- if (this.overlayType !== "none") {
224
- return true;
225
- }
226
- if (this.overlayType === "none" && this.autoClose) {
227
- return true;
228
- }
229
- return false;
230
- }
231
- handlePositionUpdate() {
232
- if (!this.opened) {
233
- return;
234
- }
235
- this.updatePositionPopover();
236
- }
237
- componentWillLoad() {
238
- window.addEventListener('scroll', this.handlePositionUpdate.bind(this), true);
239
- window.addEventListener('resize', this.handlePositionUpdate.bind(this), true);
240
- }
241
- componentDidLoad() {
242
- this._overlayIsActive = this.checkStatusOverlay();
243
- this._resizeObserver = new ResizeObserver(this.updatePositionPopover.bind(this));
244
- this._resizeObserver.observe(this._box);
245
- this.openPopover();
246
- }
247
- disconnectedCallback() {
248
- window.removeEventListener('scroll', this.handlePositionUpdate.bind(this), true);
249
- window.removeEventListener('resize', this.handlePositionUpdate.bind(this), true);
250
- this._resizeObserver.disconnect();
251
- }
252
- render() {
253
- return (index.h(index.Host, null, index.h("div", { ref: el => this._overlay = el, onClick: () => this.hide(), class: `popover__overlay popover__overlay--${this.overlayType}` }), index.h("section", { ref: el => this._box = el, class: {
254
- "popover__box": true,
255
- "popover__box--fit-content": this.boxWidth === "fit-content",
256
- "popover__box--full-width": this.boxWidth !== "fit-content",
257
- } }, index.h("slot", null))));
258
- }
259
- get _host() { return index.getElement(this); }
260
- static get watchers() { return {
261
- "opened": ["observeOpened"]
262
- }; }
263
- };
264
- EzPopoverCore.style = ezPopoverCoreCss;
265
-
266
62
  exports.ez_card_item = EzCardItem;
267
- exports.ez_popover_core = EzPopoverCore;
@@ -0,0 +1,324 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const index$1 = require('./index-a8b00749.js');
8
+
9
+ const ezClassicComboBoxCss = ":host{display:block;box-sizing:border-box;font-family:var(--font--pattern, 'Roboto', Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--gray-500, #494A4E);--ez-classic-combo-box-highlighted-bg-color:var(--color--gray-90, #EAEAEA);--ez-classic-combo-box-max-height:180px;--ez-classic-combo-box-list-bg-color:var(--color--gray-70, #FFFFFF);--ez-classic-combo-box-item-hover-bg-color:var(--color--gray-100, #DEDEDE);--ez-classic-combo-box-selected-bg-color:var(--color--ocean-green-90, #E6F3EF);--ez-classic-combo-box-selected-text-color:var(--color--ocean-green-600, #008561);--ez-classic-combo-box-selected-font-weight:var(--font-weight--medium, 500);--ez-classic-combo-box-item-padding:var(--space--8, 8px) var(--space--4, 4px);--ez-classic-combo-box-item-border-radius:var(--border--radius-8, 8px);--ez-classic-combo-box-list-margin:var(--space--6, 6px);--ez-classic-combo-box-transition-duration:150ms;--ez-classic-combo-box-scrollbar-color:var(--color--gray-300, #C4C4C4);--ez-classic-combo-box-no-results-margin:var(--space--52, 52px) 0;--ez-classic-combo-box-item-text-color:inherit;--ez-classic-combo-box-item-min-height:auto}ul{list-style:none;padding:0;margin:var(--ez-classic-combo-box-list-margin);display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ez-classic-combo-box-scrollbar-color) transparent;max-height:var(--ez-classic-combo-box-max-height);scroll-behavior:smooth;background-color:var(--ez-classic-combo-box-list-bg-color)}li{cursor:pointer;border-radius:var(--ez-classic-combo-box-item-border-radius);padding:var(--ez-classic-combo-box-item-padding);transition:var(--ez-classic-combo-box-transition-duration) background-color linear;color:var(--ez-classic-combo-box-item-text-color);min-height:var(--ez-classic-combo-box-item-min-height)}li:hover{background-color:var(--ez-classic-combo-box-item-hover-bg-color)}li.highlighted{background-color:var(--ez-classic-combo-box-highlighted-bg-color)}li.selected{background-color:var(--ez-classic-combo-box-selected-bg-color);color:var(--ez-classic-combo-box-selected-text-color);font-weight:var(--ez-classic-combo-box-selected-font-weight)}span.no-results{margin:var(--ez-classic-combo-box-no-results-margin);cursor:default;text-align:center;display:flex;align-items:center;justify-content:center}";
10
+
11
+ const EzClassicComboBox = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.ezChange = index.createEvent(this, "ezChange", 7);
15
+ this.ezBlur = index.createEvent(this, "ezBlur", 7);
16
+ this.iconClick = index.createEvent(this, "iconClick", 7);
17
+ this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
18
+ this.ezType = index.createEvent(this, "ezType", 7);
19
+ this._keyboardManager = undefined;
20
+ this._boundHandleDocumentClick = this.handleDocumentClick.bind(this);
21
+ this.popoverVisible = false;
22
+ this.hasSlotContent = false;
23
+ this.highlightedIndex = 0;
24
+ this.filteredOptions = [];
25
+ this.inputValue = '';
26
+ this.value = null;
27
+ this.label = undefined;
28
+ this.placeholder = undefined;
29
+ this.enabled = true;
30
+ this.readonly = false;
31
+ this.name = undefined;
32
+ this.state = "default";
33
+ this.helpText = undefined;
34
+ this.iconName = undefined;
35
+ this.titleIcon = undefined;
36
+ this.iconClickable = false;
37
+ this.suppressSearch = false;
38
+ this.options = undefined;
39
+ this.textEmptyOption = undefined;
40
+ this.suppressEmptyOption = false;
41
+ }
42
+ /**
43
+ * Aplica o foco no campo.
44
+ */
45
+ async setFocus(option) {
46
+ var _a;
47
+ await ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.setFocus(option));
48
+ }
49
+ /**
50
+ * Remove o foco do campo.
51
+ */
52
+ async setBlur() {
53
+ var _a;
54
+ await ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.setBlur());
55
+ await this.hidePopover();
56
+ }
57
+ /**
58
+ * Exibe o popover abaixo do input.
59
+ */
60
+ async showPopover() {
61
+ var _a, _b, _c;
62
+ if (!this._popoverElem || !this._inputElem || this.popoverVisible) {
63
+ return;
64
+ }
65
+ this.popoverVisible = true;
66
+ const inputContainer = (_b = (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-container');
67
+ await ((_c = this._popoverElem) === null || _c === void 0 ? void 0 : _c.showUnder(inputContainer !== null && inputContainer !== void 0 ? inputContainer : this._inputElem));
68
+ }
69
+ /**
70
+ * Oculta o popover.
71
+ */
72
+ async hidePopover() {
73
+ var _a;
74
+ this.popoverVisible = false;
75
+ await ((_a = this._popoverElem) === null || _a === void 0 ? void 0 : _a.hide());
76
+ }
77
+ compareOptionValues(option1, option2) {
78
+ var _a, _b;
79
+ return JSON.stringify((_a = option1 === null || option1 === void 0 ? void 0 : option1.value) !== null && _a !== void 0 ? _a : null) === JSON.stringify((_b = option2 === null || option2 === void 0 ? void 0 : option2.value) !== null && _b !== void 0 ? _b : null);
80
+ }
81
+ setEmptyValue() {
82
+ this.value = null;
83
+ this.inputValue = '';
84
+ }
85
+ async setValue(option) {
86
+ if (!option || !this.options) {
87
+ this.setEmptyValue();
88
+ await this.hidePopover();
89
+ return;
90
+ }
91
+ if (this.compareOptionValues(this.value, option)) {
92
+ await this.hidePopover();
93
+ return;
94
+ }
95
+ if (!option.value) {
96
+ this.setEmptyValue();
97
+ }
98
+ else {
99
+ this.value = option;
100
+ this.inputValue = option.label;
101
+ }
102
+ this.ezChange.emit(this.value);
103
+ await this.hidePopover();
104
+ }
105
+ async optionsChanged() {
106
+ this.filterOptions('');
107
+ }
108
+ async valueChanged(newValue) {
109
+ if (newValue) {
110
+ this.inputValue = newValue.label;
111
+ this.setHighlightedIndexToValue();
112
+ }
113
+ else {
114
+ this.inputValue = '';
115
+ this.highlightedIndex = 0;
116
+ }
117
+ }
118
+ async handleIconClick(event) {
119
+ event.stopPropagation();
120
+ event.preventDefault();
121
+ if (event.detail.icon === 'right') {
122
+ if (!this.popoverVisible) {
123
+ await this.showPopover();
124
+ }
125
+ else {
126
+ await this.hidePopover();
127
+ }
128
+ }
129
+ else {
130
+ this.iconClick.emit();
131
+ }
132
+ }
133
+ async handleEzChange(event) {
134
+ event.stopPropagation();
135
+ this.inputValue = event.detail;
136
+ if (!this.popoverVisible && this.inputValue.length > 0) {
137
+ await this.showPopover();
138
+ }
139
+ this.ezType.emit(this.inputValue);
140
+ this.highlightedIndex = 0;
141
+ this.filterOptions(this.inputValue);
142
+ }
143
+ async handleEzBlur(event) {
144
+ var _a, _b;
145
+ event.stopPropagation();
146
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.label) !== this.inputValue) {
147
+ this.inputValue = ((_b = this.value) === null || _b === void 0 ? void 0 : _b.label) || '';
148
+ }
149
+ this.ezBlur.emit(this.value);
150
+ }
151
+ filterOptions(searchTerm) {
152
+ if (!this.options) {
153
+ this.filteredOptions = [];
154
+ return;
155
+ }
156
+ let currentOptions = [];
157
+ if (!searchTerm || searchTerm.trim() === '') {
158
+ currentOptions = currentOptions.concat([...this.options]);
159
+ }
160
+ else {
161
+ const term = searchTerm.toLowerCase().trim();
162
+ currentOptions = currentOptions.concat(this.options.filter(option => option.label.toLowerCase().includes(term) ||
163
+ option.value.toLowerCase().includes(term)));
164
+ }
165
+ if (!this.suppressEmptyOption && currentOptions.length > 0) {
166
+ currentOptions = [
167
+ {
168
+ value: null,
169
+ label: this.textEmptyOption || this.i18n('ez-classic-combo-box.emptyOption')
170
+ },
171
+ ...currentOptions
172
+ ];
173
+ }
174
+ this.filteredOptions = currentOptions;
175
+ this.setHighlightedIndexToValue();
176
+ this.scrollToHighlightedOption();
177
+ }
178
+ scrollToHighlightedOption() {
179
+ if (this.highlightedIndex < 0 || !this._listElem) {
180
+ return;
181
+ }
182
+ const highlightedOption = this._listElem.children[this.highlightedIndex];
183
+ if (highlightedOption) {
184
+ highlightedOption.scrollIntoView({
185
+ behavior: 'smooth',
186
+ block: 'nearest',
187
+ inline: 'start'
188
+ });
189
+ }
190
+ }
191
+ async selectOption(option) {
192
+ if (!option || this.readonly || !this.enabled) {
193
+ return;
194
+ }
195
+ await this.setValue(option);
196
+ }
197
+ async handleArrowUp() {
198
+ var _a;
199
+ if (!this.popoverVisible) {
200
+ await this.showPopover();
201
+ return;
202
+ }
203
+ const optionsLength = ((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) || 0;
204
+ if (optionsLength <= 0 || this.highlightedIndex <= 0) {
205
+ return;
206
+ }
207
+ this.highlightedIndex = Math.max(0, this.highlightedIndex - 1);
208
+ this.scrollToHighlightedOption();
209
+ }
210
+ handleArrowDown() {
211
+ var _a;
212
+ if (!this.popoverVisible) {
213
+ this.showPopover();
214
+ return;
215
+ }
216
+ const optionsLength = ((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) || 0;
217
+ if (optionsLength <= 0) {
218
+ return;
219
+ }
220
+ this.highlightedIndex = Math.min(optionsLength - 1, this.highlightedIndex + 1);
221
+ this.scrollToHighlightedOption();
222
+ }
223
+ async selectCurrentItem() {
224
+ if (!this.popoverVisible || this.highlightedIndex < 0) {
225
+ return;
226
+ }
227
+ if (this.hasSlotContent || this.filteredOptions.length === 0 || this.readonly || !this.enabled) {
228
+ await this.hidePopover();
229
+ return;
230
+ }
231
+ if (this.filteredOptions && this.filteredOptions[this.highlightedIndex]) {
232
+ this.selectOption(this.filteredOptions[this.highlightedIndex]);
233
+ }
234
+ }
235
+ handleVisibilityChange(event) {
236
+ this.popoverVisible = event.detail;
237
+ this.ezVisibilityChange.emit(this.popoverVisible);
238
+ }
239
+ checkSlotContent() {
240
+ const slot = this._element.querySelector('slot') || this._element;
241
+ if (slot instanceof HTMLSlotElement) {
242
+ this.hasSlotContent = slot.assignedNodes().length > 0;
243
+ }
244
+ else {
245
+ this.hasSlotContent = slot.children.length > 0;
246
+ }
247
+ }
248
+ setHighlightedIndexToValue() {
249
+ if (this.value && this.filteredOptions) {
250
+ const index = this.filteredOptions.findIndex(opt => opt.value === this.value.value);
251
+ if (index >= 0) {
252
+ this.highlightedIndex = index;
253
+ return;
254
+ }
255
+ this.highlightedIndex = 0;
256
+ }
257
+ }
258
+ async handleDocumentClick(event) {
259
+ const target = event.target;
260
+ if (!this._element.contains(target) && !this._popoverElem.contains(target)) {
261
+ await this.hidePopover();
262
+ }
263
+ }
264
+ addInfoId() {
265
+ const dataInfo = { id: 'embedded' };
266
+ if (this._element) {
267
+ core.ElementIDUtils.addIDInfo(this._element);
268
+ }
269
+ if (this._inputElem) {
270
+ core.ElementIDUtils.addIDInfo(this._inputElem, 'classic-combo-box-input', dataInfo);
271
+ }
272
+ if (this._popoverElem) {
273
+ core.ElementIDUtils.addIDInfo(this._popoverElem, 'classic-combo-box-popover', dataInfo);
274
+ }
275
+ }
276
+ async initKeyboardManager() {
277
+ this._keyboardManager = new core.KeyboardManager({ element: this._element, propagate: true });
278
+ this._keyboardManager
279
+ .bind("ArrowUp", () => this.handleArrowUp(), { propagate: false })
280
+ .bind("ArrowDown", () => this.handleArrowDown(), { propagate: false })
281
+ .bind("Enter", () => this.selectCurrentItem(), { propagate: false })
282
+ .bind("Tab", () => this.selectCurrentItem())
283
+ .bind("shift+Tab", () => this.selectCurrentItem())
284
+ .bind("Escape", () => this.hidePopover());
285
+ }
286
+ async connectedCallback() {
287
+ this.i18n = await index$1.initI18n();
288
+ await this.initKeyboardManager();
289
+ document.addEventListener('mouseup', this._boundHandleDocumentClick);
290
+ }
291
+ disconnectedCallback() {
292
+ this._keyboardManager.unbindAllShortcutKeys();
293
+ document.removeEventListener('mouseup', this._boundHandleDocumentClick);
294
+ }
295
+ componentWillLoad() {
296
+ this.filterOptions('');
297
+ }
298
+ componentDidLoad() {
299
+ this.addInfoId();
300
+ this.checkSlotContent();
301
+ if (this.value) {
302
+ this.inputValue = this.value.label;
303
+ this.setHighlightedIndexToValue();
304
+ }
305
+ }
306
+ render() {
307
+ var _a;
308
+ return (index.h(index.Host, null, index.h("ez-classic-input", { ref: ref => this._inputElem = ref, name: this.name, label: this.label, placeholder: this.placeholder, value: this.inputValue, state: this.state, enabled: this.enabled, readonly: this.readonly || this.suppressSearch, leftIconName: this.iconName, leftIconTooltip: this.titleIcon, leftIconClickable: this.iconClickable, rightIconClickable: true, helpText: this.helpText, rightIconName: this.popoverVisible ? 'angle-up' : 'angle-down', onIconClick: this.handleIconClick.bind(this), onEzChange: this.handleEzChange.bind(this), onEzFocus: this.showPopover.bind(this), onEzBlur: this.handleEzBlur.bind(this) }), index.h("ez-popover-core", { ref: ref => this._popoverElem = ref, useAnchorSize: true, onEzVisibilityChange: this.handleVisibilityChange.bind(this), overlayType: "none", options: { verticalGap: 2, horizontalGap: 0 }, autoClose: false }, index.h("slot", { onSlotchange: this.checkSlotContent.bind(this) }), !this.hasSlotContent && (((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (index.h("ul", { ref: ref => this._listElem = ref, tabIndex: -1 }, this.filteredOptions.map((option, index$1) => {
309
+ var _a, _b;
310
+ return (index.h("li", { key: (_a = option.value) !== null && _a !== void 0 ? _a : '__empty__', value: option.value, class: {
311
+ 'highlighted': this.highlightedIndex === index$1,
312
+ 'selected': ((_b = this.value) === null || _b === void 0 ? void 0 : _b.value) === option.value
313
+ }, onMouseDown: () => this.selectOption(option) }, option.label));
314
+ }))) : (index.h("span", { class: "no-results" }, this.i18n('ez-classic-combo-box.noResults')))))));
315
+ }
316
+ get _element() { return index.getElement(this); }
317
+ static get watchers() { return {
318
+ "options": ["optionsChanged"],
319
+ "value": ["valueChanged"]
320
+ }; }
321
+ };
322
+ EzClassicComboBox.style = ezClassicComboBoxCss;
323
+
324
+ exports.ez_classic_combo_box = EzClassicComboBox;