bromcom-ui 2.8.0-rc.13 → 2.8.0-rc.14

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 (181) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-88ead3f1.entry.js → p-0013191f.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-18eeee40.entry.js → p-1614e848.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-aafe385c.js → p-1dd94298.js} +1 -1
  5. package/dist/bromcom-ui/{p-9a7dc69f.entry.js → p-3cbd4ac7.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-9f9f86bc.entry.js → p-4501bab1.entry.js} +2 -2
  7. package/dist/bromcom-ui/{p-f41693d1.entry.js → p-45494d71.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-2b0e54e7.entry.js → p-454b5667.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-0bc7448a.entry.js → p-4ff6a350.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-013b1d2b.entry.js → p-561478f2.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-153757c8.entry.js → p-565e2c7c.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-625b84ab.entry.js → p-68dbd2de.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-699da440.entry.js → p-6baf67ce.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-da5b1263.entry.js → p-71b93a9f.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-7a7f411d.js → p-74396cbd.js} +1 -1
  16. package/dist/bromcom-ui/{p-29686031.js → p-78c2392b.js} +1 -1
  17. package/dist/bromcom-ui/{p-06437310.entry.js → p-78e445ff.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-3a5aa18c.entry.js → p-7c3ceef2.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-a06cff8a.entry.js → p-7fe31063.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-67eb60fa.entry.js → p-817220c1.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-308ed23b.entry.js → p-8734afa7.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-76ae855d.entry.js → p-875dc46b.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-5b55fee6.entry.js → p-9018b83b.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-2243783f.entry.js → p-90691f10.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-86ebf6c9.entry.js → p-911c33c6.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-57a98625.js → p-91c03c8b.js} +1 -1
  27. package/dist/bromcom-ui/{p-4e3db4cd.entry.js → p-9bfd6d7a.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-3e8b4baf.entry.js → p-9d821dad.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-229a1fe9.entry.js → p-9e0ee688.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-9e6f8a12.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-c57f60f4.entry.js → p-a020ddc4.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-0612f724.js → p-a2d7aa7d.js} +1 -1
  33. package/dist/bromcom-ui/{p-32b02958.entry.js → p-a567293e.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-7f4ad449.entry.js → p-a630e52d.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-516831e9.entry.js → p-a71ab944.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-16b36f5d.entry.js → p-aa807b87.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-7581ff23.js → p-ae947f9b.js} +1 -1
  38. package/dist/bromcom-ui/{p-b86c6e06.entry.js → p-b0ad945c.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-61c6c90c.entry.js → p-b767ae3f.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-942e2fcd.entry.js → p-b979974e.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-b95dbbda.entry.js → p-bb949c21.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-92a0f3c6.entry.js → p-bce6c5fe.entry.js} +1 -1
  43. package/dist/bromcom-ui/p-be2976fc.entry.js +5 -0
  44. package/dist/bromcom-ui/{p-105bc01d.entry.js → p-c2c3f32d.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-b13c0512.entry.js → p-c9815e29.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-30d88d07.entry.js → p-caee354a.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-77d788af.entry.js → p-d0d0c023.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-c613c20d.entry.js → p-d2727c91.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-9c429401.entry.js → p-d2dcd6d2.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-086150bf.entry.js → p-d48abd2b.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-6b9e8d13.entry.js → p-d6045eaa.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-4a0922d0.entry.js → p-d68b647e.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-0db2220b.entry.js → p-e0f29775.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-313ac67d.js → p-eb9fc337.js} +1 -1
  55. package/dist/bromcom-ui/{p-40c80399.entry.js → p-f07e6fd7.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-b5baf9ac.entry.js → p-f20f5f56.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-c81374b3.entry.js → p-f38a149f.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-82947a98.entry.js → p-f4fd87ed.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-d9b064f3.entry.js → p-f8b0ac45.entry.js} +1 -1
  60. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  61. package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
  62. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  63. package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
  64. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  65. package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
  66. package/dist/cjs/bcm-button_7.cjs.entry.js +4 -4
  67. package/dist/cjs/bcm-card.cjs.entry.js +1 -1
  68. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
  69. package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
  70. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  71. package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
  72. package/dist/cjs/bcm-colorful_2.cjs.entry.js +3 -3
  73. package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
  74. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
  75. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  76. package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
  77. package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
  79. package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
  80. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  81. package/dist/cjs/bcm-input.cjs.entry.js +4 -4
  82. package/dist/cjs/bcm-item.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-items.cjs.entry.js +1 -1
  84. package/dist/cjs/bcm-list.cjs.entry.js +5 -5
  85. package/dist/cjs/bcm-menu.cjs.entry.js +18 -4
  86. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +3 -3
  87. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +3 -3
  88. package/dist/cjs/bcm-modal-2.cjs.entry.js +3 -3
  89. package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
  91. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  92. package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
  93. package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
  94. package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -3
  95. package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
  96. package/dist/cjs/bcm-range.cjs.entry.js +1 -1
  97. package/dist/cjs/bcm-search.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-stepper.cjs.entry.js +4 -4
  101. package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
  102. package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
  103. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
  104. package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
  106. package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
  107. package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
  108. package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
  109. package/dist/cjs/{generate-5ac16e71.js → generate-57403025.js} +1 -1
  110. package/dist/cjs/{input-template-aa80d2c5.js → input-template-c2087895.js} +1 -1
  111. package/dist/cjs/{json-parse-decarator-c1379624.js → json-parse-decarator-371529da.js} +1 -1
  112. package/dist/cjs/{number-helper-1cf9ceb8.js → number-helper-8f9c2ebf.js} +1 -1
  113. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
  114. package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
  115. package/dist/cjs/{stepper-states-84c91734.js → stepper-states-62cd43bf.js} +1 -1
  116. package/dist/cjs/{tooltip-helper-016e26fd.js → tooltip-helper-dfa5804d.js} +3 -3
  117. package/dist/cjs/{validators-fe1bf5c5.js → validators-3a6df3c2.js} +1 -1
  118. package/dist/collection/components/molecules/menu/menu.js +14 -0
  119. package/dist/components/generate.js +1 -1
  120. package/dist/components/menu.js +14 -0
  121. package/dist/esm/bcm-accordion.entry.js +1 -1
  122. package/dist/esm/bcm-alert.entry.js +1 -1
  123. package/dist/esm/bcm-attendance.entry.js +1 -1
  124. package/dist/esm/bcm-avatar_2.entry.js +3 -3
  125. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  126. package/dist/esm/bcm-button-group.entry.js +1 -1
  127. package/dist/esm/bcm-button_7.entry.js +4 -4
  128. package/dist/esm/bcm-card.entry.js +1 -1
  129. package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
  130. package/dist/esm/bcm-chip.entry.js +1 -1
  131. package/dist/esm/bcm-collapse.entry.js +1 -1
  132. package/dist/esm/bcm-color-input.entry.js +3 -3
  133. package/dist/esm/bcm-colorful_2.entry.js +3 -3
  134. package/dist/esm/bcm-date-picker.entry.js +1 -1
  135. package/dist/esm/bcm-datetime-picker.entry.js +1 -1
  136. package/dist/esm/bcm-default.entry.js +1 -1
  137. package/dist/esm/bcm-drawer.entry.js +3 -3
  138. package/dist/esm/bcm-dropdown.entry.js +2 -2
  139. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  140. package/dist/esm/bcm-form-2.entry.js +1 -1
  141. package/dist/esm/bcm-input-custom.entry.js +1 -1
  142. package/dist/esm/bcm-input.entry.js +4 -4
  143. package/dist/esm/bcm-item.entry.js +1 -1
  144. package/dist/esm/bcm-items.entry.js +1 -1
  145. package/dist/esm/bcm-list.entry.js +5 -5
  146. package/dist/esm/bcm-menu.entry.js +18 -4
  147. package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
  148. package/dist/esm/bcm-modal-2-header.entry.js +3 -3
  149. package/dist/esm/bcm-modal-2.entry.js +3 -3
  150. package/dist/esm/bcm-modal.entry.js +1 -1
  151. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  152. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  153. package/dist/esm/bcm-popover.entry.js +3 -3
  154. package/dist/esm/bcm-progress.entry.js +1 -1
  155. package/dist/esm/bcm-radio-group.entry.js +3 -3
  156. package/dist/esm/bcm-radio.entry.js +3 -3
  157. package/dist/esm/bcm-range.entry.js +1 -1
  158. package/dist/esm/bcm-search.entry.js +2 -2
  159. package/dist/esm/bcm-skeleton.entry.js +1 -1
  160. package/dist/esm/bcm-step.entry.js +2 -2
  161. package/dist/esm/bcm-stepper.entry.js +4 -4
  162. package/dist/esm/bcm-switch.entry.js +1 -1
  163. package/dist/esm/bcm-tab-group.entry.js +3 -3
  164. package/dist/esm/bcm-tab-item-header.entry.js +3 -3
  165. package/dist/esm/bcm-tab-item.entry.js +3 -3
  166. package/dist/esm/bcm-tag.entry.js +2 -2
  167. package/dist/esm/bcm-textarea.entry.js +2 -2
  168. package/dist/esm/bcm-time-picker.entry.js +1 -1
  169. package/dist/esm/bcm-toast.entry.js +1 -1
  170. package/dist/esm/{generate-7e7975c2.js → generate-f19e71ba.js} +1 -1
  171. package/dist/esm/{input-template-31b583ff.js → input-template-ef6779cf.js} +1 -1
  172. package/dist/esm/{json-parse-decarator-4386481a.js → json-parse-decarator-167d6e75.js} +1 -1
  173. package/dist/esm/{number-helper-4c2b08c8.js → number-helper-3f2fd20f.js} +1 -1
  174. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  175. package/dist/esm/old-bcm-popover.entry.js +1 -1
  176. package/dist/esm/{stepper-states-23b9be5f.js → stepper-states-3c8df167.js} +1 -1
  177. package/dist/esm/{tooltip-helper-28fcf805.js → tooltip-helper-5e5b6931.js} +3 -3
  178. package/dist/esm/{validators-db053443.js → validators-2582932f.js} +1 -1
  179. package/package.json +1 -1
  180. package/dist/bromcom-ui/p-3fc3527f.entry.js +0 -5
  181. package/dist/bromcom-ui/p-500a914b.entry.js +0 -5
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as t,H as i,g as a}from"./p-da1055cb.js";import{C as s}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-29686031.js";import{N as o}from"./p-0612f724.js";import"./p-8d0ca8c2.js";import"./p-57a98625.js";import"./p-7e44e6b5.js";import{a as p}from"./p-a429e85b.js";import{c as n}from"./p-d65a1e21.js";import{S as c}from"./p-79fd816c.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const l=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.image=void 0,this.name=void 0,this.alt=void 0,this.shape=p.Shape.ellipse,this.size=p.Size.medium,this.color=void 0,this.status=void 0,this.isFallback=!1}componentWillLoad(){this.name=this.name&&this.name.trim()||""}handleError(){this.isFallback=!0}getCustomSizes(e){return Math.round(parseInt(e)/3)}getFirstLetters(e){const t=e.split(" ");return 1===t.length?t[0].substring(0,2):t[0].charAt(0)+t[t.length-1].charAt(0)}setStyleVariables(){const{size:e}=this;let{color:t}=this;!t&&(t="slate");let i=o.toNumber(e),a=Math.round(parseInt(i)/3);const r="--bcm-avatar";return{[`${r}-color`]:s.dsColor(`${t}-600`),[`${r}-background-color`]:s.dsColor(`${t}-100`),[`${r}-height`]:`${i}px`,[`${r}-font-size`]:`${a}px`}}render(){const{image:e,name:a,alt:s,hidden:r,shape:o,size:c,status:l}=this,h=!Object.keys(p.BaseSize).includes(c),x=n("bcm-avatar",`bcm-avatar__shape-${o}`,`bcm-avatar__size-${h?"custom":c}`,{hidden:r,"bcm-avatar__status":!!l}),m=()=>t("bcm-icon",{icon:"fas fa-user"});return t(i,{class:x,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),this.isFallback?this.name?this.getFirstLetters(this.name):m():e?t("img",{onError:()=>this.handleError(),src:e,alt:s}):a?this.getFirstLetters(a):m(),l&&t("bcm-badge",{status:l}))}get el(){return a(this)}};l.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-avatar{--bcm-avatar-color:var(--bcm-new-ds-color-slate-600);--bcm-avatar-background-color:var(--bcm-new-ds-color-slate-100);--prefix-height:40px;--prefix-font-size:font-size(2);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;background-color:var(--bcm-avatar-background-color);color:var(--bcm-avatar-color);text-transform:uppercase}.bcm-avatar.hidden{display:none}.bcm-avatar img{width:100%;height:100%}.bcm-avatar__shape-ellipse,.bcm-avatar__shape-ellipse>img{border-radius:100px}.bcm-avatar__shape-square,.bcm-avatar__shape-square>img{border-radius:4px}.bcm-avatar__shape-ellipse .bcm-badge{top:0px;right:0px}.bcm-avatar__shape-square .bcm-badge{top:-2px;right:-2px}.bcm-avatar__size-small{font-size:10px;line-height:calc(10px + 8px);height:24px;width:24px}.bcm-avatar__size-medium{font-size:12px;line-height:calc(12px + 8px);height:32px;width:32px}.bcm-avatar__size-large{font-size:14px;line-height:calc(14px + 8px);height:40px;width:40px}.bcm-avatar__size-custom{font-size:var(--bcm-avatar-font-size);line-height:calc(var(--bcm-avatar-font-size) + 8px);height:var(--bcm-avatar-height);width:var(--bcm-avatar-height)}.bcm-avatar__status{position:relative}.bcm-avatar__status .bcm-badge{position:absolute}';const h=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.blink=!1,this.value=void 0,this.color=void 0,this.size=p.Size.medium,this.status=void 0,this._slot=void 0}setStyleVariables(){const{status:e,value:t}=this;let{color:i}=this;e&&(i={info:"blue",error:"red",warning:"amber",success:"emerald",default:"slate"}[e]),!i&&(i="slate");const a="--bcm-badge",r=t&&t.length>1?"8":"4";return{[`${a}-color`]:s.reverseColor(s.dsColor(`${i}`)),[`${a}-background-color`]:s.dsColor(`${i}`),[`${a}-spacing`]:`${r}px`}}render(){let{blink:e,value:a,size:s,_slot:r,hidden:o}=this;const p=n("bcm-badge__dot","bcm-badge__dot-size-"+s,{"bcm-badge__dot-blink":e}),l=n("bcm-badge",{hidden:o});return t(i,{class:l,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),t("div",{class:p},!!a&&t("span",{class:"bcm-badge__dot-text"},a)),t(c,{value:r}))}get el(){return a(this)}};h.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-badge{--bcm-badge-color:var(--bcm-new-ds-color-white);--bcm-badge-background-color:var(--bcm-new-ds-color-slate-400);--bcm-badge-spacing:4px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-badge.hidden{display:none}.bcm-badge span:empty{display:none}.bcm-badge__dot{color:var(--bcm-badge-color);background-color:var(--bcm-badge-background-color);display:inline-block;border-radius:100px;position:relative}.bcm-badge__dot-text{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:0 var(--bcm-badge-spacing);z-index:2;color:var(--bcm-badge-color)}.bcm-badge__dot-size-small{font-size:10px;line-height:calc(10px + 8px);min-width:6px;min-height:6px}.bcm-badge__dot-size-small .bcm-badge__dot-text{min-width:calc(10px + 8px)}.bcm-badge__dot-size-medium{font-size:12px;line-height:calc(12px + 8px);min-width:8px;min-height:8px}.bcm-badge__dot-size-medium .bcm-badge__dot-text{min-width:calc(12px + 8px)}.bcm-badge__dot-size-large{font-size:14px;line-height:calc(14px + 8px);min-width:10px;min-height:10px}.bcm-badge__dot-size-large .bcm-badge__dot-text{min-width:calc(14px + 8px)}.bcm-badge__dot-blink{position:relative;z-index:1}.bcm-badge__dot-blink:after{content:"";position:absolute;z-index:-1;top:0;left:0;background:var(--bcm-badge-background-color);border-radius:100px;opacity:0.7;box-shadow:0 0 0 0 rgba(0, 0, 0, 0);transform:scale(1);width:100%;height:100%}.bcm-badge__dot:after{background-color:var(--bcm-badge-background-color);animation:badge-pulse 2s infinite}@keyframes badge-pulse{0%{transform:scale(0.95);box-shadow:0 0 0 0 var(--bcm-badge-background-color)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(0, 0, 0, 0)}100%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(0, 0, 0, 0)}}';export{l as bcm_avatar,h as bcm_badge}
5
+ import{r as e,h as t,H as i,g as a}from"./p-da1055cb.js";import{C as s}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-78c2392b.js";import{N as o}from"./p-a2d7aa7d.js";import"./p-8d0ca8c2.js";import"./p-91c03c8b.js";import"./p-7e44e6b5.js";import{a as p}from"./p-a429e85b.js";import{c as n}from"./p-d65a1e21.js";import{S as c}from"./p-79fd816c.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const l=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.image=void 0,this.name=void 0,this.alt=void 0,this.shape=p.Shape.ellipse,this.size=p.Size.medium,this.color=void 0,this.status=void 0,this.isFallback=!1}componentWillLoad(){this.name=this.name&&this.name.trim()||""}handleError(){this.isFallback=!0}getCustomSizes(e){return Math.round(parseInt(e)/3)}getFirstLetters(e){const t=e.split(" ");return 1===t.length?t[0].substring(0,2):t[0].charAt(0)+t[t.length-1].charAt(0)}setStyleVariables(){const{size:e}=this;let{color:t}=this;!t&&(t="slate");let i=o.toNumber(e),a=Math.round(parseInt(i)/3);const r="--bcm-avatar";return{[`${r}-color`]:s.dsColor(`${t}-600`),[`${r}-background-color`]:s.dsColor(`${t}-100`),[`${r}-height`]:`${i}px`,[`${r}-font-size`]:`${a}px`}}render(){const{image:e,name:a,alt:s,hidden:r,shape:o,size:c,status:l}=this,h=!Object.keys(p.BaseSize).includes(c),x=n("bcm-avatar",`bcm-avatar__shape-${o}`,`bcm-avatar__size-${h?"custom":c}`,{hidden:r,"bcm-avatar__status":!!l}),m=()=>t("bcm-icon",{icon:"fas fa-user"});return t(i,{class:x,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),this.isFallback?this.name?this.getFirstLetters(this.name):m():e?t("img",{onError:()=>this.handleError(),src:e,alt:s}):a?this.getFirstLetters(a):m(),l&&t("bcm-badge",{status:l}))}get el(){return a(this)}};l.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-avatar{--bcm-avatar-color:var(--bcm-new-ds-color-slate-600);--bcm-avatar-background-color:var(--bcm-new-ds-color-slate-100);--prefix-height:40px;--prefix-font-size:font-size(2);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;background-color:var(--bcm-avatar-background-color);color:var(--bcm-avatar-color);text-transform:uppercase}.bcm-avatar.hidden{display:none}.bcm-avatar img{width:100%;height:100%}.bcm-avatar__shape-ellipse,.bcm-avatar__shape-ellipse>img{border-radius:100px}.bcm-avatar__shape-square,.bcm-avatar__shape-square>img{border-radius:4px}.bcm-avatar__shape-ellipse .bcm-badge{top:0px;right:0px}.bcm-avatar__shape-square .bcm-badge{top:-2px;right:-2px}.bcm-avatar__size-small{font-size:10px;line-height:calc(10px + 8px);height:24px;width:24px}.bcm-avatar__size-medium{font-size:12px;line-height:calc(12px + 8px);height:32px;width:32px}.bcm-avatar__size-large{font-size:14px;line-height:calc(14px + 8px);height:40px;width:40px}.bcm-avatar__size-custom{font-size:var(--bcm-avatar-font-size);line-height:calc(var(--bcm-avatar-font-size) + 8px);height:var(--bcm-avatar-height);width:var(--bcm-avatar-height)}.bcm-avatar__status{position:relative}.bcm-avatar__status .bcm-badge{position:absolute}';const h=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.blink=!1,this.value=void 0,this.color=void 0,this.size=p.Size.medium,this.status=void 0,this._slot=void 0}setStyleVariables(){const{status:e,value:t}=this;let{color:i}=this;e&&(i={info:"blue",error:"red",warning:"amber",success:"emerald",default:"slate"}[e]),!i&&(i="slate");const a="--bcm-badge",r=t&&t.length>1?"8":"4";return{[`${a}-color`]:s.reverseColor(s.dsColor(`${i}`)),[`${a}-background-color`]:s.dsColor(`${i}`),[`${a}-spacing`]:`${r}px`}}render(){let{blink:e,value:a,size:s,_slot:r,hidden:o}=this;const p=n("bcm-badge__dot","bcm-badge__dot-size-"+s,{"bcm-badge__dot-blink":e}),l=n("bcm-badge",{hidden:o});return t(i,{class:l,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),t("div",{class:p},!!a&&t("span",{class:"bcm-badge__dot-text"},a)),t(c,{value:r}))}get el(){return a(this)}};h.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-badge{--bcm-badge-color:var(--bcm-new-ds-color-white);--bcm-badge-background-color:var(--bcm-new-ds-color-slate-400);--bcm-badge-spacing:4px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-badge.hidden{display:none}.bcm-badge span:empty{display:none}.bcm-badge__dot{color:var(--bcm-badge-color);background-color:var(--bcm-badge-background-color);display:inline-block;border-radius:100px;position:relative}.bcm-badge__dot-text{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:0 var(--bcm-badge-spacing);z-index:2;color:var(--bcm-badge-color)}.bcm-badge__dot-size-small{font-size:10px;line-height:calc(10px + 8px);min-width:6px;min-height:6px}.bcm-badge__dot-size-small .bcm-badge__dot-text{min-width:calc(10px + 8px)}.bcm-badge__dot-size-medium{font-size:12px;line-height:calc(12px + 8px);min-width:8px;min-height:8px}.bcm-badge__dot-size-medium .bcm-badge__dot-text{min-width:calc(12px + 8px)}.bcm-badge__dot-size-large{font-size:14px;line-height:calc(14px + 8px);min-width:10px;min-height:10px}.bcm-badge__dot-size-large .bcm-badge__dot-text{min-width:calc(14px + 8px)}.bcm-badge__dot-blink{position:relative;z-index:1}.bcm-badge__dot-blink:after{content:"";position:absolute;z-index:-1;top:0;left:0;background:var(--bcm-badge-background-color);border-radius:100px;opacity:0.7;box-shadow:0 0 0 0 rgba(0, 0, 0, 0);transform:scale(1);width:100%;height:100%}.bcm-badge__dot:after{background-color:var(--bcm-badge-background-color);animation:badge-pulse 2s infinite}@keyframes badge-pulse{0%{transform:scale(0.95);box-shadow:0 0 0 0 var(--bcm-badge-background-color)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(0, 0, 0, 0)}100%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(0, 0, 0, 0)}}';export{l as bcm_avatar,h as bcm_badge}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as s,g as a}from"./p-da1055cb.js";import{G as w}from"./p-29686031.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const d=class{constructor(s){t(this,s),this._id=w.UID(),this.loading=!0}componentDidLoad(){var t;const s=null===(t=this.el)||void 0===t?void 0:t.parentElement;if(s){const t=document.createElement("span");t.setAttribute("id",`${this._id}-span`),t.classList.add("tw-hidden"),t.innerHTML="<slot />",s.appendChild(t),s.isConnected&&(this.loading=!1,s.querySelector(`#${this._id}-span`).remove())}}render(){return s(this.loading?()=>s("div",{class:"tw-mx-auto tw-w-full tw-max-w-sm tw-rounded-md tw-border tw-border-blue-300 tw-p-4 tw-shadow"},s("span",{class:"tw-hidden"},s("slot",null)),s("div",{class:"tw-flex tw-animate-pulse tw-space-x-4"},s("div",{class:"tw-h-10 tw-w-10 tw-rounded-full tw-bg-slate-200"}),s("div",{class:"tw-flex-1 tw-space-y-6 tw-py-1"},s("div",{class:"tw-h-2 tw-rounded tw-bg-slate-200"}),s("div",{class:"tw-space-y-3"},s("div",{class:"tw-grid tw-grid-cols-3 tw-gap-4"},s("div",{class:"tw-col-span-2 tw-h-2 tw-rounded tw-bg-slate-200"}),s("div",{class:"tw-col-span-1 tw-h-2 tw-rounded tw-bg-slate-200"})),s("div",{class:"tw-h-2 tw-rounded tw-bg-slate-200"}))))):"slot",null)}get el(){return a(this)}};export{d as bcm_skeleton}
5
+ import{r as t,h as s,g as a}from"./p-da1055cb.js";import{G as w}from"./p-78c2392b.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const d=class{constructor(s){t(this,s),this._id=w.UID(),this.loading=!0}componentDidLoad(){var t;const s=null===(t=this.el)||void 0===t?void 0:t.parentElement;if(s){const t=document.createElement("span");t.setAttribute("id",`${this._id}-span`),t.classList.add("tw-hidden"),t.innerHTML="<slot />",s.appendChild(t),s.isConnected&&(this.loading=!1,s.querySelector(`#${this._id}-span`).remove())}}render(){return s(this.loading?()=>s("div",{class:"tw-mx-auto tw-w-full tw-max-w-sm tw-rounded-md tw-border tw-border-blue-300 tw-p-4 tw-shadow"},s("span",{class:"tw-hidden"},s("slot",null)),s("div",{class:"tw-flex tw-animate-pulse tw-space-x-4"},s("div",{class:"tw-h-10 tw-w-10 tw-rounded-full tw-bg-slate-200"}),s("div",{class:"tw-flex-1 tw-space-y-6 tw-py-1"},s("div",{class:"tw-h-2 tw-rounded tw-bg-slate-200"}),s("div",{class:"tw-space-y-3"},s("div",{class:"tw-grid tw-grid-cols-3 tw-gap-4"},s("div",{class:"tw-col-span-2 tw-h-2 tw-rounded tw-bg-slate-200"}),s("div",{class:"tw-col-span-1 tw-h-2 tw-rounded tw-bg-slate-200"})),s("div",{class:"tw-h-2 tw-rounded tw-bg-slate-200"}))))):"slot",null)}get el(){return a(this)}};export{d as bcm_skeleton}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as i,c as e,h as t,H as s,g as h}from"./p-da1055cb.js";import{c as o}from"./p-d65a1e21.js";import{B as p}from"./p-a429e85b.js";import{G as n}from"./p-29686031.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const a=class{constructor(t){i(this,t),this.onShow=e(this,"bcm-show",7),this.onHide=e(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const i=document.createElement("old-bcm-popover-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("_title",this._title),i.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(i)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}render(){const i=o("bcm-popover");return t(s,{class:i,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
5
+ import{r as i,c as e,h as t,H as s,g as h}from"./p-da1055cb.js";import{c as o}from"./p-d65a1e21.js";import{B as p}from"./p-a429e85b.js";import{G as n}from"./p-78c2392b.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const a=class{constructor(t){i(this,t),this.onShow=e(this,"bcm-show",7),this.onHide=e(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const i=document.createElement("old-bcm-popover-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("_title",this._title),i.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(i)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}render(){const i=o("bcm-popover");return t(s,{class:i,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as i,H as s,g as e}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-29686031.js";import"./p-0612f724.js";import"./p-8d0ca8c2.js";import"./p-57a98625.js";import"./p-7e44e6b5.js";import"./p-a429e85b.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const a=class{constructor(i){t(this,i),this._id=r.UID(),this.active=!1,this.disabled=!1,this.index=void 0}componentWillLoad(){this.indexControl()}componentDidRender(){this.headerMove()}getHeaderItem(){const t=this.el.querySelector("bcm-tab-item-header");return t&&(t.setAttribute("index",`${this.index}`),t.setAttribute("active",`${this.active}`),t.setAttribute("disabled",`${this.disabled}`),t.setAttribute("tab-id",`${this._id}`),t.style.order=`${this.index}`),t}getParentTabGroup(){return r.findParentElement(this.el,"bcm-tab-group")}getFindHeaderItem(){var t,i;return null===(i=null===(t=this.getParentTabGroup())||void 0===t?void 0:t.querySelector("#tab-header"))||void 0===i?void 0:i.querySelector(`bcm-tab-item-header[tab-id="${this._id}"]`)}headerMove(){var t,i,s,e;this.getHeaderItem()&&(null===(t=this.getFindHeaderItem())||void 0===t||t.remove(),null===(s=null===(i=this.getParentTabGroup())||void 0===i?void 0:i.querySelector("#tab-header"))||void 0===s||s.appendChild(this.getHeaderItem()),null===(e=this.el.parentElement)||void 0===e||e.refresh())}indexControl(){var t;this.index||null===(t=r.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.querySelectorAll("bcm-tab-item").forEach(((t,i)=>{t===this.el&&t.setAttribute("index",`${i+1}`)}))}componentDidLoad(){new MutationObserver((()=>{this.headerMove()})).observe(this.el,{childList:!0,subtree:!0})}render(){return i(s,{id:this._id,role:"tabpanel","aria-labelledby":`tab-${this._id}`,"aria-hidden":`${!this.active}`,class:{"tw-block":this.active,"tw-hidden":!this.active,"tw-opacity-50":this.disabled,"tw-w-full":!0}},i("slot",null))}get el(){return e(this)}};export{a as bcm_tab_item}
5
+ import{r as t,h as i,H as s,g as e}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as a}from"./p-78c2392b.js";import"./p-a2d7aa7d.js";import"./p-8d0ca8c2.js";import"./p-91c03c8b.js";import"./p-7e44e6b5.js";import"./p-a429e85b.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const r=class{constructor(i){t(this,i),this._id=a.UID(),this.active=!1,this.disabled=!1,this.index=void 0}componentWillLoad(){this.indexControl()}componentDidRender(){this.headerMove()}getHeaderItem(){const t=this.el.querySelector("bcm-tab-item-header");return t&&(t.setAttribute("index",`${this.index}`),t.setAttribute("active",`${this.active}`),t.setAttribute("disabled",`${this.disabled}`),t.setAttribute("tab-id",`${this._id}`),t.style.order=`${this.index}`),t}getParentTabGroup(){return a.findParentElement(this.el,"bcm-tab-group")}getFindHeaderItem(){var t,i;return null===(i=null===(t=this.getParentTabGroup())||void 0===t?void 0:t.querySelector("#tab-header"))||void 0===i?void 0:i.querySelector(`bcm-tab-item-header[tab-id="${this._id}"]`)}headerMove(){var t,i,s,e;this.getHeaderItem()&&(null===(t=this.getFindHeaderItem())||void 0===t||t.remove(),null===(s=null===(i=this.getParentTabGroup())||void 0===i?void 0:i.querySelector("#tab-header"))||void 0===s||s.appendChild(this.getHeaderItem()),null===(e=this.el.parentElement)||void 0===e||e.refresh())}indexControl(){var t;this.index||null===(t=a.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.querySelectorAll("bcm-tab-item").forEach(((t,i)=>{t===this.el&&t.setAttribute("index",`${i+1}`)}))}componentDidLoad(){new MutationObserver((()=>{this.headerMove()})).observe(this.el,{childList:!0,subtree:!0})}render(){return i(s,{id:this._id,role:"tabpanel","aria-labelledby":`tab-${this._id}`,"aria-hidden":`${!this.active}`,class:{"tw-block":this.active,"tw-hidden":!this.active,"tw-opacity-50":this.disabled,"tw-w-full":!0}},i("slot",null))}get el(){return e(this)}};export{r as bcm_tab_item}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,c as t,h as i,H as n,g as a}from"./p-da1055cb.js";import{c as r}from"./p-d65a1e21.js";import{I as o}from"./p-c23b6240.js";import{G as c}from"./p-29686031.js";import{B as s}from"./p-a429e85b.js";import{C as p}from"./p-c8e13fd7.js";import{I as l}from"./p-7a7f411d.js";import{d as m}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";import"./p-3fac58f7.js";var h;!function(e){e.none="none",e.both="both",e.horizontal="horizontal",e.vertical="vertical",e.initial="initial",e.inherit="inherit"}(h||(h={}));const b=class{constructor(i){e(this,i),this.focus=t(this,"bcm-focus",7),this.blur=t(this,"bcm-blur",7),this.clear=t(this,"bcm-clear",7),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",7),this._id=c.UID(),this._internal_id=c.UID(),this.hidden=!1,this.value=void 0,this.placeholder=void 0,this.label=void 0,this.name=void 0,this.required=!1,this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=s.Status.default,this.rows=3,this.size=s.Size.medium,this.disabled=void 0,this.readonly=!1,this.clearable=void 0,this.resize=h.vertical,this.fullWidth=!1,this.maxLength=void 0,this.focused=!1,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType}async onBcmFocus(){this.textarea.focus()}async onBcmBlur(){this.textarea.blur()}async onBcmSelect(){this.textarea.select()}async set(e){await this.setValue(e)}async get(){return this.value||null}async setValue(e){return this.textarea.value=e,this.value=e,this.handleChange(),e}async setClear(){return this.textarea.value="",this.value="",await m(10),Promise.resolve()}async resetCaption(){return await m(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await m(10),Promise.resolve()}async getValue(){return this.value}watchValue(e){this.textarea.value=e,this.handleChange()}handleFocus(){this.focused=!0,this.focus.emit()}handleBlur(){this.focused=!1,this.blur.emit()}handleChange(){this.value=this.textarea.value,this.change.emit(this.value)}handleInput(){this.value=this.textarea.value,this.input.emit(this.value)}handleClear(e){this.textarea.value="",this.value="",this.clear.emit(),this.textarea.focus(),e.stopPropagation()}render(){const{_id:e,hidden:t,readonly:a,fullWidth:o,size:c,rows:m,disabled:h,clearable:b,label:u,focused:d,noCaption:x,caption:g,captionError:f,captionType:_,value:w,resize:z,maxLength:y,placeholder:v,required:k}=this,j=r("bcm-input",{hidden:t,"full-width":o});return i(n,{class:j},u&&i("bcm-label",{type:_,value:u,required:k,htmlFor:e}),i(l,{elementType:s.HtmlElementType.textarea,id:e,value:w,rows:m,disabled:h,maxLength:y,placeholder:v,clearable:b,resize:z,readonly:a,size:c,focused:d,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleInput:()=>this.handleInput(),handleClear:e=>this.handleClear(e),ref:e=>this.textarea=e,captionType:_}),i(p,{noCaption:x,captionType:_,captionError:f,caption:g,value:w,maxLength:y}))}get el(){return a(this)}static get watchers(){return{value:["watchValue"]}}};(function(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);r>3&&o&&Object.defineProperty(t,i,o)})([o()],b.prototype,"el",void 0),b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea .bcm-input-element{white-space:normal}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{b as bcm_textarea}
5
+ import{r as e,c as t,h as i,H as n,g as a}from"./p-da1055cb.js";import{c as r}from"./p-d65a1e21.js";import{I as o}from"./p-c23b6240.js";import{G as c}from"./p-78c2392b.js";import{B as s}from"./p-a429e85b.js";import{C as p}from"./p-c8e13fd7.js";import{I as l}from"./p-74396cbd.js";import{d as m}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";import"./p-3fac58f7.js";var b;!function(e){e.none="none",e.both="both",e.horizontal="horizontal",e.vertical="vertical",e.initial="initial",e.inherit="inherit"}(b||(b={}));const h=class{constructor(i){e(this,i),this.focus=t(this,"bcm-focus",7),this.blur=t(this,"bcm-blur",7),this.clear=t(this,"bcm-clear",7),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",7),this._id=c.UID(),this._internal_id=c.UID(),this.hidden=!1,this.value=void 0,this.placeholder=void 0,this.label=void 0,this.name=void 0,this.required=!1,this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=s.Status.default,this.rows=3,this.size=s.Size.medium,this.disabled=void 0,this.readonly=!1,this.clearable=void 0,this.resize=b.vertical,this.fullWidth=!1,this.maxLength=void 0,this.focused=!1,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType}async onBcmFocus(){this.textarea.focus()}async onBcmBlur(){this.textarea.blur()}async onBcmSelect(){this.textarea.select()}async set(e){await this.setValue(e)}async get(){return this.value||null}async setValue(e){return this.textarea.value=e,this.value=e,this.handleChange(),e}async setClear(){return this.textarea.value="",this.value="",await m(10),Promise.resolve()}async resetCaption(){return await m(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await m(10),Promise.resolve()}async getValue(){return this.value}watchValue(e){this.textarea.value=e,this.handleChange()}handleFocus(){this.focused=!0,this.focus.emit()}handleBlur(){this.focused=!1,this.blur.emit()}handleChange(){this.value=this.textarea.value,this.change.emit(this.value)}handleInput(){this.value=this.textarea.value,this.input.emit(this.value)}handleClear(e){this.textarea.value="",this.value="",this.clear.emit(),this.textarea.focus(),e.stopPropagation()}render(){const{_id:e,hidden:t,readonly:a,fullWidth:o,size:c,rows:m,disabled:b,clearable:h,label:u,focused:d,noCaption:x,caption:g,captionError:f,captionType:_,value:w,resize:z,maxLength:y,placeholder:v,required:k}=this,j=r("bcm-input",{hidden:t,"full-width":o});return i(n,{class:j},u&&i("bcm-label",{type:_,value:u,required:k,htmlFor:e}),i(l,{elementType:s.HtmlElementType.textarea,id:e,value:w,rows:m,disabled:b,maxLength:y,placeholder:v,clearable:h,resize:z,readonly:a,size:c,focused:d,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleInput:()=>this.handleInput(),handleClear:e=>this.handleClear(e),ref:e=>this.textarea=e,captionType:_}),i(p,{noCaption:x,captionType:_,captionError:f,caption:g,value:w,maxLength:y}))}get el(){return a(this)}static get watchers(){return{value:["watchValue"]}}};(function(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);r>3&&o&&Object.defineProperty(t,i,o)})([o()],h.prototype,"el",void 0),h.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea .bcm-input-element{white-space:normal}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{h as bcm_textarea}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as i,h as e,H as n}from"./p-da1055cb.js";import{G as o}from"./p-29686031.js";import{N as r}from"./p-0612f724.js";import{S as a}from"./p-8d0ca8c2.js";import{V as s}from"./p-57a98625.js";import{B as c}from"./p-a429e85b.js";import{C as p}from"./p-c8e13fd7.js";import{I as l}from"./p-7a7f411d.js";import{c as h}from"./p-d65a1e21.js";import{d as m}from"./p-8c018ae0.js";import{I as u}from"./p-c23b6240.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-3fac58f7.js";const b=class{constructor(e){t(this,e),this.focus=i(this,"bcm-focus",7),this.blur=i(this,"bcm-blur",7),this.clear=i(this,"bcm-clear",7),this.change=i(this,"bcm-change",7),this.input=i(this,"bcm-input",7),this.isBlur=!1,this._id=o.UID(),this._internal_id=o.UID(),this.value="",this.size=c.Size.medium,this.label=void 0,this.pattern=void 0,this.tooltip=void 0,this.placeholder=void 0,this.disabled=!1,this.readonly=!1,this.clearable=!1,this.autocomplete=!1,this.name=void 0,this.type=c.InputType.text,this.hidden=!1,this.required=!1,this.fullWidth=!1,this.noDefaultIcon=void 0,this.disableWatchValue=!1,this.passwordToggle=!1,this.maxLength=null,this.unitPrefix=null,this.unit=void 0,this.decimal=!0,this.min=void 0,this.max=void 0,this.step=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=c.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this._prefix=void 0,this._suffix=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.inValid=!1,this.valueCache="",this.focused=!1,this.isPasswordVisible=!1}connectedCallback(){this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}componentWillRender(){const{type:t,isBlur:i,value:e}=this;if(e)switch(this.value.length>0&&this.checkPattern(),t){case"number":!this.checkValid("number")&&this.validationRange();break;case"email":i&&this.checkValid("email");break;case"tel":i&&this.checkValid("phone")}else!this.required&&this.resetCaption()}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async set(t){await this.setValue(t)}async get(){return this.value||null}async setValue(t){return this.inputElement.value=t,this.handleChange(),t}async setClear(){return this.inputElement.value="",this.value="",await m(10),Promise.resolve()}async resetCaption(){return await m(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.inValid=!1,await m(10),Promise.resolve()}async getValue(){return this.value}watchValue(t){this.inputElement.value=t,this.disableWatchValue||"number"==this.type||this.handleChange()}listenKeyDown(t){if(!this.disabled&&!this.readonly&&(this.onBcmFocus(),"number"==this.type)){var i=t.which||0,e=t.key;38==i&&(t.preventDefault(),this.stepUpOrDown("up")),40==i&&(t.preventDefault(),this.stepUpOrDown("down")),(190==i||110==i||"."==e)&&this.value.indexOf(".")>-1&&t.preventDefault(),189!=i&&109!=i&&"-"!=e||("-"==this.value.charAt(0)||this.value.indexOf("-")>-1)&&t.preventDefault()}}handleFocus(){this.focused=!0,this.focus.emit(),this.whatchHasFocus()}handleBlur(){this.focused=!1,this.isBlur=!0,this.whatchHasFocus(),this.blur.emit()}handleChange(){this.valueSync()}handleInput(){if("number"==this.type&&this.maxLength){const t=this.inputElement.value;t&&t.length>0&&t.length>this.maxLength&&(this.inputElement.value=t.substring(0,this.maxLength))}this.valueSync()}valueSync(){return this.value!=this.inputElement.value?(this.value=this.inputElement.value,this.change.emit(this.value),!0):(this.input.emit(this.value),!1)}handleClear(t){this.inputElement.value="",this.value="",this.inputElement.focus(),this.clear.emit(t),this.change.emit(this.value),t.stopPropagation()}changePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}setCaption(t=null,i=null){this.caption=t||this.captionCache,this.captionType=i||this.captionTypeCache,this.captionError="error"==i?t:null}stepUpOrDown(t){if(!this.inValid&&!this.disabled&&!this.readonly){let i=+this.step||1,e=+this.value;e="up"==t?+(e+i):+(e-i),this.value=e.toString(),this.change.emit(this.value)}}validationRange(){const{min:t,max:i,value:e}=this;if(e)if(t&&i){if(e<t||e>i)return this.setCaption(a.getMessage("between",[t,i]),"error"),!1}else if(t){if(e<t)return this.setCaption(a.getMessage("min",[t]),"error"),!1}else if(i&&e>i)return this.setCaption(a.getMessage("max",[i]),"error"),!1;return this.setCaption(),!0}checkPattern(){const{pattern:t,value:i}=this;t&&(s.pattern(i,t)?(this.setCaption(),this.inValid=!1):(this.setCaption(a.getMessage("pattern"),"error"),this.inValid=!0))}checkValid(t){const{value:i}=this;return s.isValidate(i,t)?(this.setCaption(),this.inValid=!1):(this.setCaption(a.getMessage(t),"error"),this.inValid=!0),this.inValid}whatchHasFocus(){const{type:t,focused:i,valueCache:e,inValid:n}=this;t==c.InputType.number&&n&&(console.log("whatchHasFocus"),this.value=i?"":a.isNullOrEmpty(this.value)?e:this.value?this.fixToNumber(this.value):"")}fixToNumber(t){if(t){const i=r.getDecimalLength(this.step);return i>0?r.parseFloatFixed(t,i):t}return t}eyeDropper(){(new window.EyeDropper).open().then((t=>{console.log("color: ",t.sRGBHex),this.setValue(t.sRGBHex)})).catch((t=>{"NotAllowedError"===t.name?console.log("Permission to access sensor was denied."):"NotSupportedError"===t.name&&console.log("Sensor not supported.")}))}isEyeDropperSupported(){return"undefined"!=typeof window&&"EyeDropper"in window}toggleLinked(){const t=document.getElementById(`${this._id}-linked`);t&&t.toggle()}render(){const{value:t,size:i,label:o,type:r,captionType:a,caption:s,captionError:m,placeholder:u,fullWidth:b,disabled:d,readonly:x,clearable:g,passwordToggle:f,isPasswordVisible:_,noDefaultIcon:w,unit:y,inValid:v,focused:z,unitPrefix:k,noCaption:j,required:I,hidden:C,_id:D,autocomplete:V}=this,P=(null==t?void 0:t.length)>0&&g,B=h("bcm-input",`bcm-input__container--${i}`,{hidden:C,"full-width":b});return e(n,{onfocus:()=>this.onBcmFocus(),class:B,onClick:()=>this.onBcmFocus()},o&&e("bcm-label",{onClick:()=>this.toggleLinked(),tooltip:this.tooltip,type:a,value:o,required:I,htmlFor:D}),e(l,{id:D,type:r,value:t,pattern:this.pattern,placeholder:u,disabled:d,readonly:x,clearable:P,passwordToggle:f,isPasswordVisible:_,noDefaultIcon:w,focused:z,inValid:v,unitPrefix:k,maxLength:this.maxLength,internalId:this._internal_id,captionType:a,unit:y,size:i,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleInput:()=>this.handleInput(),steps:t=>this.stepUpOrDown(t),changePasswordVisibility:()=>this.changePasswordVisibility(),handleClear:t=>this.handleClear(t),eyeDropper:()=>this.eyeDropper(),isEyeDropperSupported:()=>this.isEyeDropperSupported(),ref:t=>this.inputElement=t,_suffix:this._suffix,_prefix:this._prefix,autocomplete:V}),e(p,{noCaption:j,captionType:a,captionError:m,caption:s,customErrorMessage:this.customErrorMessage}),r==c.InputType.color&&e("bcm-linked",{targetId:this._id+"-container",id:this._id+"-linked"},e("bcm-colorful",{id:this._id+"-picker",color:this.value,onBcmChange:t=>this.setValue(t.detail)})))}static get watchers(){return{value:["watchValue"]}}};(function(t,i,e,n){var o,r=arguments.length,a=r<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(i,e,a):o(i,e))||a);r>3&&a&&Object.defineProperty(i,e,a)})([u()],b.prototype,"inputElement",void 0),b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea .bcm-input-element{white-space:normal}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{b as bcm_input}
5
+ import{r as t,c as i,h as e,H as n}from"./p-da1055cb.js";import{G as o}from"./p-78c2392b.js";import{N as r}from"./p-a2d7aa7d.js";import{S as a}from"./p-8d0ca8c2.js";import{V as s}from"./p-91c03c8b.js";import{B as c}from"./p-a429e85b.js";import{C as p}from"./p-c8e13fd7.js";import{I as l}from"./p-74396cbd.js";import{c as h}from"./p-d65a1e21.js";import{d as m}from"./p-8c018ae0.js";import{I as u}from"./p-c23b6240.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-3fac58f7.js";const b=class{constructor(e){t(this,e),this.focus=i(this,"bcm-focus",7),this.blur=i(this,"bcm-blur",7),this.clear=i(this,"bcm-clear",7),this.change=i(this,"bcm-change",7),this.input=i(this,"bcm-input",7),this.isBlur=!1,this._id=o.UID(),this._internal_id=o.UID(),this.value="",this.size=c.Size.medium,this.label=void 0,this.pattern=void 0,this.tooltip=void 0,this.placeholder=void 0,this.disabled=!1,this.readonly=!1,this.clearable=!1,this.autocomplete=!1,this.name=void 0,this.type=c.InputType.text,this.hidden=!1,this.required=!1,this.fullWidth=!1,this.noDefaultIcon=void 0,this.disableWatchValue=!1,this.passwordToggle=!1,this.maxLength=null,this.unitPrefix=null,this.unit=void 0,this.decimal=!0,this.min=void 0,this.max=void 0,this.step=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=c.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this._prefix=void 0,this._suffix=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.inValid=!1,this.valueCache="",this.focused=!1,this.isPasswordVisible=!1}connectedCallback(){this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}componentWillRender(){const{type:t,isBlur:i,value:e}=this;if(e)switch(this.value.length>0&&this.checkPattern(),t){case"number":!this.checkValid("number")&&this.validationRange();break;case"email":i&&this.checkValid("email");break;case"tel":i&&this.checkValid("phone")}else!this.required&&this.resetCaption()}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async set(t){await this.setValue(t)}async get(){return this.value||null}async setValue(t){return this.inputElement.value=t,this.handleChange(),t}async setClear(){return this.inputElement.value="",this.value="",await m(10),Promise.resolve()}async resetCaption(){return await m(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.inValid=!1,await m(10),Promise.resolve()}async getValue(){return this.value}watchValue(t){this.inputElement.value=t,this.disableWatchValue||"number"==this.type||this.handleChange()}listenKeyDown(t){if(!this.disabled&&!this.readonly&&(this.onBcmFocus(),"number"==this.type)){var i=t.which||0,e=t.key;38==i&&(t.preventDefault(),this.stepUpOrDown("up")),40==i&&(t.preventDefault(),this.stepUpOrDown("down")),(190==i||110==i||"."==e)&&this.value.indexOf(".")>-1&&t.preventDefault(),189!=i&&109!=i&&"-"!=e||("-"==this.value.charAt(0)||this.value.indexOf("-")>-1)&&t.preventDefault()}}handleFocus(){this.focused=!0,this.focus.emit(),this.whatchHasFocus()}handleBlur(){this.focused=!1,this.isBlur=!0,this.whatchHasFocus(),this.blur.emit()}handleChange(){this.valueSync()}handleInput(){if("number"==this.type&&this.maxLength){const t=this.inputElement.value;t&&t.length>0&&t.length>this.maxLength&&(this.inputElement.value=t.substring(0,this.maxLength))}this.valueSync()}valueSync(){return this.value!=this.inputElement.value?(this.value=this.inputElement.value,this.change.emit(this.value),!0):(this.input.emit(this.value),!1)}handleClear(t){this.inputElement.value="",this.value="",this.inputElement.focus(),this.clear.emit(t),this.change.emit(this.value),t.stopPropagation()}changePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}setCaption(t=null,i=null){this.caption=t||this.captionCache,this.captionType=i||this.captionTypeCache,this.captionError="error"==i?t:null}stepUpOrDown(t){if(!this.inValid&&!this.disabled&&!this.readonly){let i=+this.step||1,e=+this.value;e="up"==t?+(e+i):+(e-i),this.value=e.toString(),this.change.emit(this.value)}}validationRange(){const{min:t,max:i,value:e}=this;if(e)if(t&&i){if(e<t||e>i)return this.setCaption(a.getMessage("between",[t,i]),"error"),!1}else if(t){if(e<t)return this.setCaption(a.getMessage("min",[t]),"error"),!1}else if(i&&e>i)return this.setCaption(a.getMessage("max",[i]),"error"),!1;return this.setCaption(),!0}checkPattern(){const{pattern:t,value:i}=this;t&&(s.pattern(i,t)?(this.setCaption(),this.inValid=!1):(this.setCaption(a.getMessage("pattern"),"error"),this.inValid=!0))}checkValid(t){const{value:i}=this;return s.isValidate(i,t)?(this.setCaption(),this.inValid=!1):(this.setCaption(a.getMessage(t),"error"),this.inValid=!0),this.inValid}whatchHasFocus(){const{type:t,focused:i,valueCache:e,inValid:n}=this;t==c.InputType.number&&n&&(console.log("whatchHasFocus"),this.value=i?"":a.isNullOrEmpty(this.value)?e:this.value?this.fixToNumber(this.value):"")}fixToNumber(t){if(t){const i=r.getDecimalLength(this.step);return i>0?r.parseFloatFixed(t,i):t}return t}eyeDropper(){(new window.EyeDropper).open().then((t=>{console.log("color: ",t.sRGBHex),this.setValue(t.sRGBHex)})).catch((t=>{"NotAllowedError"===t.name?console.log("Permission to access sensor was denied."):"NotSupportedError"===t.name&&console.log("Sensor not supported.")}))}isEyeDropperSupported(){return"undefined"!=typeof window&&"EyeDropper"in window}toggleLinked(){const t=document.getElementById(`${this._id}-linked`);t&&t.toggle()}render(){const{value:t,size:i,label:o,type:r,captionType:a,caption:s,captionError:m,placeholder:u,fullWidth:b,disabled:d,readonly:x,clearable:g,passwordToggle:f,isPasswordVisible:_,noDefaultIcon:w,unit:y,inValid:v,focused:z,unitPrefix:k,noCaption:j,required:I,hidden:C,_id:D,autocomplete:V}=this,P=(null==t?void 0:t.length)>0&&g,B=h("bcm-input",`bcm-input__container--${i}`,{hidden:C,"full-width":b});return e(n,{onfocus:()=>this.onBcmFocus(),class:B,onClick:()=>this.onBcmFocus()},o&&e("bcm-label",{onClick:()=>this.toggleLinked(),tooltip:this.tooltip,type:a,value:o,required:I,htmlFor:D}),e(l,{id:D,type:r,value:t,pattern:this.pattern,placeholder:u,disabled:d,readonly:x,clearable:P,passwordToggle:f,isPasswordVisible:_,noDefaultIcon:w,focused:z,inValid:v,unitPrefix:k,maxLength:this.maxLength,internalId:this._internal_id,captionType:a,unit:y,size:i,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleInput:()=>this.handleInput(),steps:t=>this.stepUpOrDown(t),changePasswordVisibility:()=>this.changePasswordVisibility(),handleClear:t=>this.handleClear(t),eyeDropper:()=>this.eyeDropper(),isEyeDropperSupported:()=>this.isEyeDropperSupported(),ref:t=>this.inputElement=t,_suffix:this._suffix,_prefix:this._prefix,autocomplete:V}),e(p,{noCaption:j,captionType:a,captionError:m,caption:s,customErrorMessage:this.customErrorMessage}),r==c.InputType.color&&e("bcm-linked",{targetId:this._id+"-container",id:this._id+"-linked"},e("bcm-colorful",{id:this._id+"-picker",color:this.value,onBcmChange:t=>this.setValue(t.detail)})))}static get watchers(){return{value:["watchValue"]}}};(function(t,i,e,n){var o,r=arguments.length,a=r<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(i,e,a):o(i,e))||a);r>3&&a&&Object.defineProperty(i,e,a)})([u()],b.prototype,"inputElement",void 0),b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea .bcm-input-element{white-space:normal}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{b as bcm_input}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,c as i,h as t,H as o,g as a}from"./p-da1055cb.js";import{c as n}from"./p-d65a1e21.js";import{B as s}from"./p-a429e85b.js";import{S as l}from"./p-8d0ca8c2.js";import{S as c}from"./p-79fd816c.js";import{G as r}from"./p-29686031.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const d=class{constructor(t){e(this,t),this.beforeOpen=i(this,"beforeOpen",7),this.beforeClose=i(this,"beforeClose",7),this.close=i(this,"bcm-close",7),this.modalSlots={},this._id=r.UID(),this.isShow=!1,this.hidden=!1,this.size=s.Size.medium,this.backdrop=!0,this.width=void 0,this.height=void 0,this.fullWidth=!1}connectedCallback(){const e=this.el.querySelectorAll("bcm-modal-header, bcm-modal-footer");e&&e.forEach((e=>{let i=l.lowercase(l.split(e.nodeName,"-").pop());e.slot=i,e.classList.add(`bcm-modal__container-${i}-content`),this.modalSlots[i]=e}));const i=`bcm-modal--disable-scroll-${this._id}`,t=`bcm-modal-style-${this._id}`;let o=document.getElementById(t);o||(o=document.createElement("style"),o.id=t,o.innerHTML=`.${i} { overflow: hidden; }`,document.head.appendChild(o))}componentWillLoad(){}handleSubmit(e){const i=r.findEventPathWithNodeName(e,l.uppercase("bcm-button"));i&&i.dataDismiss&&this.hide()}handleBackdrop(){1==this.backdrop&&this.hide()}async hide(){this.beforeClose.emit(this.el),this.isShow=!1,this.close.emit(this)}async show(){this.beforeOpen.emit(this.el),this.isShow=!0}keyboardNavigation(e){1==this.backdrop&&(e.keyCode||0)==s.KeyCode.escape&&(e.preventDefault(),this.hide())}_openHandler(){const e=`bcm-modal--disable-scroll-${this._id}`;this.isShow?document.body.classList.add(e):document.body.classList.remove(e)}disconnectedCallback(){document.body.classList.remove(`bcm-modal--disable-scroll-${this._id}`)}render(){const{isShow:e,size:i,fullWidth:a,hidden:s,width:l,height:r}=this,d=n("bcm-modal__container",i,{"custom-size":l||r,"full-width":a,"bcm-modal__show":e}),m=n("bcm-modal",{hidden:s,"bcm-modal__show":e}),p=n("bcm-modal__container-main","size-2"),h=Object.assign(Object.assign({},l&&{width:l}),r&&{height:r});return t(o,{class:`tw-overscroll-contain ${m}`},t("div",{class:"overlay",onClick:()=>this.handleBackdrop()}),t("div",{class:d,style:h},t((()=>this.modalSlots.header&&t("header",{class:"bcm-modal__container-header"},t(c,{name:"header",className:"full-width"}),t("div",{class:"bcm-modal__container-header-close",onClick:()=>this.hide()},t("bcm-icon",{icon:"far fa-times"})))),null),t("main",{class:p},t("article",null,t(c,null))),t((()=>this.modalSlots.footer&&t("footer",{class:"bcm-modal__container-footer"},t("slot",{name:"footer"}))),null)))}get el(){return a(this)}static get watchers(){return{isShow:["_openHandler"]}}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-modal{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;width:100%;height:100%;position:fixed;z-index:-1;opacity:0;top:0;left:0;visibility:hidden;overflow:auto;padding:24px;transition:opacity 0.5s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show{opacity:1;z-index:10500;visibility:visible;transition:opacity 0.2s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show .bcm-modal__container{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateY(0)}.bcm-modal .overlay{position:fixed;width:100vw;height:100vh;z-index:1;top:0;left:0;opacity:0.6;background-color:var(--bcm-new-ds-color-slate-900)}.bcm-modal__container{display:flex;flex-direction:column;width:100%;box-shadow:0 2px 6px 1px rgba(17, 24, 38, 0.1);border-radius:8px;background-color:var(--bcm-new-ds-color-white);z-index:2;transform:translateY(-50px);transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.bcm-modal__container.portrait{max-width:312px}.bcm-modal__container.landscape{max-width:475px}.bcm-modal__container.small{max-width:576px}.bcm-modal__container.medium{max-width:768px}.bcm-modal__container.large{max-width:992px}.bcm-modal__container.xlarge{max-width:1024px}.bcm-modal__container.xxlarge{max-width:1200px}.bcm-modal__container.xxxlarge{max-width:1700px}.bcm-modal__container.full-width{width:100%;max-width:100%}.bcm-modal__container.custom-size main{overflow:auto;height:100%;width:100%}.bcm-modal__container-main{color:var(--bcm-color-grey-8);padding:0}.bcm-modal__container-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;padding:12px 24px;font-size:16px;line-height:calc(16px + 8px);font-weight:500;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-sky-50);position:relative}.bcm-modal__container-header span.full-width{width:100%}.bcm-modal__container-header-close{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:8px;cursor:pointer;color:var(--bcm-new-ds-color-slate-500);transition:color 0.1s ease-in-out}.bcm-modal__container-header-close:hover{color:var(--bcm-new-ds-color-slate-600)}.bcm-modal__container-header-close:active{color:var(--bcm-new-ds-color-slate-700)}.bcm-modal__container-header-close:focus-visible{color:var(--bcm-new-ds-color-slate-800)}.bcm-modal__container-header:after{border-radius:8px 8px 0 0;content:"";display:block;width:100%;height:4px;background-color:var(--bcm-new-ds-color-blue-400);position:absolute;top:-4px;left:0}.bcm-modal__container-footer-content{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-end;flex-wrap:nowrap;padding:12px 24px 24px;grid-gap:8px}';export{d as bcm_modal}
5
+ import{r as e,c as i,h as t,H as o,g as a}from"./p-da1055cb.js";import{c as n}from"./p-d65a1e21.js";import{B as s}from"./p-a429e85b.js";import{S as l}from"./p-8d0ca8c2.js";import{S as c}from"./p-79fd816c.js";import{G as r}from"./p-78c2392b.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const d=class{constructor(t){e(this,t),this.beforeOpen=i(this,"beforeOpen",7),this.beforeClose=i(this,"beforeClose",7),this.close=i(this,"bcm-close",7),this.modalSlots={},this._id=r.UID(),this.isShow=!1,this.hidden=!1,this.size=s.Size.medium,this.backdrop=!0,this.width=void 0,this.height=void 0,this.fullWidth=!1}connectedCallback(){const e=this.el.querySelectorAll("bcm-modal-header, bcm-modal-footer");e&&e.forEach((e=>{let i=l.lowercase(l.split(e.nodeName,"-").pop());e.slot=i,e.classList.add(`bcm-modal__container-${i}-content`),this.modalSlots[i]=e}));const i=`bcm-modal--disable-scroll-${this._id}`,t=`bcm-modal-style-${this._id}`;let o=document.getElementById(t);o||(o=document.createElement("style"),o.id=t,o.innerHTML=`.${i} { overflow: hidden; }`,document.head.appendChild(o))}componentWillLoad(){}handleSubmit(e){const i=r.findEventPathWithNodeName(e,l.uppercase("bcm-button"));i&&i.dataDismiss&&this.hide()}handleBackdrop(){1==this.backdrop&&this.hide()}async hide(){this.beforeClose.emit(this.el),this.isShow=!1,this.close.emit(this)}async show(){this.beforeOpen.emit(this.el),this.isShow=!0}keyboardNavigation(e){1==this.backdrop&&(e.keyCode||0)==s.KeyCode.escape&&(e.preventDefault(),this.hide())}_openHandler(){const e=`bcm-modal--disable-scroll-${this._id}`;this.isShow?document.body.classList.add(e):document.body.classList.remove(e)}disconnectedCallback(){document.body.classList.remove(`bcm-modal--disable-scroll-${this._id}`)}render(){const{isShow:e,size:i,fullWidth:a,hidden:s,width:l,height:r}=this,d=n("bcm-modal__container",i,{"custom-size":l||r,"full-width":a,"bcm-modal__show":e}),m=n("bcm-modal",{hidden:s,"bcm-modal__show":e}),p=n("bcm-modal__container-main","size-2"),h=Object.assign(Object.assign({},l&&{width:l}),r&&{height:r});return t(o,{class:`tw-overscroll-contain ${m}`},t("div",{class:"overlay",onClick:()=>this.handleBackdrop()}),t("div",{class:d,style:h},t((()=>this.modalSlots.header&&t("header",{class:"bcm-modal__container-header"},t(c,{name:"header",className:"full-width"}),t("div",{class:"bcm-modal__container-header-close",onClick:()=>this.hide()},t("bcm-icon",{icon:"far fa-times"})))),null),t("main",{class:p},t("article",null,t(c,null))),t((()=>this.modalSlots.footer&&t("footer",{class:"bcm-modal__container-footer"},t("slot",{name:"footer"}))),null)))}get el(){return a(this)}static get watchers(){return{isShow:["_openHandler"]}}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-modal{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;width:100%;height:100%;position:fixed;z-index:-1;opacity:0;top:0;left:0;visibility:hidden;overflow:auto;padding:24px;transition:opacity 0.5s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show{opacity:1;z-index:10500;visibility:visible;transition:opacity 0.2s ease, visibility 0.4s ease-in-out, 0.3s z-index}.bcm-modal__show .bcm-modal__container{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateY(0)}.bcm-modal .overlay{position:fixed;width:100vw;height:100vh;z-index:1;top:0;left:0;opacity:0.6;background-color:var(--bcm-new-ds-color-slate-900)}.bcm-modal__container{display:flex;flex-direction:column;width:100%;box-shadow:0 2px 6px 1px rgba(17, 24, 38, 0.1);border-radius:8px;background-color:var(--bcm-new-ds-color-white);z-index:2;transform:translateY(-50px);transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.bcm-modal__container.portrait{max-width:312px}.bcm-modal__container.landscape{max-width:475px}.bcm-modal__container.small{max-width:576px}.bcm-modal__container.medium{max-width:768px}.bcm-modal__container.large{max-width:992px}.bcm-modal__container.xlarge{max-width:1024px}.bcm-modal__container.xxlarge{max-width:1200px}.bcm-modal__container.xxxlarge{max-width:1700px}.bcm-modal__container.full-width{width:100%;max-width:100%}.bcm-modal__container.custom-size main{overflow:auto;height:100%;width:100%}.bcm-modal__container-main{color:var(--bcm-color-grey-8);padding:0}.bcm-modal__container-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;padding:12px 24px;font-size:16px;line-height:calc(16px + 8px);font-weight:500;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-sky-50);position:relative}.bcm-modal__container-header span.full-width{width:100%}.bcm-modal__container-header-close{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:8px;cursor:pointer;color:var(--bcm-new-ds-color-slate-500);transition:color 0.1s ease-in-out}.bcm-modal__container-header-close:hover{color:var(--bcm-new-ds-color-slate-600)}.bcm-modal__container-header-close:active{color:var(--bcm-new-ds-color-slate-700)}.bcm-modal__container-header-close:focus-visible{color:var(--bcm-new-ds-color-slate-800)}.bcm-modal__container-header:after{border-radius:8px 8px 0 0;content:"";display:block;width:100%;height:4px;background-color:var(--bcm-new-ds-color-blue-400);position:absolute;top:-4px;left:0}.bcm-modal__container-footer-content{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-end;flex-wrap:nowrap;padding:12px 24px 24px;grid-gap:8px}';export{d as bcm_modal}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{h as e,r,c as t,f as i,H as o,g as c}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as a,s}from"./p-29686031.js";import"./p-0612f724.js";import"./p-8d0ca8c2.js";import"./p-57a98625.js";import"./p-7e44e6b5.js";import{g as p}from"./p-8c018ae0.js";import{a as m}from"./p-a429e85b.js";import{c as n}from"./p-d65a1e21.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{s as d}from"./p-aafe385c.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-a60a2dd0.js";const l=({_title:r,description:t,status:i,valid:o,index:c,loading:a,active:s,stepChange:p,statusIcon:m,icon:d,disabled:l,headerHidden:b})=>{const h=n("bcm-stepper__header-item",`bcm-stepper__header-item--${i}`,{"bcm-stepper__header-item--active":s,"bcm-stepper__header-item--valid":o,"bcm-stepper__header-item--invalid":!o,"bcm-stepper__header-item--disabled":l,hidden:b}),_={success:"fal fa-check",warning:"fal fa-exclamation-triangle",error:"fal fa-times"},g=(d||m&&_[i])&&e("bcm-icon",{icon:d||_[i]});return e("div",{class:h},e("div",{class:"bcm-stepper__header-item--container",onClick:()=>!l&&p(c)},e("div",{class:"bcm-stepper__header-item-icon size-3"},a?e("bcm-icon",{icon:"far fa-spinner-third fa-spin"}):g||c),e("div",{class:"bcm-stepper__header-item-title size-2"},r),e("div",{class:"bcm-stepper__header-item-description size-1"},t)))},b=class{constructor(e){r(this,e),this.bcmStepChange=t(this,"bcm-step-change",7),this.hidden=!1,this._id=a.UID(),this.direction=m.Direction.horizontal,this.linear=!1,this.size=m.Size.medium,this.icon=!1,this.active=1,this.stepperId=a.UID(),this.data=[],this.tick={}}async dataChanged(){this.initState()}componentDidLoad(){this.initState()}disconnectedCallback(){this.reset()}async initState(){const{stepperId:e,data:r,direction:t,linear:i,size:o,icon:c,active:a,el:s}=this,p=r.length>0?r:this.getSlotElements();await d.setValue({id:e,el:s,direction:t,linear:i,size:o,icon:c,active:a,steps:p}),this.markForCheck()}componentDidRender(){this.setSteps(this.getItems())}setSteps(e){const r=p(this.el,"bcm-step");r.length>0&&r.forEach(((r,t)=>{const i=e.find((e=>!r.headerHidden&&e.id===r.id));i&&(a.setAttributes(r,Object.assign({title:"",_title:i.title||i._title||"",status:i.status||"default",disabled:i.disabled||!1,valid:i.valid||!0,loading:i.loading||!1,index:i.index||t,active:i.active||!1,innerHtml:i.innerHtml||""},1==r.hidden&&{headerHidden:!0})),(r.hidden=!1)&&r.removeAttribute("hidden"))}))}markForCheck(){this.tick=a.UID()}handleChangeBcmHidden(){this.initState()}getActiveIndex(){return d.getActiveIndex(this.stepperId)}getSlotElements(){return s((()=>p(this.el,"bcm-step")),[])}async onStepChange(e){return e&&(d.changeActiveStep(this.stepperId,e),this.bcmStepChange.emit(e)),i(this.el),Promise.resolve(e)}async prev(){const e=this.getActiveIndex()-1;if(e>=1)if(this.linear)await this.onStepChange(e);else{if(this.getItems()[e-1].disabled)return;await this.onStepChange(e)}return i(this.el),Promise.resolve(this.getActiveIndex())}async next(e){let r;r=0==e?0:1==r?1:e||this.getActiveIndex();const t=await this.getCurrentStep(),o=this.getItems()[this.getItems().length-1];return t.valid?(this.linear&&o.id!=t.id&&(t.status="success"),r<this.getItems().length&&await this.onStepChange(r+1)):t.status="error",i(this.el),Promise.resolve(this.getActiveIndex())}async setActive(e){if(e)if("number"==typeof e)if(this.linear){const r=this.getItems().filter((r=>r.index<e));(null==r?void 0:r.map((e=>({id:e.id,status:e.status,disabled:e.disabled}))).every((e=>"success"==e.status||"default"==e.status)))&&(null==r||r.forEach((e=>{e.status="success",e.disabled=!1})),await this.next(e-1))}else d.setActiveIndex(this.stepperId,e),await this.next(e-1);else console.warn("index must be a number")}async reset(){return await this.onStepChange(1),d.stepperReset(this.stepperId),Promise.resolve(this.getActiveIndex())}async getCurrentStep(){var e;return s((()=>this.getItems().filter((e=>1==e.active))[0]),null!==(e=this.getItems()[0])&&void 0!==e?e:null)}async getSteps(){return Promise.resolve(this.getItems())}getItems(){return s((()=>{var e;return null===(e=d.getValue(this.stepperId).steps)||void 0===e?void 0:e.filter((e=>!e.headerHidden))}),[])}render(){const{hidden:r,direction:t,linear:i,size:c}=this,a=n("bcm-stepper","bcm-stepper__direction-"+t,"bcm-stepper__size-"+c,{"bcm-stepper__linear":i,hidden:r}),s=e=>n("bcm-stepper__header-line",`bcm-stepper__header-line--${(null==e?void 0:e.disabled)?"disabled":"error"===(null==e?void 0:e.status)?"default":null==e?void 0:e.status}`),p=this.getItems();return e(o,{class:a},e("span",{hidden:!0,id:`bcm-stepper__steps-${this._id}`},e("slot",null)),e("main",null,e("header",{class:"bcm-stepper__header"},null==p?void 0:p.map(((r,t)=>[e(l,Object.assign({},r,{stepChange:e=>this.onStepChange(e)})),p.length>t+1&&e("div",{class:s(r)})]))),e("section",{class:"bcm-stepper__body"},this.data&&this.data.length>0?null==p?void 0:p.map((r=>e("bcm-step",Object.assign({},r)))):e("slot",null))))}get el(){return c(this)}static get watchers(){return{data:["dataChanged"]}}};b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-stepper{display:block;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400}.bcm-stepper__header{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;padding:16px}.bcm-stepper__header *,.bcm-stepper__header ::after,.bcm-stepper__header ::before{box-sizing:content-box}.bcm-stepper__header-item{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.bcm-stepper__header-item--container{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.bcm-stepper__header-item-icon{position:relative;width:32px;height:32px;display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:var(--bcm-color-prime-blue-6);color:var(--bcm-color-grey-1);line-height:1;margin-bottom:16px;user-select:none}.bcm-stepper__header-item-icon::before{width:40px;height:40px;border-radius:50%;border:2px solid var(--bcm-color-prime-blue-6);border-color:transparent;position:absolute;z-index:0;user-select:none;top:-6px;left:-6px}.bcm-stepper__header-item-title{color:var(--bcm-color-grey-8)}.bcm-stepper__header-item:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-7)}.bcm-stepper__header-item::before,.bcm-stepper__header-item::after{content:"";position:absolute;width:calc(50% - 24px);height:2px;background-color:var(--bcm-color-prime-blue-6);top:16px;box-sizing:content-box}.bcm-stepper__header-item::after{right:0}.bcm-stepper__header-item::before{left:0}.bcm-stepper__header-item:first-of-type::before{display:none}.bcm-stepper__header-item:last-of-type::after{display:none}.bcm-stepper__header-item--active .bcm-stepper__header-item-icon::before{content:"";border:2px solid var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--active .bcm-stepper__header-item-title{font-weight:500}.bcm-stepper__header-line{width:100%;flex:1;height:2px;background-color:var(--bcm-color-prime-blue-6);margin-top:16px}.bcm-stepper__header-line--warning{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-line--warning+.bcm-stepper__header-item::before{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning::after{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning .bcm-stepper__header-item-icon{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--warning:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-warmyellow-5)}.bcm-stepper__header-line--success{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-line--success+.bcm-stepper__header-item::before{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success::after{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success .bcm-stepper__header-item-icon{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--success:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-green-5)}.bcm-stepper__header-line--error{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--error+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--error::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--error .bcm-stepper__header-item-icon{background-color:var(--bcm-color-red-6)}.bcm-stepper__header-item--error .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-red-6)}.bcm-stepper__header-item--error:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--error:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-red-5)}.bcm-stepper__header-line--default{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--default+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--default::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--default .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--default .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--default:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--default:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-5)}.bcm-stepper__header-line--loading{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-line--loading+.bcm-stepper__header-item::before{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading::after{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--loading:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-5)}.bcm-stepper__header-line--disabled{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--disabled+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled .bcm-stepper__header-item-icon{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--disabled:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-grey-5)}.bcm-stepper__header-item--disabled{cursor:not-allowed}.bcm-stepper__header-item--disabled.bcm-stepper__header-item--container{pointer-events:none}.bcm-stepper__step{display:none}.bcm-stepper__step-active{display:block}';export{b as bcm_stepper}
5
+ import{h as e,r,c as t,f as i,H as o,g as c}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as a,s}from"./p-78c2392b.js";import"./p-a2d7aa7d.js";import"./p-8d0ca8c2.js";import"./p-91c03c8b.js";import"./p-7e44e6b5.js";import{g as p}from"./p-8c018ae0.js";import{a as m}from"./p-a429e85b.js";import{c as n}from"./p-d65a1e21.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{s as d}from"./p-1dd94298.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-a60a2dd0.js";const l=({_title:r,description:t,status:i,valid:o,index:c,loading:a,active:s,stepChange:p,statusIcon:m,icon:d,disabled:l,headerHidden:b})=>{const h=n("bcm-stepper__header-item",`bcm-stepper__header-item--${i}`,{"bcm-stepper__header-item--active":s,"bcm-stepper__header-item--valid":o,"bcm-stepper__header-item--invalid":!o,"bcm-stepper__header-item--disabled":l,hidden:b}),_={success:"fal fa-check",warning:"fal fa-exclamation-triangle",error:"fal fa-times"},g=(d||m&&_[i])&&e("bcm-icon",{icon:d||_[i]});return e("div",{class:h},e("div",{class:"bcm-stepper__header-item--container",onClick:()=>!l&&p(c)},e("div",{class:"bcm-stepper__header-item-icon size-3"},a?e("bcm-icon",{icon:"far fa-spinner-third fa-spin"}):g||c),e("div",{class:"bcm-stepper__header-item-title size-2"},r),e("div",{class:"bcm-stepper__header-item-description size-1"},t)))},b=class{constructor(e){r(this,e),this.bcmStepChange=t(this,"bcm-step-change",7),this.hidden=!1,this._id=a.UID(),this.direction=m.Direction.horizontal,this.linear=!1,this.size=m.Size.medium,this.icon=!1,this.active=1,this.stepperId=a.UID(),this.data=[],this.tick={}}async dataChanged(){this.initState()}componentDidLoad(){this.initState()}disconnectedCallback(){this.reset()}async initState(){const{stepperId:e,data:r,direction:t,linear:i,size:o,icon:c,active:a,el:s}=this,p=r.length>0?r:this.getSlotElements();await d.setValue({id:e,el:s,direction:t,linear:i,size:o,icon:c,active:a,steps:p}),this.markForCheck()}componentDidRender(){this.setSteps(this.getItems())}setSteps(e){const r=p(this.el,"bcm-step");r.length>0&&r.forEach(((r,t)=>{const i=e.find((e=>!r.headerHidden&&e.id===r.id));i&&(a.setAttributes(r,Object.assign({title:"",_title:i.title||i._title||"",status:i.status||"default",disabled:i.disabled||!1,valid:i.valid||!0,loading:i.loading||!1,index:i.index||t,active:i.active||!1,innerHtml:i.innerHtml||""},1==r.hidden&&{headerHidden:!0})),(r.hidden=!1)&&r.removeAttribute("hidden"))}))}markForCheck(){this.tick=a.UID()}handleChangeBcmHidden(){this.initState()}getActiveIndex(){return d.getActiveIndex(this.stepperId)}getSlotElements(){return s((()=>p(this.el,"bcm-step")),[])}async onStepChange(e){return e&&(d.changeActiveStep(this.stepperId,e),this.bcmStepChange.emit(e)),i(this.el),Promise.resolve(e)}async prev(){const e=this.getActiveIndex()-1;if(e>=1)if(this.linear)await this.onStepChange(e);else{if(this.getItems()[e-1].disabled)return;await this.onStepChange(e)}return i(this.el),Promise.resolve(this.getActiveIndex())}async next(e){let r;r=0==e?0:1==r?1:e||this.getActiveIndex();const t=await this.getCurrentStep(),o=this.getItems()[this.getItems().length-1];return t.valid?(this.linear&&o.id!=t.id&&(t.status="success"),r<this.getItems().length&&await this.onStepChange(r+1)):t.status="error",i(this.el),Promise.resolve(this.getActiveIndex())}async setActive(e){if(e)if("number"==typeof e)if(this.linear){const r=this.getItems().filter((r=>r.index<e));(null==r?void 0:r.map((e=>({id:e.id,status:e.status,disabled:e.disabled}))).every((e=>"success"==e.status||"default"==e.status)))&&(null==r||r.forEach((e=>{e.status="success",e.disabled=!1})),await this.next(e-1))}else d.setActiveIndex(this.stepperId,e),await this.next(e-1);else console.warn("index must be a number")}async reset(){return await this.onStepChange(1),d.stepperReset(this.stepperId),Promise.resolve(this.getActiveIndex())}async getCurrentStep(){var e;return s((()=>this.getItems().filter((e=>1==e.active))[0]),null!==(e=this.getItems()[0])&&void 0!==e?e:null)}async getSteps(){return Promise.resolve(this.getItems())}getItems(){return s((()=>{var e;return null===(e=d.getValue(this.stepperId).steps)||void 0===e?void 0:e.filter((e=>!e.headerHidden))}),[])}render(){const{hidden:r,direction:t,linear:i,size:c}=this,a=n("bcm-stepper","bcm-stepper__direction-"+t,"bcm-stepper__size-"+c,{"bcm-stepper__linear":i,hidden:r}),s=e=>n("bcm-stepper__header-line",`bcm-stepper__header-line--${(null==e?void 0:e.disabled)?"disabled":"error"===(null==e?void 0:e.status)?"default":null==e?void 0:e.status}`),p=this.getItems();return e(o,{class:a},e("span",{hidden:!0,id:`bcm-stepper__steps-${this._id}`},e("slot",null)),e("main",null,e("header",{class:"bcm-stepper__header"},null==p?void 0:p.map(((r,t)=>[e(l,Object.assign({},r,{stepChange:e=>this.onStepChange(e)})),p.length>t+1&&e("div",{class:s(r)})]))),e("section",{class:"bcm-stepper__body"},this.data&&this.data.length>0?null==p?void 0:p.map((r=>e("bcm-step",Object.assign({},r)))):e("slot",null))))}get el(){return c(this)}static get watchers(){return{data:["dataChanged"]}}};b.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-stepper{display:block;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400}.bcm-stepper__header{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;padding:16px}.bcm-stepper__header *,.bcm-stepper__header ::after,.bcm-stepper__header ::before{box-sizing:content-box}.bcm-stepper__header-item{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.bcm-stepper__header-item--container{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.bcm-stepper__header-item-icon{position:relative;width:32px;height:32px;display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:var(--bcm-color-prime-blue-6);color:var(--bcm-color-grey-1);line-height:1;margin-bottom:16px;user-select:none}.bcm-stepper__header-item-icon::before{width:40px;height:40px;border-radius:50%;border:2px solid var(--bcm-color-prime-blue-6);border-color:transparent;position:absolute;z-index:0;user-select:none;top:-6px;left:-6px}.bcm-stepper__header-item-title{color:var(--bcm-color-grey-8)}.bcm-stepper__header-item:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-7)}.bcm-stepper__header-item::before,.bcm-stepper__header-item::after{content:"";position:absolute;width:calc(50% - 24px);height:2px;background-color:var(--bcm-color-prime-blue-6);top:16px;box-sizing:content-box}.bcm-stepper__header-item::after{right:0}.bcm-stepper__header-item::before{left:0}.bcm-stepper__header-item:first-of-type::before{display:none}.bcm-stepper__header-item:last-of-type::after{display:none}.bcm-stepper__header-item--active .bcm-stepper__header-item-icon::before{content:"";border:2px solid var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--active .bcm-stepper__header-item-title{font-weight:500}.bcm-stepper__header-line{width:100%;flex:1;height:2px;background-color:var(--bcm-color-prime-blue-6);margin-top:16px}.bcm-stepper__header-line--warning{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-line--warning+.bcm-stepper__header-item::before{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning::after{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning .bcm-stepper__header-item-icon{background-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-warmyellow-6)}.bcm-stepper__header-item--warning:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--warning:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-warmyellow-5)}.bcm-stepper__header-line--success{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-line--success+.bcm-stepper__header-item::before{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success::after{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success .bcm-stepper__header-item-icon{background-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-green-6)}.bcm-stepper__header-item--success:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--success:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-green-5)}.bcm-stepper__header-line--error{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--error+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--error::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--error .bcm-stepper__header-item-icon{background-color:var(--bcm-color-red-6)}.bcm-stepper__header-item--error .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-red-6)}.bcm-stepper__header-item--error:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--error:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-red-5)}.bcm-stepper__header-line--default{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--default+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--default::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--default .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--default .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--default:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--default:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-5)}.bcm-stepper__header-line--loading{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-line--loading+.bcm-stepper__header-item::before{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading::after{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-prime-blue-6)}.bcm-stepper__header-item--loading:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--loading:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-prime-blue-5)}.bcm-stepper__header-line--disabled{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-line--disabled+.bcm-stepper__header-item::before{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled::after{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled .bcm-stepper__header-item-icon{background-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled .bcm-stepper__header-item-icon::before{border-color:var(--bcm-color-grey-6)}.bcm-stepper__header-item--disabled:not(.bcm-stepper__header-item--disabled):hover{cursor:pointer}.bcm-stepper__header-item--disabled:not(.bcm-stepper__header-item--disabled):hover .bcm-stepper__header-item-icon{background-color:var(--bcm-color-grey-5)}.bcm-stepper__header-item--disabled{cursor:not-allowed}.bcm-stepper__header-item--disabled.bcm-stepper__header-item--container{pointer-events:none}.bcm-stepper__step{display:none}.bcm-stepper__step-active{display:block}';export{b as bcm_stepper}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{h as n}from"./p-da1055cb.js";import{d as e}from"./p-3fac58f7.js";import{B as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{s as t}from"./p-29686031.js";const i=({elementType:i,rows:o,id:c,internalId:r,type:l,placeholder:p,value:u,size:f,pattern:d,unit:m,unitPrefix:b,maxLength:x,disabled:w,clearable:h,focused:y,readonly:v,isPasswordVisible:C,passwordToggle:g,noDefaultIcon:j,inValid:_,captionType:k,resize:z,autocomplete:I,_suffix:T,_prefix:L,changePasswordVisibility:B,handleClear:D,steps:O,ref:P,handleBlur:V,handleFocus:F,handleInput:H,handleChange:M,isEyeDropperSupported:E,eyeDropper:S})=>{const q=s.HtmlElementType[i]||s.HtmlElementType.input;l="password"===l&&C?"text":l,u=t((()=>u),""),u=y?u:u+(u&&(null==m?void 0:m.length)>0?" "+m:"");const A="color"===(l=(null==m?void 0:m.length)>0&&!y?"text":l);l="color"===l?"text":l;var G=a("bcm-input__container",q===s.HtmlElementType.textarea&&a("bcm-input__textarea","textarea-size-"+s.Size[f],"resize-"+z,"textarea-"+f),q===s.HtmlElementType.input&&a("input-size-"+s.Size[f]),{focused:y,clearable:h,disabled:w,readonly:v,invalid:_,unit:(null==m?void 0:m.length)>0,error:"error"===k});const J=a("caret-container",{unit:(null==m?void 0:m.length)>0,disabled:w||v||_}),K="bcm-input__container--"+f,N=a(K,"unit-prefix");return n("div",{class:G,id:c+"-container"},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),L&&L.length>0&&n("span",{innerHTML:L}),b&&n("span",{class:N},b),A&&n("i",{class:"tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-slate-300",style:{backgroundColor:u}})),n(q,Object.assign({tabindex:"0",id:c+"-input","bcm-internal-id":r,class:"bcm-input-element "+K},q===s.HtmlElementType.input&&{type:l,autocomplete:I?"on":"off",pattern:d},q===s.HtmlElementType.textarea&&{rows:o,resize:z},{value:u,maxLength:x,placeholder:p,disabled:w,readOnly:v,ref:n=>P(n),onBlur:n=>(n=>{n.target.parentElement.classList.remove("focused"),V(n)})(n),onFocus:n=>(n=>{n.target.parentElement.classList.add("focused"),F(n)})(n),onInput:n=>H(n),onChange:n=>M(n)})),n("span",{class:"input-suffix-content"},h&&!w&&!v&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>D(n)},n("bcm-icon",{icon:"far fa-times"}))),n("span",{class:"input-suffix-content"},("password"===l||"text"===l)&&g&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>B()},n("bcm-icon",{icon:C?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(e).includes(l)&&!j&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:e[l]}))),n("span",{class:"input-suffix-content"},"number"===l&&n("div",{class:J},n("span",{class:"bcm-input-caret",onClick:()=>O("up")},n("bcm-icon",{icon:"fas fa-caret-up"})),n("span",{class:"bcm-input-caret",onClick:()=>O("down")},n("bcm-icon",{icon:"fas fa-caret-down"})))),n("span",{class:"input-suffix-content"},"number"!==l&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),T&&T.length>0&&n("span",{innerHTML:T})),A&&E()&&n("span",{class:"input-suffix"},n("span",null,n("i",{class:"far fa-eye-dropper",onClick:()=>S()})))))};export{i as I}
5
+ import{h as n}from"./p-da1055cb.js";import{d as e}from"./p-3fac58f7.js";import{B as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{s as t}from"./p-78c2392b.js";const i=({elementType:i,rows:o,id:c,internalId:r,type:l,placeholder:p,value:u,size:f,pattern:d,unit:b,unitPrefix:m,maxLength:x,disabled:w,clearable:h,focused:y,readonly:v,isPasswordVisible:C,passwordToggle:g,noDefaultIcon:j,inValid:_,captionType:k,resize:z,autocomplete:I,_suffix:T,_prefix:L,changePasswordVisibility:B,handleClear:D,steps:O,ref:P,handleBlur:V,handleFocus:F,handleInput:H,handleChange:M,isEyeDropperSupported:E,eyeDropper:S})=>{const q=s.HtmlElementType[i]||s.HtmlElementType.input;l="password"===l&&C?"text":l,u=t((()=>u),""),u=y?u:u+(u&&(null==b?void 0:b.length)>0?" "+b:"");const A="color"===(l=(null==b?void 0:b.length)>0&&!y?"text":l);l="color"===l?"text":l;var G=a("bcm-input__container",q===s.HtmlElementType.textarea&&a("bcm-input__textarea","textarea-size-"+s.Size[f],"resize-"+z,"textarea-"+f),q===s.HtmlElementType.input&&a("input-size-"+s.Size[f]),{focused:y,clearable:h,disabled:w,readonly:v,invalid:_,unit:(null==b?void 0:b.length)>0,error:"error"===k});const J=a("caret-container",{unit:(null==b?void 0:b.length)>0,disabled:w||v||_}),K="bcm-input__container--"+f,N=a(K,"unit-prefix");return n("div",{class:G,id:c+"-container"},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),L&&L.length>0&&n("span",{innerHTML:L}),m&&n("span",{class:N},m),A&&n("i",{class:"tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-slate-300",style:{backgroundColor:u}})),n(q,Object.assign({tabindex:"0",id:c+"-input","bcm-internal-id":r,class:"bcm-input-element "+K},q===s.HtmlElementType.input&&{type:l,autocomplete:I?"on":"off",pattern:d},q===s.HtmlElementType.textarea&&{rows:o,resize:z},{value:u,maxLength:x,placeholder:p,disabled:w,readOnly:v,ref:n=>P(n),onBlur:n=>(n=>{n.target.parentElement.classList.remove("focused"),V(n)})(n),onFocus:n=>(n=>{n.target.parentElement.classList.add("focused"),F(n)})(n),onInput:n=>H(n),onChange:n=>M(n)})),n("span",{class:"input-suffix-content"},h&&!w&&!v&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>D(n)},n("bcm-icon",{icon:"far fa-times"}))),n("span",{class:"input-suffix-content"},("password"===l||"text"===l)&&g&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>B()},n("bcm-icon",{icon:C?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(e).includes(l)&&!j&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:e[l]}))),n("span",{class:"input-suffix-content"},"number"===l&&n("div",{class:J},n("span",{class:"bcm-input-caret",onClick:()=>O("up")},n("bcm-icon",{icon:"fas fa-caret-up"})),n("span",{class:"bcm-input-caret",onClick:()=>O("down")},n("bcm-icon",{icon:"fas fa-caret-down"})))),n("span",{class:"input-suffix-content"},"number"!==l&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),T&&T.length>0&&n("span",{innerHTML:T})),A&&E()&&n("span",{class:"input-suffix"},n("span",null,n("i",{class:"far fa-eye-dropper",onClick:()=>S()})))))};export{i as I}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{c as r}from"./p-4aa0e6b1.js";var n,t;function e(r,n){try{var t=r();return void 0===t?n:t}catch(r){if(r instanceof TypeError)return n;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(n||(n={})),function(r){r.banner="banner",r.basic="basic"}(t||(t={}));const o=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return o.includes(r)})()&&console.log("%cbromcom ui%c version: 2.8.0-rc.13-p ","color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let n=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&n&&r.classList.add(`bcm-theme-${n}`)}();class c{static getTwColor(n,t="--bcm-color-default"){if(!n||!r[n])return!1;const e=r[n],o={};for(const[r,n]of Object.entries(e))o[`${t}-${r}`]=n;return o}}c.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,c.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case n.info:return{icon:"far fa-info-circle"};case n.error:return{icon:"far fa-times-circle"};case n.warning:return{icon:"far fa-exclamation-circle"};case n.success:return{icon:"far fa-check-circle"}}},c.createComponent=(r,n,t="append-area")=>{let e=t?document.querySelector(t):document.body;t&&!e&&(e=document.createElement("div"),e.id="append-area",document.body.appendChild(e),e.style.visibility="hidden",e.style.opacity="0");let o=document.getElementById(n.id);return o||(o=document.createElement(r)),Object.keys(n).forEach((r=>{o[r]=n[r]})),e.appendChild(o),o},c.createElement=(r="div",n)=>{let t=document.getElementById(n.id);return t||(t=document.createElement(r)),Object.keys(n).forEach((r=>{"innerHTML"==r?t[r]=n[r]:t.setAttribute(r,n[r])})),document.body.appendChild(t),t},c.debounceInput=(r,n,t,e)=>{let o;return function(){let c=this,u=arguments;e&&e.apply(c,u);let i=function(){o=null,t||r.apply(c,u)},a=t&&!o;clearTimeout(o),o=setTimeout(i,n),a&&r.apply(c,u)}},c.flatArray=r=>r.reduce(((r,n)=>r.concat(Array.isArray(n)?c.flatArray(n):n)),[]),c.reverseNodeList=r=>{let n=[];for(let t=r.length-1;t>=0;t--)n.push(r[t]);return n},c.findEventPathWithKey=(r,n,t)=>{t=Array.isArray(t)?t:[t];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>t.includes(r[n])))[0]},c.findEventPathHasAttribute=(r,n)=>{let t=r.composedPath()||r.path;if(t)return e((()=>!!t.find((r=>r.hasAttribute(n)))),!1)},c.findEventTarget=(r,n)=>{n=Array.isArray(n)?n:[n];let t=r.target||r.srcElement;if(t)return n.includes(t)},c.findEventPathWithNodeName=(r,n)=>{let t=r.composedPath()||r.path;if(t)return t.filter((r=>r.nodeName===n))[0]},c.findEventPath=(r,n)=>{n=Array.isArray(n)?n:[n];let t=r.composedPath()||r.path;if(t)return void 0!==t.filter((r=>n.includes(r)))[0]},c.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,c.convertIdsToNestedData=(r,n)=>{let t=[],e=[];return n.forEach((n=>{r&&r.indexOf(n.id.toString())>-1?t.push(n):n.items&&(e=c.convertIdsToNestedData(r,n.items),e.length>0&&(n.items=e,t.push(n)))})),t},c.nodeListToArray=r=>Array.prototype.slice.call(r),c.setAttributes=(r,n)=>{Object.keys(n).forEach((t=>{r.setAttribute(t,n[t])}))},c.computedStyle=(r,n)=>window.getComputedStyle(r,null).getPropertyValue(n),c.getAncestor=(r,n)=>{for(;(r=r.parentElement)&&!r.matches(n););return r},c.findParentElement=(r,n)=>{const t=n.charAt(0);if("*"===n)return r.parentElement;if("."===t){const t=n.slice(1);return function(r,n){for(;null!==r;){if(r.classList.contains(n))return r;r=r.parentElement}return null}(r.parentElement,t)}if("#"===t){const t=n.slice(1);return function(r,n){for(;null!==r;){if(r.id===n)return r;r=r.parentElement}return null}(r.parentElement,t)}if("["===t){const t=n.indexOf("]"),e=n.slice(1,t),o=n.slice(t+2,-1);return function(r,n,t){for(;null!==r;){if(r.hasAttribute(n)&&(void 0===t||r.getAttribute(n)===t))return r;r=r.parentElement}return null}(r.parentElement,e,o)}{const t=n.toLowerCase();return function(r,n){for(;null!==r;){if(r.tagName.toLowerCase()===n.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,t)}};export{c as G,n as S,t as T,e as s}
5
+ import{c as r}from"./p-4aa0e6b1.js";var n,t;function e(r,n){try{var t=r();return void 0===t?n:t}catch(r){if(r instanceof TypeError)return n;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(n||(n={})),function(r){r.banner="banner",r.basic="basic"}(t||(t={}));const o=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return o.includes(r)})()&&console.log("%cbromcom ui%c version: 2.8.0-rc.14-p ","color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let n=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&n&&r.classList.add(`bcm-theme-${n}`)}();class c{static getTwColor(n,t="--bcm-color-default"){if(!n||!r[n])return!1;const e=r[n],o={};for(const[r,n]of Object.entries(e))o[`${t}-${r}`]=n;return o}}c.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,c.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case n.info:return{icon:"far fa-info-circle"};case n.error:return{icon:"far fa-times-circle"};case n.warning:return{icon:"far fa-exclamation-circle"};case n.success:return{icon:"far fa-check-circle"}}},c.createComponent=(r,n,t="append-area")=>{let e=t?document.querySelector(t):document.body;t&&!e&&(e=document.createElement("div"),e.id="append-area",document.body.appendChild(e),e.style.visibility="hidden",e.style.opacity="0");let o=document.getElementById(n.id);return o||(o=document.createElement(r)),Object.keys(n).forEach((r=>{o[r]=n[r]})),e.appendChild(o),o},c.createElement=(r="div",n)=>{let t=document.getElementById(n.id);return t||(t=document.createElement(r)),Object.keys(n).forEach((r=>{"innerHTML"==r?t[r]=n[r]:t.setAttribute(r,n[r])})),document.body.appendChild(t),t},c.debounceInput=(r,n,t,e)=>{let o;return function(){let c=this,u=arguments;e&&e.apply(c,u);let i=function(){o=null,t||r.apply(c,u)},a=t&&!o;clearTimeout(o),o=setTimeout(i,n),a&&r.apply(c,u)}},c.flatArray=r=>r.reduce(((r,n)=>r.concat(Array.isArray(n)?c.flatArray(n):n)),[]),c.reverseNodeList=r=>{let n=[];for(let t=r.length-1;t>=0;t--)n.push(r[t]);return n},c.findEventPathWithKey=(r,n,t)=>{t=Array.isArray(t)?t:[t];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>t.includes(r[n])))[0]},c.findEventPathHasAttribute=(r,n)=>{let t=r.composedPath()||r.path;if(t)return e((()=>!!t.find((r=>r.hasAttribute(n)))),!1)},c.findEventTarget=(r,n)=>{n=Array.isArray(n)?n:[n];let t=r.target||r.srcElement;if(t)return n.includes(t)},c.findEventPathWithNodeName=(r,n)=>{let t=r.composedPath()||r.path;if(t)return t.filter((r=>r.nodeName===n))[0]},c.findEventPath=(r,n)=>{n=Array.isArray(n)?n:[n];let t=r.composedPath()||r.path;if(t)return void 0!==t.filter((r=>n.includes(r)))[0]},c.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,c.convertIdsToNestedData=(r,n)=>{let t=[],e=[];return n.forEach((n=>{r&&r.indexOf(n.id.toString())>-1?t.push(n):n.items&&(e=c.convertIdsToNestedData(r,n.items),e.length>0&&(n.items=e,t.push(n)))})),t},c.nodeListToArray=r=>Array.prototype.slice.call(r),c.setAttributes=(r,n)=>{Object.keys(n).forEach((t=>{r.setAttribute(t,n[t])}))},c.computedStyle=(r,n)=>window.getComputedStyle(r,null).getPropertyValue(n),c.getAncestor=(r,n)=>{for(;(r=r.parentElement)&&!r.matches(n););return r},c.findParentElement=(r,n)=>{const t=n.charAt(0);if("*"===n)return r.parentElement;if("."===t){const t=n.slice(1);return function(r,n){for(;null!==r;){if(r.classList.contains(n))return r;r=r.parentElement}return null}(r.parentElement,t)}if("#"===t){const t=n.slice(1);return function(r,n){for(;null!==r;){if(r.id===n)return r;r=r.parentElement}return null}(r.parentElement,t)}if("["===t){const t=n.indexOf("]"),e=n.slice(1,t),o=n.slice(t+2,-1);return function(r,n,t){for(;null!==r;){if(r.hasAttribute(n)&&(void 0===t||r.getAttribute(n)===t))return r;r=r.parentElement}return null}(r.parentElement,e,o)}{const t=n.toLowerCase();return function(r,n){for(;null!==r;){if(r.tagName.toLowerCase()===n.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,t)}};export{c as G,n as S,t as T,e as s}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as e,h as i,H as o,g as r}from"./p-da1055cb.js";import{G as n,s}from"./p-29686031.js";import{B as a}from"./p-a429e85b.js";import{c as p}from"./p-d65a1e21.js";import{S as c}from"./p-8d0ca8c2.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const l=class{constructor(i){t(this,i),this.bcmChange=e(this,"bcm-change",7),this._id=n.UID(),this.size=a.Size.medium,this.type="button",this.color=void 0,this.disabled=void 0,this.direction=a.Direction.horizontal}componentWillLoad(){const{size:t,color:e}=this,i=this.getButtons();(null==i?void 0:i.length)&&i.forEach((i=>{let o=c.elementBooleanCheck(this.el.getAttribute("disabled"))||i.getAttribute("disabled");e&&i.setAttribute("color",e),t&&i.setAttribute("size",t),o&&(i.disabled=!0)}))}getButtons(){return s((()=>Array.from(this.el.querySelectorAll("bcm-button"))),[])}radioControl(t){const e=this.getButtons();(null==e?void 0:e.length)&&e.forEach((e=>{e.checked=e.id==t}))}checkboxControl(t){const e=this.getButtons();(null==e?void 0:e.length)&&e.forEach((e=>{e.checked=e.id==t?e.checked=!e.checked:e.checked}))}listenButton({target:t}){if(t.id){switch(this.type){case"radio":this.radioControl(t.id);break;case"checkbox":this.checkboxControl(t.id)}this.handleChange()}}handleChange(){const t=this.getButtons().filter(Boolean).map((t=>({id:t.id,checked:t.checked})));this.bcmChange.emit(t)}render(){const t=p("bcm-button-group",{"bcm-button-group__vertical":this.direction===a.Direction.vertical});return i(o,{class:t},i("slot",null))}get el(){return r(this)}};l.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-button-group{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;width:fit-content;background-color:var(--bcm-new-ds-color-slate-300);border:1px solid var(--bcm-new-ds-color-slate-300);gap:1px;border-radius:4px}.bcm-button-group .bcm-button__container{border-radius:0;border:none}.bcm-button-group .bcm-button:first-child .bcm-button__container{border-top-left-radius:4px;border-bottom-left-radius:4px}.bcm-button-group .bcm-button:last-child .bcm-button__container{border-top-right-radius:4px;border-bottom-right-radius:4px}.bcm-button-group__vertical{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.bcm-button-group__vertical .bcm-button{width:100%}.bcm-button-group__vertical .bcm-button__container{width:100%;border-radius:0}.bcm-button-group__vertical .bcm-button:first-child .bcm-button__container{border-radius:4px 4px 0 0}.bcm-button-group__vertical .bcm-button:last-child .bcm-button__container{border-radius:0 0 4px 4px}';export{l as bcm_button_group}
5
+ import{r as t,c as e,h as i,H as o,g as r}from"./p-da1055cb.js";import{G as n,s}from"./p-78c2392b.js";import{B as a}from"./p-a429e85b.js";import{c as p}from"./p-d65a1e21.js";import{S as c}from"./p-8d0ca8c2.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const l=class{constructor(i){t(this,i),this.bcmChange=e(this,"bcm-change",7),this._id=n.UID(),this.size=a.Size.medium,this.type="button",this.color=void 0,this.disabled=void 0,this.direction=a.Direction.horizontal}componentWillLoad(){const{size:t,color:e}=this,i=this.getButtons();(null==i?void 0:i.length)&&i.forEach((i=>{let o=c.elementBooleanCheck(this.el.getAttribute("disabled"))||i.getAttribute("disabled");e&&i.setAttribute("color",e),t&&i.setAttribute("size",t),o&&(i.disabled=!0)}))}getButtons(){return s((()=>Array.from(this.el.querySelectorAll("bcm-button"))),[])}radioControl(t){const e=this.getButtons();(null==e?void 0:e.length)&&e.forEach((e=>{e.checked=e.id==t}))}checkboxControl(t){const e=this.getButtons();(null==e?void 0:e.length)&&e.forEach((e=>{e.checked=e.id==t?e.checked=!e.checked:e.checked}))}listenButton({target:t}){if(t.id){switch(this.type){case"radio":this.radioControl(t.id);break;case"checkbox":this.checkboxControl(t.id)}this.handleChange()}}handleChange(){const t=this.getButtons().filter(Boolean).map((t=>({id:t.id,checked:t.checked})));this.bcmChange.emit(t)}render(){const t=p("bcm-button-group",{"bcm-button-group__vertical":this.direction===a.Direction.vertical});return i(o,{class:t},i("slot",null))}get el(){return r(this)}};l.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-button-group{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;width:fit-content;background-color:var(--bcm-new-ds-color-slate-300);border:1px solid var(--bcm-new-ds-color-slate-300);gap:1px;border-radius:4px}.bcm-button-group .bcm-button__container{border-radius:0;border:none}.bcm-button-group .bcm-button:first-child .bcm-button__container{border-top-left-radius:4px;border-bottom-left-radius:4px}.bcm-button-group .bcm-button:last-child .bcm-button__container{border-top-right-radius:4px;border-bottom-right-radius:4px}.bcm-button-group__vertical{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.bcm-button-group__vertical .bcm-button{width:100%}.bcm-button-group__vertical .bcm-button__container{width:100%;border-radius:0}.bcm-button-group__vertical .bcm-button:first-child .bcm-button__container{border-radius:4px 4px 0 0}.bcm-button-group__vertical .bcm-button:last-child .bcm-button__container{border-radius:0 0 4px 4px}';export{l as bcm_button_group}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as s,H as r,g as i}from"./p-da1055cb.js";import{c as t}from"./p-d65a1e21.js";import{C as o}from"./p-843905c8.js";import{G as c}from"./p-29686031.js";import{B as l}from"./p-a429e85b.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";const n={small:{textSize:"size-3",iconSize:22,circleSize:80,radius:36},medium:{textSize:"size-5",iconSize:30,circleSize:120,radius:52}},a=class{constructor(s){e(this,s),this._id=c.UID(),this.value=0,this.max=100,this.size=l.Size.medium,this.type="line-rounded",this.info=null,this.error=!1,this.hidden=!1,this.fullWidth=!1,this.color="blue",this.isCompleted=!1}connectedCallback(){this.maxPercent(this.value)}componentDidRender(){const e=this.el.querySelector("#circle");if(e){const s=2*e.r.baseVal.value*Math.PI,r=s-this.value/this.max*s;e.style.strokeDasharray=`${s} ${s}`,e.style.strokeDashoffset=`${s}`,e.style.strokeDashoffset=`${r}`}}componentShouldUpdate(e,s,r){"value"===r&&e!==s&&this.handlePercent(e),"max"===r&&e!==s&&this.value>e&&(this.value=e)}maxPercent(e){e>=this.max&&(this.value=this.max,this.isCompleted=!0),e<this.max&&(this.isCompleted=!1),e<=0&&(this.value=0)}async increment(e){this.handlePercent(+e,"increment")}async decrement(e){this.handlePercent(+e,"decrement")}async set(e){this.handlePercent(+e,"set")}handlePercent(e,s="set"){if(!e&&0!=e||"number"!=typeof e)this.error=!0;else{switch(s){case"increment":this.value+=e;break;case"decrement":this.value-=e;break;case"set":this.value=e}this.maxPercent(this.value),this.error=!1}}getIcon(e="line"){if(this.error||"icon"===this.info&&this.isCompleted)return s("bcm-icon",{icon:"far fa-"+(this.error?"times":"check")+("line"===e?"-circle":"")})}render(){const{type:e,hidden:i,error:c,size:l,isCompleted:a,value:p,fullWidth:h}=this,m="icon"===this.info,{circleSize:g,radius:x,textSize:d}=n[this.size],b=+g/2,u=t({completed:m&&a,error:c}),z=t("bcm-progress__line-progress",l,e,u),_=t("bcm-progress__circle-circle","bar",u),f={width:`${g}px`,height:`${g}px`},w=t("bcm-progress",{hidden:i,"full-width":h});return s(r,{class:w,style:{"--bcm-progress-color":o.dsColor(this.color)}},s("circle"===e?()=>s("div",{class:"bcm-progress__circle",style:f},s("svg",{width:g,height:g},s("circle",{r:x,cx:b,cy:b,class:"bcm-progress__circle-circle"}),s("circle",{r:x,cx:b,cy:b,class:_,id:"circle"}),this.info&&"icon"!=this.info&&!this.error&&s("text",{x:b,y:b,"text-anchor":"middle",class:d,"alignment-baseline":"middle"},"value-max"===this.info&&p+"/"+this.max,"value"===this.info&&{value:p},"percent"===this.info&&100/this.max*+p+"%")),this.getIcon("circle")):()=>s("div",{class:"bcm-progress__line"},s("progress",{class:z,value:p,max:this.max}),"value-max"===this.info&&s("span",{class:"value"},p,"/",this.max," "),"value"===this.info&&s("span",{class:"value"},p," "),"percent"===this.info&&s("span",{class:"value"},100/this.max*+p,"%"),"icon"===this.info&&s("span",{class:"value"},this.getIcon("line"))),null))}get el(){return i(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-progress{--bcm-progress-color:var(--bcm-new-ds-color-blue-500);display:inline-block;min-width:50px;width:100%;max-width:256px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400}.bcm-progress.full-width{width:100%;max-width:100%;min-width:auto}.bcm-progress__line{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;min-height:8px}.bcm-progress__line .value{margin-left:8px;color:var(--bcm-new-ds-color-slate-500);min-width:32px;font-size:14px;min-height:calc(14px + 8px);font-weight:500}.bcm-progress__line-progress{width:100%;flex:1;height:8px;border:0 none;background:var(--bcm-new-ds-color-slate-200);appearance:none}.bcm-progress__line-progress.small{height:6px}.bcm-progress__line-progress.line-rounded,.bcm-progress__line-progress.line-rounded::-webkit-progress-value{border-radius:8px}.bcm-progress__line-progress.line-rounded::-moz-progress-bar{border-radius:8px}.bcm-progress__line-progress.completed::-webkit-progress-value{background-color:var(--bcm-progress-color)}.bcm-progress__line-progress.completed::-moz-progress-bar{background-color:var(--bcm-progress-color)}.bcm-progress__line-progress.error::-webkit-progress-value{background-color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress.error::-moz-progress-bar{background-color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress.error .value{color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress::-webkit-progress-bar{background:transparent}.bcm-progress__line-progress::-webkit-progress-value{background-color:var(--bcm-progress-color);transition:0.3s}.bcm-progress__line-progress::-moz-progress-bar{background-color:var(--bcm-progress-color);transition:0.3s}.bcm-progress__circle{position:relative}.bcm-progress__circle bcm-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.bcm-progress__circle text{fill:var(--bcm-new-ds-color-slate-500);font-size:18px;line-height:calc(18px + 8px);font-weight:500}.bcm-progress__circle-circle{transition:0.35s stroke-dashoffset, 0.1s stroke;transform:rotate(-90deg);transform-origin:50% 50%;stroke:#F5F5F5;stroke-width:6px;fill:transparent}.bcm-progress__circle-circle.bar{stroke:var(--bcm-progress-color)}.bcm-progress__circle-circle.completed{stroke:var(--bcm-new-ds-color-emerald-500)}.bcm-progress__circle-circle.error{stroke:var(--bcm-new-ds-color-red-500)}';export{a as bcm_progress}
5
+ import{r as e,h as s,H as r,g as i}from"./p-da1055cb.js";import{c as t}from"./p-d65a1e21.js";import{C as o}from"./p-843905c8.js";import{G as c}from"./p-78c2392b.js";import{B as l}from"./p-a429e85b.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";const n={small:{textSize:"size-3",iconSize:22,circleSize:80,radius:36},medium:{textSize:"size-5",iconSize:30,circleSize:120,radius:52}},a=class{constructor(s){e(this,s),this._id=c.UID(),this.value=0,this.max=100,this.size=l.Size.medium,this.type="line-rounded",this.info=null,this.error=!1,this.hidden=!1,this.fullWidth=!1,this.color="blue",this.isCompleted=!1}connectedCallback(){this.maxPercent(this.value)}componentDidRender(){const e=this.el.querySelector("#circle");if(e){const s=2*e.r.baseVal.value*Math.PI,r=s-this.value/this.max*s;e.style.strokeDasharray=`${s} ${s}`,e.style.strokeDashoffset=`${s}`,e.style.strokeDashoffset=`${r}`}}componentShouldUpdate(e,s,r){"value"===r&&e!==s&&this.handlePercent(e),"max"===r&&e!==s&&this.value>e&&(this.value=e)}maxPercent(e){e>=this.max&&(this.value=this.max,this.isCompleted=!0),e<this.max&&(this.isCompleted=!1),e<=0&&(this.value=0)}async increment(e){this.handlePercent(+e,"increment")}async decrement(e){this.handlePercent(+e,"decrement")}async set(e){this.handlePercent(+e,"set")}handlePercent(e,s="set"){if(!e&&0!=e||"number"!=typeof e)this.error=!0;else{switch(s){case"increment":this.value+=e;break;case"decrement":this.value-=e;break;case"set":this.value=e}this.maxPercent(this.value),this.error=!1}}getIcon(e="line"){if(this.error||"icon"===this.info&&this.isCompleted)return s("bcm-icon",{icon:"far fa-"+(this.error?"times":"check")+("line"===e?"-circle":"")})}render(){const{type:e,hidden:i,error:c,size:l,isCompleted:a,value:p,fullWidth:h}=this,m="icon"===this.info,{circleSize:g,radius:x,textSize:d}=n[this.size],b=+g/2,u=t({completed:m&&a,error:c}),z=t("bcm-progress__line-progress",l,e,u),_=t("bcm-progress__circle-circle","bar",u),f={width:`${g}px`,height:`${g}px`},w=t("bcm-progress",{hidden:i,"full-width":h});return s(r,{class:w,style:{"--bcm-progress-color":o.dsColor(this.color)}},s("circle"===e?()=>s("div",{class:"bcm-progress__circle",style:f},s("svg",{width:g,height:g},s("circle",{r:x,cx:b,cy:b,class:"bcm-progress__circle-circle"}),s("circle",{r:x,cx:b,cy:b,class:_,id:"circle"}),this.info&&"icon"!=this.info&&!this.error&&s("text",{x:b,y:b,"text-anchor":"middle",class:d,"alignment-baseline":"middle"},"value-max"===this.info&&p+"/"+this.max,"value"===this.info&&{value:p},"percent"===this.info&&100/this.max*+p+"%")),this.getIcon("circle")):()=>s("div",{class:"bcm-progress__line"},s("progress",{class:z,value:p,max:this.max}),"value-max"===this.info&&s("span",{class:"value"},p,"/",this.max," "),"value"===this.info&&s("span",{class:"value"},p," "),"percent"===this.info&&s("span",{class:"value"},100/this.max*+p,"%"),"icon"===this.info&&s("span",{class:"value"},this.getIcon("line"))),null))}get el(){return i(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-progress{--bcm-progress-color:var(--bcm-new-ds-color-blue-500);display:inline-block;min-width:50px;width:100%;max-width:256px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400}.bcm-progress.full-width{width:100%;max-width:100%;min-width:auto}.bcm-progress__line{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;min-height:8px}.bcm-progress__line .value{margin-left:8px;color:var(--bcm-new-ds-color-slate-500);min-width:32px;font-size:14px;min-height:calc(14px + 8px);font-weight:500}.bcm-progress__line-progress{width:100%;flex:1;height:8px;border:0 none;background:var(--bcm-new-ds-color-slate-200);appearance:none}.bcm-progress__line-progress.small{height:6px}.bcm-progress__line-progress.line-rounded,.bcm-progress__line-progress.line-rounded::-webkit-progress-value{border-radius:8px}.bcm-progress__line-progress.line-rounded::-moz-progress-bar{border-radius:8px}.bcm-progress__line-progress.completed::-webkit-progress-value{background-color:var(--bcm-progress-color)}.bcm-progress__line-progress.completed::-moz-progress-bar{background-color:var(--bcm-progress-color)}.bcm-progress__line-progress.error::-webkit-progress-value{background-color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress.error::-moz-progress-bar{background-color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress.error .value{color:var(--bcm-new-ds-color-red-500)}.bcm-progress__line-progress::-webkit-progress-bar{background:transparent}.bcm-progress__line-progress::-webkit-progress-value{background-color:var(--bcm-progress-color);transition:0.3s}.bcm-progress__line-progress::-moz-progress-bar{background-color:var(--bcm-progress-color);transition:0.3s}.bcm-progress__circle{position:relative}.bcm-progress__circle bcm-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.bcm-progress__circle text{fill:var(--bcm-new-ds-color-slate-500);font-size:18px;line-height:calc(18px + 8px);font-weight:500}.bcm-progress__circle-circle{transition:0.35s stroke-dashoffset, 0.1s stroke;transform:rotate(-90deg);transform-origin:50% 50%;stroke:#F5F5F5;stroke-width:6px;fill:transparent}.bcm-progress__circle-circle.bar{stroke:var(--bcm-progress-color)}.bcm-progress__circle-circle.completed{stroke:var(--bcm-new-ds-color-emerald-500)}.bcm-progress__circle-circle.error{stroke:var(--bcm-new-ds-color-red-500)}';export{a as bcm_progress}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as e,H as s,g as a}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-29686031.js";import"./p-0612f724.js";import"./p-8d0ca8c2.js";import"./p-57a98625.js";import"./p-7e44e6b5.js";import{a as i}from"./p-a429e85b.js";import{c as o}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const p=class{constructor(e){t(this,e),this._id=r.UID(),this.active=!1,this.disabled=!1,this.index=void 0,this.color="blue",this.size=i.Size.medium}handleClick(){var t;this.disabled||null===(t=r.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.setActive(this.index)}render(){const{color:t,size:a,active:r,disabled:p}=this;let c,l,b;switch(a){case i.Size.small:c="2",l="1",b="2";break;case i.Size.medium:c="3",l="2",b="3";break;case i.Size.large:c="4",l="3",b="4";break;default:c="3",l="2",b="3"}return e(s,{onClick:()=>this.handleClick(),class:o(`tw-text-${c} tw-py-${l} tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-gap-${b} tw-focus:outline-none tw-mb-${l}]`,p?"tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50":"tw-cursor-pointer",r?`tw-text-${t}-500 enabled:hover:tw-text-${t}-600 enabled:active:tw-text-${t}-700 enabled:focus-visible:tw-text-${t}-800`:"tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600")})}get el(){return a(this)}};export{p as bcm_tab_item_header}
5
+ import{r as t,h as e,H as s,g as a}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-78c2392b.js";import"./p-a2d7aa7d.js";import"./p-8d0ca8c2.js";import"./p-91c03c8b.js";import"./p-7e44e6b5.js";import{a as i}from"./p-a429e85b.js";import{c as o}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const c=class{constructor(e){t(this,e),this._id=r.UID(),this.active=!1,this.disabled=!1,this.index=void 0,this.color="blue",this.size=i.Size.medium}handleClick(){var t;this.disabled||null===(t=r.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.setActive(this.index)}render(){const{color:t,size:a,active:r,disabled:c}=this;let p,l,b;switch(a){case i.Size.small:p="2",l="1",b="2";break;case i.Size.medium:p="3",l="2",b="3";break;case i.Size.large:p="4",l="3",b="4";break;default:p="3",l="2",b="3"}return e(s,{onClick:()=>this.handleClick(),class:o(`tw-text-${p} tw-py-${l} tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-gap-${b} tw-focus:outline-none tw-mb-${l}]`,c?"tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50":"tw-cursor-pointer",r?`tw-text-${t}-500 enabled:hover:tw-text-${t}-600 enabled:active:tw-text-${t}-700 enabled:focus-visible:tw-text-${t}-800`:"tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600")})}get el(){return a(this)}};export{c as bcm_tab_item_header}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,c as t,h as i,H as s,g as a}from"./p-da1055cb.js";import{G as r,s as o,S as l,T as p}from"./p-29686031.js";import{c as n}from"./p-d65a1e21.js";import{c}from"./p-a60a2dd0.js";import{S as h}from"./p-8d0ca8c2.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-a429e85b.js";const{state:m}=c({value:new Map,setData:{},removeData:{}}),d=class{constructor(i){e(this,i),this.alertdismissible=t(this,"bcm-alert-dismissible",7),this.hidden=!1,this._id=r.UID(),this._title=void 0,this.description=void 0,this.status=l.info,this.type=p.basic,this.dismissible=void 0,this.icon=!1,this.bigIcon=!1,this.fullWidth=!1}componentWillRender(){if(null!=this.dismissible)if(""==this.dismissible)this.dismissible=!0;else{if(("string"!=typeof this.dismissible||"false"!=this.dismissible)&&"true"!=this.dismissible)return;this.dismissible=h.elementBooleanCheck(this.dismissible)}this.setData()}dismiss(e){this.alertdismissible.emit(e),this.el.remove()}getStateData(){return e=this._id,o((()=>m.value.get(e)),{});var e}setData(){const{status:e,type:t,bigIcon:i}=this;(e=>{const t=Object.assign(Object.assign(Object.assign({},e),{size:e.bigIcon?"medium":14,iconType:e.bigIcon?"outlined":"fill"}),r.getIconAttrWithStatusType(e.status));m.value.set(t.id,t)})({id:this._id,status:e,type:t,bigIcon:i})}render(){const{fullWidth:e,status:t,type:a,icon:r,bigIcon:o,_title:l,hidden:p,dismissible:c,description:h}=this,m=n("bcm-alert","bcm-alert__type-"+a,"bcm-alert__status-"+t,{"full-width":e,hidden:p}),d=n("bcm-alert__header-message",h?"size-3":"size-2"),x=this.getStateData();return i(s,{class:m},i("span",{hidden:!0},i("slot",null)),i("header",{class:"bcm-alert__header"},i("span",{class:d},(o||r)&&i("bcm-icon",{icon:x.icon}),l),c&&i("span",{class:"bcm-alert__header-dismiss",onClick:e=>this.dismiss(e)},"string"==typeof c?c:i("bcm-icon",{icon:"fal fa-times"}))),i("main",{class:"bcm-alert__content size-2"},h&&i("p",null,h),i("slot",null)))}get el(){return a(this)}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-alert{display:block;width:100%;max-width:400px;box-sizing:border-box;padding:8px 16px;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);border-radius:2px;position:relative;grid-gap:8px}.bcm-alert.hidden{display:none}.bcm-alert.full-width{max-width:100%}.bcm-alert__status-info{border:1px solid var(--bcm-color-blue-3);background-color:var(--bcm-color-blue-1)}.bcm-alert__status-error{border:1px solid var(--bcm-color-red-3);background-color:var(--bcm-color-red-1)}.bcm-alert__status-warning{border:1px solid var(--bcm-color-warmyellow-3);background-color:var(--bcm-color-warmyellow-1)}.bcm-alert__status-success{border:1px solid var(--bcm-color-green-3);background-color:var(--bcm-color-green-1)}.bcm-alert__type-banner{border:none}.bcm-alert__header{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.bcm-alert__header-message{display:flex;align-items:center;grid-gap:8px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss{display:flex;position:absolute;top:-1px;right:0;padding:16px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss:hover{cursor:pointer;color:var(--bcm-color-grey-9)}.bcm-alert__content{color:var(--bcm-color-grey-8)}.bcm-alert__content p{margin:0;padding:0}';export{d as bcm_alert}
5
+ import{r as e,c as t,h as i,H as s,g as a}from"./p-da1055cb.js";import{G as r,s as o,S as l,T as p}from"./p-78c2392b.js";import{c as n}from"./p-d65a1e21.js";import{c}from"./p-a60a2dd0.js";import{S as h}from"./p-8d0ca8c2.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-a429e85b.js";const{state:m}=c({value:new Map,setData:{},removeData:{}}),d=class{constructor(i){e(this,i),this.alertdismissible=t(this,"bcm-alert-dismissible",7),this.hidden=!1,this._id=r.UID(),this._title=void 0,this.description=void 0,this.status=l.info,this.type=p.basic,this.dismissible=void 0,this.icon=!1,this.bigIcon=!1,this.fullWidth=!1}componentWillRender(){if(null!=this.dismissible)if(""==this.dismissible)this.dismissible=!0;else{if(("string"!=typeof this.dismissible||"false"!=this.dismissible)&&"true"!=this.dismissible)return;this.dismissible=h.elementBooleanCheck(this.dismissible)}this.setData()}dismiss(e){this.alertdismissible.emit(e),this.el.remove()}getStateData(){return e=this._id,o((()=>m.value.get(e)),{});var e}setData(){const{status:e,type:t,bigIcon:i}=this;(e=>{const t=Object.assign(Object.assign(Object.assign({},e),{size:e.bigIcon?"medium":14,iconType:e.bigIcon?"outlined":"fill"}),r.getIconAttrWithStatusType(e.status));m.value.set(t.id,t)})({id:this._id,status:e,type:t,bigIcon:i})}render(){const{fullWidth:e,status:t,type:a,icon:r,bigIcon:o,_title:l,hidden:p,dismissible:c,description:h}=this,m=n("bcm-alert","bcm-alert__type-"+a,"bcm-alert__status-"+t,{"full-width":e,hidden:p}),d=n("bcm-alert__header-message",h?"size-3":"size-2"),x=this.getStateData();return i(s,{class:m},i("span",{hidden:!0},i("slot",null)),i("header",{class:"bcm-alert__header"},i("span",{class:d},(o||r)&&i("bcm-icon",{icon:x.icon}),l),c&&i("span",{class:"bcm-alert__header-dismiss",onClick:e=>this.dismiss(e)},"string"==typeof c?c:i("bcm-icon",{icon:"fal fa-times"}))),i("main",{class:"bcm-alert__content size-2"},h&&i("p",null,h),i("slot",null)))}get el(){return a(this)}};d.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-alert{display:block;width:100%;max-width:400px;box-sizing:border-box;padding:8px 16px;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);border-radius:2px;position:relative;grid-gap:8px}.bcm-alert.hidden{display:none}.bcm-alert.full-width{max-width:100%}.bcm-alert__status-info{border:1px solid var(--bcm-color-blue-3);background-color:var(--bcm-color-blue-1)}.bcm-alert__status-error{border:1px solid var(--bcm-color-red-3);background-color:var(--bcm-color-red-1)}.bcm-alert__status-warning{border:1px solid var(--bcm-color-warmyellow-3);background-color:var(--bcm-color-warmyellow-1)}.bcm-alert__status-success{border:1px solid var(--bcm-color-green-3);background-color:var(--bcm-color-green-1)}.bcm-alert__type-banner{border:none}.bcm-alert__header{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.bcm-alert__header-message{display:flex;align-items:center;grid-gap:8px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss{display:flex;position:absolute;top:-1px;right:0;padding:16px;color:var(--bcm-color-grey-8)}.bcm-alert__header-dismiss:hover{cursor:pointer;color:var(--bcm-color-grey-9)}.bcm-alert__content{color:var(--bcm-color-grey-8)}.bcm-alert__content p{margin:0;padding:0}';export{d as bcm_alert}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as t,H as a,g as i}from"./p-da1055cb.js";import{G as n}from"./p-29686031.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const r=class{constructor(t){e(this,t),this._id=n.UID(),this.data=[]}render(){const{data:e}=this,i="bcm-attendance";return t(a,{class:i},t("span",{hidden:!0},t("slot",null)),e.map((e=>{var a,n;return t("div",{class:`${i}__item`},t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / AM`},t("span",{class:`${i}__item-am ${i}__item-status-${null!==(a=e.am)&&void 0!==a?a:"default"}`})),t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / PM`},t("span",{class:`${i}__item-pm ${i}__item-status-${null!==(n=e.pm)&&void 0!==n?n:"default"}`})))})))}get el(){return i(this)}};r.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-attendance{width:fit-content;display:inline-flex;align-items:center;flex-direction:row;gap:4px}.bcm-attendance__item{display:flex;flex-direction:row;align-items:center;gap:1px}.bcm-attendance__item-am,.bcm-attendance__item-pm{display:block;width:calc( calc( 12px + 1px ) / 2 );height:calc( 12px + 1px );background-color:var(--bcm-new-ds-color-blue-500)}.bcm-attendance__item-am:hover,.bcm-attendance__item-pm:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-attendance__item-am{border-top-left-radius:100px;border-bottom-left-radius:100px}.bcm-attendance__item-pm{border-top-right-radius:100px;border-bottom-right-radius:100px}.bcm-attendance__item-status-present{background-color:var(--bcm-new-ds-color-emerald-500)}.bcm-attendance__item-status-present:hover{background-color:var(--bcm-new-ds-color-emerald-600)}.bcm-attendance__item-status-late{background-color:var(--bcm-new-ds-color-amber-500)}.bcm-attendance__item-status-late:hover{background-color:var(--bcm-new-ds-color-amber-600)}.bcm-attendance__item-status-absent{background-color:var(--bcm-new-ds-color-red-500)}.bcm-attendance__item-status-absent:hover{background-color:var(--bcm-new-ds-color-red-600)}.bcm-attendance__item-status-default{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-attendance__item-status-default:hover{background-color:var(--bcm-new-ds-color-slate-400)}';export{r as bcm_attendance}
5
+ import{r as e,h as t,H as a,g as i}from"./p-da1055cb.js";import{G as n}from"./p-78c2392b.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const r=class{constructor(t){e(this,t),this._id=n.UID(),this.data=[]}render(){const{data:e}=this,i="bcm-attendance";return t(a,{class:i},t("span",{hidden:!0},t("slot",null)),e.map((e=>{var a,n;return t("div",{class:`${i}__item`},t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / AM`},t("span",{class:`${i}__item-am ${i}__item-status-${null!==(a=e.am)&&void 0!==a?a:"default"}`})),t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / PM`},t("span",{class:`${i}__item-pm ${i}__item-status-${null!==(n=e.pm)&&void 0!==n?n:"default"}`})))})))}get el(){return i(this)}};r.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-attendance{width:fit-content;display:inline-flex;align-items:center;flex-direction:row;gap:4px}.bcm-attendance__item{display:flex;flex-direction:row;align-items:center;gap:1px}.bcm-attendance__item-am,.bcm-attendance__item-pm{display:block;width:calc( calc( 12px + 1px ) / 2 );height:calc( 12px + 1px );background-color:var(--bcm-new-ds-color-blue-500)}.bcm-attendance__item-am:hover,.bcm-attendance__item-pm:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-attendance__item-am{border-top-left-radius:100px;border-bottom-left-radius:100px}.bcm-attendance__item-pm{border-top-right-radius:100px;border-bottom-right-radius:100px}.bcm-attendance__item-status-present{background-color:var(--bcm-new-ds-color-emerald-500)}.bcm-attendance__item-status-present:hover{background-color:var(--bcm-new-ds-color-emerald-600)}.bcm-attendance__item-status-late{background-color:var(--bcm-new-ds-color-amber-500)}.bcm-attendance__item-status-late:hover{background-color:var(--bcm-new-ds-color-amber-600)}.bcm-attendance__item-status-absent{background-color:var(--bcm-new-ds-color-red-500)}.bcm-attendance__item-status-absent:hover{background-color:var(--bcm-new-ds-color-red-600)}.bcm-attendance__item-status-default{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-attendance__item-status-default:hover{background-color:var(--bcm-new-ds-color-slate-400)}';export{r as bcm_attendance}