bromcom-ui 2.7.38-rc.13 → 2.7.38-rc.14

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 (296) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-14d4b66f.entry.js → p-047c35b1.entry.js} +1 -1
  4. package/dist/bromcom-ui/p-0fb362d7.entry.js +5 -0
  5. package/dist/bromcom-ui/p-16b50160.js +1 -1
  6. package/dist/bromcom-ui/p-1ff8838d.entry.js +5 -0
  7. package/dist/bromcom-ui/p-27429bb5.entry.js +5 -0
  8. package/dist/bromcom-ui/{p-134c6c32.entry.js → p-29866cdb.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-2a1f44d8.entry.js +5 -0
  10. package/dist/bromcom-ui/p-2a5b5ecc.entry.js +5 -0
  11. package/dist/bromcom-ui/p-335dd2b5.entry.js +5 -0
  12. package/dist/bromcom-ui/p-3cbeb4dc.entry.js +5 -0
  13. package/dist/bromcom-ui/{p-a39daf28.entry.js → p-3ed25f2b.entry.js} +2 -2
  14. package/dist/bromcom-ui/p-4487e8c2.js +1 -1
  15. package/dist/bromcom-ui/{p-18b8a460.js → p-44f3ca76.js} +1 -1
  16. package/dist/bromcom-ui/p-468af02f.entry.js +5 -0
  17. package/dist/bromcom-ui/p-480024c3.js +5 -0
  18. package/dist/bromcom-ui/p-4b2852a8.entry.js +5 -0
  19. package/dist/bromcom-ui/p-4c91002a.js +5 -0
  20. package/dist/bromcom-ui/p-4debe197.entry.js +5 -0
  21. package/dist/bromcom-ui/p-4f5acd80.entry.js +5 -0
  22. package/dist/bromcom-ui/p-503a376b.entry.js +5 -0
  23. package/dist/bromcom-ui/p-56898932.js +1 -1
  24. package/dist/bromcom-ui/p-58c108a5.entry.js +5 -0
  25. package/dist/bromcom-ui/p-5b664dec.js +5 -0
  26. package/dist/bromcom-ui/p-5bf68f57.entry.js +5 -0
  27. package/dist/bromcom-ui/p-5d70f446.entry.js +5 -0
  28. package/dist/bromcom-ui/{p-a183a09f.entry.js → p-5de651cc.entry.js} +1 -1
  29. package/dist/bromcom-ui/p-5ebfa466.entry.js +5 -0
  30. package/dist/bromcom-ui/p-60947a22.entry.js +5 -0
  31. package/dist/bromcom-ui/p-67e6f5fe.entry.js +5 -0
  32. package/dist/bromcom-ui/p-687f8d9c.entry.js +5 -0
  33. package/dist/bromcom-ui/p-6d7be2d1.entry.js +5 -0
  34. package/dist/bromcom-ui/p-6e9e2e3b.entry.js +5 -0
  35. package/dist/bromcom-ui/{p-9a9151f4.js → p-74bac994.js} +1 -1
  36. package/dist/bromcom-ui/p-882f8cb1.entry.js +5 -0
  37. package/dist/bromcom-ui/p-8b9d2bb3.entry.js +5 -0
  38. package/dist/bromcom-ui/p-9799c72f.entry.js +5 -0
  39. package/dist/bromcom-ui/p-98af14a9.entry.js +5 -0
  40. package/dist/bromcom-ui/p-a1c843ae.entry.js +5 -0
  41. package/dist/bromcom-ui/p-a373d8b6.entry.js +5 -0
  42. package/dist/bromcom-ui/{p-39175c90.js → p-a3b9fc0c.js} +1 -1
  43. package/dist/bromcom-ui/p-a429e85b.js +1 -1
  44. package/dist/bromcom-ui/p-ab6d3082.entry.js +5 -0
  45. package/dist/bromcom-ui/p-ac1f9851.entry.js +5 -0
  46. package/dist/bromcom-ui/p-aff12492.entry.js +5 -0
  47. package/dist/bromcom-ui/p-b963626d.js +5 -0
  48. package/dist/bromcom-ui/p-ba73ad6b.entry.js +5 -0
  49. package/dist/bromcom-ui/{p-731eb879.js → p-bd031390.js} +1 -1
  50. package/dist/bromcom-ui/p-bdb0dfda.entry.js +5 -0
  51. package/dist/bromcom-ui/p-bef9e2fe.entry.js +5 -0
  52. package/dist/bromcom-ui/p-c0f70afa.entry.js +5 -0
  53. package/dist/bromcom-ui/p-ce1f522e.entry.js +5 -0
  54. package/dist/bromcom-ui/p-cebefc96.entry.js +5 -0
  55. package/dist/bromcom-ui/p-d01e8312.entry.js +5 -0
  56. package/dist/bromcom-ui/{p-9a5e145b.js → p-d651e723.js} +1 -1
  57. package/dist/bromcom-ui/p-d73e3d1d.entry.js +5 -0
  58. package/dist/bromcom-ui/p-d8fd3bbb.entry.js +5 -0
  59. package/dist/bromcom-ui/p-d9baf5e7.entry.js +5 -0
  60. package/dist/bromcom-ui/p-dda54e92.entry.js +5 -0
  61. package/dist/bromcom-ui/p-e34ad7a7.entry.js +5 -0
  62. package/dist/bromcom-ui/p-e38087d9.entry.js +5 -0
  63. package/dist/bromcom-ui/p-e3bfaffd.entry.js +5 -0
  64. package/dist/bromcom-ui/p-e74b4689.entry.js +5 -0
  65. package/dist/bromcom-ui/p-ea21c68d.entry.js +5 -0
  66. package/dist/bromcom-ui/p-ef787294.entry.js +5 -0
  67. package/dist/cjs/{bcm-ab921827.js → bcm-634604e3.js} +4 -4
  68. package/dist/cjs/bcm-accordion.cjs.entry.js +3 -1
  69. package/dist/cjs/bcm-alert.cjs.entry.js +4 -3
  70. package/dist/cjs/bcm-attendance.cjs.entry.js +3 -1
  71. package/dist/cjs/bcm-avatar_2.cjs.entry.js +12 -11
  72. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -1
  73. package/dist/cjs/bcm-button-group.cjs.entry.js +7 -6
  74. package/dist/cjs/bcm-button.cjs.entry.js +13 -12
  75. package/dist/cjs/bcm-card.cjs.entry.js +6 -5
  76. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +25 -24
  77. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -5
  78. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +11 -10
  79. package/dist/cjs/bcm-chip.cjs.entry.js +3 -2
  80. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -1
  81. package/dist/cjs/bcm-color-input.cjs.entry.js +7 -6
  82. package/dist/cjs/bcm-colorful_2.cjs.entry.js +10 -9
  83. package/dist/cjs/bcm-date-picker.cjs.entry.js +4 -3
  84. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +9 -8
  85. package/dist/cjs/bcm-default.cjs.entry.js +3 -1
  86. package/dist/cjs/bcm-drawer.cjs.entry.js +9 -8
  87. package/dist/cjs/bcm-dropdown.cjs.entry.js +7 -6
  88. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +5 -4
  89. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  90. package/dist/cjs/bcm-form.cjs.entry.js +2 -2
  91. package/dist/cjs/{bcm-list.cjs.entry.js → bcm-icon_3.cjs.entry.js} +383 -113
  92. package/dist/cjs/bcm-input-custom.cjs.entry.js +73 -0
  93. package/dist/cjs/bcm-input.cjs.entry.js +12 -11
  94. package/dist/cjs/bcm-item.cjs.entry.js +5 -4
  95. package/dist/cjs/bcm-items.cjs.entry.js +4 -3
  96. package/dist/cjs/bcm-label_2.cjs.entry.js +39 -15
  97. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  98. package/dist/cjs/bcm-menu.cjs.entry.js +9 -8
  99. package/dist/cjs/bcm-modal.cjs.entry.js +7 -6
  100. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +6 -5
  101. package/dist/cjs/bcm-popconfirm.cjs.entry.js +5 -4
  102. package/dist/cjs/bcm-popover.cjs.entry.js +88 -38
  103. package/dist/cjs/bcm-progress.cjs.entry.js +5 -4
  104. package/dist/cjs/bcm-radio-group.cjs.entry.js +77 -211
  105. package/dist/cjs/bcm-radio.cjs.entry.js +35 -76
  106. package/dist/cjs/bcm-range.cjs.entry.js +6 -5
  107. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  108. package/dist/cjs/bcm-skeleton.cjs.entry.js +3 -1
  109. package/dist/cjs/bcm-step.cjs.entry.js +3 -2
  110. package/dist/cjs/bcm-stepper.cjs.entry.js +10 -9
  111. package/dist/cjs/bcm-switch.cjs.entry.js +9 -8
  112. package/dist/cjs/bcm-tab-group.cjs.entry.js +160 -0
  113. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +87 -0
  114. package/dist/cjs/bcm-tab-item.cjs.entry.js +104 -0
  115. package/dist/cjs/bcm-tag.cjs.entry.js +15 -14
  116. package/dist/cjs/bcm-text.cjs.entry.js +63 -0
  117. package/dist/cjs/bcm-textarea.cjs.entry.js +7 -6
  118. package/dist/cjs/bcm-time-picker.cjs.entry.js +4 -3
  119. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  120. package/dist/cjs/color-helper-0e3e8ce5.js +86 -0
  121. package/dist/cjs/{color-helper-c9882bd8.js → colors-25c96ed6.js} +4 -81
  122. package/dist/cjs/{floating-ui-0ca84e74.js → floating-ui-c23acc6c.js} +2 -2
  123. package/dist/cjs/{generate-1c6288f3.js → generate-9739666b.js} +38 -1
  124. package/dist/cjs/{input-template-a6387296.js → input-template-8307182a.js} +6 -6
  125. package/dist/cjs/{json-parse-decarator-fb0443a2.js → json-parse-decarator-7a7415e0.js} +1 -1
  126. package/dist/cjs/{label-template-e83fc65c.js → label-template-098a30a4.js} +3 -3
  127. package/dist/cjs/loader.cjs.js +1 -1
  128. package/dist/cjs/{number-helper-9cb681ed.js → number-helper-063f8c7b.js} +1 -1
  129. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +7 -6
  130. package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -4
  131. package/dist/cjs/{popover-placement-5db8811b.js → popover-placement-69d37a5f.js} +1 -1
  132. package/dist/cjs/{slot-template-175c51fb.js → slot-template-7a07f865.js} +1 -1
  133. package/dist/cjs/{stepper-states-5ba5cabd.js → stepper-states-7dd1eab4.js} +1 -1
  134. package/dist/cjs/{string-helper-087a8134.js → string-helper-71b10c53.js} +2 -2
  135. package/dist/cjs/{tooltip-helper-348e4222.js → tooltip-helper-01c69059.js} +43 -13
  136. package/dist/cjs/{validators-d8faa4be.js → validators-861b4246.js} +1 -1
  137. package/dist/collection/collection-manifest.json +2 -1
  138. package/dist/collection/components/external-source/bcm-toast-helper.js +20 -0
  139. package/dist/collection/components/external-source/test.js/bcm-toast-helper.js +20 -0
  140. package/dist/collection/components/molecules/popover/popover.js +106 -1
  141. package/dist/collection/components/molecules/radio/{group.js → radio-group.js} +163 -246
  142. package/dist/collection/components/molecules/radio/radio.js +42 -132
  143. package/dist/collection/components/molecules/tooltip/tooltip.js +108 -1
  144. package/dist/collection/components/organism/states/bcm-list2.states.js +1 -1
  145. package/dist/collection/components/other/input-custom/input-custom.js +249 -0
  146. package/dist/collection/helper/generate.js +36 -0
  147. package/dist/collection/helper/popover-helper.js +57 -29
  148. package/dist/collection/helper/tooltip-helper.js +33 -4
  149. package/dist/components/bcm-input-custom.d.ts +11 -0
  150. package/dist/components/bcm-input-custom.js +114 -0
  151. package/dist/components/bcm-list.js +1 -1
  152. package/dist/components/bcm-popover.js +82 -29
  153. package/dist/components/bcm-radio-group.js +88 -230
  154. package/dist/components/color-helper.js +1 -405
  155. package/dist/{esm/color-helper-b5e9aa56.js → components/colors2.js} +2 -79
  156. package/dist/components/generate.js +37 -1
  157. package/dist/components/index.d.ts +2 -1
  158. package/dist/components/index.js +1 -0
  159. package/dist/components/radio.js +38 -82
  160. package/dist/components/tooltip-helper.js +33 -3
  161. package/dist/components/tooltip.js +28 -2
  162. package/dist/esm/bcm-9f50af9c.js +1 -1
  163. package/dist/esm/bcm-accordion.entry.js +3 -1
  164. package/dist/esm/bcm-alert.entry.js +2 -1
  165. package/dist/esm/bcm-attendance.entry.js +3 -1
  166. package/dist/esm/bcm-avatar_2.entry.js +6 -5
  167. package/dist/esm/bcm-breadcrumb.entry.js +2 -1
  168. package/dist/esm/bcm-button-group.entry.js +3 -2
  169. package/dist/esm/bcm-button.entry.js +4 -3
  170. package/dist/esm/bcm-card.entry.js +3 -2
  171. package/dist/esm/bcm-checkbox-group.entry.js +9 -8
  172. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -2
  173. package/dist/esm/bcm-checkbox_2.entry.js +4 -3
  174. package/dist/esm/bcm-chip.entry.js +3 -2
  175. package/dist/esm/bcm-collapse.entry.js +2 -1
  176. package/dist/esm/bcm-color-input.entry.js +5 -4
  177. package/dist/esm/bcm-colorful_2.entry.js +6 -5
  178. package/dist/esm/bcm-date-picker.entry.js +3 -2
  179. package/dist/esm/bcm-datetime-picker.entry.js +3 -2
  180. package/dist/esm/bcm-default.entry.js +3 -1
  181. package/dist/esm/bcm-drawer.entry.js +6 -5
  182. package/dist/esm/bcm-dropdown.entry.js +4 -3
  183. package/dist/esm/bcm-expansion-panel.entry.js +3 -2
  184. package/dist/esm/bcm-form-2.entry.js +3 -2
  185. package/dist/esm/{bcm-list.entry.js → bcm-icon_3.entry.js} +314 -46
  186. package/dist/esm/bcm-input-custom.entry.js +69 -0
  187. package/dist/esm/bcm-input.entry.js +6 -5
  188. package/dist/esm/bcm-item.entry.js +4 -3
  189. package/dist/esm/bcm-items.entry.js +3 -2
  190. package/dist/esm/bcm-label_2.entry.js +32 -8
  191. package/dist/esm/bcm-link.entry.js +1 -1
  192. package/dist/esm/bcm-menu.entry.js +6 -5
  193. package/dist/esm/bcm-modal.entry.js +3 -2
  194. package/dist/esm/bcm-popconfirm-box.entry.js +3 -2
  195. package/dist/esm/bcm-popconfirm.entry.js +3 -2
  196. package/dist/esm/bcm-popover.entry.js +85 -35
  197. package/dist/esm/bcm-progress.entry.js +4 -3
  198. package/dist/esm/bcm-radio-group.entry.js +72 -206
  199. package/dist/esm/bcm-radio.entry.js +35 -76
  200. package/dist/esm/bcm-range.entry.js +3 -2
  201. package/dist/esm/bcm-skeleton.entry.js +3 -1
  202. package/dist/esm/bcm-step.entry.js +3 -2
  203. package/dist/esm/bcm-stepper.entry.js +7 -6
  204. package/dist/esm/bcm-switch.entry.js +3 -2
  205. package/dist/esm/bcm-tab-group.entry.js +156 -0
  206. package/dist/esm/bcm-tab-item-header.entry.js +83 -0
  207. package/dist/esm/bcm-tab-item.entry.js +100 -0
  208. package/dist/esm/bcm-tag.entry.js +4 -3
  209. package/dist/esm/bcm-text.entry.js +59 -0
  210. package/dist/esm/bcm-textarea.entry.js +4 -3
  211. package/dist/esm/bcm-time-picker.entry.js +3 -2
  212. package/dist/esm/bromcom-ui.js +1 -1
  213. package/dist/esm/color-helper-0277e11a.js +84 -0
  214. package/dist/esm/colors-fabca483.js +411 -0
  215. package/dist/esm/floating-ui-4a49ea46.js +1 -1
  216. package/dist/esm/{generate-6d61a8d4.js → generate-0dc9b243.js} +38 -1
  217. package/dist/esm/{input-template-5377ad24.js → input-template-de00be57.js} +2 -2
  218. package/dist/esm/{json-parse-decarator-24e9b234.js → json-parse-decarator-5b16dfec.js} +1 -1
  219. package/dist/esm/label-template-eed2dd69.js +1 -1
  220. package/dist/esm/loader.js +1 -1
  221. package/dist/esm/{number-helper-056c158e.js → number-helper-282f0beb.js} +1 -1
  222. package/dist/esm/old-bcm-popover-box.entry.js +3 -2
  223. package/dist/esm/old-bcm-popover.entry.js +3 -2
  224. package/dist/esm/{stepper-states-450629eb.js → stepper-states-fdf47afe.js} +1 -1
  225. package/dist/esm/string-helper-0fb7ff20.js +1 -1
  226. package/dist/esm/{tooltip-helper-05959548.js → tooltip-helper-4e2db0c0.js} +38 -8
  227. package/dist/esm/{validators-649cde78.js → validators-089d15b9.js} +1 -1
  228. package/dist/types/components/external-source/bcm-toast-helper.d.ts +12 -0
  229. package/dist/types/components/external-source/test.js/bcm-toast-helper.d.ts +12 -0
  230. package/dist/types/components/molecules/popover/popover.d.ts +10 -1
  231. package/dist/types/components/molecules/radio/{group.d.ts → radio-group.d.ts} +19 -27
  232. package/dist/types/components/molecules/radio/radio.d.ts +5 -11
  233. package/dist/types/components/molecules/tooltip/tooltip.d.ts +10 -1
  234. package/dist/types/components/other/input-custom/input-custom.d.ts +20 -0
  235. package/dist/types/components.d.ts +76 -33
  236. package/dist/types/helper/generate.d.ts +2 -0
  237. package/dist/types/helper/popover-helper.d.ts +13 -3
  238. package/dist/types/helper/tooltip-helper.d.ts +13 -3
  239. package/package.json +1 -1
  240. package/dist/bromcom-ui/p-0b10d948.entry.js +0 -5
  241. package/dist/bromcom-ui/p-125b65f6.entry.js +0 -5
  242. package/dist/bromcom-ui/p-1945b686.entry.js +0 -5
  243. package/dist/bromcom-ui/p-29dc2191.js +0 -5
  244. package/dist/bromcom-ui/p-2a391ece.entry.js +0 -5
  245. package/dist/bromcom-ui/p-2ec946a1.entry.js +0 -5
  246. package/dist/bromcom-ui/p-33f4e17f.entry.js +0 -5
  247. package/dist/bromcom-ui/p-36224b1d.entry.js +0 -5
  248. package/dist/bromcom-ui/p-366e47ab.entry.js +0 -5
  249. package/dist/bromcom-ui/p-41c296b0.entry.js +0 -5
  250. package/dist/bromcom-ui/p-41dc9559.entry.js +0 -5
  251. package/dist/bromcom-ui/p-45367974.entry.js +0 -5
  252. package/dist/bromcom-ui/p-50db7a26.entry.js +0 -5
  253. package/dist/bromcom-ui/p-579e8412.entry.js +0 -5
  254. package/dist/bromcom-ui/p-5a899703.entry.js +0 -5
  255. package/dist/bromcom-ui/p-5e55f59b.entry.js +0 -5
  256. package/dist/bromcom-ui/p-5efd7090.entry.js +0 -5
  257. package/dist/bromcom-ui/p-688f1e5e.entry.js +0 -5
  258. package/dist/bromcom-ui/p-6a768487.entry.js +0 -5
  259. package/dist/bromcom-ui/p-6b321329.entry.js +0 -5
  260. package/dist/bromcom-ui/p-6c9920df.entry.js +0 -5
  261. package/dist/bromcom-ui/p-73d6483e.entry.js +0 -5
  262. package/dist/bromcom-ui/p-7aad993b.entry.js +0 -5
  263. package/dist/bromcom-ui/p-7e0b3687.entry.js +0 -5
  264. package/dist/bromcom-ui/p-82318c6a.entry.js +0 -5
  265. package/dist/bromcom-ui/p-880b9e3d.entry.js +0 -5
  266. package/dist/bromcom-ui/p-92382af0.entry.js +0 -5
  267. package/dist/bromcom-ui/p-96f555da.entry.js +0 -5
  268. package/dist/bromcom-ui/p-9c910424.entry.js +0 -5
  269. package/dist/bromcom-ui/p-a25d69f2.js +0 -5
  270. package/dist/bromcom-ui/p-a87c6718.entry.js +0 -5
  271. package/dist/bromcom-ui/p-a8d1397d.js +0 -5
  272. package/dist/bromcom-ui/p-a990ad01.entry.js +0 -5
  273. package/dist/bromcom-ui/p-aaac6552.entry.js +0 -5
  274. package/dist/bromcom-ui/p-abff65bf.entry.js +0 -5
  275. package/dist/bromcom-ui/p-bf7d791d.entry.js +0 -5
  276. package/dist/bromcom-ui/p-c2dfd997.entry.js +0 -5
  277. package/dist/bromcom-ui/p-c7d37238.entry.js +0 -5
  278. package/dist/bromcom-ui/p-cbb00d90.entry.js +0 -5
  279. package/dist/bromcom-ui/p-cf82f22a.entry.js +0 -5
  280. package/dist/bromcom-ui/p-d75546da.entry.js +0 -5
  281. package/dist/bromcom-ui/p-d8f62742.entry.js +0 -5
  282. package/dist/bromcom-ui/p-ddc53b28.entry.js +0 -5
  283. package/dist/bromcom-ui/p-e5dc36af.entry.js +0 -5
  284. package/dist/bromcom-ui/p-e85f520f.entry.js +0 -5
  285. package/dist/bromcom-ui/p-e94dcd9a.entry.js +0 -5
  286. package/dist/bromcom-ui/p-ec23e7f7.entry.js +0 -5
  287. package/dist/cjs/bcm-icon_5.cjs.entry.js +0 -378
  288. package/dist/cjs/bcm-search.cjs.entry.js +0 -258
  289. package/dist/collection/components/molecules/radio/group.css +0 -802
  290. package/dist/collection/components/molecules/radio/radio.css +0 -1287
  291. package/dist/collection/components/molecules/radio/types.js +0 -30
  292. package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
  293. package/dist/esm/bcm-icon_5.entry.js +0 -370
  294. package/dist/esm/bcm-search.entry.js +0 -254
  295. package/dist/types/components/molecules/radio/types.d.ts +0 -29
  296. package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
@@ -13,89 +13,77 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
15
  import { h, Host } from "@stencil/core";
16
+ import { Generate } from "@bcm/helpers";
17
+ import { Bcm } from "@bcm/model";
18
+ import { CaptionTemplate } from "@bcm/template";
19
+ import { delay } from "@bcm/utils";
16
20
  import cs from 'classnames';
17
- import snq from "snq";
18
- import { IsLoad } from "../../../decorators/is-load-decorator";
19
- import { Generate } from "../../../helper/generate";
20
- import Bcm from "../../../models/bcm";
21
- import { CaptionTemplate } from "../../../templates/caption-template";
22
- import { delay, getChildElements } from "../../../utils/utils";
23
- import radioGroupState from "../states/radio-group.states";
21
+ import { IsLoad } from "@bcm/decorator";
24
22
  export class BcmRadioGroup {
25
23
  constructor() {
26
24
  this._id = Generate.UID();
27
- this.value = undefined;
28
- this.direction = Bcm.Direction.horizontal;
29
- this.items = [];
30
- this.size = Bcm.Size.medium;
31
- this.name = undefined;
32
25
  this.label = undefined;
26
+ this.name = undefined;
27
+ this.value = null;
28
+ this.defaultValue = undefined;
29
+ this.size = Bcm.Size.medium;
33
30
  this.disabled = false;
34
31
  this.hidden = false;
35
32
  this.required = false;
36
33
  this.gap = undefined;
37
- this.defaultValue = undefined;
38
- this.optionType = 'default';
39
- this.buttonStyle = 'solid';
34
+ this.direction = Bcm.Direction.horizontal;
40
35
  this.fullWidth = false;
36
+ this.items = [];
41
37
  this.caption = undefined;
42
38
  this.noCaption = false;
43
39
  this.captionError = undefined;
44
40
  this.captionType = Bcm.Status.default;
45
41
  this.captionCache = undefined;
46
42
  this.captionTypeCache = undefined;
47
- this.radioOptions = [];
48
- this.usingSlots = true;
49
- this.tick = {};
50
43
  }
51
- disconnectedCallback() {
52
- radioGroupState.removeState(this._id);
44
+ get radios() {
45
+ return Array.from(this.el.querySelectorAll("bcm-radio"));
53
46
  }
54
- componentDidLoad() {
55
- this.initState();
47
+ get Items() {
48
+ return this.items;
56
49
  }
57
- componentShouldUpdate(newVal, oldVal, propName) {
58
- if ((propName == 'defaultValue' || propName == 'tick') && newVal !== oldVal) {
59
- const isHaveChild = snq(() => radioGroupState.getProperty(this._id).childs.length > 0, false);
60
- if (isHaveChild) {
61
- this.getValue().then(values => (this.value = values));
62
- }
63
- }
50
+ connectedCallback() {
51
+ this.captionCache = this.caption;
52
+ this.captionTypeCache = this.captionType;
64
53
  }
65
- async initState() {
66
- const { fullWidth, optionType, buttonStyle, size, disabled, noCaption, defaultValue, label, required, captionType, hidden, direction, gap, items, name } = this;
67
- const defaultCheckedItems = defaultValue && defaultValue;
68
- const childElements = items.length > 0 ? snq(() => (typeof this.items == 'string' ? JSON.parse(this.items) : this.items)) : await this.getRadioItems();
69
- await radioGroupState.setValue({
70
- id: this._id,
71
- el: this.el,
72
- name,
73
- fullWidth,
74
- optionType,
75
- buttonStyle,
76
- size,
77
- disabled,
78
- defaultCheckedItems,
79
- label,
80
- noCaption,
81
- required,
82
- captionType,
83
- hidden,
84
- gap,
85
- direction,
86
- childs: childElements,
54
+ updateValue() {
55
+ var _a, _b, _c;
56
+ this.value = (_c = (_b = (_a = this.radios) === null || _a === void 0 ? void 0 : _a.find(radio => radio.checked)) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;
57
+ }
58
+ componentWillLoad() {
59
+ var _a;
60
+ (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
61
+ radio.disabled = radio.disabled || this.disabled;
62
+ radio.size = this.size;
63
+ if (this.defaultValue) {
64
+ radio.checked = radio.value == this.defaultValue;
65
+ }
87
66
  });
88
- this.getValue().then(values => (this.value = values));
67
+ this.updateValue();
89
68
  }
90
- async markForCheck() {
91
- await delay(10);
92
- this.tick = Generate.UID();
69
+ handleChange(e) {
70
+ var _a, _b;
71
+ e.stopPropagation();
72
+ e.preventDefault();
73
+ const checked = (_a = e.target.checked) !== null && _a !== void 0 ? _a : false;
74
+ (_b = this.radios) === null || _b === void 0 ? void 0 : _b.forEach(radio => {
75
+ radio.checked = radio.id == e.target.id ? !checked : false;
76
+ });
77
+ this.updateValue();
78
+ this.change.emit(this.value);
93
79
  }
80
+ ;
94
81
  async setClear() {
95
- radioGroupState.setClear(this._id);
96
- this.markForCheck();
97
- await delay(10);
98
- return Promise.resolve();
82
+ var _a;
83
+ this.value = null;
84
+ (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
85
+ radio.checked = false;
86
+ });
99
87
  }
100
88
  async resetCaption() {
101
89
  await delay(10);
@@ -105,71 +93,35 @@ export class BcmRadioGroup {
105
93
  await delay(10);
106
94
  return Promise.resolve();
107
95
  }
108
- async set(data) {
109
- await this.check(data);
96
+ async check(itemId, checked = true) {
97
+ var _a;
98
+ (_a = this.radios) === null || _a === void 0 ? void 0 : _a.forEach(radio => {
99
+ radio.checked = radio.id == itemId || radio.value == itemId ? checked : false;
100
+ });
101
+ this.updateValue();
102
+ this.change.emit(this.value);
110
103
  }
111
104
  async get() {
112
- return await this.getValue();
105
+ return this.value;
113
106
  }
114
- async check(item, checked = true) {
115
- radioGroupState.setCheckedItem(this._id, item, checked);
116
- this.defaultValue = item;
117
- await this.markForCheck();
118
- this.change.emit(this.value);
107
+ async set(data) {
108
+ await this.check(data);
119
109
  }
120
110
  async getValue() {
121
- return radioGroupState.getValue(this._id);
122
- }
123
- handleItemsChange() {
124
- this.initState();
125
- }
126
- getRadioItems() {
127
- return getChildElements(this.el, 'bcm-radio');
128
- }
129
- async changeRadio(event) {
130
- radioGroupState.state.onChange = { id: this._id, childId: event };
131
- await this.markForCheck();
132
- this.change.emit(this.value);
133
- }
134
- getItems() {
135
- return radioGroupState.getProperty(this._id);
136
- }
137
- connectedCallback() {
138
- this.captionCache = this.caption;
139
- this.captionTypeCache = this.captionType;
111
+ return this.value;
140
112
  }
141
113
  render() {
142
- const { label, required, hidden, childs, gap, direction, fullWidth, optionType } = this.getItems();
143
- const bcmRadioGroupHostClasses = cs('bcm-radio-group', {
144
- hidden,
145
- 'error': this.captionType == 'error',
146
- 'full-width': fullWidth,
147
- });
148
- const bcmRadioGroupContainerClasses = cs('bcm-radio-group__container', optionType, {
149
- [direction]: optionType === 'default',
150
- 'full-width': fullWidth,
151
- });
152
- return (h(Host, { class: bcmRadioGroupHostClasses }, label && h("bcm-label", { type: this.captionType, value: label, required: required }), h("div", { class: bcmRadioGroupContainerClasses, style: gap && { gap: gap } }, childs &&
153
- childs.map(radio => (h("bcm-radio", { id: radio.id, onClick: e => {
154
- !radio.disabled && this.changeRadio(radio.id), e.preventDefault();
155
- }, value: radio.value, disabled: radio.disabled, checked: radio.checked, size: radio.size, color: radio.color, required: radio.required, hidden: radio.hidden, "no-margin": true }, radio.slot || radio.label)))), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption }), h("span", { hidden: true }, h("slot", null))));
114
+ var _a, _b;
115
+ const { direction, fullWidth, gap, label, size, required, disabled, caption, captionError, captionType, noCaption } = this;
116
+ return (h(Host, { role: "radio-group", class: "tw-mb-2 tw-flex tw-flex-col" }, label && h("bcm-label", { type: captionType, value: label, required: required }), h("div", { class: cs("tw-flex tw-flex-wrap", direction == Bcm.Direction.horizontal ? "tw-flex-row" : "tw-flex-col", fullWidth && "tw-w-full"), style: { "gap": gap } }, h("slot", null), ((_a = this.Items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
117
+ ((_b = this.Items) === null || _b === void 0 ? void 0 : _b.map(item => (h("bcm-radio", { id: item.id, value: item.value, disabled: disabled || item.disabled, checked: item.checked, color: item.color, size: size }, item.label))))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
156
118
  }
157
119
  static get is() { return "bcm-radio-group"; }
158
- static get originalStyleUrls() {
159
- return {
160
- "$": ["group.scss"]
161
- };
162
- }
163
- static get styleUrls() {
164
- return {
165
- "$": ["group.css"]
166
- };
167
- }
168
120
  static get properties() {
169
121
  return {
170
122
  "_id": {
171
123
  "type": "string",
172
- "mutable": true,
124
+ "mutable": false,
173
125
  "complexType": {
174
126
  "original": "string",
175
127
  "resolved": "string",
@@ -185,12 +137,12 @@ export class BcmRadioGroup {
185
137
  "reflect": true,
186
138
  "defaultValue": "Generate.UID()"
187
139
  },
188
- "value": {
189
- "type": "any",
190
- "mutable": true,
140
+ "label": {
141
+ "type": "string",
142
+ "mutable": false,
191
143
  "complexType": {
192
- "original": "string | number",
193
- "resolved": "number | string",
144
+ "original": "string",
145
+ "resolved": "string",
194
146
  "references": {}
195
147
  },
196
148
  "required": false,
@@ -199,46 +151,16 @@ export class BcmRadioGroup {
199
151
  "tags": [],
200
152
  "text": ""
201
153
  },
202
- "attribute": "value",
154
+ "attribute": "label",
203
155
  "reflect": false
204
156
  },
205
- "direction": {
206
- "type": "string",
207
- "mutable": true,
208
- "complexType": {
209
- "original": "DirectionTypes",
210
- "resolved": "\"horizontal\" | \"vertical\"",
211
- "references": {
212
- "DirectionTypes": {
213
- "location": "import",
214
- "path": "../../../models/bcm-types"
215
- }
216
- }
217
- },
218
- "required": false,
219
- "optional": false,
220
- "docs": {
221
- "tags": [],
222
- "text": ""
223
- },
224
- "attribute": "direction",
225
- "reflect": false,
226
- "defaultValue": "Bcm.Direction.horizontal"
227
- },
228
- "items": {
157
+ "name": {
229
158
  "type": "string",
230
- "mutable": true,
159
+ "mutable": false,
231
160
  "complexType": {
232
- "original": "Array<object> | OptionType[] | string",
233
- "resolved": "OptionType[] | object[] | string",
234
- "references": {
235
- "Array": {
236
- "location": "global"
237
- },
238
- "OptionType": {
239
- "location": "local"
240
- }
241
- }
161
+ "original": "string",
162
+ "resolved": "string",
163
+ "references": {}
242
164
  },
243
165
  "required": false,
244
166
  "optional": false,
@@ -246,22 +168,16 @@ export class BcmRadioGroup {
246
168
  "tags": [],
247
169
  "text": ""
248
170
  },
249
- "attribute": "items",
250
- "reflect": false,
251
- "defaultValue": "[]"
171
+ "attribute": "name",
172
+ "reflect": false
252
173
  },
253
- "size": {
254
- "type": "string",
174
+ "value": {
175
+ "type": "any",
255
176
  "mutable": true,
256
177
  "complexType": {
257
- "original": "SizeTypes",
258
- "resolved": "\"large\" | \"medium\" | \"small\"",
259
- "references": {
260
- "SizeTypes": {
261
- "location": "import",
262
- "path": "../../../models/bcm-types"
263
- }
264
- }
178
+ "original": "string | number",
179
+ "resolved": "number | string",
180
+ "references": {}
265
181
  },
266
182
  "required": false,
267
183
  "optional": false,
@@ -269,16 +185,16 @@ export class BcmRadioGroup {
269
185
  "tags": [],
270
186
  "text": ""
271
187
  },
272
- "attribute": "size",
188
+ "attribute": "value",
273
189
  "reflect": false,
274
- "defaultValue": "Bcm.Size.medium"
190
+ "defaultValue": "null"
275
191
  },
276
- "name": {
277
- "type": "string",
278
- "mutable": true,
192
+ "defaultValue": {
193
+ "type": "any",
194
+ "mutable": false,
279
195
  "complexType": {
280
- "original": "string",
281
- "resolved": "string",
196
+ "original": "string | number",
197
+ "resolved": "number | string",
282
198
  "references": {}
283
199
  },
284
200
  "required": false,
@@ -287,16 +203,21 @@ export class BcmRadioGroup {
287
203
  "tags": [],
288
204
  "text": ""
289
205
  },
290
- "attribute": "name",
206
+ "attribute": "default-value",
291
207
  "reflect": false
292
208
  },
293
- "label": {
209
+ "size": {
294
210
  "type": "string",
295
- "mutable": true,
211
+ "mutable": false,
296
212
  "complexType": {
297
- "original": "string",
298
- "resolved": "string",
299
- "references": {}
213
+ "original": "SizeTypes",
214
+ "resolved": "\"large\" | \"medium\" | \"small\"",
215
+ "references": {
216
+ "SizeTypes": {
217
+ "location": "import",
218
+ "path": "@bcm/model"
219
+ }
220
+ }
300
221
  },
301
222
  "required": false,
302
223
  "optional": false,
@@ -304,12 +225,13 @@ export class BcmRadioGroup {
304
225
  "tags": [],
305
226
  "text": ""
306
227
  },
307
- "attribute": "label",
308
- "reflect": false
228
+ "attribute": "size",
229
+ "reflect": false,
230
+ "defaultValue": "Bcm.Size.medium"
309
231
  },
310
232
  "disabled": {
311
233
  "type": "boolean",
312
- "mutable": true,
234
+ "mutable": false,
313
235
  "complexType": {
314
236
  "original": "boolean",
315
237
  "resolved": "boolean",
@@ -327,7 +249,7 @@ export class BcmRadioGroup {
327
249
  },
328
250
  "hidden": {
329
251
  "type": "boolean",
330
- "mutable": true,
252
+ "mutable": false,
331
253
  "complexType": {
332
254
  "original": "boolean",
333
255
  "resolved": "boolean",
@@ -345,7 +267,7 @@ export class BcmRadioGroup {
345
267
  },
346
268
  "required": {
347
269
  "type": "boolean",
348
- "mutable": true,
270
+ "mutable": false,
349
271
  "complexType": {
350
272
  "original": "boolean",
351
273
  "resolved": "boolean",
@@ -363,7 +285,7 @@ export class BcmRadioGroup {
363
285
  },
364
286
  "gap": {
365
287
  "type": "string",
366
- "mutable": true,
288
+ "mutable": false,
367
289
  "complexType": {
368
290
  "original": "string",
369
291
  "resolved": "string",
@@ -378,13 +300,18 @@ export class BcmRadioGroup {
378
300
  "attribute": "gap",
379
301
  "reflect": false
380
302
  },
381
- "defaultValue": {
303
+ "direction": {
382
304
  "type": "string",
383
- "mutable": true,
305
+ "mutable": false,
384
306
  "complexType": {
385
- "original": "string",
386
- "resolved": "string",
387
- "references": {}
307
+ "original": "DirectionTypes",
308
+ "resolved": "\"horizontal\" | \"vertical\"",
309
+ "references": {
310
+ "DirectionTypes": {
311
+ "location": "import",
312
+ "path": "@bcm/model"
313
+ }
314
+ }
388
315
  },
389
316
  "required": false,
390
317
  "optional": false,
@@ -392,15 +319,16 @@ export class BcmRadioGroup {
392
319
  "tags": [],
393
320
  "text": ""
394
321
  },
395
- "attribute": "default-value",
396
- "reflect": false
322
+ "attribute": "direction",
323
+ "reflect": false,
324
+ "defaultValue": "Bcm.Direction.horizontal"
397
325
  },
398
- "optionType": {
399
- "type": "string",
400
- "mutable": true,
326
+ "fullWidth": {
327
+ "type": "boolean",
328
+ "mutable": false,
401
329
  "complexType": {
402
- "original": "'default' | 'button'",
403
- "resolved": "\"button\" | \"default\"",
330
+ "original": "boolean",
331
+ "resolved": "boolean",
404
332
  "references": {}
405
333
  },
406
334
  "required": false,
@@ -409,17 +337,24 @@ export class BcmRadioGroup {
409
337
  "tags": [],
410
338
  "text": ""
411
339
  },
412
- "attribute": "option-type",
340
+ "attribute": "full-width",
413
341
  "reflect": false,
414
- "defaultValue": "'default'"
342
+ "defaultValue": "false"
415
343
  },
416
- "buttonStyle": {
344
+ "items": {
417
345
  "type": "string",
418
- "mutable": true,
346
+ "mutable": false,
419
347
  "complexType": {
420
- "original": "'solid' | 'outline'",
421
- "resolved": "\"outline\" | \"solid\"",
422
- "references": {}
348
+ "original": "Array<object> | OptionType[] | string",
349
+ "resolved": "OptionType[] | object[] | string",
350
+ "references": {
351
+ "Array": {
352
+ "location": "global"
353
+ },
354
+ "OptionType": {
355
+ "location": "local"
356
+ }
357
+ }
423
358
  },
424
359
  "required": false,
425
360
  "optional": false,
@@ -427,31 +362,13 @@ export class BcmRadioGroup {
427
362
  "tags": [],
428
363
  "text": ""
429
364
  },
430
- "attribute": "button-style",
365
+ "attribute": "items",
431
366
  "reflect": false,
432
- "defaultValue": "'solid'"
433
- },
434
- "fullWidth": {
435
- "type": "any",
436
- "mutable": true,
437
- "complexType": {
438
- "original": "boolean | 'flex'",
439
- "resolved": "\"flex\" | boolean",
440
- "references": {}
441
- },
442
- "required": false,
443
- "optional": false,
444
- "docs": {
445
- "tags": [],
446
- "text": ""
447
- },
448
- "attribute": "full-width",
449
- "reflect": true,
450
- "defaultValue": "false"
367
+ "defaultValue": "[]"
451
368
  },
452
369
  "caption": {
453
370
  "type": "string",
454
- "mutable": true,
371
+ "mutable": false,
455
372
  "complexType": {
456
373
  "original": "string",
457
374
  "resolved": "string",
@@ -468,7 +385,7 @@ export class BcmRadioGroup {
468
385
  },
469
386
  "noCaption": {
470
387
  "type": "boolean",
471
- "mutable": true,
388
+ "mutable": false,
472
389
  "complexType": {
473
390
  "original": "boolean",
474
391
  "resolved": "boolean",
@@ -486,7 +403,7 @@ export class BcmRadioGroup {
486
403
  },
487
404
  "captionError": {
488
405
  "type": "string",
489
- "mutable": true,
406
+ "mutable": false,
490
407
  "complexType": {
491
408
  "original": "string",
492
409
  "resolved": "string",
@@ -503,14 +420,14 @@ export class BcmRadioGroup {
503
420
  },
504
421
  "captionType": {
505
422
  "type": "string",
506
- "mutable": true,
423
+ "mutable": false,
507
424
  "complexType": {
508
425
  "original": "StatusTypes",
509
426
  "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
510
427
  "references": {
511
428
  "StatusTypes": {
512
429
  "location": "import",
513
- "path": "../../../models/bcm-types"
430
+ "path": "@bcm/model"
514
431
  }
515
432
  }
516
433
  },
@@ -529,10 +446,7 @@ export class BcmRadioGroup {
529
446
  static get states() {
530
447
  return {
531
448
  "captionCache": {},
532
- "captionTypeCache": {},
533
- "radioOptions": {},
534
- "usingSlots": {},
535
- "tick": {}
449
+ "captionTypeCache": {}
536
450
  };
537
451
  }
538
452
  static get events() {
@@ -587,12 +501,15 @@ export class BcmRadioGroup {
587
501
  "tags": []
588
502
  }
589
503
  },
590
- "set": {
504
+ "check": {
591
505
  "complexType": {
592
- "signature": "(data: any) => Promise<void>",
506
+ "signature": "(itemId: any, checked?: boolean) => Promise<void>",
593
507
  "parameters": [{
594
508
  "tags": [],
595
509
  "text": ""
510
+ }, {
511
+ "tags": [],
512
+ "text": ""
596
513
  }],
597
514
  "references": {
598
515
  "Promise": {
@@ -608,29 +525,26 @@ export class BcmRadioGroup {
608
525
  },
609
526
  "get": {
610
527
  "complexType": {
611
- "signature": "() => Promise<string>",
528
+ "signature": "() => Promise<string | number>",
612
529
  "parameters": [],
613
530
  "references": {
614
531
  "Promise": {
615
532
  "location": "global"
616
533
  }
617
534
  },
618
- "return": "Promise<string>"
535
+ "return": "Promise<string | number>"
619
536
  },
620
537
  "docs": {
621
538
  "text": "",
622
539
  "tags": []
623
540
  }
624
541
  },
625
- "check": {
542
+ "set": {
626
543
  "complexType": {
627
- "signature": "(item: any, checked?: boolean) => Promise<void>",
544
+ "signature": "(data: any) => Promise<void>",
628
545
  "parameters": [{
629
546
  "tags": [],
630
547
  "text": ""
631
- }, {
632
- "tags": [],
633
- "text": ""
634
548
  }],
635
549
  "references": {
636
550
  "Promise": {
@@ -646,14 +560,14 @@ export class BcmRadioGroup {
646
560
  },
647
561
  "getValue": {
648
562
  "complexType": {
649
- "signature": "() => Promise<string>",
563
+ "signature": "() => Promise<string | number>",
650
564
  "parameters": [],
651
565
  "references": {
652
566
  "Promise": {
653
567
  "location": "global"
654
568
  }
655
569
  },
656
- "return": "Promise<string>"
570
+ "return": "Promise<string | number>"
657
571
  },
658
572
  "docs": {
659
573
  "text": "",
@@ -663,10 +577,13 @@ export class BcmRadioGroup {
663
577
  };
664
578
  }
665
579
  static get elementRef() { return "el"; }
666
- static get watchers() {
580
+ static get listeners() {
667
581
  return [{
668
- "propName": "items",
669
- "methodName": "handleItemsChange"
582
+ "name": "bcm-radio-change",
583
+ "method": "handleChange",
584
+ "target": undefined,
585
+ "capture": false,
586
+ "passive": false
670
587
  }];
671
588
  }
672
589
  }