cy-element-ui 1.0.27 → 1.0.29

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 (902) hide show
  1. package/CHANGELOG.md +280 -280
  2. package/LICENSE +21 -21
  3. package/README.md +171 -171
  4. package/lib/alert.js +203 -211
  5. package/lib/aside.js +80 -80
  6. package/lib/autocomplete.js +465 -4583
  7. package/lib/avatar.js +126 -152
  8. package/lib/backtop.js +198 -190
  9. package/lib/badge.js +134 -128
  10. package/lib/breadcrumb-item.js +122 -146
  11. package/lib/breadcrumb.js +96 -97
  12. package/lib/button-group.js +65 -68
  13. package/lib/button.js +87 -67
  14. package/lib/calendar.js +605 -2416
  15. package/lib/card.js +100 -101
  16. package/lib/carousel-item.js +210 -854
  17. package/lib/carousel.js +411 -578
  18. package/lib/cascader-panel.js +1153 -3542
  19. package/lib/cascader.js +893 -7284
  20. package/lib/checkbox-button.js +290 -337
  21. package/lib/checkbox-group.js +105 -176
  22. package/lib/checkbox.js +220 -240
  23. package/lib/col.js +68 -113
  24. package/lib/collapse-item.js +162 -1250
  25. package/lib/collapse.js +123 -163
  26. package/lib/color-picker.js +1242 -5200
  27. package/lib/container.js +88 -98
  28. package/lib/date-picker.js +4024 -8447
  29. package/lib/descriptions-item.js +32 -53
  30. package/lib/descriptions.js +334 -697
  31. package/lib/dialog.js +247 -1721
  32. package/lib/directives/mousewheel.js +20 -14
  33. package/lib/directives/repeat-click.js +30 -27
  34. package/lib/divider.js +116 -109
  35. package/lib/drawer.js +315 -1109
  36. package/lib/dropdown-item.js +111 -159
  37. package/lib/dropdown-menu.js +117 -2445
  38. package/lib/dropdown.js +381 -1784
  39. package/lib/element-ui.common.js +42414 -46083
  40. package/lib/empty.js +202 -1069
  41. package/lib/fileUpload.js +605 -3512
  42. package/lib/footer.js +80 -80
  43. package/lib/form-item.js +467 -1222
  44. package/lib/form.js +258 -326
  45. package/lib/header.js +80 -80
  46. package/lib/icon.js +68 -71
  47. package/lib/image.js +743 -2375
  48. package/lib/index.js +1 -1
  49. package/lib/infinite-scroll.js +150 -814
  50. package/lib/input-number.js +444 -2177
  51. package/lib/input.js +517 -1197
  52. package/lib/link.js +135 -117
  53. package/lib/loading.js +372 -1139
  54. package/lib/locale/format.js +52 -42
  55. package/lib/locale/index.js +52 -38
  56. package/lib/locale/lang/af-ZA.js +123 -130
  57. package/lib/locale/lang/ar.js +122 -123
  58. package/lib/locale/lang/az.js +121 -122
  59. package/lib/locale/lang/bg.js +123 -133
  60. package/lib/locale/lang/bn.js +121 -121
  61. package/lib/locale/lang/ca.js +122 -123
  62. package/lib/locale/lang/cs-CZ.js +125 -127
  63. package/lib/locale/lang/da.js +122 -124
  64. package/lib/locale/lang/de.js +124 -126
  65. package/lib/locale/lang/ee.js +123 -125
  66. package/lib/locale/lang/el.js +123 -125
  67. package/lib/locale/lang/en.js +123 -127
  68. package/lib/locale/lang/eo.js +123 -125
  69. package/lib/locale/lang/es.js +122 -123
  70. package/lib/locale/lang/eu.js +123 -128
  71. package/lib/locale/lang/fa.js +123 -125
  72. package/lib/locale/lang/fi.js +123 -125
  73. package/lib/locale/lang/fr.js +122 -125
  74. package/lib/locale/lang/he.js +123 -130
  75. package/lib/locale/lang/hr.js +123 -128
  76. package/lib/locale/lang/hu.js +122 -124
  77. package/lib/locale/lang/hy-AM.js +123 -125
  78. package/lib/locale/lang/id.js +123 -124
  79. package/lib/locale/lang/is.js +123 -124
  80. package/lib/locale/lang/it.js +122 -123
  81. package/lib/locale/lang/ja.js +123 -125
  82. package/lib/locale/lang/kg.js +123 -125
  83. package/lib/locale/lang/km.js +123 -124
  84. package/lib/locale/lang/ko.js +123 -125
  85. package/lib/locale/lang/ku.js +123 -125
  86. package/lib/locale/lang/kz.js +123 -125
  87. package/lib/locale/lang/lo-LA.js +121 -121
  88. package/lib/locale/lang/lt.js +123 -125
  89. package/lib/locale/lang/lv.js +123 -125
  90. package/lib/locale/lang/mn.js +123 -125
  91. package/lib/locale/lang/ms.js +122 -123
  92. package/lib/locale/lang/nb-NO.js +122 -123
  93. package/lib/locale/lang/nl.js +123 -125
  94. package/lib/locale/lang/pl.js +123 -125
  95. package/lib/locale/lang/pt-br.js +123 -124
  96. package/lib/locale/lang/pt.js +123 -133
  97. package/lib/locale/lang/ro.js +123 -125
  98. package/lib/locale/lang/ru-RU.js +123 -124
  99. package/lib/locale/lang/si.js +123 -127
  100. package/lib/locale/lang/sk.js +125 -126
  101. package/lib/locale/lang/sl.js +123 -125
  102. package/lib/locale/lang/sr-Latn.js +123 -124
  103. package/lib/locale/lang/sr.js +123 -128
  104. package/lib/locale/lang/sv-SE.js +123 -128
  105. package/lib/locale/lang/sw.js +123 -127
  106. package/lib/locale/lang/ta.js +122 -130
  107. package/lib/locale/lang/th.js +123 -127
  108. package/lib/locale/lang/tk.js +123 -129
  109. package/lib/locale/lang/tr-TR.js +123 -125
  110. package/lib/locale/lang/ua.js +123 -124
  111. package/lib/locale/lang/ug-CN.js +123 -124
  112. package/lib/locale/lang/uz-UZ.js +123 -124
  113. package/lib/locale/lang/vi.js +123 -124
  114. package/lib/locale/lang/zh-CN.js +123 -124
  115. package/lib/locale/lang/zh-TW.js +123 -128
  116. package/lib/main.js +67 -69
  117. package/lib/menu-item-group.js +111 -105
  118. package/lib/menu-item.js +259 -3549
  119. package/lib/menu.js +559 -1697
  120. package/lib/message-box.js +693 -3422
  121. package/lib/message.js +229 -1663
  122. package/lib/mixins/emitter.js +30 -28
  123. package/lib/mixins/focus.js +11 -10
  124. package/lib/mixins/locale.js +14 -12
  125. package/lib/mixins/migrating.js +65 -58
  126. package/lib/notification.js +269 -1693
  127. package/lib/option-group.js +139 -190
  128. package/lib/option.js +192 -941
  129. package/lib/page-header.js +92 -1014
  130. package/lib/pagination.js +677 -6969
  131. package/lib/popconfirm.js +219 -3932
  132. package/lib/popover.js +368 -3242
  133. package/lib/progress.js +244 -254
  134. package/lib/radio-button.js +226 -259
  135. package/lib/radio-group.js +186 -249
  136. package/lib/radio.js +253 -263
  137. package/lib/rate.js +415 -1394
  138. package/lib/result.js +233 -189
  139. package/lib/row.js +41 -58
  140. package/lib/scrollbar.js +278 -1331
  141. package/lib/select.js +1347 -5731
  142. package/lib/skeleton-item.js +145 -133
  143. package/lib/skeleton.js +172 -163
  144. package/lib/slider.js +702 -5143
  145. package/lib/spinner.js +101 -113
  146. package/lib/statistic.js +533 -0
  147. package/lib/step.js +310 -273
  148. package/lib/steps.js +115 -852
  149. package/lib/subTitle.js +96 -95
  150. package/lib/submenu.js +448 -2887
  151. package/lib/switch.js +204 -1036
  152. package/lib/tab-pane.js +135 -125
  153. package/lib/tabDialog.js +493 -2350
  154. package/lib/table-column.js +751 -1975
  155. package/lib/table.js +3934 -7957
  156. package/lib/tabs.js +605 -1441
  157. package/lib/tag.js +68 -73
  158. package/lib/theme-chalk/README.md +33 -33
  159. package/lib/theme-chalk/package.json +35 -35
  160. package/lib/theme-chalk/src/alert.scss +147 -147
  161. package/lib/theme-chalk/src/aside.scss +7 -7
  162. package/lib/theme-chalk/src/autocomplete.scss +80 -80
  163. package/lib/theme-chalk/src/avatar.scss +51 -51
  164. package/lib/theme-chalk/src/backtop.scss +22 -22
  165. package/lib/theme-chalk/src/badge.scss +57 -57
  166. package/lib/theme-chalk/src/base.scss +2 -2
  167. package/lib/theme-chalk/src/breadcrumb.scss +55 -55
  168. package/lib/theme-chalk/src/button.scss +262 -262
  169. package/lib/theme-chalk/src/calendar.scss +79 -79
  170. package/lib/theme-chalk/src/card.scss +32 -32
  171. package/lib/theme-chalk/src/carousel-item.scss +50 -50
  172. package/lib/theme-chalk/src/carousel.scss +161 -161
  173. package/lib/theme-chalk/src/cascader-panel.scss +120 -120
  174. package/lib/theme-chalk/src/cascader.scss +182 -182
  175. package/lib/theme-chalk/src/checkbox.scss +359 -359
  176. package/lib/theme-chalk/src/col.scss +156 -156
  177. package/lib/theme-chalk/src/collapse.scss +63 -63
  178. package/lib/theme-chalk/src/color-picker.scss +384 -384
  179. package/lib/theme-chalk/src/common/popup.scss +42 -42
  180. package/lib/theme-chalk/src/common/transition.scss +99 -99
  181. package/lib/theme-chalk/src/common/var.scss +1028 -1028
  182. package/lib/theme-chalk/src/container.scss +14 -14
  183. package/lib/theme-chalk/src/date-picker/date-picker.scss +97 -97
  184. package/lib/theme-chalk/src/date-picker/date-range-picker.scss +101 -101
  185. package/lib/theme-chalk/src/date-picker/date-table.scss +151 -151
  186. package/lib/theme-chalk/src/date-picker/month-table.scss +82 -82
  187. package/lib/theme-chalk/src/date-picker/picker-panel.scss +117 -117
  188. package/lib/theme-chalk/src/date-picker/picker.scss +197 -197
  189. package/lib/theme-chalk/src/date-picker/time-picker.scss +85 -85
  190. package/lib/theme-chalk/src/date-picker/time-range-picker.scss +31 -31
  191. package/lib/theme-chalk/src/date-picker/time-spinner.scss +110 -110
  192. package/lib/theme-chalk/src/date-picker/year-table.scss +51 -51
  193. package/lib/theme-chalk/src/date-picker.scss +11 -11
  194. package/lib/theme-chalk/src/descriptions-item.scss +42 -42
  195. package/lib/theme-chalk/src/descriptions.scss +111 -111
  196. package/lib/theme-chalk/src/dialog.scss +123 -123
  197. package/lib/theme-chalk/src/display.scss +12 -12
  198. package/lib/theme-chalk/src/divider.scss +47 -47
  199. package/lib/theme-chalk/src/drawer.scss +219 -219
  200. package/lib/theme-chalk/src/dropdown.scss +182 -182
  201. package/lib/theme-chalk/src/empty.scss +45 -45
  202. package/lib/theme-chalk/src/footer.scss +8 -8
  203. package/lib/theme-chalk/src/form.scss +167 -167
  204. package/lib/theme-chalk/src/header.scss +8 -8
  205. package/lib/theme-chalk/src/icon.scss +1167 -1167
  206. package/lib/theme-chalk/src/image.scss +179 -179
  207. package/lib/theme-chalk/src/index.scss +90 -89
  208. package/lib/theme-chalk/src/input-number.scss +180 -180
  209. package/lib/theme-chalk/src/input.scss +360 -360
  210. package/lib/theme-chalk/src/link.scss +81 -81
  211. package/lib/theme-chalk/src/loading.scss +96 -96
  212. package/lib/theme-chalk/src/main.scss +12 -12
  213. package/lib/theme-chalk/src/menu.scss +289 -289
  214. package/lib/theme-chalk/src/message-box.scss +226 -226
  215. package/lib/theme-chalk/src/message.scss +120 -120
  216. package/lib/theme-chalk/src/mixins/_button.scss +81 -81
  217. package/lib/theme-chalk/src/mixins/config.scss +4 -4
  218. package/lib/theme-chalk/src/mixins/function.scss +44 -44
  219. package/lib/theme-chalk/src/mixins/mixins.scss +190 -190
  220. package/lib/theme-chalk/src/mixins/utils.scss +39 -39
  221. package/lib/theme-chalk/src/notification.scss +99 -99
  222. package/lib/theme-chalk/src/option-group.scss +42 -42
  223. package/lib/theme-chalk/src/option.scss +36 -36
  224. package/lib/theme-chalk/src/page-header.scss +41 -41
  225. package/lib/theme-chalk/src/pagination.scss +295 -295
  226. package/lib/theme-chalk/src/popconfirm.scss +16 -16
  227. package/lib/theme-chalk/src/popover.scss +40 -40
  228. package/lib/theme-chalk/src/popper.scss +101 -101
  229. package/lib/theme-chalk/src/progress.scss +141 -141
  230. package/lib/theme-chalk/src/radio-button.scss +113 -113
  231. package/lib/theme-chalk/src/radio-group.scss +9 -9
  232. package/lib/theme-chalk/src/radio.scss +199 -199
  233. package/lib/theme-chalk/src/rate.scss +49 -49
  234. package/lib/theme-chalk/src/reset.scss +79 -79
  235. package/lib/theme-chalk/src/result.scss +61 -61
  236. package/lib/theme-chalk/src/row.scss +43 -43
  237. package/lib/theme-chalk/src/scrollbar.scss +72 -72
  238. package/lib/theme-chalk/src/select-dropdown.scss +62 -62
  239. package/lib/theme-chalk/src/select.scss +152 -152
  240. package/lib/theme-chalk/src/skeleton-item.scss +84 -84
  241. package/lib/theme-chalk/src/skeleton.scss +40 -40
  242. package/lib/theme-chalk/src/slider.scss +250 -250
  243. package/lib/theme-chalk/src/spinner.scss +44 -44
  244. package/lib/theme-chalk/src/statistic.scss +38 -0
  245. package/lib/theme-chalk/src/step.scss +317 -317
  246. package/lib/theme-chalk/src/steps.scss +20 -20
  247. package/lib/theme-chalk/src/switch.scss +116 -116
  248. package/lib/theme-chalk/src/table-column.scss +97 -97
  249. package/lib/theme-chalk/src/table.scss +564 -564
  250. package/lib/theme-chalk/src/tabs.scss +602 -602
  251. package/lib/theme-chalk/src/tag.scss +163 -163
  252. package/lib/theme-chalk/src/time-picker.scss +8 -8
  253. package/lib/theme-chalk/src/time-select.scss +37 -37
  254. package/lib/theme-chalk/src/timeline-item.scss +86 -86
  255. package/lib/theme-chalk/src/timeline.scss +14 -14
  256. package/lib/theme-chalk/src/tooltip.scss +141 -141
  257. package/lib/theme-chalk/src/transfer.scss +227 -227
  258. package/lib/theme-chalk/src/tree.scss +123 -123
  259. package/lib/theme-chalk/src/upload.scss +603 -603
  260. package/lib/time-picker.js +1837 -6690
  261. package/lib/time-select.js +1240 -6327
  262. package/lib/timeline-item.js +174 -133
  263. package/lib/timeline.js +39 -43
  264. package/lib/tooltip.js +287 -3184
  265. package/lib/transfer.js +625 -2929
  266. package/lib/transitions/collapse-transition.js +87 -69
  267. package/lib/tree.js +1741 -3248
  268. package/lib/treeSelect.js +370 -4109
  269. package/lib/umd/locale/af-ZA.js +138 -145
  270. package/lib/umd/locale/ar.js +137 -138
  271. package/lib/umd/locale/az.js +137 -139
  272. package/lib/umd/locale/bg.js +138 -148
  273. package/lib/umd/locale/bn.js +137 -138
  274. package/lib/umd/locale/ca.js +137 -138
  275. package/lib/umd/locale/cs-CZ.js +140 -142
  276. package/lib/umd/locale/da.js +137 -139
  277. package/lib/umd/locale/de.js +139 -141
  278. package/lib/umd/locale/ee.js +138 -140
  279. package/lib/umd/locale/el.js +138 -140
  280. package/lib/umd/locale/en.js +138 -142
  281. package/lib/umd/locale/eo.js +138 -140
  282. package/lib/umd/locale/es.js +137 -138
  283. package/lib/umd/locale/eu.js +138 -143
  284. package/lib/umd/locale/fa.js +138 -140
  285. package/lib/umd/locale/fi.js +138 -140
  286. package/lib/umd/locale/fr.js +137 -140
  287. package/lib/umd/locale/he.js +138 -145
  288. package/lib/umd/locale/hr.js +138 -143
  289. package/lib/umd/locale/hu.js +137 -139
  290. package/lib/umd/locale/hy-AM.js +138 -140
  291. package/lib/umd/locale/id.js +138 -139
  292. package/lib/umd/locale/is.js +138 -139
  293. package/lib/umd/locale/it.js +137 -138
  294. package/lib/umd/locale/ja.js +138 -140
  295. package/lib/umd/locale/kg.js +138 -140
  296. package/lib/umd/locale/km.js +138 -139
  297. package/lib/umd/locale/ko.js +138 -140
  298. package/lib/umd/locale/ku.js +138 -140
  299. package/lib/umd/locale/kz.js +138 -140
  300. package/lib/umd/locale/lo-LA.js +137 -138
  301. package/lib/umd/locale/lt.js +138 -140
  302. package/lib/umd/locale/lv.js +138 -140
  303. package/lib/umd/locale/mn.js +138 -140
  304. package/lib/umd/locale/ms.js +137 -138
  305. package/lib/umd/locale/nb-NO.js +137 -138
  306. package/lib/umd/locale/nl.js +138 -140
  307. package/lib/umd/locale/pl.js +138 -140
  308. package/lib/umd/locale/pt-br.js +138 -139
  309. package/lib/umd/locale/pt.js +138 -148
  310. package/lib/umd/locale/ro.js +138 -140
  311. package/lib/umd/locale/ru-RU.js +138 -139
  312. package/lib/umd/locale/si.js +138 -142
  313. package/lib/umd/locale/sk.js +140 -141
  314. package/lib/umd/locale/sl.js +138 -140
  315. package/lib/umd/locale/sr-Latn.js +138 -139
  316. package/lib/umd/locale/sr.js +138 -143
  317. package/lib/umd/locale/sv-SE.js +138 -143
  318. package/lib/umd/locale/sw.js +138 -142
  319. package/lib/umd/locale/ta.js +137 -145
  320. package/lib/umd/locale/th.js +138 -142
  321. package/lib/umd/locale/tk.js +138 -144
  322. package/lib/umd/locale/tr-TR.js +138 -140
  323. package/lib/umd/locale/ua.js +138 -139
  324. package/lib/umd/locale/ug-CN.js +138 -139
  325. package/lib/umd/locale/uz-UZ.js +138 -139
  326. package/lib/umd/locale/vi.js +138 -139
  327. package/lib/umd/locale/zh-CN.js +138 -139
  328. package/lib/umd/locale/zh-TW.js +138 -143
  329. package/lib/upload.js +990 -2376
  330. package/lib/utils/after-leave.js +33 -36
  331. package/lib/utils/aria-dialog.js +89 -71
  332. package/lib/utils/aria-utils.js +101 -92
  333. package/lib/utils/clickoutside.js +67 -59
  334. package/lib/utils/date-util.js +241 -198
  335. package/lib/utils/date.js +369 -14
  336. package/lib/utils/dom.js +183 -167
  337. package/lib/utils/lodash.js +9421 -13
  338. package/lib/utils/menu/aria-menubar.js +18 -13
  339. package/lib/utils/menu/aria-menuitem.js +54 -43
  340. package/lib/utils/menu/aria-submenu.js +59 -50
  341. package/lib/utils/merge.js +17 -15
  342. package/lib/utils/popper.js +1196 -1167
  343. package/lib/utils/popup/index.js +230 -186
  344. package/lib/utils/popup/popup-manager.js +191 -159
  345. package/lib/utils/resize-event.js +44 -29
  346. package/lib/utils/scroll-into-view.js +33 -25
  347. package/lib/utils/scrollbar-width.js +36 -25
  348. package/lib/utils/shared.js +3 -3
  349. package/lib/utils/types.js +35 -22
  350. package/lib/utils/util.js +221 -187
  351. package/lib/utils/vdom.js +9 -5
  352. package/lib/utils/vue-popper.js +195 -173
  353. package/package.json +160 -160
  354. package/packages/alert/index.js +8 -8
  355. package/packages/alert/src/main.vue +94 -94
  356. package/packages/aside/index.js +8 -8
  357. package/packages/aside/src/main.vue +20 -20
  358. package/packages/autocomplete/index.js +8 -8
  359. package/packages/autocomplete/src/autocomplete-suggestions.vue +76 -76
  360. package/packages/autocomplete/src/autocomplete.vue +285 -285
  361. package/packages/avatar/index.js +8 -8
  362. package/packages/avatar/src/main.vue +107 -107
  363. package/packages/backtop/index.js +8 -8
  364. package/packages/backtop/src/main.vue +110 -110
  365. package/packages/badge/index.js +8 -8
  366. package/packages/badge/src/main.vue +53 -53
  367. package/packages/breadcrumb/index.js +8 -8
  368. package/packages/breadcrumb/src/breadcrumb-item.vue +41 -41
  369. package/packages/breadcrumb/src/breadcrumb.vue +34 -34
  370. package/packages/breadcrumb-item/index.js +8 -8
  371. package/packages/button/index.js +8 -8
  372. package/packages/button/src/button-group.vue +10 -10
  373. package/packages/button/src/button.vue +78 -78
  374. package/packages/button-group/index.js +8 -8
  375. package/packages/calendar/index.js +8 -8
  376. package/packages/calendar/src/date-table.vue +200 -200
  377. package/packages/calendar/src/main.vue +280 -280
  378. package/packages/card/index.js +8 -8
  379. package/packages/card/src/main.vue +23 -23
  380. package/packages/carousel/index.js +8 -8
  381. package/packages/carousel/src/item.vue +138 -138
  382. package/packages/carousel/src/main.vue +315 -315
  383. package/packages/carousel-item/index.js +8 -8
  384. package/packages/cascader/index.js +8 -8
  385. package/packages/cascader/src/cascader.vue +663 -663
  386. package/packages/cascader-panel/index.js +8 -8
  387. package/packages/cascader-panel/src/cascader-menu.vue +138 -138
  388. package/packages/cascader-panel/src/cascader-node.vue +246 -246
  389. package/packages/cascader-panel/src/cascader-panel.vue +391 -391
  390. package/packages/cascader-panel/src/node.js +164 -164
  391. package/packages/cascader-panel/src/store.js +56 -56
  392. package/packages/checkbox/index.js +8 -8
  393. package/packages/checkbox/src/checkbox-button.vue +199 -199
  394. package/packages/checkbox/src/checkbox-group.vue +48 -48
  395. package/packages/checkbox/src/checkbox.vue +222 -222
  396. package/packages/checkbox-button/index.js +8 -8
  397. package/packages/checkbox-group/index.js +8 -8
  398. package/packages/col/index.js +9 -9
  399. package/packages/col/src/col.js +71 -71
  400. package/packages/collapse/index.js +9 -9
  401. package/packages/collapse/src/collapse-item.vue +114 -114
  402. package/packages/collapse/src/collapse.vue +73 -73
  403. package/packages/collapse-item/index.js +8 -8
  404. package/packages/color-picker/index.js +8 -8
  405. package/packages/color-picker/src/color.js +317 -317
  406. package/packages/color-picker/src/components/alpha-slider.vue +132 -132
  407. package/packages/color-picker/src/components/hue-slider.vue +123 -123
  408. package/packages/color-picker/src/components/picker-dropdown.vue +121 -121
  409. package/packages/color-picker/src/components/predefine.vue +61 -61
  410. package/packages/color-picker/src/components/sv-panel.vue +100 -100
  411. package/packages/color-picker/src/draggable.js +36 -36
  412. package/packages/color-picker/src/main.vue +188 -188
  413. package/packages/container/index.js +8 -8
  414. package/packages/container/src/main.vue +33 -33
  415. package/packages/date-picker/index.js +8 -8
  416. package/packages/date-picker/src/basic/date-table.vue +441 -441
  417. package/packages/date-picker/src/basic/month-table.vue +268 -268
  418. package/packages/date-picker/src/basic/time-spinner.vue +304 -304
  419. package/packages/date-picker/src/basic/year-table.vue +111 -111
  420. package/packages/date-picker/src/panel/date-range.vue +680 -680
  421. package/packages/date-picker/src/panel/date.vue +609 -609
  422. package/packages/date-picker/src/panel/month-range.vue +289 -289
  423. package/packages/date-picker/src/panel/time-range.vue +248 -248
  424. package/packages/date-picker/src/panel/time-select.vue +178 -178
  425. package/packages/date-picker/src/panel/time.vue +186 -186
  426. package/packages/date-picker/src/picker/date-picker.js +43 -43
  427. package/packages/date-picker/src/picker/time-picker.js +39 -39
  428. package/packages/date-picker/src/picker/time-select.js +21 -21
  429. package/packages/date-picker/src/picker.vue +956 -956
  430. package/packages/descriptions/index.js +8 -8
  431. package/packages/descriptions/src/descriptions-item.js +30 -30
  432. package/packages/descriptions/src/descriptions-row.js +116 -116
  433. package/packages/descriptions/src/index.js +180 -180
  434. package/packages/descriptions-item/index.js +8 -8
  435. package/packages/dialog/index.js +8 -8
  436. package/packages/dialog/src/component.vue +212 -212
  437. package/packages/divider/index.js +8 -8
  438. package/packages/divider/src/main.vue +37 -37
  439. package/packages/drawer/index.js +8 -8
  440. package/packages/drawer/src/main.vue +205 -205
  441. package/packages/dropdown/index.js +8 -8
  442. package/packages/dropdown/src/dropdown-item.vue +37 -37
  443. package/packages/dropdown/src/dropdown-menu.vue +63 -63
  444. package/packages/dropdown/src/dropdown.vue +293 -293
  445. package/packages/dropdown-item/index.js +8 -8
  446. package/packages/dropdown-menu/index.js +8 -8
  447. package/packages/empty/index.js +7 -7
  448. package/packages/empty/src/img-empty.vue +132 -132
  449. package/packages/empty/src/index.vue +50 -50
  450. package/packages/footer/index.js +8 -8
  451. package/packages/footer/src/main.vue +20 -20
  452. package/packages/form/index.js +8 -8
  453. package/packages/form/src/form-item.vue +324 -324
  454. package/packages/form/src/form.vue +182 -182
  455. package/packages/form/src/label-wrap.vue +78 -78
  456. package/packages/form-item/index.js +8 -8
  457. package/packages/header/index.js +8 -8
  458. package/packages/header/src/main.vue +20 -20
  459. package/packages/icon/index.js +8 -8
  460. package/packages/icon/src/icon.vue +13 -13
  461. package/packages/image/index.js +8 -8
  462. package/packages/image/src/image-viewer.vue +330 -330
  463. package/packages/image/src/main.vue +249 -249
  464. package/packages/infinite-scroll/index.js +8 -8
  465. package/packages/infinite-scroll/src/main.js +148 -148
  466. package/packages/input/index.js +8 -8
  467. package/packages/input/src/calcTextareaHeight.js +104 -104
  468. package/packages/input/src/input.vue +440 -440
  469. package/packages/input-number/index.js +8 -8
  470. package/packages/input-number/src/input-number.vue +283 -283
  471. package/packages/link/index.js +8 -8
  472. package/packages/link/src/main.vue +53 -53
  473. package/packages/loading/index.js +11 -11
  474. package/packages/loading/src/directive.js +133 -133
  475. package/packages/loading/src/index.js +106 -106
  476. package/packages/loading/src/loading.vue +41 -41
  477. package/packages/main/index.js +8 -8
  478. package/packages/main/src/main.vue +12 -12
  479. package/packages/menu/index.js +8 -8
  480. package/packages/menu/src/menu-item-group.vue +45 -45
  481. package/packages/menu/src/menu-item.vue +112 -112
  482. package/packages/menu/src/menu-mixin.js +44 -44
  483. package/packages/menu/src/menu.vue +325 -325
  484. package/packages/menu/src/submenu.vue +348 -348
  485. package/packages/menu-item/index.js +8 -8
  486. package/packages/menu-item-group/index.js +8 -8
  487. package/packages/message/index.js +2 -2
  488. package/packages/message/src/main.js +91 -91
  489. package/packages/message/src/main.vue +117 -117
  490. package/packages/message-box/index.js +2 -2
  491. package/packages/message-box/src/main.js +216 -216
  492. package/packages/message-box/src/main.vue +332 -332
  493. package/packages/notification/index.js +2 -2
  494. package/packages/notification/src/main.js +94 -94
  495. package/packages/notification/src/main.vue +152 -152
  496. package/packages/option/index.js +8 -8
  497. package/packages/option-group/index.js +8 -8
  498. package/packages/page-header/index.js +8 -8
  499. package/packages/page-header/src/main.vue +30 -30
  500. package/packages/pagination/index.js +8 -8
  501. package/packages/pagination/src/pager.vue +163 -163
  502. package/packages/pagination/src/pagination.js +386 -386
  503. package/packages/popconfirm/index.js +8 -8
  504. package/packages/popconfirm/src/main.vue +104 -104
  505. package/packages/popover/index.js +14 -14
  506. package/packages/popover/src/directive.js +20 -20
  507. package/packages/popover/src/main.vue +237 -237
  508. package/packages/progress/index.js +8 -8
  509. package/packages/progress/src/progress.vue +235 -235
  510. package/packages/radio/index.js +8 -8
  511. package/packages/radio/src/radio-button.vue +115 -115
  512. package/packages/radio/src/radio-group.vue +113 -113
  513. package/packages/radio/src/radio.vue +134 -134
  514. package/packages/radio-button/index.js +8 -8
  515. package/packages/radio-group/index.js +8 -8
  516. package/packages/rate/index.js +8 -8
  517. package/packages/rate/src/main.vue +348 -348
  518. package/packages/result/index.js +8 -8
  519. package/packages/result/src/icon-error.vue +13 -13
  520. package/packages/result/src/icon-info.vue +13 -13
  521. package/packages/result/src/icon-success.vue +13 -13
  522. package/packages/result/src/icon-warning.vue +13 -13
  523. package/packages/result/src/index.vue +65 -65
  524. package/packages/row/index.js +9 -9
  525. package/packages/row/src/row.js +44 -44
  526. package/packages/scrollbar/index.js +8 -8
  527. package/packages/scrollbar/src/bar.js +92 -92
  528. package/packages/scrollbar/src/main.js +130 -130
  529. package/packages/scrollbar/src/util.js +34 -34
  530. package/packages/select/index.js +8 -8
  531. package/packages/select/src/navigation-mixin.js +54 -54
  532. package/packages/select/src/option-group.vue +60 -60
  533. package/packages/select/src/option.vue +168 -168
  534. package/packages/select/src/select-dropdown.vue +74 -74
  535. package/packages/select/src/select.vue +900 -900
  536. package/packages/skeleton/index.js +8 -8
  537. package/packages/skeleton/src/img-placeholder.vue +16 -16
  538. package/packages/skeleton/src/index.vue +76 -76
  539. package/packages/skeleton/src/item.vue +22 -22
  540. package/packages/skeleton-item/index.js +8 -8
  541. package/packages/slider/index.js +8 -8
  542. package/packages/slider/src/button.vue +238 -238
  543. package/packages/slider/src/main.vue +427 -427
  544. package/packages/slider/src/marker.js +18 -18
  545. package/packages/spinner/index.js +8 -8
  546. package/packages/spinner/src/spinner.vue +27 -27
  547. package/packages/statistic/index.js +8 -0
  548. package/packages/statistic/src/main.vue +203 -0
  549. package/packages/step/index.js +8 -8
  550. package/packages/steps/README.md +69 -69
  551. package/packages/steps/index.js +8 -8
  552. package/packages/steps/src/step.vue +184 -184
  553. package/packages/steps/src/steps.vue +68 -68
  554. package/packages/submenu/index.js +8 -8
  555. package/packages/switch/index.js +9 -9
  556. package/packages/switch/src/component.vue +174 -174
  557. package/packages/tab-pane/index.js +8 -8
  558. package/packages/table/index.js +8 -8
  559. package/packages/table/src/config.js +124 -124
  560. package/packages/table/src/dropdown.js +28 -28
  561. package/packages/table/src/filter-panel.vue +194 -194
  562. package/packages/table/src/layout-observer.js +68 -68
  563. package/packages/table/src/store/current.js +76 -76
  564. package/packages/table/src/store/expand.js +65 -65
  565. package/packages/table/src/store/helper.js +41 -41
  566. package/packages/table/src/store/index.js +147 -147
  567. package/packages/table/src/store/tree.js +209 -209
  568. package/packages/table/src/store/watcher.js +381 -381
  569. package/packages/table/src/table-body.js +469 -469
  570. package/packages/table/src/table-column.js +319 -319
  571. package/packages/table/src/table-footer.js +153 -153
  572. package/packages/table/src/table-header.js +511 -511
  573. package/packages/table/src/table-layout.js +249 -249
  574. package/packages/table/src/table-row.js +101 -101
  575. package/packages/table/src/table.vue +712 -712
  576. package/packages/table/src/util.js +273 -273
  577. package/packages/table-column/index.js +8 -8
  578. package/packages/tabs/index.js +8 -8
  579. package/packages/tabs/src/tab-bar.vue +57 -57
  580. package/packages/tabs/src/tab-nav.vue +294 -294
  581. package/packages/tabs/src/tab-pane.vue +56 -56
  582. package/packages/tabs/src/tabs.vue +191 -191
  583. package/packages/tag/index.js +8 -8
  584. package/packages/tag/src/tag.vue +58 -58
  585. package/packages/theme-chalk/README.md +33 -33
  586. package/packages/theme-chalk/package.json +35 -35
  587. package/packages/theme-chalk/src/alert.scss +147 -147
  588. package/packages/theme-chalk/src/aside.scss +7 -7
  589. package/packages/theme-chalk/src/autocomplete.scss +80 -80
  590. package/packages/theme-chalk/src/avatar.scss +51 -51
  591. package/packages/theme-chalk/src/backtop.scss +22 -22
  592. package/packages/theme-chalk/src/badge.scss +57 -57
  593. package/packages/theme-chalk/src/base.scss +2 -2
  594. package/packages/theme-chalk/src/breadcrumb.scss +55 -55
  595. package/packages/theme-chalk/src/button.scss +262 -262
  596. package/packages/theme-chalk/src/calendar.scss +79 -79
  597. package/packages/theme-chalk/src/card.scss +32 -32
  598. package/packages/theme-chalk/src/carousel-item.scss +50 -50
  599. package/packages/theme-chalk/src/carousel.scss +161 -161
  600. package/packages/theme-chalk/src/cascader-panel.scss +120 -120
  601. package/packages/theme-chalk/src/cascader.scss +182 -182
  602. package/packages/theme-chalk/src/checkbox.scss +359 -359
  603. package/packages/theme-chalk/src/col.scss +156 -156
  604. package/packages/theme-chalk/src/collapse.scss +63 -63
  605. package/packages/theme-chalk/src/color-picker.scss +384 -384
  606. package/packages/theme-chalk/src/common/popup.scss +42 -42
  607. package/packages/theme-chalk/src/common/transition.scss +99 -99
  608. package/packages/theme-chalk/src/common/var.scss +1028 -1028
  609. package/packages/theme-chalk/src/container.scss +14 -14
  610. package/packages/theme-chalk/src/date-picker/date-picker.scss +97 -97
  611. package/packages/theme-chalk/src/date-picker/date-range-picker.scss +101 -101
  612. package/packages/theme-chalk/src/date-picker/date-table.scss +151 -151
  613. package/packages/theme-chalk/src/date-picker/month-table.scss +82 -82
  614. package/packages/theme-chalk/src/date-picker/picker-panel.scss +117 -117
  615. package/packages/theme-chalk/src/date-picker/picker.scss +197 -197
  616. package/packages/theme-chalk/src/date-picker/time-picker.scss +85 -85
  617. package/packages/theme-chalk/src/date-picker/time-range-picker.scss +31 -31
  618. package/packages/theme-chalk/src/date-picker/time-spinner.scss +110 -110
  619. package/packages/theme-chalk/src/date-picker/year-table.scss +51 -51
  620. package/packages/theme-chalk/src/date-picker.scss +11 -11
  621. package/packages/theme-chalk/src/descriptions-item.scss +42 -42
  622. package/packages/theme-chalk/src/descriptions.scss +111 -111
  623. package/packages/theme-chalk/src/dialog.scss +123 -123
  624. package/packages/theme-chalk/src/display.scss +12 -12
  625. package/packages/theme-chalk/src/divider.scss +47 -47
  626. package/packages/theme-chalk/src/drawer.scss +219 -219
  627. package/packages/theme-chalk/src/dropdown.scss +182 -182
  628. package/packages/theme-chalk/src/empty.scss +45 -45
  629. package/packages/theme-chalk/src/footer.scss +8 -8
  630. package/packages/theme-chalk/src/form.scss +167 -167
  631. package/packages/theme-chalk/src/header.scss +8 -8
  632. package/packages/theme-chalk/src/icon.scss +1167 -1167
  633. package/packages/theme-chalk/src/image.scss +179 -179
  634. package/packages/theme-chalk/src/index.scss +90 -89
  635. package/packages/theme-chalk/src/input-number.scss +180 -180
  636. package/packages/theme-chalk/src/input.scss +360 -360
  637. package/packages/theme-chalk/src/link.scss +81 -81
  638. package/packages/theme-chalk/src/loading.scss +96 -96
  639. package/packages/theme-chalk/src/main.scss +12 -12
  640. package/packages/theme-chalk/src/menu.scss +289 -289
  641. package/packages/theme-chalk/src/message-box.scss +226 -226
  642. package/packages/theme-chalk/src/message.scss +120 -120
  643. package/packages/theme-chalk/src/mixins/_button.scss +81 -81
  644. package/packages/theme-chalk/src/mixins/config.scss +4 -4
  645. package/packages/theme-chalk/src/mixins/function.scss +44 -44
  646. package/packages/theme-chalk/src/mixins/mixins.scss +190 -190
  647. package/packages/theme-chalk/src/mixins/utils.scss +39 -39
  648. package/packages/theme-chalk/src/notification.scss +99 -99
  649. package/packages/theme-chalk/src/option-group.scss +42 -42
  650. package/packages/theme-chalk/src/option.scss +36 -36
  651. package/packages/theme-chalk/src/page-header.scss +41 -41
  652. package/packages/theme-chalk/src/pagination.scss +295 -295
  653. package/packages/theme-chalk/src/popconfirm.scss +16 -16
  654. package/packages/theme-chalk/src/popover.scss +40 -40
  655. package/packages/theme-chalk/src/popper.scss +101 -101
  656. package/packages/theme-chalk/src/progress.scss +141 -141
  657. package/packages/theme-chalk/src/radio-button.scss +113 -113
  658. package/packages/theme-chalk/src/radio-group.scss +9 -9
  659. package/packages/theme-chalk/src/radio.scss +199 -199
  660. package/packages/theme-chalk/src/rate.scss +49 -49
  661. package/packages/theme-chalk/src/reset.scss +79 -79
  662. package/packages/theme-chalk/src/result.scss +61 -61
  663. package/packages/theme-chalk/src/row.scss +43 -43
  664. package/packages/theme-chalk/src/scrollbar.scss +72 -72
  665. package/packages/theme-chalk/src/select-dropdown.scss +62 -62
  666. package/packages/theme-chalk/src/select.scss +152 -152
  667. package/packages/theme-chalk/src/skeleton-item.scss +84 -84
  668. package/packages/theme-chalk/src/skeleton.scss +40 -40
  669. package/packages/theme-chalk/src/slider.scss +250 -250
  670. package/packages/theme-chalk/src/spinner.scss +44 -44
  671. package/packages/theme-chalk/src/statistic.scss +38 -0
  672. package/packages/theme-chalk/src/step.scss +317 -317
  673. package/packages/theme-chalk/src/steps.scss +20 -20
  674. package/packages/theme-chalk/src/switch.scss +116 -116
  675. package/packages/theme-chalk/src/table-column.scss +97 -97
  676. package/packages/theme-chalk/src/table.scss +564 -564
  677. package/packages/theme-chalk/src/tabs.scss +602 -602
  678. package/packages/theme-chalk/src/tag.scss +163 -163
  679. package/packages/theme-chalk/src/time-picker.scss +8 -8
  680. package/packages/theme-chalk/src/time-select.scss +37 -37
  681. package/packages/theme-chalk/src/timeline-item.scss +86 -86
  682. package/packages/theme-chalk/src/timeline.scss +14 -14
  683. package/packages/theme-chalk/src/tooltip.scss +141 -141
  684. package/packages/theme-chalk/src/transfer.scss +227 -227
  685. package/packages/theme-chalk/src/tree.scss +123 -123
  686. package/packages/theme-chalk/src/upload.scss +603 -603
  687. package/packages/theme-cy/README.md +38 -38
  688. package/packages/theme-cy/package.json +35 -35
  689. package/packages/theme-cy/src/index.scss +1 -1
  690. package/packages/time-picker/index.js +8 -8
  691. package/packages/time-select/index.js +8 -8
  692. package/packages/timeline/index.js +8 -8
  693. package/packages/timeline/src/item.vue +73 -73
  694. package/packages/timeline/src/main.vue +33 -33
  695. package/packages/timeline-item/index.js +8 -8
  696. package/packages/tooltip/index.js +8 -8
  697. package/packages/tooltip/src/main.js +242 -242
  698. package/packages/transfer/index.js +8 -8
  699. package/packages/transfer/src/main.vue +231 -231
  700. package/packages/transfer/src/transfer-panel.vue +251 -251
  701. package/packages/tree/index.js +8 -8
  702. package/packages/tree/src/model/node.js +484 -484
  703. package/packages/tree/src/model/tree-store.js +340 -340
  704. package/packages/tree/src/model/util.js +27 -27
  705. package/packages/tree/src/tree-node.vue +279 -279
  706. package/packages/tree/src/tree.vue +496 -496
  707. package/packages/upload/index.js +8 -8
  708. package/packages/upload/src/ajax.js +85 -85
  709. package/packages/upload/src/index.vue +338 -338
  710. package/packages/upload/src/upload-dragger.vue +70 -70
  711. package/packages/upload/src/upload-list.vue +105 -105
  712. package/packages/upload/src/upload.vue +211 -211
  713. package/src/directives/mousewheel.js +18 -18
  714. package/src/directives/repeat-click.js +26 -26
  715. package/src/index.js +4 -1
  716. package/src/locale/format.js +44 -44
  717. package/src/locale/index.js +48 -48
  718. package/src/locale/lang/af-ZA.js +123 -123
  719. package/src/locale/lang/ar.js +122 -122
  720. package/src/locale/lang/az.js +126 -126
  721. package/src/locale/lang/bg.js +123 -123
  722. package/src/locale/lang/bn.js +126 -126
  723. package/src/locale/lang/ca.js +122 -122
  724. package/src/locale/lang/cs-CZ.js +125 -125
  725. package/src/locale/lang/da.js +122 -122
  726. package/src/locale/lang/de.js +124 -124
  727. package/src/locale/lang/ee.js +123 -123
  728. package/src/locale/lang/el.js +123 -123
  729. package/src/locale/lang/en.js +123 -123
  730. package/src/locale/lang/eo.js +123 -123
  731. package/src/locale/lang/es.js +122 -122
  732. package/src/locale/lang/eu.js +123 -123
  733. package/src/locale/lang/fa.js +123 -123
  734. package/src/locale/lang/fi.js +123 -123
  735. package/src/locale/lang/fr.js +122 -122
  736. package/src/locale/lang/he.js +123 -123
  737. package/src/locale/lang/hr.js +123 -123
  738. package/src/locale/lang/hu.js +122 -122
  739. package/src/locale/lang/hy-AM.js +123 -123
  740. package/src/locale/lang/id.js +123 -123
  741. package/src/locale/lang/is.js +124 -124
  742. package/src/locale/lang/it.js +122 -122
  743. package/src/locale/lang/ja.js +123 -123
  744. package/src/locale/lang/kg.js +123 -123
  745. package/src/locale/lang/km.js +123 -123
  746. package/src/locale/lang/ko.js +123 -123
  747. package/src/locale/lang/ku.js +123 -123
  748. package/src/locale/lang/kz.js +123 -123
  749. package/src/locale/lang/lo-LA.js +126 -126
  750. package/src/locale/lang/lt.js +123 -123
  751. package/src/locale/lang/lv.js +123 -123
  752. package/src/locale/lang/mn.js +123 -123
  753. package/src/locale/lang/ms.js +122 -122
  754. package/src/locale/lang/nb-NO.js +122 -122
  755. package/src/locale/lang/nl.js +123 -123
  756. package/src/locale/lang/pl.js +123 -123
  757. package/src/locale/lang/pt-br.js +123 -123
  758. package/src/locale/lang/pt.js +123 -123
  759. package/src/locale/lang/ro.js +123 -123
  760. package/src/locale/lang/ru-RU.js +123 -123
  761. package/src/locale/lang/si.js +123 -123
  762. package/src/locale/lang/sk.js +125 -125
  763. package/src/locale/lang/sl.js +123 -123
  764. package/src/locale/lang/sr-Latn.js +123 -123
  765. package/src/locale/lang/sr.js +123 -123
  766. package/src/locale/lang/sv-SE.js +123 -123
  767. package/src/locale/lang/ta.js +122 -122
  768. package/src/locale/lang/th.js +123 -123
  769. package/src/locale/lang/tk.js +123 -123
  770. package/src/locale/lang/tr-TR.js +123 -123
  771. package/src/locale/lang/ua.js +123 -123
  772. package/src/locale/lang/ug-CN.js +123 -123
  773. package/src/locale/lang/uz-UZ.js +123 -123
  774. package/src/locale/lang/vi.js +123 -123
  775. package/src/locale/lang/zh-CN.js +123 -123
  776. package/src/locale/lang/zh-TW.js +123 -123
  777. package/src/mixins/emitter.js +33 -33
  778. package/src/mixins/focus.js +9 -9
  779. package/src/mixins/locale.js +9 -9
  780. package/src/mixins/migrating.js +54 -54
  781. package/src/transitions/collapse-transition.js +77 -77
  782. package/src/utils/after-leave.js +27 -27
  783. package/src/utils/aria-dialog.js +90 -90
  784. package/src/utils/aria-utils.js +122 -122
  785. package/src/utils/clickoutside.js +76 -76
  786. package/src/utils/date-util.js +282 -282
  787. package/src/utils/date.js +368 -2
  788. package/src/utils/dom.js +227 -227
  789. package/src/utils/lodash.js +18075 -9
  790. package/src/utils/menu/aria-menubar.js +14 -14
  791. package/src/utils/menu/aria-menuitem.js +49 -49
  792. package/src/utils/menu/aria-submenu.js +59 -59
  793. package/src/utils/merge.js +15 -15
  794. package/src/utils/popper.js +1276 -1276
  795. package/src/utils/popup/index.js +218 -218
  796. package/src/utils/popup/popup-manager.js +194 -194
  797. package/src/utils/resize-event.js +36 -36
  798. package/src/utils/scroll-into-view.js +27 -27
  799. package/src/utils/scrollbar-width.js +29 -29
  800. package/src/utils/shared.js +7 -7
  801. package/src/utils/types.js +40 -40
  802. package/src/utils/util.js +245 -245
  803. package/src/utils/vdom.js +5 -5
  804. package/src/utils/vue-popper.js +198 -198
  805. package/types/alert.d.ts +31 -31
  806. package/types/aside.d.ts +7 -7
  807. package/types/autocomplete.d.ts +78 -78
  808. package/types/avatar.d.ts +20 -20
  809. package/types/backtop.d.ts +16 -16
  810. package/types/badge.d.ts +16 -16
  811. package/types/breadcrumb-item.d.ts +10 -10
  812. package/types/breadcrumb.d.ts +10 -10
  813. package/types/button-group.d.ts +4 -4
  814. package/types/button.d.ts +37 -37
  815. package/types/calendar.d.ts +15 -15
  816. package/types/card.d.ts +26 -26
  817. package/types/carousel-item.d.ts +10 -10
  818. package/types/carousel.d.ts +57 -57
  819. package/types/cascader-panel.d.ts +72 -72
  820. package/types/cascader.d.ts +65 -65
  821. package/types/checkbox-button.d.ts +22 -22
  822. package/types/checkbox-group.d.ts +22 -22
  823. package/types/checkbox.d.ts +34 -34
  824. package/types/col.d.ts +46 -46
  825. package/types/collapse-item.d.ts +26 -26
  826. package/types/collapse.d.ts +10 -10
  827. package/types/color-picker.d.ts +21 -21
  828. package/types/component.d.ts +13 -13
  829. package/types/container.d.ts +7 -7
  830. package/types/date-picker.d.ts +124 -124
  831. package/types/descriptions-item.d.ts +37 -37
  832. package/types/descriptions.d.ts +52 -52
  833. package/types/dialog.d.ts +62 -62
  834. package/types/divider.d.ts +12 -12
  835. package/types/drawer.d.ts +63 -63
  836. package/types/dropdown-item.d.ts +16 -16
  837. package/types/dropdown-menu.d.ts +4 -4
  838. package/types/dropdown.d.ts +38 -38
  839. package/types/element-ui.d.ts +9 -9
  840. package/types/empty.d.ts +31 -31
  841. package/types/footer.d.ts +7 -7
  842. package/types/form-item.d.ts +37 -37
  843. package/types/form.d.ts +82 -82
  844. package/types/header.d.ts +7 -7
  845. package/types/icon.d.ts +7 -7
  846. package/types/image.d.ts +43 -43
  847. package/types/index.d.ts +4 -4
  848. package/types/infinite-scroll.d.ts +5 -5
  849. package/types/input-number.d.ts +47 -47
  850. package/types/input.d.ts +107 -107
  851. package/types/link.d.ts +25 -25
  852. package/types/loading.d.ts +62 -62
  853. package/types/main.d.ts +4 -4
  854. package/types/menu-item-group.d.ts +7 -7
  855. package/types/menu-item.d.ts +10 -10
  856. package/types/menu.d.ts +46 -46
  857. package/types/message-box.d.ts +176 -176
  858. package/types/message.d.ts +90 -90
  859. package/types/notification.d.ts +84 -84
  860. package/types/option-group.d.ts +10 -10
  861. package/types/option.d.ts +13 -13
  862. package/types/page-header.d.ts +10 -10
  863. package/types/pagination.d.ts +43 -43
  864. package/types/popconfirm.d.ts +29 -29
  865. package/types/popover.d.ts +71 -71
  866. package/types/progress.d.ts +37 -37
  867. package/types/radio-button.d.ts +16 -16
  868. package/types/radio-group.d.ts +18 -18
  869. package/types/radio.d.ts +19 -19
  870. package/types/rate.d.ts +64 -64
  871. package/types/result.d.ts +33 -33
  872. package/types/row.d.ts +25 -25
  873. package/types/select.d.ts +90 -90
  874. package/types/skeleton-item.d.ts +7 -7
  875. package/types/skeleton.d.ts +33 -33
  876. package/types/slider.d.ts +68 -68
  877. package/types/spinner.d.ts +16 -16
  878. package/types/statistic.d.ts +37 -0
  879. package/types/step.d.ts +34 -34
  880. package/types/steps.d.ts +28 -28
  881. package/types/submenu.d.ts +22 -22
  882. package/types/switch.d.ts +43 -43
  883. package/types/tab-pane.d.ts +19 -19
  884. package/types/table-column.d.ts +117 -117
  885. package/types/table.d.ts +177 -177
  886. package/types/tabs.d.ts +31 -31
  887. package/types/tag.d.ts +28 -28
  888. package/types/time-picker.d.ts +63 -63
  889. package/types/time-select.d.ts +56 -56
  890. package/types/timeline-item.d.ts +20 -20
  891. package/types/timeline.d.ts +6 -6
  892. package/types/tooltip.d.ts +52 -52
  893. package/types/transfer.d.ts +73 -73
  894. package/types/tree.d.ts +266 -266
  895. package/types/upload.d.ts +124 -124
  896. package/web-types.json +4195 -4195
  897. package/lib/utils/date_source.js +0 -335
  898. package/lib/utils/lodash_source.js +0 -9421
  899. package/src/utils/date_source.js +0 -352
  900. package/src/utils/lodash_source.js +0 -18090
  901. /package/packages/theme-cy/lib/{treeselect.css → treeSelect.css} +0 -0
  902. /package/packages/theme-cy/src/{treeselect.scss → treeSelect.scss} +0 -0
@@ -82,474 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 157);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 87);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("vue");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
-
100
- "use strict";
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
- /* unused harmony export setStyle */
109
- /* unused harmony export isScroll */
110
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
113
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__);
114
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53);
115
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__);
116
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
117
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_2__);
118
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
119
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
120
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
121
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__);
122
- /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16);
123
- /* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__);
124
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12);
125
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_6__);
126
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
127
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_7__);
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- /* istanbul ignore next */
136
-
137
-
138
- var isServer = vue__WEBPACK_IMPORTED_MODULE_7___default.a.prototype.$isServer;
139
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
140
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
141
- var ieVersion = isServer ? 0 : Number(document.documentMode);
142
-
143
- /* istanbul ignore next */
144
- var trim = function trim(string) {
145
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
146
- };
147
- /* istanbul ignore next */
148
- var camelCase = function camelCase(name) {
149
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
150
- return offset ? letter.toUpperCase() : letter;
151
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
152
- };
153
-
154
- /* istanbul ignore next */
155
- var on = function () {
156
- if (!isServer && document.addEventListener) {
157
- return function (element, event, handler) {
158
- if (element && event && handler) {
159
- element.addEventListener(event, handler, false);
160
- }
161
- };
162
- } else {
163
- return function (element, event, handler) {
164
- if (element && event && handler) {
165
- element.attachEvent('on' + event, handler);
166
- }
167
- };
168
- }
169
- }();
170
-
171
- /* istanbul ignore next */
172
- var off = function () {
173
- if (!isServer && document.removeEventListener) {
174
- return function (element, event, handler) {
175
- if (element && event) {
176
- element.removeEventListener(event, handler, false);
177
- }
178
- };
179
- } else {
180
- return function (element, event, handler) {
181
- if (element && event) {
182
- element.detachEvent('on' + event, handler);
183
- }
184
- };
185
- }
186
- }();
187
-
188
- /* istanbul ignore next */
189
- var once = function once(el, event, fn) {
190
- var _listener = function listener() {
191
- if (fn) {
192
- fn.apply(this, arguments);
193
- }
194
- off(el, event, _listener);
195
- };
196
- on(el, event, _listener);
197
- };
198
-
199
- /* istanbul ignore next */
200
- function hasClass(el, cls) {
201
- if (!el || !cls) return false;
202
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
203
- if (el.classList) {
204
- return el.classList.contains(cls);
205
- } else {
206
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
207
- }
208
- }
209
- ;
210
-
211
- /* istanbul ignore next */
212
- function addClass(el, cls) {
213
- if (!el) return;
214
- var curClass = el.className;
215
- var classes = (cls || '').split(' ');
216
- for (var i = 0, j = classes.length; i < j; i++) {
217
- var clsName = classes[i];
218
- if (!clsName) continue;
219
- if (el.classList) {
220
- el.classList.add(clsName);
221
- } else if (!hasClass(el, clsName)) {
222
- curClass += ' ' + clsName;
223
- }
224
- }
225
- if (!el.classList) {
226
- el.setAttribute('class', curClass);
227
- }
228
- }
229
- ;
230
-
231
- /* istanbul ignore next */
232
- function removeClass(el, cls) {
233
- if (!el || !cls) return;
234
- var classes = cls.split(' ');
235
- var curClass = ' ' + el.className + ' ';
236
- for (var i = 0, j = classes.length; i < j; i++) {
237
- var clsName = classes[i];
238
- if (!clsName) continue;
239
- if (el.classList) {
240
- el.classList.remove(clsName);
241
- } else if (hasClass(el, clsName)) {
242
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
243
- }
244
- }
245
- if (!el.classList) {
246
- el.setAttribute('class', trim(curClass));
247
- }
248
- }
249
- ;
250
-
251
- /* istanbul ignore next */
252
- var getStyle = ieVersion < 9 ? function (element, styleName) {
253
- if (isServer) return;
254
- if (!element || !styleName) return null;
255
- styleName = camelCase(styleName);
256
- if (styleName === 'float') {
257
- styleName = 'styleFloat';
258
- }
259
- try {
260
- switch (styleName) {
261
- case 'opacity':
262
- try {
263
- return element.filters.item('alpha').opacity / 100;
264
- } catch (e) {
265
- return 1.0;
266
- }
267
- default:
268
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
269
- }
270
- } catch (e) {
271
- return element.style[styleName];
272
- }
273
- } : function (element, styleName) {
274
- if (isServer) return;
275
- if (!element || !styleName) return null;
276
- styleName = camelCase(styleName);
277
- if (styleName === 'float') {
278
- styleName = 'cssFloat';
279
- }
280
- try {
281
- var computed = document.defaultView.getComputedStyle(element, '');
282
- return element.style[styleName] || computed ? computed[styleName] : null;
283
- } catch (e) {
284
- return element.style[styleName];
285
- }
286
- };
287
-
288
- /* istanbul ignore next */
289
- function setStyle(element, styleName, value) {
290
- if (!element || !styleName) return;
291
- if (typeof styleName === 'object') {
292
- for (var prop in styleName) {
293
- if (styleName.hasOwnProperty(prop)) {
294
- setStyle(element, prop, styleName[prop]);
295
- }
296
- }
297
- } else {
298
- styleName = camelCase(styleName);
299
- if (styleName === 'opacity' && ieVersion < 9) {
300
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
301
- } else {
302
- element.style[styleName] = value;
303
- }
304
- }
305
- }
306
- ;
307
- var isScroll = function isScroll(el, vertical) {
308
- if (isServer) return;
309
- var determinedDirection = vertical !== null && vertical !== undefined;
310
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
311
- return overflow.match(/(scroll|auto|overlay)/);
312
- };
313
- var getScrollContainer = function getScrollContainer(el, vertical) {
314
- if (isServer) return;
315
- var parent = el;
316
- while (parent) {
317
- if ([window, document, document.documentElement].includes(parent)) {
318
- return window;
319
- }
320
- if (isScroll(parent, vertical)) {
321
- return parent;
322
- }
323
- parent = parent.parentNode;
324
- }
325
- return parent;
326
- };
327
- var isInContainer = function isInContainer(el, container) {
328
- if (isServer || !el || !container) return false;
329
- var elRect = el.getBoundingClientRect();
330
- var containerRect;
331
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
332
- containerRect = {
333
- top: 0,
334
- right: window.innerWidth,
335
- bottom: window.innerHeight,
336
- left: 0
337
- };
338
- } else {
339
- containerRect = container.getBoundingClientRect();
340
- }
341
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
342
- };
343
-
344
- /***/ }),
345
-
346
- /***/ 10:
347
- /***/ (function(module, exports) {
348
-
349
- module.exports = require("core-js/modules/web.dom-collections.for-each.js");
350
-
351
- /***/ }),
352
-
353
- /***/ 11:
354
- /***/ (function(module, exports) {
355
-
356
- module.exports = require("core-js/modules/es.regexp.to-string.js");
357
-
358
- /***/ }),
359
-
360
- /***/ 12:
361
- /***/ (function(module, exports) {
362
-
363
- module.exports = require("core-js/modules/es.string.replace.js");
364
-
365
- /***/ }),
366
-
367
- /***/ 13:
368
- /***/ (function(module, exports) {
369
-
370
- module.exports = require("core-js/modules/es.array.slice.js");
371
-
372
- /***/ }),
373
-
374
- /***/ 15:
375
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
376
-
377
- "use strict";
378
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
379
- for (var i = 1, j = arguments.length; i < j; i++) {
380
- var source = arguments[i] || {};
381
- for (var prop in source) {
382
- if (source.hasOwnProperty(prop)) {
383
- var value = source[prop];
384
- if (value !== undefined) {
385
- target[prop] = value;
386
- }
387
- }
388
- }
389
- }
390
- return target;
391
- });
392
- ;
393
-
394
- /***/ }),
395
-
396
- /***/ 157:
397
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
398
-
399
- "use strict";
400
- // ESM COMPAT FLAG
401
- __webpack_require__.r(__webpack_exports__);
402
-
403
- // EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
404
- var es_function_name_js_ = __webpack_require__(5);
405
-
406
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=8e1ce7e8
407
- var render = function render() {
408
- var _vm = this,
409
- _c = _vm._self._c
410
- return _c(
411
- "transition",
412
- { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
413
- [
414
- _c(
415
- "ul",
416
- {
417
- directives: [
418
- {
419
- name: "show",
420
- rawName: "v-show",
421
- value: _vm.showPopper,
422
- expression: "showPopper",
423
- },
424
- ],
425
- staticClass: "el-dropdown-menu el-popper",
426
- class: [_vm.size && `el-dropdown-menu--${_vm.size}`],
427
- },
428
- [_vm._t("default")],
429
- 2
430
- ),
431
- ]
432
- )
433
- }
434
- var staticRenderFns = []
435
- render._withStripped = true
436
-
437
-
438
- // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=8e1ce7e8
439
-
440
- // EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
441
- var es_number_constructor_js_ = __webpack_require__(6);
442
-
443
- // EXTERNAL MODULE: ./src/utils/vue-popper.js
444
- var vue_popper = __webpack_require__(51);
445
-
446
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js
447
-
448
-
449
- /* harmony default export */ var dropdown_menuvue_type_script_lang_js = ({
450
- name: 'ElDropdownMenu',
451
- componentName: 'ElDropdownMenu',
452
- mixins: [vue_popper["a" /* default */]],
453
- props: {
454
- visibleArrow: {
455
- type: Boolean,
456
- default: true
457
- },
458
- arrowOffset: {
459
- type: Number,
460
- default: 0
461
- }
462
- },
463
- data: function data() {
464
- return {
465
- size: this.dropdown.dropdownSize
466
- };
467
- },
468
- inject: ['dropdown'],
469
- created: function created() {
470
- var _this = this;
471
- this.$on('updatePopper', function () {
472
- if (_this.showPopper) _this.updatePopper();
473
- });
474
- this.$on('visible', function (val) {
475
- _this.showPopper = val;
476
- });
477
- },
478
- mounted: function mounted() {
479
- this.dropdown.popperElm = this.popperElm = this.$el;
480
- this.referenceElm = this.dropdown.$el;
481
- // compatible with 2.6 new v-slot syntax
482
- // issue link https://github.com/ElemeFE/element/issues/14345
483
- this.dropdown.initDomOperation();
484
- },
485
- watch: {
486
- 'dropdown.placement': {
487
- immediate: true,
488
- handler: function handler(val) {
489
- this.currentPlacement = val;
490
- }
491
- }
492
- }
493
- });
494
- // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js
495
- /* harmony default export */ var src_dropdown_menuvue_type_script_lang_js = (dropdown_menuvue_type_script_lang_js);
496
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
497
- var componentNormalizer = __webpack_require__(2);
498
-
499
- // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue
500
-
501
-
502
-
503
-
504
-
505
- /* normalize component */
506
-
507
- var component = Object(componentNormalizer["a" /* default */])(
508
- src_dropdown_menuvue_type_script_lang_js,
509
- render,
510
- staticRenderFns,
511
- false,
512
- null,
513
- null,
514
- null
515
-
516
- )
517
-
518
- /* harmony default export */ var dropdown_menu = (component.exports);
519
- // CONCATENATED MODULE: ./packages/dropdown-menu/index.js
520
-
521
-
522
-
523
- /* istanbul ignore next */
524
- dropdown_menu.install = function (Vue) {
525
- Vue.component(dropdown_menu.name, dropdown_menu);
526
- };
527
- /* harmony default export */ var packages_dropdown_menu = __webpack_exports__["default"] = (dropdown_menu);
528
-
529
- /***/ }),
530
-
531
- /***/ 16:
532
- /***/ (function(module, exports) {
533
-
534
- module.exports = require("core-js/modules/es.string.match.js");
535
-
536
- /***/ }),
537
-
538
- /***/ 17:
539
- /***/ (function(module, exports) {
540
-
541
- module.exports = require("core-js/modules/es.object.keys.js");
542
-
543
- /***/ }),
544
-
545
- /***/ 18:
546
- /***/ (function(module, exports) {
547
-
548
- module.exports = require("core-js/modules/es.array.filter.js");
549
-
550
- /***/ }),
551
-
552
- /***/ 2:
553
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
554
92
 
555
93
  "use strict";
@@ -654,2025 +192,159 @@ function normalizeComponent(
654
192
 
655
193
  /***/ }),
656
194
 
657
- /***/ 20:
658
- /***/ (function(module, exports) {
659
-
660
- module.exports = require("core-js/modules/es.array.map.js");
661
-
662
- /***/ }),
663
-
664
- /***/ 22:
195
+ /***/ 5:
665
196
  /***/ (function(module, exports) {
666
197
 
667
- module.exports = require("core-js/modules/es.array.splice.js");
198
+ module.exports = require("element-ui/lib/utils/vue-popper");
668
199
 
669
200
  /***/ }),
670
201
 
671
- /***/ 23:
202
+ /***/ 87:
672
203
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
673
204
 
674
205
  "use strict";
675
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
676
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
677
-
678
- var scrollBarWidth;
679
- /* harmony default export */ __webpack_exports__["a"] = (function () {
680
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
681
- if (scrollBarWidth !== undefined) return scrollBarWidth;
682
- var outer = document.createElement('div');
683
- outer.className = 'el-scrollbar__wrap';
684
- outer.style.visibility = 'hidden';
685
- outer.style.width = '100px';
686
- outer.style.position = 'absolute';
687
- outer.style.top = '-9999px';
688
- document.body.appendChild(outer);
689
- var widthNoScroll = outer.offsetWidth;
690
- outer.style.overflow = 'scroll';
691
- var inner = document.createElement('div');
692
- inner.style.width = '100%';
693
- outer.appendChild(inner);
694
- var widthWithScroll = inner.offsetWidth;
695
- outer.parentNode.removeChild(outer);
696
- scrollBarWidth = widthNoScroll - widthWithScroll;
697
- return scrollBarWidth;
698
- });
699
- ;
700
-
701
- /***/ }),
702
-
703
- /***/ 24:
704
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
206
+ // ESM COMPAT FLAG
207
+ __webpack_require__.r(__webpack_exports__);
705
208
 
706
- "use strict";
209
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=f47388ae
210
+ var render = function () {
211
+ var _vm = this
212
+ var _h = _vm.$createElement
213
+ var _c = _vm._self._c || _h
214
+ return _c(
215
+ "transition",
216
+ { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
217
+ [
218
+ _c(
219
+ "ul",
220
+ {
221
+ directives: [
222
+ {
223
+ name: "show",
224
+ rawName: "v-show",
225
+ value: _vm.showPopper,
226
+ expression: "showPopper",
227
+ },
228
+ ],
229
+ staticClass: "el-dropdown-menu el-popper",
230
+ class: [_vm.size && "el-dropdown-menu--" + _vm.size],
231
+ },
232
+ [_vm._t("default")],
233
+ 2
234
+ ),
235
+ ]
236
+ )
237
+ }
238
+ var staticRenderFns = []
239
+ render._withStripped = true
707
240
 
708
- // EXPORTS
709
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
710
241
 
711
- // EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
712
- var es_number_constructor_js_ = __webpack_require__(6);
242
+ // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=f47388ae
713
243
 
714
- // EXTERNAL MODULE: external "vue"
715
- var external_vue_ = __webpack_require__(0);
716
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
244
+ // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
245
+ var vue_popper_ = __webpack_require__(5);
246
+ var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
717
247
 
718
- // EXTERNAL MODULE: ./src/utils/merge.js
719
- var merge = __webpack_require__(15);
248
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js
249
+ //
250
+ //
251
+ //
252
+ //
253
+ //
254
+ //
255
+ //
720
256
 
721
- // EXTERNAL MODULE: external "core-js/modules/es.array.splice.js"
722
- var es_array_splice_js_ = __webpack_require__(22);
723
257
 
724
- // EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
725
- var es_object_to_string_js_ = __webpack_require__(3);
726
258
 
727
- // EXTERNAL MODULE: external "core-js/modules/es.regexp.exec.js"
728
- var es_regexp_exec_js_ = __webpack_require__(7);
259
+ /* harmony default export */ var dropdown_menuvue_type_script_lang_js = ({
260
+ name: 'ElDropdownMenu',
729
261
 
730
- // EXTERNAL MODULE: external "core-js/modules/es.string.split.js"
731
- var es_string_split_js_ = __webpack_require__(59);
262
+ componentName: 'ElDropdownMenu',
732
263
 
733
- // EXTERNAL MODULE: external "core-js/modules/es.string.trim.js"
734
- var es_string_trim_js_ = __webpack_require__(56);
264
+ mixins: [vue_popper_default.a],
735
265
 
736
- // EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
737
- var web_dom_collections_for_each_js_ = __webpack_require__(10);
266
+ props: {
267
+ visibleArrow: {
268
+ type: Boolean,
269
+ default: true
270
+ },
271
+ arrowOffset: {
272
+ type: Number,
273
+ default: 0
274
+ }
275
+ },
738
276
 
739
- // EXTERNAL MODULE: ./src/utils/dom.js
740
- var utils_dom = __webpack_require__(1);
277
+ data: function data() {
278
+ return {
279
+ size: this.dropdown.dropdownSize
280
+ };
281
+ },
741
282
 
742
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
743
283
 
284
+ inject: ['dropdown'],
744
285
 
286
+ created: function created() {
287
+ var _this = this;
745
288
 
746
-
747
-
748
-
749
-
750
-
751
- var hasModal = false;
752
- var hasInitZIndex = false;
753
- var popup_manager_zIndex;
754
- var popup_manager_getModal = function getModal() {
755
- if (external_vue_default.a.prototype.$isServer) return;
756
- var modalDom = PopupManager.modalDom;
757
- if (modalDom) {
758
- hasModal = true;
759
- } else {
760
- hasModal = false;
761
- modalDom = document.createElement('div');
762
- PopupManager.modalDom = modalDom;
763
- modalDom.addEventListener('touchmove', function (event) {
764
- event.preventDefault();
765
- event.stopPropagation();
766
- });
767
- modalDom.addEventListener('click', function () {
768
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
769
- });
770
- }
771
- return modalDom;
772
- };
773
- var instances = {};
774
- var PopupManager = {
775
- modalFade: true,
776
- getInstance: function getInstance(id) {
777
- return instances[id];
778
- },
779
- register: function register(id, instance) {
780
- if (id && instance) {
781
- instances[id] = instance;
782
- }
783
- },
784
- deregister: function deregister(id) {
785
- if (id) {
786
- instances[id] = null;
787
- delete instances[id];
788
- }
789
- },
790
- nextZIndex: function nextZIndex() {
791
- return PopupManager.zIndex++;
792
- },
793
- modalStack: [],
794
- doOnModalClick: function doOnModalClick() {
795
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
796
- if (!topItem) return;
797
- var instance = PopupManager.getInstance(topItem.id);
798
- if (instance && instance.closeOnClickModal) {
799
- instance.close();
800
- }
801
- },
802
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
803
- if (external_vue_default.a.prototype.$isServer) return;
804
- if (!id || zIndex === undefined) return;
805
- this.modalFade = modalFade;
806
- var modalStack = this.modalStack;
807
- for (var i = 0, j = modalStack.length; i < j; i++) {
808
- var item = modalStack[i];
809
- if (item.id === id) {
810
- return;
811
- }
812
- }
813
- var modalDom = popup_manager_getModal();
814
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
815
- if (this.modalFade && !hasModal) {
816
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
817
- }
818
- if (modalClass) {
819
- var classArr = modalClass.trim().split(/\s+/);
820
- classArr.forEach(function (item) {
821
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
822
- });
823
- }
824
- setTimeout(function () {
825
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
826
- }, 200);
827
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
828
- dom.parentNode.appendChild(modalDom);
829
- } else {
830
- document.body.appendChild(modalDom);
831
- }
832
- if (zIndex) {
833
- modalDom.style.zIndex = zIndex;
834
- }
835
- modalDom.tabIndex = 0;
836
- modalDom.style.display = '';
837
- this.modalStack.push({
838
- id: id,
839
- zIndex: zIndex,
840
- modalClass: modalClass
841
- });
842
- },
843
- closeModal: function closeModal(id) {
844
- var modalStack = this.modalStack;
845
- var modalDom = popup_manager_getModal();
846
- if (modalStack.length > 0) {
847
- var topItem = modalStack[modalStack.length - 1];
848
- if (topItem.id === id) {
849
- if (topItem.modalClass) {
850
- var classArr = topItem.modalClass.trim().split(/\s+/);
851
- classArr.forEach(function (item) {
852
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
853
- });
854
- }
855
- modalStack.pop();
856
- if (modalStack.length > 0) {
857
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
858
- }
859
- } else {
860
- for (var i = modalStack.length - 1; i >= 0; i--) {
861
- if (modalStack[i].id === id) {
862
- modalStack.splice(i, 1);
863
- break;
864
- }
865
- }
866
- }
867
- }
868
- if (modalStack.length === 0) {
869
- if (this.modalFade) {
870
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
871
- }
872
- setTimeout(function () {
873
- if (modalStack.length === 0) {
874
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
875
- modalDom.style.display = 'none';
876
- PopupManager.modalDom = undefined;
877
- }
878
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
879
- }, 200);
880
- }
881
- }
882
- };
883
- Object.defineProperty(PopupManager, 'zIndex', {
884
- configurable: true,
885
- get: function get() {
886
- if (!hasInitZIndex) {
887
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
888
- hasInitZIndex = true;
889
- }
890
- return popup_manager_zIndex;
891
- },
892
- set: function set(value) {
893
- popup_manager_zIndex = value;
894
- }
895
- });
896
- var popup_manager_getTopPopup = function getTopPopup() {
897
- if (external_vue_default.a.prototype.$isServer) return;
898
- if (PopupManager.modalStack.length > 0) {
899
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
900
- if (!topPopup) return;
901
- var instance = PopupManager.getInstance(topPopup.id);
902
- return instance;
903
- }
904
- };
905
- if (!external_vue_default.a.prototype.$isServer) {
906
- // handle `esc` key when the popup is shown
907
- window.addEventListener('keydown', function (event) {
908
- if (event.keyCode === 27) {
909
- var topPopup = popup_manager_getTopPopup();
910
- if (topPopup && topPopup.closeOnPressEscape) {
911
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
912
- }
913
- }
914
- });
915
- }
916
- /* harmony default export */ var popup_manager = (PopupManager);
917
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
918
- var scrollbar_width = __webpack_require__(23);
919
-
920
- // CONCATENATED MODULE: ./src/utils/popup/index.js
921
-
922
-
923
-
924
-
925
-
926
-
927
- var idSeed = 1;
928
- var scrollBarWidth;
929
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
930
- props: {
931
- visible: {
932
- type: Boolean,
933
- default: false
934
- },
935
- openDelay: {},
936
- closeDelay: {},
937
- zIndex: {},
938
- modal: {
939
- type: Boolean,
940
- default: false
941
- },
942
- modalFade: {
943
- type: Boolean,
944
- default: true
945
- },
946
- modalClass: {},
947
- modalAppendToBody: {
948
- type: Boolean,
949
- default: false
950
- },
951
- lockScroll: {
952
- type: Boolean,
953
- default: true
954
- },
955
- closeOnPressEscape: {
956
- type: Boolean,
957
- default: false
958
- },
959
- closeOnClickModal: {
960
- type: Boolean,
961
- default: false
962
- }
963
- },
964
- beforeMount: function beforeMount() {
965
- this._popupId = 'popup-' + idSeed++;
966
- popup_manager.register(this._popupId, this);
967
- },
968
- beforeDestroy: function beforeDestroy() {
969
- popup_manager.deregister(this._popupId);
970
- popup_manager.closeModal(this._popupId);
971
- this.restoreBodyStyle();
972
- },
973
- data: function data() {
974
- return {
975
- opened: false,
976
- bodyPaddingRight: null,
977
- computedBodyPaddingRight: 0,
978
- withoutHiddenClass: true,
979
- rendered: false
980
- };
981
- },
982
- watch: {
983
- visible: function visible(val) {
984
- var _this = this;
985
- if (val) {
986
- if (this._opening) return;
987
- if (!this.rendered) {
988
- this.rendered = true;
989
- external_vue_default.a.nextTick(function () {
990
- _this.open();
991
- });
992
- } else {
993
- this.open();
994
- }
995
- } else {
996
- this.close();
997
- }
998
- }
999
- },
1000
- methods: {
1001
- open: function open(options) {
1002
- var _this2 = this;
1003
- if (!this.rendered) {
1004
- this.rendered = true;
1005
- }
1006
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1007
- if (this._closeTimer) {
1008
- clearTimeout(this._closeTimer);
1009
- this._closeTimer = null;
1010
- }
1011
- clearTimeout(this._openTimer);
1012
- var openDelay = Number(props.openDelay);
1013
- if (openDelay > 0) {
1014
- this._openTimer = setTimeout(function () {
1015
- _this2._openTimer = null;
1016
- _this2.doOpen(props);
1017
- }, openDelay);
1018
- } else {
1019
- this.doOpen(props);
1020
- }
1021
- },
1022
- doOpen: function doOpen(props) {
1023
- if (this.$isServer) return;
1024
- if (this.willOpen && !this.willOpen()) return;
1025
- if (this.opened) return;
1026
- this._opening = true;
1027
- var dom = this.$el;
1028
- var modal = props.modal;
1029
- var zIndex = props.zIndex;
1030
- if (zIndex) {
1031
- popup_manager.zIndex = zIndex;
1032
- }
1033
- if (modal) {
1034
- if (this._closing) {
1035
- popup_manager.closeModal(this._popupId);
1036
- this._closing = false;
1037
- }
1038
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1039
- if (props.lockScroll) {
1040
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1041
- if (this.withoutHiddenClass) {
1042
- this.bodyPaddingRight = document.body.style.paddingRight;
1043
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1044
- }
1045
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1046
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1047
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1048
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1049
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1050
- }
1051
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1052
- }
1053
- }
1054
- if (getComputedStyle(dom).position === 'static') {
1055
- dom.style.position = 'absolute';
1056
- }
1057
- dom.style.zIndex = popup_manager.nextZIndex();
1058
- this.opened = true;
1059
- this.onOpen && this.onOpen();
1060
- this.doAfterOpen();
1061
- },
1062
- doAfterOpen: function doAfterOpen() {
1063
- this._opening = false;
1064
- },
1065
- close: function close() {
1066
- var _this3 = this;
1067
- if (this.willClose && !this.willClose()) return;
1068
- if (this._openTimer !== null) {
1069
- clearTimeout(this._openTimer);
1070
- this._openTimer = null;
1071
- }
1072
- clearTimeout(this._closeTimer);
1073
- var closeDelay = Number(this.closeDelay);
1074
- if (closeDelay > 0) {
1075
- this._closeTimer = setTimeout(function () {
1076
- _this3._closeTimer = null;
1077
- _this3.doClose();
1078
- }, closeDelay);
1079
- } else {
1080
- this.doClose();
1081
- }
1082
- },
1083
- doClose: function doClose() {
1084
- this._closing = true;
1085
- this.onClose && this.onClose();
1086
- if (this.lockScroll) {
1087
- setTimeout(this.restoreBodyStyle, 200);
1088
- }
1089
- this.opened = false;
1090
- this.doAfterClose();
1091
- },
1092
- doAfterClose: function doAfterClose() {
1093
- popup_manager.closeModal(this._popupId);
1094
- this._closing = false;
1095
- },
1096
- restoreBodyStyle: function restoreBodyStyle() {
1097
- if (this.modal && this.withoutHiddenClass) {
1098
- document.body.style.paddingRight = this.bodyPaddingRight;
1099
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1100
- }
1101
- this.withoutHiddenClass = true;
1102
- }
1103
- }
1104
- });
1105
-
1106
-
1107
- /***/ }),
1108
-
1109
- /***/ 3:
1110
- /***/ (function(module, exports) {
1111
-
1112
- module.exports = require("core-js/modules/es.object.to-string.js");
1113
-
1114
- /***/ }),
1115
-
1116
- /***/ 5:
1117
- /***/ (function(module, exports) {
1118
-
1119
- module.exports = require("core-js/modules/es.function.name.js");
1120
-
1121
- /***/ }),
1122
-
1123
- /***/ 51:
1124
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1125
-
1126
- "use strict";
1127
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
1128
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
1129
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1130
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__);
1131
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1132
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
1133
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
1134
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_3__);
1135
- /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
1136
-
1137
-
1138
-
1139
-
1140
-
1141
- var PopperJS = vue__WEBPACK_IMPORTED_MODULE_3___default.a.prototype.$isServer ? function () {} : __webpack_require__(71);
1142
- var stop = function stop(e) {
1143
- return e.stopPropagation();
1144
- };
1145
-
1146
- /**
1147
- * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1148
- * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1149
- * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1150
- * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1151
- * @param {Boolean} [visible=false] Visibility of the popup element.
1152
- * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1153
- */
1154
- /* harmony default export */ __webpack_exports__["a"] = ({
1155
- props: {
1156
- transformOrigin: {
1157
- type: [Boolean, String],
1158
- default: true
1159
- },
1160
- placement: {
1161
- type: String,
1162
- default: 'bottom'
1163
- },
1164
- boundariesPadding: {
1165
- type: Number,
1166
- default: 5
1167
- },
1168
- reference: {},
1169
- popper: {},
1170
- offset: {
1171
- default: 0
1172
- },
1173
- value: Boolean,
1174
- visibleArrow: Boolean,
1175
- arrowOffset: {
1176
- type: Number,
1177
- default: 35
1178
- },
1179
- appendToBody: {
1180
- type: Boolean,
1181
- default: true
1182
- },
1183
- popperOptions: {
1184
- type: Object,
1185
- default: function _default() {
1186
- return {
1187
- gpuAcceleration: false
1188
- };
1189
- }
1190
- }
1191
- },
1192
- data: function data() {
1193
- return {
1194
- showPopper: false,
1195
- currentPlacement: ''
1196
- };
1197
- },
1198
- watch: {
1199
- value: {
1200
- immediate: true,
1201
- handler: function handler(val) {
1202
- this.showPopper = val;
1203
- this.$emit('input', val);
1204
- }
1205
- },
1206
- showPopper: function showPopper(val) {
1207
- if (this.disabled) return;
1208
- val ? this.updatePopper() : this.destroyPopper();
1209
- this.$emit('input', val);
1210
- }
1211
- },
1212
- methods: {
1213
- createPopper: function createPopper() {
1214
- var _this = this;
1215
- if (this.$isServer) return;
1216
- this.currentPlacement = this.currentPlacement || this.placement;
1217
- if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1218
- return;
1219
- }
1220
- var options = this.popperOptions;
1221
- var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1222
- var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1223
- if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1224
- reference = this.referenceElm = this.$slots.reference[0].elm;
1225
- }
1226
- if (!popper || !reference) return;
1227
- if (this.visibleArrow) this.appendArrow(popper);
1228
- if (this.appendToBody) document.body.appendChild(this.popperElm);
1229
- if (this.popperJS && this.popperJS.destroy) {
1230
- this.popperJS.destroy();
1231
- }
1232
- options.placement = this.currentPlacement;
1233
- options.offset = this.offset;
1234
- options.arrowOffset = this.arrowOffset;
1235
- this.popperJS = new PopperJS(reference, popper, options);
1236
- this.popperJS.onCreate(function (_) {
1237
- _this.$emit('created', _this);
1238
- _this.resetTransformOrigin();
1239
- _this.$nextTick(_this.updatePopper);
1240
- });
1241
- if (typeof options.onUpdate === 'function') {
1242
- this.popperJS.onUpdate(options.onUpdate);
1243
- }
1244
- this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_4__[/* PopupManager */ "a"].nextZIndex();
1245
- this.popperElm.addEventListener('click', stop);
1246
- },
1247
- updatePopper: function updatePopper() {
1248
- var popperJS = this.popperJS;
1249
- if (popperJS) {
1250
- popperJS.update();
1251
- if (popperJS._popper) {
1252
- popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_4__[/* PopupManager */ "a"].nextZIndex();
1253
- }
1254
- } else {
1255
- this.createPopper();
1256
- }
1257
- },
1258
- doDestroy: function doDestroy(forceDestroy) {
1259
- /* istanbul ignore if */
1260
- if (!this.popperJS || this.showPopper && !forceDestroy) return;
1261
- this.popperJS.destroy();
1262
- this.popperJS = null;
1263
- },
1264
- destroyPopper: function destroyPopper() {
1265
- if (this.popperJS) {
1266
- this.resetTransformOrigin();
1267
- }
1268
- },
1269
- resetTransformOrigin: function resetTransformOrigin() {
1270
- if (!this.transformOrigin) return;
1271
- var placementMap = {
1272
- top: 'bottom',
1273
- bottom: 'top',
1274
- left: 'right',
1275
- right: 'left'
1276
- };
1277
- var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1278
- var origin = placementMap[placement];
1279
- this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? "center " + origin : origin + " center";
1280
- },
1281
- appendArrow: function appendArrow(element) {
1282
- var hash;
1283
- if (this.appended) {
1284
- return;
1285
- }
1286
- this.appended = true;
1287
- for (var item in element.attributes) {
1288
- if (/^_v-/.test(element.attributes[item].name)) {
1289
- hash = element.attributes[item].name;
1290
- break;
1291
- }
1292
- }
1293
- var arrow = document.createElement('div');
1294
- if (hash) {
1295
- arrow.setAttribute(hash, '');
1296
- }
1297
- arrow.setAttribute('x-arrow', '');
1298
- arrow.className = 'popper__arrow';
1299
- element.appendChild(arrow);
1300
- }
1301
- },
1302
- beforeDestroy: function beforeDestroy() {
1303
- this.doDestroy(true);
1304
- if (this.popperElm && this.popperElm.parentNode === document.body) {
1305
- this.popperElm.removeEventListener('click', stop);
1306
- document.body.removeChild(this.popperElm);
1307
- }
1308
- },
1309
- // call destroy in keep-alive mode
1310
- deactivated: function deactivated() {
1311
- this.$options.beforeDestroy[0].call(this);
1312
- }
289
+ this.$on('updatePopper', function () {
290
+ if (_this.showPopper) _this.updatePopper();
291
+ });
292
+ this.$on('visible', function (val) {
293
+ _this.showPopper = val;
294
+ });
295
+ },
296
+ mounted: function mounted() {
297
+ this.dropdown.popperElm = this.popperElm = this.$el;
298
+ this.referenceElm = this.dropdown.$el;
299
+ // compatible with 2.6 new v-slot syntax
300
+ // issue link https://github.com/ElemeFE/element/issues/14345
301
+ this.dropdown.initDomOperation();
302
+ },
303
+
304
+
305
+ watch: {
306
+ 'dropdown.placement': {
307
+ immediate: true,
308
+ handler: function handler(val) {
309
+ this.currentPlacement = val;
310
+ }
311
+ }
312
+ }
1313
313
  });
314
+ // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js
315
+ /* harmony default export */ var src_dropdown_menuvue_type_script_lang_js = (dropdown_menuvue_type_script_lang_js);
316
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
317
+ var componentNormalizer = __webpack_require__(0);
1314
318
 
1315
- /***/ }),
1316
-
1317
- /***/ 53:
1318
- /***/ (function(module, exports) {
1319
-
1320
- module.exports = require("core-js/modules/es.array.includes.js");
1321
-
1322
- /***/ }),
1323
-
1324
- /***/ 56:
1325
- /***/ (function(module, exports) {
1326
-
1327
- module.exports = require("core-js/modules/es.string.trim.js");
1328
-
1329
- /***/ }),
1330
-
1331
- /***/ 59:
1332
- /***/ (function(module, exports) {
1333
-
1334
- module.exports = require("core-js/modules/es.string.split.js");
1335
-
1336
- /***/ }),
1337
-
1338
- /***/ 6:
1339
- /***/ (function(module, exports) {
1340
-
1341
- module.exports = require("core-js/modules/es.number.constructor.js");
1342
-
1343
- /***/ }),
1344
-
1345
- /***/ 60:
1346
- /***/ (function(module, exports) {
1347
-
1348
- module.exports = require("core-js/modules/es.object.assign.js");
1349
-
1350
- /***/ }),
1351
-
1352
- /***/ 7:
1353
- /***/ (function(module, exports) {
1354
-
1355
- module.exports = require("core-js/modules/es.regexp.exec.js");
1356
-
1357
- /***/ }),
1358
-
1359
- /***/ 71:
1360
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1361
-
1362
- "use strict";
1363
- __webpack_require__.r(__webpack_exports__);
1364
- /* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
1365
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_0__);
1366
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
1367
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__);
1368
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
1369
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_2__);
1370
- /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60);
1371
- /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_3__);
1372
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(73);
1373
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_4__);
1374
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
1375
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__);
1376
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
1377
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
1378
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
1379
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__);
1380
- /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11);
1381
- /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_8__);
1382
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12);
1383
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__);
1384
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(10);
1385
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_10__);
1386
-
1387
-
1388
-
1389
-
1390
-
1391
-
1392
-
1393
-
1394
-
1395
-
1396
-
1397
- /**
1398
- * @fileOverview Kickass library to create and place poppers near their reference elements.
1399
- * @version {{version}}
1400
- * @license
1401
- * Copyright (c) 2016 Federico Zivolo and contributors
1402
- *
1403
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1404
- * of this software and associated documentation files (the "Software"), to deal
1405
- * in the Software without restriction, including without limitation the rights
1406
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1407
- * copies of the Software, and to permit persons to whom the Software is
1408
- * furnished to do so, subject to the following conditions:
1409
- *
1410
- * The above copyright notice and this permission notice shall be included in all
1411
- * copies or substantial portions of the Software.
1412
- *
1413
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1415
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1416
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1417
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1418
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1419
- * SOFTWARE.
1420
- */
1421
-
1422
- //
1423
- // Cross module loader
1424
- // Supported: Node, AMD, Browser globals
1425
- //
1426
- ;
1427
- (function (root, factory) {
1428
- if (typeof define === 'function' && __webpack_require__(74)) {
1429
- // AMD. Register as an anonymous module.
1430
- define(factory);
1431
- } else if ( true && module.exports) {
1432
- // Node. Does not work with strict CommonJS, but
1433
- // only CommonJS-like environments that support module.exports,
1434
- // like Node.
1435
- module.exports = factory();
1436
- } else {
1437
- // Browser globals (root is window)
1438
- root.Popper = factory();
1439
- }
1440
- })(undefined, function () {
1441
- 'use strict';
1442
-
1443
- var root = window;
1444
-
1445
- // default options
1446
- var DEFAULTS = {
1447
- // placement of the popper
1448
- placement: 'bottom',
1449
- gpuAcceleration: true,
1450
- // shift popper from its origin by the given amount of pixels (can be negative)
1451
- offset: 0,
1452
- // the element which will act as boundary of the popper
1453
- boundariesElement: 'viewport',
1454
- // amount of pixel used to define a minimum distance between the boundaries and the popper
1455
- boundariesPadding: 5,
1456
- // popper will try to prevent overflow following this order,
1457
- // by default, then, it could overflow on the left and on top of the boundariesElement
1458
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1459
- // the behavior used by flip to change the placement of the popper
1460
- flipBehavior: 'flip',
1461
- arrowElement: '[x-arrow]',
1462
- arrowOffset: 0,
1463
- // list of functions used to modify the offsets before they are applied to the popper
1464
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
1465
- modifiersIgnored: [],
1466
- forceAbsolute: false
1467
- };
1468
-
1469
- /**
1470
- * Create a new Popper.js instance
1471
- * @constructor Popper
1472
- * @param {HTMLElement} reference - The reference element used to position the popper
1473
- * @param {HTMLElement|Object} popper
1474
- * The HTML element used as popper, or a configuration used to generate the popper.
1475
- * @param {String} [popper.tagName='div'] The tag name of the generated popper.
1476
- * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
1477
- * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
1478
- * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
1479
- * @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`.
1480
- * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
1481
- * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
1482
- * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
1483
- * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
1484
- * @param {Object} options
1485
- * @param {String} [options.placement=bottom]
1486
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
1487
- * left(-start, -end)`
1488
- *
1489
- * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
1490
- * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
1491
- * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
1492
- * reference element.
1493
- * By default, it will look for a child node of the popper with the `x-arrow` attribute.
1494
- *
1495
- * @param {Boolean} [options.gpuAcceleration=true]
1496
- * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
1497
- * browser to use the GPU to accelerate the rendering.
1498
- * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
1499
- *
1500
- * @param {Number} [options.offset=0]
1501
- * Amount of pixels the popper will be shifted (can be negative).
1502
- *
1503
- * @param {String|Element} [options.boundariesElement='viewport']
1504
- * The element which will define the boundaries of the popper position, the popper will never be placed outside
1505
- * of the defined boundaries (except if `keepTogether` is enabled)
1506
- *
1507
- * @param {Number} [options.boundariesPadding=5]
1508
- * Additional padding for the boundaries
1509
- *
1510
- * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
1511
- * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
1512
- * this means that the last ones will never overflow
1513
- *
1514
- * @param {String|Array} [options.flipBehavior='flip']
1515
- * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
1516
- * overlap its reference element. Defining `flip` as value, the placement will be flipped on
1517
- * its axis (`right - left`, `top - bottom`).
1518
- * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
1519
- * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
1520
- * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
1521
- *
1522
- * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
1523
- * List of functions used to modify the data before they are applied to the popper, add your custom functions
1524
- * to this array to edit the offsets and placement.
1525
- * The function should reflect the @params and @returns of preventOverflow
1526
- *
1527
- * @param {Array} [options.modifiersIgnored=[]]
1528
- * Put here any built-in modifier name you want to exclude from the modifiers list
1529
- * The function should reflect the @params and @returns of preventOverflow
1530
- *
1531
- * @param {Boolean} [options.removeOnDestroy=false]
1532
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
1533
- */
1534
- function Popper(reference, popper, options) {
1535
- this._reference = reference.jquery ? reference[0] : reference;
1536
- this.state = {};
1537
-
1538
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
1539
- // generate a default popper if is not defined
1540
- var isNotDefined = typeof popper === 'undefined' || popper === null;
1541
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
1542
- if (isNotDefined || isConfig) {
1543
- this._popper = this.parse(isConfig ? popper : {});
1544
- }
1545
- // otherwise, use the given HTMLElement as popper
1546
- else {
1547
- this._popper = popper.jquery ? popper[0] : popper;
1548
- }
1549
-
1550
- // with {} we create a new object with the options inside it
1551
- this._options = Object.assign({}, DEFAULTS, options);
1552
-
1553
- // refactoring modifiers' list
1554
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
1555
- // remove ignored modifiers
1556
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
1557
-
1558
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
1559
- // margins needs to be calculated to get the correct popper offsets
1560
- if (modifier === 'applyStyle') {
1561
- this._popper.setAttribute('x-placement', this._options.placement);
1562
- }
1563
-
1564
- // return predefined modifier identified by string or keep the custom one
1565
- return this.modifiers[modifier] || modifier;
1566
- }.bind(this));
1567
-
1568
- // make sure to apply the popper position before any computation
1569
- this.state.position = this._getPosition(this._popper, this._reference);
1570
- setStyle(this._popper, {
1571
- position: this.state.position,
1572
- top: 0
1573
- });
1574
-
1575
- // fire the first update to position the popper in the right place
1576
- this.update();
1577
-
1578
- // setup event listeners, they will take care of update the position in specific situations
1579
- this._setupEventListeners();
1580
- return this;
1581
- }
1582
-
1583
- //
1584
- // Methods
1585
- //
1586
- /**
1587
- * Destroy the popper
1588
- * @method
1589
- * @memberof Popper
1590
- */
1591
- Popper.prototype.destroy = function () {
1592
- this._popper.removeAttribute('x-placement');
1593
- this._popper.style.left = '';
1594
- this._popper.style.position = '';
1595
- this._popper.style.top = '';
1596
- this._popper.style[getSupportedPropertyName('transform')] = '';
1597
- this._removeEventListeners();
1598
-
1599
- // remove the popper if user explicity asked for the deletion on destroy
1600
- if (this._options.removeOnDestroy) {
1601
- this._popper.remove();
1602
- }
1603
- return this;
1604
- };
1605
-
1606
- /**
1607
- * Updates the position of the popper, computing the new offsets and applying the new style
1608
- * @method
1609
- * @memberof Popper
1610
- */
1611
- Popper.prototype.update = function () {
1612
- var data = {
1613
- instance: this,
1614
- styles: {}
1615
- };
1616
-
1617
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
1618
- // and refer to _originalPlacement to know the original value
1619
- data.placement = this._options.placement;
1620
- data._originalPlacement = this._options.placement;
1621
-
1622
- // compute the popper and reference offsets and put them inside data.offsets
1623
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
1624
-
1625
- // get boundaries
1626
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
1627
- data = this.runModifiers(data, this._options.modifiers);
1628
- if (typeof this.state.updateCallback === 'function') {
1629
- this.state.updateCallback(data);
1630
- }
1631
- };
1632
-
1633
- /**
1634
- * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
1635
- * @method
1636
- * @memberof Popper
1637
- * @param {Function} callback
1638
- */
1639
- Popper.prototype.onCreate = function (callback) {
1640
- // the createCallbacks return as first argument the popper instance
1641
- callback(this);
1642
- return this;
1643
- };
1644
-
1645
- /**
1646
- * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
1647
- * used to style popper and its arrow.
1648
- * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
1649
- * @method
1650
- * @memberof Popper
1651
- * @param {Function} callback
1652
- */
1653
- Popper.prototype.onUpdate = function (callback) {
1654
- this.state.updateCallback = callback;
1655
- return this;
1656
- };
1657
-
1658
- /**
1659
- * Helper used to generate poppers from a configuration file
1660
- * @method
1661
- * @memberof Popper
1662
- * @param config {Object} configuration
1663
- * @returns {HTMLElement} popper
1664
- */
1665
- Popper.prototype.parse = function (config) {
1666
- var defaultConfig = {
1667
- tagName: 'div',
1668
- classNames: ['popper'],
1669
- attributes: [],
1670
- parent: root.document.body,
1671
- content: '',
1672
- contentType: 'text',
1673
- arrowTagName: 'div',
1674
- arrowClassNames: ['popper__arrow'],
1675
- arrowAttributes: ['x-arrow']
1676
- };
1677
- config = Object.assign({}, defaultConfig, config);
1678
- var d = root.document;
1679
- var popper = d.createElement(config.tagName);
1680
- addClassNames(popper, config.classNames);
1681
- addAttributes(popper, config.attributes);
1682
- if (config.contentType === 'node') {
1683
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
1684
- } else if (config.contentType === 'html') {
1685
- popper.innerHTML = config.content;
1686
- } else {
1687
- popper.textContent = config.content;
1688
- }
1689
- if (config.arrowTagName) {
1690
- var arrow = d.createElement(config.arrowTagName);
1691
- addClassNames(arrow, config.arrowClassNames);
1692
- addAttributes(arrow, config.arrowAttributes);
1693
- popper.appendChild(arrow);
1694
- }
1695
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
1696
-
1697
- // if the given parent is a string, use it to match an element
1698
- // if more than one element is matched, the first one will be used as parent
1699
- // if no elements are matched, the script will throw an error
1700
- if (typeof parent === 'string') {
1701
- parent = d.querySelectorAll(config.parent);
1702
- if (parent.length > 1) {
1703
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
1704
- }
1705
- if (parent.length === 0) {
1706
- throw 'ERROR: the given `parent` doesn\'t exists!';
1707
- }
1708
- parent = parent[0];
1709
- }
1710
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
1711
- // the first one will be used as parent
1712
- if (parent.length > 1 && parent instanceof Element === false) {
1713
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
1714
- parent = parent[0];
1715
- }
1716
-
1717
- // append the generated popper to its parent
1718
- parent.appendChild(popper);
1719
- return popper;
1720
-
1721
- /**
1722
- * Adds class names to the given element
1723
- * @function
1724
- * @ignore
1725
- * @param {HTMLElement} target
1726
- * @param {Array} classes
1727
- */
1728
- function addClassNames(element, classNames) {
1729
- classNames.forEach(function (className) {
1730
- element.classList.add(className);
1731
- });
1732
- }
1733
-
1734
- /**
1735
- * Adds attributes to the given element
1736
- * @function
1737
- * @ignore
1738
- * @param {HTMLElement} target
1739
- * @param {Array} attributes
1740
- * @example
1741
- * addAttributes(element, [ 'data-info:foobar' ]);
1742
- */
1743
- function addAttributes(element, attributes) {
1744
- attributes.forEach(function (attribute) {
1745
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
1746
- });
1747
- }
1748
- };
1749
-
1750
- /**
1751
- * Helper used to get the position which will be applied to the popper
1752
- * @method
1753
- * @memberof Popper
1754
- * @param config {HTMLElement} popper element
1755
- * @param reference {HTMLElement} reference element
1756
- * @returns {String} position
1757
- */
1758
- Popper.prototype._getPosition = function (popper, reference) {
1759
- var container = getOffsetParent(reference);
1760
- if (this._options.forceAbsolute) {
1761
- return 'absolute';
1762
- }
1763
-
1764
- // Decide if the popper will be fixed
1765
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
1766
- var isParentFixed = isFixed(reference, container);
1767
- return isParentFixed ? 'fixed' : 'absolute';
1768
- };
1769
-
1770
- /**
1771
- * Get offsets to the popper
1772
- * @method
1773
- * @memberof Popper
1774
- * @access private
1775
- * @param {Element} popper - the popper element
1776
- * @param {Element} reference - the reference element (the popper will be relative to this)
1777
- * @returns {Object} An object containing the offsets which will be applied to the popper
1778
- */
1779
- Popper.prototype._getOffsets = function (popper, reference, placement) {
1780
- placement = placement.split('-')[0];
1781
- var popperOffsets = {};
1782
- popperOffsets.position = this.state.position;
1783
- var isParentFixed = popperOffsets.position === 'fixed';
1784
-
1785
- //
1786
- // Get reference element position
1787
- //
1788
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
1789
-
1790
- //
1791
- // Get popper sizes
1792
- //
1793
- var popperRect = getOuterSizes(popper);
1794
-
1795
- //
1796
- // Compute offsets of popper
1797
- //
1798
-
1799
- // depending by the popper placement we have to compute its offsets slightly differently
1800
- if (['right', 'left'].indexOf(placement) !== -1) {
1801
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
1802
- if (placement === 'left') {
1803
- popperOffsets.left = referenceOffsets.left - popperRect.width;
1804
- } else {
1805
- popperOffsets.left = referenceOffsets.right;
1806
- }
1807
- } else {
1808
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
1809
- if (placement === 'top') {
1810
- popperOffsets.top = referenceOffsets.top - popperRect.height;
1811
- } else {
1812
- popperOffsets.top = referenceOffsets.bottom;
1813
- }
1814
- }
1815
-
1816
- // Add width and height to our offsets object
1817
- popperOffsets.width = popperRect.width;
1818
- popperOffsets.height = popperRect.height;
1819
- return {
1820
- popper: popperOffsets,
1821
- reference: referenceOffsets
1822
- };
1823
- };
1824
-
1825
- /**
1826
- * Setup needed event listeners used to update the popper position
1827
- * @method
1828
- * @memberof Popper
1829
- * @access private
1830
- */
1831
- Popper.prototype._setupEventListeners = function () {
1832
- // NOTE: 1 DOM access here
1833
- this.state.updateBound = this.update.bind(this);
1834
- root.addEventListener('resize', this.state.updateBound);
1835
- // if the boundariesElement is window we don't need to listen for the scroll event
1836
- if (this._options.boundariesElement !== 'window') {
1837
- var target = getScrollParent(this._reference);
1838
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
1839
- if (target === root.document.body || target === root.document.documentElement) {
1840
- target = root;
1841
- }
1842
- target.addEventListener('scroll', this.state.updateBound);
1843
- this.state.scrollTarget = target;
1844
- }
1845
- };
1846
-
1847
- /**
1848
- * Remove event listeners used to update the popper position
1849
- * @method
1850
- * @memberof Popper
1851
- * @access private
1852
- */
1853
- Popper.prototype._removeEventListeners = function () {
1854
- // NOTE: 1 DOM access here
1855
- root.removeEventListener('resize', this.state.updateBound);
1856
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
1857
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
1858
- this.state.scrollTarget = null;
1859
- }
1860
- this.state.updateBound = null;
1861
- };
1862
-
1863
- /**
1864
- * Computed the boundaries limits and return them
1865
- * @method
1866
- * @memberof Popper
1867
- * @access private
1868
- * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
1869
- * @param {Number} padding - Boundaries padding
1870
- * @param {Element} boundariesElement - Element used to define the boundaries
1871
- * @returns {Object} Coordinates of the boundaries
1872
- */
1873
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
1874
- // NOTE: 1 DOM access here
1875
- var boundaries = {};
1876
- var width, height;
1877
- if (boundariesElement === 'window') {
1878
- var body = root.document.body,
1879
- html = root.document.documentElement;
1880
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1881
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
1882
- boundaries = {
1883
- top: 0,
1884
- right: width,
1885
- bottom: height,
1886
- left: 0
1887
- };
1888
- } else if (boundariesElement === 'viewport') {
1889
- var offsetParent = getOffsetParent(this._popper);
1890
- var scrollParent = getScrollParent(this._popper);
1891
- var offsetParentRect = getOffsetRect(offsetParent);
1892
-
1893
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
1894
- var getScrollTopValue = function getScrollTopValue(element) {
1895
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
1896
- };
1897
- var getScrollLeftValue = function getScrollLeftValue(element) {
1898
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
1899
- };
1900
-
1901
- // if the popper is fixed we don't have to substract scrolling from the boundaries
1902
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
1903
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
1904
- boundaries = {
1905
- top: 0 - (offsetParentRect.top - scrollTop),
1906
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
1907
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
1908
- left: 0 - (offsetParentRect.left - scrollLeft)
1909
- };
1910
- } else {
1911
- if (getOffsetParent(this._popper) === boundariesElement) {
1912
- boundaries = {
1913
- top: 0,
1914
- left: 0,
1915
- right: boundariesElement.clientWidth,
1916
- bottom: boundariesElement.clientHeight
1917
- };
1918
- } else {
1919
- boundaries = getOffsetRect(boundariesElement);
1920
- }
1921
- }
1922
- boundaries.left += padding;
1923
- boundaries.right -= padding;
1924
- boundaries.top = boundaries.top + padding;
1925
- boundaries.bottom = boundaries.bottom - padding;
1926
- return boundaries;
1927
- };
1928
-
1929
- /**
1930
- * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
1931
- * @method
1932
- * @memberof Popper
1933
- * @access public
1934
- * @param {Object} data
1935
- * @param {Array} modifiers
1936
- * @param {Function} ends
1937
- */
1938
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
1939
- var modifiersToRun = modifiers.slice();
1940
- if (ends !== undefined) {
1941
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1942
- }
1943
- modifiersToRun.forEach(function (modifier) {
1944
- if (isFunction(modifier)) {
1945
- data = modifier.call(this, data);
1946
- }
1947
- }.bind(this));
1948
- return data;
1949
- };
1950
-
1951
- /**
1952
- * Helper used to know if the given modifier depends from another one.
1953
- * @method
1954
- * @memberof Popper
1955
- * @param {String} requesting - name of requesting modifier
1956
- * @param {String} requested - name of requested modifier
1957
- * @returns {Boolean}
1958
- */
1959
- Popper.prototype.isModifierRequired = function (requesting, requested) {
1960
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
1961
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
1962
- return modifier === requested;
1963
- }).length;
1964
- };
1965
-
1966
- //
1967
- // Modifiers
1968
- //
1969
-
1970
- /**
1971
- * Modifiers list
1972
- * @namespace Popper.modifiers
1973
- * @memberof Popper
1974
- * @type {Object}
1975
- */
1976
- Popper.prototype.modifiers = {};
1977
-
1978
- /**
1979
- * Apply the computed styles to the popper element
1980
- * @method
1981
- * @memberof Popper.modifiers
1982
- * @argument {Object} data - The data object generated by `update` method
1983
- * @returns {Object} The same data object
1984
- */
1985
- Popper.prototype.modifiers.applyStyle = function (data) {
1986
- // apply the final offsets to the popper
1987
- // NOTE: 1 DOM access here
1988
- var styles = {
1989
- position: data.offsets.popper.position
1990
- };
1991
-
1992
- // round top and left to avoid blurry text
1993
- var left = Math.round(data.offsets.popper.left);
1994
- var top = Math.round(data.offsets.popper.top);
1995
-
1996
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
1997
- // we automatically use the supported prefixed version if needed
1998
- var prefixedProperty;
1999
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
2000
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2001
- styles.top = 0;
2002
- styles.left = 0;
2003
- }
2004
- // othwerise, we use the standard `left` and `top` properties
2005
- else {
2006
- styles.left = left;
2007
- styles.top = top;
2008
- }
2009
-
2010
- // any property present in `data.styles` will be applied to the popper,
2011
- // in this way we can make the 3rd party modifiers add custom styles to it
2012
- // Be aware, modifiers could override the properties defined in the previous
2013
- // lines of this modifier!
2014
- Object.assign(styles, data.styles);
2015
- setStyle(this._popper, styles);
2016
-
2017
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
2018
- // NOTE: 1 DOM access here
2019
- this._popper.setAttribute('x-placement', data.placement);
2020
-
2021
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
2022
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
2023
- setStyle(data.arrowElement, data.offsets.arrow);
2024
- }
2025
- return data;
2026
- };
2027
-
2028
- /**
2029
- * Modifier used to shift the popper on the start or end of its reference element side
2030
- * @method
2031
- * @memberof Popper.modifiers
2032
- * @argument {Object} data - The data object generated by `update` method
2033
- * @returns {Object} The data object, properly modified
2034
- */
2035
- Popper.prototype.modifiers.shift = function (data) {
2036
- var placement = data.placement;
2037
- var basePlacement = placement.split('-')[0];
2038
- var shiftVariation = placement.split('-')[1];
2039
-
2040
- // if shift shiftVariation is specified, run the modifier
2041
- if (shiftVariation) {
2042
- var reference = data.offsets.reference;
2043
- var popper = getPopperClientRect(data.offsets.popper);
2044
- var shiftOffsets = {
2045
- y: {
2046
- start: {
2047
- top: reference.top
2048
- },
2049
- end: {
2050
- top: reference.top + reference.height - popper.height
2051
- }
2052
- },
2053
- x: {
2054
- start: {
2055
- left: reference.left
2056
- },
2057
- end: {
2058
- left: reference.left + reference.width - popper.width
2059
- }
2060
- }
2061
- };
2062
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
2063
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
2064
- }
2065
- return data;
2066
- };
2067
-
2068
- /**
2069
- * Modifier used to make sure the popper does not overflows from it's boundaries
2070
- * @method
2071
- * @memberof Popper.modifiers
2072
- * @argument {Object} data - The data object generated by `update` method
2073
- * @returns {Object} The data object, properly modified
2074
- */
2075
- Popper.prototype.modifiers.preventOverflow = function (data) {
2076
- var order = this._options.preventOverflowOrder;
2077
- var popper = getPopperClientRect(data.offsets.popper);
2078
- var check = {
2079
- left: function left() {
2080
- var left = popper.left;
2081
- if (popper.left < data.boundaries.left) {
2082
- left = Math.max(popper.left, data.boundaries.left);
2083
- }
2084
- return {
2085
- left: left
2086
- };
2087
- },
2088
- right: function right() {
2089
- var left = popper.left;
2090
- if (popper.right > data.boundaries.right) {
2091
- left = Math.min(popper.left, data.boundaries.right - popper.width);
2092
- }
2093
- return {
2094
- left: left
2095
- };
2096
- },
2097
- top: function top() {
2098
- var top = popper.top;
2099
- if (popper.top < data.boundaries.top) {
2100
- top = Math.max(popper.top, data.boundaries.top);
2101
- }
2102
- return {
2103
- top: top
2104
- };
2105
- },
2106
- bottom: function bottom() {
2107
- var top = popper.top;
2108
- if (popper.bottom > data.boundaries.bottom) {
2109
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
2110
- }
2111
- return {
2112
- top: top
2113
- };
2114
- }
2115
- };
2116
- order.forEach(function (direction) {
2117
- data.offsets.popper = Object.assign(popper, check[direction]());
2118
- });
2119
- return data;
2120
- };
2121
-
2122
- /**
2123
- * Modifier used to make sure the popper is always near its reference
2124
- * @method
2125
- * @memberof Popper.modifiers
2126
- * @argument {Object} data - The data object generated by _update method
2127
- * @returns {Object} The data object, properly modified
2128
- */
2129
- Popper.prototype.modifiers.keepTogether = function (data) {
2130
- var popper = getPopperClientRect(data.offsets.popper);
2131
- var reference = data.offsets.reference;
2132
- var f = Math.floor;
2133
- if (popper.right < f(reference.left)) {
2134
- data.offsets.popper.left = f(reference.left) - popper.width;
2135
- }
2136
- if (popper.left > f(reference.right)) {
2137
- data.offsets.popper.left = f(reference.right);
2138
- }
2139
- if (popper.bottom < f(reference.top)) {
2140
- data.offsets.popper.top = f(reference.top) - popper.height;
2141
- }
2142
- if (popper.top > f(reference.bottom)) {
2143
- data.offsets.popper.top = f(reference.bottom);
2144
- }
2145
- return data;
2146
- };
2147
-
2148
- /**
2149
- * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
2150
- * Requires the `preventOverflow` modifier before it in order to work.
2151
- * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
2152
- * @method
2153
- * @memberof Popper.modifiers
2154
- * @argument {Object} data - The data object generated by _update method
2155
- * @returns {Object} The data object, properly modified
2156
- */
2157
- Popper.prototype.modifiers.flip = function (data) {
2158
- // check if preventOverflow is in the list of modifiers before the flip modifier.
2159
- // otherwise flip would not work as expected.
2160
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
2161
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
2162
- return data;
2163
- }
2164
- if (data.flipped && data.placement === data._originalPlacement) {
2165
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
2166
- return data;
2167
- }
2168
- var placement = data.placement.split('-')[0];
2169
- var placementOpposite = getOppositePlacement(placement);
2170
- var variation = data.placement.split('-')[1] || '';
2171
- var flipOrder = [];
2172
- if (this._options.flipBehavior === 'flip') {
2173
- flipOrder = [placement, placementOpposite];
2174
- } else {
2175
- flipOrder = this._options.flipBehavior;
2176
- }
2177
- flipOrder.forEach(function (step, index) {
2178
- if (placement !== step || flipOrder.length === index + 1) {
2179
- return;
2180
- }
2181
- placement = data.placement.split('-')[0];
2182
- placementOpposite = getOppositePlacement(placement);
2183
- var popperOffsets = getPopperClientRect(data.offsets.popper);
2184
-
2185
- // this boolean is used to distinguish right and bottom from top and left
2186
- // they need different computations to get flipped
2187
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
2188
-
2189
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
2190
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
2191
- // we'll use this boolean to detect any flip loop
2192
- data.flipped = true;
2193
- data.placement = flipOrder[index + 1];
2194
- if (variation) {
2195
- data.placement += '-' + variation;
2196
- }
2197
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
2198
- data = this.runModifiers(data, this._options.modifiers, this._flip);
2199
- }
2200
- }.bind(this));
2201
- return data;
2202
- };
2203
-
2204
- /**
2205
- * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
2206
- * The offsets will shift the popper on the side of its reference element.
2207
- * @method
2208
- * @memberof Popper.modifiers
2209
- * @argument {Object} data - The data object generated by _update method
2210
- * @returns {Object} The data object, properly modified
2211
- */
2212
- Popper.prototype.modifiers.offset = function (data) {
2213
- var offset = this._options.offset;
2214
- var popper = data.offsets.popper;
2215
- if (data.placement.indexOf('left') !== -1) {
2216
- popper.top -= offset;
2217
- } else if (data.placement.indexOf('right') !== -1) {
2218
- popper.top += offset;
2219
- } else if (data.placement.indexOf('top') !== -1) {
2220
- popper.left -= offset;
2221
- } else if (data.placement.indexOf('bottom') !== -1) {
2222
- popper.left += offset;
2223
- }
2224
- return data;
2225
- };
2226
-
2227
- /**
2228
- * 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
2229
- * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
2230
- * @method
2231
- * @memberof Popper.modifiers
2232
- * @argument {Object} data - The data object generated by _update method
2233
- * @returns {Object} The data object, properly modified
2234
- */
2235
- Popper.prototype.modifiers.arrow = function (data) {
2236
- var arrow = this._options.arrowElement;
2237
- var arrowOffset = this._options.arrowOffset;
2238
-
2239
- // if the arrowElement is a string, suppose it's a CSS selector
2240
- if (typeof arrow === 'string') {
2241
- arrow = this._popper.querySelector(arrow);
2242
- }
2243
-
2244
- // if arrow element is not found, don't run the modifier
2245
- if (!arrow) {
2246
- return data;
2247
- }
2248
-
2249
- // the arrow element must be child of its popper
2250
- if (!this._popper.contains(arrow)) {
2251
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
2252
- return data;
2253
- }
2254
-
2255
- // arrow depends on keepTogether in order to work
2256
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
2257
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
2258
- return data;
2259
- }
2260
- var arrowStyle = {};
2261
- var placement = data.placement.split('-')[0];
2262
- var popper = getPopperClientRect(data.offsets.popper);
2263
- var reference = data.offsets.reference;
2264
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2265
- var len = isVertical ? 'height' : 'width';
2266
- var side = isVertical ? 'top' : 'left';
2267
- var translate = isVertical ? 'translateY' : 'translateX';
2268
- var altSide = isVertical ? 'left' : 'top';
2269
- var opSide = isVertical ? 'bottom' : 'right';
2270
- var arrowSize = getOuterSizes(arrow)[len];
2271
-
2272
- //
2273
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
2274
- //
2275
-
2276
- // top/left side
2277
- if (reference[opSide] - arrowSize < popper[side]) {
2278
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
2279
- }
2280
- // bottom/right side
2281
- if (reference[side] + arrowSize > popper[opSide]) {
2282
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
2283
- }
2284
-
2285
- // compute center of the popper
2286
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
2287
- var sideValue = center - popper[side];
2288
-
2289
- // prevent arrow from being placed not contiguously to its popper
2290
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2291
- arrowStyle[side] = sideValue;
2292
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2293
-
2294
- data.offsets.arrow = arrowStyle;
2295
- data.arrowElement = arrow;
2296
- return data;
2297
- };
2298
-
2299
- //
2300
- // Helpers
2301
- //
2302
-
2303
- /**
2304
- * Get the outer sizes of the given element (offset size + margins)
2305
- * @function
2306
- * @ignore
2307
- * @argument {Element} element
2308
- * @returns {Object} object containing width and height properties
2309
- */
2310
- function getOuterSizes(element) {
2311
- // NOTE: 1 DOM access here
2312
- var _display = element.style.display,
2313
- _visibility = element.style.visibility;
2314
- element.style.display = 'block';
2315
- element.style.visibility = 'hidden';
2316
- var calcWidthToForceRepaint = element.offsetWidth;
2317
-
2318
- // original method
2319
- var styles = root.getComputedStyle(element);
2320
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2321
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2322
- var result = {
2323
- width: element.offsetWidth + y,
2324
- height: element.offsetHeight + x
2325
- };
2326
-
2327
- // reset element styles
2328
- element.style.display = _display;
2329
- element.style.visibility = _visibility;
2330
- return result;
2331
- }
2332
-
2333
- /**
2334
- * Get the opposite placement of the given one/
2335
- * @function
2336
- * @ignore
2337
- * @argument {String} placement
2338
- * @returns {String} flipped placement
2339
- */
2340
- function getOppositePlacement(placement) {
2341
- var hash = {
2342
- left: 'right',
2343
- right: 'left',
2344
- bottom: 'top',
2345
- top: 'bottom'
2346
- };
2347
- return placement.replace(/left|right|bottom|top/g, function (matched) {
2348
- return hash[matched];
2349
- });
2350
- }
2351
-
2352
- /**
2353
- * Given the popper offsets, generate an output similar to getBoundingClientRect
2354
- * @function
2355
- * @ignore
2356
- * @argument {Object} popperOffsets
2357
- * @returns {Object} ClientRect like output
2358
- */
2359
- function getPopperClientRect(popperOffsets) {
2360
- var offsets = Object.assign({}, popperOffsets);
2361
- offsets.right = offsets.left + offsets.width;
2362
- offsets.bottom = offsets.top + offsets.height;
2363
- return offsets;
2364
- }
2365
-
2366
- /**
2367
- * Given an array and the key to find, returns its index
2368
- * @function
2369
- * @ignore
2370
- * @argument {Array} arr
2371
- * @argument keyToFind
2372
- * @returns index or null
2373
- */
2374
- function getArrayKeyIndex(arr, keyToFind) {
2375
- var i = 0,
2376
- key;
2377
- for (key in arr) {
2378
- if (arr[key] === keyToFind) {
2379
- return i;
2380
- }
2381
- i++;
2382
- }
2383
- return null;
2384
- }
2385
-
2386
- /**
2387
- * Get CSS computed property of the given element
2388
- * @function
2389
- * @ignore
2390
- * @argument {Eement} element
2391
- * @argument {String} property
2392
- */
2393
- function getStyleComputedProperty(element, property) {
2394
- // NOTE: 1 DOM access here
2395
- var css = root.getComputedStyle(element, null);
2396
- return css[property];
2397
- }
2398
-
2399
- /**
2400
- * Returns the offset parent of the given element
2401
- * @function
2402
- * @ignore
2403
- * @argument {Element} element
2404
- * @returns {Element} offset parent
2405
- */
2406
- function getOffsetParent(element) {
2407
- // NOTE: 1 DOM access here
2408
- var offsetParent = element.offsetParent;
2409
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
2410
- }
2411
-
2412
- /**
2413
- * Returns the scrolling parent of the given element
2414
- * @function
2415
- * @ignore
2416
- * @argument {Element} element
2417
- * @returns {Element} offset parent
2418
- */
2419
- function getScrollParent(element) {
2420
- var parent = element.parentNode;
2421
- if (!parent) {
2422
- return element;
2423
- }
2424
- if (parent === root.document) {
2425
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2426
- // greater than 0 and return the proper element
2427
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2428
- return root.document.body;
2429
- } else {
2430
- return root.document.documentElement;
2431
- }
2432
- }
2433
-
2434
- // Firefox want us to check `-x` and `-y` variations as well
2435
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
2436
- // If the detected scrollParent is body, we perform an additional check on its parentNode
2437
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2438
- // fixes issue #65
2439
- return parent;
2440
- }
2441
- return getScrollParent(element.parentNode);
2442
- }
2443
-
2444
- /**
2445
- * Check if the given element is fixed or is inside a fixed parent
2446
- * @function
2447
- * @ignore
2448
- * @argument {Element} element
2449
- * @argument {Element} customContainer
2450
- * @returns {Boolean} answer to "isFixed?"
2451
- */
2452
- function isFixed(element) {
2453
- if (element === root.document.body) {
2454
- return false;
2455
- }
2456
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
2457
- return true;
2458
- }
2459
- return element.parentNode ? isFixed(element.parentNode) : element;
2460
- }
2461
-
2462
- /**
2463
- * Set the style to the given popper
2464
- * @function
2465
- * @ignore
2466
- * @argument {Element} element - Element to apply the style to
2467
- * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
2468
- */
2469
- function setStyle(element, styles) {
2470
- function is_numeric(n) {
2471
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2472
- }
2473
- Object.keys(styles).forEach(function (prop) {
2474
- var unit = '';
2475
- // add unit if the value is numeric and is one of the following
2476
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
2477
- unit = 'px';
2478
- }
2479
- element.style[prop] = styles[prop] + unit;
2480
- });
2481
- }
2482
-
2483
- /**
2484
- * Check if the given variable is a function
2485
- * @function
2486
- * @ignore
2487
- * @argument {*} functionToCheck - variable to check
2488
- * @returns {Boolean} answer to: is a function?
2489
- */
2490
- function isFunction(functionToCheck) {
2491
- var getType = {};
2492
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2493
- }
2494
-
2495
- /**
2496
- * Get the position of the given element, relative to its offset parent
2497
- * @function
2498
- * @ignore
2499
- * @param {Element} element
2500
- * @return {Object} position - Coordinates of the element and its `scrollTop`
2501
- */
2502
- function getOffsetRect(element) {
2503
- var elementRect = {
2504
- width: element.offsetWidth,
2505
- height: element.offsetHeight,
2506
- left: element.offsetLeft,
2507
- top: element.offsetTop
2508
- };
2509
- elementRect.right = elementRect.left + elementRect.width;
2510
- elementRect.bottom = elementRect.top + elementRect.height;
2511
-
2512
- // position
2513
- return elementRect;
2514
- }
319
+ // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue
2515
320
 
2516
- /**
2517
- * Get bounding client rect of given element
2518
- * @function
2519
- * @ignore
2520
- * @param {HTMLElement} element
2521
- * @return {Object} client rect
2522
- */
2523
- function getBoundingClientRect(element) {
2524
- var rect = element.getBoundingClientRect();
2525
321
 
2526
- // whether the IE version is lower than 11
2527
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
2528
322
 
2529
- // fix ie document bounding top always 0 bug
2530
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
2531
- return {
2532
- left: rect.left,
2533
- top: rectTop,
2534
- right: rect.right,
2535
- bottom: rect.bottom,
2536
- width: rect.right - rect.left,
2537
- height: rect.bottom - rectTop
2538
- };
2539
- }
2540
323
 
2541
- /**
2542
- * Given an element and one of its parents, return the offset
2543
- * @function
2544
- * @ignore
2545
- * @param {HTMLElement} element
2546
- * @param {HTMLElement} parent
2547
- * @return {Object} rect
2548
- */
2549
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
2550
- var elementRect = getBoundingClientRect(element);
2551
- var parentRect = getBoundingClientRect(parent);
2552
- if (fixed) {
2553
- var scrollParent = getScrollParent(parent);
2554
- parentRect.top += scrollParent.scrollTop;
2555
- parentRect.bottom += scrollParent.scrollTop;
2556
- parentRect.left += scrollParent.scrollLeft;
2557
- parentRect.right += scrollParent.scrollLeft;
2558
- }
2559
- var rect = {
2560
- top: elementRect.top - parentRect.top,
2561
- left: elementRect.left - parentRect.left,
2562
- bottom: elementRect.top - parentRect.top + elementRect.height,
2563
- right: elementRect.left - parentRect.left + elementRect.width,
2564
- width: elementRect.width,
2565
- height: elementRect.height
2566
- };
2567
- return rect;
2568
- }
2569
324
 
2570
- /**
2571
- * Get the prefixed supported property name
2572
- * @function
2573
- * @ignore
2574
- * @argument {String} property (camelCase)
2575
- * @returns {String} prefixed property (camelCase)
2576
- */
2577
- function getSupportedPropertyName(property) {
2578
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
2579
- for (var i = 0; i < prefixes.length; i++) {
2580
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
2581
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
2582
- return toCheck;
2583
- }
2584
- }
2585
- return null;
2586
- }
325
+ /* normalize component */
2587
326
 
2588
- /**
2589
- * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
2590
- * objects to a target object. It will return the target object.
2591
- * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
2592
- * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2593
- * @function
2594
- * @ignore
2595
- */
2596
- if (!Object.assign) {
2597
- Object.defineProperty(Object, 'assign', {
2598
- enumerable: false,
2599
- configurable: true,
2600
- writable: true,
2601
- value: function value(target) {
2602
- if (target === undefined || target === null) {
2603
- throw new TypeError('Cannot convert first argument to object');
2604
- }
2605
- var to = Object(target);
2606
- for (var i = 1; i < arguments.length; i++) {
2607
- var nextSource = arguments[i];
2608
- if (nextSource === undefined || nextSource === null) {
2609
- continue;
2610
- }
2611
- nextSource = Object(nextSource);
2612
- var keysArray = Object.keys(nextSource);
2613
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
2614
- var nextKey = keysArray[nextIndex];
2615
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2616
- if (desc !== undefined && desc.enumerable) {
2617
- to[nextKey] = nextSource[nextKey];
2618
- }
2619
- }
2620
- }
2621
- return to;
2622
- }
2623
- });
2624
- }
2625
- return Popper;
2626
- });
2627
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(72)(module)))
327
+ var component = Object(componentNormalizer["a" /* default */])(
328
+ src_dropdown_menuvue_type_script_lang_js,
329
+ render,
330
+ staticRenderFns,
331
+ false,
332
+ null,
333
+ null,
334
+ null
335
+
336
+ )
2628
337
 
2629
- /***/ }),
338
+ /* harmony default export */ var dropdown_menu = (component.exports);
339
+ // CONCATENATED MODULE: ./packages/dropdown-menu/index.js
2630
340
 
2631
- /***/ 72:
2632
- /***/ (function(module, exports) {
2633
341
 
2634
- module.exports = function(originalModule) {
2635
- if (!originalModule.webpackPolyfill) {
2636
- var module = Object.create(originalModule);
2637
- // module.parent = undefined by default
2638
- if (!module.children) module.children = [];
2639
- Object.defineProperty(module, "loaded", {
2640
- enumerable: true,
2641
- get: function() {
2642
- return module.l;
2643
- }
2644
- });
2645
- Object.defineProperty(module, "id", {
2646
- enumerable: true,
2647
- get: function() {
2648
- return module.i;
2649
- }
2650
- });
2651
- Object.defineProperty(module, "exports", {
2652
- enumerable: true
2653
- });
2654
- module.webpackPolyfill = 1;
2655
- }
2656
- return module;
342
+ /* istanbul ignore next */
343
+ dropdown_menu.install = function (Vue) {
344
+ Vue.component(dropdown_menu.name, dropdown_menu);
2657
345
  };
2658
346
 
2659
-
2660
- /***/ }),
2661
-
2662
- /***/ 73:
2663
- /***/ (function(module, exports) {
2664
-
2665
- module.exports = require("core-js/modules/es.object.get-own-property-descriptor.js");
2666
-
2667
- /***/ }),
2668
-
2669
- /***/ 74:
2670
- /***/ (function(module, exports) {
2671
-
2672
- /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
2673
- module.exports = __webpack_amd_options__;
2674
-
2675
- /* WEBPACK VAR INJECTION */}.call(this, {}))
347
+ /* harmony default export */ var packages_dropdown_menu = __webpack_exports__["default"] = (dropdown_menu);
2676
348
 
2677
349
  /***/ })
2678
350