element-pe 2.2.61 → 2.2.62

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 (546) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +48 -73
  3. package/dist/index.full.min.js +13 -13
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +17 -17
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +49 -73
  8. package/es/components/alert/index.mjs +2 -2
  9. package/es/components/alert/src/alert.mjs +103 -38
  10. package/es/components/alert/src/alert.mjs.map +1 -1
  11. package/es/components/alert/src/alert2.mjs +38 -103
  12. package/es/components/alert/src/alert2.mjs.map +1 -1
  13. package/es/components/autocomplete/src/autocomplete2.mjs +1 -1
  14. package/es/components/backtop/index.mjs +2 -2
  15. package/es/components/backtop/src/backtop.mjs +23 -61
  16. package/es/components/backtop/src/backtop.mjs.map +1 -1
  17. package/es/components/backtop/src/backtop2.mjs +61 -23
  18. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  19. package/es/components/carousel/index.mjs +2 -2
  20. package/es/components/carousel/src/carousel-item.mjs +8 -69
  21. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  22. package/es/components/carousel/src/carousel-item2.mjs +69 -8
  23. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  24. package/es/components/cascader/src/cascader.mjs +1 -1
  25. package/es/components/check-tag/index.mjs +2 -2
  26. package/es/components/check-tag/src/check-tag.mjs +12 -31
  27. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  28. package/es/components/check-tag/src/check-tag2.mjs +31 -12
  29. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  30. package/es/components/checkbox/index.mjs +2 -2
  31. package/es/components/checkbox/src/checkbox-group.mjs +28 -72
  32. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  33. package/es/components/checkbox/src/checkbox-group2.mjs +72 -28
  34. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  35. package/es/components/collapse/index.mjs +2 -2
  36. package/es/components/collapse/src/collapse.mjs +17 -30
  37. package/es/components/collapse/src/collapse.mjs.map +1 -1
  38. package/es/components/collapse/src/collapse2.mjs +30 -17
  39. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  40. package/es/components/collection/index.mjs +1 -1
  41. package/es/components/collection/src/collection.mjs +66 -10
  42. package/es/components/collection/src/collection.mjs.map +1 -1
  43. package/es/components/collection/src/collection2.mjs +10 -66
  44. package/es/components/collection/src/collection2.mjs.map +1 -1
  45. package/es/components/countdown/index.mjs +2 -2
  46. package/es/components/countdown/src/countdown.mjs +23 -76
  47. package/es/components/countdown/src/countdown.mjs.map +1 -1
  48. package/es/components/countdown/src/countdown2.mjs +76 -23
  49. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  50. package/es/components/dialog/index.mjs +2 -2
  51. package/es/components/dialog/src/dialog-content.mjs +39 -94
  52. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  53. package/es/components/dialog/src/dialog-content2.mjs +94 -39
  54. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  55. package/es/components/dialog/src/dialog.mjs +73 -174
  56. package/es/components/dialog/src/dialog.mjs.map +1 -1
  57. package/es/components/dialog/src/dialog2.mjs +174 -73
  58. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  59. package/es/components/divider/index.mjs +2 -2
  60. package/es/components/divider/src/divider.mjs +17 -35
  61. package/es/components/divider/src/divider.mjs.map +1 -1
  62. package/es/components/divider/src/divider2.mjs +35 -17
  63. package/es/components/divider/src/divider2.mjs.map +1 -1
  64. package/es/components/drawer/src/drawer2.mjs +1 -1
  65. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  66. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  67. package/es/components/dropdown/src/dropdown.mjs +2 -2
  68. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  69. package/es/components/icon/index.mjs +2 -2
  70. package/es/components/icon/src/icon.mjs +8 -36
  71. package/es/components/icon/src/icon.mjs.map +1 -1
  72. package/es/components/icon/src/icon2.mjs +36 -8
  73. package/es/components/icon/src/icon2.mjs.map +1 -1
  74. package/es/components/index.mjs +33 -33
  75. package/es/components/input/index.mjs +2 -2
  76. package/es/components/input/src/input.mjs +108 -458
  77. package/es/components/input/src/input.mjs.map +1 -1
  78. package/es/components/input/src/input2.mjs +458 -108
  79. package/es/components/input/src/input2.mjs.map +1 -1
  80. package/es/components/message/index.mjs +1 -1
  81. package/es/components/message/src/message.mjs +86 -151
  82. package/es/components/message/src/message.mjs.map +1 -1
  83. package/es/components/message/src/message2.mjs +151 -86
  84. package/es/components/message/src/message2.mjs.map +1 -1
  85. package/es/components/message/src/method.mjs +2 -2
  86. package/es/components/message-box/src/index.mjs +0 -2
  87. package/es/components/message-box/src/index.mjs.map +1 -1
  88. package/es/components/notification/index.mjs +1 -1
  89. package/es/components/notification/src/notification.d.ts +1 -1
  90. package/es/components/notification/src/notification.mjs +150 -69
  91. package/es/components/notification/src/notification.mjs.map +1 -1
  92. package/es/components/notification/src/notification.vue.d.ts +3 -4
  93. package/es/components/notification/src/notification2.mjs +67 -150
  94. package/es/components/notification/src/notification2.mjs.map +1 -1
  95. package/es/components/notification/src/notify.mjs +2 -2
  96. package/es/components/pagination/index.d.ts +6 -6
  97. package/es/components/pagination/src/components/pager.mjs +14 -12
  98. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  99. package/es/components/pagination/src/components/pager.vue.d.ts +2 -0
  100. package/es/components/pagination/src/components/prev.mjs +38 -18
  101. package/es/components/pagination/src/components/prev.mjs.map +1 -1
  102. package/es/components/pagination/src/components/prev2.mjs +18 -38
  103. package/es/components/pagination/src/components/prev2.mjs.map +1 -1
  104. package/es/components/pagination/src/components/sizes.mjs +70 -22
  105. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  106. package/es/components/pagination/src/components/sizes.vue.d.ts +1 -3
  107. package/es/components/pagination/src/components/sizes2.mjs +22 -70
  108. package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
  109. package/es/components/pagination/src/pagination.d.ts +9 -9
  110. package/es/components/pagination/src/pagination.mjs +5 -5
  111. package/es/components/pagination/src/pagination.mjs.map +1 -1
  112. package/es/components/popconfirm/index.mjs +2 -2
  113. package/es/components/popconfirm/src/popconfirm.mjs +47 -110
  114. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  115. package/es/components/popconfirm/src/popconfirm2.mjs +110 -47
  116. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  117. package/es/components/popover/src/popover.mjs +1 -1
  118. package/es/components/popper/index.mjs +6 -6
  119. package/es/components/popper/src/arrow.mjs +8 -39
  120. package/es/components/popper/src/arrow.mjs.map +1 -1
  121. package/es/components/popper/src/arrow2.mjs +39 -8
  122. package/es/components/popper/src/arrow2.mjs.map +1 -1
  123. package/es/components/popper/src/composables/use-content-dom.mjs +2 -2
  124. package/es/components/popper/src/composables/use-content-dom.mjs.map +1 -1
  125. package/es/components/popper/src/popper.mjs +32 -25
  126. package/es/components/popper/src/popper.mjs.map +1 -1
  127. package/es/components/popper/src/popper2.mjs +25 -32
  128. package/es/components/popper/src/popper2.mjs.map +1 -1
  129. package/es/components/popper/src/trigger.mjs +121 -31
  130. package/es/components/popper/src/trigger.mjs.map +1 -1
  131. package/es/components/popper/src/trigger2.mjs +31 -121
  132. package/es/components/popper/src/trigger2.mjs.map +1 -1
  133. package/es/components/radio/index.mjs +2 -2
  134. package/es/components/radio/src/radio-button.mjs +64 -9
  135. package/es/components/radio/src/radio-button.mjs.map +1 -1
  136. package/es/components/radio/src/radio-button2.mjs +9 -64
  137. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  138. package/es/components/result/index.mjs +2 -2
  139. package/es/components/result/src/result.mjs +29 -63
  140. package/es/components/result/src/result.mjs.map +1 -1
  141. package/es/components/result/src/result2.mjs +63 -29
  142. package/es/components/result/src/result2.mjs.map +1 -1
  143. package/es/components/roving-focus-group/index.mjs +3 -3
  144. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  145. package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
  146. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  147. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
  148. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  149. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  150. package/es/components/scrollbar/index.mjs +3 -3
  151. package/es/components/scrollbar/src/bar2.mjs +1 -1
  152. package/es/components/scrollbar/src/scrollbar.mjs +176 -46
  153. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  154. package/es/components/scrollbar/src/scrollbar2.mjs +46 -176
  155. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  156. package/es/components/scrollbar/src/thumb.mjs +134 -11
  157. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  158. package/es/components/scrollbar/src/thumb2.mjs +11 -134
  159. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  160. package/es/components/select/index.d.ts +1 -3
  161. package/es/components/select/src/option.mjs +1 -1
  162. package/es/components/select/src/option.mjs.map +1 -1
  163. package/es/components/select/src/select.mjs +1 -5
  164. package/es/components/select/src/select.mjs.map +1 -1
  165. package/es/components/select/src/select.vue.d.ts +1 -3
  166. package/es/components/select/src/token.d.ts +1 -1
  167. package/es/components/select/src/token.mjs.map +1 -1
  168. package/es/components/select/src/useSelect.d.ts +1 -3
  169. package/es/components/select/src/useSelect.mjs +12 -14
  170. package/es/components/select/src/useSelect.mjs.map +1 -1
  171. package/es/components/select-v2/src/defaults.mjs +1 -1
  172. package/es/components/skeleton/index.mjs +2 -2
  173. package/es/components/skeleton/src/skeleton.mjs +49 -22
  174. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  175. package/es/components/skeleton/src/skeleton2.mjs +22 -49
  176. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  177. package/es/components/slider/index.mjs +2 -2
  178. package/es/components/slider/src/slider.mjs +233 -91
  179. package/es/components/slider/src/slider.mjs.map +1 -1
  180. package/es/components/slider/src/slider2.mjs +91 -233
  181. package/es/components/slider/src/slider2.mjs.map +1 -1
  182. package/es/components/statistic/index.mjs +2 -2
  183. package/es/components/statistic/src/statistic.mjs +70 -25
  184. package/es/components/statistic/src/statistic.mjs.map +1 -1
  185. package/es/components/statistic/src/statistic2.mjs +25 -70
  186. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  187. package/es/components/steps/index.d.ts +5 -3
  188. package/es/components/steps/src/item.vue.d.ts +4 -2
  189. package/es/components/steps/src/item2.mjs +3 -3
  190. package/es/components/steps/src/item2.mjs.map +1 -1
  191. package/es/components/steps/src/steps.vue.d.ts +3 -2
  192. package/es/components/steps/src/steps2.mjs +8 -3
  193. package/es/components/steps/src/steps2.mjs.map +1 -1
  194. package/es/components/table/src/table/style-helper.mjs +3 -7
  195. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  196. package/es/components/tabs/index.mjs +3 -3
  197. package/es/components/tabs/src/tab-bar.mjs +75 -7
  198. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  199. package/es/components/tabs/src/tab-bar2.mjs +7 -75
  200. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  201. package/es/components/tabs/src/tab-nav.mjs +1 -1
  202. package/es/components/tabs/src/tab-pane.mjs +76 -14
  203. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  204. package/es/components/tabs/src/tab-pane2.mjs +14 -76
  205. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  206. package/es/components/text/index.mjs +2 -2
  207. package/es/components/text/src/text.mjs +22 -35
  208. package/es/components/text/src/text.mjs.map +1 -1
  209. package/es/components/text/src/text2.mjs +35 -22
  210. package/es/components/text/src/text2.mjs.map +1 -1
  211. package/es/components/time-select/index.d.ts +4 -12
  212. package/es/components/time-select/src/time-select.vue.d.ts +2 -6
  213. package/es/components/tooltip/index.mjs +1 -1
  214. package/es/components/tooltip/src/content.mjs +179 -31
  215. package/es/components/tooltip/src/content.mjs.map +1 -1
  216. package/es/components/tooltip/src/content2.mjs +31 -179
  217. package/es/components/tooltip/src/content2.mjs.map +1 -1
  218. package/es/components/tooltip/src/tooltip.mjs +3 -3
  219. package/es/components/tooltip/src/tooltip2.mjs +2 -2
  220. package/es/components/tooltip/src/trigger.mjs +1 -1
  221. package/es/components/tooltip/src/trigger2.mjs +1 -1
  222. package/es/components/tooltip-v2/index.mjs +5 -5
  223. package/es/components/tooltip-v2/src/arrow.mjs +22 -37
  224. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  225. package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
  226. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  227. package/es/components/tooltip-v2/src/content.mjs +50 -114
  228. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  229. package/es/components/tooltip-v2/src/content2.mjs +114 -50
  230. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  231. package/es/components/tooltip-v2/src/root.mjs +17 -82
  232. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  233. package/es/components/tooltip-v2/src/root2.mjs +82 -17
  234. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  235. package/es/components/tooltip-v2/src/tooltip.mjs +21 -78
  236. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  237. package/es/components/tooltip-v2/src/tooltip2.mjs +78 -21
  238. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  239. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  240. package/es/components/transfer/src/transfer-panel.mjs +19 -128
  241. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  242. package/es/components/transfer/src/transfer-panel2.mjs +128 -19
  243. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  244. package/es/components/transfer/src/transfer2.mjs +1 -1
  245. package/es/components/tree-select/src/tree.mjs +1 -1
  246. package/es/components/tree-select/src/tree.mjs.map +1 -1
  247. package/es/components/upload/index.mjs +4 -4
  248. package/es/components/upload/src/upload-content.mjs +33 -182
  249. package/es/components/upload/src/upload-content.mjs.map +1 -1
  250. package/es/components/upload/src/upload-content2.mjs +182 -33
  251. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  252. package/es/components/upload/src/upload-dragger.mjs +11 -72
  253. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  254. package/es/components/upload/src/upload-dragger2.mjs +72 -11
  255. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  256. package/es/components/upload/src/upload-list.mjs +1 -1
  257. package/es/components/upload/src/upload.mjs +119 -105
  258. package/es/components/upload/src/upload.mjs.map +1 -1
  259. package/es/components/upload/src/upload2.mjs +105 -119
  260. package/es/components/upload/src/upload2.mjs.map +1 -1
  261. package/es/components/upload/src/use-handlers.mjs +1 -1
  262. package/es/components/visual-hidden/index.mjs +3 -3
  263. package/es/components/visual-hidden/src/visual-hidden.mjs +7 -35
  264. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  265. package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -7
  266. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  267. package/es/hooks/index.d.ts +0 -1
  268. package/es/hooks/index.mjs +0 -1
  269. package/es/hooks/index.mjs.map +1 -1
  270. package/es/index.mjs +33 -34
  271. package/es/index.mjs.map +1 -1
  272. package/lib/components/alert/index.js +2 -2
  273. package/lib/components/alert/src/alert.js +102 -39
  274. package/lib/components/alert/src/alert.js.map +1 -1
  275. package/lib/components/alert/src/alert2.js +39 -102
  276. package/lib/components/alert/src/alert2.js.map +1 -1
  277. package/lib/components/autocomplete/src/autocomplete2.js +1 -1
  278. package/lib/components/backtop/index.js +2 -2
  279. package/lib/components/backtop/src/backtop.js +24 -61
  280. package/lib/components/backtop/src/backtop.js.map +1 -1
  281. package/lib/components/backtop/src/backtop2.js +61 -24
  282. package/lib/components/backtop/src/backtop2.js.map +1 -1
  283. package/lib/components/carousel/index.js +2 -2
  284. package/lib/components/carousel/src/carousel-item.js +8 -69
  285. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  286. package/lib/components/carousel/src/carousel-item2.js +69 -8
  287. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  288. package/lib/components/cascader/src/cascader.js +1 -1
  289. package/lib/components/check-tag/index.js +2 -2
  290. package/lib/components/check-tag/src/check-tag.js +13 -31
  291. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  292. package/lib/components/check-tag/src/check-tag2.js +31 -13
  293. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  294. package/lib/components/checkbox/index.js +2 -2
  295. package/lib/components/checkbox/src/checkbox-group.js +29 -72
  296. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  297. package/lib/components/checkbox/src/checkbox-group2.js +72 -29
  298. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  299. package/lib/components/collapse/index.js +2 -2
  300. package/lib/components/collapse/src/collapse.js +19 -30
  301. package/lib/components/collapse/src/collapse.js.map +1 -1
  302. package/lib/components/collapse/src/collapse2.js +30 -19
  303. package/lib/components/collapse/src/collapse2.js.map +1 -1
  304. package/lib/components/collection/index.js +1 -1
  305. package/lib/components/collection/src/collection.js +66 -9
  306. package/lib/components/collection/src/collection.js.map +1 -1
  307. package/lib/components/collection/src/collection2.js +9 -66
  308. package/lib/components/collection/src/collection2.js.map +1 -1
  309. package/lib/components/countdown/index.js +2 -2
  310. package/lib/components/countdown/src/countdown.js +24 -76
  311. package/lib/components/countdown/src/countdown.js.map +1 -1
  312. package/lib/components/countdown/src/countdown2.js +76 -24
  313. package/lib/components/countdown/src/countdown2.js.map +1 -1
  314. package/lib/components/dialog/index.js +2 -2
  315. package/lib/components/dialog/src/dialog-content.js +39 -93
  316. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  317. package/lib/components/dialog/src/dialog-content2.js +93 -39
  318. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  319. package/lib/components/dialog/src/dialog.js +73 -173
  320. package/lib/components/dialog/src/dialog.js.map +1 -1
  321. package/lib/components/dialog/src/dialog2.js +173 -73
  322. package/lib/components/dialog/src/dialog2.js.map +1 -1
  323. package/lib/components/divider/index.js +2 -2
  324. package/lib/components/divider/src/divider.js +17 -35
  325. package/lib/components/divider/src/divider.js.map +1 -1
  326. package/lib/components/divider/src/divider2.js +35 -17
  327. package/lib/components/divider/src/divider2.js.map +1 -1
  328. package/lib/components/drawer/src/drawer2.js +1 -1
  329. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  330. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  331. package/lib/components/dropdown/src/dropdown.js +2 -2
  332. package/lib/components/dropdown/src/dropdown2.js +1 -1
  333. package/lib/components/icon/index.js +2 -2
  334. package/lib/components/icon/src/icon.js +8 -36
  335. package/lib/components/icon/src/icon.js.map +1 -1
  336. package/lib/components/icon/src/icon2.js +36 -8
  337. package/lib/components/icon/src/icon2.js.map +1 -1
  338. package/lib/components/index.js +33 -33
  339. package/lib/components/input/index.js +2 -2
  340. package/lib/components/input/src/input.js +108 -457
  341. package/lib/components/input/src/input.js.map +1 -1
  342. package/lib/components/input/src/input2.js +457 -108
  343. package/lib/components/input/src/input2.js.map +1 -1
  344. package/lib/components/message/index.js +1 -1
  345. package/lib/components/message/src/message.js +88 -150
  346. package/lib/components/message/src/message.js.map +1 -1
  347. package/lib/components/message/src/message2.js +150 -88
  348. package/lib/components/message/src/message2.js.map +1 -1
  349. package/lib/components/message/src/method.js +2 -2
  350. package/lib/components/message-box/src/index.js +0 -2
  351. package/lib/components/message-box/src/index.js.map +1 -1
  352. package/lib/components/notification/index.js +1 -1
  353. package/lib/components/notification/src/notification.d.ts +1 -1
  354. package/lib/components/notification/src/notification.js +149 -70
  355. package/lib/components/notification/src/notification.js.map +1 -1
  356. package/lib/components/notification/src/notification.vue.d.ts +3 -4
  357. package/lib/components/notification/src/notification2.js +68 -149
  358. package/lib/components/notification/src/notification2.js.map +1 -1
  359. package/lib/components/notification/src/notify.js +2 -2
  360. package/lib/components/pagination/index.d.ts +6 -6
  361. package/lib/components/pagination/src/components/pager.js +14 -12
  362. package/lib/components/pagination/src/components/pager.js.map +1 -1
  363. package/lib/components/pagination/src/components/pager.vue.d.ts +2 -0
  364. package/lib/components/pagination/src/components/prev.js +38 -19
  365. package/lib/components/pagination/src/components/prev.js.map +1 -1
  366. package/lib/components/pagination/src/components/prev2.js +19 -38
  367. package/lib/components/pagination/src/components/prev2.js.map +1 -1
  368. package/lib/components/pagination/src/components/sizes.js +70 -22
  369. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  370. package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -3
  371. package/lib/components/pagination/src/components/sizes2.js +22 -70
  372. package/lib/components/pagination/src/components/sizes2.js.map +1 -1
  373. package/lib/components/pagination/src/pagination.d.ts +9 -9
  374. package/lib/components/pagination/src/pagination.js +5 -5
  375. package/lib/components/pagination/src/pagination.js.map +1 -1
  376. package/lib/components/popconfirm/index.js +2 -2
  377. package/lib/components/popconfirm/src/popconfirm.js +48 -110
  378. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  379. package/lib/components/popconfirm/src/popconfirm2.js +110 -48
  380. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  381. package/lib/components/popover/src/popover.js +1 -1
  382. package/lib/components/popper/index.js +6 -6
  383. package/lib/components/popper/src/arrow.js +9 -39
  384. package/lib/components/popper/src/arrow.js.map +1 -1
  385. package/lib/components/popper/src/arrow2.js +39 -9
  386. package/lib/components/popper/src/arrow2.js.map +1 -1
  387. package/lib/components/popper/src/composables/use-content-dom.js +2 -2
  388. package/lib/components/popper/src/composables/use-content-dom.js.map +1 -1
  389. package/lib/components/popper/src/popper.js +32 -28
  390. package/lib/components/popper/src/popper.js.map +1 -1
  391. package/lib/components/popper/src/popper2.js +28 -32
  392. package/lib/components/popper/src/popper2.js.map +1 -1
  393. package/lib/components/popper/src/trigger.js +121 -32
  394. package/lib/components/popper/src/trigger.js.map +1 -1
  395. package/lib/components/popper/src/trigger2.js +32 -121
  396. package/lib/components/popper/src/trigger2.js.map +1 -1
  397. package/lib/components/radio/index.js +2 -2
  398. package/lib/components/radio/src/radio-button.js +64 -9
  399. package/lib/components/radio/src/radio-button.js.map +1 -1
  400. package/lib/components/radio/src/radio-button2.js +9 -64
  401. package/lib/components/radio/src/radio-button2.js.map +1 -1
  402. package/lib/components/result/index.js +2 -2
  403. package/lib/components/result/src/result.js +31 -63
  404. package/lib/components/result/src/result.js.map +1 -1
  405. package/lib/components/result/src/result2.js +63 -31
  406. package/lib/components/result/src/result2.js.map +1 -1
  407. package/lib/components/roving-focus-group/index.js +2 -2
  408. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  409. package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
  410. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  411. package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
  412. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  413. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  414. package/lib/components/scrollbar/index.js +3 -3
  415. package/lib/components/scrollbar/src/bar2.js +1 -1
  416. package/lib/components/scrollbar/src/scrollbar.js +176 -47
  417. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  418. package/lib/components/scrollbar/src/scrollbar2.js +47 -176
  419. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  420. package/lib/components/scrollbar/src/thumb.js +134 -11
  421. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  422. package/lib/components/scrollbar/src/thumb2.js +11 -134
  423. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  424. package/lib/components/select/index.d.ts +1 -3
  425. package/lib/components/select/src/option.js +1 -1
  426. package/lib/components/select/src/option.js.map +1 -1
  427. package/lib/components/select/src/select.js +1 -5
  428. package/lib/components/select/src/select.js.map +1 -1
  429. package/lib/components/select/src/select.vue.d.ts +1 -3
  430. package/lib/components/select/src/token.d.ts +1 -1
  431. package/lib/components/select/src/token.js.map +1 -1
  432. package/lib/components/select/src/useSelect.d.ts +1 -3
  433. package/lib/components/select/src/useSelect.js +12 -14
  434. package/lib/components/select/src/useSelect.js.map +1 -1
  435. package/lib/components/select-v2/src/defaults.js +1 -1
  436. package/lib/components/skeleton/index.js +2 -2
  437. package/lib/components/skeleton/src/skeleton.js +49 -22
  438. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  439. package/lib/components/skeleton/src/skeleton2.js +22 -49
  440. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  441. package/lib/components/slider/index.js +2 -2
  442. package/lib/components/slider/src/slider.js +233 -92
  443. package/lib/components/slider/src/slider.js.map +1 -1
  444. package/lib/components/slider/src/slider2.js +92 -233
  445. package/lib/components/slider/src/slider2.js.map +1 -1
  446. package/lib/components/statistic/index.js +2 -2
  447. package/lib/components/statistic/src/statistic.js +70 -25
  448. package/lib/components/statistic/src/statistic.js.map +1 -1
  449. package/lib/components/statistic/src/statistic2.js +25 -70
  450. package/lib/components/statistic/src/statistic2.js.map +1 -1
  451. package/lib/components/steps/index.d.ts +5 -3
  452. package/lib/components/steps/src/item.vue.d.ts +4 -2
  453. package/lib/components/steps/src/item2.js +3 -3
  454. package/lib/components/steps/src/item2.js.map +1 -1
  455. package/lib/components/steps/src/steps.vue.d.ts +3 -2
  456. package/lib/components/steps/src/steps2.js +7 -2
  457. package/lib/components/steps/src/steps2.js.map +1 -1
  458. package/lib/components/table/src/table/style-helper.js +3 -7
  459. package/lib/components/table/src/table/style-helper.js.map +1 -1
  460. package/lib/components/tabs/index.js +3 -3
  461. package/lib/components/tabs/src/tab-bar.js +75 -7
  462. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  463. package/lib/components/tabs/src/tab-bar2.js +7 -75
  464. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  465. package/lib/components/tabs/src/tab-nav.js +1 -1
  466. package/lib/components/tabs/src/tab-pane.js +76 -14
  467. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  468. package/lib/components/tabs/src/tab-pane2.js +14 -76
  469. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  470. package/lib/components/text/index.js +2 -2
  471. package/lib/components/text/src/text.js +22 -35
  472. package/lib/components/text/src/text.js.map +1 -1
  473. package/lib/components/text/src/text2.js +35 -22
  474. package/lib/components/text/src/text2.js.map +1 -1
  475. package/lib/components/time-select/index.d.ts +4 -12
  476. package/lib/components/time-select/src/time-select.vue.d.ts +2 -6
  477. package/lib/components/tooltip/index.js +1 -1
  478. package/lib/components/tooltip/src/content.js +179 -31
  479. package/lib/components/tooltip/src/content.js.map +1 -1
  480. package/lib/components/tooltip/src/content2.js +31 -179
  481. package/lib/components/tooltip/src/content2.js.map +1 -1
  482. package/lib/components/tooltip/src/tooltip.js +3 -3
  483. package/lib/components/tooltip/src/tooltip2.js +2 -2
  484. package/lib/components/tooltip/src/trigger.js +1 -1
  485. package/lib/components/tooltip/src/trigger2.js +1 -1
  486. package/lib/components/tooltip-v2/index.js +5 -5
  487. package/lib/components/tooltip-v2/src/arrow.js +23 -37
  488. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  489. package/lib/components/tooltip-v2/src/arrow2.js +37 -23
  490. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  491. package/lib/components/tooltip-v2/src/content.js +50 -114
  492. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  493. package/lib/components/tooltip-v2/src/content2.js +114 -50
  494. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  495. package/lib/components/tooltip-v2/src/root.js +17 -82
  496. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  497. package/lib/components/tooltip-v2/src/root2.js +82 -17
  498. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  499. package/lib/components/tooltip-v2/src/tooltip.js +21 -78
  500. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  501. package/lib/components/tooltip-v2/src/tooltip2.js +78 -21
  502. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  503. package/lib/components/transfer/src/composables/use-check.js +1 -1
  504. package/lib/components/transfer/src/transfer-panel.js +21 -128
  505. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  506. package/lib/components/transfer/src/transfer-panel2.js +128 -21
  507. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  508. package/lib/components/transfer/src/transfer2.js +1 -1
  509. package/lib/components/tree-select/src/tree.js +1 -1
  510. package/lib/components/tree-select/src/tree.js.map +1 -1
  511. package/lib/components/upload/index.js +4 -4
  512. package/lib/components/upload/src/upload-content.js +32 -181
  513. package/lib/components/upload/src/upload-content.js.map +1 -1
  514. package/lib/components/upload/src/upload-content2.js +181 -32
  515. package/lib/components/upload/src/upload-content2.js.map +1 -1
  516. package/lib/components/upload/src/upload-dragger.js +12 -72
  517. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  518. package/lib/components/upload/src/upload-dragger2.js +72 -12
  519. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  520. package/lib/components/upload/src/upload-list.js +1 -1
  521. package/lib/components/upload/src/upload.js +119 -108
  522. package/lib/components/upload/src/upload.js.map +1 -1
  523. package/lib/components/upload/src/upload2.js +108 -119
  524. package/lib/components/upload/src/upload2.js.map +1 -1
  525. package/lib/components/upload/src/use-handlers.js +1 -1
  526. package/lib/components/visual-hidden/index.js +2 -2
  527. package/lib/components/visual-hidden/src/visual-hidden.js +7 -35
  528. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  529. package/lib/components/visual-hidden/src/visual-hidden2.js +35 -7
  530. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  531. package/lib/hooks/index.d.ts +0 -1
  532. package/lib/hooks/index.js +52 -54
  533. package/lib/hooks/index.js.map +1 -1
  534. package/lib/index.js +85 -87
  535. package/lib/index.js.map +1 -1
  536. package/package.json +1 -1
  537. package/theme-chalk/el-form.css +1 -1
  538. package/theme-chalk/index.css +1 -1
  539. package/theme-chalk/src/form.scss +7 -0
  540. package/web-types.json +1 -1
  541. package/es/hooks/use-restore-active/index.d.ts +0 -6
  542. package/es/hooks/use-restore-active/index.mjs +0 -23
  543. package/es/hooks/use-restore-active/index.mjs.map +0 -1
  544. package/lib/hooks/use-restore-active/index.d.ts +0 -6
  545. package/lib/hooks/use-restore-active/index.js +0 -27
  546. package/lib/hooks/use-restore-active/index.js.map +0 -1
@@ -2,80 +2,159 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
6
+ var core = require('@vueuse/core');
5
7
  require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
8
+ require('../../../constants/index.js');
9
+ var index = require('../../icon/index.js');
10
+ require('../../config-provider/index.js');
11
+ var notification = require('./notification2.js');
12
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
+ var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
7
14
  var icon = require('../../../utils/vue/icon.js');
15
+ var aria = require('../../../constants/aria.js');
8
16
 
9
- const notificationTypes = [
10
- "success",
11
- "info",
12
- "warning",
13
- "error"
14
- ];
15
- const notificationProps = runtime.buildProps({
16
- customClass: {
17
- type: String,
18
- default: ""
19
- },
20
- dangerouslyUseHTMLString: {
21
- type: Boolean,
22
- default: false
23
- },
24
- duration: {
25
- type: Number,
26
- default: 4500
27
- },
28
- icon: {
29
- type: icon.iconPropType
30
- },
31
- id: {
32
- type: String,
33
- default: ""
34
- },
35
- message: {
36
- type: runtime.definePropType([String, Object]),
37
- default: ""
38
- },
39
- offset: {
40
- type: Number,
41
- default: 0
42
- },
43
- onClick: {
44
- type: runtime.definePropType(Function),
45
- default: () => void 0
46
- },
47
- onClose: {
48
- type: runtime.definePropType(Function),
49
- required: true
50
- },
51
- position: {
52
- type: String,
53
- values: ["top-right", "top-left", "bottom-right", "bottom-left"],
54
- default: "top-right"
55
- },
56
- showClose: {
57
- type: Boolean,
58
- default: true
59
- },
60
- title: {
61
- type: String,
62
- default: ""
63
- },
64
- type: {
65
- type: String,
66
- values: [...notificationTypes, ""],
67
- default: ""
68
- },
69
- zIndex: {
70
- type: Number,
71
- default: 0
17
+ const _hoisted_1 = ["id"];
18
+ const _hoisted_2 = ["textContent"];
19
+ const _hoisted_3 = { key: 0 };
20
+ const _hoisted_4 = ["innerHTML"];
21
+ const __default__ = vue.defineComponent({
22
+ name: "ElNotification"
23
+ });
24
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
+ ...__default__,
26
+ props: notification.notificationProps,
27
+ emits: notification.notificationEmits,
28
+ setup(__props, { expose }) {
29
+ const props = __props;
30
+ const forEditor = useGlobalConfig.useGlobalConfig("forEditor");
31
+ const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
32
+ const { nextZIndex, currentZIndex } = zIndex;
33
+ const { Close } = icon.CloseComponents;
34
+ const visible = vue.ref(false);
35
+ let timer = void 0;
36
+ const typeClass = vue.computed(() => {
37
+ const type = props.type;
38
+ return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
39
+ });
40
+ const iconComponent = vue.computed(() => {
41
+ if (!props.type)
42
+ return props.icon;
43
+ return icon.TypeComponentsMap[props.type] || props.icon;
44
+ });
45
+ const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
46
+ const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
47
+ const positionStyle = vue.computed(() => {
48
+ var _a;
49
+ return {
50
+ [verticalProperty.value]: `${props.offset}px`,
51
+ zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
52
+ };
53
+ });
54
+ function startTimer() {
55
+ if (props.duration > 0) {
56
+ ;
57
+ ({ stop: timer } = core.useTimeoutFn(() => {
58
+ if (visible.value)
59
+ close();
60
+ }, props.duration));
61
+ }
62
+ }
63
+ function clearTimer() {
64
+ timer == null ? void 0 : timer();
65
+ }
66
+ function close() {
67
+ visible.value = false;
68
+ }
69
+ function onKeydown({ code }) {
70
+ if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
71
+ clearTimer();
72
+ } else if (code === aria.EVENT_CODE.esc) {
73
+ if (visible.value) {
74
+ close();
75
+ }
76
+ } else {
77
+ startTimer();
78
+ }
79
+ }
80
+ vue.onMounted(() => {
81
+ startTimer();
82
+ nextZIndex();
83
+ visible.value = true;
84
+ });
85
+ core.useEventListener(document, "keydown", onKeydown);
86
+ expose({
87
+ visible,
88
+ close
89
+ });
90
+ return (_ctx, _cache) => {
91
+ return vue.openBlock(), vue.createBlock(vue.Transition, {
92
+ name: vue.unref(ns).b("fade"),
93
+ onBeforeLeave: _ctx.onClose,
94
+ onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
95
+ duration: vue.unref(forEditor) ? -1 : 0,
96
+ persisted: ""
97
+ }, {
98
+ default: vue.withCtx(() => [
99
+ vue.withDirectives(vue.createElementVNode("div", {
100
+ id: _ctx.id,
101
+ class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
102
+ style: vue.normalizeStyle(vue.unref(positionStyle)),
103
+ role: "alert",
104
+ onMouseenter: clearTimer,
105
+ onMouseleave: startTimer,
106
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
107
+ }, [
108
+ vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
109
+ key: 0,
110
+ class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
111
+ }, {
112
+ default: vue.withCtx(() => [
113
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
114
+ ]),
115
+ _: 1
116
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
117
+ vue.createElementVNode("div", {
118
+ class: vue.normalizeClass(vue.unref(ns).e("group"))
119
+ }, [
120
+ vue.createElementVNode("h2", {
121
+ class: vue.normalizeClass(vue.unref(ns).e("title")),
122
+ textContent: vue.toDisplayString(_ctx.title)
123
+ }, null, 10, _hoisted_2),
124
+ vue.withDirectives(vue.createElementVNode("div", {
125
+ class: vue.normalizeClass(vue.unref(ns).e("content")),
126
+ style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
127
+ }, [
128
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
129
+ !_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
130
+ vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
131
+ vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
132
+ ], 2112))
133
+ ])
134
+ ], 6), [
135
+ [vue.vShow, _ctx.message]
136
+ ]),
137
+ _ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
138
+ key: 0,
139
+ class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
140
+ onClick: vue.withModifiers(close, ["stop"])
141
+ }, {
142
+ default: vue.withCtx(() => [
143
+ vue.createVNode(vue.unref(Close))
144
+ ]),
145
+ _: 1
146
+ }, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
147
+ ], 2)
148
+ ], 46, _hoisted_1), [
149
+ [vue.vShow, visible.value]
150
+ ])
151
+ ]),
152
+ _: 3
153
+ }, 8, ["name", "onBeforeLeave", "duration"]);
154
+ };
72
155
  }
73
156
  });
74
- const notificationEmits = {
75
- destroy: () => true
76
- };
157
+ var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\notification\\src\\notification.vue"]]);
77
158
 
78
- exports.notificationEmits = notificationEmits;
79
- exports.notificationProps = notificationProps;
80
- exports.notificationTypes = notificationTypes;
159
+ exports["default"] = NotificationConstructor;
81
160
  //# sourceMappingURL=notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport const notificationProps = buildProps({\n /**\n * @description custom class name for Notification\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration: {\n type: Number,\n default: 4500,\n },\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description notification dom id\n */\n id: {\n type: String,\n default: '',\n },\n /**\n * @description description text\n */\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n /**\n * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description callback function when notification clicked\n */\n onClick: {\n type: definePropType<() => void>(Function),\n default: () => undefined,\n },\n /**\n * @description callback function when closed\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: true,\n },\n /**\n * @description custom position\n */\n position: {\n type: String,\n values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n default: 'top-right',\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description notification type\n */\n type: {\n type: String,\n values: [...notificationTypes, ''],\n default: '',\n },\n /**\n * @description initial zIndex\n */\n zIndex: {\n type: Number,\n default: 0,\n },\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification>\n\nexport type NotificationOptions = Omit<NotificationProps, 'id'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n | Partial<NotificationOptionsTyped>\n | string\n | VNode\n\nexport type NotifyFn = ((\n options?: NotificationParams\n) => NotificationHandle) & { closeAll: () => void }\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n success: NotifyTypedFn\n warning: NotifyTypedFn\n error: NotifyTypedFn\n info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":["buildProps","iconPropType","definePropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC;AACpE,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,CAAC;AACtC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;;;"}
1
+ {"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n :duration=\"forEditor ? -1 : 0\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else v-html=\"message\" />\n </slot>\n </div>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { CloseComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalComponentSettings, useGlobalConfig } from '../../config-provider'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\n\nconst forEditor = useGlobalConfig('forEditor')\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = defineProps(notificationProps)\ndefineEmits(notificationEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('notification')\nconst { nextZIndex, currentZIndex } = zIndex\n\nconst { Close } = CloseComponents\n\nconst visible = ref(false)\nlet timer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return type && TypeComponentsMap[props.type] ? ns.m(type) : ''\n})\n\nconst iconComponent = computed(() => {\n if (!props.type) return props.icon\n return TypeComponentsMap[props.type] || props.icon\n})\n\nconst horizontalClass = computed(() =>\n props.position.endsWith('right') ? 'right' : 'left'\n)\n\nconst verticalProperty = computed(() =>\n props.position.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst positionStyle = computed<CSSProperties>(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n zIndex: props.zIndex ?? currentZIndex.value,\n }\n})\n\nfunction startTimer() {\n if (props.duration > 0) {\n ;({ stop: timer } = useTimeoutFn(() => {\n if (visible.value) close()\n }, props.duration))\n }\n}\n\nfunction clearTimer() {\n timer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction onKeydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer() // press delete/backspace clear timer\n } else if (code === EVENT_CODE.esc) {\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n } else {\n startTimer() // resume timer\n }\n}\n\n// lifecycle\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nuseEventListener(document, 'keydown', onKeydown)\n\ndefineExpose({\n visible,\n /** @description close notification */\n close,\n})\n</script>\n"],"names":["useGlobalConfig","useGlobalComponentSettings","CloseComponents","ref","computed","TypeComponentsMap","useTimeoutFn","EVENT_CODE","onMounted","useEventListener"],"mappings":"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"}
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  readonly showClose: import("element-pe/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
40
40
  readonly title: import("element-pe/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
41
41
  readonly type: import("element-pe/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "error" | "info", unknown, "", boolean>;
42
- readonly zIndex: import("element-pe/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
42
+ readonly zIndex: NumberConstructor;
43
43
  }, {
44
44
  forEditor: import("vue").Ref<import("element-pe/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined>;
45
45
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
82
82
  readonly showClose: import("element-pe/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
83
83
  readonly title: import("element-pe/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
84
84
  readonly type: import("element-pe/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "error" | "info", unknown, "", boolean>;
85
- readonly zIndex: import("element-pe/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
85
+ readonly zIndex: NumberConstructor;
86
86
  }>> & {
87
87
  onDestroy?: (() => any) | undefined;
88
88
  }>>;
@@ -228,12 +228,11 @@ declare const _default: import("vue").DefineComponent<{
228
228
  readonly showClose: import("element-pe/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
229
229
  readonly title: import("element-pe/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
230
230
  readonly type: import("element-pe/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "error" | "info", unknown, "", boolean>;
231
- readonly zIndex: import("element-pe/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
231
+ readonly zIndex: NumberConstructor;
232
232
  }>> & {
233
233
  onDestroy?: (() => any) | undefined;
234
234
  }, {
235
235
  readonly type: import("element-pe/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "warning" | "error" | "info", unknown>;
236
- readonly zIndex: number;
237
236
  readonly offset: number;
238
237
  readonly position: import("element-pe/es/utils").EpPropMergeType<StringConstructor, "top-right" | "top-left" | "bottom-right" | "bottom-left", unknown>;
239
238
  readonly title: string;
@@ -2,158 +2,77 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var core = require('@vueuse/core');
7
5
  require('../../../utils/index.js');
8
- require('../../../constants/index.js');
9
- var index = require('../../icon/index.js');
10
- require('../../config-provider/index.js');
11
- var notification = require('./notification.js');
12
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
- var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
14
7
  var icon = require('../../../utils/vue/icon.js');
15
- var aria = require('../../../constants/aria.js');
16
8
 
17
- const _hoisted_1 = ["id"];
18
- const _hoisted_2 = ["textContent"];
19
- const _hoisted_3 = { key: 0 };
20
- const _hoisted_4 = ["innerHTML"];
21
- const __default__ = vue.defineComponent({
22
- name: "ElNotification"
9
+ const notificationTypes = [
10
+ "success",
11
+ "info",
12
+ "warning",
13
+ "error"
14
+ ];
15
+ const notificationProps = runtime.buildProps({
16
+ customClass: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ dangerouslyUseHTMLString: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ duration: {
25
+ type: Number,
26
+ default: 4500
27
+ },
28
+ icon: {
29
+ type: icon.iconPropType
30
+ },
31
+ id: {
32
+ type: String,
33
+ default: ""
34
+ },
35
+ message: {
36
+ type: runtime.definePropType([String, Object]),
37
+ default: ""
38
+ },
39
+ offset: {
40
+ type: Number,
41
+ default: 0
42
+ },
43
+ onClick: {
44
+ type: runtime.definePropType(Function),
45
+ default: () => void 0
46
+ },
47
+ onClose: {
48
+ type: runtime.definePropType(Function),
49
+ required: true
50
+ },
51
+ position: {
52
+ type: String,
53
+ values: ["top-right", "top-left", "bottom-right", "bottom-left"],
54
+ default: "top-right"
55
+ },
56
+ showClose: {
57
+ type: Boolean,
58
+ default: true
59
+ },
60
+ title: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ type: {
65
+ type: String,
66
+ values: [...notificationTypes, ""],
67
+ default: ""
68
+ },
69
+ zIndex: Number
23
70
  });
24
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
- ...__default__,
26
- props: notification.notificationProps,
27
- emits: notification.notificationEmits,
28
- setup(__props, { expose }) {
29
- const props = __props;
30
- const forEditor = useGlobalConfig.useGlobalConfig("forEditor");
31
- const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
32
- const { nextZIndex, currentZIndex } = zIndex;
33
- const { Close } = icon.CloseComponents;
34
- const visible = vue.ref(false);
35
- let timer = void 0;
36
- const typeClass = vue.computed(() => {
37
- const type = props.type;
38
- return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
39
- });
40
- const iconComponent = vue.computed(() => {
41
- if (!props.type)
42
- return props.icon;
43
- return icon.TypeComponentsMap[props.type] || props.icon;
44
- });
45
- const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
46
- const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
47
- const positionStyle = vue.computed(() => {
48
- return {
49
- [verticalProperty.value]: `${props.offset}px`,
50
- zIndex: currentZIndex.value
51
- };
52
- });
53
- function startTimer() {
54
- if (props.duration > 0) {
55
- ;
56
- ({ stop: timer } = core.useTimeoutFn(() => {
57
- if (visible.value)
58
- close();
59
- }, props.duration));
60
- }
61
- }
62
- function clearTimer() {
63
- timer == null ? void 0 : timer();
64
- }
65
- function close() {
66
- visible.value = false;
67
- }
68
- function onKeydown({ code }) {
69
- if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
70
- clearTimer();
71
- } else if (code === aria.EVENT_CODE.esc) {
72
- if (visible.value) {
73
- close();
74
- }
75
- } else {
76
- startTimer();
77
- }
78
- }
79
- vue.onMounted(() => {
80
- startTimer();
81
- nextZIndex();
82
- visible.value = true;
83
- });
84
- core.useEventListener(document, "keydown", onKeydown);
85
- expose({
86
- visible,
87
- close
88
- });
89
- return (_ctx, _cache) => {
90
- return vue.openBlock(), vue.createBlock(vue.Transition, {
91
- name: vue.unref(ns).b("fade"),
92
- onBeforeLeave: _ctx.onClose,
93
- onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
94
- duration: vue.unref(forEditor) ? -1 : 0,
95
- persisted: ""
96
- }, {
97
- default: vue.withCtx(() => [
98
- vue.withDirectives(vue.createElementVNode("div", {
99
- id: _ctx.id,
100
- class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
101
- style: vue.normalizeStyle(vue.unref(positionStyle)),
102
- role: "alert",
103
- onMouseenter: clearTimer,
104
- onMouseleave: startTimer,
105
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
106
- }, [
107
- vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
108
- key: 0,
109
- class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
110
- }, {
111
- default: vue.withCtx(() => [
112
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
113
- ]),
114
- _: 1
115
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
116
- vue.createElementVNode("div", {
117
- class: vue.normalizeClass(vue.unref(ns).e("group"))
118
- }, [
119
- vue.createElementVNode("h2", {
120
- class: vue.normalizeClass(vue.unref(ns).e("title")),
121
- textContent: vue.toDisplayString(_ctx.title)
122
- }, null, 10, _hoisted_2),
123
- vue.withDirectives(vue.createElementVNode("div", {
124
- class: vue.normalizeClass(vue.unref(ns).e("content")),
125
- style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
126
- }, [
127
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
128
- !_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
129
- vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
130
- vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
131
- ], 2112))
132
- ])
133
- ], 6), [
134
- [vue.vShow, _ctx.message]
135
- ]),
136
- _ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
137
- key: 0,
138
- class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
139
- onClick: vue.withModifiers(close, ["stop"])
140
- }, {
141
- default: vue.withCtx(() => [
142
- vue.createVNode(vue.unref(Close))
143
- ]),
144
- _: 1
145
- }, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
146
- ], 2)
147
- ], 46, _hoisted_1), [
148
- [vue.vShow, visible.value]
149
- ])
150
- ]),
151
- _: 3
152
- }, 8, ["name", "onBeforeLeave", "duration"]);
153
- };
154
- }
155
- });
156
- var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\notification\\src\\notification.vue"]]);
71
+ const notificationEmits = {
72
+ destroy: () => true
73
+ };
157
74
 
158
- exports["default"] = NotificationConstructor;
75
+ exports.notificationEmits = notificationEmits;
76
+ exports.notificationProps = notificationProps;
77
+ exports.notificationTypes = notificationTypes;
159
78
  //# sourceMappingURL=notification2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification2.js","sources":["../../../../../../packages/components/notification/src/notification.vue"],"sourcesContent":["<template>\n <transition\n :name=\"ns.b('fade')\"\n @before-leave=\"onClose\"\n @after-leave=\"$emit('destroy')\"\n :duration=\"forEditor ? -1 : 0\"\n >\n <div\n v-show=\"visible\"\n :id=\"id\"\n :class=\"[ns.b(), customClass, horizontalClass]\"\n :style=\"positionStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n @click=\"onClick\"\n >\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <div :class=\"ns.e('group')\">\n <h2 :class=\"ns.e('title')\" v-text=\"title\" />\n <div\n v-show=\"message\"\n :class=\"ns.e('content')\"\n :style=\"!!title ? undefined : { margin: 0 }\"\n >\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else v-html=\"message\" />\n </slot>\n </div>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { CloseComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalComponentSettings, useGlobalConfig } from '../../config-provider'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\n\nconst forEditor = useGlobalConfig('forEditor')\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = defineProps(notificationProps)\ndefineEmits(notificationEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('notification')\nconst { nextZIndex, currentZIndex } = zIndex\n\nconst { Close } = CloseComponents\n\nconst visible = ref(false)\nlet timer: (() => void) | undefined = undefined\n\nconst typeClass = computed(() => {\n const type = props.type\n return type && TypeComponentsMap[props.type] ? ns.m(type) : ''\n})\n\nconst iconComponent = computed(() => {\n if (!props.type) return props.icon\n return TypeComponentsMap[props.type] || props.icon\n})\n\nconst horizontalClass = computed(() =>\n props.position.endsWith('right') ? 'right' : 'left'\n)\n\nconst verticalProperty = computed(() =>\n props.position.startsWith('top') ? 'top' : 'bottom'\n)\n\nconst positionStyle = computed<CSSProperties>(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n zIndex: currentZIndex.value,\n }\n})\n\nfunction startTimer() {\n if (props.duration > 0) {\n ;({ stop: timer } = useTimeoutFn(() => {\n if (visible.value) close()\n }, props.duration))\n }\n}\n\nfunction clearTimer() {\n timer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction onKeydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer() // press delete/backspace clear timer\n } else if (code === EVENT_CODE.esc) {\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n } else {\n startTimer() // resume timer\n }\n}\n\n// lifecycle\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nuseEventListener(document, 'keydown', onKeydown)\n\ndefineExpose({\n visible,\n /** @description close notification */\n close,\n})\n</script>\n"],"names":["useGlobalConfig","useGlobalComponentSettings","CloseComponents","ref","computed","TypeComponentsMap","useTimeoutFn","EVENT_CODE","onMounted","useEventListener"],"mappings":"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"}
1
+ {"version":3,"file":"notification2.js","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport const notificationProps = buildProps({\n /**\n * @description custom class name for Notification\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration: {\n type: Number,\n default: 4500,\n },\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description notification dom id\n */\n id: {\n type: String,\n default: '',\n },\n /**\n * @description description text\n */\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n /**\n * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description callback function when notification clicked\n */\n onClick: {\n type: definePropType<() => void>(Function),\n default: () => undefined,\n },\n /**\n * @description callback function when closed\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: true,\n },\n /**\n * @description custom position\n */\n position: {\n type: String,\n values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n default: 'top-right',\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description notification type\n */\n type: {\n type: String,\n values: [...notificationTypes, ''],\n default: '',\n },\n /**\n * @description initial zIndex\n */\n zIndex: Number,\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification>\n\nexport type NotificationOptions = Omit<NotificationProps, 'id'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n | Partial<NotificationOptionsTyped>\n | string\n | VNode\n\nexport type NotifyFn = ((\n options?: NotificationParams\n) => NotificationHandle) & { closeAll: () => void }\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n success: NotifyTypedFn\n warning: NotifyTypedFn\n error: NotifyTypedFn\n info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":["buildProps","iconPropType","definePropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC;AACpE,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,GAAG,iBAAiB,EAAE,EAAE,CAAC;AACtC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;;;"}
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  require('../../../utils/index.js');
7
- var notification = require('./notification2.js');
8
- var notification$1 = require('./notification.js');
7
+ var notification = require('./notification.js');
8
+ var notification$1 = require('./notification2.js');
9
9
  var core = require('@vueuse/core');
10
10
  var types = require('../../../utils/types.js');
11
11
  var shared = require('@vue/shared');