bromcom-ui 2.8.0-rc.8 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/p-004f1771.js +5 -0
  4. package/dist/bromcom-ui/p-05b0bdce.entry.js +5 -0
  5. package/dist/bromcom-ui/p-129664b3.js +5 -0
  6. package/dist/bromcom-ui/{p-7eccf8ee.entry.js → p-17417143.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-f607d7d7.js → p-1e902c4c.js} +1 -1
  8. package/dist/bromcom-ui/{p-0a16fcfa.entry.js → p-23309057.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-ab0954e5.js → p-25c894b5.js} +1 -1
  10. package/dist/bromcom-ui/p-2afef4b5.entry.js +5 -0
  11. package/dist/bromcom-ui/p-2e511449.entry.js +5 -0
  12. package/dist/bromcom-ui/{p-493fc64a.js → p-3a03b3cd.js} +1 -1
  13. package/dist/bromcom-ui/p-3a0852d8.entry.js +5 -0
  14. package/dist/bromcom-ui/p-3fbc11b0.entry.js +5 -0
  15. package/dist/bromcom-ui/p-413de5df.entry.js +5 -0
  16. package/dist/bromcom-ui/p-443c8ebb.entry.js +5 -0
  17. package/dist/bromcom-ui/p-494ebf69.entry.js +5 -0
  18. package/dist/bromcom-ui/{p-692a0269.js → p-4aa0e6b1.js} +1 -1
  19. package/dist/bromcom-ui/{p-757f7936.entry.js → p-4f1c5896.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-50adda99.entry.js +5 -0
  21. package/dist/bromcom-ui/p-50ff166d.entry.js +5 -0
  22. package/dist/bromcom-ui/p-523ea702.entry.js +5 -0
  23. package/dist/bromcom-ui/{p-e19e9dc1.entry.js → p-53820462.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-55837df1.entry.js +5 -0
  25. package/dist/bromcom-ui/p-5618ee1e.entry.js +5 -0
  26. package/dist/bromcom-ui/p-5becfd20.entry.js +5 -0
  27. package/dist/bromcom-ui/p-5c059eba.entry.js +5 -0
  28. package/dist/bromcom-ui/{p-7d25efd3.entry.js → p-5e74c67f.entry.js} +1 -1
  29. package/dist/bromcom-ui/p-6178ccd5.entry.js +5 -0
  30. package/dist/bromcom-ui/p-6296761d.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-6b7a9d96.entry.js → p-63b14659.entry.js} +1 -1
  32. package/dist/bromcom-ui/p-66eda1ad.entry.js +5 -0
  33. package/dist/bromcom-ui/p-6888582a.entry.js +5 -0
  34. package/dist/bromcom-ui/p-76cb3798.entry.js +5 -0
  35. package/dist/bromcom-ui/{p-fba7e2c7.entry.js → p-7cab26a2.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-c85b8abc.entry.js → p-7d662231.entry.js} +1 -1
  37. package/dist/bromcom-ui/p-7e69faef.entry.js +5 -0
  38. package/dist/bromcom-ui/p-83fc06ed.entry.js +5 -0
  39. package/dist/bromcom-ui/p-842a5926.entry.js +5 -0
  40. package/dist/bromcom-ui/p-843905c8.js +5 -0
  41. package/dist/bromcom-ui/{p-deecea68.entry.js → p-884127fe.entry.js} +1 -1
  42. package/dist/bromcom-ui/p-89180350.entry.js +5 -0
  43. package/dist/bromcom-ui/{p-d644b6d9.entry.js → p-8f78fe1c.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-f280a1e6.entry.js → p-92434468.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-0b663779.entry.js → p-961dc8e1.entry.js} +1 -1
  46. package/dist/bromcom-ui/p-99496f4c.entry.js +5 -0
  47. package/dist/bromcom-ui/{p-e5372f21.js → p-9a4e987e.js} +1 -1
  48. package/dist/bromcom-ui/p-9ca5f0e6.entry.js +5 -0
  49. package/dist/bromcom-ui/p-9e28da9b.entry.js +5 -0
  50. package/dist/bromcom-ui/{p-551bd870.entry.js → p-a648adf6.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-a7edb4bf.entry.js +5 -0
  52. package/dist/bromcom-ui/p-a9c80111.entry.js +5 -0
  53. package/dist/bromcom-ui/p-aaaf5f96.entry.js +5 -0
  54. package/dist/bromcom-ui/{p-d21f0839.entry.js → p-b158f172.entry.js} +1 -1
  55. package/dist/bromcom-ui/p-b59fb568.entry.js +5 -0
  56. package/dist/bromcom-ui/p-b6eb7840.entry.js +5 -0
  57. package/dist/bromcom-ui/p-b72371d3.entry.js +5 -0
  58. package/dist/bromcom-ui/{p-0111d5cd.js → p-b7c7dba1.js} +1 -1
  59. package/dist/bromcom-ui/p-bbc798b6.entry.js +5 -0
  60. package/dist/bromcom-ui/p-bc8b527a.entry.js +5 -0
  61. package/dist/bromcom-ui/p-c2f9e95f.entry.js +5 -0
  62. package/dist/bromcom-ui/{p-976f682f.entry.js → p-c80ab24a.entry.js} +1 -1
  63. package/dist/bromcom-ui/p-ca6ab365.entry.js +5 -0
  64. package/dist/bromcom-ui/p-cbfe5b54.entry.js +5 -0
  65. package/dist/bromcom-ui/p-ce61cb85.entry.js +5 -0
  66. package/dist/bromcom-ui/p-d0af6f75.entry.js +5 -0
  67. package/dist/bromcom-ui/p-d0c10a1d.entry.js +5 -0
  68. package/dist/bromcom-ui/p-d155cf69.entry.js +5 -0
  69. package/dist/bromcom-ui/p-d3148660.entry.js +5 -0
  70. package/dist/bromcom-ui/p-d41b0028.entry.js +5 -0
  71. package/dist/bromcom-ui/p-d69fb13b.entry.js +5 -0
  72. package/dist/bromcom-ui/p-d8cc24f0.entry.js +5 -0
  73. package/dist/bromcom-ui/p-dc19c6f4.entry.js +5 -0
  74. package/dist/bromcom-ui/p-dee8f5db.entry.js +10 -0
  75. package/dist/bromcom-ui/p-e10f2cf5.entry.js +5 -0
  76. package/dist/bromcom-ui/p-ef76d16f.entry.js +5 -0
  77. package/dist/bromcom-ui/p-f06a6ad6.entry.js +5 -0
  78. package/dist/bromcom-ui/p-f3ab3900.entry.js +5 -0
  79. package/dist/bromcom-ui/p-f3ed187a.entry.js +5 -0
  80. package/dist/bromcom-ui/p-f48e2af7.entry.js +5 -0
  81. package/dist/bromcom-ui/p-f7e29f3e.entry.js +5 -0
  82. package/dist/bromcom-ui/{p-533cb826.entry.js → p-f82afa9d.entry.js} +1 -1
  83. package/dist/bromcom-ui/p-f937f362.entry.js +5 -0
  84. package/dist/bromcom-ui/p-fd9987b9.entry.js +5 -0
  85. package/dist/bromcom-ui/{p-f2edbbc1.entry.js → p-ff7c5690.entry.js} +1 -1
  86. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -16
  87. package/dist/cjs/bcm-alert.cjs.entry.js +2 -16
  88. package/dist/cjs/bcm-attendance.cjs.entry.js +3 -17
  89. package/dist/cjs/bcm-autocomplete.cjs.entry.js +0 -14
  90. package/dist/cjs/bcm-avatar_2.cjs.entry.js +7 -34
  91. package/dist/cjs/bcm-box.cjs.entry.js +0 -14
  92. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -16
  93. package/dist/cjs/bcm-button-group.cjs.entry.js +3 -17
  94. package/dist/cjs/bcm-button_7.cjs.entry.js +1518 -0
  95. package/dist/cjs/bcm-card.cjs.entry.js +4 -18
  96. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +3 -69
  97. package/dist/cjs/bcm-chip.cjs.entry.js +4 -18
  98. package/dist/cjs/bcm-collapse-group.cjs.entry.js +0 -14
  99. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -16
  100. package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
  101. package/dist/cjs/bcm-colorful_2.cjs.entry.js +7 -21
  102. package/dist/cjs/bcm-colorpicker.cjs.entry.js +0 -14
  103. package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
  104. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-default.cjs.entry.js +2 -16
  106. package/dist/cjs/bcm-drawer.cjs.entry.js +6 -20
  107. package/dist/cjs/bcm-dropdown.cjs.entry.js +17 -5
  108. package/dist/cjs/bcm-error-layout.cjs.entry.js +1 -15
  109. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +4 -18
  110. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  111. package/dist/cjs/bcm-form-group.cjs.entry.js +0 -14
  112. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -16
  113. package/dist/cjs/bcm-input.cjs.entry.js +6 -6
  114. package/dist/cjs/bcm-item.cjs.entry.js +4 -18
  115. package/dist/cjs/bcm-items.cjs.entry.js +2 -16
  116. package/dist/cjs/bcm-link.cjs.entry.js +1 -15
  117. package/dist/cjs/bcm-list.cjs.entry.js +8 -8
  118. package/dist/cjs/bcm-menu.cjs.entry.js +15 -7
  119. package/dist/cjs/bcm-message.cjs.entry.js +0 -14
  120. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +36 -0
  121. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +35 -0
  122. package/dist/cjs/bcm-modal-2.cjs.entry.js +158 -0
  123. package/dist/cjs/bcm-modal.cjs.entry.js +3 -17
  124. package/dist/cjs/bcm-notification.cjs.entry.js +0 -14
  125. package/dist/cjs/bcm-old-input.cjs.entry.js +1 -15
  126. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +0 -14
  127. package/dist/cjs/bcm-overlay_2.cjs.entry.js +48 -0
  128. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -18
  129. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -16
  130. package/dist/cjs/bcm-popover.cjs.entry.js +5 -20
  131. package/dist/cjs/bcm-progress.cjs.entry.js +4 -18
  132. package/dist/cjs/bcm-radio-group.cjs.entry.js +5 -5
  133. package/dist/cjs/bcm-radio.cjs.entry.js +5 -5
  134. package/dist/cjs/bcm-range.cjs.entry.js +3 -17
  135. package/dist/cjs/bcm-result.cjs.entry.js +0 -14
  136. package/dist/cjs/bcm-search.cjs.entry.js +4 -18
  137. package/dist/cjs/bcm-select.cjs.entry.js +0 -14
  138. package/dist/cjs/bcm-skeleton.cjs.entry.js +2 -16
  139. package/dist/cjs/bcm-step.cjs.entry.js +3 -17
  140. package/dist/cjs/bcm-stepper.cjs.entry.js +8 -22
  141. package/dist/cjs/bcm-switch.cjs.entry.js +3 -3
  142. package/dist/cjs/bcm-tab-group.cjs.entry.js +5 -19
  143. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +5 -19
  144. package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -19
  145. package/dist/cjs/bcm-tab-pane.cjs.entry.js +0 -14
  146. package/dist/cjs/bcm-tab.cjs.entry.js +1 -15
  147. package/dist/cjs/bcm-table.cjs.entry.js +0 -14
  148. package/dist/cjs/bcm-tabs-content.cjs.entry.js +0 -14
  149. package/dist/cjs/bcm-tabs.cjs.entry.js +0 -14
  150. package/dist/cjs/bcm-tag.cjs.entry.js +3 -17
  151. package/dist/cjs/bcm-text.cjs.entry.js +3 -17
  152. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -5
  153. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  154. package/dist/cjs/bcm-timeline-item.cjs.entry.js +0 -14
  155. package/dist/cjs/bcm-timeline.cjs.entry.js +0 -14
  156. package/dist/cjs/bcm-toast.cjs.entry.js +2 -16
  157. package/dist/cjs/bcm-typography.cjs.entry.js +21 -0
  158. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  159. package/dist/cjs/{color-helper-0097a7c2.js → color-helper-d6d2028b.js} +8 -8
  160. package/dist/cjs/{colors-43b24668.js → colors-e1d142ad.js} +4 -4
  161. package/dist/cjs/{generate-2f652f99.js → generate-2f30d107.js} +4 -21
  162. package/dist/cjs/{input-template-b531038e.js → input-template-ba848e88.js} +1 -1
  163. package/dist/cjs/{json-parse-decarator-26187e13.js → json-parse-decarator-d99e7d59.js} +1 -1
  164. package/dist/cjs/loader.cjs.js +1 -1
  165. package/dist/cjs/{number-helper-d866e132.js → number-helper-a5bbc35c.js} +1 -1
  166. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -18
  167. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -16
  168. package/dist/cjs/{stepper-states-17fb63ee.js → stepper-states-10be0ab5.js} +1 -1
  169. package/dist/cjs/{tooltip-helper-c64743ba.js → tooltip-helper-de1548f3.js} +4 -5
  170. package/dist/cjs/{validators-cadebc98.js → validators-938a0076.js} +1 -1
  171. package/dist/collection/collection-manifest.json +5 -0
  172. package/dist/collection/components/atoms/avatar/avatar.css +0 -252
  173. package/dist/collection/components/atoms/avatar/avatar.js +0 -14
  174. package/dist/collection/components/atoms/badge/badge.css +0 -252
  175. package/dist/collection/components/atoms/badge/badge.js +0 -14
  176. package/dist/collection/components/atoms/button/button.css +0 -252
  177. package/dist/collection/components/atoms/button/button.js +0 -14
  178. package/dist/collection/components/atoms/chip/chip.css +0 -252
  179. package/dist/collection/components/atoms/chip/chip.js +0 -14
  180. package/dist/collection/components/atoms/divider/divider.js +0 -14
  181. package/dist/collection/components/atoms/icon/icon.js +0 -14
  182. package/dist/collection/components/atoms/label/label.css +0 -252
  183. package/dist/collection/components/atoms/label/label.js +0 -14
  184. package/dist/collection/components/atoms/link/link.css +0 -252
  185. package/dist/collection/components/atoms/link/link.js +0 -14
  186. package/dist/collection/components/molecules/accordion/accordion.js +0 -14
  187. package/dist/collection/components/molecules/alert/alert.js +0 -14
  188. package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +0 -14
  189. package/dist/collection/components/molecules/button-group/button-group.css +0 -252
  190. package/dist/collection/components/molecules/button-group/button-group.js +0 -14
  191. package/dist/collection/components/molecules/card/card.css +0 -252
  192. package/dist/collection/components/molecules/card/card.js +0 -14
  193. package/dist/collection/components/molecules/checkbox/checkbox.css +0 -756
  194. package/dist/collection/components/molecules/colorful/colorful.css +0 -756
  195. package/dist/collection/components/molecules/drawer/drawer.css +0 -252
  196. package/dist/collection/components/molecules/drawer/drawer.js +0 -18
  197. package/dist/collection/components/molecules/dropdown/dropdown.css +0 -252
  198. package/dist/collection/components/molecules/dropdown/dropdown.js +48 -1
  199. package/dist/collection/components/molecules/empty/empty.js +0 -14
  200. package/dist/collection/components/molecules/error-layout/error-layout.css +0 -252
  201. package/dist/collection/components/molecules/error-layout/error-layout.js +0 -14
  202. package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -252
  203. package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +0 -14
  204. package/dist/collection/components/molecules/input/input.css +0 -756
  205. package/dist/collection/components/molecules/item/item.css +0 -252
  206. package/dist/collection/components/molecules/item/item.js +0 -14
  207. package/dist/collection/components/molecules/items/items.js +0 -14
  208. package/dist/collection/components/molecules/linked/linked.js +1 -15
  209. package/dist/collection/components/molecules/menu/menu.css +0 -252
  210. package/dist/collection/components/molecules/menu/menu.js +38 -0
  211. package/dist/collection/components/molecules/message/message.js +0 -14
  212. package/dist/collection/components/molecules/modal/modal.css +0 -252
  213. package/dist/collection/components/molecules/modal/modal.js +0 -14
  214. package/dist/collection/components/molecules/notification/notification.js +0 -14
  215. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -252
  216. package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +0 -14
  217. package/dist/collection/components/molecules/popconfirm/popconfirm.js +0 -14
  218. package/dist/collection/components/molecules/popover/popover.js +0 -14
  219. package/dist/collection/components/molecules/progress/progress.css +0 -252
  220. package/dist/collection/components/molecules/progress/progress.js +0 -14
  221. package/dist/collection/components/molecules/range/range.css +0 -252
  222. package/dist/collection/components/molecules/range/range.js +0 -14
  223. package/dist/collection/components/molecules/result/result.js +0 -14
  224. package/dist/collection/components/molecules/search/search.css +0 -756
  225. package/dist/collection/components/molecules/search/search.js +0 -14
  226. package/dist/collection/components/molecules/skeleton/skeleton.js +0 -14
  227. package/dist/collection/components/molecules/stepper/step.js +0 -14
  228. package/dist/collection/components/molecules/stepper/stepper.css +0 -252
  229. package/dist/collection/components/molecules/stepper/stepper.js +0 -18
  230. package/dist/collection/components/molecules/switch/switch.css +0 -756
  231. package/dist/collection/components/molecules/tab-group/tab-group.js +0 -14
  232. package/dist/collection/components/molecules/tab-group/tab-item-header.js +0 -14
  233. package/dist/collection/components/molecules/tab-group/tab-item.js +0 -14
  234. package/dist/collection/components/molecules/textarea/textarea.css +0 -756
  235. package/dist/collection/components/molecules/textarea/textarea.js +2 -1
  236. package/dist/collection/components/molecules/timeline/timeline-item.js +0 -14
  237. package/dist/collection/components/molecules/timeline/timeline.js +0 -14
  238. package/dist/collection/components/molecules/tooltip/tooltip.js +0 -14
  239. package/dist/collection/components/organism/autocomplete/autocomplete.js +0 -14
  240. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -756
  241. package/dist/collection/components/organism/form/form-group.js +0 -14
  242. package/dist/collection/components/organism/list/list.css +0 -1008
  243. package/dist/collection/components/other/attendance/attendance.css +0 -252
  244. package/dist/collection/components/other/attendance/attendance.js +0 -14
  245. package/dist/collection/components/other/box/box.js +0 -14
  246. package/dist/collection/components/other/data-table/table.js +0 -14
  247. package/dist/collection/components/other/default/default.js +0 -14
  248. package/dist/collection/components/other/input-custom/input-custom.js +0 -14
  249. package/dist/collection/components/other/modal-2/modal-2-footer.js +40 -0
  250. package/dist/collection/components/other/modal-2/modal-2-header.js +39 -0
  251. package/dist/collection/components/other/modal-2/modal-2.js +436 -0
  252. package/dist/collection/components/other/overlay/overlay.js +101 -0
  253. package/dist/collection/components/other/scroll-area/scroll-area.js +77 -0
  254. package/dist/collection/components/other/toast/toast.js +0 -14
  255. package/dist/collection/components/other/typography/typography.js +0 -14
  256. package/dist/collection/components/other_deprecated/collapse/collapse.js +0 -14
  257. package/dist/collection/components/other_deprecated/collapse/group.js +0 -14
  258. package/dist/collection/components/other_deprecated/colorpicker/colorpicker.js +0 -14
  259. package/dist/collection/components/other_deprecated/listbox/listbox.js +0 -14
  260. package/dist/collection/components/other_deprecated/old-input/old-input.css +0 -756
  261. package/dist/collection/components/other_deprecated/old-input/old-input.js +0 -14
  262. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +0 -252
  263. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +0 -14
  264. package/dist/collection/components/other_deprecated/old-popover/old-popover.js +0 -14
  265. package/dist/collection/components/other_deprecated/old-search/old-search.js +0 -14
  266. package/dist/collection/components/other_deprecated/old-tag/old-tag.js +0 -14
  267. package/dist/collection/components/other_deprecated/select/select.js +0 -14
  268. package/dist/collection/components/other_deprecated/tabs/tab-pane.js +0 -14
  269. package/dist/collection/components/other_deprecated/tabs/tab.css +0 -252
  270. package/dist/collection/components/other_deprecated/tabs/tab.js +0 -14
  271. package/dist/collection/components/other_deprecated/tabs/tabs-content.js +0 -14
  272. package/dist/collection/components/other_deprecated/tabs/tabs.js +0 -14
  273. package/dist/collection/components/other_deprecated/tag/tag.js +0 -14
  274. package/dist/collection/components/other_deprecated/text/text.css +0 -252
  275. package/dist/collection/components/other_deprecated/text/text.js +0 -14
  276. package/dist/collection/components/other_deprecated/treeview/treeview.js +0 -14
  277. package/dist/collection/global/components/_checkbox.css +0 -252
  278. package/dist/collection/helper/generate.js +0 -17
  279. package/dist/collection/helper/popover-helper.js +0 -1
  280. package/dist/collection/helper/tooltip-helper.js +0 -1
  281. package/dist/components/avatar.js +1 -15
  282. package/dist/components/badge.js +1 -15
  283. package/dist/components/bcm-accordion.js +0 -14
  284. package/dist/components/bcm-alert.js +0 -14
  285. package/dist/components/bcm-attendance.js +1 -15
  286. package/dist/components/bcm-autocomplete.js +0 -14
  287. package/dist/components/bcm-box.js +0 -14
  288. package/dist/components/bcm-breadcrumb.js +0 -14
  289. package/dist/components/bcm-button-group.js +1 -15
  290. package/dist/components/bcm-card.js +1 -15
  291. package/dist/components/bcm-chip.js +1 -15
  292. package/dist/components/bcm-collapse-group.js +0 -14
  293. package/dist/components/bcm-collapse.js +0 -14
  294. package/dist/components/bcm-colorpicker.js +0 -14
  295. package/dist/components/bcm-default.js +0 -14
  296. package/dist/components/bcm-drawer.js +1 -15
  297. package/dist/components/bcm-dropdown.js +17 -3
  298. package/dist/components/bcm-error-layout.js +1 -15
  299. package/dist/components/bcm-expansion-panel.js +1 -15
  300. package/dist/components/bcm-form-group.js +0 -14
  301. package/dist/components/bcm-input-custom.js +0 -14
  302. package/dist/components/bcm-item.js +1 -15
  303. package/dist/components/bcm-items.js +0 -14
  304. package/dist/components/bcm-list.js +1 -1
  305. package/dist/components/bcm-message.js +0 -14
  306. package/dist/components/bcm-modal-2-footer.d.ts +11 -0
  307. package/dist/components/bcm-modal-2-footer.js +46 -0
  308. package/dist/components/bcm-modal-2-header.d.ts +11 -0
  309. package/dist/components/bcm-modal-2-header.js +45 -0
  310. package/dist/components/bcm-modal-2.d.ts +11 -0
  311. package/dist/components/bcm-modal-2.js +193 -0
  312. package/dist/components/bcm-modal.js +1 -15
  313. package/dist/components/bcm-notification.js +0 -14
  314. package/dist/components/bcm-overlay.d.ts +11 -0
  315. package/dist/components/bcm-overlay.js +10 -0
  316. package/dist/components/bcm-popconfirm.js +0 -14
  317. package/dist/components/bcm-popover.js +0 -15
  318. package/dist/components/bcm-progress.js +1 -15
  319. package/dist/components/bcm-range.js +1 -15
  320. package/dist/components/bcm-result.js +0 -14
  321. package/dist/components/bcm-scroll-area.d.ts +11 -0
  322. package/dist/components/bcm-scroll-area.js +10 -0
  323. package/dist/components/bcm-select.js +0 -14
  324. package/dist/components/bcm-stepper.js +2 -16
  325. package/dist/components/bcm-switch.js +1 -1
  326. package/dist/components/bcm-tab-group.js +0 -14
  327. package/dist/components/bcm-tab-item-header.js +0 -14
  328. package/dist/components/bcm-tab-item.js +0 -14
  329. package/dist/components/bcm-tab-pane.js +0 -14
  330. package/dist/components/bcm-tab.js +1 -15
  331. package/dist/components/bcm-table.js +0 -14
  332. package/dist/components/bcm-tabs-content.js +0 -14
  333. package/dist/components/bcm-tabs.js +0 -14
  334. package/dist/components/bcm-tag.js +0 -14
  335. package/dist/components/bcm-textarea.js +3 -2
  336. package/dist/components/bcm-timeline-item.js +0 -14
  337. package/dist/components/bcm-timeline.js +0 -14
  338. package/dist/components/bcm-toast.js +0 -14
  339. package/dist/components/button.js +1 -15
  340. package/dist/components/checkbox-lite.js +1 -1
  341. package/dist/components/checkbox.js +1 -1
  342. package/dist/components/color-helper.js +8 -8
  343. package/dist/components/colorful.js +1 -1
  344. package/dist/components/colors2.js +4 -4
  345. package/dist/components/datetime-picker.js +1 -1
  346. package/dist/components/divider.js +0 -14
  347. package/dist/components/empty.js +0 -14
  348. package/dist/components/generate.js +4 -21
  349. package/dist/components/icon.js +0 -14
  350. package/dist/components/index.d.ts +5 -0
  351. package/dist/components/index.js +5 -0
  352. package/dist/components/input.js +1 -1
  353. package/dist/components/label.js +1 -15
  354. package/dist/components/link.js +1 -15
  355. package/dist/components/linked.js +1 -15
  356. package/dist/components/listbox.js +0 -14
  357. package/dist/components/menu.js +11 -2
  358. package/dist/components/old-bcm-popover.js +0 -14
  359. package/dist/components/old-input.js +1 -15
  360. package/dist/components/old-popover-box.js +1 -15
  361. package/dist/components/old-search.js +0 -14
  362. package/dist/components/old-tag.js +0 -14
  363. package/dist/components/overlay.js +47 -0
  364. package/dist/components/popconfirm-box.js +1 -15
  365. package/dist/components/scroll-area.js +40 -0
  366. package/dist/components/search.js +1 -15
  367. package/dist/components/skeleton.js +0 -14
  368. package/dist/components/step.js +0 -14
  369. package/dist/components/text.js +1 -15
  370. package/dist/components/tooltip-helper.js +0 -1
  371. package/dist/components/tooltip.js +0 -14
  372. package/dist/components/treeview.js +0 -14
  373. package/dist/components/typography.js +0 -14
  374. package/dist/esm/bcm-accordion.entry.js +2 -16
  375. package/dist/esm/bcm-alert.entry.js +2 -16
  376. package/dist/esm/bcm-attendance.entry.js +3 -17
  377. package/dist/esm/bcm-autocomplete.entry.js +0 -14
  378. package/dist/esm/bcm-avatar_2.entry.js +7 -34
  379. package/dist/esm/bcm-box.entry.js +0 -14
  380. package/dist/esm/bcm-breadcrumb.entry.js +2 -16
  381. package/dist/esm/bcm-button-group.entry.js +3 -17
  382. package/dist/esm/bcm-button_7.entry.js +1508 -0
  383. package/dist/esm/bcm-card.entry.js +4 -18
  384. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -69
  385. package/dist/esm/bcm-chip.entry.js +4 -18
  386. package/dist/esm/bcm-collapse-group.entry.js +0 -14
  387. package/dist/esm/bcm-collapse.entry.js +2 -16
  388. package/dist/esm/bcm-color-input.entry.js +5 -5
  389. package/dist/esm/bcm-colorful_2.entry.js +7 -21
  390. package/dist/esm/bcm-colorpicker.entry.js +0 -14
  391. package/dist/esm/bcm-date-picker.entry.js +2 -2
  392. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  393. package/dist/esm/bcm-default.entry.js +2 -16
  394. package/dist/esm/bcm-drawer.entry.js +6 -20
  395. package/dist/esm/bcm-dropdown.entry.js +17 -5
  396. package/dist/esm/bcm-error-layout.entry.js +1 -15
  397. package/dist/esm/bcm-expansion-panel.entry.js +4 -18
  398. package/dist/esm/bcm-form-2.entry.js +2 -2
  399. package/dist/esm/bcm-form-group.entry.js +0 -14
  400. package/dist/esm/bcm-input-custom.entry.js +2 -16
  401. package/dist/esm/bcm-input.entry.js +6 -6
  402. package/dist/esm/bcm-item.entry.js +4 -18
  403. package/dist/esm/bcm-items.entry.js +2 -16
  404. package/dist/esm/bcm-link.entry.js +1 -15
  405. package/dist/esm/bcm-list.entry.js +8 -8
  406. package/dist/esm/bcm-menu.entry.js +15 -7
  407. package/dist/esm/bcm-message.entry.js +0 -14
  408. package/dist/esm/bcm-modal-2-footer.entry.js +32 -0
  409. package/dist/esm/bcm-modal-2-header.entry.js +31 -0
  410. package/dist/esm/bcm-modal-2.entry.js +154 -0
  411. package/dist/esm/bcm-modal.entry.js +3 -17
  412. package/dist/esm/bcm-notification.entry.js +0 -14
  413. package/dist/esm/bcm-old-input.entry.js +1 -15
  414. package/dist/esm/bcm-old-tag_2.entry.js +0 -14
  415. package/dist/esm/bcm-overlay_2.entry.js +43 -0
  416. package/dist/esm/bcm-popconfirm-box.entry.js +4 -18
  417. package/dist/esm/bcm-popconfirm.entry.js +2 -16
  418. package/dist/esm/bcm-popover.entry.js +5 -20
  419. package/dist/esm/bcm-progress.entry.js +4 -18
  420. package/dist/esm/bcm-radio-group.entry.js +5 -5
  421. package/dist/esm/bcm-radio.entry.js +5 -5
  422. package/dist/esm/bcm-range.entry.js +3 -17
  423. package/dist/esm/bcm-result.entry.js +0 -14
  424. package/dist/esm/bcm-search.entry.js +4 -18
  425. package/dist/esm/bcm-select.entry.js +0 -14
  426. package/dist/esm/bcm-skeleton.entry.js +2 -16
  427. package/dist/esm/bcm-step.entry.js +3 -17
  428. package/dist/esm/bcm-stepper.entry.js +8 -22
  429. package/dist/esm/bcm-switch.entry.js +3 -3
  430. package/dist/esm/bcm-tab-group.entry.js +5 -19
  431. package/dist/esm/bcm-tab-item-header.entry.js +5 -19
  432. package/dist/esm/bcm-tab-item.entry.js +5 -19
  433. package/dist/esm/bcm-tab-pane.entry.js +0 -14
  434. package/dist/esm/bcm-tab.entry.js +1 -15
  435. package/dist/esm/bcm-table.entry.js +0 -14
  436. package/dist/esm/bcm-tabs-content.entry.js +0 -14
  437. package/dist/esm/bcm-tabs.entry.js +0 -14
  438. package/dist/esm/bcm-tag.entry.js +3 -17
  439. package/dist/esm/bcm-text.entry.js +3 -17
  440. package/dist/esm/bcm-textarea.entry.js +6 -5
  441. package/dist/esm/bcm-time-picker.entry.js +2 -2
  442. package/dist/esm/bcm-timeline-item.entry.js +0 -14
  443. package/dist/esm/bcm-timeline.entry.js +0 -14
  444. package/dist/esm/bcm-toast.entry.js +2 -16
  445. package/dist/esm/bcm-typography.entry.js +17 -0
  446. package/dist/esm/bromcom-ui.js +1 -1
  447. package/dist/esm/{color-helper-4fa5dd0d.js → color-helper-e8ce23d7.js} +8 -8
  448. package/dist/esm/{colors-fa05fe33.js → colors-44c95e7e.js} +4 -4
  449. package/dist/esm/{generate-508e45d7.js → generate-f143b805.js} +4 -21
  450. package/dist/esm/{input-template-04e8c524.js → input-template-71b886ab.js} +1 -1
  451. package/dist/esm/{json-parse-decarator-0159345f.js → json-parse-decarator-6a093fcc.js} +1 -1
  452. package/dist/esm/loader.js +1 -1
  453. package/dist/esm/{number-helper-b9dc0cca.js → number-helper-07976b6e.js} +1 -1
  454. package/dist/esm/old-bcm-popover-box.entry.js +4 -18
  455. package/dist/esm/old-bcm-popover.entry.js +2 -16
  456. package/dist/esm/{stepper-states-3bdf94bf.js → stepper-states-4c12cbb1.js} +1 -1
  457. package/dist/esm/{tooltip-helper-c3251673.js → tooltip-helper-2f9f708c.js} +4 -5
  458. package/dist/esm/{validators-89c43bb2.js → validators-ba7d8cc6.js} +1 -1
  459. package/dist/types/components/molecules/dropdown/dropdown.d.ts +4 -0
  460. package/dist/types/components/molecules/menu/menu.d.ts +3 -0
  461. package/dist/types/components/molecules/textarea/textarea.d.ts +1 -1
  462. package/dist/types/components/other/modal-2/modal-2-footer.d.ts +7 -0
  463. package/dist/types/components/other/modal-2/modal-2-header.d.ts +7 -0
  464. package/dist/types/components/other/modal-2/modal-2.d.ts +33 -0
  465. package/dist/types/components/other/overlay/overlay.d.ts +8 -0
  466. package/dist/types/components/other/scroll-area/scroll-area.d.ts +7 -0
  467. package/dist/types/components.d.ts +115 -0
  468. package/dist/types/helper/generate.d.ts +0 -1
  469. package/package.json +1 -1
  470. package/dist/bromcom-ui/p-0474d8a8.entry.js +0 -5
  471. package/dist/bromcom-ui/p-04d4c6e7.entry.js +0 -5
  472. package/dist/bromcom-ui/p-0557b296.entry.js +0 -5
  473. package/dist/bromcom-ui/p-11930706.entry.js +0 -5
  474. package/dist/bromcom-ui/p-14a0a646.entry.js +0 -5
  475. package/dist/bromcom-ui/p-18af92a9.entry.js +0 -5
  476. package/dist/bromcom-ui/p-198d17cf.entry.js +0 -5
  477. package/dist/bromcom-ui/p-19b258fa.entry.js +0 -5
  478. package/dist/bromcom-ui/p-19c2c7ec.entry.js +0 -5
  479. package/dist/bromcom-ui/p-1e264881.entry.js +0 -5
  480. package/dist/bromcom-ui/p-221448f8.entry.js +0 -5
  481. package/dist/bromcom-ui/p-2722b2c7.entry.js +0 -5
  482. package/dist/bromcom-ui/p-29829587.entry.js +0 -5
  483. package/dist/bromcom-ui/p-2ea1274e.entry.js +0 -5
  484. package/dist/bromcom-ui/p-31226526.entry.js +0 -5
  485. package/dist/bromcom-ui/p-39eda493.entry.js +0 -5
  486. package/dist/bromcom-ui/p-3bb63b25.entry.js +0 -5
  487. package/dist/bromcom-ui/p-3cbddb46.entry.js +0 -5
  488. package/dist/bromcom-ui/p-428a472e.entry.js +0 -5
  489. package/dist/bromcom-ui/p-44f2ea48.entry.js +0 -5
  490. package/dist/bromcom-ui/p-58651d85.entry.js +0 -5
  491. package/dist/bromcom-ui/p-67a1b9fb.entry.js +0 -5
  492. package/dist/bromcom-ui/p-6af68be0.entry.js +0 -5
  493. package/dist/bromcom-ui/p-6cc73d59.entry.js +0 -5
  494. package/dist/bromcom-ui/p-6e0345b0.entry.js +0 -5
  495. package/dist/bromcom-ui/p-6e920b36.entry.js +0 -5
  496. package/dist/bromcom-ui/p-720059b9.entry.js +0 -5
  497. package/dist/bromcom-ui/p-73dd9b71.entry.js +0 -5
  498. package/dist/bromcom-ui/p-76358e74.js +0 -5
  499. package/dist/bromcom-ui/p-766e3781.entry.js +0 -10
  500. package/dist/bromcom-ui/p-78522f83.entry.js +0 -5
  501. package/dist/bromcom-ui/p-7a37fc46.entry.js +0 -5
  502. package/dist/bromcom-ui/p-7aca0f4e.entry.js +0 -5
  503. package/dist/bromcom-ui/p-81eb449f.entry.js +0 -5
  504. package/dist/bromcom-ui/p-88ace511.entry.js +0 -5
  505. package/dist/bromcom-ui/p-8e2540d8.entry.js +0 -5
  506. package/dist/bromcom-ui/p-9189c392.entry.js +0 -5
  507. package/dist/bromcom-ui/p-97933e31.entry.js +0 -5
  508. package/dist/bromcom-ui/p-9c629169.entry.js +0 -5
  509. package/dist/bromcom-ui/p-9c72f6f1.entry.js +0 -5
  510. package/dist/bromcom-ui/p-a5b58ffc.entry.js +0 -5
  511. package/dist/bromcom-ui/p-b0525d89.entry.js +0 -5
  512. package/dist/bromcom-ui/p-ba35487f.entry.js +0 -5
  513. package/dist/bromcom-ui/p-c6515acd.js +0 -5
  514. package/dist/bromcom-ui/p-c85d5bb2.entry.js +0 -5
  515. package/dist/bromcom-ui/p-cd4b11f9.entry.js +0 -5
  516. package/dist/bromcom-ui/p-d93dc796.entry.js +0 -5
  517. package/dist/bromcom-ui/p-e6ca16b0.entry.js +0 -5
  518. package/dist/bromcom-ui/p-e84f277e.entry.js +0 -5
  519. package/dist/bromcom-ui/p-e8c5da52.js +0 -5
  520. package/dist/bromcom-ui/p-eb44664d.entry.js +0 -5
  521. package/dist/bromcom-ui/p-f529ded0.entry.js +0 -5
  522. package/dist/bromcom-ui/p-f6732a5f.entry.js +0 -5
  523. package/dist/bromcom-ui/p-f74e5ed7.entry.js +0 -5
  524. package/dist/bromcom-ui/p-f995e773.entry.js +0 -5
  525. package/dist/bromcom-ui/p-f9d6fa4d.entry.js +0 -5
  526. package/dist/bromcom-ui/p-fafa77b7.entry.js +0 -5
  527. package/dist/bromcom-ui/p-fe382dcc.entry.js +0 -5
  528. package/dist/bromcom-ui/p-fed31df8.entry.js +0 -5
  529. package/dist/bromcom-ui/p-ff1acc28.entry.js +0 -5
  530. package/dist/cjs/bcm-button.cjs.entry.js +0 -385
  531. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -416
  532. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -206
  533. package/dist/cjs/bcm-form.cjs.entry.js +0 -487
  534. package/dist/cjs/bcm-icon.cjs.entry.js +0 -41
  535. package/dist/cjs/bcm-label_2.cjs.entry.js +0 -149
  536. package/dist/collection/components/external-source/bcm-toast-helper.js +0 -20
  537. package/dist/collection/components/external-source/test.js/bcm-toast-helper.js +0 -20
  538. package/dist/esm/bcm-button.entry.js +0 -381
  539. package/dist/esm/bcm-checkbox-group.entry.js +0 -412
  540. package/dist/esm/bcm-checkbox_2.entry.js +0 -201
  541. package/dist/esm/bcm-form.entry.js +0 -483
  542. package/dist/esm/bcm-icon.entry.js +0 -37
  543. package/dist/esm/bcm-label_2.entry.js +0 -144
  544. package/dist/types/components/external-source/bcm-toast-helper.d.ts +0 -12
  545. package/dist/types/components/external-source/test.js/bcm-toast-helper.d.ts +0 -12
@@ -0,0 +1,1508 @@
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-f143b805.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 { C as CaptionTemplate } from './caption-template-da16ba7b.js';
13
+ import { d as delay, g as getChildElements } from './utils-57652744.js';
14
+ import { I as IsLoad } from './is-load-decorator-bc14ec4b.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-07976b6e.js';
19
+ import './validators-ba7d8cc6.js';
20
+ import { T as Tooltip } from './tooltip-helper-2f9f708c.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
+ const BcmButton = class {
237
+ constructor(hostRef) {
238
+ registerInstance(this, hostRef);
239
+ this.bcmClick = createEvent(this, "bcm-click", 7);
240
+ this._id = Generate.UID();
241
+ this.hidden = false;
242
+ this.type = Bcm.ButtonType.button;
243
+ this.size = Bcm.Size.medium;
244
+ this.disabled = false;
245
+ this.kind = Bcm.Kind.solid;
246
+ this.outline = false;
247
+ this.icon = undefined;
248
+ this.href = undefined;
249
+ this.target = undefined;
250
+ this.value = undefined;
251
+ this.loading = false;
252
+ this.variant = undefined;
253
+ this.dataDismiss = false;
254
+ this.fullWidth = false;
255
+ this.iconPosition = Bcm.IconPosition.prefix;
256
+ this.color = undefined;
257
+ this.checked = false;
258
+ }
259
+ handleOnClick(e) {
260
+ if (this.disabled) {
261
+ e.preventDefault();
262
+ e.stopPropagation();
263
+ return false;
264
+ }
265
+ }
266
+ componentWillRender() {
267
+ const { size, kind, icon, iconPosition, disabled, outline, href, type, target, loading, variant, fullWidth, hidden, value } = this;
268
+ buttonState.setValue({
269
+ id: this._id,
270
+ size,
271
+ type,
272
+ kind,
273
+ icon,
274
+ iconPosition,
275
+ disabled,
276
+ outline,
277
+ href,
278
+ target,
279
+ loading,
280
+ variant,
281
+ fullWidth,
282
+ hidden,
283
+ value,
284
+ isIconOnly: !!(this.isHaveChildNodes() && this.icon),
285
+ });
286
+ }
287
+ getStateData() {
288
+ return buttonState.getValue(this._id);
289
+ }
290
+ isHaveChildNodes() {
291
+ const childNodes = Array.from(this.el.childNodes);
292
+ return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
293
+ }
294
+ setColor(color = this.color) {
295
+ if (!color)
296
+ return;
297
+ const { kind } = this;
298
+ const prefix = `--bcm-button-${kind}`;
299
+ if (kind === 'solid') {
300
+ return {
301
+ [`${prefix}-color-default`]: ColorHelper.dsColor('white'),
302
+ [`${prefix}-color-hover`]: ColorHelper.dsColor('white'),
303
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor('white'),
304
+ [`${prefix}-color-active`]: ColorHelper.dsColor('white'),
305
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
306
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-500'),
307
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-600'),
308
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-700'),
309
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-800'),
310
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
311
+ [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-500'),
312
+ [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-600'),
313
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-700'),
314
+ [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-800'),
315
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor('slate-400')
316
+ };
317
+ }
318
+ else if (kind == 'link') {
319
+ return {
320
+ [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-500'),
321
+ [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
322
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
323
+ [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-700'),
324
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor('slate-400'),
325
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor('transparent'),
326
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor('transparent'),
327
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
328
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor('slate-50'),
329
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor('transparent'),
330
+ [`${prefix}-border-default`]: ColorHelper.dsColor('transparent'),
331
+ [`${prefix}-border-hover`]: ColorHelper.dsColor('transparent'),
332
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor('slate-50'),
333
+ [`${prefix}-border-active`]: ColorHelper.dsColor('slate-50'),
334
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor('transparent')
335
+ };
336
+ }
337
+ else if (kind == 'ghost') {
338
+ return {
339
+ [`${prefix}-color-default`]: ColorHelper.dsColor(color + '-600'),
340
+ [`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-600'),
341
+ [`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-600'),
342
+ [`${prefix}-color-active`]: ColorHelper.dsColor(color + '-600'),
343
+ [`${prefix}-color-disabled`]: ColorHelper.dsColor(color + '-300'),
344
+ [`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-100'),
345
+ [`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-200'),
346
+ [`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-400'),
347
+ [`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-300'),
348
+ [`${prefix}-background-color-disabled`]: ColorHelper.dsColor(color + '-50'),
349
+ [`${prefix}-border-default`]: ColorHelper.dsColor(color + '-300'),
350
+ [`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-400'),
351
+ [`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-600'),
352
+ [`${prefix}-border-active`]: ColorHelper.dsColor(color + '-500'),
353
+ [`${prefix}-border-disabled`]: ColorHelper.dsColor(color + '-200'),
354
+ };
355
+ }
356
+ return;
357
+ }
358
+ render() {
359
+ const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
360
+ const classPrefix = 'bcm-button';
361
+ let componentClass = classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
362
+ 'full-width': fullWidth,
363
+ 'checked': this.checked,
364
+ 'disabled': disabled,
365
+ });
366
+ const hostClasses = classnames(`${classPrefix}`, {
367
+ hidden,
368
+ 'full-width': fullWidth,
369
+ });
370
+ 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 })));
371
+ }
372
+ get el() { return getElement(this); }
373
+ };
374
+ BcmButton.style = buttonCss;
375
+
376
+ 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}";
377
+
378
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
379
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
380
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
381
+ r = Reflect.decorate(decorators, target, key, desc);
382
+ else
383
+ for (var i = decorators.length - 1; i >= 0; i--)
384
+ if (d = decorators[i])
385
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
386
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
387
+ };
388
+ const BcmCheckbox = class {
389
+ constructor(hostRef) {
390
+ registerInstance(this, hostRef);
391
+ this.blur = createEvent(this, "bcm-blur", 7);
392
+ this.focus = createEvent(this, "bcm-focus", 7);
393
+ this.change = createEvent(this, "bcm-change", 7);
394
+ this.changeCheckbox = createEvent(this, "bcm-change-checkbox", 7);
395
+ this._id = Generate.UID();
396
+ this.inGroup = false;
397
+ this.value = false;
398
+ this.checked = false;
399
+ this.name = undefined;
400
+ this.disabled = false;
401
+ this.hidden = false;
402
+ this.required = false;
403
+ this.label = undefined;
404
+ this.readonly = false;
405
+ this.size = Bcm.Size.medium;
406
+ this.indeterminate = null;
407
+ this.color = "blue";
408
+ this.caption = undefined;
409
+ this.noCaption = false;
410
+ this.captionError = undefined;
411
+ this.captionType = Bcm.Status.default;
412
+ this.captionCache = undefined;
413
+ this.captionTypeCache = undefined;
414
+ }
415
+ connectedCallback() {
416
+ this.captionCache = this.caption;
417
+ this.captionTypeCache = this.captionType;
418
+ this.value = this.checked;
419
+ }
420
+ componentDidRender() {
421
+ this.inputElement.checked = this.checked;
422
+ }
423
+ async onBcmFocus() {
424
+ this.el.focus();
425
+ }
426
+ async onBcmBlur() {
427
+ this.el.blur();
428
+ }
429
+ async setClear() {
430
+ this.check(false);
431
+ this.handleChange();
432
+ await delay(10);
433
+ return Promise.resolve();
434
+ }
435
+ async resetCaption() {
436
+ await delay(10);
437
+ this.caption = this.captionCache;
438
+ this.captionType = this.captionTypeCache;
439
+ this.captionError = null;
440
+ await delay(10);
441
+ return Promise.resolve();
442
+ }
443
+ handleChange() {
444
+ this.checked = this.inputElement.checked;
445
+ this.value = this.checked;
446
+ if (!this.indeterminate) {
447
+ this.changeCheckbox.emit();
448
+ this.change.emit({
449
+ name: this.name,
450
+ value: this.checked
451
+ });
452
+ }
453
+ }
454
+ watchIndeterminate(newValue, oldValue) {
455
+ if (newValue != oldValue) {
456
+ this.inputElement.checked = this.indeterminate == Bcm.IndeterminateType.determinate ? true : false;
457
+ this.handleChange();
458
+ }
459
+ }
460
+ async set(data) {
461
+ if (typeof data === 'boolean') {
462
+ await this.check(data);
463
+ }
464
+ }
465
+ async get() {
466
+ return this.checked || false;
467
+ }
468
+ async check(uncheck = true) {
469
+ this.inputElement.checked = uncheck;
470
+ this.handleChange();
471
+ }
472
+ handleKeyUp(ev) {
473
+ if (ev.keyCode == Bcm.KeyCode.space || ev.keyCode == Bcm.KeyCode.enter) {
474
+ if (!this.disabled && !this.readonly) {
475
+ this.inputElement.checked = !this.inputElement.checked;
476
+ this.handleChange();
477
+ }
478
+ ev.stopPropagation();
479
+ ev.preventDefault();
480
+ return false;
481
+ }
482
+ }
483
+ watchChecked() {
484
+ if (this.checked) {
485
+ this.resetCaption();
486
+ }
487
+ this.value = this.checked;
488
+ }
489
+ setColor(color = this.color) {
490
+ if (!color)
491
+ return;
492
+ const prefix = `--bcm-checkbox`;
493
+ return {
494
+ [`${prefix}-primary-color-default`]: ColorHelper.dsColor(color + '-500'),
495
+ [`${prefix}-primary-color-hover`]: ColorHelper.dsColor(color + '-600'),
496
+ [`${prefix}-primary-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
497
+ [`${prefix}-primary-color-active`]: ColorHelper.dsColor(color + '-700'),
498
+ // [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
499
+ [`${prefix}-secondary-color-default`]: ColorHelper.dsColor('white'),
500
+ [`${prefix}-secondary-color-hover`]: ColorHelper.dsColor('slate-50'),
501
+ [`${prefix}-secondary-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
502
+ [`${prefix}-secondary-color-active`]: ColorHelper.dsColor('slate-50'),
503
+ // [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
504
+ };
505
+ }
506
+ render() {
507
+ const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
508
+ //////
509
+ const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
510
+ 'error': captionType == Bcm.Status.error,
511
+ hidden,
512
+ checked,
513
+ disabled,
514
+ required,
515
+ readonly,
516
+ });
517
+ const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
518
+ 'bcm-checkbox__label-icon-checked': checked,
519
+ });
520
+ const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
521
+ const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
522
+ 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 })));
523
+ }
524
+ get el() { return getElement(this); }
525
+ static get watchers() { return {
526
+ "indeterminate": ["watchIndeterminate"],
527
+ "checked": ["watchChecked"]
528
+ }; }
529
+ };
530
+ __decorate$2([
531
+ IsLoad()
532
+ ], BcmCheckbox.prototype, "el", void 0);
533
+ BcmCheckbox.style = checkboxCss;
534
+
535
+ const { state } = createStore({
536
+ group: new Map(),
537
+ allChecked: true,
538
+ allUnchecked: true,
539
+ changeInderminate: {},
540
+ });
541
+ const setValue = async ({ fullWidth, optionType, buttonStyle, size, defaultCheckedItems, el, id, label, required, captionType, hidden, direction, childs, indeterminate, gap, noCaption, }) => {
542
+ if (el) {
543
+ state.group.set(id, {
544
+ fullWidth,
545
+ optionType,
546
+ buttonStyle,
547
+ size,
548
+ defaultCheckedItems,
549
+ label,
550
+ required,
551
+ captionType,
552
+ hidden,
553
+ direction,
554
+ indeterminate,
555
+ gap,
556
+ noCaption,
557
+ childs: childs === null || childs === void 0 ? void 0 : childs.map(child => {
558
+ child.checked && (state.allUnchecked = false);
559
+ !child.checked && (state.allChecked = false);
560
+ // fullWidth && (fullWidth == 'flex' ? (child.style.flex = 'auto') : (child.style.width = '100%'));
561
+ optionType && (child.optionType = optionType);
562
+ buttonStyle && (child.buttonStyle = buttonStyle);
563
+ size && (child.size = size);
564
+ defaultCheckedItems && defaultCheckedItems.find(e => e === child.name) && (child.checked = true);
565
+ child.noCaption = noCaption;
566
+ return {
567
+ id: child.id || Generate.UID(),
568
+ checked: child.checked || false,
569
+ name: child.name,
570
+ size: child.size,
571
+ buttonStyle: child.buttonStyle,
572
+ optionType: child.optionType,
573
+ style: child.style,
574
+ noCaption: child.noCaption,
575
+ color: child.color,
576
+ disabled: child.disabled,
577
+ readonly: child.readonly,
578
+ label: child.label || child.name,
579
+ slot: child.slot || snq(() => child.querySelector('.slot').textContent, child.textContent),
580
+ required: child.required || required,
581
+ el: child,
582
+ captionType,
583
+ hidden,
584
+ };
585
+ }),
586
+ indeterminateState: !state.allChecked && !state.allUnchecked ? 'indeterminate' : state.allChecked ? 'determinate' : 'uncheck',
587
+ });
588
+ }
589
+ };
590
+ const getProperty = id => {
591
+ return snq(() => state.group.get(id), {});
592
+ };
593
+ const getValue = (id, name) => {
594
+ var _a;
595
+ const group = getProperty(id);
596
+ let value = {};
597
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
598
+ if (name) {
599
+ if (child.name === name) {
600
+ value[child.name] = {
601
+ value: !!child.checked,
602
+ name: child.name,
603
+ };
604
+ }
605
+ }
606
+ else {
607
+ value[child.name] = {
608
+ value: !!child.checked,
609
+ name: child.name,
610
+ };
611
+ }
612
+ });
613
+ return value;
614
+ };
615
+ const getCheckedList = id => {
616
+ var _a;
617
+ const group = getProperty(id);
618
+ let value = {};
619
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
620
+ if (child.checked === true) {
621
+ value[child.name] = {
622
+ value: !!child.checked,
623
+ name: child.name,
624
+ };
625
+ }
626
+ });
627
+ return value;
628
+ };
629
+ const setClear = id => {
630
+ var _a;
631
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
632
+ child.checked = false;
633
+ });
634
+ checkInderminate(id);
635
+ };
636
+ const setCheckedItems = (id, items, checked, reset) => {
637
+ var _a;
638
+ const checkedItems = items && (typeof items == 'string' ? JSON.parse(items) : items);
639
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
640
+ if (checkedItems) {
641
+ const checkedItem = checkedItems.find(e => e === child.name || e.name === child.name);
642
+ if (checkedItem) {
643
+ if (typeof checkedItem == 'object') {
644
+ Object.keys(checkedItem).map(key => {
645
+ if (key === 'checked') {
646
+ child.checked = checkedItem[key];
647
+ }
648
+ else {
649
+ child.checked = checked;
650
+ }
651
+ });
652
+ }
653
+ else {
654
+ child.checked = checked;
655
+ }
656
+ }
657
+ else {
658
+ reset && (child.checked = false);
659
+ }
660
+ }
661
+ else {
662
+ child.checked = false;
663
+ }
664
+ });
665
+ checkInderminate(id);
666
+ };
667
+ const resetCaption = id => {
668
+ var _a;
669
+ // const noCaption = getProperty(id).noCaption;
670
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
671
+ child.resetCaption();
672
+ // child.noCaption = noCaption;
673
+ });
674
+ };
675
+ const changeIndeterminate = id => {
676
+ var _a;
677
+ const group = getProperty(id);
678
+ if (!group.disabled) {
679
+ let checkAll = true;
680
+ if (group.indeterminateState === 'determinate') {
681
+ checkAll = false;
682
+ }
683
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
684
+ child.checked = checkAll;
685
+ });
686
+ checkInderminate(id);
687
+ }
688
+ };
689
+ const checkInderminate = id => {
690
+ var _a;
691
+ const group = getProperty(id);
692
+ let allChecked = true;
693
+ let allUnchecked = true;
694
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
695
+ child.checked && (allUnchecked = false);
696
+ !child.checked && (allChecked = false);
697
+ });
698
+ group.indeterminateState = !allChecked && !allUnchecked ? 'indeterminate' : allChecked ? 'determinate' : 'uncheck';
699
+ };
700
+ const onChange = (obj) => {
701
+ var _a;
702
+ (_a = getProperty(obj.id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
703
+ child.checked = child.id === obj.childId ? !child.checked : child.checked;
704
+ });
705
+ checkInderminate(obj.id);
706
+ };
707
+ const removeState = id => {
708
+ return Promise.resolve(state.group.delete(id));
709
+ };
710
+ const getStatesKeys = id => {
711
+ return Object.keys(state.group.get(id));
712
+ };
713
+ const checkBoxGroupState = {
714
+ setValue,
715
+ getValue,
716
+ setCheckedItems,
717
+ getCheckedList,
718
+ getProperty,
719
+ setClear,
720
+ resetCaption,
721
+ onChange,
722
+ getStatesKeys,
723
+ state,
724
+ removeState,
725
+ changeIndeterminate,
726
+ };
727
+
728
+ const CheckboxGroupTemplate = ({ customStyle, groupContainerClasses, onBcmSelect, items }) => {
729
+ return (h("div", { class: groupContainerClasses, style: customStyle }, items.childs && items.childs.map((checkbox) => {
730
+ 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));
731
+ })));
732
+ };
733
+
734
+ 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}";
735
+
736
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
737
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
738
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
739
+ r = Reflect.decorate(decorators, target, key, desc);
740
+ else
741
+ for (var i = decorators.length - 1; i >= 0; i--)
742
+ if (d = decorators[i])
743
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
744
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
745
+ };
746
+ const BcmCheckboxGroup = class {
747
+ constructor(hostRef) {
748
+ registerInstance(this, hostRef);
749
+ this.change = createEvent(this, "bcm-change", 7);
750
+ this.groupCheckedList = createEvent(this, "bcm-group-checked-list", 7);
751
+ this._id = Generate.UID();
752
+ this.direction = Bcm.Direction.horizontal;
753
+ this.items = [];
754
+ this.indeterminate = false;
755
+ this.name = undefined;
756
+ this.value = undefined;
757
+ this.disabled = false;
758
+ this.readonly = false;
759
+ this.hidden = false;
760
+ this.required = false;
761
+ this.label = undefined;
762
+ this.gap = undefined;
763
+ this.defaultValue = undefined;
764
+ this.fullWidth = false;
765
+ this.optionType = 'default';
766
+ this.buttonStyle = 'solid';
767
+ this.size = Bcm.Size.medium;
768
+ this.caption = undefined;
769
+ this.noCaption = false;
770
+ this.captionType = Bcm.Status.default;
771
+ this.tick = {};
772
+ }
773
+ componentDidLoad() {
774
+ this.initState();
775
+ }
776
+ disconnectedCallback() {
777
+ checkBoxGroupState.removeState(this._id);
778
+ }
779
+ componentShouldUpdate(newVal, oldVal, propName) {
780
+ if (propName == 'tick' && newVal !== oldVal) {
781
+ const isHaveChild = snq(() => checkBoxGroupState.getProperty(this._id).childs.length > 0, false);
782
+ if (isHaveChild) {
783
+ this.getValue().then(values => this.value = values);
784
+ }
785
+ }
786
+ if (this.getOptions().indexOf(propName) > -1 && newVal !== oldVal) {
787
+ this.initState();
788
+ }
789
+ }
790
+ getOptions() {
791
+ return snq(() => checkBoxGroupState.getStatesKeys(this._id), []);
792
+ }
793
+ async initState() {
794
+ const { fullWidth, optionType, buttonStyle, size, noCaption, defaultValue, label, required, captionType, hidden, direction, indeterminate, gap, items } = this;
795
+ const defaultCheckedItems = defaultValue && (typeof defaultValue == 'string' ? JSON.parse(defaultValue) : defaultValue);
796
+ const childElements = items.length > 0 ? items : await this.getCheckboxes();
797
+ await checkBoxGroupState.setValue({
798
+ id: this._id,
799
+ el: this.el,
800
+ indeterminate,
801
+ fullWidth,
802
+ optionType,
803
+ buttonStyle,
804
+ size,
805
+ defaultCheckedItems,
806
+ label,
807
+ noCaption,
808
+ required,
809
+ captionType,
810
+ hidden,
811
+ gap,
812
+ direction,
813
+ childs: childElements
814
+ });
815
+ const slotArea = this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);
816
+ if (slotArea) {
817
+ slotArea.innerHTML && (slotArea.innerHTML = '');
818
+ }
819
+ this.value = await this.getValue();
820
+ }
821
+ async markForCheck() {
822
+ await delay(10);
823
+ this.tick = Generate.UID();
824
+ }
825
+ async onBcmFocus() {
826
+ //focus first item
827
+ const childs = this.getCheckboxes();
828
+ if (childs.length > 0) {
829
+ childs[0].onBcmFocus();
830
+ }
831
+ }
832
+ async onBcmBlur() {
833
+ this.el.blur();
834
+ }
835
+ async setClear() {
836
+ checkBoxGroupState.setClear(this._id);
837
+ await delay(10);
838
+ this.getCheckboxes().forEach(item => {
839
+ item.setClear();
840
+ });
841
+ this.markForCheck();
842
+ await delay(10);
843
+ return Promise.resolve();
844
+ }
845
+ async resetCaption() {
846
+ await delay(10);
847
+ this.getCheckboxes().forEach(item => {
848
+ item.resetCaption();
849
+ });
850
+ await delay(10);
851
+ return Promise.resolve();
852
+ }
853
+ async set(data) {
854
+ if (Array.isArray(data)) {
855
+ await this.check(data, true, true);
856
+ }
857
+ }
858
+ async get() {
859
+ const checklist = await this.getCheckedList() && Object.keys(await this.getCheckedList());
860
+ return checklist.length > 0 ? checklist : [];
861
+ }
862
+ async check(items, checked = true, reset = false) {
863
+ checkBoxGroupState.setCheckedItems(this._id, items, checked, reset);
864
+ this.markForCheck();
865
+ }
866
+ async getValue(name) {
867
+ return Promise.resolve(checkBoxGroupState.getValue(this._id, name));
868
+ }
869
+ async getCheckedList() {
870
+ return checkBoxGroupState.getCheckedList(this._id);
871
+ }
872
+ handleItemsChange() {
873
+ this.initState();
874
+ }
875
+ getCheckboxes() {
876
+ return getChildElements(this.el, 'bcm-checkbox:not(#bcm-indeterminate-element)');
877
+ }
878
+ async getCheckbox(id) {
879
+ const element = this.el.querySelector(`bcm-checkbox[id="${id}"]`);
880
+ if (element) {
881
+ const name = element["name"];
882
+ const value = await this.getValue(name);
883
+ return { element, event: snq(() => value[name], null) };
884
+ }
885
+ return {};
886
+ }
887
+ async indeterminateClick() {
888
+ checkBoxGroupState.changeIndeterminate(this._id);
889
+ this.markForCheck();
890
+ }
891
+ async changeCheckBox(id) {
892
+ checkBoxGroupState.onChange({ id: this._id, childId: id });
893
+ this.markForCheck();
894
+ await delay(10);
895
+ this.value = await this.getValue();
896
+ this.change.emit({ value: this.value, changed: Object.assign({}, await this.getCheckbox(id)) });
897
+ this.groupCheckedList.emit(await this.getCheckedList());
898
+ }
899
+ getItems() {
900
+ return checkBoxGroupState.getProperty(this._id);
901
+ }
902
+ render() {
903
+ const items = this.getItems();
904
+ const { disabled, captionType, label, indeterminate, indeterminateState, required, direction, optionType, hidden, fullWidth, gap } = items;
905
+ const bcmChechboxGroup = classnames('bcm-checkbox-group', direction, optionType, {
906
+ hidden,
907
+ 'full-width': fullWidth
908
+ });
909
+ const bcmChechboxGroupContainer = classnames('bcm-checkbox-group__container', optionType, {
910
+ [direction]: optionType === 'default',
911
+ indeterminate,
912
+ hidden,
913
+ 'full-width': fullWidth
914
+ });
915
+ 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 &&
916
+ h("div", null, h(LabelTemplate, { size: this.size, type: captionType, value: label, required: required }))), indeterminate &&
917
+ 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) })));
918
+ }
919
+ get el() { return getElement(this); }
920
+ static get watchers() { return {
921
+ "items": ["handleItemsChange"]
922
+ }; }
923
+ };
924
+ __decorate$1([
925
+ IsLoad()
926
+ ], BcmCheckboxGroup.prototype, "el", void 0);
927
+ BcmCheckboxGroup.style = groupCss;
928
+
929
+ // /**
930
+ // *
931
+ // * @param type
932
+ // */
933
+ // export const required = (value:any) => {
934
+ // if ( value || value != null ) {
935
+ // return true
936
+ // } else {
937
+ // return true
938
+ // }
939
+ // }
940
+ class rules {
941
+ constructor() { }
942
+ response(status, message) {
943
+ return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
944
+ }
945
+ required(value, componentValidation) {
946
+ let validation = this.response(true);
947
+ if (value == '' || value == "" || value == undefined || value == null || value === false) {
948
+ validation = this.response(false, 'This field is required.');
949
+ }
950
+ if (componentValidation) {
951
+ if (!componentValidation.valid) {
952
+ validation = this.response(false, componentValidation.errorText);
953
+ }
954
+ if (value instanceof Object) {
955
+ if (value.isValid) {
956
+ if (value.isValid == false)
957
+ validation = this.response(false, 'This field is required.');
958
+ }
959
+ }
960
+ }
961
+ return validation;
962
+ }
963
+ selfValidation(input) {
964
+ let validation = this.response(true);
965
+ if (input.captionError != null || input.captionType == 'error') {
966
+ validation = this.response(false, input.captionError);
967
+ }
968
+ return validation;
969
+ }
970
+ }
971
+ const validate = new rules;
972
+
973
+ 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}";
974
+
975
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
976
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
977
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
978
+ r = Reflect.decorate(decorators, target, key, desc);
979
+ else
980
+ for (var i = decorators.length - 1; i >= 0; i--)
981
+ if (d = decorators[i])
982
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
983
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
984
+ };
985
+ const BcmForm = class {
986
+ constructor(hostRef) {
987
+ registerInstance(this, hostRef);
988
+ this.bcmForm = createEvent(this, "bcm-form", 7);
989
+ this.formData = {};
990
+ this.inputs = [];
991
+ this.duplicateInput = [];
992
+ this.isValid = true;
993
+ this.returnCaption = [];
994
+ this.Bromcom = {
995
+ errors: {
996
+ targetFormNotExist: 'target form is not exist --> ',
997
+ },
998
+ inputComponents: {
999
+ // Birbirinin aynısı
1000
+ INPUT: 'input',
1001
+ TEXTAREA: 'textarea',
1002
+ //çok benzer
1003
+ SWITCH: 'switch',
1004
+ CHECKBOX: 'checkbox',
1005
+ RADIO_GROUP: 'radio-group',
1006
+ CHECKBOX_GROUP: 'checkbox-group',
1007
+ RANGE: 'range',
1008
+ // sadece value fırlatıyor
1009
+ FORM: 'form',
1010
+ FORM_GROUP: 'form-group',
1011
+ // *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
1012
+ LIST: 'list',
1013
+ //
1014
+ COLORPICKER: 'colorpicker',
1015
+ // picker aslında tek komponent hepsi datetimepicker
1016
+ DATE_PICKER: 'date-picker',
1017
+ TIME_PICKER: 'time-picker',
1018
+ DATETIME_PICKER: 'datetime-picker',
1019
+ // silinecek komponentler
1020
+ SELECT: 'select',
1021
+ LISTBOX: 'listbox'
1022
+ },
1023
+ helpers: {
1024
+ randomId: function () {
1025
+ return Math.random().toString(16).slice(2, -1);
1026
+ },
1027
+ },
1028
+ };
1029
+ this._id = (Math.random() * 4).toString(16).replace('.', '');
1030
+ this.hidden = false;
1031
+ this.validation = false;
1032
+ this.name = "";
1033
+ this.value = undefined;
1034
+ this.autocomplete = false;
1035
+ }
1036
+ handleSubmit() {
1037
+ // if (lowercase(e.target.nodeName) === 'bcm-button') {
1038
+ // if (e.target.type === 'submit') {
1039
+ // this.submitFunction()
1040
+ // }
1041
+ // }
1042
+ }
1043
+ async submitFunction() {
1044
+ this.formData = {};
1045
+ this.inputs = [];
1046
+ this.selector = this.el;
1047
+ await this.getInputs();
1048
+ await delay(10);
1049
+ const usrFrmData = await this.userFormData();
1050
+ var formData = { isValid: true, formData: usrFrmData };
1051
+ if (this.name) {
1052
+ formData = Object.assign(Object.assign({}, formData), { formName: this.name });
1053
+ }
1054
+ if (this.isValid) {
1055
+ this.bcmForm.emit(formData);
1056
+ return formData;
1057
+ }
1058
+ else {
1059
+ this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
1060
+ if (this.name) {
1061
+ this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
1062
+ }
1063
+ this.bcmForm.emit(this.returnCaption);
1064
+ return this.returnCaption;
1065
+ }
1066
+ }
1067
+ async submit() {
1068
+ return Promise.resolve(this.submitFunction());
1069
+ }
1070
+ async set(data) {
1071
+ var _a;
1072
+ const validate = this.validation;
1073
+ this.validation = false;
1074
+ // debugger
1075
+ this.selector = this.el;
1076
+ await this.getInputs();
1077
+ if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1078
+ for (const key of Object.keys(data)) {
1079
+ const item = this.inputs.find(item => item.name === key);
1080
+ if (item) {
1081
+ try {
1082
+ await item.set(data[key]);
1083
+ }
1084
+ catch (error) {
1085
+ console.log(item.nodeName, "set", error);
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ this.validation = validate;
1091
+ }
1092
+ async get() {
1093
+ var _a;
1094
+ let formData = {};
1095
+ this.selector = this.el;
1096
+ const inputsCache = this.inputs;
1097
+ await this.getInputs();
1098
+ ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
1099
+ try {
1100
+ const value = await item.get();
1101
+ formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
1102
+ }
1103
+ catch (error) {
1104
+ console.log(`${item.nodeName} get error`);
1105
+ }
1106
+ });
1107
+ this.inputs = inputsCache;
1108
+ await delay(10);
1109
+ return Promise.resolve(formData);
1110
+ }
1111
+ async setClear() {
1112
+ this.formData = {};
1113
+ this.inputs = [];
1114
+ this.selector = this.el;
1115
+ let clear = [];
1116
+ await this.getInputs();
1117
+ this.inputs.forEach(async (item) => {
1118
+ try {
1119
+ clear.push(await item.setClear());
1120
+ }
1121
+ catch (error) {
1122
+ console.log(error);
1123
+ }
1124
+ });
1125
+ await Promise.all(clear).then(() => {
1126
+ this.formData = {};
1127
+ this.inputs = [];
1128
+ this.duplicateInput = [];
1129
+ this.isValid = true;
1130
+ this.returnCaption = [];
1131
+ });
1132
+ await delay(10);
1133
+ return Promise.resolve(true);
1134
+ }
1135
+ async resetCaption() {
1136
+ await delay(10);
1137
+ this.formData = {};
1138
+ this.inputs = [];
1139
+ this.selector = this.el;
1140
+ await this.getInputs();
1141
+ for (const item of this.inputs) {
1142
+ try {
1143
+ await item.resetCaption();
1144
+ }
1145
+ catch (error) {
1146
+ console.log(item.nodeName, "rc p");
1147
+ }
1148
+ }
1149
+ await delay(10);
1150
+ return Promise.resolve();
1151
+ }
1152
+ async config(_config) {
1153
+ if (_config['validation']) {
1154
+ typeof _config['validation'] == 'boolean'
1155
+ ? this.validation = _config['validation']
1156
+ : this.validation = false;
1157
+ }
1158
+ return true;
1159
+ }
1160
+ async getInputs() {
1161
+ var form = this.selector;
1162
+ if (!form) {
1163
+ console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
1164
+ return;
1165
+ }
1166
+ const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
1167
+ this.duplicateInput = [];
1168
+ // s-hn: Stencil private flag that contains host web component
1169
+ // https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
1170
+ const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
1171
+ // debugger;
1172
+ for (const item of rootInputs) {
1173
+ if (StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
1174
+ let checkboxs = item.querySelectorAll("bcm-checkbox");
1175
+ if (checkboxs) {
1176
+ for (const checkbox of checkboxs) {
1177
+ this.duplicateInput.push(checkbox.name);
1178
+ }
1179
+ }
1180
+ }
1181
+ if (StringHelper.lowercase(item.nodeName) == "bcm-form") {
1182
+ const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
1183
+ let itemObject = {};
1184
+ for (const element of groupInputs) {
1185
+ var name = element.name;
1186
+ var value = element.value;
1187
+ itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
1188
+ this.duplicateInput.push(element.name);
1189
+ }
1190
+ item.value = itemObject;
1191
+ let checkboxs = item.querySelectorAll("bcm-checkbox");
1192
+ if (checkboxs) {
1193
+ for (const checkbox of checkboxs) {
1194
+ this.duplicateInput.push(checkbox.name);
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+ await delay(10);
1200
+ this.inputs = rootInputs;
1201
+ }
1202
+ getItemValue(item) {
1203
+ const tagName = item.tagName.toLowerCase().replace('bcm-', '');
1204
+ switch (tagName) {
1205
+ /* case 'date-picker':
1206
+ case 'datetime-picker':
1207
+ return item.value.timestamp
1208
+ case 'time-picker':
1209
+ return item.value.time */
1210
+ default:
1211
+ return item.value;
1212
+ }
1213
+ }
1214
+ isWrapperComponent(item) {
1215
+ return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
1216
+ }
1217
+ isGroupComponent(item) {
1218
+ return ['bcm-checkbox-group'].includes(item.toLowerCase());
1219
+ }
1220
+ isListComponent(item) {
1221
+ return ['bcm-list'].includes(item.toLowerCase());
1222
+ }
1223
+ async userFormData() {
1224
+ this.formData = {};
1225
+ this.isValid = true;
1226
+ this.returnCaption = [];
1227
+ for (const item of this.inputs) {
1228
+ // const isListComponent = this.isListComponent(item.tagName);
1229
+ const isGroupComponent = this.isGroupComponent(item.tagName);
1230
+ const isWrapperComponent = this.isWrapperComponent(item.tagName);
1231
+ const wrapperComponent = isWrapperComponent && item;
1232
+ const input = isWrapperComponent
1233
+ ? await item.getInput() && item
1234
+ : item;
1235
+ // input.caption = ''
1236
+ // input.captionType = ''
1237
+ if (this.validation) {
1238
+ let valid = null;
1239
+ // if (isListComponent) {
1240
+ // valid = !(input.value && input.value.length > 0) && validate.required(input.value)
1241
+ // } else
1242
+ if (isWrapperComponent) {
1243
+ const isPickerValid = await wrapperComponent.isValid();
1244
+ valid = validate.required(input.value, isPickerValid);
1245
+ if (valid) {
1246
+ if (input.value instanceof Object) {
1247
+ if (input.value["isValid"] == false) {
1248
+ valid = validate.required("", isPickerValid);
1249
+ }
1250
+ }
1251
+ else {
1252
+ valid = validate.required(input.value, isPickerValid);
1253
+ }
1254
+ }
1255
+ }
1256
+ else if (isGroupComponent) {
1257
+ const childsCheckbox = getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1258
+ if (childsCheckbox && childsCheckbox.length > 0) {
1259
+ for (const element of childsCheckbox) {
1260
+ if (element && element.required === true) {
1261
+ valid = validate.required(element.checked);
1262
+ if (!valid['valid']) {
1263
+ element.noCaption = false;
1264
+ element.captionError = valid['message'];
1265
+ element.captionType = valid['type'];
1266
+ }
1267
+ else {
1268
+ element.noCaption = input.noCaption;
1269
+ element.captionError = null;
1270
+ element.captionType = "default";
1271
+ }
1272
+ }
1273
+ }
1274
+ }
1275
+ }
1276
+ else {
1277
+ valid = validate.required(input.value);
1278
+ }
1279
+ if (input.required) {
1280
+ if (!valid['valid']) {
1281
+ input.captionError = valid['message'];
1282
+ input.captionType = valid['type'];
1283
+ }
1284
+ else {
1285
+ input.captionError = null;
1286
+ input.captionType = "default";
1287
+ }
1288
+ await delay(10);
1289
+ const selfValidation = validate.selfValidation(input);
1290
+ if (valid['valid']) {
1291
+ if (!selfValidation['valid']) {
1292
+ input.captionError = selfValidation['message'];
1293
+ input.captionType = selfValidation['type'];
1294
+ }
1295
+ }
1296
+ }
1297
+ let name = input.name;
1298
+ let value = input.captionError;
1299
+ !input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
1300
+ this.isValid = false);
1301
+ }
1302
+ if (input.name && !this.duplicateInput.includes(input.name)) {
1303
+ var itemValue = this.getItemValue(input);
1304
+ if (!itemValue || itemValue == undefined || itemValue == null) {
1305
+ itemValue = null;
1306
+ }
1307
+ this.formData[input.name] = itemValue;
1308
+ }
1309
+ }
1310
+ return this.formData;
1311
+ }
1312
+ async handleChange(e) {
1313
+ const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
1314
+ const isGroupComponent = this.isGroupComponent(e.target.tagName);
1315
+ let target;
1316
+ if (isWrapperComponent) {
1317
+ target = e.target.getInput && await e.target.getInput() || e.target;
1318
+ }
1319
+ else if (isGroupComponent) {
1320
+ let req = false;
1321
+ const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1322
+ childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
1323
+ if (element && element.required === true) {
1324
+ req = true;
1325
+ }
1326
+ }));
1327
+ target = Object.assign(Object.assign({}, e.target), { required: req });
1328
+ }
1329
+ else {
1330
+ target = e.target;
1331
+ }
1332
+ const value = e.target.value;
1333
+ const wrapperComponent = isWrapperComponent && e.target;
1334
+ var isPickerValid;
1335
+ if (isWrapperComponent) {
1336
+ isPickerValid = await wrapperComponent.isValid();
1337
+ }
1338
+ const tick = setTimeout(() => {
1339
+ if (target.required) {
1340
+ let valid = null;
1341
+ if (isWrapperComponent) {
1342
+ valid = validate.required(value, isPickerValid);
1343
+ if (valid) {
1344
+ if (value instanceof Object) {
1345
+ if (value["isValid"] == false) {
1346
+ valid = validate.required("", isPickerValid);
1347
+ }
1348
+ }
1349
+ else {
1350
+ valid = validate.required(value, isPickerValid);
1351
+ }
1352
+ }
1353
+ }
1354
+ else if (isGroupComponent) {
1355
+ const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
1356
+ childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
1357
+ if (element && element.required === true) {
1358
+ valid = validate.required(element.checked);
1359
+ if (!valid['valid']) {
1360
+ element.noCaption = false;
1361
+ element.captionError = valid['message'];
1362
+ element.captionType = valid['type'];
1363
+ }
1364
+ else {
1365
+ element.noCaption = e.target.noCaption;
1366
+ element.captionError = null;
1367
+ element.captionType = "default";
1368
+ }
1369
+ }
1370
+ }));
1371
+ }
1372
+ else {
1373
+ valid = validate.required(value);
1374
+ }
1375
+ if (valid['valid']) {
1376
+ target.captionError = null;
1377
+ target.captionType = null;
1378
+ }
1379
+ else {
1380
+ target.captionError = valid['message'];
1381
+ target.captionType = valid['type'];
1382
+ }
1383
+ }
1384
+ clearTimeout(tick);
1385
+ });
1386
+ this.value = await this.userFormData();
1387
+ }
1388
+ render() {
1389
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
1390
+ return (h(Host, { class: hostClasses }, h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off" }, h("slot", null))));
1391
+ }
1392
+ get el() { return getElement(this); }
1393
+ };
1394
+ __decorate([
1395
+ IsLoad()
1396
+ ], BcmForm.prototype, "el", void 0);
1397
+ BcmForm.style = formCss;
1398
+
1399
+ 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}";
1400
+
1401
+ const BcmIcon = class {
1402
+ constructor(hostRef) {
1403
+ registerInstance(this, hostRef);
1404
+ this.hidden = false;
1405
+ this.icon = undefined;
1406
+ }
1407
+ render() {
1408
+ const { icon, hidden } = this;
1409
+ return (h(Host, { class: `bcm-icon fa ${hidden ? 'hidden' : ''}` }, h("i", { class: `${icon}` })));
1410
+ }
1411
+ get el() { return getElement(this); }
1412
+ };
1413
+ BcmIcon.style = iconCss;
1414
+
1415
+ 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)}";
1416
+
1417
+ const BcmLabel = class {
1418
+ constructor(hostRef) {
1419
+ registerInstance(this, hostRef);
1420
+ this._id = Generate.UID();
1421
+ this.required = false;
1422
+ this.value = undefined;
1423
+ this.size = "medium";
1424
+ this.form = undefined;
1425
+ this.htmlFor = undefined;
1426
+ this.hidden = false;
1427
+ this.type = Bcm.Status.default;
1428
+ this.tooltip = undefined;
1429
+ }
1430
+ render() {
1431
+ const { required, value, size, form, htmlFor, hidden, type, tooltip } = this;
1432
+ const hostClasses = classnames('bcm-label', { hidden });
1433
+ const Label = (h(LabelTemplate, { form: form, htmlFor: htmlFor, value: value, size: size, type: type, required: required }));
1434
+ return (h(Host, { class: hostClasses }, Label, tooltip && (h("bcm-tooltip", { message: tooltip, placement: 'top', trigger: 'hover' }, h("bcm-icon", { icon: "far fa-question-circle" })))));
1435
+ }
1436
+ get el() { return getElement(this); }
1437
+ };
1438
+ BcmLabel.style = labelCss;
1439
+
1440
+ const BcmTooltip = class {
1441
+ constructor(hostRef) {
1442
+ registerInstance(this, hostRef);
1443
+ this.bcmTooltipShow = createEvent(this, "bcmTooltipShow", 7);
1444
+ this.bcmTooltipHide = createEvent(this, "bcmTooltipHide", 7);
1445
+ this._id = Generate.UID();
1446
+ this.message = "";
1447
+ this.placement = Bcm$1.Placement.top;
1448
+ this.trigger = Bcm$1.TriggerType.click;
1449
+ this.open = false;
1450
+ this.color = "slate";
1451
+ this.size = Bcm$1.Size.medium;
1452
+ this.openDelay = 0;
1453
+ this.closeDelay = 0;
1454
+ this.targetId = undefined;
1455
+ this.tooltip = undefined;
1456
+ }
1457
+ emitShow() {
1458
+ this.bcmTooltipShow.emit();
1459
+ }
1460
+ emitHide() {
1461
+ this.bcmTooltipHide.emit();
1462
+ }
1463
+ connectedCallback() {
1464
+ this.tooltip = new Tooltip({
1465
+ targetId: this.targetId || this._id,
1466
+ message: this.message,
1467
+ placement: this.placement,
1468
+ color: this.color,
1469
+ trigger: this.trigger,
1470
+ size: this.size,
1471
+ openDelay: this.openDelay,
1472
+ closeDelay: this.closeDelay,
1473
+ emitShow: () => this.emitShow(),
1474
+ emitHide: () => this.emitHide(),
1475
+ });
1476
+ }
1477
+ componentDidLoad() {
1478
+ this.tooltip.listener();
1479
+ }
1480
+ componentDidRender() {
1481
+ this.tooltip.message = this.message;
1482
+ this.tooltip.placement = this.placement;
1483
+ this.tooltip.color = this.color;
1484
+ this.tooltip.trigger = this.trigger;
1485
+ this.tooltip.size = this.size;
1486
+ this.tooltip.openDelay = this.openDelay;
1487
+ this.tooltip.closeDelay = this.closeDelay;
1488
+ this.tooltip.update();
1489
+ }
1490
+ disconnectedCallback() {
1491
+ this.tooltip.destroy();
1492
+ }
1493
+ async show() {
1494
+ this.tooltip.show();
1495
+ }
1496
+ async hide() {
1497
+ this.tooltip.hide();
1498
+ }
1499
+ async toggle() {
1500
+ this.tooltip.toggle();
1501
+ }
1502
+ render() {
1503
+ return (h(Host, { "aria-describedby": "tooltip", class: "tw-inline-flex tw-h-fit tw-w-fit" }, h("slot", null)));
1504
+ }
1505
+ get el() { return getElement(this); }
1506
+ };
1507
+
1508
+ 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 };