@sankhyalabs/sankhyablocks 1.1.25 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +75 -75
  3. package/package.json +94 -49
  4. package/react/.keepfolder +1 -0
  5. package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
  6. package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
  7. package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
  8. package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
  9. package/dist/cjs/ez-application.cjs.entry.js +0 -26
  10. package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
  11. package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
  12. package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
  13. package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
  14. package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
  15. package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
  16. package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
  17. package/dist/cjs/ez-form.cjs.entry.js +0 -463
  18. package/dist/cjs/ez-grid.cjs.entry.js +0 -647
  19. package/dist/cjs/ez-icon.cjs.entry.js +0 -41
  20. package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
  21. package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
  22. package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
  23. package/dist/cjs/ez-popover.cjs.entry.js +0 -120
  24. package/dist/cjs/ez-popup.cjs.entry.js +0 -48
  25. package/dist/cjs/ez-search.cjs.entry.js +0 -64
  26. package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
  27. package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
  28. package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
  29. package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
  30. package/dist/cjs/ez-toast.cjs.entry.js +0 -44
  31. package/dist/cjs/ez-upload.cjs.entry.js +0 -356
  32. package/dist/cjs/index-682c98b2.js +0 -1771
  33. package/dist/cjs/index.cjs.js +0 -2
  34. package/dist/cjs/loader.cjs.js +0 -21
  35. package/dist/cjs/sankhyablocks.cjs.js +0 -19
  36. package/dist/cjs/snk-application.cjs.entry.js +0 -7065
  37. package/dist/cjs/test-du.cjs.entry.js +0 -76
  38. package/dist/collection/collection-manifest.json +0 -47
  39. package/dist/collection/components/snk-application/snk-application.css +0 -5
  40. package/dist/collection/components/snk-application/snk-application.js +0 -495
  41. package/dist/collection/index.js +0 -1
  42. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
  43. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
  44. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
  45. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
  46. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
  47. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
  48. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
  49. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
  50. package/dist/collection/lib/utils/pesquisa.js +0 -16
  51. package/dist/collection/lib/utils/urlutils.js +0 -23
  52. package/dist/collection/lib/workspace/workspace.js +0 -7
  53. package/dist/components/ApplicationUtils.js +0 -37
  54. package/dist/components/AssetsUtils.js +0 -22
  55. package/dist/components/CSSVarsUtils.js +0 -17
  56. package/dist/components/ez-action-chip.js +0 -44
  57. package/dist/components/ez-application.js +0 -39
  58. package/dist/components/ez-button.js +0 -6
  59. package/dist/components/ez-button2.js +0 -105
  60. package/dist/components/ez-calendar.js +0 -6
  61. package/dist/components/ez-calendar2.js +0 -242
  62. package/dist/components/ez-check.js +0 -6
  63. package/dist/components/ez-check2.js +0 -94
  64. package/dist/components/ez-collapsible-box.js +0 -67
  65. package/dist/components/ez-combo-box.js +0 -6
  66. package/dist/components/ez-combo-box2.js +0 -311
  67. package/dist/components/ez-date-input.js +0 -135
  68. package/dist/components/ez-date-time-input.js +0 -179
  69. package/dist/components/ez-dialog.js +0 -124
  70. package/dist/components/ez-form.js +0 -6
  71. package/dist/components/ez-form2.js +0 -485
  72. package/dist/components/ez-grid.js +0 -738
  73. package/dist/components/ez-icon.js +0 -6
  74. package/dist/components/ez-icon2.js +0 -56
  75. package/dist/components/ez-label-chip.js +0 -125
  76. package/dist/components/ez-list.js +0 -6
  77. package/dist/components/ez-list2.js +0 -523
  78. package/dist/components/ez-modal.js +0 -6
  79. package/dist/components/ez-modal2.js +0 -82
  80. package/dist/components/ez-number-input.js +0 -115
  81. package/dist/components/ez-popover.js +0 -145
  82. package/dist/components/ez-popup.js +0 -67
  83. package/dist/components/ez-search.js +0 -100
  84. package/dist/components/ez-tabselector.js +0 -6
  85. package/dist/components/ez-tabselector2.js +0 -213
  86. package/dist/components/ez-text-area.js +0 -137
  87. package/dist/components/ez-text-input.js +0 -6
  88. package/dist/components/ez-text-input2.js +0 -223
  89. package/dist/components/ez-time-input.js +0 -153
  90. package/dist/components/ez-toast.js +0 -64
  91. package/dist/components/ez-upload.js +0 -382
  92. package/dist/components/grid-config.js +0 -6
  93. package/dist/components/grid-config2.js +0 -318
  94. package/dist/components/index.d.ts +0 -26
  95. package/dist/components/index.js +0 -1
  96. package/dist/components/select-box.js +0 -6
  97. package/dist/components/select-box2.js +0 -47
  98. package/dist/components/snk-application.d.ts +0 -11
  99. package/dist/components/snk-application.js +0 -7094
  100. package/dist/components/test-du.js +0 -101
  101. package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
  102. package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
  103. package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
  104. package/dist/esm/ez-action-chip.entry.js +0 -23
  105. package/dist/esm/ez-application.entry.js +0 -22
  106. package/dist/esm/ez-button_4.entry.js +0 -653
  107. package/dist/esm/ez-calendar.entry.js +0 -219
  108. package/dist/esm/ez-collapsible-box.entry.js +0 -43
  109. package/dist/esm/ez-combo-box.entry.js +0 -274
  110. package/dist/esm/ez-date-input.entry.js +0 -98
  111. package/dist/esm/ez-date-time-input.entry.js +0 -141
  112. package/dist/esm/ez-dialog.entry.js +0 -85
  113. package/dist/esm/ez-form.entry.js +0 -459
  114. package/dist/esm/ez-grid.entry.js +0 -643
  115. package/dist/esm/ez-icon.entry.js +0 -37
  116. package/dist/esm/ez-label-chip.entry.js +0 -100
  117. package/dist/esm/ez-modal_2.entry.js +0 -311
  118. package/dist/esm/ez-number-input.entry.js +0 -82
  119. package/dist/esm/ez-popover.entry.js +0 -116
  120. package/dist/esm/ez-popup.entry.js +0 -44
  121. package/dist/esm/ez-search.entry.js +0 -60
  122. package/dist/esm/ez-tabselector.entry.js +0 -194
  123. package/dist/esm/ez-text-area.entry.js +0 -110
  124. package/dist/esm/ez-text-input.entry.js +0 -197
  125. package/dist/esm/ez-time-input.entry.js +0 -114
  126. package/dist/esm/ez-toast.entry.js +0 -40
  127. package/dist/esm/ez-upload.entry.js +0 -352
  128. package/dist/esm/index-35088a3f.js +0 -1740
  129. package/dist/esm/index.js +0 -1
  130. package/dist/esm/loader.js +0 -17
  131. package/dist/esm/polyfills/core-js.js +0 -11
  132. package/dist/esm/polyfills/css-shim.js +0 -1
  133. package/dist/esm/polyfills/dom.js +0 -79
  134. package/dist/esm/polyfills/es5-html-element.js +0 -1
  135. package/dist/esm/polyfills/index.js +0 -34
  136. package/dist/esm/polyfills/system.js +0 -6
  137. package/dist/esm/sankhyablocks.js +0 -17
  138. package/dist/esm/snk-application.entry.js +0 -7061
  139. package/dist/esm/test-du.entry.js +0 -72
  140. package/dist/index.cjs.js +0 -1
  141. package/dist/index.js +0 -1
  142. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
  143. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
  144. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
  145. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
  146. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
  147. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
  148. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
  149. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
  150. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
  151. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
  152. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
  153. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
  154. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
  155. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
  156. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
  157. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
  158. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
  159. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
  160. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
  161. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
  162. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
  163. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
  164. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
  165. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
  166. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
  167. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
  168. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
  169. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
  170. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
  171. package/dist/sankhyablocks/index.esm.js +0 -0
  172. package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
  173. package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
  174. package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
  175. package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
  176. package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
  177. package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
  178. package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
  179. package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
  180. package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
  181. package/dist/sankhyablocks/p-60967cf0.js +0 -1
  182. package/dist/sankhyablocks/p-6ce33b60.entry.js +0 -57
  183. package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
  184. package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
  185. package/dist/sankhyablocks/p-735440c1.entry.js +0 -1
  186. package/dist/sankhyablocks/p-811b4b9d.js +0 -1
  187. package/dist/sankhyablocks/p-813fe4f7.js +0 -1
  188. package/dist/sankhyablocks/p-85a9446b.js +0 -2
  189. package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
  190. package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
  191. package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
  192. package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
  193. package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
  194. package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
  195. package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
  196. package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
  197. package/dist/sankhyablocks/p-e17dfaae.entry.js +0 -1
  198. package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
  199. package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
  200. package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
  201. package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
  202. package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
  203. package/dist/types/components/snk-application/snk-application.d.ts +0 -44
  204. package/dist/types/components.d.ts +0 -66
  205. package/dist/types/index.d.ts +0 -1
  206. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
  207. package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
  208. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
  209. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
  210. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
  211. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
  212. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
  213. package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
  214. package/dist/types/lib/utils/pesquisa.d.ts +0 -2
  215. package/dist/types/lib/utils/urlutils.d.ts +0 -4
  216. package/dist/types/lib/workspace/workspace.d.ts +0 -4
  217. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  218. package/loader/cdn.js +0 -3
  219. package/loader/index.cjs.js +0 -3
  220. package/loader/index.d.ts +0 -12
  221. package/loader/index.es2017.js +0 -3
  222. package/loader/index.js +0 -4
  223. package/loader/package.json +0 -10
  224. package/react/components.d.ts +0 -32
  225. package/react/components.js +0 -35
  226. package/react/components.js.map +0 -1
  227. package/react/react-component-lib/createComponent.d.ts +0 -10
  228. package/react/react-component-lib/createComponent.js +0 -75
  229. package/react/react-component-lib/createComponent.js.map +0 -1
  230. package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
  231. package/react/react-component-lib/createOverlayComponent.js +0 -109
  232. package/react/react-component-lib/createOverlayComponent.js.map +0 -1
  233. package/react/react-component-lib/index.d.ts +0 -2
  234. package/react/react-component-lib/index.js +0 -3
  235. package/react/react-component-lib/index.js.map +0 -1
  236. package/react/react-component-lib/interfaces.d.ts +0 -29
  237. package/react/react-component-lib/interfaces.js +0 -1
  238. package/react/react-component-lib/interfaces.js.map +0 -1
  239. package/react/react-component-lib/utils/attachProps.d.ts +0 -12
  240. package/react/react-component-lib/utils/attachProps.js +0 -98
  241. package/react/react-component-lib/utils/attachProps.js.map +0 -1
  242. package/react/react-component-lib/utils/case.d.ts +0 -2
  243. package/react/react-component-lib/utils/case.js +0 -7
  244. package/react/react-component-lib/utils/case.js.map +0 -1
  245. package/react/react-component-lib/utils/dev.d.ts +0 -2
  246. package/react/react-component-lib/utils/dev.js +0 -13
  247. package/react/react-component-lib/utils/dev.js.map +0 -1
  248. package/react/react-component-lib/utils/index.d.ts +0 -10
  249. package/react/react-component-lib/utils/index.js +0 -34
  250. package/react/react-component-lib/utils/index.js.map +0 -1
@@ -1,44 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-35088a3f.js';
2
-
3
- const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--most-visible, 3);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"'Sora', 'Algerian'\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;height:100%;width:100%}.popup__header{padding-bottom:var(--ez-popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.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%}}";
4
-
5
- const EzPopup = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
9
- this.sizeClasses = {
10
- "x-small": "col--sd-3",
11
- "small": "col--sd-5",
12
- "medium": "col--sd-6",
13
- "large": "col--sd-9",
14
- "x-large": "col--sd-11"
15
- };
16
- /**
17
- * Define o width que o componente deve ter, seguindo o grid system. Os valores devem estar
18
- * compreendidos em [x-small | small | medium | large | x-large].
19
- */
20
- this.size = "medium";
21
- /**
22
- * Controla a exibição do componente.
23
- */
24
- this.opened = false;
25
- /**
26
- * Define se o componente utilizará um cabeçalho com botão de fechamento.
27
- */
28
- this.useHeader = false;
29
- }
30
- getGridSize() {
31
- return this.sizeClasses[this.size] || this.sizeClasses["medium"];
32
- }
33
- render() {
34
- if (this.opened) {
35
- return (h(Host, null, h("div", { class: "overlay" }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container" }, h("div", { class: "popup__content" }, h("div", { class: "popup__header" }, this.ezTitle ?
36
- h("div", { class: "popup__title" }, this.ezTitle)
37
- : undefined, h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } })), h("div", { class: "popup__expandable-content" }, h("slot", null))))))));
38
- }
39
- return null;
40
- }
41
- };
42
- EzPopup.style = ezPopupCss;
43
-
44
- export { EzPopup as ez_popup };
@@ -1,60 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-35088a3f.js';
2
- import { C as CSSVarsUtils } from './CSSVarsUtils-0787c3f3.js';
3
-
4
- const ezSearchCss = ":host{width:100%}";
5
-
6
- const EzSearch = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.ezChange = createEvent(this, "ezChange", 7);
10
- this.showPopup = createEvent(this, "showPopup", 7);
11
- /**
12
- * Deixa o campo disponível ou não.
13
- */
14
- this.enabled = true;
15
- /**
16
- * Ajusta a opção de mostrar o "value" ao selecionar uma opção.
17
- */
18
- this.showSelectedValue = true;
19
- /**
20
- * Ajusta a opção de mostrar o "value" para cada opção.
21
- */
22
- this.showOptionValue = true;
23
- }
24
- updateValue() {
25
- if (this._comboElement) {
26
- this._comboElement.value = this.value;
27
- }
28
- }
29
- /**
30
- * Realiza o foco no componente de pesquisa
31
- */
32
- async setFocus() {
33
- this._comboElement.setFocus();
34
- }
35
- /**
36
- * Remove o foco no componente de pesquisa
37
- */
38
- async setBlur() {
39
- this._comboElement.setBlur();
40
- }
41
- onComboChange(evt) {
42
- evt.stopPropagation();
43
- this.value = evt.detail;
44
- this.ezChange.emit(evt.detail);
45
- }
46
- componentDidLoad() {
47
- CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
48
- }
49
- render() {
50
- return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue }));
51
- }
52
- ;
53
- get _elem() { return getElement(this); }
54
- static get watchers() { return {
55
- "value": ["updateValue"]
56
- }; }
57
- };
58
- EzSearch.style = ezSearchCss;
59
-
60
- export { EzSearch as ez_search };
@@ -1,194 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-35088a3f.js';
2
-
3
- const ezTabselectorCss = "@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.midle{-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;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Sora, Algerian\");font-size:var(--title--small, 14px)}.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}";
4
-
5
- const EzTabselector = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezChange = createEvent(this, "ezChange", 7);
9
- this.setFocusedParam = (ev) => {
10
- if (ev.key === "Enter") {
11
- const selectedTab = this._processedTabs[this._focusedIndex];
12
- this.handleTabClick(selectedTab);
13
- ev.preventDefault();
14
- this.setFocusedTab(selectedTab.index);
15
- }
16
- else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
17
- let operator = undefined;
18
- if (ev.key === "ArrowLeft") {
19
- operator = false;
20
- }
21
- else if (ev.key === "ArrowRight") {
22
- operator = true;
23
- }
24
- else {
25
- return;
26
- }
27
- if (this._focusedIndex === undefined) {
28
- if (operator === false) {
29
- this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
30
- }
31
- else {
32
- this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
33
- }
34
- }
35
- else {
36
- if (operator === false) {
37
- this._focusedIndex = this._focusedIndex - 1;
38
- }
39
- else {
40
- this._focusedIndex = this._focusedIndex + 1;
41
- }
42
- }
43
- if (this._focusedIndex < 0) {
44
- this._focusedIndex = 0;
45
- }
46
- else if (this._focusedIndex > this._processedTabs.length - 1) {
47
- this._focusedIndex = this._processedTabs.length - 1;
48
- }
49
- this.setFocusedBtn(true, this._focusedIndex);
50
- this.setFocusedTab(this._focusedIndex);
51
- }
52
- else if (ev.key === "Tab" || ev.key === "Escape") {
53
- const currentTab = this._processedTabs[this.selectedIndex];
54
- this._focusedIndex = undefined;
55
- this.handleTabClick(currentTab);
56
- ev.preventDefault();
57
- this.setFocusedTab(this.selectedIndex);
58
- }
59
- };
60
- }
61
- handleTabClick(tab) {
62
- this.selectedIndex = tab.index;
63
- this._focusedIndex = undefined;
64
- this.selectedTab = tab.tabKey;
65
- this.ezChange.emit(tab);
66
- this.setFocusedBtn(false, tab.index);
67
- }
68
- componentWillRender() {
69
- if (!this._processedTabs) {
70
- this._processedTabs = [];
71
- if (this.tabs) {
72
- this.tabs.split(",").forEach((label) => {
73
- label = label.trim();
74
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
75
- });
76
- }
77
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
78
- const tabKey = elem.getAttribute("tabKey");
79
- const label = elem.getAttribute("label");
80
- const t = { label, tabKey, index: this._processedTabs.length };
81
- const content = elem.firstChild;
82
- if (content) {
83
- content.setAttribute("slot", "tab" + t.index);
84
- this._hostElem.appendChild(content);
85
- }
86
- this._processedTabs.push(t);
87
- });
88
- }
89
- }
90
- handleSlotChange(ev) {
91
- const slot = ev.target;
92
- const content = slot.assignedElements()[0];
93
- if (content) {
94
- content.style.marginLeft = "6px";
95
- }
96
- }
97
- scrollBackward() {
98
- const container = this._scrollContainer;
99
- if (container) {
100
- container.scrollLeft -= container.clientWidth;
101
- }
102
- }
103
- scrollFoward() {
104
- const container = this._scrollContainer;
105
- if (container) {
106
- let lastTab = null;
107
- container.querySelectorAll(".tab").forEach((tab) => {
108
- if (tab.getBoundingClientRect().right < container.clientWidth) {
109
- lastTab = tab;
110
- }
111
- });
112
- container.scrollLeft = lastTab.offsetLeft + lastTab.offsetWidth;
113
- }
114
- }
115
- componentDidRender() {
116
- this.updateScroll();
117
- }
118
- updateScroll() {
119
- const container = this._scrollContainer;
120
- if (container) {
121
- const { scrollWidth, clientWidth, scrollLeft } = container;
122
- const remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
123
- this._startHidden = container.scrollLeft > 0;
124
- this._endHidden = remainingScroll > 0;
125
- if (this._startHidden) {
126
- this._backwardButton.classList.remove("hidden");
127
- }
128
- else {
129
- this._backwardButton.classList.add("hidden");
130
- }
131
- if (this._endHidden) {
132
- this._forwardButton.classList.remove("hidden");
133
- }
134
- else {
135
- this._forwardButton.classList.add("hidden");
136
- }
137
- const classNames = ["", "startHidden", "endHidden", "midle"];
138
- const currentClass = classNames[Number(this._startHidden) | Number(this._endHidden) << 1];
139
- classNames.forEach((name) => {
140
- if (name !== currentClass && container.classList.contains(name)) {
141
- container.classList.remove(name);
142
- }
143
- });
144
- if (currentClass && !container.classList.contains(currentClass)) {
145
- container.classList.add(currentClass);
146
- }
147
- }
148
- }
149
- domScrollHandler() {
150
- window.clearTimeout(this._scrollCallBack);
151
- this._scrollCallBack = window.setTimeout(() => { this.updateScroll(); }, 200);
152
- }
153
- setFocusedTab(index) {
154
- window.clearTimeout(this._scrollCallBackTest);
155
- this._scrollCallBackTest = window.setTimeout(() => {
156
- const tabtoscroll = this._scrollContainer.querySelector(`#tab${index}`);
157
- tabtoscroll.scrollIntoView();
158
- }, 200);
159
- }
160
- getTextWidth(text) {
161
- if (this._textMesurement === undefined) {
162
- this._textMesurement = this._hostElem.shadowRoot.ownerDocument.createElement("canvas");
163
- }
164
- const context = this._textMesurement.getContext("2d");
165
- context.font = "14px Sora, Algerian";
166
- return Math.min(220, 24 + context.measureText(text).width) + "px";
167
- }
168
- ;
169
- setFocusedBtn(visible, parameter) {
170
- const tabsButtons = this._scrollContainer.querySelectorAll(".tab");
171
- tabsButtons.forEach((el) => {
172
- el.classList.remove("is-focused");
173
- if (el.id === "tab" + parameter && visible) {
174
- el.classList.add("is-focused");
175
- }
176
- });
177
- }
178
- render() {
179
- return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
180
- const labelStyle = { "min-width": this.getTextWidth(tab.label) };
181
- const tabId = "tab" + index;
182
- const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
183
- if (isSelected) {
184
- this.selectedTab = tab.tabKey;
185
- this.selectedIndex = index;
186
- }
187
- return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, h("span", { class: "tab-label", title: tab.label }, tab.label), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
188
- })), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
189
- }
190
- get _hostElem() { return getElement(this); }
191
- };
192
- EzTabselector.style = ezTabselectorCss;
193
-
194
- export { EzTabselector as ez_tabselector };
@@ -1,110 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-35088a3f.js';
2
-
3
- const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";
4
-
5
- const EzTextArea = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezChange = createEvent(this, "ezChange", 7);
9
- /**
10
- * Deixa o campo disponível ou não para digitação.
11
- */
12
- this.enabled = true;
13
- /**
14
- * Ajusta o número de linhas e consequentemente o height do textarea. Valor default: 4
15
- */
16
- this.rows = 4;
17
- }
18
- showError() {
19
- const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
20
- if (hasError) {
21
- this._container.classList.add('hasError');
22
- this._messageBoxElem.classList.add('hasError');
23
- }
24
- else {
25
- this._container.classList.remove('hasError');
26
- this._messageBoxElem.classList.remove('hasError');
27
- }
28
- }
29
- updateInputValue() {
30
- this._inputElem.value = this.value === undefined ? "" : this.value;
31
- this.handleChange();
32
- this.adjustFloatingLabel();
33
- this.ezChange.emit(this.value);
34
- }
35
- adjustFloatingLabel() {
36
- if (this.label) {
37
- const hasValue = this.value && this.value.toString().length > 0;
38
- const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
39
- if (hasValue || this.isFocused()) {
40
- if (!containsFloatedClass) {
41
- this._labelElem.classList.add("textarea__label--floated");
42
- }
43
- }
44
- else {
45
- if (containsFloatedClass) {
46
- this._labelElem.classList.remove("textarea__label--floated");
47
- }
48
- }
49
- }
50
- }
51
- isFocused() {
52
- return this._hostElement.shadowRoot.activeElement !== null;
53
- }
54
- //---------------------------------------------
55
- // Public methods
56
- //---------------------------------------------
57
- /**
58
- * Faz o foco no componente de input
59
- */
60
- async setFocus() {
61
- this._inputElem.focus();
62
- }
63
- /**
64
- * Remove o foco no componente de input
65
- */
66
- async setBlur() {
67
- this._inputElem.blur();
68
- }
69
- //---------------------------------------------
70
- // Event handlers
71
- //---------------------------------------------
72
- handleFocusout() {
73
- this.adjustFloatingLabel();
74
- if (this._container && this._container.classList.contains("textarea--focus")) {
75
- this._container.classList.remove("textarea--focus");
76
- }
77
- }
78
- handleChange() {
79
- this.errorMessage = "";
80
- this.value = this._inputElem.value;
81
- }
82
- handleFocus() {
83
- if (this.label && this._labelElem && !this._labelElem.classList.contains("textarea__label--floated")) {
84
- this._labelElem.classList.add("textarea__label--floated");
85
- }
86
- if (this._container && !this._container.classList.contains("textarea--focus")) {
87
- this._container.classList.add("textarea--focus");
88
- }
89
- }
90
- //---------------------------------------------
91
- // Lifecycle web component
92
- //---------------------------------------------
93
- componentDidLoad() {
94
- this.showError();
95
- this.adjustFloatingLabel();
96
- }
97
- render() {
98
- return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label ?
99
- h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
100
- : null, h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })), h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
101
- }
102
- get _hostElement() { return getElement(this); }
103
- static get watchers() { return {
104
- "errorMessage": ["showError"],
105
- "value": ["updateInputValue"]
106
- }; }
107
- };
108
- EzTextArea.style = ezTextAreaCss;
109
-
110
- export { EzTextArea as ez_text_area };
@@ -1,197 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-35088a3f.js';
2
- import { MaskFormatter } from '@sankhyalabs/core';
3
-
4
- const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";
5
-
6
- const EzTextInput = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.ezChange = createEvent(this, "ezChange", 7);
10
- /**
11
- * Deixa o campo disponível ou não para digitação.
12
- */
13
- this.enabled = true;
14
- /**
15
- * Permite exibir a mensagem de erro.
16
- */
17
- this.canShowError = true;
18
- }
19
- showError() {
20
- const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
21
- if (hasError) {
22
- this._inputElem.classList.add("hasError");
23
- this._messageBoxElem.classList.add("hasError");
24
- }
25
- else {
26
- this._inputElem.classList.remove("hasError");
27
- this._messageBoxElem.classList.remove("hasError");
28
- }
29
- }
30
- prepareMask() {
31
- if (this.mask) {
32
- if (this._maskFormatter == undefined) {
33
- this._maskFormatter = new MaskFormatter(this.mask);
34
- }
35
- else {
36
- this._maskFormatter.mask = this.mask;
37
- }
38
- }
39
- }
40
- updateInputValue() {
41
- if (this._inputElem) {
42
- this._inputElem.value = this.value;
43
- }
44
- this.handleChange();
45
- this.errorMessage = "";
46
- this.ezChange.emit(this.value);
47
- this.adjustFloatingLabel();
48
- }
49
- adjustFloatingLabel() {
50
- if (this.label && this._labelElem) {
51
- if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
52
- this._inputElem.classList.add("input--with--label");
53
- }
54
- const hasValue = this.value && this.value.toString().length > 0;
55
- const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
56
- if (hasValue || this.isFocused()) {
57
- if (!containsFloatedClass) {
58
- this._labelElem.classList.add("input__label--floated");
59
- }
60
- }
61
- else {
62
- if (containsFloatedClass) {
63
- this._labelElem.classList.remove("input__label--floated");
64
- }
65
- }
66
- }
67
- }
68
- isFocused() {
69
- return this._hostElement.shadowRoot.activeElement !== null;
70
- }
71
- //---------------------------------------------
72
- // Public methods
73
- //---------------------------------------------
74
- /**
75
- * Faz o foco no componente de input
76
- */
77
- async setFocus() {
78
- this._inputElem.focus();
79
- }
80
- /**
81
- * Remove o foco no componente de input
82
- */
83
- async setBlur() {
84
- this._inputElem.blur();
85
- }
86
- //---------------------------------------------
87
- // Event handlers
88
- //---------------------------------------------
89
- handleFocusout() {
90
- const value = this._inputElem.value;
91
- if (value && this._maskFormatter) {
92
- try {
93
- this._inputElem.value = this._maskFormatter.format(value);
94
- }
95
- catch (e) {
96
- this.errorMessage = e.message;
97
- }
98
- }
99
- this.value = this._inputElem.value;
100
- this.adjustFloatingLabel();
101
- }
102
- isValidValue(value) {
103
- if (this.restrict) {
104
- return Array.from(value).reduce((valid, c) => valid && this.restrict.indexOf(c) > -1, true);
105
- }
106
- return true;
107
- }
108
- handleChange() {
109
- if (!this._inputElem) {
110
- return;
111
- }
112
- const value = this._inputElem.value;
113
- if (this.isValidValue(value)) {
114
- this._lastValidValue = value;
115
- }
116
- else {
117
- this._inputElem.value = this._lastValidValue === undefined ? "" : this._lastValidValue;
118
- }
119
- this.value = this._inputElem.value;
120
- }
121
- handleSlotChange(ev) {
122
- const slot = ev.target;
123
- const content = slot.assignedElements()[0];
124
- if (content) {
125
- content.style.position = "absolute";
126
- content.style.display = "flex";
127
- content.style.alignItems = "center";
128
- content.style.justifyContent = "center";
129
- content.style.overflow = "hidden";
130
- content.style.top = "0px";
131
- content.style.width = "var(--ez-text-input__icon--width)";
132
- content.style.height = "var(--ez-text-input--height)";
133
- if (slot.name == "leftIcon") {
134
- content.style.left = "0px";
135
- content.style.borderRadius = "var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)";
136
- this._inputElem.classList.add("icon--left");
137
- if (this._labelElem) {
138
- this._labelElem.classList.add("input__label--left");
139
- }
140
- }
141
- else if (slot.name == "rightIcon") {
142
- content.style.right = "0px";
143
- content.style.borderRadius = "0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0";
144
- this._inputElem.classList.add("icon--right");
145
- if (this._labelElem) {
146
- this._labelElem.classList.add("input__label--right");
147
- }
148
- }
149
- }
150
- this.showError();
151
- }
152
- doFocus() {
153
- if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
154
- this._labelElem.classList.add("input__label--floated");
155
- }
156
- }
157
- //---------------------------------------------
158
- // Lifecycle web component
159
- //---------------------------------------------
160
- componentDidLoad() {
161
- this.showError();
162
- this.prepareMask();
163
- this.adjustFloatingLabel();
164
- }
165
- componentWillLoad() {
166
- this.prepareMask();
167
- if (this.value) {
168
- if (this._maskFormatter) {
169
- try {
170
- this.value = this._maskFormatter.format(this.value);
171
- }
172
- catch (e) {
173
- this.errorMessage = e.message;
174
- }
175
- }
176
- if (!this.isValidValue(this.value)) {
177
- this._lastValidValue = "";
178
- this.value = "";
179
- }
180
- }
181
- }
182
- render() {
183
- return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label ?
184
- h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
185
- : null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError &&
186
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
187
- }
188
- get _hostElement() { return getElement(this); }
189
- static get watchers() { return {
190
- "errorMessage": ["showError"],
191
- "mask": ["prepareMask"],
192
- "value": ["updateInputValue"]
193
- }; }
194
- };
195
- EzTextInput.style = ezTextInputCss;
196
-
197
- export { EzTextInput as ez_text_input };