bromcom-ui 2.9.0-rc.8 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (495) 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/global/global.js +6 -0
  4. package/dist/bromcom-ui/global/helper/toast.ts +2 -0
  5. package/dist/bromcom-ui/p-08c75801.js +5 -0
  6. package/dist/bromcom-ui/p-0dacfdbc.entry.js +5 -0
  7. package/dist/bromcom-ui/{p-24f0e23a.entry.js → p-13f6e1a7.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-5c3e9ac9.entry.js → p-14cafd64.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-170cf07d.js +6 -0
  10. package/dist/bromcom-ui/p-19634d99.js +5 -0
  11. package/dist/bromcom-ui/{p-e4477593.entry.js → p-1c801d0c.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-48f85544.entry.js → p-1c9314bd.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-6bcaf906.entry.js → p-1cfe5a5d.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-20ba9769.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-8ded5483.entry.js → p-228c74e9.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-65f01d32.entry.js → p-22eb4e12.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-f331e009.entry.js → p-26290ed5.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-240151d4.entry.js → p-2aaeb247.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-73ca7c0a.entry.js → p-2b822458.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-dbc4c30c.js → p-2c5a0863.js} +1 -1
  21. package/dist/bromcom-ui/p-304bfa08.entry.js +5 -0
  22. package/dist/bromcom-ui/p-3432a82d.js +19 -0
  23. package/dist/bromcom-ui/p-399bce44.entry.js +5 -0
  24. package/dist/bromcom-ui/p-41cea609.entry.js +7 -0
  25. package/dist/bromcom-ui/{p-6c3e9e10.entry.js → p-430c0a24.entry.js} +1 -1
  26. package/dist/bromcom-ui/p-434c170e.js +5 -0
  27. package/dist/bromcom-ui/{p-d0bb9a84.entry.js → p-440bbaaa.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-47400be4.entry.js +5 -0
  29. package/dist/bromcom-ui/{p-f5bed571.entry.js → p-4a2de9ce.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-4f42085a.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-ff48f5b2.entry.js → p-5232e011.entry.js} +1 -1
  32. package/dist/bromcom-ui/p-53e91ae6.js +5 -0
  33. package/dist/bromcom-ui/{p-c75519d5.js → p-54211561.js} +1 -1
  34. package/dist/bromcom-ui/{p-dc2c4b14.entry.js → p-5699f67d.entry.js} +1 -1
  35. package/dist/bromcom-ui/p-5871767a.entry.js +5 -0
  36. package/dist/bromcom-ui/{p-45767d1d.entry.js → p-588165ef.entry.js} +1 -1
  37. package/dist/bromcom-ui/p-5916e844.entry.js +5 -0
  38. package/dist/bromcom-ui/{p-499bb928.entry.js → p-5fb0f815.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-2fc584c4.js → p-61db1f1f.js} +1 -1
  40. package/dist/bromcom-ui/{p-89e1d8c5.entry.js → p-626b805d.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-d389b202.entry.js → p-647de93f.entry.js} +1 -1
  42. package/dist/bromcom-ui/p-64fad38b.js +11 -0
  43. package/dist/bromcom-ui/{p-03134b6f.entry.js → p-67343ad8.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-bd51d347.entry.js → p-69260d36.entry.js} +1 -1
  45. package/dist/bromcom-ui/p-6cf1e8a2.entry.js +5 -0
  46. package/dist/bromcom-ui/{p-4aa0e6b1.js → p-6edf985f.js} +1 -1
  47. package/dist/bromcom-ui/p-73ec379d.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-3cde7f38.js → p-74e6d2b6.js} +1 -1
  49. package/dist/bromcom-ui/p-75ec5cc6.entry.js +5 -0
  50. package/dist/bromcom-ui/p-784a7bb0.entry.js +5 -0
  51. package/dist/bromcom-ui/p-78f0fe00.js +5 -0
  52. package/dist/bromcom-ui/p-7b05abe8.entry.js +5 -0
  53. package/dist/bromcom-ui/{p-d995750a.entry.js → p-7c5763cc.entry.js} +1 -1
  54. package/dist/bromcom-ui/p-7cb30513.js +5 -0
  55. package/dist/bromcom-ui/{p-81eeccfa.entry.js → p-7d18ce0e.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
  57. package/dist/bromcom-ui/p-80ee3d97.entry.js +5 -0
  58. package/dist/bromcom-ui/p-822d590f.entry.js +5 -0
  59. package/dist/bromcom-ui/p-85eedabc.js +5 -0
  60. package/dist/bromcom-ui/p-89a28750.entry.js +5 -0
  61. package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
  62. package/dist/bromcom-ui/p-8f45ba5f.entry.js +5 -0
  63. package/dist/bromcom-ui/p-9075a184.entry.js +5 -0
  64. package/dist/bromcom-ui/{p-f58c1fbe.entry.js → p-913c55ee.entry.js} +1 -1
  65. package/dist/bromcom-ui/p-9164639f.entry.js +5 -0
  66. package/dist/bromcom-ui/p-9850cbce.js +5 -0
  67. package/dist/bromcom-ui/{p-8bcfe3b3.entry.js → p-99824717.entry.js} +1 -1
  68. package/dist/bromcom-ui/p-9bd5f3b4.entry.js +5 -0
  69. package/dist/bromcom-ui/{p-6aeaef2a.entry.js → p-a006e404.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-e9842c26.js → p-a0ba474b.js} +1 -1
  71. package/dist/bromcom-ui/{p-b60bcecf.js → p-a1b1750c.js} +1 -1
  72. package/dist/bromcom-ui/{p-8fcb5846.js → p-a2c364af.js} +1 -1
  73. package/dist/bromcom-ui/p-a40a5474.entry.js +5 -0
  74. package/dist/bromcom-ui/{p-7c6e3ae5.entry.js → p-a664cc20.entry.js} +1 -1
  75. package/dist/bromcom-ui/p-a9eb0321.js +315 -0
  76. package/dist/bromcom-ui/{p-2acd6bee.entry.js → p-ab0b4d1e.entry.js} +1 -1
  77. package/dist/bromcom-ui/{p-ea4d8a18.entry.js → p-ae57f046.entry.js} +1 -1
  78. package/dist/bromcom-ui/{p-2caa75a4.entry.js → p-b4f033b4.entry.js} +1 -1
  79. package/dist/bromcom-ui/p-b81e8f91.js +5 -0
  80. package/dist/bromcom-ui/{p-503feae9.entry.js → p-b8a8bd1d.entry.js} +1 -1
  81. package/dist/bromcom-ui/{p-b4ac5904.js → p-b901e1ce.js} +1 -1
  82. package/dist/bromcom-ui/p-ba74a838.entry.js +5 -0
  83. package/dist/bromcom-ui/{p-c42dffea.entry.js → p-ba949d4a.entry.js} +1 -1
  84. package/dist/bromcom-ui/{p-f4538abb.entry.js → p-ba9eff2a.entry.js} +1 -1
  85. package/dist/bromcom-ui/{p-fb4b5224.entry.js → p-bd2b6de5.entry.js} +1 -1
  86. package/dist/bromcom-ui/{p-ebee9f45.entry.js → p-c1a992e7.entry.js} +1 -1
  87. package/dist/bromcom-ui/{p-908b1b5d.js → p-c8751181.js} +1 -1
  88. package/dist/bromcom-ui/p-ccf0872d.js +5 -0
  89. package/dist/bromcom-ui/p-cf659967.entry.js +5 -0
  90. package/dist/bromcom-ui/{p-8d0ca8c2.js → p-d153c7fc.js} +1 -1
  91. package/dist/bromcom-ui/p-d3db9e02.entry.js +5 -0
  92. package/dist/bromcom-ui/{p-7ddaedb7.entry.js → p-d551a51d.entry.js} +1 -1
  93. package/dist/bromcom-ui/{p-ec36d0c0.entry.js → p-d68c2c0a.entry.js} +1 -1
  94. package/dist/bromcom-ui/{p-e5a0d8f6.entry.js → p-d724cfa9.entry.js} +1 -1
  95. package/dist/bromcom-ui/{p-af0a447d.entry.js → p-d7ca94e1.entry.js} +1 -1
  96. package/dist/bromcom-ui/p-dd49ae28.entry.js +5 -0
  97. package/dist/bromcom-ui/p-e2294927.entry.js +5 -0
  98. package/dist/bromcom-ui/{p-1b1f4b44.entry.js → p-e688b044.entry.js} +1 -1
  99. package/dist/bromcom-ui/p-ec0224fb.entry.js +5 -0
  100. package/dist/bromcom-ui/{p-6ca980dd.entry.js → p-ece578ef.entry.js} +1 -1
  101. package/dist/bromcom-ui/{p-1be22601.entry.js → p-ef8c5b55.entry.js} +1 -1
  102. package/dist/bromcom-ui/p-f711588b.js +5 -0
  103. package/dist/bromcom-ui/p-fe1f2413.entry.js +5 -0
  104. package/dist/bromcom-ui/{p-a82f2b2a.entry.js → p-fe83cdd3.entry.js} +1 -1
  105. package/dist/bromcom-ui/{p-f619f9f9.entry.js → p-fff1a0f9.entry.js} +1 -1
  106. package/dist/bromcom-ui/static/message-bot.svg +2 -2
  107. package/dist/cjs/{_commonjsHelpers-bd20f4c0.js → _commonjsHelpers-ed84c3ca.js} +16 -0
  108. package/dist/cjs/{bcm-ab921827.js → bcm-7f703055.js} +33 -31
  109. package/dist/cjs/bcm-accordion.cjs.entry.js +5 -5
  110. package/dist/cjs/bcm-alert.cjs.entry.js +9 -9
  111. package/dist/cjs/bcm-attendance.cjs.entry.js +5 -5
  112. package/dist/cjs/bcm-autocomplete.cjs.entry.js +3 -3
  113. package/dist/cjs/bcm-avatar_2.cjs.entry.js +209 -0
  114. package/dist/cjs/bcm-box.cjs.entry.js +1 -1
  115. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +6 -6
  116. package/dist/cjs/bcm-button-group.cjs.entry.js +11 -11
  117. package/dist/cjs/bcm-button_15.cjs.entry.js +35172 -0
  118. package/dist/cjs/bcm-card.cjs.entry.js +10 -10
  119. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +29 -29
  120. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +10 -10
  121. package/dist/cjs/{bcm-checkbox.cjs.entry.js → bcm-checkbox_2.cjs.entry.js} +28 -17
  122. package/dist/cjs/bcm-chip-group.cjs.entry.js +15 -16
  123. package/dist/cjs/bcm-chip.cjs.entry.js +7 -7
  124. package/dist/cjs/bcm-collapse-group.cjs.entry.js +1 -1
  125. package/dist/cjs/bcm-collapse.cjs.entry.js +6 -6
  126. package/dist/cjs/bcm-color-input.cjs.entry.js +10 -11
  127. package/dist/cjs/bcm-colorpicker.cjs.entry.js +3 -3
  128. package/dist/cjs/bcm-content.cjs.entry.js +1 -1
  129. package/dist/cjs/bcm-default.cjs.entry.js +5 -5
  130. package/dist/cjs/bcm-drawer.cjs.entry.js +13 -14
  131. package/dist/cjs/bcm-dropdown.cjs.entry.js +119 -0
  132. package/dist/cjs/bcm-error-layout.cjs.entry.js +3 -3
  133. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +9 -9
  134. package/dist/cjs/bcm-form-group.cjs.entry.js +1 -1
  135. package/dist/cjs/bcm-input-custom.cjs.entry.js +6 -6
  136. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +309 -0
  137. package/dist/cjs/bcm-item.cjs.entry.js +72 -0
  138. package/dist/cjs/bcm-items.cjs.entry.js +49 -0
  139. package/dist/cjs/bcm-link.cjs.entry.js +6 -6
  140. package/dist/cjs/bcm-list_3.cjs.entry.js +169 -1691
  141. package/dist/cjs/bcm-menu.cjs.entry.js +150 -0
  142. package/dist/cjs/bcm-message.cjs.entry.js +3 -3
  143. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +11 -12
  144. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +10 -11
  145. package/dist/cjs/bcm-modal-2.cjs.entry.js +12 -13
  146. package/dist/cjs/bcm-modal.cjs.entry.js +11 -11
  147. package/dist/cjs/bcm-notification.cjs.entry.js +3 -3
  148. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +3 -3
  149. package/dist/cjs/bcm-overlay_2.cjs.entry.js +4 -4
  150. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +10 -10
  151. package/dist/cjs/bcm-popconfirm.cjs.entry.js +9 -9
  152. package/dist/cjs/bcm-popover.cjs.entry.js +229 -0
  153. package/dist/cjs/bcm-progress.cjs.entry.js +9 -9
  154. package/dist/cjs/bcm-radio-group.cjs.entry.js +17 -18
  155. package/dist/cjs/bcm-radio.cjs.entry.js +18 -19
  156. package/dist/cjs/bcm-range.cjs.entry.js +10 -10
  157. package/dist/cjs/bcm-result.cjs.entry.js +3 -3
  158. package/dist/cjs/bcm-select-group.cjs.entry.js +3 -3
  159. package/dist/cjs/bcm-select-option.cjs.entry.js +3 -3
  160. package/dist/cjs/bcm-select.cjs.entry.js +5 -5
  161. package/dist/cjs/bcm-skeleton.cjs.entry.js +5 -5
  162. package/dist/cjs/bcm-step.cjs.entry.js +8 -8
  163. package/dist/cjs/bcm-stepper.cjs.entry.js +15 -16
  164. package/dist/cjs/bcm-switch.cjs.entry.js +15 -15
  165. package/dist/cjs/bcm-tab-group.cjs.entry.js +209 -0
  166. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +58 -0
  167. package/dist/cjs/bcm-tab-item.cjs.entry.js +90 -0
  168. package/dist/cjs/bcm-tab-pane.cjs.entry.js +3 -3
  169. package/dist/cjs/bcm-tab.cjs.entry.js +3 -3
  170. package/dist/cjs/bcm-table.cjs.entry.js +7648 -38
  171. package/dist/cjs/bcm-tabs-content.cjs.entry.js +3 -3
  172. package/dist/cjs/bcm-tabs.cjs.entry.js +3 -3
  173. package/dist/cjs/bcm-tag.cjs.entry.js +19 -19
  174. package/dist/cjs/bcm-text.cjs.entry.js +49 -0
  175. package/dist/cjs/bcm-textarea.cjs.entry.js +13 -13
  176. package/dist/cjs/bcm-timeline-item.cjs.entry.js +3 -3
  177. package/dist/cjs/bcm-timeline.cjs.entry.js +3 -3
  178. package/dist/cjs/bcm-toast.cjs.entry.js +38 -19
  179. package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
  180. package/dist/cjs/bromcom-ui.cjs.js +5 -4
  181. package/dist/cjs/{caption-template-8d099fd6.js → caption-template-81dbc490.js} +2 -2
  182. package/dist/cjs/{color-helper-7ab15732.js → color-helper-c3a819ea.js} +1 -1
  183. package/dist/cjs/{colors-e1d142ad.js → colors-078851ec.js} +1 -1
  184. package/dist/cjs/{floating-ui-c9fc2202.js → floating-ui-b441ea7c.js} +2 -2
  185. package/dist/cjs/{generate-cae9c0fb.js → generate-1dfe001a.js} +2 -2
  186. package/dist/cjs/{global-3ce50f9f.js → global-4a6abd46.js} +6 -1
  187. package/dist/cjs/index-5279dea2.js +2571 -0
  188. package/dist/cjs/{index-906fb4e5.js → index-7eed931f.js} +1631 -25
  189. package/dist/cjs/{index-fdbf5226.js → index-95ae50d0.js} +1 -1
  190. package/dist/cjs/{index-ddfd6d8f.js → index-c591ecec.js} +4 -0
  191. package/dist/cjs/{index-4506fcd7.js → index-d321de96.js} +1 -1
  192. package/dist/cjs/{input-template-a7f8f2e9.js → input-template-41868c68.js} +8 -8
  193. package/dist/cjs/{is-load-decorator-137dded1.js → is-load-decorator-15036f37.js} +3 -2
  194. package/dist/cjs/{json-parse-decarator-34a3d26e.js → json-parse-decarator-f29c368a.js} +2 -2
  195. package/dist/cjs/{label-template-4d5f99a5.js → label-template-80235581.js} +5 -5
  196. package/dist/cjs/loader.cjs.js +5 -4
  197. package/dist/cjs/{number-helper-101d8aa8.js → number-helper-2b9c1f9d.js} +1 -1
  198. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +11 -11
  199. package/dist/cjs/old-bcm-popover.cjs.entry.js +9 -9
  200. package/dist/cjs/{package-ed8b3296.js → package-66b81414.js} +1 -1
  201. package/dist/cjs/{popover-placement-ccb40073.js → popover-placement-f20020a6.js} +1 -1
  202. package/dist/cjs/{slot-template-d70ea082.js → slot-template-873b0cd5.js} +2 -2
  203. package/dist/cjs/{stepper-states-308c8d3e.js → stepper-states-6ccb8ab3.js} +3 -3
  204. package/dist/cjs/{string-helper-d681e5c7.js → string-helper-fda7cbba.js} +5 -5
  205. package/dist/cjs/tooltip-helper-0eb3ef13.js +157 -0
  206. package/dist/cjs/{validators-26badb68.js → validators-97a46a9e.js} +6 -1
  207. package/dist/cjs/watermark-2c23c8f1.js +47499 -0
  208. package/dist/collection/assets/csv.svg +9 -0
  209. package/dist/collection/assets/excel.svg +9 -0
  210. package/dist/collection/assets/pdf.svg +9 -0
  211. package/dist/collection/collection-manifest.json +5 -2
  212. package/dist/collection/components/atoms/avatar/avatar.js +21 -23
  213. package/dist/collection/components/atoms/avatar/avatar.style.js +24 -21
  214. package/dist/collection/components/atoms/badge/badge.js +2 -1
  215. package/dist/collection/components/atoms/badge/badge.style.js +36 -24
  216. package/dist/collection/components/atoms/button/button.css +55 -0
  217. package/dist/collection/components/atoms/button/button.js +1 -1
  218. package/dist/collection/components/atoms/icon/static/message-bot.svg +2 -2
  219. package/dist/collection/components/molecules/dropdown/dropdown.js +1 -1
  220. package/dist/collection/components/molecules/input/input.js +0 -2
  221. package/dist/collection/components/molecules/input-dropdown/input-dropdown.css +291 -0
  222. package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +751 -0
  223. package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +73 -0
  224. package/dist/collection/components/molecules/linked/linked.js +5 -29
  225. package/dist/collection/components/molecules/popconfirm/popconfirm.js +1 -1
  226. package/dist/collection/components/molecules/popover/popover.js +1 -1
  227. package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
  228. package/dist/collection/components/organism/date-picker/date-picker.css +1 -1
  229. package/dist/collection/components/organism/date-picker/date-picker.js +20 -1
  230. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +13 -1
  231. package/dist/collection/components/organism/datetime-picker/datetime-picker.js +21 -1
  232. package/dist/collection/components/organism/form/form.js +1 -0
  233. package/dist/collection/components/organism/form-2/bcm-form-components.js +4 -1
  234. package/dist/collection/components/organism/list/list.css +1 -1
  235. package/dist/collection/components/organism/list/list.js +63 -22
  236. package/dist/collection/components/organism/time-picker/time-picker.css +1 -1
  237. package/dist/collection/components/organism/time-picker/time-picker.js +20 -1
  238. package/dist/collection/components/other/toast/toast.js +48 -11
  239. package/dist/collection/components/other_deprecated/old-popover/old-popover.js +1 -1
  240. package/dist/collection/components/third-parts/rc-picker/date.js +862 -0
  241. package/dist/collection/components/third-parts/rc-picker/rc-picker.css +1009 -0
  242. package/dist/collection/components/third-parts/rc-picker/rc-picker.js +550 -0
  243. package/dist/collection/components/third-parts/table/table-definations.js +42 -0
  244. package/dist/collection/components/third-parts/table/table.css +136 -0
  245. package/dist/collection/components/third-parts/table/table.js +288 -0
  246. package/dist/collection/decorators/bcm-decorator.js +28 -0
  247. package/dist/collection/decorators/event-decorator.js +31 -0
  248. package/dist/collection/decorators/index.js +1 -0
  249. package/dist/collection/decorators/is-load-decorator.js +2 -1
  250. package/dist/collection/global/global.js +6 -0
  251. package/dist/collection/global/helper/toast.js +1 -0
  252. package/dist/collection/global/helper/toast.ts +2 -0
  253. package/dist/collection/helper/string-helper.js +2 -2
  254. package/dist/collection/models/bcm.js +29 -27
  255. package/dist/collection/templates/index.js +2 -0
  256. package/dist/collection/templates/toolbar-hamburger-template.js +14 -0
  257. package/dist/collection/templates/toolbar-template.js +15 -0
  258. package/dist/components/_commonjsHelpers.js +16 -1
  259. package/dist/components/avatar.js +46 -44
  260. package/dist/components/badge.js +39 -70
  261. package/dist/components/bcm-chip-group.js +14 -8
  262. package/dist/components/bcm-date-picker.js +4 -2
  263. package/dist/components/bcm-date.d.ts +11 -0
  264. package/dist/components/bcm-date.js +232 -0
  265. package/dist/components/bcm-form-2.js +4 -1
  266. package/dist/components/bcm-form.js +1 -0
  267. package/dist/components/bcm-input-dropdown.d.ts +11 -0
  268. package/dist/components/bcm-input-dropdown.js +395 -0
  269. package/dist/components/bcm-rc-picker.d.ts +11 -0
  270. package/dist/components/bcm-rc-picker.js +10 -0
  271. package/dist/components/bcm-table.js +55128 -41
  272. package/dist/components/bcm-textarea.js +1 -214
  273. package/dist/components/bcm-time-picker.js +4 -2
  274. package/dist/components/bcm-toast.js +30 -10
  275. package/dist/components/bcm.js +29 -27
  276. package/dist/components/button.js +1 -1
  277. package/dist/components/chip.js +12 -6
  278. package/dist/components/colors2.js +1 -1
  279. package/dist/components/datetime-picker.js +5 -2
  280. package/dist/components/generate.js +1 -1
  281. package/dist/components/index.d.ts +4 -1
  282. package/dist/components/index.js +9 -1
  283. package/dist/components/index3.js +5 -1
  284. package/dist/components/index5.js +2569 -0
  285. package/dist/components/input.js +0 -2
  286. package/dist/components/is-load-decorator.js +2 -1
  287. package/dist/components/linked.js +5 -11
  288. package/dist/components/list.js +22 -8
  289. package/dist/components/raf.js +1594 -0
  290. package/dist/components/rc-overflow.js +32 -1557
  291. package/dist/components/rc-picker.js +14030 -0
  292. package/dist/components/string-helper.js +2 -2
  293. package/dist/components/textarea.js +220 -0
  294. package/dist/esm/{_commonjsHelpers-3016b722.js → _commonjsHelpers-7002e5de.js} +16 -1
  295. package/dist/esm/bcm-accordion.entry.js +5 -5
  296. package/dist/esm/bcm-alert.entry.js +9 -9
  297. package/dist/esm/bcm-attendance.entry.js +5 -5
  298. package/dist/esm/bcm-autocomplete.entry.js +3 -3
  299. package/dist/esm/bcm-avatar_2.entry.js +204 -0
  300. package/dist/esm/bcm-box.entry.js +1 -1
  301. package/dist/esm/bcm-breadcrumb.entry.js +6 -6
  302. package/dist/esm/bcm-button-group.entry.js +8 -8
  303. package/dist/esm/bcm-button_15.entry.js +35154 -0
  304. package/dist/esm/bcm-card.entry.js +11 -11
  305. package/dist/esm/bcm-checkbox-group.entry.js +19 -19
  306. package/dist/esm/bcm-checkbox-lite_9.entry.js +8 -8
  307. package/dist/esm/{bcm-checkbox.entry.js → bcm-checkbox_2.entry.js} +24 -14
  308. package/dist/esm/bcm-chip-group.entry.js +16 -17
  309. package/dist/esm/bcm-chip.entry.js +8 -8
  310. package/dist/esm/bcm-collapse-group.entry.js +2 -2
  311. package/dist/esm/bcm-collapse.entry.js +6 -6
  312. package/dist/esm/bcm-color-input.entry.js +12 -13
  313. package/dist/esm/bcm-colorpicker.entry.js +5 -5
  314. package/dist/esm/bcm-content.entry.js +1 -1
  315. package/dist/esm/{bcm-9f50af9c.js → bcm-d45dc47d.js} +30 -28
  316. package/dist/esm/bcm-default.entry.js +5 -5
  317. package/dist/esm/bcm-drawer.entry.js +13 -14
  318. package/dist/esm/bcm-dropdown.entry.js +115 -0
  319. package/dist/esm/bcm-error-layout.entry.js +3 -3
  320. package/dist/esm/bcm-expansion-panel.entry.js +10 -10
  321. package/dist/esm/bcm-form-group.entry.js +1 -1
  322. package/dist/esm/bcm-input-custom.entry.js +6 -6
  323. package/dist/esm/bcm-input-dropdown.entry.js +305 -0
  324. package/dist/esm/bcm-item.entry.js +68 -0
  325. package/dist/esm/bcm-items.entry.js +45 -0
  326. package/dist/esm/bcm-link.entry.js +4 -4
  327. package/dist/esm/bcm-list_3.entry.js +93 -1615
  328. package/dist/esm/bcm-menu.entry.js +146 -0
  329. package/dist/esm/bcm-message.entry.js +3 -3
  330. package/dist/esm/bcm-modal-2-footer.entry.js +13 -14
  331. package/dist/esm/bcm-modal-2-header.entry.js +12 -13
  332. package/dist/esm/bcm-modal-2.entry.js +13 -14
  333. package/dist/esm/bcm-modal.entry.js +9 -9
  334. package/dist/esm/bcm-notification.entry.js +3 -3
  335. package/dist/esm/bcm-old-tag_2.entry.js +4 -4
  336. package/dist/esm/bcm-overlay_2.entry.js +4 -4
  337. package/dist/esm/bcm-popconfirm-box.entry.js +11 -11
  338. package/dist/esm/bcm-popconfirm.entry.js +7 -7
  339. package/dist/esm/bcm-popover.entry.js +225 -0
  340. package/dist/esm/bcm-progress.entry.js +9 -9
  341. package/dist/esm/bcm-radio-group.entry.js +15 -16
  342. package/dist/esm/bcm-radio.entry.js +13 -14
  343. package/dist/esm/bcm-range.entry.js +8 -8
  344. package/dist/esm/bcm-result.entry.js +3 -3
  345. package/dist/esm/bcm-select-group.entry.js +3 -3
  346. package/dist/esm/bcm-select-option.entry.js +3 -3
  347. package/dist/esm/bcm-select.entry.js +6 -6
  348. package/dist/esm/bcm-skeleton.entry.js +5 -5
  349. package/dist/esm/bcm-step.entry.js +8 -8
  350. package/dist/esm/bcm-stepper.entry.js +15 -16
  351. package/dist/esm/bcm-switch.entry.js +10 -10
  352. package/dist/esm/bcm-tab-group.entry.js +205 -0
  353. package/dist/esm/bcm-tab-item-header.entry.js +54 -0
  354. package/dist/esm/bcm-tab-item.entry.js +86 -0
  355. package/dist/esm/bcm-tab-pane.entry.js +3 -3
  356. package/dist/esm/bcm-tab.entry.js +3 -3
  357. package/dist/esm/bcm-table.entry.js +7649 -39
  358. package/dist/esm/bcm-tabs-content.entry.js +4 -4
  359. package/dist/esm/bcm-tabs.entry.js +4 -4
  360. package/dist/esm/bcm-tag.entry.js +9 -9
  361. package/dist/esm/bcm-text.entry.js +45 -0
  362. package/dist/esm/bcm-textarea.entry.js +11 -11
  363. package/dist/esm/bcm-timeline-item.entry.js +3 -3
  364. package/dist/esm/bcm-timeline.entry.js +3 -3
  365. package/dist/esm/bcm-toast.entry.js +38 -19
  366. package/dist/esm/bcm-treeview-group.entry.js +1 -1
  367. package/dist/esm/bromcom-ui.js +6 -5
  368. package/dist/esm/{caption-template-34a1cb44.js → caption-template-d47f338f.js} +2 -2
  369. package/dist/esm/{color-helper-116755ed.js → color-helper-845ba523.js} +2 -2
  370. package/dist/esm/{colors-44c95e7e.js → colors-ebea297f.js} +1 -1
  371. package/dist/esm/{element-dragger-7ea06c76.js → element-dragger-89bb52fd.js} +1 -1
  372. package/dist/esm/{floating-ui-e7341329.js → floating-ui-8a0c54d6.js} +1 -1
  373. package/dist/esm/{generate-e008f24f.js → generate-7a1258c4.js} +2 -2
  374. package/dist/esm/{global-9c04f017.js → global-032592ad.js} +6 -1
  375. package/dist/esm/{index-ed9652af.js → index-00c8a8f7.js} +1 -1
  376. package/dist/esm/{index-348b16ad.js → index-0615c2b8.js} +3 -1
  377. package/dist/esm/index-3bc8c6e3.js +2569 -0
  378. package/dist/esm/{index-0052017c.js → index-7e71bbc8.js} +1 -1
  379. package/dist/esm/{index-6310a048.js → index-e4b6a4ce.js} +1616 -26
  380. package/dist/esm/{input-template-0bdd4dda.js → input-template-68c29fde.js} +4 -4
  381. package/dist/esm/{is-load-decorator-07d3502a.js → is-load-decorator-8277e3b8.js} +3 -2
  382. package/dist/esm/{json-parse-decarator-40fc5701.js → json-parse-decarator-2945634b.js} +2 -2
  383. package/dist/esm/{label-template-98dafeb3.js → label-template-946d4062.js} +4 -4
  384. package/dist/esm/loader.js +6 -5
  385. package/dist/esm/{number-helper-ddce4326.js → number-helper-fe7d1aca.js} +1 -1
  386. package/dist/esm/old-bcm-popover-box.entry.js +13 -13
  387. package/dist/esm/old-bcm-popover.entry.js +7 -7
  388. package/dist/esm/{package-00ece356.js → package-acbf2052.js} +1 -1
  389. package/dist/esm/{popover-placement-78f86f15.js → popover-placement-be68c848.js} +1 -1
  390. package/dist/esm/{slot-template-672e941d.js → slot-template-fcc7846e.js} +2 -2
  391. package/dist/esm/{stepper-states-56644bc7.js → stepper-states-9ab8511e.js} +3 -3
  392. package/dist/esm/{string-helper-6bd24967.js → string-helper-b0e05041.js} +4 -4
  393. package/dist/esm/tooltip-helper-e5246812.js +155 -0
  394. package/dist/esm/{utils-b3338faf.js → utils-57652744.js} +1 -1
  395. package/dist/esm/{validators-77fbe47e.js → validators-22975416.js} +6 -2
  396. package/dist/esm/watermark-f2c6a1f9.js +47477 -0
  397. package/dist/types/components/atoms/avatar/avatar.d.ts +0 -2
  398. package/dist/types/components/atoms/avatar/avatar.style.d.ts +181 -5
  399. package/dist/types/components/atoms/badge/badge.style.d.ts +174 -4
  400. package/dist/types/components/molecules/input-dropdown/input-dropdown.d.ts +51 -0
  401. package/dist/types/components/molecules/input-dropdown/input-dropdown.style.d.ts +307 -0
  402. package/dist/types/components/molecules/linked/linked.d.ts +1 -3
  403. package/dist/types/components/organism/date-picker/date-picker.d.ts +1 -0
  404. package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +1 -0
  405. package/dist/types/components/organism/list/list.d.ts +4 -0
  406. package/dist/types/components/organism/time-picker/time-picker.d.ts +1 -0
  407. package/dist/types/components/other/toast/toast.d.ts +2 -0
  408. package/dist/types/components/third-parts/rc-picker/date.d.ts +175 -0
  409. package/dist/types/components/third-parts/rc-picker/rc-picker.d.ts +47 -0
  410. package/dist/types/components/third-parts/table/table-definations.d.ts +28 -0
  411. package/dist/types/components/third-parts/table/table.d.ts +37 -0
  412. package/dist/types/components.d.ts +244 -3
  413. package/dist/types/decorators/bcm-decorator.d.ts +2 -0
  414. package/dist/types/decorators/event-decorator.d.ts +2 -0
  415. package/dist/types/decorators/index.d.ts +1 -0
  416. package/dist/types/global/helper/toast.d.ts +2 -0
  417. package/dist/types/models/bcm.d.ts +256 -236
  418. package/dist/types/templates/index.d.ts +2 -0
  419. package/dist/types/templates/toolbar-hamburger-template.d.ts +12 -0
  420. package/dist/types/templates/toolbar-template.d.ts +13 -0
  421. package/helper/toast.d.ts +2 -0
  422. package/helper/toast.d.ts.map +1 -1
  423. package/helper/toast.js +1 -0
  424. package/package.json +9 -3
  425. package/dist/bromcom-ui/p-019b44bb.entry.js +0 -5
  426. package/dist/bromcom-ui/p-01a50abe.entry.js +0 -5
  427. package/dist/bromcom-ui/p-065e0f32.entry.js +0 -5
  428. package/dist/bromcom-ui/p-0cb5a92d.entry.js +0 -5
  429. package/dist/bromcom-ui/p-0f52bab9.entry.js +0 -5
  430. package/dist/bromcom-ui/p-15758356.entry.js +0 -5
  431. package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
  432. package/dist/bromcom-ui/p-235023cc.entry.js +0 -5
  433. package/dist/bromcom-ui/p-2a7bdc8b.entry.js +0 -5
  434. package/dist/bromcom-ui/p-32028f4f.entry.js +0 -5
  435. package/dist/bromcom-ui/p-3a68eca1.js +0 -5
  436. package/dist/bromcom-ui/p-4484ed7d.entry.js +0 -5
  437. package/dist/bromcom-ui/p-4f8b00bc.entry.js +0 -5
  438. package/dist/bromcom-ui/p-4fd78dbb.entry.js +0 -5
  439. package/dist/bromcom-ui/p-54c0916c.js +0 -5
  440. package/dist/bromcom-ui/p-5d89f348.entry.js +0 -5
  441. package/dist/bromcom-ui/p-61c4745d.entry.js +0 -5
  442. package/dist/bromcom-ui/p-626a65e9.js +0 -5
  443. package/dist/bromcom-ui/p-663766cf.entry.js +0 -5
  444. package/dist/bromcom-ui/p-6d7fe687.js +0 -6
  445. package/dist/bromcom-ui/p-6f56f8ca.js +0 -5
  446. package/dist/bromcom-ui/p-74b2d896.js +0 -5
  447. package/dist/bromcom-ui/p-7f529bbe.entry.js +0 -5
  448. package/dist/bromcom-ui/p-9fe802bc.entry.js +0 -5
  449. package/dist/bromcom-ui/p-a19320bb.entry.js +0 -13
  450. package/dist/bromcom-ui/p-a429e85b.js +0 -5
  451. package/dist/bromcom-ui/p-a56e8c98.js +0 -5
  452. package/dist/bromcom-ui/p-a8033cda.entry.js +0 -5
  453. package/dist/bromcom-ui/p-a9692ed3.entry.js +0 -5
  454. package/dist/bromcom-ui/p-b1c83bb8.entry.js +0 -5
  455. package/dist/bromcom-ui/p-bddbd954.entry.js +0 -5
  456. package/dist/bromcom-ui/p-c49d038e.js +0 -5
  457. package/dist/bromcom-ui/p-c799b397.entry.js +0 -5
  458. package/dist/bromcom-ui/p-cf0ab7f0.entry.js +0 -5
  459. package/dist/bromcom-ui/p-d65a1e21.js +0 -11
  460. package/dist/bromcom-ui/p-d7f10f7f.js +0 -5
  461. package/dist/bromcom-ui/p-dd422dd1.js +0 -5
  462. package/dist/bromcom-ui/p-e09fa0dc.entry.js +0 -5
  463. package/dist/bromcom-ui/p-e32d9cfc.js +0 -5
  464. package/dist/bromcom-ui/p-ec6b45ba.entry.js +0 -5
  465. package/dist/bromcom-ui/p-f645d9ae.entry.js +0 -5
  466. package/dist/bromcom-ui/p-fdc3e5b8.entry.js +0 -5
  467. package/dist/cjs/bcm-avatar.cjs.entry.js +0 -127
  468. package/dist/cjs/bcm-badge_15.cjs.entry.js +0 -1739
  469. package/dist/cjs/bcm-colorful.cjs.entry.js +0 -17227
  470. package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -181
  471. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1449
  472. package/dist/cjs/bcm-form-2.cjs.entry.js +0 -209
  473. package/dist/cjs/bcm-form.cjs.entry.js +0 -488
  474. package/dist/cjs/bcm-input.cjs.entry.js +0 -371
  475. package/dist/cjs/bcm-label.cjs.entry.js +0 -45
  476. package/dist/cjs/bcm-old-input.cjs.entry.js +0 -397
  477. package/dist/cjs/bcm-time-picker.cjs.entry.js +0 -149
  478. package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
  479. package/dist/cjs/index-b08b037a.js +0 -52
  480. package/dist/collection/components/other/data-table/table.css +0 -130
  481. package/dist/collection/components/other/data-table/table.js +0 -88
  482. package/dist/esm/bcm-avatar.entry.js +0 -123
  483. package/dist/esm/bcm-badge_15.entry.js +0 -1721
  484. package/dist/esm/bcm-colorful.entry.js +0 -17223
  485. package/dist/esm/bcm-date-picker.entry.js +0 -177
  486. package/dist/esm/bcm-datetime-picker.entry.js +0 -1445
  487. package/dist/esm/bcm-form-2.entry.js +0 -205
  488. package/dist/esm/bcm-form.entry.js +0 -484
  489. package/dist/esm/bcm-input.entry.js +0 -367
  490. package/dist/esm/bcm-label.entry.js +0 -41
  491. package/dist/esm/bcm-old-input.entry.js +0 -393
  492. package/dist/esm/bcm-time-picker.entry.js +0 -145
  493. package/dist/esm/datetime-helper-df25808a.js +0 -9
  494. package/dist/esm/index-962dec74.js +0 -50
  495. package/dist/types/components/other/data-table/table.d.ts +0 -8
@@ -1,1721 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, a as getAssetPath, f as forceUpdate } from './index-348b16ad.js';
6
- import { C as ColorHelper } from './color-helper-116755ed.js';
7
- import './datetime-helper-df25808a.js';
8
- import { G as Generate, s as snq } from './generate-e008f24f.js';
9
- import './number-helper-ddce4326.js';
10
- import { S as StringHelper } from './string-helper-6bd24967.js';
11
- import './validators-77fbe47e.js';
12
- import './element-dragger-7ea06c76.js';
13
- import { B as Bcm, a as Bcm$1 } from './bcm-9f50af9c.js';
14
- import { c as cva } from './index-962dec74.js';
15
- import { c as classnames } from './index-ed9652af.js';
16
- import { c as createStore } from './index-0052017c.js';
17
- import { S as SlotTemplate } from './slot-template-672e941d.js';
18
- import { I as IsLoad } from './is-load-decorator-07d3502a.js';
19
- import { J as JsonParse } from './json-parse-decarator-40fc5701.js';
20
- import { d as delay } from './utils-b3338faf.js';
21
- import { F as FloatingUI } from './floating-ui-e7341329.js';
22
- import './colors-1d7854ea.js';
23
- import './colors-44c95e7e.js';
24
- import './_commonjsHelpers-3016b722.js';
25
- import './package-00ece356.js';
26
-
27
- class Tooltip {
28
- constructor({ message, targetId, placement = "top", color = "slate-700", trigger = "none", size = "medium", openDelay = 0, closeDelay = 0, autoHide = false, emitShow = () => { }, emitHide = () => { }, }) {
29
- this.destroy = () => {
30
- this.el = document.getElementById(this.id);
31
- if (this.el) {
32
- this.el.remove();
33
- this.emitHide();
34
- }
35
- this.removeListener();
36
- };
37
- this.target = () => document.getElementById(this.targetId);
38
- this.sizeClass = () => {
39
- switch (this.size) {
40
- case Bcm.Size.small:
41
- return "tw-text-1";
42
- case Bcm.Size.medium:
43
- return "tw-text-2";
44
- case Bcm.Size.large:
45
- return "tw-text-3";
46
- default:
47
- return "tw-text-2";
48
- }
49
- };
50
- this.init = () => {
51
- const { tone, colorName } = ColorHelper.parseColor(this.color, 700);
52
- const dc = Generate.getTwColor({
53
- color: colorName,
54
- tones: {
55
- [tone]: ["bg"],
56
- },
57
- variable: "--bcm-tooltip",
58
- });
59
- const style = Object.assign(Object.assign({}, dc), (dc["--bcm-tooltip-bg"] && { "--bcm-tooltip-text": ColorHelper.reverseColor(dc["--bcm-tooltip-bg"]) }));
60
- this.el = Generate.createElement("div", {
61
- "id": `${this.targetId}-tooltip-box`,
62
- "class": `
63
- tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg-[--bcm-tooltip-bg] tw-text-[--bcm-tooltip-text] ${this.sizeClass()} tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300`,
64
- "role": "tooltip",
65
- "aria-hidden": "true",
66
- "style": ColorHelper.generateStyleString(style),
67
- "innerHTML": StringHelper.trim(this.message),
68
- });
69
- };
70
- this.update = () => {
71
- this.el = document.getElementById(this.id);
72
- if (this.el) {
73
- this.hide();
74
- this.show();
75
- }
76
- };
77
- this.listener = () => {
78
- window.addEventListener("resize", this.calculatePosition.bind(this));
79
- window.addEventListener("scroll", this.calculatePosition.bind(this), true);
80
- window.addEventListener("wheel", this.calculatePosition.bind(this));
81
- if (this.trigger && this.target()) {
82
- switch (this.trigger) {
83
- case "click":
84
- this.target().addEventListener("click", this.toggle.bind(this));
85
- this.autoHide && this.target().addEventListener("mouseleave", this.hide.bind(this));
86
- break;
87
- case "hover":
88
- this.target().addEventListener("mouseenter", this.show.bind(this));
89
- this.target().addEventListener("mouseleave", this.hide.bind(this));
90
- break;
91
- case "focus":
92
- this.target().addEventListener("focus", this.show.bind(this), true);
93
- this.target().addEventListener("blur", this.hide.bind(this), true);
94
- break;
95
- }
96
- }
97
- this.calculatePosition();
98
- };
99
- this.removeListener = () => {
100
- window.removeEventListener("resize", this.calculatePosition.bind(this));
101
- window.removeEventListener("scroll", this.calculatePosition.bind(this), true);
102
- window.removeEventListener("wheel", this.calculatePosition.bind(this));
103
- if (this.target()) {
104
- this.target().removeEventListener("click", this.toggle.bind(this));
105
- this.target().removeEventListener("mouseenter", this.show.bind(this));
106
- this.target().removeEventListener("mouseleave", this.hide.bind(this));
107
- this.target().removeEventListener("focus", this.show.bind(this), true);
108
- this.target().removeEventListener("blur", this.hide.bind(this), true);
109
- }
110
- };
111
- this.calculatePosition = () => {
112
- this.el = document.getElementById(this.id);
113
- if (this.el) {
114
- FloatingUI({
115
- ref: this.target(),
116
- floating: this.el,
117
- placement: this.placement,
118
- offset: 8,
119
- arrow: true,
120
- arrowColor: `tw-bg-[--bcm-tooltip-bg]`,
121
- });
122
- }
123
- };
124
- this.show = async () => {
125
- if (this.message) {
126
- this.init();
127
- await delay(this.openDelay);
128
- this.calculatePosition();
129
- this.emitShow();
130
- }
131
- else {
132
- this.hide();
133
- }
134
- };
135
- this.hide = async () => {
136
- this.el = document.getElementById(this.id);
137
- if (this.el) {
138
- await delay(this.closeDelay);
139
- this.el && this.el.remove();
140
- this.emitHide();
141
- }
142
- };
143
- this.toggle = () => {
144
- this.el = document.getElementById(this.id);
145
- if (this.el) {
146
- this.hide();
147
- }
148
- else {
149
- this.show();
150
- }
151
- };
152
- this.message = message;
153
- this.targetId = targetId;
154
- this.placement = placement;
155
- this.color = color;
156
- this.id = targetId + "-tooltip-box";
157
- this.trigger = trigger;
158
- this.size = size;
159
- this.openDelay = openDelay;
160
- this.closeDelay = closeDelay;
161
- this.autoHide = autoHide;
162
- this.emitShow = emitShow;
163
- this.emitHide = emitHide;
164
- }
165
- }
166
-
167
- class Popover {
168
- constructor({ content, message, targetId, placement = "top", color = "slate-700", trigger = "none", openDelay = 0, closeDelay = 0, autoHide = false, emitShow = () => { }, emitHide = () => { } }) {
169
- this.destroy = () => {
170
- this.el = document.getElementById(this.id);
171
- if (this.el) {
172
- this.el.remove();
173
- this.emitHide();
174
- }
175
- this.removeListener();
176
- };
177
- this.target = () => document.getElementById(this.targetId);
178
- this.init = () => {
179
- const { tone, colorName } = ColorHelper.parseColor(this.color, 700);
180
- const dc = Generate.getTwColor({
181
- color: colorName,
182
- tones: {
183
- [tone]: ["bg"],
184
- },
185
- variable: "--bcm-popover",
186
- });
187
- const style = Object.assign(Object.assign({}, dc), (dc["--bcm-popover-bg"] && { "--bcm-popover-text": ColorHelper.reverseColor(dc["--bcm-popover-bg"]) }));
188
- const inner = `<div class="tw-z-[1] tw-rounded tw-py-2">
189
- ${this.message ? `<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${StringHelper.trim(this.message)}</div>` : ""}
190
- ${this.content ? `<div class="tw-font-normal tw-px-4">${StringHelper.trim(this.content)}</div>` : ""}
191
- </div>`;
192
- this.el = Generate.createElement("div", {
193
- "id": `${this.targetId}-popover-box`,
194
- "class": `
195
- tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-[--bcm-popover-bg] tw-text-[--bcm-popover-text] tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300
196
- tw-shadow`,
197
- "role": "popover",
198
- "aria-hidden": "true",
199
- "style": ColorHelper.generateStyleString(style),
200
- "innerHTML": inner,
201
- });
202
- };
203
- this.update = () => {
204
- this.el = document.getElementById(this.id);
205
- if (this.el) {
206
- this.hide();
207
- this.show();
208
- }
209
- };
210
- this.listener = () => {
211
- window.addEventListener("resize", this.calculatePosition.bind(this));
212
- window.addEventListener("scroll", this.calculatePosition.bind(this), true);
213
- window.addEventListener("wheel", this.calculatePosition.bind(this));
214
- if (this.trigger && this.target()) {
215
- switch (this.trigger) {
216
- case "click":
217
- this.target().addEventListener("click", this.toggle.bind(this));
218
- this.autoHide && this.target().addEventListener("mouseleave", this.hide.bind(this));
219
- break;
220
- case "hover":
221
- this.target().addEventListener("mouseenter", this.show.bind(this));
222
- this.target().addEventListener("mouseleave", this.hide.bind(this));
223
- break;
224
- case "focus":
225
- this.target().addEventListener("focus", this.show.bind(this), true);
226
- this.target().addEventListener("blur", this.hide.bind(this), true);
227
- break;
228
- }
229
- }
230
- this.calculatePosition();
231
- };
232
- this.removeListener = () => {
233
- window.removeEventListener("resize", this.calculatePosition.bind(this));
234
- window.removeEventListener("scroll", this.calculatePosition.bind(this), true);
235
- window.removeEventListener("wheel", this.calculatePosition.bind(this));
236
- if (this.target()) {
237
- this.target().removeEventListener("click", this.toggle.bind(this));
238
- this.target().removeEventListener("mouseenter", this.show.bind(this));
239
- this.target().removeEventListener("mouseleave", this.hide.bind(this));
240
- this.target().removeEventListener("focus", this.show.bind(this), true);
241
- this.target().removeEventListener("blur", this.hide.bind(this), true);
242
- }
243
- };
244
- this.calculatePosition = () => {
245
- this.el = document.getElementById(this.id);
246
- if (this.el) {
247
- FloatingUI({
248
- ref: this.target(),
249
- floating: this.el,
250
- placement: this.placement,
251
- offset: 8,
252
- arrow: true,
253
- arrowColor: `tw-bg-[--bcm-popover-bg]`,
254
- });
255
- }
256
- };
257
- this.show = async () => {
258
- if (this.message) {
259
- this.init();
260
- await delay(this.openDelay);
261
- this.calculatePosition();
262
- this.emitShow();
263
- }
264
- else {
265
- this.hide();
266
- }
267
- };
268
- this.hide = async () => {
269
- this.el = document.getElementById(this.id);
270
- if (this.el) {
271
- await delay(this.closeDelay);
272
- this.el.remove();
273
- this.emitHide();
274
- }
275
- };
276
- this.toggle = () => {
277
- this.el = document.getElementById(this.id);
278
- if (this.el) {
279
- this.hide();
280
- }
281
- else {
282
- this.show();
283
- }
284
- };
285
- this.content = content;
286
- this.message = message;
287
- this.targetId = targetId;
288
- this.placement = placement;
289
- this.color = color;
290
- this.trigger = trigger;
291
- this.id = targetId + "-popover-box";
292
- this.openDelay = openDelay;
293
- this.closeDelay = closeDelay;
294
- this.autoHide = autoHide;
295
- this.emitShow = emitShow;
296
- this.emitHide = emitHide;
297
- }
298
- }
299
-
300
- const badgeStyle = cva([
301
- "bcm-badge__dot bcm-ui-element bcm-ui-content-display",
302
- "tw-flex tw-items-center tw-justify-center tw-flex-row",
303
- "tw-rounded-full tw-text-center",
304
- "tw-bg-[--bcm-badge-bg] tw-text-[--bcm-badge-text]",
305
- " tw-whitespace-nowrap [&>*:empty]:tw-hidden",
306
- ], {
307
- variants: {
308
- size: {
309
- small: ["bcm-badge__dot-size-small tw-text-1 tw-min-w-1.5 tw-min-h-1.5 [&>*]:tw-px-1.5 [&>*]:tw-min-w-4"],
310
- medium: ["bcm-badge__dot-size-medium tw-text-2 tw-min-w-2 tw-min-h-2 [&>*]:tw-px-1.5 [&>*]:tw-min-w-5"],
311
- large: ["bcm-badge__dot-size-large tw-text-3 tw-min-w-2.5 tw-min-h-2.5 [&>*]:tw-px-2 [&>*]:tw-min-w-6"], //10
312
- },
313
- blink: {
314
- true: [
315
- "bcm-badge__dot-blink tw-relative",
316
- "after:tw-content-[''] after:tw-absolute after:tw-top-0 after:tw-left-0 after:tw-z-[-1]",
317
- "after:tw-w-full after:tw-h-full after:tw-bg-[--bcm-badge-bg] after:tw-opacity-75 after:tw-rounded-full",
318
- "after:tw-animate-blink after:tw-pointer-events-none"
319
- ],
320
- },
321
- },
322
- compoundVariants: [
323
- {
324
- size: "medium",
325
- blink: false,
326
- class: "",
327
- },
328
- ],
329
- defaultVariants: {
330
- size: "medium",
331
- blink: false,
332
- },
333
- });
334
-
335
- const BcmBadge = class {
336
- constructor(hostRef) {
337
- registerInstance(this, hostRef);
338
- this.statusColors = {
339
- info: "blue",
340
- error: "red",
341
- warning: "amber",
342
- success: "emerald",
343
- };
344
- this._id = Generate.UID();
345
- this.blink = false;
346
- this.value = undefined;
347
- this.color = undefined;
348
- this.size = Bcm.Size.medium;
349
- this.status = undefined;
350
- }
351
- render() {
352
- const { blink, value, size, color, status } = this;
353
- const _color = this.statusColors[status] || color;
354
- const { tone, colorName } = ColorHelper.parseColor(_color);
355
- const dc = Generate.getTwColor({
356
- color: colorName,
357
- tones: {
358
- [tone]: ["bg"],
359
- },
360
- variable: "--bcm-badge",
361
- });
362
- const style = Object.assign(Object.assign({}, dc), (dc["--bcm-badge-bg"] && { "--bcm-badge-text": ColorHelper.reverseColor(dc["--bcm-badge-bg"]) }));
363
- return (h(Host, { class: "bcm-badge tw-inline-flex tw-items-center tw-justify-center", role: "status", "aria-live": "polite" }, h("div", { class: badgeStyle({ size, blink }), style: style }, h("span", { class: "bcm-badge__dot-text", role: "presentation", "aria-hidden": "true" }, h("slot", null, value)), h("span", { class: "tw-sr-only" }, value))));
364
- }
365
- get el() { return getElement(this); }
366
- };
367
-
368
- const variantOptions = {
369
- save: {
370
- text: 'Save',
371
- color: 'emerald',
372
- icon: 'far fa-save',
373
- iconPosition: 'prefix',
374
- },
375
- ok: {
376
- text: 'Ok',
377
- color: 'emerald',
378
- icon: 'far fa-check',
379
- iconPosition: 'prefix',
380
- },
381
- new: {
382
- text: 'New',
383
- color: 'emerald',
384
- icon: 'far fa-plus',
385
- iconPosition: 'prefix',
386
- },
387
- add: {
388
- text: 'Add',
389
- color: 'emerald',
390
- icon: 'far fa-plus',
391
- iconPosition: 'prefix',
392
- },
393
- create: {
394
- text: 'Create',
395
- color: 'emerald',
396
- icon: 'far fa-plus',
397
- iconPosition: 'prefix',
398
- },
399
- prev: {
400
- text: 'Prev',
401
- color: '',
402
- icon: 'far fa-arrow-left',
403
- iconPosition: 'prefix',
404
- },
405
- next: {
406
- text: 'Next',
407
- color: '',
408
- icon: 'far fa-arrow-right',
409
- iconPosition: 'suffix',
410
- },
411
- apply: {
412
- text: 'Apply',
413
- color: '',
414
- icon: 'far fa-check-circle',
415
- iconPosition: 'prefix',
416
- },
417
- submit: {
418
- text: 'Submit',
419
- color: '',
420
- icon: 'far fa-save',
421
- iconPosition: 'prefix',
422
- },
423
- send: {
424
- text: 'Send',
425
- color: 'emerald',
426
- icon: 'far fa-paper-plane',
427
- iconPosition: 'prefix',
428
- },
429
- delete: {
430
- text: 'Delete',
431
- color: 'red',
432
- icon: 'far fa-trash',
433
- iconPosition: 'prefix',
434
- },
435
- cancel: {
436
- text: 'Cancel',
437
- color: 'red',
438
- icon: 'far fa-times',
439
- iconPosition: 'prefix',
440
- },
441
- decline: {
442
- text: 'Decline',
443
- color: 'red',
444
- icon: 'far fa-ban',
445
- iconPosition: 'prefix',
446
- },
447
- close: {
448
- text: 'Close',
449
- color: 'red',
450
- icon: 'far fa-times-circle',
451
- iconPosition: 'prefix',
452
- },
453
- archive: {
454
- text: 'Archive',
455
- color: 'red',
456
- icon: 'far fa-folder-open',
457
- iconPosition: 'prefix',
458
- },
459
- remove: {
460
- text: 'Remove',
461
- color: 'red',
462
- icon: 'far fa-minus-circle',
463
- iconPosition: 'prefix',
464
- },
465
- edit: {
466
- text: 'Edit',
467
- color: '',
468
- icon: 'far fa-edit',
469
- iconPosition: 'prefix',
470
- },
471
- export: {
472
- text: 'Export',
473
- color: '',
474
- icon: 'far fa-sign-out',
475
- iconPosition: 'prefix',
476
- },
477
- import: {
478
- text: 'Import',
479
- color: '',
480
- icon: 'far fa-sign-in',
481
- iconPosition: 'prefix',
482
- },
483
- filter: {
484
- text: 'Filter',
485
- color: '',
486
- icon: 'far fa-filter',
487
- iconPosition: 'prefix',
488
- },
489
- update: {
490
- text: 'Update',
491
- color: '',
492
- icon: 'far fa-sync',
493
- iconPosition: 'prefix',
494
- },
495
- reset: {
496
- text: "Reset",
497
- color: "",
498
- icon: 'far fa-sync',
499
- iconPosition: "prefix",
500
- },
501
- download: {
502
- text: 'Download',
503
- color: '',
504
- icon: 'far fa-download',
505
- iconPosition: 'prefix',
506
- },
507
- };
508
- var VariantProps;
509
- (function (VariantProps) {
510
- VariantProps["save"] = "save";
511
- VariantProps["submit"] = "submit";
512
- VariantProps["ok"] = "ok";
513
- VariantProps["new"] = "new";
514
- VariantProps["add"] = "add";
515
- VariantProps["create"] = "create";
516
- VariantProps["apply"] = "apply";
517
- VariantProps["prev"] = "prev";
518
- VariantProps["next"] = "next";
519
- VariantProps["send"] = "send";
520
- VariantProps["delete"] = "delete";
521
- VariantProps["cancel"] = "cancel";
522
- VariantProps["decline"] = "decline";
523
- VariantProps["close"] = "close";
524
- VariantProps["archive"] = "archive";
525
- VariantProps["remove"] = "remove";
526
- VariantProps["edit"] = "edit";
527
- VariantProps["export"] = "export";
528
- VariantProps["import"] = "import";
529
- VariantProps["filter"] = "filter";
530
- VariantProps["update"] = "update";
531
- VariantProps["reset"] = "Reset";
532
- VariantProps["download"] = "download";
533
- })(VariantProps || (VariantProps = {}));
534
-
535
- const { state } = createStore({
536
- value: new Map(),
537
- setData: {},
538
- removeData: {}
539
- });
540
- const setValue = (val) => {
541
- const data = Object.assign(Object.assign({}, val), (variantOptions[val.variant] && {
542
- icon: variantOptions[val.variant].icon,
543
- value: variantOptions[val.variant].text,
544
- iconPosition: Bcm$1.IconPosition[variantOptions[val.variant].iconPosition],
545
- variantColor: variantOptions[val.variant].color
546
- }));
547
- state.value.set(data.id, data);
548
- };
549
- const removeValue = (_id) => {
550
- state.value.delete(_id);
551
- };
552
- const getValue = (id) => snq(() => state.value.get(id), {});
553
- const buttonState = {
554
- setValue,
555
- removeValue,
556
- getValue
557
- };
558
-
559
- const ButtonTemplate = ({ value, type, componentClass, disabled, href, target, loading, isIconOnly, icon, iconPosition, id }) => {
560
- const ButtonTagType = (href) ? Bcm$1.HtmlElementType.a : Bcm$1.HtmlElementType.button;
561
- return (h(ButtonTagType, Object.assign({ id: id }, (type == Bcm$1.HtmlElementType.button && { type }), { class: componentClass, disabled: disabled, href: href, target: target, tabindex: "0" }),
562
- h("span", { hidden: true },
563
- h("slot", null)),
564
- loading && h("span", { class: "bcm-button__container-loading" },
565
- " ",
566
- h("span", { class: "bcm-button__container-icon" },
567
- h("i", { class: "far fa-spinner-third fa-spin" }),
568
- " ")),
569
- icon && h("span", { class: `${iconPosition} bcm-button__container-icon` },
570
- h("i", { class: `${icon}` })),
571
- !isIconOnly && (h(SlotTemplate, { className: "bcm-button__container-text", value: value })),
572
- h("slot", { name: "suffix" })));
573
- };
574
-
575
- const buttonCss = "@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{display:inline-flex;width:fit-content;height:fit-content;--bcm-button-solid-color-default:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-border-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-color-hover:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-border-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-border-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-color-active:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-border-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-color-disabled:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-solid-border-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-default:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-default:var(--bcm-new-ds-color-slate-100);--bcm-button-ghost-border-default:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-color-hover:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-hover:var(--bcm-new-ds-color-slate-200);--bcm-button-ghost-border-hover:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-focus-visible:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-border-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-color-active:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-active:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-border-active:var(--bcm-new-ds-color-slate-500);--bcm-button-ghost-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-background-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-button-ghost-border-disabled:var(--bcm-new-ds-color-slate-200);--bcm-button-link-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-link-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-link-background-color-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-link-background-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-link-background-color-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-link-background-color-disabled:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-disabled:var(--bcm-new-ds-color-transparent)}.bcm-button.full-width{width:100%}.bcm-button.full-width .bcm-button__container{width:100%}.bcm-button:after,.bcm-button:before{content:\"\";clear:both}.bcm-button__container{border:none;color:inherit;background-color:inherit;padding:0;margin:0;font:inherit;cursor:pointer;outline:none;text-decoration:none;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:4px 12px;outline:none;border-radius:4px;transition:background-color 0.1s ease-in-out;position:relative;min-width:40px;border-width:1px;border-style:solid;border-color:initial}.bcm-button__container:hover,.bcm-button__container:focus,.bcm-button__container:active{outline:none;text-decoration:none}.bcm-button__container-loading{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:4px;display:flex;align-items:center;justify-content:center}.bcm-button__container-kind-solid{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-solid:hover{color:var(--bcm-button-solid-color-hover);background-color:var(--bcm-button-solid-background-color-hover);border-color:var(--bcm-button-solid-border-hover)}.bcm-button__container-kind-solid:focus-visible{color:var(--bcm-button-solid-color-focus-visible);background-color:var(--bcm-button-solid-background-color-focus-visible);border-color:var(--bcm-button-solid-border-focus-visible)}.bcm-button__container-kind-solid:active{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid:disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid.checked{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid.disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid .bcm-button__container-loading{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-ghost{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-ghost:not([disabled]) .bcm-icon{color:var(--bcm-new-ds-color-slate-500)}.bcm-button__container-kind-ghost:hover{color:var(--bcm-button-ghost-color-hover);background-color:var(--bcm-button-ghost-background-color-hover);border-color:var(--bcm-button-ghost-border-hover)}.bcm-button__container-kind-ghost:focus-visible{color:var(--bcm-button-ghost-color-focus-visible);background-color:var(--bcm-button-ghost-background-color-focus-visible);border-color:var(--bcm-button-ghost-border-focus-visible)}.bcm-button__container-kind-ghost:active{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost:disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost.checked{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost.disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost .bcm-button__container-loading{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-link{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container-kind-link:hover{color:var(--bcm-button-link-color-hover);background-color:var(--bcm-button-link-background-color-hover);border-color:var(--bcm-button-link-border-hover)}.bcm-button__container-kind-link:focus-visible{color:var(--bcm-button-link-color-focus-visible);background-color:var(--bcm-button-link-background-color-focus-visible);border-color:var(--bcm-button-link-border-focus-visible)}.bcm-button__container-kind-link:active{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link:disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link.checked{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link.disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link .bcm-button__container-loading{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container[disabled]{cursor:not-allowed}.bcm-button__container-text{order:3;display:flex;align-items:center;gap:8px;white-space:nowrap}.bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-icon.prefix{order:2}.bcm-button__container-icon.suffix{order:4}.bcm-button__container-size-small{font-size:12px;line-height:calc(12px + 8px);padding:calc(4px - 3px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px - 2px)) * 2)}.bcm-button__container-size-small .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-medium{font-size:calc(12px + 1px);line-height:calc(12px + 8px);padding:calc(4px + 1px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px + 2px)) * 2)}.bcm-button__container-size-medium .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-large{font-size:16px;line-height:calc(16px + 8px);padding:calc(8px - 1px) 12px;min-height:calc(calc(16px + 8px) + (calc(8px) * 2))}.bcm-button__container-size-large .bcm-button__container-icon{min-height:calc(16px + 8px)}";
576
-
577
- const BcmButton = class {
578
- constructor(hostRef) {
579
- registerInstance(this, hostRef);
580
- this.bcmClick = createEvent(this, "bcm-click", 7);
581
- this._id = Generate.UID();
582
- this.hidden = false;
583
- this.type = Bcm$1.ButtonType.button;
584
- this.size = Bcm$1.Size.medium;
585
- this.disabled = false;
586
- this.kind = Bcm$1.Kind.solid;
587
- this.outline = false;
588
- this.icon = undefined;
589
- this.href = undefined;
590
- this.target = undefined;
591
- this.value = undefined;
592
- this.loading = false;
593
- this.variant = undefined;
594
- this.dataDismiss = false;
595
- this.fullWidth = false;
596
- this.iconPosition = Bcm$1.IconPosition.prefix;
597
- this.color = undefined;
598
- this.checked = false;
599
- }
600
- handleOnClick(e) {
601
- if (this.disabled) {
602
- e.preventDefault();
603
- e.stopPropagation();
604
- return false;
605
- }
606
- }
607
- componentWillRender() {
608
- const { size, kind, icon, iconPosition, disabled, outline, href, type, target, loading, variant, fullWidth, hidden, value } = this;
609
- buttonState.setValue({
610
- id: this._id,
611
- size,
612
- type,
613
- kind,
614
- icon,
615
- iconPosition,
616
- disabled,
617
- outline,
618
- href,
619
- target,
620
- loading,
621
- variant,
622
- fullWidth,
623
- hidden,
624
- value,
625
- isIconOnly: !!(this.isHaveChildNodes() && this.icon),
626
- });
627
- }
628
- getStateData() {
629
- return buttonState.getValue(this._id);
630
- }
631
- isHaveChildNodes() {
632
- const childNodes = Array.from(this.el.childNodes);
633
- return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
634
- }
635
- setColor(color = this.color) {
636
- if (!color)
637
- return;
638
- const { kind } = this;
639
- const prefix = `--bcm-button-${kind}`;
640
- if (kind === 'solid') {
641
- return {
642
- [`${prefix}-color-default`]: ColorHelper.dsColor('white'),
643
- [`${prefix}-color-hover`]: ColorHelper.dsColor('white'),
644
- [`${prefix}-color-focus-visible`]: ColorHelper.dsColor('white'),
645
- [`${prefix}-color-active`]: ColorHelper.dsColor('white'),
646
- [`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
647
- [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-500'),
648
- [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-600'),
649
- [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-700'),
650
- [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-800'),
651
- [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
652
- [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-500'),
653
- [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-600'),
654
- [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-700'),
655
- [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-800'),
656
- [`${prefix}-border-disabled`]: ColorHelper.dsColor('slate-400')
657
- };
658
- }
659
- else if (kind == 'link') {
660
- return {
661
- [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-500'),
662
- [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
663
- [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
664
- [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-700'),
665
- [`${prefix}-color-disabled`]: ColorHelper.dsColor('slate-400'),
666
- [`${prefix}-background-color-default`]: ColorHelper.dsColor('transparent'),
667
- [`${prefix}-background-color-hover`]: ColorHelper.dsColor('transparent'),
668
- [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
669
- [`${prefix}-background-color-active`]: ColorHelper.dsColor('slate-50'),
670
- [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('transparent'),
671
- [`${prefix}-border-default`]: ColorHelper.dsColor('transparent'),
672
- [`${prefix}-border-hover`]: ColorHelper.dsColor('transparent'),
673
- [`${prefix}-border-focus-visible`]: ColorHelper.dsColor('slate-50'),
674
- [`${prefix}-border-active`]: ColorHelper.dsColor('slate-50'),
675
- [`${prefix}-border-disabled`]: ColorHelper.dsColor('transparent')
676
- };
677
- }
678
- else if (kind == 'ghost') {
679
- return {
680
- [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-600'),
681
- [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
682
- [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-600'),
683
- [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-600'),
684
- [`${prefix}-color-disabled`]: ColorHelper.dsColor(color + '-300'),
685
- [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-100'),
686
- [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-200'),
687
- [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-400'),
688
- [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-300'),
689
- [`${prefix}-background-color-disabled`]: ColorHelper.dsColor(color + '-50'),
690
- [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-300'),
691
- [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-400'),
692
- [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-600'),
693
- [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-500'),
694
- [`${prefix}-border-disabled`]: ColorHelper.dsColor(color + '-200'),
695
- };
696
- }
697
- return;
698
- }
699
- render() {
700
- const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
701
- const classPrefix = 'bcm-button';
702
- let componentClass = classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
703
- 'full-width': fullWidth,
704
- 'checked': this.checked,
705
- 'disabled': disabled,
706
- });
707
- const hostClasses = classnames(`${classPrefix}`, {
708
- hidden,
709
- 'full-width': fullWidth,
710
- });
711
- return (h(Host, { class: hostClasses, style: this.setColor(variantColor), onClick: () => !disabled && this.bcmClick.emit(this.el) }, h(ButtonTemplate, { type: type, value: value, componentClass: componentClass, disabled: disabled, href: href, target: target, icon: icon, loading: loading, iconSize: iconSize, isIconOnly: isIconOnly, iconPosition: iconPosition })));
712
- }
713
- get el() { return getElement(this); }
714
- };
715
- BcmButton.style = buttonCss;
716
-
717
- const dropdownCss = "@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-dropdown{width:fit-content;display:inline-flex;flex-direction:row}.bcm-dropdown.hidden{display:none}.bcm-dropdown.no-style{cursor:pointer}.bcm-dropdown.full-width{width:100%}.bcm-dropdown.full-width .bcm-button__container-text{flex:1;justify-content:space-between}.bcm-dropdown__type-split .main-button .bcm-button__container{border-top-right-radius:0;border-bottom-right-radius:0}.bcm-dropdown__type-split .split-button .bcm-button__container{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:1px;min-width:auto}.bcm-dropdown__icon{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;transform:rotate(0deg);transition:transform 0.2s ease}.bcm-dropdown__icon--open{transform:rotate(180deg)}";
718
-
719
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
720
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
721
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
722
- r = Reflect.decorate(decorators, target, key, desc);
723
- else
724
- for (var i = decorators.length - 1; i >= 0; i--)
725
- if (d = decorators[i])
726
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
727
- return c > 3 && r && Object.defineProperty(target, key, r), r;
728
- };
729
- const BcmDropdown = class {
730
- constructor(hostRef) {
731
- registerInstance(this, hostRef);
732
- this.bcmClick = createEvent(this, "bcm-click", 7);
733
- this.bcmDropdownChange = createEvent(this, "bcm-dropdown-change", 7);
734
- this.isOpen = undefined;
735
- this._id = Generate.UID();
736
- this.menuId = Generate.UID();
737
- this.hidden = false;
738
- this.type = 'dropdown';
739
- this.size = Bcm$1.Size.medium;
740
- this.disabled = false;
741
- this.kind = Bcm$1.Kind.solid;
742
- this.icon = undefined;
743
- this.href = undefined;
744
- this.target = undefined;
745
- this.value = undefined;
746
- this.noStyle = false;
747
- this.dropdownIcon = 'fas fa-angle-down';
748
- this.linkedComponent = undefined;
749
- this.loading = false;
750
- this.variant = undefined;
751
- this.dataDismiss = false;
752
- this.fullWidth = false;
753
- this.iconPosition = Bcm$1.IconPosition.prefix;
754
- this.placement = undefined;
755
- this.height = undefined;
756
- this.maxHeight = '500px';
757
- this.minHeight = '50px';
758
- this.stopDeepClean = false;
759
- this.selectable = true;
760
- this.gap = '4px';
761
- this.color = undefined;
762
- this.activeItem = null;
763
- this.data = [];
764
- }
765
- async dataChanged(newValue) {
766
- if (newValue) {
767
- this.data = newValue;
768
- }
769
- }
770
- async setActive(id = null) {
771
- var _a, _b;
772
- (_b = (_a = document
773
- .getElementById(`${this.menuId}`)) === null || _a === void 0 ? void 0 : _a.querySelectorAll('bcm-menu')) === null || _b === void 0 ? void 0 : _b.forEach(item => {
774
- item.setActive(id);
775
- });
776
- }
777
- async getActive() {
778
- return this.activeItem;
779
- }
780
- handleSlotItems({ detail }) {
781
- this.data = detail;
782
- }
783
- setActiveAttribute(e) {
784
- if (e.detail) {
785
- this.bcmDropdownChange.emit(e.detail);
786
- this.activeItem = e.detail;
787
- }
788
- }
789
- ;
790
- render() {
791
- const { size, kind, disabled, icon, color, href, target, loading, type, variant, fullWidth, isOpen } = this;
792
- const hostClasses = classnames('bcm-dropdown', 'bcm-dropdown__type-' + type, {
793
- 'full-width': fullWidth,
794
- 'no-style': this.noStyle,
795
- 'hidden': this.hidden || this.linkedComponent,
796
- });
797
- const attributes = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (disabled && { disabled })), (loading && { loading })), (kind && { kind })), (size && { size })), (variant && { variant })), (color && { color })), (this.menuId && { 'menu-id': this.menuId }));
798
- const iconClasses = classnames('bcm-dropdown__icon', {
799
- 'bcm-dropdown__icon--open': isOpen,
800
- });
801
- const dropdownIcon = (h("span", { class: iconClasses }, h("bcm-icon", { icon: this.dropdownIcon })));
802
- return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null)), this.noStyle && h("slot", null), !this.noStyle && (h("bcm-button", Object.assign({ class: "main-button", id: `${this._id}-button` }, attributes, (icon && { icon }), (href && type === 'split' && { href }), (target && type === 'split' && { target }), (fullWidth && { fullWidth })), h("slot", null), type === 'dropdown' && dropdownIcon)), !this.noStyle && type === 'split' && (h("bcm-button", Object.assign({ id: `${this._id}-button-split`, class: "split-button" }, attributes), dropdownIcon)), h("bcm-linked", { id: `${this.menuId}`, "target-id": `${this._id}-button${type === 'split' ? '-split' : ''}`, placement: this.placement || (type === 'dropdown' ? 'bottom-start' : 'bottom-end'), "max-height": this.maxHeight, "min-height": this.minHeight, height: this.height, "on-bcm-open": e => { var _a; return ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.id) == this.menuId && (this.isOpen = e.detail); } }, this.data && this.data.length > 0 && h("bcm-menu", { data: this.data, selectable: this.selectable, "on-bcm-click": e => this.bcmClick.emit(e.detail), "onBcm-menu-change": e => this.setActiveAttribute(e), gap: this.gap, dropdown: true }), h("slot", { name: "content" }))));
803
- }
804
- get el() { return getElement(this); }
805
- static get watchers() { return {
806
- "data": ["dataChanged"]
807
- }; }
808
- };
809
- __decorate$1([
810
- IsLoad()
811
- ], BcmDropdown.prototype, "el", void 0);
812
- __decorate$1([
813
- JsonParse('data', true)
814
- ], BcmDropdown.prototype, "dataChanged", null);
815
- BcmDropdown.style = dropdownCss;
816
-
817
- const iconCss = "@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-icon.hidden{display:none}";
818
-
819
- const customIconList = {
820
- "message-bot": "message-bot.svg",
821
- };
822
- const BcmIcon = class {
823
- constructor(hostRef) {
824
- registerInstance(this, hostRef);
825
- this.hidden = false;
826
- this.icon = undefined;
827
- }
828
- getIcon() {
829
- const { icon } = this;
830
- if (icon in customIconList) {
831
- const _icon = getAssetPath("./static/" + customIconList[icon]);
832
- return (h("div", { class: "tw-flex tw-h-fit tw-w-fit tw-items-center tw-justify-center" }, h("img", { src: `${_icon}`, alt: icon, class: "tw-h-fit tw-w-fit" })));
833
- }
834
- return h("i", { class: `${icon}` });
835
- }
836
- render() {
837
- const { /*icon,*/ hidden } = this;
838
- return h(Host, { class: `bcm-icon fa ${hidden ? "hidden" : ""}` }, this.getIcon());
839
- }
840
- static get assetsDirs() { return ["static"]; }
841
- get el() { return getElement(this); }
842
- };
843
- BcmIcon.style = iconCss;
844
-
845
- const itemCss = "@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-item{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;--bcm-item-color-default:var(--bcm-new-ds-color-white);--bcm-item-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-item-color-hover:var(--bcm-new-ds-color-white);--bcm-item-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-item-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-item-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-item-color-active:var(--bcm-new-ds-color-white);--bcm-item-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-item-color-disabled:var(--bcm-new-ds-color-white);--bcm-item-background-color-disabled:var(--bcm-new-ds-color-slate-400);font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;border-radius:4px;outline:none;color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item-size-small{font-size:12px;line-height:calc(12px + 8px);padding:2px 12px;min-height:calc(calc(12px + 8px) + calc(2px) * 2)}.bcm-item-size-medium{font-size:14px;line-height:calc(14px + 8px);padding:5px 12px;min-height:calc(calc(14px + 8px) + calc(5px) * 2)}.bcm-item-size-large{font-size:16px;line-height:calc(16px + 8px);padding:8px 12px;min-height:calc(calc(16px + 8px) + calc(8px) * 2)}.bcm-item:default{color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item:hover{color:var(--bcm-item-color-hover);background-color:var(--bcm-item-background-color-hover)}.bcm-item:focus-visible{color:var(--bcm-item-color-focus-visible);background-color:var(--bcm-item-background-color-focus-visible)}.bcm-item:active{color:var(--bcm-item-color-active);background-color:var(--bcm-item-background-color-active)}.bcm-item:disabled{color:var(--bcm-item-color-disabled);background-color:var(--bcm-item-background-color-disabled)}.bcm-item:not(.static):hover{cursor:pointer}";
846
-
847
- const BcmItem = class {
848
- constructor(hostRef) {
849
- registerInstance(this, hostRef);
850
- this._id = Generate.UID();
851
- this.size = Bcm$1.Size.medium;
852
- this.color = undefined;
853
- this.static = false;
854
- }
855
- setColor(color = this.color) {
856
- if (!color)
857
- return;
858
- const prefix = `--bcm-item`;
859
- if (color == "white") {
860
- return {
861
- [`${prefix}-color-default`]: ColorHelper.dsColor('slate-600'),
862
- [`${prefix}-color-hover`]: ColorHelper.dsColor('slate-600'),
863
- [`${prefix}-color-focus-visible`]: ColorHelper.dsColor('slate-600'),
864
- [`${prefix}-color-active`]: ColorHelper.dsColor('slate-600'),
865
- [`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
866
- [`${prefix}-background-color-default`]: ColorHelper.dsColor(this.static ? 'white' : 'white'),
867
- [`${prefix}-background-color-hover`]: ColorHelper.dsColor(this.static ? 'white' : 'slate-100'),
868
- [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(this.static ? 'white' : 'slate-200'),
869
- [`${prefix}-background-color-active`]: ColorHelper.dsColor(this.static ? 'white' : 'slate-300'),
870
- [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
871
- };
872
- }
873
- return {
874
- [`${prefix}-color-default`]: ColorHelper.dsColor('white'),
875
- [`${prefix}-color-hover`]: ColorHelper.dsColor('white'),
876
- [`${prefix}-color-focus-visible`]: ColorHelper.dsColor('white'),
877
- [`${prefix}-color-active`]: ColorHelper.dsColor('white'),
878
- [`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
879
- [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-500'),
880
- [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-600'),
881
- [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-700'),
882
- [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-800'),
883
- [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
884
- };
885
- }
886
- disconnectedCallback() {
887
- // this.el.remove()
888
- }
889
- render() {
890
- const hostClasses = classnames('bcm-item', `bcm-item-size-${this.size}`);
891
- return (h(Host, { class: hostClasses, style: this.setColor() }, h("slot", null)));
892
- }
893
- get el() { return getElement(this); }
894
- };
895
- BcmItem.style = itemCss;
896
-
897
- const BcmItems = class {
898
- constructor(hostRef) {
899
- registerInstance(this, hostRef);
900
- this.bcmItems = createEvent(this, "bcm-items", 7);
901
- this._id = Generate.UID();
902
- }
903
- connectedCallback() {
904
- if (this.el.children && this.el.children.length > 0) {
905
- let slots = this.nestedItems(this.el);
906
- this.bcmItems.emit(slots);
907
- this.el.remove();
908
- }
909
- }
910
- mapItems(element) {
911
- var _a;
912
- const item = element;
913
- const textContent = (_a = item === null || item === void 0 ? void 0 : item.innerHTML) === null || _a === void 0 ? void 0 : _a.replace(/<bcm-item>.*<\/bcm-item>/g, '').replace(/<bcm-item .*>.*<\/bcm-item>/g, '').replace(/<!--(.|\s)*?-->/g, '').trim();
914
- const checkAttr = (attr) => StringHelper.elementBooleanCheck(element.getAttribute(attr));
915
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ id: element.getAttribute('id') || Generate.UID(), text: element.getAttribute('text') || textContent }, (element.innerHTML.trim() && { isHtmlContent: element.textContent.length > 0 ? (element.innerHTML.trim()) : null })), (checkAttr('disabled') && { disabled: checkAttr('disabled') })), (checkAttr('selected') && { selected: checkAttr('selected') })), (checkAttr('hidden') && { hidden: checkAttr('hidden') })), (checkAttr('checked') && { checked: checkAttr('checked') })), (checkAttr('readonly') && { readonly: checkAttr('readonly') })), (checkAttr('active') && { active: checkAttr('active') })), (checkAttr('icon') && { icon: element.getAttribute('icon') })), (checkAttr('link') && { link: element.getAttribute('link') }));
916
- }
917
- nestedItems(element) {
918
- return snq(() => Array.from(element === null || element === void 0 ? void 0 : element.children).map((child) => {
919
- var _a;
920
- return (Object.assign(Object.assign({}, (((_a = child === null || child === void 0 ? void 0 : child.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'bcm-item' && this.mapItems(child))), { items: this.nestedItems(child) }));
921
- }), []);
922
- }
923
- render() {
924
- return h("slot", null);
925
- }
926
- get el() { return getElement(this); }
927
- };
928
-
929
- const BcmLinked = class {
930
- constructor(hostRef) {
931
- registerInstance(this, hostRef);
932
- this.bcmOpen = createEvent(this, "bcm-open", 7);
933
- this._id = Generate.UID();
934
- this.placement = Bcm.Placement["bottom-start"];
935
- this.trigger = Bcm.TriggerType.click;
936
- this.targetId = "";
937
- this.height = undefined;
938
- this.maxHeight = undefined;
939
- this.minHeight = "50px";
940
- this.isOpen = false;
941
- this.hideDelay = 500;
942
- this.isMouseOverLink = false;
943
- }
944
- target() {
945
- const target = document.querySelectorAll(`[id="${this.targetId}"]`);
946
- if (target.length > 0) {
947
- target.length > 1 && console.warn(`[bcm-linked] - Target id "${this.targetId}" is duplicated`);
948
- return target[0];
949
- }
950
- else {
951
- // console.warn(`[bcm-linked] - id="${this._id}" was removed from the dom because id="${this.targetId}" could not be found.`);
952
- this.el.remove();
953
- return null;
954
- }
955
- }
956
- detectClone() {
957
- const linked = document.querySelectorAll(`[target-id="${this.targetId}"]`);
958
- if (linked.length > 0) {
959
- linked.forEach((item) => {
960
- if (item.id !== this._id) {
961
- console.warn(`[bcm-linked] - id="${this._id}" was removed from the dom because id="${this.targetId}" is duplicated.`);
962
- item.remove();
963
- }
964
- });
965
- }
966
- }
967
- dismissEvent() {
968
- document.dispatchEvent(new CustomEvent("linked-data-dismiss", { detail: { id: this._id } }));
969
- }
970
- checkDataDismiss(e) {
971
- Generate.findEventPathHasAttribute(e, "data-dismiss") && this.dismissEvent();
972
- }
973
- hideChildLinked() {
974
- this.el.querySelectorAll("[is-linked][linked-is-open]").forEach(item => {
975
- var _a;
976
- (_a = document.querySelector(`#${item.getAttribute("is-linked")}[is-open]`)) === null || _a === void 0 ? void 0 : _a.hide(false);
977
- });
978
- }
979
- calculatePosition() {
980
- const el = this.el;
981
- if (el && this.target()) {
982
- if (this.isOpen) {
983
- FloatingUI({
984
- ref: this.target(),
985
- floating: el,
986
- placement: this.placement,
987
- offset: 4,
988
- autoHidden: el.getAttribute("main-linked") === "true" ? false : true,
989
- autoSize: true,
990
- style: {
991
- height: this.height,
992
- maxHeight: this.maxHeight,
993
- minHeight: this.minHeight,
994
- },
995
- });
996
- }
997
- else {
998
- el.style.visibility = "hidden";
999
- el.style.opacity = "0";
1000
- }
1001
- }
1002
- }
1003
- init() {
1004
- const target = this.target();
1005
- this.trigger === Bcm.TriggerType.hover && this.listenMouseOver();
1006
- if (target) {
1007
- target.setAttribute("is-linked", this.el.id);
1008
- if (!Generate.getAncestor(target, "bcm-linked")) {
1009
- this.el.setAttribute("main-linked", "true");
1010
- }
1011
- else {
1012
- this.el.removeAttribute("main-linked");
1013
- }
1014
- }
1015
- }
1016
- componentDidLoad() {
1017
- this.init();
1018
- }
1019
- triggerWatch(newValue) {
1020
- if (newValue === Bcm.TriggerType.hover) {
1021
- this.listenMouseOver();
1022
- }
1023
- }
1024
- watchIsOpen() {
1025
- this.bcmOpen.emit(this.isOpen);
1026
- }
1027
- onLinkedDataDismis() {
1028
- this.hide(false);
1029
- }
1030
- onBcmFloatingIsHide(e) {
1031
- if (e.detail.id === this._id) {
1032
- this.hide(false);
1033
- }
1034
- }
1035
- async show(wait = true) {
1036
- wait && (await delay(50));
1037
- this.detectClone();
1038
- const target = this.target();
1039
- if (target) {
1040
- const bcmOverlayContainer = document.querySelector("#bcm-overlay-container");
1041
- bcmOverlayContainer.appendChild(this.el);
1042
- target.setAttribute("linked-is-open", "true");
1043
- this.isOpen = true;
1044
- this.calculatePosition();
1045
- }
1046
- else {
1047
- this.hide(false);
1048
- }
1049
- return this.isOpen;
1050
- }
1051
- async hide(wait = true) {
1052
- wait && (await delay(50));
1053
- const target = this.target();
1054
- this.isMouseOverLink = false;
1055
- if (target) {
1056
- target.removeAttribute("linked-is-open");
1057
- this.hideChildLinked();
1058
- this.isOpen = false;
1059
- }
1060
- return this.isOpen;
1061
- }
1062
- async toggle(wait = true) {
1063
- return this.isOpen ? await this.hide(wait) : await this.show(wait);
1064
- }
1065
- clickListener(e) {
1066
- if (!this.target())
1067
- return;
1068
- if (this.trigger === Bcm.TriggerType.hover)
1069
- return;
1070
- const isTarget = Generate.findEventPath(e, this.target());
1071
- const isSelf = Generate.findEventPath(e, this.el);
1072
- const isLinked = Generate.findEventPathWithNodeName(e, "BCM-LINKED");
1073
- if (!isTarget && !isSelf && !isLinked) {
1074
- this.hide();
1075
- this.bcmOpen.emit(this.isOpen);
1076
- return;
1077
- }
1078
- if (this.isOpen) {
1079
- isTarget && this.hide(false);
1080
- isSelf && this.checkDataDismiss(e);
1081
- if (this.el.getAttribute("main-linked") === "true" && !isTarget && !isSelf && !isLinked) {
1082
- this.dismissEvent();
1083
- }
1084
- }
1085
- else {
1086
- isTarget && this.show(false);
1087
- }
1088
- }
1089
- resizeListener() {
1090
- this.calculatePosition();
1091
- }
1092
- scrollListener() {
1093
- this.calculatePosition();
1094
- }
1095
- wheelListener() {
1096
- this.calculatePosition();
1097
- }
1098
- listenMouseOver() {
1099
- var _a, _b;
1100
- this.el.addEventListener("mouseover", () => (this.isMouseOverLink = true));
1101
- this.el.addEventListener("mouseleave", () => {
1102
- this.isMouseOverLink = false;
1103
- this.handleMouseLeave();
1104
- });
1105
- (_a = this.target()) === null || _a === void 0 ? void 0 : _a.addEventListener("mouseenter", this.handleMouseEnter.bind(this));
1106
- (_b = this.target()) === null || _b === void 0 ? void 0 : _b.addEventListener("mouseleave", this.handleMouseLeave.bind(this));
1107
- }
1108
- handleMouseLeave() {
1109
- setTimeout(() => {
1110
- !this.isMouseOverLink && this.hide();
1111
- }, this.hideDelay);
1112
- }
1113
- handleMouseEnter() {
1114
- clearTimeout(this.timeoutId);
1115
- this.isMouseOverLink = false;
1116
- this.show();
1117
- }
1118
- render() {
1119
- const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
1120
- return (h(Host, { class: "tw-invisible tw-absolute tw-left-0 tw-top-0 tw-z-tooltip tw-block tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-opacity-0 tw-shadow tw-transition-opacity tw-duration-100", style: Object.assign(Object.assign({}, openStyle), { overflow: "auto" }) }, h("slot", null)));
1121
- }
1122
- get el() { return getElement(this); }
1123
- static get watchers() { return {
1124
- "trigger": ["triggerWatch"],
1125
- "isOpen": ["watchIsOpen"]
1126
- }; }
1127
- };
1128
-
1129
- const menuCss = "@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-menu{--bcm-menu-color-default:var(--bcm-new-ds-color-slate-700);--bcm-menu-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-menu-icon-color-default:var(--bcm-new-ds-color-slate-600);--bcm-menu-color-hover:var(--bcm-new-ds-color-slate-800);--bcm-menu-background-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-menu-icon-color-hover:var(--bcm-new-ds-color-slate-700);--bcm-menu-color-active:var(--bcm-new-ds-color-white);--bcm-menu-background-color-active:var(--bcm-color-primary-500);--bcm-menu-icon-color-active:var(--bcm-new-ds-color-white);--bcm-menu-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-menu-background-color-focus-visible:var(--bcm-color-primary-600);--bcm-menu-icon-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-menu-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-menu-background-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-menu-icon-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-menu-color-dropdownDisabled:var(--bcm-new-ds-color-slate-400);--bcm-menu-background-color-dropdownDisabled:var(--bcm-new-ds-color-transparent);--bcm-menu-icon-color-dropdownDisabled:var(--bcm-new-ds-color-slate-400);--bcm-menu-color-active-hover:var(--bcm-new-ds-color-white);--bcm-menu-background-color-active-hover:var(--bcm-color-primary-400);--bcm-menu-icon-color-active-hover:var(--bcm-new-ds-color-white);--bcm-menu-color-active-focus-visible:var(--bcm-new-ds-color-white);--bcm-menu-background-color-active-focus-visible:var(--bcm-color-primary-700);--bcm-menu-icon-color-active-focus-visible:var(--bcm-new-ds-color-white);--bcm-menu-color-active-active:var(--bcm-new-ds-color-white);--bcm-menu-background-color-active-active:var(--bcm-color-primary-800);--bcm-menu-icon-color-active-active:var(--bcm-new-ds-color-white);font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;position:relative;width:210px;box-shadow:0 2px 6px 1px rgba(17, 24, 38, 0.1);border-radius:8px;background-color:var(--bcm-new-ds-color-white);transition:background-color 0.1s ease-in-out, width 0.3s ease-in-out}.bcm-menu__container{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap}.bcm-menu__item{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;font:inherit;cursor:pointer;color:inherit;background-color:inherit;padding:0;margin:0;border:none;outline:none;text-decoration:none}.bcm-menu__item:hover,.bcm-menu__item:focus,.bcm-menu__item:active{outline:none;text-decoration:none}.bcm-menu__item--is-sub{color:var(--bcm-menu-color-hover);background-color:var(--bcm-menu-background-color-hover);border-radius:4px}.bcm-menu__item--is-sub .bcm-menu__item-link-icon,.bcm-menu__item--is-sub .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-hover)}.bcm-menu__item-link{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px;padding:4px 8px;border-radius:4px;transition:background-color 0.1s ease-in-out, padding 0.3s ease-in-out;color:var(--bcm-menu-color-default);background-color:var(--bcm-menu-background-color-default)}.bcm-menu__item-link-icon{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;min-width:24px;max-width:24px}.bcm-menu__item-link-text{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.bcm-menu__item-link-text--collapse{opacity:0}.bcm-menu__item-link-toggle{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;font-size:10px;height:100%;order:0;width:24px;transform:rotate(0deg);transition:transform 0.2s ease-in-out;margin-right:-8px}.bcm-menu__item-link-toggle--collapse{transform:rotate(-180deg)}.bcm-menu__item-link .bcm-menu__item-link-icon,.bcm-menu__item-link .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-default)}.bcm-menu__item-link:hover:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active){color:var(--bcm-menu-color-hover);background-color:var(--bcm-menu-background-color-hover)}.bcm-menu__item-link:hover:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-icon,.bcm-menu__item-link:hover:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-hover)}.bcm-menu__item-link:active:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active){color:var(--bcm-menu-color-active);background-color:var(--bcm-menu-background-color-active)}.bcm-menu__item-link:active:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-icon,.bcm-menu__item-link:active:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-active)}.bcm-menu__item-link:focus-visible:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active){color:var(--bcm-menu-color-focus-visible);background-color:var(--bcm-menu-background-color-focus-visible)}.bcm-menu__item-link:focus-visible:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-icon,.bcm-menu__item-link:focus-visible:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-focus-visible)}.bcm-menu__item-link:disabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active){color:var(--bcm-menu-color-disabled);background-color:var(--bcm-menu-background-color-disabled)}.bcm-menu__item-link:disabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-icon,.bcm-menu__item-link:disabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-disabled)}.bcm-menu__item-link:dropdownDisabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active){color:var(--bcm-menu-color-dropdownDisabled);background-color:var(--bcm-menu-background-color-dropdownDisabled)}.bcm-menu__item-link:dropdownDisabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-icon,.bcm-menu__item-link:dropdownDisabled:not(.bcm-menu__item-link--disabled):not(.bcm-menu__item-link--active) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-dropdownDisabled)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled){color:var(--bcm-menu-color-active);background-color:var(--bcm-menu-background-color-active)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled) .bcm-menu__item-link-icon,.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled) .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-active)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):hover{color:var(--bcm-menu-color-active-hover);background-color:var(--bcm-menu-background-color-active-hover)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):hover .bcm-menu__item-link-icon,.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):hover .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-active-hover)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):focus-visible{color:var(--bcm-menu-color-active-focus-visible);background-color:var(--bcm-menu-background-color-active-focus-visible)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):focus-visible .bcm-menu__item-link-icon,.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):focus-visible .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-active-focus-visible)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):active{color:var(--bcm-menu-color-active-active);background-color:var(--bcm-menu-background-color-active-active)}.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):active .bcm-menu__item-link-icon,.bcm-menu__item-link--active:not(.bcm-menu__item-link--disabled):active .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-active-active)}.bcm-menu__item-link--disabled{cursor:not-allowed;color:var(--bcm-menu-color-disabled);background-color:var(--bcm-menu-background-color-disabled)}.bcm-menu__item-link--disabled .bcm-menu__item-link-icon,.bcm-menu__item-link--disabled .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-disabled)}.bcm-menu__item-submenu{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px;padding:12px;display:none}.bcm-menu__item-submenu .bcm-menu__item-link{--bcm-menu-background-color-default:var(--bcm-new-ds-color-white);--bcm-menu-background-color-hover:var(--bcm-new-ds-color-slate-100)}.bcm-menu__item-submenu--open{display:flex}.bcm-menu__size-small{padding:8px;font-size:12px;line-height:calc(14px + 8px)}.bcm-menu__size-medium{padding:16px;font-size:14px;line-height:calc(16px + 8px)}.bcm-menu__size-large{padding:16px;font-size:16px;line-height:calc(18px + 8px)}.bcm-menu__collapse-button{color:var(--bcm-menu-color-active);background-color:var(--bcm-menu-background-color-active);display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;font-size:14px;border-radius:100px;position:absolute;top:23px;right:-8px;width:18px;height:18px;cursor:pointer;transition:background-color 0.1s ease-in-out, transform 0.3s ease}.bcm-menu__collapse-button:hover{color:var(--bcm-menu-color-active-hover);background-color:var(--bcm-menu-background-color-active-hover)}.bcm-menu__collapse-button:focus-visible{color:var(--bcm-menu-color-active-focus-visible);background-color:var(--bcm-menu-background-color-active-focus-visible)}.bcm-menu__collapse-button:active{color:var(--bcm-menu-color-active-active);background-color:var(--bcm-menu-background-color-active-active)}.bcm-menu__collapse-button--collapsed{transform:rotate(-180deg)}.bcm-menu__collapse{width:64px}.bcm-menu__collapse .bcm-menu__item-link{padding:4px}.bcm-menu--linked{position:absolute;z-index:10800;top:0;left:0;opacity:0;visibility:hidden;width:fit-content;min-height:50px;max-height:500px;height:auto;overflow-y:auto;padding:12px}.bcm-menu--linked.bcm-menu__open{opacity:1;visibility:visible}.bcm-menu--linked .bcm-menu__container{gap:4px}.bcm-menu--linked .bcm-menu__item-link{--bcm-menu-background-color-default:var(--bcm-new-ds-color-slate-50);--bcm-menu-background-color-hover:var(--bcm-new-ds-color-slate-100)}.bcm-menu--linked .bcm-menu__item .bcm-menu__item-submenu .bcm-menu__item-link{--bcm-menu-background-color-default:var(--bcm-new-ds-color-white);--bcm-menu-background-color-hover:var(--bcm-new-ds-color-slate-100)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active){background-color:var(--bcm-menu-background-color-default)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active):hover{color:var(--bcm-menu-color-hover);background-color:var(--bcm-menu-background-color-hover)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active):focus-visible{color:var(--bcm-menu-color-focus-visible);background-color:var(--bcm-menu-background-color-focus-visible)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active):active{color:var(--bcm-menu-color-active);background-color:var(--bcm-menu-background-color-active)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active) .bcm-menu__item-link--disabled{cursor:not-allowed;color:var(--bcm-menu-color-disabled);background-color:var(--bcm-menu-background-color-disabled)}.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active) .bcm-menu__item-link--disabled .bcm-menu__item-link-icon,.bcm-menu--linked .bcm-menu__item-submenu-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-submenu-link:not(.bcm-menu--linked .bcm-menu__item-submenu-link--active) .bcm-menu__item-link--disabled .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-disabled)}.bcm-menu--linked .bcm-menu__item-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-link:not(.bcm-menu--linked .bcm-menu__item-link--active){background-color:var(--bcm-menu-background-color-default)}.bcm-menu--linked .bcm-menu__item-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-link:not(.bcm-menu--linked .bcm-menu__item-link--active):hover{color:var(--bcm-menu-color-hover);background-color:var(--bcm-menu-background-color-hover)}.bcm-menu--linked .bcm-menu__item-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-link:not(.bcm-menu--linked .bcm-menu__item-link--active):focus-visible{color:var(--bcm-menu-color-focus-visible);background-color:var(--bcm-menu-background-color-focus-visible)}.bcm-menu--linked .bcm-menu__item-link:not(:disabled) .bcm-menu--linked .bcm-menu__item-link:not(.bcm-menu--linked .bcm-menu__item-link--active):active{color:var(--bcm-menu-color-active);background-color:var(--bcm-menu-background-color-active)}.bcm-menu__dropdown{width:auto;max-width:210px}.bcm-menu__dropdown .bcm-menu__item-link--disabled{color:var(--bcm-menu-color-dropdownDisabled);background-color:var(--bcm-menu-background-color-dropdownDisabled)}.bcm-menu__dropdown .bcm-menu__item-link--disabled .bcm-menu__item-link-icon,.bcm-menu__dropdown .bcm-menu__item-link--disabled .bcm-menu__item-link-toggle{color:var(--bcm-menu-icon-color-dropdownDisabled)}";
1130
-
1131
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1132
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1133
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1134
- r = Reflect.decorate(decorators, target, key, desc);
1135
- else
1136
- for (var i = decorators.length - 1; i >= 0; i--)
1137
- if (d = decorators[i])
1138
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1139
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1140
- };
1141
- const BcmMenu = class {
1142
- constructor(hostRef) {
1143
- registerInstance(this, hostRef);
1144
- this.bcmClick = createEvent(this, "bcm-click", 7);
1145
- this.bcmExpanded = createEvent(this, "bcm-expanded", 7);
1146
- this.bcmMenuChange = createEvent(this, "bcm-menu-change", 7);
1147
- this._id = Generate.UID();
1148
- this.size = 'medium';
1149
- this.collapsible = false;
1150
- this.collapse = false;
1151
- this.mode = 'inline';
1152
- this.disabled = false;
1153
- this.hidden = false;
1154
- this.linkedComponent = undefined;
1155
- this.height = 'auto';
1156
- this.maxHeight = '500px';
1157
- this.minHeight = '150px';
1158
- this.selectable = true;
1159
- this.gap = "16px";
1160
- this.dropdown = false;
1161
- this.placement = 'bottom-start';
1162
- this.activeItemId = undefined;
1163
- this.data = [];
1164
- }
1165
- async setActive(param) {
1166
- this.activeItemId = null;
1167
- const recursive = (data) => {
1168
- data.forEach(item => {
1169
- if (item.id == param) {
1170
- item.active = true;
1171
- this.activeItemId = item.id;
1172
- this.bcmClick.emit(item);
1173
- }
1174
- else {
1175
- item.active = false;
1176
- if (item.items) {
1177
- recursive(item.items);
1178
- }
1179
- }
1180
- });
1181
- };
1182
- recursive(this.data);
1183
- }
1184
- async getActive() {
1185
- return this.activeItem;
1186
- }
1187
- handleSlotItems({ detail }) {
1188
- this.data = detail;
1189
- }
1190
- handleClickItem(item) {
1191
- if (item.items && item.items.length > 0) {
1192
- item.isOpen = !item.isOpen;
1193
- forceUpdate(this);
1194
- }
1195
- else {
1196
- this.activeItemId = item.id;
1197
- document.dispatchEvent(new CustomEvent('linked-data-dismiss', { detail: { id: this._id } }));
1198
- }
1199
- // this.data = this.data.map(menuItem => ({ ...menuItem, active: menuItem.id === item.id }));
1200
- this.bcmClick.emit(item);
1201
- }
1202
- getTooltip(id, text) {
1203
- return new Tooltip({ message: text, targetId: 'bcm-menu__item-' + this._id + '-' + id, placement: 'right' });
1204
- }
1205
- render() {
1206
- const { data, collapsible, collapse } = this;
1207
- const hostClasses = classnames('bcm-menu', `bcm-menu__size-${this.size}`, {
1208
- 'bcm-menu__collapse': collapse,
1209
- 'bcm-menu__dropdown': this.dropdown,
1210
- });
1211
- const MenuLinkTemplate = (item, index) => {
1212
- if (!item.text)
1213
- return;
1214
- if (!item.id)
1215
- item.id = Generate.UID();
1216
- const subItems = !!(item.items && item.items.length);
1217
- if (this.selectable && (this.activeItemId ? this.activeItemId === item.id : item.active)) {
1218
- this.bcmMenuChange.emit(item);
1219
- this.activeItem = item;
1220
- }
1221
- return (h("a", { id: 'bcm-menu__item-' + this._id + '-' + item.id, onMouseEnter: () => this.collapse && this.getTooltip(item.id, item.text).show(), onMouseLeave: () => this.collapse && this.getTooltip(item.id, item.text).hide(), key: index, href: !item.disabled ? item.link || 'javascript:void(0)' : 'javascript:void(0)', tabindex: item.disabled ? '-1' : '0', class: classnames('bcm-menu__item', {
1222
- 'bcm-menu__item--is-sub': subItems && item.isOpen,
1223
- 'hidden tw-hidden': item.hidden,
1224
- }) }, h("span", { class: classnames('bcm-menu__item-link', `bcm-menu__item-link--${this.mode}`, {
1225
- 'bcm-menu__item-link--active': this.selectable && (this.activeItemId ? this.activeItemId === item.id : item.active),
1226
- 'bcm-menu__item-link--disabled': item.disabled,
1227
- }), onClick: () => {
1228
- !this.disabled && !item.disabled && this.handleClickItem(item);
1229
- } }, item.icon && (h("span", { class: "bcm-menu__item-link-icon" }, h("i", { class: item.icon || 'far fa-angle-left' }))), h("span", { class: classnames('bcm-menu__item-link-text', {
1230
- 'bcm-menu__item-link-text--collapse': collapse,
1231
- }), innerHTML: item.text }), subItems && (h("div", { class: classnames('bcm-menu__item-link-toggle', {
1232
- 'bcm-menu__item-link-toggle--collapse': item.isOpen,
1233
- }) }, h("i", { class: "fas fa-chevron-down" })))), subItems && (h("div", { class: classnames('bcm-menu__item-submenu', {
1234
- 'bcm-menu__item-submenu--collapse': collapse,
1235
- 'bcm-menu__item-submenu--open': item.isOpen,
1236
- }) }, item.items.map((subItem, subIndex) => MenuLinkTemplate(subItem, subIndex))))));
1237
- };
1238
- return (h(Host, { class: hostClasses, disabled: this.disabled }, h("div", { class: "bcm-menu__container", style: { gap: this.gap } }, h("slot", null), (data === null || data === void 0 ? void 0 : data.length) > 0 && data.map((item, index) => MenuLinkTemplate(item, index)), collapsible && (h("div", { class: classnames('bcm-menu__collapse-button', {
1239
- 'bcm-menu__collapse-button--collapsed': collapse,
1240
- }), onClick: () => {
1241
- this.collapse = !collapse;
1242
- collapsible && this.bcmExpanded.emit(collapse);
1243
- } }, h("i", { class: "far fa-angle-left" }))))));
1244
- }
1245
- get el() { return getElement(this); }
1246
- };
1247
- __decorate([
1248
- IsLoad()
1249
- ], BcmMenu.prototype, "el", void 0);
1250
- BcmMenu.style = menuCss;
1251
-
1252
- const BcmPopover = class {
1253
- constructor(hostRef) {
1254
- registerInstance(this, hostRef);
1255
- this.bcmPopoverShow = createEvent(this, "bcmPopoverShow", 7);
1256
- this.bcmPopoverHide = createEvent(this, "bcmPopoverHide", 7);
1257
- this._id = Generate.UID();
1258
- this.message = "";
1259
- this.content = "";
1260
- this.placement = Bcm.Placement.top;
1261
- this.trigger = Bcm.TriggerType.click;
1262
- this.open = false;
1263
- this.color = "white";
1264
- this.openDelay = 0;
1265
- this.closeDelay = 0;
1266
- this.autoHide = false;
1267
- this.targetId = undefined;
1268
- this.popover = undefined;
1269
- }
1270
- emitShow() {
1271
- this.bcmPopoverShow.emit();
1272
- }
1273
- emitHide() {
1274
- this.bcmPopoverHide.emit();
1275
- }
1276
- connectedCallback() {
1277
- this.popover = new Popover({
1278
- targetId: this.targetId || this._id,
1279
- content: this.content,
1280
- message: this.message,
1281
- placement: this.placement,
1282
- color: this.color,
1283
- trigger: this.trigger,
1284
- openDelay: this.openDelay,
1285
- closeDelay: this.closeDelay,
1286
- autoHide: this.autoHide,
1287
- emitShow: () => this.emitShow(),
1288
- emitHide: () => this.emitHide(),
1289
- });
1290
- }
1291
- componentDidLoad() {
1292
- this.popover.listener();
1293
- }
1294
- componentDidRender() {
1295
- const { content, message, placement, color, trigger } = this;
1296
- this.popover.content = content;
1297
- this.popover.message = message;
1298
- this.popover.placement = placement;
1299
- this.popover.color = color;
1300
- this.popover.trigger = trigger;
1301
- this.popover.openDelay = this.openDelay;
1302
- this.popover.closeDelay = this.closeDelay;
1303
- this.popover.autoHide = this.autoHide;
1304
- this.popover.update();
1305
- }
1306
- disconnectedCallback() {
1307
- this.popover.destroy();
1308
- }
1309
- async show() {
1310
- this.popover.show();
1311
- }
1312
- async hide() {
1313
- this.popover.hide();
1314
- }
1315
- async toggle() {
1316
- this.popover.toggle();
1317
- }
1318
- render() {
1319
- return (h(Host, { class: "tw-inline-flex tw-h-fit tw-w-fit", role: "tooltip", "aria-hidden": "true" }, h("slot", null)));
1320
- }
1321
- get el() { return getElement(this); }
1322
- };
1323
-
1324
- const BcmTabGroup = class {
1325
- constructor(hostRef) {
1326
- registerInstance(this, hostRef);
1327
- this.tabChange = createEvent(this, "bcm-tab-change", 7);
1328
- this._id = Generate.UID();
1329
- this.active = "1";
1330
- this.color = "blue";
1331
- this.size = Bcm.Size.medium;
1332
- }
1333
- get tabItems() {
1334
- return this.el.querySelectorAll("bcm-tab-item");
1335
- }
1336
- get tabItemHeaders() {
1337
- return this.el.querySelectorAll("bcm-tab-item-header");
1338
- }
1339
- setTabAttributes() {
1340
- this.tabItems.forEach((tab, index) => {
1341
- const itemActive = tab.hasAttribute("active") ? true : false;
1342
- const itemDisabled = tab.hasAttribute("disabled") ? true : false;
1343
- const itemIndex = index + 1;
1344
- tab.setAttribute("index", `${itemIndex}`);
1345
- tab.setAttribute("size", this.size);
1346
- tab.setAttribute("color", this.color);
1347
- tab.removeAttribute("active");
1348
- tab.removeAttribute("disabled");
1349
- if (itemActive) {
1350
- tab.setAttribute("active", "");
1351
- this.active = itemIndex.toString();
1352
- }
1353
- if (itemDisabled) {
1354
- tab.setAttribute("disabled", "");
1355
- }
1356
- // const headerElement = tab.querySelector("bcm-tab-item-header");
1357
- // if (headerElement) {
1358
- // this.setHeaderTabAttributes(headerElement, tab);
1359
- // }
1360
- });
1361
- const isHasActiveTab = Array.from(this.tabItems).some((tab) => tab.hasAttribute("active"));
1362
- if (!isHasActiveTab) {
1363
- this.tabItems[0].setAttribute("active", "");
1364
- }
1365
- }
1366
- componentWillLoad() {
1367
- this.setTabAttributes();
1368
- }
1369
- handleTabClick(index) {
1370
- var _a, _b;
1371
- if (index) {
1372
- this.active = index.toString();
1373
- }
1374
- if ((_a = this.tabItems) === null || _a === void 0 ? void 0 : _a.length) {
1375
- this.tabItems.forEach(tab => {
1376
- tab.removeAttribute("active");
1377
- tab.setAttribute("size", this.size);
1378
- tab.setAttribute("color", this.color);
1379
- if (tab.getAttribute("index") == this.active) {
1380
- tab.setAttribute("active", "");
1381
- }
1382
- });
1383
- }
1384
- if ((_b = this.tabItemHeaders) === null || _b === void 0 ? void 0 : _b.length) {
1385
- this.tabItemHeaders.forEach(tabHeader => {
1386
- tabHeader.removeAttribute("active");
1387
- tabHeader.setAttribute("size", this.size);
1388
- tabHeader.setAttribute("color", this.color);
1389
- if (tabHeader.getAttribute("index") == this.active) {
1390
- tabHeader.setAttribute("active", "");
1391
- // tabHeader.scrollIntoView({
1392
- // behavior: "smooth",
1393
- // block: "start",
1394
- // inline: "center",
1395
- // });
1396
- }
1397
- });
1398
- }
1399
- this.tabChange.emit(this.active);
1400
- }
1401
- componentDidRender() {
1402
- this.inkBarControl();
1403
- this.handleTabClick();
1404
- }
1405
- componentDidLoad() {
1406
- this.inkBarControl();
1407
- this.observeTabItem();
1408
- }
1409
- async setActive(index) {
1410
- if (index > 0 && index <= this.tabItems.length && index != +this.active) {
1411
- this.handleTabClick(index);
1412
- }
1413
- }
1414
- async refresh() {
1415
- await delay(100);
1416
- forceUpdate(this);
1417
- }
1418
- inkBarControl() {
1419
- var _a;
1420
- const inkBar = this.el.querySelector("#ink-bar");
1421
- if (!inkBar || !((_a = this.tabItemHeaders) === null || _a === void 0 ? void 0 : _a.length))
1422
- return;
1423
- for (let i = 0; i < this.tabItemHeaders.length; i++) {
1424
- const tab = this.tabItemHeaders[i];
1425
- const tabIndex = tab.getAttribute("index");
1426
- if (tabIndex === this.active) {
1427
- inkBar.style.width = `${tab.offsetWidth}px`;
1428
- // inkBar.style.top = `${tab.offsetHeight}px`;
1429
- inkBar.style.transform = `translateX(${tab.offsetLeft}px)`;
1430
- }
1431
- }
1432
- }
1433
- activeChanged(newVal, _oldVal) {
1434
- var _a;
1435
- if (!((_a = this.tabItems) === null || _a === void 0 ? void 0 : _a.length))
1436
- return;
1437
- const isHasActiveTab = Array.from(this.tabItems).some(tab => tab.getAttribute("index") == newVal);
1438
- if (!isHasActiveTab) {
1439
- this.active = "1";
1440
- }
1441
- }
1442
- observeTabItem() {
1443
- const callback = (mutationsList, _observer) => {
1444
- for (const mutation of mutationsList) {
1445
- if (mutation.type === "childList") {
1446
- // for (const node of mutation.addedNodes) {
1447
- // if (node.nodeName === "BCM-TAB-ITEM") {
1448
- // // Do something when a bcm-tab-item is added
1449
- // }
1450
- // }
1451
- for (const node of mutation.removedNodes) {
1452
- if (node.nodeName === "BCM-TAB-ITEM") {
1453
- // Do something when a bcm-tab-item is removed
1454
- // console.log("A bcm-tab-item was removed.", node);
1455
- if (node === null || node === void 0 ? void 0 : node.active) {
1456
- this.active = "1";
1457
- }
1458
- this.tabProcess();
1459
- }
1460
- }
1461
- }
1462
- }
1463
- };
1464
- this.observer = new MutationObserver(callback);
1465
- this.observer.observe(this.el, { childList: true });
1466
- }
1467
- tabProcess() {
1468
- this.updateTabHeaders();
1469
- this.regenerateIndex();
1470
- this.refresh();
1471
- this.inkBarControl();
1472
- }
1473
- updateTabHeaders() {
1474
- const tabIds = Array.from(this.tabItems).map(tab => tab.getAttribute("id"));
1475
- const tabHeaderElements = Array.from(this.el.querySelector("#tab-header").querySelectorAll("bcm-tab-item-header"));
1476
- if (tabIds.length !== tabHeaderElements.length) {
1477
- tabHeaderElements.forEach(tabHeader => {
1478
- const tabId = tabHeader.getAttribute("tab-id");
1479
- if (!tabIds.includes(tabId)) {
1480
- tabHeader.remove();
1481
- }
1482
- });
1483
- }
1484
- }
1485
- regenerateIndex() {
1486
- this.tabItems.forEach((tab, index) => {
1487
- const itemIndex = index + 1;
1488
- tab.setAttribute("index", `${itemIndex}`);
1489
- const headerElement = this.el.querySelector(`bcm-tab-item-header[tab-id="${tab.getAttribute("id")}"]`);
1490
- if (headerElement) {
1491
- headerElement.setAttribute("index", `${itemIndex}`);
1492
- headerElement.style.order = `${itemIndex}`;
1493
- }
1494
- });
1495
- }
1496
- render() {
1497
- const { color } = this;
1498
- const dc = Generate.getTwColor({
1499
- color: color,
1500
- tones: [500]
1501
- });
1502
- return (h(Host, { role: "tablist", "aria-label": "Tab Group", class: "tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans" }, h("div", { class: `tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between`, id: "tab-header", style: dc }, h("div", { id: "ink-bar", class: `tw-bg-default-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform` })), h("slot", null)));
1503
- }
1504
- get el() { return getElement(this); }
1505
- static get watchers() { return {
1506
- "active": ["activeChanged"]
1507
- }; }
1508
- };
1509
-
1510
- const BcmTabItem = class {
1511
- constructor(hostRef) {
1512
- registerInstance(this, hostRef);
1513
- this._id = Generate.UID();
1514
- this.active = false;
1515
- this.disabled = false;
1516
- this.index = undefined;
1517
- }
1518
- componentWillLoad() {
1519
- this.indexControl();
1520
- }
1521
- componentDidRender() {
1522
- this.headerMove();
1523
- }
1524
- getHeaderItem() {
1525
- const headerItem = this.el.querySelector("bcm-tab-item-header");
1526
- if (headerItem) {
1527
- headerItem.setAttribute("index", `${this.index}`);
1528
- headerItem.setAttribute("active", `${this.active}`);
1529
- headerItem.setAttribute("disabled", `${this.disabled}`);
1530
- headerItem.setAttribute("tab-id", `${this._id}`);
1531
- headerItem.style.order = `${this.index}`;
1532
- }
1533
- return headerItem;
1534
- }
1535
- getParentTabGroup() {
1536
- return Generate.findParentElement(this.el, "bcm-tab-group");
1537
- }
1538
- getFindHeaderItem() {
1539
- var _a, _b;
1540
- return (_b = (_a = this.getParentTabGroup()) === null || _a === void 0 ? void 0 : _a.querySelector("#tab-header")) === null || _b === void 0 ? void 0 : _b.querySelector(`bcm-tab-item-header[tab-id="${this._id}"]`);
1541
- }
1542
- headerMove() {
1543
- var _a, _b, _c, _d;
1544
- if (this.getHeaderItem()) {
1545
- (_a = this.getFindHeaderItem()) === null || _a === void 0 ? void 0 : _a.remove();
1546
- (_c = (_b = this.getParentTabGroup()) === null || _b === void 0 ? void 0 : _b.querySelector("#tab-header")) === null || _c === void 0 ? void 0 : _c.appendChild(this.getHeaderItem());
1547
- (_d = this.el.parentElement) === null || _d === void 0 ? void 0 : _d.refresh();
1548
- }
1549
- }
1550
- indexControl() {
1551
- var _a;
1552
- if (!this.index) {
1553
- (_a = Generate.findParentElement(this.el, "bcm-tab-group")) === null || _a === void 0 ? void 0 : _a.querySelectorAll("bcm-tab-item").forEach((item, index) => {
1554
- if (item === this.el) {
1555
- item.setAttribute("index", `${index + 1}`);
1556
- }
1557
- });
1558
- }
1559
- }
1560
- componentDidLoad() {
1561
- const observer = new MutationObserver(() => {
1562
- this.headerMove();
1563
- });
1564
- observer.observe(this.el, { childList: true, subtree: true });
1565
- }
1566
- render() {
1567
- return (h(Host, { id: this._id, role: "tabpanel", "aria-labelledby": `tab-${this._id}`, "aria-hidden": `${!this.active}`, class: {
1568
- "tw-block": this.active,
1569
- "tw-hidden": !this.active,
1570
- "tw-opacity-50": this.disabled,
1571
- "tw-w-full": true,
1572
- } }, h("slot", null)));
1573
- }
1574
- get el() { return getElement(this); }
1575
- };
1576
-
1577
- const BcmTabItemHeader = class {
1578
- constructor(hostRef) {
1579
- registerInstance(this, hostRef);
1580
- this._id = Generate.UID();
1581
- this.active = false;
1582
- this.disabled = false;
1583
- this.index = undefined;
1584
- this.color = "blue";
1585
- this.size = Bcm.Size.medium;
1586
- }
1587
- handleClick() {
1588
- var _a;
1589
- if (!this.disabled) {
1590
- (_a = Generate.findParentElement(this.el, "bcm-tab-group")) === null || _a === void 0 ? void 0 : _a.setActive(this.index);
1591
- }
1592
- }
1593
- render() {
1594
- const { color, size, active, disabled } = this;
1595
- const disabledClass = "tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50";
1596
- const dc = Generate.getTwColor({
1597
- color: color,
1598
- tones: [500, 600, 700, 800]
1599
- });
1600
- return (h(Host, { onClick: () => this.handleClick(), class: classnames(`tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-focus:outline-none`, {
1601
- "tw-text-2 tw-py-1 tw-gap-2": size === Bcm.Size.small,
1602
- "tw-text-3 tw-py-2 tw-gap-3": size === Bcm.Size.medium,
1603
- "tw-text-4 tw-py-3 tw-gap-4": size === Bcm.Size.large,
1604
- }, disabled ? disabledClass : "tw-cursor-pointer", active
1605
- ? `tw-text-default-500 enabled:hover:tw-text-default-600 enabled:active:tw-text-default-700 enabled:focus-visible:tw-text-default-800`
1606
- : "tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600"), style: dc }));
1607
- }
1608
- get el() { return getElement(this); }
1609
- };
1610
-
1611
- const textCss = "@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-text{display:inline;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400}.bcm-text.hidden{display:none}.bcm-text__paragraph{margin:0;padding:0}.bcm-text__font-size-1{font-size:10px;line-height:calc(10px + 8px)}.bcm-text__font-size-2{font-size:12px;line-height:calc(12px + 8px)}.bcm-text__font-size-3{font-size:14px;line-height:calc(14px + 8px)}.bcm-text__font-size-4{font-size:16px;line-height:calc(16px + 8px)}.bcm-text__font-size-5{font-size:18px;line-height:calc(18px + 8px)}.bcm-text__font-size-6{font-size:20px;line-height:calc(20px + 8px)}.bcm-text__font-size-7{font-size:24px;line-height:calc(24px + 8px)}.bcm-text__font-size-8{font-size:32px;line-height:calc(32px + 8px)}.bcm-text__font-size-9{font-size:40px;line-height:calc(40px + 8px)}";
1612
-
1613
- const BcmText = class {
1614
- constructor(hostRef) {
1615
- registerInstance(this, hostRef);
1616
- this.hidden = false;
1617
- this.scale = undefined;
1618
- this.weight = "400";
1619
- this.color = "slate";
1620
- this.text = undefined;
1621
- this.fontSize = 4;
1622
- }
1623
- render() {
1624
- const { hidden, scale, weight, color, fontSize } = this;
1625
- const hostClasses = classnames('bcm-text', {
1626
- hidden
1627
- });
1628
- const classes = classnames('bcm-text__paragraph', `bcm-text__font-size-${fontSize}`, scale);
1629
- const fontWeight = +weight || 400;
1630
- const style = {
1631
- color: ColorHelper.dsColor(color),
1632
- fontWeight
1633
- };
1634
- return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null)), h("p", { class: classes, style: Object.assign({}, style) }, h(SlotTemplate, { value: this.text }))));
1635
- }
1636
- get el() { return getElement(this); }
1637
- };
1638
- BcmText.style = textCss;
1639
-
1640
- const BcmTooltip = class {
1641
- constructor(hostRef) {
1642
- registerInstance(this, hostRef);
1643
- this.bcmTooltipShow = createEvent(this, "bcmTooltipShow", 7);
1644
- this.bcmTooltipHide = createEvent(this, "bcmTooltipHide", 7);
1645
- this._id = Generate.UID();
1646
- this.message = "";
1647
- this.placement = Bcm.Placement.top;
1648
- this.trigger = Bcm.TriggerType.click;
1649
- this.open = false;
1650
- this.color = "slate";
1651
- this.size = Bcm.Size.medium;
1652
- this.openDelay = 0;
1653
- this.closeDelay = 0;
1654
- this.autoHide = false;
1655
- this.targetId = undefined;
1656
- this.tooltip = undefined;
1657
- }
1658
- emitShow() {
1659
- this.bcmTooltipShow.emit();
1660
- }
1661
- emitHide() {
1662
- this.bcmTooltipHide.emit();
1663
- }
1664
- connectedCallback() {
1665
- this.tooltip = new Tooltip({
1666
- targetId: this.targetId || this._id,
1667
- message: this.message,
1668
- placement: this.placement,
1669
- color: this.color,
1670
- trigger: this.trigger,
1671
- size: this.size,
1672
- openDelay: this.openDelay,
1673
- closeDelay: this.closeDelay,
1674
- autoHide: this.autoHide,
1675
- emitShow: () => this.emitShow(),
1676
- emitHide: () => this.emitHide(),
1677
- });
1678
- }
1679
- componentDidLoad() {
1680
- this.tooltip.listener();
1681
- }
1682
- componentDidRender() {
1683
- this.tooltip.message = this.message;
1684
- this.tooltip.placement = this.placement;
1685
- this.tooltip.color = this.color;
1686
- this.tooltip.trigger = this.trigger;
1687
- this.tooltip.size = this.size;
1688
- this.tooltip.openDelay = this.openDelay;
1689
- this.tooltip.closeDelay = this.closeDelay;
1690
- this.tooltip.autoHide = this.autoHide;
1691
- this.tooltip.update();
1692
- }
1693
- disconnectedCallback() {
1694
- this.tooltip.destroy();
1695
- }
1696
- async show() {
1697
- this.tooltip.show();
1698
- }
1699
- async hide() {
1700
- this.tooltip.hide();
1701
- }
1702
- async toggle() {
1703
- this.tooltip.toggle();
1704
- }
1705
- render() {
1706
- return (h(Host, { class: "tw-inline-flex tw-h-fit tw-w-fit", role: "tooltip", "aria-hidden": "true" }, h("slot", null)));
1707
- }
1708
- get el() { return getElement(this); }
1709
- };
1710
-
1711
- const BcmTypography = class {
1712
- constructor(hostRef) {
1713
- registerInstance(this, hostRef);
1714
- }
1715
- render() {
1716
- return (h(Host, { class: "bcm-ui-element bcm-ui-content-display" }, h("slot", null)));
1717
- }
1718
- get el() { return getElement(this); }
1719
- };
1720
-
1721
- export { BcmBadge as bcm_badge, BcmButton as bcm_button, BcmDropdown as bcm_dropdown, BcmIcon as bcm_icon, BcmItem as bcm_item, BcmItems as bcm_items, BcmLinked as bcm_linked, BcmMenu as bcm_menu, BcmPopover as bcm_popover, BcmTabGroup as bcm_tab_group, BcmTabItem as bcm_tab_item, BcmTabItemHeader as bcm_tab_item_header, BcmText as bcm_text, BcmTooltip as bcm_tooltip, BcmTypography as bcm_typography };