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