@element-plus/nightly 0.0.20260119 → 0.0.20260120

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 (587) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +1079 -551
  3. package/dist/index.full.min.js +22 -22
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +22 -22
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +1074 -552
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
  277. package/es/components/autocomplete/src/autocomplete.vue2.mjs +1 -1
  278. package/es/components/cascader/src/cascader.d.ts +127 -3
  279. package/es/components/cascader/src/cascader.mjs.map +1 -1
  280. package/es/components/cascader/src/cascader.vue.d.ts +79 -395
  281. package/es/components/cascader/src/cascader.vue2.mjs +71 -30
  282. package/es/components/cascader/src/cascader.vue2.mjs.map +1 -1
  283. package/es/components/cascader-panel/src/config.d.ts +21 -0
  284. package/es/components/cascader-panel/src/config.mjs.map +1 -1
  285. package/es/components/cascader-panel/src/index.vue.d.ts +30 -37
  286. package/es/components/cascader-panel/src/index.vue2.mjs +9 -3
  287. package/es/components/cascader-panel/src/index.vue2.mjs.map +1 -1
  288. package/es/components/checkbox/index.mjs +1 -1
  289. package/es/components/checkbox/src/checkbox-button.vue.d.ts +46 -122
  290. package/es/components/checkbox/src/checkbox-button.vue2.mjs +26 -7
  291. package/es/components/checkbox/src/checkbox-button.vue2.mjs.map +1 -1
  292. package/es/components/checkbox/src/checkbox-group.d.ts +61 -4
  293. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  294. package/es/components/checkbox/src/checkbox-group.vue.d.ts +41 -91
  295. package/es/components/checkbox/src/checkbox-group.vue2.mjs +19 -5
  296. package/es/components/checkbox/src/checkbox-group.vue2.mjs.map +1 -1
  297. package/es/components/checkbox/src/checkbox.d.ts +90 -2
  298. package/es/components/checkbox/src/checkbox.mjs +15 -2
  299. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  300. package/es/components/checkbox/src/checkbox.vue.d.ts +46 -122
  301. package/es/components/checkbox/src/checkbox.vue2.mjs +29 -10
  302. package/es/components/checkbox/src/checkbox.vue2.mjs.map +1 -1
  303. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -1
  304. package/es/components/checkbox/src/composables/use-checkbox.d.ts +1 -1
  305. package/es/components/color-picker/index.mjs +1 -1
  306. package/es/components/color-picker/src/color-picker.d.ts +86 -2
  307. package/es/components/color-picker/src/color-picker.mjs +12 -1
  308. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  309. package/es/components/color-picker/src/color-picker.vue.d.ts +48 -291
  310. package/es/components/color-picker/src/color-picker.vue2.mjs +33 -14
  311. package/es/components/color-picker/src/color-picker.vue2.mjs.map +1 -1
  312. package/es/components/dialog/src/dialog-content.d.ts +66 -1
  313. package/es/components/dialog/src/dialog-content.mjs +9 -1
  314. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  315. package/es/components/dialog/src/dialog-content.vue.d.ts +39 -46
  316. package/es/components/dialog/src/dialog-content.vue2.mjs +23 -10
  317. package/es/components/dialog/src/dialog-content.vue2.mjs.map +1 -1
  318. package/es/components/dialog/src/dialog.d.ts +89 -2
  319. package/es/components/dialog/src/dialog.mjs.map +1 -1
  320. package/es/components/dialog/src/dialog.vue.d.ts +66 -138
  321. package/es/components/dialog/src/dialog.vue2.mjs +62 -18
  322. package/es/components/dialog/src/dialog.vue2.mjs.map +1 -1
  323. package/es/components/dialog/src/use-dialog.d.ts +3 -3
  324. package/es/components/drawer/src/drawer.vue.d.ts +4 -4
  325. package/es/components/form/src/form-item.d.ts +58 -2
  326. package/es/components/form/src/form-item.mjs.map +1 -1
  327. package/es/components/form/src/form-item.vue.d.ts +33 -84
  328. package/es/components/form/src/form-item.vue2.mjs +15 -3
  329. package/es/components/form/src/form-item.vue2.mjs.map +1 -1
  330. package/es/components/form/src/form.d.ts +83 -3
  331. package/es/components/form/src/form.mjs.map +1 -1
  332. package/es/components/form/src/form.vue.d.ts +42 -69
  333. package/es/components/form/src/form.vue2.mjs +19 -2
  334. package/es/components/form/src/form.vue2.mjs.map +1 -1
  335. package/es/components/index.mjs +5 -5
  336. package/es/components/notification/src/notification.d.ts +73 -4
  337. package/es/components/notification/src/notification.mjs.map +1 -1
  338. package/es/components/notification/src/notification.vue.d.ts +54 -115
  339. package/es/components/notification/src/notification.vue2.mjs +32 -15
  340. package/es/components/notification/src/notification.vue2.mjs.map +1 -1
  341. package/es/components/notification/src/notify.d.ts +3 -3
  342. package/es/components/notification/src/notify.mjs.map +1 -1
  343. package/es/components/popconfirm/src/popconfirm.d.ts +72 -3
  344. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  345. package/es/components/popconfirm/src/popconfirm.vue.d.ts +45 -67
  346. package/es/components/popconfirm/src/popconfirm.vue2.mjs +33 -16
  347. package/es/components/popconfirm/src/popconfirm.vue2.mjs.map +1 -1
  348. package/es/components/popover/index.mjs +1 -1
  349. package/es/components/popover/src/popover.d.ts +134 -5
  350. package/es/components/popover/src/popover.mjs +26 -1
  351. package/es/components/popover/src/popover.mjs.map +1 -1
  352. package/es/components/popover/src/popover.vue.d.ts +75 -326
  353. package/es/components/popover/src/popover.vue2.mjs +51 -26
  354. package/es/components/popover/src/popover.vue2.mjs.map +1 -1
  355. package/es/components/table/src/table-column/index.d.ts +1 -1
  356. package/es/components/tabs/src/tab-bar.d.ts +34 -23
  357. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  358. package/es/components/tabs/src/tab-bar.vue.d.ts +28 -180
  359. package/es/components/tabs/src/tab-bar.vue2.mjs +4 -2
  360. package/es/components/tabs/src/tab-bar.vue2.mjs.map +1 -1
  361. package/es/components/tabs/src/tab-nav.d.ts +75 -75
  362. package/es/components/tabs/src/tab-pane.d.ts +29 -2
  363. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  364. package/es/components/tabs/src/tab-pane.vue.d.ts +26 -27
  365. package/es/components/tabs/src/tab-pane.vue2.mjs +7 -2
  366. package/es/components/tabs/src/tab-pane.vue2.mjs.map +1 -1
  367. package/es/components/tabs/src/tabs.d.ts +5 -5
  368. package/es/components/time-select/src/time-select.d.ts +84 -2
  369. package/es/components/time-select/src/time-select.mjs.map +1 -1
  370. package/es/components/time-select/src/time-select.vue.d.ts +60 -109
  371. package/es/components/time-select/src/time-select.vue2.mjs +36 -14
  372. package/es/components/time-select/src/time-select.vue2.mjs.map +1 -1
  373. package/es/components/timeline/src/timeline-item.d.ts +46 -3
  374. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  375. package/es/components/timeline/src/timeline-item.vue.d.ts +35 -39
  376. package/es/components/timeline/src/timeline-item.vue2.mjs +18 -9
  377. package/es/components/timeline/src/timeline-item.vue2.mjs.map +1 -1
  378. package/es/components/tooltip/index.mjs +2 -2
  379. package/es/components/tooltip/src/content.d.ts +69 -2
  380. package/es/components/tooltip/src/content.mjs +10 -3
  381. package/es/components/tooltip/src/content.mjs.map +1 -1
  382. package/es/components/tooltip/src/content.vue.d.ts +90 -555
  383. package/es/components/tooltip/src/content.vue2.mjs +59 -22
  384. package/es/components/tooltip/src/content.vue2.mjs.map +1 -1
  385. package/es/components/tooltip/src/tooltip.d.ts +19 -3
  386. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  387. package/es/components/tooltip/src/tooltip.vue.d.ts +103 -668
  388. package/es/components/tooltip/src/tooltip.vue2.mjs +102 -41
  389. package/es/components/tooltip/src/tooltip.vue2.mjs.map +1 -1
  390. package/es/components/tooltip/src/trigger.d.ts +34 -2
  391. package/es/components/tooltip/src/trigger.mjs +9 -1
  392. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  393. package/es/components/tooltip/src/trigger.vue.d.ts +27 -120
  394. package/es/components/tooltip/src/trigger.vue2.mjs +21 -5
  395. package/es/components/tooltip/src/trigger.vue2.mjs.map +1 -1
  396. package/es/components/transfer/src/composables/use-check.d.ts +3 -1
  397. package/es/components/transfer/src/composables/use-check.mjs.map +1 -1
  398. package/es/components/transfer/src/composables/use-computed-data.d.ts +1 -1
  399. package/es/components/transfer/src/composables/use-computed-data.mjs.map +1 -1
  400. package/es/components/transfer/src/composables/use-move.d.ts +1 -1
  401. package/es/components/transfer/src/composables/use-move.mjs.map +1 -1
  402. package/es/components/transfer/src/composables/use-props-alias.d.ts +2 -4
  403. package/es/components/transfer/src/composables/use-props-alias.mjs.map +1 -1
  404. package/es/components/transfer/src/transfer-panel.d.ts +19 -3
  405. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  406. package/es/components/transfer/src/transfer-panel.vue.d.ts +41 -56
  407. package/es/components/transfer/src/transfer-panel.vue2.mjs +24 -9
  408. package/es/components/transfer/src/transfer-panel.vue2.mjs.map +1 -1
  409. package/es/components/transfer/src/transfer.d.ts +65 -2
  410. package/es/components/transfer/src/transfer.mjs.map +1 -1
  411. package/es/components/transfer/src/transfer.vue.d.ts +57 -70
  412. package/es/components/transfer/src/transfer.vue2.mjs +33 -14
  413. package/es/components/transfer/src/transfer.vue2.mjs.map +1 -1
  414. package/es/hooks/index.mjs +1 -1
  415. package/es/hooks/use-aria/index.d.ts +14 -0
  416. package/es/hooks/use-aria/index.mjs.map +1 -1
  417. package/es/hooks/use-delayed-toggle/index.d.ts +26 -4
  418. package/es/hooks/use-delayed-toggle/index.mjs +6 -1
  419. package/es/hooks/use-delayed-toggle/index.mjs.map +1 -1
  420. package/es/hooks/use-empty-values/index.d.ts +17 -4
  421. package/es/hooks/use-empty-values/index.mjs.map +1 -1
  422. package/es/index.mjs +6 -6
  423. package/es/version.d.ts +1 -1
  424. package/es/version.mjs +1 -1
  425. package/es/version.mjs.map +1 -1
  426. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
  427. package/lib/components/autocomplete/src/autocomplete.vue2.js +1 -1
  428. package/lib/components/cascader/src/cascader.d.ts +127 -3
  429. package/lib/components/cascader/src/cascader.js.map +1 -1
  430. package/lib/components/cascader/src/cascader.vue.d.ts +79 -395
  431. package/lib/components/cascader/src/cascader.vue2.js +68 -27
  432. package/lib/components/cascader/src/cascader.vue2.js.map +1 -1
  433. package/lib/components/cascader-panel/src/config.d.ts +21 -0
  434. package/lib/components/cascader-panel/src/config.js.map +1 -1
  435. package/lib/components/cascader-panel/src/index.vue.d.ts +30 -37
  436. package/lib/components/cascader-panel/src/index.vue2.js +8 -2
  437. package/lib/components/cascader-panel/src/index.vue2.js.map +1 -1
  438. package/lib/components/checkbox/index.js +1 -0
  439. package/lib/components/checkbox/index.js.map +1 -1
  440. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +46 -122
  441. package/lib/components/checkbox/src/checkbox-button.vue2.js +24 -5
  442. package/lib/components/checkbox/src/checkbox-button.vue2.js.map +1 -1
  443. package/lib/components/checkbox/src/checkbox-group.d.ts +61 -4
  444. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  445. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +41 -91
  446. package/lib/components/checkbox/src/checkbox-group.vue2.js +18 -4
  447. package/lib/components/checkbox/src/checkbox-group.vue2.js.map +1 -1
  448. package/lib/components/checkbox/src/checkbox.d.ts +90 -2
  449. package/lib/components/checkbox/src/checkbox.js +15 -1
  450. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  451. package/lib/components/checkbox/src/checkbox.vue.d.ts +46 -122
  452. package/lib/components/checkbox/src/checkbox.vue2.js +27 -8
  453. package/lib/components/checkbox/src/checkbox.vue2.js.map +1 -1
  454. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -1
  455. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +1 -1
  456. package/lib/components/color-picker/index.js +1 -0
  457. package/lib/components/color-picker/index.js.map +1 -1
  458. package/lib/components/color-picker/src/color-picker.d.ts +86 -2
  459. package/lib/components/color-picker/src/color-picker.js +12 -0
  460. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  461. package/lib/components/color-picker/src/color-picker.vue.d.ts +48 -291
  462. package/lib/components/color-picker/src/color-picker.vue2.js +31 -12
  463. package/lib/components/color-picker/src/color-picker.vue2.js.map +1 -1
  464. package/lib/components/dialog/src/dialog-content.d.ts +66 -1
  465. package/lib/components/dialog/src/dialog-content.js +9 -0
  466. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  467. package/lib/components/dialog/src/dialog-content.vue.d.ts +39 -46
  468. package/lib/components/dialog/src/dialog-content.vue2.js +21 -8
  469. package/lib/components/dialog/src/dialog-content.vue2.js.map +1 -1
  470. package/lib/components/dialog/src/dialog.d.ts +89 -2
  471. package/lib/components/dialog/src/dialog.js.map +1 -1
  472. package/lib/components/dialog/src/dialog.vue.d.ts +66 -138
  473. package/lib/components/dialog/src/dialog.vue2.js +60 -16
  474. package/lib/components/dialog/src/dialog.vue2.js.map +1 -1
  475. package/lib/components/dialog/src/use-dialog.d.ts +3 -3
  476. package/lib/components/drawer/src/drawer.vue.d.ts +4 -4
  477. package/lib/components/form/src/form-item.d.ts +58 -2
  478. package/lib/components/form/src/form-item.js.map +1 -1
  479. package/lib/components/form/src/form-item.vue.d.ts +33 -84
  480. package/lib/components/form/src/form-item.vue2.js +15 -3
  481. package/lib/components/form/src/form-item.vue2.js.map +1 -1
  482. package/lib/components/form/src/form.d.ts +83 -3
  483. package/lib/components/form/src/form.js.map +1 -1
  484. package/lib/components/form/src/form.vue.d.ts +42 -69
  485. package/lib/components/form/src/form.vue2.js +18 -1
  486. package/lib/components/form/src/form.vue2.js.map +1 -1
  487. package/lib/components/index.js +5 -0
  488. package/lib/components/index.js.map +1 -1
  489. package/lib/components/notification/src/notification.d.ts +73 -4
  490. package/lib/components/notification/src/notification.js.map +1 -1
  491. package/lib/components/notification/src/notification.vue.d.ts +54 -115
  492. package/lib/components/notification/src/notification.vue2.js +30 -13
  493. package/lib/components/notification/src/notification.vue2.js.map +1 -1
  494. package/lib/components/notification/src/notify.d.ts +3 -3
  495. package/lib/components/notification/src/notify.js.map +1 -1
  496. package/lib/components/popconfirm/src/popconfirm.d.ts +72 -3
  497. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  498. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +45 -67
  499. package/lib/components/popconfirm/src/popconfirm.vue2.js +32 -15
  500. package/lib/components/popconfirm/src/popconfirm.vue2.js.map +1 -1
  501. package/lib/components/popover/index.js +1 -0
  502. package/lib/components/popover/index.js.map +1 -1
  503. package/lib/components/popover/src/popover.d.ts +134 -5
  504. package/lib/components/popover/src/popover.js +26 -0
  505. package/lib/components/popover/src/popover.js.map +1 -1
  506. package/lib/components/popover/src/popover.vue.d.ts +75 -326
  507. package/lib/components/popover/src/popover.vue2.js +49 -24
  508. package/lib/components/popover/src/popover.vue2.js.map +1 -1
  509. package/lib/components/table/src/table-column/index.d.ts +1 -1
  510. package/lib/components/tabs/src/tab-bar.d.ts +34 -23
  511. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  512. package/lib/components/tabs/src/tab-bar.vue.d.ts +28 -180
  513. package/lib/components/tabs/src/tab-bar.vue2.js +4 -2
  514. package/lib/components/tabs/src/tab-bar.vue2.js.map +1 -1
  515. package/lib/components/tabs/src/tab-nav.d.ts +75 -75
  516. package/lib/components/tabs/src/tab-pane.d.ts +29 -2
  517. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  518. package/lib/components/tabs/src/tab-pane.vue.d.ts +26 -27
  519. package/lib/components/tabs/src/tab-pane.vue2.js +7 -2
  520. package/lib/components/tabs/src/tab-pane.vue2.js.map +1 -1
  521. package/lib/components/tabs/src/tabs.d.ts +5 -5
  522. package/lib/components/time-select/src/time-select.d.ts +84 -2
  523. package/lib/components/time-select/src/time-select.js.map +1 -1
  524. package/lib/components/time-select/src/time-select.vue.d.ts +60 -109
  525. package/lib/components/time-select/src/time-select.vue2.js +36 -14
  526. package/lib/components/time-select/src/time-select.vue2.js.map +1 -1
  527. package/lib/components/timeline/src/timeline-item.d.ts +46 -3
  528. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  529. package/lib/components/timeline/src/timeline-item.vue.d.ts +35 -39
  530. package/lib/components/timeline/src/timeline-item.vue2.js +18 -9
  531. package/lib/components/timeline/src/timeline-item.vue2.js.map +1 -1
  532. package/lib/components/tooltip/index.js +2 -0
  533. package/lib/components/tooltip/index.js.map +1 -1
  534. package/lib/components/tooltip/src/content.d.ts +69 -2
  535. package/lib/components/tooltip/src/content.js +8 -0
  536. package/lib/components/tooltip/src/content.js.map +1 -1
  537. package/lib/components/tooltip/src/content.vue.d.ts +90 -555
  538. package/lib/components/tooltip/src/content.vue2.js +58 -21
  539. package/lib/components/tooltip/src/content.vue2.js.map +1 -1
  540. package/lib/components/tooltip/src/tooltip.d.ts +19 -3
  541. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  542. package/lib/components/tooltip/src/tooltip.vue.d.ts +103 -668
  543. package/lib/components/tooltip/src/tooltip.vue2.js +100 -39
  544. package/lib/components/tooltip/src/tooltip.vue2.js.map +1 -1
  545. package/lib/components/tooltip/src/trigger.d.ts +34 -2
  546. package/lib/components/tooltip/src/trigger.js +9 -0
  547. package/lib/components/tooltip/src/trigger.js.map +1 -1
  548. package/lib/components/tooltip/src/trigger.vue.d.ts +27 -120
  549. package/lib/components/tooltip/src/trigger.vue2.js +20 -4
  550. package/lib/components/tooltip/src/trigger.vue2.js.map +1 -1
  551. package/lib/components/transfer/src/composables/use-check.d.ts +3 -1
  552. package/lib/components/transfer/src/composables/use-check.js.map +1 -1
  553. package/lib/components/transfer/src/composables/use-computed-data.d.ts +1 -1
  554. package/lib/components/transfer/src/composables/use-computed-data.js.map +1 -1
  555. package/lib/components/transfer/src/composables/use-move.d.ts +1 -1
  556. package/lib/components/transfer/src/composables/use-move.js.map +1 -1
  557. package/lib/components/transfer/src/composables/use-props-alias.d.ts +2 -4
  558. package/lib/components/transfer/src/composables/use-props-alias.js.map +1 -1
  559. package/lib/components/transfer/src/transfer-panel.d.ts +19 -3
  560. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  561. package/lib/components/transfer/src/transfer-panel.vue.d.ts +41 -56
  562. package/lib/components/transfer/src/transfer-panel.vue2.js +23 -8
  563. package/lib/components/transfer/src/transfer-panel.vue2.js.map +1 -1
  564. package/lib/components/transfer/src/transfer.d.ts +65 -2
  565. package/lib/components/transfer/src/transfer.js.map +1 -1
  566. package/lib/components/transfer/src/transfer.vue.d.ts +57 -70
  567. package/lib/components/transfer/src/transfer.vue2.js +32 -13
  568. package/lib/components/transfer/src/transfer.vue2.js.map +1 -1
  569. package/lib/hooks/index.js +1 -0
  570. package/lib/hooks/index.js.map +1 -1
  571. package/lib/hooks/use-aria/index.d.ts +14 -0
  572. package/lib/hooks/use-aria/index.js.map +1 -1
  573. package/lib/hooks/use-delayed-toggle/index.d.ts +26 -4
  574. package/lib/hooks/use-delayed-toggle/index.js +6 -0
  575. package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
  576. package/lib/hooks/use-empty-values/index.d.ts +17 -4
  577. package/lib/hooks/use-empty-values/index.js.map +1 -1
  578. package/lib/index.js +6 -0
  579. package/lib/index.js.map +1 -1
  580. package/lib/version.d.ts +1 -1
  581. package/lib/version.js +1 -1
  582. package/lib/version.js.map +1 -1
  583. package/package.json +2 -2
  584. package/theme-chalk/el-collapse-item.css +1 -1
  585. package/theme-chalk/index.css +1 -1
  586. package/theme-chalk/src/collapse-item.scss +5 -0
  587. package/web-types.json +1 -1
@@ -1,7 +1,8 @@
1
- import { defineComponent, ref, computed, onMounted, createBlock, openBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createCommentVNode, resolveDynamicComponent, toDisplayString, renderSlot, createElementBlock, Fragment, vShow, withModifiers } from 'vue';
1
+ import { defineComponent, markRaw, ref, computed, onMounted, createBlock, openBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createCommentVNode, resolveDynamicComponent, toDisplayString, renderSlot, createElementBlock, Fragment, vShow, withModifiers } from 'vue';
2
2
  import { useEventListener, useTimeoutFn } from '@vueuse/core';
3
3
  import { ElIcon } from '../../icon/index.mjs';
4
- import { notificationEmits, notificationProps } from './notification.mjs';
4
+ import { notificationEmits } from './notification.mjs';
5
+ import { Close } from '@element-plus/icons-vue';
5
6
  import { useGlobalComponentSettings } from '../../config-provider/src/hooks/use-global-config.mjs';
6
7
  import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
7
8
  import { getEventCode } from '../../../utils/dom/event.mjs';
@@ -16,7 +17,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
16
17
  name: "ElNotification"
17
18
  },
18
19
  __name: "notification",
19
- props: notificationProps,
20
+ props: {
21
+ customClass: { type: String, required: false, default: "" },
22
+ dangerouslyUseHTMLString: { type: Boolean, required: false },
23
+ duration: { type: Number, required: false, default: 4500 },
24
+ icon: { type: null, required: false },
25
+ id: { type: String, required: false, default: "" },
26
+ message: { type: [String, Object, Function], required: false, default: "" },
27
+ offset: { type: Number, required: false, default: 0 },
28
+ onClick: { type: Function, required: false, default: () => void 0 },
29
+ onClose: { type: Function, required: true },
30
+ position: { type: String, required: false, default: "top-right" },
31
+ showClose: { type: Boolean, required: false, default: true },
32
+ title: { type: String, required: false, default: "" },
33
+ type: { type: null, required: false, default: "" },
34
+ zIndex: { type: Number, required: false },
35
+ closeIcon: { type: null, required: false, default: markRaw(Close) }
36
+ },
20
37
  emits: notificationEmits,
21
38
  setup(__props, { expose: __expose }) {
22
39
  const props = __props;
@@ -89,20 +106,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
89
106
  return (_ctx, _cache) => {
90
107
  return openBlock(), createBlock(Transition, {
91
108
  name: unref(ns).b("fade"),
92
- onBeforeLeave: _ctx.onClose,
109
+ onBeforeLeave: __props.onClose,
93
110
  onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
94
111
  persisted: ""
95
112
  }, {
96
113
  default: withCtx(() => [
97
114
  withDirectives(createElementVNode("div", {
98
- id: _ctx.id,
99
- class: normalizeClass([unref(ns).b(), _ctx.customClass, horizontalClass.value]),
115
+ id: __props.id,
116
+ class: normalizeClass([unref(ns).b(), __props.customClass, horizontalClass.value]),
100
117
  style: normalizeStyle(positionStyle.value),
101
118
  role: "alert",
102
119
  onMouseenter: clearTimer,
103
120
  onMouseleave: startTimer,
104
121
  onClick: _cache[0] || (_cache[0] = //@ts-ignore
105
- (...args) => _ctx.onClick && _ctx.onClick(...args))
122
+ (...args) => __props.onClick && __props.onClick(...args))
106
123
  }, [
107
124
  iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
108
125
  key: 0,
@@ -122,20 +139,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
122
139
  [
123
140
  createElementVNode("h2", {
124
141
  class: normalizeClass(unref(ns).e("title")),
125
- textContent: toDisplayString(_ctx.title)
142
+ textContent: toDisplayString(__props.title)
126
143
  }, null, 10, _hoisted_2),
127
144
  withDirectives(createElementVNode(
128
145
  "div",
129
146
  {
130
147
  class: normalizeClass(unref(ns).e("content")),
131
- style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
148
+ style: normalizeStyle(!!__props.title ? void 0 : { margin: 0 })
132
149
  },
133
150
  [
134
151
  renderSlot(_ctx.$slots, "default", {}, () => [
135
- !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock(
152
+ !__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock(
136
153
  "p",
137
154
  _hoisted_3,
138
- toDisplayString(_ctx.message),
155
+ toDisplayString(__props.message),
139
156
  1
140
157
  /* TEXT */
141
158
  )) : (openBlock(), createElementBlock(
@@ -143,7 +160,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
143
160
  { key: 1 },
144
161
  [
145
162
  createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
146
- createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
163
+ createElementVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_4)
147
164
  ],
148
165
  2112
149
166
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
@@ -153,15 +170,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
153
170
  6
154
171
  /* CLASS, STYLE */
155
172
  ), [
156
- [vShow, _ctx.message]
173
+ [vShow, __props.message]
157
174
  ]),
158
- _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
175
+ __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
159
176
  key: 0,
160
177
  class: normalizeClass(unref(ns).e("closeBtn")),
161
178
  onClick: withModifiers(close, ["stop"])
162
179
  }, {
163
180
  default: withCtx(() => [
164
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon)))
181
+ (openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon)))
165
182
  ]),
166
183
  _: 1
167
184
  /* STABLE */
@@ -1 +1 @@
1
- {"version":3,"file":"notification.vue2.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 >\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 <component :is=\"closeIcon\" />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponentsMap, getEventCode } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { notificationEmits, notificationProps } from './notification'\n\nimport type { CSSProperties } from 'vue'\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 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(event: KeyboardEvent) {\n const code = getEventCode(event)\n\n switch (code) {\n case EVENT_CODE.delete:\n case EVENT_CODE.backspace:\n clearTimer() // press delete/backspace clear timer\n break\n case EVENT_CODE.esc:\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n break\n default: // resume timer\n startTimer()\n break\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":["_createBlock","_Transition","_unref","onClose","$emit","_createElementVNode","id","customClass","_normalizeClass","_openBlock","_resolveDynamicComponent","_toDisplayString","title","_normalizeStyle","_renderSlot","dangerouslyUseHTMLString","_createElementBlock","message","_Fragment","_createCommentVNode","showClose","closeIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuDA,IAAA,MAAM,KAAA,GAAQ,OAAA;AAGd,IAAA,MAAM,EAAE,EAAA,EAAI,MAAA,EAAO,GAAI,2BAA2B,cAAc,CAAA;AAChE,IAAA,MAAM,EAAE,UAAA,EAAY,aAAA,EAAc,GAAI,MAAA;AAEtC,IAAA,MAAM,OAAA,GAAU,IAAI,KAAK,CAAA;AACzB,IAAA,IAAI,KAAA,GAAkC,MAAA;AAEtC,IAAA,MAAM,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAA,MAAM,OAAO,KAAA,CAAM,IAAA;AACnB,MAAA,OAAO,IAAA,IAAQ,kBAAkB,KAAA,CAAM,IAAI,IAAI,EAAA,CAAG,CAAA,CAAE,IAAI,CAAA,GAAI,EAAA;AAAA,IAC9D,CAAC,CAAA;AAED,IAAA,MAAM,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,IAAI,CAAC,KAAA,CAAM,IAAA,EAAM,OAAO,KAAA,CAAM,IAAA;AAC9B,MAAA,OAAO,iBAAA,CAAkB,KAAA,CAAM,IAAI,CAAA,IAAK,KAAA,CAAM,IAAA;AAAA,IAChD,CAAC,CAAA;AAED,IAAA,MAAM,eAAA,GAAkB,QAAA;AAAA,MAAS,MAC/B,KAAA,CAAM,QAAA,CAAS,QAAA,CAAS,OAAO,IAAI,OAAA,GAAU;AAAA,KAC/C;AAEA,IAAA,MAAM,gBAAA,GAAmB,QAAA;AA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A,CAAA,MAAA,CAAA,EAAA;AAAA;kBAFiB,OAAKM,cAAA,CAAEN,KAAA,CAAA,EAAA,CAAA,CAAG,CAAA,CAAC,UAAA,CAAA,CAAA;AAAA,kBAAe,OAAA,gBAAY,KAAA,EAAK,CAAA,MAAA,CAAA;AAAA;mCACpE,MAA6B;AAAA,qBAA7BO,WAAA,EAAAT,WAAA,CAA6BU,uBAAA,CAAbW,IAAAA,CAAAA,SAAS,CAAA,CAAA;AAAA;;;;;;;;;oBA1BrB,OAAA,CAAA,KAAO;AAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"notification.vue2.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 >\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 <component :is=\"closeIcon\" />\n </el-icon>\n </div>\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, markRaw, onMounted, ref } from 'vue'\nimport { useEventListener, useTimeoutFn } from '@vueuse/core'\nimport { TypeComponentsMap, getEventCode } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useGlobalComponentSettings } from '@element-plus/components/config-provider'\nimport { notificationEmits } from './notification'\nimport { Close } from '@element-plus/icons-vue'\n\nimport type { CSSProperties } from 'vue'\nimport type { NotificationProps } from './notification'\n\ndefineOptions({\n name: 'ElNotification',\n})\n\nconst props = withDefaults(defineProps<NotificationProps>(), {\n customClass: '',\n duration: 4500,\n id: '',\n message: '',\n offset: 0,\n onClick: () => undefined,\n position: 'top-right',\n showClose: true,\n title: '',\n type: '',\n closeIcon: markRaw(Close),\n})\ndefineEmits(notificationEmits)\n\nconst { ns, zIndex } = useGlobalComponentSettings('notification')\nconst { nextZIndex, currentZIndex } = zIndex\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(event: KeyboardEvent) {\n const code = getEventCode(event)\n\n switch (code) {\n case EVENT_CODE.delete:\n case EVENT_CODE.backspace:\n clearTimer() // press delete/backspace clear timer\n break\n case EVENT_CODE.esc:\n // press esc to close the notification\n if (visible.value) {\n close()\n }\n break\n default: // resume timer\n startTimer()\n break\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":["_createBlock","_Transition","_unref","$emit","_createElementVNode","_normalizeClass","_openBlock","_resolveDynamicComponent","_toDisplayString","_normalizeStyle","_renderSlot","_createElementBlock","_Fragment","_createCommentVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,IAAA,MAAM,KAAA,GAAQ,OAAA;AAed,IAAA,MAAM,EAAE,EAAA,EAAI,MAAA,EAAO,GAAI,2BAA2B,cAAc,CAAA;AAChE,IAAA,MAAM,EAAE,UAAA,EAAY,aAAA,EAAc,GAAI,MAAA;AAEtC,IAAA,MAAM,OAAA,GAAU,IAAI,KAAK,CAAA;AACzB,IAAA,IAAI,KAAA,GAAkC,MAAA;AAEtC,IAAA,MAAM,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAA,MAAM,OAAO,KAAA,CAAM,IAAA;AACnB,MAAA,OAAO,IAAA,IAAQ,kBAAkB,KAAA,CAAM,IAAI,IAAI,EAAA,CAAG,CAAA,CAAE,IAAI,CAAA,GAAI,EAAA;AAAA,IAC9D,CAAC,CAAA;AAED,IAAA,MAAM,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,IAAI,CAAC,KAAA,CAAM,IAAA,EAAM,OAAO,KAAA,CAAM,IAAA;AAC9B,MAAA,OAAO,iBAAA,CAAkB,KAAA,CAAM,IAAI,CAAA,IAAK,KAAA,CAAM,IAAA;AAAA,IAChD,CAAC,CAAA;AAED,IAAA,MAAM,eAAA,GAAkB,QAAA;AAAA,MAAS,MAC/B,KAAA,CAAM,QAAA,CAAS,QAAA,CAAS,OAAO,IAAI,OAAA,GAAU;AAAA,KAC/C;AAEA,IAAA,MAAM,gBAAA,GAAmB,QAAA;AAAA,MAAS,MAChC,KAAA,CAAM,QAAA,CAAS,UAAA,CAAW,KAAK,IAAI,KAAA,GAAQ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CAAA,CAAA;AAAA,kBAAe,OAAA,gBAAY,KAAA,EAAK,CAAA,MAAA,CAAA;AAAA;mCACpE,MAA6B;AAAA,qBAA7BI,WAAA,EAAAN,WAAA,CAA6BO,uBAAA,CAAb,OAAA,CAAA,SAAS,CAAA,CAAA;AAAA;;;;;;;;;oBA1BrB,OAAA,CAAA,KAAO;AAAA;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import type { VNode } from 'vue';
2
- import type { NotificationOptions, Notify } from './notification';
2
+ import type { NotificationPosition, Notify } from './notification';
3
3
  /**
4
4
  * This function gets called when user click `x` button or press `esc` or the time reached its limitation.
5
5
  * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called
@@ -8,8 +8,8 @@ import type { NotificationOptions, Notify } from './notification';
8
8
  * @param {Position} position the positioning strategy
9
9
  * @param {Function} userOnClose the callback called when close passed by user
10
10
  */
11
- export declare function close(id: string, position: NotificationOptions['position'], userOnClose?: (vm: VNode) => void): void;
11
+ export declare function close(id: string, position: NotificationPosition, userOnClose?: (vm: VNode) => void): void;
12
12
  export declare function closeAll(): void;
13
- export declare function updateOffsets(position?: NotificationOptions['position']): void;
13
+ export declare function updateOffsets(position?: NotificationPosition): void;
14
14
  declare const _default: Notify;
15
15
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"notify.mjs","sources":["../../../../../../packages/components/notification/src/notify.ts"],"sourcesContent":["import { createVNode, isVNode, render } from 'vue'\nimport {\n debugWarn,\n isClient,\n isElement,\n isFunction,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport NotificationConstructor from './notification.vue'\nimport { notificationTypes } from './notification'\n\nimport type { Ref, VNode } from 'vue'\nimport type {\n NotificationOptions,\n NotificationProps,\n NotificationQueue,\n Notify,\n NotifyFn,\n} from './notification'\n\n// This should be a queue but considering there were `non-autoclosable` notifications.\nconst notifications: Record<\n NotificationOptions['position'],\n NotificationQueue\n> = {\n 'top-left': [],\n 'top-right': [],\n 'bottom-left': [],\n 'bottom-right': [],\n}\n\n// the gap size between each notification\nconst GAP_SIZE = 16\nlet seed = 1\n\nconst notify: NotifyFn & Partial<Notify> = function (options = {}, context) {\n if (!isClient) return { close: () => undefined }\n\n if (isString(options) || isVNode(options)) {\n options = { message: options }\n }\n\n const position = options.position || 'top-right'\n\n let verticalOffset = options.offset || 0\n notifications[position].forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n })\n verticalOffset += GAP_SIZE\n\n const id = `notification_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<NotificationProps> = {\n ...options,\n offset: verticalOffset,\n id,\n onClose: () => {\n close(id, position, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (isElement(options.appendTo)) {\n appendTo = options.appendTo\n } else if (isString(options.appendTo)) {\n appendTo = document.querySelector(options.appendTo)\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElNotification',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n const container = document.createElement('div')\n\n const vm = createVNode(\n NotificationConstructor,\n props,\n isFunction(props.message)\n ? props.message\n : isVNode(props.message)\n ? () => props.message\n : null\n )\n vm.appContext = isUndefined(context) ? notify._context : context\n\n // clean notification element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\n }\n\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n render(vm, container)\n notifications[position].push({ vm })\n appendTo.appendChild(container.firstElementChild!)\n\n return {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n },\n }\n}\nnotificationTypes.forEach((type) => {\n notify[type] = (options = {}, appContext) => {\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return notify({ ...options, type }, appContext)\n }\n})\n\n/**\n * This function gets called when user click `x` button or press `esc` or the time reached its limitation.\n * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called\n * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.\n * @param {String} id notification id to be closed\n * @param {Position} position the positioning strategy\n * @param {Function} userOnClose the callback called when close passed by user\n */\nexport function close(\n id: string,\n position: NotificationOptions['position'],\n userOnClose?: (vm: VNode) => void\n): void {\n // maybe we can store the index when inserting the vm to notification list.\n const orientedNotifications = notifications[position]\n const idx = orientedNotifications.findIndex(\n ({ vm }) => vm.component?.props.id === id\n )\n if (idx === -1) return\n const { vm } = orientedNotifications[idx]\n if (!vm) return\n // calling user's on close function before notification gets removed from DOM.\n userOnClose?.(vm)\n\n // note that this is called @before-leave, that's why we were able to fetch this property.\n const removedHeight = vm.el!.offsetHeight\n const verticalPos = position.split('-')[0]\n orientedNotifications.splice(idx, 1)\n const len = orientedNotifications.length\n if (len < 1) return\n // starting from the removing item.\n for (let i = idx; i < len; i++) {\n // new position equals the current offsetTop minus removed height plus 16px(the gap size between each item)\n const { el, component } = orientedNotifications[i].vm\n const pos =\n Number.parseInt(el!.style[verticalPos], 10) - removedHeight - GAP_SIZE\n component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n // loop through all directions, close them at once.\n for (const orientedNotifications of Object.values(notifications)) {\n orientedNotifications.forEach(({ vm }) => {\n // same as the previous close method, we'd like to make sure lifecycle gets handle properly.\n ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n })\n }\n}\n\nexport function updateOffsets(\n position: NotificationOptions['position'] = 'top-right'\n) {\n let verticalOffset =\n notifications[position][0]?.vm.component?.props?.offset || 0\n\n for (const { vm } of notifications[position]) {\n vm.component!.props.offset = verticalOffset\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n }\n}\n\nnotify.closeAll = closeAll\nnotify.updateOffsets = updateOffsets\nnotify._context = null\n\nexport default notify as Notify\n"],"names":["vm","NotificationConstructor"],"mappings":";;;;;;;;AAsBA,MAAM,aAAA,GAGF;AA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5C,IAAA,EAAA,CAAG,SAAA,CAAW,MAAM,MAAA,GAAS,cAAA;AAC7B,IAAA,cAAA,IAAA,CAAA,CAAA,CAAmB,EAAA,GAAA,EAAA,CAAG,EAAA,KAAH,IAAA,GAAA,MAAA,GAAA,EAAA,CAAO,YAAA,KAAgB,CAAA,IAAK,QAAA;AAAA,EACjD;AACF;AAEA,MAAA,CAAO,QAAA,GAAW,QAAA;AAClB,MAAA,CAAO,aAAA,GAAgB,aAAA;AACvB,MAAA,CAAO,QAAA,GAAW,IAAA;;;;"}
1
+ {"version":3,"file":"notify.mjs","sources":["../../../../../../packages/components/notification/src/notify.ts"],"sourcesContent":["import { createVNode, isVNode, render } from 'vue'\nimport {\n debugWarn,\n isClient,\n isElement,\n isFunction,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport NotificationConstructor from './notification.vue'\nimport { notificationTypes } from './notification'\n\nimport type { Ref, VNode } from 'vue'\nimport type {\n NotificationPosition,\n NotificationProps,\n NotificationQueue,\n Notify,\n NotifyFn,\n} from './notification'\n\n// This should be a queue but considering there were `non-autoclosable` notifications.\nconst notifications: Record<NotificationPosition, NotificationQueue> = {\n 'top-left': [],\n 'top-right': [],\n 'bottom-left': [],\n 'bottom-right': [],\n}\n\n// the gap size between each notification\nconst GAP_SIZE = 16\nlet seed = 1\n\nconst notify: NotifyFn & Partial<Notify> = function (options = {}, context) {\n if (!isClient) return { close: () => undefined }\n\n if (isString(options) || isVNode(options)) {\n options = { message: options }\n }\n\n const position = options.position || 'top-right'\n\n let verticalOffset = options.offset || 0\n notifications[position].forEach(({ vm }) => {\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n })\n verticalOffset += GAP_SIZE\n\n const id = `notification_${seed++}`\n const userOnClose = options.onClose\n const props: Partial<NotificationProps> = {\n ...options,\n offset: verticalOffset,\n id,\n onClose: () => {\n close(id, position, userOnClose)\n },\n }\n\n let appendTo: HTMLElement | null = document.body\n if (isElement(options.appendTo)) {\n appendTo = options.appendTo\n } else if (isString(options.appendTo)) {\n appendTo = document.querySelector(options.appendTo)\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElNotification',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n const container = document.createElement('div')\n\n const vm = createVNode(\n NotificationConstructor,\n props,\n isFunction(props.message)\n ? props.message\n : isVNode(props.message)\n ? () => props.message\n : null\n )\n vm.appContext = isUndefined(context) ? notify._context : context\n\n // clean notification element preventing mem leak\n vm.props!.onDestroy = () => {\n render(null, container)\n }\n\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n render(vm, container)\n notifications[position].push({ vm })\n appendTo.appendChild(container.firstElementChild!)\n\n return {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n },\n }\n}\nnotificationTypes.forEach((type) => {\n notify[type] = (options = {}, appContext) => {\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n }\n return notify({ ...options, type }, appContext)\n }\n})\n\n/**\n * This function gets called when user click `x` button or press `esc` or the time reached its limitation.\n * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called\n * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.\n * @param {String} id notification id to be closed\n * @param {Position} position the positioning strategy\n * @param {Function} userOnClose the callback called when close passed by user\n */\nexport function close(\n id: string,\n position: NotificationPosition,\n userOnClose?: (vm: VNode) => void\n): void {\n // maybe we can store the index when inserting the vm to notification list.\n const orientedNotifications = notifications[position]\n const idx = orientedNotifications.findIndex(\n ({ vm }) => vm.component?.props.id === id\n )\n if (idx === -1) return\n const { vm } = orientedNotifications[idx]\n if (!vm) return\n // calling user's on close function before notification gets removed from DOM.\n userOnClose?.(vm)\n\n // note that this is called @before-leave, that's why we were able to fetch this property.\n const removedHeight = vm.el!.offsetHeight\n const verticalPos = position.split('-')[0]\n orientedNotifications.splice(idx, 1)\n const len = orientedNotifications.length\n if (len < 1) return\n // starting from the removing item.\n for (let i = idx; i < len; i++) {\n // new position equals the current offsetTop minus removed height plus 16px(the gap size between each item)\n const { el, component } = orientedNotifications[i].vm\n const pos =\n Number.parseInt(el!.style[verticalPos], 10) - removedHeight - GAP_SIZE\n component!.props.offset = pos\n }\n}\n\nexport function closeAll(): void {\n // loop through all directions, close them at once.\n for (const orientedNotifications of Object.values(notifications)) {\n orientedNotifications.forEach(({ vm }) => {\n // same as the previous close method, we'd like to make sure lifecycle gets handle properly.\n ;(vm.component!.exposed as { visible: Ref<boolean> }).visible.value =\n false\n })\n }\n}\n\nexport function updateOffsets(position: NotificationPosition = 'top-right') {\n let verticalOffset =\n notifications[position][0]?.vm.component?.props?.offset || 0\n\n for (const { vm } of notifications[position]) {\n vm.component!.props.offset = verticalOffset\n verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE\n }\n}\n\nnotify.closeAll = closeAll\nnotify.updateOffsets = updateOffsets\nnotify._context = null\n\nexport default notify as Notify\n"],"names":["vm","NotificationConstructor"],"mappings":";;;;;;;;AAsBA,MAAM,aAAA,GAAiE;AAAA,EACrE,YAAY,EAAC;AAAA,EACb,aAAa,EAAC;AAAA,EACd,eAAe,EAAC;AAAA,EAChB,gBAAgB;AAClB,CAAA;AAGA,MAAM,QAAA,GAAW,EAAA;AACjB,IAAI,IAAA,GAAO,CAAA;AAEX,MAAM,MAAA,GAAqC,SAAU,OAAA,GAAU,IAAI,OAAA,EAAS;AAC1E,EAAA,IAAI,CAAC,QAAA,EAAU,OAAO,EAAE,KAAA,EAAO,MAAM,MAAA,EAAU;AAE/C,EAAA,IAAI,QAAA,CAAS,OAAO,CAAA,IAAK,OAAA,CAAQ,OAAO,CAAA,EAAG;AACzC,IAAA,OAAA,GAAU,EAAE,SAAS,OAAA,EAAQ;AAAA,EAC/B;AAEA,EAAA,MAAM,QAAA,GAAW,QAAQ,QAAA,IAAY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,IAAyB,MAAA,CAAO,MAAA,CAAO,aAAa,CAAA,EAAG;AAChE,IAAA,qBAAA,CAAsB,OAAA,CAAQ,CAAC,EAAE,EAAA,EAAG,KAAM;AAEvC,MAAC,EAAA,CAAG,SAAA,CAAW,OAAA,CAAsC,OAAA,CAAQ,KAAA,GAC5D,KAAA;AAAA,IACJ,CAAC,CAAA;AAAA,EACH;AACF;AAEO,SAAS,aAAA,CAAc,WAAiC,WAAA,EAAa;AAzK5E,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AA0KE,EAAA,IAAI,cAAA,GAAA,CAAA,CACF,EAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,aAAA,CAAc,QAAQ,CAAA,CAAE,CAAC,CAAA,KAAzB,IAAA,GAAA,MAAA,GAAA,EAAA,CAA4B,EAAA,CAAG,SAAA,KAA/B,IAAA,GAAA,MAAA,GAAA,EAAA,CAA0C,KAAA,KAA1C,IAAA,GAAA,MAAA,GAAA,EAAA,CAAiD,MAAA,KAAU,CAAA;AAE7D,EAAA,KAAA,MAAW,EAAE,EAAA,EAAG,IAAK,aAAA,CAAc,QAAQ,CAAA,EAAG;AAC5C,IAAA,EAAA,CAAG,SAAA,CAAW,MAAM,MAAA,GAAS,cAAA;AAC7B,IAAA,cAAA,IAAA,CAAA,CAAA,CAAmB,EAAA,GAAA,EAAA,CAAG,EAAA,KAAH,IAAA,GAAA,MAAA,GAAA,EAAA,CAAO,YAAA,KAAgB,CAAA,IAAK,QAAA;AAAA,EACjD;AACF;AAEA,MAAA,CAAO,QAAA,GAAW,QAAA;AAClB,MAAA,CAAO,aAAA,GAAgB,aAAA;AACvB,MAAA,CAAO,QAAA,GAAW,IAAA;;;;"}
@@ -1,12 +1,79 @@
1
- import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
1
+ import type { Component, ExtractPublicPropTypes } from 'vue';
2
+ import type { ButtonType } from '@element-plus/nightly/es/components/button';
3
+ import type { ElTooltipContentProps, ElTooltipTriggerProps } from '@element-plus/nightly/es/components/tooltip';
2
4
  import type Popconfirm from './popconfirm.vue';
5
+ export interface PopconfirmProps {
6
+ /**
7
+ * @description Title
8
+ */
9
+ title?: string;
10
+ /**
11
+ * @description Confirm button text
12
+ */
13
+ confirmButtonText?: string;
14
+ /**
15
+ * @description Cancel button text
16
+ */
17
+ cancelButtonText?: string;
18
+ /**
19
+ * @description Confirm button type
20
+ */
21
+ confirmButtonType?: ButtonType;
22
+ /**
23
+ * @description Cancel button type
24
+ */
25
+ cancelButtonType?: ButtonType;
26
+ /**
27
+ * @description Icon Component
28
+ */
29
+ icon?: string | Component;
30
+ /**
31
+ * @description Icon color
32
+ */
33
+ iconColor?: string;
34
+ /**
35
+ * @description is hide Icon
36
+ */
37
+ hideIcon?: boolean;
38
+ /**
39
+ * @description delay of disappear, in millisecond
40
+ */
41
+ hideAfter?: number;
42
+ /**
43
+ * @description Tooltip theme, built-in theme: `dark` / `light`
44
+ */
45
+ effect?: ElTooltipContentProps['effect'];
46
+ /**
47
+ * @description whether popconfirm is teleported to the body
48
+ */
49
+ teleported?: ElTooltipContentProps['teleported'];
50
+ /**
51
+ * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed
52
+ */
53
+ persistent?: ElTooltipContentProps['persistent'];
54
+ /**
55
+ * @description popconfirm width, min width 150px
56
+ */
57
+ width?: string | number;
58
+ /**
59
+ * @description Indicates whether virtual triggering is enabled
60
+ */
61
+ virtualTriggering?: ElTooltipTriggerProps['virtualTriggering'];
62
+ /**
63
+ * @description Indicates the reference element to which the popper is attached
64
+ */
65
+ virtualRef?: ElTooltipTriggerProps['virtualRef'];
66
+ }
67
+ /**
68
+ * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
69
+ */
3
70
  export declare const popconfirmProps: {
4
71
  readonly title: StringConstructor;
5
72
  readonly confirmButtonText: StringConstructor;
6
73
  readonly cancelButtonText: StringConstructor;
7
74
  readonly confirmButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "primary", boolean>;
8
75
  readonly cancelButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "text", boolean>;
9
- readonly icon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown, () => any, boolean>;
76
+ readonly icon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, () => any, boolean>;
10
77
  readonly iconColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
11
78
  readonly hideIcon: BooleanConstructor;
12
79
  readonly hideAfter: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 200, boolean>;
@@ -39,6 +106,8 @@ export declare const popconfirmEmits: {
39
106
  cancel: (e: MouseEvent) => boolean;
40
107
  };
41
108
  export type PopconfirmEmits = typeof popconfirmEmits;
42
- export type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>;
109
+ /**
110
+ * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
111
+ */
43
112
  export type PopconfirmPropsPublic = ExtractPublicPropTypes<typeof popconfirmProps>;
44
113
  export type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"popconfirm.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: Boolean,\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n virtualTriggering: useTooltipTriggerProps.virtualTriggering,\n virtualRef: useTooltipTriggerProps.virtualRef,\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>\nexport type PopconfirmPropsPublic = ExtractPublicPropTypes<\n typeof popconfirmProps\n>\n\nexport type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown\n"],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,CAAuB,iBAAA;AAAA,EAC1C,YAAY,sBAAA,CAAuB;AACrC,CAAU;AAEH,MAAM,eAAA,GAAkB;AAAA;AAAA;AAAA;AAAA,EAI7B,OAAA,EAAS,CAAC,CAAA,KAAkB,CAAA,YAAa,UAAA;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAA,EAAQ,CAAC,CAAA,KAAkB,CAAA,YAAa;AAC1C;;;;"}
1
+ {"version":3,"file":"popconfirm.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { Component, ExtractPublicPropTypes } from 'vue'\nimport type { ButtonType } from '@element-plus/components/button'\nimport type {\n ElTooltipContentProps,\n ElTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\nimport type Popconfirm from './popconfirm.vue'\n\nexport interface PopconfirmProps {\n /**\n * @description Title\n */\n title?: string\n /**\n * @description Confirm button text\n */\n confirmButtonText?: string\n /**\n * @description Cancel button text\n */\n cancelButtonText?: string\n /**\n * @description Confirm button type\n */\n confirmButtonType?: ButtonType\n /**\n * @description Cancel button type\n */\n cancelButtonType?: ButtonType\n /**\n * @description Icon Component\n */\n icon?: string | Component\n /**\n * @description Icon color\n */\n iconColor?: string\n /**\n * @description is hide Icon\n */\n hideIcon?: boolean\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter?: number\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect?: ElTooltipContentProps['effect']\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported?: ElTooltipContentProps['teleported']\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent?: ElTooltipContentProps['persistent']\n /**\n * @description popconfirm width, min width 150px\n */\n width?: string | number\n /**\n * @description Indicates whether virtual triggering is enabled\n */\n virtualTriggering?: ElTooltipTriggerProps['virtualTriggering']\n /**\n * @description Indicates the reference element to which the popper is attached\n */\n virtualRef?: ElTooltipTriggerProps['virtualRef']\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.\n */\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: Boolean,\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n virtualTriggering: useTooltipTriggerProps.virtualTriggering,\n virtualRef: useTooltipTriggerProps.virtualRef,\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\n/**\n * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.\n */\nexport type PopconfirmPropsPublic = ExtractPublicPropTypes<\n typeof popconfirmProps\n>\n\nexport type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown\n"],"names":[],"mappings":";;;;;;;AAkFO,MAAM,kBAAkB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIxC,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,iBAAA,EAAmB,MAAA;AAAA;AAAA;AAAA;AAAA,EAInB,gBAAA,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,EAIlB,iBAAA,EAAmB;AAAA,IACjB,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,WAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,gBAAA,EAAkB;AAAA,IAChB,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,WAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,YAAA;AAAA,IACN,SAAS,MAAM;AAAA,GACjB;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU,OAAA;AAAA;AAAA;AAAA;AAAA,EAIV,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,GAAG,sBAAA,CAAuB,MAAA;AAAA,IAC1B,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,YAAY,sBAAA,CAAuB,UAAA;AAAA;AAAA;AAAA;AAAA,EAInC,YAAY,sBAAA,CAAuB,UAAA;AAAA;AAAA;AAAA;AAAA,EAInC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,mBAAmB,sBAAA,CAAuB,iBAAA;AAAA,EAC1C,YAAY,sBAAA,CAAuB;AACrC,CAAU;AAEH,MAAM,eAAA,GAAkB;AAAA;AAAA;AAAA;AAAA,EAI7B,OAAA,EAAS,CAAC,CAAA,KAAkB,CAAA,YAAa,UAAA;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAA,EAAQ,CAAC,CAAA,KAAkB,CAAA,YAAa;AAC1C;;;;"}
@@ -1,3 +1,4 @@
1
+ import type { PopconfirmProps } from './popconfirm';
1
2
  declare var __VLS_22: {
2
3
  confirm: (e: MouseEvent) => void;
3
4
  cancel: (e: MouseEvent) => void;
@@ -7,87 +8,64 @@ type __VLS_Slots = {} & {
7
8
  } & {
8
9
  reference?: (props: typeof __VLS_40) => any;
9
10
  };
10
- declare const __VLS_base: import("vue").DefineComponent<{
11
- readonly title: StringConstructor;
12
- readonly confirmButtonText: StringConstructor;
13
- readonly cancelButtonText: StringConstructor;
14
- readonly confirmButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "primary", boolean>;
15
- readonly cancelButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "text", boolean>;
16
- readonly icon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown, () => any, boolean>;
17
- readonly iconColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
18
- readonly hideIcon: BooleanConstructor;
19
- readonly hideAfter: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 200, boolean>;
20
- readonly effect: {
21
- readonly default: "light";
22
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | ((new (...args: any[]) => string) | (() => import("element-plus").PopperEffect))[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- readonly __epPropKey: true;
26
- };
27
- readonly teleported: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
28
- readonly persistent: BooleanConstructor;
29
- readonly width: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
30
- readonly virtualTriggering: BooleanConstructor;
31
- readonly virtualRef: {
32
- readonly type: import("vue").PropType<import("element-plus").Measurable>;
33
- readonly required: false;
34
- readonly validator: ((val: unknown) => boolean) | undefined;
35
- __epPropKey: true;
36
- };
37
- }, {
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<PopconfirmProps>, {
12
+ confirmButtonType: string;
13
+ cancelButtonType: string;
14
+ icon: () => any;
15
+ iconColor: string;
16
+ hideAfter: number;
17
+ effect: string;
18
+ teleported: boolean;
19
+ width: number;
20
+ }>, {
38
21
  popperRef: import("vue").ComputedRef<import("element-plus").PopperInstance | undefined>;
39
22
  hide: () => void;
40
23
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
24
  cancel: (e: MouseEvent) => void;
42
25
  confirm: (e: MouseEvent) => void;
43
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
- readonly title: StringConstructor;
45
- readonly confirmButtonText: StringConstructor;
46
- readonly cancelButtonText: StringConstructor;
47
- readonly confirmButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "primary", boolean>;
48
- readonly cancelButtonType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "text", boolean>;
49
- readonly icon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown, () => any, boolean>;
50
- readonly iconColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
51
- readonly hideIcon: BooleanConstructor;
52
- readonly hideAfter: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 200, boolean>;
53
- readonly effect: {
54
- readonly default: "light";
55
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | ((new (...args: any[]) => string) | (() => import("element-plus").PopperEffect))[], unknown, unknown>>;
56
- readonly required: false;
57
- readonly validator: ((val: unknown) => boolean) | undefined;
58
- readonly __epPropKey: true;
59
- };
60
- readonly teleported: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
61
- readonly persistent: BooleanConstructor;
62
- readonly width: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
63
- readonly virtualTriggering: BooleanConstructor;
64
- readonly virtualRef: {
65
- readonly type: import("vue").PropType<import("element-plus").Measurable>;
66
- readonly required: false;
67
- readonly validator: ((val: unknown) => boolean) | undefined;
68
- __epPropKey: true;
69
- };
70
- }>> & {
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<PopconfirmProps>, {
27
+ confirmButtonType: string;
28
+ cancelButtonType: string;
29
+ icon: () => any;
30
+ iconColor: string;
31
+ hideAfter: number;
32
+ effect: string;
33
+ teleported: boolean;
34
+ width: number;
35
+ }>>> & {
71
36
  onCancel?: ((e: MouseEvent) => any) | undefined;
72
37
  onConfirm?: ((e: MouseEvent) => any) | undefined;
73
38
  }, {
74
- readonly width: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
75
- readonly icon: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>;
76
- readonly effect: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | ((new (...args: any[]) => string) | (() => import("element-plus").PopperEffect))[], unknown, unknown>;
77
- readonly hideAfter: number;
78
- readonly teleported: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
79
- readonly virtualTriggering: boolean;
80
- readonly persistent: boolean;
81
- readonly confirmButtonType: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown>;
82
- readonly cancelButtonType: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown>;
83
- readonly iconColor: string;
84
- readonly hideIcon: boolean;
39
+ width: string | number;
40
+ icon: string | import("vue").Component;
41
+ effect: import("element-plus").PopperEffect;
42
+ hideAfter: number;
43
+ teleported: boolean;
44
+ confirmButtonType: import("@element-plus/nightly/es/components/button").ButtonType;
45
+ cancelButtonType: import("@element-plus/nightly/es/components/button").ButtonType;
46
+ iconColor: string;
85
47
  }, {}>;
86
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
87
49
  declare const _default: typeof __VLS_export;
88
50
  export default _default;
51
+ type __VLS_TypePropsToOption<T> = {
52
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
53
+ type: import('vue').PropType<Required<T>[K]>;
54
+ } : {
55
+ type: import('vue').PropType<T[K]>;
56
+ required: true;
57
+ };
58
+ };
59
+ type __VLS_WithDefaultsLocal<P, D> = {
60
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
61
+ default: D[K];
62
+ }> : P[K];
63
+ };
89
64
  type __VLS_WithSlots<T, S> = T & {
90
65
  new (): {
91
66
  $slots: S;
92
67
  };
93
68
  };
69
+ type __VLS_PrettifyLocal<T> = {
70
+ [K in keyof T as K]: T[K];
71
+ } & {};
@@ -2,7 +2,8 @@ import { defineComponent, ref, computed, unref, createBlock, openBlock, mergePro
2
2
  import { ElButton } from '../../button/index.mjs';
3
3
  import { ElIcon } from '../../icon/index.mjs';
4
4
  import { ElTooltip } from '../../tooltip/index.mjs';
5
- import { popconfirmEmits, popconfirmProps } from './popconfirm.mjs';
5
+ import { QuestionFilled } from '@element-plus/icons-vue';
6
+ import { popconfirmEmits } from './popconfirm.mjs';
6
7
  import { useLocale } from '../../../hooks/use-locale/index.mjs';
7
8
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
8
9
  import { addUnit } from '../../../utils/dom/style.mjs';
@@ -12,7 +13,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  name: "ElPopconfirm"
13
14
  },
14
15
  __name: "popconfirm",
15
- props: popconfirmProps,
16
+ props: {
17
+ title: { type: String, required: false },
18
+ confirmButtonText: { type: String, required: false },
19
+ cancelButtonText: { type: String, required: false },
20
+ confirmButtonType: { type: null, required: false, default: "primary" },
21
+ cancelButtonType: { type: null, required: false, default: "text" },
22
+ icon: { type: null, required: false, default: () => QuestionFilled },
23
+ iconColor: { type: String, required: false, default: "#f90" },
24
+ hideIcon: { type: Boolean, required: false },
25
+ hideAfter: { type: Number, required: false, default: 200 },
26
+ effect: { type: null, required: false, default: "light" },
27
+ teleported: { type: Boolean, required: false, default: true },
28
+ persistent: { type: Boolean, required: false },
29
+ width: { type: [String, Number], required: false, default: 150 },
30
+ virtualTriggering: { type: Boolean, required: false },
31
+ virtualRef: { type: null, required: false }
32
+ },
16
33
  emits: popconfirmEmits,
17
34
  setup(__props, { expose: __expose, emit: __emit }) {
18
35
  const props = __props;
@@ -61,16 +78,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
61
78
  ref_key: "tooltipRef",
62
79
  ref: tooltipRef,
63
80
  trigger: "click",
64
- effect: _ctx.effect
81
+ effect: __props.effect
65
82
  }, _ctx.$attrs, {
66
- "virtual-triggering": _ctx.virtualTriggering,
67
- "virtual-ref": _ctx.virtualRef,
83
+ "virtual-triggering": __props.virtualTriggering,
84
+ "virtual-ref": __props.virtualRef,
68
85
  "popper-class": `${unref(ns).namespace.value}-popover`,
69
86
  "popper-style": style.value,
70
- teleported: _ctx.teleported,
87
+ teleported: __props.teleported,
71
88
  "fallback-placements": ["bottom", "top", "right", "left"],
72
- "hide-after": _ctx.hideAfter,
73
- persistent: _ctx.persistent,
89
+ "hide-after": __props.hideAfter,
90
+ persistent: __props.persistent,
74
91
  loop: "",
75
92
  onShow: showPopper
76
93
  }), {
@@ -90,19 +107,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
90
107
  class: normalizeClass(unref(ns).e("main"))
91
108
  },
92
109
  [
93
- !_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
110
+ !__props.hideIcon && __props.icon ? (openBlock(), createBlock(unref(ElIcon), {
94
111
  key: 0,
95
112
  class: normalizeClass(unref(ns).e("icon")),
96
- style: normalizeStyle({ color: _ctx.iconColor })
113
+ style: normalizeStyle({ color: __props.iconColor })
97
114
  }, {
98
115
  default: withCtx(() => [
99
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
116
+ (openBlock(), createBlock(resolveDynamicComponent(__props.icon)))
100
117
  ]),
101
118
  _: 1
102
119
  /* STABLE */
103
120
  }, 8, ["class", "style"])) : createCommentVNode("v-if", true),
104
121
  createTextVNode(
105
- " " + toDisplayString(_ctx.title),
122
+ " " + toDisplayString(__props.title),
106
123
  1
107
124
  /* TEXT */
108
125
  )
@@ -122,8 +139,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
122
139
  }, () => [
123
140
  createVNode(unref(ElButton), {
124
141
  size: "small",
125
- type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
126
- text: _ctx.cancelButtonType === "text",
142
+ type: __props.cancelButtonType === "text" ? "" : __props.cancelButtonType,
143
+ text: __props.cancelButtonType === "text",
127
144
  onClick: cancel
128
145
  }, {
129
146
  default: withCtx(() => [
@@ -138,8 +155,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
138
155
  }, 8, ["type", "text"]),
139
156
  createVNode(unref(ElButton), {
140
157
  size: "small",
141
- type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
142
- text: _ctx.confirmButtonType === "text",
158
+ type: __props.confirmButtonType === "text" ? "" : __props.confirmButtonType,
159
+ text: __props.confirmButtonType === "text",
143
160
  onClick: confirm
144
161
  }, {
145
162
  default: withCtx(() => [