bromcom-ui 2.9.0-rc.4 → 2.9.0-rc.6

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 (272) 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-cb344455.entry.js → p-0641597e.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-8c9d109c.entry.js → p-15758356.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-fc07ca8a.entry.js → p-16dd7db9.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-17264523.js +5 -0
  7. package/dist/bromcom-ui/p-17af6738.js +5 -0
  8. package/dist/bromcom-ui/{p-00d7bbed.js → p-184b7d3b.js} +1 -1
  9. package/dist/bromcom-ui/{p-5648b456.entry.js → p-1b1f4b44.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-1eabd5dc.js +10 -0
  11. package/dist/bromcom-ui/{p-224d392c.entry.js → p-1fbd8af5.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-3adc157d.entry.js → p-24b8154c.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-6478455c.entry.js → p-24d8e9d6.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-8ae4bdb2.entry.js → p-2afdec61.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-50c3df61.js → p-2b13dd48.js} +1 -1
  16. package/dist/bromcom-ui/p-2b88c7bb.entry.js +5 -0
  17. package/dist/bromcom-ui/p-2fc584c4.js +5 -0
  18. package/dist/bromcom-ui/{p-f48e5337.entry.js → p-31eabaf3.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-6a087ad5.js → p-3215d598.js} +1 -1
  20. package/dist/bromcom-ui/{p-15347028.entry.js → p-3baf677c.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
  22. package/dist/bromcom-ui/p-459212eb.entry.js +5 -0
  23. package/dist/bromcom-ui/p-57f8802e.entry.js +5 -0
  24. package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
  25. package/dist/bromcom-ui/{p-4cd8a7c8.entry.js → p-5c3e9ac9.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-6cb648f0.entry.js → p-5c468c5b.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-70aa6e00.entry.js → p-6272ecb4.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-663766cf.entry.js +5 -0
  29. package/dist/bromcom-ui/p-6a5ac874.entry.js +13 -0
  30. package/dist/bromcom-ui/{p-6e9b23ed.entry.js → p-6b861832.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-30788121.entry.js → p-6c3e9e10.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-ba47106f.entry.js → p-7a394115.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-0d6623c0.entry.js → p-81b2dffb.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-891de348.entry.js +5 -0
  35. package/dist/bromcom-ui/{p-1647559e.entry.js → p-8bcfe3b3.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-fd7243a7.entry.js → p-8d7bbe30.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-c8695c8b.entry.js → p-8de9d6b6.entry.js} +1 -1
  38. package/dist/bromcom-ui/p-8fc8b4ff.entry.js +5 -0
  39. package/dist/bromcom-ui/{p-20aa2ba8.entry.js → p-9099a1bf.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-9773e744.entry.js +5 -0
  41. package/dist/bromcom-ui/{p-08d4cd65.entry.js → p-a512ca45.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-18696519.entry.js → p-b10265d7.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-30a3320f.entry.js → p-b1c83bb8.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-afb4a0e7.entry.js → p-b26ded9b.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-159b67a7.entry.js → p-b45b54b5.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-9fff4f7d.entry.js → p-b47e4417.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-e12e563a.entry.js → p-c2cbb810.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-ea23f0aa.entry.js → p-c387f0fb.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-4ea7331b.entry.js → p-c3a91954.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-3992dd70.entry.js → p-ca6cd989.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-ccaabc2e.entry.js +5 -0
  52. package/dist/bromcom-ui/p-cf0ab7f0.entry.js +5 -0
  53. package/dist/bromcom-ui/{p-09c4a42a.entry.js → p-d37502f9.entry.js} +1 -1
  54. package/dist/bromcom-ui/p-dbdb10d5.js +5 -0
  55. package/dist/bromcom-ui/p-dd422dd1.js +5 -0
  56. package/dist/bromcom-ui/{p-8d14232d.entry.js → p-dd43bcd9.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-50066349.entry.js → p-de850d57.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-28649759.entry.js → p-e0c60c5d.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-21783e29.entry.js → p-e520d2a2.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-119fc842.entry.js → p-e86e4968.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-8ce0f5f8.entry.js → p-eaad2239.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-dc9466d6.entry.js → p-ebee9f45.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-b321e86d.entry.js → p-ee4b8753.entry.js} +1 -1
  64. package/dist/bromcom-ui/p-ee50f5e2.entry.js +5 -0
  65. package/dist/bromcom-ui/{p-4e6292fd.entry.js → p-ee5da693.entry.js} +1 -1
  66. package/dist/bromcom-ui/{p-2df6dc86.entry.js → p-f0fa1c29.entry.js} +1 -1
  67. package/dist/bromcom-ui/{p-68abefd2.entry.js → p-f331e009.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-cf307549.entry.js → p-fe37e88f.entry.js} +1 -1
  69. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  70. package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
  71. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  72. package/dist/cjs/bcm-avatar.cjs.entry.js +126 -0
  73. package/dist/cjs/bcm-badge_15.cjs.entry.js +1738 -0
  74. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  75. package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
  76. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  77. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +17 -17
  78. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
  79. package/dist/cjs/{bcm-checkbox_2.cjs.entry.js → bcm-checkbox.cjs.entry.js} +2 -13
  80. package/dist/cjs/bcm-chip-group.cjs.entry.js +128 -0
  81. package/dist/cjs/bcm-chip.cjs.entry.js +90 -0
  82. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
  84. package/dist/cjs/{bcm-avatar_15.cjs.entry.js → bcm-colorful.cjs.entry.js} +3 -6332
  85. package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
  86. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
  87. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  88. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
  89. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  90. package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
  91. package/dist/cjs/bcm-form.cjs.entry.js +488 -0
  92. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  93. package/dist/cjs/bcm-input.cjs.entry.js +370 -0
  94. package/dist/cjs/bcm-label.cjs.entry.js +44 -0
  95. package/dist/cjs/bcm-list_3.cjs.entry.js +4025 -0
  96. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  97. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  98. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  99. package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
  100. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  101. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  102. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  103. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
  104. package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
  105. package/dist/cjs/bcm-range.cjs.entry.js +1 -1
  106. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  107. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  108. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
  109. package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
  110. package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
  111. package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
  112. package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
  113. package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
  114. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  115. package/dist/cjs/{color-helper-d6d2028b.js → color-helper-7ab15732.js} +27 -1
  116. package/dist/cjs/{generate-d246df02.js → generate-d3f8c970.js} +55 -5
  117. package/dist/cjs/index-906fb4e5.js +540 -0
  118. package/dist/cjs/index-b08b037a.js +52 -0
  119. package/dist/cjs/{input-template-22c31e2b.js → input-template-22725c68.js} +1 -1
  120. package/dist/cjs/{json-parse-decarator-bf157b28.js → json-parse-decarator-22c236ad.js} +1 -1
  121. package/dist/cjs/loader.cjs.js +1 -1
  122. package/dist/cjs/{number-helper-26df0c91.js → number-helper-66fe9479.js} +1 -1
  123. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
  124. package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
  125. package/dist/cjs/{stepper-states-1a1a63cb.js → stepper-states-43daae37.js} +1 -1
  126. package/dist/cjs/{validators-095e7611.js → validators-aa39e3ec.js} +1 -1
  127. package/dist/collection/components/atoms/avatar/avatar.js +95 -80
  128. package/dist/collection/components/atoms/avatar/avatar.style.js +39 -0
  129. package/dist/collection/components/atoms/badge/badge.js +29 -90
  130. package/dist/collection/components/atoms/badge/badge.style.js +39 -0
  131. package/dist/collection/components/molecules/input/input.js +4 -4
  132. package/dist/collection/components/molecules/items/items.js +1 -1
  133. package/dist/collection/components/molecules/menu/menu.js +1 -0
  134. package/dist/collection/components/molecules/popover/popover.js +1 -1
  135. package/dist/collection/components/molecules/tab-group/tab-group.js +5 -1
  136. package/dist/collection/components/molecules/tab-group/tab-item-header.js +11 -26
  137. package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
  138. package/dist/collection/components/other/typography/typography.js +1 -1
  139. package/dist/collection/helper/color-helper.js +27 -1
  140. package/dist/collection/helper/generate.js +54 -4
  141. package/dist/collection/helper/popover-helper.js +13 -9
  142. package/dist/collection/helper/tooltip-helper.js +12 -4
  143. package/dist/components/avatar.js +91 -52
  144. package/dist/components/badge.js +109 -46
  145. package/dist/components/bcm-items.js +1 -1
  146. package/dist/components/bcm-popover.js +14 -10
  147. package/dist/components/bcm-tab-group.js +5 -1
  148. package/dist/components/bcm-tab-item-header.js +11 -26
  149. package/dist/components/color-helper.js +27 -1
  150. package/dist/components/generate.js +55 -5
  151. package/dist/components/input.js +4 -4
  152. package/dist/components/menu.js +1 -0
  153. package/dist/components/tooltip-helper.js +12 -4
  154. package/dist/components/tooltip.js +1 -1
  155. package/dist/components/typography.js +1 -1
  156. package/dist/esm/bcm-accordion.entry.js +1 -1
  157. package/dist/esm/bcm-alert.entry.js +1 -1
  158. package/dist/esm/bcm-attendance.entry.js +1 -1
  159. package/dist/esm/bcm-avatar.entry.js +122 -0
  160. package/dist/esm/bcm-badge_15.entry.js +1720 -0
  161. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  162. package/dist/esm/bcm-button-group.entry.js +1 -1
  163. package/dist/esm/bcm-card.entry.js +3 -3
  164. package/dist/esm/bcm-checkbox-group.entry.js +8 -8
  165. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  166. package/dist/esm/{bcm-checkbox_2.entry.js → bcm-checkbox.entry.js} +4 -14
  167. package/dist/esm/bcm-chip-group.entry.js +124 -0
  168. package/dist/esm/bcm-chip.entry.js +86 -0
  169. package/dist/esm/bcm-collapse-group.entry.js +1 -1
  170. package/dist/esm/bcm-collapse.entry.js +1 -1
  171. package/dist/esm/bcm-color-input.entry.js +6 -6
  172. package/dist/esm/{bcm-avatar_15.entry.js → bcm-colorful.entry.js} +4 -6319
  173. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  174. package/dist/esm/bcm-date-picker.entry.js +2 -2
  175. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  176. package/dist/esm/bcm-default.entry.js +1 -1
  177. package/dist/esm/bcm-drawer.entry.js +6 -6
  178. package/dist/esm/bcm-expansion-panel.entry.js +3 -3
  179. package/dist/esm/bcm-form-2.entry.js +1 -1
  180. package/dist/esm/bcm-form.entry.js +484 -0
  181. package/dist/esm/bcm-input-custom.entry.js +1 -1
  182. package/dist/esm/bcm-input.entry.js +366 -0
  183. package/dist/esm/bcm-label.entry.js +40 -0
  184. package/dist/esm/bcm-list_3.entry.js +4019 -0
  185. package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
  186. package/dist/esm/bcm-modal-2-header.entry.js +6 -6
  187. package/dist/esm/bcm-modal-2.entry.js +6 -6
  188. package/dist/esm/bcm-modal.entry.js +1 -1
  189. package/dist/esm/bcm-old-input.entry.js +1 -1
  190. package/dist/esm/bcm-old-tag_2.entry.js +1 -1
  191. package/dist/esm/bcm-popconfirm-box.entry.js +3 -3
  192. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  193. package/dist/esm/bcm-progress.entry.js +3 -3
  194. package/dist/esm/bcm-radio-group.entry.js +6 -6
  195. package/dist/esm/bcm-radio.entry.js +6 -6
  196. package/dist/esm/bcm-range.entry.js +2 -2
  197. package/dist/esm/bcm-select.entry.js +1 -1
  198. package/dist/esm/bcm-skeleton.entry.js +1 -1
  199. package/dist/esm/bcm-step.entry.js +2 -2
  200. package/dist/esm/bcm-stepper.entry.js +7 -7
  201. package/dist/esm/bcm-switch.entry.js +2 -2
  202. package/dist/esm/bcm-table.entry.js +1 -1
  203. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  204. package/dist/esm/bcm-tabs.entry.js +1 -1
  205. package/dist/esm/bcm-tag.entry.js +3 -3
  206. package/dist/esm/bcm-textarea.entry.js +3 -3
  207. package/dist/esm/bcm-time-picker.entry.js +2 -2
  208. package/dist/esm/bcm-toast.entry.js +2 -2
  209. package/dist/esm/bromcom-ui.js +1 -1
  210. package/dist/esm/{color-helper-e8ce23d7.js → color-helper-116755ed.js} +28 -2
  211. package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
  212. package/dist/esm/{generate-e7435a13.js → generate-786bd626.js} +55 -5
  213. package/dist/esm/index-6310a048.js +537 -0
  214. package/dist/esm/index-962dec74.js +50 -0
  215. package/dist/esm/{input-template-e1e850b5.js → input-template-88fba8d7.js} +1 -1
  216. package/dist/esm/{json-parse-decarator-2bcd4584.js → json-parse-decarator-e85e0fea.js} +1 -1
  217. package/dist/esm/loader.js +1 -1
  218. package/dist/esm/{number-helper-cb2563aa.js → number-helper-d9b73e76.js} +1 -1
  219. package/dist/esm/old-bcm-popover-box.entry.js +4 -4
  220. package/dist/esm/old-bcm-popover.entry.js +1 -1
  221. package/dist/esm/{stepper-states-29463262.js → stepper-states-026cdd66.js} +1 -1
  222. package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
  223. package/dist/esm/{validators-0a4134a4.js → validators-0b019b63.js} +1 -1
  224. package/dist/types/components/atoms/avatar/avatar.d.ts +8 -10
  225. package/dist/types/components/atoms/avatar/avatar.style.d.ts +5 -0
  226. package/dist/types/components/atoms/badge/badge.d.ts +3 -7
  227. package/dist/types/components/atoms/badge/badge.style.d.ts +4 -0
  228. package/dist/types/components.d.ts +11 -13
  229. package/dist/types/helper/color-helper.d.ts +22 -2
  230. package/dist/types/helper/generate.d.ts +21 -1
  231. package/dist/types/helper/popover-helper.d.ts +0 -5
  232. package/dist/types/helper/tooltip-helper.d.ts +0 -1
  233. package/package.json +7 -4
  234. package/dist/bromcom-ui/p-0ab46a99.js +0 -5
  235. package/dist/bromcom-ui/p-0b0660a0.js +0 -5
  236. package/dist/bromcom-ui/p-1a3d281e.entry.js +0 -5
  237. package/dist/bromcom-ui/p-2b4677a8.entry.js +0 -5
  238. package/dist/bromcom-ui/p-3ae615ef.entry.js +0 -5
  239. package/dist/bromcom-ui/p-61c51804.entry.js +0 -5
  240. package/dist/bromcom-ui/p-632bbc11.entry.js +0 -5
  241. package/dist/bromcom-ui/p-6c34860e.entry.js +0 -5
  242. package/dist/bromcom-ui/p-843905c8.js +0 -5
  243. package/dist/bromcom-ui/p-92831a1d.js +0 -5
  244. package/dist/bromcom-ui/p-a9a9bf8f.js +0 -5
  245. package/dist/bromcom-ui/p-b17ba740.entry.js +0 -19
  246. package/dist/bromcom-ui/p-b8cfa9ab.entry.js +0 -5
  247. package/dist/bromcom-ui/p-c5de4c76.entry.js +0 -5
  248. package/dist/bromcom-ui/p-d832cf50.entry.js +0 -5
  249. package/dist/bromcom-ui/p-d888c814.entry.js +0 -5
  250. package/dist/bromcom-ui/p-fb96c1cd.entry.js +0 -5
  251. package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -118
  252. package/dist/cjs/bcm-item.cjs.entry.js +0 -71
  253. package/dist/cjs/bcm-items.cjs.entry.js +0 -48
  254. package/dist/cjs/bcm-menu.cjs.entry.js +0 -149
  255. package/dist/cjs/bcm-popover.cjs.entry.js +0 -225
  256. package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -205
  257. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +0 -73
  258. package/dist/cjs/bcm-tab-item.cjs.entry.js +0 -90
  259. package/dist/cjs/bcm-text.cjs.entry.js +0 -49
  260. package/dist/cjs/tooltip-helper-c822010b.js +0 -150
  261. package/dist/collection/components/atoms/avatar/avatar.css +0 -198
  262. package/dist/collection/components/atoms/badge/badge.css +0 -231
  263. package/dist/esm/bcm-dropdown.entry.js +0 -114
  264. package/dist/esm/bcm-item.entry.js +0 -67
  265. package/dist/esm/bcm-items.entry.js +0 -44
  266. package/dist/esm/bcm-menu.entry.js +0 -145
  267. package/dist/esm/bcm-popover.entry.js +0 -221
  268. package/dist/esm/bcm-tab-group.entry.js +0 -201
  269. package/dist/esm/bcm-tab-item-header.entry.js +0 -69
  270. package/dist/esm/bcm-tab-item.entry.js +0 -86
  271. package/dist/esm/bcm-text.entry.js +0 -45
  272. package/dist/esm/tooltip-helper-f35d93d2.js +0 -148
@@ -23,25 +23,29 @@ class Popover {
23
23
  }
24
24
  this.removeListener();
25
25
  };
26
- this.bgColor = () => ColorHelper.twColor(this.color, 700);
27
- this.exepcitonColors = {
28
- white: "slate-300",
29
- black: "slate-700",
30
- };
31
26
  this.target = () => document.getElementById(this.targetId);
32
27
  this.init = () => {
33
- const inner = `<div class="tw-z-[1] tw-rounded tw-py-2 tw-bg-${this.bgColor()}">
28
+ const { tone, colorName } = ColorHelper.parseColor(this.color, 700);
29
+ const dc = Generate.getTwColor({
30
+ color: colorName,
31
+ tones: {
32
+ [tone]: ["bg"],
33
+ },
34
+ variable: "--bcm-popover",
35
+ });
36
+ const style = Object.assign(Object.assign({}, dc), (dc["--bcm-popover-bg"] && { "--bcm-popover-text": ColorHelper.reverseColor(dc["--bcm-popover-bg"]) }));
37
+ const inner = `<div class="tw-z-[1] tw-rounded tw-py-2">
34
38
  ${this.message ? `<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${StringHelper.trim(this.message)}</div>` : ""}
35
39
  ${this.content ? `<div class="tw-font-normal tw-px-4">${StringHelper.trim(this.content)}</div>` : ""}
36
40
  </div>`;
37
41
  this.el = Generate.createElement("div", {
38
42
  "id": `${this.targetId}-popover-box`,
39
43
  "class": `
40
- tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-${this.bgColor()} tw-text-white tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300
44
+ tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-[--bcm-popover-bg] tw-text-[--bcm-popover-text] tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300
41
45
  tw-shadow`,
42
46
  "role": "popover",
43
47
  "aria-hidden": "true",
44
- "style": `color: ${ColorHelper.twColorReverse(this.bgColor())}`,
48
+ "style": ColorHelper.generateStyleString(style),
45
49
  "innerHTML": inner,
46
50
  });
47
51
  };
@@ -95,7 +99,7 @@ class Popover {
95
99
  placement: this.placement,
96
100
  offset: 8,
97
101
  arrow: true,
98
- arrowColor: `tw-bg-${this.bgColor()}`,
102
+ arrowColor: `tw-bg-[--bcm-popover-bg]`,
99
103
  });
100
104
  }
101
105
  };
@@ -210,7 +214,7 @@ const BcmPopover$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
210
214
  this.popover.toggle();
211
215
  }
212
216
  render() {
213
- return (h(Host, { "aria-describedby": "popover", class: "tw-inline-flex tw-h-fit tw-w-fit" }, h("slot", null)));
217
+ return (h(Host, { class: "tw-inline-flex tw-h-fit tw-w-fit", role: "tooltip", "aria-hidden": "true" }, h("slot", null)));
214
218
  }
215
219
  get el() { return this; }
216
220
  }, [4, "bcm-popover", {
@@ -187,7 +187,11 @@ const BcmTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
187
187
  }
188
188
  render() {
189
189
  const { color } = this;
190
- return (h(Host, { role: "tablist", "aria-label": "Tab Group", class: "tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans" }, h("div", { class: `tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between`, id: "tab-header" }, h("div", { id: "ink-bar", class: `tw-bg-${color}-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform` })), h("slot", null)));
190
+ const dc = Generate.getTwColor({
191
+ color: color,
192
+ tones: [500]
193
+ });
194
+ return (h(Host, { role: "tablist", "aria-label": "Tab Group", class: "tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans" }, h("div", { class: `tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between`, id: "tab-header", style: dc }, h("div", { id: "ink-bar", class: `tw-bg-default-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform` })), h("slot", null)));
191
195
  }
192
196
  get el() { return this; }
193
197
  static get watchers() { return {
@@ -31,33 +31,18 @@ const BcmTabItemHeader$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
31
31
  }
32
32
  render() {
33
33
  const { color, size, active, disabled } = this;
34
- let fontSize, padding, gap;
35
- switch (size) {
36
- case Bcm.Size.small:
37
- fontSize = "2";
38
- padding = "1";
39
- gap = "2";
40
- break;
41
- case Bcm.Size.medium:
42
- fontSize = "3";
43
- padding = "2";
44
- gap = "3";
45
- break;
46
- case Bcm.Size.large:
47
- fontSize = "4";
48
- padding = "3";
49
- gap = "4";
50
- break;
51
- default:
52
- fontSize = "3";
53
- padding = "2";
54
- gap = "3";
55
- break;
56
- }
57
34
  const disabledClass = "tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50";
58
- return (h(Host, { onClick: () => this.handleClick(), class: classnames(`tw-text-${fontSize} tw-py-${padding} tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-gap-${gap} tw-focus:outline-none tw-mb-${padding}]`, disabled ? disabledClass : "tw-cursor-pointer", active
59
- ? `tw-text-${color}-500 enabled:hover:tw-text-${color}-600 enabled:active:tw-text-${color}-700 enabled:focus-visible:tw-text-${color}-800`
60
- : "tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600") }));
35
+ const dc = Generate.getTwColor({
36
+ color: color,
37
+ tones: [500, 600, 700, 800]
38
+ });
39
+ return (h(Host, { onClick: () => this.handleClick(), class: classnames(`tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-focus:outline-none`, {
40
+ "tw-text-2 tw-py-1 tw-gap-2": size === Bcm.Size.small,
41
+ "tw-text-3 tw-py-2 tw-gap-3": size === Bcm.Size.medium,
42
+ "tw-text-4 tw-py-3 tw-gap-4": size === Bcm.Size.large,
43
+ }, disabled ? disabledClass : "tw-cursor-pointer", active
44
+ ? `tw-text-default-500 enabled:hover:tw-text-default-600 enabled:active:tw-text-default-700 enabled:focus-visible:tw-text-default-800`
45
+ : "tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600"), style: dc }));
61
46
  }
62
47
  get el() { return this; }
63
48
  }, [0, "bcm-tab-item-header", {
@@ -7,6 +7,26 @@ import { e as extractColor } from './utils.js';
7
7
  import { c as colors } from './colors2.js';
8
8
 
9
9
  class ColorHelper {
10
+ /**
11
+ * @param color - color string in format of `colorName-tone` or `colorName` (default tone is 600)
12
+ * @return `{ tone: number, colorName: string }`
13
+ * @description
14
+ * Parse color string to get color name and tone
15
+ * @example
16
+ * parseColor("red-500") // { tone: 500, colorName: "red" }
17
+ * parseColor("red") // { tone: 600, colorName: "red" }
18
+ * parseColor(null) // { tone: null, colorName: null }
19
+ */
20
+ static parseColor(color, defaultTone = 600) {
21
+ if (!color)
22
+ return { tone: null, colorName: null };
23
+ const [colorName, tone] = color.split("-");
24
+ const parsedTone = tone ? parseInt(tone) : defaultTone;
25
+ return {
26
+ tone: parsedTone,
27
+ colorName,
28
+ };
29
+ }
10
30
  }
11
31
  ColorHelper.isHex = (str) => /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(str);
12
32
  ColorHelper.isRgb = (str) => /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(str);
@@ -43,7 +63,7 @@ ColorHelper.reverseColor = (color) => {
43
63
  const g = parseInt(hexColor.substring(3, 5), 16);
44
64
  const b = parseInt(hexColor.substring(5, 7), 16);
45
65
  const yiq = (r * 299 + g * 587 + b * 114) / 1000;
46
- return yiq >= 200 ? '#475569' : '#f8fafc';
66
+ return yiq >= 200 ? '#334155' : '#fff';
47
67
  }
48
68
  };
49
69
  ColorHelper.dsColor = (color) => 'var(--bcm-new-ds-color-' + color + ')';
@@ -80,5 +100,11 @@ ColorHelper.twColor = (colorName, tone = '500') => {
80
100
  return 'blue-500';
81
101
  };
82
102
  ColorHelper.twColorReverse = (color) => ColorHelper.reverseColor(ColorHelper.getTwColorToHex(color));
103
+ /**
104
+ * @param object
105
+ * @return string
106
+ * @description Convert style object to string
107
+ */
108
+ ColorHelper.generateStyleString = (obj) => Object.keys(obj).reduce((acc, key) => { return `${acc}${key}:${obj[key]};`; }, "");
83
109
 
84
110
  export { ColorHelper as C };
@@ -25,7 +25,7 @@ var TypeProps;
25
25
  TypeProps["basic"] = "basic";
26
26
  })(TypeProps || (TypeProps = {}));
27
27
 
28
- const version = "2.9.0-rc.4";
28
+ const version = "2.9.0-rc.6";
29
29
 
30
30
  function snq(callback, defaultValue) {
31
31
  try {
@@ -65,15 +65,65 @@ if (isAllowedDomain()) {
65
65
  }
66
66
  })();
67
67
  class Generate {
68
- static getTwColor(color, variable = "--bcm-color-default") {
68
+ /**
69
+ const dc = Generate.getTwColor({
70
+ color: "blue",
71
+ tones: {
72
+ 200: ["text"],
73
+ 700: ["bg", "border"],
74
+ 800: ["bg-hover", "border-hover"],
75
+ },
76
+ variable: "--bcm-avatar",
77
+ });
78
+
79
+ return {
80
+ --bcm-avatar-text: --tw-blue-200;
81
+ --bcm-avatar-bg: --tw-blue-700;
82
+ --bcm-avatar-bg-hover: --tw-blue-800;
83
+ --bcm-avatar-border: --tw-blue-700;
84
+ --bcm-avatar-border-hover: --tw-blue-800;
85
+ }
86
+
87
+ */
88
+ static getTwColor(args) {
89
+ const { color, variable, tones } = (args = Object.assign({
90
+ variable: "--bcm-color-default",
91
+ defaultTone: "600",
92
+ tones: {
93
+ 50: {},
94
+ 100: {},
95
+ 200: {},
96
+ 300: {},
97
+ 400: {},
98
+ 500: {},
99
+ 600: {},
100
+ 700: {},
101
+ 800: {},
102
+ 900: {},
103
+ 950: {},
104
+ },
105
+ }, args));
69
106
  if (!color || !colors[color]) {
70
107
  return false;
71
108
  }
72
- const colorObj = colors[color];
73
109
  const result = {};
74
- for (const [key, value] of Object.entries(colorObj)) {
75
- result[`${variable}-${key}`] = value;
110
+ if (typeof colors[color] === "string") {
111
+ result[variable] = colors[color];
112
+ return result;
76
113
  }
114
+ const toneList = Array.isArray(tones) ? tones : Object.keys(tones);
115
+ toneList.forEach(tone => {
116
+ if (colors[color][tone]) {
117
+ if (Array.isArray(tones[tone])) {
118
+ tones[tone].forEach(item => {
119
+ result[`${variable}-${item}`] = colors[color][tone];
120
+ });
121
+ }
122
+ else {
123
+ result[`${variable}-${tone}`] = colors[color][tone];
124
+ }
125
+ }
126
+ });
77
127
  return result;
78
128
  }
79
129
  }
@@ -248,20 +248,20 @@ const BcmInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
248
248
  }
249
249
  validationRange() {
250
250
  const { min, max, value } = this;
251
- if (value) {
252
- if (min && max) {
251
+ if (value !== undefined) {
252
+ if ((min !== undefined) && (max !== undefined)) {
253
253
  if (value < min || value > max) {
254
254
  this.setCaption(StringHelper.getMessage('between', [min, max]), "error");
255
255
  return false;
256
256
  }
257
257
  }
258
- else if (min) {
258
+ else if (min !== undefined) {
259
259
  if (value < min) {
260
260
  this.setCaption(StringHelper.getMessage('min', [min]), "error");
261
261
  return false;
262
262
  }
263
263
  }
264
- else if (max) {
264
+ else if (max !== undefined) {
265
265
  if (value > max) {
266
266
  this.setCaption(StringHelper.getMessage('max', [max]), "error");
267
267
  return false;
@@ -109,6 +109,7 @@ const BcmMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
109
109
  }
110
110
  return (h("a", { id: 'bcm-menu__item-' + this._id + '-' + item.id, onMouseEnter: () => this.collapse && this.getTooltip(item.id, item.text).show(), onMouseLeave: () => this.collapse && this.getTooltip(item.id, item.text).hide(), key: index, href: !item.disabled ? item.link || 'javascript:void(0)' : 'javascript:void(0)', tabindex: item.disabled ? '-1' : '0', class: classnames('bcm-menu__item', {
111
111
  'bcm-menu__item--is-sub': subItems && item.isOpen,
112
+ 'hidden tw-hidden': item.hidden,
112
113
  }) }, h("span", { class: classnames('bcm-menu__item-link', `bcm-menu__item-link--${this.mode}`, {
113
114
  'bcm-menu__item-link--active': this.selectable && (this.activeItemId ? this.activeItemId === item.id : item.active),
114
115
  'bcm-menu__item-link--disabled': item.disabled,
@@ -22,7 +22,6 @@ class Tooltip {
22
22
  }
23
23
  this.removeListener();
24
24
  };
25
- this.bgColor = () => ColorHelper.twColor(this.color, 700);
26
25
  this.target = () => document.getElementById(this.targetId);
27
26
  this.sizeClass = () => {
28
27
  switch (this.size) {
@@ -37,13 +36,22 @@ class Tooltip {
37
36
  }
38
37
  };
39
38
  this.init = () => {
39
+ const { tone, colorName } = ColorHelper.parseColor(this.color, 700);
40
+ const dc = Generate.getTwColor({
41
+ color: colorName,
42
+ tones: {
43
+ [tone]: ["bg"],
44
+ },
45
+ variable: "--bcm-tooltip",
46
+ });
47
+ const style = Object.assign(Object.assign({}, dc), (dc["--bcm-tooltip-bg"] && { "--bcm-tooltip-text": ColorHelper.reverseColor(dc["--bcm-tooltip-bg"]) }));
40
48
  this.el = Generate.createElement("div", {
41
49
  "id": `${this.targetId}-tooltip-box`,
42
50
  "class": `
43
- tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg-${this.bgColor()} tw-text-white ${this.sizeClass()} tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300`,
51
+ tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg-[--bcm-tooltip-bg] tw-text-[--bcm-tooltip-text] ${this.sizeClass()} tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300`,
44
52
  "role": "tooltip",
45
53
  "aria-hidden": "true",
46
- "style": `color: ${ColorHelper.twColorReverse(this.bgColor())}`,
54
+ "style": ColorHelper.generateStyleString(style),
47
55
  "innerHTML": StringHelper.trim(this.message),
48
56
  });
49
57
  };
@@ -97,7 +105,7 @@ class Tooltip {
97
105
  placement: this.placement,
98
106
  offset: 8,
99
107
  arrow: true,
100
- arrowColor: `tw-bg-${this.bgColor()}`,
108
+ arrowColor: `tw-bg-[--bcm-tooltip-bg]`,
101
109
  });
102
110
  }
103
111
  };
@@ -79,7 +79,7 @@ const BcmTooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
79
79
  this.tooltip.toggle();
80
80
  }
81
81
  render() {
82
- return (h(Host, { "aria-describedby": "tooltip", class: "tw-inline-flex tw-h-fit tw-w-fit" }, h("slot", null)));
82
+ return (h(Host, { class: "tw-inline-flex tw-h-fit tw-w-fit", role: "tooltip", "aria-hidden": "true" }, h("slot", null)));
83
83
  }
84
84
  get el() { return this; }
85
85
  }, [4, "bcm-tooltip", {
@@ -10,7 +10,7 @@ const BcmTypography = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
10
10
  this.__registerHost();
11
11
  }
12
12
  render() {
13
- return (h(Host, null, h("slot", null)));
13
+ return (h(Host, { class: "bcm-ui-element bcm-ui-content-display" }, h("slot", null)));
14
14
  }
15
15
  get el() { return this; }
16
16
  }, [4, "bcm-typography"]);
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
6
- import { G as Generate } from './generate-e7435a13.js';
6
+ import { G as Generate } from './generate-786bd626.js';
7
7
  import './colors-44c95e7e.js';
8
8
  import './_commonjsHelpers-3016b722.js';
9
9
 
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-348b16ad.js';
6
- import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-e7435a13.js';
6
+ import { G as Generate, s as snq, S as StatusProps, T as TypeProps } from './generate-786bd626.js';
7
7
  import { c as classnames } from './index-ed9652af.js';
8
8
  import { c as createStore } from './index-0052017c.js';
9
9
  import { S as StringHelper } from './string-helper-6bd24967.js';
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
6
- import { G as Generate } from './generate-e7435a13.js';
6
+ import { G as Generate } from './generate-786bd626.js';
7
7
  import './colors-44c95e7e.js';
8
8
  import './_commonjsHelpers-3016b722.js';
9
9
 
@@ -0,0 +1,122 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
6
+ import './color-helper-116755ed.js';
7
+ import './datetime-helper-df25808a.js';
8
+ import { G as Generate } from './generate-786bd626.js';
9
+ import './number-helper-d9b73e76.js';
10
+ import './string-helper-6bd24967.js';
11
+ import './validators-0b019b63.js';
12
+ import './element-dragger-7ea06c76.js';
13
+ import { B as Bcm } from './bcm-9f50af9c.js';
14
+ import { c as cva } from './index-962dec74.js';
15
+ import './colors-1d7854ea.js';
16
+ import './utils-b3338faf.js';
17
+ import './colors-44c95e7e.js';
18
+ import './_commonjsHelpers-3016b722.js';
19
+
20
+ const avatarStyle = cva([
21
+ "bcm-avatar bcm-ui-element bcm-ui-content-display",
22
+ "tw-uppercase tw-inline-flex tw-items-center tw-justify-center",
23
+ "tw-bg-[--bcm-avatar-bg] tw-text-[--bcm-avatar-text]",
24
+ "[&>img]:tw-w-full [&>img]:tw-h-full",
25
+ ], {
26
+ variants: {
27
+ size: {
28
+ small: ["bcm-avatar__size-small tw-text-1 tw-w-6 tw-h-6"],
29
+ medium: ["bcm-avatar__size-medium tw-text-2 tw-w-8 tw-h-8"],
30
+ large: ["bcm-avatar__size-large tw-text-3 tw-w-10 tw-h-10"],
31
+ },
32
+ shape: {
33
+ ellipse: ["bcm-avatar__shape-ellipse tw-rounded-full", "[&>.bcm-badge]:tw-top-0 [&>.bcm-badge]:tw-right-0", "[&>img]:tw-rounded-full"],
34
+ square: ["bcm-avatar__shape-square tw-rounded", "[&>.bcm-badge]:tw--top-0.5 [&>.bcm-badge]:tw--right-0.5", "[&>img]:tw-rounded"],
35
+ },
36
+ status: {
37
+ true: ["bcm-avatar__status tw-relative [&>.bcm-badge]:tw-absolute"],
38
+ },
39
+ },
40
+ compoundVariants: [
41
+ {
42
+ size: "medium",
43
+ shape: "ellipse",
44
+ status: false,
45
+ class: "",
46
+ },
47
+ ],
48
+ defaultVariants: {
49
+ size: "medium",
50
+ shape: "ellipse",
51
+ status: false,
52
+ },
53
+ });
54
+
55
+ const BcmAvatar = class {
56
+ constructor(hostRef) {
57
+ registerInstance(this, hostRef);
58
+ this._id = Generate.UID();
59
+ this.image = undefined;
60
+ this.name = undefined;
61
+ this.alt = undefined;
62
+ this.shape = Bcm.Shape.ellipse;
63
+ this.size = Bcm.Size.medium;
64
+ this.color = undefined;
65
+ this.icon = "fas fa-user";
66
+ this.status = undefined;
67
+ this.blink = false;
68
+ this.isFallback = false;
69
+ }
70
+ getFirstLetters(name) {
71
+ const words = name.split(" ");
72
+ const initials = words.map(word => word.charAt(0).toUpperCase()).join("");
73
+ return initials.substring(0, 2);
74
+ }
75
+ renderContent() {
76
+ if (this.isFallback) {
77
+ if (this.name) {
78
+ return this.getFirstLetters(this.name);
79
+ }
80
+ else {
81
+ return this.renderDefaultIcon();
82
+ }
83
+ }
84
+ else if (this.image) {
85
+ return this.renderImage();
86
+ }
87
+ else if (this.name) {
88
+ return this.getFirstLetters(this.name);
89
+ }
90
+ else {
91
+ return this.renderDefaultIcon();
92
+ }
93
+ }
94
+ renderDefaultIcon() {
95
+ return h("bcm-icon", { icon: this.icon });
96
+ }
97
+ renderImage() {
98
+ return h("img", { onError: () => (this.isFallback = true), src: this.image, alt: this.alt });
99
+ }
100
+ render() {
101
+ const { shape, size, status, color, blink } = this;
102
+ const dc = Generate.getTwColor({
103
+ color: color,
104
+ tones: {
105
+ 200: ["bg"],
106
+ 700: ["text"],
107
+ },
108
+ variable: "--bcm-avatar",
109
+ });
110
+ const customSize = !Object.keys(Bcm.BaseSize).includes(size)
111
+ ? {
112
+ width: `${size}px`,
113
+ height: `${size}px`,
114
+ fontSize: `${+size / 3}px`,
115
+ }
116
+ : {};
117
+ return (h(Host, { role: "img", "aria-label": this.alt || this.name || "Avatar", class: avatarStyle({ size, shape, status: !!status }), style: Object.assign(Object.assign({}, dc), customSize) }, this.renderContent(), status && h("bcm-badge", { status: status, blink: blink, "aria-hidden": "true" }), h("slot", null)));
118
+ }
119
+ get el() { return getElement(this); }
120
+ };
121
+
122
+ export { BcmAvatar as bcm_avatar };