@sankhyalabs/ezui 5.22.0-dev.112 → 5.22.0-dev.113

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 (193) hide show
  1. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-card-item_2.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +2 -2
  15. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-dialog.cjs.entry.js +4 -2
  19. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-form.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-grid.cjs.entry.js +3 -8
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-modal-container.cjs.entry.js +6 -2
  31. package/dist/cjs/ez-modal.cjs.entry.js +6 -2
  32. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-popup.cjs.entry.js +6 -2
  37. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  39. package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  47. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  49. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  51. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  52. package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
  53. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  54. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  55. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  56. package/dist/cjs/ezui.cjs.js +1 -1
  57. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  58. package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +3 -0
  59. package/dist/cjs/loader.cjs.js +1 -1
  60. package/dist/collection/components/ez-dialog/ez-dialog.js +3 -1
  61. package/dist/collection/components/ez-grid/ez-grid.js +2 -7
  62. package/dist/collection/components/ez-modal/ez-modal.js +5 -1
  63. package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
  64. package/dist/collection/components/ez-popup/ez-popup.js +5 -1
  65. package/dist/custom-elements/index.js +20 -11
  66. package/dist/esm/ez-actions-button.entry.js +1 -1
  67. package/dist/esm/ez-alert-list.entry.js +1 -1
  68. package/dist/esm/ez-alert.entry.js +1 -1
  69. package/dist/esm/ez-application.entry.js +1 -1
  70. package/dist/esm/ez-badge.entry.js +1 -1
  71. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  72. package/dist/esm/ez-button.entry.js +1 -1
  73. package/dist/esm/ez-calendar.entry.js +1 -1
  74. package/dist/esm/ez-card-item_2.entry.js +1 -1
  75. package/dist/esm/ez-chart.entry.js +1 -1
  76. package/dist/esm/ez-check.entry.js +1 -1
  77. package/dist/esm/ez-chip.entry.js +1 -1
  78. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  79. package/dist/esm/ez-combo-box-list_3.entry.js +2 -2
  80. package/dist/esm/ez-combo-box.entry.js +1 -1
  81. package/dist/esm/ez-date-input.entry.js +1 -1
  82. package/dist/esm/ez-date-time-input.entry.js +1 -1
  83. package/dist/esm/ez-dialog.entry.js +4 -2
  84. package/dist/esm/ez-double-list.entry.js +1 -1
  85. package/dist/esm/ez-dropdown.entry.js +1 -1
  86. package/dist/esm/ez-file-item.entry.js +1 -1
  87. package/dist/esm/ez-filter-input.entry.js +1 -1
  88. package/dist/esm/ez-form-view.entry.js +1 -1
  89. package/dist/esm/ez-form.entry.js +1 -1
  90. package/dist/esm/ez-grid.entry.js +3 -8
  91. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  92. package/dist/esm/ez-icon.entry.js +1 -1
  93. package/dist/esm/ez-list.entry.js +1 -1
  94. package/dist/esm/ez-loading-bar.entry.js +1 -1
  95. package/dist/esm/ez-modal-container.entry.js +6 -2
  96. package/dist/esm/ez-modal.entry.js +6 -2
  97. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  98. package/dist/esm/ez-number-input.entry.js +1 -1
  99. package/dist/esm/ez-popover-plus_3.entry.js +1 -1
  100. package/dist/esm/ez-popover.entry.js +1 -1
  101. package/dist/esm/ez-popup.entry.js +6 -2
  102. package/dist/esm/ez-radio-button.entry.js +1 -1
  103. package/dist/esm/ez-scroller_2.entry.js +1 -1
  104. package/dist/esm/ez-search-plus.entry.js +1 -1
  105. package/dist/esm/ez-search-result-list.entry.js +1 -1
  106. package/dist/esm/ez-search.entry.js +1 -1
  107. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  108. package/dist/esm/ez-skeleton.entry.js +1 -1
  109. package/dist/esm/ez-split-button.entry.js +1 -1
  110. package/dist/esm/ez-split-item.entry.js +1 -1
  111. package/dist/esm/ez-split-panel.entry.js +1 -1
  112. package/dist/esm/ez-tabselector.entry.js +1 -1
  113. package/dist/esm/ez-text-area.entry.js +1 -1
  114. package/dist/esm/ez-text-input.entry.js +1 -1
  115. package/dist/esm/ez-time-input.entry.js +1 -1
  116. package/dist/esm/ez-toast.entry.js +1 -1
  117. package/dist/esm/ez-tooltip.entry.js +1 -1
  118. package/dist/esm/ez-tree.entry.js +1 -1
  119. package/dist/esm/ez-upload.entry.js +1 -1
  120. package/dist/esm/ez-view-stack.entry.js +1 -1
  121. package/dist/esm/ezui.js +2 -2
  122. package/dist/esm/filter-column.entry.js +1 -1
  123. package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +3 -1
  124. package/dist/esm/loader.js +2 -2
  125. package/dist/ezui/ezui.esm.js +1 -1
  126. package/dist/ezui/{p-e75c7a23.entry.js → p-000159dc.entry.js} +1 -1
  127. package/dist/ezui/{p-44caad9a.entry.js → p-0378416a.entry.js} +1 -1
  128. package/dist/ezui/{p-5b205c80.entry.js → p-044d46d5.entry.js} +1 -1
  129. package/dist/ezui/{p-288631d1.entry.js → p-06f1b8e4.entry.js} +1 -1
  130. package/dist/ezui/{p-a4cee65d.entry.js → p-0cfbbe82.entry.js} +1 -1
  131. package/dist/ezui/{p-5ec0ae79.entry.js → p-0f658cfd.entry.js} +1 -1
  132. package/dist/ezui/{p-77a4bd35.entry.js → p-11bfeca3.entry.js} +1 -1
  133. package/dist/ezui/p-18e71523.entry.js +1 -0
  134. package/dist/ezui/{p-e3544d23.entry.js → p-1bb62d6b.entry.js} +1 -1
  135. package/dist/ezui/{p-0bffeffc.entry.js → p-1f7241cd.entry.js} +1 -1
  136. package/dist/ezui/{p-2b4df33d.entry.js → p-1fefb37a.entry.js} +1 -1
  137. package/dist/ezui/{p-7e677b7b.entry.js → p-2069c78a.entry.js} +1 -1
  138. package/dist/ezui/{p-31b71e50.entry.js → p-23dab72f.entry.js} +1 -1
  139. package/dist/ezui/{p-e06a9886.entry.js → p-2f351332.entry.js} +1 -1
  140. package/dist/ezui/{p-4cf0aaeb.entry.js → p-2f77f563.entry.js} +1 -1
  141. package/dist/ezui/{p-f5a30e35.entry.js → p-3eaa0f67.entry.js} +1 -1
  142. package/dist/ezui/{p-d9e4a85a.entry.js → p-40f39ed9.entry.js} +1 -1
  143. package/dist/ezui/{p-fa6732f2.entry.js → p-44b39e81.entry.js} +1 -1
  144. package/dist/ezui/{p-c1527804.entry.js → p-4818b8ce.entry.js} +1 -1
  145. package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
  146. package/dist/ezui/p-6ec40dec.entry.js +1 -0
  147. package/dist/ezui/{p-1a060042.entry.js → p-6ee27742.entry.js} +1 -1
  148. package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
  149. package/dist/ezui/{p-da1b4a38.entry.js → p-708b196e.entry.js} +1 -1
  150. package/dist/ezui/{p-ecaac11f.entry.js → p-72731b9b.entry.js} +1 -1
  151. package/dist/ezui/{p-555c9018.entry.js → p-7567ccdd.entry.js} +1 -1
  152. package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
  153. package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
  154. package/dist/ezui/{p-0fa52b0f.entry.js → p-88c615f0.entry.js} +1 -1
  155. package/dist/ezui/{p-f4861c6a.entry.js → p-8d9ab0b0.entry.js} +1 -1
  156. package/dist/ezui/{p-2872fd16.entry.js → p-8f49705f.entry.js} +1 -1
  157. package/dist/ezui/{p-56fe5341.entry.js → p-9066b0b0.entry.js} +1 -1
  158. package/dist/ezui/{p-09de35a2.entry.js → p-91ccae0c.entry.js} +1 -1
  159. package/dist/ezui/p-926a0bde.entry.js +1 -0
  160. package/dist/ezui/{p-c0d9c4f8.entry.js → p-92748142.entry.js} +1 -1
  161. package/dist/ezui/{p-e6a9041d.entry.js → p-9e95bfeb.entry.js} +1 -1
  162. package/dist/ezui/{p-cd07f8be.entry.js → p-a79f3789.entry.js} +1 -1
  163. package/dist/ezui/p-b8344ae8.entry.js +1 -0
  164. package/dist/ezui/{p-6825bdc7.entry.js → p-b9255e16.entry.js} +1 -1
  165. package/dist/ezui/{p-1ec8bdd2.entry.js → p-bab2bb93.entry.js} +2 -2
  166. package/dist/ezui/{p-9f22e1dc.entry.js → p-bbf086de.entry.js} +1 -1
  167. package/dist/ezui/{p-8ac8093c.entry.js → p-bcffc6c5.entry.js} +1 -1
  168. package/dist/ezui/p-c2b1b592.entry.js +1 -0
  169. package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
  170. package/dist/ezui/{p-dc73e1fe.entry.js → p-c7035d65.entry.js} +1 -1
  171. package/dist/ezui/{p-17de16e5.entry.js → p-c96fbbef.entry.js} +1 -1
  172. package/dist/ezui/{p-20c024f7.entry.js → p-cf33bc48.entry.js} +1 -1
  173. package/dist/ezui/{p-9567b31a.entry.js → p-ddb22a70.entry.js} +1 -1
  174. package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
  175. package/dist/ezui/{p-bf9dec89.entry.js → p-e18c7afe.entry.js} +1 -1
  176. package/dist/ezui/{p-7fdd479f.entry.js → p-e18d9e6a.entry.js} +1 -1
  177. package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
  178. package/dist/ezui/{p-0306dff7.entry.js → p-e6b38ade.entry.js} +1 -1
  179. package/dist/ezui/{p-ca59e952.entry.js → p-ecb4555b.entry.js} +1 -1
  180. package/dist/ezui/p-f68236b6.entry.js +1 -0
  181. package/dist/ezui/{p-7742802c.entry.js → p-f6a88217.entry.js} +1 -1
  182. package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
  183. package/dist/types/components/ez-dialog/ez-dialog.d.ts +1 -0
  184. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
  185. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
  186. package/dist/types/components/ez-popup/ez-popup.d.ts +2 -0
  187. package/package.json +1 -1
  188. package/dist/ezui/p-248d4f54.entry.js +0 -1
  189. package/dist/ezui/p-4e0628a7.entry.js +0 -1
  190. package/dist/ezui/p-5a14f506.entry.js +0 -1
  191. package/dist/ezui/p-84b1c99e.entry.js +0 -1
  192. package/dist/ezui/p-bc2f844e.entry.js +0 -1
  193. package/dist/ezui/p-ea54d056.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as o,H as n,g as s}from"./p-23a36bb6.js";import{FloatingManager as a,ElementIDUtils as e}from"@sankhyalabs/core";import"./p-2187f86c.js";import{C as c}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-5895e687.js";import"./p-173f68ea.js";const r=class{constructor(o){t(this,o),this.ezAction=i(this,"ezAction",7),this.ezPopoverOpen=i(this,"ezPopoverOpen",7),this.ezDisconnectedActionButtons=i(this,"ezDisconnectedActionButtons",7),this._arrowOffset=5,this.innerClickCheck=(t,i)=>{var o;if(i&&t){if(i===t)return!0;const n=t.children;for(let t=0;t<n.length;t++)if(null===(o=n[t].shadowRoot)||void 0===o?void 0:o.contains(i))return!0;do{if(t.contains(i))return!0;i=i.offsetParent}while(null!=i&&i!=document.getRootNode())}return!1},this._selectedAction=void 0,this.enabled=!0,this.actions=void 0,this.size="medium",this.showLabel=!1,this.displayIcon=void 0,this.checkOption=!1,this.value=void 0,this.isTransparent=!1,this.arrowActive=!1}async hideActions(){null!=this._floatingID&&a.close(this._floatingID),this._floatingID=void 0}async showActions(){if(!this.enabled)return;const t=this.getFloatOptions();this._floatingID=a.float(this._actionsList,this._listContainer,t);const i=this.getSideLimit();null!=i&&(t.left=i,a.updateFloatPosition(this._actionsList,this._listContainer,t)),window.requestAnimationFrame((()=>{this._actionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.ezPopoverOpen.emit(this._actionsList)}async isOpened(){return null!=this._floatingID}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,isFixed:!0,top:this.getPositionTop(),left:this.getPositionLeft(),backClickListener:()=>this._floatingID=void 0}}getSideLimit(){var t;const i=document.body.clientWidth,o=null===(t=this._actionsList)||void 0===t?void 0:t.getBoundingClientRect(),n=i-this._button.getBoundingClientRect().right;if((null==o?void 0:o.right)>=i||(null==o?void 0:o.right)===i-n)return i-o.width-n+"px"}updatePosition(){if(!this.enabled||null==this._floatingID)return;const t=this.getFloatOptions(),i=this.getSideLimit();null!=i&&(t.left=i),a.updateFloatPosition(this._actionsList,this._listContainer,t)}getPositionTop(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.y+i.height+"px"}getBoundingLeft(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.x-(this.arrowActive?this._arrowOffset:0)+"px"}getPositionLeft(){return this.getBoundingLeft()||(this.arrowActive?`-${this._arrowOffset}px`:null)}hasLabelOrCheckOption(){var t;return(this.showLabel||this.checkOption)&&(null===(t=this.actions)||void 0===t?void 0:t.length)>0}hasIconName(){var t;return null===(t=this.actions)||void 0===t?void 0:t.some((t=>null!=t.iconName))}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}handlerButtonClick(){this.showActions()}actionClick(t){this._selectedAction=t,this.hideActions(),this.ezAction.emit(t)}componentWillLoad(){if(null==this.actions){this.actions=[];const t=this._element.querySelectorAll("action");t&&t.forEach((t=>{let i=t.innerText,o=t.getAttribute("value"),n=!("false"===t.getAttribute("enabled"));o||(o=i),this.actions.push({label:i,value:o,enabled:n}),t.hidden=!0}))}}disconnectedCallback(){this.ezDisconnectedActionButtons.emit()}componentDidLoad(){c.applyVarsButton(this._element,this._button),e.addIDInfo(this._element),this.controlScrollPage()}componentDidRender(){var t;null==this._floatingID&&(null===(t=this._actionsList)||void 0===t||t.remove()),this.hasLabelOrCheckOption()&&(this.value?this._selectedAction=this.actions.find((t=>t.value===this.value)):this._selectedAction||(this._selectedAction=this.actions[0]))}buildActionElement(t){var i;if(t){if(null!=t.itemBuilder){const i=t.itemBuilder(this._element,t);return"string"==typeof i?o("div",{class:"ez-actions-button__btn-action",innerHTML:i}):i}return o("ez-button",{size:"small",label:t.label,onClick:()=>this.actionClick(t),enabled:t.enabled,class:"ez-actions-button__btn-action"+(this.checkOption||this.hasIconName()?" ez-actions-button__btn-action--spaced":"")},this.checkOption&&(null===(i=this._selectedAction)||void 0===i?void 0:i.value)===t.value&&o("ez-icon",{class:"ez-actions-button__icon-check",slot:"leftIcon",size:"small",iconName:"check"}),!this.checkOption&&t.iconName&&o("ez-icon",{class:"ez-actions-button__icon-item",slot:"leftIcon",size:"small",iconName:t.iconName}))}}render(){var t;return o(n,null,o("ez-button",{ref:t=>this._button=t,class:(this.isTransparent?"ez-actions-button__btn-transparent":"")+(this.showLabel?" ez-actions-button__btn-label":""),label:this.showLabel&&(null===(t=this._selectedAction)||void 0===t?void 0:t.label),enabled:this.enabled,mode:this.showLabel?void 0:"icon",iconName:this.showLabel?"":this.displayIcon||"dots-vertical",size:this.size,onClick:()=>this.handlerButtonClick()},this.showLabel&&o("ez-icon",{class:"ez-actions-button__icon-right",slot:"rightIcon",iconName:this.displayIcon||"dots-vertical"})),o("section",{class:"ez-actions-button__list-container",ref:t=>this._listContainer=t},this.arrowActive&&o("div",{class:"ez-actions-button__arrow ez-actions-button__arrow--"+(this.size||"small")+(this.isTransparent?" ez-actions-button__arrow--upped":"")}),o("div",{ref:t=>this._actionsList=t,class:"ez-actions-button__actions-list ez-actions-button__actions-list--max-height"+(this.arrowActive&&!this.isTransparent?" ez-actions-button__actions-list--lowered":"")},this.actions.map((t=>this.buildActionElement(t))))))}get _element(){return s(this)}};r.style=":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-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-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)}";export{r as ez_actions_button}
1
+ import{r as t,c as i,h as o,H as n,g as s}from"./p-e4c7eb39.js";import{FloatingManager as e,ElementIDUtils as a}from"@sankhyalabs/core";import"./p-2187f86c.js";import{C as c}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-5895e687.js";import"./p-173f68ea.js";const r=class{constructor(o){t(this,o),this.ezAction=i(this,"ezAction",7),this.ezPopoverOpen=i(this,"ezPopoverOpen",7),this.ezDisconnectedActionButtons=i(this,"ezDisconnectedActionButtons",7),this._arrowOffset=5,this.innerClickCheck=(t,i)=>{var o;if(i&&t){if(i===t)return!0;const n=t.children;for(let t=0;t<n.length;t++)if(null===(o=n[t].shadowRoot)||void 0===o?void 0:o.contains(i))return!0;do{if(t.contains(i))return!0;i=i.offsetParent}while(null!=i&&i!=document.getRootNode())}return!1},this._selectedAction=void 0,this.enabled=!0,this.actions=void 0,this.size="medium",this.showLabel=!1,this.displayIcon=void 0,this.checkOption=!1,this.value=void 0,this.isTransparent=!1,this.arrowActive=!1}async hideActions(){null!=this._floatingID&&e.close(this._floatingID),this._floatingID=void 0}async showActions(){if(!this.enabled)return;const t=this.getFloatOptions();this._floatingID=e.float(this._actionsList,this._listContainer,t);const i=this.getSideLimit();null!=i&&(t.left=i,e.updateFloatPosition(this._actionsList,this._listContainer,t)),window.requestAnimationFrame((()=>{this._actionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.ezPopoverOpen.emit(this._actionsList)}async isOpened(){return null!=this._floatingID}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,isFixed:!0,top:this.getPositionTop(),left:this.getPositionLeft(),backClickListener:()=>this._floatingID=void 0}}getSideLimit(){var t;const i=document.body.clientWidth,o=null===(t=this._actionsList)||void 0===t?void 0:t.getBoundingClientRect(),n=i-this._button.getBoundingClientRect().right;if((null==o?void 0:o.right)>=i||(null==o?void 0:o.right)===i-n)return i-o.width-n+"px"}updatePosition(){if(!this.enabled||null==this._floatingID)return;const t=this.getFloatOptions(),i=this.getSideLimit();null!=i&&(t.left=i),e.updateFloatPosition(this._actionsList,this._listContainer,t)}getPositionTop(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.y+i.height+"px"}getBoundingLeft(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.x-(this.arrowActive?this._arrowOffset:0)+"px"}getPositionLeft(){return this.getBoundingLeft()||(this.arrowActive?`-${this._arrowOffset}px`:null)}hasLabelOrCheckOption(){var t;return(this.showLabel||this.checkOption)&&(null===(t=this.actions)||void 0===t?void 0:t.length)>0}hasIconName(){var t;return null===(t=this.actions)||void 0===t?void 0:t.some((t=>null!=t.iconName))}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}handlerButtonClick(){this.showActions()}actionClick(t){this._selectedAction=t,this.hideActions(),this.ezAction.emit(t)}componentWillLoad(){if(null==this.actions){this.actions=[];const t=this._element.querySelectorAll("action");t&&t.forEach((t=>{let i=t.innerText,o=t.getAttribute("value"),n=!("false"===t.getAttribute("enabled"));o||(o=i),this.actions.push({label:i,value:o,enabled:n}),t.hidden=!0}))}}disconnectedCallback(){this.ezDisconnectedActionButtons.emit()}componentDidLoad(){c.applyVarsButton(this._element,this._button),a.addIDInfo(this._element),this.controlScrollPage()}componentDidRender(){var t;null==this._floatingID&&(null===(t=this._actionsList)||void 0===t||t.remove()),this.hasLabelOrCheckOption()&&(this.value?this._selectedAction=this.actions.find((t=>t.value===this.value)):this._selectedAction||(this._selectedAction=this.actions[0]))}buildActionElement(t){var i;if(t){if(null!=t.itemBuilder){const i=t.itemBuilder(this._element,t);return"string"==typeof i?o("div",{class:"ez-actions-button__btn-action",innerHTML:i}):i}return o("ez-button",{size:"small",label:t.label,onClick:()=>this.actionClick(t),enabled:t.enabled,class:"ez-actions-button__btn-action"+(this.checkOption||this.hasIconName()?" ez-actions-button__btn-action--spaced":"")},this.checkOption&&(null===(i=this._selectedAction)||void 0===i?void 0:i.value)===t.value&&o("ez-icon",{class:"ez-actions-button__icon-check",slot:"leftIcon",size:"small",iconName:"check"}),!this.checkOption&&t.iconName&&o("ez-icon",{class:"ez-actions-button__icon-item",slot:"leftIcon",size:"small",iconName:t.iconName}))}}render(){var t;return o(n,null,o("ez-button",{ref:t=>this._button=t,class:(this.isTransparent?"ez-actions-button__btn-transparent":"")+(this.showLabel?" ez-actions-button__btn-label":""),label:this.showLabel&&(null===(t=this._selectedAction)||void 0===t?void 0:t.label),enabled:this.enabled,mode:this.showLabel?void 0:"icon",iconName:this.showLabel?"":this.displayIcon||"dots-vertical",size:this.size,onClick:()=>this.handlerButtonClick()},this.showLabel&&o("ez-icon",{class:"ez-actions-button__icon-right",slot:"rightIcon",iconName:this.displayIcon||"dots-vertical"})),o("section",{class:"ez-actions-button__list-container",ref:t=>this._listContainer=t},this.arrowActive&&o("div",{class:"ez-actions-button__arrow ez-actions-button__arrow--"+(this.size||"small")+(this.isTransparent?" ez-actions-button__arrow--upped":"")}),o("div",{ref:t=>this._actionsList=t,class:"ez-actions-button__actions-list ez-actions-button__actions-list--max-height"+(this.arrowActive&&!this.isTransparent?" ez-actions-button__actions-list--lowered":"")},this.actions.map((t=>this.buildActionElement(t))))))}get _element(){return s(this)}};r.style=":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-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-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)}";export{r as ez_actions_button}
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,g as r}from"./p-23a36bb6.js";import{StringUtils as o,ElementIDUtils as l}from"@sankhyalabs/core";const s=class{constructor(t){e(this,t),this.ezClick=i(this,"ezClick",7),this.ezRemove=i(this,"ezRemove",7),this.canRemove=!0,this.fileName=void 0,this.iconName=void 0,this.fileSize=void 0,this.progress=100}observeProgress(e){if(e<0||e>100)throw new Error("O progresso de upload deve ser um número entre 0 e 100.");this._element.style.setProperty("--ez-file-item--upload-progress",100-e+"%")}getFileSize(){return this.fileSize&&0!==this.fileSize?`(${o.formatBytes(this.fileSize)})`:""}getIconName(){let e;if(this.iconName)return this.iconName;if(this.fileName.indexOf(".")>-1){const i=this.fileName.lastIndexOf(".");e=this.fileName.substring(i)}return a[e]||n}render(){return this._element.title=`${this.fileName} ${this.getFileSize()}`,l.addIDInfoIfNotExists(this._element,"ezFileIcon"),t("div",{class:"box",onClick:()=>this.ezClick.emit(this.fileName)},t("div",{class:"content"},t("ez-icon",{"data-element-id":l.getInternalIDInfo("fileIcon"),class:"file-type-icon",size:"medium","icon-name":this.getIconName()}),t("label",{class:"file-name"},this.fileName),t("label",{class:"file-size"},this.getFileSize())),this.canRemove?t("ez-icon",{"data-element-id":l.getInternalIDInfo("remove"),class:"btn-remove",size:"medium","icon-name":"close",onClick:e=>{this.ezRemove.emit(this.fileName),e.stopPropagation()}}):void 0)}get _element(){return r(this)}static get watchers(){return{progress:["observeProgress"]}}},a={".exe":"exe",".gif":"gif",".mp3":"mp3",".mp4":"mp4",".pdf":"pdf",".png":"png",".txt":"txt",".zip":"zip",".docx":"docx",".xlsx":"xlsx",".pptx":"pptx"},n="generic";s.style=':host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}';export{s as ez_file_item}
1
+ import{r as e,c as i,h as t,g as r}from"./p-e4c7eb39.js";import{StringUtils as o,ElementIDUtils as l}from"@sankhyalabs/core";const s=class{constructor(t){e(this,t),this.ezClick=i(this,"ezClick",7),this.ezRemove=i(this,"ezRemove",7),this.canRemove=!0,this.fileName=void 0,this.iconName=void 0,this.fileSize=void 0,this.progress=100}observeProgress(e){if(e<0||e>100)throw new Error("O progresso de upload deve ser um número entre 0 e 100.");this._element.style.setProperty("--ez-file-item--upload-progress",100-e+"%")}getFileSize(){return this.fileSize&&0!==this.fileSize?`(${o.formatBytes(this.fileSize)})`:""}getIconName(){let e;if(this.iconName)return this.iconName;if(this.fileName.indexOf(".")>-1){const i=this.fileName.lastIndexOf(".");e=this.fileName.substring(i)}return a[e]||n}render(){return this._element.title=`${this.fileName} ${this.getFileSize()}`,l.addIDInfoIfNotExists(this._element,"ezFileIcon"),t("div",{class:"box",onClick:()=>this.ezClick.emit(this.fileName)},t("div",{class:"content"},t("ez-icon",{"data-element-id":l.getInternalIDInfo("fileIcon"),class:"file-type-icon",size:"medium","icon-name":this.getIconName()}),t("label",{class:"file-name"},this.fileName),t("label",{class:"file-size"},this.getFileSize())),this.canRemove?t("ez-icon",{"data-element-id":l.getInternalIDInfo("remove"),class:"btn-remove",size:"medium","icon-name":"close",onClick:e=>{this.ezRemove.emit(this.fileName),e.stopPropagation()}}):void 0)}get _element(){return r(this)}static get watchers(){return{progress:["observeProgress"]}}},a={".exe":"exe",".gif":"gif",".mp3":"mp3",".mp4":"mp4",".pdf":"pdf",".png":"png",".txt":"txt",".zip":"zip",".docx":"docx",".xlsx":"xlsx",".pptx":"pptx"},n="generic";s.style=':host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}';export{s as ez_file_item}
@@ -1 +1 @@
1
- import{h as t,r as i,c as e,g as s}from"./p-23a36bb6.js";import{ElementIDUtils as r,ObjectUtils as o,JSUtils as h}from"@sankhyalabs/core";const l=i=>{const{items:e,selectedItem:s,itemsHidden:o,showDropdown:h,handleShowDropdown:l,collapseConfigPosition:a,ellipsesPositionedEnd:c}=i,n=i=>t("li",Object.assign({class:"breadcrumb__item",onClick:t=>(t=>{t.stopPropagation(),l(!h)})(t)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo("ezBreadcrumbItem_ellipsis")}),c&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),t("span",{class:"ellipses__item"},"..."),c||t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),h&&t("ez-dropdown",Object.assign({class:"dropdown-ellipsis",items:o.map((t=>Object.assign(Object.assign({},t),{type:"item",children:null,iconName:t.iconName||null,subAction:null,group:null}))),onEzClick:t=>s.emit(t.detail)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo("dropdown")}`})));return t("div",{class:"breadcrumb__items"},e.map(((i,o)=>{const h=o===e.length-1;return t("div",{class:"breadcrumb__group"},a===o&&n(i),t("li",Object.assign({class:"breadcrumb__item",id:i.id},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo(`ezBreadcrumb_item_${i.id}_${i.label}`)}),i.iconName&&t("ez-icon",Object.assign({class:"breadcrumb__item--icon "+(h&&!c?"active-icon":""),size:"small",iconName:i.iconName},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconItem${i.id}`)}`})),t("p",{class:"breadcrumb__item--label "+(h&&!c?"active":""),onClick:c||!h?()=>s.emit(i):void 0},i.label),!h&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`}))),a-1===o&&c&&n(i))})))},a=class{constructor(t){i(this,t),this.selectedItem=e(this,"selectedItem",7),this._ellipsesPositionedEnd=!1,this._renderSecond=!1,this.INDEX_ITEM_TO_REMOVE=1,this.CHEVRON_SIZE=28,this.handleShowDropdown=t=>{this.showDropdown=t},this.items=[],this.fillMode="auto",this.maxItems=4,this.positionEllipsis=1,this.visibleItems=void 0,this.hiddenItems=[],this.showDropdown=!1,this.collapseConfigPosition=-1}watchPropHandler(t,i){o.objectToString(t||[])!==o.objectToString(i||[])&&this.loadItems(),"auto"===this.fillMode&&this.handleResize()}watchPropHiddenItems(){"auto"===this.fillMode&&(this.collapseConfigPosition=this.hiddenItems.length>0?1:-1)}componentDidUpdate(){this.positionDropdown(),this.setEvents()}componentWillLoad(){this.loadItems()}loadItems(){this.visibleItems=[...this.items],this.hiddenItems=[],"regular"===this.fillMode?this.configModeRegular():"auto"===this.fillMode&&this.startResize(),this.setEvents()}closeDropdown(t){const i=null==t?void 0:t.target;null!=i&&i!==this._element.shadowRoot.querySelector(".ellipses__item")&&(this.showDropdown=!1)}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}componentDidLoad(){r.addIDInfo(this._element)}componentDidRender(){"auto"===this.fillMode&&this.configResize()}configResize(){null!=this._resizeObserver&&this._resizeObserver.unobserve(this._element.parentElement),this._resizeObserver=new ResizeObserver(h.debounce(this.handleResize.bind(this),200)),this._resizeObserver.observe(this._element.parentElement)}handleResize(){if(!this._renderSecond)return void(this._renderSecond=!0);if(null==this._element.parentElement)return;let{offsetWidth:t}=this._element.parentElement,i=0;this.visibleItems.forEach((t=>i+=t.width));const e=this.collapseConfigPosition>-1?39:0;t<i+e?this.handleCollapse(t,i):t>=i+e&&this.handleExpand(t)}handleCollapse(t,i){if(this.visibleItems.length<=2)return;let e=[...this.visibleItems],s=[...this.hiddenItems],r=e[this.INDEX_ITEM_TO_REMOVE],o=!1;for(;e.length>2&&null!=r&&i>t;)o=!0,e=e.filter(((t,i)=>i!==this.INDEX_ITEM_TO_REMOVE)),s=[...s,r],i-=r.width,r=e[this.INDEX_ITEM_TO_REMOVE];o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}handleExpand(t){if(!this.hiddenItems.length)return;let i=Math.abs(this._elBreadcrumbList.offsetWidth-t),e=[...this.visibleItems],s=[...this.hiddenItems],r=s[s.length-1],o=!1;for(;r&&i>=r.width;)i-=r.width,s.pop(),e.splice(this.INDEX_ITEM_TO_REMOVE,0,r),r=s[s.length-1],o=!0;o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}configModeRegular(){if(this.visibleItems.length>this.maxItems){const t=Math.abs(this.visibleItems.length-this.maxItems);if(0===this.positionEllipsis){const i=this.visibleItems.slice(0,t);this.hiddenItems.push(...i),this.visibleItems.splice(0,t)}else if(this.positionEllipsis>=this.maxItems){const t=this.visibleItems.slice(this.maxItems);this.hiddenItems.push(...t),this.visibleItems.splice(this.maxItems),this._ellipsesPositionedEnd=!0}else{const i=this.visibleItems.splice(this.positionEllipsis,t);this.hiddenItems.push(...i)}this.collapseConfigPosition=this.positionEllipsis}}positionDropdown(){var t;const i=null===(t=this._element.shadowRoot.querySelector(".ellipses__item"))||void 0===t?void 0:t.getBoundingClientRect(),e=this._element.shadowRoot.querySelector(".dropdown-ellipsis");null!=i&&null!=e&&(e.style.top=i.y+i.height+5+"px",e.style.left=i.x+"px")}async startResize(){const t=this._element.parentElement.offsetWidth,i=await Promise.all(this.visibleItems.map((async(t,i)=>(t.width=await this.measureSizeHTMLElement(t),i===this.visibleItems.length-1&&(t.width-=this.CHEVRON_SIZE),t))));if(i.reduce(((t,i)=>t+i.width),0)>t){const e=[],s=[...i],r=s.shift(),o=s.pop();o.width+=10,e.push(r,o);let h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t);s.reverse().forEach((i=>{if(i.width<l){const i=s.shift();e.splice(1,0,i),h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t)}})),this.visibleItems=[...e],this.hiddenItems=[...s.reverse()]}}measureSizeHTMLElement(t){return new Promise((i=>{this.waitFontLoad().then((()=>{void 0===this._textMesurement&&(this._textMesurement=this._element.shadowRoot.ownerDocument.createElement("canvas"));const e=this._textMesurement.getContext("2d");e.font="14px Roboto, Algerian",i((t.iconName?19:0)+this.CHEVRON_SIZE+e.measureText(t.label).width)}))}))}waitFontLoad(){return new Promise((t=>{document.fonts.load("14px Roboto").then((()=>t()),t())}))}getItemContent(){return t("nav",{class:"breadcrumb"},t("ol",{class:"breadcrumb__list",ref:t=>this._elBreadcrumbList=t},t(l,{items:this.visibleItems,selectedItem:this.selectedItem,itemsHidden:this.hiddenItems,showDropdown:this.showDropdown,handleShowDropdown:this.handleShowDropdown,collapseConfigPosition:this.collapseConfigPosition,ellipsesPositionedEnd:this._ellipsesPositionedEnd})))}render(){return this.getItemContent()}get _element(){return s(this)}static get watchers(){return{items:["watchPropHandler"],hiddenItems:["watchPropHiddenItems"]}}};a.style=":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb{display:flex}.breadcrumb__group{display:flex}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0;overflow:hidden;white-space:nowrap}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}.breadcrumb__items{display:flex}";export{a as ez_breadcrumb}
1
+ import{h as t,r as i,c as e,g as s}from"./p-e4c7eb39.js";import{ElementIDUtils as r,ObjectUtils as o,JSUtils as h}from"@sankhyalabs/core";const l=i=>{const{items:e,selectedItem:s,itemsHidden:o,showDropdown:h,handleShowDropdown:l,collapseConfigPosition:a,ellipsesPositionedEnd:c}=i,n=i=>t("li",Object.assign({class:"breadcrumb__item",onClick:t=>(t=>{t.stopPropagation(),l(!h)})(t)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo("ezBreadcrumbItem_ellipsis")}),c&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),t("span",{class:"ellipses__item"},"..."),c||t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),h&&t("ez-dropdown",Object.assign({class:"dropdown-ellipsis",items:o.map((t=>Object.assign(Object.assign({},t),{type:"item",children:null,iconName:t.iconName||null,subAction:null,group:null}))),onEzClick:t=>s.emit(t.detail)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo("dropdown")}`})));return t("div",{class:"breadcrumb__items"},e.map(((i,o)=>{const h=o===e.length-1;return t("div",{class:"breadcrumb__group"},a===o&&n(i),t("li",Object.assign({class:"breadcrumb__item",id:i.id},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo(`ezBreadcrumb_item_${i.id}_${i.label}`)}),i.iconName&&t("ez-icon",Object.assign({class:"breadcrumb__item--icon "+(h&&!c?"active-icon":""),size:"small",iconName:i.iconName},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconItem${i.id}`)}`})),t("p",{class:"breadcrumb__item--label "+(h&&!c?"active":""),onClick:c||!h?()=>s.emit(i):void 0},i.label),!h&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`}))),a-1===o&&c&&n(i))})))},a=class{constructor(t){i(this,t),this.selectedItem=e(this,"selectedItem",7),this._ellipsesPositionedEnd=!1,this._renderSecond=!1,this.INDEX_ITEM_TO_REMOVE=1,this.CHEVRON_SIZE=28,this.handleShowDropdown=t=>{this.showDropdown=t},this.items=[],this.fillMode="auto",this.maxItems=4,this.positionEllipsis=1,this.visibleItems=void 0,this.hiddenItems=[],this.showDropdown=!1,this.collapseConfigPosition=-1}watchPropHandler(t,i){o.objectToString(t||[])!==o.objectToString(i||[])&&this.loadItems(),"auto"===this.fillMode&&this.handleResize()}watchPropHiddenItems(){"auto"===this.fillMode&&(this.collapseConfigPosition=this.hiddenItems.length>0?1:-1)}componentDidUpdate(){this.positionDropdown(),this.setEvents()}componentWillLoad(){this.loadItems()}loadItems(){this.visibleItems=[...this.items],this.hiddenItems=[],"regular"===this.fillMode?this.configModeRegular():"auto"===this.fillMode&&this.startResize(),this.setEvents()}closeDropdown(t){const i=null==t?void 0:t.target;null!=i&&i!==this._element.shadowRoot.querySelector(".ellipses__item")&&(this.showDropdown=!1)}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}componentDidLoad(){r.addIDInfo(this._element)}componentDidRender(){"auto"===this.fillMode&&this.configResize()}configResize(){null!=this._resizeObserver&&this._resizeObserver.unobserve(this._element.parentElement),this._resizeObserver=new ResizeObserver(h.debounce(this.handleResize.bind(this),200)),this._resizeObserver.observe(this._element.parentElement)}handleResize(){if(!this._renderSecond)return void(this._renderSecond=!0);if(null==this._element.parentElement)return;let{offsetWidth:t}=this._element.parentElement,i=0;this.visibleItems.forEach((t=>i+=t.width));const e=this.collapseConfigPosition>-1?39:0;t<i+e?this.handleCollapse(t,i):t>=i+e&&this.handleExpand(t)}handleCollapse(t,i){if(this.visibleItems.length<=2)return;let e=[...this.visibleItems],s=[...this.hiddenItems],r=e[this.INDEX_ITEM_TO_REMOVE],o=!1;for(;e.length>2&&null!=r&&i>t;)o=!0,e=e.filter(((t,i)=>i!==this.INDEX_ITEM_TO_REMOVE)),s=[...s,r],i-=r.width,r=e[this.INDEX_ITEM_TO_REMOVE];o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}handleExpand(t){if(!this.hiddenItems.length)return;let i=Math.abs(this._elBreadcrumbList.offsetWidth-t),e=[...this.visibleItems],s=[...this.hiddenItems],r=s[s.length-1],o=!1;for(;r&&i>=r.width;)i-=r.width,s.pop(),e.splice(this.INDEX_ITEM_TO_REMOVE,0,r),r=s[s.length-1],o=!0;o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}configModeRegular(){if(this.visibleItems.length>this.maxItems){const t=Math.abs(this.visibleItems.length-this.maxItems);if(0===this.positionEllipsis){const i=this.visibleItems.slice(0,t);this.hiddenItems.push(...i),this.visibleItems.splice(0,t)}else if(this.positionEllipsis>=this.maxItems){const t=this.visibleItems.slice(this.maxItems);this.hiddenItems.push(...t),this.visibleItems.splice(this.maxItems),this._ellipsesPositionedEnd=!0}else{const i=this.visibleItems.splice(this.positionEllipsis,t);this.hiddenItems.push(...i)}this.collapseConfigPosition=this.positionEllipsis}}positionDropdown(){var t;const i=null===(t=this._element.shadowRoot.querySelector(".ellipses__item"))||void 0===t?void 0:t.getBoundingClientRect(),e=this._element.shadowRoot.querySelector(".dropdown-ellipsis");null!=i&&null!=e&&(e.style.top=i.y+i.height+5+"px",e.style.left=i.x+"px")}async startResize(){const t=this._element.parentElement.offsetWidth,i=await Promise.all(this.visibleItems.map((async(t,i)=>(t.width=await this.measureSizeHTMLElement(t),i===this.visibleItems.length-1&&(t.width-=this.CHEVRON_SIZE),t))));if(i.reduce(((t,i)=>t+i.width),0)>t){const e=[],s=[...i],r=s.shift(),o=s.pop();o.width+=10,e.push(r,o);let h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t);s.reverse().forEach((i=>{if(i.width<l){const i=s.shift();e.splice(1,0,i),h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t)}})),this.visibleItems=[...e],this.hiddenItems=[...s.reverse()]}}measureSizeHTMLElement(t){return new Promise((i=>{this.waitFontLoad().then((()=>{void 0===this._textMesurement&&(this._textMesurement=this._element.shadowRoot.ownerDocument.createElement("canvas"));const e=this._textMesurement.getContext("2d");e.font="14px Roboto, Algerian",i((t.iconName?19:0)+this.CHEVRON_SIZE+e.measureText(t.label).width)}))}))}waitFontLoad(){return new Promise((t=>{document.fonts.load("14px Roboto").then((()=>t()),t())}))}getItemContent(){return t("nav",{class:"breadcrumb"},t("ol",{class:"breadcrumb__list",ref:t=>this._elBreadcrumbList=t},t(l,{items:this.visibleItems,selectedItem:this.selectedItem,itemsHidden:this.hiddenItems,showDropdown:this.showDropdown,handleShowDropdown:this.handleShowDropdown,collapseConfigPosition:this.collapseConfigPosition,ellipsesPositionedEnd:this._ellipsesPositionedEnd})))}render(){return this.getItemContent()}get _element(){return s(this)}static get watchers(){return{items:["watchPropHandler"],hiddenItems:["watchPropHiddenItems"]}}};a.style=":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb{display:flex}.breadcrumb__group{display:flex}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0;overflow:hidden;white-space:nowrap}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}.breadcrumb__items{display:flex}";export{a as ez_breadcrumb}
@@ -1 +1 @@
1
- import{r as t,f as e,h as i,H as o,g as s}from"./p-23a36bb6.js";import{ElementIDUtils as a}from"@sankhyalabs/core";const n=class{constructor(e){t(this,e),this._nextMessages=[],this._currentMessageInfo={message:"",fadeTime:void 0,useIcon:void 0},this._toastOpenedClass="toast__container--opened",this._lastTimeOut=void 0,this._lang="pt",this.message=void 0,this.fadeTime=5e3,this.useIcon=!1,this.canClose=!0}async show(t,i,o,s){const a=void 0!==s?s:this.canClose;return new Promise((s=>{var n;if(null===(n=this.container)||void 0===n?void 0:n.classList.contains(this._toastOpenedClass)){if(this.isRepeatedMessage(t))return;this._nextMessages.push({message:t,fadeTime:i,useIcon:o,canClose:a,callBack:s})}else this._currentMessageInfo.message=t||this.message,this._currentMessageInfo.fadeTime=i||this.fadeTime,this._currentMessageInfo.useIcon=o||this.useIcon,this._currentMessageInfo.callBack=s,a&&(this._currentMessageInfo.canClose=a),e(this),this.displayToast(),this._lastTimeOut=setTimeout((()=>{this.hideToast()}),this._currentMessageInfo.fadeTime+400)}))}hideToast(){this.makeToastInvisible(),this._nextMessages.length>0&&(this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0),setTimeout((()=>{let t=this._nextMessages.shift();this.show(t.message,t.fadeTime,t.useIcon)}))),this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0)}isRepeatedMessage(t){var e,i;return(null===(e=this._nextMessages)||void 0===e?void 0:e.some((e=>e.message===t)))||(null===(i=this._currentMessageInfo)||void 0===i?void 0:i.message)===t}makeToastInvisible(){this.container.classList.remove(this._toastOpenedClass),this.container.style.animation="none",this._lastTimeOut&&clearTimeout(this._lastTimeOut)}displayToast(){this.container.classList.add(this._toastOpenedClass),this.container.style.animation=`fadein 0.5s, fadeout 0.5s ${this.fadeTime/1e3}s`}buildDataElementId(){var t,e;const i=a.addIDInfo(this._element),o=a.DATA_ELEMENT_ID_ATTRIBUTE_NAME;null===(t=this._elemBtnClose)||void 0===t||t.setAttribute(o,`${i}_buttonClose`),null===(e=this._elemText)||void 0===e||e.setAttribute(o,`${i}_title`)}componentDidLoad(){this.buildDataElementId()}render(){return i(o,null,i("div",{ref:t=>this.container=t,class:"toast__container"},this._currentMessageInfo.useIcon&&i("slot",{name:"icon"}),i("div",{lang:this._lang,ref:t=>this._elemText=t,class:this._currentMessageInfo.useIcon?"message__container message__container--icon":"message__container",title:this._currentMessageInfo.message,innerHTML:this._currentMessageInfo.message}),this._currentMessageInfo.canClose&&i("button",{class:"btn-close",onClick:()=>{this.hideToast()},ref:t=>this._elemBtnClose=t})))}get _element(){return s(this)}};n.style=':host{--ez-toast__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, "Roboto")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}';export{n as ez_toast}
1
+ import{r as t,f as e,h as i,H as o,g as s}from"./p-e4c7eb39.js";import{ElementIDUtils as a}from"@sankhyalabs/core";const n=class{constructor(e){t(this,e),this._nextMessages=[],this._currentMessageInfo={message:"",fadeTime:void 0,useIcon:void 0},this._toastOpenedClass="toast__container--opened",this._lastTimeOut=void 0,this._lang="pt",this.message=void 0,this.fadeTime=5e3,this.useIcon=!1,this.canClose=!0}async show(t,i,o,s){const a=void 0!==s?s:this.canClose;return new Promise((s=>{var n;if(null===(n=this.container)||void 0===n?void 0:n.classList.contains(this._toastOpenedClass)){if(this.isRepeatedMessage(t))return;this._nextMessages.push({message:t,fadeTime:i,useIcon:o,canClose:a,callBack:s})}else this._currentMessageInfo.message=t||this.message,this._currentMessageInfo.fadeTime=i||this.fadeTime,this._currentMessageInfo.useIcon=o||this.useIcon,this._currentMessageInfo.callBack=s,a&&(this._currentMessageInfo.canClose=a),e(this),this.displayToast(),this._lastTimeOut=setTimeout((()=>{this.hideToast()}),this._currentMessageInfo.fadeTime+400)}))}hideToast(){this.makeToastInvisible(),this._nextMessages.length>0&&(this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0),setTimeout((()=>{let t=this._nextMessages.shift();this.show(t.message,t.fadeTime,t.useIcon)}))),this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0)}isRepeatedMessage(t){var e,i;return(null===(e=this._nextMessages)||void 0===e?void 0:e.some((e=>e.message===t)))||(null===(i=this._currentMessageInfo)||void 0===i?void 0:i.message)===t}makeToastInvisible(){this.container.classList.remove(this._toastOpenedClass),this.container.style.animation="none",this._lastTimeOut&&clearTimeout(this._lastTimeOut)}displayToast(){this.container.classList.add(this._toastOpenedClass),this.container.style.animation=`fadein 0.5s, fadeout 0.5s ${this.fadeTime/1e3}s`}buildDataElementId(){var t,e;const i=a.addIDInfo(this._element),o=a.DATA_ELEMENT_ID_ATTRIBUTE_NAME;null===(t=this._elemBtnClose)||void 0===t||t.setAttribute(o,`${i}_buttonClose`),null===(e=this._elemText)||void 0===e||e.setAttribute(o,`${i}_title`)}componentDidLoad(){this.buildDataElementId()}render(){return i(o,null,i("div",{ref:t=>this.container=t,class:"toast__container"},this._currentMessageInfo.useIcon&&i("slot",{name:"icon"}),i("div",{lang:this._lang,ref:t=>this._elemText=t,class:this._currentMessageInfo.useIcon?"message__container message__container--icon":"message__container",title:this._currentMessageInfo.message,innerHTML:this._currentMessageInfo.message}),this._currentMessageInfo.canClose&&i("button",{class:"btn-close",onClick:()=>{this.hideToast()},ref:t=>this._elemBtnClose=t})))}get _element(){return s(this)}};n.style=':host{--ez-toast__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, "Roboto")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}';export{n as ez_toast}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e}from"./p-23a36bb6.js";import{UserInterface as s}from"@sankhyalabs/core";const l=window,o=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),n=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){this.canShow(t)&&(await this.hide(),this.fieldDescriptor=this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t.filteredOptions),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),l.dispatchEvent(o),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){const i=this.hasToUseOptions();if(i)return this.useOptions=i,void(this.options=i?this.buildOptions(t):null!=t?t:null);const e=await this.dataSource.getStaticOptions(this.columnName);if(null!=e){const i=new Set((t||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===i.size?e:e.map((t=>Object.assign(Object.assign({},t),{check:i.has(t.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};n.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{n as filter_column}
1
+ import{r as t,c as i,h as e}from"./p-e4c7eb39.js";import{UserInterface as s}from"@sankhyalabs/core";const l=window,o=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),n=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){this.canShow(t)&&(await this.hide(),this.fieldDescriptor=this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t.filteredOptions),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),l.dispatchEvent(o),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){const i=this.hasToUseOptions();if(i)return this.useOptions=i,void(this.options=i?this.buildOptions(t):null!=t?t:null);const e=await this.dataSource.getStaticOptions(this.columnName);if(null!=e){const i=new Set((t||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===i.size?e:e.map((t=>Object.assign(Object.assign({},t),{check:i.has(t.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};n.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{n as filter_column}
@@ -1 +1 @@
1
- import{r as t,h as e,H as i}from"./p-23a36bb6.js";import"./p-2187f86c.js";import{C as s}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"@sankhyalabs/core";import"./p-5895e687.js";import"./p-173f68ea.js";const a=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1,this.size=void 0,this.structural=!1}toggleExpandItem(){var t,e;this._expanded=!this._expanded,null===(e=null===(t=this.expandButtonRef.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.blur()}componentDidLoad(){s.applyVarsGrid(this._element,this._slot.children[0])}render(){return e(i,{class:`box_split-item ${this._expanded?"expanded__item":""} ${this.structural?"structural__item":"content__item"}`,ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("slot",{name:"leftButtons"}),e("div",{class:"ez-split-item--header-title"},this.label&&e("h3",{class:"ez-text ez-text--primary ez-title ez-title--medium ez-margin--small",title:this.label},this.label)),e("div",{class:"ez-split-item--header-buttons"},e("slot",{name:"rightButtons"}),this.enableExpand&&e("ez-button",{ref:t=>this.expandButtonRef=t,size:"small",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this._expanded?"Resumir":"Expandir"}))),e("div",{class:"ez-split-item--content grid_height-0",ref:t=>this._slot=t},e("slot",null)))}};a.style=".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";export{a as ez_split_item}
1
+ import{r as t,h as e,H as i}from"./p-e4c7eb39.js";import"./p-2187f86c.js";import{C as s}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"@sankhyalabs/core";import"./p-5895e687.js";import"./p-173f68ea.js";const a=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1,this.size=void 0,this.structural=!1}toggleExpandItem(){var t,e;this._expanded=!this._expanded,null===(e=null===(t=this.expandButtonRef.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.blur()}componentDidLoad(){s.applyVarsGrid(this._element,this._slot.children[0])}render(){return e(i,{class:`box_split-item ${this._expanded?"expanded__item":""} ${this.structural?"structural__item":"content__item"}`,ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("slot",{name:"leftButtons"}),e("div",{class:"ez-split-item--header-title"},this.label&&e("h3",{class:"ez-text ez-text--primary ez-title ez-title--medium ez-margin--small",title:this.label},this.label)),e("div",{class:"ez-split-item--header-buttons"},e("slot",{name:"rightButtons"}),this.enableExpand&&e("ez-button",{ref:t=>this.expandButtonRef=t,size:"small",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this._expanded?"Resumir":"Expandir"}))),e("div",{class:"ez-split-item--content grid_height-0",ref:t=>this._slot=t},e("slot",null)))}};a.style=".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";export{a as ez_split_item}
@@ -1 +1 @@
1
- import{r as t,h as o,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const i=class{constructor(o){t(this,o),this.label=void 0,this.enabled=!0,this.mode="regular",this.image=void 0,this.iconName=void 0,this.size=void 0}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}clickListener(t){this.enabled||t.stopImmediatePropagation()}componentDidLoad(){this._element&&n.addIDInfo(this._element),this._button&&n.addIDInfo(this._button,"button",{id:"embedded"})}getButtonSize(t="medium"){const o=this.size&&this.size.toLowerCase();return["x-small","small","medium","large"].includes(o)?o:t}getIconSize(t="medium"){const o=this.size&&this.size.toLowerCase(),e="x-small"===o?"small":o;return["small","medium","large"].includes(e)?e:t}handleSlotChange(t){const o=t.target,e=o.assignedElements()[0];e&&("link"==this.mode?(e.style.display="inline","leftIcon"==o.name?e.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==o.name&&(e.style.paddingLeft="var(--ez-button__inline__icon--padding)")):e.style.setProperty("--ez-icon--color","var(--ez-icon--color)"))}render(){return"icon"==this.mode?o("button",{class:"btn-icon "+(this.getButtonSize()?`btn-icon--${this.getButtonSize()}`:""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})):"label-icon"==this.mode?o("div",{class:"label-icon"},o("button",{class:"btn-icon "+(this.getButtonSize()?`btn-icon--${this.getButtonSize()}`:""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})),o("label",{title:this.label},this.label)):"link"==this.mode?o("a",{class:`${this.getIconSize()} ${this.enabled?"":"disabled"}`,ref:t=>this._button=t},o("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,o("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}})):o("button",{class:this.getButtonSize(""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,o("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}))}get _element(){return e(this)}};i.style=":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #2B3A54);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large, 500);--ez-button--background-color:var(--background--light, #ffffff);--ez-button--border-radius:var(--border--radius-large, 24px);--ez-button--border:1px solid var(--color--strokes);--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600, #007a5a);--ez-button--hover--background-color:var(--background--light, #ffffff);--ez-button--disabled-color:var(--text--primary);--ez-button--disabled--background-color:var(--background--medium);--ez-button--focus--border:var(--border--medium, 2px solid) var(--color--primary-300);--ez-button--focus--box-shadow:var(--color--primary-300) 0px 0px 0px 2px;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--text--secondary, #a2abb9);--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:none}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.x-small{height:28px;--ez-button--font-size:var(--text--small, 12px)}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--x-small{width:28px;min-width:28px;height:28px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";export{i as ez_button}
1
+ import{r as t,h as o,g as e}from"./p-e4c7eb39.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const i=class{constructor(o){t(this,o),this.label=void 0,this.enabled=!0,this.mode="regular",this.image=void 0,this.iconName=void 0,this.size=void 0}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}clickListener(t){this.enabled||t.stopImmediatePropagation()}componentDidLoad(){this._element&&n.addIDInfo(this._element),this._button&&n.addIDInfo(this._button,"button",{id:"embedded"})}getButtonSize(t="medium"){const o=this.size&&this.size.toLowerCase();return["x-small","small","medium","large"].includes(o)?o:t}getIconSize(t="medium"){const o=this.size&&this.size.toLowerCase(),e="x-small"===o?"small":o;return["small","medium","large"].includes(e)?e:t}handleSlotChange(t){const o=t.target,e=o.assignedElements()[0];e&&("link"==this.mode?(e.style.display="inline","leftIcon"==o.name?e.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==o.name&&(e.style.paddingLeft="var(--ez-button__inline__icon--padding)")):e.style.setProperty("--ez-icon--color","var(--ez-icon--color)"))}render(){return"icon"==this.mode?o("button",{class:"btn-icon "+(this.getButtonSize()?`btn-icon--${this.getButtonSize()}`:""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})):"label-icon"==this.mode?o("div",{class:"label-icon"},o("button",{class:"btn-icon "+(this.getButtonSize()?`btn-icon--${this.getButtonSize()}`:""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize()})),o("label",{title:this.label},this.label)):"link"==this.mode?o("a",{class:`${this.getIconSize()} ${this.enabled?"":"disabled"}`,ref:t=>this._button=t},o("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,o("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}})):o("button",{class:this.getButtonSize(""),type:"button",disabled:!this.enabled,ref:t=>this._button=t},o("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,o("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}))}get _element(){return e(this)}};i.style=":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #2B3A54);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large, 500);--ez-button--background-color:var(--background--light, #ffffff);--ez-button--border-radius:var(--border--radius-large, 24px);--ez-button--border:1px solid var(--color--strokes);--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600, #007a5a);--ez-button--hover--background-color:var(--background--light, #ffffff);--ez-button--disabled-color:var(--text--primary);--ez-button--disabled--background-color:var(--background--medium);--ez-button--focus--border:var(--border--medium, 2px solid) var(--color--primary-300);--ez-button--focus--box-shadow:var(--color--primary-300) 0px 0px 0px 2px;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--text--secondary, #a2abb9);--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:none}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.x-small{height:28px;--ez-button--font-size:var(--text--small, 12px)}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--x-small{width:28px;min-width:28px;height:28px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";export{i as ez_button}
@@ -1 +1 @@
1
- import{r as e,h as o,H as n,g as t}from"./p-23a36bb6.js";import{StringUtils as c,ElementIDUtils as i}from"@sankhyalabs/core";const a=class{constructor(o){e(this,o),this.size="medium",this.href=void 0,this.iconName=void 0}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):c.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}componentDidLoad(){i.addIDInfo(this._hostElement,"icon")}render(){return o(n,null,this.getIconContent())}get _hostElement(){return t(this)}};a.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:"\\ea01"}.ez-icon-2chevron-up:before{content:"\\ea02"}.ez-icon-acao:before{content:"\\ea03"}.ez-icon-account-outline:before{content:"\\ea04"}.ez-icon-account:before{content:"\\ea05"}.ez-icon-add-to-cart:before{content:"\\ea06"}.ez-icon-alert-circle-inverted:before{content:"\\ea07"}.ez-icon-alert-circle:before{content:"\\ea08"}.ez-icon-alert-mail:before{content:"\\ea09"}.ez-icon-alert-popup:before{content:"\\ea0a"}.ez-icon-anexo:before{content:"\\ea0b"}.ez-icon-antecipação:before{content:"\\ea0c"}.ez-icon-apps:before{content:"\\ea0d"}.ez-icon-arrow-forward:before{content:"\\ea0e"}.ez-icon-arrow-upward:before{content:"\\ea0f"}.ez-icon-arrow_back:before{content:"\\ea10"}.ez-icon-arrow_downward:before{content:"\\ea11"}.ez-icon-baixa:before{content:"\\ea12"}.ez-icon-balance:before{content:"\\ea13"}.ez-icon-bell-inverted:before{content:"\\ea14"}.ez-icon-bell:before{content:"\\ea15"}.ez-icon-boleto:before{content:"\\ea16"}.ez-icon-boolean:before{content:"\\ea17"}.ez-icon-business-center:before{content:"\\ea18"}.ez-icon-calendar-clock:before{content:"\\ea19"}.ez-icon-calendar:before{content:"\\ea1a"}.ez-icon-cart-history:before{content:"\\ea1b"}.ez-icon-cash-remove:before{content:"\\ea1c"}.ez-icon-check-circle-inverted:before{content:"\\ea1d"}.ez-icon-check-circle:before{content:"\\ea1e"}.ez-icon-check:before{content:"\\ea1f"}.ez-icon-chevron-down:before{content:"\\ea20"}.ez-icon-chevron-left:before{content:"\\ea21"}.ez-icon-chevron-right:before{content:"\\ea22"}.ez-icon-chevron-up:before{content:"\\ea23"}.ez-icon-circle--medium:before{content:"\\ea24"}.ez-icon-circle:before{content:"\\ea25"}.ez-icon-clean-cart:before{content:"\\ea26"}.ez-icon-cleaning:before{content:"\\ea27"}.ez-icon-clipboard:before{content:"\\ea28"}.ez-icon-clock-rotate-left:before{content:"\\ea29"}.ez-icon-close:before{content:"\\ea2a"}.ez-icon-cobrar:before{content:"\\ea2b"}.ez-icon-code:before{content:"\\ea2c"}.ez-icon-configuration:before{content:"\\ea2d"}.ez-icon-content-cut:before{content:"\\ea2e"}.ez-icon-copy:before{content:"\\ea2f"}.ez-icon-credit_card:before{content:"\\ea30"}.ez-icon-crop:before{content:"\\ea31"}.ez-icon-custom:before{content:"\\ea32"}.ez-icon-delete-file:before{content:"\\ea33"}.ez-icon-delete:before{content:"\\ea34"}.ez-icon-description:before{content:"\\ea35"}.ez-icon-dividir:before{content:"\\ea36"}.ez-icon-docx:before{content:"\\ea37"}.ez-icon-dot-notification:before{content:"\\ea38"}.ez-icon-dots-horizontal:before{content:"\\ea39"}.ez-icon-dots-vertical:before{content:"\\ea3a"}.ez-icon-drag-indicator:before{content:"\\ea3b"}.ez-icon-dual-chevron-down:before{content:"\\ea3c"}.ez-icon-dual-chevron-left:before{content:"\\ea3d"}.ez-icon-dual-chevron-right:before{content:"\\ea3e"}.ez-icon-dual-chevron-up:before{content:"\\ea3f"}.ez-icon-edit-file:before{content:"\\ea40"}.ez-icon-edit-table:before{content:"\\ea41"}.ez-icon-edit-time:before{content:"\\ea42"}.ez-icon-edit-value:before{content:"\\ea43"}.ez-icon-edit:before{content:"\\ea44"}.ez-icon-email:before{content:"\\ea45"}.ez-icon-estorno:before{content:"\\ea46"}.ez-icon-exe:before{content:"\\ea47"}.ez-icon-expand:before{content:"\\ea48"}.ez-icon-expandir_card:before{content:"\\ea49"}.ez-icon-extrato:before{content:"\\ea4a"}.ez-icon-eye-off:before{content:"\\ea4b"}.ez-icon-eye:before{content:"\\ea4c"}.ez-icon-favorite:before{content:"\\ea4d"}.ez-icon-figma:before{content:"\\ea4e"}.ez-icon-file-download:before{content:"\\ea4f"}.ez-icon-file-upload:before{content:"\\ea50"}.ez-icon-filter:before{content:"\\ea51"}.ez-icon-find-file:before{content:"\\ea52"}.ez-icon-find-page:before{content:"\\ea53"}.ez-icon-format-color-fill:before{content:"\\ea54"}.ez-icon-generic:before{content:"\\ea55"}.ez-icon-gif:before{content:"\\ea56"}.ez-icon-graph_bar:before{content:"\\ea57"}.ez-icon-handshake:before{content:"\\ea58"}.ez-icon-help-inverted:before{content:"\\ea59"}.ez-icon-help:before{content:"\\ea5a"}.ez-icon-hide-list:before{content:"\\ea5b"}.ez-icon-hide_menu:before{content:"\\ea5c"}.ez-icon-hierarchical-tree:before{content:"\\ea5d"}.ez-icon-home:before{content:"\\ea5e"}.ez-icon-icons104:before{content:"\\ea5f"}.ez-icon-language:before{content:"\\ea60"}.ez-icon-launch:before{content:"\\ea61"}.ez-icon-lightbulb:before{content:"\\ea62"}.ez-icon-list:before{content:"\\ea63"}.ez-icon-location:before{content:"\\ea64"}.ez-icon-lock-outline:before{content:"\\ea65"}.ez-icon-lock:before{content:"\\ea66"}.ez-icon-menu:before{content:"\\ea67"}.ez-icon-mid:before{content:"\\ea68"}.ez-icon-minus:before{content:"\\ea69"}.ez-icon-money-off:before{content:"\\ea6a"}.ez-icon-money:before{content:"\\ea6b"}.ez-icon-more:before{content:"\\ea6c"}.ez-icon-mp3:before{content:"\\ea6d"}.ez-icon-mp4:before{content:"\\ea6e"}.ez-icon-multiple-files:before{content:"\\ea6f"}.ez-icon-north-west:before{content:"\\ea70"}.ez-icon-number:before{content:"\\ea71"}.ez-icon-ordem-ascendente:before{content:"\\ea72"}.ez-icon-ordem-descendente:before{content:"\\ea73"}.ez-icon-parcelar:before{content:"\\ea74"}.ez-icon-pause:before{content:"\\ea75"}.ez-icon-payments:before{content:"\\ea76"}.ez-icon-pdf:before{content:"\\ea77"}.ez-icon-play:before{content:"\\ea78"}.ez-icon-plus:before{content:"\\ea79"}.ez-icon-png:before{content:"\\ea7a"}.ez-icon-power:before{content:"\\ea7b"}.ez-icon-pptx:before{content:"\\ea7c"}.ez-icon-preview:before{content:"\\ea7d"}.ez-icon-print:before{content:"\\ea7e"}.ez-icon-push-pin:before{content:"\\ea7f"}.ez-icon-rateio:before{content:"\\ea80"}.ez-icon-receipt:before{content:"\\ea81"}.ez-icon-recolher_card:before{content:"\\ea82"}.ez-icon-remove-from-cart:before{content:"\\ea83"}.ez-icon-restore:before{content:"\\ea84"}.ez-icon-return:before{content:"\\ea85"}.ez-icon-sankhya-place:before{content:"\\ea86"}.ez-icon-save:before{content:"\\ea87"}.ez-icon-search:before{content:"\\ea88"}.ez-icon-settings-inverted:before{content:"\\ea89"}.ez-icon-settings:before{content:"\\ea8a"}.ez-icon-share:before{content:"\\ea8b"}.ez-icon-shield:before{content:"\\ea8c"}.ez-icon-show-list:before{content:"\\ea8d"}.ez-icon-show_menu:before{content:"\\ea8e"}.ez-icon-south-east:before{content:"\\ea8f"}.ez-icon-sync:before{content:"\\ea90"}.ez-icon-table:before{content:"\\ea91"}.ez-icon-tag_code:before{content:"\\ea92"}.ez-icon-text:before{content:"\\ea93"}.ez-icon-timeline:before{content:"\\ea94"}.ez-icon-timer-outline:before{content:"\\ea95"}.ez-icon-trending-up:before{content:"\\ea96"}.ez-icon-tune:before{content:"\\ea97"}.ez-icon-txt:before{content:"\\ea98"}.ez-icon-un-pin:before{content:"\\ea99"}.ez-icon-unfold_less:before{content:"\\ea9a"}.ez-icon-unfold_more:before{content:"\\ea9b"}.ez-icon-user-circle:before{content:"\\ea9c"}.ez-icon-warning-outline:before{content:"\\ea9d"}.ez-icon-warning_triangle:before{content:"\\ea9e"}.ez-icon-whatshot:before{content:"\\ea9f"}.ez-icon-xlsx:before{content:"\\eaa0"}.ez-icon-zip:before{content:"\\eaa1"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';export{a as ez_icon}
1
+ import{r as e,h as o,H as n,g as t}from"./p-e4c7eb39.js";import{StringUtils as c,ElementIDUtils as i}from"@sankhyalabs/core";const r=class{constructor(o){e(this,o),this.size="medium",this.href=void 0,this.iconName=void 0}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):c.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}componentDidLoad(){i.addIDInfo(this._hostElement,"icon")}render(){return o(n,null,this.getIconContent())}get _hostElement(){return t(this)}};r.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:"\\ea01"}.ez-icon-2chevron-up:before{content:"\\ea02"}.ez-icon-acao:before{content:"\\ea03"}.ez-icon-account-outline:before{content:"\\ea04"}.ez-icon-account:before{content:"\\ea05"}.ez-icon-add-to-cart:before{content:"\\ea06"}.ez-icon-alert-circle-inverted:before{content:"\\ea07"}.ez-icon-alert-circle:before{content:"\\ea08"}.ez-icon-alert-mail:before{content:"\\ea09"}.ez-icon-alert-popup:before{content:"\\ea0a"}.ez-icon-anexo:before{content:"\\ea0b"}.ez-icon-antecipação:before{content:"\\ea0c"}.ez-icon-apps:before{content:"\\ea0d"}.ez-icon-arrow-forward:before{content:"\\ea0e"}.ez-icon-arrow-upward:before{content:"\\ea0f"}.ez-icon-arrow_back:before{content:"\\ea10"}.ez-icon-arrow_downward:before{content:"\\ea11"}.ez-icon-baixa:before{content:"\\ea12"}.ez-icon-balance:before{content:"\\ea13"}.ez-icon-bell-inverted:before{content:"\\ea14"}.ez-icon-bell:before{content:"\\ea15"}.ez-icon-boleto:before{content:"\\ea16"}.ez-icon-boolean:before{content:"\\ea17"}.ez-icon-business-center:before{content:"\\ea18"}.ez-icon-calendar-clock:before{content:"\\ea19"}.ez-icon-calendar:before{content:"\\ea1a"}.ez-icon-cart-history:before{content:"\\ea1b"}.ez-icon-cash-remove:before{content:"\\ea1c"}.ez-icon-check-circle-inverted:before{content:"\\ea1d"}.ez-icon-check-circle:before{content:"\\ea1e"}.ez-icon-check:before{content:"\\ea1f"}.ez-icon-chevron-down:before{content:"\\ea20"}.ez-icon-chevron-left:before{content:"\\ea21"}.ez-icon-chevron-right:before{content:"\\ea22"}.ez-icon-chevron-up:before{content:"\\ea23"}.ez-icon-circle--medium:before{content:"\\ea24"}.ez-icon-circle:before{content:"\\ea25"}.ez-icon-clean-cart:before{content:"\\ea26"}.ez-icon-cleaning:before{content:"\\ea27"}.ez-icon-clipboard:before{content:"\\ea28"}.ez-icon-clock-rotate-left:before{content:"\\ea29"}.ez-icon-close:before{content:"\\ea2a"}.ez-icon-cobrar:before{content:"\\ea2b"}.ez-icon-code:before{content:"\\ea2c"}.ez-icon-configuration:before{content:"\\ea2d"}.ez-icon-content-cut:before{content:"\\ea2e"}.ez-icon-copy:before{content:"\\ea2f"}.ez-icon-credit_card:before{content:"\\ea30"}.ez-icon-crop:before{content:"\\ea31"}.ez-icon-custom:before{content:"\\ea32"}.ez-icon-delete-file:before{content:"\\ea33"}.ez-icon-delete:before{content:"\\ea34"}.ez-icon-description:before{content:"\\ea35"}.ez-icon-dividir:before{content:"\\ea36"}.ez-icon-docx:before{content:"\\ea37"}.ez-icon-dot-notification:before{content:"\\ea38"}.ez-icon-dots-horizontal:before{content:"\\ea39"}.ez-icon-dots-vertical:before{content:"\\ea3a"}.ez-icon-drag-indicator:before{content:"\\ea3b"}.ez-icon-dual-chevron-down:before{content:"\\ea3c"}.ez-icon-dual-chevron-left:before{content:"\\ea3d"}.ez-icon-dual-chevron-right:before{content:"\\ea3e"}.ez-icon-dual-chevron-up:before{content:"\\ea3f"}.ez-icon-edit-file:before{content:"\\ea40"}.ez-icon-edit-table:before{content:"\\ea41"}.ez-icon-edit-time:before{content:"\\ea42"}.ez-icon-edit-value:before{content:"\\ea43"}.ez-icon-edit:before{content:"\\ea44"}.ez-icon-email:before{content:"\\ea45"}.ez-icon-estorno:before{content:"\\ea46"}.ez-icon-exe:before{content:"\\ea47"}.ez-icon-expand:before{content:"\\ea48"}.ez-icon-expandir_card:before{content:"\\ea49"}.ez-icon-extrato:before{content:"\\ea4a"}.ez-icon-eye-off:before{content:"\\ea4b"}.ez-icon-eye:before{content:"\\ea4c"}.ez-icon-favorite:before{content:"\\ea4d"}.ez-icon-figma:before{content:"\\ea4e"}.ez-icon-file-download:before{content:"\\ea4f"}.ez-icon-file-upload:before{content:"\\ea50"}.ez-icon-filter:before{content:"\\ea51"}.ez-icon-find-file:before{content:"\\ea52"}.ez-icon-find-page:before{content:"\\ea53"}.ez-icon-format-color-fill:before{content:"\\ea54"}.ez-icon-generic:before{content:"\\ea55"}.ez-icon-gif:before{content:"\\ea56"}.ez-icon-graph_bar:before{content:"\\ea57"}.ez-icon-handshake:before{content:"\\ea58"}.ez-icon-help-inverted:before{content:"\\ea59"}.ez-icon-help:before{content:"\\ea5a"}.ez-icon-hide-list:before{content:"\\ea5b"}.ez-icon-hide_menu:before{content:"\\ea5c"}.ez-icon-hierarchical-tree:before{content:"\\ea5d"}.ez-icon-home:before{content:"\\ea5e"}.ez-icon-icons104:before{content:"\\ea5f"}.ez-icon-language:before{content:"\\ea60"}.ez-icon-launch:before{content:"\\ea61"}.ez-icon-lightbulb:before{content:"\\ea62"}.ez-icon-list:before{content:"\\ea63"}.ez-icon-location:before{content:"\\ea64"}.ez-icon-lock-outline:before{content:"\\ea65"}.ez-icon-lock:before{content:"\\ea66"}.ez-icon-menu:before{content:"\\ea67"}.ez-icon-mid:before{content:"\\ea68"}.ez-icon-minus:before{content:"\\ea69"}.ez-icon-money-off:before{content:"\\ea6a"}.ez-icon-money:before{content:"\\ea6b"}.ez-icon-more:before{content:"\\ea6c"}.ez-icon-mp3:before{content:"\\ea6d"}.ez-icon-mp4:before{content:"\\ea6e"}.ez-icon-multiple-files:before{content:"\\ea6f"}.ez-icon-north-west:before{content:"\\ea70"}.ez-icon-number:before{content:"\\ea71"}.ez-icon-ordem-ascendente:before{content:"\\ea72"}.ez-icon-ordem-descendente:before{content:"\\ea73"}.ez-icon-parcelar:before{content:"\\ea74"}.ez-icon-pause:before{content:"\\ea75"}.ez-icon-payments:before{content:"\\ea76"}.ez-icon-pdf:before{content:"\\ea77"}.ez-icon-play:before{content:"\\ea78"}.ez-icon-plus:before{content:"\\ea79"}.ez-icon-png:before{content:"\\ea7a"}.ez-icon-power:before{content:"\\ea7b"}.ez-icon-pptx:before{content:"\\ea7c"}.ez-icon-preview:before{content:"\\ea7d"}.ez-icon-print:before{content:"\\ea7e"}.ez-icon-push-pin:before{content:"\\ea7f"}.ez-icon-rateio:before{content:"\\ea80"}.ez-icon-receipt:before{content:"\\ea81"}.ez-icon-recolher_card:before{content:"\\ea82"}.ez-icon-remove-from-cart:before{content:"\\ea83"}.ez-icon-restore:before{content:"\\ea84"}.ez-icon-return:before{content:"\\ea85"}.ez-icon-sankhya-place:before{content:"\\ea86"}.ez-icon-save:before{content:"\\ea87"}.ez-icon-search:before{content:"\\ea88"}.ez-icon-settings-inverted:before{content:"\\ea89"}.ez-icon-settings:before{content:"\\ea8a"}.ez-icon-share:before{content:"\\ea8b"}.ez-icon-shield:before{content:"\\ea8c"}.ez-icon-show-list:before{content:"\\ea8d"}.ez-icon-show_menu:before{content:"\\ea8e"}.ez-icon-south-east:before{content:"\\ea8f"}.ez-icon-sync:before{content:"\\ea90"}.ez-icon-table:before{content:"\\ea91"}.ez-icon-tag_code:before{content:"\\ea92"}.ez-icon-text:before{content:"\\ea93"}.ez-icon-timeline:before{content:"\\ea94"}.ez-icon-timer-outline:before{content:"\\ea95"}.ez-icon-trending-up:before{content:"\\ea96"}.ez-icon-tune:before{content:"\\ea97"}.ez-icon-txt:before{content:"\\ea98"}.ez-icon-un-pin:before{content:"\\ea99"}.ez-icon-unfold_less:before{content:"\\ea9a"}.ez-icon-unfold_more:before{content:"\\ea9b"}.ez-icon-user-circle:before{content:"\\ea9c"}.ez-icon-warning-outline:before{content:"\\ea9d"}.ez-icon-warning_triangle:before{content:"\\ea9e"}.ez-icon-whatshot:before{content:"\\ea9f"}.ez-icon-xlsx:before{content:"\\eaa0"}.ez-icon-zip:before{content:"\\eaa1"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';export{r as ez_icon}
@@ -1 +1 @@
1
- import{r as t,h as e,H as i,g as n}from"./p-23a36bb6.js";import{FloatingManager as a,ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(e){t(this,e),this._container=void 0,this.alerts=[],this.enableDragAndDrop=void 0,this.enableExpand=!0,this.itemRightSlotBuilder=void 0,this.opened=!0,this.expanded=!1}observeOpened(){this.opened&&this.manageOverlay()}alertId(t,e){return`alert-${e}-${(t=>{var e;return null!==(e=null==t?void 0:t.split(" ").join("-"))&&void 0!==e?e:""})(t)}`}getAlertTitle(t){var e;return null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t)))||void 0===e?void 0:e.title}getLinkActionClick(t){var e;return(null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t.id)))||void 0===e?void 0:e.onClickLink)||(()=>{})}getTitleText(t){var e;const i=null!==(e=this.getAlertTitle(t.id))&&void 0!==e?e:"";return`${i}${i&&t.label?":":""}`}toggleExpandContainer(){this.enableExpand&&(this.expanded=!this.expanded,this._container.classList.toggle("expanded",this.expanded),this.expanded?this.updatePosition(this.getBoundingRight(),this.getBoundingBottom()):this.updatePosition("10px","10px"))}manageOverlay(){if(this.opened&&this._container)this._overlayId=a.float(this._container,this._overlayRef,this.getFloatOptions());else{if(void 0===this._overlayId)return;a.close(this._overlayId),this._overlayId=void 0}}updatePosition(t,e){this.opened&&a.updateFloatPosition(this._container,this._overlayRef,Object.assign(Object.assign({},this.getFloatOptions()),{right:t,bottom:e}))}getFloatOptions(){return{autoClose:!1,isFixed:!0,bottom:"10px",right:"10px"}}getBoundingRight(){return(document.body.clientWidth-this._container.getBoundingClientRect().width)/2+"px"}getBoundingBottom(){return(document.body.clientHeight-this._container.getBoundingClientRect().height)/2+"px"}componentDidLoad(){this.manageOverlay(),this.opened&&this._container&&this._container.focus()}componentWillLoad(){this.dataElementId=o.addIDInfo(this._element,"EzAlertList")}render(){return e(i,Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId}),this.opened?e("div",{ref:t=>this._overlayRef=t},e("div",{class:"alert-list__container "+(this.expanded?"expanded":""),ref:t=>this._container=t},e("div",{class:"alert-list__content"},e("div",{class:"alert-list__header"},e("div",{class:"alert-list__title"},`Avisos (${this.alerts.length})`),e("div",{class:"alert-list__header__buttons"},this.enableExpand&&e("ez-button",{mode:"icon",size:"small",iconName:"expand",onClick:()=>this.toggleExpandContainer(),"data-element-id":o.getInternalIDInfo("expandButton"),title:this.expanded?"Resumir":"Expandir"}),e("ez-button",{mode:"icon",size:"small",iconName:"close","data-element-id":o.getInternalIDInfo("closeButton"),onClick:()=>{this.opened=!1},title:"Fechar"}))),e("div",{class:"alert-list__expandable-content"},e("ez-list",{itemSlotBuilder:this.itemRightSlotBuilder,hoverFeedback:!0,itemLeftSlotBuilder:t=>e("a",{onClick:this.getLinkActionClick(t),style:{fontFamily:"var(--font-pattern, 'Roboto')",fontSize:"var(--text--medium, 14px)",fontWeight:"var(--text-weight--medium, 400)",color:"var(--color--primary, #008561)",marginRight:"4px",cursor:"pointer",display:"flex",width:"max-content",textDecoration:"none"}},this.getTitleText(t)),dataSource:this.alerts.map(((t,e)=>{var i;return{id:this.alertId(t.title,e),label:null!==(i=t.detail)&&void 0!==i?i:""}}))}))))):null)}get _element(){return n(this)}static get watchers(){return{_container:["observeOpened"]}}};r.style=':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';export{r as ez_alert_list}
1
+ import{r as t,h as e,H as i,g as n}from"./p-e4c7eb39.js";import{FloatingManager as a,ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(e){t(this,e),this._container=void 0,this.alerts=[],this.enableDragAndDrop=void 0,this.enableExpand=!0,this.itemRightSlotBuilder=void 0,this.opened=!0,this.expanded=!1}observeOpened(){this.opened&&this.manageOverlay()}alertId(t,e){return`alert-${e}-${(t=>{var e;return null!==(e=null==t?void 0:t.split(" ").join("-"))&&void 0!==e?e:""})(t)}`}getAlertTitle(t){var e;return null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t)))||void 0===e?void 0:e.title}getLinkActionClick(t){var e;return(null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t.id)))||void 0===e?void 0:e.onClickLink)||(()=>{})}getTitleText(t){var e;const i=null!==(e=this.getAlertTitle(t.id))&&void 0!==e?e:"";return`${i}${i&&t.label?":":""}`}toggleExpandContainer(){this.enableExpand&&(this.expanded=!this.expanded,this._container.classList.toggle("expanded",this.expanded),this.expanded?this.updatePosition(this.getBoundingRight(),this.getBoundingBottom()):this.updatePosition("10px","10px"))}manageOverlay(){if(this.opened&&this._container)this._overlayId=a.float(this._container,this._overlayRef,this.getFloatOptions());else{if(void 0===this._overlayId)return;a.close(this._overlayId),this._overlayId=void 0}}updatePosition(t,e){this.opened&&a.updateFloatPosition(this._container,this._overlayRef,Object.assign(Object.assign({},this.getFloatOptions()),{right:t,bottom:e}))}getFloatOptions(){return{autoClose:!1,isFixed:!0,bottom:"10px",right:"10px"}}getBoundingRight(){return(document.body.clientWidth-this._container.getBoundingClientRect().width)/2+"px"}getBoundingBottom(){return(document.body.clientHeight-this._container.getBoundingClientRect().height)/2+"px"}componentDidLoad(){this.manageOverlay(),this.opened&&this._container&&this._container.focus()}componentWillLoad(){this.dataElementId=o.addIDInfo(this._element,"EzAlertList")}render(){return e(i,Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId}),this.opened?e("div",{ref:t=>this._overlayRef=t},e("div",{class:"alert-list__container "+(this.expanded?"expanded":""),ref:t=>this._container=t},e("div",{class:"alert-list__content"},e("div",{class:"alert-list__header"},e("div",{class:"alert-list__title"},`Avisos (${this.alerts.length})`),e("div",{class:"alert-list__header__buttons"},this.enableExpand&&e("ez-button",{mode:"icon",size:"small",iconName:"expand",onClick:()=>this.toggleExpandContainer(),"data-element-id":o.getInternalIDInfo("expandButton"),title:this.expanded?"Resumir":"Expandir"}),e("ez-button",{mode:"icon",size:"small",iconName:"close","data-element-id":o.getInternalIDInfo("closeButton"),onClick:()=>{this.opened=!1},title:"Fechar"}))),e("div",{class:"alert-list__expandable-content"},e("ez-list",{itemSlotBuilder:this.itemRightSlotBuilder,hoverFeedback:!0,itemLeftSlotBuilder:t=>e("a",{onClick:this.getLinkActionClick(t),style:{fontFamily:"var(--font-pattern, 'Roboto')",fontSize:"var(--text--medium, 14px)",fontWeight:"var(--text-weight--medium, 400)",color:"var(--color--primary, #008561)",marginRight:"4px",cursor:"pointer",display:"flex",width:"max-content",textDecoration:"none"}},this.getTitleText(t)),dataSource:this.alerts.map(((t,e)=>{var i;return{id:this.alertId(t.title,e),label:null!==(i=t.detail)&&void 0!==i?i:""}}))}))))):null)}get _element(){return n(this)}static get watchers(){return{_container:["observeOpened"]}}};r.style=':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';export{r as ez_alert_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as d,h as i,H as o,g as e}from"./p-e4c7eb39.js";import{FloatingManager as l,KeyboardManager as a}from"@sankhyalabs/core";const n=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=l.subscribeOverlayControl(this._modalRef):l.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${"regular"===this.heightMode?`modal__content--${t}`:""} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return e(this)}static get watchers(){return{opened:["observeOpened"]}}};n.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{n as ez_modal}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as a}from"./p-23a36bb6.js";import{ElementIDUtils as o,StringUtils as r}from"@sankhyalabs/core";const n=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}},this._processedTabs=void 0,this.selectedIndex=void 0,this.selectedTab=void 0,this.tabs=void 0}observeTabs(t,i){t&&"string"!=typeof t?this._processedTabs=t:t!==i&&this.processesTabs()}async goToTab(t,i=!1){const s=this._processedTabs.find((i=>i.index===t));this.handleTabClick(s,!i)}handleTabClick(t,i=!0){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,i&&this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillLoad(){this.processesTabs()}processesTabs(){this.tabs&&(Array.isArray(this.tabs)?this._processedTabs=[...this.tabs]:(this._processedTabs=[],this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length}),this.buildElementIdTab(this._processedTabs)})))),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s),this.buildElementIdTab(this._processedTabs)}))}componentDidRender(){this.updateScroll()}componentDidLoad(){o.addIDInfo(this._hostElem,"itemsSelector"),this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((t=>{var i;const s=null===(i=t.querySelector("span.tab-label"))||void 0===i?void 0:i.innerText,e={id:`${r.toCamelCase(s)}`};o.addIDInfo(t,"itemSelector",e)}))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}buildElementIdTab(t){t.forEach((t=>{if(!t.hasOwnProperty(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)){const i=`${this._hostElem.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_${r.toCamelCase(t.tabKey)}`;t[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=i}}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e="tab"+i,a=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return a&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:e,name:"tab-button",class:"tab"+(a?" is-active":""),onClick:()=>this.handleTabClick(t)},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:e,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}static get watchers(){return{tabs:["observeTabs"]}}};n.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon: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>\');--tabselector--forward-icon: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>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{n as ez_tabselector}
1
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-e4c7eb39.js";import{ElementIDUtils as o,StringUtils as r}from"@sankhyalabs/core";const n=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}},this._processedTabs=void 0,this.selectedIndex=void 0,this.selectedTab=void 0,this.tabs=void 0}observeTabs(t,i){t&&"string"!=typeof t?this._processedTabs=t:t!==i&&this.processesTabs()}async goToTab(t,i=!1){const s=this._processedTabs.find((i=>i.index===t));this.handleTabClick(s,!i)}handleTabClick(t,i=!0){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,i&&this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillLoad(){this.processesTabs()}processesTabs(){this.tabs&&(Array.isArray(this.tabs)?this._processedTabs=[...this.tabs]:(this._processedTabs=[],this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length}),this.buildElementIdTab(this._processedTabs)})))),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s),this.buildElementIdTab(this._processedTabs)}))}componentDidRender(){this.updateScroll()}componentDidLoad(){o.addIDInfo(this._hostElem,"itemsSelector"),this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((t=>{var i;const s=null===(i=t.querySelector("span.tab-label"))||void 0===i?void 0:i.innerText,e={id:`${r.toCamelCase(s)}`};o.addIDInfo(t,"itemSelector",e)}))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}buildElementIdTab(t){t.forEach((t=>{if(!t.hasOwnProperty(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)){const i=`${this._hostElem.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_${r.toCamelCase(t.tabKey)}`;t[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=i}}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e="tab"+i,a=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return a&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:e,name:"tab-button",class:"tab"+(a?" is-active":""),onClick:()=>this.handleTabClick(t)},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:e,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}static get watchers(){return{tabs:["observeTabs"]}}};n.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon: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>\');--tabselector--forward-icon: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>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{n as ez_tabselector}
@@ -1 +1 @@
1
- import{r as a,c as e,h as i,H as t,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{E as o}from"./p-98bb8b16.js";var n,d,l;!function(a){a.FLOAT="float",a.FIXED="fixed"}(n||(n={})),function(a){a.SMALL="sm",a.MEDIUM="md",a.LARGE="lg"}(d||(d={})),function(a){a.FLOAT="float",a.FIXED="fixed",a.DYNAMIC="dynamic"}(l||(l={}));const h="Ocultar menu",v="Desafixar menu",b="Fixar menu",g=class{constructor(i){a(this,i),this.ezChangeMode=e(this,"ezChangeMode",7),this.handleToggleSidebar=()=>{this.open=!this.open},this.handleToggleMode=()=>{this.mode=this.mode===n.FIXED?n.FLOAT:n.FIXED,this.ezChangeMode.emit(this.mode)},this.type=l.DYNAMIC,this.mode=n.FLOAT,this.size=d.SMALL,this.isResponsive=!1,this.titleMenu="",this.showCollapseMenu=!0,this.showFixedButton=!0,this.open=!1}async changeModeMenu(){this.type===l.DYNAMIC&&this.handleToggleMode()}async closeSidebar(){this.open=!1}async openSidebar(){this.open=!0}componentDidLoad(){this.type===l.FIXED&&(this.mode=n.FIXED,this.open=!0)}render(){return s.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.mode===n.FIXED?this.handleToggleSidebar:void 0,onMouseEnter:this.mode===n.FLOAT?this.handleToggleSidebar:void 0,"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":s.getInternalIDInfo("openButton")}),this.open?i("aside",{tabIndex:-1,id:"navigator",class:`ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode===n.FLOAT?"dynamic":"fixed"} ${this.isResponsive?"responsive":this.size} ${this.open?"show":"hidden"}`,"data-element-id":s.getInternalIDInfo("sidebar"),onMouseLeave:this.type!==l.FIXED&&this.mode===n.FLOAT?this.handleToggleSidebar:void 0},i("header",{class:"ez-sidebar-navigator__header"},i("slot",{name:"start"}),""!==this.titleMenu&&i("div",{class:"ez-sidebar-navigator__title",title:this.titleMenu},this.titleMenu),!this.titleMenu&&i("slot",{name:"content"}),i("div",{class:"ez-sidebar-navigator__end"},i("slot",{name:"end"}),this.type===l.DYNAMIC&&this.showFixedButton&&i("ez-button",{onClick:this.handleToggleMode,mode:"icon",size:"small",iconName:this.mode===n.FIXED?"un-pin":"push-pin",title:this.mode===n.FIXED?v:b,"aria-label":this.mode===n.FIXED?v:b,"aria-controls":"navigator","data-element-id":s.getInternalIDInfo("pinButton")}),this.mode===n.FIXED&&this.showCollapseMenu&&i("ez-button",{onClick:this.handleToggleSidebar,class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:h,"aria-label":h,"aria-controls":"navigator","data-element-id":s.getInternalIDInfo("closeButton")}))),this.titleMenu&&i("slot",{name:"content"}),i("ez-scroller",{class:"ez-sidebar-navigator__content",direction:o.VERTICAL,activeShadow:!0},i("slot",null)),i("footer",{class:"ez-sidebar-navigator__footer"},i("slot",{name:"footer"}))):void 0)}get _element(){return r(this)}};g.style=':host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--z-index:var(--elevation--20, 20);--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, "Roboto");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);outline:none;gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--ez-sidebar-navigator--z-index)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}';export{g as ez_sidebar_navigator}
1
+ import{r as e,c as a,h as i,H as t,g as r}from"./p-e4c7eb39.js";import{ElementIDUtils as s}from"@sankhyalabs/core";import{E as o}from"./p-98bb8b16.js";var n,d,l;!function(e){e.FLOAT="float",e.FIXED="fixed"}(n||(n={})),function(e){e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg"}(d||(d={})),function(e){e.FLOAT="float",e.FIXED="fixed",e.DYNAMIC="dynamic"}(l||(l={}));const h="Ocultar menu",v="Desafixar menu",b="Fixar menu",g=class{constructor(i){e(this,i),this.ezChangeMode=a(this,"ezChangeMode",7),this.handleToggleSidebar=()=>{this.open=!this.open},this.handleToggleMode=()=>{this.mode=this.mode===n.FIXED?n.FLOAT:n.FIXED,this.ezChangeMode.emit(this.mode)},this.type=l.DYNAMIC,this.mode=n.FLOAT,this.size=d.SMALL,this.isResponsive=!1,this.titleMenu="",this.showCollapseMenu=!0,this.showFixedButton=!0,this.open=!1}async changeModeMenu(){this.type===l.DYNAMIC&&this.handleToggleMode()}async closeSidebar(){this.open=!1}async openSidebar(){this.open=!0}componentDidLoad(){this.type===l.FIXED&&(this.mode=n.FIXED,this.open=!0)}render(){return s.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.mode===n.FIXED?this.handleToggleSidebar:void 0,onMouseEnter:this.mode===n.FLOAT?this.handleToggleSidebar:void 0,"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":s.getInternalIDInfo("openButton")}),this.open?i("aside",{tabIndex:-1,id:"navigator",class:`ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode===n.FLOAT?"dynamic":"fixed"} ${this.isResponsive?"responsive":this.size} ${this.open?"show":"hidden"}`,"data-element-id":s.getInternalIDInfo("sidebar"),onMouseLeave:this.type!==l.FIXED&&this.mode===n.FLOAT?this.handleToggleSidebar:void 0},i("header",{class:"ez-sidebar-navigator__header"},i("slot",{name:"start"}),""!==this.titleMenu&&i("div",{class:"ez-sidebar-navigator__title",title:this.titleMenu},this.titleMenu),!this.titleMenu&&i("slot",{name:"content"}),i("div",{class:"ez-sidebar-navigator__end"},i("slot",{name:"end"}),this.type===l.DYNAMIC&&this.showFixedButton&&i("ez-button",{onClick:this.handleToggleMode,mode:"icon",size:"small",iconName:this.mode===n.FIXED?"un-pin":"push-pin",title:this.mode===n.FIXED?v:b,"aria-label":this.mode===n.FIXED?v:b,"aria-controls":"navigator","data-element-id":s.getInternalIDInfo("pinButton")}),this.mode===n.FIXED&&this.showCollapseMenu&&i("ez-button",{onClick:this.handleToggleSidebar,class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:h,"aria-label":h,"aria-controls":"navigator","data-element-id":s.getInternalIDInfo("closeButton")}))),this.titleMenu&&i("slot",{name:"content"}),i("ez-scroller",{class:"ez-sidebar-navigator__content",direction:o.VERTICAL,activeShadow:!0},i("slot",null)),i("footer",{class:"ez-sidebar-navigator__footer"},i("slot",{name:"footer"}))):void 0)}get _element(){return r(this)}};g.style=':host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--z-index:var(--elevation--20, 20);--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, "Roboto");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);outline:none;gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--ez-sidebar-navigator--z-index)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}';export{g as ez_sidebar_navigator}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,g as n}from"./p-23a36bb6.js";import{DateUtils as o,TimeFormatter as a,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";const l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=o.validateDate(t,!0),s=o.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=o.validateDate(this.value,!0),e=o.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=a.prepareValue(s[1]?s[1]:"",this.showSeconds);return o.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=o.validateDate(this.value,!0),i=o.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return o.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=o.validateDate(this.value,!0),s=o.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none"},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_time_input}
1
+ import{r as t,c as i,h as e,H as s,g as n}from"./p-e4c7eb39.js";import{DateUtils as o,TimeFormatter as a,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";const l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=o.validateDate(t,!0),s=o.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=o.validateDate(this.value,!0),e=o.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=a.prepareValue(s[1]?s[1]:"",this.showSeconds);return o.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=o.validateDate(this.value,!0),i=o.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return o.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=o.validateDate(this.value,!0),s=o.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none"},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_time_input}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as o,H as i,g as a}from"./p-e4c7eb39.js";import{KeyboardManager as n}from"@sankhyalabs/core";var l;!function(e){e.CLOSE="CLOSE",e.OK="OK",e.CANCEL="CANCEL",e.LOAD="LOAD"}(l||(l={}));const s=l;var r;!function(e){e.ENABLED="ENABLED",e.DISABLED="DISABLED",e.HIDDEN="HIDDEN"}(r||(r={}));const c=r,d=class{constructor(o){e(this,o),this.ezModalAction=t(this,"ezModalAction",7),this.modalTitle=void 0,this.modalSubTitle=void 0,this.showTitleBar=!0,this.cancelButtonLabel=void 0,this.okButtonLabel=void 0,this.cancelButtonStatus=void 0,this.okButtonStatus=void 0,this.showCloseButton=!0}async handleEzModalAction(e){var t;(null==e?void 0:e.target)&&(null==e?void 0:e.target)===(null===(t=this._element)||void 0===t?void 0:t.parentElement)&&this.closeModal()}cancelIsVisible(){return this.cancelButtonStatus!==c.HIDDEN&&null!=this.cancelButtonLabel}okIsVisible(){return this.okButtonStatus!==c.HIDDEN&&null!=this.okButtonLabel}componentDidLoad(){window.requestAnimationFrame((()=>{this.ezModalAction.emit(s.LOAD),this._modalRef.focus()})),this._keyboardManager=new n({propagate:!1,element:this._element}).bind("Enter",this.ezModalAction.emit.bind(s.OK)).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}disconnectedCallback(){var e;null===(e=this._keyboardManager)||void 0===e||e.unbindAllShortcutKeys()}closeModal(){this.ezModalAction.emit("CLOSE")}focusLast(){null!=this._okButton&&this._okButton.setFocus()}focusFirst(){this._closeButton.focus()}render(){return o(i,null,o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusLast()}),o("div",{ref:e=>this._modalRef=e,tabIndex:-1,class:"ez-modal-container__header-container"},this.showTitleBar&&o("div",{class:"ez-modal-container__header ez-margin-bottom--medium"},o("div",{class:"ez-col ez-align--middle ez-modal-container__title"},o("h2",{class:"ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small"},this.modalTitle),this.modalSubTitle&&o("div",{class:"ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small"},this.modalSubTitle)),this.showCloseButton&&o("button",{ref:e=>this._closeButton=e,class:"ez-modal-container__close-button",onClick:()=>this.ezModalAction.emit(s.CLOSE)},o("ez-icon",{class:"ez-modal-container__close-icon",size:"medium",iconName:"close"})))),o("div",{tabIndex:-1,class:"ez-modal-container__content"},o("slot",null)),o("div",{tabIndex:-1,class:"ez-modal-container__footer"},this.cancelIsVisible()&&o("ez-button",{label:this.cancelButtonLabel,enabled:this.cancelButtonStatus!==c.DISABLED,onClick:()=>this.ezModalAction.emit(s.CANCEL)}),this.okIsVisible()&&o("ez-button",{ref:e=>this._okButton=e,class:"ez-button--primary",label:this.okButtonLabel,enabled:this.okButtonStatus!==c.DISABLED,onClick:()=>this.ezModalAction.emit(s.OK)})),o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusFirst()}))}get _element(){return a(this)}};d.style=".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:clip;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x)}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";export{d as ez_modal_container}
@@ -1 +1 @@
1
- import{r as t,h as o,F as s,g as i}from"./p-23a36bb6.js";import{c as r,o as e,f as a,s as l,a as n}from"./p-e07e4671.js";import{ElementIDUtils as h}from"@sankhyalabs/core";const c=class{constructor(o){t(this,o),this._opened=!1,this.message=void 0,this.anchoringElement=void 0,this.placement="bottom",this.gapOptions={horizontalGap:0,verticalGap:0},this.type="default",this.debouncingTime=500,this.active=!0,this.maxWidth=200,this.useAnchorSize=!1}watchAnchoringElement(t,o){t&&(this.setEvents(t),this.removeEvents(o))}watchMessage(t){t?this.updatePosition():this.closeTooltip()}openTooltip(){this.message&&this.active&&(this._debouncingTimeout&&clearTimeout(this._debouncingTimeout),this._debouncingTimeout=setTimeout((()=>{this._opened=!0,this._tooltipElement.style.display="block",this.updatePosition()}),this.debouncingTime))}closeTooltip(){clearTimeout(this._debouncingTimeout),this._tooltipElement.style.display="none",this._opened=!1}async updatePosition(t=this.anchoringElement){if(t&&this._opened){if(this.useAnchorSize){const o=t.getBoundingClientRect().width;this._tooltipElement.style.width=`${o}px`}await r(t,this._tooltipElement,{placement:this.placement,middleware:[e(5),a(),l(),n({element:this._arrowElement})]}).then((({x:t,y:o,placement:s,middlewareData:i})=>{const r=s.includes("bottom")?o+this.gapOptions.verticalGap:o-this.gapOptions.verticalGap,e=s.includes("start")?t+this.gapOptions.horizontalGap:t-this.gapOptions.horizontalGap;if(Object.assign(this._tooltipElement.style,{top:`${r}px`,left:`${e}px`}),i.arrow){const{x:t}=i.arrow,o=s.includes("bottom");Object.assign(this._arrowElement.style,{left:`${t}px`,top:o?-this._arrowElement.offsetHeight/2+"px":"",bottom:o?"":-this._arrowElement.offsetHeight/2+"px"})}}))}}handleSlotChange(t){const o=t.target.assignedElements()[0];this.anchoringElement=o}setEvents(t=this.anchoringElement){t&&(t.addEventListener("mouseenter",(()=>{this.openTooltip()})),t.addEventListener("mouseleave",(()=>{this.closeTooltip()})))}removeEvents(t=this.anchoringElement){t&&(t.removeEventListener("mouseenter",(()=>{this.openTooltip()})),t.removeEventListener("mouseleave",(()=>{this.closeTooltip()})))}componentDidLoad(){this.setEvents()}render(){return o(s,null,o("div",Object.assign({ref:t=>this._tooltipElement=t},{inert:!0},{class:{tooltip:!0,[`${this.type}-tooltip`]:!0},style:{maxWidth:this.maxWidth&&!this.useAnchorSize?`${this.maxWidth}px`:void 0},role:"tooltip","data-element-id":h.getInternalIDInfo("tooltip")}),this.message,o("div",{ref:t=>this._arrowElement=t,class:"arrow"})),o("slot",{onSlotchange:t=>{this.handleSlotChange(t)}}))}get _element(){return i(this)}static get watchers(){return{anchoringElement:["watchAnchoringElement"],message:["watchMessage"]}}};c.style=":host{--triangle-size:8px}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;width:max-content;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";export{c as ez_tooltip}
1
+ import{r as t,h as o,F as s,g as i}from"./p-e4c7eb39.js";import{c as e,o as r,f as a,s as l,a as n}from"./p-e07e4671.js";import{ElementIDUtils as h}from"@sankhyalabs/core";const c=class{constructor(o){t(this,o),this._opened=!1,this.message=void 0,this.anchoringElement=void 0,this.placement="bottom",this.gapOptions={horizontalGap:0,verticalGap:0},this.type="default",this.debouncingTime=500,this.active=!0,this.maxWidth=200,this.useAnchorSize=!1}watchAnchoringElement(t,o){t&&(this.setEvents(t),this.removeEvents(o))}watchMessage(t){t?this.updatePosition():this.closeTooltip()}openTooltip(){this.message&&this.active&&(this._debouncingTimeout&&clearTimeout(this._debouncingTimeout),this._debouncingTimeout=setTimeout((()=>{this._opened=!0,this._tooltipElement.style.display="block",this.updatePosition()}),this.debouncingTime))}closeTooltip(){clearTimeout(this._debouncingTimeout),this._tooltipElement.style.display="none",this._opened=!1}async updatePosition(t=this.anchoringElement){if(t&&this._opened){if(this.useAnchorSize){const o=t.getBoundingClientRect().width;this._tooltipElement.style.width=`${o}px`}await e(t,this._tooltipElement,{placement:this.placement,middleware:[r(5),a(),l(),n({element:this._arrowElement})]}).then((({x:t,y:o,placement:s,middlewareData:i})=>{const e=s.includes("bottom")?o+this.gapOptions.verticalGap:o-this.gapOptions.verticalGap,r=s.includes("start")?t+this.gapOptions.horizontalGap:t-this.gapOptions.horizontalGap;if(Object.assign(this._tooltipElement.style,{top:`${e}px`,left:`${r}px`}),i.arrow){const{x:t}=i.arrow,o=s.includes("bottom");Object.assign(this._arrowElement.style,{left:`${t}px`,top:o?-this._arrowElement.offsetHeight/2+"px":"",bottom:o?"":-this._arrowElement.offsetHeight/2+"px"})}}))}}handleSlotChange(t){const o=t.target.assignedElements()[0];this.anchoringElement=o}setEvents(t=this.anchoringElement){t&&(t.addEventListener("mouseenter",(()=>{this.openTooltip()})),t.addEventListener("mouseleave",(()=>{this.closeTooltip()})))}removeEvents(t=this.anchoringElement){t&&(t.removeEventListener("mouseenter",(()=>{this.openTooltip()})),t.removeEventListener("mouseleave",(()=>{this.closeTooltip()})))}componentDidLoad(){this.setEvents()}render(){return o(s,null,o("div",Object.assign({ref:t=>this._tooltipElement=t},{inert:!0},{class:{tooltip:!0,[`${this.type}-tooltip`]:!0},style:{maxWidth:this.maxWidth&&!this.useAnchorSize?`${this.maxWidth}px`:void 0},role:"tooltip","data-element-id":h.getInternalIDInfo("tooltip")}),this.message,o("div",{ref:t=>this._arrowElement=t,class:"arrow"})),o("slot",{onSlotchange:t=>{this.handleSlotChange(t)}}))}get _element(){return i(this)}static get watchers(){return{anchoringElement:["watchAnchoringElement"],message:["watchMessage"]}}};c.style=":host{--triangle-size:8px}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;width:max-content;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";export{c as ez_tooltip}