bromcom-ui 2.11.1-rc.9-2 → 2.11.1-rc.9-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-b2ba36fa.entry.js → p-082b9695.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-a97531d3.entry.js → p-0da8ad9f.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-8375c8c4.entry.js → p-0ef4f5ec.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-15199f10.entry.js +5 -0
  7. package/dist/bromcom-ui/{p-8120dcc7.entry.js → p-198cccb5.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-222203a4.entry.js +16 -0
  9. package/dist/bromcom-ui/{p-3f84d1c5.entry.js → p-2ab3e5cb.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-2addde9e.js +5 -0
  11. package/dist/bromcom-ui/p-2b42d77e.entry.js +5 -0
  12. package/dist/bromcom-ui/{p-4035fdf1.entry.js → p-2c9f9889.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-a1b05d8a.entry.js → p-42d09898.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-4ef9abca.entry.js → p-471c7f34.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-d4535e9b.entry.js → p-4d0680e1.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-59a92a47.js → p-5cb99e9e.js} +1 -1
  17. package/dist/bromcom-ui/{p-9589f69c.entry.js → p-5d670fd7.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-6c152c86.entry.js → p-5df2d3f1.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-2f92042f.entry.js → p-5ee56cae.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-1b21310e.entry.js → p-603efb90.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-64a8db1d.entry.js +5 -0
  22. package/dist/bromcom-ui/{p-61753299.js → p-6bea284a.js} +1 -1
  23. package/dist/bromcom-ui/{p-1a9cd62d.entry.js → p-7230713c.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-b6e2c3cb.entry.js → p-7d4f57be.entry.js} +1 -1
  25. package/dist/bromcom-ui/p-87e5fda5.entry.js +5 -0
  26. package/dist/bromcom-ui/{p-ca33b8ba.js → p-8f3ca5d9.js} +1 -1
  27. package/dist/bromcom-ui/{p-db66b04a.entry.js → p-9bbd341c.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-52cce799.entry.js → p-a292b41d.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-ccc6f14e.entry.js → p-a933ac12.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-e439b584.entry.js → p-adb21984.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-aeb4be41.js +5 -0
  32. package/dist/bromcom-ui/p-b847cbea.js +5 -0
  33. package/dist/bromcom-ui/{p-5d9a5c33.entry.js → p-bbe8c777.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-677c5742.entry.js → p-c157a7d4.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-3a220693.entry.js → p-c23d73fb.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-5bb77b86.entry.js → p-c67a5e5f.entry.js} +1 -1
  37. package/dist/bromcom-ui/p-c77541f4.js +10 -0
  38. package/dist/bromcom-ui/{p-d90fbea6.entry.js → p-c89acfca.entry.js} +1 -1
  39. package/dist/bromcom-ui/p-d1298c40.js +5 -0
  40. package/dist/bromcom-ui/{p-a9fb78a2.entry.js → p-e8bb9019.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-e9928d0c.entry.js +5 -0
  42. package/dist/bromcom-ui/p-f478ad92.entry.js +5 -0
  43. package/dist/bromcom-ui/{p-b92f3501.js → p-fcf70988.js} +1 -1
  44. package/dist/cjs/{bcm-accordion_45.cjs.entry.js → bcm-accordion_47.cjs.entry.js} +8890 -8620
  45. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  46. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +6 -6
  47. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +6 -6
  48. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
  49. package/dist/cjs/bcm-caption.cjs.entry.js +6 -6
  50. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  51. package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +3 -3
  52. package/dist/cjs/bcm-chip-group.cjs.entry.js +6 -6
  53. package/dist/cjs/bcm-collapse.cjs.entry.js +3 -3
  54. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  55. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
  56. package/dist/cjs/bcm-default.cjs.entry.js +3 -3
  57. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  58. package/dist/cjs/bcm-input-2.cjs.entry.js +153 -0
  59. package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
  60. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -6
  61. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
  62. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
  63. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  64. package/dist/cjs/bcm-number-input.cjs.entry.js +260 -72
  65. package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
  66. package/dist/cjs/bcm-popover.cjs.entry.js +6 -6
  67. package/dist/cjs/bcm-range.cjs.entry.js +3 -3
  68. package/dist/cjs/bcm-react-number.cjs.entry.js +1230 -0
  69. package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
  70. package/dist/cjs/bcm-table.cjs.entry.js +6 -6
  71. package/dist/cjs/bcm-tag.cjs.entry.js +4 -4
  72. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  73. package/dist/cjs/bcm-toast.cjs.entry.js +3 -3
  74. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  75. package/dist/cjs/{color-helper-c3a819ea.js → color-helper-dc98a2ca.js} +1 -1
  76. package/dist/cjs/{colors-078851ec.js → colors-250d0982.js} +13 -7
  77. package/dist/cjs/{generate-f4bfa0a4.js → generate-2f15ee94.js} +2 -2
  78. package/dist/cjs/{global-34b7d357.js → global-da78178f.js} +1 -1
  79. package/dist/cjs/index-e05a7c6f.js +545 -0
  80. package/dist/cjs/input.style-b5676e6a.js +122 -0
  81. package/dist/cjs/loader.cjs.js +3 -3
  82. package/dist/cjs/{number-helper-8b2bc297.js → number-helper-9b0b5976.js} +1 -1
  83. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -4
  84. package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
  85. package/dist/cjs/{package-b728c16f.js → package-7b89373b.js} +1 -1
  86. package/dist/cjs/{validators-816514ff.js → validators-082184cd.js} +1 -1
  87. package/dist/collection/collection-manifest.json +2 -0
  88. package/dist/collection/components/atoms/link/link.css +9 -3
  89. package/dist/collection/components/molecules/input/input.style.js +117 -0
  90. package/dist/collection/components/molecules/input/input2.js +918 -0
  91. package/dist/collection/components/molecules/modal/modal.css +1 -1
  92. package/dist/collection/components/molecules/number-input/number-input.js +776 -95
  93. package/dist/collection/components/molecules/number-input/react-input.js +96 -0
  94. package/dist/collection/components/molecules/radio/radio.js +1 -1
  95. package/dist/collection/components/organism/form/form.js +2 -2
  96. package/dist/collection/components/organism/form-2/bcm-form-components.js +2 -1
  97. package/dist/collection/components/organism/list/list.css +2 -3
  98. package/dist/collection/components/third-parts/rc-picker/date.js +1 -1
  99. package/dist/collection/components/third-parts/rc-picker/rc-picker.css +40 -5
  100. package/dist/collection/components/third-parts/rc-picker/rc-picker.js +11 -2
  101. package/dist/components/{raf.js → Overflow.js} +692 -69
  102. package/dist/components/bcm-date.js +1 -1
  103. package/dist/components/bcm-form-2.js +2 -1
  104. package/dist/components/bcm-input-2.d.ts +11 -0
  105. package/dist/components/bcm-input-2.js +225 -0
  106. package/dist/components/bcm-modal.js +1 -1
  107. package/dist/components/bcm-number-input.js +295 -79
  108. package/dist/components/bcm-react-number.d.ts +11 -0
  109. package/dist/components/bcm-react-number.js +10 -0
  110. package/dist/components/colors2.js +13 -7
  111. package/dist/components/form.js +2 -2
  112. package/dist/components/generate.js +1 -1
  113. package/dist/components/index.d.ts +2 -0
  114. package/dist/components/index.js +2 -0
  115. package/dist/components/input.style.js +120 -0
  116. package/dist/components/link.js +1 -1
  117. package/dist/components/list.js +1 -1
  118. package/dist/components/radio.js +1 -1
  119. package/dist/components/rc-overflow.js +1 -593
  120. package/dist/components/rc-picker.js +8620 -8025
  121. package/dist/components/react-input.js +1242 -0
  122. package/dist/esm/{bcm-accordion_45.entry.js → bcm-accordion_47.entry.js} +8782 -8514
  123. package/dist/esm/bcm-alert.entry.js +3 -3
  124. package/dist/esm/bcm-attendance-actions-comment.entry.js +6 -6
  125. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +6 -6
  126. package/dist/esm/bcm-breadcrumb.entry.js +3 -3
  127. package/dist/esm/bcm-caption.entry.js +6 -6
  128. package/dist/esm/bcm-card.entry.js +4 -4
  129. package/dist/esm/bcm-checkbox-lite_8.entry.js +3 -3
  130. package/dist/esm/bcm-chip-group.entry.js +6 -6
  131. package/dist/esm/bcm-collapse.entry.js +3 -3
  132. package/dist/esm/bcm-date-picker.entry.js +3 -3
  133. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  134. package/dist/esm/bcm-default.entry.js +3 -3
  135. package/dist/esm/bcm-form-2.entry.js +5 -4
  136. package/dist/esm/bcm-input-2.entry.js +149 -0
  137. package/dist/esm/bcm-input-custom.entry.js +3 -3
  138. package/dist/esm/bcm-input-dropdown.entry.js +6 -6
  139. package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
  140. package/dist/esm/bcm-modal-2-header.entry.js +6 -6
  141. package/dist/esm/bcm-modal-2.entry.js +6 -6
  142. package/dist/esm/bcm-number-input.entry.js +259 -71
  143. package/dist/esm/bcm-overlay_2.entry.js +1 -1
  144. package/dist/esm/bcm-popover.entry.js +6 -6
  145. package/dist/esm/bcm-range.entry.js +3 -3
  146. package/dist/esm/bcm-react-number.entry.js +1226 -0
  147. package/dist/esm/bcm-skeleton.entry.js +6 -6
  148. package/dist/esm/bcm-table.entry.js +6 -6
  149. package/dist/esm/bcm-tag.entry.js +4 -4
  150. package/dist/esm/bcm-time-picker.entry.js +3 -3
  151. package/dist/esm/bcm-toast.entry.js +3 -3
  152. package/dist/esm/bromcom-ui.js +3 -3
  153. package/dist/esm/{color-helper-3b528349.js → color-helper-74614f24.js} +1 -1
  154. package/dist/esm/{colors-c530a5b8.js → colors-dd598eea.js} +13 -7
  155. package/dist/esm/{generate-44c39402.js → generate-df0f43b2.js} +2 -2
  156. package/dist/esm/{global-8534a386.js → global-72a67caf.js} +1 -1
  157. package/dist/esm/index-036974d7.js +541 -0
  158. package/dist/esm/input.style-e855c0f3.js +120 -0
  159. package/dist/esm/loader.js +3 -3
  160. package/dist/esm/{number-helper-ce0f20fe.js → number-helper-b012c05f.js} +1 -1
  161. package/dist/esm/old-bcm-popover-box.entry.js +4 -4
  162. package/dist/esm/old-bcm-popover.entry.js +3 -3
  163. package/dist/esm/{package-b2db00f1.js → package-40075eb9.js} +1 -1
  164. package/dist/esm/{validators-f9bc23cc.js → validators-166e2a4e.js} +1 -1
  165. package/dist/types/components/molecules/input/input.style.d.ts +576 -0
  166. package/dist/types/components/molecules/input/input2.d.ts +64 -0
  167. package/dist/types/components/molecules/number-input/number-input.d.ts +66 -17
  168. package/dist/types/components/molecules/number-input/react-input.d.ts +16 -0
  169. package/dist/types/components.d.ts +203 -19
  170. package/package.json +4 -3
  171. package/dist/bromcom-ui/p-08501d86.entry.js +0 -5
  172. package/dist/bromcom-ui/p-3556d078.js +0 -5
  173. package/dist/bromcom-ui/p-36544f78.entry.js +0 -5
  174. package/dist/bromcom-ui/p-3a43bf45.js +0 -5
  175. package/dist/bromcom-ui/p-4d308bb7.entry.js +0 -5
  176. package/dist/bromcom-ui/p-528c5152.entry.js +0 -5
  177. package/dist/bromcom-ui/p-6a87d06d.entry.js +0 -5
  178. package/dist/bromcom-ui/p-77ede2fc.entry.js +0 -20
  179. package/dist/bromcom-ui/p-d00ca988.js +0 -5
  180. package/dist/bromcom-ui/p-de0b0192.entry.js +0 -5
  181. package/dist/cjs/bcm-link.cjs.entry.js +0 -51
  182. package/dist/cjs/bcm-modal.cjs.entry.js +0 -157
  183. package/dist/collection/components/molecules/number-input/number-input.css +0 -137
  184. package/dist/collection/components/molecules/number-input/number-input.style.js +0 -45
  185. package/dist/esm/bcm-link.entry.js +0 -47
  186. package/dist/esm/bcm-modal.entry.js +0 -153
  187. package/dist/types/components/molecules/number-input/number-input.style.d.ts +0 -200
@@ -1,5 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import{s}from"./p-3556d078.js";class r{}r.isNumber=r=>s((()=>/^[0-9]+$/i.test(r))),r.convertToNumber=r=>s((()=>Number(r))),r.replaceNumber=r=>s((()=>r.replace(/[^0-9]/g,""))),r.replaceFloat=r=>s((()=>r.replace(/[^0-9.]/g,""))),r.toFixed=(r,a)=>s((()=>r.toFixed(a))),r.parseFloatFixed=(a,e)=>s((()=>parseFloat(r.replaceFloat(a)).toFixed(e))),r.getDecimalLength=r=>s((()=>r.split(".")[1]?r.split(".")[1].length:0)),r.toNumber=r=>s((()=>Number(r.replace(/[^0-9.]/g,""))));export{r as N}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import{r as i,h as e,H as t,g as n}from"./p-170cf07d.js";import{c as s}from"./p-e0ab7b38.js";import{a}from"./p-a313fba6.js";import"./p-6657830f.js";const o=class{constructor(e){i(this,e),this.hidden=!1,this.href=void 0,this.target=void 0,this.icon=void 0,this.disabled=!1,this.iconPosition=a.IconPosition.prefix}handleOnClick(i){this.disabled&&(i.preventDefault(),i.stopPropagation())}linkIsExternal(i){return i&&!(!i.startsWith("http")&&!i.startsWith("//"))}render(){const{href:i,icon:n,hidden:o,target:l,iconPosition:r,disabled:p}=this,c=s("bcm-link",{disabled:p,hidden:o}),h=s("bcm-link__anchor",r,{suffix:this.linkIsExternal(i)});return e(t,{disabled:p,class:c},e(i?"a":"span",{class:h,href:i,target:this.linkIsExternal(i)?"_blank":l},n&&r===a.IconPosition.prefix&&e("bcm-icon",{class:"prefix-icon",icon:n}),e("slot",null),this.linkIsExternal(i)&&e("bcm-icon",{class:"suffix-icon",icon:"far fa-external-link-alt"})))}get el(){return n(this)}};o.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-link{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline;color:var(--bcm-new-ds-color-blue-500)}.bcm-link.hidden{display:none}.bcm-link.disabled{pointer-events:none;opacity:0.5;cursor:not-allowed}.bcm-link__anchor{display:inline-flex;align-items:baseline;font-size:inherit;color:inherit}.bcm-link__anchor.prefix .prefix-icon{margin-right:4px}.bcm-link__anchor.suffix .suffix-icon{margin-left:4px}.bcm-link__anchor:hover,.bcm-link__anchor:focus,.bcm-link__anchor:active,.bcm-link__anchor:focus-visible{outline:none}.bcm-link__anchor:hover{color:var(--bcm-new-ds-color-blue-600)}.bcm-link__anchor:active{color:var(--bcm-new-ds-color-blue-700)}.bcm-link__anchor:focus-visible{color:var(--bcm-new-ds-color-blue-800)}';export{o as bcm_link}
@@ -1,51 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- 'use strict';
6
-
7
- Object.defineProperty(exports, '__esModule', { value: true });
8
-
9
- const index = require('./index-c591ecec.js');
10
- const index$1 = require('./index-95ae50d0.js');
11
- const bcm = require('./bcm-1d1fcf21.js');
12
- require('./_commonjsHelpers-ed84c3ca.js');
13
-
14
- const linkCss = "@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-link{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline;color:var(--bcm-new-ds-color-blue-500)}.bcm-link.hidden{display:none}.bcm-link.disabled{pointer-events:none;opacity:0.5;cursor:not-allowed}.bcm-link__anchor{display:inline-flex;align-items:baseline;font-size:inherit;color:inherit}.bcm-link__anchor.prefix .prefix-icon{margin-right:4px}.bcm-link__anchor.suffix .suffix-icon{margin-left:4px}.bcm-link__anchor:hover,.bcm-link__anchor:focus,.bcm-link__anchor:active,.bcm-link__anchor:focus-visible{outline:none}.bcm-link__anchor:hover{color:var(--bcm-new-ds-color-blue-600)}.bcm-link__anchor:active{color:var(--bcm-new-ds-color-blue-700)}.bcm-link__anchor:focus-visible{color:var(--bcm-new-ds-color-blue-800)}";
15
-
16
- const BcmLink = class {
17
- constructor(hostRef) {
18
- index.registerInstance(this, hostRef);
19
- this.hidden = false;
20
- this.href = undefined;
21
- this.target = undefined;
22
- this.icon = undefined;
23
- this.disabled = false;
24
- this.iconPosition = bcm.Bcm$1.IconPosition.prefix;
25
- }
26
- handleOnClick(e) {
27
- if (this.disabled) {
28
- e.preventDefault();
29
- e.stopPropagation();
30
- }
31
- }
32
- linkIsExternal(url) {
33
- return url && !!(url.startsWith('http') || url.startsWith('//'));
34
- }
35
- render() {
36
- const { href, icon, hidden, target, iconPosition, disabled } = this;
37
- const hostClasses = index$1.classnames('bcm-link', {
38
- disabled,
39
- hidden
40
- });
41
- const classes = index$1.classnames('bcm-link__anchor', iconPosition, {
42
- 'suffix': this.linkIsExternal(href)
43
- });
44
- const ElementTagType = href ? 'a' : 'span';
45
- return (index.h(index.Host, { disabled: disabled, class: hostClasses }, index.h(ElementTagType, { class: classes, href: href, target: this.linkIsExternal(href) ? '_blank' : target }, icon && iconPosition === bcm.Bcm$1.IconPosition.prefix && index.h("bcm-icon", { class: "prefix-icon", icon: icon }), index.h("slot", null), this.linkIsExternal(href) && index.h("bcm-icon", { class: "suffix-icon", icon: "far fa-external-link-alt" }))));
46
- }
47
- get el() { return index.getElement(this); }
48
- };
49
- BcmLink.style = linkCss;
50
-
51
- exports.bcm_link = BcmLink;
@@ -1,157 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- 'use strict';
6
-
7
- Object.defineProperty(exports, '__esModule', { value: true });
8
-
9
- const index = require('./index-c591ecec.js');
10
- const index$1 = require('./index-95ae50d0.js');
11
- const bcm = require('./bcm-1d1fcf21.js');
12
- const stringHelper = require('./string-helper-9cdfb273.js');
13
- const slotTemplate = require('./slot-template-df7b5b59.js');
14
- const generate = require('./generate-f4bfa0a4.js');
15
- require('./_commonjsHelpers-ed84c3ca.js');
16
- require('./package-b728c16f.js');
17
- require('./colors-078851ec.js');
18
-
19
- const modalCss = "@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-slate-100);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-color-primary-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}";
20
-
21
- const BcmModal = class {
22
- constructor(hostRef) {
23
- index.registerInstance(this, hostRef);
24
- this.close = index.createEvent(this, "bcm-close", 3);
25
- this.modalClose = index.createEvent(this, "bcm-modal-close", 3);
26
- this.modalBeforeClose = index.createEvent(this, "bcm-modal-before-close", 3);
27
- this.modalBeforeOpen = index.createEvent(this, "bcm-modal-before-open", 3);
28
- this.modalSlots = {};
29
- this._id = generate.Generate.UID();
30
- this.isShow = false;
31
- this.hidden = false;
32
- this.size = bcm.Bcm$1.Size.medium;
33
- this.backdrop = true;
34
- this.width = undefined;
35
- this.height = undefined;
36
- this.fullWidth = false;
37
- }
38
- connectedCallback() {
39
- const bcmSlots = this.el.querySelectorAll('bcm-modal-header, bcm-modal-footer');
40
- if (bcmSlots) {
41
- bcmSlots.forEach(el => {
42
- let slotName = stringHelper.StringHelper.lowercase(stringHelper.StringHelper.split(el.nodeName, '-').pop());
43
- el.slot = slotName;
44
- el.classList.add(`bcm-modal__container-${slotName}-content`);
45
- this.modalSlots[slotName] = el;
46
- });
47
- }
48
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
49
- const styleId = `bcm-modal-style-${this._id}`;
50
- let style = document.getElementById(styleId);
51
- if (!style) {
52
- style = document.createElement('style');
53
- style.id = styleId;
54
- style.innerHTML = `.${disableScrollClass} { overflow: hidden; }`;
55
- document.head.appendChild(style);
56
- }
57
- }
58
- componentWillLoad() {
59
- // document.body.appendChild(this.el);
60
- }
61
- handleSubmit(e) {
62
- const button = generate.Generate.findEventPathWithNodeName(e, stringHelper.StringHelper.uppercase('bcm-button'));
63
- if (button && button.dataDismiss) {
64
- this.hide();
65
- }
66
- }
67
- handleBackdrop() {
68
- if (this.backdrop == true) {
69
- this.hide();
70
- }
71
- }
72
- async hide(obj = { force: false }) {
73
- if (obj === null || obj === void 0 ? void 0 : obj.force) {
74
- this.isShow = false;
75
- this.close.emit(); // Deprecated
76
- this.modalClose.emit();
77
- return;
78
- }
79
- this.modalBeforeClose.emit(this.el);
80
- }
81
- async show(obj = { force: false }) {
82
- if (obj === null || obj === void 0 ? void 0 : obj.force) {
83
- this.isShow = true;
84
- return;
85
- }
86
- this.modalBeforeOpen.emit(this.el);
87
- }
88
- keyboardNavigation(e) {
89
- if (this.backdrop == true) {
90
- const keyCode = e.keyCode || 0;
91
- if (keyCode == bcm.Bcm$1.KeyCode.escape) {
92
- e.preventDefault();
93
- this.hide();
94
- }
95
- }
96
- }
97
- async showModal(e) {
98
- if (e.defaultPrevented) {
99
- return;
100
- }
101
- if (e.target === this.el) {
102
- this.isShow = true;
103
- // document.body.appendChild(this.el); A solution must be found for this.
104
- }
105
- }
106
- async hideModal(e) {
107
- if (e.defaultPrevented) {
108
- return;
109
- }
110
- if (e.target === this.el) {
111
- this.isShow = false;
112
- this.close.emit(); // Deprecated
113
- this.modalClose.emit();
114
- }
115
- }
116
- _openHandler() {
117
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
118
- if (this.isShow) {
119
- document.body.classList.add(disableScrollClass);
120
- }
121
- else {
122
- document.body.classList.remove(disableScrollClass);
123
- }
124
- }
125
- disconnectedCallback() {
126
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
127
- document.body.classList.remove(disableScrollClass);
128
- }
129
- render() {
130
- const { isShow, size, fullWidth, hidden, width, height } = this;
131
- const bcmModalContainer = index$1.classnames('bcm-modal__container', size, {
132
- 'custom-size': width || height,
133
- 'full-width': fullWidth,
134
- 'bcm-modal__show': isShow,
135
- });
136
- const bcmModalHostClasses = index$1.classnames('bcm-modal', {
137
- hidden,
138
- 'bcm-modal__show': isShow,
139
- });
140
- const mainClasses = index$1.classnames('bcm-modal__container-main', 'size-2');
141
- const FooterTemplate = () => {
142
- return (this.modalSlots['footer'] && (index.h("footer", { class: "bcm-modal__container-footer" }, index.h("slot", { name: "footer" }))));
143
- };
144
- const HeaderTemplate = () => {
145
- return (this.modalSlots['header'] && (index.h("header", { class: "bcm-modal__container-header" }, index.h(slotTemplate.SlotTemplate, { name: "header", className: 'full-width' }), index.h("div", { class: "bcm-modal__container-header-close", onClick: () => this.hide() }, index.h("bcm-icon", { icon: "far fa-times" })))));
146
- };
147
- const customStyle = Object.assign(Object.assign({}, (width && { width: width })), (height && { height: height }));
148
- return (index.h(index.Host, { class: `tw-overscroll-contain ${bcmModalHostClasses}` }, index.h("div", { class: "overlay", onClick: () => this.handleBackdrop() }), index.h("div", { class: bcmModalContainer, style: customStyle }, index.h(HeaderTemplate, null), index.h("main", { class: mainClasses }, index.h("article", null, index.h(slotTemplate.SlotTemplate, null))), index.h(FooterTemplate, null))));
149
- }
150
- get el() { return index.getElement(this); }
151
- static get watchers() { return {
152
- "isShow": ["_openHandler"]
153
- }; }
154
- };
155
- BcmModal.style = modalCss;
156
-
157
- exports.bcm_modal = BcmModal;
@@ -1,137 +0,0 @@
1
- @import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
2
- .size-1 {
3
- font-size: 12px;
4
- line-height: 20px;
5
- }
6
-
7
- .size-2 {
8
- font-size: 14px;
9
- line-height: 22px;
10
- }
11
-
12
- .size-3 {
13
- font-size: 16px;
14
- line-height: 24px;
15
- }
16
-
17
- .size-4 {
18
- font-size: 20px;
19
- line-height: 28px;
20
- }
21
-
22
- .size-5 {
23
- font-size: 24px;
24
- line-height: 32px;
25
- }
26
-
27
- .size-6 {
28
- font-size: 30px;
29
- line-height: 38px;
30
- }
31
-
32
- .size-7 {
33
- font-size: 38px;
34
- line-height: 46px;
35
- }
36
-
37
- .size-8 {
38
- font-size: 46px;
39
- line-height: 54px;
40
- }
41
-
42
- .size-9 {
43
- font-size: 56px;
44
- line-height: 64px;
45
- }
46
-
47
- .weight-regular {
48
- font-weight: 400;
49
- }
50
-
51
- .weight-semibold {
52
- font-weight: 500;
53
- }
54
-
55
- /**
56
- * Generator
57
- */
58
- .input-size-large {
59
- height: 40px;
60
- }
61
-
62
- .input-size-medium {
63
- height: 32px;
64
- }
65
-
66
- .input-size-small {
67
- height: 24px;
68
- }
69
-
70
- .resize-none textarea {
71
- resize: none;
72
- }
73
-
74
- .resize-vertical textarea {
75
- resize: vertical;
76
- }
77
-
78
- .resize-auto textarea {
79
- height: auto;
80
- resize: none;
81
- }
82
-
83
- .textarea-size-large {
84
- padding: 4px 0 0 4px;
85
- min-height: 40px;
86
- }
87
- .textarea-size-large .bcm-input-element {
88
- min-height: calc((40px - 8px) + 2px);
89
- }
90
- .textarea-size-large .input-clear-button {
91
- height: calc( 40px - 16px );
92
- top: 8px;
93
- padding: 0;
94
- margin-right: 8px;
95
- }
96
-
97
- .textarea-size-medium {
98
- padding: 4px 0 0 4px;
99
- min-height: 32px;
100
- }
101
- .textarea-size-medium .bcm-input-element {
102
- min-height: calc((32px - 8px) + 2px);
103
- }
104
- .textarea-size-medium .input-clear-button {
105
- height: calc( 32px - 16px );
106
- top: 8px;
107
- padding: 0;
108
- margin-right: 8px;
109
- }
110
-
111
- .textarea-size-small {
112
- padding: 0px 0 0 4px;
113
- min-height: 24px;
114
- }
115
- .textarea-size-small .bcm-input-element {
116
- min-height: calc((24px - 8px) + 2px);
117
- }
118
- .textarea-size-small .input-clear-button {
119
- height: calc( 24px - 16px );
120
- top: 8px;
121
- padding: 0;
122
- margin-right: 8px;
123
- }
124
-
125
- @layer base {
126
- .bcm-number-input input[type=number]::-webkit-outer-spin-button,
127
- .bcm-number-input input[type=number]::-webkit-inner-spin-button,
128
- .bcm-number-input input[type=number] {
129
- -webkit-appearance: none;
130
- padding: 0px;
131
- margin: 0px;
132
- outline: none;
133
- border: 0px;
134
- vertical-align: baseline;
135
- -moz-appearance: textfield !important;
136
- }
137
- }
@@ -1,45 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { tv } from "tailwind-variants";
6
- export const numberInputStyle = tv({
7
- slots: {
8
- host: "bcm-number-input bcm-ui-element tw-flex tw-flex-col tw-items-start tw-justify-start tw-max-w-[256px] tw-w-full",
9
- container: "tw-flex tw-flex-row tw-items-center tw-justify-between tw-rounded tw-border tw-border-solid tw-border-slate-300 tw-w-full tw-min-h-full hover:tw-bg-slate-50",
10
- inputContainer: "tw-flex tw-min-h-fit tw-w-full tw-flex-row tw-items-center tw-justify-center tw-gap-2 tw-px-3",
11
- input: "tw-outline-none tw-appearance-none tw-flex-1 tw-bg-transparent tw-text-slate-400 tw-text-inherit tw-font-normal",
12
- caretContainer: "tw-flex tw-flex-col tw-min-h-full tw-border-l tw-items-stretch tw-self-stretch tw-justify-center tw-border-l-slate-300 tw-select-none tw-w-[30px]",
13
- caretIcon: "tw-flex tw-items-center tw-text-slate-500 tw-justify-center tw-h-full tw-cursor-pointer active:tw-bg-slate-400 last:tw-border-t last:tw-border-t-slate-300",
14
- slotIcon: "tw-text-slate-500",
15
- },
16
- variants: {
17
- size: {
18
- small: {
19
- host: "tw-gap-0.5 tw-text-xs",
20
- slotIcon: "tw-text-[10px]",
21
- inputContainer: "tw-py-[2px]",
22
- caretIcon: "tw-text-[10px]",
23
- },
24
- medium: {
25
- host: "tw-gap-1 tw-text-base",
26
- slotIcon: "tw-text-xs",
27
- inputContainer: "tw-py-[5px]",
28
- },
29
- large: {
30
- host: "tw-gap-2 tw-text-base",
31
- slotIcon: "tw-text-[14px]",
32
- inputContainer: "tw-py-2",
33
- },
34
- },
35
- focus: {
36
- true: {
37
- container: "tw-ring-1 tw-ring-blue-600",
38
- input: "tw-text-slate-700",
39
- },
40
- },
41
- },
42
- defaultVariants: {
43
- size: "medium",
44
- },
45
- });
@@ -1,47 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { r as registerInstance, h, H as Host, g as getElement } from './index-0615c2b8.js';
6
- import { c as classnames } from './index-f549811f.js';
7
- import { a as Bcm } from './bcm-a50d55ba.js';
8
- import './_commonjsHelpers-82aa9212.js';
9
-
10
- const linkCss = "@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-link{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline;color:var(--bcm-new-ds-color-blue-500)}.bcm-link.hidden{display:none}.bcm-link.disabled{pointer-events:none;opacity:0.5;cursor:not-allowed}.bcm-link__anchor{display:inline-flex;align-items:baseline;font-size:inherit;color:inherit}.bcm-link__anchor.prefix .prefix-icon{margin-right:4px}.bcm-link__anchor.suffix .suffix-icon{margin-left:4px}.bcm-link__anchor:hover,.bcm-link__anchor:focus,.bcm-link__anchor:active,.bcm-link__anchor:focus-visible{outline:none}.bcm-link__anchor:hover{color:var(--bcm-new-ds-color-blue-600)}.bcm-link__anchor:active{color:var(--bcm-new-ds-color-blue-700)}.bcm-link__anchor:focus-visible{color:var(--bcm-new-ds-color-blue-800)}";
11
-
12
- const BcmLink = class {
13
- constructor(hostRef) {
14
- registerInstance(this, hostRef);
15
- this.hidden = false;
16
- this.href = undefined;
17
- this.target = undefined;
18
- this.icon = undefined;
19
- this.disabled = false;
20
- this.iconPosition = Bcm.IconPosition.prefix;
21
- }
22
- handleOnClick(e) {
23
- if (this.disabled) {
24
- e.preventDefault();
25
- e.stopPropagation();
26
- }
27
- }
28
- linkIsExternal(url) {
29
- return url && !!(url.startsWith('http') || url.startsWith('//'));
30
- }
31
- render() {
32
- const { href, icon, hidden, target, iconPosition, disabled } = this;
33
- const hostClasses = classnames('bcm-link', {
34
- disabled,
35
- hidden
36
- });
37
- const classes = classnames('bcm-link__anchor', iconPosition, {
38
- 'suffix': this.linkIsExternal(href)
39
- });
40
- const ElementTagType = href ? 'a' : 'span';
41
- return (h(Host, { disabled: disabled, class: hostClasses }, h(ElementTagType, { class: classes, href: href, target: this.linkIsExternal(href) ? '_blank' : target }, icon && iconPosition === Bcm.IconPosition.prefix && h("bcm-icon", { class: "prefix-icon", icon: icon }), h("slot", null), this.linkIsExternal(href) && h("bcm-icon", { class: "suffix-icon", icon: "far fa-external-link-alt" }))));
42
- }
43
- get el() { return getElement(this); }
44
- };
45
- BcmLink.style = linkCss;
46
-
47
- export { BcmLink as bcm_link };
@@ -1,153 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0615c2b8.js';
6
- import { c as classnames } from './index-f549811f.js';
7
- import { a as Bcm } from './bcm-a50d55ba.js';
8
- import { S as StringHelper } from './string-helper-3592bdc2.js';
9
- import { S as SlotTemplate } from './slot-template-2a19b2db.js';
10
- import { G as Generate } from './generate-44c39402.js';
11
- import './_commonjsHelpers-82aa9212.js';
12
- import './package-b2db00f1.js';
13
- import './colors-c530a5b8.js';
14
-
15
- const modalCss = "@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-slate-100);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-color-primary-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}";
16
-
17
- const BcmModal = class {
18
- constructor(hostRef) {
19
- registerInstance(this, hostRef);
20
- this.close = createEvent(this, "bcm-close", 3);
21
- this.modalClose = createEvent(this, "bcm-modal-close", 3);
22
- this.modalBeforeClose = createEvent(this, "bcm-modal-before-close", 3);
23
- this.modalBeforeOpen = createEvent(this, "bcm-modal-before-open", 3);
24
- this.modalSlots = {};
25
- this._id = Generate.UID();
26
- this.isShow = false;
27
- this.hidden = false;
28
- this.size = Bcm.Size.medium;
29
- this.backdrop = true;
30
- this.width = undefined;
31
- this.height = undefined;
32
- this.fullWidth = false;
33
- }
34
- connectedCallback() {
35
- const bcmSlots = this.el.querySelectorAll('bcm-modal-header, bcm-modal-footer');
36
- if (bcmSlots) {
37
- bcmSlots.forEach(el => {
38
- let slotName = StringHelper.lowercase(StringHelper.split(el.nodeName, '-').pop());
39
- el.slot = slotName;
40
- el.classList.add(`bcm-modal__container-${slotName}-content`);
41
- this.modalSlots[slotName] = el;
42
- });
43
- }
44
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
45
- const styleId = `bcm-modal-style-${this._id}`;
46
- let style = document.getElementById(styleId);
47
- if (!style) {
48
- style = document.createElement('style');
49
- style.id = styleId;
50
- style.innerHTML = `.${disableScrollClass} { overflow: hidden; }`;
51
- document.head.appendChild(style);
52
- }
53
- }
54
- componentWillLoad() {
55
- // document.body.appendChild(this.el);
56
- }
57
- handleSubmit(e) {
58
- const button = Generate.findEventPathWithNodeName(e, StringHelper.uppercase('bcm-button'));
59
- if (button && button.dataDismiss) {
60
- this.hide();
61
- }
62
- }
63
- handleBackdrop() {
64
- if (this.backdrop == true) {
65
- this.hide();
66
- }
67
- }
68
- async hide(obj = { force: false }) {
69
- if (obj === null || obj === void 0 ? void 0 : obj.force) {
70
- this.isShow = false;
71
- this.close.emit(); // Deprecated
72
- this.modalClose.emit();
73
- return;
74
- }
75
- this.modalBeforeClose.emit(this.el);
76
- }
77
- async show(obj = { force: false }) {
78
- if (obj === null || obj === void 0 ? void 0 : obj.force) {
79
- this.isShow = true;
80
- return;
81
- }
82
- this.modalBeforeOpen.emit(this.el);
83
- }
84
- keyboardNavigation(e) {
85
- if (this.backdrop == true) {
86
- const keyCode = e.keyCode || 0;
87
- if (keyCode == Bcm.KeyCode.escape) {
88
- e.preventDefault();
89
- this.hide();
90
- }
91
- }
92
- }
93
- async showModal(e) {
94
- if (e.defaultPrevented) {
95
- return;
96
- }
97
- if (e.target === this.el) {
98
- this.isShow = true;
99
- // document.body.appendChild(this.el); A solution must be found for this.
100
- }
101
- }
102
- async hideModal(e) {
103
- if (e.defaultPrevented) {
104
- return;
105
- }
106
- if (e.target === this.el) {
107
- this.isShow = false;
108
- this.close.emit(); // Deprecated
109
- this.modalClose.emit();
110
- }
111
- }
112
- _openHandler() {
113
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
114
- if (this.isShow) {
115
- document.body.classList.add(disableScrollClass);
116
- }
117
- else {
118
- document.body.classList.remove(disableScrollClass);
119
- }
120
- }
121
- disconnectedCallback() {
122
- const disableScrollClass = `bcm-modal--disable-scroll-${this._id}`;
123
- document.body.classList.remove(disableScrollClass);
124
- }
125
- render() {
126
- const { isShow, size, fullWidth, hidden, width, height } = this;
127
- const bcmModalContainer = classnames('bcm-modal__container', size, {
128
- 'custom-size': width || height,
129
- 'full-width': fullWidth,
130
- 'bcm-modal__show': isShow,
131
- });
132
- const bcmModalHostClasses = classnames('bcm-modal', {
133
- hidden,
134
- 'bcm-modal__show': isShow,
135
- });
136
- const mainClasses = classnames('bcm-modal__container-main', 'size-2');
137
- const FooterTemplate = () => {
138
- return (this.modalSlots['footer'] && (h("footer", { class: "bcm-modal__container-footer" }, h("slot", { name: "footer" }))));
139
- };
140
- const HeaderTemplate = () => {
141
- return (this.modalSlots['header'] && (h("header", { class: "bcm-modal__container-header" }, h(SlotTemplate, { name: "header", className: 'full-width' }), h("div", { class: "bcm-modal__container-header-close", onClick: () => this.hide() }, h("bcm-icon", { icon: "far fa-times" })))));
142
- };
143
- const customStyle = Object.assign(Object.assign({}, (width && { width: width })), (height && { height: height }));
144
- return (h(Host, { class: `tw-overscroll-contain ${bcmModalHostClasses}` }, h("div", { class: "overlay", onClick: () => this.handleBackdrop() }), h("div", { class: bcmModalContainer, style: customStyle }, h(HeaderTemplate, null), h("main", { class: mainClasses }, h("article", null, h(SlotTemplate, null))), h(FooterTemplate, null))));
145
- }
146
- get el() { return getElement(this); }
147
- static get watchers() { return {
148
- "isShow": ["_openHandler"]
149
- }; }
150
- };
151
- BcmModal.style = modalCss;
152
-
153
- export { BcmModal as bcm_modal };