bromcom-ui 2.8.1 → 2.9.0-rc.1

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 (240) 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-0d4a552d.entry.js → p-043beeb5.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-80a43b79.js → p-08fb3095.js} +1 -1
  5. package/dist/bromcom-ui/{p-d011a407.entry.js → p-0a28fd61.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-a49ded35.entry.js → p-0c07940d.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-02afc93f.entry.js → p-0d9741fc.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-a8a4460a.entry.js → p-11629904.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-274465b7.entry.js → p-11e7f04b.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-87df3ffb.js → p-12543c4f.js} +1 -1
  11. package/dist/bromcom-ui/{p-90894817.entry.js → p-139b0cfc.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-0d693b8b.entry.js → p-195c4c41.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-9c9babdd.entry.js → p-1b8982a8.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-24aefda6.js +1 -1
  15. package/dist/bromcom-ui/{p-24a733ff.entry.js → p-25cfdc1c.entry.js} +1 -1
  16. package/dist/bromcom-ui/p-27a8f8cc.entry.js +5 -0
  17. package/dist/bromcom-ui/{p-160ef457.entry.js → p-3731f4fb.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-2ea24a6e.js → p-431b023c.js} +1 -1
  19. package/dist/bromcom-ui/{p-236def30.entry.js → p-43bb2a7c.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-440afdfa.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-e7028542.entry.js → p-465c6839.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-56896e3a.entry.js → p-49105365.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-e0618f5d.entry.js → p-4be5dbb6.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-4fcc0d21.entry.js +5 -0
  25. package/dist/bromcom-ui/{p-b94fa326.js → p-54bcf02f.js} +1 -1
  26. package/dist/bromcom-ui/{p-0ee1ff83.entry.js → p-61f2613f.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-8864e6af.entry.js → p-62adb1ff.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-94293d46.entry.js → p-68e2ddc3.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-251bfa4c.entry.js → p-78bfd81b.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-f902b559.js → p-799af572.js} +1 -1
  31. package/dist/bromcom-ui/{p-cf7af1fc.entry.js → p-7b09e9b1.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-d1598dd5.entry.js → p-7ce49866.entry.js} +1 -1
  33. package/dist/bromcom-ui/p-8d0ca8c2.js +1 -1
  34. package/dist/bromcom-ui/{p-89f7a5c7.entry.js → p-908e7c36.entry.js} +1 -1
  35. package/dist/bromcom-ui/p-92bf3f86.js +5 -0
  36. package/dist/bromcom-ui/{p-7658ec26.entry.js → p-9bdcbb1a.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-f4f4e410.entry.js → p-9be7f6be.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-c15e0e77.entry.js → p-a104f436.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-be6d0712.entry.js → p-a1b02a4a.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-a429e85b.js +1 -1
  41. package/dist/bromcom-ui/{p-dcb2ae7f.entry.js → p-abd0ebef.entry.js} +1 -1
  42. package/dist/bromcom-ui/p-b0353da0.entry.js +19 -0
  43. package/dist/bromcom-ui/p-b60bcecf.js +1 -1
  44. package/dist/bromcom-ui/{p-72b7fda0.entry.js → p-b640b81a.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-e6ce5ec8.entry.js → p-b7d6857f.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-e82340a2.entry.js → p-bad06cf8.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-625af6e2.entry.js → p-c41e87a2.entry.js} +1 -1
  48. package/dist/bromcom-ui/p-c6c6529b.entry.js +5 -0
  49. package/dist/bromcom-ui/p-cb0afdd3.entry.js +5 -0
  50. package/dist/bromcom-ui/{p-e0f440b4.js → p-cb6d3c4e.js} +1 -1
  51. package/dist/bromcom-ui/{p-a3aa9b2a.entry.js → p-cc470d2a.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-47b69111.entry.js → p-d0b8b715.entry.js} +1 -1
  53. package/dist/bromcom-ui/p-d18196f9.entry.js +5 -0
  54. package/dist/bromcom-ui/{p-4899fba4.entry.js → p-d5b645ba.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-dce2079e.entry.js → p-d78958e3.entry.js} +1 -1
  56. package/dist/bromcom-ui/p-ded0661d.entry.js +5 -0
  57. package/dist/bromcom-ui/{p-9eb2a75d.entry.js → p-e150d373.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-4dac52f8.entry.js → p-f053aa86.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-140b10d1.entry.js → p-f589ac2d.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-2fc1ab9a.entry.js → p-f606f90c.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-334e3147.entry.js → p-ff488369.entry.js} +1 -1
  62. package/dist/cjs/{bcm-634604e3.js → bcm-ab921827.js} +4 -4
  63. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  64. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  65. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  66. package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-avatar_15.cjs.entry.js} +6180 -76
  67. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  68. package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
  69. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  70. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +416 -0
  71. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
  72. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +193 -0
  73. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  74. package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
  75. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  76. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
  77. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  78. package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
  79. package/dist/cjs/bcm-dropdown.cjs.entry.js +6 -6
  80. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
  81. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  82. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  83. package/dist/cjs/bcm-item.cjs.entry.js +3 -3
  84. package/dist/cjs/bcm-items.cjs.entry.js +3 -3
  85. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  86. package/dist/cjs/bcm-menu.cjs.entry.js +7 -7
  87. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +5 -5
  88. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +5 -5
  89. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  90. package/dist/cjs/bcm-modal.cjs.entry.js +6 -6
  91. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
  92. package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
  93. package/dist/cjs/bcm-popover.cjs.entry.js +8 -8
  94. package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
  95. package/dist/cjs/bcm-radio-group.cjs.entry.js +9 -9
  96. package/dist/cjs/bcm-radio.cjs.entry.js +12 -12
  97. package/dist/cjs/bcm-range.cjs.entry.js +5 -5
  98. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  99. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  100. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  101. package/dist/cjs/bcm-stepper.cjs.entry.js +8 -8
  102. package/dist/cjs/bcm-switch.cjs.entry.js +8 -8
  103. package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
  104. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +9 -9
  105. package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -5
  106. package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
  107. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  108. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
  109. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  110. package/dist/cjs/bcm-toast.cjs.entry.js +10 -10
  111. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  112. package/dist/cjs/{floating-ui-74eb26d6.js → floating-ui-c9fc2202.js} +2 -2
  113. package/dist/cjs/{generate-21143214.js → generate-de243a66.js} +1 -1
  114. package/dist/cjs/{input-template-4617f909.js → input-template-4c532c3a.js} +6 -6
  115. package/dist/cjs/{json-parse-decarator-8dbf0b0e.js → json-parse-decarator-f61061cf.js} +1 -1
  116. package/dist/cjs/{label-template-cc69bc21.js → label-template-4d5f99a5.js} +3 -3
  117. package/dist/cjs/loader.cjs.js +1 -1
  118. package/dist/cjs/{number-helper-08a7ff70.js → number-helper-dedd64eb.js} +1 -1
  119. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
  120. package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
  121. package/dist/cjs/{popover-placement-3c8f3a72.js → popover-placement-ccb40073.js} +1 -1
  122. package/dist/cjs/{slot-template-3e59d7d8.js → slot-template-d70ea082.js} +1 -1
  123. package/dist/cjs/{stepper-states-9b6818aa.js → stepper-states-faff7944.js} +1 -1
  124. package/dist/cjs/{string-helper-45cffee0.js → string-helper-d681e5c7.js} +2 -2
  125. package/dist/cjs/{tooltip-helper-2e8b879b.js → tooltip-helper-edce6fd0.js} +9 -9
  126. package/dist/cjs/{validators-6a0077a8.js → validators-e5a6ef69.js} +1 -1
  127. package/dist/collection/collection-manifest.json +1 -0
  128. package/dist/collection/components/atoms/chip/chip-group.css +127 -0
  129. package/dist/collection/components/atoms/chip/chip-group.js +336 -0
  130. package/dist/collection/components/atoms/chip/chip.css +9 -0
  131. package/dist/collection/components/atoms/chip/chip.js +109 -26
  132. package/dist/collection/components/organism/form/form.js +1 -0
  133. package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
  134. package/dist/collection/components/organism/list/list.css +3 -0
  135. package/dist/components/bcm-chip-group.d.ts +11 -0
  136. package/dist/components/bcm-chip-group.js +194 -0
  137. package/dist/components/bcm-chip.js +1 -100
  138. package/dist/components/bcm-form-2.js +1 -0
  139. package/dist/components/bcm-form.js +1 -0
  140. package/dist/components/bcm-list.js +1 -1702
  141. package/dist/components/chip.js +149 -0
  142. package/dist/components/generate.js +1 -1
  143. package/dist/components/index.d.ts +1 -0
  144. package/dist/components/index.js +1 -0
  145. package/dist/{esm/bcm-list.entry.js → components/list.js} +136 -31
  146. package/dist/esm/bcm-9f50af9c.js +1 -1
  147. package/dist/esm/bcm-accordion.entry.js +1 -1
  148. package/dist/esm/bcm-alert.entry.js +1 -1
  149. package/dist/esm/bcm-attendance.entry.js +1 -1
  150. package/dist/esm/{bcm-colorful_2.entry.js → bcm-avatar_15.entry.js} +6164 -73
  151. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  152. package/dist/esm/bcm-button-group.entry.js +2 -2
  153. package/dist/esm/bcm-card.entry.js +1 -1
  154. package/dist/esm/bcm-checkbox-group.entry.js +412 -0
  155. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  156. package/dist/esm/bcm-checkbox_2.entry.js +188 -0
  157. package/dist/esm/bcm-collapse.entry.js +1 -1
  158. package/dist/esm/bcm-color-input.entry.js +3 -3
  159. package/dist/esm/bcm-date-picker.entry.js +2 -2
  160. package/dist/esm/bcm-datetime-picker.entry.js +2 -2
  161. package/dist/esm/bcm-default.entry.js +1 -1
  162. package/dist/esm/bcm-drawer.entry.js +4 -4
  163. package/dist/esm/bcm-dropdown.entry.js +3 -3
  164. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  165. package/dist/esm/bcm-form-2.entry.js +3 -2
  166. package/dist/esm/bcm-input-custom.entry.js +1 -1
  167. package/dist/esm/bcm-item.entry.js +2 -2
  168. package/dist/esm/bcm-items.entry.js +1 -1
  169. package/dist/esm/bcm-link.entry.js +1 -1
  170. package/dist/esm/bcm-menu.entry.js +4 -4
  171. package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
  172. package/dist/esm/bcm-modal-2-header.entry.js +3 -3
  173. package/dist/esm/bcm-modal-2.entry.js +4 -4
  174. package/dist/esm/bcm-modal.entry.js +2 -2
  175. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  176. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  177. package/dist/esm/bcm-popover.entry.js +4 -4
  178. package/dist/esm/bcm-progress.entry.js +2 -2
  179. package/dist/esm/bcm-radio-group.entry.js +4 -4
  180. package/dist/esm/bcm-radio.entry.js +4 -4
  181. package/dist/esm/bcm-range.entry.js +2 -2
  182. package/dist/esm/bcm-skeleton.entry.js +1 -1
  183. package/dist/esm/bcm-step.entry.js +2 -2
  184. package/dist/esm/bcm-stepper.entry.js +5 -5
  185. package/dist/esm/bcm-switch.entry.js +2 -2
  186. package/dist/esm/bcm-tab-group.entry.js +4 -4
  187. package/dist/esm/bcm-tab-item-header.entry.js +4 -4
  188. package/dist/esm/bcm-tab-item.entry.js +3 -3
  189. package/dist/esm/bcm-tag.entry.js +3 -3
  190. package/dist/esm/bcm-textarea.entry.js +3 -3
  191. package/dist/esm/bcm-time-picker.entry.js +2 -2
  192. package/dist/esm/bcm-toast.entry.js +2 -2
  193. package/dist/esm/bromcom-ui.js +1 -1
  194. package/dist/esm/floating-ui-e7341329.js +1 -1
  195. package/dist/esm/{generate-a39b1045.js → generate-61676bf1.js} +1 -1
  196. package/dist/esm/{input-template-e1df6efd.js → input-template-606f7441.js} +2 -2
  197. package/dist/esm/{json-parse-decarator-b1ceb8c8.js → json-parse-decarator-2303670f.js} +1 -1
  198. package/dist/esm/label-template-d74fe788.js +1 -1
  199. package/dist/esm/loader.js +1 -1
  200. package/dist/esm/{number-helper-fa8e8000.js → number-helper-4ef4df19.js} +1 -1
  201. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  202. package/dist/esm/old-bcm-popover.entry.js +2 -2
  203. package/dist/esm/{stepper-states-44849ee8.js → stepper-states-9bb5528f.js} +1 -1
  204. package/dist/esm/string-helper-6bd24967.js +1 -1
  205. package/dist/esm/{tooltip-helper-10b64c23.js → tooltip-helper-79e225e7.js} +4 -4
  206. package/dist/esm/{validators-dd70be40.js → validators-c4a5912c.js} +1 -1
  207. package/dist/types/components/atoms/chip/chip-group.d.ts +26 -0
  208. package/dist/types/components/atoms/chip/chip.d.ts +18 -13
  209. package/dist/types/components.d.ts +49 -4
  210. package/package.json +1 -1
  211. package/dist/bromcom-ui/p-111c4b6a.entry.js +0 -5
  212. package/dist/bromcom-ui/p-121eca04.entry.js +0 -5
  213. package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
  214. package/dist/bromcom-ui/p-55837df1.entry.js +0 -5
  215. package/dist/bromcom-ui/p-86b8672d.entry.js +0 -5
  216. package/dist/bromcom-ui/p-8c62e1ca.entry.js +0 -5
  217. package/dist/bromcom-ui/p-9d23288e.entry.js +0 -5
  218. package/dist/bromcom-ui/p-b4f40047.entry.js +0 -5
  219. package/dist/bromcom-ui/p-b5ba17a4.entry.js +0 -13
  220. package/dist/bromcom-ui/p-b85bdadc.entry.js +0 -5
  221. package/dist/bromcom-ui/p-cbb3c1f0.entry.js +0 -5
  222. package/dist/bromcom-ui/p-d155cf69.entry.js +0 -5
  223. package/dist/bromcom-ui/p-d3cb8d25.js +0 -5
  224. package/dist/bromcom-ui/p-f3d550ed.entry.js +0 -5
  225. package/dist/bromcom-ui/p-fdc8effc.entry.js +0 -5
  226. package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -139
  227. package/dist/cjs/bcm-button_7.cjs.entry.js +0 -1521
  228. package/dist/cjs/bcm-chip.cjs.entry.js +0 -74
  229. package/dist/cjs/bcm-input.cjs.entry.js +0 -370
  230. package/dist/cjs/bcm-list.cjs.entry.js +0 -1607
  231. package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +0 -2443
  232. package/dist/cjs/bcm-typography.cjs.entry.js +0 -21
  233. package/dist/cjs/index-906fb4e5.js +0 -540
  234. package/dist/esm/bcm-avatar_2.entry.js +0 -134
  235. package/dist/esm/bcm-button_7.entry.js +0 -1511
  236. package/dist/esm/bcm-chip.entry.js +0 -70
  237. package/dist/esm/bcm-input.entry.js +0 -366
  238. package/dist/esm/bcm-rc-overflow_2.entry.js +0 -2438
  239. package/dist/esm/bcm-typography.entry.js +0 -17
  240. package/dist/esm/index-6310a048.js +0 -537
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
- import { G as Generate } from './generate-a39b1045.js';
7
+ import { G as Generate } from './generate-61676bf1.js';
8
8
  import './_commonjsHelpers-3016b722.js';
9
9
  import './colors-44c95e7e.js';
10
10
 
@@ -3,8 +3,8 @@
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
- import { G as Generate, s as snq } from './generate-a39b1045.js';
7
- import { B as Bcm } from './bcm-9f50af9c.js';
6
+ import { G as Generate, s as snq } from './generate-61676bf1.js';
7
+ import { a as Bcm } from './bcm-9f50af9c.js';
8
8
  import { c as classnames } from './index-ed9652af.js';
9
9
  import { S as StringHelper } from './string-helper-6bd24967.js';
10
10
  import './colors-44c95e7e.js';
@@ -5,7 +5,7 @@
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
7
  import { C as ColorHelper } from './color-helper-e8ce23d7.js';
8
- import { G as Generate } from './generate-a39b1045.js';
8
+ import { G as Generate } from './generate-61676bf1.js';
9
9
  import { S as StringHelper } from './string-helper-6bd24967.js';
10
10
  import { S as SlotTemplate } from './slot-template-5b2db362.js';
11
11
  import './_commonjsHelpers-3016b722.js';
@@ -0,0 +1,412 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-39133086.js';
6
+ import { c as classnames } from './index-ed9652af.js';
7
+ import { G as Generate, s as snq } from './generate-61676bf1.js';
8
+ import { a as Bcm } from './bcm-9f50af9c.js';
9
+ import { d as delay, g as getChildElements } from './utils-57652744.js';
10
+ import { c as createStore } from './index-93e36fdb.js';
11
+ import { L as LabelTemplate } from './label-template-d74fe788.js';
12
+ import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
13
+ import './_commonjsHelpers-3016b722.js';
14
+ import './colors-44c95e7e.js';
15
+ import './slot-template-5b2db362.js';
16
+ import './string-helper-6bd24967.js';
17
+
18
+ const CheckboxGroupTemplate = ({ customStyle, groupContainerClasses, onBcmSelect, items }) => {
19
+ return (h("div", { class: groupContainerClasses, style: customStyle }, items.childs && items.childs.map((checkbox) => {
20
+ return (h("bcm-checkbox", { id: checkbox.id, name: checkbox.name, color: checkbox.color, checked: checkbox.checked, disabled: checkbox.disabled, readonly: checkbox.readonly, required: checkbox.required, noCaption: checkbox.noCaption, "no-margin": true, size: checkbox.size, "full-width": checkbox.fullWidth, onClick: (e) => { !checkbox.disabled && !checkbox.readonly && (onBcmSelect(checkbox.id), e.preventDefault()); } }, checkbox.slot || checkbox.label));
21
+ })));
22
+ };
23
+
24
+ const { state } = createStore({
25
+ group: new Map(),
26
+ allChecked: true,
27
+ allUnchecked: true,
28
+ changeInderminate: {},
29
+ });
30
+ const setValue = async ({ fullWidth, optionType, buttonStyle, size, defaultCheckedItems, el, id, label, required, captionType, hidden, direction, childs, indeterminate, gap, noCaption, }) => {
31
+ if (el) {
32
+ state.group.set(id, {
33
+ fullWidth,
34
+ optionType,
35
+ buttonStyle,
36
+ size,
37
+ defaultCheckedItems,
38
+ label,
39
+ required,
40
+ captionType,
41
+ hidden,
42
+ direction,
43
+ indeterminate,
44
+ gap,
45
+ noCaption,
46
+ childs: childs === null || childs === void 0 ? void 0 : childs.map(child => {
47
+ child.checked && (state.allUnchecked = false);
48
+ !child.checked && (state.allChecked = false);
49
+ // fullWidth && (fullWidth == 'flex' ? (child.style.flex = 'auto') : (child.style.width = '100%'));
50
+ optionType && (child.optionType = optionType);
51
+ buttonStyle && (child.buttonStyle = buttonStyle);
52
+ size && (child.size = size);
53
+ defaultCheckedItems && defaultCheckedItems.find(e => e === child.name) && (child.checked = true);
54
+ child.noCaption = noCaption;
55
+ return {
56
+ id: child.id || Generate.UID(),
57
+ checked: child.checked || false,
58
+ name: child.name,
59
+ size: child.size,
60
+ buttonStyle: child.buttonStyle,
61
+ optionType: child.optionType,
62
+ style: child.style,
63
+ noCaption: child.noCaption,
64
+ color: child.color,
65
+ disabled: child.disabled,
66
+ readonly: child.readonly,
67
+ label: child.label || child.name,
68
+ slot: child.slot || snq(() => child.querySelector('.slot').textContent, child.textContent),
69
+ required: child.required || required,
70
+ el: child,
71
+ captionType,
72
+ hidden,
73
+ };
74
+ }),
75
+ indeterminateState: !state.allChecked && !state.allUnchecked ? 'indeterminate' : state.allChecked ? 'determinate' : 'uncheck',
76
+ });
77
+ }
78
+ };
79
+ const getProperty = id => {
80
+ return snq(() => state.group.get(id), {});
81
+ };
82
+ const getValue = (id, name) => {
83
+ var _a;
84
+ const group = getProperty(id);
85
+ let value = {};
86
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
87
+ if (name) {
88
+ if (child.name === name) {
89
+ value[child.name] = {
90
+ value: !!child.checked,
91
+ name: child.name,
92
+ };
93
+ }
94
+ }
95
+ else {
96
+ value[child.name] = {
97
+ value: !!child.checked,
98
+ name: child.name,
99
+ };
100
+ }
101
+ });
102
+ return value;
103
+ };
104
+ const getCheckedList = id => {
105
+ var _a;
106
+ const group = getProperty(id);
107
+ let value = {};
108
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
109
+ if (child.checked === true) {
110
+ value[child.name] = {
111
+ value: !!child.checked,
112
+ name: child.name,
113
+ };
114
+ }
115
+ });
116
+ return value;
117
+ };
118
+ const setClear = id => {
119
+ var _a;
120
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
121
+ child.checked = false;
122
+ });
123
+ checkInderminate(id);
124
+ };
125
+ const setCheckedItems = (id, items, checked, reset) => {
126
+ var _a;
127
+ const checkedItems = items && (typeof items == 'string' ? JSON.parse(items) : items);
128
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
129
+ if (checkedItems) {
130
+ const checkedItem = checkedItems.find(e => e === child.name || e.name === child.name);
131
+ if (checkedItem) {
132
+ if (typeof checkedItem == 'object') {
133
+ Object.keys(checkedItem).map(key => {
134
+ if (key === 'checked') {
135
+ child.checked = checkedItem[key];
136
+ }
137
+ else {
138
+ child.checked = checked;
139
+ }
140
+ });
141
+ }
142
+ else {
143
+ child.checked = checked;
144
+ }
145
+ }
146
+ else {
147
+ reset && (child.checked = false);
148
+ }
149
+ }
150
+ else {
151
+ child.checked = false;
152
+ }
153
+ });
154
+ checkInderminate(id);
155
+ };
156
+ const resetCaption = id => {
157
+ var _a;
158
+ // const noCaption = getProperty(id).noCaption;
159
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
160
+ child.resetCaption();
161
+ // child.noCaption = noCaption;
162
+ });
163
+ };
164
+ const changeIndeterminate = id => {
165
+ var _a;
166
+ const group = getProperty(id);
167
+ if (!group.disabled) {
168
+ let checkAll = true;
169
+ if (group.indeterminateState === 'determinate') {
170
+ checkAll = false;
171
+ }
172
+ (_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
173
+ child.checked = checkAll;
174
+ });
175
+ checkInderminate(id);
176
+ }
177
+ };
178
+ const checkInderminate = id => {
179
+ var _a;
180
+ const group = getProperty(id);
181
+ let allChecked = true;
182
+ let allUnchecked = true;
183
+ (_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
184
+ child.checked && (allUnchecked = false);
185
+ !child.checked && (allChecked = false);
186
+ });
187
+ group.indeterminateState = !allChecked && !allUnchecked ? 'indeterminate' : allChecked ? 'determinate' : 'uncheck';
188
+ };
189
+ const onChange = (obj) => {
190
+ var _a;
191
+ (_a = getProperty(obj.id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
192
+ child.checked = child.id === obj.childId ? !child.checked : child.checked;
193
+ });
194
+ checkInderminate(obj.id);
195
+ };
196
+ const removeState = id => {
197
+ return Promise.resolve(state.group.delete(id));
198
+ };
199
+ const getStatesKeys = id => {
200
+ return Object.keys(state.group.get(id));
201
+ };
202
+ const checkBoxGroupState = {
203
+ setValue,
204
+ getValue,
205
+ setCheckedItems,
206
+ getCheckedList,
207
+ getProperty,
208
+ setClear,
209
+ resetCaption,
210
+ onChange,
211
+ getStatesKeys,
212
+ state,
213
+ removeState,
214
+ changeIndeterminate,
215
+ };
216
+
217
+ const groupCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}";
218
+
219
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
220
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
221
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
222
+ r = Reflect.decorate(decorators, target, key, desc);
223
+ else
224
+ for (var i = decorators.length - 1; i >= 0; i--)
225
+ if (d = decorators[i])
226
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
227
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
228
+ };
229
+ const BcmCheckboxGroup = class {
230
+ constructor(hostRef) {
231
+ registerInstance(this, hostRef);
232
+ this.change = createEvent(this, "bcm-change", 7);
233
+ this.groupCheckedList = createEvent(this, "bcm-group-checked-list", 7);
234
+ this._id = Generate.UID();
235
+ this.direction = Bcm.Direction.horizontal;
236
+ this.items = [];
237
+ this.indeterminate = false;
238
+ this.name = undefined;
239
+ this.value = undefined;
240
+ this.disabled = false;
241
+ this.readonly = false;
242
+ this.hidden = false;
243
+ this.required = false;
244
+ this.label = undefined;
245
+ this.gap = undefined;
246
+ this.defaultValue = undefined;
247
+ this.fullWidth = false;
248
+ this.optionType = 'default';
249
+ this.buttonStyle = 'solid';
250
+ this.size = Bcm.Size.medium;
251
+ this.caption = undefined;
252
+ this.noCaption = false;
253
+ this.captionType = Bcm.Status.default;
254
+ this.tick = {};
255
+ }
256
+ componentDidLoad() {
257
+ this.initState();
258
+ }
259
+ disconnectedCallback() {
260
+ checkBoxGroupState.removeState(this._id);
261
+ }
262
+ componentShouldUpdate(newVal, oldVal, propName) {
263
+ if (propName == 'tick' && newVal !== oldVal) {
264
+ const isHaveChild = snq(() => checkBoxGroupState.getProperty(this._id).childs.length > 0, false);
265
+ if (isHaveChild) {
266
+ this.getValue().then(values => this.value = values);
267
+ }
268
+ }
269
+ if (this.getOptions().indexOf(propName) > -1 && newVal !== oldVal) {
270
+ this.initState();
271
+ }
272
+ }
273
+ getOptions() {
274
+ return snq(() => checkBoxGroupState.getStatesKeys(this._id), []);
275
+ }
276
+ async initState() {
277
+ const { fullWidth, optionType, buttonStyle, size, noCaption, defaultValue, label, required, captionType, hidden, direction, indeterminate, gap, items } = this;
278
+ const defaultCheckedItems = defaultValue && (typeof defaultValue == 'string' ? JSON.parse(defaultValue) : defaultValue);
279
+ const childElements = items.length > 0 ? items : await this.getCheckboxes();
280
+ await checkBoxGroupState.setValue({
281
+ id: this._id,
282
+ el: this.el,
283
+ indeterminate,
284
+ fullWidth,
285
+ optionType,
286
+ buttonStyle,
287
+ size,
288
+ defaultCheckedItems,
289
+ label,
290
+ noCaption,
291
+ required,
292
+ captionType,
293
+ hidden,
294
+ gap,
295
+ direction,
296
+ childs: childElements
297
+ });
298
+ const slotArea = this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);
299
+ if (slotArea) {
300
+ slotArea.innerHTML && (slotArea.innerHTML = '');
301
+ }
302
+ this.value = await this.getValue();
303
+ }
304
+ async markForCheck() {
305
+ await delay(10);
306
+ this.tick = Generate.UID();
307
+ }
308
+ async onBcmFocus() {
309
+ //focus first item
310
+ const childs = this.getCheckboxes();
311
+ if (childs.length > 0) {
312
+ childs[0].onBcmFocus();
313
+ }
314
+ }
315
+ async onBcmBlur() {
316
+ this.el.blur();
317
+ }
318
+ async setClear() {
319
+ checkBoxGroupState.setClear(this._id);
320
+ await delay(10);
321
+ this.getCheckboxes().forEach(item => {
322
+ item.setClear();
323
+ });
324
+ this.markForCheck();
325
+ await delay(10);
326
+ return Promise.resolve();
327
+ }
328
+ async resetCaption() {
329
+ await delay(10);
330
+ this.getCheckboxes().forEach(item => {
331
+ item.resetCaption();
332
+ });
333
+ await delay(10);
334
+ return Promise.resolve();
335
+ }
336
+ async set(data) {
337
+ if (Array.isArray(data)) {
338
+ await this.check(data, true, true);
339
+ }
340
+ }
341
+ async get() {
342
+ const checklist = await this.getCheckedList() && Object.keys(await this.getCheckedList());
343
+ return checklist.length > 0 ? checklist : [];
344
+ }
345
+ async check(items, checked = true, reset = false) {
346
+ checkBoxGroupState.setCheckedItems(this._id, items, checked, reset);
347
+ this.markForCheck();
348
+ }
349
+ async getValue(name) {
350
+ return Promise.resolve(checkBoxGroupState.getValue(this._id, name));
351
+ }
352
+ async getCheckedList() {
353
+ return checkBoxGroupState.getCheckedList(this._id);
354
+ }
355
+ handleItemsChange() {
356
+ this.initState();
357
+ }
358
+ getCheckboxes() {
359
+ return getChildElements(this.el, 'bcm-checkbox:not(#bcm-indeterminate-element)');
360
+ }
361
+ async getCheckbox(id) {
362
+ const element = this.el.querySelector(`bcm-checkbox[id="${id}"]`);
363
+ if (element) {
364
+ const name = element["name"];
365
+ const value = await this.getValue(name);
366
+ return { element, event: snq(() => value[name], null) };
367
+ }
368
+ return {};
369
+ }
370
+ async indeterminateClick() {
371
+ checkBoxGroupState.changeIndeterminate(this._id);
372
+ this.markForCheck();
373
+ }
374
+ async changeCheckBox(id) {
375
+ checkBoxGroupState.onChange({ id: this._id, childId: id });
376
+ this.markForCheck();
377
+ await delay(10);
378
+ this.value = await this.getValue();
379
+ this.change.emit({ value: this.value, changed: Object.assign({}, await this.getCheckbox(id)) });
380
+ this.groupCheckedList.emit(await this.getCheckedList());
381
+ }
382
+ getItems() {
383
+ return checkBoxGroupState.getProperty(this._id);
384
+ }
385
+ render() {
386
+ const items = this.getItems();
387
+ const { disabled, captionType, label, indeterminate, indeterminateState, required, direction, optionType, hidden, fullWidth, gap } = items;
388
+ const bcmChechboxGroup = classnames('bcm-checkbox-group', direction, optionType, {
389
+ hidden,
390
+ 'full-width': fullWidth
391
+ });
392
+ const bcmChechboxGroupContainer = classnames('bcm-checkbox-group__container', optionType, {
393
+ [direction]: optionType === 'default',
394
+ indeterminate,
395
+ hidden,
396
+ 'full-width': fullWidth
397
+ });
398
+ return (h(Host, { class: bcmChechboxGroup }, h("span", { hidden: true, id: `bcm-checkbox-group__items-${this._id}` }, h("slot", null)), h("div", { class: "bcm-checkbox-group__label" }, label &&
399
+ h("div", null, h(LabelTemplate, { size: this.size, type: captionType, value: label, required: required }))), indeterminate &&
400
+ h("bcm-checkbox", { onClick: (e) => { this.indeterminateClick(), e.preventDefault(); }, "no-caption": true, id: "bcm-indeterminate-element", indeterminate: indeterminateState, disabled: disabled }, "Check All"), h(CheckboxGroupTemplate, { items: items, groupContainerClasses: bcmChechboxGroupContainer, customStyle: gap && ({ 'gap': gap }), onBcmSelect: (id) => this.changeCheckBox(id) })));
401
+ }
402
+ get el() { return getElement(this); }
403
+ static get watchers() { return {
404
+ "items": ["handleItemsChange"]
405
+ }; }
406
+ };
407
+ __decorate([
408
+ IsLoad()
409
+ ], BcmCheckboxGroup.prototype, "el", void 0);
410
+ BcmCheckboxGroup.style = groupCss;
411
+
412
+ export { BcmCheckboxGroup as bcm_checkbox_group };
@@ -4,8 +4,8 @@
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
- import { G as Generate } from './generate-a39b1045.js';
8
- import { B as Bcm } from './bcm-9f50af9c.js';
7
+ import { G as Generate } from './generate-61676bf1.js';
8
+ import { a as Bcm } from './bcm-9f50af9c.js';
9
9
  import { c as getChilds, d as delay } from './utils-57652744.js';
10
10
  import './_commonjsHelpers-3016b722.js';
11
11
  import './colors-44c95e7e.js';
@@ -0,0 +1,188 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
+ import { c as classnames } from './index-ed9652af.js';
7
+ import { C as CaptionTemplate } from './caption-template-da16ba7b.js';
8
+ import { G as Generate } from './generate-61676bf1.js';
9
+ import { S as SlotTemplate } from './slot-template-5b2db362.js';
10
+ import { a as Bcm } from './bcm-9f50af9c.js';
11
+ import { d as delay } from './utils-57652744.js';
12
+ import { C as ColorHelper } from './color-helper-e8ce23d7.js';
13
+ import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
14
+ import './_commonjsHelpers-3016b722.js';
15
+ import './colors-44c95e7e.js';
16
+ import './string-helper-6bd24967.js';
17
+ import './colors-1d7854ea.js';
18
+
19
+ const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}";
20
+
21
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
22
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
24
+ r = Reflect.decorate(decorators, target, key, desc);
25
+ else
26
+ for (var i = decorators.length - 1; i >= 0; i--)
27
+ if (d = decorators[i])
28
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30
+ };
31
+ const BcmCheckbox = class {
32
+ constructor(hostRef) {
33
+ registerInstance(this, hostRef);
34
+ this.blur = createEvent(this, "bcm-blur", 7);
35
+ this.focus = createEvent(this, "bcm-focus", 7);
36
+ this.change = createEvent(this, "bcm-change", 7);
37
+ this.changeCheckbox = createEvent(this, "bcm-change-checkbox", 7);
38
+ this._id = Generate.UID();
39
+ this.inGroup = false;
40
+ this.value = false;
41
+ this.checked = false;
42
+ this.name = undefined;
43
+ this.disabled = false;
44
+ this.hidden = false;
45
+ this.required = false;
46
+ this.label = undefined;
47
+ this.readonly = false;
48
+ this.size = Bcm.Size.medium;
49
+ this.indeterminate = null;
50
+ this.color = "blue";
51
+ this.caption = undefined;
52
+ this.noCaption = false;
53
+ this.captionError = undefined;
54
+ this.captionType = Bcm.Status.default;
55
+ this.captionCache = undefined;
56
+ this.captionTypeCache = undefined;
57
+ }
58
+ connectedCallback() {
59
+ this.captionCache = this.caption;
60
+ this.captionTypeCache = this.captionType;
61
+ this.value = this.checked;
62
+ }
63
+ componentDidRender() {
64
+ this.inputElement.checked = this.checked;
65
+ }
66
+ async onBcmFocus() {
67
+ this.el.focus();
68
+ }
69
+ async onBcmBlur() {
70
+ this.el.blur();
71
+ }
72
+ async setClear() {
73
+ this.check(false);
74
+ this.handleChange();
75
+ await delay(10);
76
+ return Promise.resolve();
77
+ }
78
+ async resetCaption() {
79
+ await delay(10);
80
+ this.caption = this.captionCache;
81
+ this.captionType = this.captionTypeCache;
82
+ this.captionError = null;
83
+ await delay(10);
84
+ return Promise.resolve();
85
+ }
86
+ handleChange() {
87
+ this.checked = this.inputElement.checked;
88
+ this.value = this.checked;
89
+ if (!this.indeterminate) {
90
+ this.changeCheckbox.emit();
91
+ this.change.emit({
92
+ name: this.name,
93
+ value: this.checked
94
+ });
95
+ }
96
+ }
97
+ watchIndeterminate(newValue, oldValue) {
98
+ if (newValue != oldValue) {
99
+ this.inputElement.checked = this.indeterminate == Bcm.IndeterminateType.determinate ? true : false;
100
+ this.handleChange();
101
+ }
102
+ }
103
+ async set(data) {
104
+ if (typeof data === 'boolean') {
105
+ await this.check(data);
106
+ }
107
+ }
108
+ async get() {
109
+ return this.checked || false;
110
+ }
111
+ async check(uncheck = true) {
112
+ this.inputElement.checked = uncheck;
113
+ this.handleChange();
114
+ }
115
+ handleKeyUp(ev) {
116
+ if (ev.keyCode == Bcm.KeyCode.space || ev.keyCode == Bcm.KeyCode.enter) {
117
+ if (!this.disabled && !this.readonly) {
118
+ this.inputElement.checked = !this.inputElement.checked;
119
+ this.handleChange();
120
+ }
121
+ ev.stopPropagation();
122
+ ev.preventDefault();
123
+ return false;
124
+ }
125
+ }
126
+ watchChecked() {
127
+ if (this.checked) {
128
+ this.resetCaption();
129
+ }
130
+ this.value = this.checked;
131
+ }
132
+ setColor(color = this.color) {
133
+ if (!color)
134
+ return;
135
+ const prefix = `--bcm-checkbox`;
136
+ return {
137
+ [`${prefix}-primary-color-default`]: ColorHelper.dsColor(color + '-500'),
138
+ [`${prefix}-primary-color-hover`]: ColorHelper.dsColor(color + '-600'),
139
+ [`${prefix}-primary-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
140
+ [`${prefix}-primary-color-active`]: ColorHelper.dsColor(color + '-700'),
141
+ // [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
142
+ [`${prefix}-secondary-color-default`]: ColorHelper.dsColor('white'),
143
+ [`${prefix}-secondary-color-hover`]: ColorHelper.dsColor('slate-50'),
144
+ [`${prefix}-secondary-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
145
+ [`${prefix}-secondary-color-active`]: ColorHelper.dsColor('slate-50'),
146
+ // [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
147
+ };
148
+ }
149
+ render() {
150
+ const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
151
+ //////
152
+ const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
153
+ 'error': captionType == Bcm.Status.error,
154
+ hidden,
155
+ checked,
156
+ disabled,
157
+ required,
158
+ readonly,
159
+ });
160
+ const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
161
+ 'bcm-checkbox__label-icon-checked': checked,
162
+ });
163
+ const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
164
+ const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
165
+ return (h(Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), style: this.setColor(this.color), class: bcmCheckboxClass, disabled: disabled }, h("span", { hidden: true }, h("slot", null)), label && h("bcm-label", { htmlFor: `input-${_id}`, type: captionType, value: label, required: required }), h("div", { class: bcmCheckboxInputClass }, h("input", { id: `input-${_id}`, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly, onChange: () => { !disabled && !readonly && (this.handleChange()); }, ref: el => (this.inputElement = el) }), h("label", { class: bcmCheckboxLabelClass, htmlFor: `input-${_id}` }, h("span", { class: bcmCheckboxIconClass }, h("bcm-icon", { icon: "far fa-check" })), h(SlotTemplate, { className: "slot" }))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
166
+ }
167
+ get el() { return getElement(this); }
168
+ static get watchers() { return {
169
+ "indeterminate": ["watchIndeterminate"],
170
+ "checked": ["watchChecked"]
171
+ }; }
172
+ };
173
+ __decorate([
174
+ IsLoad()
175
+ ], BcmCheckbox.prototype, "el", void 0);
176
+ BcmCheckbox.style = checkboxCss;
177
+
178
+ const BcmTypography = class {
179
+ constructor(hostRef) {
180
+ registerInstance(this, hostRef);
181
+ }
182
+ render() {
183
+ return (h(Host, null, h("slot", null)));
184
+ }
185
+ get el() { return getElement(this); }
186
+ };
187
+
188
+ export { BcmCheckbox as bcm_checkbox, BcmTypography as bcm_typography };
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
6
6
  import { c as classnames } from './index-ed9652af.js';
7
- import { G as Generate } from './generate-a39b1045.js';
7
+ import { G as Generate } from './generate-61676bf1.js';
8
8
  import './_commonjsHelpers-3016b722.js';
9
9
  import './colors-44c95e7e.js';
10
10