bromcom-ui 2.9.1-rc.0 → 2.9.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) 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-7c5763cc.entry.js → p-03337609.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-6edf985f.js → p-034bbcdd.js} +1 -1
  5. package/dist/bromcom-ui/p-0be0c743.entry.js +5 -0
  6. package/dist/bromcom-ui/{p-430c0a24.entry.js → p-0efc9196.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-c1a992e7.entry.js → p-107f11df.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-7d18ce0e.entry.js → p-181f2f4a.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-1845fc18.js +5 -0
  10. package/dist/bromcom-ui/{p-2aaeb247.entry.js → p-188b9079.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-26290ed5.entry.js → p-18bc4e04.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-74e6d2b6.js → p-197aba37.js} +1 -1
  13. package/dist/bromcom-ui/{p-80ee3d97.entry.js → p-1998815a.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-1a31fc0b.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-a664cc20.entry.js → p-1a33d7a3.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-efc75375.entry.js → p-1c043ab6.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-fff1a0f9.entry.js → p-1e8559ac.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-21da70e5.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-28a748ad.entry.js → p-226c8c0a.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-292861ed.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-4f5f5090.entry.js → p-2aa9e3e8.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-6880da84.entry.js → p-2bfd7aa8.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-70d3ff0a.entry.js → p-2d3e225b.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-541fc5ec.entry.js → p-2ebba9f4.entry.js} +1 -1
  25. package/dist/bromcom-ui/p-3182df7e.js +10 -0
  26. package/dist/bromcom-ui/p-32df2233.js +5 -0
  27. package/dist/bromcom-ui/p-3469c1bb.js +5 -0
  28. package/dist/bromcom-ui/p-3a1eabb1.entry.js +5 -0
  29. package/dist/bromcom-ui/{p-67343ad8.entry.js → p-3b079331.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-3b78f74e.entry.js +5 -0
  31. package/dist/bromcom-ui/{p-15a16b4a.entry.js → p-3c783cae.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
  33. package/dist/bromcom-ui/{p-67d13512.entry.js → p-417e8067.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-14cafd64.entry.js → p-4438d629.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-5699f67d.entry.js → p-468157a0.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-61db1f1f.js → p-4798d827.js} +1 -1
  37. package/dist/bromcom-ui/{p-69260d36.entry.js → p-48f5a3c9.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-d6cd20cf.entry.js → p-4c7cd784.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-ece578ef.entry.js → p-4d7ea23c.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-4e4504ca.js +5 -0
  41. package/dist/bromcom-ui/{p-64c6092c.js → p-51d2c673.js} +1 -1
  42. package/dist/bromcom-ui/p-52f879b2.entry.js +5 -0
  43. package/dist/bromcom-ui/{p-c6a6a181.entry.js → p-535d02b9.entry.js} +1 -1
  44. package/dist/bromcom-ui/p-5a3f8a49.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
  46. package/dist/bromcom-ui/{p-12f997c1.entry.js → p-5be009b0.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-5ccb0675.entry.js +5 -0
  48. package/dist/bromcom-ui/p-5ea9881d.entry.js +5 -0
  49. package/dist/bromcom-ui/p-5ee8a018.js +5 -0
  50. package/dist/bromcom-ui/{p-5f071adc.entry.js → p-5fc98177.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-62369801.entry.js +5 -0
  52. package/dist/bromcom-ui/p-626a65e9.js +5 -0
  53. package/dist/bromcom-ui/{p-d551a51d.entry.js → p-63138ee5.entry.js} +1 -1
  54. package/dist/bromcom-ui/p-6385e735.entry.js +5 -0
  55. package/dist/bromcom-ui/p-67bb1c06.js +5 -0
  56. package/dist/bromcom-ui/p-6d0a02d7.entry.js +5 -0
  57. package/dist/bromcom-ui/{p-ba9eff2a.entry.js → p-6e7bb16f.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-6f11eb8e.entry.js +5 -0
  59. package/dist/bromcom-ui/p-76edf59f.js +7 -0
  60. package/dist/bromcom-ui/p-77035c08.entry.js +5 -0
  61. package/dist/bromcom-ui/{p-a3e0482c.entry.js → p-788de9cf.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-626b805d.entry.js → p-7a89243a.entry.js} +1 -1
  63. package/dist/bromcom-ui/p-7b506ccb.entry.js +5 -0
  64. package/dist/bromcom-ui/p-7c623da0.js +5 -0
  65. package/dist/bromcom-ui/p-7e3209a0.js +14 -0
  66. package/dist/bromcom-ui/p-7e35d915.entry.js +5 -0
  67. package/dist/bromcom-ui/{p-1d7509e4.entry.js → p-7f63e25c.entry.js} +1 -1
  68. package/dist/bromcom-ui/p-80249663.entry.js +5 -0
  69. package/dist/bromcom-ui/p-89abd5ea.entry.js +5 -0
  70. package/dist/bromcom-ui/p-8b318727.entry.js +5 -0
  71. package/dist/bromcom-ui/{p-2c5a0863.js → p-8c951a73.js} +1 -1
  72. package/dist/bromcom-ui/p-8d4482d6.entry.js +5 -0
  73. package/dist/bromcom-ui/{p-9850cbce.js → p-8e5e362a.js} +1 -1
  74. package/dist/bromcom-ui/{p-1c801d0c.entry.js → p-95a2c489.entry.js} +1 -1
  75. package/dist/bromcom-ui/{p-6dcfdb90.entry.js → p-99dc26dd.entry.js} +1 -1
  76. package/dist/bromcom-ui/p-a0bd7793.entry.js +5 -0
  77. package/dist/bromcom-ui/p-a1b1750c.js +1 -1
  78. package/dist/bromcom-ui/{p-68280506.entry.js → p-a907cae6.entry.js} +1 -1
  79. package/dist/bromcom-ui/{p-7bb1f30b.entry.js → p-a9c22560.entry.js} +1 -1
  80. package/dist/bromcom-ui/p-ae94dfa8.js +5 -0
  81. package/dist/bromcom-ui/p-b11dd428.entry.js +5 -0
  82. package/dist/bromcom-ui/p-b6bac5f5.entry.js +5 -0
  83. package/dist/bromcom-ui/p-bc8d7f89.entry.js +5 -0
  84. package/dist/bromcom-ui/p-bed627ab.js +11 -0
  85. package/dist/bromcom-ui/{p-b550b336.js → p-c3422601.js} +1 -1
  86. package/dist/bromcom-ui/p-c495a13f.js +5 -0
  87. package/dist/bromcom-ui/{p-3672a932.entry.js → p-c49c79ca.entry.js} +1 -1
  88. package/dist/bromcom-ui/p-c8058a21.entry.js +5 -0
  89. package/dist/bromcom-ui/p-cc61ed4c.entry.js +5 -0
  90. package/dist/bromcom-ui/p-ce62273f.entry.js +5 -0
  91. package/dist/bromcom-ui/{p-69dd585e.entry.js → p-cf022deb.entry.js} +1 -1
  92. package/dist/bromcom-ui/{p-f7215c0e.js → p-d22b7435.js} +1 -1
  93. package/dist/bromcom-ui/p-d7b9ab98.entry.js +5 -0
  94. package/dist/bromcom-ui/p-d9eaa208.entry.js +5 -0
  95. package/dist/bromcom-ui/p-dc290a64.entry.js +5 -0
  96. package/dist/bromcom-ui/p-dd2a36fa.entry.js +5 -0
  97. package/dist/bromcom-ui/{p-170cf07d.js → p-e037ee2b.js} +1 -1
  98. package/dist/bromcom-ui/{p-b4729876.entry.js → p-e321ccff.entry.js} +1 -1
  99. package/dist/bromcom-ui/{p-1c9314bd.entry.js → p-e32ab4da.entry.js} +1 -1
  100. package/dist/bromcom-ui/{p-85eedabc.js → p-e45c1546.js} +1 -1
  101. package/dist/bromcom-ui/{p-bacd1841.entry.js → p-e8f8aa3b.entry.js} +1 -1
  102. package/dist/bromcom-ui/p-eb6b6010.entry.js +5 -0
  103. package/dist/bromcom-ui/{p-e688b044.entry.js → p-f03e56b9.entry.js} +1 -1
  104. package/dist/bromcom-ui/{p-5898ecd1.entry.js → p-f0adf08c.entry.js} +1 -1
  105. package/dist/bromcom-ui/p-f709a2e2.entry.js +5 -0
  106. package/dist/bromcom-ui/p-f711588b.js +1 -1
  107. package/dist/bromcom-ui/{p-99824717.entry.js → p-f9119bec.entry.js} +1 -1
  108. package/dist/bromcom-ui/{p-d153c7fc.js → p-f95797df.js} +1 -1
  109. package/dist/bromcom-ui/{p-3c1b1624.entry.js → p-fa057fc4.entry.js} +1 -1
  110. package/dist/bromcom-ui/{p-59af8bab.entry.js → p-fa8300a2.entry.js} +1 -1
  111. package/dist/bromcom-ui/p-fbb959f4.entry.js +5 -0
  112. package/dist/bromcom-ui/{p-39ae9f7f.entry.js → p-fe88e003.entry.js} +1 -1
  113. package/dist/bromcom-ui/p-ff012d63.entry.js +5 -0
  114. package/dist/bromcom-ui/{p-49cb669b.entry.js → p-ff714da2.entry.js} +1 -1
  115. package/dist/bromcom-ui/p-ff8d5e17.entry.js +5 -0
  116. package/dist/cjs/{bcm-7f703055.js → bcm-9e47c4b2.js} +4 -4
  117. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  118. package/dist/cjs/bcm-alert.cjs.entry.js +4 -4
  119. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  120. package/dist/cjs/bcm-avatar_2.cjs.entry.js +11 -10
  121. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  122. package/dist/cjs/bcm-button-group.cjs.entry.js +7 -7
  123. package/dist/cjs/bcm-button.cjs.entry.js +372 -0
  124. package/dist/cjs/bcm-card.cjs.entry.js +5 -5
  125. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +25 -25
  126. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -6
  127. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +10 -10
  128. package/dist/cjs/bcm-chip-group.cjs.entry.js +10 -9
  129. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  130. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  131. package/dist/cjs/bcm-color-input.cjs.entry.js +7 -6
  132. package/dist/cjs/bcm-colorful_2.cjs.entry.js +17585 -0
  133. package/dist/cjs/bcm-date-picker.cjs.entry.js +182 -0
  134. package/dist/cjs/bcm-date.cjs.entry.js +182 -0
  135. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1451 -0
  136. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  137. package/dist/cjs/bcm-drawer.cjs.entry.js +9 -8
  138. package/dist/cjs/bcm-dropdown.cjs.entry.js +7 -7
  139. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +4 -4
  140. package/dist/cjs/bcm-form-2.cjs.entry.js +212 -0
  141. package/dist/cjs/bcm-form.cjs.entry.js +489 -0
  142. package/dist/cjs/bcm-icon.cjs.entry.js +39 -0
  143. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  144. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +9 -8
  145. package/dist/cjs/bcm-item.cjs.entry.js +4 -4
  146. package/dist/cjs/bcm-items.cjs.entry.js +4 -4
  147. package/dist/cjs/bcm-label_2.cjs.entry.js +126 -0
  148. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  149. package/dist/cjs/bcm-linked_2.cjs.entry.js +289 -0
  150. package/dist/cjs/bcm-list_3.cjs.entry.js +35 -33
  151. package/dist/cjs/bcm-menu.cjs.entry.js +9 -8
  152. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +7 -6
  153. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +7 -6
  154. package/dist/cjs/bcm-modal-2.cjs.entry.js +8 -7
  155. package/dist/cjs/bcm-modal.cjs.entry.js +13 -10
  156. package/dist/cjs/bcm-old-input.cjs.entry.js +397 -0
  157. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +5 -5
  158. package/dist/cjs/bcm-popconfirm.cjs.entry.js +5 -5
  159. package/dist/cjs/bcm-popover.cjs.entry.js +10 -9
  160. package/dist/cjs/bcm-progress.cjs.entry.js +4 -4
  161. package/dist/cjs/bcm-radio-group.cjs.entry.js +11 -10
  162. package/dist/cjs/bcm-radio.cjs.entry.js +14 -13
  163. package/dist/cjs/bcm-range.cjs.entry.js +6 -6
  164. package/dist/cjs/bcm-rc-picker.cjs.entry.js +9404 -0
  165. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  166. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  167. package/dist/cjs/bcm-stepper.cjs.entry.js +10 -9
  168. package/dist/cjs/bcm-switch.cjs.entry.js +9 -9
  169. package/dist/cjs/bcm-tab-group.cjs.entry.js +8 -7
  170. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +11 -10
  171. package/dist/cjs/bcm-tab-item.cjs.entry.js +7 -6
  172. package/dist/cjs/bcm-table.cjs.entry.js +7 -6
  173. package/dist/cjs/bcm-tag.cjs.entry.js +15 -15
  174. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  175. package/dist/cjs/bcm-textarea.cjs.entry.js +7 -7
  176. package/dist/cjs/bcm-time-picker.cjs.entry.js +150 -0
  177. package/dist/cjs/bcm-toast.cjs.entry.js +11 -11
  178. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  179. package/dist/cjs/datetime-helper-eaf4fadb.js +11 -0
  180. package/dist/cjs/{floating-ui-b441ea7c.js → floating-ui-4a2c2bd4.js} +2 -2
  181. package/dist/cjs/{generate-7bd78318.js → generate-efeda203.js} +1 -1
  182. package/dist/cjs/{global-aca5c011.js → global-38efbdd7.js} +1 -1
  183. package/dist/cjs/index-3d67f613.js +1610 -0
  184. package/dist/cjs/{index-7eed931f.js → index-e05a7c6f.js} +24 -1625
  185. package/dist/cjs/{input-template-4952273e.js → input-template-c1e96592.js} +6 -6
  186. package/dist/cjs/{json-parse-decarator-7529151b.js → json-parse-decarator-7d2677f0.js} +1 -1
  187. package/dist/cjs/{label-template-80235581.js → label-template-d531dfb7.js} +3 -3
  188. package/dist/cjs/loader.cjs.js +3 -3
  189. package/dist/cjs/moment-d06b012f.js +4601 -0
  190. package/dist/cjs/{number-helper-6c8e0d90.js → number-helper-b178b610.js} +1 -1
  191. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +7 -7
  192. package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -5
  193. package/dist/cjs/{package-21f7555f.js → package-2899048c.js} +1 -1
  194. package/dist/cjs/{popover-placement-f20020a6.js → popover-placement-4156a9ec.js} +1 -1
  195. package/dist/cjs/{slot-template-873b0cd5.js → slot-template-46018683.js} +1 -1
  196. package/dist/cjs/{stepper-states-736e2aa7.js → stepper-states-9bd52bd4.js} +1 -1
  197. package/dist/cjs/{string-helper-fda7cbba.js → string-helper-4cd32dbb.js} +2 -2
  198. package/dist/cjs/{tooltip-helper-0475ad78.js → tooltip-helper-f828ebee.js} +10 -9
  199. package/dist/cjs/{validators-9b9662d9.js → validators-2adde99d.js} +1 -6
  200. package/dist/collection/components/molecules/modal/modal.js +22 -5
  201. package/dist/collection/components/molecules/skeleton/skeleton.css +133 -0
  202. package/dist/collection/components/molecules/skeleton/skeleton.js +167 -26
  203. package/dist/collection/components/molecules/skeleton/skeleton.style.js +35 -0
  204. package/dist/collection/components/organism/list/list.js +2 -2
  205. package/dist/components/bcm-modal.js +7 -4
  206. package/dist/components/generate.js +1 -1
  207. package/dist/components/list.js +2 -2
  208. package/dist/components/skeleton.js +75 -23
  209. package/dist/esm/{_commonjsHelpers-7002e5de.js → _commonjsHelpers-be0d4ec8.js} +1 -1
  210. package/dist/esm/bcm-accordion.entry.js +5 -5
  211. package/dist/esm/bcm-alert.entry.js +8 -8
  212. package/dist/esm/bcm-attendance.entry.js +5 -5
  213. package/dist/esm/bcm-autocomplete.entry.js +3 -3
  214. package/dist/esm/bcm-avatar_2.entry.js +13 -12
  215. package/dist/esm/bcm-box.entry.js +1 -1
  216. package/dist/esm/bcm-breadcrumb.entry.js +6 -6
  217. package/dist/esm/bcm-button-group.entry.js +8 -8
  218. package/dist/esm/bcm-button.entry.js +368 -0
  219. package/dist/esm/bcm-card.entry.js +10 -10
  220. package/dist/esm/bcm-checkbox-group.entry.js +19 -19
  221. package/dist/esm/bcm-checkbox-lite_9.entry.js +8 -8
  222. package/dist/esm/bcm-checkbox_2.entry.js +13 -13
  223. package/dist/esm/bcm-chip-group.entry.js +17 -16
  224. package/dist/esm/bcm-chip.entry.js +8 -8
  225. package/dist/esm/bcm-collapse-group.entry.js +2 -2
  226. package/dist/esm/bcm-collapse.entry.js +6 -6
  227. package/dist/esm/bcm-color-input.entry.js +12 -11
  228. package/dist/esm/bcm-colorful_2.entry.js +17580 -0
  229. package/dist/esm/bcm-colorpicker.entry.js +5 -5
  230. package/dist/esm/bcm-content.entry.js +1 -1
  231. package/dist/esm/bcm-d45dc47d.js +1 -1
  232. package/dist/esm/bcm-date-picker.entry.js +178 -0
  233. package/dist/esm/bcm-date.entry.js +178 -0
  234. package/dist/esm/bcm-datetime-picker.entry.js +1447 -0
  235. package/dist/esm/bcm-default.entry.js +5 -5
  236. package/dist/esm/bcm-drawer.entry.js +14 -13
  237. package/dist/esm/bcm-dropdown.entry.js +9 -9
  238. package/dist/esm/bcm-error-layout.entry.js +3 -3
  239. package/dist/esm/bcm-expansion-panel.entry.js +9 -9
  240. package/dist/esm/bcm-form-2.entry.js +208 -0
  241. package/dist/esm/bcm-form-group.entry.js +1 -1
  242. package/dist/esm/bcm-form.entry.js +485 -0
  243. package/dist/esm/bcm-icon.entry.js +35 -0
  244. package/dist/esm/bcm-input-custom.entry.js +6 -6
  245. package/dist/esm/bcm-input-dropdown.entry.js +15 -14
  246. package/dist/esm/bcm-item.entry.js +9 -9
  247. package/dist/esm/bcm-items.entry.js +6 -6
  248. package/dist/esm/bcm-label_2.entry.js +121 -0
  249. package/dist/esm/bcm-link.entry.js +4 -4
  250. package/dist/esm/bcm-linked_2.entry.js +284 -0
  251. package/dist/esm/bcm-list_3.entry.js +24 -22
  252. package/dist/esm/bcm-menu.entry.js +15 -14
  253. package/dist/esm/bcm-message.entry.js +3 -3
  254. package/dist/esm/bcm-modal-2-footer.entry.js +13 -12
  255. package/dist/esm/bcm-modal-2-header.entry.js +12 -11
  256. package/dist/esm/bcm-modal-2.entry.js +14 -13
  257. package/dist/esm/bcm-modal.entry.js +15 -12
  258. package/dist/esm/bcm-notification.entry.js +3 -3
  259. package/dist/esm/bcm-old-input.entry.js +393 -0
  260. package/dist/esm/bcm-old-tag_2.entry.js +4 -4
  261. package/dist/esm/bcm-overlay_2.entry.js +4 -4
  262. package/dist/esm/bcm-popconfirm-box.entry.js +10 -10
  263. package/dist/esm/bcm-popconfirm.entry.js +7 -7
  264. package/dist/esm/bcm-popover.entry.js +13 -12
  265. package/dist/esm/bcm-progress.entry.js +9 -9
  266. package/dist/esm/bcm-radio-group.entry.js +16 -15
  267. package/dist/esm/bcm-radio.entry.js +14 -13
  268. package/dist/esm/bcm-range.entry.js +8 -8
  269. package/dist/esm/bcm-rc-picker.entry.js +9400 -0
  270. package/dist/esm/bcm-result.entry.js +3 -3
  271. package/dist/esm/bcm-select-group.entry.js +3 -3
  272. package/dist/esm/bcm-select-option.entry.js +3 -3
  273. package/dist/esm/bcm-select.entry.js +5 -5
  274. package/dist/esm/bcm-step.entry.js +8 -8
  275. package/dist/esm/bcm-stepper.entry.js +16 -15
  276. package/dist/esm/bcm-switch.entry.js +10 -10
  277. package/dist/esm/bcm-tab-group.entry.js +13 -12
  278. package/dist/esm/bcm-tab-item-header.entry.js +14 -13
  279. package/dist/esm/bcm-tab-item.entry.js +12 -11
  280. package/dist/esm/bcm-tab-pane.entry.js +3 -3
  281. package/dist/esm/bcm-tab.entry.js +3 -3
  282. package/dist/esm/bcm-table.entry.js +13 -12
  283. package/dist/esm/bcm-tabs-content.entry.js +4 -4
  284. package/dist/esm/bcm-tabs.entry.js +4 -4
  285. package/dist/esm/bcm-tag.entry.js +9 -9
  286. package/dist/esm/bcm-text.entry.js +8 -8
  287. package/dist/esm/bcm-textarea.entry.js +11 -11
  288. package/dist/esm/bcm-time-picker.entry.js +146 -0
  289. package/dist/esm/bcm-timeline-item.entry.js +3 -3
  290. package/dist/esm/bcm-timeline.entry.js +3 -3
  291. package/dist/esm/bcm-toast.entry.js +9 -9
  292. package/dist/esm/bcm-treeview-group.entry.js +1 -1
  293. package/dist/esm/bromcom-ui.js +5 -5
  294. package/dist/esm/{caption-template-d47f338f.js → caption-template-a1a968fd.js} +2 -2
  295. package/dist/esm/{color-helper-845ba523.js → color-helper-c4fa9ebc.js} +2 -2
  296. package/dist/esm/{colors-ebea297f.js → colors-e1c31f79.js} +1 -1
  297. package/dist/esm/datetime-helper-df25808a.js +9 -0
  298. package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
  299. package/dist/esm/floating-ui-8a0c54d6.js +1 -1
  300. package/dist/esm/{generate-c80869fa.js → generate-40dfe3b0.js} +2 -2
  301. package/dist/esm/{global-55ab75e6.js → global-85f037ac.js} +2 -2
  302. package/dist/esm/{index-0615c2b8.js → index-4614b7f0.js} +1 -1
  303. package/dist/esm/{index-e4b6a4ce.js → index-a6d9d0af.js} +26 -1612
  304. package/dist/esm/{index-00c8a8f7.js → index-b84bc8c9.js} +1 -1
  305. package/dist/esm/index-c4568336.js +1594 -0
  306. package/dist/esm/{index-7e71bbc8.js → index-f38e3364.js} +1 -1
  307. package/dist/esm/{input-template-82ba633e.js → input-template-92b19880.js} +4 -4
  308. package/dist/esm/{is-load-decorator-8277e3b8.js → is-load-decorator-b8ca22f2.js} +1 -1
  309. package/dist/esm/{json-parse-decarator-fb399cf2.js → json-parse-decarator-f4803289.js} +2 -2
  310. package/dist/esm/{label-template-946d4062.js → label-template-54c28821.js} +4 -4
  311. package/dist/esm/loader.js +5 -5
  312. package/dist/esm/moment-15cd9198.js +4598 -0
  313. package/dist/esm/{number-helper-2eb7011a.js → number-helper-352d1d80.js} +1 -1
  314. package/dist/esm/old-bcm-popover-box.entry.js +11 -11
  315. package/dist/esm/old-bcm-popover.entry.js +7 -7
  316. package/dist/esm/{package-20c9971a.js → package-1618c1e9.js} +1 -1
  317. package/dist/esm/{popover-placement-be68c848.js → popover-placement-941bf3f3.js} +1 -1
  318. package/dist/esm/{slot-template-fcc7846e.js → slot-template-4b683d1f.js} +2 -2
  319. package/dist/esm/{stepper-states-f497b41f.js → stepper-states-08b2aa7c.js} +3 -3
  320. package/dist/esm/{string-helper-b0e05041.js → string-helper-5bd646f2.js} +2 -2
  321. package/dist/esm/{tooltip-helper-8eff46a3.js → tooltip-helper-d538cdf3.js} +9 -8
  322. package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
  323. package/dist/esm/{validators-81296897.js → validators-68717171.js} +2 -6
  324. package/dist/types/components/molecules/modal/modal.d.ts +1 -0
  325. package/dist/types/components/molecules/skeleton/skeleton.d.ts +14 -3
  326. package/dist/types/components/molecules/skeleton/skeleton.style.d.ts +147 -0
  327. package/dist/types/components.d.ts +17 -2
  328. package/package.json +4 -1
  329. package/dist/bromcom-ui/p-07fe2bbc.entry.js +0 -5
  330. package/dist/bromcom-ui/p-0cf6e779.entry.js +0 -5
  331. package/dist/bromcom-ui/p-0fdaadf9.entry.js +0 -7
  332. package/dist/bromcom-ui/p-228c74e9.entry.js +0 -5
  333. package/dist/bromcom-ui/p-27b52583.js +0 -5
  334. package/dist/bromcom-ui/p-30bd67ba.js +0 -5
  335. package/dist/bromcom-ui/p-310da4b9.entry.js +0 -5
  336. package/dist/bromcom-ui/p-33014b15.entry.js +0 -5
  337. package/dist/bromcom-ui/p-338ace45.entry.js +0 -5
  338. package/dist/bromcom-ui/p-3432a82d.js +0 -19
  339. package/dist/bromcom-ui/p-3d86a6c3.entry.js +0 -5
  340. package/dist/bromcom-ui/p-3e68c7d0.js +0 -5
  341. package/dist/bromcom-ui/p-438689a5.entry.js +0 -5
  342. package/dist/bromcom-ui/p-4acc1848.entry.js +0 -5
  343. package/dist/bromcom-ui/p-4dad64ed.entry.js +0 -5
  344. package/dist/bromcom-ui/p-543af368.entry.js +0 -5
  345. package/dist/bromcom-ui/p-5797aab3.entry.js +0 -5
  346. package/dist/bromcom-ui/p-5871767a.entry.js +0 -5
  347. package/dist/bromcom-ui/p-5e2a0bda.js +0 -5
  348. package/dist/bromcom-ui/p-5fb8a43a.entry.js +0 -5
  349. package/dist/bromcom-ui/p-60a8f967.entry.js +0 -5
  350. package/dist/bromcom-ui/p-64fad38b.js +0 -11
  351. package/dist/bromcom-ui/p-67244c91.entry.js +0 -5
  352. package/dist/bromcom-ui/p-7cb30513.js +0 -5
  353. package/dist/bromcom-ui/p-8279be1f.entry.js +0 -5
  354. package/dist/bromcom-ui/p-97527e91.entry.js +0 -5
  355. package/dist/bromcom-ui/p-9fe07d94.entry.js +0 -5
  356. package/dist/bromcom-ui/p-ae57f046.entry.js +0 -5
  357. package/dist/bromcom-ui/p-b3d495fd.js +0 -5
  358. package/dist/bromcom-ui/p-b81e8f91.js +0 -5
  359. package/dist/bromcom-ui/p-b8646a61.entry.js +0 -5
  360. package/dist/bromcom-ui/p-bfd24601.entry.js +0 -5
  361. package/dist/bromcom-ui/p-cc52cff4.entry.js +0 -5
  362. package/dist/bromcom-ui/p-ccf0872d.js +0 -5
  363. package/dist/bromcom-ui/p-d3f182c1.entry.js +0 -5
  364. package/dist/bromcom-ui/p-ea701411.js +0 -5
  365. package/dist/bromcom-ui/p-f2c1ffb4.entry.js +0 -5
  366. package/dist/cjs/bcm-button_15.cjs.entry.js +0 -35172
  367. package/dist/cjs/bcm-skeleton.cjs.entry.js +0 -45
  368. package/dist/esm/bcm-button_15.entry.js +0 -35154
  369. package/dist/esm/bcm-skeleton.entry.js +0 -41
@@ -0,0 +1,1594 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { r as react, a as reactDom } from './index-a6d9d0af.js';
6
+ import { c as createCommonjsModule } from './_commonjsHelpers-be0d4ec8.js';
7
+
8
+ function useEvent(callback) {
9
+ var fnRef = react.useRef();
10
+ fnRef.current = callback;
11
+ var memoFn = react.useCallback(function () {
12
+ var _fnRef$current;
13
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
14
+ args[_key] = arguments[_key];
15
+ }
16
+ return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
17
+ }, []);
18
+ return memoFn;
19
+ }
20
+
21
+ function canUseDom() {
22
+ return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
23
+ }
24
+
25
+ /**
26
+ * Wrap `React.useLayoutEffect` which will not throw warning message in test env
27
+ */
28
+ var useInternalLayoutEffect = canUseDom() ? react.useLayoutEffect : react.useEffect;
29
+ var useLayoutEffect = function useLayoutEffect(callback, deps) {
30
+ var firstMountRef = react.useRef(true);
31
+ useInternalLayoutEffect(function () {
32
+ return callback(firstMountRef.current);
33
+ }, deps);
34
+
35
+ // We tell react that first mount has passed
36
+ useInternalLayoutEffect(function () {
37
+ firstMountRef.current = false;
38
+ return function () {
39
+ firstMountRef.current = true;
40
+ };
41
+ }, []);
42
+ };
43
+ var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
44
+ useLayoutEffect(function (firstMount) {
45
+ if (!firstMount) {
46
+ return callback();
47
+ }
48
+ }, deps);
49
+ };
50
+
51
+ /* eslint-disable no-console */
52
+ var warned = {};
53
+
54
+ /**
55
+ * Pre warning enable you to parse content before console.error.
56
+ * Modify to null will prevent warning.
57
+ */
58
+ var preMessage = function preMessage(fn) {
59
+ };
60
+ function warning(valid, message) {
61
+ }
62
+ function note(valid, message) {
63
+ }
64
+ function resetWarned() {
65
+ warned = {};
66
+ }
67
+ function call(method, valid, message) {
68
+ if (!valid && !warned[message]) {
69
+ method(false, message);
70
+ warned[message] = true;
71
+ }
72
+ }
73
+ function warningOnce(valid, message) {
74
+ call(warning, valid, message);
75
+ }
76
+ function noteOnce(valid, message) {
77
+ call(note, valid, message);
78
+ }
79
+ warningOnce.preMessage = preMessage;
80
+ warningOnce.resetWarned = resetWarned;
81
+ warningOnce.noteOnce = noteOnce;
82
+ /* eslint-enable */
83
+
84
+ function _typeof$1(obj) {
85
+ "@babel/helpers - typeof";
86
+
87
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
88
+ return typeof obj;
89
+ } : function (obj) {
90
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
91
+ }, _typeof$1(obj);
92
+ }
93
+
94
+ function useMemo(getValue, condition, shouldUpdate) {
95
+ var cacheRef = react.useRef({});
96
+ if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
97
+ cacheRef.current.value = getValue();
98
+ cacheRef.current.condition = condition;
99
+ }
100
+ return cacheRef.current.value;
101
+ }
102
+
103
+ var raf = function raf(callback) {
104
+ return +setTimeout(callback, 16);
105
+ };
106
+ var caf = function caf(num) {
107
+ return clearTimeout(num);
108
+ };
109
+ if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
110
+ raf = function raf(callback) {
111
+ return window.requestAnimationFrame(callback);
112
+ };
113
+ caf = function caf(handle) {
114
+ return window.cancelAnimationFrame(handle);
115
+ };
116
+ }
117
+ var rafUUID = 0;
118
+ var rafIds = new Map();
119
+ function cleanup(id) {
120
+ rafIds.delete(id);
121
+ }
122
+ var wrapperRaf = function wrapperRaf(callback) {
123
+ var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
124
+ rafUUID += 1;
125
+ var id = rafUUID;
126
+ function callRef(leftTimes) {
127
+ if (leftTimes === 0) {
128
+ // Clean up
129
+ cleanup(id);
130
+
131
+ // Trigger
132
+ callback();
133
+ } else {
134
+ // Next raf
135
+ var realId = raf(function () {
136
+ callRef(leftTimes - 1);
137
+ });
138
+
139
+ // Bind real raf id
140
+ rafIds.set(id, realId);
141
+ }
142
+ }
143
+ callRef(times);
144
+ return id;
145
+ };
146
+ wrapperRaf.cancel = function (id) {
147
+ var realId = rafIds.get(id);
148
+ cleanup(realId);
149
+ return caf(realId);
150
+ };
151
+
152
+ /** @license React v16.13.1
153
+ * react-is.production.min.js
154
+ *
155
+ * Copyright (c) Facebook, Inc. and its affiliates.
156
+ *
157
+ * This source code is licensed under the MIT license found in the
158
+ * LICENSE file in the root directory of this source tree.
159
+ */
160
+ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
161
+ Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
162
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element$1=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
163
+ var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
164
+ var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
165
+ var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
166
+
167
+ var reactIs_production_min = {
168
+ AsyncMode: AsyncMode,
169
+ ConcurrentMode: ConcurrentMode,
170
+ ContextConsumer: ContextConsumer,
171
+ ContextProvider: ContextProvider,
172
+ Element: Element$1,
173
+ ForwardRef: ForwardRef,
174
+ Fragment: Fragment,
175
+ Lazy: Lazy,
176
+ Memo: Memo,
177
+ Portal: Portal,
178
+ Profiler: Profiler,
179
+ StrictMode: StrictMode,
180
+ Suspense: Suspense,
181
+ isAsyncMode: isAsyncMode,
182
+ isConcurrentMode: isConcurrentMode,
183
+ isContextConsumer: isContextConsumer,
184
+ isContextProvider: isContextProvider,
185
+ isElement: isElement,
186
+ isForwardRef: isForwardRef,
187
+ isFragment: isFragment,
188
+ isLazy: isLazy,
189
+ isMemo: isMemo,
190
+ isPortal: isPortal,
191
+ isProfiler: isProfiler,
192
+ isStrictMode: isStrictMode,
193
+ isSuspense: isSuspense,
194
+ isValidElementType: isValidElementType,
195
+ typeOf: typeOf
196
+ };
197
+
198
+ createCommonjsModule(function (module, exports) {
199
+ });
200
+
201
+ var reactIs = createCommonjsModule(function (module) {
202
+
203
+ {
204
+ module.exports = reactIs_production_min;
205
+ }
206
+ });
207
+
208
+ function fillRef(ref, node) {
209
+ if (typeof ref === 'function') {
210
+ ref(node);
211
+ } else if (_typeof$1(ref) === 'object' && ref && 'current' in ref) {
212
+ ref.current = node;
213
+ }
214
+ }
215
+
216
+ /**
217
+ * Merge refs into one ref function to support ref passing.
218
+ */
219
+ function composeRef() {
220
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
221
+ refs[_key] = arguments[_key];
222
+ }
223
+ var refList = refs.filter(function (ref) {
224
+ return ref;
225
+ });
226
+ if (refList.length <= 1) {
227
+ return refList[0];
228
+ }
229
+ return function (node) {
230
+ refs.forEach(function (ref) {
231
+ fillRef(ref, node);
232
+ });
233
+ };
234
+ }
235
+ function useComposeRef() {
236
+ for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
237
+ refs[_key2] = arguments[_key2];
238
+ }
239
+ return useMemo(function () {
240
+ return composeRef.apply(void 0, refs);
241
+ }, refs, function (prev, next) {
242
+ return prev.length === next.length && prev.every(function (ref, i) {
243
+ return ref === next[i];
244
+ });
245
+ });
246
+ }
247
+ function supportRef(nodeOrComponent) {
248
+ var _type$prototype, _nodeOrComponent$prot;
249
+ var type = reactIs.isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
250
+
251
+ // Function component node
252
+ if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {
253
+ return false;
254
+ }
255
+
256
+ // Class component
257
+ if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {
258
+ return false;
259
+ }
260
+ return true;
261
+ }
262
+ /* eslint-enable */
263
+
264
+ function _extends() {
265
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
266
+ for (var i = 1; i < arguments.length; i++) {
267
+ var source = arguments[i];
268
+ for (var key in source) {
269
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
270
+ target[key] = source[key];
271
+ }
272
+ }
273
+ }
274
+ return target;
275
+ };
276
+ return _extends.apply(this, arguments);
277
+ }
278
+
279
+ function toArray(children) {
280
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
281
+ var ret = [];
282
+ react.Children.forEach(children, function (child) {
283
+ if ((child === undefined || child === null) && !option.keepEmpty) {
284
+ return;
285
+ }
286
+ if (Array.isArray(child)) {
287
+ ret = ret.concat(toArray(child));
288
+ } else if (reactIs.isFragment(child) && child.props) {
289
+ ret = ret.concat(toArray(child.props.children, option));
290
+ } else {
291
+ ret.push(child);
292
+ }
293
+ });
294
+ return ret;
295
+ }
296
+
297
+ function _typeof(obj) {
298
+ "@babel/helpers - typeof";
299
+
300
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
301
+ return typeof obj;
302
+ } : function (obj) {
303
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
304
+ }, _typeof(obj);
305
+ }
306
+
307
+ function _toPrimitive(input, hint) {
308
+ if (_typeof(input) !== "object" || input === null) return input;
309
+ var prim = input[Symbol.toPrimitive];
310
+ if (prim !== undefined) {
311
+ var res = prim.call(input, hint || "default");
312
+ if (_typeof(res) !== "object") return res;
313
+ throw new TypeError("@@toPrimitive must return a primitive value.");
314
+ }
315
+ return (hint === "string" ? String : Number)(input);
316
+ }
317
+
318
+ function _toPropertyKey(arg) {
319
+ var key = _toPrimitive(arg, "string");
320
+ return _typeof(key) === "symbol" ? key : String(key);
321
+ }
322
+
323
+ function _defineProperty(obj, key, value) {
324
+ key = _toPropertyKey(key);
325
+ if (key in obj) {
326
+ Object.defineProperty(obj, key, {
327
+ value: value,
328
+ enumerable: true,
329
+ configurable: true,
330
+ writable: true
331
+ });
332
+ } else {
333
+ obj[key] = value;
334
+ }
335
+ return obj;
336
+ }
337
+
338
+ function ownKeys(object, enumerableOnly) {
339
+ var keys = Object.keys(object);
340
+ if (Object.getOwnPropertySymbols) {
341
+ var symbols = Object.getOwnPropertySymbols(object);
342
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
343
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
344
+ })), keys.push.apply(keys, symbols);
345
+ }
346
+ return keys;
347
+ }
348
+ function _objectSpread2(target) {
349
+ for (var i = 1; i < arguments.length; i++) {
350
+ var source = null != arguments[i] ? arguments[i] : {};
351
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
352
+ _defineProperty(target, key, source[key]);
353
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
354
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
355
+ });
356
+ }
357
+ return target;
358
+ }
359
+
360
+ function isDOM(node) {
361
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element
362
+ // Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
363
+ return node instanceof HTMLElement || node instanceof SVGElement;
364
+ }
365
+
366
+ /**
367
+ * Return if a node is a DOM node. Else will return by `findDOMNode`
368
+ */
369
+ function findDOMNode(node) {
370
+ if (isDOM(node)) {
371
+ return node;
372
+ }
373
+ if (node instanceof react.Component) {
374
+ return reactDom.findDOMNode(node);
375
+ }
376
+ return null;
377
+ }
378
+
379
+ /**
380
+ * A collection of shims that provide minimal functionality of the ES6 collections.
381
+ *
382
+ * These implementations are not meant to be used outside of the ResizeObserver
383
+ * modules as they cover only a limited range of use cases.
384
+ */
385
+ /* eslint-disable require-jsdoc, valid-jsdoc */
386
+ var MapShim = (function () {
387
+ if (typeof Map !== 'undefined') {
388
+ return Map;
389
+ }
390
+ /**
391
+ * Returns index in provided array that matches the specified key.
392
+ *
393
+ * @param {Array<Array>} arr
394
+ * @param {*} key
395
+ * @returns {number}
396
+ */
397
+ function getIndex(arr, key) {
398
+ var result = -1;
399
+ arr.some(function (entry, index) {
400
+ if (entry[0] === key) {
401
+ result = index;
402
+ return true;
403
+ }
404
+ return false;
405
+ });
406
+ return result;
407
+ }
408
+ return /** @class */ (function () {
409
+ function class_1() {
410
+ this.__entries__ = [];
411
+ }
412
+ Object.defineProperty(class_1.prototype, "size", {
413
+ /**
414
+ * @returns {boolean}
415
+ */
416
+ get: function () {
417
+ return this.__entries__.length;
418
+ },
419
+ enumerable: true,
420
+ configurable: true
421
+ });
422
+ /**
423
+ * @param {*} key
424
+ * @returns {*}
425
+ */
426
+ class_1.prototype.get = function (key) {
427
+ var index = getIndex(this.__entries__, key);
428
+ var entry = this.__entries__[index];
429
+ return entry && entry[1];
430
+ };
431
+ /**
432
+ * @param {*} key
433
+ * @param {*} value
434
+ * @returns {void}
435
+ */
436
+ class_1.prototype.set = function (key, value) {
437
+ var index = getIndex(this.__entries__, key);
438
+ if (~index) {
439
+ this.__entries__[index][1] = value;
440
+ }
441
+ else {
442
+ this.__entries__.push([key, value]);
443
+ }
444
+ };
445
+ /**
446
+ * @param {*} key
447
+ * @returns {void}
448
+ */
449
+ class_1.prototype.delete = function (key) {
450
+ var entries = this.__entries__;
451
+ var index = getIndex(entries, key);
452
+ if (~index) {
453
+ entries.splice(index, 1);
454
+ }
455
+ };
456
+ /**
457
+ * @param {*} key
458
+ * @returns {void}
459
+ */
460
+ class_1.prototype.has = function (key) {
461
+ return !!~getIndex(this.__entries__, key);
462
+ };
463
+ /**
464
+ * @returns {void}
465
+ */
466
+ class_1.prototype.clear = function () {
467
+ this.__entries__.splice(0);
468
+ };
469
+ /**
470
+ * @param {Function} callback
471
+ * @param {*} [ctx=null]
472
+ * @returns {void}
473
+ */
474
+ class_1.prototype.forEach = function (callback, ctx) {
475
+ if (ctx === void 0) { ctx = null; }
476
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
477
+ var entry = _a[_i];
478
+ callback.call(ctx, entry[1], entry[0]);
479
+ }
480
+ };
481
+ return class_1;
482
+ }());
483
+ })();
484
+
485
+ /**
486
+ * Detects whether window and document objects are available in current environment.
487
+ */
488
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
489
+
490
+ // Returns global object of a current environment.
491
+ var global$1 = (function () {
492
+ if (typeof global !== 'undefined' && global.Math === Math) {
493
+ return global;
494
+ }
495
+ if (typeof self !== 'undefined' && self.Math === Math) {
496
+ return self;
497
+ }
498
+ if (typeof window !== 'undefined' && window.Math === Math) {
499
+ return window;
500
+ }
501
+ // eslint-disable-next-line no-new-func
502
+ return Function('return this')();
503
+ })();
504
+
505
+ /**
506
+ * A shim for the requestAnimationFrame which falls back to the setTimeout if
507
+ * first one is not supported.
508
+ *
509
+ * @returns {number} Requests' identifier.
510
+ */
511
+ var requestAnimationFrame$1 = (function () {
512
+ if (typeof requestAnimationFrame === 'function') {
513
+ // It's required to use a bounded function because IE sometimes throws
514
+ // an "Invalid calling object" error if rAF is invoked without the global
515
+ // object on the left hand side.
516
+ return requestAnimationFrame.bind(global$1);
517
+ }
518
+ return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
519
+ })();
520
+
521
+ // Defines minimum timeout before adding a trailing call.
522
+ var trailingTimeout = 2;
523
+ /**
524
+ * Creates a wrapper function which ensures that provided callback will be
525
+ * invoked only once during the specified delay period.
526
+ *
527
+ * @param {Function} callback - Function to be invoked after the delay period.
528
+ * @param {number} delay - Delay after which to invoke callback.
529
+ * @returns {Function}
530
+ */
531
+ function throttle (callback, delay) {
532
+ var leadingCall = false, trailingCall = false, lastCallTime = 0;
533
+ /**
534
+ * Invokes the original callback function and schedules new invocation if
535
+ * the "proxy" was called during current request.
536
+ *
537
+ * @returns {void}
538
+ */
539
+ function resolvePending() {
540
+ if (leadingCall) {
541
+ leadingCall = false;
542
+ callback();
543
+ }
544
+ if (trailingCall) {
545
+ proxy();
546
+ }
547
+ }
548
+ /**
549
+ * Callback invoked after the specified delay. It will further postpone
550
+ * invocation of the original function delegating it to the
551
+ * requestAnimationFrame.
552
+ *
553
+ * @returns {void}
554
+ */
555
+ function timeoutCallback() {
556
+ requestAnimationFrame$1(resolvePending);
557
+ }
558
+ /**
559
+ * Schedules invocation of the original function.
560
+ *
561
+ * @returns {void}
562
+ */
563
+ function proxy() {
564
+ var timeStamp = Date.now();
565
+ if (leadingCall) {
566
+ // Reject immediately following calls.
567
+ if (timeStamp - lastCallTime < trailingTimeout) {
568
+ return;
569
+ }
570
+ // Schedule new call to be in invoked when the pending one is resolved.
571
+ // This is important for "transitions" which never actually start
572
+ // immediately so there is a chance that we might miss one if change
573
+ // happens amids the pending invocation.
574
+ trailingCall = true;
575
+ }
576
+ else {
577
+ leadingCall = true;
578
+ trailingCall = false;
579
+ setTimeout(timeoutCallback, delay);
580
+ }
581
+ lastCallTime = timeStamp;
582
+ }
583
+ return proxy;
584
+ }
585
+
586
+ // Minimum delay before invoking the update of observers.
587
+ var REFRESH_DELAY = 20;
588
+ // A list of substrings of CSS properties used to find transition events that
589
+ // might affect dimensions of observed elements.
590
+ var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
591
+ // Check if MutationObserver is available.
592
+ var mutationObserverSupported = typeof MutationObserver !== 'undefined';
593
+ /**
594
+ * Singleton controller class which handles updates of ResizeObserver instances.
595
+ */
596
+ var ResizeObserverController = /** @class */ (function () {
597
+ /**
598
+ * Creates a new instance of ResizeObserverController.
599
+ *
600
+ * @private
601
+ */
602
+ function ResizeObserverController() {
603
+ /**
604
+ * Indicates whether DOM listeners have been added.
605
+ *
606
+ * @private {boolean}
607
+ */
608
+ this.connected_ = false;
609
+ /**
610
+ * Tells that controller has subscribed for Mutation Events.
611
+ *
612
+ * @private {boolean}
613
+ */
614
+ this.mutationEventsAdded_ = false;
615
+ /**
616
+ * Keeps reference to the instance of MutationObserver.
617
+ *
618
+ * @private {MutationObserver}
619
+ */
620
+ this.mutationsObserver_ = null;
621
+ /**
622
+ * A list of connected observers.
623
+ *
624
+ * @private {Array<ResizeObserverSPI>}
625
+ */
626
+ this.observers_ = [];
627
+ this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
628
+ this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
629
+ }
630
+ /**
631
+ * Adds observer to observers list.
632
+ *
633
+ * @param {ResizeObserverSPI} observer - Observer to be added.
634
+ * @returns {void}
635
+ */
636
+ ResizeObserverController.prototype.addObserver = function (observer) {
637
+ if (!~this.observers_.indexOf(observer)) {
638
+ this.observers_.push(observer);
639
+ }
640
+ // Add listeners if they haven't been added yet.
641
+ if (!this.connected_) {
642
+ this.connect_();
643
+ }
644
+ };
645
+ /**
646
+ * Removes observer from observers list.
647
+ *
648
+ * @param {ResizeObserverSPI} observer - Observer to be removed.
649
+ * @returns {void}
650
+ */
651
+ ResizeObserverController.prototype.removeObserver = function (observer) {
652
+ var observers = this.observers_;
653
+ var index = observers.indexOf(observer);
654
+ // Remove observer if it's present in registry.
655
+ if (~index) {
656
+ observers.splice(index, 1);
657
+ }
658
+ // Remove listeners if controller has no connected observers.
659
+ if (!observers.length && this.connected_) {
660
+ this.disconnect_();
661
+ }
662
+ };
663
+ /**
664
+ * Invokes the update of observers. It will continue running updates insofar
665
+ * it detects changes.
666
+ *
667
+ * @returns {void}
668
+ */
669
+ ResizeObserverController.prototype.refresh = function () {
670
+ var changesDetected = this.updateObservers_();
671
+ // Continue running updates if changes have been detected as there might
672
+ // be future ones caused by CSS transitions.
673
+ if (changesDetected) {
674
+ this.refresh();
675
+ }
676
+ };
677
+ /**
678
+ * Updates every observer from observers list and notifies them of queued
679
+ * entries.
680
+ *
681
+ * @private
682
+ * @returns {boolean} Returns "true" if any observer has detected changes in
683
+ * dimensions of it's elements.
684
+ */
685
+ ResizeObserverController.prototype.updateObservers_ = function () {
686
+ // Collect observers that have active observations.
687
+ var activeObservers = this.observers_.filter(function (observer) {
688
+ return observer.gatherActive(), observer.hasActive();
689
+ });
690
+ // Deliver notifications in a separate cycle in order to avoid any
691
+ // collisions between observers, e.g. when multiple instances of
692
+ // ResizeObserver are tracking the same element and the callback of one
693
+ // of them changes content dimensions of the observed target. Sometimes
694
+ // this may result in notifications being blocked for the rest of observers.
695
+ activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
696
+ return activeObservers.length > 0;
697
+ };
698
+ /**
699
+ * Initializes DOM listeners.
700
+ *
701
+ * @private
702
+ * @returns {void}
703
+ */
704
+ ResizeObserverController.prototype.connect_ = function () {
705
+ // Do nothing if running in a non-browser environment or if listeners
706
+ // have been already added.
707
+ if (!isBrowser || this.connected_) {
708
+ return;
709
+ }
710
+ // Subscription to the "Transitionend" event is used as a workaround for
711
+ // delayed transitions. This way it's possible to capture at least the
712
+ // final state of an element.
713
+ document.addEventListener('transitionend', this.onTransitionEnd_);
714
+ window.addEventListener('resize', this.refresh);
715
+ if (mutationObserverSupported) {
716
+ this.mutationsObserver_ = new MutationObserver(this.refresh);
717
+ this.mutationsObserver_.observe(document, {
718
+ attributes: true,
719
+ childList: true,
720
+ characterData: true,
721
+ subtree: true
722
+ });
723
+ }
724
+ else {
725
+ document.addEventListener('DOMSubtreeModified', this.refresh);
726
+ this.mutationEventsAdded_ = true;
727
+ }
728
+ this.connected_ = true;
729
+ };
730
+ /**
731
+ * Removes DOM listeners.
732
+ *
733
+ * @private
734
+ * @returns {void}
735
+ */
736
+ ResizeObserverController.prototype.disconnect_ = function () {
737
+ // Do nothing if running in a non-browser environment or if listeners
738
+ // have been already removed.
739
+ if (!isBrowser || !this.connected_) {
740
+ return;
741
+ }
742
+ document.removeEventListener('transitionend', this.onTransitionEnd_);
743
+ window.removeEventListener('resize', this.refresh);
744
+ if (this.mutationsObserver_) {
745
+ this.mutationsObserver_.disconnect();
746
+ }
747
+ if (this.mutationEventsAdded_) {
748
+ document.removeEventListener('DOMSubtreeModified', this.refresh);
749
+ }
750
+ this.mutationsObserver_ = null;
751
+ this.mutationEventsAdded_ = false;
752
+ this.connected_ = false;
753
+ };
754
+ /**
755
+ * "Transitionend" event handler.
756
+ *
757
+ * @private
758
+ * @param {TransitionEvent} event
759
+ * @returns {void}
760
+ */
761
+ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
762
+ var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
763
+ // Detect whether transition may affect dimensions of an element.
764
+ var isReflowProperty = transitionKeys.some(function (key) {
765
+ return !!~propertyName.indexOf(key);
766
+ });
767
+ if (isReflowProperty) {
768
+ this.refresh();
769
+ }
770
+ };
771
+ /**
772
+ * Returns instance of the ResizeObserverController.
773
+ *
774
+ * @returns {ResizeObserverController}
775
+ */
776
+ ResizeObserverController.getInstance = function () {
777
+ if (!this.instance_) {
778
+ this.instance_ = new ResizeObserverController();
779
+ }
780
+ return this.instance_;
781
+ };
782
+ /**
783
+ * Holds reference to the controller's instance.
784
+ *
785
+ * @private {ResizeObserverController}
786
+ */
787
+ ResizeObserverController.instance_ = null;
788
+ return ResizeObserverController;
789
+ }());
790
+
791
+ /**
792
+ * Defines non-writable/enumerable properties of the provided target object.
793
+ *
794
+ * @param {Object} target - Object for which to define properties.
795
+ * @param {Object} props - Properties to be defined.
796
+ * @returns {Object} Target object.
797
+ */
798
+ var defineConfigurable = (function (target, props) {
799
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
800
+ var key = _a[_i];
801
+ Object.defineProperty(target, key, {
802
+ value: props[key],
803
+ enumerable: false,
804
+ writable: false,
805
+ configurable: true
806
+ });
807
+ }
808
+ return target;
809
+ });
810
+
811
+ /**
812
+ * Returns the global object associated with provided element.
813
+ *
814
+ * @param {Object} target
815
+ * @returns {Object}
816
+ */
817
+ var getWindowOf = (function (target) {
818
+ // Assume that the element is an instance of Node, which means that it
819
+ // has the "ownerDocument" property from which we can retrieve a
820
+ // corresponding global object.
821
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
822
+ // Return the local global object if it's not possible extract one from
823
+ // provided element.
824
+ return ownerGlobal || global$1;
825
+ });
826
+
827
+ // Placeholder of an empty content rectangle.
828
+ var emptyRect = createRectInit(0, 0, 0, 0);
829
+ /**
830
+ * Converts provided string to a number.
831
+ *
832
+ * @param {number|string} value
833
+ * @returns {number}
834
+ */
835
+ function toFloat(value) {
836
+ return parseFloat(value) || 0;
837
+ }
838
+ /**
839
+ * Extracts borders size from provided styles.
840
+ *
841
+ * @param {CSSStyleDeclaration} styles
842
+ * @param {...string} positions - Borders positions (top, right, ...)
843
+ * @returns {number}
844
+ */
845
+ function getBordersSize(styles) {
846
+ var positions = [];
847
+ for (var _i = 1; _i < arguments.length; _i++) {
848
+ positions[_i - 1] = arguments[_i];
849
+ }
850
+ return positions.reduce(function (size, position) {
851
+ var value = styles['border-' + position + '-width'];
852
+ return size + toFloat(value);
853
+ }, 0);
854
+ }
855
+ /**
856
+ * Extracts paddings sizes from provided styles.
857
+ *
858
+ * @param {CSSStyleDeclaration} styles
859
+ * @returns {Object} Paddings box.
860
+ */
861
+ function getPaddings(styles) {
862
+ var positions = ['top', 'right', 'bottom', 'left'];
863
+ var paddings = {};
864
+ for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
865
+ var position = positions_1[_i];
866
+ var value = styles['padding-' + position];
867
+ paddings[position] = toFloat(value);
868
+ }
869
+ return paddings;
870
+ }
871
+ /**
872
+ * Calculates content rectangle of provided SVG element.
873
+ *
874
+ * @param {SVGGraphicsElement} target - Element content rectangle of which needs
875
+ * to be calculated.
876
+ * @returns {DOMRectInit}
877
+ */
878
+ function getSVGContentRect(target) {
879
+ var bbox = target.getBBox();
880
+ return createRectInit(0, 0, bbox.width, bbox.height);
881
+ }
882
+ /**
883
+ * Calculates content rectangle of provided HTMLElement.
884
+ *
885
+ * @param {HTMLElement} target - Element for which to calculate the content rectangle.
886
+ * @returns {DOMRectInit}
887
+ */
888
+ function getHTMLElementContentRect(target) {
889
+ // Client width & height properties can't be
890
+ // used exclusively as they provide rounded values.
891
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
892
+ // By this condition we can catch all non-replaced inline, hidden and
893
+ // detached elements. Though elements with width & height properties less
894
+ // than 0.5 will be discarded as well.
895
+ //
896
+ // Without it we would need to implement separate methods for each of
897
+ // those cases and it's not possible to perform a precise and performance
898
+ // effective test for hidden elements. E.g. even jQuery's ':visible' filter
899
+ // gives wrong results for elements with width & height less than 0.5.
900
+ if (!clientWidth && !clientHeight) {
901
+ return emptyRect;
902
+ }
903
+ var styles = getWindowOf(target).getComputedStyle(target);
904
+ var paddings = getPaddings(styles);
905
+ var horizPad = paddings.left + paddings.right;
906
+ var vertPad = paddings.top + paddings.bottom;
907
+ // Computed styles of width & height are being used because they are the
908
+ // only dimensions available to JS that contain non-rounded values. It could
909
+ // be possible to utilize the getBoundingClientRect if only it's data wasn't
910
+ // affected by CSS transformations let alone paddings, borders and scroll bars.
911
+ var width = toFloat(styles.width), height = toFloat(styles.height);
912
+ // Width & height include paddings and borders when the 'border-box' box
913
+ // model is applied (except for IE).
914
+ if (styles.boxSizing === 'border-box') {
915
+ // Following conditions are required to handle Internet Explorer which
916
+ // doesn't include paddings and borders to computed CSS dimensions.
917
+ //
918
+ // We can say that if CSS dimensions + paddings are equal to the "client"
919
+ // properties then it's either IE, and thus we don't need to subtract
920
+ // anything, or an element merely doesn't have paddings/borders styles.
921
+ if (Math.round(width + horizPad) !== clientWidth) {
922
+ width -= getBordersSize(styles, 'left', 'right') + horizPad;
923
+ }
924
+ if (Math.round(height + vertPad) !== clientHeight) {
925
+ height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
926
+ }
927
+ }
928
+ // Following steps can't be applied to the document's root element as its
929
+ // client[Width/Height] properties represent viewport area of the window.
930
+ // Besides, it's as well not necessary as the <html> itself neither has
931
+ // rendered scroll bars nor it can be clipped.
932
+ if (!isDocumentElement(target)) {
933
+ // In some browsers (only in Firefox, actually) CSS width & height
934
+ // include scroll bars size which can be removed at this step as scroll
935
+ // bars are the only difference between rounded dimensions + paddings
936
+ // and "client" properties, though that is not always true in Chrome.
937
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth;
938
+ var horizScrollbar = Math.round(height + vertPad) - clientHeight;
939
+ // Chrome has a rather weird rounding of "client" properties.
940
+ // E.g. for an element with content width of 314.2px it sometimes gives
941
+ // the client width of 315px and for the width of 314.7px it may give
942
+ // 314px. And it doesn't happen all the time. So just ignore this delta
943
+ // as a non-relevant.
944
+ if (Math.abs(vertScrollbar) !== 1) {
945
+ width -= vertScrollbar;
946
+ }
947
+ if (Math.abs(horizScrollbar) !== 1) {
948
+ height -= horizScrollbar;
949
+ }
950
+ }
951
+ return createRectInit(paddings.left, paddings.top, width, height);
952
+ }
953
+ /**
954
+ * Checks whether provided element is an instance of the SVGGraphicsElement.
955
+ *
956
+ * @param {Element} target - Element to be checked.
957
+ * @returns {boolean}
958
+ */
959
+ var isSVGGraphicsElement = (function () {
960
+ // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
961
+ // interface.
962
+ if (typeof SVGGraphicsElement !== 'undefined') {
963
+ return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
964
+ }
965
+ // If it's so, then check that element is at least an instance of the
966
+ // SVGElement and that it has the "getBBox" method.
967
+ // eslint-disable-next-line no-extra-parens
968
+ return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
969
+ typeof target.getBBox === 'function'); };
970
+ })();
971
+ /**
972
+ * Checks whether provided element is a document element (<html>).
973
+ *
974
+ * @param {Element} target - Element to be checked.
975
+ * @returns {boolean}
976
+ */
977
+ function isDocumentElement(target) {
978
+ return target === getWindowOf(target).document.documentElement;
979
+ }
980
+ /**
981
+ * Calculates an appropriate content rectangle for provided html or svg element.
982
+ *
983
+ * @param {Element} target - Element content rectangle of which needs to be calculated.
984
+ * @returns {DOMRectInit}
985
+ */
986
+ function getContentRect(target) {
987
+ if (!isBrowser) {
988
+ return emptyRect;
989
+ }
990
+ if (isSVGGraphicsElement(target)) {
991
+ return getSVGContentRect(target);
992
+ }
993
+ return getHTMLElementContentRect(target);
994
+ }
995
+ /**
996
+ * Creates rectangle with an interface of the DOMRectReadOnly.
997
+ * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
998
+ *
999
+ * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
1000
+ * @returns {DOMRectReadOnly}
1001
+ */
1002
+ function createReadOnlyRect(_a) {
1003
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
1004
+ // If DOMRectReadOnly is available use it as a prototype for the rectangle.
1005
+ var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
1006
+ var rect = Object.create(Constr.prototype);
1007
+ // Rectangle's properties are not writable and non-enumerable.
1008
+ defineConfigurable(rect, {
1009
+ x: x, y: y, width: width, height: height,
1010
+ top: y,
1011
+ right: x + width,
1012
+ bottom: height + y,
1013
+ left: x
1014
+ });
1015
+ return rect;
1016
+ }
1017
+ /**
1018
+ * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
1019
+ * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
1020
+ *
1021
+ * @param {number} x - X coordinate.
1022
+ * @param {number} y - Y coordinate.
1023
+ * @param {number} width - Rectangle's width.
1024
+ * @param {number} height - Rectangle's height.
1025
+ * @returns {DOMRectInit}
1026
+ */
1027
+ function createRectInit(x, y, width, height) {
1028
+ return { x: x, y: y, width: width, height: height };
1029
+ }
1030
+
1031
+ /**
1032
+ * Class that is responsible for computations of the content rectangle of
1033
+ * provided DOM element and for keeping track of it's changes.
1034
+ */
1035
+ var ResizeObservation = /** @class */ (function () {
1036
+ /**
1037
+ * Creates an instance of ResizeObservation.
1038
+ *
1039
+ * @param {Element} target - Element to be observed.
1040
+ */
1041
+ function ResizeObservation(target) {
1042
+ /**
1043
+ * Broadcasted width of content rectangle.
1044
+ *
1045
+ * @type {number}
1046
+ */
1047
+ this.broadcastWidth = 0;
1048
+ /**
1049
+ * Broadcasted height of content rectangle.
1050
+ *
1051
+ * @type {number}
1052
+ */
1053
+ this.broadcastHeight = 0;
1054
+ /**
1055
+ * Reference to the last observed content rectangle.
1056
+ *
1057
+ * @private {DOMRectInit}
1058
+ */
1059
+ this.contentRect_ = createRectInit(0, 0, 0, 0);
1060
+ this.target = target;
1061
+ }
1062
+ /**
1063
+ * Updates content rectangle and tells whether it's width or height properties
1064
+ * have changed since the last broadcast.
1065
+ *
1066
+ * @returns {boolean}
1067
+ */
1068
+ ResizeObservation.prototype.isActive = function () {
1069
+ var rect = getContentRect(this.target);
1070
+ this.contentRect_ = rect;
1071
+ return (rect.width !== this.broadcastWidth ||
1072
+ rect.height !== this.broadcastHeight);
1073
+ };
1074
+ /**
1075
+ * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
1076
+ * from the corresponding properties of the last observed content rectangle.
1077
+ *
1078
+ * @returns {DOMRectInit} Last observed content rectangle.
1079
+ */
1080
+ ResizeObservation.prototype.broadcastRect = function () {
1081
+ var rect = this.contentRect_;
1082
+ this.broadcastWidth = rect.width;
1083
+ this.broadcastHeight = rect.height;
1084
+ return rect;
1085
+ };
1086
+ return ResizeObservation;
1087
+ }());
1088
+
1089
+ var ResizeObserverEntry = /** @class */ (function () {
1090
+ /**
1091
+ * Creates an instance of ResizeObserverEntry.
1092
+ *
1093
+ * @param {Element} target - Element that is being observed.
1094
+ * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
1095
+ */
1096
+ function ResizeObserverEntry(target, rectInit) {
1097
+ var contentRect = createReadOnlyRect(rectInit);
1098
+ // According to the specification following properties are not writable
1099
+ // and are also not enumerable in the native implementation.
1100
+ //
1101
+ // Property accessors are not being used as they'd require to define a
1102
+ // private WeakMap storage which may cause memory leaks in browsers that
1103
+ // don't support this type of collections.
1104
+ defineConfigurable(this, { target: target, contentRect: contentRect });
1105
+ }
1106
+ return ResizeObserverEntry;
1107
+ }());
1108
+
1109
+ var ResizeObserverSPI = /** @class */ (function () {
1110
+ /**
1111
+ * Creates a new instance of ResizeObserver.
1112
+ *
1113
+ * @param {ResizeObserverCallback} callback - Callback function that is invoked
1114
+ * when one of the observed elements changes it's content dimensions.
1115
+ * @param {ResizeObserverController} controller - Controller instance which
1116
+ * is responsible for the updates of observer.
1117
+ * @param {ResizeObserver} callbackCtx - Reference to the public
1118
+ * ResizeObserver instance which will be passed to callback function.
1119
+ */
1120
+ function ResizeObserverSPI(callback, controller, callbackCtx) {
1121
+ /**
1122
+ * Collection of resize observations that have detected changes in dimensions
1123
+ * of elements.
1124
+ *
1125
+ * @private {Array<ResizeObservation>}
1126
+ */
1127
+ this.activeObservations_ = [];
1128
+ /**
1129
+ * Registry of the ResizeObservation instances.
1130
+ *
1131
+ * @private {Map<Element, ResizeObservation>}
1132
+ */
1133
+ this.observations_ = new MapShim();
1134
+ if (typeof callback !== 'function') {
1135
+ throw new TypeError('The callback provided as parameter 1 is not a function.');
1136
+ }
1137
+ this.callback_ = callback;
1138
+ this.controller_ = controller;
1139
+ this.callbackCtx_ = callbackCtx;
1140
+ }
1141
+ /**
1142
+ * Starts observing provided element.
1143
+ *
1144
+ * @param {Element} target - Element to be observed.
1145
+ * @returns {void}
1146
+ */
1147
+ ResizeObserverSPI.prototype.observe = function (target) {
1148
+ if (!arguments.length) {
1149
+ throw new TypeError('1 argument required, but only 0 present.');
1150
+ }
1151
+ // Do nothing if current environment doesn't have the Element interface.
1152
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
1153
+ return;
1154
+ }
1155
+ if (!(target instanceof getWindowOf(target).Element)) {
1156
+ throw new TypeError('parameter 1 is not of type "Element".');
1157
+ }
1158
+ var observations = this.observations_;
1159
+ // Do nothing if element is already being observed.
1160
+ if (observations.has(target)) {
1161
+ return;
1162
+ }
1163
+ observations.set(target, new ResizeObservation(target));
1164
+ this.controller_.addObserver(this);
1165
+ // Force the update of observations.
1166
+ this.controller_.refresh();
1167
+ };
1168
+ /**
1169
+ * Stops observing provided element.
1170
+ *
1171
+ * @param {Element} target - Element to stop observing.
1172
+ * @returns {void}
1173
+ */
1174
+ ResizeObserverSPI.prototype.unobserve = function (target) {
1175
+ if (!arguments.length) {
1176
+ throw new TypeError('1 argument required, but only 0 present.');
1177
+ }
1178
+ // Do nothing if current environment doesn't have the Element interface.
1179
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
1180
+ return;
1181
+ }
1182
+ if (!(target instanceof getWindowOf(target).Element)) {
1183
+ throw new TypeError('parameter 1 is not of type "Element".');
1184
+ }
1185
+ var observations = this.observations_;
1186
+ // Do nothing if element is not being observed.
1187
+ if (!observations.has(target)) {
1188
+ return;
1189
+ }
1190
+ observations.delete(target);
1191
+ if (!observations.size) {
1192
+ this.controller_.removeObserver(this);
1193
+ }
1194
+ };
1195
+ /**
1196
+ * Stops observing all elements.
1197
+ *
1198
+ * @returns {void}
1199
+ */
1200
+ ResizeObserverSPI.prototype.disconnect = function () {
1201
+ this.clearActive();
1202
+ this.observations_.clear();
1203
+ this.controller_.removeObserver(this);
1204
+ };
1205
+ /**
1206
+ * Collects observation instances the associated element of which has changed
1207
+ * it's content rectangle.
1208
+ *
1209
+ * @returns {void}
1210
+ */
1211
+ ResizeObserverSPI.prototype.gatherActive = function () {
1212
+ var _this = this;
1213
+ this.clearActive();
1214
+ this.observations_.forEach(function (observation) {
1215
+ if (observation.isActive()) {
1216
+ _this.activeObservations_.push(observation);
1217
+ }
1218
+ });
1219
+ };
1220
+ /**
1221
+ * Invokes initial callback function with a list of ResizeObserverEntry
1222
+ * instances collected from active resize observations.
1223
+ *
1224
+ * @returns {void}
1225
+ */
1226
+ ResizeObserverSPI.prototype.broadcastActive = function () {
1227
+ // Do nothing if observer doesn't have active observations.
1228
+ if (!this.hasActive()) {
1229
+ return;
1230
+ }
1231
+ var ctx = this.callbackCtx_;
1232
+ // Create ResizeObserverEntry instance for every active observation.
1233
+ var entries = this.activeObservations_.map(function (observation) {
1234
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
1235
+ });
1236
+ this.callback_.call(ctx, entries, ctx);
1237
+ this.clearActive();
1238
+ };
1239
+ /**
1240
+ * Clears the collection of active observations.
1241
+ *
1242
+ * @returns {void}
1243
+ */
1244
+ ResizeObserverSPI.prototype.clearActive = function () {
1245
+ this.activeObservations_.splice(0);
1246
+ };
1247
+ /**
1248
+ * Tells whether observer has active observations.
1249
+ *
1250
+ * @returns {boolean}
1251
+ */
1252
+ ResizeObserverSPI.prototype.hasActive = function () {
1253
+ return this.activeObservations_.length > 0;
1254
+ };
1255
+ return ResizeObserverSPI;
1256
+ }());
1257
+
1258
+ // Registry of internal observers. If WeakMap is not available use current shim
1259
+ // for the Map collection as it has all required methods and because WeakMap
1260
+ // can't be fully polyfilled anyway.
1261
+ var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
1262
+ /**
1263
+ * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
1264
+ * exposing only those methods and properties that are defined in the spec.
1265
+ */
1266
+ var ResizeObserver$1 = /** @class */ (function () {
1267
+ /**
1268
+ * Creates a new instance of ResizeObserver.
1269
+ *
1270
+ * @param {ResizeObserverCallback} callback - Callback that is invoked when
1271
+ * dimensions of the observed elements change.
1272
+ */
1273
+ function ResizeObserver(callback) {
1274
+ if (!(this instanceof ResizeObserver)) {
1275
+ throw new TypeError('Cannot call a class as a function.');
1276
+ }
1277
+ if (!arguments.length) {
1278
+ throw new TypeError('1 argument required, but only 0 present.');
1279
+ }
1280
+ var controller = ResizeObserverController.getInstance();
1281
+ var observer = new ResizeObserverSPI(callback, controller, this);
1282
+ observers.set(this, observer);
1283
+ }
1284
+ return ResizeObserver;
1285
+ }());
1286
+ // Expose public methods of ResizeObserver.
1287
+ [
1288
+ 'observe',
1289
+ 'unobserve',
1290
+ 'disconnect'
1291
+ ].forEach(function (method) {
1292
+ ResizeObserver$1.prototype[method] = function () {
1293
+ var _a;
1294
+ return (_a = observers.get(this))[method].apply(_a, arguments);
1295
+ };
1296
+ });
1297
+
1298
+ var index = (function () {
1299
+ // Export existing implementation if available.
1300
+ if (typeof global$1.ResizeObserver !== 'undefined') {
1301
+ return global$1.ResizeObserver;
1302
+ }
1303
+ return ResizeObserver$1;
1304
+ })();
1305
+
1306
+ // =============================== Const ===============================
1307
+ var elementListeners = new Map();
1308
+ function onResize(entities) {
1309
+ entities.forEach(function (entity) {
1310
+ var _elementListeners$get;
1311
+ var target = entity.target;
1312
+ (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
1313
+ return listener(target);
1314
+ });
1315
+ });
1316
+ }
1317
+ // Note: ResizeObserver polyfill not support option to measure border-box resize
1318
+ var resizeObserver = new index(onResize);
1319
+ // ============================== Observe ==============================
1320
+ function observe(element, callback) {
1321
+ if (!elementListeners.has(element)) {
1322
+ elementListeners.set(element, new Set());
1323
+ resizeObserver.observe(element);
1324
+ }
1325
+ elementListeners.get(element).add(callback);
1326
+ }
1327
+ function unobserve(element, callback) {
1328
+ if (elementListeners.has(element)) {
1329
+ elementListeners.get(element).delete(callback);
1330
+ if (!elementListeners.get(element).size) {
1331
+ resizeObserver.unobserve(element);
1332
+ elementListeners.delete(element);
1333
+ }
1334
+ }
1335
+ }
1336
+
1337
+ function _classCallCheck(instance, Constructor) {
1338
+ if (!(instance instanceof Constructor)) {
1339
+ throw new TypeError("Cannot call a class as a function");
1340
+ }
1341
+ }
1342
+
1343
+ function _defineProperties(target, props) {
1344
+ for (var i = 0; i < props.length; i++) {
1345
+ var descriptor = props[i];
1346
+ descriptor.enumerable = descriptor.enumerable || false;
1347
+ descriptor.configurable = true;
1348
+ if ("value" in descriptor) descriptor.writable = true;
1349
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
1350
+ }
1351
+ }
1352
+ function _createClass(Constructor, protoProps, staticProps) {
1353
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1354
+ if (staticProps) _defineProperties(Constructor, staticProps);
1355
+ Object.defineProperty(Constructor, "prototype", {
1356
+ writable: false
1357
+ });
1358
+ return Constructor;
1359
+ }
1360
+
1361
+ function _setPrototypeOf(o, p) {
1362
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
1363
+ o.__proto__ = p;
1364
+ return o;
1365
+ };
1366
+ return _setPrototypeOf(o, p);
1367
+ }
1368
+
1369
+ function _inherits(subClass, superClass) {
1370
+ if (typeof superClass !== "function" && superClass !== null) {
1371
+ throw new TypeError("Super expression must either be null or a function");
1372
+ }
1373
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1374
+ constructor: {
1375
+ value: subClass,
1376
+ writable: true,
1377
+ configurable: true
1378
+ }
1379
+ });
1380
+ Object.defineProperty(subClass, "prototype", {
1381
+ writable: false
1382
+ });
1383
+ if (superClass) _setPrototypeOf(subClass, superClass);
1384
+ }
1385
+
1386
+ function _getPrototypeOf(o) {
1387
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
1388
+ return o.__proto__ || Object.getPrototypeOf(o);
1389
+ };
1390
+ return _getPrototypeOf(o);
1391
+ }
1392
+
1393
+ function _isNativeReflectConstruct() {
1394
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1395
+ if (Reflect.construct.sham) return false;
1396
+ if (typeof Proxy === "function") return true;
1397
+ try {
1398
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
1399
+ return true;
1400
+ } catch (e) {
1401
+ return false;
1402
+ }
1403
+ }
1404
+
1405
+ function _assertThisInitialized(self) {
1406
+ if (self === void 0) {
1407
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1408
+ }
1409
+ return self;
1410
+ }
1411
+
1412
+ function _possibleConstructorReturn(self, call) {
1413
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
1414
+ return call;
1415
+ } else if (call !== void 0) {
1416
+ throw new TypeError("Derived constructors may only return object or undefined");
1417
+ }
1418
+ return _assertThisInitialized(self);
1419
+ }
1420
+
1421
+ function _createSuper(Derived) {
1422
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
1423
+ return function _createSuperInternal() {
1424
+ var Super = _getPrototypeOf(Derived),
1425
+ result;
1426
+ if (hasNativeReflectConstruct) {
1427
+ var NewTarget = _getPrototypeOf(this).constructor;
1428
+ result = Reflect.construct(Super, arguments, NewTarget);
1429
+ } else {
1430
+ result = Super.apply(this, arguments);
1431
+ }
1432
+ return _possibleConstructorReturn(this, result);
1433
+ };
1434
+ }
1435
+
1436
+ /**
1437
+ * Fallback to findDOMNode if origin ref do not provide any dom element
1438
+ */
1439
+ var DomWrapper = /*#__PURE__*/function (_React$Component) {
1440
+ _inherits(DomWrapper, _React$Component);
1441
+ var _super = _createSuper(DomWrapper);
1442
+ function DomWrapper() {
1443
+ _classCallCheck(this, DomWrapper);
1444
+ return _super.apply(this, arguments);
1445
+ }
1446
+ _createClass(DomWrapper, [{
1447
+ key: "render",
1448
+ value: function render() {
1449
+ return this.props.children;
1450
+ }
1451
+ }]);
1452
+ return DomWrapper;
1453
+ }(react.Component);
1454
+
1455
+ var CollectionContext = /*#__PURE__*/react.createContext(null);
1456
+ /**
1457
+ * Collect all the resize event from children ResizeObserver
1458
+ */
1459
+ function Collection(_ref) {
1460
+ var children = _ref.children,
1461
+ onBatchResize = _ref.onBatchResize;
1462
+ var resizeIdRef = react.useRef(0);
1463
+ var resizeInfosRef = react.useRef([]);
1464
+ var onCollectionResize = react.useContext(CollectionContext);
1465
+ var onResize = react.useCallback(function (size, element, data) {
1466
+ resizeIdRef.current += 1;
1467
+ var currentId = resizeIdRef.current;
1468
+ resizeInfosRef.current.push({
1469
+ size: size,
1470
+ element: element,
1471
+ data: data
1472
+ });
1473
+ Promise.resolve().then(function () {
1474
+ if (currentId === resizeIdRef.current) {
1475
+ onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
1476
+ resizeInfosRef.current = [];
1477
+ }
1478
+ });
1479
+ // Continue bubbling if parent exist
1480
+ onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
1481
+ }, [onBatchResize, onCollectionResize]);
1482
+ return /*#__PURE__*/react.createElement(CollectionContext.Provider, {
1483
+ value: onResize
1484
+ }, children);
1485
+ }
1486
+
1487
+ function SingleObserver(props, ref) {
1488
+ var children = props.children,
1489
+ disabled = props.disabled;
1490
+ var elementRef = react.useRef(null);
1491
+ var wrapperRef = react.useRef(null);
1492
+ var onCollectionResize = react.useContext(CollectionContext);
1493
+ // =========================== Children ===========================
1494
+ var isRenderProps = typeof children === 'function';
1495
+ var mergedChildren = isRenderProps ? children(elementRef) : children;
1496
+ // ============================= Size =============================
1497
+ var sizeRef = react.useRef({
1498
+ width: -1,
1499
+ height: -1,
1500
+ offsetWidth: -1,
1501
+ offsetHeight: -1
1502
+ });
1503
+ // ============================= Ref ==============================
1504
+ var canRef = !isRenderProps && /*#__PURE__*/react.isValidElement(mergedChildren) && supportRef(mergedChildren);
1505
+ var originRef = canRef ? mergedChildren.ref : null;
1506
+ var mergedRef = react.useMemo(function () {
1507
+ return composeRef(originRef, elementRef);
1508
+ }, [originRef, elementRef]);
1509
+ var getDom = function getDom() {
1510
+ return findDOMNode(elementRef.current) || findDOMNode(wrapperRef.current);
1511
+ };
1512
+ react.useImperativeHandle(ref, function () {
1513
+ return getDom();
1514
+ });
1515
+ // =========================== Observe ============================
1516
+ var propsRef = react.useRef(props);
1517
+ propsRef.current = props;
1518
+ // Handler
1519
+ var onInternalResize = react.useCallback(function (target) {
1520
+ var _propsRef$current = propsRef.current,
1521
+ onResize = _propsRef$current.onResize,
1522
+ data = _propsRef$current.data;
1523
+ var _target$getBoundingCl = target.getBoundingClientRect(),
1524
+ width = _target$getBoundingCl.width,
1525
+ height = _target$getBoundingCl.height;
1526
+ var offsetWidth = target.offsetWidth,
1527
+ offsetHeight = target.offsetHeight;
1528
+ /**
1529
+ * Resize observer trigger when content size changed.
1530
+ * In most case we just care about element size,
1531
+ * let's use `boundary` instead of `contentRect` here to avoid shaking.
1532
+ */
1533
+ var fixedWidth = Math.floor(width);
1534
+ var fixedHeight = Math.floor(height);
1535
+ if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
1536
+ var size = {
1537
+ width: fixedWidth,
1538
+ height: fixedHeight,
1539
+ offsetWidth: offsetWidth,
1540
+ offsetHeight: offsetHeight
1541
+ };
1542
+ sizeRef.current = size;
1543
+ // IE is strange, right?
1544
+ var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
1545
+ var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
1546
+ var sizeInfo = _objectSpread2(_objectSpread2({}, size), {}, {
1547
+ offsetWidth: mergedOffsetWidth,
1548
+ offsetHeight: mergedOffsetHeight
1549
+ });
1550
+ // Let collection know what happened
1551
+ onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
1552
+ if (onResize) {
1553
+ // defer the callback but not defer to next frame
1554
+ Promise.resolve().then(function () {
1555
+ onResize(sizeInfo, target);
1556
+ });
1557
+ }
1558
+ }
1559
+ }, []);
1560
+ // Dynamic observe
1561
+ react.useEffect(function () {
1562
+ var currentElement = getDom();
1563
+ if (currentElement && !disabled) {
1564
+ observe(currentElement, onInternalResize);
1565
+ }
1566
+ return function () {
1567
+ return unobserve(currentElement, onInternalResize);
1568
+ };
1569
+ }, [elementRef.current, disabled]);
1570
+ // ============================ Render ============================
1571
+ return /*#__PURE__*/react.createElement(DomWrapper, {
1572
+ ref: wrapperRef
1573
+ }, canRef ? /*#__PURE__*/react.cloneElement(mergedChildren, {
1574
+ ref: mergedRef
1575
+ }) : mergedChildren);
1576
+ }
1577
+ var RefSingleObserver = /*#__PURE__*/react.forwardRef(SingleObserver);
1578
+
1579
+ var INTERNAL_PREFIX_KEY = 'rc-observer-key';
1580
+ function ResizeObserver(props, ref) {
1581
+ var children = props.children;
1582
+ var childNodes = typeof children === 'function' ? [children] : toArray(children);
1583
+ return childNodes.map(function (child, index) {
1584
+ var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
1585
+ return /*#__PURE__*/react.createElement(RefSingleObserver, _extends({}, props, {
1586
+ key: key,
1587
+ ref: index === 0 ? ref : undefined
1588
+ }), child);
1589
+ });
1590
+ }
1591
+ var RefResizeObserver = /*#__PURE__*/react.forwardRef(ResizeObserver);
1592
+ RefResizeObserver.Collection = Collection;
1593
+
1594
+ export { RefResizeObserver as R, _typeof$1 as _, useLayoutUpdateEffect as a, useMemo as b, wrapperRaf as c, useLayoutEffect as d, canUseDom as e, useComposeRef as f, fillRef as g, findDOMNode as h, isDOM as i, composeRef as j, supportRef as s, useEvent as u, warningOnce as w };