bromcom-ui 2.8.1-rc.9 → 2.9.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-016a9d78.entry.js → p-02afc93f.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-d657a132.entry.js → p-0906c9b4.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-ab51aa2b.entry.js → p-0d4a552d.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-3c15cdb7.entry.js → p-0ee4e283.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-494df97b.entry.js → p-0fdbbbe8.entry.js} +1 -1
  7. package/dist/bromcom-ui/p-14378828.entry.js +5 -0
  8. package/dist/bromcom-ui/{p-92924b7e.entry.js → p-15fa3329.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-5de5cb0d.entry.js → p-1c5a2111.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-2053339a.entry.js → p-20ac20d4.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-daf2ed63.entry.js → p-236def30.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-9b0855f6.entry.js → p-24a733ff.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-24aefda6.js +1 -1
  14. package/dist/bromcom-ui/p-2cb4a196.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-b3584d64.js → p-2ea24a6e.js} +1 -1
  16. package/dist/bromcom-ui/{p-6af5bc87.entry.js → p-334e3147.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-125d13c0.entry.js → p-344a4674.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-3ad545f0.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-7b5ddef4.entry.js → p-40a5e4fc.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-440afdfa.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-6cf8afd4.entry.js → p-4b34b3f9.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-6b692c54.entry.js → p-55001c80.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-73f70b2f.entry.js → p-56896e3a.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-f8b03d4d.entry.js → p-5f288af5.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-284542a6.entry.js → p-70b428e8.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-40d258ce.entry.js → p-72b7fda0.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-a6f5fe0b.entry.js → p-7658ec26.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-80a43b79.js +5 -0
  29. package/dist/bromcom-ui/p-87df3ffb.js +5 -0
  30. package/dist/bromcom-ui/{p-bc7ccd4e.entry.js → p-8864e6af.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-89b21290.entry.js +5 -0
  32. package/dist/bromcom-ui/{p-90981da9.entry.js → p-89f7a5c7.entry.js} +1 -1
  33. package/dist/bromcom-ui/p-8d0ca8c2.js +1 -1
  34. package/dist/bromcom-ui/{p-34efb8eb.entry.js → p-9b10d955.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-585fbc98.entry.js → p-9c7e9b5d.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-9eb2a75d.entry.js +5 -0
  37. package/dist/bromcom-ui/p-a0a3fd94.entry.js +5 -0
  38. package/dist/bromcom-ui/{p-b94bdddf.entry.js → p-a2046742.entry.js} +1 -1
  39. package/dist/bromcom-ui/p-a429e85b.js +1 -1
  40. package/dist/bromcom-ui/{p-997c4fbd.entry.js → p-a49ded35.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-a97ee69d.entry.js +19 -0
  42. package/dist/bromcom-ui/{p-8114163e.entry.js → p-ab55def1.entry.js} +1 -1
  43. package/dist/bromcom-ui/p-b60bcecf.js +1 -1
  44. package/dist/bromcom-ui/{p-a3453263.js → p-b94fa326.js} +1 -1
  45. package/dist/bromcom-ui/{p-e28100e6.entry.js → p-be6d0712.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-e60380c6.entry.js → p-c9b10de5.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-0a404cf9.entry.js → p-cad8f786.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-3642f316.entry.js → p-cf7af1fc.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-e17e1e3e.entry.js → p-d011a407.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-8c2bf4ad.entry.js → p-d1598dd5.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-d3cb8d25.js +5 -0
  52. package/dist/bromcom-ui/{p-ee75e899.entry.js → p-dcb2ae7f.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-09d1d69d.entry.js → p-dce2079e.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-83bae50b.entry.js → p-e008411a.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-fe1532b5.js → p-e0f440b4.js} +1 -1
  56. package/dist/bromcom-ui/{p-bfb70c75.entry.js → p-e3cafc0d.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-0372f13a.entry.js → p-e606c42b.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-e66821e5.entry.js +5 -0
  59. package/dist/bromcom-ui/{p-10d55ac5.entry.js → p-e6ce5ec8.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-508580f7.js → p-f902b559.js} +1 -1
  61. package/dist/cjs/{bcm-634604e3.js → bcm-ab921827.js} +4 -4
  62. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  63. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  64. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  65. package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-avatar_15.cjs.entry.js} +6164 -92
  66. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
  68. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  69. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +416 -0
  70. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
  71. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +193 -0
  72. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  73. package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
  74. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
  76. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  77. package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
  78. package/dist/cjs/bcm-dropdown.cjs.entry.js +6 -6
  79. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
  80. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  81. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  82. package/dist/cjs/bcm-item.cjs.entry.js +3 -3
  83. package/dist/cjs/bcm-items.cjs.entry.js +3 -3
  84. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  85. package/dist/cjs/bcm-menu.cjs.entry.js +7 -7
  86. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +5 -5
  87. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +5 -5
  88. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  89. package/dist/cjs/bcm-modal.cjs.entry.js +6 -6
  90. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
  91. package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
  92. package/dist/cjs/bcm-popover.cjs.entry.js +8 -8
  93. package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
  94. package/dist/cjs/bcm-radio-group.cjs.entry.js +9 -9
  95. package/dist/cjs/bcm-radio.cjs.entry.js +12 -12
  96. package/dist/cjs/bcm-range.cjs.entry.js +5 -5
  97. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-stepper.cjs.entry.js +8 -8
  101. package/dist/cjs/bcm-switch.cjs.entry.js +8 -8
  102. package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
  103. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +9 -9
  104. package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -5
  105. package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
  106. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  107. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
  108. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  109. package/dist/cjs/bcm-toast.cjs.entry.js +10 -10
  110. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  111. package/dist/cjs/{floating-ui-74eb26d6.js → floating-ui-c9fc2202.js} +2 -2
  112. package/dist/cjs/{generate-cf48ed2d.js → generate-21143214.js} +1 -1
  113. package/dist/cjs/{input-template-129e6e5b.js → input-template-1441e468.js} +6 -6
  114. package/dist/cjs/{json-parse-decarator-f0554ad2.js → json-parse-decarator-8dbf0b0e.js} +1 -1
  115. package/dist/cjs/{label-template-cc69bc21.js → label-template-4d5f99a5.js} +3 -3
  116. package/dist/cjs/loader.cjs.js +1 -1
  117. package/dist/cjs/{number-helper-453e02ee.js → number-helper-08a7ff70.js} +1 -1
  118. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
  119. package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
  120. package/dist/cjs/{popover-placement-3c8f3a72.js → popover-placement-ccb40073.js} +1 -1
  121. package/dist/cjs/{slot-template-3e59d7d8.js → slot-template-d70ea082.js} +1 -1
  122. package/dist/cjs/{stepper-states-3082dce8.js → stepper-states-9b6818aa.js} +1 -1
  123. package/dist/cjs/{string-helper-45cffee0.js → string-helper-d681e5c7.js} +2 -2
  124. package/dist/cjs/{tooltip-helper-748b4ab6.js → tooltip-helper-235b26ea.js} +9 -9
  125. package/dist/cjs/{validators-2fcf98d3.js → validators-6a0077a8.js} +1 -1
  126. package/dist/collection/collection-manifest.json +1 -0
  127. package/dist/collection/components/atoms/chip/chip-group.js +292 -0
  128. package/dist/collection/components/atoms/chip/chip.js +107 -26
  129. package/dist/collection/components/molecules/linked/linked.js +6 -17
  130. package/dist/collection/components/organism/form/form.js +1 -0
  131. package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
  132. package/dist/collection/components/organism/list/list.css +3 -0
  133. package/dist/components/bcm-chip-group.d.ts +11 -0
  134. package/dist/components/bcm-chip-group.js +174 -0
  135. package/dist/components/bcm-chip.js +1 -100
  136. package/dist/components/bcm-form-2.js +1 -0
  137. package/dist/components/bcm-form.js +1 -0
  138. package/dist/components/bcm-list.js +1 -1702
  139. package/dist/{esm/bcm-chip.entry.js → components/chip.js} +110 -33
  140. package/dist/components/generate.js +1 -1
  141. package/dist/components/index.d.ts +1 -0
  142. package/dist/components/index.js +1 -0
  143. package/dist/components/linked.js +6 -17
  144. package/dist/{esm/bcm-list.entry.js → components/list.js} +136 -31
  145. package/dist/esm/bcm-9f50af9c.js +1 -1
  146. package/dist/esm/bcm-accordion.entry.js +1 -1
  147. package/dist/esm/bcm-alert.entry.js +1 -1
  148. package/dist/esm/bcm-attendance.entry.js +1 -1
  149. package/dist/esm/{bcm-colorful_2.entry.js → bcm-avatar_15.entry.js} +6148 -89
  150. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  151. package/dist/esm/bcm-button-group.entry.js +2 -2
  152. package/dist/esm/bcm-card.entry.js +1 -1
  153. package/dist/esm/bcm-checkbox-group.entry.js +412 -0
  154. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  155. package/dist/esm/bcm-checkbox_2.entry.js +188 -0
  156. package/dist/esm/bcm-collapse.entry.js +1 -1
  157. package/dist/esm/bcm-color-input.entry.js +3 -3
  158. package/dist/esm/bcm-date-picker.entry.js +2 -2
  159. package/dist/esm/bcm-datetime-picker.entry.js +2 -2
  160. package/dist/esm/bcm-default.entry.js +1 -1
  161. package/dist/esm/bcm-drawer.entry.js +4 -4
  162. package/dist/esm/bcm-dropdown.entry.js +3 -3
  163. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  164. package/dist/esm/bcm-form-2.entry.js +3 -2
  165. package/dist/esm/bcm-input-custom.entry.js +1 -1
  166. package/dist/esm/bcm-item.entry.js +2 -2
  167. package/dist/esm/bcm-items.entry.js +1 -1
  168. package/dist/esm/bcm-link.entry.js +1 -1
  169. package/dist/esm/bcm-menu.entry.js +4 -4
  170. package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
  171. package/dist/esm/bcm-modal-2-header.entry.js +3 -3
  172. package/dist/esm/bcm-modal-2.entry.js +4 -4
  173. package/dist/esm/bcm-modal.entry.js +2 -2
  174. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  175. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  176. package/dist/esm/bcm-popover.entry.js +4 -4
  177. package/dist/esm/bcm-progress.entry.js +2 -2
  178. package/dist/esm/bcm-radio-group.entry.js +4 -4
  179. package/dist/esm/bcm-radio.entry.js +4 -4
  180. package/dist/esm/bcm-range.entry.js +2 -2
  181. package/dist/esm/bcm-skeleton.entry.js +1 -1
  182. package/dist/esm/bcm-step.entry.js +2 -2
  183. package/dist/esm/bcm-stepper.entry.js +5 -5
  184. package/dist/esm/bcm-switch.entry.js +2 -2
  185. package/dist/esm/bcm-tab-group.entry.js +4 -4
  186. package/dist/esm/bcm-tab-item-header.entry.js +4 -4
  187. package/dist/esm/bcm-tab-item.entry.js +3 -3
  188. package/dist/esm/bcm-tag.entry.js +3 -3
  189. package/dist/esm/bcm-textarea.entry.js +3 -3
  190. package/dist/esm/bcm-time-picker.entry.js +2 -2
  191. package/dist/esm/bcm-toast.entry.js +2 -2
  192. package/dist/esm/bromcom-ui.js +1 -1
  193. package/dist/esm/floating-ui-e7341329.js +1 -1
  194. package/dist/esm/{generate-03cf1f82.js → generate-a39b1045.js} +1 -1
  195. package/dist/esm/{input-template-6137ed1b.js → input-template-e1df6efd.js} +2 -2
  196. package/dist/esm/{json-parse-decarator-699aaeeb.js → json-parse-decarator-b1ceb8c8.js} +1 -1
  197. package/dist/esm/label-template-d74fe788.js +1 -1
  198. package/dist/esm/loader.js +1 -1
  199. package/dist/esm/{number-helper-61c91978.js → number-helper-fa8e8000.js} +1 -1
  200. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  201. package/dist/esm/old-bcm-popover.entry.js +2 -2
  202. package/dist/esm/{stepper-states-0fc18a9f.js → stepper-states-44849ee8.js} +1 -1
  203. package/dist/esm/string-helper-6bd24967.js +1 -1
  204. package/dist/esm/{tooltip-helper-a06cb0a2.js → tooltip-helper-10b64c23.js} +4 -4
  205. package/dist/esm/{validators-c6a4a8ac.js → validators-dd70be40.js} +1 -1
  206. package/dist/types/components/atoms/chip/chip-group.d.ts +22 -0
  207. package/dist/types/components/atoms/chip/chip.d.ts +18 -13
  208. package/dist/types/components/molecules/linked/linked.d.ts +0 -2
  209. package/dist/types/components.d.ts +47 -4
  210. package/package.json +1 -1
  211. package/dist/bromcom-ui/p-00fd6de2.entry.js +0 -5
  212. package/dist/bromcom-ui/p-1736eee9.entry.js +0 -5
  213. package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
  214. package/dist/bromcom-ui/p-28345f61.js +0 -5
  215. package/dist/bromcom-ui/p-3b3f7c54.entry.js +0 -5
  216. package/dist/bromcom-ui/p-4cbc9da5.entry.js +0 -5
  217. package/dist/bromcom-ui/p-55837df1.entry.js +0 -5
  218. package/dist/bromcom-ui/p-6ea2108c.entry.js +0 -5
  219. package/dist/bromcom-ui/p-7aa855fc.entry.js +0 -5
  220. package/dist/bromcom-ui/p-88078128.entry.js +0 -13
  221. package/dist/bromcom-ui/p-8aa77fd1.js +0 -5
  222. package/dist/bromcom-ui/p-c5bd9dd7.entry.js +0 -5
  223. package/dist/bromcom-ui/p-c818a4fc.entry.js +0 -5
  224. package/dist/bromcom-ui/p-c8c9d35e.entry.js +0 -5
  225. package/dist/bromcom-ui/p-cc45ea99.entry.js +0 -5
  226. package/dist/bromcom-ui/p-d155cf69.entry.js +0 -5
  227. package/dist/bromcom-ui/p-ebc87fe9.entry.js +0 -5
  228. package/dist/bromcom-ui/p-ed9bf8e9.js +0 -5
  229. package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -139
  230. package/dist/cjs/bcm-button_7.cjs.entry.js +0 -1521
  231. package/dist/cjs/bcm-chip.cjs.entry.js +0 -74
  232. package/dist/cjs/bcm-input.cjs.entry.js +0 -370
  233. package/dist/cjs/bcm-list.cjs.entry.js +0 -1607
  234. package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +0 -2443
  235. package/dist/cjs/bcm-typography.cjs.entry.js +0 -21
  236. package/dist/cjs/index-906fb4e5.js +0 -540
  237. package/dist/esm/bcm-avatar_2.entry.js +0 -134
  238. package/dist/esm/bcm-button_7.entry.js +0 -1511
  239. package/dist/esm/bcm-input.entry.js +0 -366
  240. package/dist/esm/bcm-rc-overflow_2.entry.js +0 -2438
  241. package/dist/esm/bcm-typography.entry.js +0 -17
  242. package/dist/esm/index-6310a048.js +0 -537
@@ -0,0 +1,292 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { Generate } from "@bcm/helpers";
6
+ import { Bcm } from "@bcm/model";
7
+ import { CaptionTemplate, LabelTemplate } from "@bcm/template";
8
+ import { Host, h } from "@stencil/core";
9
+ import cs from "classnames";
10
+ export class BcmChipGroup {
11
+ constructor() {
12
+ this._id = Generate.UID();
13
+ this.name = undefined;
14
+ this.value = undefined;
15
+ this.required = false;
16
+ this.label = undefined;
17
+ this.caption = undefined;
18
+ this.noCaption = false;
19
+ this.captionType = Bcm.Status.default;
20
+ this.captionError = undefined;
21
+ }
22
+ handleSelectItem(e) {
23
+ const target = e === null || e === void 0 ? void 0 : e.target;
24
+ if (target instanceof HTMLElement) {
25
+ const data = e.detail;
26
+ const chipItem = document.createElement("bcm-chip");
27
+ chipItem.setAttribute("type", "dismissable");
28
+ chipItem.setAttribute("value", data.id);
29
+ chipItem.innerHTML = data.text;
30
+ target.parentNode.insertBefore(chipItem, target);
31
+ this.setSelect(data.id);
32
+ }
33
+ }
34
+ handleDismiss(e) {
35
+ const target = e === null || e === void 0 ? void 0 : e.target;
36
+ if (target instanceof HTMLElement) {
37
+ target.remove();
38
+ this.setSelect();
39
+ }
40
+ }
41
+ handleSelect(e) {
42
+ const target = e === null || e === void 0 ? void 0 : e.target;
43
+ if (target instanceof HTMLElement) {
44
+ if (target.type === "addable") {
45
+ const listComponent = document.getElementById(target.id + "-list");
46
+ if (listComponent) {
47
+ listComponent.show();
48
+ }
49
+ }
50
+ else {
51
+ this.setSelect(target.value);
52
+ }
53
+ }
54
+ }
55
+ getSlots() {
56
+ return this.el.querySelectorAll("bcm-chip");
57
+ }
58
+ setSelect(val = this.value, noEvent = false) {
59
+ const slots = this.getSlots();
60
+ if ((slots === null || slots === void 0 ? void 0 : slots.length) === 0)
61
+ return;
62
+ const slotArray = Array.from(slots);
63
+ const selectedSlot = slotArray.find(slot => slot.value === val);
64
+ if (!selectedSlot) {
65
+ this.value = slotArray[0].value;
66
+ }
67
+ else {
68
+ this.value = val;
69
+ }
70
+ slotArray.forEach(slot => {
71
+ slot.selected = slot.value === this.value;
72
+ });
73
+ if (!noEvent) {
74
+ this.change.emit(this.value);
75
+ }
76
+ }
77
+ componentWillLoad() {
78
+ this.setSelect();
79
+ }
80
+ render() {
81
+ const { label, required, noCaption, captionType, captionError, caption } = this;
82
+ const hostClasses = cs("bcm-chip-group");
83
+ return (h(Host, { class: hostClasses }, label && (h("div", null, h(LabelTemplate, { type: captionType, value: label, required: required }))), h("div", { class: "tw-flex tw-flex-wrap tw-gap-2" }, h("slot", null)), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
84
+ }
85
+ static get is() { return "bcm-chip-group"; }
86
+ static get properties() {
87
+ return {
88
+ "_id": {
89
+ "type": "string",
90
+ "mutable": true,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": ""
101
+ },
102
+ "attribute": "id",
103
+ "reflect": true,
104
+ "defaultValue": "Generate.UID()"
105
+ },
106
+ "name": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "string",
111
+ "resolved": "string",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ },
120
+ "attribute": "name",
121
+ "reflect": false
122
+ },
123
+ "value": {
124
+ "type": "any",
125
+ "mutable": true,
126
+ "complexType": {
127
+ "original": "any",
128
+ "resolved": "any",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": ""
136
+ },
137
+ "attribute": "value",
138
+ "reflect": false
139
+ },
140
+ "required": {
141
+ "type": "boolean",
142
+ "mutable": false,
143
+ "complexType": {
144
+ "original": "boolean",
145
+ "resolved": "boolean",
146
+ "references": {}
147
+ },
148
+ "required": false,
149
+ "optional": false,
150
+ "docs": {
151
+ "tags": [],
152
+ "text": ""
153
+ },
154
+ "attribute": "required",
155
+ "reflect": false,
156
+ "defaultValue": "false"
157
+ },
158
+ "label": {
159
+ "type": "string",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "string",
163
+ "resolved": "string",
164
+ "references": {}
165
+ },
166
+ "required": false,
167
+ "optional": false,
168
+ "docs": {
169
+ "tags": [],
170
+ "text": ""
171
+ },
172
+ "attribute": "label",
173
+ "reflect": false
174
+ },
175
+ "caption": {
176
+ "type": "string",
177
+ "mutable": false,
178
+ "complexType": {
179
+ "original": "string",
180
+ "resolved": "string",
181
+ "references": {}
182
+ },
183
+ "required": false,
184
+ "optional": false,
185
+ "docs": {
186
+ "tags": [],
187
+ "text": ""
188
+ },
189
+ "attribute": "caption",
190
+ "reflect": false
191
+ },
192
+ "noCaption": {
193
+ "type": "boolean",
194
+ "mutable": false,
195
+ "complexType": {
196
+ "original": "boolean",
197
+ "resolved": "boolean",
198
+ "references": {}
199
+ },
200
+ "required": false,
201
+ "optional": false,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": ""
205
+ },
206
+ "attribute": "no-caption",
207
+ "reflect": false,
208
+ "defaultValue": "false"
209
+ },
210
+ "captionType": {
211
+ "type": "string",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "StatusTypes",
215
+ "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
216
+ "references": {
217
+ "StatusTypes": {
218
+ "location": "import",
219
+ "path": "@bcm/model"
220
+ }
221
+ }
222
+ },
223
+ "required": false,
224
+ "optional": false,
225
+ "docs": {
226
+ "tags": [],
227
+ "text": ""
228
+ },
229
+ "attribute": "caption-type",
230
+ "reflect": false,
231
+ "defaultValue": "Bcm.Status.default"
232
+ },
233
+ "captionError": {
234
+ "type": "string",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "string",
238
+ "resolved": "string",
239
+ "references": {}
240
+ },
241
+ "required": false,
242
+ "optional": false,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": ""
246
+ },
247
+ "attribute": "caption-error",
248
+ "reflect": false
249
+ }
250
+ };
251
+ }
252
+ static get events() {
253
+ return [{
254
+ "method": "change",
255
+ "name": "bcm-change",
256
+ "bubbles": true,
257
+ "cancelable": true,
258
+ "composed": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": ""
262
+ },
263
+ "complexType": {
264
+ "original": "any",
265
+ "resolved": "any",
266
+ "references": {}
267
+ }
268
+ }];
269
+ }
270
+ static get elementRef() { return "el"; }
271
+ static get listeners() {
272
+ return [{
273
+ "name": "bcm-chip-select-item",
274
+ "method": "handleSelectItem",
275
+ "target": undefined,
276
+ "capture": false,
277
+ "passive": false
278
+ }, {
279
+ "name": "bcm-chip-dismiss",
280
+ "method": "handleDismiss",
281
+ "target": undefined,
282
+ "capture": false,
283
+ "passive": false
284
+ }, {
285
+ "name": "bcm-chip-select",
286
+ "method": "handleSelect",
287
+ "target": undefined,
288
+ "capture": false,
289
+ "passive": false
290
+ }];
291
+ }
292
+ }
@@ -2,36 +2,39 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import { h, Host } from '@stencil/core';
6
- import { Generate } from '../../../helper/generate';
7
- import cs from 'classnames';
8
- import { ColorHelper } from '../../../helper/color-helper';
5
+ import { h, Host } from "@stencil/core";
6
+ import cs from "classnames";
7
+ import { ColorHelper } from "../../../helper/color-helper";
8
+ import { Generate } from "../../../helper/generate";
9
9
  export class BcmChip {
10
10
  constructor() {
11
11
  this._id = Generate.UID();
12
- this.type = 'default';
13
- this.size = 'medium';
12
+ this.type = "default";
13
+ this.size = "medium";
14
14
  this.avatar = undefined;
15
15
  this.icon = undefined;
16
16
  this.disabled = undefined;
17
17
  this.color = undefined;
18
+ this.selected = false;
19
+ this.value = undefined;
20
+ this.data = [];
18
21
  }
19
22
  // @ts-ignore
20
23
  setColor() {
21
- if (!this.color)
24
+ if (!this.color && !this.selected)
22
25
  return;
23
- const color = this.color;
26
+ const color = this.selected ? "indigo" : this.color; // Important: Find a solution for this in V3! ( selected ? this.color : "indigo" )
24
27
  return {
25
- '--bcm-chip-color': ColorHelper.dsColor(color + '-500'),
26
- '--bcm-chip-color-hover': ColorHelper.dsColor(color + '-500'),
27
- '--bcm-chip-color-focus': ColorHelper.dsColor(color + '-600'),
28
- '--bcm-chip-color-active': ColorHelper.dsColor(color + '-700'),
29
- '--bcm-chip-color-disabled': ColorHelper.dsColor('slate' + '-300'),
30
- '--bcm-chip-background-color': ColorHelper.dsColor(color + '-100'),
31
- '--bcm-chip-background-color-hover': ColorHelper.dsColor(color + '-200'),
32
- '--bcm-chip-background-color-focus': ColorHelper.dsColor(color + '-300'),
33
- '--bcm-chip-background-color-active': ColorHelper.dsColor(color + '-200'),
34
- '--bcm-chip-background-color-disabled': ColorHelper.dsColor('slate' + '-100'),
28
+ "--bcm-chip-color": ColorHelper.dsColor(color + "-500"),
29
+ "--bcm-chip-color-hover": ColorHelper.dsColor(color + "-500"),
30
+ "--bcm-chip-color-focus": ColorHelper.dsColor(color + "-600"),
31
+ "--bcm-chip-color-active": ColorHelper.dsColor(color + "-700"),
32
+ "--bcm-chip-color-disabled": ColorHelper.dsColor("slate" + "-300"),
33
+ "--bcm-chip-background-color": ColorHelper.dsColor(color + "-100"),
34
+ "--bcm-chip-background-color-hover": ColorHelper.dsColor(color + "-200"),
35
+ "--bcm-chip-background-color-focus": ColorHelper.dsColor(color + "-300"),
36
+ "--bcm-chip-background-color-active": ColorHelper.dsColor(color + "-200"),
37
+ "--bcm-chip-background-color-disabled": ColorHelper.dsColor("slate" + "-100"),
35
38
  };
36
39
  }
37
40
  handleDismiss(e) {
@@ -44,13 +47,23 @@ export class BcmChip {
44
47
  e.preventDefault();
45
48
  this.bcmChipAddable.emit(this.el);
46
49
  }
50
+ listSelectedItems(e) {
51
+ e.stopPropagation();
52
+ e.preventDefault();
53
+ if (e.detail) {
54
+ this.bcmChipSelectItem.emit(e.detail);
55
+ e.target.setClear();
56
+ this.data = this.data.filter(item => item.id !== e.detail.id);
57
+ }
58
+ }
47
59
  render() {
48
60
  const { type, size, avatar, disabled, color } = this;
49
- const hostClasses = cs('bcm-chip', `bcm-chip__type-${type}`, `bcm-chip__size-${size}`, {
50
- 'bcm-chip--disabled': disabled,
51
- 'bcm-chip--avatar': avatar,
61
+ const hostClasses = cs("bcm-chip", `bcm-chip__type-${type}`, `bcm-chip__size-${size}`, {
62
+ "bcm-chip--disabled": disabled,
63
+ "bcm-chip--avatar": avatar,
52
64
  });
53
- return (h(Host, { class: hostClasses, tabindex: "0", disabled: disabled, style: this.setColor(), onClick: e => this.bcmChipSelect.emit(e) }, avatar && h("bcm-avatar", Object.assign({ size: size }, (color && { color }), (avatar && { image: avatar }))), type === 'addable' && (h("span", { class: "bcm-chip__left" }, h("bcm-icon", { onClick: e => this.handleAddable(e), icon: "far fa-plus" }))), h("slot", null), type === 'dismissable' && (h("span", { class: "bcm-chip__type-dismissable-icon" }, h("bcm-icon", { onClick: e => this.handleDismiss(e), icon: "fal fa-times" })))));
65
+ return (h(Host, { class: hostClasses, tabindex: "0", disabled: disabled, style: this.setColor(), onClick: e => this.bcmChipSelect.emit(e) }, avatar && h("bcm-avatar", Object.assign({ size: size }, (color && { color }), (avatar && { image: avatar }))), type === "addable" && (h("span", { class: "bcm-chip__left" }, h("bcm-icon", { onClick: e => this.handleAddable(e), icon: "far fa-plus" }))), h("slot", null), type === "dismissable" && (h("span", { class: "bcm-chip__type-dismissable-icon" }, h("bcm-icon", { onClick: e => this.handleDismiss(e), icon: "fal fa-times" }))), this.data && this.data.length > 0 && ( // To be added to v3
66
+ h("bcm-list", { "onBcm-change": e => this.listSelectedItems(e), id: this._id + "-list", data: this.data, linkedComponent: this._id, searchable: true, highlight: true }))));
54
67
  }
55
68
  static get is() { return "bcm-chip"; }
56
69
  static get originalStyleUrls() {
@@ -87,7 +100,7 @@ export class BcmChip {
87
100
  "type": "string",
88
101
  "mutable": true,
89
102
  "complexType": {
90
- "original": "'default' | 'dismissable' | 'addable' | 'checkable'",
103
+ "original": "\"default\" | \"dismissable\" | \"addable\" | \"checkable\"",
91
104
  "resolved": "\"addable\" | \"checkable\" | \"default\" | \"dismissable\"",
92
105
  "references": {}
93
106
  },
@@ -99,13 +112,13 @@ export class BcmChip {
99
112
  },
100
113
  "attribute": "type",
101
114
  "reflect": false,
102
- "defaultValue": "'default'"
115
+ "defaultValue": "\"default\""
103
116
  },
104
117
  "size": {
105
118
  "type": "string",
106
119
  "mutable": true,
107
120
  "complexType": {
108
- "original": "'small' | 'medium' | 'large'",
121
+ "original": "\"small\" | \"medium\" | \"large\"",
109
122
  "resolved": "\"large\" | \"medium\" | \"small\"",
110
123
  "references": {}
111
124
  },
@@ -117,7 +130,7 @@ export class BcmChip {
117
130
  },
118
131
  "attribute": "size",
119
132
  "reflect": false,
120
- "defaultValue": "'medium'"
133
+ "defaultValue": "\"medium\""
121
134
  },
122
135
  "avatar": {
123
136
  "type": "any",
@@ -186,6 +199,59 @@ export class BcmChip {
186
199
  },
187
200
  "attribute": "color",
188
201
  "reflect": false
202
+ },
203
+ "selected": {
204
+ "type": "boolean",
205
+ "mutable": true,
206
+ "complexType": {
207
+ "original": "boolean",
208
+ "resolved": "boolean",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": ""
216
+ },
217
+ "attribute": "selected",
218
+ "reflect": false,
219
+ "defaultValue": "false"
220
+ },
221
+ "value": {
222
+ "type": "string",
223
+ "mutable": true,
224
+ "complexType": {
225
+ "original": "string",
226
+ "resolved": "string",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": ""
234
+ },
235
+ "attribute": "value",
236
+ "reflect": false
237
+ },
238
+ "data": {
239
+ "type": "any",
240
+ "mutable": true,
241
+ "complexType": {
242
+ "original": "any",
243
+ "resolved": "any",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": ""
251
+ },
252
+ "attribute": "data",
253
+ "reflect": false,
254
+ "defaultValue": "[]"
189
255
  }
190
256
  };
191
257
  }
@@ -235,6 +301,21 @@ export class BcmChip {
235
301
  "resolved": "any",
236
302
  "references": {}
237
303
  }
304
+ }, {
305
+ "method": "bcmChipSelectItem",
306
+ "name": "bcm-chip-select-item",
307
+ "bubbles": true,
308
+ "cancelable": true,
309
+ "composed": true,
310
+ "docs": {
311
+ "tags": [],
312
+ "text": ""
313
+ },
314
+ "complexType": {
315
+ "original": "any",
316
+ "resolved": "any",
317
+ "references": {}
318
+ }
238
319
  }];
239
320
  }
240
321
  static get elementRef() { return "el"; }
@@ -45,11 +45,11 @@ export class BcmLinked {
45
45
  }
46
46
  calculatePosition() {
47
47
  const el = this.el;
48
- if (el && this.target() && this.htmlContent) {
48
+ if (el && this.target()) {
49
49
  if (this.isOpen) {
50
50
  FloatingUI({
51
51
  ref: this.target(),
52
- floating: this.htmlContent,
52
+ floating: el,
53
53
  placement: this.placement,
54
54
  offset: 4,
55
55
  autoHidden: el.getAttribute("main-linked") === "true" ? false : true,
@@ -81,18 +81,7 @@ export class BcmLinked {
81
81
  }
82
82
  }
83
83
  componentDidLoad() {
84
- this.htmlContent = this.el.querySelector(".linked-content");
85
84
  this.init();
86
- this.updateBody();
87
- }
88
- updateBody() {
89
- const bcmOverlayContainer = document.querySelector("#bcm-overlay-container");
90
- if (this.isOpen) {
91
- bcmOverlayContainer.appendChild(this.htmlContent);
92
- }
93
- else {
94
- this.htmlContent.remove();
95
- }
96
85
  }
97
86
  triggerWatch(newValue) {
98
87
  if (newValue === Bcm.TriggerType.hover) {
@@ -100,7 +89,6 @@ export class BcmLinked {
100
89
  }
101
90
  }
102
91
  watchIsOpen() {
103
- this.updateBody();
104
92
  this.bcmOpen.emit(this.isOpen);
105
93
  }
106
94
  onLinkedDataDismis() {
@@ -115,7 +103,8 @@ export class BcmLinked {
115
103
  wait && (await delay(50));
116
104
  const target = this.target();
117
105
  if (target) {
118
- // document.body.appendChild(this.el);
106
+ const bcmOverlayContainer = document.querySelector("#bcm-overlay-container");
107
+ bcmOverlayContainer.appendChild(this.el);
119
108
  target.setAttribute("linked-is-open", "true");
120
109
  this.isOpen = true;
121
110
  this.calculatePosition();
@@ -145,7 +134,7 @@ export class BcmLinked {
145
134
  if (this.trigger === Bcm.TriggerType.hover)
146
135
  return;
147
136
  const isTarget = Generate.findEventPath(e, this.target());
148
- const isSelf = Generate.findEventPath(e, this.htmlContent);
137
+ const isSelf = Generate.findEventPath(e, this.el);
149
138
  const isLinked = Generate.findEventPathWithNodeName(e, "BCM-LINKED");
150
139
  if (!isTarget && !isSelf && !isLinked) {
151
140
  this.hide();
@@ -194,7 +183,7 @@ export class BcmLinked {
194
183
  }
195
184
  render() {
196
185
  const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
197
- return (h(Host, { class: "tw-hidden" }, h("div", { class: "linked-content tw-invisible tw-absolute tw-left-0 tw-top-0 tw-z-tooltip tw-block tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-opacity-0 tw-shadow tw-transition-opacity tw-duration-100", style: Object.assign(Object.assign({}, openStyle), { overflow: "auto" }) }, h("slot", null))));
186
+ return (h(Host, { class: "tw-invisible tw-absolute tw-left-0 tw-top-0 tw-z-tooltip tw-block tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-opacity-0 tw-shadow tw-transition-opacity tw-duration-100", style: Object.assign(Object.assign({}, openStyle), { overflow: "auto" }) }, h("slot", null)));
198
187
  }
199
188
  static get is() { return "bcm-linked"; }
200
189
  static get properties() {
@@ -30,6 +30,7 @@ export class BcmForm {
30
30
  targetFormNotExist: 'target form is not exist --> ',
31
31
  },
32
32
  inputComponents: {
33
+ CHIP_GROUP: 'chip-group',
33
34
  // Birbirinin aynısı
34
35
  INPUT: 'input',
35
36
  TEXTAREA: 'textarea',
@@ -19,6 +19,7 @@ export const BcmFormComponents = [
19
19
  'BCM-DATETIME-PICKER',
20
20
  'BCM-SELECT',
21
21
  'BCM-LISTBOX',
22
+ 'BCM-CHIP-GROUP', // to be added to v3
22
23
  ];
23
24
  export const BcmFormGroupComponents = [
24
25
  'BCM-FORM-GROUP',
@@ -670,6 +670,9 @@
670
670
  visibility: visible;
671
671
  transition: visibility 0s linear 0s, opacity 100ms, transform 100ms;
672
672
  }
673
+ .bcm-list__container.bcm-list__type-linked-component {
674
+ margin-top: 2px;
675
+ }
673
676
  .bcm-list__label {
674
677
  line-height: 1;
675
678
  }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface BcmChipGroup extends Components.BcmChipGroup, HTMLElement {}
4
+ export const BcmChipGroup: {
5
+ prototype: BcmChipGroup;
6
+ new (): BcmChipGroup;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;