element-pe 2.2.43 → 2.2.44

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 (574) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +40 -14
  3. package/dist/index.full.min.js +21 -21
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +20 -20
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +40 -14
  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/autocomplete.mjs +1 -1
  14. package/es/components/badge/index.mjs +2 -2
  15. package/es/components/badge/src/badge.mjs +17 -59
  16. package/es/components/badge/src/badge.mjs.map +1 -1
  17. package/es/components/badge/src/badge2.mjs +59 -17
  18. package/es/components/badge/src/badge2.mjs.map +1 -1
  19. package/es/components/breadcrumb/index.mjs +2 -2
  20. package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -56
  21. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  22. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -11
  23. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  24. package/es/components/button/index.mjs +3 -3
  25. package/es/components/button/src/button-group.mjs +6 -30
  26. package/es/components/button/src/button-group.mjs.map +1 -1
  27. package/es/components/button/src/button-group2.mjs +30 -6
  28. package/es/components/button/src/button-group2.mjs.map +1 -1
  29. package/es/components/button/src/button.mjs +76 -57
  30. package/es/components/button/src/button.mjs.map +1 -1
  31. package/es/components/button/src/button2.mjs +57 -76
  32. package/es/components/button/src/button2.mjs.map +1 -1
  33. package/es/components/calendar/index.mjs +2 -2
  34. package/es/components/calendar/src/calendar.mjs +131 -18
  35. package/es/components/calendar/src/calendar.mjs.map +1 -1
  36. package/es/components/calendar/src/calendar2.mjs +18 -131
  37. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  38. package/es/components/cascader/index.d.ts +2 -0
  39. package/es/components/cascader/src/cascader.vue.d.ts +1 -0
  40. package/es/components/cascader/src/cascader2.mjs +2 -2
  41. package/es/components/check-tag/index.mjs +2 -2
  42. package/es/components/check-tag/src/check-tag.mjs +30 -12
  43. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  44. package/es/components/check-tag/src/check-tag2.mjs +12 -30
  45. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  46. package/es/components/checkbox/index.mjs +4 -4
  47. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  48. package/es/components/checkbox/src/checkbox-group.mjs +72 -28
  49. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  50. package/es/components/checkbox/src/checkbox-group2.mjs +28 -72
  51. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  52. package/es/components/checkbox/src/checkbox.mjs +117 -49
  53. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  54. package/es/components/checkbox/src/checkbox2.mjs +49 -117
  55. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  56. package/es/components/col/index.mjs +2 -2
  57. package/es/components/col/src/col.mjs +43 -66
  58. package/es/components/col/src/col.mjs.map +1 -1
  59. package/es/components/col/src/col2.mjs +66 -43
  60. package/es/components/col/src/col2.mjs.map +1 -1
  61. package/es/components/collapse/index.mjs +4 -4
  62. package/es/components/collapse/src/collapse-item.mjs +96 -14
  63. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  64. package/es/components/collapse/src/collapse-item2.mjs +14 -96
  65. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  66. package/es/components/collapse/src/collapse.mjs +30 -17
  67. package/es/components/collapse/src/collapse.mjs.map +1 -1
  68. package/es/components/collapse/src/collapse2.mjs +17 -30
  69. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  70. package/es/components/collection/index.mjs +1 -1
  71. package/es/components/collection/src/collection.mjs +10 -62
  72. package/es/components/collection/src/collection.mjs.map +1 -1
  73. package/es/components/collection/src/collection2.mjs +62 -10
  74. package/es/components/collection/src/collection2.mjs.map +1 -1
  75. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
  76. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
  77. package/es/components/date-picker/src/panel-utils.d.ts +2 -0
  78. package/es/components/dialog/src/dialog-content.mjs +39 -94
  79. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  80. package/es/components/dialog/src/dialog-content2.mjs +94 -39
  81. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  82. package/es/components/dialog/src/dialog.mjs +1 -1
  83. package/es/components/dialog/src/dialog2.mjs +1 -1
  84. package/es/components/divider/index.mjs +2 -2
  85. package/es/components/divider/src/divider.mjs +35 -17
  86. package/es/components/divider/src/divider.mjs.map +1 -1
  87. package/es/components/divider/src/divider2.mjs +17 -35
  88. package/es/components/divider/src/divider2.mjs.map +1 -1
  89. package/es/components/drawer/index.d.ts +1 -0
  90. package/es/components/drawer/index.mjs +2 -2
  91. package/es/components/drawer/src/drawer.mjs +25 -181
  92. package/es/components/drawer/src/drawer.mjs.map +1 -1
  93. package/es/components/drawer/src/drawer.vue.d.ts +1 -0
  94. package/es/components/drawer/src/drawer2.mjs +186 -25
  95. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  96. package/es/components/dropdown/index.mjs +2 -2
  97. package/es/components/dropdown/src/dropdown-item-impl.mjs +3 -3
  98. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  99. package/es/components/dropdown/src/dropdown-menu.mjs +2 -2
  100. package/es/components/dropdown/src/dropdown.mjs +310 -105
  101. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  102. package/es/components/dropdown/src/dropdown2.mjs +105 -310
  103. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  104. package/es/components/form/index.d.ts +2 -0
  105. package/es/components/form/index.mjs +2 -2
  106. package/es/components/form/src/form-item.mjs +4 -1
  107. package/es/components/form/src/form-item.mjs.map +1 -1
  108. package/es/components/form/src/form-item.vue.d.ts +1 -0
  109. package/es/components/form/src/form.mjs +150 -57
  110. package/es/components/form/src/form.mjs.map +1 -1
  111. package/es/components/form/src/form2.mjs +57 -150
  112. package/es/components/form/src/form2.mjs.map +1 -1
  113. package/es/components/icon/index.mjs +2 -2
  114. package/es/components/icon/src/icon.mjs +8 -36
  115. package/es/components/icon/src/icon.mjs.map +1 -1
  116. package/es/components/icon/src/icon2.mjs +36 -8
  117. package/es/components/icon/src/icon2.mjs.map +1 -1
  118. package/es/components/index.mjs +37 -37
  119. package/es/components/input-number/index.mjs +2 -2
  120. package/es/components/input-number/src/input-number.mjs +315 -58
  121. package/es/components/input-number/src/input-number.mjs.map +1 -1
  122. package/es/components/input-number/src/input-number2.mjs +58 -315
  123. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  124. package/es/components/link/index.mjs +2 -2
  125. package/es/components/link/src/link.mjs +21 -50
  126. package/es/components/link/src/link.mjs.map +1 -1
  127. package/es/components/link/src/link2.mjs +50 -21
  128. package/es/components/link/src/link2.mjs.map +1 -1
  129. package/es/components/message/index.mjs +1 -1
  130. package/es/components/message/src/message.mjs +86 -149
  131. package/es/components/message/src/message.mjs.map +1 -1
  132. package/es/components/message/src/message.vue.d.ts +1 -0
  133. package/es/components/message/src/message2.mjs +151 -86
  134. package/es/components/message/src/message2.mjs.map +1 -1
  135. package/es/components/message/src/method.mjs +2 -2
  136. package/es/components/notification/index.mjs +1 -1
  137. package/es/components/notification/src/notification.mjs +149 -69
  138. package/es/components/notification/src/notification.mjs.map +1 -1
  139. package/es/components/notification/src/notification.vue.d.ts +1 -0
  140. package/es/components/notification/src/notification2.mjs +69 -147
  141. package/es/components/notification/src/notification2.mjs.map +1 -1
  142. package/es/components/notification/src/notify.mjs +2 -2
  143. package/es/components/page-header/index.mjs +2 -2
  144. package/es/components/page-header/src/page-header.mjs +17 -103
  145. package/es/components/page-header/src/page-header.mjs.map +1 -1
  146. package/es/components/page-header/src/page-header2.mjs +103 -17
  147. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  148. package/es/components/pagination/src/components/next.mjs +19 -38
  149. package/es/components/pagination/src/components/next.mjs.map +1 -1
  150. package/es/components/pagination/src/components/next2.mjs +38 -19
  151. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  152. package/es/components/pagination/src/components/pager.mjs +17 -216
  153. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  154. package/es/components/pagination/src/components/pager2.mjs +216 -17
  155. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  156. package/es/components/pagination/src/components/sizes.vue.d.ts +1 -0
  157. package/es/components/pagination/src/components/total.mjs +28 -7
  158. package/es/components/pagination/src/components/total.mjs.map +1 -1
  159. package/es/components/pagination/src/components/total2.mjs +7 -28
  160. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  161. package/es/components/pagination/src/pagination.mjs +3 -3
  162. package/es/components/popconfirm/src/popconfirm2.mjs +2 -2
  163. package/es/components/popover/src/popover.mjs +2 -2
  164. package/es/components/popper/index.mjs +2 -2
  165. package/es/components/popper/src/popper.mjs +32 -25
  166. package/es/components/popper/src/popper.mjs.map +1 -1
  167. package/es/components/popper/src/popper2.mjs +25 -32
  168. package/es/components/popper/src/popper2.mjs.map +1 -1
  169. package/es/components/progress/index.mjs +2 -2
  170. package/es/components/progress/src/progress.mjs +204 -59
  171. package/es/components/progress/src/progress.mjs.map +1 -1
  172. package/es/components/progress/src/progress2.mjs +59 -204
  173. package/es/components/progress/src/progress2.mjs.map +1 -1
  174. package/es/components/radio/index.mjs +4 -4
  175. package/es/components/radio/src/radio-button.mjs +1 -1
  176. package/es/components/radio/src/radio-group.mjs +70 -36
  177. package/es/components/radio/src/radio-group.mjs.map +1 -1
  178. package/es/components/radio/src/radio-group2.mjs +36 -70
  179. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  180. package/es/components/radio/src/radio.mjs +71 -30
  181. package/es/components/radio/src/radio.mjs.map +1 -1
  182. package/es/components/radio/src/radio2.mjs +30 -71
  183. package/es/components/radio/src/radio2.mjs.map +1 -1
  184. package/es/components/rate/index.mjs +2 -2
  185. package/es/components/rate/src/rate.mjs +257 -87
  186. package/es/components/rate/src/rate.mjs.map +1 -1
  187. package/es/components/rate/src/rate2.mjs +87 -257
  188. package/es/components/rate/src/rate2.mjs.map +1 -1
  189. package/es/components/roving-focus-group/index.mjs +3 -3
  190. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  191. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  192. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  193. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  194. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  195. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  196. package/es/components/scrollbar/index.mjs +1 -1
  197. package/es/components/scrollbar/src/bar.mjs +1 -1
  198. package/es/components/scrollbar/src/thumb.mjs +11 -134
  199. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  200. package/es/components/scrollbar/src/thumb2.mjs +134 -11
  201. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  202. package/es/components/select/index.d.ts +1 -0
  203. package/es/components/select/src/select.mjs +11 -5
  204. package/es/components/select/src/select.mjs.map +1 -1
  205. package/es/components/select/src/select.vue.d.ts +1 -0
  206. package/es/components/select-v2/src/defaults.mjs +1 -1
  207. package/es/components/statistic/index.mjs +2 -2
  208. package/es/components/statistic/src/statistic.mjs +25 -70
  209. package/es/components/statistic/src/statistic.mjs.map +1 -1
  210. package/es/components/statistic/src/statistic2.mjs +70 -25
  211. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  212. package/es/components/steps/index.mjs +4 -4
  213. package/es/components/steps/src/item.mjs +19 -190
  214. package/es/components/steps/src/item.mjs.map +1 -1
  215. package/es/components/steps/src/item2.mjs +190 -19
  216. package/es/components/steps/src/item2.mjs.map +1 -1
  217. package/es/components/steps/src/steps.mjs +36 -34
  218. package/es/components/steps/src/steps.mjs.map +1 -1
  219. package/es/components/steps/src/steps2.mjs +34 -36
  220. package/es/components/steps/src/steps2.mjs.map +1 -1
  221. package/es/components/switch/index.mjs +2 -2
  222. package/es/components/switch/src/switch.mjs +88 -243
  223. package/es/components/switch/src/switch.mjs.map +1 -1
  224. package/es/components/switch/src/switch2.mjs +243 -88
  225. package/es/components/switch/src/switch2.mjs.map +1 -1
  226. package/es/components/table/src/store/helper.mjs +7 -1
  227. package/es/components/table/src/store/helper.mjs.map +1 -1
  228. package/es/components/tag/index.d.ts +1 -0
  229. package/es/components/tag/index.mjs +2 -2
  230. package/es/components/tag/src/tag.mjs +98 -33
  231. package/es/components/tag/src/tag.mjs.map +1 -1
  232. package/es/components/tag/src/tag.vue.d.ts +1 -0
  233. package/es/components/tag/src/tag2.mjs +33 -94
  234. package/es/components/tag/src/tag2.mjs.map +1 -1
  235. package/es/components/text/index.mjs +2 -2
  236. package/es/components/text/src/text.mjs +22 -35
  237. package/es/components/text/src/text.mjs.map +1 -1
  238. package/es/components/text/src/text2.mjs +35 -22
  239. package/es/components/text/src/text2.mjs.map +1 -1
  240. package/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs +8 -2
  241. package/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs.map +1 -1
  242. package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
  243. package/es/components/time-select/index.d.ts +4 -0
  244. package/es/components/time-select/src/time-select.vue.d.ts +2 -0
  245. package/es/components/timeline/index.mjs +2 -2
  246. package/es/components/timeline/src/timeline-item.mjs +42 -70
  247. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  248. package/es/components/timeline/src/timeline-item2.mjs +70 -42
  249. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  250. package/es/components/tooltip/index.mjs +3 -3
  251. package/es/components/tooltip/src/content.mjs +179 -31
  252. package/es/components/tooltip/src/content.mjs.map +1 -1
  253. package/es/components/tooltip/src/content2.mjs +31 -179
  254. package/es/components/tooltip/src/content2.mjs.map +1 -1
  255. package/es/components/tooltip/src/tooltip.mjs +174 -31
  256. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  257. package/es/components/tooltip/src/tooltip2.mjs +31 -174
  258. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  259. package/es/components/tooltip-v2/index.mjs +1 -1
  260. package/es/components/tooltip-v2/src/content.mjs +50 -114
  261. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  262. package/es/components/tooltip-v2/src/content2.mjs +114 -50
  263. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  264. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  265. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  266. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  267. package/es/components/transfer/src/transfer-panel.mjs +128 -19
  268. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  269. package/es/components/transfer/src/transfer-panel2.mjs +19 -128
  270. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  271. package/es/components/transfer/src/transfer.mjs +1 -1
  272. package/es/components/upload/index.d.ts +1 -0
  273. package/es/components/upload/index.mjs +1 -1
  274. package/es/components/upload/src/upload-content2.mjs +1 -1
  275. package/es/components/upload/src/upload-dragger.mjs +72 -11
  276. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  277. package/es/components/upload/src/upload-dragger2.mjs +11 -72
  278. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  279. package/es/components/upload/src/upload-list.mjs +6 -2
  280. package/es/components/upload/src/upload-list.mjs.map +1 -1
  281. package/es/components/upload/src/upload-list.vue.d.ts +1 -0
  282. package/es/components/upload/src/upload.vue.d.ts +1 -0
  283. package/es/components/visual-hidden/index.mjs +3 -3
  284. package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
  285. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  286. package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
  287. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  288. package/es/index.mjs +37 -37
  289. package/lib/components/alert/index.js +2 -2
  290. package/lib/components/alert/src/alert.js +102 -39
  291. package/lib/components/alert/src/alert.js.map +1 -1
  292. package/lib/components/alert/src/alert2.js +39 -102
  293. package/lib/components/alert/src/alert2.js.map +1 -1
  294. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  295. package/lib/components/badge/index.js +2 -2
  296. package/lib/components/badge/src/badge.js +17 -59
  297. package/lib/components/badge/src/badge.js.map +1 -1
  298. package/lib/components/badge/src/badge2.js +59 -17
  299. package/lib/components/badge/src/badge2.js.map +1 -1
  300. package/lib/components/breadcrumb/index.js +2 -2
  301. package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -56
  302. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  303. package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -11
  304. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  305. package/lib/components/button/index.js +3 -3
  306. package/lib/components/button/src/button-group.js +6 -30
  307. package/lib/components/button/src/button-group.js.map +1 -1
  308. package/lib/components/button/src/button-group2.js +30 -6
  309. package/lib/components/button/src/button-group2.js.map +1 -1
  310. package/lib/components/button/src/button.js +76 -60
  311. package/lib/components/button/src/button.js.map +1 -1
  312. package/lib/components/button/src/button2.js +60 -76
  313. package/lib/components/button/src/button2.js.map +1 -1
  314. package/lib/components/calendar/index.js +2 -2
  315. package/lib/components/calendar/src/calendar.js +131 -19
  316. package/lib/components/calendar/src/calendar.js.map +1 -1
  317. package/lib/components/calendar/src/calendar2.js +19 -131
  318. package/lib/components/calendar/src/calendar2.js.map +1 -1
  319. package/lib/components/cascader/index.d.ts +2 -0
  320. package/lib/components/cascader/src/cascader.vue.d.ts +1 -0
  321. package/lib/components/cascader/src/cascader2.js +2 -2
  322. package/lib/components/check-tag/index.js +2 -2
  323. package/lib/components/check-tag/src/check-tag.js +30 -13
  324. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  325. package/lib/components/check-tag/src/check-tag2.js +13 -30
  326. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  327. package/lib/components/checkbox/index.js +4 -4
  328. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  329. package/lib/components/checkbox/src/checkbox-group.js +72 -29
  330. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  331. package/lib/components/checkbox/src/checkbox-group2.js +29 -72
  332. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  333. package/lib/components/checkbox/src/checkbox.js +117 -50
  334. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  335. package/lib/components/checkbox/src/checkbox2.js +50 -117
  336. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  337. package/lib/components/col/index.js +2 -2
  338. package/lib/components/col/src/col.js +43 -66
  339. package/lib/components/col/src/col.js.map +1 -1
  340. package/lib/components/col/src/col2.js +66 -43
  341. package/lib/components/col/src/col2.js.map +1 -1
  342. package/lib/components/collapse/index.js +4 -4
  343. package/lib/components/collapse/src/collapse-item.js +96 -14
  344. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  345. package/lib/components/collapse/src/collapse-item2.js +14 -96
  346. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  347. package/lib/components/collapse/src/collapse.js +30 -19
  348. package/lib/components/collapse/src/collapse.js.map +1 -1
  349. package/lib/components/collapse/src/collapse2.js +19 -30
  350. package/lib/components/collapse/src/collapse2.js.map +1 -1
  351. package/lib/components/collection/index.js +1 -1
  352. package/lib/components/collection/src/collection.js +9 -62
  353. package/lib/components/collection/src/collection.js.map +1 -1
  354. package/lib/components/collection/src/collection2.js +62 -9
  355. package/lib/components/collection/src/collection2.js.map +1 -1
  356. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -0
  357. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -0
  358. package/lib/components/date-picker/src/panel-utils.d.ts +2 -0
  359. package/lib/components/dialog/src/dialog-content.js +39 -93
  360. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  361. package/lib/components/dialog/src/dialog-content2.js +93 -39
  362. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  363. package/lib/components/dialog/src/dialog.js +1 -1
  364. package/lib/components/dialog/src/dialog2.js +1 -1
  365. package/lib/components/divider/index.js +2 -2
  366. package/lib/components/divider/src/divider.js +35 -17
  367. package/lib/components/divider/src/divider.js.map +1 -1
  368. package/lib/components/divider/src/divider2.js +17 -35
  369. package/lib/components/divider/src/divider2.js.map +1 -1
  370. package/lib/components/drawer/index.d.ts +1 -0
  371. package/lib/components/drawer/index.js +2 -2
  372. package/lib/components/drawer/src/drawer.js +26 -181
  373. package/lib/components/drawer/src/drawer.js.map +1 -1
  374. package/lib/components/drawer/src/drawer.vue.d.ts +1 -0
  375. package/lib/components/drawer/src/drawer2.js +186 -26
  376. package/lib/components/drawer/src/drawer2.js.map +1 -1
  377. package/lib/components/dropdown/index.js +2 -2
  378. package/lib/components/dropdown/src/dropdown-item-impl.js +3 -3
  379. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  380. package/lib/components/dropdown/src/dropdown-menu.js +2 -2
  381. package/lib/components/dropdown/src/dropdown.js +310 -114
  382. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  383. package/lib/components/dropdown/src/dropdown2.js +114 -310
  384. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  385. package/lib/components/form/index.d.ts +2 -0
  386. package/lib/components/form/index.js +2 -2
  387. package/lib/components/form/src/form-item.js +4 -1
  388. package/lib/components/form/src/form-item.js.map +1 -1
  389. package/lib/components/form/src/form-item.vue.d.ts +1 -0
  390. package/lib/components/form/src/form.js +149 -57
  391. package/lib/components/form/src/form.js.map +1 -1
  392. package/lib/components/form/src/form2.js +57 -149
  393. package/lib/components/form/src/form2.js.map +1 -1
  394. package/lib/components/icon/index.js +2 -2
  395. package/lib/components/icon/src/icon.js +8 -36
  396. package/lib/components/icon/src/icon.js.map +1 -1
  397. package/lib/components/icon/src/icon2.js +36 -8
  398. package/lib/components/icon/src/icon2.js.map +1 -1
  399. package/lib/components/index.js +37 -37
  400. package/lib/components/input-number/index.js +2 -2
  401. package/lib/components/input-number/src/input-number.js +313 -57
  402. package/lib/components/input-number/src/input-number.js.map +1 -1
  403. package/lib/components/input-number/src/input-number2.js +57 -313
  404. package/lib/components/input-number/src/input-number2.js.map +1 -1
  405. package/lib/components/link/index.js +2 -2
  406. package/lib/components/link/src/link.js +22 -50
  407. package/lib/components/link/src/link.js.map +1 -1
  408. package/lib/components/link/src/link2.js +50 -22
  409. package/lib/components/link/src/link2.js.map +1 -1
  410. package/lib/components/message/index.js +1 -1
  411. package/lib/components/message/src/message.js +88 -148
  412. package/lib/components/message/src/message.js.map +1 -1
  413. package/lib/components/message/src/message.vue.d.ts +1 -0
  414. package/lib/components/message/src/message2.js +150 -88
  415. package/lib/components/message/src/message2.js.map +1 -1
  416. package/lib/components/message/src/method.js +2 -2
  417. package/lib/components/notification/index.js +1 -1
  418. package/lib/components/notification/src/notification.js +148 -70
  419. package/lib/components/notification/src/notification.js.map +1 -1
  420. package/lib/components/notification/src/notification.vue.d.ts +1 -0
  421. package/lib/components/notification/src/notification2.js +70 -146
  422. package/lib/components/notification/src/notification2.js.map +1 -1
  423. package/lib/components/notification/src/notify.js +2 -2
  424. package/lib/components/page-header/index.js +2 -2
  425. package/lib/components/page-header/src/page-header.js +18 -103
  426. package/lib/components/page-header/src/page-header.js.map +1 -1
  427. package/lib/components/page-header/src/page-header2.js +103 -18
  428. package/lib/components/page-header/src/page-header2.js.map +1 -1
  429. package/lib/components/pagination/src/components/next.js +19 -38
  430. package/lib/components/pagination/src/components/next.js.map +1 -1
  431. package/lib/components/pagination/src/components/next2.js +38 -19
  432. package/lib/components/pagination/src/components/next2.js.map +1 -1
  433. package/lib/components/pagination/src/components/pager.js +17 -216
  434. package/lib/components/pagination/src/components/pager.js.map +1 -1
  435. package/lib/components/pagination/src/components/pager2.js +216 -17
  436. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  437. package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -0
  438. package/lib/components/pagination/src/components/total.js +28 -7
  439. package/lib/components/pagination/src/components/total.js.map +1 -1
  440. package/lib/components/pagination/src/components/total2.js +7 -28
  441. package/lib/components/pagination/src/components/total2.js.map +1 -1
  442. package/lib/components/pagination/src/pagination.js +3 -3
  443. package/lib/components/popconfirm/src/popconfirm2.js +2 -2
  444. package/lib/components/popover/src/popover.js +2 -2
  445. package/lib/components/popper/index.js +2 -2
  446. package/lib/components/popper/src/popper.js +32 -28
  447. package/lib/components/popper/src/popper.js.map +1 -1
  448. package/lib/components/popper/src/popper2.js +28 -32
  449. package/lib/components/popper/src/popper2.js.map +1 -1
  450. package/lib/components/progress/index.js +2 -2
  451. package/lib/components/progress/src/progress.js +204 -59
  452. package/lib/components/progress/src/progress.js.map +1 -1
  453. package/lib/components/progress/src/progress2.js +59 -204
  454. package/lib/components/progress/src/progress2.js.map +1 -1
  455. package/lib/components/radio/index.js +4 -4
  456. package/lib/components/radio/src/radio-button.js +1 -1
  457. package/lib/components/radio/src/radio-group.js +70 -37
  458. package/lib/components/radio/src/radio-group.js.map +1 -1
  459. package/lib/components/radio/src/radio-group2.js +37 -70
  460. package/lib/components/radio/src/radio-group2.js.map +1 -1
  461. package/lib/components/radio/src/radio.js +71 -32
  462. package/lib/components/radio/src/radio.js.map +1 -1
  463. package/lib/components/radio/src/radio2.js +32 -71
  464. package/lib/components/radio/src/radio2.js.map +1 -1
  465. package/lib/components/rate/index.js +2 -2
  466. package/lib/components/rate/src/rate.js +256 -87
  467. package/lib/components/rate/src/rate.js.map +1 -1
  468. package/lib/components/rate/src/rate2.js +87 -256
  469. package/lib/components/rate/src/rate2.js.map +1 -1
  470. package/lib/components/roving-focus-group/index.js +2 -2
  471. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  472. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  473. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  474. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  475. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  476. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  477. package/lib/components/scrollbar/index.js +1 -1
  478. package/lib/components/scrollbar/src/bar.js +1 -1
  479. package/lib/components/scrollbar/src/thumb.js +11 -134
  480. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  481. package/lib/components/scrollbar/src/thumb2.js +134 -11
  482. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  483. package/lib/components/select/index.d.ts +1 -0
  484. package/lib/components/select/src/select.js +11 -5
  485. package/lib/components/select/src/select.js.map +1 -1
  486. package/lib/components/select/src/select.vue.d.ts +1 -0
  487. package/lib/components/select-v2/src/defaults.js +1 -1
  488. package/lib/components/statistic/index.js +2 -2
  489. package/lib/components/statistic/src/statistic.js +25 -70
  490. package/lib/components/statistic/src/statistic.js.map +1 -1
  491. package/lib/components/statistic/src/statistic2.js +70 -25
  492. package/lib/components/statistic/src/statistic2.js.map +1 -1
  493. package/lib/components/steps/index.js +4 -4
  494. package/lib/components/steps/src/item.js +19 -190
  495. package/lib/components/steps/src/item.js.map +1 -1
  496. package/lib/components/steps/src/item2.js +190 -19
  497. package/lib/components/steps/src/item2.js.map +1 -1
  498. package/lib/components/steps/src/steps.js +37 -34
  499. package/lib/components/steps/src/steps.js.map +1 -1
  500. package/lib/components/steps/src/steps2.js +34 -37
  501. package/lib/components/steps/src/steps2.js.map +1 -1
  502. package/lib/components/switch/index.js +2 -2
  503. package/lib/components/switch/src/switch.js +88 -242
  504. package/lib/components/switch/src/switch.js.map +1 -1
  505. package/lib/components/switch/src/switch2.js +242 -88
  506. package/lib/components/switch/src/switch2.js.map +1 -1
  507. package/lib/components/table/src/store/helper.js +7 -1
  508. package/lib/components/table/src/store/helper.js.map +1 -1
  509. package/lib/components/tag/index.d.ts +1 -0
  510. package/lib/components/tag/index.js +2 -2
  511. package/lib/components/tag/src/tag.js +98 -34
  512. package/lib/components/tag/src/tag.js.map +1 -1
  513. package/lib/components/tag/src/tag.vue.d.ts +1 -0
  514. package/lib/components/tag/src/tag2.js +34 -94
  515. package/lib/components/tag/src/tag2.js.map +1 -1
  516. package/lib/components/text/index.js +2 -2
  517. package/lib/components/text/src/text.js +22 -35
  518. package/lib/components/text/src/text.js.map +1 -1
  519. package/lib/components/text/src/text2.js +35 -22
  520. package/lib/components/text/src/text2.js.map +1 -1
  521. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.js +8 -2
  522. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.js.map +1 -1
  523. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +1 -0
  524. package/lib/components/time-select/index.d.ts +4 -0
  525. package/lib/components/time-select/src/time-select.vue.d.ts +2 -0
  526. package/lib/components/timeline/index.js +2 -2
  527. package/lib/components/timeline/src/timeline-item.js +42 -70
  528. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  529. package/lib/components/timeline/src/timeline-item2.js +70 -42
  530. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  531. package/lib/components/tooltip/index.js +3 -3
  532. package/lib/components/tooltip/src/content.js +179 -31
  533. package/lib/components/tooltip/src/content.js.map +1 -1
  534. package/lib/components/tooltip/src/content2.js +31 -179
  535. package/lib/components/tooltip/src/content2.js.map +1 -1
  536. package/lib/components/tooltip/src/tooltip.js +173 -34
  537. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  538. package/lib/components/tooltip/src/tooltip2.js +34 -173
  539. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  540. package/lib/components/tooltip-v2/index.js +1 -1
  541. package/lib/components/tooltip-v2/src/content.js +50 -114
  542. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  543. package/lib/components/tooltip-v2/src/content2.js +114 -50
  544. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  545. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  546. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  547. package/lib/components/transfer/src/composables/use-check.js +1 -1
  548. package/lib/components/transfer/src/transfer-panel.js +128 -21
  549. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  550. package/lib/components/transfer/src/transfer-panel2.js +21 -128
  551. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  552. package/lib/components/transfer/src/transfer.js +1 -1
  553. package/lib/components/upload/index.d.ts +1 -0
  554. package/lib/components/upload/index.js +1 -1
  555. package/lib/components/upload/src/upload-content2.js +1 -1
  556. package/lib/components/upload/src/upload-dragger.js +72 -12
  557. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  558. package/lib/components/upload/src/upload-dragger2.js +12 -72
  559. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  560. package/lib/components/upload/src/upload-list.js +6 -2
  561. package/lib/components/upload/src/upload-list.js.map +1 -1
  562. package/lib/components/upload/src/upload-list.vue.d.ts +1 -0
  563. package/lib/components/upload/src/upload.vue.d.ts +1 -0
  564. package/lib/components/visual-hidden/index.js +2 -2
  565. package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
  566. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  567. package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
  568. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  569. package/lib/index.js +37 -37
  570. package/package.json +1 -1
  571. package/theme-chalk/el-text.css +1 -1
  572. package/theme-chalk/index.css +1 -1
  573. package/theme-chalk/src/text.scss +1 -1
  574. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"message2.js","sources":["../../../../../../packages/components/message/src/message.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isClient,\n mutable,\n} from '@element-plus/utils'\nimport type { AppContext, ExtractPropTypes, VNode } from 'vue'\nimport type { Mutable } from '@element-plus/utils'\nimport type MessageConstructor from './message.vue'\n\nexport const messageTypes = ['success', 'info', 'warning', 'error'] as const\n\nexport type messageType = typeof messageTypes[number]\n\nexport interface MessageConfigContext {\n max?: number\n}\n\nexport const messageDefaults = mutable({\n customClass: '',\n center: false,\n dangerouslyUseHTMLString: false,\n duration: 3000,\n icon: undefined,\n id: '',\n message: '',\n onClose: undefined,\n showClose: false,\n type: 'info',\n offset: 16,\n zIndex: 0,\n grouping: false,\n repeatNum: 1,\n appendTo: isClient ? document.body : (undefined as never),\n} as const)\n\nexport const messageProps = buildProps({\n /**\n * @description custom class name for Message\n */\n customClass: {\n type: String,\n default: messageDefaults.customClass,\n },\n /**\n * @description whether to center the text\n */\n center: {\n type: Boolean,\n default: messageDefaults.center,\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: messageDefaults.dangerouslyUseHTMLString,\n },\n /**\n * @description display duration, millisecond. If set to 0, it will not turn off automatically\n */\n duration: {\n type: Number,\n default: messageDefaults.duration,\n },\n /**\n * @description custom icon component, overrides `type`\n */\n icon: {\n type: iconPropType,\n default: messageDefaults.icon,\n },\n /**\n * @description message dom id\n */\n id: {\n type: String,\n default: messageDefaults.id,\n },\n /**\n * @description message text\n */\n message: {\n type: definePropType<string | VNode | (() => VNode)>([\n String,\n Object,\n Function,\n ]),\n default: messageDefaults.message,\n },\n /**\n * @description callback function when closed with the message instance as the parameter\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: false,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: messageDefaults.showClose,\n },\n /**\n * @description message type\n */\n type: {\n type: String,\n values: messageTypes,\n default: messageDefaults.type,\n },\n /**\n * @description set the distance to the top of viewport\n */\n offset: {\n type: Number,\n default: messageDefaults.offset,\n },\n /**\n * @description input box size\n */\n zIndex: {\n type: Number,\n default: messageDefaults.zIndex,\n },\n /**\n * @description merge messages with the same content, type of VNode message is not supported\n */\n grouping: {\n type: Boolean,\n default: messageDefaults.grouping,\n },\n /**\n * @description The number of repetitions, similar to badge, is used as the initial number when used with `grouping`\n */\n repeatNum: {\n type: Number,\n default: messageDefaults.repeatNum,\n },\n} as const)\nexport type MessageProps = ExtractPropTypes<typeof messageProps>\n\nexport const messageEmits = {\n destroy: () => true,\n}\nexport type MessageEmits = typeof messageEmits\n\nexport type MessageInstance = InstanceType<typeof MessageConstructor>\n\nexport type MessageOptions = Partial<\n Mutable<\n Omit<MessageProps, 'id'> & {\n appendTo?: HTMLElement | string\n }\n >\n>\nexport type MessageParams = MessageOptions | MessageOptions['message']\nexport type MessageParamsNormalized = Omit<MessageProps, 'id'> & {\n /**\n * @description set the root element for the message, default to `document.body`\n */\n appendTo: HTMLElement\n}\nexport type MessageOptionsWithType = Omit<MessageOptions, 'type'>\nexport type MessageParamsWithType =\n | MessageOptionsWithType\n | MessageOptions['message']\n\nexport interface MessageHandler {\n /**\n * @description close the Message\n */\n close: () => void\n}\n\nexport type MessageFn = {\n (options?: MessageParams, appContext?: null | AppContext): MessageHandler\n closeAll(type?: messageType): void\n}\nexport type MessageTypedFn = (\n options?: MessageParamsWithType,\n appContext?: null | AppContext\n) => MessageHandler\n\nexport interface Message extends MessageFn {\n success: MessageTypedFn\n warning: MessageTypedFn\n info: MessageTypedFn\n error: MessageTypedFn\n}\n"],"names":["mutable","isClient","buildProps","iconPropType","definePropType"],"mappings":";;;;;;;;;;AAOY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACxD,MAAC,eAAe,GAAGA,kBAAO,CAAC;AACvC,EAAE,WAAW,EAAE,EAAE;AACjB,EAAE,MAAM,EAAE,KAAK;AACf,EAAE,wBAAwB,EAAE,KAAK;AACjC,EAAE,QAAQ,EAAE,GAAG;AACf,EAAE,IAAI,EAAE,KAAK,C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;AACpC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,QAAQ,EAAE,KAAK;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,SAAS;AACtC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,eAAe,CAAC,IAAI;AACjC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,QAAQ;AACrC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,SAAS;AACtC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,OAAO,EAAE,MAAM,IAAI;AACrB;;;;;;;"}
1
+ {"version":3,"file":"message2.js","sources":["../../../../../../packages/components/message/src/message.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 ref=\"messageRef\"\n :class=\"[\n ns.b(),\n { [ns.m(type)]: type && !icon },\n ns.is('center', center),\n ns.is('closable', showClose),\n customClass,\n ]\"\n :style=\"customStyle\"\n role=\"alert\"\n @mouseenter=\"clearTimer\"\n @mouseleave=\"startTimer\"\n >\n <el-badge\n v-if=\"repeatNum > 1\"\n :value=\"repeatNum\"\n :type=\"badgeType\"\n :class=\"ns.e('badge')\"\n />\n <el-icon v-if=\"iconComponent\" :class=\"[ns.e('icon'), typeClass]\">\n <component :is=\"iconComponent\" />\n </el-icon>\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\" :class=\"ns.e('content')\">\n {{ message }}\n </p>\n <!-- Caution here, message could've been compromised, never use user's input as message -->\n <p v-else :class=\"ns.e('content')\" v-html=\"message\" />\n </slot>\n <el-icon v-if=\"showClose\" :class=\"ns.e('closeBtn')\" @click.stop=\"close\">\n <Close />\n </el-icon>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useGlobalConfig, watch } from '../../config-provider'\nimport { useEventListener, useResizeObserver, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport ElBadge from '@element-plus/components/badge'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { messageEmits, messageProps } from './message'\nimport { getLastOffset, getOffsetOrSpace } from './instance'\nimport type { BadgeProps } from '@element-plus/components/badge'\nimport type { CSSProperties } from 'vue'\n\nconst forEditor = useGlobalConfig('forEditor')\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElMessage',\n})\n\nconst props = defineProps(messageProps)\ndefineEmits(messageEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('message')\nconst { currentZIndex, nextZIndex } = zIndex\n\nconst messageRef = ref<HTMLDivElement>()\nconst visible = ref(false)\nconst height = ref(0)\n\nlet stopTimer: (() => void) | undefined = undefined\n\nconst badgeType = computed<BadgeProps['type']>(() =>\n props.type ? (props.type === 'error' ? 'danger' : props.type) : 'info'\n)\nconst typeClass = computed(() => {\n const type = props.type\n return { [ns.bm('icon', type)]: type && TypeComponentsMap[type] }\n})\nconst iconComponent = computed(\n () => props.icon || TypeComponentsMap[props.type] || ''\n)\n\nconst lastOffset = computed(() => getLastOffset(props.id))\nconst offset = computed(\n () => getOffsetOrSpace(props.id, props.offset) + lastOffset.value\n)\nconst bottom = computed((): number => height.value + offset.value)\nconst customStyle = computed<CSSProperties>(() => ({\n top: `${offset.value}px`,\n zIndex: currentZIndex.value,\n}))\n\nfunction startTimer() {\n if (props.duration === 0) return\n ;({ stop: stopTimer } = useTimeoutFn(() => {\n close()\n }, props.duration))\n}\n\nfunction clearTimer() {\n stopTimer?.()\n}\n\nfunction close() {\n visible.value = false\n}\n\nfunction keydown({ code }: KeyboardEvent) {\n if (code === EVENT_CODE.esc) {\n // press esc to close the message\n close()\n }\n}\n\nonMounted(() => {\n startTimer()\n nextZIndex()\n visible.value = true\n})\n\nwatch(\n () => props.repeatNum,\n () => {\n clearTimer()\n startTimer()\n }\n)\n\nuseEventListener(document, 'keydown', keydown)\n\nuseResizeObserver(messageRef, () => {\n height.value = messageRef.value!.getBoundingClientRect().height\n})\n\ndefineExpose({\n visible,\n bottom,\n close,\n})\n</script>\n"],"names":["forEditor","useGlobalConfig","TypeComponents","useGlobalComponentSettings","ref","computed","TypeComponentsMap","getLastOffset","getOffsetOrSpace","useTimeoutFn","EVENT_CODE","onMounted","watch","useEventListener","useResizeObserver"],"mappings":";;;;;;;;;;;;;;;;;;;;;uCAgEc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AANA,IAAM,MAAAA,WAAA,GAAYC,gCAAgB,WAAW,CAAA,CAAA;AAE7C,IAAA,MAAM,EAAE,KAAU,EAAA,GAAAC,mBAAA,CAAA;AASlB,IAAA,MAAM,EAAE,EAAA,EAAI,MAAW,EAAA,GAAAC,0CAAA,CAA2B,SAAS,CAAA,CAAA;AAC3D,IAAM,MAAA,EAAE,eAAe,UAAe,EAAA,GAAA,MAAA,CAAA;AAEt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A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  require('../../../utils/index.js');
7
7
  require('../../config-provider/index.js');
8
- var message$2 = require('./message.js');
9
- var message$1 = require('./message2.js');
8
+ var message$2 = require('./message2.js');
9
+ var message$1 = require('./message.js');
10
10
  var instance = require('./instance.js');
11
11
  var shared = require('@vue/shared');
12
12
  var types = require('../../../utils/types.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
6
  var notify = require('./src/notify.js');
7
- var notification = require('./src/notification.js');
7
+ var notification = require('./src/notification2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElNotification = install.withInstallFunction(notify["default"], "$notify");
@@ -2,80 +2,158 @@
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
+ 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
+ };
72
154
  }
73
155
  });
74
- const notificationEmits = {
75
- destroy: () => true
76
- };
156
+ var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/notification/src/notification.vue"]]);
77
157
 
78
- exports.notificationEmits = notificationEmits;
79
- exports.notificationProps = notificationProps;
80
- exports.notificationTypes = notificationTypes;
158
+ exports["default"] = NotificationConstructor;
81
159
  //# 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,I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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 '@element-plus/components/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":";;;;;;;;;;;;;;;;;;;;uCAqDc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAM,MAAA,SAAA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AAA,MAEA,KAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -41,6 +41,7 @@ declare const _default: import("vue").DefineComponent<{
41
41
  readonly type: import("element-pe/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "error" | "info", unknown, "", boolean>;
42
42
  readonly zIndex: import("element-pe/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
43
43
  }, {
44
+ forEditor: import("vue").Ref<import("element-pe/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined>;
44
45
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
45
46
  readonly customClass: import("element-pe/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
46
47
  readonly dangerouslyUseHTMLString: import("element-pe/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
@@ -2,156 +2,80 @@
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"
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 { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
31
- const { nextZIndex, currentZIndex } = zIndex;
32
- const { Close } = icon.CloseComponents;
33
- const visible = vue.ref(false);
34
- let timer = void 0;
35
- const typeClass = vue.computed(() => {
36
- const type = props.type;
37
- return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
38
- });
39
- const iconComponent = vue.computed(() => {
40
- if (!props.type)
41
- return props.icon;
42
- return icon.TypeComponentsMap[props.type] || props.icon;
43
- });
44
- const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
45
- const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
46
- const positionStyle = vue.computed(() => {
47
- return {
48
- [verticalProperty.value]: `${props.offset}px`,
49
- zIndex: currentZIndex.value
50
- };
51
- });
52
- function startTimer() {
53
- if (props.duration > 0) {
54
- ;
55
- ({ stop: timer } = core.useTimeoutFn(() => {
56
- if (visible.value)
57
- close();
58
- }, props.duration));
59
- }
60
- }
61
- function clearTimer() {
62
- timer == null ? void 0 : timer();
63
- }
64
- function close() {
65
- visible.value = false;
66
- }
67
- function onKeydown({ code }) {
68
- if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
69
- clearTimer();
70
- } else if (code === aria.EVENT_CODE.esc) {
71
- if (visible.value) {
72
- close();
73
- }
74
- } else {
75
- startTimer();
76
- }
77
- }
78
- vue.onMounted(() => {
79
- startTimer();
80
- nextZIndex();
81
- visible.value = true;
82
- });
83
- core.useEventListener(document, "keydown", onKeydown);
84
- expose({
85
- visible,
86
- close
87
- });
88
- return (_ctx, _cache) => {
89
- return vue.openBlock(), vue.createBlock(vue.Transition, {
90
- name: vue.unref(ns).b("fade"),
91
- onBeforeLeave: _ctx.onClose,
92
- onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
93
- persisted: ""
94
- }, {
95
- default: vue.withCtx(() => [
96
- vue.withDirectives(vue.createElementVNode("div", {
97
- id: _ctx.id,
98
- class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
99
- style: vue.normalizeStyle(vue.unref(positionStyle)),
100
- role: "alert",
101
- onMouseenter: clearTimer,
102
- onMouseleave: startTimer,
103
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
104
- }, [
105
- vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
106
- key: 0,
107
- class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
108
- }, {
109
- default: vue.withCtx(() => [
110
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
111
- ]),
112
- _: 1
113
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
114
- vue.createElementVNode("div", {
115
- class: vue.normalizeClass(vue.unref(ns).e("group"))
116
- }, [
117
- vue.createElementVNode("h2", {
118
- class: vue.normalizeClass(vue.unref(ns).e("title")),
119
- textContent: vue.toDisplayString(_ctx.title)
120
- }, null, 10, _hoisted_2),
121
- vue.withDirectives(vue.createElementVNode("div", {
122
- class: vue.normalizeClass(vue.unref(ns).e("content")),
123
- style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
124
- }, [
125
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
126
- !_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
127
- vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
128
- vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
129
- ], 2112))
130
- ])
131
- ], 6), [
132
- [vue.vShow, _ctx.message]
133
- ]),
134
- _ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
135
- key: 0,
136
- class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
137
- onClick: vue.withModifiers(close, ["stop"])
138
- }, {
139
- default: vue.withCtx(() => [
140
- vue.createVNode(vue.unref(Close))
141
- ]),
142
- _: 1
143
- }, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
144
- ], 2)
145
- ], 46, _hoisted_1), [
146
- [vue.vShow, visible.value]
147
- ])
148
- ]),
149
- _: 3
150
- }, 8, ["name", "onBeforeLeave"]);
151
- };
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
152
72
  }
153
73
  });
154
- var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/notification/src/notification.vue"]]);
74
+ const notificationEmits = {
75
+ destroy: () => true
76
+ };
155
77
 
156
- exports["default"] = NotificationConstructor;
78
+ exports.notificationEmits = notificationEmits;
79
+ exports.notificationProps = notificationProps;
80
+ exports.notificationTypes = notificationTypes;
157
81
  //# sourceMappingURL=notification2.js.map