bromcom-ui-next 0.1.20 → 0.1.21

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 (290) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-94ced142.entry.js → p-06d42346.entry.js} +2 -2
  3. package/dist/bromcom-ui/p-06d42346.entry.js.map +1 -0
  4. package/dist/bromcom-ui/p-0c8a9725.entry.js +2 -0
  5. package/dist/bromcom-ui/p-0c8a9725.entry.js.map +1 -0
  6. package/dist/bromcom-ui/p-11227d96.entry.js +2 -0
  7. package/dist/bromcom-ui/p-11227d96.entry.js.map +1 -0
  8. package/dist/bromcom-ui/p-1b4ccb21.entry.js +2 -0
  9. package/dist/bromcom-ui/{p-b6dd459b.entry.js.map → p-1b4ccb21.entry.js.map} +1 -1
  10. package/dist/bromcom-ui/{p-5fcf77f9.js → p-2c58fcb7.js} +2 -2
  11. package/dist/bromcom-ui/p-2c58fcb7.js.map +1 -0
  12. package/dist/bromcom-ui/p-2e469cb9.entry.js +2 -0
  13. package/dist/bromcom-ui/p-2e469cb9.entry.js.map +1 -0
  14. package/dist/bromcom-ui/{p-145dce31.entry.js → p-350c97e1.entry.js} +2 -2
  15. package/dist/bromcom-ui/p-350c97e1.entry.js.map +1 -0
  16. package/dist/bromcom-ui/p-4027f5c4.entry.js +2 -0
  17. package/dist/bromcom-ui/p-4027f5c4.entry.js.map +1 -0
  18. package/dist/bromcom-ui/p-45f4c75b.entry.js +2 -0
  19. package/dist/bromcom-ui/p-45f4c75b.entry.js.map +1 -0
  20. package/dist/bromcom-ui/{p-42feef7e.entry.js → p-4652635d.entry.js} +2 -2
  21. package/dist/bromcom-ui/p-4652635d.entry.js.map +1 -0
  22. package/dist/bromcom-ui/p-77122bc2.entry.js +2 -0
  23. package/dist/bromcom-ui/p-77122bc2.entry.js.map +1 -0
  24. package/dist/bromcom-ui/{p-d975579d.entry.js → p-78d8f63c.entry.js} +2 -2
  25. package/dist/bromcom-ui/p-78d8f63c.entry.js.map +1 -0
  26. package/dist/bromcom-ui/{p-4149c766.entry.js → p-87a0f20b.entry.js} +2 -2
  27. package/dist/bromcom-ui/p-87a0f20b.entry.js.map +1 -0
  28. package/dist/bromcom-ui/{p-b867a105.entry.js → p-881ccea1.entry.js} +2 -2
  29. package/dist/bromcom-ui/p-881ccea1.entry.js.map +1 -0
  30. package/dist/bromcom-ui/{p-1e5da10e.entry.js → p-8ae92b62.entry.js} +2 -2
  31. package/dist/bromcom-ui/p-8ae92b62.entry.js.map +1 -0
  32. package/dist/bromcom-ui/{p-b582c170.entry.js → p-9a6cec21.entry.js} +2 -2
  33. package/dist/bromcom-ui/p-9a6cec21.entry.js.map +1 -0
  34. package/dist/bromcom-ui/{p-8550a2aa.entry.js → p-a03922f8.entry.js} +2 -2
  35. package/dist/bromcom-ui/p-a03922f8.entry.js.map +1 -0
  36. package/dist/bromcom-ui/{p-9ba07f12.entry.js → p-a20f6baf.entry.js} +2 -2
  37. package/dist/bromcom-ui/p-a20f6baf.entry.js.map +1 -0
  38. package/dist/bromcom-ui/{p-bc962a70.entry.js → p-b1f9ad67.entry.js} +2 -2
  39. package/dist/bromcom-ui/p-b1f9ad67.entry.js.map +1 -0
  40. package/dist/bromcom-ui/p-bf213fe6.entry.js +2 -0
  41. package/dist/bromcom-ui/p-bf213fe6.entry.js.map +1 -0
  42. package/dist/bromcom-ui/{p-bbe4aac2.entry.js → p-c89f7997.entry.js} +2 -2
  43. package/dist/bromcom-ui/p-c89f7997.entry.js.map +1 -0
  44. package/dist/bromcom-ui/{p-e2f468ab.entry.js → p-f56b22de.entry.js} +2 -2
  45. package/dist/bromcom-ui/p-f56b22de.entry.js.map +1 -0
  46. package/dist/bromcom-ui/p-fdcb9dbd.entry.js +2 -0
  47. package/dist/bromcom-ui/p-fdcb9dbd.entry.js.map +1 -0
  48. package/dist/cjs/bcm-accordion.cjs.entry.js +4 -4
  49. package/dist/cjs/bcm-accordion.cjs.entry.js.map +1 -1
  50. package/dist/cjs/bcm-alert.cjs.entry.js +4 -4
  51. package/dist/cjs/bcm-alert.cjs.entry.js.map +1 -1
  52. package/dist/cjs/bcm-avatar.cjs.entry.js +1 -1
  53. package/dist/cjs/bcm-avatar.cjs.entry.js.map +1 -1
  54. package/dist/cjs/bcm-badge.cjs.entry.js +5 -5
  55. package/dist/cjs/bcm-badge.cjs.entry.js.map +1 -1
  56. package/dist/cjs/bcm-basic-badge.cjs.entry.js +5 -5
  57. package/dist/cjs/bcm-basic-badge.cjs.entry.js.map +1 -1
  58. package/dist/cjs/bcm-button-group.cjs.entry.js +4 -4
  59. package/dist/cjs/bcm-button-group.cjs.entry.js.map +1 -1
  60. package/dist/cjs/bcm-button_8.cjs.entry.js +19 -21
  61. package/dist/cjs/bcm-button_8.cjs.entry.js.map +1 -1
  62. package/dist/cjs/bcm-checkbox.cjs.entry.js +3 -3
  63. package/dist/cjs/bcm-checkbox.cjs.entry.js.map +1 -1
  64. package/dist/cjs/bcm-chip.cjs.entry.js +3 -3
  65. package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
  66. package/dist/cjs/bcm-divider.cjs.entry.js +3 -3
  67. package/dist/cjs/bcm-divider.cjs.entry.js.map +1 -1
  68. package/dist/cjs/bcm-pop-confirm.cjs.entry.js +3 -3
  69. package/dist/cjs/bcm-pop-confirm.cjs.entry.js.map +1 -1
  70. package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
  71. package/dist/cjs/bcm-popover.cjs.entry.js.map +1 -1
  72. package/dist/cjs/bcm-radio-group.cjs.entry.js +6 -6
  73. package/dist/cjs/bcm-radio-group.cjs.entry.js.map +1 -1
  74. package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-radio.cjs.entry.js.map +1 -1
  76. package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js +4 -4
  77. package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js.map +1 -1
  78. package/dist/cjs/bcm-segmented-picker.cjs.entry.js +4 -4
  79. package/dist/cjs/bcm-segmented-picker.cjs.entry.js.map +1 -1
  80. package/dist/cjs/bcm-switch.cjs.entry.js +4 -4
  81. package/dist/cjs/bcm-switch.cjs.entry.js.map +1 -1
  82. package/dist/cjs/bcm-tabs-list.cjs.entry.js +3 -3
  83. package/dist/cjs/bcm-tabs-list.cjs.entry.js.map +1 -1
  84. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +3 -3
  85. package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +1 -1
  86. package/dist/cjs/bcm-tabs.cjs.entry.js +3 -3
  87. package/dist/cjs/bcm-tabs.cjs.entry.js.map +1 -1
  88. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
  89. package/dist/cjs/bcm-textarea.cjs.entry.js.map +1 -1
  90. package/dist/cjs/bcm-tooltip.cjs.entry.js +4 -9
  91. package/dist/cjs/bcm-tooltip.cjs.entry.js.map +1 -1
  92. package/dist/cjs/{index-310db2a6.js → tv-d2e35446.js} +16 -3
  93. package/dist/cjs/tv-d2e35446.js.map +1 -0
  94. package/dist/collection/components/accordion/accordion.component.js +3 -3
  95. package/dist/collection/components/accordion/accordion.component.js.map +1 -1
  96. package/dist/collection/components/alert/alert.component.js +2 -2
  97. package/dist/collection/components/alert/alert.component.js.map +1 -1
  98. package/dist/collection/components/alert/alert.css +1 -1
  99. package/dist/collection/components/avatar/avatar.css +1 -1
  100. package/dist/collection/components/badge/badge.component.js +3 -3
  101. package/dist/collection/components/badge/badge.component.js.map +1 -1
  102. package/dist/collection/components/badge/badge.css +1 -1
  103. package/dist/collection/components/basic-badge/basic-badge.component.js +3 -3
  104. package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -1
  105. package/dist/collection/components/basic-badge/basic-badge.css +1 -1
  106. package/dist/collection/components/button/button.component.js +3 -3
  107. package/dist/collection/components/button/button.component.js.map +1 -1
  108. package/dist/collection/components/button-group/button-group.component.js +3 -3
  109. package/dist/collection/components/button-group/button-group.component.js.map +1 -1
  110. package/dist/collection/components/checkbox/checkbox.component.js +2 -2
  111. package/dist/collection/components/checkbox/checkbox.component.js.map +1 -1
  112. package/dist/collection/components/chip/chip.component.js +2 -2
  113. package/dist/collection/components/chip/chip.component.js.map +1 -1
  114. package/dist/collection/components/divider/divider.component.js +2 -2
  115. package/dist/collection/components/divider/divider.component.js.map +1 -1
  116. package/dist/collection/components/drawer/drawer.component.js +3 -5
  117. package/dist/collection/components/drawer/drawer.component.js.map +1 -1
  118. package/dist/collection/components/drawer/drawer.css +1 -1
  119. package/dist/collection/components/dropdown/dropdown.component.js +2 -2
  120. package/dist/collection/components/dropdown/dropdown.component.js.map +1 -1
  121. package/dist/collection/components/dropdown-item/dropdown-item.component.js +3 -3
  122. package/dist/collection/components/dropdown-item/dropdown-item.component.js.map +1 -1
  123. package/dist/collection/components/input/input.component.js +3 -3
  124. package/dist/collection/components/input/input.component.js.map +1 -1
  125. package/dist/collection/components/pop-confirm/pop-confirm.component.js +2 -2
  126. package/dist/collection/components/pop-confirm/pop-confirm.component.js.map +1 -1
  127. package/dist/collection/components/popover/popover.component.js +2 -2
  128. package/dist/collection/components/popover/popover.component.js.map +1 -1
  129. package/dist/collection/components/radio/radio.component.js +2 -2
  130. package/dist/collection/components/radio/radio.component.js.map +1 -1
  131. package/dist/collection/components/radio-group/radio-group.component.js +4 -4
  132. package/dist/collection/components/radio-group/radio-group.component.js.map +1 -1
  133. package/dist/collection/components/segmented-picker/segmented-picker-option.component.js +3 -3
  134. package/dist/collection/components/segmented-picker/segmented-picker-option.component.js.map +1 -1
  135. package/dist/collection/components/segmented-picker/segmented-picker.component.js +3 -3
  136. package/dist/collection/components/segmented-picker/segmented-picker.component.js.map +1 -1
  137. package/dist/collection/components/switch/switch.component.js +3 -3
  138. package/dist/collection/components/switch/switch.component.js.map +1 -1
  139. package/dist/collection/components/tabs/tabs-list.component.js +2 -2
  140. package/dist/collection/components/tabs/tabs-list.component.js.map +1 -1
  141. package/dist/collection/components/tabs/tabs-trigger.component.js +2 -2
  142. package/dist/collection/components/tabs/tabs-trigger.component.js.map +1 -1
  143. package/dist/collection/components/tabs/tabs.component.js +2 -2
  144. package/dist/collection/components/tabs/tabs.component.js.map +1 -1
  145. package/dist/collection/components/textarea/textarea.component.js +4 -4
  146. package/dist/collection/components/textarea/textarea.component.js.map +1 -1
  147. package/dist/collection/components/tooltip/tooltip.component.js +3 -8
  148. package/dist/collection/components/tooltip/tooltip.component.js.map +1 -1
  149. package/dist/collection/utils/tv.js +14 -0
  150. package/dist/collection/utils/tv.js.map +1 -0
  151. package/dist/components/bcm-accordion.js +4 -4
  152. package/dist/components/bcm-accordion.js.map +1 -1
  153. package/dist/components/bcm-alert.js +4 -4
  154. package/dist/components/bcm-alert.js.map +1 -1
  155. package/dist/components/bcm-avatar.js +2 -2
  156. package/dist/components/bcm-avatar.js.map +1 -1
  157. package/dist/components/bcm-badge.js +1 -1
  158. package/dist/components/bcm-basic-badge.js +5 -5
  159. package/dist/components/bcm-basic-badge.js.map +1 -1
  160. package/dist/components/bcm-button-group.js +4 -4
  161. package/dist/components/bcm-button-group.js.map +1 -1
  162. package/dist/components/bcm-button.js +1 -1
  163. package/dist/components/bcm-checkbox.js +3 -3
  164. package/dist/components/bcm-checkbox.js.map +1 -1
  165. package/dist/components/bcm-chip.js +3 -3
  166. package/dist/components/bcm-chip.js.map +1 -1
  167. package/dist/components/bcm-divider.js +3 -3
  168. package/dist/components/bcm-divider.js.map +1 -1
  169. package/dist/components/bcm-drawer.js +5 -7
  170. package/dist/components/bcm-drawer.js.map +1 -1
  171. package/dist/components/bcm-dropdown-item.js +4 -4
  172. package/dist/components/bcm-dropdown-item.js.map +1 -1
  173. package/dist/components/bcm-dropdown.js +4 -4
  174. package/dist/components/bcm-dropdown.js.map +1 -1
  175. package/dist/components/bcm-input.js +4 -4
  176. package/dist/components/bcm-input.js.map +1 -1
  177. package/dist/components/bcm-pop-confirm.js +4 -4
  178. package/dist/components/bcm-pop-confirm.js.map +1 -1
  179. package/dist/components/bcm-popover.js +3 -3
  180. package/dist/components/bcm-popover.js.map +1 -1
  181. package/dist/components/bcm-radio-group.js +5 -5
  182. package/dist/components/bcm-radio-group.js.map +1 -1
  183. package/dist/components/bcm-radio.js +3 -3
  184. package/dist/components/bcm-radio.js.map +1 -1
  185. package/dist/components/bcm-segmented-picker-option.js +4 -4
  186. package/dist/components/bcm-segmented-picker-option.js.map +1 -1
  187. package/dist/components/bcm-segmented-picker.js +4 -4
  188. package/dist/components/bcm-segmented-picker.js.map +1 -1
  189. package/dist/components/bcm-switch.js +4 -4
  190. package/dist/components/bcm-switch.js.map +1 -1
  191. package/dist/components/bcm-tabs-list.js +3 -3
  192. package/dist/components/bcm-tabs-list.js.map +1 -1
  193. package/dist/components/bcm-tabs-trigger.js +3 -3
  194. package/dist/components/bcm-tabs-trigger.js.map +1 -1
  195. package/dist/components/bcm-tabs.js +3 -3
  196. package/dist/components/bcm-tabs.js.map +1 -1
  197. package/dist/components/bcm-textarea.js +5 -5
  198. package/dist/components/bcm-textarea.js.map +1 -1
  199. package/dist/components/bcm-tooltip.js +4 -9
  200. package/dist/components/bcm-tooltip.js.map +1 -1
  201. package/dist/components/{p-5fcf77f9.js → p-2c58fcb7.js} +16 -3
  202. package/dist/components/p-2c58fcb7.js.map +1 -0
  203. package/dist/components/{p-d54398ea.js → p-bf273460.js} +6 -6
  204. package/dist/components/p-bf273460.js.map +1 -0
  205. package/dist/components/{p-d56f8a26.js → p-c491a7c9.js} +5 -5
  206. package/dist/components/p-c491a7c9.js.map +1 -0
  207. package/dist/esm/bcm-accordion.entry.js +4 -4
  208. package/dist/esm/bcm-accordion.entry.js.map +1 -1
  209. package/dist/esm/bcm-alert.entry.js +4 -4
  210. package/dist/esm/bcm-alert.entry.js.map +1 -1
  211. package/dist/esm/bcm-avatar.entry.js +1 -1
  212. package/dist/esm/bcm-avatar.entry.js.map +1 -1
  213. package/dist/esm/bcm-badge.entry.js +5 -5
  214. package/dist/esm/bcm-badge.entry.js.map +1 -1
  215. package/dist/esm/bcm-basic-badge.entry.js +5 -5
  216. package/dist/esm/bcm-basic-badge.entry.js.map +1 -1
  217. package/dist/esm/bcm-button-group.entry.js +4 -4
  218. package/dist/esm/bcm-button-group.entry.js.map +1 -1
  219. package/dist/esm/bcm-button_8.entry.js +16 -18
  220. package/dist/esm/bcm-button_8.entry.js.map +1 -1
  221. package/dist/esm/bcm-checkbox.entry.js +3 -3
  222. package/dist/esm/bcm-checkbox.entry.js.map +1 -1
  223. package/dist/esm/bcm-chip.entry.js +3 -3
  224. package/dist/esm/bcm-chip.entry.js.map +1 -1
  225. package/dist/esm/bcm-divider.entry.js +3 -3
  226. package/dist/esm/bcm-divider.entry.js.map +1 -1
  227. package/dist/esm/bcm-pop-confirm.entry.js +3 -3
  228. package/dist/esm/bcm-pop-confirm.entry.js.map +1 -1
  229. package/dist/esm/bcm-popover.entry.js +3 -3
  230. package/dist/esm/bcm-popover.entry.js.map +1 -1
  231. package/dist/esm/bcm-radio-group.entry.js +5 -5
  232. package/dist/esm/bcm-radio-group.entry.js.map +1 -1
  233. package/dist/esm/bcm-radio.entry.js +3 -3
  234. package/dist/esm/bcm-radio.entry.js.map +1 -1
  235. package/dist/esm/bcm-segmented-picker-option.entry.js +4 -4
  236. package/dist/esm/bcm-segmented-picker-option.entry.js.map +1 -1
  237. package/dist/esm/bcm-segmented-picker.entry.js +4 -4
  238. package/dist/esm/bcm-segmented-picker.entry.js.map +1 -1
  239. package/dist/esm/bcm-switch.entry.js +4 -4
  240. package/dist/esm/bcm-switch.entry.js.map +1 -1
  241. package/dist/esm/bcm-tabs-list.entry.js +3 -3
  242. package/dist/esm/bcm-tabs-list.entry.js.map +1 -1
  243. package/dist/esm/bcm-tabs-trigger.entry.js +3 -3
  244. package/dist/esm/bcm-tabs-trigger.entry.js.map +1 -1
  245. package/dist/esm/bcm-tabs.entry.js +3 -3
  246. package/dist/esm/bcm-tabs.entry.js.map +1 -1
  247. package/dist/esm/bcm-textarea.entry.js +5 -5
  248. package/dist/esm/bcm-textarea.entry.js.map +1 -1
  249. package/dist/esm/bcm-tooltip.entry.js +4 -9
  250. package/dist/esm/bcm-tooltip.entry.js.map +1 -1
  251. package/dist/esm/{index-f3b17e60.js → tv-6dcd2224.js} +16 -3
  252. package/dist/esm/tv-6dcd2224.js.map +1 -0
  253. package/dist/types/utils/tv.d.ts +20 -0
  254. package/package.json +1 -1
  255. package/dist/bromcom-ui/p-01c8dde2.entry.js +0 -2
  256. package/dist/bromcom-ui/p-01c8dde2.entry.js.map +0 -1
  257. package/dist/bromcom-ui/p-03be08cc.entry.js +0 -2
  258. package/dist/bromcom-ui/p-03be08cc.entry.js.map +0 -1
  259. package/dist/bromcom-ui/p-145dce31.entry.js.map +0 -1
  260. package/dist/bromcom-ui/p-1e5da10e.entry.js.map +0 -1
  261. package/dist/bromcom-ui/p-25583111.entry.js +0 -2
  262. package/dist/bromcom-ui/p-25583111.entry.js.map +0 -1
  263. package/dist/bromcom-ui/p-4149c766.entry.js.map +0 -1
  264. package/dist/bromcom-ui/p-42feef7e.entry.js.map +0 -1
  265. package/dist/bromcom-ui/p-5fcf77f9.js.map +0 -1
  266. package/dist/bromcom-ui/p-74b51cfc.entry.js +0 -2
  267. package/dist/bromcom-ui/p-74b51cfc.entry.js.map +0 -1
  268. package/dist/bromcom-ui/p-7b93985f.entry.js +0 -2
  269. package/dist/bromcom-ui/p-7b93985f.entry.js.map +0 -1
  270. package/dist/bromcom-ui/p-842b48ae.entry.js +0 -2
  271. package/dist/bromcom-ui/p-842b48ae.entry.js.map +0 -1
  272. package/dist/bromcom-ui/p-8550a2aa.entry.js.map +0 -1
  273. package/dist/bromcom-ui/p-94ced142.entry.js.map +0 -1
  274. package/dist/bromcom-ui/p-9ba07f12.entry.js.map +0 -1
  275. package/dist/bromcom-ui/p-a02e437c.entry.js +0 -2
  276. package/dist/bromcom-ui/p-a02e437c.entry.js.map +0 -1
  277. package/dist/bromcom-ui/p-b582c170.entry.js.map +0 -1
  278. package/dist/bromcom-ui/p-b6dd459b.entry.js +0 -2
  279. package/dist/bromcom-ui/p-b867a105.entry.js.map +0 -1
  280. package/dist/bromcom-ui/p-bbe4aac2.entry.js.map +0 -1
  281. package/dist/bromcom-ui/p-bc962a70.entry.js.map +0 -1
  282. package/dist/bromcom-ui/p-ceaa2fc5.entry.js +0 -2
  283. package/dist/bromcom-ui/p-ceaa2fc5.entry.js.map +0 -1
  284. package/dist/bromcom-ui/p-d975579d.entry.js.map +0 -1
  285. package/dist/bromcom-ui/p-e2f468ab.entry.js.map +0 -1
  286. package/dist/cjs/index-310db2a6.js.map +0 -1
  287. package/dist/components/p-5fcf77f9.js.map +0 -1
  288. package/dist/components/p-d54398ea.js.map +0 -1
  289. package/dist/components/p-d56f8a26.js.map +0 -1
  290. package/dist/esm/index-f3b17e60.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-18b75a47.js';
2
- import { c as ce } from './index-f3b17e60.js';
2
+ import { t as tv } from './tv-6dcd2224.js';
3
3
 
4
4
  const accordionCss = ".block{display:block}.flex{display:flex}.border{border-width:1px}:host{--bcm-accordion-bg:var(--bcm-ui-color-background-basic-panel);--bcm-accordion-content-bg:var(--bcm-ui-color-background-basic-base);--bcm-accordion-text:var(--bcm-ui-color-text-header);--bcm-accordion-border:var(--bcm-ui-color-border-default);--bcm-accordion-radius:6px;--bcm-accordion-footer-bg:var(--bcm-ui-color-background-default-default);display:block;width:100%}:host(:not([group])) .accordion-container{border:1px solid var(--bcm-accordion-border);border-radius:var(--bcm-accordion-radius)}:host([group]) .accordion-container{border-bottom:1px solid var(--bcm-accordion-border);border-radius:0}:host([group]:last-of-type) .accordion-container{border-bottom:none}:host([group]:first-of-type) .accordion-container{border-top-left-radius:var(--bcm-accordion-radius);border-top-right-radius:var(--bcm-accordion-radius)}:host([group]:last-of-type) .accordion-footer{border-bottom-left-radius:var(--bcm-accordion-radius);border-bottom-right-radius:var(--bcm-accordion-radius)}:host(:not([group])) .accordion-footer{border-bottom-left-radius:var(--bcm-accordion-radius);border-bottom-right-radius:var(--bcm-accordion-radius)}::slotted([slot=title]){align-items:center;display:flex;flex-direction:row;gap:10px}::slotted([slot=actions]){align-items:center;display:flex;flex-direction:row;gap:12px}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.collapse{visibility:collapse}.static{position:static}.hidden{display:none}.w-full{width:100%}.min-w-max{min-width:max-content}.rotate-0{--tw-rotate:0deg}.rotate-0,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.overflow-hidden{overflow:hidden}.text-wrap{text-wrap:wrap}.rounded-\\[--bcm-accordion-radius\\]{border-radius:var(--bcm-accordion-radius)}.bg-\\[--bcm-accordion-bg\\]{background-color:var(--bcm-accordion-bg)}.bg-\\[--bcm-accordion-footer-bg\\]{background-color:var(--bcm-accordion-footer-bg)}.bg-color-basic-base{background-color:var(--bcm-ui-color-background-basic-base)}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-\\[--bcm-accordion-text\\]{color:var(--bcm-accordion-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}";
5
5
  const BcmAccordionStyle0 = accordionCss;
@@ -36,7 +36,7 @@ const BcmAccordion = class {
36
36
  const assignedNodes = slot.assignedNodes();
37
37
  this.hasFooterContent = assignedNodes.length > 0;
38
38
  };
39
- this.accordionClass = ce({
39
+ this.accordionClass = tv({
40
40
  slots: {
41
41
  container: 'accordion-container flex flex-col bcm-ui-element w-full',
42
42
  header: 'accordion-header flex flex-row justify-between gap-2 p-4 min-w-max flex-nowrap text-wrap rounded-[--bcm-accordion-radius] bg-[--bcm-accordion-bg] text-[--bcm-accordion-text] font-semibold text-size-6 cursor-pointer',
@@ -108,12 +108,12 @@ const BcmAccordion = class {
108
108
  hasFooterContent: this.hasFooterContent || !!this.hintText,
109
109
  expanded: this.expanded,
110
110
  });
111
- return (h("div", { key: '27ff1bd29d72a8fc284388a63a78341f1b662ff1', class: container() }, h("header", { key: '56773b09da2bd2487605f77eccaeaf400e8071d7', class: header(), role: "button", tabindex: "0", "aria-expanded": this.expanded.toString(), "aria-controls": "accordion-content", onKeyDown: e => {
111
+ return (h("div", { key: '87ce73be8f472b01117a749d4710522dbaedee2b', class: container() }, h("header", { key: 'bd7de6c59a80a49d0d710177d92b17188b632f20', class: header(), role: "button", tabindex: "0", "aria-expanded": this.expanded.toString(), "aria-controls": "accordion-content", onKeyDown: e => {
112
112
  if (e.key === 'Enter' || e.key === ' ') {
113
113
  e.preventDefault();
114
114
  this.toggle();
115
115
  }
116
- }, onClick: () => this.toggle() }, h("slot", { key: 'b2cbd55b6451fa0ccee7380d20499d328bf0d9d6', name: "title" }, this.headerTitle), h("div", { key: '631868f3ece38ee69f870091280ccbbf8b8dddfe', class: rightSection() }, h("span", { key: '75ad805a845e2fbaf90121e5aa318d75d835615a', onClick: e => e.stopPropagation() }, h("slot", { key: 'd564a348a4910c5ea39cabe9e62463b1a33f9e26', name: "actions" })), h("bcm-icon", { key: '07993b813a2eb5514f4288d9d2fac09c07c20991', name: "fa-regular fa-chevron-down", class: icon() }))), h("div", { key: '587c6edacb62d46b409f3786a676dbb9a8a5fd8d', class: content(), style: { maxHeight: this.expanded ? 'auto' : '0px' }, ref: el => (this.contentEl = el) }, h("div", { key: 'f54eae8dec6696e93b1e2582324603e2eda30d95', class: "px-4 py-2" }, h("slot", { key: 'd592d7d2ebd5ae4eb4db83727ad52e59dbccf63d' })), h("footer", { key: 'bc89caa25026dbf0b694dbe6e4f4e8671b9aedf5', class: footer() }, h("slot", { key: '8b8fa05823f6834bed78c97d449cbd3367eee5ad', name: "footer", onSlotchange: this.handleFooterSlotChange }, this.hintText)))));
116
+ }, onClick: () => this.toggle() }, h("slot", { key: '01e61987be9466b4d7cd9f32f8f7489e0bcca9a2', name: "title" }, this.headerTitle), h("div", { key: 'b1557c7ae2bbd3eddcca2288652064a15b328e86', class: rightSection() }, h("span", { key: '2e77fd024a2d40a39fb45328cfd262326125c90d', onClick: e => e.stopPropagation() }, h("slot", { key: '861ab5b233b0f8486cdc15ae38016932ea322495', name: "actions" })), h("bcm-icon", { key: 'bbdc38622b7ce2855d192a7a23bbfccd8bae1a9a', name: "fa-regular fa-chevron-down", class: icon() }))), h("div", { key: 'adf600fa94f37031eb2033bf7defe561d670207c', class: content(), style: { maxHeight: this.expanded ? 'auto' : '0px' }, ref: el => (this.contentEl = el) }, h("div", { key: '4b4548c327040379072a990e9c8f88f27a842dcd', class: "px-4 py-2" }, h("slot", { key: '75991bdc295857e4b8ebcaefb3133942284ace78' })), h("footer", { key: 'dc068b7abb0ce9599b6ff398d2be93b6b9cab0bf', class: footer() }, h("slot", { key: '7c7099d0f20fa7fddc653bb7d6aa2814b6e81cd0', name: "footer", onSlotchange: this.handleFooterSlotChange }, this.hintText)))));
117
117
  }
118
118
  get host() { return getElement(this); }
119
119
  };
@@ -1 +1 @@
1
- {"file":"bcm-accordion.entry.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,+3HAA+3H,CAAC;AACr5H,2BAAe,YAAY;;MCyEd,YAAY;IALzB;;;;;;;;QAeE,aAAQ,GAAY,KAAK,CAAC;;;;;;;QAkB1B,UAAK,GAAY,KAAK,CAAC;;;;;QAcvB,qBAAgB,GAAY,KAAK,CAAC;;;;;;QAqE1B,2BAAsB,GAAG,CAAC,CAAQ;YACxC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAyB,CAAC;YACzC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;SAClD,CAAC;QAEM,mBAAc,GAAGA,EAAE,CACzB;YACE,KAAK,EAAE;gBACL,SAAS,EAAE,yDAAyD;gBACpE,MAAM,EACJ,wNAAwN;gBAC1N,OAAO,EAAE,+FAA+F;gBACxG,MAAM,EAAE,yJAAyJ;gBACjK,IAAI,EAAE,2EAA2E;gBACjF,YAAY,EAAE,4DAA4D;aAC3E;YACD,QAAQ,EAAE;gBACR,gBAAgB,EAAE;oBAChB,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;oBAC3B,IAAI,EAAE,EAAE,MAAM,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=shadow","src/components/accordion/accordion.component.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n --bcm-accordion-bg: var(--bcm-ui-color-background-basic-panel);\n --bcm-accordion-content-bg: var(--bcm-ui-color-background-basic-base);\n --bcm-accordion-text: var(--bcm-ui-color-text-header);\n --bcm-accordion-border: var(--bcm-ui-color-border-default);\n --bcm-accordion-radius: 6px;\n --bcm-accordion-footer-bg: var(--bcm-ui-color-background-default-default);\n}\n\n:host(:not([group])) .accordion-container {\n border: 1px solid var(--bcm-accordion-border);\n border-radius: var(--bcm-accordion-radius);\n}\n\n:host([group]) .accordion-container {\n border-bottom: 1px solid var(--bcm-accordion-border);\n border-radius: 0;\n}\n\n:host([group]:last-of-type) .accordion-container {\n border-bottom: none;\n}\n\n:host([group]:first-of-type) .accordion-container {\n border-top-left-radius: var(--bcm-accordion-radius);\n border-top-right-radius: var(--bcm-accordion-radius);\n}\n\n:host([group]:last-of-type) .accordion-footer {\n border-bottom-left-radius: var(--bcm-accordion-radius);\n border-bottom-right-radius: var(--bcm-accordion-radius);\n}\n\n:host(:not([group])) .accordion-footer {\n border-bottom-left-radius: var(--bcm-accordion-radius);\n border-bottom-right-radius: var(--bcm-accordion-radius);\n}\n\n::slotted([slot='title']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n::slotted([slot='actions']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 12px;\n}\n","import { Component, ComponentInterface, EventEmitter, h, Method, Prop, Event, State, Element } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\nimport { AccordionChangeEventType } from './types';\n\n/**\n * @component BcmAccordion\n * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation\n * and accessibility features. Offers customizable header, content, and footer areas through slots.\n *\n * @example Basic usage\n * <bcm-accordion>\n * <div slot=\"title\">Accordion Title</div>\n * <div>Content goes here</div>\n * </bcm-accordion>\n *\n * @example With all slots and hint text\n * <bcm-accordion hint-text=\"Additional information\">\n * <div slot=\"title\">Title</div>\n * <div slot=\"actions\">\n * <button>Action</button>\n * </div>\n * <div>Main content</div>\n * <div slot=\"footer\">Footer content</div>\n * </bcm-accordion>\n *\n * @example Event handling\n * // Listen to accordion state changes\n * const accordion = document.querySelector('bcm-accordion');\n * accordion.addEventListener('bcmAccordionChange', (event) => {\n * const { expanded, source } = event.detail;\n * console.log('Accordion expanded:', expanded);\n * console.log('Changed accordion:', source);\n * });\n *\n * // Programmatically control accordion\n * await accordion.toggle(); // Toggle state\n * await accordion.expand(); // Expand accordion\n * await accordion.collapse(); // Collapse accordion\n *\n * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false)\n * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false)\n * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided\n *\n * @slot title - Primary title content for the accordion header (required)\n * @slot actions - Additional actions to be displayed in the header (optional)\n * @slot default - Main content area of the accordion\n * @slot footer - Optional footer content (overrides hint-text if provided)\n *\n * @event {EventEmitter<AccordionChangeEventType>} bcmAccordionChange - Emitted when the accordion's expanded state changes\n * @eventProperty {boolean} expanded - Current expanded state\n * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed\n *\n * @csspart container - The root container element\n * @csspart header - The header section with title and actions\n * @csspart content - The collapsible content section\n * @csspart footer - The footer section with hint text or footer slot\n * @csspart section - Container for header content sections\n * @csspart icon - The expand/collapse chevron icon\n *\n * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px)\n * @css {string} --bcm-accordion-bg - Background color of the accordion header\n * @css {string} --bcm-accordion-text - Text color of the accordion\n * @css {string} --bcm-accordion-footer-bg - Background color of the footer section\n *\n * @methods\n * toggle() - Toggles the accordion's expanded state\n * expand() - Expands the accordion if collapsed\n * collapse() - Collapses the accordion if expanded\n */\n@Component({\n tag: 'bcm-accordion',\n styleUrl: 'accordion.css',\n shadow: true,\n})\nexport class BcmAccordion implements ComponentInterface {\n /** Reference to the host element */\n @Element() host: HTMLElement;\n\n /**\n * Controls whether the accordion is expanded or collapsed.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean = false;\n\n /**\n * Optional title text to display in the header.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n headerTitle?: string;\n\n /**\n * Indicates if the accordion is part of a group.\n * Used for group behavior coordination.\n * @prop\n * @defaultValue false\n */\n\n @Prop({ reflect: true })\n group: boolean = false;\n\n /**\n * Optional text to display in the footer when no footer slot content is provided.\n * @prop\n */\n @Prop({ attribute: 'hint-text' })\n hintText?: string;\n\n /**\n * Tracks whether footer content is present.\n * @state\n */\n @State()\n hasFooterContent: boolean = false;\n\n /**\n * Emitted when the accordion's expanded state changes.\n * @event\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmAccordionChange',\n })\n bcmAccordionChange: EventEmitter<AccordionChangeEventType>;\n\n private contentEl?: HTMLElement;\n\n /**\n * Toggles the accordion's expanded state.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async toggle(): Promise<void> {\n this.expanded = !this.expanded;\n this.updateAccordion();\n }\n\n /**\n * Expands the accordion if it's not already expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async expand(): Promise<void> {\n if (!this.expanded) {\n this.expanded = true;\n this.updateAccordion();\n }\n }\n\n /**\n * Collapses the accordion if it's currently expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async collapse(): Promise<void> {\n if (this.expanded) {\n this.expanded = false;\n this.updateAccordion();\n }\n }\n\n /**\n * Updates the accordion's content height and emits change event.\n * @private\n */\n private updateAccordion(): void {\n if (this.contentEl) {\n this.contentEl.style.maxHeight = this.expanded ? `${this.contentEl.scrollHeight}px` : '0px';\n }\n this.bcmAccordionChange.emit({ expanded: this.expanded, source: this.host as HTMLBcmAccordionElement });\n }\n\n /**\n * Handles changes to the footer slot content.\n * @private\n * @param e - Slot change event\n */\n private handleFooterSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n const assignedNodes = slot.assignedNodes();\n this.hasFooterContent = assignedNodes.length > 0;\n };\n\n private accordionClass = tv(\n {\n slots: {\n container: 'accordion-container flex flex-col bcm-ui-element w-full',\n header:\n 'accordion-header flex flex-row justify-between gap-2 p-4 min-w-max flex-nowrap text-wrap rounded-[--bcm-accordion-radius] bg-[--bcm-accordion-bg] text-[--bcm-accordion-text] font-semibold text-size-6 cursor-pointer',\n content: 'accordion-content overflow-hidden transition-all duration-300 ease-in-out bg-color-basic-base',\n footer: 'accordion-footer flex flex-row flex-nowrap bg-[--bcm-accordion-footer-bg] text-[--bcm-accordion-text] px-4 py-2 gap-2 text-size-4 font-normal min-w-max',\n icon: 'accordion-icon cursor-pointer transform transition-transform duration-300',\n rightSection: 'accordion-right-section flex flex-row gap-2.5 items-center',\n },\n variants: {\n hasFooterContent: {\n false: { footer: 'hidden' },\n true: { footer: 'flex' },\n },\n expanded: {\n true: { icon: 'rotate-180' },\n false: {\n icon: 'rotate-0',\n content: '',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, header, content, footer, icon, rightSection } = this.accordionClass({\n hasFooterContent: this.hasFooterContent || !!this.hintText,\n expanded: this.expanded,\n });\n\n return (\n <div class={container()}>\n {/* Header */}\n <header\n class={header()}\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.expanded.toString()}\n aria-controls=\"accordion-content\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.toggle();\n }\n }}\n onClick={() => this.toggle()}\n >\n <slot name=\"title\">{this.headerTitle}</slot>\n {/* Actions */}\n <div class={rightSection()}>\n <span onClick={e => e.stopPropagation()}>\n <slot name=\"actions\"></slot>\n </span>\n <bcm-icon name=\"fa-regular fa-chevron-down\" class={icon()}></bcm-icon>\n </div>\n </header>\n {/* Content */}\n <div class={content()} style={{ maxHeight: this.expanded ? 'auto' : '0px' }} ref={el => (this.contentEl = el as HTMLElement)}>\n <div class=\"px-4 py-2\">\n <slot></slot>\n </div>\n <footer class={footer()}>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange}>\n {this.hintText}\n </slot>\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-accordion.entry.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,+3HAA+3H,CAAC;AACr5H,2BAAe,YAAY;;MCyEd,YAAY;IALzB;;;;;;;;QAeE,aAAQ,GAAY,KAAK,CAAC;;;;;;;QAkB1B,UAAK,GAAY,KAAK,CAAC;;;;;QAcvB,qBAAgB,GAAY,KAAK,CAAC;;;;;;QAqE1B,2BAAsB,GAAG,CAAC,CAAQ;YACxC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAyB,CAAC;YACzC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;SAClD,CAAC;QAEM,mBAAc,GAAG,EAAE,CACzB;YACE,KAAK,EAAE;gBACL,SAAS,EAAE,yDAAyD;gBACpE,MAAM,EACJ,wNAAwN;gBAC1N,OAAO,EAAE,+FAA+F;gBACxG,MAAM,EAAE,yJAAyJ;gBACjK,IAAI,EAAE,2EAA2E;gBACjF,YAAY,EAAE,4DAA4D;aAC3E;YACD,QAAQ,EAAE;gBACR,gBAAgB,EAAE;oBAChB,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;oBAC3B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;iBACzB;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;oBAC5B,KAAK,EAAE;wBACL,IAAI,EAAE,UAAU;wBAChB,OAAO,EAAE,EAAE;qBACZ;iBACF;aACF;SACF,EACD;YACE,OAAO,EAAE,KAAK;SACf,CACF,CAAC;KAgDH;;;;;;IAjIC,MAAM,MAAM;QACV,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,Q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AI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;oBACtC,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,IAAI,CAAC,MAAM,EAAE,CAAC;iBACf;aACF,EACD,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,IAE5B,6DAAM,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,WAAW,CAAQ,EAE5C,4DAAK,KAAK,EAAE,YAAY,EAAE,IACxB,6DAAM,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,IACrC,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACvB,EACP,iEAAU,IAAI,EAAC,4BAA4B,EAAC,KAAK,EAAE,IAAI,EAAE,GAAa,CAClE,CACC,EAET,4DAAK,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAiB,CAAC,IAC1H,4DAAK,KAAK,EAAC,WAAW,IACpB,8DAAa,CACT,EACN,+DAAQ,KAAK,EAAE,MAAM,EAAE,IACrB,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,sBAAsB,IAC1D,IAAI,CAAC,QAAQ,CACT,CACA,CACL,CACF,EACN;KACH;;;;;;;","names":[],"sources":["src/components/accordion/accordion.css?tag=bcm-accordion&encapsulation=shadow","src/components/accordion/accordion.component.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n --bcm-accordion-bg: var(--bcm-ui-color-background-basic-panel);\n --bcm-accordion-content-bg: var(--bcm-ui-color-background-basic-base);\n --bcm-accordion-text: var(--bcm-ui-color-text-header);\n --bcm-accordion-border: var(--bcm-ui-color-border-default);\n --bcm-accordion-radius: 6px;\n --bcm-accordion-footer-bg: var(--bcm-ui-color-background-default-default);\n}\n\n:host(:not([group])) .accordion-container {\n border: 1px solid var(--bcm-accordion-border);\n border-radius: var(--bcm-accordion-radius);\n}\n\n:host([group]) .accordion-container {\n border-bottom: 1px solid var(--bcm-accordion-border);\n border-radius: 0;\n}\n\n:host([group]:last-of-type) .accordion-container {\n border-bottom: none;\n}\n\n:host([group]:first-of-type) .accordion-container {\n border-top-left-radius: var(--bcm-accordion-radius);\n border-top-right-radius: var(--bcm-accordion-radius);\n}\n\n:host([group]:last-of-type) .accordion-footer {\n border-bottom-left-radius: var(--bcm-accordion-radius);\n border-bottom-right-radius: var(--bcm-accordion-radius);\n}\n\n:host(:not([group])) .accordion-footer {\n border-bottom-left-radius: var(--bcm-accordion-radius);\n border-bottom-right-radius: var(--bcm-accordion-radius);\n}\n\n::slotted([slot='title']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n::slotted([slot='actions']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 12px;\n}\n","import { Component, ComponentInterface, EventEmitter, h, Method, Prop, Event, State, Element } from '@stencil/core';\nimport { tv } from '@utils/tv';\nimport { AccordionChangeEventType } from './types';\n\n/**\n * @component BcmAccordion\n * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation\n * and accessibility features. Offers customizable header, content, and footer areas through slots.\n *\n * @example Basic usage\n * <bcm-accordion>\n * <div slot=\"title\">Accordion Title</div>\n * <div>Content goes here</div>\n * </bcm-accordion>\n *\n * @example With all slots and hint text\n * <bcm-accordion hint-text=\"Additional information\">\n * <div slot=\"title\">Title</div>\n * <div slot=\"actions\">\n * <button>Action</button>\n * </div>\n * <div>Main content</div>\n * <div slot=\"footer\">Footer content</div>\n * </bcm-accordion>\n *\n * @example Event handling\n * // Listen to accordion state changes\n * const accordion = document.querySelector('bcm-accordion');\n * accordion.addEventListener('bcmAccordionChange', (event) => {\n * const { expanded, source } = event.detail;\n * console.log('Accordion expanded:', expanded);\n * console.log('Changed accordion:', source);\n * });\n *\n * // Programmatically control accordion\n * await accordion.toggle(); // Toggle state\n * await accordion.expand(); // Expand accordion\n * await accordion.collapse(); // Collapse accordion\n *\n * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false)\n * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false)\n * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided\n *\n * @slot title - Primary title content for the accordion header (required)\n * @slot actions - Additional actions to be displayed in the header (optional)\n * @slot default - Main content area of the accordion\n * @slot footer - Optional footer content (overrides hint-text if provided)\n *\n * @event {EventEmitter<AccordionChangeEventType>} bcmAccordionChange - Emitted when the accordion's expanded state changes\n * @eventProperty {boolean} expanded - Current expanded state\n * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed\n *\n * @csspart container - The root container element\n * @csspart header - The header section with title and actions\n * @csspart content - The collapsible content section\n * @csspart footer - The footer section with hint text or footer slot\n * @csspart section - Container for header content sections\n * @csspart icon - The expand/collapse chevron icon\n *\n * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px)\n * @css {string} --bcm-accordion-bg - Background color of the accordion header\n * @css {string} --bcm-accordion-text - Text color of the accordion\n * @css {string} --bcm-accordion-footer-bg - Background color of the footer section\n *\n * @methods\n * toggle() - Toggles the accordion's expanded state\n * expand() - Expands the accordion if collapsed\n * collapse() - Collapses the accordion if expanded\n */\n@Component({\n tag: 'bcm-accordion',\n styleUrl: 'accordion.css',\n shadow: true,\n})\nexport class BcmAccordion implements ComponentInterface {\n /** Reference to the host element */\n @Element() host: HTMLElement;\n\n /**\n * Controls whether the accordion is expanded or collapsed.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean = false;\n\n /**\n * Optional title text to display in the header.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n headerTitle?: string;\n\n /**\n * Indicates if the accordion is part of a group.\n * Used for group behavior coordination.\n * @prop\n * @defaultValue false\n */\n\n @Prop({ reflect: true })\n group: boolean = false;\n\n /**\n * Optional text to display in the footer when no footer slot content is provided.\n * @prop\n */\n @Prop({ attribute: 'hint-text' })\n hintText?: string;\n\n /**\n * Tracks whether footer content is present.\n * @state\n */\n @State()\n hasFooterContent: boolean = false;\n\n /**\n * Emitted when the accordion's expanded state changes.\n * @event\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmAccordionChange',\n })\n bcmAccordionChange: EventEmitter<AccordionChangeEventType>;\n\n private contentEl?: HTMLElement;\n\n /**\n * Toggles the accordion's expanded state.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async toggle(): Promise<void> {\n this.expanded = !this.expanded;\n this.updateAccordion();\n }\n\n /**\n * Expands the accordion if it's not already expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async expand(): Promise<void> {\n if (!this.expanded) {\n this.expanded = true;\n this.updateAccordion();\n }\n }\n\n /**\n * Collapses the accordion if it's currently expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async collapse(): Promise<void> {\n if (this.expanded) {\n this.expanded = false;\n this.updateAccordion();\n }\n }\n\n /**\n * Updates the accordion's content height and emits change event.\n * @private\n */\n private updateAccordion(): void {\n if (this.contentEl) {\n this.contentEl.style.maxHeight = this.expanded ? `${this.contentEl.scrollHeight}px` : '0px';\n }\n this.bcmAccordionChange.emit({ expanded: this.expanded, source: this.host as HTMLBcmAccordionElement });\n }\n\n /**\n * Handles changes to the footer slot content.\n * @private\n * @param e - Slot change event\n */\n private handleFooterSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n const assignedNodes = slot.assignedNodes();\n this.hasFooterContent = assignedNodes.length > 0;\n };\n\n private accordionClass = tv(\n {\n slots: {\n container: 'accordion-container flex flex-col bcm-ui-element w-full',\n header:\n 'accordion-header flex flex-row justify-between gap-2 p-4 min-w-max flex-nowrap text-wrap rounded-[--bcm-accordion-radius] bg-[--bcm-accordion-bg] text-[--bcm-accordion-text] font-semibold text-size-6 cursor-pointer',\n content: 'accordion-content overflow-hidden transition-all duration-300 ease-in-out bg-color-basic-base',\n footer: 'accordion-footer flex flex-row flex-nowrap bg-[--bcm-accordion-footer-bg] text-[--bcm-accordion-text] px-4 py-2 gap-2 text-size-4 font-normal min-w-max',\n icon: 'accordion-icon cursor-pointer transform transition-transform duration-300',\n rightSection: 'accordion-right-section flex flex-row gap-2.5 items-center',\n },\n variants: {\n hasFooterContent: {\n false: { footer: 'hidden' },\n true: { footer: 'flex' },\n },\n expanded: {\n true: { icon: 'rotate-180' },\n false: {\n icon: 'rotate-0',\n content: '',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, header, content, footer, icon, rightSection } = this.accordionClass({\n hasFooterContent: this.hasFooterContent || !!this.hintText,\n expanded: this.expanded,\n });\n\n return (\n <div class={container()}>\n {/* Header */}\n <header\n class={header()}\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.expanded.toString()}\n aria-controls=\"accordion-content\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.toggle();\n }\n }}\n onClick={() => this.toggle()}\n >\n <slot name=\"title\">{this.headerTitle}</slot>\n {/* Actions */}\n <div class={rightSection()}>\n <span onClick={e => e.stopPropagation()}>\n <slot name=\"actions\"></slot>\n </span>\n <bcm-icon name=\"fa-regular fa-chevron-down\" class={icon()}></bcm-icon>\n </div>\n </header>\n {/* Content */}\n <div class={content()} style={{ maxHeight: this.expanded ? 'auto' : '0px' }} ref={el => (this.contentEl = el as HTMLElement)}>\n <div class=\"px-4 py-2\">\n <slot></slot>\n </div>\n <footer class={footer()}>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange}>\n {this.hintText}\n </slot>\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-18b75a47.js';
2
- import { c as ce } from './index-f3b17e60.js';
2
+ import { t as tv } from './tv-6dcd2224.js';
3
3
 
4
- const alertCss = ":host{--bcm-alert-bg:var(--bcm-ui-color-background-default-default);--bcm-alert-text:var(--bcm-ui-color-text-default);--bcm-alert-radius:6px;display:inline-block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.flex{display:flex}.w-full{width:100%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.rounded-\\[--bcm-alert-radius\\]{border-radius:var(--bcm-alert-radius)}.bg-\\[--bcm-alert-bg\\]{background-color:var(--bcm-alert-bg)}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.text-\\[--bcm-alert-text\\]{color:var(--bcm-alert-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
4
+ const alertCss = ":host{--bcm-alert-bg:var(--bcm-ui-color-background-default-default);--bcm-alert-text:var(--bcm-ui-color-text-default);--bcm-alert-radius:6px;display:inline-block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.flex{display:flex}.w-full{width:100%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.rounded-\\[--bcm-alert-radius\\]{border-radius:var(--bcm-alert-radius)}.bg-\\[--bcm-alert-bg\\]{background-color:var(--bcm-alert-bg)}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.text-\\[--bcm-alert-text\\]{color:var(--bcm-alert-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
5
5
  const BcmAlertStyle0 = alertCss;
6
6
 
7
7
  const BcmAlert = class {
@@ -36,7 +36,7 @@ const BcmAlert = class {
36
36
  return statusIcon[this.status];
37
37
  }
38
38
  get alertClass() {
39
- return ce({
39
+ return tv({
40
40
  slots: {
41
41
  base: 'alert bcm-ui-element font-medium flex items-center justify-between bg-[--bcm-alert-bg] text-[--bcm-alert-text] rounded-[--bcm-alert-radius] px-3 gap-3 w-full',
42
42
  section: 'flex items-center gap-2',
@@ -85,7 +85,7 @@ const BcmAlert = class {
85
85
  }
86
86
  render() {
87
87
  const { base, section } = this.alertClass({ size: this.size });
88
- return (h("div", { key: '7f91a09d5cd85203bbcb7ec2848abbd38381b7d7', role: "alert", "aria-live": "assertive", "aria-atomic": "true", class: base(), style: this.alertStyles }, h("div", { key: 'f0a3407e8998632cf4768205a584ee76602dd10e', class: section() }, this.showStatusIcon && h("bcm-icon", { key: 'c89277913df205769b27695afda17fbae27e5dcd', "icon-name": this.getStatusIcon() }), h("slot", { key: '7ee558872bbe2ef7f056f9d5762920c1a373cf00' })), h("div", { key: '0e5800023a34fb739945c390186f372ae4ea6ceb', class: section() }, h("div", { key: 'a23280a4885d74e4c7373b7d099f9ddb0c59164e', part: "action" }, h("slot", { key: 'd0901245812635e28b13c76e9c841b4052d4d307', name: "action" })), h("span", { key: '0a90cd1625e033d34ec3724473f5956a96dc7fb3', part: "icon" }, this.dismissible && h("bcm-icon", { key: '0a29cfaa6dc3c4dda309740e210d9e607b71fba1', onClick: () => this.onDismiss(), class: "cursor-pointer", "icon-name": "fa-regular fa-xmark" })))));
88
+ return (h("div", { key: 'e1318bdead531e9fbc41b6655a2ccc7dabc238b4', role: "alert", "aria-live": "assertive", "aria-atomic": "true", class: base(), style: this.alertStyles }, h("div", { key: '091e10560ea4e0303a0aa5bf44781bc1ec9142f5', class: section() }, this.showStatusIcon && h("bcm-icon", { key: 'cc291efafeaa6c3c13540beabf2a342aae8c55f9', "icon-name": this.getStatusIcon() }), h("slot", { key: '20ffe11a6e67e63b7fe1e3ca6480d0b961a0c73a' })), h("div", { key: '12036534877bd9995b865de5a4035967774e906b', class: section() }, h("div", { key: '99eca0bc5b73ea918669668aa90b441b516dc58d', part: "action" }, h("slot", { key: '9f7b36b8ec6082cbaeef9f098fdc84518168368e', name: "action" })), h("span", { key: '1eb45ae11c771500e37c84587ab0048ccd3ab85c', part: "icon" }, this.dismissible && h("bcm-icon", { key: '9b77f9a8921fa4e84b50a5b9ca242b0c4b73935a', onClick: () => this.onDismiss(), class: "cursor-pointer", "icon-name": "fa-regular fa-xmark" })))));
89
89
  }
90
90
  };
91
91
  BcmAlert.style = BcmAlertStyle0;
@@ -1 +1 @@
1
- {"file":"bcm-alert.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,i3CAAi3C,CAAC;AACn4C,uBAAe,QAAQ;;MCaV,QAAQ;IALrB;;;;QAQI,WAAM,GAAiB,SAAS,CAAC;;QAIjC,SAAI,GAAe,QAAQ,CAAC;;QAI5B,SAAI,GAAe,QAAQ,CAAC;;QAI5B,gBAAW,GAAa,IAAI,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IAAI,SAAS,GAAG;YACZ,gBAAgB,EAAE,aAAa;YAC/B,kBAAkB,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;SACnD,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;KAC1D;IAED,MAAM;QACF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/D,QACI,4DAAK,IAAI,EAAC,OAAO,eAAW,WAAW,iBAAa,MAAM,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,IAC7F,4DAAK,KAAK,EAAE,OAAO,EAAE,IAChB,IAAI,CAAC,cAAc,IAAI,8EAAqB,IAAI,CAAC,aAAa,EAAE,GAAa,EAC9E,8DAAa,CACX,EACN,4DAAK,KAAK,EAAE,OAAO,EAAE,IACjB,4DAAK,IAAI,EAAC,QAAQ,IACd,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACzB,EACN,6DAAM,IAAI,EAAC,MAAM,IAAE,IAAI,CAAC,WAAW,IAAI,iEAAU,OAAO,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAC,gBAAgB,eAAW,qBAAqB,GAAY,CAAQ,CAC1J,CACJ,EACR;KACL;;;;;;","names":["tv"],"sources":["src/components/alert/alert.css?tag=bcm-alert&encapsulation=shadow","src/components/alert/alert.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n width: 100%;\n --bcm-alert-bg: var(--bcm-ui-color-background-default-default);\n --bcm-alert-text: var(--bcm-ui-color-text-default);\n --bcm-alert-radius: 6px;\n}\n","import { Component, ComponentInterface, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { AlertKind, AlertSize, AlertStatus } from './types';\nimport { tv } from 'tailwind-variants';\n\n\n/**\n * Alert component that displays messages with different statuses and styles\n * @class BcmAlert\n */\n@Component({\n tag: 'bcm-alert',\n styleUrl: 'alert.css',\n shadow: true,\n})\nexport class BcmAlert implements ComponentInterface {\n /** Alert status type */\n @Prop()\n status?: AlertStatus = 'default';\n\n /** Alert size variant */\n @Prop()\n size?: AlertSize = 'medium';\n\n /** Alert style variant */\n @Prop()\n kind?: AlertKind = 'filled';\n\n /** Whether alert can be dismissed */\n @Prop()\n dismissible?: boolean = true;\n\n /** Whether to show status icon */\n @Prop()\n showStatusIcon?: boolean = true;\n\n @Event() bcmDismiss: EventEmitter<void>;\n\n\n /**\n * Handles alert dismissal\n * @private\n */\n private onDismiss() {\n this.bcmDismiss.emit();\n }\n\n private getStatusIcon() {\n const statusIcon = {\n info: 'fa-regular fa-info-circle',\n error: 'fa-regular fa-exclamation-circle',\n warning: 'fa-regular fa-exclamation-triangle',\n success: 'fa-regular fa-check-circle',\n };\n return statusIcon[this.status];\n }\n\n private get alertClass() {\n return tv(\n {\n slots: {\n base: 'alert bcm-ui-element font-medium flex items-center justify-between bg-[--bcm-alert-bg] text-[--bcm-alert-text] rounded-[--bcm-alert-radius] px-3 gap-3 w-full',\n section: 'flex items-center gap-2',\n },\n variants: {\n size: {\n small: {\n base: 'py-1.5 text-size-4',\n },\n medium: {\n base: 'py-2 text-size-5',\n },\n large: {\n base: 'py-2.5 text-size-6',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n }\n\n private get alertStyles() {\n let colorStatus = {\n info: 'var(--bcm-ui-color-background-palette-blue-default)',\n error: 'var(--bcm-ui-color-background-palette-red-default)',\n warning: 'var(--bcm-ui-color-background-palette-yellow-default)',\n success: 'var(--bcm-ui-color-background-palette-green-default)',\n default: 'var(--bcm-ui-color-background-palette-gray-default)',\n };\n\n let textStatusColor = {\n info: 'var(--bcm-ui-color-text-info)',\n error: 'var(--bcm-ui-color-text-error)',\n warning: 'var(--bcm-ui-color-text-warning)',\n success: 'var(--bcm-ui-color-text-success)',\n default: 'var(--bcm-ui-color-text-default)',\n };\n\n let filleStyle = {\n '--bcm-alert-bg': colorStatus[this.status],\n '--bcm-alert-text': textStatusColor[this.status],\n };\n\n let textStyle = {\n '--bcm-alert-bg': 'transparent',\n '--bcm-alert-text': textStatusColor[this.status],\n };\n\n return this.kind === 'filled' ? filleStyle : textStyle;\n }\n\n render() {\n const { base, section } = this.alertClass({ size: this.size });\n return (\n <div role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class={base()} style={this.alertStyles}>\n <div class={section()}>\n {this.showStatusIcon && <bcm-icon icon-name={this.getStatusIcon()}></bcm-icon>}\n <slot></slot>\n </div>\n <div class={section()}>\n <div part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n <span part=\"icon\">{this.dismissible && <bcm-icon onClick={() => this.onDismiss()} class=\"cursor-pointer\" icon-name=\"fa-regular fa-xmark\"></bcm-icon>}</span>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-alert.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,y4CAAy4C,CAAC;AAC35C,uBAAe,QAAQ;;MCYV,QAAQ;IALrB;;;;QAQE,WAAM,GAAiB,SAAS,CAAC;;QAIjC,SAAI,GAAe,QAAQ,CAAC;;QAI5B,SAAI,GAAe,QAAQ,CAAC;;QAI5B,gBAAW,GAAa,IAAI,CAAC;;QAI7B,mBAAc,GAAa,IAAI,CAAC;KAgGjC;;;;;IAxFS,SAAS;QACf,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;KACxB;IAEO,aAAa;QACnB,MAAM,UAAU,GAAG;YACjB,IAAI,EAAE,2BAA2B;YACjC,KAAK,EAAE,kCAAkC;YACzC,OAAO,EAAE,oCAAoC;YAC7C,OAAO,EAAE,4BAA4B;SACtC,CAAC;QACF,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;IAED,IAAY,UAAU;QACpB,OAAO,EAAE,CACP;YACE,KAAK,EAAE;gBACL,IAAI,EAAE,+JAA+J;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EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,IAC/F,4DAAK,KAAK,EAAE,OAAO,EAAE,IAClB,IAAI,CAAC,cAAc,IAAI,8EAAqB,IAAI,CAAC,aAAa,EAAE,GAAa,EAC9E,8DAAa,CACT,EACN,4DAAK,KAAK,EAAE,OAAO,EAAE,IACnB,4DAAK,IAAI,EAAC,QAAQ,IAChB,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,EACN,6DAAM,IAAI,EAAC,MAAM,IAAE,IAAI,CAAC,WAAW,IAAI,iEAAU,OAAO,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAC,gBAAgB,eAAW,qBAAqB,GAAY,CAAQ,CACxJ,CACF,EACN;KACH;;;;;;","names":[],"sources":["src/components/alert/alert.css?tag=bcm-alert&encapsulation=shadow","src/components/alert/alert.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n width: 100%;\n --bcm-alert-bg: var(--bcm-ui-color-background-default-default);\n --bcm-alert-text: var(--bcm-ui-color-text-default);\n --bcm-alert-radius: 6px;\n}\n","import { Component, ComponentInterface, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { AlertKind, AlertSize, AlertStatus } from './types';\nimport { tv } from '@utils/tv';\n\n/**\n * Alert component that displays messages with different statuses and styles\n * @class BcmAlert\n */\n@Component({\n tag: 'bcm-alert',\n styleUrl: 'alert.css',\n shadow: true,\n})\nexport class BcmAlert implements ComponentInterface {\n /** Alert status type */\n @Prop()\n status?: AlertStatus = 'default';\n\n /** Alert size variant */\n @Prop()\n size?: AlertSize = 'medium';\n\n /** Alert style variant */\n @Prop()\n kind?: AlertKind = 'filled';\n\n /** Whether alert can be dismissed */\n @Prop()\n dismissible?: boolean = true;\n\n /** Whether to show status icon */\n @Prop()\n showStatusIcon?: boolean = true;\n\n @Event() bcmDismiss: EventEmitter<void>;\n\n /**\n * Handles alert dismissal\n * @private\n */\n private onDismiss() {\n this.bcmDismiss.emit();\n }\n\n private getStatusIcon() {\n const statusIcon = {\n info: 'fa-regular fa-info-circle',\n error: 'fa-regular fa-exclamation-circle',\n warning: 'fa-regular fa-exclamation-triangle',\n success: 'fa-regular fa-check-circle',\n };\n return statusIcon[this.status];\n }\n\n private get alertClass() {\n return tv(\n {\n slots: {\n base: 'alert bcm-ui-element font-medium flex items-center justify-between bg-[--bcm-alert-bg] text-[--bcm-alert-text] rounded-[--bcm-alert-radius] px-3 gap-3 w-full',\n section: 'flex items-center gap-2',\n },\n variants: {\n size: {\n small: {\n base: 'py-1.5 text-size-4',\n },\n medium: {\n base: 'py-2 text-size-5',\n },\n large: {\n base: 'py-2.5 text-size-6',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n }\n\n private get alertStyles() {\n let colorStatus = {\n info: 'var(--bcm-ui-color-background-palette-blue-default)',\n error: 'var(--bcm-ui-color-background-palette-red-default)',\n warning: 'var(--bcm-ui-color-background-palette-yellow-default)',\n success: 'var(--bcm-ui-color-background-palette-green-default)',\n default: 'var(--bcm-ui-color-background-palette-gray-default)',\n };\n\n let textStatusColor = {\n info: 'var(--bcm-ui-color-text-info)',\n error: 'var(--bcm-ui-color-text-error)',\n warning: 'var(--bcm-ui-color-text-warning)',\n success: 'var(--bcm-ui-color-text-success)',\n default: 'var(--bcm-ui-color-text-default)',\n };\n\n let filleStyle = {\n '--bcm-alert-bg': colorStatus[this.status],\n '--bcm-alert-text': textStatusColor[this.status],\n };\n\n let textStyle = {\n '--bcm-alert-bg': 'transparent',\n '--bcm-alert-text': textStatusColor[this.status],\n };\n\n return this.kind === 'filled' ? filleStyle : textStyle;\n }\n\n render() {\n const { base, section } = this.alertClass({ size: this.size });\n return (\n <div role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class={base()} style={this.alertStyles}>\n <div class={section()}>\n {this.showStatusIcon && <bcm-icon icon-name={this.getStatusIcon()}></bcm-icon>}\n <slot></slot>\n </div>\n <div class={section()}>\n <div part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n <span part=\"icon\">{this.dismissible && <bcm-icon onClick={() => this.onDismiss()} class=\"cursor-pointer\" icon-name=\"fa-regular fa-xmark\"></bcm-icon>}</span>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-18b75a47.js';
2
2
  import { c as classNames } from './index-097075ad.js';
3
3
 
4
- const avatarCss = ":host{--bcm-avatar-bg:var(--bcm-ui-color-background-default-default);--bcm-avatar-text:var(--bcm-ui-color-text-default);--bcm-avatar-radius:50%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.inline-flex{display:inline-flex}.h-10{height:2.5rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-\\[--bcm-ui-radius\\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-avatar-bg\\]{background-color:var(--bcm-avatar-bg)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.text-\\[--bcm-avatar-text\\]{color:var(--bcm-avatar-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
4
+ const avatarCss = ":host{--bcm-avatar-bg:var(--bcm-ui-color-background-default-default);--bcm-avatar-text:var(--bcm-ui-color-text-default);--bcm-avatar-radius:50%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.inline-flex{display:inline-flex}.h-10{height:2.5rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-\\[--bcm-ui-radius\\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-avatar-bg\\]{background-color:var(--bcm-avatar-bg)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.text-\\[--bcm-avatar-text\\]{color:var(--bcm-avatar-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
5
5
  const BcmAvatarStyle0 = avatarCss;
6
6
 
7
7
  const BcmAvatar = class {
@@ -1 +1 @@
1
- {"file":"bcm-avatar.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,64CAA64C,CAAC;AACh6C,wBAAe,SAAS;;MCQX,SAAS;IALtB;;;QAgBE,UAAK,GAAgB,SAAS,CAAC;;QAI/B,SAAI,GAAe,QAAQ,CAAC;;QAQ5B,SAAI,GAAW,aAAa,CAAC;;QAQ7B,UAAK,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AM,IAAI,IAAI,CAAC,IAAI,EAAE;gBACpB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACxC;iBAAM;gBACL,OAAO,SAAG,KAAK,EAAE,IAAI,CAAC,IAAI,GAAM,CAAC;aAClC;SACF,CAAC;QAEF,QACE,WAAK,IAAI,EAAC,KAAK,gBAAa,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,kCAAO,KAAK,GAAK,UAAU,KAC/G,EAAC,aAAa,OAAG,EAChB,IAAI,CAAC,MAAM,IAAI,iBAAW,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,iBAAc,MAAM,GAAa,EACrH,eAAa,CACT,EACN;KACH;;;;;;","names":["cs"],"sources":["src/components/avatar/avatar.css?tag=bcm-avatar&encapsulation=shadow","src/components/avatar/avatar.component.tsx"],"sourcesContent":[":host {\n --bcm-avatar-bg: var(--bcm-ui-color-background-default-default);\n --bcm-avatar-text: var(--bcm-ui-color-text-default);\n --bcm-avatar-radius: 50%;\n}\n","import { Component, Prop, State, h } from '@stencil/core';\nimport cs from 'classnames';\nimport { AvatarShape, AvatarSize, AvatarStatus } from './types';\n\n@Component({\n tag: 'bcm-avatar',\n styleUrl: 'avatar.css',\n shadow: true,\n})\nexport class BcmAvatar {\n /** Source URL for avatar image */\n @Prop()\n image: string;\n\n /** Alternative text for image */\n @Prop()\n alt: string;\n\n /** Shape of the avatar (ellipse/square) */\n @Prop()\n shape: AvatarShape = 'ellipse';\n\n /** Size of the avatar */\n @Prop()\n size: AvatarSize = 'medium';\n\n /** Custom background color */\n @Prop()\n color: string;\n\n /** Fallback icon class */\n @Prop()\n icon: string = 'fas fa-user';\n\n /** Status indicator type */\n @Prop()\n status: AvatarStatus;\n\n /** Status indicator animation */\n @Prop()\n blink = false;\n\n /** Display name (used for initials) */\n @Prop()\n name: string;\n\n @State() isFallback: boolean = false;\n\n private getFirstLetters(name: string): string {\n const words = name.split(' ');\n const initials = words.map(word => word.charAt(0).toUpperCase()).join('');\n return initials.substring(0, 2);\n }\n\n render() {\n const baseClass = cs(\n 'bcm-avatar bcm-ui-element bcm-ui-content-display',\n 'uppercase font-medium',\n 'inline-flex items-center justify-center',\n 'bg-[--bcm-avatar-bg] text-[--bcm-avatar-text]',\n {\n 'shape-ellipse rounded-full': this.shape === 'ellipse',\n 'shape-square rounded-[--bcm-ui-radius]': this.shape === 'square',\n 'size-small text-size-4 w-6 h-6': this.size === 'small',\n 'size-medium text-size-5 w-8 h-8': this.size === 'medium',\n 'size-large text-size-6 w-10 h-10': this.size === 'large',\n },\n );\n\n const badgeClass = cs('badge', {\n 'top-0 right-0': this.shape === 'ellipse',\n '-top-0.5 -right-0.5': this.shape === 'square',\n });\n\n const imageClass = cs('image w-full h-full', {\n 'rounded-full': this.shape === 'ellipse',\n 'rounded-[--bcm-ui-radius]': this.shape === 'square',\n });\n\n let style = {};\n\n if (this.color) {\n const isColorTone = this.color.includes('-');\n const _color = isColorTone ? this.color.split('-')[0] : this.color;\n\n const bgColor = `var(--bcm-ui-color-background-palette-${_color}-default)`;\n const textColor = `var(--bcm-ui-color-text-palette-${_color}`;\n style = {\n '--bcm-avatar-bg': bgColor,\n '--bcm-avatar-text': textColor,\n };\n }\n\n const customSize = !Object.keys(['small', 'medium', 'large']).includes(this.size)\n ? {\n width: `${this.size}px`,\n height: `${this.size}px`,\n fontSize: `${+this.size / 2}px`,\n }\n : {};\n\n const RenderContent = () => {\n if (this.isFallback) {\n if (this.name) {\n return this.getFirstLetters(this.name);\n } else {\n return <i class={this.icon}></i>;\n }\n } else if (this.image) {\n return <img class={imageClass} onError={() => (this.isFallback = true)} src={this.image} alt={this.alt} aria-label={this.alt || this.name || 'Avatar'} />;\n } else if (this.name) {\n return this.getFirstLetters(this.name);\n } else {\n return <i class={this.icon}></i>;\n }\n };\n\n return (\n <div role=\"img\" aria-label={this.alt || this.name || 'Avatar'} class={baseClass} style={{ ...style, ...customSize }}>\n <RenderContent />\n {this.status && <bcm-badge class={badgeClass} status={this.status} blink={this.blink} aria-hidden=\"true\"></bcm-badge>}\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-avatar.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,q6CAAq6C,CAAC;AACx7C,wBAAe,SAAS;;MCQX,SAAS;IALtB;;;QAgBE,UAAK,GAAgB,SAAS,CAAC;;QAI/B,SAAI,GAAe,QAAQ,CAAC;;QAQ5B,SAAI,GAAW,aAAa,CAAC;;QAQ7B,UAAK,GAAG,KAAK,CAAC;QAML,eAAU,GAAY,KAAK,CAAC;KA+EtC;IA7ES,eAAe,CAAC,IAAY;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACjC;IAED,MAAM;QACJ,MAAM,SAAS,GAAGA,UAAE,CAClB,kDAAkD,EAClD,uBAAuB,EACvB,yCAAyC,EACzC,+CAA+C,EAC/C;YACE,4BAA4B,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;YACtD,wCAAwC,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;YACjE,gCAAgC,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;YACvD,iCAAiC,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;YACzD,kCAAkC,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;SAC1D,CACF,CAAC;QAEF,MAAM,UAAU,GAAGA,UAAE,CAAC,OAA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AAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACxC;qBAAM;oBACL,OAAO,SAAG,KAAK,EAAE,IAAI,CAAC,IAAI,GAAM,CAAC;iBAClC;aACF;iBAAM,IAAI,IAAI,CAAC,KAAK,EAAE;gBACrB,OAAO,WAAK,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,gBAAc,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,GAAI,CAAC;aAC3J;iBAAM,IAAI,IAAI,CAAC,IAAI,EAAE;gBACpB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACxC;iBAAM;gBACL,OAAO,SAAG,KAAK,EAAE,IAAI,CAAC,IAAI,GAAM,CAAC;aAClC;SACF,CAAC;QAEF,QACE,WAAK,IAAI,EAAC,KAAK,gBAAa,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,kCAAO,KAAK,GAAK,UAAU,KAC/G,EAAC,aAAa,OAAG,EAChB,IAAI,CAAC,MAAM,IAAI,iBAAW,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,iBAAc,MAAM,GAAa,EACrH,eAAa,CACT,EACN;KACH;;;;;;","names":["cs"],"sources":["src/components/avatar/avatar.css?tag=bcm-avatar&encapsulation=shadow","src/components/avatar/avatar.component.tsx"],"sourcesContent":[":host {\n --bcm-avatar-bg: var(--bcm-ui-color-background-default-default);\n --bcm-avatar-text: var(--bcm-ui-color-text-default);\n --bcm-avatar-radius: 50%;\n}\n","import { Component, Prop, State, h } from '@stencil/core';\nimport cs from 'classnames';\nimport { AvatarShape, AvatarSize, AvatarStatus } from './types';\n\n@Component({\n tag: 'bcm-avatar',\n styleUrl: 'avatar.css',\n shadow: true,\n})\nexport class BcmAvatar {\n /** Source URL for avatar image */\n @Prop()\n image: string;\n\n /** Alternative text for image */\n @Prop()\n alt: string;\n\n /** Shape of the avatar (ellipse/square) */\n @Prop()\n shape: AvatarShape = 'ellipse';\n\n /** Size of the avatar */\n @Prop()\n size: AvatarSize = 'medium';\n\n /** Custom background color */\n @Prop()\n color: string;\n\n /** Fallback icon class */\n @Prop()\n icon: string = 'fas fa-user';\n\n /** Status indicator type */\n @Prop()\n status: AvatarStatus;\n\n /** Status indicator animation */\n @Prop()\n blink = false;\n\n /** Display name (used for initials) */\n @Prop()\n name: string;\n\n @State() isFallback: boolean = false;\n\n private getFirstLetters(name: string): string {\n const words = name.split(' ');\n const initials = words.map(word => word.charAt(0).toUpperCase()).join('');\n return initials.substring(0, 2);\n }\n\n render() {\n const baseClass = cs(\n 'bcm-avatar bcm-ui-element bcm-ui-content-display',\n 'uppercase font-medium',\n 'inline-flex items-center justify-center',\n 'bg-[--bcm-avatar-bg] text-[--bcm-avatar-text]',\n {\n 'shape-ellipse rounded-full': this.shape === 'ellipse',\n 'shape-square rounded-[--bcm-ui-radius]': this.shape === 'square',\n 'size-small text-size-4 w-6 h-6': this.size === 'small',\n 'size-medium text-size-5 w-8 h-8': this.size === 'medium',\n 'size-large text-size-6 w-10 h-10': this.size === 'large',\n },\n );\n\n const badgeClass = cs('badge', {\n 'top-0 right-0': this.shape === 'ellipse',\n '-top-0.5 -right-0.5': this.shape === 'square',\n });\n\n const imageClass = cs('image w-full h-full', {\n 'rounded-full': this.shape === 'ellipse',\n 'rounded-[--bcm-ui-radius]': this.shape === 'square',\n });\n\n let style = {};\n\n if (this.color) {\n const isColorTone = this.color.includes('-');\n const _color = isColorTone ? this.color.split('-')[0] : this.color;\n\n const bgColor = `var(--bcm-ui-color-background-palette-${_color}-default)`;\n const textColor = `var(--bcm-ui-color-text-palette-${_color}`;\n style = {\n '--bcm-avatar-bg': bgColor,\n '--bcm-avatar-text': textColor,\n };\n }\n\n const customSize = !Object.keys(['small', 'medium', 'large']).includes(this.size)\n ? {\n width: `${this.size}px`,\n height: `${this.size}px`,\n fontSize: `${+this.size / 2}px`,\n }\n : {};\n\n const RenderContent = () => {\n if (this.isFallback) {\n if (this.name) {\n return this.getFirstLetters(this.name);\n } else {\n return <i class={this.icon}></i>;\n }\n } else if (this.image) {\n return <img class={imageClass} onError={() => (this.isFallback = true)} src={this.image} alt={this.alt} aria-label={this.alt || this.name || 'Avatar'} />;\n } else if (this.name) {\n return this.getFirstLetters(this.name);\n } else {\n return <i class={this.icon}></i>;\n }\n };\n\n return (\n <div role=\"img\" aria-label={this.alt || this.name || 'Avatar'} class={baseClass} style={{ ...style, ...customSize }}>\n <RenderContent />\n {this.status && <bcm-badge class={badgeClass} status={this.status} blink={this.blink} aria-hidden=\"true\"></bcm-badge>}\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-18b75a47.js';
2
- import { c as ce } from './index-f3b17e60.js';
2
+ import { t as tv } from './tv-6dcd2224.js';
3
3
 
4
- const badgeCss = ".relative{position:relative}:host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-block;position:relative}::slotted([slot=badge]){color:var(--bcm-badge-text);font-weight:500}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.z-10{z-index:10}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-medium{font-weight:500}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:h-full:after{content:var(--tw-content);height:100%}.after\\:w-full:after{content:var(--tw-content);width:100%}@keyframes ping{75%,to{content:var(--tw-content);opacity:0;transform:scale(2)}}.after\\:animate-blink:after{animation:ping 2s infinite;content:var(--tw-content)}.after\\:rounded-full:after{border-radius:var(--bcm-ui-border-radius-full,9999px);content:var(--tw-content)}.after\\:bg-\\[--bcm-badge-bg\\]:after{background-color:var(--bcm-badge-bg);content:var(--tw-content)}.after\\:content-\\[\\\"\\\"\\]:after{--tw-content:\"\";content:var(--tw-content)}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.h-10{height:2.5rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.rounded-\\[--bcm-ui-radius\\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-avatar-bg\\]{background-color:var(--bcm-avatar-bg)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.uppercase{text-transform:uppercase}.text-\\[--bcm-avatar-text\\]{color:var(--bcm-avatar-text)}";
4
+ const badgeCss = ".relative{position:relative}:host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-block;position:relative}::slotted([slot=badge]){color:var(--bcm-badge-text);font-weight:500}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.inline-flex{display:inline-flex}.h-10{height:2.5rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-\\[--bcm-ui-radius\\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-avatar-bg\\]{background-color:var(--bcm-avatar-bg)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.text-\\[--bcm-avatar-text\\]{color:var(--bcm-avatar-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.absolute{position:absolute}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.z-10{z-index:10}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.gap-0{gap:0}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:h-full:after{content:var(--tw-content);height:100%}.after\\:w-full:after{content:var(--tw-content);width:100%}@keyframes ping{75%,to{content:var(--tw-content);opacity:0;transform:scale(2)}}.after\\:animate-blink:after{animation:ping 2s infinite;content:var(--tw-content)}.after\\:rounded-full:after{border-radius:var(--bcm-ui-border-radius-full,9999px);content:var(--tw-content)}.after\\:bg-\\[--bcm-badge-bg\\]:after{background-color:var(--bcm-badge-bg);content:var(--tw-content)}.after\\:content-\\[\\\"\\\"\\]:after{--tw-content:\"\";content:var(--tw-content)}";
5
5
  const BcmBadgeStyle0 = badgeCss;
6
6
 
7
7
  const Badge = class {
@@ -41,7 +41,7 @@ const Badge = class {
41
41
  * @default 'top-right'
42
42
  */
43
43
  this.position = 'top-right';
44
- this.classes = ce({
44
+ this.classes = tv({
45
45
  base: 'badge bcm-ui-element absolute font-medium inline-flex items-center justify-center bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius] z-10',
46
46
  variants: {
47
47
  size: {
@@ -104,12 +104,12 @@ const Badge = class {
104
104
  };
105
105
  }
106
106
  render() {
107
- return (h("div", { key: 'da26bf1e14ff4098562a3d594ec9c895694f62fa', class: "relative inline-flex" }, h("slot", { key: 'f92bff170f95619ac79bdd0cfb7970e16e581d26' }), h("div", { key: '4379aac0216eec1de7e0908cfa0531c80e8dab23', role: "status", "aria-live": "polite", "aria-label": this.status ? `Status: ${this.status}` : undefined, class: this.classes({
107
+ return (h("div", { key: 'd76a375708d95b21c9f47830113ad884885e7445', class: "relative inline-flex" }, h("slot", { key: '66daf9949fd00d3df06ee6081e20f572bcaf423f' }), h("div", { key: '2c60d311f6532fdb721126073c4e087596df28e7', role: "status", "aria-live": "polite", "aria-label": this.status ? `Status: ${this.status}` : undefined, class: this.classes({
108
108
  size: this.size,
109
109
  variant: this.variant,
110
110
  position: this.position,
111
111
  blink: this.blink,
112
- }), style: Object.assign(Object.assign({}, this.badgeStyle), this.offsetStyle) }, this.variant == 'text' && h("slot", { key: '63f5bf1a342f9136a012a98844926dfdee7da40d', name: "badge" }, this.text))));
112
+ }), style: Object.assign(Object.assign({}, this.badgeStyle), this.offsetStyle) }, this.variant == 'text' && h("slot", { key: '48328dbe5ed40553dca7d08669a7d95d081ebbf9', name: "badge" }, this.text))));
113
113
  }
114
114
  };
115
115
  Badge.style = BcmBadgeStyle0;
@@ -1 +1 @@
1
- {"file":"bcm-badge.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,sgHAAsgH,CAAC;AACxhH,uBAAe,QAAQ;;MCwBV,KAAK;IALlB;;;;;;;QAYI,SAAI,GAAiC,QAAQ,CAAC;;;;;;;;QAU9C,YAAO,GAAmB,MAAM,CAAC;;;;;;;QAkBjC,SAAI,GAAY,KAAK,CAAC;;;;;;;QAStB,UAAK,GAAY,KAAK,CAAC;;;;;;QAiBvB,aAAQ,GAA8D,WAAW,CAAC;QAqB1E,YAAO,GAAGA,EAAE,CAAC;YACjB,IAAI,EAAE,iKAAiK;YACvK,QAAQ,EAAE;gBACN,IAAI,EAAE;oBACF,KAAK,EAAE,wBAAwB;oBAC/B,MAAM,EAAE,iCAAiC;oBACzC,KAAK,EAAE,6BAA6B;iBACvC;gBACD,OAAO,EAAE;oBACL,GAAG,EAAE,mCAAmC;oBACxC,IAAI,EAAE,EAAE;iBACX;gBACD,QAAQ,EAAE;oBACN,WAAW,EAAE,iBAAiB;oBAC9B,UAAU,EAAE,gBAAgB;oBAC5B,cAAc,EAAE,oBAAoB;oBACpC,aAAa,EAAE,mBAAmB;iBACrC;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,+HAA+H;iBACxI;aACJ;YACD,gBAAgB,EAAE;gBACd;oBACI,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,QAAQ;iBAClB;gBACD;oB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EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;aACpB,CAAC,EACF,KAAK,kCACE,IAAI,CAAC,UAAU,GACf,IAAI,CAAC,WAAW,KAGtB,IAAI,CAAC,OAAO,IAAI,MAAM,IAAI,6DAAM,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,IAAI,CAAQ,CAC9D,CACJ,EACR;KACL;;;;;;","names":["tv"],"sources":["src/components/badge/badge.css?tag=bcm-badge&encapsulation=shadow","src/components/badge/badge.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n --bcm-badge-bg: var(--bcm-ui-color-background-default-default);\n --bcm-badge-text: var(--bcm-ui-color-text-default);\n --bcm-badge-radius: 9999px;\n}\n\n::slotted([slot='badge']) {\n color: var(--bcm-badge-text);\n font-weight: 500;\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @component BcmBadge\n * @description A versatile badge component that can be positioned around its container.\n * Supports different sizes, variants (dot/text), colors, and positioning options.\n * Can display status indicators with optional blinking animation.\n *\n * @example Basic usage\n * <bcm-badge color=\"primary\" position=\"top-right\">\n * <div>Container Content</div>\n * <span slot=\"badge\">New</span>\n * </bcm-badge>\n *\n * @example Status indicator with blink\n * <bcm-badge variant=\"dot\" color=\"success\" blink={true} status=\"Online\">\n * <div>User Profile</div>\n * </bcm-badge>\n */\n@Component({\n tag: 'bcm-badge',\n styleUrl: 'badge.css',\n shadow: true,\n})\nexport class Badge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Enables blinking animation for the badge.\n * Useful for drawing attention or indicating active status.\n * @type {boolean}\n * @default false\n */\n @Prop()\n blink: boolean = false;\n\n /**\n * Status message for accessibility purposes.\n * Will be read by screen readers.\n * @type {string}\n * @optional\n */\n @Prop()\n status?: string;\n\n /**\n * Sets the position of the badge relative to its container.\n * @type {'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'}\n * @default 'top-right'\n */\n @Prop()\n position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' = 'top-right';\n\n /**\n * Fine-tune the badge position with custom offset.\n * Format: \"x,y\" in pixels (e.g., \"10,-5\")\n * @type {string}\n * @optional\n */\n @Prop()\n offset: string;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * Can be overridden using the \"badge\" slot.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element absolute font-medium inline-flex items-center justify-center bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius] z-10',\n variants: {\n size: {\n small: 'gap-1 px-1 text-size-3',\n medium: 'gap-1 py-0.5 px-1.5 text-size-4',\n large: 'gap-2 py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n position: {\n 'top-right': '-top-1 -right-1',\n 'top-left': '-top-1 -left-1',\n 'bottom-right': '-bottom-1 -right-1',\n 'bottom-left': '-bottom-1 -left-1',\n },\n blink: {\n true: 'after:content-[\"\"] after:absolute after:rounded-full after:bg-[--bcm-badge-bg] after:animate-blink after:w-full after:h-full',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n position: 'top-right',\n blink: false,\n },\n });\n\n private get offsetStyle() {\n if (!this.offset) return {};\n const [x = 0, y = 0] = this.offset.split(',').map(val => val.trim());\n return { transform: `translate(${x}px, ${y}px)` };\n }\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'soft' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <div class=\"relative inline-flex\">\n <slot></slot>\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-label={this.status ? `Status: ${this.status}` : undefined}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n position: this.position,\n blink: this.blink,\n })}\n style={{\n ...this.badgeStyle,\n ...this.offsetStyle,\n }}\n >\n {this.variant == 'text' && <slot name=\"badge\">{this.text}</slot>}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-badge.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,8hHAA8hH,CAAC;AAChjH,uBAAe,QAAQ;;MCwBV,KAAK;IALlB;;;;;;;QAYE,SAAI,GAAiC,QAAQ,CAAC;;;;;;;;QAU9C,YAAO,GAAmB,MAAM,CAAC;;;;;;;QAkBjC,SAAI,GAAY,KAAK,CAAC;;;;;;;QAStB,UAAK,GAAY,KAAK,CAAC;;;;;;QAiBvB,aAAQ,GAA8D,WAAW,CAAC;QAqB1E,YAAO,GAAG,EAAE,CAAC;YACnB,IAAI,EAAE,iKAAiK;YACvK,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,KAAK,E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,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;QAEjD,OAAO;YACL,gBAAgB,EAAE,iCAAiC,WAAW,IAAI,IAAI,CAAC,KAAK,WAAW;YACvF,kBAAkB,EAAE,IAAI,CAAC,IAAI,GAAG,mCAAmC,IAAI,CAAC,KAAK,GAAG,GAAG,+BAA+B;SACnH,CAAC;KACH;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,8DAAa,EACb,4DACE,IAAI,EAAC,QAAQ,eACH,QAAQ,gBACN,IAAI,CAAC,MAAM,GAAG,WAAW,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,EAC9D,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,EACF,KAAK,kCACA,IAAI,CAAC,UAAU,GACf,IAAI,CAAC,WAAW,KAGpB,IAAI,CAAC,OAAO,IAAI,MAAM,IAAI,6DAAM,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,IAAI,CAAQ,CAC5D,CACF,EACN;KACH;;;;;;","names":[],"sources":["src/components/badge/badge.css?tag=bcm-badge&encapsulation=shadow","src/components/badge/badge.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n --bcm-badge-bg: var(--bcm-ui-color-background-default-default);\n --bcm-badge-text: var(--bcm-ui-color-text-default);\n --bcm-badge-radius: 9999px;\n}\n\n::slotted([slot='badge']) {\n color: var(--bcm-badge-text);\n font-weight: 500;\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from '@utils/tv';\n\n/**\n * @component BcmBadge\n * @description A versatile badge component that can be positioned around its container.\n * Supports different sizes, variants (dot/text), colors, and positioning options.\n * Can display status indicators with optional blinking animation.\n *\n * @example Basic usage\n * <bcm-badge color=\"primary\" position=\"top-right\">\n * <div>Container Content</div>\n * <span slot=\"badge\">New</span>\n * </bcm-badge>\n *\n * @example Status indicator with blink\n * <bcm-badge variant=\"dot\" color=\"success\" blink={true} status=\"Online\">\n * <div>User Profile</div>\n * </bcm-badge>\n */\n@Component({\n tag: 'bcm-badge',\n styleUrl: 'badge.css',\n shadow: true,\n})\nexport class Badge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Enables blinking animation for the badge.\n * Useful for drawing attention or indicating active status.\n * @type {boolean}\n * @default false\n */\n @Prop()\n blink: boolean = false;\n\n /**\n * Status message for accessibility purposes.\n * Will be read by screen readers.\n * @type {string}\n * @optional\n */\n @Prop()\n status?: string;\n\n /**\n * Sets the position of the badge relative to its container.\n * @type {'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'}\n * @default 'top-right'\n */\n @Prop()\n position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' = 'top-right';\n\n /**\n * Fine-tune the badge position with custom offset.\n * Format: \"x,y\" in pixels (e.g., \"10,-5\")\n * @type {string}\n * @optional\n */\n @Prop()\n offset: string;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * Can be overridden using the \"badge\" slot.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element absolute font-medium inline-flex items-center justify-center bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius] z-10',\n variants: {\n size: {\n small: 'gap-1 px-1 text-size-3',\n medium: 'gap-1 py-0.5 px-1.5 text-size-4',\n large: 'gap-2 py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n position: {\n 'top-right': '-top-1 -right-1',\n 'top-left': '-top-1 -left-1',\n 'bottom-right': '-bottom-1 -right-1',\n 'bottom-left': '-bottom-1 -left-1',\n },\n blink: {\n true: 'after:content-[\"\"] after:absolute after:rounded-full after:bg-[--bcm-badge-bg] after:animate-blink after:w-full after:h-full',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n position: 'top-right',\n blink: false,\n },\n });\n\n private get offsetStyle() {\n if (!this.offset) return {};\n const [x = 0, y = 0] = this.offset.split(',').map(val => val.trim());\n return { transform: `translate(${x}px, ${y}px)` };\n }\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'soft' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <div class=\"relative inline-flex\">\n <slot></slot>\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-label={this.status ? `Status: ${this.status}` : undefined}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n position: this.position,\n blink: this.blink,\n })}\n style={{\n ...this.badgeStyle,\n ...this.offsetStyle,\n }}\n >\n {this.variant == 'text' && <slot name=\"badge\">{this.text}</slot>}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-18b75a47.js';
2
- import { c as ce } from './index-f3b17e60.js';
2
+ import { t as tv } from './tv-6dcd2224.js';
3
3
 
4
- const basicBadgeCss = ":host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-flex;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.badge-content{color:var(--bcm-badge-text);font-weight:500}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.select-none{user-select:none}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.whitespace-nowrap{white-space:nowrap}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-medium{font-weight:500}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
4
+ const basicBadgeCss = ":host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-flex;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.badge-content{color:var(--bcm-badge-text);font-weight:500}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.select-none{user-select:none}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.whitespace-nowrap{white-space:nowrap}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-medium{font-weight:500}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
5
5
  const BcmBasicBadgeStyle0 = basicBadgeCss;
6
6
 
7
7
  const BasicBadge = class {
@@ -28,7 +28,7 @@ const BasicBadge = class {
28
28
  * @default false
29
29
  */
30
30
  this.soft = false;
31
- this.classes = ce({
31
+ this.classes = tv({
32
32
  base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',
33
33
  variants: {
34
34
  size: {
@@ -75,10 +75,10 @@ const BasicBadge = class {
75
75
  };
76
76
  }
77
77
  render() {
78
- return (h("span", { key: '50278a91e220a4557bfebf2e061be0351f3bad51', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
78
+ return (h("span", { key: 'bfbf8ca56ea7e47a7ae8905ba85e851241a847e4', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
79
79
  size: this.size,
80
80
  variant: this.variant,
81
- }) }, this.variant === 'text' && (h("span", { key: 'd0f6c86104dc092a00dd4e8a886431fc5eb1e793', class: "badge-content" }, h("slot", { key: '2133ac8cc0cf07a385544d395a6881942960bd5d' })))));
81
+ }) }, this.variant === 'text' && (h("span", { key: '7f752ae67fe7eff49c9e95fb2fd5043223e1beb8', class: "badge-content" }, h("slot", { key: '25cc949858b1c39614be77f4f06cd98a7ce5a62a' })))));
82
82
  }
83
83
  };
84
84
  BasicBadge.style = BcmBasicBadgeStyle0;
@@ -1 +1 @@
1
- {"file":"bcm-basic-badge.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,ovDAAovD,CAAC;AAC3wD,4BAAe,aAAa;;MCqBf,UAAU;IALvB;;;;;;;QAYE,SAAI,GAAiC,QAAQ,CAAC;;;;;;;;QAU9C,YAAO,GAAmB,MAAM,CAAC;;;;;;;QAkBjC,SAAI,GAAY,KAAK,CAAC;QAWd,YAAO,GAAGA,EAAE,CAAC;YACnB,IAAI,EAAE,iLAAiL;YACvL,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,K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CACR,CACR,CACI,EACP;KACH;;;;;;","names":["tv"],"sources":["src/components/basic-badge/basic-badge.css?tag=bcm-basic-badge&encapsulation=shadow","src/components/basic-badge/basic-badge.component.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n height: fit-content;\n width: fit-content;\n --bcm-badge-bg: var(--bcm-ui-color-background-default-default);\n --bcm-badge-text: var(--bcm-ui-color-text-default);\n --bcm-badge-radius: 9999px;\n}\n\n.badge-content {\n color: var(--bcm-badge-text);\n font-weight: 500;\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n *\n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n *\n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'palette' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-basic-badge.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,4tDAA4tD,CAAC;AACnvD,4BAAe,aAAa;;MCqBf,UAAU;IALvB;;;;;;;QAYE,SAAI,GAAiC,QAAQ,CAAC;;;;;;;;QAU9C,YAAO,GAAmB,MAAM,CAAC;;;;;;;QAkBjC,SAAI,GAAY,KAAK,CAAC;QAWd,YAAO,GAAG,EAAE,CAAC;YACnB,IAAI,EAAE,iLAAiL;YACvL,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,KAAK,EAAE,kBAAkB;oBACzB,MAAM,EAAE,2BAA2B;oBACnC,KAAK,EAAE,uBAAuB;iBAC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encapsulation=shadow","src/components/basic-badge/basic-badge.component.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n height: fit-content;\n width: fit-content;\n --bcm-badge-bg: var(--bcm-ui-color-background-default-default);\n --bcm-badge-text: var(--bcm-ui-color-text-default);\n --bcm-badge-radius: 9999px;\n}\n\n.badge-content {\n color: var(--bcm-badge-text);\n font-weight: 500;\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from '@utils/tv';\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n *\n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n *\n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'palette' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-18b75a47.js';
2
- import { c as ce } from './index-f3b17e60.js';
2
+ import { t as tv } from './tv-6dcd2224.js';
3
3
 
4
4
  const buttonGroupCss = ".block{display:block}.flex{display:flex}:host{display:block}.bcm-button-group{display:flex}.static{position:static}.w-full{width:100%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
5
5
  const BcmButtonGroupStyle0 = buttonGroupCss;
@@ -9,7 +9,7 @@ const BcmButtonGroup = class {
9
9
  registerInstance(this, hostRef);
10
10
  /** Button orientation */
11
11
  this.orientation = 'horizontal';
12
- this.buttonGroupClass = ce({
12
+ this.buttonGroupClass = tv({
13
13
  base: 'bcm-button-group',
14
14
  variants: {
15
15
  orientation: {
@@ -79,10 +79,10 @@ const BcmButtonGroup = class {
79
79
  });
80
80
  }
81
81
  render() {
82
- return (h(Host, { key: '12320236b3364ea1322ce3ccaced89e17f527657' }, h("div", { key: '24e1acb79b8dbae8ce504f7aa2ec91e4cf799788', class: this.buttonGroupClass({
82
+ return (h(Host, { key: 'd42d48fa72f0956f51e627a96fa880960150bb0d' }, h("div", { key: '470a6acf604f16ba3d63f55b5683177e3cf7fabe', class: this.buttonGroupClass({
83
83
  orientation: this.orientation,
84
84
  fullWidth: this.fullWidth,
85
- }) }, h("slot", { key: '18e1e423bd5e2743f83817ef5d3f1e0f3dfa648f' }))));
85
+ }) }, h("slot", { key: 'dc17cdcd5d5c1ce5084f7739dcb954d4e58ee4fb' }))));
86
86
  }
87
87
  get host() { return getElement(this); }
88
88
  };
@@ -1 +1 @@
1
- {"file":"bcm-button-group.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,kZAAkZ,CAAC;AAC1a,6BAAe,cAAc;;MCQhB,cAAc;IAL3B;;;QAkCE,gBAAW,GAA8B,YAAY,CAAC;QAkD9C,qBAAgB,GAAGA,EAAE,CAC3B;YACE,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE;gBACR,WAAW,EAAE;oBACX,UAAU,EAAE,eAAe;oBAC3B,QAAQ,EAAE,eAAe;iBAC1B;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,eAAe,EAAE;gBACf,WAAW,EAAE,YAAY;aAC1B;SACF,EACD;YACE,OAAO,EAAE,KAAK;SACf,CACF,CAAC;KAgBH;IAnFC,gBAAgB;QACd,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAED,kBAAkB;QAChB,IAAI,CAA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AC,MAAM,EAAE,KAAK;YAC5B,IAAI,YAAY,KAAK,CAAC,EAAE;gBACtB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aACxB;iBAAM,IAAI,KAAK,KAAK,CAAC,EAAE;gBACtB,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;aAC3B;iBAAM,IAAI,KAAK,KAAK,YAAY,GAAG,CAAC,EAAE;gBACrC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC;aAC1B;iBAAM;gBACL,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;aAC5B;SACF,CAAC,CAAC;KACJ;IAuBD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DACE,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,IAEF,8DAAa,CACT,CACD,EACP;KACH;;;;;;;","names":["tv"],"sources":["src/components/button-group/button-group.css?tag=bcm-button-group&encapsulation=shadow","src/components/button-group/button-group.component.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.bcm-button-group {\n display: flex;\n}\n","import { Component, Prop, h, Host, Element, ComponentInterface } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonStatus } from '../button/types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button-group',\n styleUrl: 'button-group.css',\n shadow: true,\n})\nexport class BcmButtonGroup implements ComponentInterface {\n @Element() host: HTMLElement;\n\n /** Defines the main visual style of buttons */\n @Prop()\n kind?: ButtonKind;\n\n /** Controls the button size */\n @Prop()\n size?: ButtonSize;\n\n /** Defines the button's status/state color */\n @Prop()\n status?: ButtonStatus;\n\n /** Full width buttons */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth?: boolean;\n\n /** Loading state */\n @Prop()\n loading?: boolean;\n\n /** Disabled state */\n @Prop()\n disabled?: boolean;\n\n /** Button orientation */\n @Prop({ reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n componentDidLoad() {\n this.applyPropertiesToButtons();\n this.setButtonPositions();\n }\n\n componentDidUpdate() {\n this.applyPropertiesToButtons();\n this.setButtonPositions();\n }\n\n private applyPropertiesToButtons() {\n const buttons = this.host.querySelectorAll('bcm-button');\n\n buttons.forEach(button => {\n if (this.kind !== undefined) button.kind = this.kind;\n if (this.size !== undefined) button.size = this.size;\n if (this.status !== undefined) button.status = this.status;\n if (this.fullWidth !== undefined) button.fullWidth = this.fullWidth;\n if (this.loading !== undefined) button.loading = this.loading;\n if (this.disabled !== undefined) button.disabled = this.disabled;\n\n if (this.orientation === 'vertical') {\n button.classList.add('orientation-vertical');\n } else {\n button.classList.remove('orientation-vertical');\n }\n });\n }\n\n private setButtonPositions() {\n const buttons = this.host.querySelectorAll('bcm-button');\n const totalButtons = buttons.length;\n\n if (totalButtons === 0) return;\n\n buttons.forEach((button, index) => {\n if (totalButtons === 1) {\n button.position = null;\n } else if (index === 0) {\n button.position = 'first';\n } else if (index === totalButtons - 1) {\n button.position = 'last';\n } else {\n button.position = 'middle';\n }\n });\n }\n\n private buttonGroupClass = tv(\n {\n base: 'bcm-button-group',\n variants: {\n orientation: {\n horizontal: 'flex flex-row',\n vertical: 'flex flex-col',\n },\n fullWidth: {\n true: 'w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n return (\n <Host>\n <div\n class={this.buttonGroupClass({\n orientation: this.orientation,\n fullWidth: this.fullWidth,\n })}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"bcm-button-group.entry.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,kZAAkZ,CAAC;AAC1a,6BAAe,cAAc;;MCQhB,cAAc;IAL3B;;;QAkCE,gBAAW,GAA8B,YAAY,CAAC;QAkD9C,qBAAgB,GAAG,EAAE,CAC3B;YACE,IAAI,EAAE,kBAAkB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,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;aAC9C;iBAAM;gBACL,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;aACjD;SACF,CAAC,CAAC;KACJ;IAEO,kBAAkB;QACxB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QACzD,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;QAEpC,IAAI,YAAY,KAAK,CAAC;YAAE,OAAO;QAE/B,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK;YAC5B,IAAI,YAAY,KAAK,CAAC,EAAE;gBACtB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aACxB;iBAAM,IAAI,KAAK,KAAK,CAAC,EAAE;gBACtB,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;aAC3B;iBAAM,IAAI,KAAK,KAAK,YAAY,GAAG,CAAC,EAAE;gBACrC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC;aAC1B;iBAAM;gBACL,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;aAC5B;SACF,CAAC,CAAC;KACJ;IAuBD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DACE,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,IAEF,8DAAa,CACT,CACD,EACP;KACH;;;;;;;","names":[],"sources":["src/components/button-group/button-group.css?tag=bcm-button-group&encapsulation=shadow","src/components/button-group/button-group.component.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.bcm-button-group {\n display: flex;\n}\n","import { Component, Prop, h, Host, Element, ComponentInterface } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonStatus } from '../button/types';\nimport { tv } from '@utils/tv';\n\n@Component({\n tag: 'bcm-button-group',\n styleUrl: 'button-group.css',\n shadow: true,\n})\nexport class BcmButtonGroup implements ComponentInterface {\n @Element() host: HTMLElement;\n\n /** Defines the main visual style of buttons */\n @Prop()\n kind?: ButtonKind;\n\n /** Controls the button size */\n @Prop()\n size?: ButtonSize;\n\n /** Defines the button's status/state color */\n @Prop()\n status?: ButtonStatus;\n\n /** Full width buttons */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth?: boolean;\n\n /** Loading state */\n @Prop()\n loading?: boolean;\n\n /** Disabled state */\n @Prop()\n disabled?: boolean;\n\n /** Button orientation */\n @Prop({ reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n componentDidLoad() {\n this.applyPropertiesToButtons();\n this.setButtonPositions();\n }\n\n componentDidUpdate() {\n this.applyPropertiesToButtons();\n this.setButtonPositions();\n }\n\n private applyPropertiesToButtons() {\n const buttons = this.host.querySelectorAll('bcm-button');\n\n buttons.forEach(button => {\n if (this.kind !== undefined) button.kind = this.kind;\n if (this.size !== undefined) button.size = this.size;\n if (this.status !== undefined) button.status = this.status;\n if (this.fullWidth !== undefined) button.fullWidth = this.fullWidth;\n if (this.loading !== undefined) button.loading = this.loading;\n if (this.disabled !== undefined) button.disabled = this.disabled;\n\n if (this.orientation === 'vertical') {\n button.classList.add('orientation-vertical');\n } else {\n button.classList.remove('orientation-vertical');\n }\n });\n }\n\n private setButtonPositions() {\n const buttons = this.host.querySelectorAll('bcm-button');\n const totalButtons = buttons.length;\n\n if (totalButtons === 0) return;\n\n buttons.forEach((button, index) => {\n if (totalButtons === 1) {\n button.position = null;\n } else if (index === 0) {\n button.position = 'first';\n } else if (index === totalButtons - 1) {\n button.position = 'last';\n } else {\n button.position = 'middle';\n }\n });\n }\n\n private buttonGroupClass = tv(\n {\n base: 'bcm-button-group',\n variants: {\n orientation: {\n horizontal: 'flex flex-row',\n vertical: 'flex flex-col',\n },\n fullWidth: {\n true: 'w-full',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n return (\n <Host>\n <div\n class={this.buttonGroupClass({\n orientation: this.orientation,\n fullWidth: this.fullWidth,\n })}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}