bromcom-ui 2.10.1-rc.1 → 2.10.1-rc.11

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 (278) 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-000670b6.js +5 -0
  4. package/dist/bromcom-ui/p-01c19c5a.entry.js +5 -0
  5. package/dist/bromcom-ui/{p-09699c4d.entry.js → p-0985e7ba.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-3756f541.entry.js → p-10e70228.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-16848643.entry.js → p-13c47eea.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-140b6ce0.js +5 -0
  9. package/dist/bromcom-ui/{p-1708a5ec.entry.js → p-18020ef7.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-7f09901d.entry.js → p-1b9bffba.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-3f39982f.entry.js → p-30bfe3bd.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-571dca86.entry.js → p-372ffe04.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-551058cd.entry.js → p-3c87fd88.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-4597ee14.entry.js +5 -0
  15. package/dist/bromcom-ui/p-47682d2b.entry.js +21 -0
  16. package/dist/bromcom-ui/p-4bace961.entry.js +5 -0
  17. package/dist/bromcom-ui/{p-0973538a.entry.js → p-5f419e20.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-6132700e.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-9a41b688.js → p-62840867.js} +1 -1
  20. package/dist/bromcom-ui/p-629bcf93.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-77eb2287.entry.js → p-6a02ed0b.entry.js} +1 -1
  22. package/dist/bromcom-ui/p-6bfed79a.entry.js +5 -0
  23. package/dist/bromcom-ui/{p-55291cc5.entry.js → p-6d83c8f6.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-6de1c6ea.entry.js +5 -0
  25. package/dist/bromcom-ui/p-71cbd6f6.entry.js +5 -0
  26. package/dist/bromcom-ui/{p-56f7477e.entry.js → p-73d4bd1c.entry.js} +1 -1
  27. package/dist/bromcom-ui/p-7ada3462.entry.js +5 -0
  28. package/dist/bromcom-ui/p-7c0a3a3d.js +5 -0
  29. package/dist/bromcom-ui/{p-dac3117a.entry.js → p-7d1dd1b9.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-673f7ee8.entry.js → p-82331114.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-8301a465.entry.js +5 -0
  32. package/dist/bromcom-ui/p-85565afb.js +5 -0
  33. package/dist/bromcom-ui/{p-5ca4aa84.entry.js → p-88c38780.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-8dc361a8.js +5 -0
  35. package/dist/bromcom-ui/{p-015d19dd.entry.js → p-90510968.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-e131b27f.js → p-92d1a4c9.js} +1 -1
  37. package/dist/bromcom-ui/{p-cf171578.js → p-9398df85.js} +1 -1
  38. package/dist/bromcom-ui/{p-a04aab3c.entry.js → p-9ec71162.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-0325e8a4.entry.js → p-9f954c08.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-9fbc30a6.entry.js +5 -0
  41. package/dist/bromcom-ui/{p-f3431dc8.js → p-a40d4f27.js} +1 -1
  42. package/dist/bromcom-ui/p-a8d23b66.entry.js +5 -0
  43. package/dist/bromcom-ui/p-a953375b.entry.js +5 -0
  44. package/dist/bromcom-ui/p-a95b18f2.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-24710a65.entry.js → p-a9c8b43c.entry.js} +1 -1
  46. package/dist/bromcom-ui/p-abc44b58.entry.js +5 -0
  47. package/dist/bromcom-ui/p-baf565be.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-e38c4c3a.entry.js → p-bffc5f8c.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-39a40a6e.entry.js → p-c80014e3.entry.js} +1 -1
  50. package/dist/bromcom-ui/p-c852c8fe.entry.js +5 -0
  51. package/dist/bromcom-ui/{p-cf0c0700.entry.js → p-ca788dc4.entry.js} +1 -1
  52. package/dist/bromcom-ui/p-ca8a4fc8.entry.js +5 -0
  53. package/dist/bromcom-ui/p-cc6c6f9e.entry.js +5 -0
  54. package/dist/bromcom-ui/p-d283e83e.entry.js +5 -0
  55. package/dist/bromcom-ui/p-dbad3126.entry.js +5 -0
  56. package/dist/bromcom-ui/{p-c1b167a3.js → p-de2272c5.js} +1 -1
  57. package/dist/bromcom-ui/{p-3b41df22.entry.js → p-df444847.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-ee4845ac.entry.js +5 -0
  59. package/dist/bromcom-ui/{p-e11ab4ed.entry.js → p-ef829d33.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-646cf63c.entry.js → p-f24b096b.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-d7538ba4.entry.js → p-f372306f.entry.js} +1 -1
  62. package/dist/bromcom-ui/p-f818d2a9.entry.js +5 -0
  63. package/dist/bromcom-ui/{p-14c32a34.entry.js → p-f93bf6db.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-f1dbd96d.entry.js → p-fc18af27.entry.js} +1 -1
  65. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  66. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  67. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  68. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -5
  69. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  70. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  71. package/dist/cjs/{bcm-button_10.cjs.entry.js → bcm-button_18.cjs.entry.js} +8309 -1414
  72. package/dist/cjs/bcm-caption.cjs.entry.js +5 -6
  73. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  74. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  76. package/dist/cjs/bcm-chip-group.cjs.entry.js +5 -6
  77. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  79. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -5
  80. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -5
  82. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  83. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  84. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  86. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -7
  87. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  88. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  89. package/dist/cjs/bcm-menu.cjs.entry.js +5 -6
  90. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -5
  91. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -5
  92. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -5
  93. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  94. package/dist/cjs/bcm-number-input.cjs.entry.js +108 -0
  95. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  96. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
  97. package/dist/cjs/bcm-popover.cjs.entry.js +4 -5
  98. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  99. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -5
  100. package/dist/cjs/bcm-radio.cjs.entry.js +4 -5
  101. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  102. package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -5
  103. package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -5
  104. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -6
  106. package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -5
  107. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -5
  108. package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -5
  109. package/dist/cjs/bcm-table.cjs.entry.js +4 -5
  110. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  111. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  112. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  113. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  114. package/dist/cjs/bcm-typography.cjs.entry.js +21 -0
  115. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  116. package/dist/cjs/{generate-e79347af.js → generate-8f2a5b22.js} +15 -1
  117. package/dist/cjs/{global-9bb1902a.js → global-6e3108be.js} +1 -1
  118. package/dist/cjs/{input-template-3d21aacb.js → input-template-866a71d3.js} +1 -1
  119. package/dist/cjs/{json-parse-decarator-4d7afa63.js → json-parse-decarator-f30bb239.js} +1 -1
  120. package/dist/cjs/{label-template-8dc10d0a.js → label-template-a6f51ef2.js} +6 -3
  121. package/dist/cjs/loader.cjs.js +3 -3
  122. package/dist/cjs/{number-helper-2f971fd8.js → number-helper-57ea679e.js} +1 -1
  123. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  124. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  125. package/dist/cjs/{package-47b7b998.js → package-9f43976f.js} +1 -1
  126. package/dist/cjs/{stepper-states-a5699b31.js → stepper-states-1199c518.js} +1 -1
  127. package/dist/cjs/{tooltip-helper-7d5d1cb5.js → tooltip-helper-f55fc832.js} +3 -4
  128. package/dist/cjs/{validators-507307b9.js → validators-463a67ba.js} +6 -1
  129. package/dist/collection/collection-manifest.json +1 -0
  130. package/dist/collection/components/atoms/label/label.js +1 -1
  131. package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +1 -1
  132. package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +1 -1
  133. package/dist/collection/components/molecules/number-input/number-input.css +137 -0
  134. package/dist/collection/components/molecules/number-input/number-input.js +425 -0
  135. package/dist/collection/components/molecules/number-input/number-input.style.js +45 -0
  136. package/dist/collection/components/molecules/switch/switch.css +1 -0
  137. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +47 -0
  138. package/dist/collection/components/organism/list/list.css +2 -0
  139. package/dist/collection/components/organism/list/list.js +38 -9
  140. package/dist/collection/components/other_deprecated/old-input/old-input.css +47 -0
  141. package/dist/collection/helper/generate.js +14 -0
  142. package/dist/collection/templates/label-template.js +6 -6
  143. package/dist/collection/templates/list-item-template.js +3 -2
  144. package/dist/components/bcm-caption.js +2 -2
  145. package/dist/components/bcm-input-dropdown.js +2 -2
  146. package/dist/components/bcm-number-input.d.ts +11 -0
  147. package/dist/components/bcm-number-input.js +157 -0
  148. package/dist/components/bcm-switch.js +1 -1
  149. package/dist/components/datetime-picker.js +1 -1
  150. package/dist/components/generate.js +15 -1
  151. package/dist/components/index.d.ts +1 -0
  152. package/dist/components/index.js +1 -0
  153. package/dist/components/label.js +7 -4
  154. package/dist/components/list.js +19 -10
  155. package/dist/components/old-input.js +1 -1
  156. package/dist/esm/bcm-accordion.entry.js +2 -2
  157. package/dist/esm/bcm-alert.entry.js +2 -2
  158. package/dist/esm/bcm-attendance.entry.js +2 -2
  159. package/dist/esm/bcm-avatar_2.entry.js +4 -5
  160. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  161. package/dist/esm/bcm-button-group.entry.js +2 -2
  162. package/dist/esm/{bcm-button_10.entry.js → bcm-button_18.entry.js} +7872 -985
  163. package/dist/esm/bcm-caption.entry.js +5 -6
  164. package/dist/esm/bcm-card.entry.js +2 -2
  165. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  166. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  167. package/dist/esm/bcm-chip-group.entry.js +5 -6
  168. package/dist/esm/bcm-chip.entry.js +2 -2
  169. package/dist/esm/bcm-collapse.entry.js +2 -2
  170. package/dist/esm/bcm-color-input.entry.js +4 -5
  171. package/dist/esm/bcm-default.entry.js +2 -2
  172. package/dist/esm/bcm-drawer.entry.js +4 -5
  173. package/dist/esm/bcm-dropdown.entry.js +3 -3
  174. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  175. package/dist/esm/bcm-form-2.entry.js +2 -2
  176. package/dist/esm/bcm-input-custom.entry.js +2 -2
  177. package/dist/esm/bcm-input-dropdown.entry.js +6 -7
  178. package/dist/esm/bcm-item.entry.js +2 -2
  179. package/dist/esm/bcm-items.entry.js +2 -2
  180. package/dist/esm/bcm-menu.entry.js +5 -6
  181. package/dist/esm/bcm-modal-2-footer.entry.js +4 -5
  182. package/dist/esm/bcm-modal-2-header.entry.js +4 -5
  183. package/dist/esm/bcm-modal-2.entry.js +4 -5
  184. package/dist/esm/bcm-modal.entry.js +2 -2
  185. package/dist/esm/bcm-number-input.entry.js +104 -0
  186. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  187. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  188. package/dist/esm/bcm-popover.entry.js +4 -5
  189. package/dist/esm/bcm-progress.entry.js +2 -2
  190. package/dist/esm/bcm-radio-group.entry.js +4 -5
  191. package/dist/esm/bcm-radio.entry.js +4 -5
  192. package/dist/esm/bcm-range.entry.js +2 -2
  193. package/dist/esm/bcm-shortcut.entry.js +4 -5
  194. package/dist/esm/bcm-skeleton.entry.js +4 -5
  195. package/dist/esm/bcm-step.entry.js +3 -3
  196. package/dist/esm/bcm-stepper.entry.js +5 -6
  197. package/dist/esm/bcm-tab-group.entry.js +4 -5
  198. package/dist/esm/bcm-tab-item-header.entry.js +4 -5
  199. package/dist/esm/bcm-tab-item.entry.js +4 -5
  200. package/dist/esm/bcm-table.entry.js +4 -5
  201. package/dist/esm/bcm-tag.entry.js +3 -3
  202. package/dist/esm/bcm-textarea.entry.js +3 -3
  203. package/dist/esm/bcm-time-picker.entry.js +2 -2
  204. package/dist/esm/bcm-toast.entry.js +2 -2
  205. package/dist/esm/bcm-typography.entry.js +17 -0
  206. package/dist/esm/bromcom-ui.js +3 -3
  207. package/dist/esm/{generate-b9c6f412.js → generate-c1065765.js} +15 -1
  208. package/dist/esm/{global-114427da.js → global-6365ce83.js} +1 -1
  209. package/dist/esm/{input-template-dc94e47f.js → input-template-74229cd2.js} +1 -1
  210. package/dist/esm/{json-parse-decarator-fca2dc09.js → json-parse-decarator-a301c8b7.js} +1 -1
  211. package/dist/esm/{label-template-989d1700.js → label-template-ad2e8119.js} +6 -3
  212. package/dist/esm/loader.js +3 -3
  213. package/dist/esm/{number-helper-70be3621.js → number-helper-d42f27d5.js} +1 -1
  214. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  215. package/dist/esm/old-bcm-popover.entry.js +2 -2
  216. package/dist/esm/{package-6f4c9f8c.js → package-5c7049c1.js} +1 -1
  217. package/dist/esm/{stepper-states-291a682f.js → stepper-states-39645921.js} +1 -1
  218. package/dist/esm/{tooltip-helper-089735b1.js → tooltip-helper-61f3e8cb.js} +3 -4
  219. package/dist/esm/{validators-c1fe8b4b.js → validators-3881959b.js} +6 -2
  220. package/dist/types/components/molecules/number-input/number-input.d.ts +29 -0
  221. package/dist/types/components/molecules/number-input/number-input.style.d.ts +200 -0
  222. package/dist/types/components/organism/list/list.d.ts +3 -1
  223. package/dist/types/components.d.ts +55 -1
  224. package/dist/types/helper/generate.d.ts +3 -0
  225. package/dist/types/models/bcm.d.ts +3 -0
  226. package/dist/types/templates/label-template.d.ts +2 -1
  227. package/package.json +1 -1
  228. package/dist/bromcom-ui/p-0b316c6f.entry.js +0 -5
  229. package/dist/bromcom-ui/p-0b820f78.entry.js +0 -5
  230. package/dist/bromcom-ui/p-0fe106fc.entry.js +0 -5
  231. package/dist/bromcom-ui/p-140f3478.js +0 -5
  232. package/dist/bromcom-ui/p-29614b49.entry.js +0 -5
  233. package/dist/bromcom-ui/p-2da72d6a.entry.js +0 -5
  234. package/dist/bromcom-ui/p-3432a82d.js +0 -19
  235. package/dist/bromcom-ui/p-3d142f76.entry.js +0 -5
  236. package/dist/bromcom-ui/p-40b85b9b.entry.js +0 -5
  237. package/dist/bromcom-ui/p-483b4ba8.entry.js +0 -5
  238. package/dist/bromcom-ui/p-5ff3c68f.entry.js +0 -5
  239. package/dist/bromcom-ui/p-626a65e9.js +0 -5
  240. package/dist/bromcom-ui/p-62d178e3.entry.js +0 -5
  241. package/dist/bromcom-ui/p-71b9ea64.entry.js +0 -7
  242. package/dist/bromcom-ui/p-795d2f76.entry.js +0 -5
  243. package/dist/bromcom-ui/p-813ec92d.js +0 -5
  244. package/dist/bromcom-ui/p-8b202d9e.js +0 -5
  245. package/dist/bromcom-ui/p-8d43aa14.entry.js +0 -5
  246. package/dist/bromcom-ui/p-93b8a3ff.entry.js +0 -5
  247. package/dist/bromcom-ui/p-9889a4ed.entry.js +0 -5
  248. package/dist/bromcom-ui/p-a00170b7.entry.js +0 -5
  249. package/dist/bromcom-ui/p-a1f9e7d4.entry.js +0 -5
  250. package/dist/bromcom-ui/p-a42cc789.entry.js +0 -5
  251. package/dist/bromcom-ui/p-a839a0e5.entry.js +0 -5
  252. package/dist/bromcom-ui/p-b013cff9.entry.js +0 -5
  253. package/dist/bromcom-ui/p-b3b59bc3.entry.js +0 -5
  254. package/dist/bromcom-ui/p-be434461.entry.js +0 -5
  255. package/dist/bromcom-ui/p-bec8a936.entry.js +0 -5
  256. package/dist/bromcom-ui/p-c566b3a0.entry.js +0 -5
  257. package/dist/bromcom-ui/p-cd04678a.entry.js +0 -5
  258. package/dist/bromcom-ui/p-d06f5291.js +0 -5
  259. package/dist/bromcom-ui/p-d89b7e22.entry.js +0 -5
  260. package/dist/bromcom-ui/p-ea2ce157.js +0 -5
  261. package/dist/bromcom-ui/p-f7549b1f.entry.js +0 -5
  262. package/dist/bromcom-ui/p-fb597d84.entry.js +0 -5
  263. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -194
  264. package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -182
  265. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1450
  266. package/dist/cjs/bcm-list_3.cjs.entry.js +0 -2536
  267. package/dist/cjs/bcm-old-input.cjs.entry.js +0 -397
  268. package/dist/cjs/bcm-switch.cjs.entry.js +0 -151
  269. package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
  270. package/dist/cjs/index-7eed931f.js +0 -2146
  271. package/dist/esm/bcm-checkbox_2.entry.js +0 -189
  272. package/dist/esm/bcm-date-picker.entry.js +0 -178
  273. package/dist/esm/bcm-datetime-picker.entry.js +0 -1446
  274. package/dist/esm/bcm-list_3.entry.js +0 -2530
  275. package/dist/esm/bcm-old-input.entry.js +0 -393
  276. package/dist/esm/bcm-switch.entry.js +0 -147
  277. package/dist/esm/datetime-helper-df25808a.js +0 -9
  278. package/dist/esm/index-e4b6a4ce.js +0 -2127
@@ -1,397 +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 = require('./index-c591ecec.js');
10
- const index$1 = require('./index-95ae50d0.js');
11
- const captionTemplate = require('./caption-template-6f535b93.js');
12
- const utils = require('./utils-fc077139.js');
13
- require('./_commonjsHelpers-ed84c3ca.js');
14
-
15
- const oldInputCss = "@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\"); .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}*{box-sizing:border-box}.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}:host{display:inline-block;width:100%;margin:0 0 8px 0}:host(.hidden){display:none}:host(.no-margin){margin:0}.input-container{display:flex;flex-direction:column;width:100%;max-width:256px}.input-container.full-width{max-width:100%}.input-base{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;vertical-align:middle;overflow:hidden;padding:0 4px;cursor:text}.input-base.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.input-base.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-300)}.input-base.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.input-base.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.input-base:not(.disabled):hover .caret-container,.input-base:not(.disabled).focused .caret-container{opacity:1}.input-base:not(.disabled):hover .input-clear-button,.input-base:not(.disabled).focused .input-clear-button{opacity:1}.input-base:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.input-base:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.input-base.focused:not(.disabled) .caret-container{opacity:1}.input-base.focused:not(.disabled) .input-clear-button{opacity:1}.input-base:hover:not(.disabled) .caret-container{opacity:1}.input-base:hover:not(.disabled) .input-clear-button{opacity:1}.input-base.disabled{cursor:not-allowed}.input-base.readonly{cursor:default}.input-base.empty .input-clear-button{display:none}.input-base.invalid,.input-base.error{border-color:var(--bcm-new-ds-color-red-500)}.error .label{color:var(--bcm-new-ds-color-red-500) !important}.error .input-base{border-color:var(--bcm-new-ds-color-red-500) !important}.input-base input{color:var(--bcm-new-ds-color-slate-600);flex:1 1 auto;width:0%;border:none;border-radius:2px;background:none;box-shadow:none;padding:0;margin:0 4px;font-family:\"Inter\", sans-serif;cursor:inherit;-webkit-appearance:none;appearance:none}.input-base input::-webkit-search-decoration,.input-base input::-webkit-search-cancel-button,.input-base input::-webkit-search-results-button,.input-base input::-webkit-search-results-decoration{-webkit-appearance:none}.input-base input::placeholder{font-family:\"Inter\", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.input-base input:focus{outline:none}input::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.input-prefix,.input-suffix{display:inline-flex;align-items:center;justify-content:center;cursor:default;color:var(--bcm-new-ds-color-slate-500)}.input-prefix ::slotted(*),.input-prefix>span{line-height:1;margin-left:4px}.input-suffix ::slotted(*),.input-suffix>span{line-height:1;margin-right:4px}.input-clear-button,.input-password-toggle{display:inline-flex;align-items:center;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;transition:0.2s opacity}.input-clear-button:last-child,.input-clear-button:last-of-type,.input-password-toggle:last-child,.input-password-toggle:last-of-type{margin-right:8px}.input-clear-button:focus,.input-password-toggle:focus{outline:none}.input-clear-button{opacity:0}.label{display:flex;flex-direction:column;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;color:var(--bcm-new-ds-color-slate-600);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.unit.input-suffix{width:24px}.unit-prefix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--bcm-color-grey-8)}.caret-container{opacity:0;width:30px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-left:1px solid #D9D9D9;border-right:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box;margin-right:4px}.caret-container:last-of-type{margin-right:-space(\"xxxs\");border-right:none}.caret-container .caret{display:inline-flex;height:50%;width:100%;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer}.caret-container .caret:hover{color:var(--bcm-color-prime-blue-6)}.caret-container .caret:active{background-color:var(--bcm-color-grey-3)}.caret-container .caret:last-child{border-top:1px solid #D9D9D9}.caret-container.disabled{background-color:var(--bcm-color-grey-3)}.caret-container.disabled .caret{cursor:not-allowed}.default-icon{margin-right:8px}.input-large{height:40px}.input-medium{height:32px}.input-small{height:24px}";
16
-
17
- let id = 0;
18
- const defaultIcons = {
19
- email: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg>',
20
- tel: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M476.5 22.9L382.3 1.2c-21.6-5-43.6 6.2-52.3 26.6l-43.5 101.5c-8 18.6-2.6 40.6 13.1 53.4l40 32.7C311 267.8 267.8 311 215.4 339.5l-32.7-40c-12.8-15.7-34.8-21.1-53.4-13.1L27.7 329.9c-20.4 8.7-31.5 30.7-26.6 52.3l21.7 94.2c4.8 20.9 23.2 35.5 44.6 35.5C312.3 512 512 313.7 512 67.5c0-21.4-14.6-39.8-35.5-44.6zM69.3 464l-20.9-90.7 98.2-42.1 55.7 68.1c98.8-46.4 150.6-98 197-197l-68.1-55.7 42.1-98.2L464 69.3C463 286.9 286.9 463 69.3 464z"/></svg>',
21
- search: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"/></svg>',
22
- url: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M314.222 197.78c51.091 51.091 54.377 132.287 9.75 187.16-6.242 7.73-2.784 3.865-84.94 86.02-54.696 54.696-143.266 54.745-197.99 0-54.711-54.69-54.734-143.255 0-197.99 32.773-32.773 51.835-51.899 63.409-63.457 7.463-7.452 20.331-2.354 20.486 8.192a173.31 173.31 0 0 0 4.746 37.828c.966 4.029-.272 8.269-3.202 11.198L80.632 312.57c-32.755 32.775-32.887 85.892 0 118.8 32.775 32.755 85.892 32.887 118.8 0l75.19-75.2c32.718-32.725 32.777-86.013 0-118.79a83.722 83.722 0 0 0-22.814-16.229c-4.623-2.233-7.182-7.25-6.561-12.346 1.356-11.122 6.296-21.885 14.815-30.405l4.375-4.375c3.625-3.626 9.177-4.594 13.76-2.294 12.999 6.524 25.187 15.211 36.025 26.049zM470.958 41.04c-54.724-54.745-143.294-54.696-197.99 0-82.156 82.156-78.698 78.29-84.94 86.02-44.627 54.873-41.341 136.069 9.75 187.16 10.838 10.838 23.026 19.525 36.025 26.049 4.582 2.3 10.134 1.331 13.76-2.294l4.375-4.375c8.52-8.519 13.459-19.283 14.815-30.405.621-5.096-1.938-10.113-6.561-12.346a83.706 83.706 0 0 1-22.814-16.229c-32.777-32.777-32.718-86.065 0-118.79l75.19-75.2c32.908-32.887 86.025-32.755 118.8 0 32.887 32.908 32.755 86.025 0 118.8l-45.848 45.84c-2.93 2.929-4.168 7.169-3.202 11.198a173.31 173.31 0 0 1 4.746 37.828c.155 10.546 13.023 15.644 20.486 8.192 11.574-11.558 30.636-30.684 63.409-63.457 54.733-54.735 54.71-143.3-.001-197.991z"/></svg>'
23
- };
24
- const BcmOldInput = class {
25
- constructor(hostRef) {
26
- index.registerInstance(this, hostRef);
27
- this.focus = index.createEvent(this, "bcm-focus", 7);
28
- this.blur = index.createEvent(this, "bcm-blur", 7);
29
- this.clear = index.createEvent(this, "bcm-clear", 7);
30
- this.change = index.createEvent(this, "bcm-change", 7);
31
- this.input = index.createEvent(this, "bcm-input", 7);
32
- this.inputId = `input-${++id}`;
33
- this.isBlur = false;
34
- this.type = 'text';
35
- this.value = '';
36
- this.size = "medium";
37
- this.label = undefined;
38
- this.noCaption = false;
39
- this.noMargin = false;
40
- this.captionError = undefined;
41
- this.caption = undefined;
42
- this.captionType = 'default';
43
- this.placeholder = undefined;
44
- this.fullWidth = false;
45
- this.disabled = false;
46
- this.readonly = false;
47
- this.clearable = false;
48
- this.passwordToggle = undefined;
49
- this.noDefaultIcon = undefined;
50
- this._id = undefined;
51
- this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
52
- this.name = undefined;
53
- this.unit = null;
54
- this.unitPrefix = null;
55
- this.decimal = undefined;
56
- this.min = null;
57
- this.max = null;
58
- this.step = null;
59
- this.hidden = false;
60
- this.required = false;
61
- this.disableWatchValue = false;
62
- this.maxLength = null;
63
- this.tooltip = undefined;
64
- this.inValid = false;
65
- this.valueCache = undefined;
66
- this.captionCache = undefined;
67
- this.captionTypeCache = undefined;
68
- this.hasFocus = false;
69
- this.isPasswordVisible = false;
70
- }
71
- async setFocus() {
72
- this.inputElement.focus();
73
- }
74
- async removeFocus() {
75
- this.inputElement.blur();
76
- }
77
- async select() {
78
- return this.inputElement.select();
79
- }
80
- async setValue(value) {
81
- this.inputElement.value = value;
82
- this.value = value;
83
- this.handleChange();
84
- return value;
85
- }
86
- async setClear() {
87
- this.inputElement.value = '';
88
- this.value = '';
89
- await utils.delay(10);
90
- return Promise.resolve();
91
- }
92
- async resetCaption() {
93
- await utils.delay(10);
94
- this.caption = this.captionCache;
95
- this.captionType = this.captionTypeCache;
96
- this.captionError = null;
97
- await utils.delay(10);
98
- return Promise.resolve();
99
- }
100
- async getValue() {
101
- return this.value;
102
- }
103
- handleFocus() {
104
- this.hasFocus = true;
105
- this.focus.emit();
106
- }
107
- handleBlur() {
108
- this.hasFocus = false;
109
- this.isBlur = true;
110
- if (this.type == "email") {
111
- this.isEmailValid();
112
- }
113
- if (this.type == "tel") {
114
- this.isTelValid();
115
- }
116
- this.blur.emit();
117
- }
118
- handleChange() {
119
- this.value = this.inputElement.value;
120
- this.change.emit(this.value);
121
- }
122
- handleInput() {
123
- if (this.type == "number") {
124
- if (this.decimal == "false") {
125
- this.inputElement.value = this.inputElement.value.replace(/[^0-9-]/g, '');
126
- }
127
- else {
128
- this.inputElement.value = this.inputElement.value.replace(/[^0-9.,-]/g, '');
129
- }
130
- this.inputElement.value = this.inputElement.value.replace(/(\..*)\./g, '$1').replace(/(\-.*)\-/g, '$1');
131
- }
132
- this.value = this.inputElement.value;
133
- this.input.emit(this.value);
134
- }
135
- handleClear(e) {
136
- this.inputElement.value = '';
137
- this.value = '';
138
- this.inputElement.focus();
139
- this.change.emit(this.value);
140
- this.clear.emit(e);
141
- e.stopPropagation();
142
- }
143
- changePasswordVisibility() {
144
- this.isPasswordVisible = !this.isPasswordVisible;
145
- }
146
- incrementNumber() {
147
- if (!this.inValid && !this.disabled && !this.readonly) {
148
- let step = this.getNumberStep();
149
- let val = Number(this.value) + Number(step);
150
- this.value = this.numberDecimal(val);
151
- }
152
- }
153
- decrementNumber() {
154
- if (!this.inValid && !this.disabled && !this.readonly) {
155
- let step = this.getNumberStep();
156
- let val = Number(this.value) - Number(step);
157
- this.value = this.numberDecimal(val);
158
- }
159
- }
160
- getNumberStep(step = Number(this.step)) {
161
- let returnStep = 1;
162
- if (step && Number(step) == step)
163
- returnStep = step;
164
- return Number(returnStep);
165
- }
166
- connectedCallback() {
167
- this.changePasswordVisibility = this.changePasswordVisibility.bind(this);
168
- this.handleChange = this.handleChange.bind(this);
169
- this.handleBlur = this.handleBlur.bind(this);
170
- this.handleFocus = this.handleFocus.bind(this);
171
- this.handleInput = this.handleInput.bind(this);
172
- this.handleClear = this.handleClear.bind(this);
173
- this.incrementNumber = this.incrementNumber.bind(this);
174
- this.decrementNumber = this.decrementNumber.bind(this);
175
- this.valueCache = this.value;
176
- this.captionCache = this.caption;
177
- this.captionTypeCache = this.captionType;
178
- }
179
- validationRange(val = JSON.stringify({
180
- "value": this.value,
181
- "min": this.min,
182
- "max": this.max
183
- })) {
184
- let cap = null;
185
- let capType = null;
186
- let returnValidation = true;
187
- let item = JSON.parse(val);
188
- let { length, value, min, max } = item;
189
- length = parseFloat(length);
190
- value = parseFloat(value);
191
- min = parseFloat(min);
192
- max = parseFloat(max);
193
- length !== 0 && (value && (min && max && ((value < min || value > max) && (cap = "Please enter a value between " + min + " and " + max + ".",
194
- capType = "error",
195
- returnValidation = false)) || min && !max && (value < min && (cap = "Please enter a value greater than or equal to " + min + ".",
196
- capType = "error",
197
- returnValidation = false)) || !min && max && (value > max && (cap = "Please enter a value less than or equal to " + max + ".",
198
- capType = "error",
199
- returnValidation = false))));
200
- this.setCaption(cap, capType);
201
- return returnValidation;
202
- }
203
- setCaption(caption = null, captionType = null) {
204
- this.caption = caption ? caption : this.captionCache;
205
- this.captionType = captionType ? captionType : this.captionTypeCache;
206
- this.captionError = captionType == "error" ? caption : null;
207
- }
208
- isEmailValid() {
209
- const { value } = this;
210
- const regexp = new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
211
- let cap = null;
212
- let capType = null;
213
- if (value && !regexp.test(value)) {
214
- cap = "Please enter a valid email address.",
215
- capType = "error",
216
- this.inValid = true;
217
- }
218
- else {
219
- this.inValid = false;
220
- }
221
- this.setCaption(cap, capType);
222
- return this.inValid;
223
- }
224
- isTelValid() {
225
- const { value } = this;
226
- const regexp = new RegExp(/^(?=.*[0-9])[- +()0-9]+$/);
227
- let cap = null;
228
- let capType = null;
229
- if (value && !regexp.test(value)) {
230
- cap = "Please enter a valid phone number.",
231
- capType = "error",
232
- this.inValid = true;
233
- }
234
- else {
235
- this.inValid = false;
236
- }
237
- this.setCaption(cap, capType);
238
- return this.inValid;
239
- }
240
- isNumberValid(caption = "Invalid number", captionType = "error") {
241
- const { value } = this;
242
- if (value && Number(value) != value) {
243
- this.inValid = true;
244
- this.setCaption(caption, captionType);
245
- return true;
246
- }
247
- this.inValid = false;
248
- return false;
249
- }
250
- setNumberUnit() {
251
- const { value, unit } = this;
252
- if (Number(value) == value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 && !value)
253
- this.value = 0;
254
- }
255
- numberDecimal(val = '') {
256
- let decLen = this.getDecimalLength();
257
- if (val && decLen)
258
- return parseFloat(val).toFixed(decLen);
259
- return val;
260
- }
261
- numberNotDecimal(val = 0) {
262
- return Math.trunc(val);
263
- }
264
- getDecimalLength() {
265
- const { step } = this;
266
- let returnDecimalLength = 0, splitted, splitDec;
267
- if (step && Number(step) == step) {
268
- if (String(step).includes(".")) {
269
- splitted = String(step).split('.');
270
- splitDec = splitted[splitted.length - 1].length;
271
- }
272
- else {
273
- splitDec = 0;
274
- }
275
- returnDecimalLength = splitDec;
276
- }
277
- return Number(returnDecimalLength);
278
- }
279
- componentWillRender() {
280
- const { type } = this;
281
- if (type == "number" && this.value) {
282
- if (!this.isNumberValid()) {
283
- this.validationRange();
284
- }
285
- }
286
- if (this.isBlur) {
287
- if (type == "email" && this.value) {
288
- this.isEmailValid();
289
- }
290
- if (type == "tel" && this.value) {
291
- this.isTelValid();
292
- }
293
- }
294
- }
295
- componentWillLoad() {
296
- const { type, value } = this;
297
- if (type == "number" && Number(value) == value) {
298
- this.value = this.numberDecimal(value);
299
- }
300
- }
301
- numberControl(e) {
302
- if (!this.disabled && !this.readonly) {
303
- if (this.type == "number") {
304
- var which = e.which || 0;
305
- var key = e.key;
306
- which == 38 && ( // up arrow
307
- e.preventDefault(),
308
- this.incrementNumber());
309
- which == 40 && ( // down arrow
310
- e.preventDefault(),
311
- this.decrementNumber());
312
- key == "." && String(this.value).includes(".") && ( // dot: shouldn't be more than one
313
- e.preventDefault());
314
- if (which == 8 || //backspace / delete
315
- which == 9 || //tab
316
- which == 13 || //enter
317
- which == 16 || //shift
318
- which == 17 || //ctrl
319
- which == 18 || //alt
320
- which == 46 || //delete
321
- (which == 110 && (this.type == 'number' && this.decimal != false)) || //decimal point
322
- // (which == 188 && key == ",") || //comma
323
- (which == 190 && key == "." && (this.type == 'number' && this.decimal != false)) || //period
324
- (which == 189 && this.inputElement.value.length == 0) || //-
325
- (which == 109 && this.inputElement.value.length == 0) || //-
326
- (which >= 35 && which <= 40) || //end, home, left arrow, up arrow, right arrow, down arrow
327
- (which >= 48 && which <= 57) || //0-9
328
- (which >= 96 && which <= 105) //0-9(numpad)
329
- )
330
- return true;
331
- e.preventDefault();
332
- if (this.decimal == true) {
333
- this.value = this.numberDecimal(this.value);
334
- }
335
- else if (this.decimal == false) {
336
- this.value = this.numberNotDecimal(this.value);
337
- }
338
- }
339
- }
340
- }
341
- whatchHasFocus() {
342
- const { type, hasFocus, value, valueCache, inValid } = this;
343
- if (type == "number") {
344
- this.isNumberValid();
345
- let inValidState = false;
346
- if (hasFocus == true) {
347
- if (inValid == true) {
348
- this.value = '';
349
- inValidState = true;
350
- }
351
- }
352
- else {
353
- if (this.value == '' && inValid == false) {
354
- this.value = valueCache;
355
- inValidState = true;
356
- }
357
- if (value != valueCache && inValid == false && inValidState == false) {
358
- this.value = value ? this.numberDecimal(value) : '';
359
- }
360
- }
361
- }
362
- }
363
- watchValue() {
364
- if (!this.disableWatchValue && this.type != 'number') {
365
- this.handleChange();
366
- }
367
- }
368
- render() {
369
- const { value, size, label, type, captionType, caption, captionError, placeholder, fullWidth, disabled, readonly, clearable, passwordToggle, isPasswordVisible, noDefaultIcon, unit, inValid, hasFocus, unitPrefix, noCaption, required } = this;
370
- const containerClasses = index$1.classnames('input-container', {
371
- 'full-width': fullWidth,
372
- 'error': captionType == 'error' ? true : false
373
- });
374
- const baseClasses = index$1.classnames('input-base', 'input-' + size, {
375
- 'invalid': inValid,
376
- 'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
377
- 'focused': hasFocus,
378
- 'disabled': disabled,
379
- 'readonly': readonly,
380
- 'empty': (value === null || value === void 0 ? void 0 : value.length) < 1
381
- });
382
- const inputClass = size === 'large' ? 'size-3' : 'size-2';
383
- const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null, this.noMargin ? 'no-margin' : null);
384
- return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: containerClasses }, label && index.h("div", null, index.h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: this.inputId })), index.h("div", { class: baseClasses }, index.h("span", { class: "input-prefix" }, index.h("slot", { name: "prefix" }), unitPrefix && index.h("span", { class: index$1.classnames(inputClass, 'unit-prefix') }, unitPrefix)), index.h("input", { "bcm-internal-id": this._id, id: this.inputId, class: inputClass, ref: el => (this.inputElement = el), onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onInput: this.handleInput, maxLength: this.maxLength, type: type === 'password' && isPasswordVisible ? 'text' :
385
- type === 'number' ? 'text' : type, placeholder: placeholder, value: type === 'number' && !this.hasFocus
386
- ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '')
387
- : value, disabled: this.disabled, readonly: this.readonly }), clearable && !this.disabled && (index.h("button", { class: "input-clear-button", onClick: this.handleClear }, index.h("svg", { style: { "fill": "#595959", "width": "14px", "height": "14px" }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512" }, index.h("path", { d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z" })))), type === 'password' && passwordToggle && (index.h("button", { class: "input-password-toggle", onClick: this.changePasswordVisibility }, index.h("bcm-icon", { icon: isPasswordVisible ? "far fa-eye-invisible" : "far fa-eye" }))), Object.keys(defaultIcons).includes(type) && !noDefaultIcon && (index.h("span", { class: "input-suffix default-icon", innerHTML: defaultIcons[type] })), type === 'number' && (index.h("div", { class: index$1.classnames('caret-container', { 'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0 }, { 'disabled': inValid }, { 'disabled': readonly }) }, index.h("span", { class: "caret", onClick: inValid == false && this.incrementNumber }, index.h("bcm-icon", { icon: "far fa-caret-up" })), index.h("span", { class: "caret", onClick: inValid == false && this.decrementNumber }, index.h("bcm-icon", { icon: "far fa-caret-down" })))), type !== 'number' && (index.h("span", { class: "input-suffix" }, index.h("slot", { name: "suffix" })))), index.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption }))));
388
- }
389
- get el() { return index.getElement(this); }
390
- static get watchers() { return {
391
- "hasFocus": ["whatchHasFocus"],
392
- "value": ["watchValue"]
393
- }; }
394
- };
395
- BcmOldInput.style = oldInputCss;
396
-
397
- exports.bcm_old_input = BcmOldInput;
@@ -1,151 +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 = require('./index-c591ecec.js');
10
- const index$1 = require('./index-95ae50d0.js');
11
- const isLoadDecorator = require('./is-load-decorator-15036f37.js');
12
- const generate = require('./generate-e79347af.js');
13
- const bcm = require('./bcm-3c58a6d5.js');
14
- const captionTemplate = require('./caption-template-6f535b93.js');
15
- const utils = require('./utils-fc077139.js');
16
- require('./_commonjsHelpers-ed84c3ca.js');
17
- require('./package-47b7b998.js');
18
- require('./colors-078851ec.js');
19
-
20
- const switchCss = "@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\"); .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}*{box-sizing:border-box}.bcm-switch{display:inline-flex;user-select:none;flex-direction:column;margin-bottom:8px}.bcm-switch__container{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.bcm-switch__container--left,.bcm-switch__container--right{align-items:center}.bcm-switch__container--left .bcm-label__text,.bcm-switch__container--right .bcm-label__text{margin:0}.bcm-switch__container--left{flex-direction:row}.bcm-switch__container--left .bcm-label__text{margin-right:4px}.bcm-switch__container--right{flex-direction:row-reverse}.bcm-switch__container--right .bcm-label__text{margin-left:4px}.bcm-switch:focus-visible{outline:none}.bcm-switch:focus-visible .bcm-switch__toggle{background-color:var(--bcm-new-ds-color-slate-400)}.bcm-switch:focus-visible .bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch:hover{outline:none}.bcm-switch:hover .bcm-switch__toggle .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch:hover .bcm-switch__toggle.switch-checked .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch *{box-sizing:border-box}.bcm-switch.hidden{display:none}.bcm-switch input{display:none}.bcm-switch.disabled .bcm-switch__toggle{cursor:not-allowed;opacity:40%}.bcm-switch.readonly .bcm-switch__toggle{cursor:default;opacity:80%}.bcm-switch__label{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;align-items:center;margin:0}.bcm-switch__label .active-text{color:var(--bcm-new-ds-color-blue-500);margin:0 0 0 4px}.bcm-switch__label .inactive-text{color:var(--bcm-new-ds-color-slate-500);margin:0 4px 0 0}.bcm-switch__toggle{display:flex;justify-content:space-between;align-items:center;border-radius:16px;background-color:var(--bcm-new-ds-color-slate-300);position:relative;cursor:pointer}.bcm-switch__toggle .handle{padding:1px;position:absolute;background-color:var(--bcm-new-ds-color-slate-50);display:inline-flex;align-items:center;justify-content:center;border-radius:16px;transition:left 0.2s ease-in-out, width 0.2s ease-in-out;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-switch__toggle .icon-active{opacity:0;margin-left:2px}.bcm-switch__toggle .icon-inactive{opacity:1;margin-right:2px}.bcm-switch__toggle.bcm-switch__size-small{width:32px;min-width:32px;height:16px;padding:4px}.bcm-switch__toggle.bcm-switch__size-small .handle{width:12px;height:12px;left:2px}.bcm-switch__toggle.bcm-switch__size-small.switch-checked .handle{left:18px}.bcm-switch__toggle.bcm-switch__size-small:active:not(.disabled):not(.readonly) .handle{width:16px}.bcm-switch__toggle.bcm-switch__size-small:active.switch-checked:not(.disabled):not(.readonly) .handle{left:12px}.bcm-switch__toggle.bcm-switch__size-small .switch-spinner{box-sizing:border-box;display:inline-flex;width:9px;height:9px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-medium{width:36px;min-width:36px;height:18px;padding:4px}.bcm-switch__toggle.bcm-switch__size-medium .handle{width:14px;height:14px;left:2px}.bcm-switch__toggle.bcm-switch__size-medium.switch-checked .handle{left:20px}.bcm-switch__toggle.bcm-switch__size-medium:active:not(.disabled):not(.readonly) .handle{width:18px}.bcm-switch__toggle.bcm-switch__size-medium:active.switch-checked:not(.disabled):not(.readonly) .handle{left:14px}.bcm-switch__toggle.bcm-switch__size-medium .switch-spinner{box-sizing:border-box;display:inline-flex;width:11px;height:11px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-large{width:40px;min-width:40px;height:20px;padding:4px}.bcm-switch__toggle.bcm-switch__size-large .handle{width:16px;height:16px;left:2px}.bcm-switch__toggle.bcm-switch__size-large.switch-checked .handle{left:22px}.bcm-switch__toggle.bcm-switch__size-large:active:not(.disabled):not(.readonly) .handle{width:20px}.bcm-switch__toggle.bcm-switch__size-large:active.switch-checked:not(.disabled):not(.readonly) .handle{left:16px}.bcm-switch__toggle.bcm-switch__size-large .switch-spinner{box-sizing:border-box;display:inline-flex;width:13px;height:13px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-500)}.bcm-switch__toggle.switch-checked .icon-active{color:var(--bcm-new-ds-color-slate-100);opacity:1}.bcm-switch__toggle.switch-checked .icon-inactive{opacity:0}.bcm-switch__toggle.switch-checked .switch-spinner{border-top-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch__size-small .bcm-switch__label,.bcm-switch__size-small .bcm-label__text{font-size:12px}.bcm-switch__size-small .bcm-switch__toggle{font-size:8px}.bcm-switch__size-medium .bcm-switch__label,.bcm-switch__size-medium .bcm-label__text{font-size:13px}.bcm-switch__size-medium .bcm-switch__toggle{font-size:9px}.bcm-switch__size-large .bcm-switch__label,.bcm-switch__size-large .bcm-label__text{font-size:16px}.bcm-switch__size-large .bcm-switch__toggle{font-size:12px}@keyframes switch-spinner{to{transform:rotate(360deg)}}";
21
-
22
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
25
- r = Reflect.decorate(decorators, target, key, desc);
26
- else
27
- for (var i = decorators.length - 1; i >= 0; i--)
28
- if (d = decorators[i])
29
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- };
32
- const BcmSwitch = class {
33
- constructor(hostRef) {
34
- index.registerInstance(this, hostRef);
35
- this.change = index.createEvent(this, "bcm-change", 7);
36
- this.focus = index.createEvent(this, "bcm-focus", 7);
37
- this.blur = index.createEvent(this, "bcm-blur", 7);
38
- this._id = generate.Generate.UID();
39
- this._internal_id = generate.Generate.UID();
40
- this.checked = false;
41
- this.hidden = false;
42
- this.value = false;
43
- this.name = undefined;
44
- this.disabled = false;
45
- this.required = false;
46
- this.size = bcm.Bcm.Size.medium;
47
- this.readonly = false;
48
- this.activeIcon = undefined;
49
- this.activeText = undefined;
50
- this.inactiveIcon = undefined;
51
- this.inactiveText = undefined;
52
- this.pending = false;
53
- this.label = undefined;
54
- this.labelPosition = 'top';
55
- this.tooltip = undefined;
56
- this.caption = undefined;
57
- this.noCaption = false;
58
- this.captionError = undefined;
59
- this.captionType = bcm.Bcm.Status.default;
60
- this.captionCache = undefined;
61
- this.captionTypeCache = undefined;
62
- }
63
- connectedCallback() {
64
- this.captionCache = this.caption;
65
- this.captionTypeCache = this.captionType;
66
- this.value = this.checked;
67
- }
68
- handleChange() {
69
- this.checked = this.inputElement.checked;
70
- this.value = this.checked;
71
- this.change.emit(this.checked);
72
- }
73
- componentWillRender() {
74
- if (this.pending) {
75
- this.disabled = true;
76
- }
77
- }
78
- async onBcmFocus() {
79
- this.el.focus();
80
- }
81
- async onBcmBlur() {
82
- this.el.blur();
83
- }
84
- async set(data) {
85
- if (typeof data === 'boolean') {
86
- await this.check(data);
87
- }
88
- }
89
- async check(uncheck = true) {
90
- this.inputElement.checked = uncheck;
91
- this.handleChange();
92
- }
93
- async get() {
94
- return this.checked || false;
95
- }
96
- async setClear() {
97
- if (this.inputElement.checked == true) {
98
- this.inputElement.checked = false;
99
- this.checked = this.inputElement.checked;
100
- this.value = this.checked;
101
- this.change.emit(this.checked);
102
- }
103
- await utils.delay(10);
104
- return Promise.resolve();
105
- }
106
- async resetCaption() {
107
- await utils.delay(10);
108
- this.caption = this.captionCache;
109
- this.captionType = this.captionTypeCache;
110
- this.captionError = null;
111
- await utils.delay(10);
112
- return Promise.resolve();
113
- }
114
- handleKeyUp(ev) {
115
- if (ev.keyCode == bcm.Bcm.KeyCode.space || ev.keyCode == bcm.Bcm.KeyCode.enter) {
116
- if (!this.disabled && !this.readonly) {
117
- this.inputElement.checked = !this.inputElement.checked;
118
- this.handleChange();
119
- }
120
- ev.stopPropagation();
121
- ev.preventDefault();
122
- return false;
123
- }
124
- }
125
- render() {
126
- const { hidden, _internal_id, checked, size, activeIcon, inactiveIcon, activeText, inactiveText, pending, disabled, readonly, label, required, noCaption, captionType, captionError, caption } = this;
127
- const classes = index$1.classnames('bcm-switch__toggle', 'bcm-switch__size-' + size, {
128
- 'switch-checked': checked,
129
- 'disabled': disabled,
130
- 'readonly': readonly
131
- });
132
- const bcmSwitchClasses = index$1.classnames('bcm-switch', 'bcm-switch__size-' + size, {
133
- hidden,
134
- checked,
135
- disabled,
136
- readonly
137
- });
138
- const bcmSwitchLabel = index$1.classnames('bcm-switch__label', 'input-size-' + bcm.Bcm.Size[size]);
139
- const bcmSwitchContainer = index$1.classnames('bcm-switch__container', `bcm-switch__container--${this.labelPosition}`);
140
- const switchText = (text) => (size != bcm.Bcm.Size.small && (activeText || inactiveText)) && (index.h("span", { class: text + '-text' }, text == 'active' ? activeText : inactiveText));
141
- const switchIcon = (text) => (size != bcm.Bcm.Size.small && (activeIcon || inactiveIcon)) && index.h("bcm-icon", { icon: text == 'active' ? activeIcon : inactiveIcon, class: ' icon-' + text });
142
- return (index.h(index.Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), class: bcmSwitchClasses }, index.h("span", { hidden: true }, index.h("slot", null)), index.h("div", { class: bcmSwitchContainer }, label && index.h("bcm-label", { htmlFor: _internal_id, tooltip: this.tooltip, type: captionType, value: label, required: required }), index.h("input", { id: _internal_id, onChange: () => this.handleChange(), ref: el => (this.inputElement = el), checked: checked, type: "checkbox", class: "switch", disabled: disabled || readonly }), index.h("label", { htmlFor: _internal_id, class: bcmSwitchLabel }, switchText('inactive'), index.h("div", { class: classes }, switchIcon('active'), index.h("span", { class: "handle" }, pending && index.h("span", { class: "switch-spinner" })), switchIcon('inactive')), switchText('active'))), index.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
143
- }
144
- get el() { return index.getElement(this); }
145
- };
146
- __decorate([
147
- isLoadDecorator.IsLoad()
148
- ], BcmSwitch.prototype, "el", void 0);
149
- BcmSwitch.style = switchCss;
150
-
151
- exports.bcm_switch = BcmSwitch;
@@ -1,11 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- 'use strict';
6
-
7
- class DateTimeHelper {
8
- }
9
- DateTimeHelper.convertTimeStampToDate = (timestamp) => new Date(timestamp);
10
-
11
- exports.DateTimeHelper = DateTimeHelper;