bromcom-ui 2.8.0-rc.10-h → 2.8.0-rc.10

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 (616) 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/helper/index.ts +1 -0
  4. package/dist/bromcom-ui/global/helper/toast.ts +136 -0
  5. package/dist/bromcom-ui/p-01832535.entry.js +5 -0
  6. package/dist/bromcom-ui/p-04aac882.js +5 -0
  7. package/dist/bromcom-ui/{p-00a0bbb0.entry.js → p-04d4c6e7.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-08372949.entry.js +5 -0
  9. package/dist/bromcom-ui/{p-213fa01f.js → p-09d8a268.js} +1 -1
  10. package/dist/bromcom-ui/{p-3bf3f141.entry.js → p-0a16fcfa.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-20ecbc71.entry.js → p-0b663779.entry.js} +1 -1
  12. package/dist/bromcom-ui/p-0d7fcdef.entry.js +5 -0
  13. package/dist/bromcom-ui/p-1351e665.entry.js +5 -0
  14. package/dist/bromcom-ui/{p-d5f9c429.entry.js → p-14a0a646.entry.js} +1 -1
  15. package/dist/bromcom-ui/p-16cb2d3d.entry.js +5 -0
  16. package/dist/bromcom-ui/p-175a2b31.entry.js +5 -0
  17. package/dist/bromcom-ui/p-21c41833.entry.js +5 -0
  18. package/dist/bromcom-ui/{p-19769caf.entry.js → p-221448f8.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-d02b6aa2.js → p-24aefda6.js} +1 -1
  20. package/dist/bromcom-ui/{p-fe8f6043.entry.js → p-31226526.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-31d72d3e.entry.js +5 -0
  22. package/dist/bromcom-ui/p-36b364af.entry.js +5 -0
  23. package/dist/bromcom-ui/p-37e672f8.entry.js +5 -0
  24. package/dist/bromcom-ui/{p-4f77fafe.entry.js → p-39eda493.entry.js} +1 -1
  25. package/dist/bromcom-ui/p-3c1bd5fd.entry.js +5 -0
  26. package/dist/bromcom-ui/p-3fcbf33c.entry.js +10 -0
  27. package/dist/bromcom-ui/p-42645311.entry.js +5 -0
  28. package/dist/bromcom-ui/p-4701df7c.entry.js +5 -0
  29. package/dist/bromcom-ui/p-4aa0e6b1.js +5 -0
  30. package/dist/bromcom-ui/p-4fb0b07a.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-d10a20eb.entry.js → p-4fcf03c1.entry.js} +1 -1
  32. package/dist/bromcom-ui/p-52953d34.entry.js +5 -0
  33. package/dist/bromcom-ui/{p-da1aa726.entry.js → p-533cb826.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-5374828c.js +5 -0
  35. package/dist/bromcom-ui/p-5432f9e0.entry.js +5 -0
  36. package/dist/bromcom-ui/p-5a464d76.entry.js +5 -0
  37. package/dist/bromcom-ui/p-5c059eba.entry.js +5 -0
  38. package/dist/bromcom-ui/p-5c5db6d2.entry.js +5 -0
  39. package/dist/bromcom-ui/p-60aab0f0.entry.js +5 -0
  40. package/dist/bromcom-ui/{p-c89c3f46.entry.js → p-6b7a9d96.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-6cc73d59.entry.js +5 -0
  42. package/dist/bromcom-ui/p-74540539.entry.js +5 -0
  43. package/dist/bromcom-ui/p-74970793.entry.js +5 -0
  44. package/dist/bromcom-ui/p-75887a27.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-9d908441.js → p-76154996.js} +1 -1
  46. package/dist/bromcom-ui/p-774cc8c5.entry.js +5 -0
  47. package/dist/bromcom-ui/p-79fd816c.js +5 -0
  48. package/dist/bromcom-ui/p-7afeaca9.entry.js +5 -0
  49. package/dist/bromcom-ui/p-7f85ba54.entry.js +5 -0
  50. package/dist/bromcom-ui/p-82549604.entry.js +5 -0
  51. package/dist/bromcom-ui/p-843905c8.js +5 -0
  52. package/dist/bromcom-ui/p-8620b754.entry.js +5 -0
  53. package/dist/bromcom-ui/p-86dae775.entry.js +5 -0
  54. package/dist/bromcom-ui/p-88c0d54d.entry.js +5 -0
  55. package/dist/bromcom-ui/p-8c6057d0.entry.js +5 -0
  56. package/dist/bromcom-ui/{p-ea218e23.js → p-8d0ca8c2.js} +1 -1
  57. package/dist/bromcom-ui/{p-c7e245a3.entry.js → p-8e2540d8.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-8fccd984.entry.js +5 -0
  59. package/dist/bromcom-ui/p-8fd8d750.entry.js +5 -0
  60. package/dist/bromcom-ui/p-91517b40.entry.js +5 -0
  61. package/dist/bromcom-ui/p-96d00dc7.entry.js +5 -0
  62. package/dist/bromcom-ui/{p-04e3d67d.entry.js → p-976f682f.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-de1567c7.entry.js → p-97933e31.entry.js} +1 -1
  64. package/dist/bromcom-ui/p-9aa25453.entry.js +5 -0
  65. package/dist/bromcom-ui/p-9f6c06b3.entry.js +5 -0
  66. package/dist/bromcom-ui/{p-c9bd85e9.js → p-a429e85b.js} +1 -1
  67. package/dist/bromcom-ui/{p-19cd9e89.js → p-a51e8ad2.js} +1 -1
  68. package/dist/bromcom-ui/{p-4df600d5.js → p-a60a2dd0.js} +1 -1
  69. package/dist/bromcom-ui/p-a76148e1.entry.js +5 -0
  70. package/dist/bromcom-ui/p-a8ff8106.entry.js +5 -0
  71. package/dist/bromcom-ui/p-ab53518d.entry.js +5 -0
  72. package/dist/bromcom-ui/{p-e8d18848.js → p-b60bcecf.js} +1 -1
  73. package/dist/bromcom-ui/p-b6522bad.entry.js +5 -0
  74. package/dist/bromcom-ui/p-b93d2841.entry.js +5 -0
  75. package/dist/bromcom-ui/p-bb3ee847.entry.js +5 -0
  76. package/dist/bromcom-ui/p-bb5102ad.entry.js +5 -0
  77. package/dist/bromcom-ui/{p-33330368.entry.js → p-bc840f30.entry.js} +1 -1
  78. package/dist/bromcom-ui/p-bdae6fa2.entry.js +5 -0
  79. package/dist/bromcom-ui/p-be7a34ac.entry.js +5 -0
  80. package/dist/bromcom-ui/p-c23b6240.js +5 -0
  81. package/dist/bromcom-ui/p-c271533b.entry.js +5 -0
  82. package/dist/bromcom-ui/{p-ad9c9bdb.js → p-c834b5c2.js} +1 -1
  83. package/dist/bromcom-ui/{p-4371dc2d.entry.js → p-c85b8abc.entry.js} +1 -1
  84. package/dist/bromcom-ui/p-c8e13fd7.js +5 -0
  85. package/dist/bromcom-ui/{p-39b8a477.entry.js → p-d644b6d9.entry.js} +1 -1
  86. package/dist/bromcom-ui/{p-35ea8fad.js → p-da1055cb.js} +1 -1
  87. package/dist/bromcom-ui/p-dafe02b6.entry.js +5 -0
  88. package/dist/bromcom-ui/{p-aaac4637.js → p-dbc4c30c.js} +1 -1
  89. package/dist/bromcom-ui/p-e0c548ea.entry.js +5 -0
  90. package/dist/bromcom-ui/{p-4f89942a.entry.js → p-e19e9dc1.entry.js} +1 -1
  91. package/dist/bromcom-ui/p-ec8cf4f0.entry.js +5 -0
  92. package/dist/bromcom-ui/p-ed026255.js +5 -0
  93. package/dist/bromcom-ui/p-eee421df.entry.js +5 -0
  94. package/dist/bromcom-ui/p-ef1b4760.entry.js +5 -0
  95. package/dist/bromcom-ui/p-f1c374c6.entry.js +5 -0
  96. package/dist/bromcom-ui/p-f4ce5b4e.entry.js +5 -0
  97. package/dist/bromcom-ui/{p-3f7e7354.entry.js → p-f8c20298.entry.js} +1 -1
  98. package/dist/bromcom-ui/p-f9f8c1c4.entry.js +5 -0
  99. package/dist/bromcom-ui/p-faed1c9e.entry.js +5 -0
  100. package/dist/bromcom-ui/p-fc784983.entry.js +5 -0
  101. package/dist/cjs/{bcm-2c51bf0c.js → bcm-634604e3.js} +1 -0
  102. package/dist/cjs/bcm-accordion.cjs.entry.js +5 -3
  103. package/dist/cjs/bcm-alert.cjs.entry.js +7 -6
  104. package/dist/cjs/bcm-attendance.cjs.entry.js +7 -5
  105. package/dist/cjs/bcm-autocomplete.cjs.entry.js +2 -2
  106. package/dist/cjs/bcm-avatar_2.cjs.entry.js +12 -11
  107. package/dist/cjs/bcm-box.cjs.entry.js +2 -2
  108. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +4 -3
  109. package/dist/cjs/bcm-button-group.cjs.entry.js +7 -6
  110. package/dist/cjs/bcm-button_7.cjs.entry.js +1570 -0
  111. package/dist/cjs/bcm-card.cjs.entry.js +9 -8
  112. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -5
  113. package/dist/cjs/bcm-chip.cjs.entry.js +7 -6
  114. package/dist/cjs/bcm-collapse-group.cjs.entry.js +2 -2
  115. package/dist/cjs/bcm-collapse.cjs.entry.js +4 -3
  116. package/dist/cjs/bcm-color-input.cjs.entry.js +76 -0
  117. package/dist/cjs/bcm-colorful_2.cjs.entry.js +17971 -0
  118. package/dist/cjs/bcm-colorpicker.cjs.entry.js +2 -2
  119. package/dist/cjs/bcm-date-picker.cjs.entry.js +5 -4
  120. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +11 -10
  121. package/dist/cjs/bcm-default.cjs.entry.js +5 -3
  122. package/dist/cjs/bcm-drawer.cjs.entry.js +10 -9
  123. package/dist/cjs/bcm-dropdown.cjs.entry.js +7 -6
  124. package/dist/cjs/bcm-error-layout.cjs.entry.js +3 -3
  125. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +8 -7
  126. package/dist/cjs/bcm-form-2.cjs.entry.js +6 -5
  127. package/dist/cjs/bcm-form-group.cjs.entry.js +2 -2
  128. package/dist/cjs/bcm-input-custom.cjs.entry.js +73 -0
  129. package/dist/cjs/bcm-input.cjs.entry.js +41 -12
  130. package/dist/cjs/bcm-item.cjs.entry.js +7 -6
  131. package/dist/cjs/bcm-items.cjs.entry.js +6 -5
  132. package/dist/cjs/bcm-link.cjs.entry.js +5 -5
  133. package/dist/cjs/bcm-list.cjs.entry.js +33 -25
  134. package/dist/cjs/bcm-menu.cjs.entry.js +138 -0
  135. package/dist/cjs/bcm-message.cjs.entry.js +2 -2
  136. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +50 -0
  137. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +49 -0
  138. package/dist/cjs/bcm-modal-2.cjs.entry.js +172 -0
  139. package/dist/cjs/bcm-modal.cjs.entry.js +8 -7
  140. package/dist/cjs/bcm-notification.cjs.entry.js +2 -2
  141. package/dist/cjs/bcm-old-input.cjs.entry.js +4 -4
  142. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +2 -2
  143. package/dist/cjs/bcm-overlay_2.cjs.entry.js +48 -0
  144. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +9 -8
  145. package/dist/cjs/bcm-popconfirm.cjs.entry.js +6 -5
  146. package/dist/cjs/bcm-popover.cjs.entry.js +92 -42
  147. package/dist/cjs/bcm-progress.cjs.entry.js +7 -6
  148. package/dist/cjs/bcm-radio-group.cjs.entry.js +93 -210
  149. package/dist/cjs/bcm-radio.cjs.entry.js +37 -78
  150. package/dist/cjs/bcm-range.cjs.entry.js +6 -5
  151. package/dist/cjs/bcm-result.cjs.entry.js +2 -2
  152. package/dist/cjs/bcm-search.cjs.entry.js +21 -14
  153. package/dist/cjs/bcm-select-group.cjs.entry.js +1 -1
  154. package/dist/cjs/bcm-select-option.cjs.entry.js +1 -1
  155. package/dist/cjs/bcm-select.cjs.entry.js +5 -5
  156. package/dist/cjs/bcm-skeleton.cjs.entry.js +10 -8
  157. package/dist/cjs/bcm-step.cjs.entry.js +6 -5
  158. package/dist/cjs/bcm-stepper.cjs.entry.js +42 -25
  159. package/dist/cjs/bcm-switch.cjs.entry.js +8 -7
  160. package/dist/cjs/bcm-tab-group.cjs.entry.js +158 -114
  161. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +87 -0
  162. package/dist/cjs/bcm-tab-item.cjs.entry.js +104 -0
  163. package/dist/cjs/bcm-tab-pane.cjs.entry.js +2 -2
  164. package/dist/cjs/bcm-tab.cjs.entry.js +3 -3
  165. package/dist/cjs/bcm-table.cjs.entry.js +2 -2
  166. package/dist/cjs/bcm-tabs-content.cjs.entry.js +2 -2
  167. package/dist/cjs/bcm-tabs.cjs.entry.js +2 -2
  168. package/dist/cjs/bcm-tag.cjs.entry.js +7 -6
  169. package/dist/cjs/bcm-text.cjs.entry.js +8 -7
  170. package/dist/cjs/bcm-textarea.cjs.entry.js +10 -8
  171. package/dist/cjs/bcm-time-picker.cjs.entry.js +5 -4
  172. package/dist/cjs/bcm-timeline-item.cjs.entry.js +2 -2
  173. package/dist/cjs/bcm-timeline.cjs.entry.js +2 -2
  174. package/dist/cjs/bcm-toast.cjs.entry.js +115 -0
  175. package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
  176. package/dist/cjs/bcm-typography.cjs.entry.js +35 -0
  177. package/dist/cjs/bromcom-ui.cjs.js +2 -2
  178. package/dist/cjs/{caption-template-1b6b0819.js → caption-template-8d099fd6.js} +1 -1
  179. package/dist/cjs/color-helper-d6d2028b.js +86 -0
  180. package/dist/cjs/{color-helper-d1cb7959.js → colors-e1d142ad.js} +4 -81
  181. package/dist/cjs/{floating-ui-ded9c11f.js → floating-ui-74eb26d6.js} +1 -1
  182. package/dist/cjs/{generate-24f01256.js → generate-d32dfcf9.js} +118 -16
  183. package/dist/cjs/{index-b6a28fdb.js → index-4506fcd7.js} +1 -1
  184. package/dist/cjs/{index-b4a2fb85.js → index-ddfd6d8f.js} +1 -1
  185. package/dist/cjs/input-template-272244eb.js +92 -0
  186. package/dist/cjs/{is-load-decorator-888172a8.js → is-load-decorator-137dded1.js} +1 -3
  187. package/dist/cjs/{json-parse-decarator-5049611b.js → json-parse-decarator-fe63bae0.js} +2 -2
  188. package/dist/cjs/{label-template-5d3d6f6c.js → label-template-cc69bc21.js} +3 -3
  189. package/dist/cjs/loader.cjs.js +2 -2
  190. package/dist/cjs/{number-helper-5829e9a9.js → number-helper-8286f839.js} +1 -1
  191. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +10 -9
  192. package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -4
  193. package/dist/cjs/{popover-placement-dd87671c.js → popover-placement-3c8f3a72.js} +1 -1
  194. package/dist/cjs/{slot-template-720b35b8.js → slot-template-3e59d7d8.js} +2 -2
  195. package/dist/cjs/{stepper-states-04642356.js → stepper-states-fd08aaf7.js} +3 -3
  196. package/dist/cjs/{string-helper-a54773f3.js → string-helper-45cffee0.js} +1 -1
  197. package/dist/cjs/tooltip-helper-ce53d70b.js +149 -0
  198. package/dist/cjs/{validators-07e09750.js → validators-53bfb47b.js} +1 -1
  199. package/dist/collection/collection-manifest.json +16 -5
  200. package/dist/collection/components/atoms/avatar/avatar.css +0 -250
  201. package/dist/collection/components/atoms/badge/badge.css +0 -250
  202. package/dist/collection/components/atoms/button/button.css +0 -250
  203. package/dist/collection/components/atoms/button/button.js +1 -1
  204. package/dist/collection/components/atoms/chip/chip.css +0 -250
  205. package/dist/collection/components/atoms/chip/chip.js +1 -1
  206. package/dist/collection/components/atoms/label/label.css +0 -250
  207. package/dist/collection/components/atoms/link/link.css +0 -250
  208. package/dist/collection/components/atoms/link/link.js +1 -1
  209. package/dist/collection/components/molecules/button-group/button-group.css +0 -250
  210. package/dist/collection/components/molecules/card/card.css +0 -250
  211. package/dist/collection/components/molecules/checkbox/checkbox.css +1 -750
  212. package/dist/collection/components/molecules/checkbox/checkbox.js +1 -1
  213. package/dist/collection/components/molecules/color-input/color-input.js +206 -0
  214. package/dist/collection/components/molecules/colorful/colorful.css +497 -0
  215. package/dist/collection/components/molecules/colorful/colorful.js +72 -0
  216. package/dist/collection/components/molecules/drawer/drawer.css +0 -250
  217. package/dist/collection/components/molecules/dropdown/dropdown.css +0 -250
  218. package/dist/collection/components/molecules/error-layout/error-layout.css +0 -250
  219. package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -250
  220. package/dist/collection/components/molecules/input/input.css +3 -752
  221. package/dist/collection/components/molecules/input/input.js +31 -3
  222. package/dist/collection/components/molecules/item/item.css +0 -250
  223. package/dist/collection/components/molecules/linked/linked.js +87 -31
  224. package/dist/collection/components/molecules/menu/menu.css +0 -250
  225. package/dist/collection/components/molecules/menu/menu.js +1 -1
  226. package/dist/collection/components/molecules/modal/modal.css +0 -250
  227. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -250
  228. package/dist/collection/components/molecules/popconfirm/popconfirm.js +1 -1
  229. package/dist/collection/components/molecules/popover/popover.js +117 -12
  230. package/dist/collection/components/molecules/progress/progress.css +0 -250
  231. package/dist/collection/components/molecules/radio/{group.js → radio-group.js} +185 -247
  232. package/dist/collection/components/molecules/radio/radio.js +42 -132
  233. package/dist/collection/components/molecules/range/range.css +0 -250
  234. package/dist/collection/components/molecules/search/search.css +3 -752
  235. package/dist/collection/components/molecules/search/search.js +21 -2
  236. package/dist/collection/components/molecules/skeleton/skeleton.js +8 -8
  237. package/dist/collection/components/molecules/states/search.states.js +12 -7
  238. package/dist/collection/components/molecules/stepper/stepper.css +0 -250
  239. package/dist/collection/components/molecules/stepper/stepper.js +33 -26
  240. package/dist/collection/components/molecules/switch/switch.css +0 -750
  241. package/dist/collection/components/molecules/switch/switch.js +1 -1
  242. package/dist/collection/components/molecules/tab-group/tab-group.js +177 -114
  243. package/dist/collection/components/molecules/tab-group/tab-item-header.js +186 -0
  244. package/dist/collection/components/molecules/tab-group/tab-item.js +161 -0
  245. package/dist/collection/components/molecules/textarea/textarea.css +3 -752
  246. package/dist/collection/components/molecules/textarea/textarea.js +2 -1
  247. package/dist/collection/components/molecules/tooltip/tooltip.js +143 -10
  248. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -750
  249. package/dist/collection/components/organism/datetime-picker/datetime-picker.js +1 -1
  250. package/dist/collection/components/organism/form/form.js +1 -1
  251. package/dist/collection/components/organism/list/list.css +1 -1000
  252. package/dist/collection/components/organism/list/list.js +21 -2
  253. package/dist/collection/components/other/attendance/attendance.css +0 -250
  254. package/dist/collection/components/other/attendance/attendance.js +1 -1
  255. package/dist/collection/components/other/input-custom/input-custom.js +249 -0
  256. package/dist/collection/components/other/modal-2/modal-2-footer.js +54 -0
  257. package/dist/collection/components/other/modal-2/modal-2-header.js +53 -0
  258. package/dist/collection/components/other/modal-2/modal-2.js +450 -0
  259. package/dist/collection/components/other/overlay/overlay.js +101 -0
  260. package/dist/collection/components/other/scroll-area/scroll-area.js +77 -0
  261. package/dist/collection/components/other/toast/toast.js +365 -0
  262. package/dist/collection/components/other_deprecated/old-input/old-input.css +0 -750
  263. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +0 -250
  264. package/dist/collection/components/other_deprecated/select/select.js +1 -1
  265. package/dist/collection/components/other_deprecated/tabs/tab.css +0 -250
  266. package/dist/collection/components/other_deprecated/text/text.css +0 -250
  267. package/dist/collection/decorators/is-load-decorator.js +0 -2
  268. package/dist/collection/global/components/_checkbox.css +1 -250
  269. package/dist/collection/global/helper/index.js +5 -0
  270. package/dist/collection/global/helper/index.ts +1 -0
  271. package/dist/collection/global/helper/toast.js +114 -0
  272. package/dist/collection/global/helper/toast.ts +136 -0
  273. package/dist/collection/helper/generate.js +120 -19
  274. package/dist/collection/helper/popover-helper.js +57 -29
  275. package/dist/collection/helper/tooltip-helper.js +69 -26
  276. package/dist/collection/models/bcm.js +1 -0
  277. package/dist/collection/stories/assets/button/1.svg +35 -0
  278. package/dist/collection/stories/assets/button/10.svg +24 -0
  279. package/dist/collection/stories/assets/button/11.svg +24 -0
  280. package/dist/collection/stories/assets/button/12.svg +24 -0
  281. package/dist/collection/stories/assets/button/2.svg +28 -0
  282. package/dist/collection/stories/assets/button/3.svg +41 -0
  283. package/dist/collection/stories/assets/button/4.svg +9 -0
  284. package/dist/collection/stories/assets/button/5.svg +65 -0
  285. package/dist/collection/stories/assets/button/6.svg +68 -0
  286. package/dist/collection/stories/assets/button/7.svg +203 -0
  287. package/dist/collection/stories/assets/button/8.svg +316 -0
  288. package/dist/collection/stories/assets/button/9.svg +9 -0
  289. package/dist/collection/templates/button-template.js +1 -1
  290. package/dist/collection/templates/input-template.js +30 -29
  291. package/dist/collection/templates/list-item-template.js +1 -1
  292. package/dist/collection/templates/list-template.js +10 -4
  293. package/dist/collection/templates/tag-template.js +1 -1
  294. package/dist/components/avatar.js +1 -1
  295. package/dist/components/badge.js +1 -1
  296. package/dist/components/bcm-attendance.js +2 -2
  297. package/dist/components/bcm-button-group.js +1 -1
  298. package/dist/components/bcm-card.js +1 -1
  299. package/dist/components/bcm-chip.js +2 -2
  300. package/dist/components/bcm-color-input.d.ts +11 -0
  301. package/dist/components/bcm-color-input.js +129 -0
  302. package/dist/components/bcm-colorful.d.ts +11 -0
  303. package/dist/components/bcm-colorful.js +10 -0
  304. package/dist/components/bcm-drawer.js +1 -1
  305. package/dist/components/bcm-dropdown.js +1 -1
  306. package/dist/components/bcm-error-layout.js +1 -1
  307. package/dist/components/bcm-expansion-panel.js +1 -1
  308. package/dist/components/bcm-form.js +1 -1
  309. package/dist/components/bcm-input-custom.d.ts +11 -0
  310. package/dist/components/bcm-input-custom.js +114 -0
  311. package/dist/components/bcm-input.js +1 -411
  312. package/dist/components/bcm-item.js +1 -1
  313. package/dist/components/bcm-list.js +18 -10
  314. package/dist/components/bcm-modal-2-footer.d.ts +11 -0
  315. package/dist/components/bcm-modal-2-footer.js +60 -0
  316. package/dist/components/bcm-modal-2-header.d.ts +11 -0
  317. package/dist/components/bcm-modal-2-header.js +59 -0
  318. package/dist/components/bcm-modal-2.d.ts +11 -0
  319. package/dist/components/bcm-modal-2.js +207 -0
  320. package/dist/components/bcm-modal.js +1 -1
  321. package/dist/components/bcm-overlay.d.ts +11 -0
  322. package/dist/components/bcm-overlay.js +10 -0
  323. package/dist/components/bcm-popconfirm.js +1 -1
  324. package/dist/components/bcm-popover.js +86 -33
  325. package/dist/components/bcm-progress.js +1 -1
  326. package/dist/components/bcm-radio-group.js +103 -228
  327. package/dist/components/bcm-range.js +1 -1
  328. package/dist/components/bcm-scroll-area.d.ts +11 -0
  329. package/dist/components/bcm-scroll-area.js +10 -0
  330. package/dist/components/bcm-select.js +1 -1
  331. package/dist/components/bcm-stepper.js +34 -26
  332. package/dist/components/bcm-switch.js +2 -2
  333. package/dist/components/bcm-tab-group.js +154 -112
  334. package/dist/components/bcm-tab-item-header.d.ts +11 -0
  335. package/dist/components/bcm-tab-item-header.js +102 -0
  336. package/dist/components/bcm-tab-item.d.ts +11 -0
  337. package/dist/components/bcm-tab-item.js +117 -0
  338. package/dist/components/bcm-tab.js +2 -2
  339. package/dist/components/bcm-tabs-content.js +1 -1
  340. package/dist/components/bcm-tabs.js +1 -1
  341. package/dist/components/bcm-tag.js +1 -1
  342. package/dist/components/bcm-textarea.js +3 -2
  343. package/dist/components/bcm-toast.d.ts +11 -0
  344. package/dist/components/bcm-toast.js +140 -0
  345. package/dist/components/bcm.js +1 -0
  346. package/dist/components/button.js +3 -3
  347. package/dist/components/checkbox-lite.js +1 -1
  348. package/dist/components/checkbox.js +2 -2
  349. package/dist/components/color-helper.js +8 -434
  350. package/dist/components/colorful.js +17768 -0
  351. package/dist/components/colors2.js +433 -0
  352. package/dist/components/datetime-picker.js +2 -2
  353. package/dist/components/generate.js +117 -16
  354. package/dist/components/index.d.ts +16 -5
  355. package/dist/components/index.js +11 -0
  356. package/dist/components/input-template.js +46 -53
  357. package/dist/components/input.js +457 -0
  358. package/dist/components/is-load-decorator.js +0 -2
  359. package/dist/components/label.js +1 -1
  360. package/dist/components/link.js +2 -2
  361. package/dist/components/linked.js +62 -29
  362. package/dist/components/menu.js +2 -2
  363. package/dist/components/old-input.js +1 -1
  364. package/dist/components/old-popover-box.js +1 -1
  365. package/dist/components/overlay.js +47 -0
  366. package/dist/components/popconfirm-box.js +1 -1
  367. package/dist/components/radio.js +38 -82
  368. package/dist/components/scroll-area.js +40 -0
  369. package/dist/components/search.js +13 -6
  370. package/dist/components/skeleton.js +5 -5
  371. package/dist/components/text.js +1 -1
  372. package/dist/components/tooltip-helper.js +68 -24
  373. package/dist/components/tooltip.js +35 -5
  374. package/dist/components/types.js +14 -27
  375. package/dist/components/types2.js +25 -25
  376. package/dist/components/types3.js +32 -0
  377. package/dist/esm/{bcm-b8d8a236.js → bcm-9f50af9c.js} +1 -0
  378. package/dist/esm/bcm-accordion.entry.js +5 -3
  379. package/dist/esm/bcm-alert.entry.js +7 -6
  380. package/dist/esm/bcm-attendance.entry.js +7 -5
  381. package/dist/esm/bcm-autocomplete.entry.js +2 -2
  382. package/dist/esm/bcm-avatar_2.entry.js +12 -11
  383. package/dist/esm/bcm-box.entry.js +2 -2
  384. package/dist/esm/bcm-breadcrumb.entry.js +4 -3
  385. package/dist/esm/bcm-button-group.entry.js +7 -6
  386. package/dist/esm/bcm-button_7.entry.js +1560 -0
  387. package/dist/esm/bcm-card.entry.js +9 -8
  388. package/dist/esm/bcm-checkbox-lite_9.entry.js +6 -5
  389. package/dist/esm/bcm-chip.entry.js +7 -6
  390. package/dist/esm/bcm-collapse-group.entry.js +2 -2
  391. package/dist/esm/bcm-collapse.entry.js +4 -3
  392. package/dist/esm/bcm-color-input.entry.js +72 -0
  393. package/dist/esm/bcm-colorful_2.entry.js +17966 -0
  394. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  395. package/dist/esm/bcm-date-picker.entry.js +5 -4
  396. package/dist/esm/bcm-datetime-picker.entry.js +11 -10
  397. package/dist/esm/bcm-default.entry.js +5 -3
  398. package/dist/esm/bcm-drawer.entry.js +10 -9
  399. package/dist/esm/bcm-dropdown.entry.js +7 -6
  400. package/dist/esm/bcm-error-layout.entry.js +3 -3
  401. package/dist/esm/bcm-expansion-panel.entry.js +8 -7
  402. package/dist/esm/bcm-form-2.entry.js +6 -5
  403. package/dist/esm/bcm-form-group.entry.js +2 -2
  404. package/dist/esm/bcm-input-custom.entry.js +69 -0
  405. package/dist/esm/bcm-input.entry.js +41 -12
  406. package/dist/esm/bcm-item.entry.js +7 -6
  407. package/dist/esm/bcm-items.entry.js +6 -5
  408. package/dist/esm/bcm-link.entry.js +5 -5
  409. package/dist/esm/bcm-list.entry.js +33 -25
  410. package/dist/esm/bcm-menu.entry.js +134 -0
  411. package/dist/esm/bcm-message.entry.js +2 -2
  412. package/dist/esm/bcm-modal-2-footer.entry.js +46 -0
  413. package/dist/esm/bcm-modal-2-header.entry.js +45 -0
  414. package/dist/esm/bcm-modal-2.entry.js +168 -0
  415. package/dist/esm/bcm-modal.entry.js +8 -7
  416. package/dist/esm/bcm-notification.entry.js +2 -2
  417. package/dist/esm/bcm-old-input.entry.js +4 -4
  418. package/dist/esm/bcm-old-tag_2.entry.js +2 -2
  419. package/dist/esm/bcm-overlay_2.entry.js +43 -0
  420. package/dist/esm/bcm-popconfirm-box.entry.js +9 -8
  421. package/dist/esm/bcm-popconfirm.entry.js +6 -5
  422. package/dist/esm/bcm-popover.entry.js +92 -42
  423. package/dist/esm/bcm-progress.entry.js +7 -6
  424. package/dist/esm/bcm-radio-group.entry.js +89 -206
  425. package/dist/esm/bcm-radio.entry.js +36 -77
  426. package/dist/esm/bcm-range.entry.js +6 -5
  427. package/dist/esm/bcm-result.entry.js +2 -2
  428. package/dist/esm/bcm-search.entry.js +21 -14
  429. package/dist/esm/bcm-select-group.entry.js +1 -1
  430. package/dist/esm/bcm-select-option.entry.js +1 -1
  431. package/dist/esm/bcm-select.entry.js +5 -5
  432. package/dist/esm/bcm-skeleton.entry.js +10 -8
  433. package/dist/esm/bcm-step.entry.js +6 -5
  434. package/dist/esm/bcm-stepper.entry.js +40 -23
  435. package/dist/esm/bcm-switch.entry.js +8 -7
  436. package/dist/esm/bcm-tab-group.entry.js +156 -112
  437. package/dist/esm/bcm-tab-item-header.entry.js +83 -0
  438. package/dist/esm/bcm-tab-item.entry.js +100 -0
  439. package/dist/esm/bcm-tab-pane.entry.js +2 -2
  440. package/dist/esm/bcm-tab.entry.js +3 -3
  441. package/dist/esm/bcm-table.entry.js +2 -2
  442. package/dist/esm/bcm-tabs-content.entry.js +2 -2
  443. package/dist/esm/bcm-tabs.entry.js +2 -2
  444. package/dist/esm/bcm-tag.entry.js +7 -6
  445. package/dist/esm/bcm-text.entry.js +8 -7
  446. package/dist/esm/bcm-textarea.entry.js +10 -8
  447. package/dist/esm/bcm-time-picker.entry.js +5 -4
  448. package/dist/esm/bcm-timeline-item.entry.js +2 -2
  449. package/dist/esm/bcm-timeline.entry.js +2 -2
  450. package/dist/esm/bcm-toast.entry.js +111 -0
  451. package/dist/esm/bcm-treeview-group.entry.js +1 -1
  452. package/dist/esm/bcm-typography.entry.js +31 -0
  453. package/dist/esm/bromcom-ui.js +3 -3
  454. package/dist/esm/{caption-template-ced0e2ef.js → caption-template-da16ba7b.js} +1 -1
  455. package/dist/esm/color-helper-e8ce23d7.js +84 -0
  456. package/dist/esm/{color-helper-cb1cfc1e.js → colors-44c95e7e.js} +4 -81
  457. package/dist/esm/{floating-ui-54c1f339.js → floating-ui-e7341329.js} +1 -1
  458. package/dist/esm/{generate-ffcc7e3a.js → generate-c1a5001c.js} +118 -16
  459. package/dist/esm/{index-85cce099.js → index-39133086.js} +1 -1
  460. package/dist/esm/{index-0f68d8f0.js → index-93e36fdb.js} +1 -1
  461. package/dist/esm/input-template-61daf88f.js +90 -0
  462. package/dist/esm/{is-load-decorator-87c09179.js → is-load-decorator-bc14ec4b.js} +1 -3
  463. package/dist/esm/{json-parse-decarator-64166384.js → json-parse-decarator-f6c2451e.js} +2 -2
  464. package/dist/esm/{label-template-4f474794.js → label-template-d74fe788.js} +3 -3
  465. package/dist/esm/loader.js +3 -3
  466. package/dist/esm/{number-helper-8e72bacd.js → number-helper-72dfe745.js} +1 -1
  467. package/dist/esm/old-bcm-popover-box.entry.js +10 -9
  468. package/dist/esm/old-bcm-popover.entry.js +5 -4
  469. package/dist/esm/{popover-placement-0e158c8b.js → popover-placement-78f86f15.js} +1 -1
  470. package/dist/esm/{slot-template-97e4665e.js → slot-template-5b2db362.js} +2 -2
  471. package/dist/esm/{stepper-states-96090572.js → stepper-states-7876bdf9.js} +3 -3
  472. package/dist/esm/{string-helper-8793366d.js → string-helper-6bd24967.js} +1 -1
  473. package/dist/esm/tooltip-helper-45e5fc94.js +147 -0
  474. package/dist/esm/{validators-c7341d67.js → validators-5197f61b.js} +1 -1
  475. package/dist/types/components/molecules/color-input/color-input.d.ts +20 -0
  476. package/dist/types/components/molecules/colorful/colorful.d.ts +8 -0
  477. package/dist/types/components/molecules/input/input.d.ts +4 -1
  478. package/dist/types/components/molecules/linked/linked.d.ts +10 -3
  479. package/dist/types/components/molecules/popover/popover.d.ts +12 -3
  480. package/dist/types/components/molecules/radio/{group.d.ts → radio-group.d.ts} +22 -27
  481. package/dist/types/components/molecules/radio/radio.d.ts +5 -11
  482. package/dist/types/components/molecules/search/search.d.ts +1 -0
  483. package/dist/types/components/molecules/skeleton/skeleton.d.ts +1 -1
  484. package/dist/types/components/molecules/states/search.states.d.ts +1 -1
  485. package/dist/types/components/molecules/stepper/stepper.d.ts +2 -2
  486. package/dist/types/components/molecules/tab-group/tab-group.d.ts +15 -6
  487. package/dist/types/components/molecules/tab-group/tab-item-header.d.ts +13 -0
  488. package/dist/types/components/molecules/tab-group/tab-item.d.ts +17 -0
  489. package/dist/types/components/molecules/textarea/textarea.d.ts +1 -1
  490. package/dist/types/components/molecules/tooltip/tooltip.d.ts +13 -3
  491. package/dist/types/components/organism/list/list.d.ts +1 -0
  492. package/dist/types/components/other/input-custom/input-custom.d.ts +20 -0
  493. package/dist/types/components/other/modal-2/modal-2-footer.d.ts +7 -0
  494. package/dist/types/components/other/modal-2/modal-2-header.d.ts +7 -0
  495. package/dist/types/components/other/modal-2/modal-2.d.ts +33 -0
  496. package/dist/types/components/other/overlay/overlay.d.ts +8 -0
  497. package/dist/types/components/other/scroll-area/scroll-area.d.ts +7 -0
  498. package/dist/types/components/other/toast/toast.d.ts +25 -0
  499. package/dist/types/components.d.ts +339 -41
  500. package/dist/types/global/helper/index.d.ts +1 -0
  501. package/dist/types/global/helper/toast.d.ts +96 -0
  502. package/dist/types/helper/generate.d.ts +3 -0
  503. package/dist/types/helper/popover-helper.d.ts +13 -3
  504. package/dist/types/helper/tooltip-helper.d.ts +16 -3
  505. package/dist/types/index.d.ts +1 -1
  506. package/dist/types/models/bcm.d.ts +2 -1
  507. package/dist/types/templates/input-template.d.ts +5 -3
  508. package/dist/types/templates/list-template.d.ts +1 -0
  509. package/helper/index.d.ts +2 -0
  510. package/helper/index.d.ts.map +1 -0
  511. package/helper/index.js +17 -0
  512. package/helper/toast.d.ts +97 -0
  513. package/helper/toast.d.ts.map +1 -0
  514. package/helper/toast.js +115 -0
  515. package/package.json +30 -19
  516. package/dist/bromcom-ui/p-0a9b2124.entry.js +0 -5
  517. package/dist/bromcom-ui/p-0e3e135f.entry.js +0 -5
  518. package/dist/bromcom-ui/p-0e77d1f3.entry.js +0 -5
  519. package/dist/bromcom-ui/p-0f9c9047.entry.js +0 -5
  520. package/dist/bromcom-ui/p-12da638d.entry.js +0 -5
  521. package/dist/bromcom-ui/p-14b1b4b2.entry.js +0 -5
  522. package/dist/bromcom-ui/p-1845582b.entry.js +0 -5
  523. package/dist/bromcom-ui/p-1c09af4f.js +0 -5
  524. package/dist/bromcom-ui/p-1de5af32.entry.js +0 -5
  525. package/dist/bromcom-ui/p-1f4d9b1f.entry.js +0 -5
  526. package/dist/bromcom-ui/p-231bff46.entry.js +0 -5
  527. package/dist/bromcom-ui/p-251629c7.entry.js +0 -5
  528. package/dist/bromcom-ui/p-38dc893a.entry.js +0 -5
  529. package/dist/bromcom-ui/p-3edd3360.js +0 -5
  530. package/dist/bromcom-ui/p-400ec1f7.entry.js +0 -5
  531. package/dist/bromcom-ui/p-4067c2e0.entry.js +0 -5
  532. package/dist/bromcom-ui/p-421cd232.js +0 -5
  533. package/dist/bromcom-ui/p-4260a393.entry.js +0 -5
  534. package/dist/bromcom-ui/p-44236a8b.entry.js +0 -5
  535. package/dist/bromcom-ui/p-46a546fb.entry.js +0 -5
  536. package/dist/bromcom-ui/p-4a9005ec.entry.js +0 -5
  537. package/dist/bromcom-ui/p-529c955c.js +0 -5
  538. package/dist/bromcom-ui/p-5546b28e.entry.js +0 -5
  539. package/dist/bromcom-ui/p-596611eb.entry.js +0 -5
  540. package/dist/bromcom-ui/p-63f90701.entry.js +0 -5
  541. package/dist/bromcom-ui/p-65c4ae21.entry.js +0 -5
  542. package/dist/bromcom-ui/p-685b892c.js +0 -5
  543. package/dist/bromcom-ui/p-6b748546.entry.js +0 -5
  544. package/dist/bromcom-ui/p-724f5a0b.entry.js +0 -5
  545. package/dist/bromcom-ui/p-78d82111.js +0 -5
  546. package/dist/bromcom-ui/p-7d3ed6cb.entry.js +0 -5
  547. package/dist/bromcom-ui/p-7dabd101.entry.js +0 -5
  548. package/dist/bromcom-ui/p-81b62ce8.entry.js +0 -5
  549. package/dist/bromcom-ui/p-88062515.entry.js +0 -5
  550. package/dist/bromcom-ui/p-961cab35.entry.js +0 -5
  551. package/dist/bromcom-ui/p-9aa699c1.entry.js +0 -5
  552. package/dist/bromcom-ui/p-9f95f24f.entry.js +0 -5
  553. package/dist/bromcom-ui/p-a051162a.entry.js +0 -5
  554. package/dist/bromcom-ui/p-a35fc9d4.entry.js +0 -5
  555. package/dist/bromcom-ui/p-b4a3871f.entry.js +0 -5
  556. package/dist/bromcom-ui/p-bb7760d7.entry.js +0 -5
  557. package/dist/bromcom-ui/p-bdeb220d.entry.js +0 -5
  558. package/dist/bromcom-ui/p-c09a1784.entry.js +0 -5
  559. package/dist/bromcom-ui/p-c0ba4ab5.entry.js +0 -5
  560. package/dist/bromcom-ui/p-c12555c7.entry.js +0 -5
  561. package/dist/bromcom-ui/p-c7bfb126.js +0 -5
  562. package/dist/bromcom-ui/p-d0bfb53b.entry.js +0 -5
  563. package/dist/bromcom-ui/p-d68d4ce0.entry.js +0 -5
  564. package/dist/bromcom-ui/p-d7f06284.entry.js +0 -5
  565. package/dist/bromcom-ui/p-dd1c6c24.entry.js +0 -5
  566. package/dist/bromcom-ui/p-e1a323b8.entry.js +0 -5
  567. package/dist/bromcom-ui/p-e5724ed4.entry.js +0 -5
  568. package/dist/bromcom-ui/p-e5fee9dc.entry.js +0 -5
  569. package/dist/bromcom-ui/p-e8359a46.entry.js +0 -5
  570. package/dist/bromcom-ui/p-e8436609.entry.js +0 -5
  571. package/dist/bromcom-ui/p-eb0ab3d9.entry.js +0 -5
  572. package/dist/bromcom-ui/p-f8864d6e.entry.js +0 -5
  573. package/dist/bromcom-ui/p-f8b43cb2.entry.js +0 -5
  574. package/dist/bromcom-ui/p-f8eb60b6.entry.js +0 -5
  575. package/dist/bromcom-ui/p-ffdc7a09.entry.js +0 -5
  576. package/dist/cjs/bcm-button.cjs.entry.js +0 -384
  577. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -415
  578. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -205
  579. package/dist/cjs/bcm-form.cjs.entry.js +0 -487
  580. package/dist/cjs/bcm-icon.cjs.entry.js +0 -41
  581. package/dist/cjs/bcm-label_2.cjs.entry.js +0 -122
  582. package/dist/cjs/bcm-linked_2.cjs.entry.js +0 -308
  583. package/dist/cjs/input-template-657a8fc1.js +0 -86
  584. package/dist/cjs/tooltip-helper-6c8bfde7.js +0 -105
  585. package/dist/collection/components/molecules/radio/group.css +0 -798
  586. package/dist/collection/components/molecules/radio/radio.css +0 -1280
  587. package/dist/collection/components/molecules/radio/types.js +0 -30
  588. package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
  589. package/dist/esm/bcm-button.entry.js +0 -380
  590. package/dist/esm/bcm-checkbox-group.entry.js +0 -411
  591. package/dist/esm/bcm-checkbox_2.entry.js +0 -200
  592. package/dist/esm/bcm-form.entry.js +0 -483
  593. package/dist/esm/bcm-icon.entry.js +0 -37
  594. package/dist/esm/bcm-label_2.entry.js +0 -117
  595. package/dist/esm/bcm-linked_2.entry.js +0 -303
  596. package/dist/esm/input-template-7aaafa99.js +0 -84
  597. package/dist/esm/tooltip-helper-f58d482d.js +0 -103
  598. package/dist/types/components/molecules/radio/types.d.ts +0 -29
  599. package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
  600. /package/dist/bromcom-ui/{p-5fd7a8b6.js → p-2e73d572.js} +0 -0
  601. /package/dist/cjs/{types-6eb7e028.js → types-7523fd99.js} +0 -0
  602. /package/dist/collection/components/{atoms → other}/box/box.js +0 -0
  603. /package/dist/collection/components/{atoms → other}/typography/typography.js +0 -0
  604. /package/dist/collection/components/{organism → other_deprecated}/colorpicker/colorpicker.css +0 -0
  605. /package/dist/collection/components/{organism → other_deprecated}/colorpicker/colorpicker.js +0 -0
  606. /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/chess.png +0 -0
  607. /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/color.svg +0 -0
  608. /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/colors.svg +0 -0
  609. /package/dist/collection/components/{atoms → other_deprecated}/tag/tag.js +0 -0
  610. /package/dist/collection/components/{atoms → other_deprecated}/tag/types.js +0 -0
  611. /package/dist/esm/{types-bfc3bba1.js → types-9493a7ed.js} +0 -0
  612. /package/dist/types/components/{atoms → other}/box/box.d.ts +0 -0
  613. /package/dist/types/components/{atoms → other}/typography/typography.d.ts +0 -0
  614. /package/dist/types/components/{organism → other_deprecated}/colorpicker/colorpicker.d.ts +0 -0
  615. /package/dist/types/components/{atoms → other_deprecated}/tag/tag.d.ts +0 -0
  616. /package/dist/types/components/{atoms → other_deprecated}/tag/types.d.ts +0 -0
@@ -0,0 +1,1560 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-39133086.js';
6
+ import { s as snq, G as Generate } from './generate-c1a5001c.js';
7
+ import { B as Bcm, a as Bcm$1 } from './bcm-9f50af9c.js';
8
+ import { c as classnames } from './index-ed9652af.js';
9
+ import { c as createStore } from './index-93e36fdb.js';
10
+ import { S as SlotTemplate } from './slot-template-5b2db362.js';
11
+ import { C as ColorHelper } from './color-helper-e8ce23d7.js';
12
+ import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
13
+ import { C as CaptionTemplate } from './caption-template-da16ba7b.js';
14
+ import { d as delay, g as getChildElements } from './utils-57652744.js';
15
+ import { L as LabelTemplate } from './label-template-d74fe788.js';
16
+ import { S as StringHelper } from './string-helper-6bd24967.js';
17
+ import './datetime-helper-df25808a.js';
18
+ import './number-helper-72dfe745.js';
19
+ import './validators-5197f61b.js';
20
+ import { T as Tooltip } from './tooltip-helper-45e5fc94.js';
21
+ import './element-dragger-89bb52fd.js';
22
+ import './colors-44c95e7e.js';
23
+ import './_commonjsHelpers-3016b722.js';
24
+ import './colors-1d7854ea.js';
25
+ import './floating-ui-e7341329.js';
26
+
27
+ const variantOptions = {
28
+ save: {
29
+ text: 'Save',
30
+ color: 'emerald',
31
+ icon: 'far fa-save',
32
+ iconPosition: 'prefix',
33
+ },
34
+ ok: {
35
+ text: 'Ok',
36
+ color: 'emerald',
37
+ icon: 'far fa-check',
38
+ iconPosition: 'prefix',
39
+ },
40
+ new: {
41
+ text: 'New',
42
+ color: 'emerald',
43
+ icon: 'far fa-plus',
44
+ iconPosition: 'prefix',
45
+ },
46
+ add: {
47
+ text: 'Add',
48
+ color: 'emerald',
49
+ icon: 'far fa-plus',
50
+ iconPosition: 'prefix',
51
+ },
52
+ create: {
53
+ text: 'Create',
54
+ color: 'emerald',
55
+ icon: 'far fa-plus',
56
+ iconPosition: 'prefix',
57
+ },
58
+ prev: {
59
+ text: 'Prev',
60
+ color: '',
61
+ icon: 'far fa-arrow-left',
62
+ iconPosition: 'prefix',
63
+ },
64
+ next: {
65
+ text: 'Next',
66
+ color: '',
67
+ icon: 'far fa-arrow-right',
68
+ iconPosition: 'suffix',
69
+ },
70
+ apply: {
71
+ text: 'Apply',
72
+ color: '',
73
+ icon: 'far fa-check-circle',
74
+ iconPosition: 'prefix',
75
+ },
76
+ submit: {
77
+ text: 'Submit',
78
+ color: '',
79
+ icon: 'far fa-save',
80
+ iconPosition: 'prefix',
81
+ },
82
+ send: {
83
+ text: 'Send',
84
+ color: 'emerald',
85
+ icon: 'far fa-paper-plane',
86
+ iconPosition: 'prefix',
87
+ },
88
+ delete: {
89
+ text: 'Delete',
90
+ color: 'red',
91
+ icon: 'far fa-trash',
92
+ iconPosition: 'prefix',
93
+ },
94
+ cancel: {
95
+ text: 'Cancel',
96
+ color: 'red',
97
+ icon: 'far fa-times',
98
+ iconPosition: 'prefix',
99
+ },
100
+ decline: {
101
+ text: 'Decline',
102
+ color: 'red',
103
+ icon: 'far fa-ban',
104
+ iconPosition: 'prefix',
105
+ },
106
+ close: {
107
+ text: 'Close',
108
+ color: 'red',
109
+ icon: 'far fa-times-circle',
110
+ iconPosition: 'prefix',
111
+ },
112
+ archive: {
113
+ text: 'Archive',
114
+ color: 'red',
115
+ icon: 'far fa-folder-open',
116
+ iconPosition: 'prefix',
117
+ },
118
+ remove: {
119
+ text: 'Remove',
120
+ color: 'red',
121
+ icon: 'far fa-minus-circle',
122
+ iconPosition: 'prefix',
123
+ },
124
+ edit: {
125
+ text: 'Edit',
126
+ color: '',
127
+ icon: 'far fa-edit',
128
+ iconPosition: 'prefix',
129
+ },
130
+ export: {
131
+ text: 'Export',
132
+ color: '',
133
+ icon: 'far fa-sign-out',
134
+ iconPosition: 'prefix',
135
+ },
136
+ import: {
137
+ text: 'Import',
138
+ color: '',
139
+ icon: 'far fa-sign-in',
140
+ iconPosition: 'prefix',
141
+ },
142
+ filter: {
143
+ text: 'Filter',
144
+ color: '',
145
+ icon: 'far fa-filter',
146
+ iconPosition: 'prefix',
147
+ },
148
+ update: {
149
+ text: 'Update',
150
+ color: '',
151
+ icon: 'far fa-sync',
152
+ iconPosition: 'prefix',
153
+ },
154
+ reset: {
155
+ text: "Reset",
156
+ color: "",
157
+ icon: 'far fa-sync',
158
+ iconPosition: "prefix",
159
+ },
160
+ download: {
161
+ text: 'Download',
162
+ color: '',
163
+ icon: 'far fa-download',
164
+ iconPosition: 'prefix',
165
+ },
166
+ };
167
+ var VariantProps;
168
+ (function (VariantProps) {
169
+ VariantProps["save"] = "save";
170
+ VariantProps["submit"] = "submit";
171
+ VariantProps["ok"] = "ok";
172
+ VariantProps["new"] = "new";
173
+ VariantProps["add"] = "add";
174
+ VariantProps["create"] = "create";
175
+ VariantProps["apply"] = "apply";
176
+ VariantProps["prev"] = "prev";
177
+ VariantProps["next"] = "next";
178
+ VariantProps["send"] = "send";
179
+ VariantProps["delete"] = "delete";
180
+ VariantProps["cancel"] = "cancel";
181
+ VariantProps["decline"] = "decline";
182
+ VariantProps["close"] = "close";
183
+ VariantProps["archive"] = "archive";
184
+ VariantProps["remove"] = "remove";
185
+ VariantProps["edit"] = "edit";
186
+ VariantProps["export"] = "export";
187
+ VariantProps["import"] = "import";
188
+ VariantProps["filter"] = "filter";
189
+ VariantProps["update"] = "update";
190
+ VariantProps["reset"] = "Reset";
191
+ VariantProps["download"] = "download";
192
+ })(VariantProps || (VariantProps = {}));
193
+
194
+ const { state: state$1 } = createStore({
195
+ value: new Map(),
196
+ setData: {},
197
+ removeData: {}
198
+ });
199
+ const setValue$1 = (val) => {
200
+ const data = Object.assign(Object.assign({}, val), (variantOptions[val.variant] && {
201
+ icon: variantOptions[val.variant].icon,
202
+ value: variantOptions[val.variant].text,
203
+ iconPosition: Bcm.IconPosition[variantOptions[val.variant].iconPosition],
204
+ variantColor: variantOptions[val.variant].color
205
+ }));
206
+ state$1.value.set(data.id, data);
207
+ };
208
+ const removeValue = (_id) => {
209
+ state$1.value.delete(_id);
210
+ };
211
+ const getValue$1 = (id) => snq(() => state$1.value.get(id), {});
212
+ const buttonState = {
213
+ setValue: setValue$1,
214
+ removeValue,
215
+ getValue: getValue$1
216
+ };
217
+
218
+ const ButtonTemplate = ({ value, type, componentClass, disabled, href, target, loading, isIconOnly, icon, iconPosition, id }) => {
219
+ const ButtonTagType = (href) ? Bcm.HtmlElementType.a : Bcm.HtmlElementType.button;
220
+ return (h(ButtonTagType, Object.assign({ id: id }, (type == Bcm.HtmlElementType.button && { type }), { class: componentClass, disabled: disabled, href: href, target: target, tabindex: "0" }),
221
+ h("span", { hidden: true },
222
+ h("slot", null)),
223
+ loading && h("span", { class: "bcm-button__container-loading" },
224
+ " ",
225
+ h("span", { class: "bcm-button__container-icon" },
226
+ h("i", { class: "far fa-spinner-third fa-spin" }),
227
+ " ")),
228
+ icon && h("span", { class: `${iconPosition} bcm-button__container-icon` },
229
+ h("i", { class: `${icon}` })),
230
+ !isIconOnly && (h(SlotTemplate, { className: "bcm-button__container-text", value: value })),
231
+ h("slot", { name: "suffix" })));
232
+ };
233
+
234
+ 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)}";
235
+
236
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
237
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
238
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
239
+ r = Reflect.decorate(decorators, target, key, desc);
240
+ else
241
+ for (var i = decorators.length - 1; i >= 0; i--)
242
+ if (d = decorators[i])
243
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
244
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
245
+ };
246
+ const BcmButton = class {
247
+ constructor(hostRef) {
248
+ registerInstance(this, hostRef);
249
+ this.bcmClick = createEvent(this, "bcm-click", 7);
250
+ this._id = Generate.UID();
251
+ this.hidden = false;
252
+ this.type = Bcm.ButtonType.button;
253
+ this.size = Bcm.Size.medium;
254
+ this.disabled = false;
255
+ this.kind = Bcm.Kind.solid;
256
+ this.outline = false;
257
+ this.icon = undefined;
258
+ this.href = undefined;
259
+ this.target = undefined;
260
+ this.value = undefined;
261
+ this.loading = false;
262
+ this.variant = undefined;
263
+ this.dataDismiss = false;
264
+ this.fullWidth = false;
265
+ this.iconPosition = Bcm.IconPosition.prefix;
266
+ this.color = undefined;
267
+ this.checked = false;
268
+ }
269
+ handleOnClick(e) {
270
+ if (this.disabled) {
271
+ e.preventDefault();
272
+ e.stopPropagation();
273
+ return false;
274
+ }
275
+ }
276
+ componentWillRender() {
277
+ const { size, kind, icon, iconPosition, disabled, outline, href, type, target, loading, variant, fullWidth, hidden, value } = this;
278
+ buttonState.setValue({
279
+ id: this._id,
280
+ size,
281
+ type,
282
+ kind,
283
+ icon,
284
+ iconPosition,
285
+ disabled,
286
+ outline,
287
+ href,
288
+ target,
289
+ loading,
290
+ variant,
291
+ fullWidth,
292
+ hidden,
293
+ value,
294
+ isIconOnly: !!(this.isHaveChildNodes() && this.icon),
295
+ });
296
+ }
297
+ getStateData() {
298
+ return buttonState.getValue(this._id);
299
+ }
300
+ isHaveChildNodes() {
301
+ const childNodes = Array.from(this.el.childNodes);
302
+ return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
303
+ }
304
+ setColor(color = this.color) {
305
+ if (!color)
306
+ return;
307
+ const { kind } = this;
308
+ const prefix = `--bcm-button-${kind}`;
309
+ if (kind === 'solid') {
310
+ return {
311
+ [`${prefix}-color-default`]: ColorHelper.dsColor('white'),
312
+ [`${prefix}-color-hover`]: ColorHelper.dsColor('white'),
313
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor('white'),
314
+ [`${prefix}-color-active`]: ColorHelper.dsColor('white'),
315
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
316
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-500'),
317
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-600'),
318
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-700'),
319
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-800'),
320
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
321
+ [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-500'),
322
+ [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-600'),
323
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-700'),
324
+ [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-800'),
325
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor('slate-400')
326
+ };
327
+ }
328
+ else if (kind == 'link') {
329
+ return {
330
+ [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-500'),
331
+ [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
332
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
333
+ [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-700'),
334
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor('slate-400'),
335
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor('transparent'),
336
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor('transparent'),
337
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
338
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor('slate-50'),
339
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('transparent'),
340
+ [`${prefix}-border-default`]: ColorHelper.dsColor('transparent'),
341
+ [`${prefix}-border-hover`]: ColorHelper.dsColor('transparent'),
342
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor('slate-50'),
343
+ [`${prefix}-border-active`]: ColorHelper.dsColor('slate-50'),
344
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor('transparent')
345
+ };
346
+ }
347
+ else if (kind == 'ghost') {
348
+ return {
349
+ [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-600'),
350
+ [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
351
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-600'),
352
+ [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-600'),
353
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor(color + '-300'),
354
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-100'),
355
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-200'),
356
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-400'),
357
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-300'),
358
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor(color + '-50'),
359
+ [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-300'),
360
+ [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-400'),
361
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-600'),
362
+ [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-500'),
363
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor(color + '-200'),
364
+ };
365
+ }
366
+ return;
367
+ }
368
+ render() {
369
+ const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
370
+ const classPrefix = 'bcm-button';
371
+ let componentClass = classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
372
+ 'full-width': fullWidth,
373
+ 'checked': this.checked,
374
+ 'disabled': disabled,
375
+ });
376
+ const hostClasses = classnames(`${classPrefix}`, {
377
+ hidden,
378
+ 'full-width': fullWidth,
379
+ });
380
+ 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 })));
381
+ }
382
+ get el() { return getElement(this); }
383
+ };
384
+ __decorate$6([
385
+ IsLoad()
386
+ ], BcmButton.prototype, "el", void 0);
387
+ BcmButton.style = buttonCss;
388
+
389
+ const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}";
390
+
391
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
392
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
393
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
394
+ r = Reflect.decorate(decorators, target, key, desc);
395
+ else
396
+ for (var i = decorators.length - 1; i >= 0; i--)
397
+ if (d = decorators[i])
398
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
399
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
400
+ };
401
+ const BcmCheckbox = class {
402
+ constructor(hostRef) {
403
+ registerInstance(this, hostRef);
404
+ this.blur = createEvent(this, "bcm-blur", 7);
405
+ this.focus = createEvent(this, "bcm-focus", 7);
406
+ this.change = createEvent(this, "bcm-change", 7);
407
+ this.changeCheckbox = createEvent(this, "bcm-change-checkbox", 7);
408
+ this._id = Generate.UID();
409
+ this.inGroup = false;
410
+ this.value = false;
411
+ this.checked = false;
412
+ this.name = undefined;
413
+ this.disabled = false;
414
+ this.hidden = false;
415
+ this.required = false;
416
+ this.label = undefined;
417
+ this.readonly = false;
418
+ this.size = Bcm.Size.medium;
419
+ this.indeterminate = null;
420
+ this.color = "blue";
421
+ this.caption = undefined;
422
+ this.noCaption = false;
423
+ this.captionError = undefined;
424
+ this.captionType = Bcm.Status.default;
425
+ this.captionCache = undefined;
426
+ this.captionTypeCache = undefined;
427
+ }
428
+ connectedCallback() {
429
+ this.captionCache = this.caption;
430
+ this.captionTypeCache = this.captionType;
431
+ this.value = this.checked;
432
+ }
433
+ componentDidRender() {
434
+ this.inputElement.checked = this.checked;
435
+ }
436
+ async onBcmFocus() {
437
+ this.el.focus();
438
+ }
439
+ async onBcmBlur() {
440
+ this.el.blur();
441
+ }
442
+ async setClear() {
443
+ this.check(false);
444
+ this.handleChange();
445
+ await delay(10);
446
+ return Promise.resolve();
447
+ }
448
+ async resetCaption() {
449
+ await delay(10);
450
+ this.caption = this.captionCache;
451
+ this.captionType = this.captionTypeCache;
452
+ this.captionError = null;
453
+ await delay(10);
454
+ return Promise.resolve();
455
+ }
456
+ handleChange() {
457
+ this.checked = this.inputElement.checked;
458
+ this.value = this.checked;
459
+ if (!this.indeterminate) {
460
+ this.changeCheckbox.emit();
461
+ this.change.emit({
462
+ name: this.name,
463
+ value: this.checked
464
+ });
465
+ }
466
+ }
467
+ watchIndeterminate(newValue, oldValue) {
468
+ if (newValue != oldValue) {
469
+ this.inputElement.checked = this.indeterminate == Bcm.IndeterminateType.determinate ? true : false;
470
+ this.handleChange();
471
+ }
472
+ }
473
+ async set(data) {
474
+ if (typeof data === 'boolean') {
475
+ await this.check(data);
476
+ }
477
+ }
478
+ async get() {
479
+ return this.checked || false;
480
+ }
481
+ async check(uncheck = true) {
482
+ this.inputElement.checked = uncheck;
483
+ this.handleChange();
484
+ }
485
+ handleKeyUp(ev) {
486
+ if (ev.keyCode == Bcm.KeyCode.space || ev.keyCode == Bcm.KeyCode.enter) {
487
+ if (!this.disabled && !this.readonly) {
488
+ this.inputElement.checked = !this.inputElement.checked;
489
+ this.handleChange();
490
+ }
491
+ ev.stopPropagation();
492
+ ev.preventDefault();
493
+ return false;
494
+ }
495
+ }
496
+ watchChecked() {
497
+ if (this.checked) {
498
+ this.resetCaption();
499
+ }
500
+ this.value = this.checked;
501
+ }
502
+ setColor(color = this.color) {
503
+ if (!color)
504
+ return;
505
+ const prefix = `--bcm-checkbox`;
506
+ return {
507
+ [`${prefix}-primary-color-default`]: ColorHelper.dsColor(color + '-500'),
508
+ [`${prefix}-primary-color-hover`]: ColorHelper.dsColor(color + '-600'),
509
+ [`${prefix}-primary-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
510
+ [`${prefix}-primary-color-active`]: ColorHelper.dsColor(color + '-700'),
511
+ // [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
512
+ [`${prefix}-secondary-color-default`]: ColorHelper.dsColor('white'),
513
+ [`${prefix}-secondary-color-hover`]: ColorHelper.dsColor('slate-50'),
514
+ [`${prefix}-secondary-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
515
+ [`${prefix}-secondary-color-active`]: ColorHelper.dsColor('slate-50'),
516
+ // [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
517
+ };
518
+ }
519
+ render() {
520
+ const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
521
+ //////
522
+ const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
523
+ 'error': captionType == Bcm.Status.error,
524
+ hidden,
525
+ checked,
526
+ disabled,
527
+ required,
528
+ readonly,
529
+ });
530
+ const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
531
+ 'bcm-checkbox__label-icon-checked': checked,
532
+ });
533
+ const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
534
+ const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
535
+ return (h(Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), style: this.setColor(this.color), class: bcmCheckboxClass, disabled: disabled }, h("span", { hidden: true }, h("slot", null)), label && h("bcm-label", { htmlFor: `input-${_id}`, type: captionType, value: label, required: required }), h("div", { class: bcmCheckboxInputClass }, h("input", { id: `input-${_id}`, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly, onChange: () => { !disabled && !readonly && (this.handleChange()); }, ref: el => (this.inputElement = el) }), h("label", { class: bcmCheckboxLabelClass, htmlFor: `input-${_id}` }, h("span", { class: bcmCheckboxIconClass }, h("bcm-icon", { icon: "far fa-check" })), h(SlotTemplate, { className: "slot" }))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
536
+ }
537
+ get el() { return getElement(this); }
538
+ static get watchers() { return {
539
+ "indeterminate": ["watchIndeterminate"],
540
+ "checked": ["watchChecked"]
541
+ }; }
542
+ };
543
+ __decorate$5([
544
+ IsLoad()
545
+ ], BcmCheckbox.prototype, "el", void 0);
546
+ BcmCheckbox.style = checkboxCss;
547
+
548
+ const { state } = createStore({
549
+ group: new Map(),
550
+ allChecked: true,
551
+ allUnchecked: true,
552
+ changeInderminate: {},
553
+ });
554
+ const setValue = async ({ fullWidth, optionType, buttonStyle, size, defaultCheckedItems, el, id, label, required, captionType, hidden, direction, childs, indeterminate, gap, noCaption, }) => {
555
+ if (el) {
556
+ state.group.set(id, {
557
+ fullWidth,
558
+ optionType,
559
+ buttonStyle,
560
+ size,
561
+ defaultCheckedItems,
562
+ label,
563
+ required,
564
+ captionType,
565
+ hidden,
566
+ direction,
567
+ indeterminate,
568
+ gap,
569
+ noCaption,
570
+ childs: childs === null || childs === void 0 ? void 0 : childs.map(child => {
571
+ child.checked && (state.allUnchecked = false);
572
+ !child.checked && (state.allChecked = false);
573
+ // fullWidth && (fullWidth == 'flex' ? (child.style.flex = 'auto') : (child.style.width = '100%'));
574
+ optionType && (child.optionType = optionType);
575
+ buttonStyle && (child.buttonStyle = buttonStyle);
576
+ size && (child.size = size);
577
+ defaultCheckedItems && defaultCheckedItems.find(e => e === child.name) && (child.checked = true);
578
+ child.noCaption = noCaption;
579
+ return {
580
+ id: child.id || Generate.UID(),
581
+ checked: child.checked || false,
582
+ name: child.name,
583
+ size: child.size,
584
+ buttonStyle: child.buttonStyle,
585
+ optionType: child.optionType,
586
+ style: child.style,
587
+ noCaption: child.noCaption,
588
+ color: child.color,
589
+ disabled: child.disabled,
590
+ readonly: child.readonly,
591
+ label: child.label || child.name,
592
+ slot: child.slot || snq(() => child.querySelector('.slot').textContent, child.textContent),
593
+ required: child.required || required,
594
+ el: child,
595
+ captionType,
596
+ hidden,
597
+ };
598
+ }),
599
+ indeterminateState: !state.allChecked && !state.allUnchecked ? 'indeterminate' : state.allChecked ? 'determinate' : 'uncheck',
600
+ });
601
+ }
602
+ };
603
+ const getProperty = id => {
604
+ return snq(() => state.group.get(id), {});
605
+ };
606
+ const getValue = (id, name) => {
607
+ var _a;
608
+ const group = getProperty(id);
609
+ let value = {};
610
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
611
+ if (name) {
612
+ if (child.name === name) {
613
+ value[child.name] = {
614
+ value: !!child.checked,
615
+ name: child.name,
616
+ };
617
+ }
618
+ }
619
+ else {
620
+ value[child.name] = {
621
+ value: !!child.checked,
622
+ name: child.name,
623
+ };
624
+ }
625
+ });
626
+ return value;
627
+ };
628
+ const getCheckedList = id => {
629
+ var _a;
630
+ const group = getProperty(id);
631
+ let value = {};
632
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
633
+ if (child.checked === true) {
634
+ value[child.name] = {
635
+ value: !!child.checked,
636
+ name: child.name,
637
+ };
638
+ }
639
+ });
640
+ return value;
641
+ };
642
+ const setClear = id => {
643
+ var _a;
644
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
645
+ child.checked = false;
646
+ });
647
+ checkInderminate(id);
648
+ };
649
+ const setCheckedItems = (id, items, checked, reset) => {
650
+ var _a;
651
+ const checkedItems = items && (typeof items == 'string' ? JSON.parse(items) : items);
652
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
653
+ if (checkedItems) {
654
+ const checkedItem = checkedItems.find(e => e === child.name || e.name === child.name);
655
+ if (checkedItem) {
656
+ if (typeof checkedItem == 'object') {
657
+ Object.keys(checkedItem).map(key => {
658
+ if (key === 'checked') {
659
+ child.checked = checkedItem[key];
660
+ }
661
+ else {
662
+ child.checked = checked;
663
+ }
664
+ });
665
+ }
666
+ else {
667
+ child.checked = checked;
668
+ }
669
+ }
670
+ else {
671
+ reset && (child.checked = false);
672
+ }
673
+ }
674
+ else {
675
+ child.checked = false;
676
+ }
677
+ });
678
+ checkInderminate(id);
679
+ };
680
+ const resetCaption = id => {
681
+ var _a;
682
+ // const noCaption = getProperty(id).noCaption;
683
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
684
+ child.resetCaption();
685
+ // child.noCaption = noCaption;
686
+ });
687
+ };
688
+ const changeIndeterminate = id => {
689
+ var _a;
690
+ const group = getProperty(id);
691
+ if (!group.disabled) {
692
+ let checkAll = true;
693
+ if (group.indeterminateState === 'determinate') {
694
+ checkAll = false;
695
+ }
696
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
697
+ child.checked = checkAll;
698
+ });
699
+ checkInderminate(id);
700
+ }
701
+ };
702
+ const checkInderminate = id => {
703
+ var _a;
704
+ const group = getProperty(id);
705
+ let allChecked = true;
706
+ let allUnchecked = true;
707
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
708
+ child.checked && (allUnchecked = false);
709
+ !child.checked && (allChecked = false);
710
+ });
711
+ group.indeterminateState = !allChecked && !allUnchecked ? 'indeterminate' : allChecked ? 'determinate' : 'uncheck';
712
+ };
713
+ const onChange = (obj) => {
714
+ var _a;
715
+ (_a = getProperty(obj.id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
716
+ child.checked = child.id === obj.childId ? !child.checked : child.checked;
717
+ });
718
+ checkInderminate(obj.id);
719
+ };
720
+ const removeState = id => {
721
+ return Promise.resolve(state.group.delete(id));
722
+ };
723
+ const getStatesKeys = id => {
724
+ return Object.keys(state.group.get(id));
725
+ };
726
+ const checkBoxGroupState = {
727
+ setValue,
728
+ getValue,
729
+ setCheckedItems,
730
+ getCheckedList,
731
+ getProperty,
732
+ setClear,
733
+ resetCaption,
734
+ onChange,
735
+ getStatesKeys,
736
+ state,
737
+ removeState,
738
+ changeIndeterminate,
739
+ };
740
+
741
+ const CheckboxGroupTemplate = ({ customStyle, groupContainerClasses, onBcmSelect, items }) => {
742
+ return (h("div", { class: groupContainerClasses, style: customStyle }, items.childs && items.childs.map((checkbox) => {
743
+ return (h("bcm-checkbox", { id: checkbox.id, name: checkbox.name, color: checkbox.color, checked: checkbox.checked, disabled: checkbox.disabled, readonly: checkbox.readonly, required: checkbox.required, noCaption: checkbox.noCaption, "no-margin": true, size: checkbox.size, "full-width": checkbox.fullWidth, onClick: (e) => { !checkbox.disabled && !checkbox.readonly && (onBcmSelect(checkbox.id), e.preventDefault()); } }, checkbox.slot || checkbox.label));
744
+ })));
745
+ };
746
+
747
+ const groupCss = "@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-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}";
748
+
749
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
750
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
751
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
752
+ r = Reflect.decorate(decorators, target, key, desc);
753
+ else
754
+ for (var i = decorators.length - 1; i >= 0; i--)
755
+ if (d = decorators[i])
756
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
757
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
758
+ };
759
+ const BcmCheckboxGroup = class {
760
+ constructor(hostRef) {
761
+ registerInstance(this, hostRef);
762
+ this.change = createEvent(this, "bcm-change", 7);
763
+ this.groupCheckedList = createEvent(this, "bcm-group-checked-list", 7);
764
+ this._id = Generate.UID();
765
+ this.direction = Bcm.Direction.horizontal;
766
+ this.items = [];
767
+ this.indeterminate = false;
768
+ this.name = undefined;
769
+ this.value = undefined;
770
+ this.disabled = false;
771
+ this.readonly = false;
772
+ this.hidden = false;
773
+ this.required = false;
774
+ this.label = undefined;
775
+ this.gap = undefined;
776
+ this.defaultValue = undefined;
777
+ this.fullWidth = false;
778
+ this.optionType = 'default';
779
+ this.buttonStyle = 'solid';
780
+ this.size = Bcm.Size.medium;
781
+ this.caption = undefined;
782
+ this.noCaption = false;
783
+ this.captionType = Bcm.Status.default;
784
+ this.tick = {};
785
+ }
786
+ componentDidLoad() {
787
+ this.initState();
788
+ }
789
+ disconnectedCallback() {
790
+ checkBoxGroupState.removeState(this._id);
791
+ }
792
+ componentShouldUpdate(newVal, oldVal, propName) {
793
+ if (propName == 'tick' && newVal !== oldVal) {
794
+ const isHaveChild = snq(() => checkBoxGroupState.getProperty(this._id).childs.length > 0, false);
795
+ if (isHaveChild) {
796
+ this.getValue().then(values => this.value = values);
797
+ }
798
+ }
799
+ if (this.getOptions().indexOf(propName) > -1 && newVal !== oldVal) {
800
+ this.initState();
801
+ }
802
+ }
803
+ getOptions() {
804
+ return snq(() => checkBoxGroupState.getStatesKeys(this._id), []);
805
+ }
806
+ async initState() {
807
+ const { fullWidth, optionType, buttonStyle, size, noCaption, defaultValue, label, required, captionType, hidden, direction, indeterminate, gap, items } = this;
808
+ const defaultCheckedItems = defaultValue && (typeof defaultValue == 'string' ? JSON.parse(defaultValue) : defaultValue);
809
+ const childElements = items.length > 0 ? items : await this.getCheckboxes();
810
+ await checkBoxGroupState.setValue({
811
+ id: this._id,
812
+ el: this.el,
813
+ indeterminate,
814
+ fullWidth,
815
+ optionType,
816
+ buttonStyle,
817
+ size,
818
+ defaultCheckedItems,
819
+ label,
820
+ noCaption,
821
+ required,
822
+ captionType,
823
+ hidden,
824
+ gap,
825
+ direction,
826
+ childs: childElements
827
+ });
828
+ const slotArea = this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);
829
+ if (slotArea) {
830
+ slotArea.innerHTML && (slotArea.innerHTML = '');
831
+ }
832
+ this.value = await this.getValue();
833
+ }
834
+ async markForCheck() {
835
+ await delay(10);
836
+ this.tick = Generate.UID();
837
+ }
838
+ async onBcmFocus() {
839
+ //focus first item
840
+ const childs = this.getCheckboxes();
841
+ if (childs.length > 0) {
842
+ childs[0].onBcmFocus();
843
+ }
844
+ }
845
+ async onBcmBlur() {
846
+ this.el.blur();
847
+ }
848
+ async setClear() {
849
+ checkBoxGroupState.setClear(this._id);
850
+ await delay(10);
851
+ this.getCheckboxes().forEach(item => {
852
+ item.setClear();
853
+ });
854
+ this.markForCheck();
855
+ await delay(10);
856
+ return Promise.resolve();
857
+ }
858
+ async resetCaption() {
859
+ await delay(10);
860
+ this.getCheckboxes().forEach(item => {
861
+ item.resetCaption();
862
+ });
863
+ await delay(10);
864
+ return Promise.resolve();
865
+ }
866
+ async set(data) {
867
+ if (Array.isArray(data)) {
868
+ await this.check(data, true, true);
869
+ }
870
+ }
871
+ async get() {
872
+ const checklist = await this.getCheckedList() && Object.keys(await this.getCheckedList());
873
+ return checklist.length > 0 ? checklist : [];
874
+ }
875
+ async check(items, checked = true, reset = false) {
876
+ checkBoxGroupState.setCheckedItems(this._id, items, checked, reset);
877
+ this.markForCheck();
878
+ }
879
+ async getValue(name) {
880
+ return Promise.resolve(checkBoxGroupState.getValue(this._id, name));
881
+ }
882
+ async getCheckedList() {
883
+ return checkBoxGroupState.getCheckedList(this._id);
884
+ }
885
+ handleItemsChange() {
886
+ this.initState();
887
+ }
888
+ getCheckboxes() {
889
+ return getChildElements(this.el, 'bcm-checkbox:not(#bcm-indeterminate-element)');
890
+ }
891
+ async getCheckbox(id) {
892
+ const element = this.el.querySelector(`bcm-checkbox[id="${id}"]`);
893
+ if (element) {
894
+ const name = element["name"];
895
+ const value = await this.getValue(name);
896
+ return { element, event: snq(() => value[name], null) };
897
+ }
898
+ return {};
899
+ }
900
+ async indeterminateClick() {
901
+ checkBoxGroupState.changeIndeterminate(this._id);
902
+ this.markForCheck();
903
+ }
904
+ async changeCheckBox(id) {
905
+ checkBoxGroupState.onChange({ id: this._id, childId: id });
906
+ this.markForCheck();
907
+ await delay(10);
908
+ this.value = await this.getValue();
909
+ this.change.emit({ value: this.value, changed: Object.assign({}, await this.getCheckbox(id)) });
910
+ this.groupCheckedList.emit(await this.getCheckedList());
911
+ }
912
+ getItems() {
913
+ return checkBoxGroupState.getProperty(this._id);
914
+ }
915
+ render() {
916
+ const items = this.getItems();
917
+ const { disabled, captionType, label, indeterminate, indeterminateState, required, direction, optionType, hidden, fullWidth, gap } = items;
918
+ const bcmChechboxGroup = classnames('bcm-checkbox-group', direction, optionType, {
919
+ hidden,
920
+ 'full-width': fullWidth
921
+ });
922
+ const bcmChechboxGroupContainer = classnames('bcm-checkbox-group__container', optionType, {
923
+ [direction]: optionType === 'default',
924
+ indeterminate,
925
+ hidden,
926
+ 'full-width': fullWidth
927
+ });
928
+ return (h(Host, { class: bcmChechboxGroup }, h("span", { hidden: true, id: `bcm-checkbox-group__items-${this._id}` }, h("slot", null)), h("div", { class: "bcm-checkbox-group__label" }, label &&
929
+ h("div", null, h(LabelTemplate, { size: this.size, type: captionType, value: label, required: required }))), indeterminate &&
930
+ h("bcm-checkbox", { onClick: (e) => { this.indeterminateClick(), e.preventDefault(); }, "no-caption": true, id: "bcm-indeterminate-element", indeterminate: indeterminateState, disabled: disabled }, "Check All"), h(CheckboxGroupTemplate, { items: items, groupContainerClasses: bcmChechboxGroupContainer, customStyle: gap && ({ 'gap': gap }), onBcmSelect: (id) => this.changeCheckBox(id) })));
931
+ }
932
+ get el() { return getElement(this); }
933
+ static get watchers() { return {
934
+ "items": ["handleItemsChange"]
935
+ }; }
936
+ };
937
+ __decorate$4([
938
+ IsLoad()
939
+ ], BcmCheckboxGroup.prototype, "el", void 0);
940
+ BcmCheckboxGroup.style = groupCss;
941
+
942
+ // /**
943
+ // *
944
+ // * @param type
945
+ // */
946
+ // export const required = (value:any) => {
947
+ // if ( value || value != null ) {
948
+ // return true
949
+ // } else {
950
+ // return true
951
+ // }
952
+ // }
953
+ class rules {
954
+ constructor() { }
955
+ response(status, message) {
956
+ return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
957
+ }
958
+ required(value, componentValidation) {
959
+ let validation = this.response(true);
960
+ if (value == '' || value == "" || value == undefined || value == null || value === false) {
961
+ validation = this.response(false, 'This field is required.');
962
+ }
963
+ if (componentValidation) {
964
+ if (!componentValidation.valid) {
965
+ validation = this.response(false, componentValidation.errorText);
966
+ }
967
+ if (value instanceof Object) {
968
+ if (value.isValid) {
969
+ if (value.isValid == false)
970
+ validation = this.response(false, 'This field is required.');
971
+ }
972
+ }
973
+ }
974
+ return validation;
975
+ }
976
+ selfValidation(input) {
977
+ let validation = this.response(true);
978
+ if (input.captionError != null || input.captionType == 'error') {
979
+ validation = this.response(false, input.captionError);
980
+ }
981
+ return validation;
982
+ }
983
+ }
984
+ const validate = new rules;
985
+
986
+ const formCss = "@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}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}";
987
+
988
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
989
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
990
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
991
+ r = Reflect.decorate(decorators, target, key, desc);
992
+ else
993
+ for (var i = decorators.length - 1; i >= 0; i--)
994
+ if (d = decorators[i])
995
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
996
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
997
+ };
998
+ const BcmForm = class {
999
+ constructor(hostRef) {
1000
+ registerInstance(this, hostRef);
1001
+ this.bcmForm = createEvent(this, "bcm-form", 7);
1002
+ this.formData = {};
1003
+ this.inputs = [];
1004
+ this.duplicateInput = [];
1005
+ this.isValid = true;
1006
+ this.returnCaption = [];
1007
+ this.Bromcom = {
1008
+ errors: {
1009
+ targetFormNotExist: 'target form is not exist --> ',
1010
+ },
1011
+ inputComponents: {
1012
+ // Birbirinin aynısı
1013
+ INPUT: 'input',
1014
+ TEXTAREA: 'textarea',
1015
+ //çok benzer
1016
+ SWITCH: 'switch',
1017
+ CHECKBOX: 'checkbox',
1018
+ RADIO_GROUP: 'radio-group',
1019
+ CHECKBOX_GROUP: 'checkbox-group',
1020
+ RANGE: 'range',
1021
+ // sadece value fırlatıyor
1022
+ FORM: 'form',
1023
+ FORM_GROUP: 'form-group',
1024
+ // *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
1025
+ LIST: 'list',
1026
+ //
1027
+ COLORPICKER: 'colorpicker',
1028
+ // picker aslında tek komponent hepsi datetimepicker
1029
+ DATE_PICKER: 'date-picker',
1030
+ TIME_PICKER: 'time-picker',
1031
+ DATETIME_PICKER: 'datetime-picker',
1032
+ // silinecek komponentler
1033
+ SELECT: 'select',
1034
+ LISTBOX: 'listbox'
1035
+ },
1036
+ helpers: {
1037
+ randomId: function () {
1038
+ return Math.random().toString(16).slice(2, -1);
1039
+ },
1040
+ },
1041
+ };
1042
+ this._id = (Math.random() * 4).toString(16).replace('.', '');
1043
+ this.hidden = false;
1044
+ this.validation = false;
1045
+ this.name = "";
1046
+ this.value = undefined;
1047
+ this.autocomplete = false;
1048
+ }
1049
+ handleSubmit() {
1050
+ // if (lowercase(e.target.nodeName) === 'bcm-button') {
1051
+ // if (e.target.type === 'submit') {
1052
+ // this.submitFunction()
1053
+ // }
1054
+ // }
1055
+ }
1056
+ async submitFunction() {
1057
+ this.formData = {};
1058
+ this.inputs = [];
1059
+ this.selector = this.el;
1060
+ await this.getInputs();
1061
+ await delay(10);
1062
+ const usrFrmData = await this.userFormData();
1063
+ var formData = { isValid: true, formData: usrFrmData };
1064
+ if (this.name) {
1065
+ formData = Object.assign(Object.assign({}, formData), { formName: this.name });
1066
+ }
1067
+ if (this.isValid) {
1068
+ this.bcmForm.emit(formData);
1069
+ return formData;
1070
+ }
1071
+ else {
1072
+ this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
1073
+ if (this.name) {
1074
+ this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
1075
+ }
1076
+ this.bcmForm.emit(this.returnCaption);
1077
+ return this.returnCaption;
1078
+ }
1079
+ }
1080
+ async submit() {
1081
+ return Promise.resolve(this.submitFunction());
1082
+ }
1083
+ async set(data) {
1084
+ var _a;
1085
+ const validate = this.validation;
1086
+ this.validation = false;
1087
+ // debugger
1088
+ this.selector = this.el;
1089
+ await this.getInputs();
1090
+ if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1091
+ for (const key of Object.keys(data)) {
1092
+ const item = this.inputs.find(item => item.name === key);
1093
+ if (item) {
1094
+ try {
1095
+ await item.set(data[key]);
1096
+ }
1097
+ catch (error) {
1098
+ console.log(item.nodeName, "set", error);
1099
+ }
1100
+ }
1101
+ }
1102
+ }
1103
+ this.validation = validate;
1104
+ }
1105
+ async get() {
1106
+ var _a;
1107
+ let formData = {};
1108
+ this.selector = this.el;
1109
+ const inputsCache = this.inputs;
1110
+ await this.getInputs();
1111
+ ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
1112
+ try {
1113
+ const value = await item.get();
1114
+ formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
1115
+ }
1116
+ catch (error) {
1117
+ console.log(`${item.nodeName} get error`);
1118
+ }
1119
+ });
1120
+ this.inputs = inputsCache;
1121
+ await delay(10);
1122
+ return Promise.resolve(formData);
1123
+ }
1124
+ async setClear() {
1125
+ this.formData = {};
1126
+ this.inputs = [];
1127
+ this.selector = this.el;
1128
+ let clear = [];
1129
+ await this.getInputs();
1130
+ this.inputs.forEach(async (item) => {
1131
+ try {
1132
+ clear.push(await item.setClear());
1133
+ }
1134
+ catch (error) {
1135
+ console.log(error);
1136
+ }
1137
+ });
1138
+ await Promise.all(clear).then(() => {
1139
+ this.formData = {};
1140
+ this.inputs = [];
1141
+ this.duplicateInput = [];
1142
+ this.isValid = true;
1143
+ this.returnCaption = [];
1144
+ });
1145
+ await delay(10);
1146
+ return Promise.resolve(true);
1147
+ }
1148
+ async resetCaption() {
1149
+ await delay(10);
1150
+ this.formData = {};
1151
+ this.inputs = [];
1152
+ this.selector = this.el;
1153
+ await this.getInputs();
1154
+ for (const item of this.inputs) {
1155
+ try {
1156
+ await item.resetCaption();
1157
+ }
1158
+ catch (error) {
1159
+ console.log(item.nodeName, "rc p");
1160
+ }
1161
+ }
1162
+ await delay(10);
1163
+ return Promise.resolve();
1164
+ }
1165
+ async config(_config) {
1166
+ if (_config['validation']) {
1167
+ typeof _config['validation'] == 'boolean'
1168
+ ? this.validation = _config['validation']
1169
+ : this.validation = false;
1170
+ }
1171
+ return true;
1172
+ }
1173
+ async getInputs() {
1174
+ var form = this.selector;
1175
+ if (!form) {
1176
+ console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
1177
+ return;
1178
+ }
1179
+ const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
1180
+ this.duplicateInput = [];
1181
+ // s-hn: Stencil private flag that contains host web component
1182
+ // https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
1183
+ const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
1184
+ // debugger;
1185
+ for (const item of rootInputs) {
1186
+ if (StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
1187
+ let checkboxs = item.querySelectorAll("bcm-checkbox");
1188
+ if (checkboxs) {
1189
+ for (const checkbox of checkboxs) {
1190
+ this.duplicateInput.push(checkbox.name);
1191
+ }
1192
+ }
1193
+ }
1194
+ if (StringHelper.lowercase(item.nodeName) == "bcm-form") {
1195
+ const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
1196
+ let itemObject = {};
1197
+ for (const element of groupInputs) {
1198
+ var name = element.name;
1199
+ var value = element.value;
1200
+ itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
1201
+ this.duplicateInput.push(element.name);
1202
+ }
1203
+ item.value = itemObject;
1204
+ let checkboxs = item.querySelectorAll("bcm-checkbox");
1205
+ if (checkboxs) {
1206
+ for (const checkbox of checkboxs) {
1207
+ this.duplicateInput.push(checkbox.name);
1208
+ }
1209
+ }
1210
+ }
1211
+ }
1212
+ await delay(10);
1213
+ this.inputs = rootInputs;
1214
+ }
1215
+ getItemValue(item) {
1216
+ const tagName = item.tagName.toLowerCase().replace('bcm-', '');
1217
+ switch (tagName) {
1218
+ /* case 'date-picker':
1219
+ case 'datetime-picker':
1220
+ return item.value.timestamp
1221
+ case 'time-picker':
1222
+ return item.value.time */
1223
+ default:
1224
+ return item.value;
1225
+ }
1226
+ }
1227
+ isWrapperComponent(item) {
1228
+ return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
1229
+ }
1230
+ isGroupComponent(item) {
1231
+ return ['bcm-checkbox-group'].includes(item.toLowerCase());
1232
+ }
1233
+ isListComponent(item) {
1234
+ return ['bcm-list'].includes(item.toLowerCase());
1235
+ }
1236
+ async userFormData() {
1237
+ this.formData = {};
1238
+ this.isValid = true;
1239
+ this.returnCaption = [];
1240
+ for (const item of this.inputs) {
1241
+ // const isListComponent = this.isListComponent(item.tagName);
1242
+ const isGroupComponent = this.isGroupComponent(item.tagName);
1243
+ const isWrapperComponent = this.isWrapperComponent(item.tagName);
1244
+ const wrapperComponent = isWrapperComponent && item;
1245
+ const input = isWrapperComponent
1246
+ ? await item.getInput() && item
1247
+ : item;
1248
+ // input.caption = ''
1249
+ // input.captionType = ''
1250
+ if (this.validation) {
1251
+ let valid = null;
1252
+ // if (isListComponent) {
1253
+ // valid = !(input.value && input.value.length > 0) && validate.required(input.value)
1254
+ // } else
1255
+ if (isWrapperComponent) {
1256
+ const isPickerValid = await wrapperComponent.isValid();
1257
+ valid = validate.required(input.value, isPickerValid);
1258
+ if (valid) {
1259
+ if (input.value instanceof Object) {
1260
+ if (input.value["isValid"] == false) {
1261
+ valid = validate.required("", isPickerValid);
1262
+ }
1263
+ }
1264
+ else {
1265
+ valid = validate.required(input.value, isPickerValid);
1266
+ }
1267
+ }
1268
+ }
1269
+ else if (isGroupComponent) {
1270
+ const childsCheckbox = getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1271
+ if (childsCheckbox && childsCheckbox.length > 0) {
1272
+ for (const element of childsCheckbox) {
1273
+ if (element && element.required === true) {
1274
+ valid = validate.required(element.checked);
1275
+ if (!valid['valid']) {
1276
+ element.noCaption = false;
1277
+ element.captionError = valid['message'];
1278
+ element.captionType = valid['type'];
1279
+ }
1280
+ else {
1281
+ element.noCaption = input.noCaption;
1282
+ element.captionError = null;
1283
+ element.captionType = "default";
1284
+ }
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ else {
1290
+ valid = validate.required(input.value);
1291
+ }
1292
+ if (input.required) {
1293
+ if (!valid['valid']) {
1294
+ input.captionError = valid['message'];
1295
+ input.captionType = valid['type'];
1296
+ }
1297
+ else {
1298
+ input.captionError = null;
1299
+ input.captionType = "default";
1300
+ }
1301
+ await delay(10);
1302
+ const selfValidation = validate.selfValidation(input);
1303
+ if (valid['valid']) {
1304
+ if (!selfValidation['valid']) {
1305
+ input.captionError = selfValidation['message'];
1306
+ input.captionType = selfValidation['type'];
1307
+ }
1308
+ }
1309
+ }
1310
+ let name = input.name;
1311
+ let value = input.captionError;
1312
+ !input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
1313
+ this.isValid = false);
1314
+ }
1315
+ if (input.name && !this.duplicateInput.includes(input.name)) {
1316
+ var itemValue = this.getItemValue(input);
1317
+ if (!itemValue || itemValue == undefined || itemValue == null) {
1318
+ itemValue = null;
1319
+ }
1320
+ this.formData[input.name] = itemValue;
1321
+ }
1322
+ }
1323
+ return this.formData;
1324
+ }
1325
+ async handleChange(e) {
1326
+ const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
1327
+ const isGroupComponent = this.isGroupComponent(e.target.tagName);
1328
+ let target;
1329
+ if (isWrapperComponent) {
1330
+ target = e.target.getInput && await e.target.getInput() || e.target;
1331
+ }
1332
+ else if (isGroupComponent) {
1333
+ let req = false;
1334
+ const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1335
+ childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
1336
+ if (element && element.required === true) {
1337
+ req = true;
1338
+ }
1339
+ }));
1340
+ target = Object.assign(Object.assign({}, e.target), { required: req });
1341
+ }
1342
+ else {
1343
+ target = e.target;
1344
+ }
1345
+ const value = e.target.value;
1346
+ const wrapperComponent = isWrapperComponent && e.target;
1347
+ var isPickerValid;
1348
+ if (isWrapperComponent) {
1349
+ isPickerValid = await wrapperComponent.isValid();
1350
+ }
1351
+ const tick = setTimeout(() => {
1352
+ if (target.required) {
1353
+ let valid = null;
1354
+ if (isWrapperComponent) {
1355
+ valid = validate.required(value, isPickerValid);
1356
+ if (valid) {
1357
+ if (value instanceof Object) {
1358
+ if (value["isValid"] == false) {
1359
+ valid = validate.required("", isPickerValid);
1360
+ }
1361
+ }
1362
+ else {
1363
+ valid = validate.required(value, isPickerValid);
1364
+ }
1365
+ }
1366
+ }
1367
+ else if (isGroupComponent) {
1368
+ const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1369
+ childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
1370
+ if (element && element.required === true) {
1371
+ valid = validate.required(element.checked);
1372
+ if (!valid['valid']) {
1373
+ element.noCaption = false;
1374
+ element.captionError = valid['message'];
1375
+ element.captionType = valid['type'];
1376
+ }
1377
+ else {
1378
+ element.noCaption = e.target.noCaption;
1379
+ element.captionError = null;
1380
+ element.captionType = "default";
1381
+ }
1382
+ }
1383
+ }));
1384
+ }
1385
+ else {
1386
+ valid = validate.required(value);
1387
+ }
1388
+ if (valid['valid']) {
1389
+ target.captionError = null;
1390
+ target.captionType = null;
1391
+ }
1392
+ else {
1393
+ target.captionError = valid['message'];
1394
+ target.captionType = valid['type'];
1395
+ }
1396
+ }
1397
+ clearTimeout(tick);
1398
+ });
1399
+ this.value = await this.userFormData();
1400
+ }
1401
+ render() {
1402
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
1403
+ return (h(Host, { class: hostClasses }, h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off" }, h("slot", null))));
1404
+ }
1405
+ get el() { return getElement(this); }
1406
+ };
1407
+ __decorate$3([
1408
+ IsLoad()
1409
+ ], BcmForm.prototype, "el", void 0);
1410
+ BcmForm.style = formCss;
1411
+
1412
+ 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}";
1413
+
1414
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1415
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1416
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1417
+ r = Reflect.decorate(decorators, target, key, desc);
1418
+ else
1419
+ for (var i = decorators.length - 1; i >= 0; i--)
1420
+ if (d = decorators[i])
1421
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1422
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1423
+ };
1424
+ const BcmIcon = class {
1425
+ constructor(hostRef) {
1426
+ registerInstance(this, hostRef);
1427
+ this.hidden = false;
1428
+ this.icon = undefined;
1429
+ }
1430
+ render() {
1431
+ const { icon, hidden } = this;
1432
+ return (h(Host, { class: `bcm-icon fa ${hidden ? 'hidden' : ''}` }, h("i", { class: `${icon}` })));
1433
+ }
1434
+ get el() { return getElement(this); }
1435
+ };
1436
+ __decorate$2([
1437
+ IsLoad()
1438
+ ], BcmIcon.prototype, "el", void 0);
1439
+ BcmIcon.style = iconCss;
1440
+
1441
+ const labelCss = "@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-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}";
1442
+
1443
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1444
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1445
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1446
+ r = Reflect.decorate(decorators, target, key, desc);
1447
+ else
1448
+ for (var i = decorators.length - 1; i >= 0; i--)
1449
+ if (d = decorators[i])
1450
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1451
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1452
+ };
1453
+ const BcmLabel = class {
1454
+ constructor(hostRef) {
1455
+ registerInstance(this, hostRef);
1456
+ this._id = Generate.UID();
1457
+ this.required = false;
1458
+ this.value = undefined;
1459
+ this.size = "medium";
1460
+ this.form = undefined;
1461
+ this.htmlFor = undefined;
1462
+ this.hidden = false;
1463
+ this.type = Bcm.Status.default;
1464
+ this.tooltip = undefined;
1465
+ }
1466
+ render() {
1467
+ const { required, value, size, form, htmlFor, hidden, type, tooltip } = this;
1468
+ const hostClasses = classnames('bcm-label', { hidden });
1469
+ const Label = (h(LabelTemplate, { form: form, htmlFor: htmlFor, value: value, size: size, type: type, required: required }));
1470
+ return (h(Host, { class: hostClasses }, Label, tooltip && (h("bcm-tooltip", { message: tooltip, placement: 'top', trigger: 'hover' }, h("bcm-icon", { icon: "far fa-question-circle" })))));
1471
+ }
1472
+ get el() { return getElement(this); }
1473
+ };
1474
+ __decorate$1([
1475
+ IsLoad()
1476
+ ], BcmLabel.prototype, "el", void 0);
1477
+ BcmLabel.style = labelCss;
1478
+
1479
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1480
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1481
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1482
+ r = Reflect.decorate(decorators, target, key, desc);
1483
+ else
1484
+ for (var i = decorators.length - 1; i >= 0; i--)
1485
+ if (d = decorators[i])
1486
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1487
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1488
+ };
1489
+ const BcmTooltip = class {
1490
+ constructor(hostRef) {
1491
+ registerInstance(this, hostRef);
1492
+ this.bcmTooltipShow = createEvent(this, "bcmTooltipShow", 7);
1493
+ this.bcmTooltipHide = createEvent(this, "bcmTooltipHide", 7);
1494
+ this._id = Generate.UID();
1495
+ this.message = "";
1496
+ this.placement = Bcm$1.Placement.top;
1497
+ this.trigger = Bcm$1.TriggerType.click;
1498
+ this.open = false;
1499
+ this.color = "slate";
1500
+ this.size = Bcm$1.Size.medium;
1501
+ this.openDelay = 0;
1502
+ this.closeDelay = 0;
1503
+ this.targetId = undefined;
1504
+ this.tooltip = undefined;
1505
+ }
1506
+ emitShow() {
1507
+ this.bcmTooltipShow.emit();
1508
+ }
1509
+ emitHide() {
1510
+ this.bcmTooltipHide.emit();
1511
+ }
1512
+ connectedCallback() {
1513
+ this.tooltip = new Tooltip({
1514
+ targetId: this.targetId || this._id,
1515
+ message: this.message,
1516
+ placement: this.placement,
1517
+ color: this.color,
1518
+ trigger: this.trigger,
1519
+ size: this.size,
1520
+ openDelay: this.openDelay,
1521
+ closeDelay: this.closeDelay,
1522
+ emitShow: () => this.emitShow(),
1523
+ emitHide: () => this.emitHide(),
1524
+ });
1525
+ }
1526
+ componentDidLoad() {
1527
+ this.tooltip.listener();
1528
+ }
1529
+ componentDidRender() {
1530
+ this.tooltip.message = this.message;
1531
+ this.tooltip.placement = this.placement;
1532
+ this.tooltip.color = this.color;
1533
+ this.tooltip.trigger = this.trigger;
1534
+ this.tooltip.size = this.size;
1535
+ this.tooltip.openDelay = this.openDelay;
1536
+ this.tooltip.closeDelay = this.closeDelay;
1537
+ this.tooltip.update();
1538
+ }
1539
+ disconnectedCallback() {
1540
+ this.tooltip.destroy();
1541
+ }
1542
+ async show() {
1543
+ this.tooltip.show();
1544
+ }
1545
+ async hide() {
1546
+ this.tooltip.hide();
1547
+ }
1548
+ async toggle() {
1549
+ this.tooltip.toggle();
1550
+ }
1551
+ render() {
1552
+ return (h(Host, { "aria-describedby": "tooltip", class: "tw-inline-flex tw-h-fit tw-w-fit" }, h("slot", null)));
1553
+ }
1554
+ get el() { return getElement(this); }
1555
+ };
1556
+ __decorate([
1557
+ IsLoad()
1558
+ ], BcmTooltip.prototype, "el", void 0);
1559
+
1560
+ export { BcmButton as bcm_button, BcmCheckbox as bcm_checkbox, BcmCheckboxGroup as bcm_checkbox_group, BcmForm as bcm_form, BcmIcon as bcm_icon, BcmLabel as bcm_label, BcmTooltip as bcm_tooltip };