element-sim 1.1.35 → 1.1.36

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 (463) hide show
  1. package/lib/index.js +1 -1
  2. package/package.json +1 -1
  3. package/packages/theme-chalk/gulpfile.js +25 -0
  4. package/packages/theme-chalk/src/fonts/icon-sim.ttf +0 -0
  5. package/packages/theme-chalk/src/fonts/icon-sim.woff +0 -0
  6. package/packages/theme-chalk/src/fonts/icon-sim.woff2 +0 -0
  7. package/packages/theme-chalk/src/icon.scss +12 -0
  8. package/src/index.js +1 -1
  9. package/CHANGELOG.en-US.md +0 -2085
  10. package/CHANGELOG.es.md +0 -2093
  11. package/CHANGELOG.fr-FR.md +0 -2085
  12. package/CHANGELOG.zh-CN.md +0 -131
  13. package/lib/alert.js +0 -420
  14. package/lib/aside.js +0 -277
  15. package/lib/autocomplete.js +0 -952
  16. package/lib/avatar.js +0 -363
  17. package/lib/backtop.js +0 -404
  18. package/lib/badge.js +0 -334
  19. package/lib/breadcrumb-item.js +0 -322
  20. package/lib/breadcrumb.js +0 -293
  21. package/lib/button-group.js +0 -262
  22. package/lib/button.js +0 -357
  23. package/lib/calendar.js +0 -933
  24. package/lib/card.js +0 -297
  25. package/lib/carousel-item.js +0 -434
  26. package/lib/carousel.js +0 -707
  27. package/lib/cascader-panel.js +0 -1558
  28. package/lib/cascader.js +0 -1439
  29. package/lib/checkbox-button.js +0 -583
  30. package/lib/checkbox-group.js +0 -313
  31. package/lib/checkbox.js +0 -627
  32. package/lib/col.js +0 -177
  33. package/lib/collapse-item.js +0 -497
  34. package/lib/collapse.js +0 -329
  35. package/lib/color-picker.js +0 -1943
  36. package/lib/container.js +0 -288
  37. package/lib/date-picker.js +0 -6335
  38. package/lib/descriptions-item.js +0 -140
  39. package/lib/descriptions.js +0 -457
  40. package/lib/dialog.js +0 -598
  41. package/lib/directives/mousewheel.js +0 -26
  42. package/lib/directives/repeat-click.js +0 -33
  43. package/lib/divider.js +0 -313
  44. package/lib/drawer.js +0 -603
  45. package/lib/dropdown-item.js +0 -316
  46. package/lib/dropdown-menu.js +0 -351
  47. package/lib/dropdown.js +0 -643
  48. package/lib/element-sim.common.js +0 -43542
  49. package/lib/empty.js +0 -730
  50. package/lib/footer.js +0 -277
  51. package/lib/form-item.js +0 -826
  52. package/lib/form.js +0 -466
  53. package/lib/header.js +0 -277
  54. package/lib/icon.js +0 -265
  55. package/lib/image.js +0 -1138
  56. package/lib/infinite-scroll.js +0 -301
  57. package/lib/input-number.js +0 -752
  58. package/lib/input.js +0 -1009
  59. package/lib/link.js +0 -332
  60. package/lib/loading.js +0 -631
  61. package/lib/locale/format.js +0 -56
  62. package/lib/locale/index.js +0 -63
  63. package/lib/locale/lang/af-ZA.js +0 -126
  64. package/lib/locale/lang/ar.js +0 -125
  65. package/lib/locale/lang/az.js +0 -126
  66. package/lib/locale/lang/bg.js +0 -126
  67. package/lib/locale/lang/bn.js +0 -126
  68. package/lib/locale/lang/ca.js +0 -125
  69. package/lib/locale/lang/cs-CZ.js +0 -128
  70. package/lib/locale/lang/da.js +0 -125
  71. package/lib/locale/lang/de.js +0 -127
  72. package/lib/locale/lang/ee.js +0 -126
  73. package/lib/locale/lang/el.js +0 -126
  74. package/lib/locale/lang/en.js +0 -126
  75. package/lib/locale/lang/eo.js +0 -126
  76. package/lib/locale/lang/es.js +0 -125
  77. package/lib/locale/lang/eu.js +0 -126
  78. package/lib/locale/lang/fa.js +0 -126
  79. package/lib/locale/lang/fi.js +0 -126
  80. package/lib/locale/lang/fr.js +0 -125
  81. package/lib/locale/lang/he.js +0 -126
  82. package/lib/locale/lang/hr.js +0 -126
  83. package/lib/locale/lang/hu.js +0 -125
  84. package/lib/locale/lang/hy-AM.js +0 -126
  85. package/lib/locale/lang/id.js +0 -126
  86. package/lib/locale/lang/is.js +0 -126
  87. package/lib/locale/lang/it.js +0 -125
  88. package/lib/locale/lang/ja.js +0 -126
  89. package/lib/locale/lang/kg.js +0 -126
  90. package/lib/locale/lang/km.js +0 -126
  91. package/lib/locale/lang/ko.js +0 -126
  92. package/lib/locale/lang/ku.js +0 -126
  93. package/lib/locale/lang/kz.js +0 -126
  94. package/lib/locale/lang/lo-LA.js +0 -126
  95. package/lib/locale/lang/lt.js +0 -126
  96. package/lib/locale/lang/lv.js +0 -126
  97. package/lib/locale/lang/mn.js +0 -126
  98. package/lib/locale/lang/ms.js +0 -125
  99. package/lib/locale/lang/nb-NO.js +0 -125
  100. package/lib/locale/lang/nl.js +0 -126
  101. package/lib/locale/lang/pl.js +0 -126
  102. package/lib/locale/lang/pt-br.js +0 -126
  103. package/lib/locale/lang/pt.js +0 -126
  104. package/lib/locale/lang/ro.js +0 -126
  105. package/lib/locale/lang/ru-RU.js +0 -126
  106. package/lib/locale/lang/si.js +0 -126
  107. package/lib/locale/lang/sk.js +0 -128
  108. package/lib/locale/lang/sl.js +0 -126
  109. package/lib/locale/lang/sr-Latn.js +0 -126
  110. package/lib/locale/lang/sr.js +0 -126
  111. package/lib/locale/lang/sv-SE.js +0 -126
  112. package/lib/locale/lang/sw.js +0 -126
  113. package/lib/locale/lang/ta.js +0 -125
  114. package/lib/locale/lang/th.js +0 -126
  115. package/lib/locale/lang/tk.js +0 -126
  116. package/lib/locale/lang/tr-TR.js +0 -126
  117. package/lib/locale/lang/ua.js +0 -126
  118. package/lib/locale/lang/ug-CN.js +0 -126
  119. package/lib/locale/lang/uz-UZ.js +0 -126
  120. package/lib/locale/lang/vi.js +0 -126
  121. package/lib/locale/lang/zh-CN.js +0 -126
  122. package/lib/locale/lang/zh-TW.js +0 -126
  123. package/lib/main.js +0 -264
  124. package/lib/menu-item-group.js +0 -308
  125. package/lib/menu-item.js +0 -491
  126. package/lib/menu.js +0 -865
  127. package/lib/message-box.js +0 -1192
  128. package/lib/message.js +0 -548
  129. package/lib/mixins/emitter.js +0 -36
  130. package/lib/mixins/focus.js +0 -15
  131. package/lib/mixins/locale.js +0 -17
  132. package/lib/mixins/migrating.js +0 -69
  133. package/lib/notification.js +0 -615
  134. package/lib/option-group.js +0 -344
  135. package/lib/option.js +0 -474
  136. package/lib/page-header.js +0 -319
  137. package/lib/pagination.js +0 -950
  138. package/lib/popconfirm.js +0 -457
  139. package/lib/popover.js +0 -617
  140. package/lib/progress.js +0 -595
  141. package/lib/radio-button.js +0 -463
  142. package/lib/radio-group.js +0 -391
  143. package/lib/radio.js +0 -495
  144. package/lib/rate.js +0 -670
  145. package/lib/result.js +0 -578
  146. package/lib/row.js +0 -149
  147. package/lib/scrollbar.js +0 -426
  148. package/lib/select.js +0 -2108
  149. package/lib/skeleton-item.js +0 -342
  150. package/lib/skeleton.js +0 -372
  151. package/lib/slider.js +0 -1199
  152. package/lib/spinner.js +0 -301
  153. package/lib/statistic.js +0 -533
  154. package/lib/step.js +0 -522
  155. package/lib/steps.js +0 -342
  156. package/lib/submenu.js +0 -701
  157. package/lib/switch.js +0 -554
  158. package/lib/tab-pane.js +0 -332
  159. package/lib/table-column.js +0 -952
  160. package/lib/table.js +0 -5021
  161. package/lib/tabs.js +0 -920
  162. package/lib/tag.js +0 -304
  163. package/lib/theme-chalk/alert.css +0 -1
  164. package/lib/theme-chalk/aside.css +0 -1
  165. package/lib/theme-chalk/autocomplete.css +0 -1
  166. package/lib/theme-chalk/avatar.css +0 -1
  167. package/lib/theme-chalk/backtop.css +0 -1
  168. package/lib/theme-chalk/badge.css +0 -1
  169. package/lib/theme-chalk/base.css +0 -1
  170. package/lib/theme-chalk/breadcrumb-item.css +0 -0
  171. package/lib/theme-chalk/breadcrumb.css +0 -1
  172. package/lib/theme-chalk/button-group.css +0 -0
  173. package/lib/theme-chalk/button.css +0 -1
  174. package/lib/theme-chalk/calendar.css +0 -1
  175. package/lib/theme-chalk/card.css +0 -1
  176. package/lib/theme-chalk/carousel-item.css +0 -1
  177. package/lib/theme-chalk/carousel.css +0 -1
  178. package/lib/theme-chalk/cascader-panel.css +0 -1
  179. package/lib/theme-chalk/cascader.css +0 -1
  180. package/lib/theme-chalk/checkbox-button.css +0 -0
  181. package/lib/theme-chalk/checkbox-group.css +0 -0
  182. package/lib/theme-chalk/checkbox.css +0 -1
  183. package/lib/theme-chalk/col.css +0 -1
  184. package/lib/theme-chalk/collapse-item.css +0 -0
  185. package/lib/theme-chalk/collapse.css +0 -1
  186. package/lib/theme-chalk/color-picker.css +0 -1
  187. package/lib/theme-chalk/container.css +0 -1
  188. package/lib/theme-chalk/date-picker.css +0 -1
  189. package/lib/theme-chalk/descriptions-item.css +0 -1
  190. package/lib/theme-chalk/descriptions.css +0 -1
  191. package/lib/theme-chalk/dialog.css +0 -1
  192. package/lib/theme-chalk/display.css +0 -1
  193. package/lib/theme-chalk/divider.css +0 -1
  194. package/lib/theme-chalk/drawer.css +0 -1
  195. package/lib/theme-chalk/dropdown-item.css +0 -0
  196. package/lib/theme-chalk/dropdown-menu.css +0 -0
  197. package/lib/theme-chalk/dropdown.css +0 -1
  198. package/lib/theme-chalk/empty.css +0 -1
  199. package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
  200. package/lib/theme-chalk/fonts/element-icons.woff +0 -0
  201. package/lib/theme-chalk/fonts/icon-sim.ttf +0 -0
  202. package/lib/theme-chalk/fonts/icon-sim.woff +0 -0
  203. package/lib/theme-chalk/fonts/icon-sim.woff2 +0 -0
  204. package/lib/theme-chalk/footer.css +0 -1
  205. package/lib/theme-chalk/form-item.css +0 -0
  206. package/lib/theme-chalk/form.css +0 -1
  207. package/lib/theme-chalk/header.css +0 -1
  208. package/lib/theme-chalk/icon.css +0 -1
  209. package/lib/theme-chalk/image.css +0 -1
  210. package/lib/theme-chalk/index.css +0 -1
  211. package/lib/theme-chalk/infinite-scroll.css +0 -0
  212. package/lib/theme-chalk/infiniteScroll.css +0 -0
  213. package/lib/theme-chalk/input-number.css +0 -1
  214. package/lib/theme-chalk/input.css +0 -1
  215. package/lib/theme-chalk/link.css +0 -1
  216. package/lib/theme-chalk/loading.css +0 -1
  217. package/lib/theme-chalk/main.css +0 -1
  218. package/lib/theme-chalk/menu-item-group.css +0 -0
  219. package/lib/theme-chalk/menu-item.css +0 -0
  220. package/lib/theme-chalk/menu.css +0 -1
  221. package/lib/theme-chalk/message-box.css +0 -1
  222. package/lib/theme-chalk/message.css +0 -1
  223. package/lib/theme-chalk/notification.css +0 -1
  224. package/lib/theme-chalk/option-group.css +0 -1
  225. package/lib/theme-chalk/option.css +0 -1
  226. package/lib/theme-chalk/page-header.css +0 -1
  227. package/lib/theme-chalk/pagination.css +0 -1
  228. package/lib/theme-chalk/popconfirm.css +0 -1
  229. package/lib/theme-chalk/popover.css +0 -1
  230. package/lib/theme-chalk/popper.css +0 -1
  231. package/lib/theme-chalk/progress.css +0 -1
  232. package/lib/theme-chalk/radio-button.css +0 -1
  233. package/lib/theme-chalk/radio-group.css +0 -1
  234. package/lib/theme-chalk/radio.css +0 -1
  235. package/lib/theme-chalk/rate.css +0 -1
  236. package/lib/theme-chalk/reset.css +0 -1
  237. package/lib/theme-chalk/result.css +0 -1
  238. package/lib/theme-chalk/row.css +0 -1
  239. package/lib/theme-chalk/scrollbar.css +0 -1
  240. package/lib/theme-chalk/select-dropdown.css +0 -1
  241. package/lib/theme-chalk/select.css +0 -1
  242. package/lib/theme-chalk/skeleton-item.css +0 -1
  243. package/lib/theme-chalk/skeleton.css +0 -1
  244. package/lib/theme-chalk/slider.css +0 -1
  245. package/lib/theme-chalk/spinner.css +0 -1
  246. package/lib/theme-chalk/statistic.css +0 -1
  247. package/lib/theme-chalk/step.css +0 -1
  248. package/lib/theme-chalk/steps.css +0 -1
  249. package/lib/theme-chalk/submenu.css +0 -0
  250. package/lib/theme-chalk/switch.css +0 -1
  251. package/lib/theme-chalk/tab-pane.css +0 -0
  252. package/lib/theme-chalk/table-column.css +0 -1
  253. package/lib/theme-chalk/table.css +0 -1
  254. package/lib/theme-chalk/tabs.css +0 -1
  255. package/lib/theme-chalk/tag.css +0 -1
  256. package/lib/theme-chalk/time-picker.css +0 -1
  257. package/lib/theme-chalk/time-select.css +0 -1
  258. package/lib/theme-chalk/timeline-item.css +0 -1
  259. package/lib/theme-chalk/timeline.css +0 -1
  260. package/lib/theme-chalk/tooltip.css +0 -1
  261. package/lib/theme-chalk/transfer.css +0 -1
  262. package/lib/theme-chalk/tree.css +0 -1
  263. package/lib/theme-chalk/upload.css +0 -1
  264. package/lib/time-picker.js +0 -2967
  265. package/lib/time-select.js +0 -1765
  266. package/lib/timeline-item.js +0 -371
  267. package/lib/timeline.js +0 -275
  268. package/lib/tooltip.js +0 -425
  269. package/lib/transfer.js +0 -1102
  270. package/lib/transitions/collapse-transition.js +0 -91
  271. package/lib/tree.js +0 -2263
  272. package/lib/umd/locale/af-ZA.js +0 -142
  273. package/lib/umd/locale/ar.js +0 -141
  274. package/lib/umd/locale/az.js +0 -141
  275. package/lib/umd/locale/bg.js +0 -142
  276. package/lib/umd/locale/bn.js +0 -141
  277. package/lib/umd/locale/ca.js +0 -141
  278. package/lib/umd/locale/cs-CZ.js +0 -144
  279. package/lib/umd/locale/da.js +0 -141
  280. package/lib/umd/locale/de.js +0 -143
  281. package/lib/umd/locale/ee.js +0 -142
  282. package/lib/umd/locale/el.js +0 -142
  283. package/lib/umd/locale/en.js +0 -142
  284. package/lib/umd/locale/eo.js +0 -142
  285. package/lib/umd/locale/es.js +0 -141
  286. package/lib/umd/locale/eu.js +0 -142
  287. package/lib/umd/locale/fa.js +0 -142
  288. package/lib/umd/locale/fi.js +0 -142
  289. package/lib/umd/locale/fr.js +0 -141
  290. package/lib/umd/locale/he.js +0 -142
  291. package/lib/umd/locale/hr.js +0 -142
  292. package/lib/umd/locale/hu.js +0 -141
  293. package/lib/umd/locale/hy-AM.js +0 -142
  294. package/lib/umd/locale/id.js +0 -142
  295. package/lib/umd/locale/is.js +0 -142
  296. package/lib/umd/locale/it.js +0 -141
  297. package/lib/umd/locale/ja.js +0 -142
  298. package/lib/umd/locale/kg.js +0 -142
  299. package/lib/umd/locale/km.js +0 -142
  300. package/lib/umd/locale/ko.js +0 -142
  301. package/lib/umd/locale/ku.js +0 -142
  302. package/lib/umd/locale/kz.js +0 -142
  303. package/lib/umd/locale/lo-LA.js +0 -141
  304. package/lib/umd/locale/lt.js +0 -142
  305. package/lib/umd/locale/lv.js +0 -142
  306. package/lib/umd/locale/mn.js +0 -142
  307. package/lib/umd/locale/ms.js +0 -141
  308. package/lib/umd/locale/nb-NO.js +0 -141
  309. package/lib/umd/locale/nl.js +0 -142
  310. package/lib/umd/locale/pl.js +0 -142
  311. package/lib/umd/locale/pt-br.js +0 -142
  312. package/lib/umd/locale/pt.js +0 -142
  313. package/lib/umd/locale/ro.js +0 -142
  314. package/lib/umd/locale/ru-RU.js +0 -142
  315. package/lib/umd/locale/si.js +0 -142
  316. package/lib/umd/locale/sk.js +0 -144
  317. package/lib/umd/locale/sl.js +0 -142
  318. package/lib/umd/locale/sr-Latn.js +0 -142
  319. package/lib/umd/locale/sr.js +0 -142
  320. package/lib/umd/locale/sv-SE.js +0 -142
  321. package/lib/umd/locale/sw.js +0 -142
  322. package/lib/umd/locale/ta.js +0 -141
  323. package/lib/umd/locale/th.js +0 -142
  324. package/lib/umd/locale/tk.js +0 -142
  325. package/lib/umd/locale/tr-TR.js +0 -142
  326. package/lib/umd/locale/ua.js +0 -142
  327. package/lib/umd/locale/ug-CN.js +0 -142
  328. package/lib/umd/locale/uz-UZ.js +0 -142
  329. package/lib/umd/locale/vi.js +0 -142
  330. package/lib/umd/locale/zh-CN.js +0 -142
  331. package/lib/umd/locale/zh-TW.js +0 -142
  332. package/lib/upload.js +0 -1390
  333. package/lib/utils/after-leave.js +0 -35
  334. package/lib/utils/aria-dialog.js +0 -104
  335. package/lib/utils/aria-utils.js +0 -126
  336. package/lib/utils/clickoutside.js +0 -79
  337. package/lib/utils/date-util.js +0 -310
  338. package/lib/utils/date.js +0 -369
  339. package/lib/utils/dom.js +0 -234
  340. package/lib/utils/lodash.js +0 -9477
  341. package/lib/utils/menu/aria-menubar.js +0 -24
  342. package/lib/utils/menu/aria-menuitem.js +0 -62
  343. package/lib/utils/menu/aria-submenu.js +0 -69
  344. package/lib/utils/merge.js +0 -21
  345. package/lib/utils/popper.js +0 -1261
  346. package/lib/utils/popup/index.js +0 -233
  347. package/lib/utils/popup/popup-manager.js +0 -205
  348. package/lib/utils/resize-event.js +0 -59
  349. package/lib/utils/scroll-into-view.js +0 -38
  350. package/lib/utils/scrollbar-width.js +0 -39
  351. package/lib/utils/shared.js +0 -12
  352. package/lib/utils/types.js +0 -52
  353. package/lib/utils/util.js +0 -272
  354. package/lib/utils/vdom.js +0 -13
  355. package/lib/utils/vue-popper.js +0 -202
  356. package/packages/.DS_Store +0 -0
  357. package/packages/table/.DS_Store +0 -0
  358. package/packages/table/src/.DS_Store +0 -0
  359. package/packages/theme-chalk/lib/alert.css +0 -1
  360. package/packages/theme-chalk/lib/aside.css +0 -1
  361. package/packages/theme-chalk/lib/autocomplete.css +0 -1
  362. package/packages/theme-chalk/lib/avatar.css +0 -1
  363. package/packages/theme-chalk/lib/backtop.css +0 -1
  364. package/packages/theme-chalk/lib/badge.css +0 -1
  365. package/packages/theme-chalk/lib/base.css +0 -1
  366. package/packages/theme-chalk/lib/breadcrumb-item.css +0 -0
  367. package/packages/theme-chalk/lib/breadcrumb.css +0 -1
  368. package/packages/theme-chalk/lib/button-group.css +0 -0
  369. package/packages/theme-chalk/lib/button.css +0 -1
  370. package/packages/theme-chalk/lib/calendar.css +0 -1
  371. package/packages/theme-chalk/lib/card.css +0 -1
  372. package/packages/theme-chalk/lib/carousel-item.css +0 -1
  373. package/packages/theme-chalk/lib/carousel.css +0 -1
  374. package/packages/theme-chalk/lib/cascader-panel.css +0 -1
  375. package/packages/theme-chalk/lib/cascader.css +0 -1
  376. package/packages/theme-chalk/lib/checkbox-button.css +0 -0
  377. package/packages/theme-chalk/lib/checkbox-group.css +0 -0
  378. package/packages/theme-chalk/lib/checkbox.css +0 -1
  379. package/packages/theme-chalk/lib/col.css +0 -1
  380. package/packages/theme-chalk/lib/collapse-item.css +0 -0
  381. package/packages/theme-chalk/lib/collapse.css +0 -1
  382. package/packages/theme-chalk/lib/color-picker.css +0 -1
  383. package/packages/theme-chalk/lib/container.css +0 -1
  384. package/packages/theme-chalk/lib/date-picker.css +0 -1
  385. package/packages/theme-chalk/lib/descriptions-item.css +0 -1
  386. package/packages/theme-chalk/lib/descriptions.css +0 -1
  387. package/packages/theme-chalk/lib/dialog.css +0 -1
  388. package/packages/theme-chalk/lib/display.css +0 -1
  389. package/packages/theme-chalk/lib/divider.css +0 -1
  390. package/packages/theme-chalk/lib/drawer.css +0 -1
  391. package/packages/theme-chalk/lib/dropdown-item.css +0 -0
  392. package/packages/theme-chalk/lib/dropdown-menu.css +0 -0
  393. package/packages/theme-chalk/lib/dropdown.css +0 -1
  394. package/packages/theme-chalk/lib/empty.css +0 -1
  395. package/packages/theme-chalk/lib/fonts/element-icons.ttf +0 -0
  396. package/packages/theme-chalk/lib/fonts/element-icons.woff +0 -0
  397. package/packages/theme-chalk/lib/fonts/icon-sim.ttf +0 -0
  398. package/packages/theme-chalk/lib/fonts/icon-sim.woff +0 -0
  399. package/packages/theme-chalk/lib/fonts/icon-sim.woff2 +0 -0
  400. package/packages/theme-chalk/lib/footer.css +0 -1
  401. package/packages/theme-chalk/lib/form-item.css +0 -0
  402. package/packages/theme-chalk/lib/form.css +0 -1
  403. package/packages/theme-chalk/lib/header.css +0 -1
  404. package/packages/theme-chalk/lib/icon.css +0 -1
  405. package/packages/theme-chalk/lib/image.css +0 -1
  406. package/packages/theme-chalk/lib/index.css +0 -1
  407. package/packages/theme-chalk/lib/infinite-scroll.css +0 -0
  408. package/packages/theme-chalk/lib/infiniteScroll.css +0 -0
  409. package/packages/theme-chalk/lib/input-number.css +0 -1
  410. package/packages/theme-chalk/lib/input.css +0 -1
  411. package/packages/theme-chalk/lib/link.css +0 -1
  412. package/packages/theme-chalk/lib/loading.css +0 -1
  413. package/packages/theme-chalk/lib/main.css +0 -1
  414. package/packages/theme-chalk/lib/menu-item-group.css +0 -0
  415. package/packages/theme-chalk/lib/menu-item.css +0 -0
  416. package/packages/theme-chalk/lib/menu.css +0 -1
  417. package/packages/theme-chalk/lib/message-box.css +0 -1
  418. package/packages/theme-chalk/lib/message.css +0 -1
  419. package/packages/theme-chalk/lib/notification.css +0 -1
  420. package/packages/theme-chalk/lib/option-group.css +0 -1
  421. package/packages/theme-chalk/lib/option.css +0 -1
  422. package/packages/theme-chalk/lib/page-header.css +0 -1
  423. package/packages/theme-chalk/lib/pagination.css +0 -1
  424. package/packages/theme-chalk/lib/popconfirm.css +0 -1
  425. package/packages/theme-chalk/lib/popover.css +0 -1
  426. package/packages/theme-chalk/lib/popper.css +0 -1
  427. package/packages/theme-chalk/lib/progress.css +0 -1
  428. package/packages/theme-chalk/lib/radio-button.css +0 -1
  429. package/packages/theme-chalk/lib/radio-group.css +0 -1
  430. package/packages/theme-chalk/lib/radio.css +0 -1
  431. package/packages/theme-chalk/lib/rate.css +0 -1
  432. package/packages/theme-chalk/lib/reset.css +0 -1
  433. package/packages/theme-chalk/lib/result.css +0 -1
  434. package/packages/theme-chalk/lib/row.css +0 -1
  435. package/packages/theme-chalk/lib/scrollbar.css +0 -1
  436. package/packages/theme-chalk/lib/select-dropdown.css +0 -1
  437. package/packages/theme-chalk/lib/select.css +0 -1
  438. package/packages/theme-chalk/lib/skeleton-item.css +0 -1
  439. package/packages/theme-chalk/lib/skeleton.css +0 -1
  440. package/packages/theme-chalk/lib/slider.css +0 -1
  441. package/packages/theme-chalk/lib/spinner.css +0 -1
  442. package/packages/theme-chalk/lib/statistic.css +0 -1
  443. package/packages/theme-chalk/lib/step.css +0 -1
  444. package/packages/theme-chalk/lib/steps.css +0 -1
  445. package/packages/theme-chalk/lib/submenu.css +0 -0
  446. package/packages/theme-chalk/lib/switch.css +0 -1
  447. package/packages/theme-chalk/lib/tab-pane.css +0 -0
  448. package/packages/theme-chalk/lib/table-column.css +0 -1
  449. package/packages/theme-chalk/lib/table.css +0 -1
  450. package/packages/theme-chalk/lib/tabs.css +0 -1
  451. package/packages/theme-chalk/lib/tag.css +0 -1
  452. package/packages/theme-chalk/lib/time-picker.css +0 -1
  453. package/packages/theme-chalk/lib/time-select.css +0 -1
  454. package/packages/theme-chalk/lib/timeline-item.css +0 -1
  455. package/packages/theme-chalk/lib/timeline.css +0 -1
  456. package/packages/theme-chalk/lib/tooltip.css +0 -1
  457. package/packages/theme-chalk/lib/transfer.css +0 -1
  458. package/packages/theme-chalk/lib/tree.css +0 -1
  459. package/packages/theme-chalk/lib/upload.css +0 -1
  460. package/packages/theme-chalk/src/.DS_Store +0 -0
  461. package/packages/theme-chalk/src/fonts/.DS_Store +0 -0
  462. package/src/.DS_Store +0 -0
  463. package/src/utils/.DS_Store +0 -0
@@ -1,1261 +0,0 @@
1
- 'use strict';
2
-
3
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4
-
5
- /**
6
- * @fileOverview Kickass library to create and place poppers near their reference elements.
7
- * @version {{version}}
8
- * @license
9
- * Copyright (c) 2016 Federico Zivolo and contributors
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in all
19
- * copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- * SOFTWARE.
28
- */
29
-
30
- //
31
- // Cross module loader
32
- // Supported: Node, AMD, Browser globals
33
- //
34
- ;(function (root, factory) {
35
- if (typeof define === 'function' && define.amd) {
36
- // AMD. Register as an anonymous module.
37
- define(factory);
38
- } else if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports) {
39
- // Node. Does not work with strict CommonJS, but
40
- // only CommonJS-like environments that support module.exports,
41
- // like Node.
42
- module.exports = factory();
43
- } else {
44
- // Browser globals (root is window)
45
- root.Popper = factory();
46
- }
47
- })(undefined, function () {
48
-
49
- 'use strict';
50
-
51
- var root = window;
52
-
53
- // default options
54
- var DEFAULTS = {
55
- // placement of the popper
56
- placement: 'bottom',
57
-
58
- gpuAcceleration: true,
59
-
60
- // shift popper from its origin by the given amount of pixels (can be negative)
61
- offset: 0,
62
-
63
- // the element which will act as boundary of the popper
64
- boundariesElement: 'viewport',
65
-
66
- // amount of pixel used to define a minimum distance between the boundaries and the popper
67
- boundariesPadding: 5,
68
-
69
- // popper will try to prevent overflow following this order,
70
- // by default, then, it could overflow on the left and on top of the boundariesElement
71
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
72
-
73
- // the behavior used by flip to change the placement of the popper
74
- flipBehavior: 'flip',
75
-
76
- arrowElement: '[x-arrow]',
77
-
78
- arrowOffset: 0,
79
-
80
- // list of functions used to modify the offsets before they are applied to the popper
81
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
82
-
83
- modifiersIgnored: [],
84
-
85
- forceAbsolute: false
86
- };
87
-
88
- /**
89
- * Create a new Popper.js instance
90
- * @constructor Popper
91
- * @param {HTMLElement} reference - The reference element used to position the popper
92
- * @param {HTMLElement|Object} popper
93
- * The HTML element used as popper, or a configuration used to generate the popper.
94
- * @param {String} [popper.tagName='div'] The tag name of the generated popper.
95
- * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
96
- * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
97
- * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
98
- * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
99
- * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
100
- * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
101
- * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
102
- * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
103
- * @param {Object} options
104
- * @param {String} [options.placement=bottom]
105
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
106
- * left(-start, -end)`
107
- *
108
- * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
109
- * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
110
- * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
111
- * reference element.
112
- * By default, it will look for a child node of the popper with the `x-arrow` attribute.
113
- *
114
- * @param {Boolean} [options.gpuAcceleration=true]
115
- * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
116
- * browser to use the GPU to accelerate the rendering.
117
- * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
118
- *
119
- * @param {Number} [options.offset=0]
120
- * Amount of pixels the popper will be shifted (can be negative).
121
- *
122
- * @param {String|Element} [options.boundariesElement='viewport']
123
- * The element which will define the boundaries of the popper position, the popper will never be placed outside
124
- * of the defined boundaries (except if `keepTogether` is enabled)
125
- *
126
- * @param {Number} [options.boundariesPadding=5]
127
- * Additional padding for the boundaries
128
- *
129
- * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
130
- * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
131
- * this means that the last ones will never overflow
132
- *
133
- * @param {String|Array} [options.flipBehavior='flip']
134
- * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
135
- * overlap its reference element. Defining `flip` as value, the placement will be flipped on
136
- * its axis (`right - left`, `top - bottom`).
137
- * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
138
- * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
139
- * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
140
- *
141
- * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
142
- * List of functions used to modify the data before they are applied to the popper, add your custom functions
143
- * to this array to edit the offsets and placement.
144
- * The function should reflect the @params and @returns of preventOverflow
145
- *
146
- * @param {Array} [options.modifiersIgnored=[]]
147
- * Put here any built-in modifier name you want to exclude from the modifiers list
148
- * The function should reflect the @params and @returns of preventOverflow
149
- *
150
- * @param {Boolean} [options.removeOnDestroy=false]
151
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
152
- */
153
- function Popper(reference, popper, options) {
154
- this._reference = reference.jquery ? reference[0] : reference;
155
- this.state = {};
156
-
157
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
158
- // generate a default popper if is not defined
159
- var isNotDefined = typeof popper === 'undefined' || popper === null;
160
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
161
- if (isNotDefined || isConfig) {
162
- this._popper = this.parse(isConfig ? popper : {});
163
- }
164
- // otherwise, use the given HTMLElement as popper
165
- else {
166
- this._popper = popper.jquery ? popper[0] : popper;
167
- }
168
-
169
- // with {} we create a new object with the options inside it
170
- this._options = Object.assign({}, DEFAULTS, options);
171
-
172
- // refactoring modifiers' list
173
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
174
- // remove ignored modifiers
175
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
176
-
177
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
178
- // margins needs to be calculated to get the correct popper offsets
179
- if (modifier === 'applyStyle') {
180
- this._popper.setAttribute('x-placement', this._options.placement);
181
- }
182
-
183
- // return predefined modifier identified by string or keep the custom one
184
- return this.modifiers[modifier] || modifier;
185
- }.bind(this));
186
-
187
- // make sure to apply the popper position before any computation
188
- this.state.position = this._getPosition(this._popper, this._reference);
189
- setStyle(this._popper, { position: this.state.position, top: 0 });
190
-
191
- // fire the first update to position the popper in the right place
192
- this.update();
193
-
194
- // setup event listeners, they will take care of update the position in specific situations
195
- this._setupEventListeners();
196
- return this;
197
- }
198
-
199
- //
200
- // Methods
201
- //
202
- /**
203
- * Destroy the popper
204
- * @method
205
- * @memberof Popper
206
- */
207
- Popper.prototype.destroy = function () {
208
- this._popper.removeAttribute('x-placement');
209
- this._popper.style.left = '';
210
- this._popper.style.position = '';
211
- this._popper.style.top = '';
212
- this._popper.style[getSupportedPropertyName('transform')] = '';
213
- this._removeEventListeners();
214
-
215
- // remove the popper if user explicity asked for the deletion on destroy
216
- if (this._options.removeOnDestroy) {
217
- this._popper.remove();
218
- }
219
- return this;
220
- };
221
-
222
- /**
223
- * Updates the position of the popper, computing the new offsets and applying the new style
224
- * @method
225
- * @memberof Popper
226
- */
227
- Popper.prototype.update = function () {
228
- var data = { instance: this, styles: {} };
229
-
230
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
231
- // and refer to _originalPlacement to know the original value
232
- data.placement = this._options.placement;
233
- data._originalPlacement = this._options.placement;
234
-
235
- // compute the popper and reference offsets and put them inside data.offsets
236
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
237
-
238
- // get boundaries
239
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
240
-
241
- data = this.runModifiers(data, this._options.modifiers);
242
-
243
- if (typeof this.state.updateCallback === 'function') {
244
- this.state.updateCallback(data);
245
- }
246
- };
247
-
248
- /**
249
- * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
250
- * @method
251
- * @memberof Popper
252
- * @param {Function} callback
253
- */
254
- Popper.prototype.onCreate = function (callback) {
255
- // the createCallbacks return as first argument the popper instance
256
- callback(this);
257
- return this;
258
- };
259
-
260
- /**
261
- * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
262
- * used to style popper and its arrow.
263
- * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
264
- * @method
265
- * @memberof Popper
266
- * @param {Function} callback
267
- */
268
- Popper.prototype.onUpdate = function (callback) {
269
- this.state.updateCallback = callback;
270
- return this;
271
- };
272
-
273
- /**
274
- * Helper used to generate poppers from a configuration file
275
- * @method
276
- * @memberof Popper
277
- * @param config {Object} configuration
278
- * @returns {HTMLElement} popper
279
- */
280
- Popper.prototype.parse = function (config) {
281
- var defaultConfig = {
282
- tagName: 'div',
283
- classNames: ['popper'],
284
- attributes: [],
285
- parent: root.document.body,
286
- content: '',
287
- contentType: 'text',
288
- arrowTagName: 'div',
289
- arrowClassNames: ['popper__arrow'],
290
- arrowAttributes: ['x-arrow']
291
- };
292
- config = Object.assign({}, defaultConfig, config);
293
-
294
- var d = root.document;
295
-
296
- var popper = d.createElement(config.tagName);
297
- addClassNames(popper, config.classNames);
298
- addAttributes(popper, config.attributes);
299
- if (config.contentType === 'node') {
300
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
301
- } else if (config.contentType === 'html') {
302
- popper.innerHTML = config.content;
303
- } else {
304
- popper.textContent = config.content;
305
- }
306
-
307
- if (config.arrowTagName) {
308
- var arrow = d.createElement(config.arrowTagName);
309
- addClassNames(arrow, config.arrowClassNames);
310
- addAttributes(arrow, config.arrowAttributes);
311
- popper.appendChild(arrow);
312
- }
313
-
314
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
315
-
316
- // if the given parent is a string, use it to match an element
317
- // if more than one element is matched, the first one will be used as parent
318
- // if no elements are matched, the script will throw an error
319
- if (typeof parent === 'string') {
320
- parent = d.querySelectorAll(config.parent);
321
- if (parent.length > 1) {
322
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
323
- }
324
- if (parent.length === 0) {
325
- throw 'ERROR: the given `parent` doesn\'t exists!';
326
- }
327
- parent = parent[0];
328
- }
329
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
330
- // the first one will be used as parent
331
- if (parent.length > 1 && parent instanceof Element === false) {
332
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
333
- parent = parent[0];
334
- }
335
-
336
- // append the generated popper to its parent
337
- parent.appendChild(popper);
338
-
339
- return popper;
340
-
341
- /**
342
- * Adds class names to the given element
343
- * @function
344
- * @ignore
345
- * @param {HTMLElement} target
346
- * @param {Array} classes
347
- */
348
- function addClassNames(element, classNames) {
349
- classNames.forEach(function (className) {
350
- element.classList.add(className);
351
- });
352
- }
353
-
354
- /**
355
- * Adds attributes to the given element
356
- * @function
357
- * @ignore
358
- * @param {HTMLElement} target
359
- * @param {Array} attributes
360
- * @example
361
- * addAttributes(element, [ 'data-info:foobar' ]);
362
- */
363
- function addAttributes(element, attributes) {
364
- attributes.forEach(function (attribute) {
365
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
366
- });
367
- }
368
- };
369
-
370
- /**
371
- * Helper used to get the position which will be applied to the popper
372
- * @method
373
- * @memberof Popper
374
- * @param config {HTMLElement} popper element
375
- * @param reference {HTMLElement} reference element
376
- * @returns {String} position
377
- */
378
- Popper.prototype._getPosition = function (popper, reference) {
379
- var container = getOffsetParent(reference);
380
-
381
- if (this._options.forceAbsolute) {
382
- return 'absolute';
383
- }
384
-
385
- // Decide if the popper will be fixed
386
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
387
- var isParentFixed = isFixed(reference, container);
388
- return isParentFixed ? 'fixed' : 'absolute';
389
- };
390
-
391
- /**
392
- * Get offsets to the popper
393
- * @method
394
- * @memberof Popper
395
- * @access private
396
- * @param {Element} popper - the popper element
397
- * @param {Element} reference - the reference element (the popper will be relative to this)
398
- * @returns {Object} An object containing the offsets which will be applied to the popper
399
- */
400
- Popper.prototype._getOffsets = function (popper, reference, placement) {
401
- placement = placement.split('-')[0];
402
- var popperOffsets = {};
403
-
404
- popperOffsets.position = this.state.position;
405
- var isParentFixed = popperOffsets.position === 'fixed';
406
-
407
- //
408
- // Get reference element position
409
- //
410
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
411
-
412
- //
413
- // Get popper sizes
414
- //
415
- var popperRect = getOuterSizes(popper);
416
-
417
- //
418
- // Compute offsets of popper
419
- //
420
-
421
- // depending by the popper placement we have to compute its offsets slightly differently
422
- if (['right', 'left'].indexOf(placement) !== -1) {
423
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
424
- if (placement === 'left') {
425
- popperOffsets.left = referenceOffsets.left - popperRect.width;
426
- } else {
427
- popperOffsets.left = referenceOffsets.right;
428
- }
429
- } else {
430
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
431
- if (placement === 'top') {
432
- popperOffsets.top = referenceOffsets.top - popperRect.height;
433
- } else {
434
- popperOffsets.top = referenceOffsets.bottom;
435
- }
436
- }
437
-
438
- // Add width and height to our offsets object
439
- popperOffsets.width = popperRect.width;
440
- popperOffsets.height = popperRect.height;
441
-
442
- return {
443
- popper: popperOffsets,
444
- reference: referenceOffsets
445
- };
446
- };
447
-
448
- /**
449
- * Setup needed event listeners used to update the popper position
450
- * @method
451
- * @memberof Popper
452
- * @access private
453
- */
454
- Popper.prototype._setupEventListeners = function () {
455
- // NOTE: 1 DOM access here
456
- this.state.updateBound = this.update.bind(this);
457
- root.addEventListener('resize', this.state.updateBound);
458
- // if the boundariesElement is window we don't need to listen for the scroll event
459
- if (this._options.boundariesElement !== 'window') {
460
- var target = getScrollParent(this._reference);
461
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
462
- if (target === root.document.body || target === root.document.documentElement) {
463
- target = root;
464
- }
465
- target.addEventListener('scroll', this.state.updateBound);
466
- this.state.scrollTarget = target;
467
- }
468
- };
469
-
470
- /**
471
- * Remove event listeners used to update the popper position
472
- * @method
473
- * @memberof Popper
474
- * @access private
475
- */
476
- Popper.prototype._removeEventListeners = function () {
477
- // NOTE: 1 DOM access here
478
- root.removeEventListener('resize', this.state.updateBound);
479
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
480
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
481
- this.state.scrollTarget = null;
482
- }
483
- this.state.updateBound = null;
484
- };
485
-
486
- /**
487
- * Computed the boundaries limits and return them
488
- * @method
489
- * @memberof Popper
490
- * @access private
491
- * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
492
- * @param {Number} padding - Boundaries padding
493
- * @param {Element} boundariesElement - Element used to define the boundaries
494
- * @returns {Object} Coordinates of the boundaries
495
- */
496
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
497
- // NOTE: 1 DOM access here
498
- var boundaries = {};
499
- var width, height;
500
- if (boundariesElement === 'window') {
501
- var body = root.document.body,
502
- html = root.document.documentElement;
503
-
504
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
505
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
506
-
507
- boundaries = {
508
- top: 0,
509
- right: width,
510
- bottom: height,
511
- left: 0
512
- };
513
- } else if (boundariesElement === 'viewport') {
514
- var offsetParent = getOffsetParent(this._popper);
515
- var scrollParent = getScrollParent(this._popper);
516
- var offsetParentRect = getOffsetRect(offsetParent);
517
-
518
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
519
- var getScrollTopValue = function getScrollTopValue(element) {
520
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
521
- };
522
- var getScrollLeftValue = function getScrollLeftValue(element) {
523
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
524
- };
525
-
526
- // if the popper is fixed we don't have to substract scrolling from the boundaries
527
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
528
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
529
-
530
- boundaries = {
531
- top: 0 - (offsetParentRect.top - scrollTop),
532
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
533
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
534
- left: 0 - (offsetParentRect.left - scrollLeft)
535
- };
536
- } else {
537
- if (getOffsetParent(this._popper) === boundariesElement) {
538
- boundaries = {
539
- top: 0,
540
- left: 0,
541
- right: boundariesElement.clientWidth,
542
- bottom: boundariesElement.clientHeight
543
- };
544
- } else {
545
- boundaries = getOffsetRect(boundariesElement);
546
- }
547
- }
548
- boundaries.left += padding;
549
- boundaries.right -= padding;
550
- boundaries.top = boundaries.top + padding;
551
- boundaries.bottom = boundaries.bottom - padding;
552
- return boundaries;
553
- };
554
-
555
- /**
556
- * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
557
- * @method
558
- * @memberof Popper
559
- * @access public
560
- * @param {Object} data
561
- * @param {Array} modifiers
562
- * @param {Function} ends
563
- */
564
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
565
- var modifiersToRun = modifiers.slice();
566
- if (ends !== undefined) {
567
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
568
- }
569
-
570
- modifiersToRun.forEach(function (modifier) {
571
- if (isFunction(modifier)) {
572
- data = modifier.call(this, data);
573
- }
574
- }.bind(this));
575
-
576
- return data;
577
- };
578
-
579
- /**
580
- * Helper used to know if the given modifier depends from another one.
581
- * @method
582
- * @memberof Popper
583
- * @param {String} requesting - name of requesting modifier
584
- * @param {String} requested - name of requested modifier
585
- * @returns {Boolean}
586
- */
587
- Popper.prototype.isModifierRequired = function (requesting, requested) {
588
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
589
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
590
- return modifier === requested;
591
- }).length;
592
- };
593
-
594
- //
595
- // Modifiers
596
- //
597
-
598
- /**
599
- * Modifiers list
600
- * @namespace Popper.modifiers
601
- * @memberof Popper
602
- * @type {Object}
603
- */
604
- Popper.prototype.modifiers = {};
605
-
606
- /**
607
- * Apply the computed styles to the popper element
608
- * @method
609
- * @memberof Popper.modifiers
610
- * @argument {Object} data - The data object generated by `update` method
611
- * @returns {Object} The same data object
612
- */
613
- Popper.prototype.modifiers.applyStyle = function (data) {
614
- // apply the final offsets to the popper
615
- // NOTE: 1 DOM access here
616
- var styles = {
617
- position: data.offsets.popper.position
618
- };
619
-
620
- // round top and left to avoid blurry text
621
- var left = Math.round(data.offsets.popper.left);
622
- var top = Math.round(data.offsets.popper.top);
623
-
624
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
625
- // we automatically use the supported prefixed version if needed
626
- var prefixedProperty;
627
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
628
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
629
- styles.top = 0;
630
- styles.left = 0;
631
- }
632
- // othwerise, we use the standard `left` and `top` properties
633
- else {
634
- styles.left = left;
635
- styles.top = top;
636
- }
637
-
638
- // any property present in `data.styles` will be applied to the popper,
639
- // in this way we can make the 3rd party modifiers add custom styles to it
640
- // Be aware, modifiers could override the properties defined in the previous
641
- // lines of this modifier!
642
- Object.assign(styles, data.styles);
643
-
644
- setStyle(this._popper, styles);
645
-
646
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
647
- // NOTE: 1 DOM access here
648
- this._popper.setAttribute('x-placement', data.placement);
649
-
650
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
651
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
652
- setStyle(data.arrowElement, data.offsets.arrow);
653
- }
654
-
655
- return data;
656
- };
657
-
658
- /**
659
- * Modifier used to shift the popper on the start or end of its reference element side
660
- * @method
661
- * @memberof Popper.modifiers
662
- * @argument {Object} data - The data object generated by `update` method
663
- * @returns {Object} The data object, properly modified
664
- */
665
- Popper.prototype.modifiers.shift = function (data) {
666
- var placement = data.placement;
667
- var basePlacement = placement.split('-')[0];
668
- var shiftVariation = placement.split('-')[1];
669
-
670
- // if shift shiftVariation is specified, run the modifier
671
- if (shiftVariation) {
672
- var reference = data.offsets.reference;
673
- var popper = getPopperClientRect(data.offsets.popper);
674
-
675
- var shiftOffsets = {
676
- y: {
677
- start: { top: reference.top },
678
- end: { top: reference.top + reference.height - popper.height }
679
- },
680
- x: {
681
- start: { left: reference.left },
682
- end: { left: reference.left + reference.width - popper.width }
683
- }
684
- };
685
-
686
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
687
-
688
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
689
- }
690
-
691
- return data;
692
- };
693
-
694
- /**
695
- * Modifier used to make sure the popper does not overflows from it's boundaries
696
- * @method
697
- * @memberof Popper.modifiers
698
- * @argument {Object} data - The data object generated by `update` method
699
- * @returns {Object} The data object, properly modified
700
- */
701
- Popper.prototype.modifiers.preventOverflow = function (data) {
702
- var order = this._options.preventOverflowOrder;
703
- var popper = getPopperClientRect(data.offsets.popper);
704
-
705
- var check = {
706
- left: function left() {
707
- var left = popper.left;
708
- if (popper.left < data.boundaries.left) {
709
- left = Math.max(popper.left, data.boundaries.left);
710
- }
711
- return { left: left };
712
- },
713
- right: function right() {
714
- var left = popper.left;
715
- if (popper.right > data.boundaries.right) {
716
- left = Math.min(popper.left, data.boundaries.right - popper.width);
717
- }
718
- return { left: left };
719
- },
720
- top: function top() {
721
- var top = popper.top;
722
- if (popper.top < data.boundaries.top) {
723
- top = Math.max(popper.top, data.boundaries.top);
724
- }
725
- return { top: top };
726
- },
727
- bottom: function bottom() {
728
- var top = popper.top;
729
- if (popper.bottom > data.boundaries.bottom) {
730
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
731
- }
732
- return { top: top };
733
- }
734
- };
735
-
736
- order.forEach(function (direction) {
737
- data.offsets.popper = Object.assign(popper, check[direction]());
738
- });
739
-
740
- return data;
741
- };
742
-
743
- /**
744
- * Modifier used to make sure the popper is always near its reference
745
- * @method
746
- * @memberof Popper.modifiers
747
- * @argument {Object} data - The data object generated by _update method
748
- * @returns {Object} The data object, properly modified
749
- */
750
- Popper.prototype.modifiers.keepTogether = function (data) {
751
- var popper = getPopperClientRect(data.offsets.popper);
752
- var reference = data.offsets.reference;
753
- var f = Math.floor;
754
-
755
- if (popper.right < f(reference.left)) {
756
- data.offsets.popper.left = f(reference.left) - popper.width;
757
- }
758
- if (popper.left > f(reference.right)) {
759
- data.offsets.popper.left = f(reference.right);
760
- }
761
- if (popper.bottom < f(reference.top)) {
762
- data.offsets.popper.top = f(reference.top) - popper.height;
763
- }
764
- if (popper.top > f(reference.bottom)) {
765
- data.offsets.popper.top = f(reference.bottom);
766
- }
767
-
768
- return data;
769
- };
770
-
771
- /**
772
- * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
773
- * Requires the `preventOverflow` modifier before it in order to work.
774
- * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
775
- * @method
776
- * @memberof Popper.modifiers
777
- * @argument {Object} data - The data object generated by _update method
778
- * @returns {Object} The data object, properly modified
779
- */
780
- Popper.prototype.modifiers.flip = function (data) {
781
- // check if preventOverflow is in the list of modifiers before the flip modifier.
782
- // otherwise flip would not work as expected.
783
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
784
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
785
- return data;
786
- }
787
-
788
- if (data.flipped && data.placement === data._originalPlacement) {
789
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
790
- return data;
791
- }
792
-
793
- var placement = data.placement.split('-')[0];
794
- var placementOpposite = getOppositePlacement(placement);
795
- var variation = data.placement.split('-')[1] || '';
796
-
797
- var flipOrder = [];
798
- if (this._options.flipBehavior === 'flip') {
799
- flipOrder = [placement, placementOpposite];
800
- } else {
801
- flipOrder = this._options.flipBehavior;
802
- }
803
-
804
- flipOrder.forEach(function (step, index) {
805
- if (placement !== step || flipOrder.length === index + 1) {
806
- return;
807
- }
808
-
809
- placement = data.placement.split('-')[0];
810
- placementOpposite = getOppositePlacement(placement);
811
-
812
- var popperOffsets = getPopperClientRect(data.offsets.popper);
813
-
814
- // this boolean is used to distinguish right and bottom from top and left
815
- // they need different computations to get flipped
816
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
817
-
818
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
819
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
820
- // we'll use this boolean to detect any flip loop
821
- data.flipped = true;
822
- data.placement = flipOrder[index + 1];
823
- if (variation) {
824
- data.placement += '-' + variation;
825
- }
826
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
827
-
828
- data = this.runModifiers(data, this._options.modifiers, this._flip);
829
- }
830
- }.bind(this));
831
- return data;
832
- };
833
-
834
- /**
835
- * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
836
- * The offsets will shift the popper on the side of its reference element.
837
- * @method
838
- * @memberof Popper.modifiers
839
- * @argument {Object} data - The data object generated by _update method
840
- * @returns {Object} The data object, properly modified
841
- */
842
- Popper.prototype.modifiers.offset = function (data) {
843
- var offset = this._options.offset;
844
- var popper = data.offsets.popper;
845
-
846
- if (data.placement.indexOf('left') !== -1) {
847
- popper.top -= offset;
848
- } else if (data.placement.indexOf('right') !== -1) {
849
- popper.top += offset;
850
- } else if (data.placement.indexOf('top') !== -1) {
851
- popper.left -= offset;
852
- } else if (data.placement.indexOf('bottom') !== -1) {
853
- popper.left += offset;
854
- }
855
- return data;
856
- };
857
-
858
- /**
859
- * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
860
- * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
861
- * @method
862
- * @memberof Popper.modifiers
863
- * @argument {Object} data - The data object generated by _update method
864
- * @returns {Object} The data object, properly modified
865
- */
866
- Popper.prototype.modifiers.arrow = function (data) {
867
- var arrow = this._options.arrowElement;
868
- var arrowOffset = this._options.arrowOffset;
869
-
870
- // if the arrowElement is a string, suppose it's a CSS selector
871
- if (typeof arrow === 'string') {
872
- arrow = this._popper.querySelector(arrow);
873
- }
874
-
875
- // if arrow element is not found, don't run the modifier
876
- if (!arrow) {
877
- return data;
878
- }
879
-
880
- // the arrow element must be child of its popper
881
- if (!this._popper.contains(arrow)) {
882
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
883
- return data;
884
- }
885
-
886
- // arrow depends on keepTogether in order to work
887
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
888
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
889
- return data;
890
- }
891
-
892
- var arrowStyle = {};
893
- var placement = data.placement.split('-')[0];
894
- var popper = getPopperClientRect(data.offsets.popper);
895
- var reference = data.offsets.reference;
896
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
897
-
898
- var len = isVertical ? 'height' : 'width';
899
- var side = isVertical ? 'top' : 'left';
900
- var translate = isVertical ? 'translateY' : 'translateX';
901
- var altSide = isVertical ? 'left' : 'top';
902
- var opSide = isVertical ? 'bottom' : 'right';
903
- var arrowSize = getOuterSizes(arrow)[len];
904
-
905
- //
906
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
907
- //
908
-
909
- // top/left side
910
- if (reference[opSide] - arrowSize < popper[side]) {
911
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
912
- }
913
- // bottom/right side
914
- if (reference[side] + arrowSize > popper[opSide]) {
915
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
916
- }
917
-
918
- // compute center of the popper
919
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
920
-
921
- var sideValue = center - popper[side];
922
-
923
- // prevent arrow from being placed not contiguously to its popper
924
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
925
- arrowStyle[side] = sideValue;
926
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
927
-
928
- data.offsets.arrow = arrowStyle;
929
- data.arrowElement = arrow;
930
-
931
- return data;
932
- };
933
-
934
- //
935
- // Helpers
936
- //
937
-
938
- /**
939
- * Get the outer sizes of the given element (offset size + margins)
940
- * @function
941
- * @ignore
942
- * @argument {Element} element
943
- * @returns {Object} object containing width and height properties
944
- */
945
- function getOuterSizes(element) {
946
- // NOTE: 1 DOM access here
947
- var _display = element.style.display,
948
- _visibility = element.style.visibility;
949
- element.style.display = 'block';element.style.visibility = 'hidden';
950
- var calcWidthToForceRepaint = element.offsetWidth;
951
-
952
- // original method
953
- var styles = root.getComputedStyle(element);
954
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
955
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
956
- var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
957
-
958
- // reset element styles
959
- element.style.display = _display;element.style.visibility = _visibility;
960
- return result;
961
- }
962
-
963
- /**
964
- * Get the opposite placement of the given one/
965
- * @function
966
- * @ignore
967
- * @argument {String} placement
968
- * @returns {String} flipped placement
969
- */
970
- function getOppositePlacement(placement) {
971
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
972
- return placement.replace(/left|right|bottom|top/g, function (matched) {
973
- return hash[matched];
974
- });
975
- }
976
-
977
- /**
978
- * Given the popper offsets, generate an output similar to getBoundingClientRect
979
- * @function
980
- * @ignore
981
- * @argument {Object} popperOffsets
982
- * @returns {Object} ClientRect like output
983
- */
984
- function getPopperClientRect(popperOffsets) {
985
- var offsets = Object.assign({}, popperOffsets);
986
- offsets.right = offsets.left + offsets.width;
987
- offsets.bottom = offsets.top + offsets.height;
988
- return offsets;
989
- }
990
-
991
- /**
992
- * Given an array and the key to find, returns its index
993
- * @function
994
- * @ignore
995
- * @argument {Array} arr
996
- * @argument keyToFind
997
- * @returns index or null
998
- */
999
- function getArrayKeyIndex(arr, keyToFind) {
1000
- var i = 0,
1001
- key;
1002
- for (key in arr) {
1003
- if (arr[key] === keyToFind) {
1004
- return i;
1005
- }
1006
- i++;
1007
- }
1008
- return null;
1009
- }
1010
-
1011
- /**
1012
- * Get CSS computed property of the given element
1013
- * @function
1014
- * @ignore
1015
- * @argument {Eement} element
1016
- * @argument {String} property
1017
- */
1018
- function getStyleComputedProperty(element, property) {
1019
- // NOTE: 1 DOM access here
1020
- var css = root.getComputedStyle(element, null);
1021
- return css[property];
1022
- }
1023
-
1024
- /**
1025
- * Returns the offset parent of the given element
1026
- * @function
1027
- * @ignore
1028
- * @argument {Element} element
1029
- * @returns {Element} offset parent
1030
- */
1031
- function getOffsetParent(element) {
1032
- // NOTE: 1 DOM access here
1033
- var offsetParent = element.offsetParent;
1034
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
1035
- }
1036
-
1037
- /**
1038
- * Returns the scrolling parent of the given element
1039
- * @function
1040
- * @ignore
1041
- * @argument {Element} element
1042
- * @returns {Element} offset parent
1043
- */
1044
- function getScrollParent(element) {
1045
- var parent = element.parentNode;
1046
-
1047
- if (!parent) {
1048
- return element;
1049
- }
1050
-
1051
- if (parent === root.document) {
1052
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
1053
- // greater than 0 and return the proper element
1054
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
1055
- return root.document.body;
1056
- } else {
1057
- return root.document.documentElement;
1058
- }
1059
- }
1060
-
1061
- // Firefox want us to check `-x` and `-y` variations as well
1062
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
1063
- // If the detected scrollParent is body, we perform an additional check on its parentNode
1064
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
1065
- // fixes issue #65
1066
- return parent;
1067
- }
1068
- return getScrollParent(element.parentNode);
1069
- }
1070
-
1071
- /**
1072
- * Check if the given element is fixed or is inside a fixed parent
1073
- * @function
1074
- * @ignore
1075
- * @argument {Element} element
1076
- * @argument {Element} customContainer
1077
- * @returns {Boolean} answer to "isFixed?"
1078
- */
1079
- function isFixed(element) {
1080
- if (element === root.document.body) {
1081
- return false;
1082
- }
1083
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
1084
- return true;
1085
- }
1086
- return element.parentNode ? isFixed(element.parentNode) : element;
1087
- }
1088
-
1089
- /**
1090
- * Set the style to the given popper
1091
- * @function
1092
- * @ignore
1093
- * @argument {Element} element - Element to apply the style to
1094
- * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
1095
- */
1096
- function setStyle(element, styles) {
1097
- function is_numeric(n) {
1098
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
1099
- }
1100
- Object.keys(styles).forEach(function (prop) {
1101
- var unit = '';
1102
- // add unit if the value is numeric and is one of the following
1103
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
1104
- unit = 'px';
1105
- }
1106
- element.style[prop] = styles[prop] + unit;
1107
- });
1108
- }
1109
-
1110
- /**
1111
- * Check if the given variable is a function
1112
- * @function
1113
- * @ignore
1114
- * @argument {*} functionToCheck - variable to check
1115
- * @returns {Boolean} answer to: is a function?
1116
- */
1117
- function isFunction(functionToCheck) {
1118
- var getType = {};
1119
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1120
- }
1121
-
1122
- /**
1123
- * Get the position of the given element, relative to its offset parent
1124
- * @function
1125
- * @ignore
1126
- * @param {Element} element
1127
- * @return {Object} position - Coordinates of the element and its `scrollTop`
1128
- */
1129
- function getOffsetRect(element) {
1130
- var elementRect = {
1131
- width: element.offsetWidth,
1132
- height: element.offsetHeight,
1133
- left: element.offsetLeft,
1134
- top: element.offsetTop
1135
- };
1136
-
1137
- elementRect.right = elementRect.left + elementRect.width;
1138
- elementRect.bottom = elementRect.top + elementRect.height;
1139
-
1140
- // position
1141
- return elementRect;
1142
- }
1143
-
1144
- /**
1145
- * Get bounding client rect of given element
1146
- * @function
1147
- * @ignore
1148
- * @param {HTMLElement} element
1149
- * @return {Object} client rect
1150
- */
1151
- function getBoundingClientRect(element) {
1152
- var rect = element.getBoundingClientRect();
1153
-
1154
- // whether the IE version is lower than 11
1155
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
1156
-
1157
- // fix ie document bounding top always 0 bug
1158
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
1159
-
1160
- return {
1161
- left: rect.left,
1162
- top: rectTop,
1163
- right: rect.right,
1164
- bottom: rect.bottom,
1165
- width: rect.right - rect.left,
1166
- height: rect.bottom - rectTop
1167
- };
1168
- }
1169
-
1170
- /**
1171
- * Given an element and one of its parents, return the offset
1172
- * @function
1173
- * @ignore
1174
- * @param {HTMLElement} element
1175
- * @param {HTMLElement} parent
1176
- * @return {Object} rect
1177
- */
1178
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
1179
- var elementRect = getBoundingClientRect(element);
1180
- var parentRect = getBoundingClientRect(parent);
1181
-
1182
- if (fixed) {
1183
- var scrollParent = getScrollParent(parent);
1184
- parentRect.top += scrollParent.scrollTop;
1185
- parentRect.bottom += scrollParent.scrollTop;
1186
- parentRect.left += scrollParent.scrollLeft;
1187
- parentRect.right += scrollParent.scrollLeft;
1188
- }
1189
-
1190
- var rect = {
1191
- top: elementRect.top - parentRect.top,
1192
- left: elementRect.left - parentRect.left,
1193
- bottom: elementRect.top - parentRect.top + elementRect.height,
1194
- right: elementRect.left - parentRect.left + elementRect.width,
1195
- width: elementRect.width,
1196
- height: elementRect.height
1197
- };
1198
- return rect;
1199
- }
1200
-
1201
- /**
1202
- * Get the prefixed supported property name
1203
- * @function
1204
- * @ignore
1205
- * @argument {String} property (camelCase)
1206
- * @returns {String} prefixed property (camelCase)
1207
- */
1208
- function getSupportedPropertyName(property) {
1209
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
1210
-
1211
- for (var i = 0; i < prefixes.length; i++) {
1212
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
1213
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
1214
- return toCheck;
1215
- }
1216
- }
1217
- return null;
1218
- }
1219
-
1220
- /**
1221
- * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
1222
- * objects to a target object. It will return the target object.
1223
- * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
1224
- * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
1225
- * @function
1226
- * @ignore
1227
- */
1228
- if (!Object.assign) {
1229
- Object.defineProperty(Object, 'assign', {
1230
- enumerable: false,
1231
- configurable: true,
1232
- writable: true,
1233
- value: function value(target) {
1234
- if (target === undefined || target === null) {
1235
- throw new TypeError('Cannot convert first argument to object');
1236
- }
1237
-
1238
- var to = Object(target);
1239
- for (var i = 1; i < arguments.length; i++) {
1240
- var nextSource = arguments[i];
1241
- if (nextSource === undefined || nextSource === null) {
1242
- continue;
1243
- }
1244
- nextSource = Object(nextSource);
1245
-
1246
- var keysArray = Object.keys(nextSource);
1247
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
1248
- var nextKey = keysArray[nextIndex];
1249
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
1250
- if (desc !== undefined && desc.enumerable) {
1251
- to[nextKey] = nextSource[nextKey];
1252
- }
1253
- }
1254
- }
1255
- return to;
1256
- }
1257
- });
1258
- }
1259
-
1260
- return Popper;
1261
- });