bromcom-ui 2.11.0 → 2.11.1-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 (253) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-cd75feb9.entry.js → p-07f4b3b6.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-f2aca650.entry.js → p-0cea9de1.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-258aca86.entry.js → p-11d1263d.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-e70821f7.entry.js → p-12dcbe05.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-4c2ecca2.entry.js → p-13d338d4.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-37565993.entry.js → p-15b5b871.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-ba2ddaf6.js → p-18665a1b.js} +1 -1
  9. package/dist/bromcom-ui/{p-7af84928.entry.js → p-227b3c30.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-2c4e5bb2.entry.js → p-24bf5b68.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-3bb8785d.js → p-26ea59e8.js} +1 -1
  12. package/dist/bromcom-ui/{p-3c4fbed6.entry.js → p-28d8c0a9.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-a3ce764f.entry.js → p-3060ab0d.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-b851dcc2.entry.js → p-362cdc23.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-396ef644.entry.js → p-3ae1649c.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-7aa06da2.entry.js → p-3d009872.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-3b5a6c8e.js → p-444c4e62.js} +1 -1
  18. package/dist/bromcom-ui/{p-bd6c967c.entry.js → p-494b91de.entry.js} +1 -1
  19. package/dist/bromcom-ui/p-518b9b80.js +1 -1
  20. package/dist/bromcom-ui/{p-a3960507.entry.js → p-52263846.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-505709c6.entry.js → p-525d9122.entry.js} +1 -1
  22. package/dist/bromcom-ui/p-5436ddd6.js +1 -1
  23. package/dist/bromcom-ui/{p-1920c1cd.js → p-543a00fb.js} +1 -1
  24. package/dist/bromcom-ui/{p-964b3343.entry.js → p-5679b0d2.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-17821ee9.entry.js → p-56dd3fea.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-e082074a.entry.js → p-5b7c9354.entry.js} +1 -1
  27. package/dist/bromcom-ui/p-5c10f685.entry.js +5 -0
  28. package/dist/bromcom-ui/{p-70b34e79.entry.js → p-5ddfca71.entry.js} +1 -1
  29. package/dist/bromcom-ui/p-62822a2c.entry.js +5 -0
  30. package/dist/bromcom-ui/p-6369b73b.js +1 -1
  31. package/dist/bromcom-ui/p-676c9008.entry.js +5 -0
  32. package/dist/bromcom-ui/{p-cad2f118.entry.js → p-6896c082.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-fe22cf19.entry.js → p-6aaf444d.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-01c26454.entry.js → p-6cd9d6ac.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-f037abec.entry.js → p-6fad7b91.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-3b643e9a.entry.js → p-7194d922.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-aa22dd85.entry.js → p-71b45c22.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-f68c1b66.entry.js → p-72bc8abe.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-13f868f7.entry.js → p-7370b4fe.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-7b7117a6.entry.js +5 -0
  41. package/dist/bromcom-ui/{p-eb4362ac.entry.js → p-7b7f2f30.entry.js} +1 -1
  42. package/dist/bromcom-ui/p-7bd237c3.entry.js +5 -0
  43. package/dist/bromcom-ui/{p-f5958c67.entry.js → p-7d3de132.entry.js} +1 -1
  44. package/dist/bromcom-ui/p-7edf67d6.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-f3246837.entry.js → p-84fe87a9.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-ccb3c2e2.entry.js → p-88aaae3d.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-e76bfd6b.entry.js → p-892dfb49.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-4f96ee59.entry.js → p-8a298b97.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-dbc66238.js → p-8bdcf95d.js} +1 -1
  50. package/dist/bromcom-ui/{p-092f751e.js → p-8da7f4c3.js} +1 -1
  51. package/dist/bromcom-ui/p-94554e42.js +1 -1
  52. package/dist/bromcom-ui/{p-dd1a1d12.entry.js → p-9cae421a.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-e0a4da6d.entry.js → p-9e2b2ff7.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-4a540b56.js → p-9f6bbc21.js} +1 -1
  55. package/dist/bromcom-ui/{p-e920c9b9.entry.js → p-9f9504ee.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-fd1c3951.entry.js → p-a4067bcc.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-f3423d98.entry.js → p-a8096b68.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-15302481.entry.js → p-a8f84d47.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-c439cb60.entry.js → p-b362b2b5.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-b701b3aa.entry.js → p-b3ef6a72.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-aee35345.entry.js → p-b5608cea.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-422e697d.entry.js → p-b5db6748.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-687ea920.entry.js → p-b7197a02.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-73f5c339.entry.js → p-b9c6cf34.entry.js} +1 -1
  65. package/dist/bromcom-ui/{p-8d4654ed.entry.js → p-bacb0014.entry.js} +1 -1
  66. package/dist/bromcom-ui/p-bcd599fd.js +5 -0
  67. package/dist/bromcom-ui/{p-e4ab4af0.entry.js → p-c0e42d05.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-66964e5c.entry.js → p-c2cab6c8.entry.js} +1 -1
  69. package/dist/bromcom-ui/{p-f0177251.entry.js → p-c8ae67c0.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-79007b75.entry.js → p-cbd050fa.entry.js} +1 -1
  71. package/dist/bromcom-ui/{p-3b7ac787.entry.js → p-ccc42e5f.entry.js} +1 -1
  72. package/dist/bromcom-ui/{p-2d776ab1.entry.js → p-d36d446d.entry.js} +1 -1
  73. package/dist/bromcom-ui/{p-02b30a5c.entry.js → p-ded1c855.entry.js} +1 -1
  74. package/dist/bromcom-ui/{p-62370fd0.entry.js → p-e49af670.entry.js} +1 -1
  75. package/dist/bromcom-ui/p-f1c672fd.entry.js +5 -0
  76. package/dist/bromcom-ui/{p-2fad0385.entry.js → p-f73dc7a3.entry.js} +1 -1
  77. package/dist/bromcom-ui/{p-c926e138.js → p-fe7e383d.js} +1 -1
  78. package/dist/cjs/{bcm-3c58a6d5.js → bcm-470704cd.js} +4 -4
  79. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  80. package/dist/cjs/bcm-alert.cjs.entry.js +4 -4
  81. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +8 -8
  82. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +8 -8
  83. package/dist/cjs/{bcm-button.cjs.entry.js → bcm-attendance-actions_2.cjs.entry.js} +344 -34
  84. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-avatar_2.cjs.entry.js +10 -10
  86. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  87. package/dist/cjs/bcm-button-group.cjs.entry.js +7 -7
  88. package/dist/cjs/bcm-caption.cjs.entry.js +8 -8
  89. package/dist/cjs/bcm-card.cjs.entry.js +5 -5
  90. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +7 -7
  91. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -6
  92. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +10 -10
  93. package/dist/cjs/bcm-chip-group.cjs.entry.js +8 -8
  94. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  95. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  96. package/dist/cjs/bcm-color-input.cjs.entry.js +6 -6
  97. package/dist/cjs/bcm-colorful_2.cjs.entry.js +12 -12
  98. package/dist/cjs/bcm-date-picker.cjs.entry.js +4 -4
  99. package/dist/cjs/bcm-date.cjs.entry.js +8 -8
  100. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
  101. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  102. package/dist/cjs/bcm-drawer.cjs.entry.js +8 -8
  103. package/dist/cjs/bcm-dropdown.cjs.entry.js +8 -8
  104. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +4 -4
  105. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -5
  106. package/dist/cjs/bcm-form.cjs.entry.js +2 -2
  107. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  108. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +8 -8
  109. package/dist/cjs/bcm-input_2.cjs.entry.js +15 -15
  110. package/dist/cjs/bcm-item.cjs.entry.js +4 -4
  111. package/dist/cjs/bcm-items.cjs.entry.js +4 -4
  112. package/dist/cjs/bcm-label_2.cjs.entry.js +13 -13
  113. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  114. package/dist/cjs/bcm-list_3.cjs.entry.js +25 -25
  115. package/dist/cjs/bcm-menu.cjs.entry.js +8 -8
  116. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
  117. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
  118. package/dist/cjs/bcm-modal-2.cjs.entry.js +7 -7
  119. package/dist/cjs/bcm-modal.cjs.entry.js +7 -7
  120. package/dist/cjs/bcm-number-input.cjs.entry.js +8 -8
  121. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +5 -5
  122. package/dist/cjs/bcm-popconfirm.cjs.entry.js +5 -5
  123. package/dist/cjs/bcm-popover.cjs.entry.js +9 -9
  124. package/dist/cjs/bcm-progress.cjs.entry.js +4 -4
  125. package/dist/cjs/bcm-radio-group.cjs.entry.js +10 -10
  126. package/dist/cjs/bcm-radio.cjs.entry.js +13 -13
  127. package/dist/cjs/bcm-range.cjs.entry.js +6 -6
  128. package/dist/cjs/bcm-rc-picker.cjs.entry.js +2 -2
  129. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  130. package/dist/cjs/bcm-shortcut.cjs.entry.js +10 -10
  131. package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
  132. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  133. package/dist/cjs/bcm-stepper.cjs.entry.js +9 -9
  134. package/dist/cjs/bcm-switch.cjs.entry.js +9 -9
  135. package/dist/cjs/bcm-tab-group.cjs.entry.js +7 -7
  136. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +10 -10
  137. package/dist/cjs/bcm-tab-item.cjs.entry.js +6 -6
  138. package/dist/cjs/bcm-table.cjs.entry.js +6 -6
  139. package/dist/cjs/bcm-tag.cjs.entry.js +15 -15
  140. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  141. package/dist/cjs/bcm-time-picker.cjs.entry.js +4 -4
  142. package/dist/cjs/bcm-toast.cjs.entry.js +11 -11
  143. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  144. package/dist/cjs/{floating-ui-555cd3d4.js → floating-ui-829ed777.js} +2 -2
  145. package/dist/cjs/{generate-183405cb.js → generate-c0b728d9.js} +1 -1
  146. package/dist/cjs/{global-4a756c02.js → global-8735cc95.js} +1 -1
  147. package/dist/cjs/{input-template-e36927b1.js → input-template-e9c37e34.js} +6 -6
  148. package/dist/cjs/{json-parse-decarator-4c1f74bb.js → json-parse-decarator-3e78a3ac.js} +1 -1
  149. package/dist/cjs/{label-template-a6f51ef2.js → label-template-df551eef.js} +2 -2
  150. package/dist/cjs/loader.cjs.js +3 -3
  151. package/dist/cjs/{number-helper-ca52fadf.js → number-helper-eea3b6e3.js} +1 -1
  152. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +7 -7
  153. package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -5
  154. package/dist/cjs/{package-4c68d5f8.js → package-8156f6de.js} +1 -1
  155. package/dist/cjs/{popover-placement-9b4b4153.js → popover-placement-26859281.js} +1 -1
  156. package/dist/cjs/{slot-template-80b019d5.js → slot-template-a47f5492.js} +1 -1
  157. package/dist/cjs/{stepper-states-f97c457a.js → stepper-states-7e56ed0b.js} +1 -1
  158. package/dist/cjs/{string-helper-3212f4ea.js → string-helper-b6bd711a.js} +2 -2
  159. package/dist/cjs/{tooltip-helper-83971814.js → tooltip-helper-fad904a9.js} +9 -9
  160. package/dist/cjs/{validators-a31b53a5.js → validators-f952aefd.js} +1 -1
  161. package/dist/collection/components/molecules/dropdown/dropdown.css +1 -0
  162. package/dist/components/bcm-dropdown.js +1 -1
  163. package/dist/components/generate.js +1 -1
  164. package/dist/esm/bcm-0f9cc27c.js +1 -1
  165. package/dist/esm/bcm-accordion.entry.js +2 -2
  166. package/dist/esm/bcm-alert.entry.js +2 -2
  167. package/dist/esm/bcm-attendance-actions-comment.entry.js +5 -5
  168. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +5 -5
  169. package/dist/esm/{bcm-button.entry.js → bcm-attendance-actions_2.entry.js} +337 -28
  170. package/dist/esm/bcm-attendance.entry.js +2 -2
  171. package/dist/esm/bcm-avatar_2.entry.js +5 -5
  172. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  173. package/dist/esm/bcm-button-group.entry.js +3 -3
  174. package/dist/esm/bcm-caption.entry.js +5 -5
  175. package/dist/esm/bcm-card.entry.js +2 -2
  176. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  177. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -3
  178. package/dist/esm/bcm-checkbox_2.entry.js +3 -3
  179. package/dist/esm/bcm-chip-group.entry.js +5 -5
  180. package/dist/esm/bcm-chip.entry.js +2 -2
  181. package/dist/esm/bcm-collapse.entry.js +2 -2
  182. package/dist/esm/bcm-color-input.entry.js +4 -4
  183. package/dist/esm/bcm-colorful_2.entry.js +5 -5
  184. package/dist/esm/bcm-date-picker.entry.js +3 -3
  185. package/dist/esm/bcm-date.entry.js +5 -5
  186. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  187. package/dist/esm/bcm-default.entry.js +2 -2
  188. package/dist/esm/bcm-drawer.entry.js +5 -5
  189. package/dist/esm/bcm-dropdown.entry.js +5 -5
  190. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  191. package/dist/esm/bcm-form-2.entry.js +3 -3
  192. package/dist/esm/bcm-input-custom.entry.js +2 -2
  193. package/dist/esm/bcm-input-dropdown.entry.js +5 -5
  194. package/dist/esm/bcm-input_2.entry.js +6 -6
  195. package/dist/esm/bcm-item.entry.js +3 -3
  196. package/dist/esm/bcm-items.entry.js +2 -2
  197. package/dist/esm/bcm-label_2.entry.js +6 -6
  198. package/dist/esm/bcm-link.entry.js +1 -1
  199. package/dist/esm/bcm-list_3.entry.js +7 -7
  200. package/dist/esm/bcm-menu.entry.js +5 -5
  201. package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
  202. package/dist/esm/bcm-modal-2-header.entry.js +4 -4
  203. package/dist/esm/bcm-modal-2.entry.js +5 -5
  204. package/dist/esm/bcm-modal.entry.js +3 -3
  205. package/dist/esm/bcm-number-input.entry.js +5 -5
  206. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  207. package/dist/esm/bcm-popconfirm.entry.js +3 -3
  208. package/dist/esm/bcm-popover.entry.js +5 -5
  209. package/dist/esm/bcm-progress.entry.js +3 -3
  210. package/dist/esm/bcm-radio-group.entry.js +5 -5
  211. package/dist/esm/bcm-radio.entry.js +5 -5
  212. package/dist/esm/bcm-range.entry.js +3 -3
  213. package/dist/esm/bcm-rc-picker.entry.js +1 -1
  214. package/dist/esm/bcm-shortcut.entry.js +5 -5
  215. package/dist/esm/bcm-skeleton.entry.js +4 -4
  216. package/dist/esm/bcm-step.entry.js +3 -3
  217. package/dist/esm/bcm-stepper.entry.js +6 -6
  218. package/dist/esm/bcm-switch.entry.js +3 -3
  219. package/dist/esm/bcm-tab-group.entry.js +5 -5
  220. package/dist/esm/bcm-tab-item-header.entry.js +5 -5
  221. package/dist/esm/bcm-tab-item.entry.js +4 -4
  222. package/dist/esm/bcm-table.entry.js +4 -4
  223. package/dist/esm/bcm-tag.entry.js +4 -4
  224. package/dist/esm/bcm-time-picker.entry.js +3 -3
  225. package/dist/esm/bcm-toast.entry.js +3 -3
  226. package/dist/esm/bromcom-ui.js +3 -3
  227. package/dist/esm/floating-ui-a4e67246.js +1 -1
  228. package/dist/esm/{generate-ea4b5630.js → generate-79ee4441.js} +1 -1
  229. package/dist/esm/{global-8fd9695e.js → global-e756344b.js} +1 -1
  230. package/dist/esm/{input-template-2ac3ec12.js → input-template-b0ee6981.js} +2 -2
  231. package/dist/esm/{json-parse-decarator-c5e5dae7.js → json-parse-decarator-ea12b23b.js} +1 -1
  232. package/dist/esm/label-template-b2e8f81d.js +1 -1
  233. package/dist/esm/loader.js +3 -3
  234. package/dist/esm/{number-helper-148cd002.js → number-helper-abccb751.js} +1 -1
  235. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  236. package/dist/esm/old-bcm-popover.entry.js +3 -3
  237. package/dist/esm/{package-b6a53fde.js → package-e9c0a5b1.js} +1 -1
  238. package/dist/esm/{stepper-states-f02df67c.js → stepper-states-a0fe0c79.js} +1 -1
  239. package/dist/esm/string-helper-3526c4fe.js +1 -1
  240. package/dist/esm/{tooltip-helper-4b53b00b.js → tooltip-helper-9f73f914.js} +4 -4
  241. package/dist/esm/{validators-78ec4f0a.js → validators-37228b55.js} +1 -1
  242. package/package.json +1 -1
  243. package/dist/bromcom-ui/p-0511936c.entry.js +0 -5
  244. package/dist/bromcom-ui/p-3b30d329.entry.js +0 -5
  245. package/dist/bromcom-ui/p-4e40be76.entry.js +0 -5
  246. package/dist/bromcom-ui/p-6bea3bea.js +0 -5
  247. package/dist/bromcom-ui/p-ad359555.entry.js +0 -5
  248. package/dist/bromcom-ui/p-ada3eed7.entry.js +0 -5
  249. package/dist/bromcom-ui/p-bca72f17.entry.js +0 -5
  250. package/dist/bromcom-ui/p-f33d8f77.entry.js +0 -5
  251. package/dist/bromcom-ui/p-f650fed9.entry.js +0 -5
  252. package/dist/cjs/bcm-attendance-actions.cjs.entry.js +0 -330
  253. package/dist/esm/bcm-attendance-actions.entry.js +0 -326
@@ -1,5 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import{r as t,c as i,f as e,h as o,H as n,g as s,F as l}from"./p-e037ee2b.js";import"./p-4798d827.js";import"./p-626a65e9.js";import{G as r}from"./p-c926e138.js";import"./p-6bea3bea.js";import"./p-94554e42.js";import"./p-ba2ddaf6.js";import"./p-5ae0a59b.js";import{a}from"./p-6369b73b.js";import{C as d}from"./p-8a92f2bf.js";import{c as u}from"./p-bed627ab.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as p}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-034bbcdd.js";import"./p-e45c1546.js";import"./p-4a540b56.js";const h=p({slots:{base:"tw-font-sans tw-flex tw-flex-col tw-items-start tw-justify-start tw-gap-2",content:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-3",inputArea:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-1 tw-box-content tw-border tw-border-solid tw-max-w-[100px] tw-uppercase tw-font-medium tw-text-center tw-border-gray-300 tw-rounded",input:"tw-flex-1 tw-text-inherit tw-uppercase tw-font-semibold tw-text-center tw-border-none tw-bg-transparent tw-outline-none tw-w-full",button:["input-dropdown-button tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-1 tw-rounded tw-outline-none tw-bg-slate-100","tw-border tw-border-solid tw-border-slate-300 tw-font-medium tw-text-slate-600","hover:tw-border-slate-400 hover:tw-bg-slate-200","tw-min-w-[32px]","tw-cursor-pointer","disabled:tw-cursor-not-allowed disabled:tw-text-slate-400 disabled:tw-pointer-events-none","readonly:tw-text-slate-700 readonly:tw-cursor-text"],menu:"tw-mt-1 tw-flex tw-flex-col tw-items-start tw-justify-center tw-gap-2 tw-overflow-auto tw-bg-white tw-p-3 tw-font-sans tw-text-3 tw-text-slate-700",menuItem:"tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 hover:tw-bg-blue-100",selectedItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 tw-bg-primary-200",disabledItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-cursor-not-allowed tw-text-slate-400 tw-bg-slate-100 hover:tw-bg-slate-100 tw-list-none",commentArea:"tw-flex tw-h-fit tw-w-full tw-min-w-[288px] tw-flex-col tw-items-start tw-rounded tw-p-4 tw-shadow-2"},variants:{size:{small:{button:"tw-h-[18px] tw-text-1 tw-leading-none"},medium:{button:"tw-h-[24px] tw-text-2",inputArea:"tw-p-0.5",input:"tw-text-4"},large:{button:"tw-h-[30px] tw-text-2",inputArea:"tw-p-1",input:"tw-text-6"}},invalid:{true:{inputArea:"tw-border-red-600 tw-bg-red-50",input:"tw-text-red-500"}},disabled:{true:{base:"tw-opacity-50 tw-cursor-not-allowed",input:"tw-cursor-not-allowed"}},hideComment:{true:{base:"tw-min-w-[98px]"},false:{base:"tw-min-w-[128px] "}},label:{true:""}},defaultVariants:{size:"medium",invalid:!1,hideComment:!1,disabled:!1}}),c=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.onChangeDropdown=i(this,"bcm-input-dropdown-change",7),this.handleKeyPress=t=>{var i,e;(null===(e=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value)||void 0===e?void 0:e.length)>=+this.maxCharacterLimit&&t.preventDefault()},this._id=r.UID(),this.value=void 0,this.defaultValue={},this.lateKeys="L",this.maxCharacterLimit=1,this.size=a.Size.medium,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.fullWidth=!1,this.hideComment=!1,this.hideCaption=!0,this.disabled=!1,this.required=!1,this.readonly=!1,this.data=[{key:"/",value:"Present",color:"#00b050"},{key:"B",value:"Educated off site (NOT dual registration)",color:"#ffc000"},{key:"C",value:"Other authorised circumstance",color:"#ffc000"},{key:"D",value:"Dual registration",color:"#0070c0"},{key:"E",value:"Excluded",color:"#ff0000"},{key:"F",value:"Free Study",color:"#ffc000"},{key:"I",value:"Illness",color:"#ff0000"},{key:"J",value:"Interview",color:"#ffc000"},{key:"L",value:"Late before reg. closed",color:"#ffc000"}],this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.isOpenMenu=!1,this.invalid=!1}get overlayContainer(){return document.getElementById("bcm-overlay-container")}get menuContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-menu-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-menu-${this._id}`)}get keys(){return this.lateKeys.toLocaleLowerCase().split(",")}get isLate(){var t,i,e,o,n,s;return this.keys.includes(null===(i=null===(t=this.value)||void 0===t?void 0:t.key)||void 0===i?void 0:i.toLocaleLowerCase())||(null===(o=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===o?void 0:o.isLate)||(null===(s=null===(n=this.data)||void 0===n?void 0:n.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===s?void 0:s.lateMin)>0}componentWillLoad(){var t,i;this.captionCache=this.caption,this.captionTypeCache=this.captionType,(null===(t=Object.keys(this.defaultValue))||void 0===t?void 0:t.length)>0?this.watchDefaultValueHandler(this.defaultValue):this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>t.selected))}get commentContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-comment-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-comment-${this._id}`)}clickListener(t){var i,e;const o=r.findEventPath(t,this.el),n=r.findEventPathWithNodeName(t,"BCM-LINKED");o||n||this.keys.includes(null===(i=this.value)||void 0===i?void 0:i.key)||null===(e=this.commentContent)||void 0===e||e.hide()}watchDefaultValueHandler(t){var i,o;t&&(this.value=null===(i=this.data)||void 0===i?void 0:i.find((i=>{var e,o;return(null===(e=null==i?void 0:i.key)||void 0===e?void 0:e.toLowerCase())===(null===(o=t.key)||void 0===o?void 0:o.toLowerCase())})),this.data=this.data.map((i=>(i.key===(null==t?void 0:t.key)?(i=t).selected=!0:i.selected=!1,i))),this.value=null===(o=this.data)||void 0===o?void 0:o.find((t=>null==t?void 0:t.selected)),e(this.el))}async set(t){this.data="string"==typeof t?JSON.parse(t):t}async get(){return this.value}async setClear(){return this.value=null,Promise.resolve()}async resetCaption(){return this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.invalid=!1,Promise.resolve()}onSelectItem(t){var i;this.invalid=!1,this.data=this.data.map((i=>Object.assign(Object.assign({},i),{selected:i.key===t.key}))),this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>null==t?void 0:t.selected)),this.onChangeDropdown.emit(this.value),this.change.emit()}async handleInput(t){var i,e,o,n,s,l,r;const a=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value;if(this.isOpenMenu=!0,(null==a?void 0:a.length)>=+this.maxCharacterLimit){const i=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===a.toLowerCase()}));i?(await(null===(o=this.menuContent)||void 0===o?void 0:o.hide()),(null==i?void 0:i.hideComment)||null===(n=this.commentContent)||void 0===n||n.show(),this.onSelectItem(i)):(this.invalid=!0,this.value=t.target.value,await(null===(s=this.menuContent)||void 0===s?void 0:s.show()),this._input.style.color="#ff0000")}else null===(l=this.commentContent)||void 0===l||l.hide(),null===(r=this.menuContent)||void 0===r||r.hide(),this.value=null,this._input.style.color="#000000",this.invalid=!1;this.change.emit()}onClickSave(){var t;null===(t=this.commentContent)||void 0===t||t.hide(),this.data=this.data.map((t=>Object.assign(Object.assign({},t),t.key===this.value.key&&{lateMin:this.value.lateMin,comment:this.value.comment}))),e(this.el),this.onChangeDropdown.emit(this.value),this.change.emit()}async onClick(t){var i,e;(null==t?void 0:t.hideComment)||null===(i=this.commentContent)||void 0===i||i.show(),await(null===(e=this.menuContent)||void 0===e?void 0:e.hide()),this.onSelectItem(t)}render(){var t,i,e,s,r;const{size:a,label:p,placeholder:c,required:m,disabled:w,readonly:v,_id:x,invalid:g,hideComment:f,noCaption:b,customErrorMessage:y,caption:z,captionType:j,captionError:k,hideCaption:C}=this,{base:I,inputArea:E,input:L,button:O,menu:M,menuItem:$,commentArea:A,disabledItem:D,content:B,selectedItem:S}=h({size:a,invalid:g,hideComment:f,disabled:w});return o(n,{class:I()},p&&o("bcm-label",{htmlFor:x+"-dropdown-input",size:a,value:p,required:m}),o("div",{class:B()},o("div",{class:E()},o("input",{id:x+"-dropdown-input",class:L(),style:{color:null===(t=this.value)||void 0===t?void 0:t.color},type:"text",tabIndex:-1,placeholder:c,value:null===(i=this.value)||void 0===i?void 0:i.key,disabled:w,required:m,autoComplete:"off",readOnly:v,onKeyPress:t=>this.handleKeyPress(t),onInput:t=>this.handleInput(t),ref:t=>this._input=t}),o("button",{disabled:w,id:`i-dropdown-button-${x}`,class:O(),onClick:()=>this.isOpenMenu=!0},o("i",{class:"fas fa-chevron-down"})),o("bcm-linked",{"onBcm-open":({detail:t})=>{var i;return t&&(null===(i=this.commentContent)||void 0===i?void 0:i.hide())},class:"tw-mt-1",id:`i-dropdown-menu-${x}`,"target-id":`i-dropdown-button-${x}`,placement:"bottom-start"},o((()=>{var t;return o(l,null,this.isOpenMenu?o("div",{class:M()},this.invalid&&o("li",{class:$()+" tw-bg-red-100 hover:tw-bg-red-100"},o("span",{class:"tw-text-red-900"},o("i",{class:"far fa-exclamation-circle"})),o("span",null,"There is not mark you entered, please use")),null===(t=this.data)||void 0===t?void 0:t.map((t=>o(l,null,o("li",(null==t?void 0:t.disabled)?{class:D()}:{class:(null==t?void 0:t.selected)?S():$(),onClick:()=>this.onClick(t)},o("span",null,t.key)," - ",o("span",null,t.value)))))):null)}),null)),o("bcm-linked",{id:`i-dropdown-comment-${x}`,"target-id":x,trigger:"custom",placement:"left"},o((()=>{var t,i,e;return o(l,null,this.isOpenMenu?o("div",{class:A()},this.isLate?o(l,null,o("bcm-input",{label:"Minus Late",required:!0,id:this._id+"-input-dropdown-late-content-input",type:"number","full-width":!0,autocomplete:!1,min:0,max:200,value:null===(t=this.value)||void 0===t?void 0:t.lateMin,placeholder:"Enter Minus Late",customErrorMessage:"Max limit 200 mins","onBcm-change":({detail:t})=>this.value.lateMin=+t},o("i",{slot:"prefix",class:"far fa-clock"}))):null,o("bcm-textarea",{"full-width":!0,value:null!==(e=null===(i=this.value)||void 0===i?void 0:i.comment)&&void 0!==e?e:"","onBcm-change":({detail:t})=>this.value.comment=t,label:"Description","no-caption":!0,rows:4}),o("footer",{class:"tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end tw-gap-2"},o("bcm-button",{icon:"fas fa-times",kind:"ghost","icon-position":"prefix",onClick:()=>{var t;return null===(t=this.commentContent)||void 0===t?void 0:t.hide()}},"Close"),o("bcm-button",{icon:"fas fa-save","icon-position":"prefix",onClick:()=>this.onClickSave()},"Save"))):null)}),null))),this.hideComment?null:o("span",{onClick:()=>{var t,i;(null===(t=this.value)||void 0===t?void 0:t.key)&&(this.isOpenMenu=!0,null===(i=this.commentContent)||void 0===i||i.show())},class:u((null===(e=this.value)||void 0===e?void 0:e.comment)||(null===(s=this.value)||void 0===s?void 0:s.lateMin)>0?"tw-text-slate-600":"tw-text-slate-400",{"tw-cursor-pointer":null===(r=this.value)||void 0===r?void 0:r.key})},o("i",{class:"fas fa-comment"}))),!C&&o(d,{noCaption:b,captionType:j,captionError:k,caption:z,customErrorMessage:y}))}get el(){return s(this)}static get watchers(){return{defaultValue:["watchDefaultValueHandler"]}}};c.style='@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-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}:host{display:flex;flex-direction:column;width:100%;position:relative}.input-dropdown-button i{transition:transform 0.2s ease-in-out}.input-dropdown-button[linked-is-open]>i{transform:rotate(-180deg);transition:transform 0.2s ease-in-out}';export{c as bcm_input_dropdown}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import{r as t,c as e,h as o,H as n,g as i}from"./p-e037ee2b.js";import"./p-4798d827.js";import"./p-626a65e9.js";import{G as s}from"./p-c926e138.js";import"./p-6bea3bea.js";import"./p-94554e42.js";import"./p-ba2ddaf6.js";import"./p-5ae0a59b.js";import{a}from"./p-6369b73b.js";import{c as l}from"./p-bed627ab.js";import{c as r}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-034bbcdd.js";import"./p-e45c1546.js";import"./p-4a540b56.js";const d=r({slots:{host:["tw-flex tw-flex-row tw-items-center tw-justify-center tw-w-full tw-max-w-48 tw-gap-2","bcm-ui-element bcm-attendance-actions"],base:"",buttonContainer:"tw-flex tw-flex-row tw-items-center tw-justify-center tw-w-full tw-max-w-[168px]",button:["","tw-button-reset","tw-flex-1 last:tw-flex-none","tw-bg-[--bcm-attendance-actions-button-bg]","tw-text-[--bcm-attendance-actions-button-text]","tw-border tw-border-solid tw-border-[--bcm-attendance-actions-button-border]","hover:tw-bg-[--bcm-attendance-actions-button-hover-bg]","active:tw-bg-[--bcm-attendance-actions-button-active-bg]","focus-visible:tw-ring-2 focus-visible:tw-ring-offset-2 focus-visible:tw-z-10","tw-flex tw-flex-row tw-items-center tw-justify-center","first:tw-rounded-l last:tw-rounded-r","tw-font-medium","-tw-ml-[1px] first:tw-ml-0"],dropdownButton:"",mainButton:"",commentIcon:""},variants:{selected:{true:{button:["tw-text-white tw-border-transparent last:tw-ml-[1px]","first:tw-justify-start"],mainButton:["tw-min-w-[calc(theme(spacing.12)-1px)]"]},false:{button:[""]}},size:{small:{button:["tw-text-2","tw-min-h-6","tw-gap-2"],mainButton:["tw-px-3"],dropdownButton:["tw-px-2.5"]},medium:{button:["tw-text-3","tw-min-h-8","tw-gap-2"],mainButton:["tw-px-3"],dropdownButton:["tw-px-2.5"]},large:{button:["tw-text-4","tw-min-h-10","tw-gap-2.5"],mainButton:["tw-px-3"],dropdownButton:["tw-px-3"]}},disabled:{true:{},false:{}}},compoundVariants:[{disabled:!0,class:{buttonContainer:["tw-cursor-not-allowed tw-pointer-events-none"],button:["tw-cursor-not-allowed","tw-bg-[--bcm-attendance-actions-button-disabled-bg]","tw-text-[--bcm-attendance-actions-button-disabled-text]","tw-border-transparent","hover:tw-bg-[--bcm-attendance-actions-button-disabled-bg]"],mainButton:["tw-bg-[--bcm-attendance-actions-button-disabled-bg]","tw-text-[--bcm-attendance-actions-button-disabled-text]","tw-border-transparent","hover:tw-bg-[--bcm-attendance-actions-button-disabled-bg]","tw-cursor-not-allowed"],host:["tw-cursor-not-allowed"],commentIcon:["tw-cursor-not-allowed tw-pointer-events-none"]}},{disabled:!1,class:{button:["tw-cursor-pointer"]}}],defaultVariants:{selected:!1,size:"medium",disabled:!1}}),c=class{constructor(o){t(this,o),this.change=e(this,"bcm-attendance-change",3),this._id=s.UID(),this.size=a.Size.medium,this.disabled=!1,this.data=[{key:"P",value:"Present",color:"emerald",icon:"fa-solid fa-check",priority:0},{key:"A",value:"Absent",color:"red",icon:"fa-solid fa-times",priority:1},{key:"L",value:"Late",color:"amber",icon:"fa-solid fa-clock",priority:2},{key:"C",value:"Other Authorised Circumstance",color:"blue",icon:"fa-solid fa-question"},{key:"E",value:"Exlude",color:"blue",icon:"fa-solid fa-minus"},{key:"G",value:"Family Holiday",color:"blue",icon:"fa-solid fa-minus"},{key:"H",value:"Family Holiday (Agreed)",color:"blue",icon:"fa-solid fa-minus"},{key:"I",value:"Illness",color:"blue",icon:"fa-solid fa-minus"},{key:"J",value:"Intervier",color:"blue",icon:"fa-solid fa-minus"},{key:"M",value:"Medical / Dental",color:"blue",icon:"fa-solid fa-minus"},{key:"N",value:"No Reason yet PRovided",color:"blue",icon:"fa-solid fa-minus"},{key:"O",value:"Unauthrised Absence",color:"blue",icon:"fa-solid fa-minus"},{key:"U",value:"Late after Reg. Closed",color:"blue",icon:"fa-solid fa-minus"},{key:"X",value:"Non-comp School Age Absence",color:"blue",icon:"fa-solid fa-minus"}],this.lateKeys="L",this.hideComment=!1}get selectedItem(){return this.data.find((t=>t.selected))}get priorityButtons(){return this.data.filter((t=>void 0!==t.priority)).sort(((t,e)=>t.priority-e.priority))}get renderButtons(){const{selectedItem:t,priorityButtons:e}=this;return[...t?[t]:e.length?e:this.data.slice(0,3)]}get lateKeysMap(){return this.lateKeys.toLocaleLowerCase().split(",")}get isLate(){var t,e;return this.lateKeysMap.includes(null===(e=null===(t=this.selectedItem)||void 0===t?void 0:t.key)||void 0===e?void 0:e.toLocaleLowerCase())}get dropdownMenuElement(){return document.getElementById("attendance-dropdown-"+this._id)}get commentAreaElement(){return document.getElementById("comment-"+this._id)}handleSelectItem(t,e=!0,o=!0){var n,i;if(this.data=[...this.data.map((e=>{var o,n;return Object.assign(Object.assign({},e),{selected:(null===(o=t.key)||void 0===o?void 0:o.toLocaleLowerCase())===(null===(n=e.key)||void 0===n?void 0:n.toLocaleLowerCase())})}))],null===(n=this.dropdownMenuElement)||void 0===n||n.hide(),null===(i=this.commentAreaElement)||void 0===i||i.hide(),!this.isLate)return e&&this.changed();!this.hideComment&&o&&this.commentArea()}changed(){this.change.emit(this.selectedItem)}hasDataForKey(t){return!!this.data.find((e=>e.key.toLocaleLowerCase()===t.toLocaleLowerCase()))}handleKeyPress({key:t}){if(!this.hasDataForKey(t))return;const e=this.data.find((e=>{var o;return(null===(o=e.key)||void 0===o?void 0:o.toLocaleLowerCase())===(null==t?void 0:t.toLocaleLowerCase())}));this.handleSelectItem(e)}handleSave(t,e){this.data=[...this.data].map((o=>{var n,i,s;return(null===(n=o.key)||void 0===n?void 0:n.toLocaleLowerCase())===(null===(s=null===(i=this.selectedItem)||void 0===i?void 0:i.key)||void 0===s?void 0:s.toLocaleLowerCase())?Object.assign(Object.assign({},o),{lateMin:t,comment:e}):o})),this.changed()}dropdownMenu(){var t;const e=s.createComponent("bcm-attendance-actions-dropdown",{id:"attendance-dropdown-"+this._id,size:this.size,data:this.data,selectedKey:null===(t=this.selectedItem)||void 0===t?void 0:t.key,targetId:"attendance-dropdown-button-"+this._id});e.addEventListener("bcm-attendance-actions-dropdown-change",(({detail:t})=>{this.handleSelectItem(t)})),e.show()}commentArea(){var t,e;const o=s.createComponent("bcm-attendance-actions-comment",{id:"comment-"+this._id,size:this.size,isLate:this.isLate,targetId:"comment-area-"+this._id,selectedItem:this.selectedItem,lateMinutes:null===(t=this.selectedItem)||void 0===t?void 0:t.lateMin,comment:null===(e=this.selectedItem)||void 0===e?void 0:e.comment});o.addEventListener("bcm-attendance-actions-comment-change",(({detail:t})=>{this.handleSave(t.lateMinutes,t.comment)})),o.show()}async set(t,e=!0){if(!this.hasDataForKey(t))return;const o=this.data.find((e=>{var o;return(null===(o=e.key)||void 0===o?void 0:o.toLocaleLowerCase())===(null==t?void 0:t.toLocaleLowerCase())}));this.handleSelectItem(o,e,!1)}async get(){return this.selectedItem}render(){var t,e,i;const{selectedItem:a,renderButtons:r,disabled:c,hideComment:u,size:b}=this,{host:m,buttonContainer:w,button:h,dropdownButton:v,commentIcon:p,mainButton:f}=d({selected:!!a,size:b,disabled:c}),g=a?s.getTwColor({color:null!==(t=a.color)&&void 0!==t?t:"blue",tones:{600:["bg"],700:["hover-bg"],800:["active-bg"]},variable:"--bcm-attendance-actions-button"}):{},y={class:l(h(),f()),style:Object.assign({},g),disabled:c,type:"button"},x=Object.assign(Object.assign({},y),{class:l(h(),v())}),j=!u&&!!a,k=(null==a?void 0:a.comment)||(null==a?void 0:a.lateMin)?`${(null==a?void 0:a.comment)||""}${(null==a?void 0:a.lateMin)?` (${null==a?void 0:a.lateMin} min) `:""}`:"";return o(n,{class:m(),onKeyPress:this.handleKeyPress.bind(this)},o("div",{class:w()},null==r?void 0:r.map((t=>o("button",Object.assign({},y,{onClick:()=>this.handleSelectItem(t),title:t.value}),o("i",{class:l(t.icon||"fa-solid fa-minus","!tw-leading-[inherit]")}),t.selected&&o("span",{class:"tw-truncate"},t.value)))),o("button",Object.assign({id:"attendance-dropdown-button-"+this._id},x,{onClick:()=>this.dropdownMenu(),title:"More"}),o("i",{class:l("fa-solid fa-angle-down !tw-leading-[inherit]")}))),o("div",{id:"comment-area-"+this._id,class:l(p(),{"tw-cursor-default":!j,"tw-cursor-pointer":j}),onClick:()=>j&&this.commentArea()},o("i",{title:j?k:"",class:l("fa-solid fa-comment",{"tw-text-gray-400":!((null===(e=this.selectedItem)||void 0===e?void 0:e.comment)||(null===(i=this.selectedItem)||void 0===i?void 0:i.lateMin)),"tw-visible":j,"tw-invisible":!j})})))}get el(){return i(this)}};c.style="";export{c as bcm_attendance_actions}
@@ -1,330 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- 'use strict';
6
-
7
- Object.defineProperty(exports, '__esModule', { value: true });
8
-
9
- const index$1 = require('./index-c591ecec.js');
10
- require('./color-helper-c3a819ea.js');
11
- require('./datetime-helper-eaf4fadb.js');
12
- const generate = require('./generate-183405cb.js');
13
- require('./number-helper-ca52fadf.js');
14
- require('./string-helper-3212f4ea.js');
15
- require('./validators-a31b53a5.js');
16
- require('./element-dragger-a8562f82.js');
17
- const bcm = require('./bcm-3c58a6d5.js');
18
- const index$2 = require('./index-95ae50d0.js');
19
- const index = require('./index-5279dea2.js');
20
- require('./colors-56282b00.js');
21
- require('./utils-fc077139.js');
22
- require('./colors-078851ec.js');
23
- require('./_commonjsHelpers-ed84c3ca.js');
24
- require('./package-4c68d5f8.js');
25
-
26
- // --bcm-attendance-actions-button-bg: #F1F5F9; /* slate-100 */
27
- // --bcm-attendance-actions-button-text: #334155; /* slate-700 */
28
- // --bcm-attendance-actions-button-border: #CBD5E1; /* slate-300 */
29
- // --bcm-attendance-actions-button-hover-bg: #E2E8F0; /* slate-200 */
30
- // --bcm-attendance-actions-button-active-bg: #CBD5E1; /* slate-300 */
31
- // --bcm-attendance-actions-button-disabled-bg: #CBD5E1; /* slate-300 */
32
- // --bcm-attendance-actions-button-disabled-text: #64748B; /* slate-500 */
33
- const attendanceActionStyle = index.ce({
34
- slots: {
35
- host: ["tw-flex tw-flex-row tw-items-center tw-justify-center tw-w-full tw-max-w-48 tw-gap-2", "bcm-ui-element bcm-attendance-actions"],
36
- base: "",
37
- buttonContainer: "tw-flex tw-flex-row tw-items-center tw-justify-center tw-w-full tw-max-w-[168px]",
38
- button: [
39
- "",
40
- "tw-button-reset",
41
- "tw-flex-1 last:tw-flex-none",
42
- "tw-bg-[--bcm-attendance-actions-button-bg]",
43
- "tw-text-[--bcm-attendance-actions-button-text]",
44
- "tw-border tw-border-solid tw-border-[--bcm-attendance-actions-button-border]",
45
- "hover:tw-bg-[--bcm-attendance-actions-button-hover-bg]",
46
- "active:tw-bg-[--bcm-attendance-actions-button-active-bg]",
47
- "focus-visible:tw-ring-2 focus-visible:tw-ring-offset-2 focus-visible:tw-z-10",
48
- "tw-flex tw-flex-row tw-items-center tw-justify-center",
49
- "first:tw-rounded-l last:tw-rounded-r",
50
- "tw-font-medium",
51
- "-tw-ml-[1px] first:tw-ml-0",
52
- ],
53
- dropdownButton: "",
54
- mainButton: "",
55
- commentIcon: "",
56
- },
57
- variants: {
58
- selected: {
59
- true: {
60
- button: [
61
- "tw-text-white tw-border-transparent last:tw-ml-[1px]",
62
- "first:tw-justify-start",
63
- ],
64
- mainButton: [
65
- "tw-min-w-[calc(theme(spacing.12)-1px)]"
66
- ],
67
- },
68
- false: {
69
- button: [
70
- ""
71
- ],
72
- },
73
- },
74
- size: {
75
- small: {
76
- button: [
77
- "tw-text-2",
78
- "tw-min-h-6",
79
- "tw-gap-2",
80
- ],
81
- mainButton: [
82
- "tw-px-3",
83
- ],
84
- dropdownButton: [
85
- "tw-px-2.5"
86
- ],
87
- },
88
- medium: {
89
- button: [
90
- "tw-text-3",
91
- "tw-min-h-8",
92
- "tw-gap-2",
93
- ],
94
- mainButton: [
95
- "tw-px-3",
96
- ],
97
- dropdownButton: [
98
- "tw-px-2.5"
99
- ],
100
- },
101
- large: {
102
- button: [
103
- "tw-text-4",
104
- "tw-min-h-10",
105
- "tw-gap-2.5",
106
- ],
107
- mainButton: [
108
- "tw-px-3",
109
- ],
110
- dropdownButton: [
111
- "tw-px-3"
112
- ],
113
- },
114
- },
115
- disabled: {
116
- true: {},
117
- false: {}
118
- }
119
- },
120
- compoundVariants: [
121
- {
122
- disabled: true,
123
- class: {
124
- buttonContainer: [
125
- "tw-cursor-not-allowed tw-pointer-events-none",
126
- ],
127
- button: [
128
- "tw-cursor-not-allowed",
129
- "tw-bg-[--bcm-attendance-actions-button-disabled-bg]",
130
- "tw-text-[--bcm-attendance-actions-button-disabled-text]",
131
- "tw-border-transparent",
132
- "hover:tw-bg-[--bcm-attendance-actions-button-disabled-bg]",
133
- ],
134
- mainButton: [
135
- "tw-bg-[--bcm-attendance-actions-button-disabled-bg]",
136
- "tw-text-[--bcm-attendance-actions-button-disabled-text]",
137
- "tw-border-transparent",
138
- "hover:tw-bg-[--bcm-attendance-actions-button-disabled-bg]",
139
- "tw-cursor-not-allowed",
140
- ],
141
- host: [
142
- "tw-cursor-not-allowed",
143
- ],
144
- commentIcon: [
145
- "tw-cursor-not-allowed tw-pointer-events-none",
146
- ],
147
- }
148
- },
149
- {
150
- disabled: false,
151
- class: {
152
- button: [
153
- "tw-cursor-pointer",
154
- ],
155
- }
156
- }
157
- ],
158
- defaultVariants: {
159
- selected: false,
160
- size: "medium",
161
- disabled: false,
162
- },
163
- });
164
-
165
- const attendanceActionsCss = "";
166
-
167
- const BcmAttendanceActions = class {
168
- constructor(hostRef) {
169
- index$1.registerInstance(this, hostRef);
170
- this.change = index$1.createEvent(this, "bcm-attendance-change", 3);
171
- this._id = generate.Generate.UID();
172
- this.size = bcm.Bcm$1.Size.medium;
173
- this.disabled = false;
174
- this.data = [
175
- { key: "P", value: "Present", color: "emerald", icon: "fa-solid fa-check", priority: 0 },
176
- { key: "A", value: "Absent", color: "red", icon: "fa-solid fa-times", priority: 1 },
177
- { key: "L", value: "Late", color: "amber", icon: "fa-solid fa-clock", priority: 2 },
178
- { key: "C", value: "Other Authorised Circumstance", color: "blue", icon: "fa-solid fa-question" },
179
- { key: "E", value: "Exlude", color: "blue", icon: "fa-solid fa-minus" },
180
- { key: "G", value: "Family Holiday", color: "blue", icon: "fa-solid fa-minus" },
181
- { key: "H", value: "Family Holiday (Agreed)", color: "blue", icon: "fa-solid fa-minus" },
182
- { key: "I", value: "Illness", color: "blue", icon: "fa-solid fa-minus" },
183
- { key: "J", value: "Intervier", color: "blue", icon: "fa-solid fa-minus" },
184
- { key: "M", value: "Medical / Dental", color: "blue", icon: "fa-solid fa-minus" },
185
- { key: "N", value: "No Reason yet PRovided", color: "blue", icon: "fa-solid fa-minus" },
186
- { key: "O", value: "Unauthrised Absence", color: "blue", icon: "fa-solid fa-minus" },
187
- { key: "U", value: "Late after Reg. Closed", color: "blue", icon: "fa-solid fa-minus" },
188
- { key: "X", value: "Non-comp School Age Absence", color: "blue", icon: "fa-solid fa-minus" },
189
- ];
190
- this.lateKeys = "L";
191
- this.hideComment = false;
192
- }
193
- get selectedItem() {
194
- return this.data.find(item => item.selected);
195
- }
196
- get priorityButtons() {
197
- return this.data.filter(item => item.priority !== undefined).sort((a, b) => a.priority - b.priority);
198
- }
199
- get renderButtons() {
200
- const { selectedItem, priorityButtons } = this;
201
- return [...(selectedItem ? [selectedItem] : priorityButtons.length ? priorityButtons : this.data.slice(0, 3))];
202
- }
203
- get lateKeysMap() {
204
- return this.lateKeys.toLocaleLowerCase().split(",");
205
- }
206
- get isLate() {
207
- var _a, _b;
208
- return this.lateKeysMap.includes((_b = (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase());
209
- }
210
- get dropdownMenuElement() {
211
- return document.getElementById("attendance-dropdown-" + this._id);
212
- }
213
- get commentAreaElement() {
214
- return document.getElementById("comment-" + this._id);
215
- }
216
- handleSelectItem(item, triggerChange = true, showComment = true) {
217
- var _a, _b;
218
- this.data = [...this.data.map(data => { var _a, _b; return (Object.assign(Object.assign({}, data), { selected: ((_a = item.key) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === ((_b = data.key) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) })); })];
219
- (_a = this.dropdownMenuElement) === null || _a === void 0 ? void 0 : _a.hide();
220
- (_b = this.commentAreaElement) === null || _b === void 0 ? void 0 : _b.hide();
221
- if (!this.isLate)
222
- return triggerChange && this.changed();
223
- !this.hideComment && showComment && this.commentArea();
224
- }
225
- changed() {
226
- this.change.emit(this.selectedItem);
227
- }
228
- hasDataForKey(key) {
229
- return !!this.data.find(item => item.key.toLocaleLowerCase() === key.toLocaleLowerCase());
230
- }
231
- handleKeyPress({ key }) {
232
- if (!this.hasDataForKey(key))
233
- return;
234
- const item = this.data.find(item => { var _a; return ((_a = item.key) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === (key === null || key === void 0 ? void 0 : key.toLocaleLowerCase()); });
235
- this.handleSelectItem(item);
236
- }
237
- handleSave(lateMinutes, comment) {
238
- this.data = [...this.data].map(item => {
239
- var _a, _b, _c;
240
- if (((_a = item.key) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === ((_c = (_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.toLocaleLowerCase())) {
241
- return Object.assign(Object.assign({}, item), { lateMin: lateMinutes, comment });
242
- }
243
- return item;
244
- });
245
- this.changed();
246
- }
247
- dropdownMenu() {
248
- var _a;
249
- const dropdownMenu = generate.Generate.createComponent("bcm-attendance-actions-dropdown", {
250
- id: "attendance-dropdown-" + this._id,
251
- size: this.size,
252
- data: this.data,
253
- selectedKey: (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.key,
254
- targetId: "attendance-dropdown-button-" + this._id,
255
- });
256
- dropdownMenu.addEventListener("bcm-attendance-actions-dropdown-change", ({ detail }) => {
257
- this.handleSelectItem(detail);
258
- });
259
- dropdownMenu.show();
260
- }
261
- commentArea() {
262
- var _a, _b;
263
- const commentArea = generate.Generate.createComponent("bcm-attendance-actions-comment", {
264
- id: "comment-" + this._id,
265
- size: this.size,
266
- isLate: this.isLate,
267
- targetId: "comment-area-" + this._id,
268
- selectedItem: this.selectedItem,
269
- lateMinutes: (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.lateMin,
270
- comment: (_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.comment,
271
- });
272
- commentArea.addEventListener("bcm-attendance-actions-comment-change", ({ detail }) => {
273
- this.handleSave(detail.lateMinutes, detail.comment);
274
- });
275
- commentArea.show();
276
- }
277
- async set(key, triggerChange = true) {
278
- if (!this.hasDataForKey(key))
279
- return;
280
- const item = this.data.find(item => { var _a; return ((_a = item.key) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === (key === null || key === void 0 ? void 0 : key.toLocaleLowerCase()); });
281
- this.handleSelectItem(item, triggerChange, false);
282
- }
283
- async get() {
284
- return this.selectedItem;
285
- }
286
- render() {
287
- var _a, _b, _c;
288
- const { selectedItem, renderButtons, disabled, hideComment, size } = this;
289
- const { host, buttonContainer, button, dropdownButton, commentIcon, mainButton } = attendanceActionStyle({
290
- selected: !!selectedItem,
291
- size,
292
- disabled,
293
- });
294
- const buttonStyle = !!selectedItem
295
- ? generate.Generate.getTwColor({
296
- color: (_a = selectedItem.color) !== null && _a !== void 0 ? _a : "blue",
297
- tones: {
298
- 600: ["bg"],
299
- 700: ["hover-bg"],
300
- 800: ["active-bg"],
301
- },
302
- variable: "--bcm-attendance-actions-button",
303
- })
304
- : {};
305
- const buttonAttributes = {
306
- class: index$2.classnames(button(), mainButton()),
307
- style: Object.assign({}, buttonStyle),
308
- disabled,
309
- type: "button",
310
- };
311
- const iconButtonAttributes = Object.assign(Object.assign({}, buttonAttributes), { class: index$2.classnames(button(), dropdownButton()) });
312
- const isShowCommentIcon = !hideComment && !!selectedItem;
313
- const commentTooltip = (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.comment) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.lateMin) ? `${(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.comment) || ""}${(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.lateMin) ? ` (${selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.lateMin} min) ` : ""}` : "";
314
- return (index$1.h(index$1.Host, { class: host(), onKeyPress: this.handleKeyPress.bind(this) }, index$1.h("div", { class: buttonContainer() }, renderButtons === null || renderButtons === void 0 ? void 0 :
315
- renderButtons.map(item => {
316
- return (index$1.h("button", Object.assign({}, buttonAttributes, { onClick: () => this.handleSelectItem(item), title: item.value }), index$1.h("i", { class: index$2.classnames(item.icon || "fa-solid fa-minus", "!tw-leading-[inherit]") }), item.selected && index$1.h("span", { class: "tw-truncate" }, item.value)));
317
- }), index$1.h("button", Object.assign({ id: "attendance-dropdown-button-" + this._id }, iconButtonAttributes, { onClick: () => this.dropdownMenu(), title: "More" }), index$1.h("i", { class: index$2.classnames("fa-solid fa-angle-down !tw-leading-[inherit]") }))), index$1.h("div", { id: "comment-area-" + this._id, class: index$2.classnames(commentIcon(), {
318
- "tw-cursor-default": !isShowCommentIcon,
319
- "tw-cursor-pointer": isShowCommentIcon,
320
- }), onClick: () => isShowCommentIcon && this.commentArea() }, index$1.h("i", { title: isShowCommentIcon ? commentTooltip : "", class: index$2.classnames("fa-solid fa-comment", {
321
- "tw-text-gray-400": !(((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.comment) || ((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.lateMin)),
322
- "tw-visible": isShowCommentIcon,
323
- "tw-invisible": !isShowCommentIcon,
324
- }) }))));
325
- }
326
- get el() { return index$1.getElement(this); }
327
- };
328
- BcmAttendanceActions.style = attendanceActionsCss;
329
-
330
- exports.bcm_attendance_actions = BcmAttendanceActions;