@element-plus/nightly 0.0.20260119 → 0.0.20260121

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 (608) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +1149 -572
  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 +1143 -573
  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/date-picker-panel/src/composables/use-basic-date-table.mjs +6 -3
  313. package/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs.map +1 -1
  314. package/es/components/dialog/index.mjs +1 -1
  315. package/es/components/dialog/src/dialog-content.d.ts +66 -1
  316. package/es/components/dialog/src/dialog-content.mjs +9 -1
  317. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  318. package/es/components/dialog/src/dialog-content.vue.d.ts +39 -46
  319. package/es/components/dialog/src/dialog-content.vue2.mjs +23 -10
  320. package/es/components/dialog/src/dialog-content.vue2.mjs.map +1 -1
  321. package/es/components/dialog/src/dialog.d.ts +106 -2
  322. package/es/components/dialog/src/dialog.mjs +14 -2
  323. package/es/components/dialog/src/dialog.mjs.map +1 -1
  324. package/es/components/dialog/src/dialog.vue.d.ts +66 -138
  325. package/es/components/dialog/src/dialog.vue2.mjs +50 -18
  326. package/es/components/dialog/src/dialog.vue2.mjs.map +1 -1
  327. package/es/components/dialog/src/use-dialog.d.ts +3 -3
  328. package/es/components/drawer/src/composables/useResizable.d.ts +1 -1
  329. package/es/components/drawer/src/composables/useResizable.mjs.map +1 -1
  330. package/es/components/drawer/src/drawer.d.ts +34 -2
  331. package/es/components/drawer/src/drawer.mjs.map +1 -1
  332. package/es/components/drawer/src/drawer.vue.d.ts +78 -153
  333. package/es/components/drawer/src/drawer.vue2.mjs +63 -18
  334. package/es/components/drawer/src/drawer.vue2.mjs.map +1 -1
  335. package/es/components/form/src/form-item.d.ts +58 -2
  336. package/es/components/form/src/form-item.mjs.map +1 -1
  337. package/es/components/form/src/form-item.vue.d.ts +33 -84
  338. package/es/components/form/src/form-item.vue2.mjs +15 -3
  339. package/es/components/form/src/form-item.vue2.mjs.map +1 -1
  340. package/es/components/form/src/form.d.ts +83 -3
  341. package/es/components/form/src/form.mjs.map +1 -1
  342. package/es/components/form/src/form.vue.d.ts +42 -69
  343. package/es/components/form/src/form.vue2.mjs +19 -2
  344. package/es/components/form/src/form.vue2.mjs.map +1 -1
  345. package/es/components/index.mjs +6 -6
  346. package/es/components/notification/src/notification.d.ts +73 -4
  347. package/es/components/notification/src/notification.mjs.map +1 -1
  348. package/es/components/notification/src/notification.vue.d.ts +54 -115
  349. package/es/components/notification/src/notification.vue2.mjs +32 -15
  350. package/es/components/notification/src/notification.vue2.mjs.map +1 -1
  351. package/es/components/notification/src/notify.d.ts +3 -3
  352. package/es/components/notification/src/notify.mjs.map +1 -1
  353. package/es/components/popconfirm/src/popconfirm.d.ts +72 -3
  354. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  355. package/es/components/popconfirm/src/popconfirm.vue.d.ts +45 -67
  356. package/es/components/popconfirm/src/popconfirm.vue2.mjs +33 -16
  357. package/es/components/popconfirm/src/popconfirm.vue2.mjs.map +1 -1
  358. package/es/components/popover/index.mjs +1 -1
  359. package/es/components/popover/src/popover.d.ts +134 -5
  360. package/es/components/popover/src/popover.mjs +26 -1
  361. package/es/components/popover/src/popover.mjs.map +1 -1
  362. package/es/components/popover/src/popover.vue.d.ts +75 -326
  363. package/es/components/popover/src/popover.vue2.mjs +51 -26
  364. package/es/components/popover/src/popover.vue2.mjs.map +1 -1
  365. package/es/components/table/src/table-column/index.d.ts +1 -1
  366. package/es/components/tabs/src/tab-bar.d.ts +34 -23
  367. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  368. package/es/components/tabs/src/tab-bar.vue.d.ts +28 -180
  369. package/es/components/tabs/src/tab-bar.vue2.mjs +4 -2
  370. package/es/components/tabs/src/tab-bar.vue2.mjs.map +1 -1
  371. package/es/components/tabs/src/tab-nav.d.ts +75 -75
  372. package/es/components/tabs/src/tab-pane.d.ts +29 -2
  373. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  374. package/es/components/tabs/src/tab-pane.vue.d.ts +26 -27
  375. package/es/components/tabs/src/tab-pane.vue2.mjs +7 -2
  376. package/es/components/tabs/src/tab-pane.vue2.mjs.map +1 -1
  377. package/es/components/tabs/src/tabs.d.ts +5 -5
  378. package/es/components/time-select/src/time-select.d.ts +84 -2
  379. package/es/components/time-select/src/time-select.mjs.map +1 -1
  380. package/es/components/time-select/src/time-select.vue.d.ts +60 -109
  381. package/es/components/time-select/src/time-select.vue2.mjs +36 -14
  382. package/es/components/time-select/src/time-select.vue2.mjs.map +1 -1
  383. package/es/components/timeline/src/timeline-item.d.ts +46 -3
  384. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  385. package/es/components/timeline/src/timeline-item.vue.d.ts +35 -39
  386. package/es/components/timeline/src/timeline-item.vue2.mjs +18 -9
  387. package/es/components/timeline/src/timeline-item.vue2.mjs.map +1 -1
  388. package/es/components/tooltip/index.mjs +2 -2
  389. package/es/components/tooltip/src/content.d.ts +69 -2
  390. package/es/components/tooltip/src/content.mjs +10 -3
  391. package/es/components/tooltip/src/content.mjs.map +1 -1
  392. package/es/components/tooltip/src/content.vue.d.ts +90 -555
  393. package/es/components/tooltip/src/content.vue2.mjs +59 -22
  394. package/es/components/tooltip/src/content.vue2.mjs.map +1 -1
  395. package/es/components/tooltip/src/tooltip.d.ts +19 -3
  396. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  397. package/es/components/tooltip/src/tooltip.vue.d.ts +103 -668
  398. package/es/components/tooltip/src/tooltip.vue2.mjs +102 -41
  399. package/es/components/tooltip/src/tooltip.vue2.mjs.map +1 -1
  400. package/es/components/tooltip/src/trigger.d.ts +34 -2
  401. package/es/components/tooltip/src/trigger.mjs +9 -1
  402. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  403. package/es/components/tooltip/src/trigger.vue.d.ts +27 -120
  404. package/es/components/tooltip/src/trigger.vue2.mjs +21 -5
  405. package/es/components/tooltip/src/trigger.vue2.mjs.map +1 -1
  406. package/es/components/transfer/src/composables/use-check.d.ts +3 -1
  407. package/es/components/transfer/src/composables/use-check.mjs.map +1 -1
  408. package/es/components/transfer/src/composables/use-computed-data.d.ts +1 -1
  409. package/es/components/transfer/src/composables/use-computed-data.mjs.map +1 -1
  410. package/es/components/transfer/src/composables/use-move.d.ts +1 -1
  411. package/es/components/transfer/src/composables/use-move.mjs.map +1 -1
  412. package/es/components/transfer/src/composables/use-props-alias.d.ts +2 -4
  413. package/es/components/transfer/src/composables/use-props-alias.mjs.map +1 -1
  414. package/es/components/transfer/src/transfer-panel.d.ts +19 -3
  415. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  416. package/es/components/transfer/src/transfer-panel.vue.d.ts +41 -56
  417. package/es/components/transfer/src/transfer-panel.vue2.mjs +24 -9
  418. package/es/components/transfer/src/transfer-panel.vue2.mjs.map +1 -1
  419. package/es/components/transfer/src/transfer.d.ts +65 -2
  420. package/es/components/transfer/src/transfer.mjs.map +1 -1
  421. package/es/components/transfer/src/transfer.vue.d.ts +57 -70
  422. package/es/components/transfer/src/transfer.vue2.mjs +33 -14
  423. package/es/components/transfer/src/transfer.vue2.mjs.map +1 -1
  424. package/es/hooks/index.mjs +1 -1
  425. package/es/hooks/use-aria/index.d.ts +14 -0
  426. package/es/hooks/use-aria/index.mjs.map +1 -1
  427. package/es/hooks/use-delayed-toggle/index.d.ts +26 -4
  428. package/es/hooks/use-delayed-toggle/index.mjs +6 -1
  429. package/es/hooks/use-delayed-toggle/index.mjs.map +1 -1
  430. package/es/hooks/use-empty-values/index.d.ts +17 -4
  431. package/es/hooks/use-empty-values/index.mjs.map +1 -1
  432. package/es/index.mjs +7 -7
  433. package/es/version.d.ts +1 -1
  434. package/es/version.mjs +1 -1
  435. package/es/version.mjs.map +1 -1
  436. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
  437. package/lib/components/autocomplete/src/autocomplete.vue2.js +1 -1
  438. package/lib/components/cascader/src/cascader.d.ts +127 -3
  439. package/lib/components/cascader/src/cascader.js.map +1 -1
  440. package/lib/components/cascader/src/cascader.vue.d.ts +79 -395
  441. package/lib/components/cascader/src/cascader.vue2.js +68 -27
  442. package/lib/components/cascader/src/cascader.vue2.js.map +1 -1
  443. package/lib/components/cascader-panel/src/config.d.ts +21 -0
  444. package/lib/components/cascader-panel/src/config.js.map +1 -1
  445. package/lib/components/cascader-panel/src/index.vue.d.ts +30 -37
  446. package/lib/components/cascader-panel/src/index.vue2.js +8 -2
  447. package/lib/components/cascader-panel/src/index.vue2.js.map +1 -1
  448. package/lib/components/checkbox/index.js +1 -0
  449. package/lib/components/checkbox/index.js.map +1 -1
  450. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +46 -122
  451. package/lib/components/checkbox/src/checkbox-button.vue2.js +24 -5
  452. package/lib/components/checkbox/src/checkbox-button.vue2.js.map +1 -1
  453. package/lib/components/checkbox/src/checkbox-group.d.ts +61 -4
  454. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  455. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +41 -91
  456. package/lib/components/checkbox/src/checkbox-group.vue2.js +18 -4
  457. package/lib/components/checkbox/src/checkbox-group.vue2.js.map +1 -1
  458. package/lib/components/checkbox/src/checkbox.d.ts +90 -2
  459. package/lib/components/checkbox/src/checkbox.js +15 -1
  460. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  461. package/lib/components/checkbox/src/checkbox.vue.d.ts +46 -122
  462. package/lib/components/checkbox/src/checkbox.vue2.js +27 -8
  463. package/lib/components/checkbox/src/checkbox.vue2.js.map +1 -1
  464. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -1
  465. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +1 -1
  466. package/lib/components/color-picker/index.js +1 -0
  467. package/lib/components/color-picker/index.js.map +1 -1
  468. package/lib/components/color-picker/src/color-picker.d.ts +86 -2
  469. package/lib/components/color-picker/src/color-picker.js +12 -0
  470. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  471. package/lib/components/color-picker/src/color-picker.vue.d.ts +48 -291
  472. package/lib/components/color-picker/src/color-picker.vue2.js +31 -12
  473. package/lib/components/color-picker/src/color-picker.vue2.js.map +1 -1
  474. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.js +6 -3
  475. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.js.map +1 -1
  476. package/lib/components/dialog/index.js +1 -0
  477. package/lib/components/dialog/index.js.map +1 -1
  478. package/lib/components/dialog/src/dialog-content.d.ts +66 -1
  479. package/lib/components/dialog/src/dialog-content.js +9 -0
  480. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  481. package/lib/components/dialog/src/dialog-content.vue.d.ts +39 -46
  482. package/lib/components/dialog/src/dialog-content.vue2.js +21 -8
  483. package/lib/components/dialog/src/dialog-content.vue2.js.map +1 -1
  484. package/lib/components/dialog/src/dialog.d.ts +106 -2
  485. package/lib/components/dialog/src/dialog.js +13 -0
  486. package/lib/components/dialog/src/dialog.js.map +1 -1
  487. package/lib/components/dialog/src/dialog.vue.d.ts +66 -138
  488. package/lib/components/dialog/src/dialog.vue2.js +48 -16
  489. package/lib/components/dialog/src/dialog.vue2.js.map +1 -1
  490. package/lib/components/dialog/src/use-dialog.d.ts +3 -3
  491. package/lib/components/drawer/src/composables/useResizable.d.ts +1 -1
  492. package/lib/components/drawer/src/composables/useResizable.js.map +1 -1
  493. package/lib/components/drawer/src/drawer.d.ts +34 -2
  494. package/lib/components/drawer/src/drawer.js.map +1 -1
  495. package/lib/components/drawer/src/drawer.vue.d.ts +78 -153
  496. package/lib/components/drawer/src/drawer.vue2.js +61 -16
  497. package/lib/components/drawer/src/drawer.vue2.js.map +1 -1
  498. package/lib/components/form/src/form-item.d.ts +58 -2
  499. package/lib/components/form/src/form-item.js.map +1 -1
  500. package/lib/components/form/src/form-item.vue.d.ts +33 -84
  501. package/lib/components/form/src/form-item.vue2.js +15 -3
  502. package/lib/components/form/src/form-item.vue2.js.map +1 -1
  503. package/lib/components/form/src/form.d.ts +83 -3
  504. package/lib/components/form/src/form.js.map +1 -1
  505. package/lib/components/form/src/form.vue.d.ts +42 -69
  506. package/lib/components/form/src/form.vue2.js +18 -1
  507. package/lib/components/form/src/form.vue2.js.map +1 -1
  508. package/lib/components/index.js +6 -0
  509. package/lib/components/index.js.map +1 -1
  510. package/lib/components/notification/src/notification.d.ts +73 -4
  511. package/lib/components/notification/src/notification.js.map +1 -1
  512. package/lib/components/notification/src/notification.vue.d.ts +54 -115
  513. package/lib/components/notification/src/notification.vue2.js +30 -13
  514. package/lib/components/notification/src/notification.vue2.js.map +1 -1
  515. package/lib/components/notification/src/notify.d.ts +3 -3
  516. package/lib/components/notification/src/notify.js.map +1 -1
  517. package/lib/components/popconfirm/src/popconfirm.d.ts +72 -3
  518. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  519. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +45 -67
  520. package/lib/components/popconfirm/src/popconfirm.vue2.js +32 -15
  521. package/lib/components/popconfirm/src/popconfirm.vue2.js.map +1 -1
  522. package/lib/components/popover/index.js +1 -0
  523. package/lib/components/popover/index.js.map +1 -1
  524. package/lib/components/popover/src/popover.d.ts +134 -5
  525. package/lib/components/popover/src/popover.js +26 -0
  526. package/lib/components/popover/src/popover.js.map +1 -1
  527. package/lib/components/popover/src/popover.vue.d.ts +75 -326
  528. package/lib/components/popover/src/popover.vue2.js +49 -24
  529. package/lib/components/popover/src/popover.vue2.js.map +1 -1
  530. package/lib/components/table/src/table-column/index.d.ts +1 -1
  531. package/lib/components/tabs/src/tab-bar.d.ts +34 -23
  532. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  533. package/lib/components/tabs/src/tab-bar.vue.d.ts +28 -180
  534. package/lib/components/tabs/src/tab-bar.vue2.js +4 -2
  535. package/lib/components/tabs/src/tab-bar.vue2.js.map +1 -1
  536. package/lib/components/tabs/src/tab-nav.d.ts +75 -75
  537. package/lib/components/tabs/src/tab-pane.d.ts +29 -2
  538. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  539. package/lib/components/tabs/src/tab-pane.vue.d.ts +26 -27
  540. package/lib/components/tabs/src/tab-pane.vue2.js +7 -2
  541. package/lib/components/tabs/src/tab-pane.vue2.js.map +1 -1
  542. package/lib/components/tabs/src/tabs.d.ts +5 -5
  543. package/lib/components/time-select/src/time-select.d.ts +84 -2
  544. package/lib/components/time-select/src/time-select.js.map +1 -1
  545. package/lib/components/time-select/src/time-select.vue.d.ts +60 -109
  546. package/lib/components/time-select/src/time-select.vue2.js +36 -14
  547. package/lib/components/time-select/src/time-select.vue2.js.map +1 -1
  548. package/lib/components/timeline/src/timeline-item.d.ts +46 -3
  549. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  550. package/lib/components/timeline/src/timeline-item.vue.d.ts +35 -39
  551. package/lib/components/timeline/src/timeline-item.vue2.js +18 -9
  552. package/lib/components/timeline/src/timeline-item.vue2.js.map +1 -1
  553. package/lib/components/tooltip/index.js +2 -0
  554. package/lib/components/tooltip/index.js.map +1 -1
  555. package/lib/components/tooltip/src/content.d.ts +69 -2
  556. package/lib/components/tooltip/src/content.js +8 -0
  557. package/lib/components/tooltip/src/content.js.map +1 -1
  558. package/lib/components/tooltip/src/content.vue.d.ts +90 -555
  559. package/lib/components/tooltip/src/content.vue2.js +58 -21
  560. package/lib/components/tooltip/src/content.vue2.js.map +1 -1
  561. package/lib/components/tooltip/src/tooltip.d.ts +19 -3
  562. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  563. package/lib/components/tooltip/src/tooltip.vue.d.ts +103 -668
  564. package/lib/components/tooltip/src/tooltip.vue2.js +100 -39
  565. package/lib/components/tooltip/src/tooltip.vue2.js.map +1 -1
  566. package/lib/components/tooltip/src/trigger.d.ts +34 -2
  567. package/lib/components/tooltip/src/trigger.js +9 -0
  568. package/lib/components/tooltip/src/trigger.js.map +1 -1
  569. package/lib/components/tooltip/src/trigger.vue.d.ts +27 -120
  570. package/lib/components/tooltip/src/trigger.vue2.js +20 -4
  571. package/lib/components/tooltip/src/trigger.vue2.js.map +1 -1
  572. package/lib/components/transfer/src/composables/use-check.d.ts +3 -1
  573. package/lib/components/transfer/src/composables/use-check.js.map +1 -1
  574. package/lib/components/transfer/src/composables/use-computed-data.d.ts +1 -1
  575. package/lib/components/transfer/src/composables/use-computed-data.js.map +1 -1
  576. package/lib/components/transfer/src/composables/use-move.d.ts +1 -1
  577. package/lib/components/transfer/src/composables/use-move.js.map +1 -1
  578. package/lib/components/transfer/src/composables/use-props-alias.d.ts +2 -4
  579. package/lib/components/transfer/src/composables/use-props-alias.js.map +1 -1
  580. package/lib/components/transfer/src/transfer-panel.d.ts +19 -3
  581. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  582. package/lib/components/transfer/src/transfer-panel.vue.d.ts +41 -56
  583. package/lib/components/transfer/src/transfer-panel.vue2.js +23 -8
  584. package/lib/components/transfer/src/transfer-panel.vue2.js.map +1 -1
  585. package/lib/components/transfer/src/transfer.d.ts +65 -2
  586. package/lib/components/transfer/src/transfer.js.map +1 -1
  587. package/lib/components/transfer/src/transfer.vue.d.ts +57 -70
  588. package/lib/components/transfer/src/transfer.vue2.js +32 -13
  589. package/lib/components/transfer/src/transfer.vue2.js.map +1 -1
  590. package/lib/hooks/index.js +1 -0
  591. package/lib/hooks/index.js.map +1 -1
  592. package/lib/hooks/use-aria/index.d.ts +14 -0
  593. package/lib/hooks/use-aria/index.js.map +1 -1
  594. package/lib/hooks/use-delayed-toggle/index.d.ts +26 -4
  595. package/lib/hooks/use-delayed-toggle/index.js +6 -0
  596. package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
  597. package/lib/hooks/use-empty-values/index.d.ts +17 -4
  598. package/lib/hooks/use-empty-values/index.js.map +1 -1
  599. package/lib/index.js +7 -0
  600. package/lib/index.js.map +1 -1
  601. package/lib/version.d.ts +1 -1
  602. package/lib/version.js +1 -1
  603. package/lib/version.js.map +1 -1
  604. package/package.json +2 -2
  605. package/theme-chalk/el-collapse-item.css +1 -1
  606. package/theme-chalk/index.css +1 -1
  607. package/theme-chalk/src/collapse-item.scss +5 -0
  608. package/web-types.json +1 -1
@@ -1,5 +1,20 @@
1
- import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
1
+ import type { ExtractPublicPropTypes } from 'vue';
2
+ import type { ComponentSize } from '@element-plus/nightly/es/constants';
2
3
  import type { FormItemProp } from './form-item';
4
+ import type { FormRules } from './types';
5
+ export interface FormMetaProps {
6
+ /**
7
+ * @description Control the size of components in this form.
8
+ */
9
+ size?: ComponentSize;
10
+ /**
11
+ * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.
12
+ */
13
+ disabled?: boolean;
14
+ }
15
+ /**
16
+ * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.
17
+ */
3
18
  export declare const formMetaProps: {
4
19
  readonly size: {
5
20
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
@@ -9,6 +24,67 @@ export declare const formMetaProps: {
9
24
  };
10
25
  readonly disabled: BooleanConstructor;
11
26
  };
27
+ export interface FormProps extends FormMetaProps {
28
+ /**
29
+ * @description Data of form component.
30
+ */
31
+ model?: Record<string, any>;
32
+ /**
33
+ * @description Validation rules of form.
34
+ */
35
+ rules?: FormRules;
36
+ /**
37
+ * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.
38
+ */
39
+ labelPosition?: 'left' | 'right' | 'top';
40
+ /**
41
+ * @description Position of asterisk.
42
+ */
43
+ requireAsteriskPosition?: 'left' | 'right';
44
+ /**
45
+ * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.
46
+ */
47
+ labelWidth?: string | number;
48
+ /**
49
+ * @description Suffix of the label.
50
+ */
51
+ labelSuffix?: string;
52
+ /**
53
+ * @description Whether the form is inline.
54
+ */
55
+ inline?: boolean;
56
+ /**
57
+ * @description Whether to display the error message inline with the form item.
58
+ */
59
+ inlineMessage?: boolean;
60
+ /**
61
+ * @description Whether to display an icon indicating the validation result.
62
+ */
63
+ statusIcon?: boolean;
64
+ /**
65
+ * @description Whether to show the error message.
66
+ */
67
+ showMessage?: boolean;
68
+ /**
69
+ * @description Whether to trigger validation when the `rules` prop is changed.
70
+ */
71
+ validateOnRuleChange?: boolean;
72
+ /**
73
+ * @description Whether to hide required fields should have a red asterisk (star) beside their labels.
74
+ */
75
+ hideRequiredAsterisk?: boolean;
76
+ /**
77
+ * @description When validation fails, scroll to the first error form entry.
78
+ */
79
+ scrollToError?: boolean;
80
+ /**
81
+ * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.
82
+ */
83
+ scrollIntoViewOptions?: ScrollIntoViewOptions | boolean;
84
+ }
85
+ /**
86
+ * @deprecated Removed after 3.0.0, Use `FormProps` instead.
87
+ */
12
88
  export declare const formProps: {
13
89
  readonly model: ObjectConstructor;
14
90
  readonly rules: {
@@ -37,9 +113,13 @@ export declare const formProps: {
37
113
  };
38
114
  readonly disabled: BooleanConstructor;
39
115
  };
40
- export type FormProps = ExtractPropTypes<typeof formProps>;
116
+ /**
117
+ * @deprecated Removed after 3.0.0, Use `FormProps` instead.
118
+ */
41
119
  export type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>;
42
- export type FormMetaProps = ExtractPropTypes<typeof formMetaProps>;
120
+ /**
121
+ * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.
122
+ */
43
123
  export type FormMetaPropsPublic = ExtractPublicPropTypes<typeof formMetaProps>;
44
124
  export declare const formEmits: {
45
125
  validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: definePropType<ScrollIntoViewOptions | boolean>([Object, Boolean]),\n default: true,\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>\n\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\nexport type FormMetaPropsPublic = ExtractPublicPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":[],"mappings":";;;;;AAaO,MAAM,gBAAgB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAItC,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AACZ,CAAU;AAEH,MAAM,YAAY,UAAA,CAAW;AAAA,EAClC,GAAG,aAAA;AAAA;AAAA;AAAA;AAAA,EAIH,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,eAA0B,MAAM;AAAA,GACxC;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,MAAA,EAAQ,OAAA,EAAS,KAAK,CAAA;AAAA,IAC/B,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;A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ources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport interface FormMetaProps {\n /**\n * @description Control the size of components in this form.\n */\n size?: ComponentSize\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport interface FormProps extends FormMetaProps {\n /**\n * @description Data of form component.\n */\n model?: Record<string, any>\n /**\n * @description Validation rules of form.\n */\n rules?: FormRules\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition?: 'left' | 'right' | 'top'\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition?: 'left' | 'right'\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth?: string | number\n /**\n * @description Suffix of the label.\n */\n labelSuffix?: string\n /**\n * @description Whether the form is inline.\n */\n inline?: boolean\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage?: boolean\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon?: boolean\n /**\n * @description Whether to show the error message.\n */\n showMessage?: boolean\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange?: boolean\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk?: boolean\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError?: boolean\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions?: ScrollIntoViewOptions | boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: definePropType<ScrollIntoViewOptions | boolean>([Object, Boolean]),\n default: true,\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport type FormMetaPropsPublic = ExtractPublicPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,gBAAgB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAItC,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AACZ,CAAU;AAgEH,MAAM,YAAY,UAAA,CAAW;AAAA,EAClC,GAAG,aAAA;AAAA;AAAA;AAAA;AAAA,EAIH,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,eAA0B,MAAM;AAAA,GACxC;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,MAAA,EAAQ,OAAA,EAAS,KAAK,CAAA;AAAA,IAC/B,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,uBAAA,EAAyB;AAAA,IACvB,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,MAAA,EAAQ,OAAO,CAAA;AAAA,IACxB,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ,OAAA;AAAA;AAAA;AAAA;AAAA,EAIR,aAAA,EAAe,OAAA;AAAA;AAAA;AAAA;AAAA,EAIf,UAAA,EAAY,OAAA;AAAA;AAAA;AAAA;AAAA,EAIZ,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,oBAAA,EAAsB;AAAA,IACpB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,oBAAA,EAAsB,OAAA;AAAA;AAAA;AAAA;AAAA,EAItB,aAAA,EAAe,OAAA;AAAA;AAAA;AAAA;AAAA,EAIf,qBAAA,EAAuB;AAAA,IACrB,IAAA,EAAM,cAAA,CAAgD,CAAC,MAAA,EAAQ,OAAO,CAAC,CAAA;AAAA,IACvE,OAAA,EAAS;AAAA;AAEb,CAAU;AAYH,MAAM,SAAA,GAAY;AAAA,EACvB,QAAA,EAAU,CAAC,IAAA,EAAoB,OAAA,EAAkB,aAC9C,OAAA,CAAQ,IAAI,CAAA,IAAK,QAAA,CAAS,IAAI,CAAA,KAC/B,SAAA,CAAU,OAAO,CAAA,IACjB,SAAS,OAAO;AACpB;;;;"}
@@ -1,38 +1,20 @@
1
1
  import type { Arrayable } from '@element-plus/nightly/es/utils';
2
+ import type { FormProps } from './form';
2
3
  import type { FormItemContext, FormValidateCallback, FormValidationResult } from './types';
3
4
  import type { FormItemProp } from './form-item';
4
5
  declare var __VLS_1: {};
5
6
  type __VLS_Slots = {} & {
6
7
  default?: (props: typeof __VLS_1) => any;
7
8
  };
8
- declare const __VLS_base: import("vue").DefineComponent<{
9
- readonly model: ObjectConstructor;
10
- readonly rules: {
11
- readonly type: import("vue").PropType<Partial<Record<string, Arrayable<import("./types").FormItemRule>>>>;
12
- readonly required: false;
13
- readonly validator: ((val: unknown) => boolean) | undefined;
14
- __epPropKey: true;
15
- };
16
- readonly labelPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "top", unknown, "right", boolean>;
17
- readonly requireAsteriskPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
18
- readonly labelWidth: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
19
- readonly labelSuffix: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
20
- readonly inline: BooleanConstructor;
21
- readonly inlineMessage: BooleanConstructor;
22
- readonly statusIcon: BooleanConstructor;
23
- readonly showMessage: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
24
- readonly validateOnRuleChange: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
25
- readonly hideRequiredAsterisk: BooleanConstructor;
26
- readonly scrollToError: BooleanConstructor;
27
- readonly scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, true, boolean>;
28
- readonly size: {
29
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
30
- readonly required: false;
31
- readonly validator: ((val: unknown) => boolean) | undefined;
32
- __epPropKey: true;
33
- };
34
- readonly disabled: BooleanConstructor;
35
- }, {
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<FormProps>, {
10
+ labelPosition: string;
11
+ requireAsteriskPosition: string;
12
+ labelWidth: string;
13
+ labelSuffix: string;
14
+ showMessage: boolean;
15
+ validateOnRuleChange: boolean;
16
+ scrollIntoViewOptions: boolean;
17
+ }>, {
36
18
  /**
37
19
  * @description Validate the whole form. Receives a callback or returns `Promise`.
38
20
  */
@@ -67,55 +49,46 @@ declare const __VLS_base: import("vue").DefineComponent<{
67
49
  setInitialValues: (initModel: Record<string, any>) => void;
68
50
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
69
51
  validate: (prop: FormItemProp, isValid: boolean, message: string) => void;
70
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
71
- readonly model: ObjectConstructor;
72
- readonly rules: {
73
- readonly type: import("vue").PropType<Partial<Record<string, Arrayable<import("./types").FormItemRule>>>>;
74
- readonly required: false;
75
- readonly validator: ((val: unknown) => boolean) | undefined;
76
- __epPropKey: true;
77
- };
78
- readonly labelPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "left" | "right" | "top", unknown, "right", boolean>;
79
- readonly requireAsteriskPosition: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
80
- readonly labelWidth: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
81
- readonly labelSuffix: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
82
- readonly inline: BooleanConstructor;
83
- readonly inlineMessage: BooleanConstructor;
84
- readonly statusIcon: BooleanConstructor;
85
- readonly showMessage: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
86
- readonly validateOnRuleChange: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
87
- readonly hideRequiredAsterisk: BooleanConstructor;
88
- readonly scrollToError: BooleanConstructor;
89
- readonly scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, true, boolean>;
90
- readonly size: {
91
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
92
- readonly required: false;
93
- readonly validator: ((val: unknown) => boolean) | undefined;
94
- __epPropKey: true;
95
- };
96
- readonly disabled: BooleanConstructor;
97
- }>> & {
52
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<FormProps>, {
53
+ labelPosition: string;
54
+ requireAsteriskPosition: string;
55
+ labelWidth: string;
56
+ labelSuffix: string;
57
+ showMessage: boolean;
58
+ validateOnRuleChange: boolean;
59
+ scrollIntoViewOptions: boolean;
60
+ }>>> & {
98
61
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
99
62
  }, {
100
- readonly disabled: boolean;
101
- readonly inline: boolean;
102
- readonly labelWidth: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
103
- readonly labelPosition: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "left" | "right" | "top", unknown>;
104
- readonly inlineMessage: boolean;
105
- readonly showMessage: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
106
- readonly requireAsteriskPosition: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "left" | "right", unknown>;
107
- readonly labelSuffix: string;
108
- readonly validateOnRuleChange: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
109
- readonly scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>;
110
- readonly statusIcon: boolean;
111
- readonly hideRequiredAsterisk: boolean;
112
- readonly scrollToError: boolean;
63
+ labelWidth: string | number;
64
+ labelPosition: "left" | "right" | "top";
65
+ showMessage: boolean;
66
+ requireAsteriskPosition: "left" | "right";
67
+ labelSuffix: string;
68
+ validateOnRuleChange: boolean;
69
+ scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
113
70
  }, {}>;
114
71
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
115
72
  declare const _default: typeof __VLS_export;
116
73
  export default _default;
74
+ type __VLS_TypePropsToOption<T> = {
75
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
76
+ type: import('vue').PropType<Required<T>[K]>;
77
+ } : {
78
+ type: import('vue').PropType<T[K]>;
79
+ required: true;
80
+ };
81
+ };
82
+ type __VLS_WithDefaultsLocal<P, D> = {
83
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
84
+ default: D[K];
85
+ }> : P[K];
86
+ };
117
87
  type __VLS_WithSlots<T, S> = T & {
118
88
  new (): {
119
89
  $slots: S;
120
90
  };
121
91
  };
92
+ type __VLS_PrettifyLocal<T> = {
93
+ [K in keyof T as K]: T[K];
94
+ } & {};
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, reactive, computed, watch, provide, toRefs, createElementBlock, openBlock, normalizeClass, renderSlot } from 'vue';
2
2
  import { has } from 'lodash-unified';
3
3
  import { formContextKey } from './constants.mjs';
4
- import { formEmits, formProps } from './form.mjs';
4
+ import { formEmits } from './form.mjs';
5
5
  import { useFormLabelWidth, filterFields } from './utils.mjs';
6
6
  import { useFormSize } from './hooks/use-form-common-props.mjs';
7
7
  import { getProp } from '../../../utils/objects.mjs';
@@ -15,7 +15,24 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  name: COMPONENT_NAME
16
16
  },
17
17
  __name: "form",
18
- props: formProps,
18
+ props: {
19
+ model: { type: Object, required: false },
20
+ rules: { type: null, required: false },
21
+ labelPosition: { type: String, required: false, default: "right" },
22
+ requireAsteriskPosition: { type: String, required: false, default: "left" },
23
+ labelWidth: { type: [String, Number], required: false, default: "" },
24
+ labelSuffix: { type: String, required: false, default: "" },
25
+ inline: { type: Boolean, required: false },
26
+ inlineMessage: { type: Boolean, required: false },
27
+ statusIcon: { type: Boolean, required: false },
28
+ showMessage: { type: Boolean, required: false, default: true },
29
+ validateOnRuleChange: { type: Boolean, required: false, default: true },
30
+ hideRequiredAsterisk: { type: Boolean, required: false },
31
+ scrollToError: { type: Boolean, required: false },
32
+ scrollIntoViewOptions: { type: Boolean, required: false, skipCheck: true, default: true },
33
+ size: { type: null, required: false },
34
+ disabled: { type: Boolean, required: false }
35
+ },
19
36
  emits: formEmits,
20
37
  setup(__props, { expose: __expose, emit: __emit }) {
21
38
  const props = __props;
@@ -1 +1 @@
1
- {"version":3,"file":"form.vue2.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { has } from 'lodash-unified'\nimport { debugWarn, getProp, isFunction } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits, formProps } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(formProps)\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n fields.push(field)\n}\n\nconst removeField: FormContext['removeField'] = (field) => {\n if (field.prop) {\n fields.splice(fields.indexOf(field), 1)\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (\n initModel: Partial<typeof props.model>\n) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n fields.forEach((field) => {\n if (field.prop) {\n // Check if the property path actually exists in initModel\n // This allows setting undefined/null values while skipping non-existent properties\n if (has(initModel, field.prop)) {\n const initValue = getProp(initModel, field.prop).value\n field.setInitialValue(initValue)\n }\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n filterFields(fields, properties).forEach((field) => field.resetField())\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values. Only fields present in `initModel` will be updated.\n */\n setInitialValues,\n})\n</script>\n"],"names":["props","fields","_createElementBlock","_renderSlot"],"mappings":";;;;;;;;;;;AA0BA,MAAM,cAAA,GAAiB,QAAA;;;;;;;;;AAIvB,IAAA,MAAM,KAAA,GAAQ,OAAA;AACd,IAAA,MAAM,IAAA,GAAO,MAAA;AAEb,IAAA,MAAM,UAAU,GAAA,EAAiB;AACjC,IAAA,MAAM,MAAA,GAAS,QAAA,CAA4B,EAAE,CAAA;AAE7C,IAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,IAAA,MAAM,EAAA,GAAK,aAAa,MAAM,CAAA;AAC9B,IAAA,MAAM,WAAA,GAAc,SAAS,MAAM;AACjC,MAAA,MAAM,EAAE,aAAA,EAAe,MAAA,EAAO,GAAI,KAAA;AAClC,MAAA,OAAO;AAAA,QACL,GAAG,CAAA,EAAE;AAAA,QACL,EAAA,CAAG,CAAA,CAAE,QAAA,CAAS,KAAA,IAAS,SAAS,CAAA;AAAA,QAChC;AAAA,UACE,CAAC,EAAA,CAAG,CAAA,CAAE,SAAS,aAAa,CAAA,CAAE,CAAC,GAAG,aAAA;AAAA,UAClC,CAAC,EAAA,CAAG,CAAA,CAAE,QAAQ,CAAC,GAAG;AAAA;AACpB,OACF;AAAA,IACF,CAAC,CAAA;AAED,IAAA,MAAM,QAAA,GAAoC,CAAC,IAAA,KAAS;AAClD,MAAA,OAAO,aAAa,MAAA,EAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAAA,IACvC,CAAA;AAEA,IAAA,MAAM,QAAA,GAAoC,CAAC,KAAA,KAAU;AACnD,MAAA,MAAA,CAAO,KAAK,KAAK,CAAA;AAAA,IACnB,CAAA;AAEA,IAAA,MAAM,WAAA,GAA0C,CAAC,KAAA,KAAU;AACzD,MAAA,IAAI,MAAM,IAAA,EAAM;AACd,Q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MAAA;AAAA,QAAA;AAAA,mBAFG,SAAA;AAAA,UAAJ,GAAA,EAAI,OAAA;AAAA,UAAW,KAAA,iBAAO,WAAA,CAAA,KAAW;AAAA;;UACrCC,UAAA,CAAQ,IAAA,CAAA,MAAA,EAAA,SAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"form.vue2.mjs","sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { has } from 'lodash-unified'\nimport { debugWarn, getProp, isFunction } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormProps } from './form'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<FormProps>(), {\n labelPosition: 'right',\n requireAsteriskPosition: 'left',\n labelWidth: '',\n labelSuffix: '',\n showMessage: true,\n validateOnRuleChange: true,\n scrollIntoViewOptions: true,\n})\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n fields.push(field)\n}\n\nconst removeField: FormContext['removeField'] = (field) => {\n if (field.prop) {\n fields.splice(fields.indexOf(field), 1)\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (\n initModel: Partial<typeof props.model>\n) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n fields.forEach((field) => {\n if (field.prop) {\n // Check if the property path actually exists in initModel\n // This allows setting undefined/null values while skipping non-existent properties\n if (has(initModel, field.prop)) {\n const initValue = getProp(initModel, field.prop).value\n field.setInitialValue(initValue)\n }\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n filterFields(fields, properties).forEach((field) => field.resetField())\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values. Only fields present in `initModel` will be updated.\n */\n setInitialValues,\n})\n</script>\n"],"names":["props","fields","_createElementB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UAAA,CAAQ,IAAA,CAAA,MAAA,EAAA,SAAA;AAAA;;;;;;;;;;"}
@@ -118,14 +118,14 @@ export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
118
118
  export { CommonProps, DefaultProps, cascaderPanelEmits, cascaderPanelProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
119
119
  export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
120
120
  export { checkboxDefaultProps, checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
121
- export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
121
+ export { checkboxEmits, checkboxProps, checkboxPropsDefaults } from './checkbox/src/checkbox.mjs';
122
122
  export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
123
123
  export { colProps } from './col/src/col.mjs';
124
124
  export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
125
125
  export { collapseItemProps } from './collapse/src/collapse-item.mjs';
126
126
  export { collapseContextKey } from './collapse/src/constants.mjs';
127
127
  export { ROOT_COMMON_COLOR_INJECTION_KEY, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps } from './color-picker-panel/src/color-picker-panel.mjs';
128
- export { colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
128
+ export { colorPickerEmits, colorPickerProps, colorPickerPropsDefaults } from './color-picker/src/color-picker.mjs';
129
129
  export { messageConfig } from './config-provider/src/config-provider.mjs';
130
130
  export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
131
131
  export { configProviderContextKey } from './config-provider/src/constants.mjs';
@@ -137,7 +137,7 @@ export { datePickerPanelProps } from './date-picker-panel/src/props/date-picker-
137
137
  export { descriptionProps } from './descriptions/src/description.mjs';
138
138
  export { descriptionItemProps } from './descriptions/src/description-item.mjs';
139
139
  export { useDialog } from './dialog/src/use-dialog.mjs';
140
- export { dialogContextKey, dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
140
+ export { dialogContextKey, dialogEmits, dialogProps, dialogPropsDefaults } from './dialog/src/dialog.mjs';
141
141
  export { DEFAULT_DIALOG_TRANSITION, dialogInjectionKey } from './dialog/src/constants.mjs';
142
142
  export { dividerProps } from './divider/src/divider.mjs';
143
143
  export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
@@ -219,8 +219,8 @@ export { timelineProps } from './timeline/src/timeline.mjs';
219
219
  export { timelineItemProps } from './timeline/src/timeline-item.mjs';
220
220
  export { TIMELINE_INJECTION_KEY } from './timeline/src/tokens.mjs';
221
221
  export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
222
- export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
223
- export { useTooltipContentProps } from './tooltip/src/content.mjs';
222
+ export { useTooltipTriggerProps, useTooltipTriggerPropsDefaults } from './tooltip/src/trigger.mjs';
223
+ export { useTooltipContentProps, useTooltipContentPropsDefaults } from './tooltip/src/content.mjs';
224
224
  export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
225
225
  export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
226
226
  export { NODE_INSTANCE_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY } from './tree/src/tokens.mjs';
@@ -242,5 +242,5 @@ export { splitterEmits, splitterProps } from './splitter/src/splitter.mjs';
242
242
  export { splitterPanelEmits, splitterPanelProps } from './splitter/src/split-panel.mjs';
243
243
  export { MESSAGE_DEFAULT_PLACEMENT, messageDefaults, messageEmits, messagePlacement, messageProps, messageTypes } from './message/src/message.mjs';
244
244
  export { notificationEmits, notificationProps, notificationTypes } from './notification/src/notification.mjs';
245
- export { popoverEmits, popoverProps } from './popover/src/popover.mjs';
245
+ export { popoverEmits, popoverProps, popoverPropsDefaults } from './popover/src/popover.mjs';
246
246
  //# sourceMappingURL=index.mjs.map
@@ -1,12 +1,79 @@
1
- import type { AppContext, ExtractPropTypes, ExtractPublicPropTypes, VNode } from 'vue';
1
+ import type { AppContext, Component, ExtractPublicPropTypes, VNode } from 'vue';
2
2
  import type Notification from './notification.vue';
3
3
  export declare const notificationTypes: readonly ["primary", "success", "info", "warning", "error"];
4
+ export type NotificationType = (typeof notificationTypes)[number] | '';
5
+ export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
6
+ export interface NotificationProps {
7
+ /**
8
+ * @description custom class name for Notification
9
+ */
10
+ customClass?: string;
11
+ /**
12
+ * @description whether `message` is treated as HTML string
13
+ */
14
+ dangerouslyUseHTMLString?: boolean;
15
+ /**
16
+ * @description duration before close. It will not automatically close if set 0
17
+ */
18
+ duration?: number;
19
+ /**
20
+ * @description custom icon component. It will be overridden by `type`
21
+ */
22
+ icon?: string | Component;
23
+ /**
24
+ * @description notification dom id
25
+ */
26
+ id?: string;
27
+ /**
28
+ * @description description text
29
+ */
30
+ message?: string | VNode | (() => VNode);
31
+ /**
32
+ * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset
33
+ */
34
+ offset?: number;
35
+ /**
36
+ * @description callback function when notification clicked
37
+ */
38
+ onClick?: () => void;
39
+ /**
40
+ * @description callback function when closed
41
+ */
42
+ onClose: () => void;
43
+ /**
44
+ * @description custom position
45
+ */
46
+ position?: NotificationPosition;
47
+ /**
48
+ * @description whether to show a close button
49
+ */
50
+ showClose?: boolean;
51
+ /**
52
+ * @description title
53
+ */
54
+ title?: string;
55
+ /**
56
+ * @description notification type
57
+ */
58
+ type?: NotificationType;
59
+ /**
60
+ * @description initial zIndex
61
+ */
62
+ zIndex?: number;
63
+ /**
64
+ * @description custom close icon, default is Close
65
+ */
66
+ closeIcon?: string | Component;
67
+ }
68
+ /**
69
+ * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
70
+ */
4
71
  export declare const notificationProps: {
5
72
  readonly customClass: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
6
73
  readonly dangerouslyUseHTMLString: BooleanConstructor;
7
74
  readonly duration: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 4500, boolean>;
8
75
  readonly icon: {
9
- readonly type: import("vue").PropType<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 type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
10
77
  readonly required: false;
11
78
  readonly validator: ((val: unknown) => boolean) | undefined;
12
79
  __epPropKey: true;
@@ -43,13 +110,15 @@ export declare const notificationProps: {
43
110
  readonly type: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "" | "error" | "primary" | "success" | "warning" | "info", unknown, "", boolean>;
44
111
  readonly zIndex: NumberConstructor;
45
112
  readonly closeIcon: {
46
- readonly type: import("vue").PropType<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>>;
113
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
47
114
  readonly required: false;
48
115
  readonly validator: ((val: unknown) => boolean) | undefined;
49
116
  __epPropKey: true;
50
117
  };
51
118
  };
52
- export type NotificationProps = ExtractPropTypes<typeof notificationProps>;
119
+ /**
120
+ * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
121
+ */
53
122
  export type NotificationPropsPublic = ExtractPublicPropTypes<typeof notificationProps>;
54
123
  export declare const notificationEmits: {
55
124
  destroy: () => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"notification.mjs","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { Close } from '@element-plus/icons-vue'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type {\n AppContext,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n} from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'primary',\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: Boolean,\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 | (() => VNode)>([\n String,\n Object,\n Function,\n ]),\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 /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n default: Close,\n },\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\nexport type NotificationPropsPublic = ExtractPublicPropTypes<\n typeof notificationProps\n>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification> & unknown\n\nexport type NotificationOptions = Omit<NotificationProps, 'id' | 'onClose'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n /**\n * @description callback function when closed\n */\n onClose?(vm: VNode): void\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 interface NotifyFn {\n (\n options?: NotificationParams,\n appContext?: null | AppContext\n ): NotificationHandle\n closeAll(): void\n updateOffsets(position?: NotificationOptions['position']): void\n _context: AppContext | null\n}\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped,\n appContext?: null | AppContext\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n primary: NotifyTypedFn\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":";;;;AAWO,MAAM,iBAAA,GAAoB;AAAA,EAC/B,SAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AAEO,MAAM,oBAAoB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAI1C,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;A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;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,GAAG,iBAAA,EAAmB,EAAE,CAAA;AAAA,IACjC,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ,MAAA;AAAA;AAAA;AAAA;AAAA,EAIR,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAU;AAMH,MAAM,iBAAA,GAAoB;AAAA,EAC/B,SAAS,MAAM;AACjB;;;;"}
1
+ {"version":3,"file":"notification.mjs","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { Close } from '@element-plus/icons-vue'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type { AppContext, Component, ExtractPublicPropTypes, VNode } from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'primary',\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport type NotificationType = (typeof notificationTypes)[number] | ''\n\nexport type NotificationPosition =\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left'\n\nexport interface NotificationProps {\n /**\n * @description custom class name for Notification\n */\n customClass?: string\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString?: boolean\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration?: number\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon?: string | Component\n /**\n * @description notification dom id\n */\n id?: string\n /**\n * @description description text\n */\n message?: string | VNode | (() => VNode)\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?: number\n /**\n * @description callback function when notification clicked\n */\n onClick?: () => void\n /**\n * @description callback function when closed\n */\n onClose: () => void\n /**\n * @description custom position\n */\n position?: NotificationPosition\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description title\n */\n title?: string\n /**\n * @description notification type\n */\n type?: NotificationType\n /**\n * @description initial zIndex\n */\n zIndex?: number\n /**\n * @description custom close icon, default is Close\n */\n closeIcon?: string | Component\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.\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: Boolean,\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 | (() => VNode)>([\n String,\n Object,\n Function,\n ]),\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 /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n default: Close,\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.\n */\nexport type NotificationPropsPublic = ExtractPublicPropTypes<\n typeof notificationProps\n>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification> & unknown\n\nexport type NotificationOptions = Omit<NotificationProps, 'id' | 'onClose'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n /**\n * @description callback function when closed\n */\n onClose?(vm: VNode): void\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 interface NotifyFn {\n (\n options?: NotificationParams,\n appContext?: null | AppContext\n ): NotificationHandle\n closeAll(): void\n updateOffsets(position?: NotificationOptions['position']): void\n _context: AppContext | null\n}\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped,\n appContext?: null | AppContext\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n primary: NotifyTypedFn\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":";;;;AAMO,MAAM,iBAAA,GAAoB;AAAA,EAC/B,SAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AA4EO,MAAM,oBAAoB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAI1C,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,wBAAA,EAA0B,OAAA;AAAA;AAAA;AAAA;AAAA,EAI1B,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM;AAAA,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