element-pe 2.2.99 → 2.2.101

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 (442) hide show
  1. package/dist/index.full.js +73 -44
  2. package/dist/index.full.min.js +13 -13
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +13 -13
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +73 -44
  7. package/es/components/affix/index.mjs +2 -2
  8. package/es/components/affix/src/affix.mjs +26 -119
  9. package/es/components/affix/src/affix.mjs.map +1 -1
  10. package/es/components/affix/src/affix2.mjs +119 -26
  11. package/es/components/affix/src/affix2.mjs.map +1 -1
  12. package/es/components/alert/index.mjs +2 -2
  13. package/es/components/alert/src/alert.mjs +103 -38
  14. package/es/components/alert/src/alert.mjs.map +1 -1
  15. package/es/components/alert/src/alert2.mjs +38 -103
  16. package/es/components/alert/src/alert2.mjs.map +1 -1
  17. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  18. package/es/components/backtop/index.mjs +2 -2
  19. package/es/components/backtop/src/backtop.mjs +61 -23
  20. package/es/components/backtop/src/backtop.mjs.map +1 -1
  21. package/es/components/backtop/src/backtop2.mjs +23 -61
  22. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  23. package/es/components/badge/index.mjs +2 -2
  24. package/es/components/badge/src/badge.mjs +17 -59
  25. package/es/components/badge/src/badge.mjs.map +1 -1
  26. package/es/components/badge/src/badge2.mjs +59 -17
  27. package/es/components/badge/src/badge2.mjs.map +1 -1
  28. package/es/components/breadcrumb/index.mjs +2 -2
  29. package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -11
  30. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  31. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -56
  32. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  33. package/es/components/carousel/index.mjs +2 -2
  34. package/es/components/carousel/src/carousel-item.mjs +8 -69
  35. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  36. package/es/components/carousel/src/carousel-item2.mjs +69 -8
  37. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  38. package/es/components/cascader/index.mjs +2 -2
  39. package/es/components/cascader/src/cascader.mjs +647 -86
  40. package/es/components/cascader/src/cascader.mjs.map +1 -1
  41. package/es/components/cascader/src/cascader2.mjs +86 -647
  42. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  43. package/es/components/cascader-panel/src/index.mjs +1 -1
  44. package/es/components/cascader-panel/src/menu.mjs +1 -1
  45. package/es/components/cascader-panel/src/node.mjs +116 -209
  46. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  47. package/es/components/cascader-panel/src/node2.mjs +209 -116
  48. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  49. package/es/components/cascader-panel/src/store.mjs +1 -1
  50. package/es/components/collection/index.mjs +1 -1
  51. package/es/components/collection/src/collection.mjs +66 -10
  52. package/es/components/collection/src/collection.mjs.map +1 -1
  53. package/es/components/collection/src/collection2.mjs +10 -66
  54. package/es/components/collection/src/collection2.mjs.map +1 -1
  55. package/es/components/color-picker/src/color-picker.mjs +1 -1
  56. package/es/components/descriptions/src/description2.mjs +1 -1
  57. package/es/components/descriptions/src/descriptions-row.mjs +7 -64
  58. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  59. package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
  60. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  61. package/es/components/dialog/index.mjs +2 -2
  62. package/es/components/dialog/src/dialog.mjs +175 -72
  63. package/es/components/dialog/src/dialog.mjs.map +1 -1
  64. package/es/components/dialog/src/dialog2.mjs +72 -175
  65. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  66. package/es/components/divider/index.mjs +2 -2
  67. package/es/components/divider/src/divider.mjs +35 -17
  68. package/es/components/divider/src/divider.mjs.map +1 -1
  69. package/es/components/divider/src/divider2.mjs +17 -35
  70. package/es/components/divider/src/divider2.mjs.map +1 -1
  71. package/es/components/drawer/index.mjs +2 -2
  72. package/es/components/drawer/src/drawer.mjs +29 -187
  73. package/es/components/drawer/src/drawer.mjs.map +1 -1
  74. package/es/components/drawer/src/drawer2.mjs +187 -29
  75. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  76. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  77. package/es/components/dropdown/src/dropdown.mjs +3 -3
  78. package/es/components/form/index.mjs +2 -2
  79. package/es/components/form/src/form-item.mjs +46 -328
  80. package/es/components/form/src/form-item.mjs.map +1 -1
  81. package/es/components/form/src/form-item2.mjs +328 -46
  82. package/es/components/form/src/form-item2.mjs.map +1 -1
  83. package/es/components/icon/index.mjs +2 -2
  84. package/es/components/icon/src/icon.mjs +8 -36
  85. package/es/components/icon/src/icon.mjs.map +1 -1
  86. package/es/components/icon/src/icon2.mjs +36 -8
  87. package/es/components/icon/src/icon2.mjs.map +1 -1
  88. package/es/components/index.mjs +33 -33
  89. package/es/components/link/index.mjs +2 -2
  90. package/es/components/link/src/link.mjs +50 -21
  91. package/es/components/link/src/link.mjs.map +1 -1
  92. package/es/components/link/src/link2.mjs +21 -50
  93. package/es/components/link/src/link2.mjs.map +1 -1
  94. package/es/components/menu/index.mjs +2 -2
  95. package/es/components/menu/src/menu-item.mjs +14 -97
  96. package/es/components/menu/src/menu-item.mjs.map +1 -1
  97. package/es/components/menu/src/menu-item2.mjs +97 -14
  98. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  99. package/es/components/message/index.mjs +1 -1
  100. package/es/components/message/src/message.mjs +86 -151
  101. package/es/components/message/src/message.mjs.map +1 -1
  102. package/es/components/message/src/message2.mjs +151 -86
  103. package/es/components/message/src/message2.mjs.map +1 -1
  104. package/es/components/message/src/method.mjs +2 -2
  105. package/es/components/notification/index.mjs +1 -1
  106. package/es/components/notification/src/notification.mjs +67 -151
  107. package/es/components/notification/src/notification.mjs.map +1 -1
  108. package/es/components/notification/src/notification2.mjs +151 -67
  109. package/es/components/notification/src/notification2.mjs.map +1 -1
  110. package/es/components/notification/src/notify.mjs +2 -2
  111. package/es/components/pagination/src/components/pager.mjs +17 -218
  112. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  113. package/es/components/pagination/src/components/pager2.mjs +218 -17
  114. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  115. package/es/components/pagination/src/components/sizes.mjs +71 -23
  116. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  117. package/es/components/pagination/src/components/sizes2.mjs +23 -71
  118. package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
  119. package/es/components/pagination/src/components/total.mjs +7 -28
  120. package/es/components/pagination/src/components/total.mjs.map +1 -1
  121. package/es/components/pagination/src/components/total2.mjs +28 -7
  122. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  123. package/es/components/pagination/src/pagination.mjs +3 -3
  124. package/es/components/popconfirm/index.mjs +2 -2
  125. package/es/components/popconfirm/src/popconfirm.mjs +110 -47
  126. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  127. package/es/components/popconfirm/src/popconfirm2.mjs +47 -110
  128. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  129. package/es/components/popover/src/popover.mjs +2 -2
  130. package/es/components/popper/index.mjs +4 -4
  131. package/es/components/popper/src/arrow.mjs +8 -39
  132. package/es/components/popper/src/arrow.mjs.map +1 -1
  133. package/es/components/popper/src/arrow2.mjs +39 -8
  134. package/es/components/popper/src/arrow2.mjs.map +1 -1
  135. package/es/components/popper/src/trigger.mjs +31 -121
  136. package/es/components/popper/src/trigger.mjs.map +1 -1
  137. package/es/components/popper/src/trigger2.mjs +121 -31
  138. package/es/components/popper/src/trigger2.mjs.map +1 -1
  139. package/es/components/progress/index.mjs +2 -2
  140. package/es/components/progress/src/progress.mjs +205 -59
  141. package/es/components/progress/src/progress.mjs.map +1 -1
  142. package/es/components/progress/src/progress2.mjs +59 -205
  143. package/es/components/progress/src/progress2.mjs.map +1 -1
  144. package/es/components/resizable-columns/index.mjs +2 -2
  145. package/es/components/resizable-columns/src/resizable-columns.mjs +264 -21
  146. package/es/components/resizable-columns/src/resizable-columns.mjs.map +1 -1
  147. package/es/components/resizable-columns/src/resizable-columns2.mjs +21 -264
  148. package/es/components/resizable-columns/src/resizable-columns2.mjs.map +1 -1
  149. package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
  150. package/es/components/row/index.mjs +2 -2
  151. package/es/components/row/src/row.mjs +45 -29
  152. package/es/components/row/src/row.mjs.map +1 -1
  153. package/es/components/row/src/row2.mjs +29 -45
  154. package/es/components/row/src/row2.mjs.map +1 -1
  155. package/es/components/scrollbar/src/bar.mjs +17 -42
  156. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  157. package/es/components/scrollbar/src/bar2.mjs +42 -17
  158. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  159. package/es/components/scrollbar/src/scrollbar.mjs +1 -1
  160. package/es/components/select/src/select.mjs +1 -1
  161. package/es/components/select-v2/src/defaults.mjs +1 -1
  162. package/es/components/select-v2/src/useSelect.mjs +1 -1
  163. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  164. package/es/components/steps/index.mjs +2 -2
  165. package/es/components/steps/src/steps.mjs +36 -39
  166. package/es/components/steps/src/steps.mjs.map +1 -1
  167. package/es/components/steps/src/steps2.mjs +39 -36
  168. package/es/components/steps/src/steps2.mjs.map +1 -1
  169. package/es/components/switch/index.mjs +2 -2
  170. package/es/components/switch/src/switch.mjs +268 -103
  171. package/es/components/switch/src/switch.mjs.map +1 -1
  172. package/es/components/switch/src/switch2.mjs +103 -268
  173. package/es/components/switch/src/switch2.mjs.map +1 -1
  174. package/es/components/table/src/store/watcher.mjs +42 -15
  175. package/es/components/table/src/store/watcher.mjs.map +1 -1
  176. package/es/components/table/src/table-body/defaults.d.ts +2 -1
  177. package/es/components/table/src/table-body/defaults.mjs +2 -1
  178. package/es/components/table/src/table-body/defaults.mjs.map +1 -1
  179. package/es/components/table/src/table-body/render-helper.mjs +6 -4
  180. package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
  181. package/es/components/text/index.mjs +2 -2
  182. package/es/components/text/src/text.mjs +38 -24
  183. package/es/components/text/src/text.mjs.map +1 -1
  184. package/es/components/text/src/text2.mjs +24 -38
  185. package/es/components/text/src/text2.mjs.map +1 -1
  186. package/es/components/timeline/index.mjs +2 -2
  187. package/es/components/timeline/src/timeline-item.mjs +72 -42
  188. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  189. package/es/components/timeline/src/timeline-item2.mjs +42 -72
  190. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  191. package/es/components/tooltip/index.mjs +4 -4
  192. package/es/components/tooltip/src/content.mjs +31 -179
  193. package/es/components/tooltip/src/content.mjs.map +1 -1
  194. package/es/components/tooltip/src/content2.mjs +179 -31
  195. package/es/components/tooltip/src/content2.mjs.map +1 -1
  196. package/es/components/tooltip/src/tooltip.mjs +31 -175
  197. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  198. package/es/components/tooltip/src/tooltip2.mjs +175 -31
  199. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  200. package/es/components/tooltip/src/trigger.mjs +16 -73
  201. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  202. package/es/components/tooltip/src/trigger2.mjs +73 -16
  203. package/es/components/tooltip/src/trigger2.mjs.map +1 -1
  204. package/es/components/tooltip-v2/src/content2.mjs +1 -1
  205. package/es/components/upload/index.mjs +3 -3
  206. package/es/components/upload/src/upload-content.mjs +1 -1
  207. package/es/components/upload/src/upload-content2.mjs +2 -2
  208. package/es/components/upload/src/upload-dragger.mjs +11 -72
  209. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  210. package/es/components/upload/src/upload-dragger2.mjs +72 -11
  211. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  212. package/es/components/upload/src/upload-list.mjs +1 -1
  213. package/es/components/upload/src/upload.mjs +102 -116
  214. package/es/components/upload/src/upload.mjs.map +1 -1
  215. package/es/components/upload/src/upload2.mjs +116 -102
  216. package/es/components/upload/src/upload2.mjs.map +1 -1
  217. package/es/components/upload/src/use-handlers.mjs +1 -1
  218. package/es/components/visual-hidden/index.mjs +3 -3
  219. package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
  220. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  221. package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
  222. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  223. package/es/index.mjs +33 -33
  224. package/lib/components/affix/index.js +2 -2
  225. package/lib/components/affix/src/affix.js +27 -119
  226. package/lib/components/affix/src/affix.js.map +1 -1
  227. package/lib/components/affix/src/affix2.js +119 -27
  228. package/lib/components/affix/src/affix2.js.map +1 -1
  229. package/lib/components/alert/index.js +2 -2
  230. package/lib/components/alert/src/alert.js +102 -39
  231. package/lib/components/alert/src/alert.js.map +1 -1
  232. package/lib/components/alert/src/alert2.js +39 -102
  233. package/lib/components/alert/src/alert2.js.map +1 -1
  234. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  235. package/lib/components/backtop/index.js +2 -2
  236. package/lib/components/backtop/src/backtop.js +61 -24
  237. package/lib/components/backtop/src/backtop.js.map +1 -1
  238. package/lib/components/backtop/src/backtop2.js +24 -61
  239. package/lib/components/backtop/src/backtop2.js.map +1 -1
  240. package/lib/components/badge/index.js +2 -2
  241. package/lib/components/badge/src/badge.js +17 -59
  242. package/lib/components/badge/src/badge.js.map +1 -1
  243. package/lib/components/badge/src/badge2.js +59 -17
  244. package/lib/components/badge/src/badge2.js.map +1 -1
  245. package/lib/components/breadcrumb/index.js +2 -2
  246. package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -11
  247. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  248. package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -56
  249. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  250. package/lib/components/carousel/index.js +2 -2
  251. package/lib/components/carousel/src/carousel-item.js +8 -69
  252. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  253. package/lib/components/carousel/src/carousel-item2.js +69 -8
  254. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  255. package/lib/components/cascader/index.js +2 -2
  256. package/lib/components/cascader/src/cascader.js +647 -87
  257. package/lib/components/cascader/src/cascader.js.map +1 -1
  258. package/lib/components/cascader/src/cascader2.js +87 -647
  259. package/lib/components/cascader/src/cascader2.js.map +1 -1
  260. package/lib/components/cascader-panel/src/index.js +1 -1
  261. package/lib/components/cascader-panel/src/menu.js +1 -1
  262. package/lib/components/cascader-panel/src/node.js +116 -209
  263. package/lib/components/cascader-panel/src/node.js.map +1 -1
  264. package/lib/components/cascader-panel/src/node2.js +209 -116
  265. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  266. package/lib/components/cascader-panel/src/store.js +1 -1
  267. package/lib/components/collection/index.js +1 -1
  268. package/lib/components/collection/src/collection.js +66 -9
  269. package/lib/components/collection/src/collection.js.map +1 -1
  270. package/lib/components/collection/src/collection2.js +9 -66
  271. package/lib/components/collection/src/collection2.js.map +1 -1
  272. package/lib/components/color-picker/src/color-picker.js +1 -1
  273. package/lib/components/descriptions/src/description2.js +1 -1
  274. package/lib/components/descriptions/src/descriptions-row.js +7 -64
  275. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  276. package/lib/components/descriptions/src/descriptions-row2.js +64 -7
  277. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  278. package/lib/components/dialog/index.js +2 -2
  279. package/lib/components/dialog/src/dialog.js +175 -73
  280. package/lib/components/dialog/src/dialog.js.map +1 -1
  281. package/lib/components/dialog/src/dialog2.js +73 -175
  282. package/lib/components/dialog/src/dialog2.js.map +1 -1
  283. package/lib/components/divider/index.js +2 -2
  284. package/lib/components/divider/src/divider.js +35 -17
  285. package/lib/components/divider/src/divider.js.map +1 -1
  286. package/lib/components/divider/src/divider2.js +17 -35
  287. package/lib/components/divider/src/divider2.js.map +1 -1
  288. package/lib/components/drawer/index.js +2 -2
  289. package/lib/components/drawer/src/drawer.js +30 -187
  290. package/lib/components/drawer/src/drawer.js.map +1 -1
  291. package/lib/components/drawer/src/drawer2.js +187 -30
  292. package/lib/components/drawer/src/drawer2.js.map +1 -1
  293. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  294. package/lib/components/dropdown/src/dropdown.js +3 -3
  295. package/lib/components/form/index.js +2 -2
  296. package/lib/components/form/src/form-item.js +47 -332
  297. package/lib/components/form/src/form-item.js.map +1 -1
  298. package/lib/components/form/src/form-item2.js +332 -47
  299. package/lib/components/form/src/form-item2.js.map +1 -1
  300. package/lib/components/icon/index.js +2 -2
  301. package/lib/components/icon/src/icon.js +8 -36
  302. package/lib/components/icon/src/icon.js.map +1 -1
  303. package/lib/components/icon/src/icon2.js +36 -8
  304. package/lib/components/icon/src/icon2.js.map +1 -1
  305. package/lib/components/index.js +33 -33
  306. package/lib/components/link/index.js +2 -2
  307. package/lib/components/link/src/link.js +50 -22
  308. package/lib/components/link/src/link.js.map +1 -1
  309. package/lib/components/link/src/link2.js +22 -50
  310. package/lib/components/link/src/link2.js.map +1 -1
  311. package/lib/components/menu/index.js +2 -2
  312. package/lib/components/menu/src/menu-item.js +15 -97
  313. package/lib/components/menu/src/menu-item.js.map +1 -1
  314. package/lib/components/menu/src/menu-item2.js +97 -15
  315. package/lib/components/menu/src/menu-item2.js.map +1 -1
  316. package/lib/components/message/index.js +1 -1
  317. package/lib/components/message/src/message.js +88 -150
  318. package/lib/components/message/src/message.js.map +1 -1
  319. package/lib/components/message/src/message2.js +150 -88
  320. package/lib/components/message/src/message2.js.map +1 -1
  321. package/lib/components/message/src/method.js +2 -2
  322. package/lib/components/notification/index.js +1 -1
  323. package/lib/components/notification/src/notification.js +68 -150
  324. package/lib/components/notification/src/notification.js.map +1 -1
  325. package/lib/components/notification/src/notification2.js +150 -68
  326. package/lib/components/notification/src/notification2.js.map +1 -1
  327. package/lib/components/notification/src/notify.js +2 -2
  328. package/lib/components/pagination/src/components/pager.js +17 -218
  329. package/lib/components/pagination/src/components/pager.js.map +1 -1
  330. package/lib/components/pagination/src/components/pager2.js +218 -17
  331. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  332. package/lib/components/pagination/src/components/sizes.js +71 -23
  333. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  334. package/lib/components/pagination/src/components/sizes2.js +23 -71
  335. package/lib/components/pagination/src/components/sizes2.js.map +1 -1
  336. package/lib/components/pagination/src/components/total.js +7 -28
  337. package/lib/components/pagination/src/components/total.js.map +1 -1
  338. package/lib/components/pagination/src/components/total2.js +28 -7
  339. package/lib/components/pagination/src/components/total2.js.map +1 -1
  340. package/lib/components/pagination/src/pagination.js +3 -3
  341. package/lib/components/popconfirm/index.js +2 -2
  342. package/lib/components/popconfirm/src/popconfirm.js +110 -48
  343. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  344. package/lib/components/popconfirm/src/popconfirm2.js +48 -110
  345. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  346. package/lib/components/popover/src/popover.js +2 -2
  347. package/lib/components/popper/index.js +4 -4
  348. package/lib/components/popper/src/arrow.js +9 -39
  349. package/lib/components/popper/src/arrow.js.map +1 -1
  350. package/lib/components/popper/src/arrow2.js +39 -9
  351. package/lib/components/popper/src/arrow2.js.map +1 -1
  352. package/lib/components/popper/src/trigger.js +32 -121
  353. package/lib/components/popper/src/trigger.js.map +1 -1
  354. package/lib/components/popper/src/trigger2.js +121 -32
  355. package/lib/components/popper/src/trigger2.js.map +1 -1
  356. package/lib/components/progress/index.js +2 -2
  357. package/lib/components/progress/src/progress.js +205 -59
  358. package/lib/components/progress/src/progress.js.map +1 -1
  359. package/lib/components/progress/src/progress2.js +59 -205
  360. package/lib/components/progress/src/progress2.js.map +1 -1
  361. package/lib/components/resizable-columns/index.js +2 -2
  362. package/lib/components/resizable-columns/src/resizable-columns.js +264 -21
  363. package/lib/components/resizable-columns/src/resizable-columns.js.map +1 -1
  364. package/lib/components/resizable-columns/src/resizable-columns2.js +21 -264
  365. package/lib/components/resizable-columns/src/resizable-columns2.js.map +1 -1
  366. package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
  367. package/lib/components/row/index.js +2 -2
  368. package/lib/components/row/src/row.js +45 -31
  369. package/lib/components/row/src/row.js.map +1 -1
  370. package/lib/components/row/src/row2.js +31 -45
  371. package/lib/components/row/src/row2.js.map +1 -1
  372. package/lib/components/scrollbar/src/bar.js +17 -42
  373. package/lib/components/scrollbar/src/bar.js.map +1 -1
  374. package/lib/components/scrollbar/src/bar2.js +42 -17
  375. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  376. package/lib/components/scrollbar/src/scrollbar.js +1 -1
  377. package/lib/components/select/src/select.js +1 -1
  378. package/lib/components/select-v2/src/defaults.js +1 -1
  379. package/lib/components/select-v2/src/useSelect.js +1 -1
  380. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  381. package/lib/components/steps/index.js +2 -2
  382. package/lib/components/steps/src/steps.js +37 -39
  383. package/lib/components/steps/src/steps.js.map +1 -1
  384. package/lib/components/steps/src/steps2.js +39 -37
  385. package/lib/components/steps/src/steps2.js.map +1 -1
  386. package/lib/components/switch/index.js +2 -2
  387. package/lib/components/switch/src/switch.js +267 -103
  388. package/lib/components/switch/src/switch.js.map +1 -1
  389. package/lib/components/switch/src/switch2.js +103 -267
  390. package/lib/components/switch/src/switch2.js.map +1 -1
  391. package/lib/components/table/src/store/watcher.js +42 -15
  392. package/lib/components/table/src/store/watcher.js.map +1 -1
  393. package/lib/components/table/src/table-body/defaults.d.ts +2 -1
  394. package/lib/components/table/src/table-body/defaults.js +2 -0
  395. package/lib/components/table/src/table-body/defaults.js.map +1 -1
  396. package/lib/components/table/src/table-body/render-helper.js +6 -4
  397. package/lib/components/table/src/table-body/render-helper.js.map +1 -1
  398. package/lib/components/text/index.js +2 -2
  399. package/lib/components/text/src/text.js +38 -24
  400. package/lib/components/text/src/text.js.map +1 -1
  401. package/lib/components/text/src/text2.js +24 -38
  402. package/lib/components/text/src/text2.js.map +1 -1
  403. package/lib/components/timeline/index.js +2 -2
  404. package/lib/components/timeline/src/timeline-item.js +72 -42
  405. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  406. package/lib/components/timeline/src/timeline-item2.js +42 -72
  407. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  408. package/lib/components/tooltip/index.js +4 -4
  409. package/lib/components/tooltip/src/content.js +31 -179
  410. package/lib/components/tooltip/src/content.js.map +1 -1
  411. package/lib/components/tooltip/src/content2.js +179 -31
  412. package/lib/components/tooltip/src/content2.js.map +1 -1
  413. package/lib/components/tooltip/src/tooltip.js +33 -173
  414. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  415. package/lib/components/tooltip/src/tooltip2.js +173 -33
  416. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  417. package/lib/components/tooltip/src/trigger.js +16 -73
  418. package/lib/components/tooltip/src/trigger.js.map +1 -1
  419. package/lib/components/tooltip/src/trigger2.js +73 -16
  420. package/lib/components/tooltip/src/trigger2.js.map +1 -1
  421. package/lib/components/tooltip-v2/src/content2.js +1 -1
  422. package/lib/components/upload/index.js +3 -3
  423. package/lib/components/upload/src/upload-content.js +1 -1
  424. package/lib/components/upload/src/upload-content2.js +2 -2
  425. package/lib/components/upload/src/upload-dragger.js +12 -72
  426. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  427. package/lib/components/upload/src/upload-dragger2.js +72 -12
  428. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  429. package/lib/components/upload/src/upload-list.js +1 -1
  430. package/lib/components/upload/src/upload.js +105 -116
  431. package/lib/components/upload/src/upload.js.map +1 -1
  432. package/lib/components/upload/src/upload2.js +116 -105
  433. package/lib/components/upload/src/upload2.js.map +1 -1
  434. package/lib/components/upload/src/use-handlers.js +1 -1
  435. package/lib/components/visual-hidden/index.js +2 -2
  436. package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
  437. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  438. package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
  439. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  440. package/lib/index.js +33 -33
  441. package/package.json +1 -1
  442. package/web-types.json +1 -1
@@ -1,93 +1,158 @@
1
+ import { defineComponent, ref, computed, onMounted, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, resolveDynamicComponent, renderSlot, createElementBlock, toDisplayString, Fragment, withModifiers, createVNode, vShow } from 'vue';
2
+ import '../../config-provider/index.mjs';
3
+ import { useTimeoutFn, useEventListener, useResizeObserver } from '@vueuse/core';
1
4
  import '../../../utils/index.mjs';
2
- import { mutable } from '../../../utils/typescript.mjs';
3
- import { isClient } from '@vueuse/core';
4
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
- import { iconPropType } from '../../../utils/vue/icon.mjs';
5
+ import '../../../constants/index.mjs';
6
+ import { ElBadge } from '../../badge/index.mjs';
7
+ import { ElIcon } from '../../icon/index.mjs';
8
+ import { messageProps, messageEmits } from './message.mjs';
9
+ import { getLastOffset, getOffsetOrSpace } from './instance.mjs';
10
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
+ import { useGlobalConfig, useGlobalComponentSettings } from '../../config-provider/src/hooks/use-global-config.mjs';
12
+ import { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
13
+ import { EVENT_CODE } from '../../../constants/aria.mjs';
14
+ import { watch } from '../../config-provider/src/for-editor.mjs';
6
15
 
7
- const messageTypes = ["success", "info", "warning", "error"];
8
- const messageDefaults = mutable({
9
- customClass: "",
10
- center: false,
11
- dangerouslyUseHTMLString: false,
12
- duration: 3e3,
13
- icon: void 0,
14
- id: "",
15
- message: "",
16
- onClose: void 0,
17
- showClose: false,
18
- type: "info",
19
- offset: 16,
20
- zIndex: 0,
21
- grouping: false,
22
- repeatNum: 1,
23
- appendTo: isClient ? document.body : void 0
16
+ const _hoisted_1 = ["id"];
17
+ const _hoisted_2 = ["innerHTML"];
18
+ const __default__ = defineComponent({
19
+ name: "ElMessage"
24
20
  });
25
- const messageProps = buildProps({
26
- customClass: {
27
- type: String,
28
- default: messageDefaults.customClass
29
- },
30
- center: {
31
- type: Boolean,
32
- default: messageDefaults.center
33
- },
34
- dangerouslyUseHTMLString: {
35
- type: Boolean,
36
- default: messageDefaults.dangerouslyUseHTMLString
37
- },
38
- duration: {
39
- type: Number,
40
- default: messageDefaults.duration
41
- },
42
- icon: {
43
- type: iconPropType,
44
- default: messageDefaults.icon
45
- },
46
- id: {
47
- type: String,
48
- default: messageDefaults.id
49
- },
50
- message: {
51
- type: definePropType([
52
- String,
53
- Object,
54
- Function
55
- ]),
56
- default: messageDefaults.message
57
- },
58
- onClose: {
59
- type: definePropType(Function),
60
- required: false
61
- },
62
- showClose: {
63
- type: Boolean,
64
- default: messageDefaults.showClose
65
- },
66
- type: {
67
- type: String,
68
- values: messageTypes,
69
- default: messageDefaults.type
70
- },
71
- offset: {
72
- type: Number,
73
- default: messageDefaults.offset
74
- },
75
- zIndex: {
76
- type: Number,
77
- default: messageDefaults.zIndex
78
- },
79
- grouping: {
80
- type: Boolean,
81
- default: messageDefaults.grouping
82
- },
83
- repeatNum: {
84
- type: Number,
85
- default: messageDefaults.repeatNum
21
+ const _sfc_main = /* @__PURE__ */ defineComponent({
22
+ ...__default__,
23
+ props: messageProps,
24
+ emits: messageEmits,
25
+ setup(__props, { expose }) {
26
+ const props = __props;
27
+ const forEditor = useGlobalConfig("forEditor");
28
+ const { Close } = TypeComponents;
29
+ const { ns, zIndex } = useGlobalComponentSettings("message");
30
+ const { currentZIndex, nextZIndex } = zIndex;
31
+ const messageRef = ref();
32
+ const visible = ref(false);
33
+ const height = ref(0);
34
+ let stopTimer = void 0;
35
+ const badgeType = computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
36
+ const typeClass = computed(() => {
37
+ const type = props.type;
38
+ return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
39
+ });
40
+ const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
41
+ const lastOffset = computed(() => getLastOffset(props.id));
42
+ const offset = computed(() => getOffsetOrSpace(props.id, props.offset) + lastOffset.value);
43
+ const bottom = computed(() => height.value + offset.value);
44
+ const customStyle = computed(() => ({
45
+ top: `${offset.value}px`,
46
+ zIndex: currentZIndex.value
47
+ }));
48
+ function startTimer() {
49
+ if (props.duration === 0)
50
+ return;
51
+ ({ stop: stopTimer } = useTimeoutFn(() => {
52
+ close();
53
+ }, props.duration));
54
+ }
55
+ function clearTimer() {
56
+ stopTimer == null ? void 0 : stopTimer();
57
+ }
58
+ function close() {
59
+ visible.value = false;
60
+ }
61
+ function keydown({ code }) {
62
+ if (code === EVENT_CODE.esc) {
63
+ close();
64
+ }
65
+ }
66
+ onMounted(() => {
67
+ startTimer();
68
+ nextZIndex();
69
+ visible.value = true;
70
+ });
71
+ watch(() => props.repeatNum, () => {
72
+ clearTimer();
73
+ startTimer();
74
+ });
75
+ useEventListener(document, "keydown", keydown);
76
+ useResizeObserver(messageRef, () => {
77
+ height.value = messageRef.value.getBoundingClientRect().height;
78
+ });
79
+ expose({
80
+ visible,
81
+ bottom,
82
+ close
83
+ });
84
+ return (_ctx, _cache) => {
85
+ return openBlock(), createBlock(Transition, {
86
+ name: unref(ns).b("fade"),
87
+ onBeforeLeave: _ctx.onClose,
88
+ onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")),
89
+ duration: unref(forEditor) ? -1 : 0,
90
+ persisted: ""
91
+ }, {
92
+ default: withCtx(() => [
93
+ withDirectives(createElementVNode("div", {
94
+ id: _ctx.id,
95
+ ref_key: "messageRef",
96
+ ref: messageRef,
97
+ class: normalizeClass([
98
+ unref(ns).b(),
99
+ { [unref(ns).m(_ctx.type)]: _ctx.type && !_ctx.icon },
100
+ unref(ns).is("center", _ctx.center),
101
+ unref(ns).is("closable", _ctx.showClose),
102
+ _ctx.customClass
103
+ ]),
104
+ style: normalizeStyle(unref(customStyle)),
105
+ role: "alert",
106
+ onMouseenter: clearTimer,
107
+ onMouseleave: startTimer
108
+ }, [
109
+ _ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
110
+ key: 0,
111
+ value: _ctx.repeatNum,
112
+ type: unref(badgeType),
113
+ class: normalizeClass(unref(ns).e("badge"))
114
+ }, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true),
115
+ unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
116
+ key: 1,
117
+ class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
118
+ }, {
119
+ default: withCtx(() => [
120
+ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
121
+ ]),
122
+ _: 1
123
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
124
+ renderSlot(_ctx.$slots, "default", {}, () => [
125
+ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
126
+ key: 0,
127
+ class: normalizeClass(unref(ns).e("content"))
128
+ }, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
129
+ createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
130
+ createElementVNode("p", {
131
+ class: normalizeClass(unref(ns).e("content")),
132
+ innerHTML: _ctx.message
133
+ }, null, 10, _hoisted_2)
134
+ ], 2112))
135
+ ]),
136
+ _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
137
+ key: 2,
138
+ class: normalizeClass(unref(ns).e("closeBtn")),
139
+ onClick: withModifiers(close, ["stop"])
140
+ }, {
141
+ default: withCtx(() => [
142
+ createVNode(unref(Close))
143
+ ]),
144
+ _: 1
145
+ }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
146
+ ], 46, _hoisted_1), [
147
+ [vShow, visible.value]
148
+ ])
149
+ ]),
150
+ _: 3
151
+ }, 8, ["name", "onBeforeLeave", "duration"]);
152
+ };
86
153
  }
87
154
  });
88
- const messageEmits = {
89
- destroy: () => true
90
- };
155
+ var MessageConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\message\\src\\message.vue"]]);
91
156
 
92
- export { messageDefaults, messageEmits, messageProps, messageTypes };
157
+ export { MessageConstructor as default };
93
158
  //# sourceMappingURL=message2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"message2.mjs","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":[],"mappings":";;;;;;AAOY,MAAC,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACxD,MAAC,eAAe,GAAG,OAAO,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,CAAC;AACd,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,OAAO,EAAE,KAAK,CAAC;AACjB,EAAE,SAAS,EAAE,KAAK;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,MAAM,EAAE,CAAC;AACX,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,SAAS,EAAE,CAAC;AACd,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC;AAC7C,CAAC,EAAE;AACS,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,WAAW;AACxC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,eAAe,CAAC,wBAAwB;AACrD,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,eAAe,CAAC,QAAQ;AACrC,GAAG;AACH,EAAE,IAAI,EAAE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I;AACrB;;;;"}
1
+ {"version":3,"file":"message2.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;mCAgEc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AANA,IAAM,MAAA,SAAA,GAAY,gBAAgB,WAAW,CA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AA,CAAO,KAAQ,GAAA,UAAA,CAAW,KAAO,CAAA,qBAAA,EAAwB,CAAA,MAAA,CAAA;AAAA,KAC1D,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MACX,OAAA;AAAA,MACA,MAAA;AAAA,MACA,KAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { isVNode, render, createVNode } from 'vue';
2
2
  import '../../../utils/index.mjs';
3
3
  import '../../config-provider/index.mjs';
4
- import MessageConstructor from './message.mjs';
5
- import { messageDefaults, messageTypes } from './message2.mjs';
4
+ import MessageConstructor from './message2.mjs';
5
+ import { messageDefaults, messageTypes } from './message.mjs';
6
6
  import { instances } from './instance.mjs';
7
7
  import { isString, isFunction } from '@vue/shared';
8
8
  import { isElement, isNumber } from '../../../utils/types.mjs';
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
2
  import notify from './src/notify.mjs';
3
- export { notificationEmits, notificationProps, notificationTypes } from './src/notification2.mjs';
3
+ export { notificationEmits, notificationProps, notificationTypes } from './src/notification.mjs';
4
4
  import { withInstallFunction } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const ElNotification = withInstallFunction(notify, "$notify");
@@ -1,156 +1,72 @@
1
- import { defineComponent, ref, computed, onMounted, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, resolveDynamicComponent, createCommentVNode, toDisplayString, renderSlot, createElementBlock, Fragment, vShow, withModifiers, createVNode } from 'vue';
2
- import { useTimeoutFn, useEventListener } from '@vueuse/core';
3
1
  import '../../../utils/index.mjs';
4
- import '../../../constants/index.mjs';
5
- import { ElIcon } from '../../icon/index.mjs';
6
- import '../../config-provider/index.mjs';
7
- import { notificationProps, notificationEmits } from './notification2.mjs';
8
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
- import { useGlobalConfig, useGlobalComponentSettings } from '../../config-provider/src/hooks/use-global-config.mjs';
10
- import { CloseComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
11
- import { EVENT_CODE } from '../../../constants/aria.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
+ import { iconPropType } from '../../../utils/vue/icon.mjs';
12
4
 
13
- const _hoisted_1 = ["id"];
14
- const _hoisted_2 = ["textContent"];
15
- const _hoisted_3 = { key: 0 };
16
- const _hoisted_4 = ["innerHTML"];
17
- const __default__ = defineComponent({
18
- name: "ElNotification"
5
+ const notificationTypes = [
6
+ "success",
7
+ "info",
8
+ "warning",
9
+ "error"
10
+ ];
11
+ const notificationProps = buildProps({
12
+ customClass: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ dangerouslyUseHTMLString: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ duration: {
21
+ type: Number,
22
+ default: 4500
23
+ },
24
+ icon: {
25
+ type: iconPropType
26
+ },
27
+ id: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ message: {
32
+ type: definePropType([String, Object]),
33
+ default: ""
34
+ },
35
+ offset: {
36
+ type: Number,
37
+ default: 0
38
+ },
39
+ onClick: {
40
+ type: definePropType(Function),
41
+ default: () => void 0
42
+ },
43
+ onClose: {
44
+ type: definePropType(Function),
45
+ required: true
46
+ },
47
+ position: {
48
+ type: String,
49
+ values: ["top-right", "top-left", "bottom-right", "bottom-left"],
50
+ default: "top-right"
51
+ },
52
+ showClose: {
53
+ type: Boolean,
54
+ default: true
55
+ },
56
+ title: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ type: {
61
+ type: String,
62
+ values: [...notificationTypes, ""],
63
+ default: ""
64
+ },
65
+ zIndex: Number
19
66
  });
20
- const _sfc_main = /* @__PURE__ */ defineComponent({
21
- ...__default__,
22
- props: notificationProps,
23
- emits: notificationEmits,
24
- setup(__props, { expose }) {
25
- const props = __props;
26
- const forEditor = useGlobalConfig("forEditor");
27
- const { ns, zIndex } = useGlobalComponentSettings("notification");
28
- const { nextZIndex, currentZIndex } = zIndex;
29
- const { Close } = CloseComponents;
30
- const visible = ref(false);
31
- let timer = void 0;
32
- const typeClass = computed(() => {
33
- const type = props.type;
34
- return type && TypeComponentsMap[props.type] ? ns.m(type) : "";
35
- });
36
- const iconComponent = computed(() => {
37
- if (!props.type)
38
- return props.icon;
39
- return TypeComponentsMap[props.type] || props.icon;
40
- });
41
- const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left");
42
- const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom");
43
- const positionStyle = computed(() => {
44
- var _a;
45
- return {
46
- [verticalProperty.value]: `${props.offset}px`,
47
- zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
48
- };
49
- });
50
- function startTimer() {
51
- if (props.duration > 0) {
52
- ;
53
- ({ stop: timer } = useTimeoutFn(() => {
54
- if (visible.value)
55
- close();
56
- }, props.duration));
57
- }
58
- }
59
- function clearTimer() {
60
- timer == null ? void 0 : timer();
61
- }
62
- function close() {
63
- visible.value = false;
64
- }
65
- function onKeydown({ code }) {
66
- if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {
67
- clearTimer();
68
- } else if (code === EVENT_CODE.esc) {
69
- if (visible.value) {
70
- close();
71
- }
72
- } else {
73
- startTimer();
74
- }
75
- }
76
- onMounted(() => {
77
- startTimer();
78
- nextZIndex();
79
- visible.value = true;
80
- });
81
- useEventListener(document, "keydown", onKeydown);
82
- expose({
83
- visible,
84
- close
85
- });
86
- return (_ctx, _cache) => {
87
- return openBlock(), createBlock(Transition, {
88
- name: unref(ns).b("fade"),
89
- onBeforeLeave: _ctx.onClose,
90
- onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
91
- duration: unref(forEditor) ? -1 : 0,
92
- persisted: ""
93
- }, {
94
- default: withCtx(() => [
95
- withDirectives(createElementVNode("div", {
96
- id: _ctx.id,
97
- class: normalizeClass([unref(ns).b(), _ctx.customClass, unref(horizontalClass)]),
98
- style: normalizeStyle(unref(positionStyle)),
99
- role: "alert",
100
- onMouseenter: clearTimer,
101
- onMouseleave: startTimer,
102
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
103
- }, [
104
- unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
105
- key: 0,
106
- class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
107
- }, {
108
- default: withCtx(() => [
109
- (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
110
- ]),
111
- _: 1
112
- }, 8, ["class"])) : createCommentVNode("v-if", true),
113
- createElementVNode("div", {
114
- class: normalizeClass(unref(ns).e("group"))
115
- }, [
116
- createElementVNode("h2", {
117
- class: normalizeClass(unref(ns).e("title")),
118
- textContent: toDisplayString(_ctx.title)
119
- }, null, 10, _hoisted_2),
120
- withDirectives(createElementVNode("div", {
121
- class: normalizeClass(unref(ns).e("content")),
122
- style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
123
- }, [
124
- renderSlot(_ctx.$slots, "default", {}, () => [
125
- !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
126
- createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
127
- createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
128
- ], 2112))
129
- ])
130
- ], 6), [
131
- [vShow, _ctx.message]
132
- ]),
133
- _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
134
- key: 0,
135
- class: normalizeClass(unref(ns).e("closeBtn")),
136
- onClick: withModifiers(close, ["stop"])
137
- }, {
138
- default: withCtx(() => [
139
- createVNode(unref(Close))
140
- ]),
141
- _: 1
142
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
143
- ], 2)
144
- ], 46, _hoisted_1), [
145
- [vShow, visible.value]
146
- ])
147
- ]),
148
- _: 3
149
- }, 8, ["name", "onBeforeLeave", "duration"]);
150
- };
151
- }
152
- });
153
- var NotificationConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\notification\\src\\notification.vue"]]);
67
+ const notificationEmits = {
68
+ destroy: () => true
69
+ };
154
70
 
155
- export { NotificationConstructor as default };
71
+ export { notificationEmits, notificationProps, notificationTypes };
156
72
  //# sourceMappingURL=notification.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;mCAqDc,CAAA;AAAA,EACZ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AA,IAAA,CAAA;AAED,KAAiB,CAAA,CAAA;AAEjB,IAAa,gBAAA,CAAA,QAAA,EAAA,SAAA,EAAA,SAAA,CAAA,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MAEA,OAAA;AAAA,MACD,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notification.mjs","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":[],"mappings":";;;;AACY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAG,UAAU,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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