element-plus 2.10.0 → 2.10.2

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 (578) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +191 -163
  4. package/dist/index.full.min.js +16 -16
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +16 -16
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +191 -163
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hi.js +1 -1
  94. package/dist/locale/hi.min.js +1 -1
  95. package/dist/locale/hi.min.mjs +1 -1
  96. package/dist/locale/hi.mjs +1 -1
  97. package/dist/locale/hr.js +1 -1
  98. package/dist/locale/hr.min.js +1 -1
  99. package/dist/locale/hr.min.mjs +1 -1
  100. package/dist/locale/hr.mjs +1 -1
  101. package/dist/locale/hu.js +1 -1
  102. package/dist/locale/hu.min.js +1 -1
  103. package/dist/locale/hu.min.mjs +1 -1
  104. package/dist/locale/hu.mjs +1 -1
  105. package/dist/locale/hy-am.js +1 -1
  106. package/dist/locale/hy-am.min.js +1 -1
  107. package/dist/locale/hy-am.min.mjs +1 -1
  108. package/dist/locale/hy-am.mjs +1 -1
  109. package/dist/locale/id.js +1 -1
  110. package/dist/locale/id.min.js +1 -1
  111. package/dist/locale/id.min.mjs +1 -1
  112. package/dist/locale/id.mjs +1 -1
  113. package/dist/locale/it.js +1 -1
  114. package/dist/locale/it.min.js +1 -1
  115. package/dist/locale/it.min.mjs +1 -1
  116. package/dist/locale/it.mjs +1 -1
  117. package/dist/locale/ja.js +1 -1
  118. package/dist/locale/ja.min.js +1 -1
  119. package/dist/locale/ja.min.mjs +1 -1
  120. package/dist/locale/ja.mjs +1 -1
  121. package/dist/locale/kk.js +1 -1
  122. package/dist/locale/kk.min.js +1 -1
  123. package/dist/locale/kk.min.mjs +1 -1
  124. package/dist/locale/kk.mjs +1 -1
  125. package/dist/locale/km.js +1 -1
  126. package/dist/locale/km.min.js +1 -1
  127. package/dist/locale/km.min.mjs +1 -1
  128. package/dist/locale/km.mjs +1 -1
  129. package/dist/locale/ko.js +1 -1
  130. package/dist/locale/ko.min.js +1 -1
  131. package/dist/locale/ko.min.mjs +1 -1
  132. package/dist/locale/ko.mjs +1 -1
  133. package/dist/locale/ku.js +1 -1
  134. package/dist/locale/ku.min.js +1 -1
  135. package/dist/locale/ku.min.mjs +1 -1
  136. package/dist/locale/ku.mjs +1 -1
  137. package/dist/locale/ky.js +1 -1
  138. package/dist/locale/ky.min.js +1 -1
  139. package/dist/locale/ky.min.mjs +1 -1
  140. package/dist/locale/ky.mjs +1 -1
  141. package/dist/locale/lo.js +1 -1
  142. package/dist/locale/lo.min.js +1 -1
  143. package/dist/locale/lo.min.mjs +1 -1
  144. package/dist/locale/lo.mjs +1 -1
  145. package/dist/locale/lt.js +1 -1
  146. package/dist/locale/lt.min.js +1 -1
  147. package/dist/locale/lt.min.mjs +1 -1
  148. package/dist/locale/lt.mjs +1 -1
  149. package/dist/locale/lv.js +1 -1
  150. package/dist/locale/lv.min.js +1 -1
  151. package/dist/locale/lv.min.mjs +1 -1
  152. package/dist/locale/lv.mjs +1 -1
  153. package/dist/locale/mg.js +1 -1
  154. package/dist/locale/mg.min.js +1 -1
  155. package/dist/locale/mg.min.mjs +1 -1
  156. package/dist/locale/mg.mjs +1 -1
  157. package/dist/locale/mn.js +1 -1
  158. package/dist/locale/mn.min.js +1 -1
  159. package/dist/locale/mn.min.mjs +1 -1
  160. package/dist/locale/mn.mjs +1 -1
  161. package/dist/locale/ms.js +1 -1
  162. package/dist/locale/ms.min.js +1 -1
  163. package/dist/locale/ms.min.mjs +1 -1
  164. package/dist/locale/ms.mjs +1 -1
  165. package/dist/locale/my.js +1 -1
  166. package/dist/locale/my.min.js +1 -1
  167. package/dist/locale/my.min.mjs +1 -1
  168. package/dist/locale/my.mjs +1 -1
  169. package/dist/locale/nb-no.js +1 -1
  170. package/dist/locale/nb-no.min.js +1 -1
  171. package/dist/locale/nb-no.min.mjs +1 -1
  172. package/dist/locale/nb-no.mjs +1 -1
  173. package/dist/locale/nl.js +1 -1
  174. package/dist/locale/nl.min.js +1 -1
  175. package/dist/locale/nl.min.mjs +1 -1
  176. package/dist/locale/nl.mjs +1 -1
  177. package/dist/locale/no.js +1 -1
  178. package/dist/locale/no.min.js +1 -1
  179. package/dist/locale/no.min.mjs +1 -1
  180. package/dist/locale/no.mjs +1 -1
  181. package/dist/locale/pa.js +1 -1
  182. package/dist/locale/pa.min.js +1 -1
  183. package/dist/locale/pa.min.mjs +1 -1
  184. package/dist/locale/pa.mjs +1 -1
  185. package/dist/locale/pl.js +1 -1
  186. package/dist/locale/pl.min.js +1 -1
  187. package/dist/locale/pl.min.mjs +1 -1
  188. package/dist/locale/pl.mjs +1 -1
  189. package/dist/locale/pt-br.js +1 -1
  190. package/dist/locale/pt-br.min.js +1 -1
  191. package/dist/locale/pt-br.min.mjs +1 -1
  192. package/dist/locale/pt-br.mjs +1 -1
  193. package/dist/locale/pt.js +1 -1
  194. package/dist/locale/pt.min.js +1 -1
  195. package/dist/locale/pt.min.mjs +1 -1
  196. package/dist/locale/pt.mjs +1 -1
  197. package/dist/locale/ro.js +1 -1
  198. package/dist/locale/ro.min.js +1 -1
  199. package/dist/locale/ro.min.mjs +1 -1
  200. package/dist/locale/ro.mjs +1 -1
  201. package/dist/locale/ru.js +6 -6
  202. package/dist/locale/ru.min.js +1 -1
  203. package/dist/locale/ru.min.js.map +1 -1
  204. package/dist/locale/ru.min.mjs +1 -1
  205. package/dist/locale/ru.min.mjs.map +1 -1
  206. package/dist/locale/ru.mjs +6 -6
  207. package/dist/locale/sk.js +1 -1
  208. package/dist/locale/sk.min.js +1 -1
  209. package/dist/locale/sk.min.mjs +1 -1
  210. package/dist/locale/sk.mjs +1 -1
  211. package/dist/locale/sl.js +1 -1
  212. package/dist/locale/sl.min.js +1 -1
  213. package/dist/locale/sl.min.mjs +1 -1
  214. package/dist/locale/sl.mjs +1 -1
  215. package/dist/locale/sr.js +1 -1
  216. package/dist/locale/sr.min.js +1 -1
  217. package/dist/locale/sr.min.mjs +1 -1
  218. package/dist/locale/sr.mjs +1 -1
  219. package/dist/locale/sv.js +1 -1
  220. package/dist/locale/sv.min.js +1 -1
  221. package/dist/locale/sv.min.mjs +1 -1
  222. package/dist/locale/sv.mjs +1 -1
  223. package/dist/locale/sw.js +1 -1
  224. package/dist/locale/sw.min.js +1 -1
  225. package/dist/locale/sw.min.mjs +1 -1
  226. package/dist/locale/sw.mjs +1 -1
  227. package/dist/locale/ta.js +1 -1
  228. package/dist/locale/ta.min.js +1 -1
  229. package/dist/locale/ta.min.mjs +1 -1
  230. package/dist/locale/ta.mjs +1 -1
  231. package/dist/locale/te.js +1 -1
  232. package/dist/locale/te.min.js +1 -1
  233. package/dist/locale/te.min.mjs +1 -1
  234. package/dist/locale/te.mjs +1 -1
  235. package/dist/locale/th.js +1 -1
  236. package/dist/locale/th.min.js +1 -1
  237. package/dist/locale/th.min.mjs +1 -1
  238. package/dist/locale/th.mjs +1 -1
  239. package/dist/locale/tk.js +1 -1
  240. package/dist/locale/tk.min.js +1 -1
  241. package/dist/locale/tk.min.mjs +1 -1
  242. package/dist/locale/tk.mjs +1 -1
  243. package/dist/locale/tr.js +1 -1
  244. package/dist/locale/tr.min.js +1 -1
  245. package/dist/locale/tr.min.mjs +1 -1
  246. package/dist/locale/tr.mjs +1 -1
  247. package/dist/locale/ug-cn.js +1 -1
  248. package/dist/locale/ug-cn.min.js +1 -1
  249. package/dist/locale/ug-cn.min.mjs +1 -1
  250. package/dist/locale/ug-cn.mjs +1 -1
  251. package/dist/locale/uk.js +1 -1
  252. package/dist/locale/uk.min.js +1 -1
  253. package/dist/locale/uk.min.mjs +1 -1
  254. package/dist/locale/uk.mjs +1 -1
  255. package/dist/locale/uz-uz.js +1 -1
  256. package/dist/locale/uz-uz.min.js +1 -1
  257. package/dist/locale/uz-uz.min.mjs +1 -1
  258. package/dist/locale/uz-uz.mjs +1 -1
  259. package/dist/locale/vi.js +1 -1
  260. package/dist/locale/vi.min.js +1 -1
  261. package/dist/locale/vi.min.mjs +1 -1
  262. package/dist/locale/vi.mjs +1 -1
  263. package/dist/locale/zh-cn.js +1 -1
  264. package/dist/locale/zh-cn.min.js +1 -1
  265. package/dist/locale/zh-cn.min.mjs +1 -1
  266. package/dist/locale/zh-cn.mjs +1 -1
  267. package/dist/locale/zh-hk.js +1 -1
  268. package/dist/locale/zh-hk.min.js +1 -1
  269. package/dist/locale/zh-hk.min.mjs +1 -1
  270. package/dist/locale/zh-hk.mjs +1 -1
  271. package/dist/locale/zh-mo.js +1 -1
  272. package/dist/locale/zh-mo.min.js +1 -1
  273. package/dist/locale/zh-mo.min.mjs +1 -1
  274. package/dist/locale/zh-mo.mjs +1 -1
  275. package/dist/locale/zh-tw.js +1 -1
  276. package/dist/locale/zh-tw.min.js +1 -1
  277. package/dist/locale/zh-tw.min.mjs +1 -1
  278. package/dist/locale/zh-tw.mjs +1 -1
  279. package/es/components/autocomplete/index.mjs +2 -2
  280. package/es/components/autocomplete/src/autocomplete.mjs +370 -80
  281. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  282. package/es/components/autocomplete/src/autocomplete2.mjs +80 -370
  283. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  284. package/es/components/avatar/index.mjs +2 -2
  285. package/es/components/avatar/src/avatar.mjs +65 -31
  286. package/es/components/avatar/src/avatar.mjs.map +1 -1
  287. package/es/components/avatar/src/avatar2.mjs +31 -65
  288. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  289. package/es/components/badge/index.mjs +2 -2
  290. package/es/components/badge/src/badge.mjs +32 -71
  291. package/es/components/badge/src/badge.mjs.map +1 -1
  292. package/es/components/badge/src/badge2.mjs +71 -32
  293. package/es/components/badge/src/badge2.mjs.map +1 -1
  294. package/es/components/calendar/index.mjs +2 -2
  295. package/es/components/calendar/src/calendar.mjs +134 -16
  296. package/es/components/calendar/src/calendar.mjs.map +1 -1
  297. package/es/components/calendar/src/calendar2.mjs +16 -134
  298. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  299. package/es/components/cascader/src/cascader.d.ts +6 -0
  300. package/es/components/cascader/src/cascader.mjs +3 -0
  301. package/es/components/cascader/src/cascader.mjs.map +1 -1
  302. package/es/components/cascader/src/cascader.vue.d.ts +12 -0
  303. package/es/components/cascader/src/cascader2.mjs +31 -26
  304. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  305. package/es/components/col/index.mjs +2 -2
  306. package/es/components/col/src/col.mjs +64 -43
  307. package/es/components/col/src/col.mjs.map +1 -1
  308. package/es/components/col/src/col2.mjs +43 -64
  309. package/es/components/col/src/col2.mjs.map +1 -1
  310. package/es/components/collapse/index.mjs +2 -2
  311. package/es/components/collapse/src/collapse.mjs +28 -23
  312. package/es/components/collapse/src/collapse.mjs.map +1 -1
  313. package/es/components/collapse/src/collapse2.mjs +23 -28
  314. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  315. package/es/components/date-picker/src/composables/use-range-picker.d.ts +2 -1
  316. package/es/components/date-picker/src/composables/use-range-picker.mjs +2 -0
  317. package/es/components/date-picker/src/composables/use-range-picker.mjs.map +1 -1
  318. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
  319. package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs +9 -2
  320. package/es/components/date-picker/src/date-picker-com/panel-month-range.mjs.map +1 -1
  321. package/es/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
  322. package/es/components/date-picker/src/date-picker-com/panel-year-range.mjs +77 -107
  323. package/es/components/date-picker/src/date-picker-com/panel-year-range.mjs.map +1 -1
  324. package/es/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
  325. package/es/components/date-picker/src/panel-utils.d.ts +12 -5
  326. package/es/components/date-picker/src/props/panel-date-range.d.ts +1 -1
  327. package/es/components/date-picker/src/props/panel-date-range.mjs +1 -2
  328. package/es/components/date-picker/src/props/panel-date-range.mjs.map +1 -1
  329. package/es/components/date-picker/src/props/panel-month-range.d.ts +1 -0
  330. package/es/components/date-picker/src/props/panel-year-range.d.ts +1 -0
  331. package/es/components/date-picker/src/props/shared.d.ts +1 -0
  332. package/es/components/date-picker/src/props/shared.mjs +1 -0
  333. package/es/components/date-picker/src/props/shared.mjs.map +1 -1
  334. package/es/components/date-picker/src/utils.d.ts +2 -1
  335. package/es/components/date-picker/src/utils.mjs +5 -5
  336. package/es/components/date-picker/src/utils.mjs.map +1 -1
  337. package/es/components/descriptions/src/description2.mjs +1 -1
  338. package/es/components/descriptions/src/descriptions-row.mjs +63 -6
  339. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  340. package/es/components/descriptions/src/descriptions-row2.mjs +6 -63
  341. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  342. package/es/components/dropdown/src/dropdown.mjs +1 -1
  343. package/es/components/empty/index.mjs +2 -2
  344. package/es/components/empty/src/empty.mjs +52 -11
  345. package/es/components/empty/src/empty.mjs.map +1 -1
  346. package/es/components/empty/src/empty2.mjs +11 -52
  347. package/es/components/empty/src/empty2.mjs.map +1 -1
  348. package/es/components/form/index.mjs +2 -2
  349. package/es/components/form/src/form-item2.mjs +5 -3
  350. package/es/components/form/src/form-item2.mjs.map +1 -1
  351. package/es/components/form/src/form.mjs +161 -54
  352. package/es/components/form/src/form.mjs.map +1 -1
  353. package/es/components/form/src/form.vue.d.ts +7 -1
  354. package/es/components/form/src/form2.mjs +54 -159
  355. package/es/components/form/src/form2.mjs.map +1 -1
  356. package/es/components/form/src/types.d.ts +3 -1
  357. package/es/components/form/src/utils.mjs +3 -2
  358. package/es/components/form/src/utils.mjs.map +1 -1
  359. package/es/components/image/index.mjs +2 -2
  360. package/es/components/image/src/image.mjs +226 -68
  361. package/es/components/image/src/image.mjs.map +1 -1
  362. package/es/components/image/src/image2.mjs +68 -226
  363. package/es/components/image/src/image2.mjs.map +1 -1
  364. package/es/components/index.mjs +14 -14
  365. package/es/components/mention/src/mention-dropdown.mjs +166 -15
  366. package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
  367. package/es/components/mention/src/mention-dropdown2.mjs +15 -166
  368. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  369. package/es/components/mention/src/mention2.mjs +1 -1
  370. package/es/components/popconfirm/index.mjs +2 -2
  371. package/es/components/popconfirm/src/popconfirm.mjs +114 -45
  372. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  373. package/es/components/popconfirm/src/popconfirm2.mjs +45 -114
  374. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  375. package/es/components/popper/index.mjs +2 -2
  376. package/es/components/popper/src/popper.mjs +32 -22
  377. package/es/components/popper/src/popper.mjs.map +1 -1
  378. package/es/components/popper/src/popper2.mjs +22 -32
  379. package/es/components/popper/src/popper2.mjs.map +1 -1
  380. package/es/components/popper/src/trigger2.mjs +1 -1
  381. package/es/components/result/index.mjs +2 -2
  382. package/es/components/result/src/result.mjs +62 -30
  383. package/es/components/result/src/result.mjs.map +1 -1
  384. package/es/components/result/src/result2.mjs +30 -62
  385. package/es/components/result/src/result2.mjs.map +1 -1
  386. package/es/components/scrollbar/src/thumb2.mjs +7 -1
  387. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  388. package/es/components/segmented/index.mjs +2 -2
  389. package/es/components/segmented/src/segmented.mjs +168 -42
  390. package/es/components/segmented/src/segmented.mjs.map +1 -1
  391. package/es/components/segmented/src/segmented2.mjs +42 -168
  392. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  393. package/es/components/select/src/select2.mjs +45 -15
  394. package/es/components/select/src/select2.mjs.map +1 -1
  395. package/es/components/skeleton/index.mjs +2 -2
  396. package/es/components/skeleton/src/skeleton-item.mjs +22 -17
  397. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  398. package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
  399. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  400. package/es/components/skeleton/src/skeleton2.mjs +1 -1
  401. package/es/components/splitter-panel/style/css.d.ts +1 -1
  402. package/es/components/splitter-panel/style/css.mjs +1 -1
  403. package/es/components/tooltip/src/tooltip.mjs +1 -1
  404. package/es/components/tooltip-v2/index.mjs +1 -1
  405. package/es/components/tooltip-v2/src/content.mjs +110 -48
  406. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  407. package/es/components/tooltip-v2/src/content2.mjs +48 -110
  408. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  409. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  410. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  411. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  412. package/es/components/transfer/src/transfer-panel.mjs +130 -19
  413. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  414. package/es/components/transfer/src/transfer-panel2.mjs +19 -130
  415. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  416. package/es/components/transfer/src/transfer2.mjs +1 -1
  417. package/es/hooks/use-focus-controller/index.mjs +3 -2
  418. package/es/hooks/use-focus-controller/index.mjs.map +1 -1
  419. package/es/index.d.ts +27 -1
  420. package/es/index.mjs +14 -14
  421. package/es/locale/lang/ru.mjs +5 -5
  422. package/es/locale/lang/ru.mjs.map +1 -1
  423. package/es/version.d.ts +1 -1
  424. package/es/version.mjs +1 -1
  425. package/es/version.mjs.map +1 -1
  426. package/lib/components/autocomplete/index.js +2 -2
  427. package/lib/components/autocomplete/src/autocomplete.js +368 -79
  428. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  429. package/lib/components/autocomplete/src/autocomplete2.js +79 -368
  430. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  431. package/lib/components/avatar/index.js +2 -2
  432. package/lib/components/avatar/src/avatar.js +65 -32
  433. package/lib/components/avatar/src/avatar.js.map +1 -1
  434. package/lib/components/avatar/src/avatar2.js +32 -65
  435. package/lib/components/avatar/src/avatar2.js.map +1 -1
  436. package/lib/components/badge/index.js +2 -2
  437. package/lib/components/badge/src/badge.js +32 -71
  438. package/lib/components/badge/src/badge.js.map +1 -1
  439. package/lib/components/badge/src/badge2.js +71 -32
  440. package/lib/components/badge/src/badge2.js.map +1 -1
  441. package/lib/components/calendar/index.js +2 -2
  442. package/lib/components/calendar/src/calendar.js +134 -17
  443. package/lib/components/calendar/src/calendar.js.map +1 -1
  444. package/lib/components/calendar/src/calendar2.js +17 -134
  445. package/lib/components/calendar/src/calendar2.js.map +1 -1
  446. package/lib/components/cascader/src/cascader.d.ts +6 -0
  447. package/lib/components/cascader/src/cascader.js +3 -0
  448. package/lib/components/cascader/src/cascader.js.map +1 -1
  449. package/lib/components/cascader/src/cascader.vue.d.ts +12 -0
  450. package/lib/components/cascader/src/cascader2.js +37 -32
  451. package/lib/components/cascader/src/cascader2.js.map +1 -1
  452. package/lib/components/col/index.js +2 -2
  453. package/lib/components/col/src/col.js +64 -43
  454. package/lib/components/col/src/col.js.map +1 -1
  455. package/lib/components/col/src/col2.js +43 -64
  456. package/lib/components/col/src/col2.js.map +1 -1
  457. package/lib/components/collapse/index.js +2 -2
  458. package/lib/components/collapse/src/collapse.js +28 -25
  459. package/lib/components/collapse/src/collapse.js.map +1 -1
  460. package/lib/components/collapse/src/collapse2.js +25 -28
  461. package/lib/components/collapse/src/collapse2.js.map +1 -1
  462. package/lib/components/date-picker/src/composables/use-range-picker.d.ts +2 -1
  463. package/lib/components/date-picker/src/composables/use-range-picker.js +2 -0
  464. package/lib/components/date-picker/src/composables/use-range-picker.js.map +1 -1
  465. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
  466. package/lib/components/date-picker/src/date-picker-com/panel-month-range.js +8 -1
  467. package/lib/components/date-picker/src/date-picker-com/panel-month-range.js.map +1 -1
  468. package/lib/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
  469. package/lib/components/date-picker/src/date-picker-com/panel-year-range.js +79 -109
  470. package/lib/components/date-picker/src/date-picker-com/panel-year-range.js.map +1 -1
  471. package/lib/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
  472. package/lib/components/date-picker/src/panel-utils.d.ts +12 -5
  473. package/lib/components/date-picker/src/props/panel-date-range.d.ts +1 -1
  474. package/lib/components/date-picker/src/props/panel-date-range.js +1 -2
  475. package/lib/components/date-picker/src/props/panel-date-range.js.map +1 -1
  476. package/lib/components/date-picker/src/props/panel-month-range.d.ts +1 -0
  477. package/lib/components/date-picker/src/props/panel-year-range.d.ts +1 -0
  478. package/lib/components/date-picker/src/props/shared.d.ts +1 -0
  479. package/lib/components/date-picker/src/props/shared.js +1 -0
  480. package/lib/components/date-picker/src/props/shared.js.map +1 -1
  481. package/lib/components/date-picker/src/utils.d.ts +2 -1
  482. package/lib/components/date-picker/src/utils.js +5 -5
  483. package/lib/components/date-picker/src/utils.js.map +1 -1
  484. package/lib/components/descriptions/src/description2.js +1 -1
  485. package/lib/components/descriptions/src/descriptions-row.js +63 -6
  486. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  487. package/lib/components/descriptions/src/descriptions-row2.js +6 -63
  488. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  489. package/lib/components/dropdown/src/dropdown.js +1 -1
  490. package/lib/components/empty/index.js +2 -2
  491. package/lib/components/empty/src/empty.js +52 -11
  492. package/lib/components/empty/src/empty.js.map +1 -1
  493. package/lib/components/empty/src/empty2.js +11 -52
  494. package/lib/components/empty/src/empty2.js.map +1 -1
  495. package/lib/components/form/index.js +2 -2
  496. package/lib/components/form/src/form-item2.js +4 -2
  497. package/lib/components/form/src/form-item2.js.map +1 -1
  498. package/lib/components/form/src/form.js +160 -55
  499. package/lib/components/form/src/form.js.map +1 -1
  500. package/lib/components/form/src/form.vue.d.ts +7 -1
  501. package/lib/components/form/src/form2.js +55 -158
  502. package/lib/components/form/src/form2.js.map +1 -1
  503. package/lib/components/form/src/types.d.ts +3 -1
  504. package/lib/components/form/src/utils.js +3 -2
  505. package/lib/components/form/src/utils.js.map +1 -1
  506. package/lib/components/image/index.js +2 -2
  507. package/lib/components/image/src/image.js +225 -68
  508. package/lib/components/image/src/image.js.map +1 -1
  509. package/lib/components/image/src/image2.js +68 -225
  510. package/lib/components/image/src/image2.js.map +1 -1
  511. package/lib/components/index.js +14 -14
  512. package/lib/components/mention/src/mention-dropdown.js +166 -16
  513. package/lib/components/mention/src/mention-dropdown.js.map +1 -1
  514. package/lib/components/mention/src/mention-dropdown2.js +16 -166
  515. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  516. package/lib/components/mention/src/mention2.js +1 -1
  517. package/lib/components/popconfirm/index.js +2 -2
  518. package/lib/components/popconfirm/src/popconfirm.js +114 -46
  519. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  520. package/lib/components/popconfirm/src/popconfirm2.js +46 -114
  521. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  522. package/lib/components/popper/index.js +2 -2
  523. package/lib/components/popper/src/popper.js +32 -25
  524. package/lib/components/popper/src/popper.js.map +1 -1
  525. package/lib/components/popper/src/popper2.js +25 -32
  526. package/lib/components/popper/src/popper2.js.map +1 -1
  527. package/lib/components/popper/src/trigger2.js +1 -1
  528. package/lib/components/result/index.js +2 -2
  529. package/lib/components/result/src/result.js +62 -32
  530. package/lib/components/result/src/result.js.map +1 -1
  531. package/lib/components/result/src/result2.js +32 -62
  532. package/lib/components/result/src/result2.js.map +1 -1
  533. package/lib/components/scrollbar/src/thumb2.js +7 -1
  534. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  535. package/lib/components/segmented/index.js +2 -2
  536. package/lib/components/segmented/src/segmented.js +168 -44
  537. package/lib/components/segmented/src/segmented.js.map +1 -1
  538. package/lib/components/segmented/src/segmented2.js +44 -168
  539. package/lib/components/segmented/src/segmented2.js.map +1 -1
  540. package/lib/components/select/src/select2.js +44 -14
  541. package/lib/components/select/src/select2.js.map +1 -1
  542. package/lib/components/skeleton/index.js +2 -2
  543. package/lib/components/skeleton/src/skeleton-item.js +22 -17
  544. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  545. package/lib/components/skeleton/src/skeleton-item2.js +17 -22
  546. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  547. package/lib/components/skeleton/src/skeleton2.js +1 -1
  548. package/lib/components/splitter-panel/style/css.d.ts +1 -1
  549. package/lib/components/splitter-panel/style/css.js +1 -1
  550. package/lib/components/tooltip/src/tooltip.js +1 -1
  551. package/lib/components/tooltip-v2/index.js +1 -1
  552. package/lib/components/tooltip-v2/src/content.js +110 -48
  553. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  554. package/lib/components/tooltip-v2/src/content2.js +48 -110
  555. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  556. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  557. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  558. package/lib/components/transfer/src/composables/use-check.js +1 -1
  559. package/lib/components/transfer/src/transfer-panel.js +130 -21
  560. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  561. package/lib/components/transfer/src/transfer-panel2.js +21 -130
  562. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  563. package/lib/components/transfer/src/transfer2.js +1 -1
  564. package/lib/hooks/use-focus-controller/index.js +3 -2
  565. package/lib/hooks/use-focus-controller/index.js.map +1 -1
  566. package/lib/index.d.ts +27 -1
  567. package/lib/index.js +14 -14
  568. package/lib/locale/lang/ru.js +5 -5
  569. package/lib/locale/lang/ru.js.map +1 -1
  570. package/lib/version.d.ts +1 -1
  571. package/lib/version.js +1 -1
  572. package/lib/version.js.map +1 -1
  573. package/package.json +2 -2
  574. package/tags.json +1 -1
  575. package/theme-chalk/el-drawer.css +1 -1
  576. package/theme-chalk/index.css +1 -1
  577. package/theme-chalk/src/drawer.scss +1 -1
  578. package/web-types.json +1 -1
@@ -7,11 +7,12 @@ type DayRange = [Dayjs | undefined, Dayjs | undefined];
7
7
  export declare const isValidRange: (range: DayRange) => boolean;
8
8
  type GetDefaultValueParams = {
9
9
  lang: string;
10
+ step?: number;
10
11
  unit: 'month' | 'year';
11
12
  unlinkPanels: boolean;
12
13
  };
13
14
  export type DefaultValue = [Date, Date] | Date | undefined;
14
- export declare const getDefaultValue: (defaultValue: DefaultValue, { lang, unit, unlinkPanels }: GetDefaultValueParams) => dayjs.Dayjs[];
15
+ export declare const getDefaultValue: (defaultValue: DefaultValue, { lang, step, unit, unlinkPanels }: GetDefaultValueParams) => dayjs.Dayjs[];
15
16
  type Dimension = {
16
17
  row: number;
17
18
  column: number;
@@ -8,12 +8,12 @@ const isValidRange = (range) => {
8
8
  const [left, right] = range;
9
9
  return dayjs.isDayjs(left) && dayjs.isDayjs(right) && dayjs(left).isValid() && dayjs(right).isValid() && left.isSameOrBefore(right);
10
10
  };
11
- const getDefaultValue = (defaultValue, { lang, unit, unlinkPanels }) => {
11
+ const getDefaultValue = (defaultValue, { lang, step = 1, unit, unlinkPanels }) => {
12
12
  let start;
13
13
  if (isArray(defaultValue)) {
14
14
  let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang));
15
15
  if (!unlinkPanels) {
16
- right = left.add(1, unit);
16
+ right = left.add(step, unit);
17
17
  }
18
18
  return [left, right];
19
19
  } else if (defaultValue) {
@@ -22,7 +22,7 @@ const getDefaultValue = (defaultValue, { lang, unit, unlinkPanels }) => {
22
22
  start = dayjs();
23
23
  }
24
24
  start = start.locale(lang);
25
- return [start, start.add(1, unit)];
25
+ return [start, start.add(step, unit)];
26
26
  };
27
27
  const buildPickerTable = (dimension, rows, {
28
28
  columnIndexOffset,
@@ -73,12 +73,12 @@ const buildPickerTable = (dimension, rows, {
73
73
  }
74
74
  };
75
75
  const datesInMonth = (date, year, month, lang) => {
76
- const firstDay = dayjs(date).locale(lang).month(month).year(year);
76
+ const firstDay = dayjs().locale(lang).startOf("month").month(month).year(year).hour(date.hour()).minute(date.minute()).second(date.second());
77
77
  const numOfDays = firstDay.daysInMonth();
78
78
  return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate());
79
79
  };
80
80
  const getValidDateOfMonth = (date, year, month, lang, disabledDate) => {
81
- const _value = dayjs(date).year(year).month(month);
81
+ const _value = dayjs().year(year).month(month).startOf("month").hour(date.hour()).minute(date.minute()).second(date.second());
82
82
  const _date = datesInMonth(date, year, month, lang).find((date2) => {
83
83
  return !(disabledDate == null ? void 0 : disabledDate(date2));
84
84
  });
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/date-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isString } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\n\nimport type { ComputedRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\nimport type { DisabledDateType } from './props/shared'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) &&\n dayjs.isDayjs(right) &&\n dayjs(left).isValid() &&\n dayjs(right).isValid() &&\n left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(1, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(1, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n\nexport const datesInMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string\n) => {\n const firstDay = dayjs(date).locale(lang).month(month).year(year)\n const numOfDays = firstDay.daysInMonth()\n return rangeArr(numOfDays).map((n) => firstDay.add(n, 'day').toDate())\n}\n\nexport const getValidDateOfMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const _value = dayjs(date).year(year).month(month)\n const _date = datesInMonth(date, year, month, lang).find((date) => {\n return !disabledDate?.(date)\n })\n if (_date) {\n return dayjs(_date).locale(lang)\n }\n return _value.locale(lang)\n}\n\nexport const getValidDateOfYear = (\n value: Dayjs,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const year = value.year()\n if (!disabledDate?.(value.toDate())) {\n return value.locale(lang)\n }\n const month = value.month()\n if (!datesInMonth(value, year, month, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, month, lang, disabledDate)\n }\n for (let i = 0; i < 12; i++) {\n if (!datesInMonth(value, year, i, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, i, lang, disabledDate)\n }\n }\n return value\n}\n\nexport const correctlyParseUserInput = (\n value: string | Dayjs | Dayjs[],\n format: string,\n lang: string,\n defaultFormat: ComputedRef<boolean>\n): Dayjs | Dayjs[] => {\n if (isArray(value)) {\n return value.map(\n (v) => correctlyParseUserInput(v, format, lang, defaultFormat) as Dayjs\n )\n }\n if (isString(value)) {\n const dayjsValue = defaultFormat.value ? dayjs(value) : dayjs(value, format)\n if (!dayjsValue.isValid()) {\n // return directly if not valid\n return dayjsValue\n }\n }\n return dayjs(value, format).locale(lang)\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK;AACvC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;AACrB,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC;AAC9B,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,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CAAC;AACxB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C;;;;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/date-picker/src/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { isArray, isString } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\n\nimport type { ComputedRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\nimport type { DisabledDateType } from './props/shared'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) &&\n dayjs.isDayjs(right) &&\n dayjs(left).isValid() &&\n dayjs(right).isValid() &&\n left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n step?: number\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, step = 1, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(step, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(step, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n\nexport const datesInMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string\n) => {\n const firstDay = dayjs()\n .locale(lang)\n .startOf('month')\n .month(month)\n .year(year)\n .hour(date.hour())\n .minute(date.minute())\n .second(date.second())\n\n const numOfDays = firstDay.daysInMonth()\n return rangeArr(numOfDays).map((n) => firstDay.add(n, 'day').toDate())\n}\n\nexport const getValidDateOfMonth = (\n date: Dayjs,\n year: number,\n month: number,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const _value = dayjs()\n .year(year)\n .month(month)\n .startOf('month')\n .hour(date.hour())\n .minute(date.minute())\n .second(date.second())\n const _date = datesInMonth(date, year, month, lang).find((date) => {\n return !disabledDate?.(date)\n })\n if (_date) {\n return dayjs(_date).locale(lang)\n }\n return _value.locale(lang)\n}\n\nexport const getValidDateOfYear = (\n value: Dayjs,\n lang: string,\n disabledDate?: DisabledDateType\n) => {\n const year = value.year()\n if (!disabledDate?.(value.toDate())) {\n return value.locale(lang)\n }\n const month = value.month()\n if (!datesInMonth(value, year, month, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, month, lang, disabledDate)\n }\n for (let i = 0; i < 12; i++) {\n if (!datesInMonth(value, year, i, lang).every(disabledDate)) {\n return getValidDateOfMonth(value, year, i, lang, disabledDate)\n }\n }\n return value\n}\n\nexport const correctlyParseUserInput = (\n value: string | Dayjs | Dayjs[],\n format: string,\n lang: string,\n defaultFormat: ComputedRef<boolean>\n): Dayjs | Dayjs[] => {\n if (isArray(value)) {\n return value.map(\n (v) => correctlyParseUserInput(v, format, lang, defaultFormat) as Dayjs\n )\n }\n if (isString(value)) {\n const dayjsValue = defaultFormat.value ? dayjs(value) : dayjs(value, format)\n if (!dayjsValue.isValid()) {\n // return directly if not valid\n return dayjsValue\n }\n }\n return dayjs(value, format).locale(lang)\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK;AACvC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;AACrB,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC;AAC9B,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,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,EAAE,IAAI,EAAE,aAAa,KAAK;AAC/E,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;AACtB,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;AACrF,GAAG;AACH,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACvB,IAAI,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACjF,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE;AAC/B,MAAM,OAAO,UAAU,CAAC;AACxB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3C;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, useSlots, provide, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from 'vue';
2
- import ElDescriptionsRow from './descriptions-row2.mjs';
2
+ import ElDescriptionsRow from './descriptions-row.mjs';
3
3
  import { descriptionsKey } from './token.mjs';
4
4
  import { descriptionProps } from './description.mjs';
5
5
  import { COMPONENT_NAME } from './constants.mjs';
@@ -1,11 +1,68 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createVNode } from 'vue';
2
+ import ElDescriptionsCell from './descriptions-cell.mjs';
3
+ import { descriptionsKey } from './token.mjs';
4
+ import { descriptionsRowProps } from './descriptions-row2.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
2
6
 
3
- const descriptionsRowProps = buildProps({
4
- row: {
5
- type: definePropType(Array),
6
- default: () => []
7
+ const __default__ = defineComponent({
8
+ name: "ElDescriptionsRow"
9
+ });
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: descriptionsRowProps,
13
+ setup(__props) {
14
+ const descriptions = inject(descriptionsKey, {});
15
+ return (_ctx, _cache) => {
16
+ return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
17
+ createElementVNode("tr", null, [
18
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
19
+ return openBlock(), createBlock(unref(ElDescriptionsCell), {
20
+ key: `tr1-${_index}`,
21
+ cell,
22
+ tag: "th",
23
+ type: "label"
24
+ }, null, 8, ["cell"]);
25
+ }), 128))
26
+ ]),
27
+ createElementVNode("tr", null, [
28
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
29
+ return openBlock(), createBlock(unref(ElDescriptionsCell), {
30
+ key: `tr2-${_index}`,
31
+ cell,
32
+ tag: "td",
33
+ type: "content"
34
+ }, null, 8, ["cell"]);
35
+ }), 128))
36
+ ])
37
+ ], 64)) : (openBlock(), createElementBlock("tr", { key: 1 }, [
38
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
39
+ return openBlock(), createElementBlock(Fragment, {
40
+ key: `tr3-${_index}`
41
+ }, [
42
+ unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
43
+ createVNode(unref(ElDescriptionsCell), {
44
+ cell,
45
+ tag: "td",
46
+ type: "label"
47
+ }, null, 8, ["cell"]),
48
+ createVNode(unref(ElDescriptionsCell), {
49
+ cell,
50
+ tag: "td",
51
+ type: "content"
52
+ }, null, 8, ["cell"])
53
+ ], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
54
+ key: 1,
55
+ cell,
56
+ tag: "td",
57
+ type: "both"
58
+ }, null, 8, ["cell"]))
59
+ ], 64);
60
+ }), 128))
61
+ ]));
62
+ };
7
63
  }
8
64
  });
65
+ var ElDescriptionsRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "descriptions-row.vue"]]);
9
66
 
10
- export { descriptionsRowProps };
67
+ export { ElDescriptionsRow as default };
11
68
  //# sourceMappingURL=descriptions-row.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptions-row.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { DescriptionItemVNode } from './description-item'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: definePropType<DescriptionItemVNode[]>(Array),\n default: () => [],\n },\n} as const)\n"],"names":[],"mappings":";;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"descriptions-row.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.vue"],"sourcesContent":["<template>\n <template v-if=\"descriptions.direction === 'vertical'\">\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr1-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"th\" type=\"label\" />\n </template>\n </tr>\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr2-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n </tr>\n </template>\n <tr v-else>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr3-${_index}`\">\n <template v-if=\"descriptions.border\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"label\" />\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n <el-descriptions-cell v-else :cell=\"cell\" tag=\"td\" type=\"both\" />\n </template>\n </tr>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\n\nimport ElDescriptionsCell from './descriptions-cell'\nimport { descriptionsKey } from './token'\nimport { descriptionsRowProps } from './descriptions-row'\n\nimport type { IDescriptionsInject } from './descriptions.type'\n\ndefineOptions({\n name: 'ElDescriptionsRow',\n})\n\ndefineProps(descriptionsRowProps)\n\nconst descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAA,MAAM,YAAe,GAAA,MAAA,CAAO,eAAiB,EAAA,EAAyB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,68 +1,11 @@
1
- import { defineComponent, inject, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createVNode } from 'vue';
2
- import ElDescriptionsCell from './descriptions-cell.mjs';
3
- import { descriptionsKey } from './token.mjs';
4
- import { descriptionsRowProps } from './descriptions-row.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
2
 
7
- const __default__ = defineComponent({
8
- name: "ElDescriptionsRow"
9
- });
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: descriptionsRowProps,
13
- setup(__props) {
14
- const descriptions = inject(descriptionsKey, {});
15
- return (_ctx, _cache) => {
16
- return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
17
- createElementVNode("tr", null, [
18
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
19
- return openBlock(), createBlock(unref(ElDescriptionsCell), {
20
- key: `tr1-${_index}`,
21
- cell,
22
- tag: "th",
23
- type: "label"
24
- }, null, 8, ["cell"]);
25
- }), 128))
26
- ]),
27
- createElementVNode("tr", null, [
28
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
29
- return openBlock(), createBlock(unref(ElDescriptionsCell), {
30
- key: `tr2-${_index}`,
31
- cell,
32
- tag: "td",
33
- type: "content"
34
- }, null, 8, ["cell"]);
35
- }), 128))
36
- ])
37
- ], 64)) : (openBlock(), createElementBlock("tr", { key: 1 }, [
38
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
39
- return openBlock(), createElementBlock(Fragment, {
40
- key: `tr3-${_index}`
41
- }, [
42
- unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
43
- createVNode(unref(ElDescriptionsCell), {
44
- cell,
45
- tag: "td",
46
- type: "label"
47
- }, null, 8, ["cell"]),
48
- createVNode(unref(ElDescriptionsCell), {
49
- cell,
50
- tag: "td",
51
- type: "content"
52
- }, null, 8, ["cell"])
53
- ], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
54
- key: 1,
55
- cell,
56
- tag: "td",
57
- type: "both"
58
- }, null, 8, ["cell"]))
59
- ], 64);
60
- }), 128))
61
- ]));
62
- };
3
+ const descriptionsRowProps = buildProps({
4
+ row: {
5
+ type: definePropType(Array),
6
+ default: () => []
63
7
  }
64
8
  });
65
- var ElDescriptionsRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "descriptions-row.vue"]]);
66
9
 
67
- export { ElDescriptionsRow as default };
10
+ export { descriptionsRowProps };
68
11
  //# sourceMappingURL=descriptions-row2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptions-row2.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.vue"],"sourcesContent":["<template>\n <template v-if=\"descriptions.direction === 'vertical'\">\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr1-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"th\" type=\"label\" />\n </template>\n </tr>\n <tr>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr2-${_index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n </tr>\n </template>\n <tr v-else>\n <template v-for=\"(cell, _index) in row\" :key=\"`tr3-${_index}`\">\n <template v-if=\"descriptions.border\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"label\" />\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n <el-descriptions-cell v-else :cell=\"cell\" tag=\"td\" type=\"both\" />\n </template>\n </tr>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\n\nimport ElDescriptionsCell from './descriptions-cell'\nimport { descriptionsKey } from './token'\nimport { descriptionsRowProps } from './descriptions-row'\n\nimport type { IDescriptionsInject } from './descriptions.type'\n\ndefineOptions({\n name: 'ElDescriptionsRow',\n})\n\ndefineProps(descriptionsRowProps)\n\nconst descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,mBAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAA,MAAM,YAAe,GAAA,MAAA,CAAO,eAAiB,EAAA,EAAyB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"descriptions-row2.mjs","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { DescriptionItemVNode } from './description-item'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: definePropType<DescriptionItemVNode[]>(Array),\n default: () => [],\n },\n} as const)\n"],"names":[],"mappings":";;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
2
- import { roleTypes } from '../../popper/src/popper.mjs';
2
+ import { roleTypes } from '../../popper/src/popper2.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { EVENT_CODE } from '../../../constants/aria.mjs';
5
5
  import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
@@ -1,5 +1,5 @@
1
- import Empty from './src/empty2.mjs';
2
- export { emptyProps } from './src/empty.mjs';
1
+ import Empty from './src/empty.mjs';
2
+ export { emptyProps } from './src/empty2.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElEmpty = withInstall(Empty);
@@ -1,16 +1,57 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
2
+ import ImgEmpty from './img-empty.mjs';
3
+ import { emptyProps } from './empty2.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
+ import { addUnit } from '../../../utils/dom/style.mjs';
2
8
 
3
- const emptyProps = buildProps({
4
- image: {
5
- type: String,
6
- default: ""
7
- },
8
- imageSize: Number,
9
- description: {
10
- type: String,
11
- default: ""
9
+ const __default__ = defineComponent({
10
+ name: "ElEmpty"
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: emptyProps,
15
+ setup(__props) {
16
+ const props = __props;
17
+ const { t } = useLocale();
18
+ const ns = useNamespace("empty");
19
+ const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
20
+ const imageStyle = computed(() => ({
21
+ width: addUnit(props.imageSize)
22
+ }));
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createElementBlock("div", {
25
+ class: normalizeClass(unref(ns).b())
26
+ }, [
27
+ createElementVNode("div", {
28
+ class: normalizeClass(unref(ns).e("image")),
29
+ style: normalizeStyle(unref(imageStyle))
30
+ }, [
31
+ _ctx.image ? (openBlock(), createElementBlock("img", {
32
+ key: 0,
33
+ src: _ctx.image,
34
+ ondragstart: "return false"
35
+ }, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
36
+ createVNode(ImgEmpty)
37
+ ])
38
+ ], 6),
39
+ createElementVNode("div", {
40
+ class: normalizeClass(unref(ns).e("description"))
41
+ }, [
42
+ _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
43
+ ], 2),
44
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
45
+ key: 0,
46
+ class: normalizeClass(unref(ns).e("bottom"))
47
+ }, [
48
+ renderSlot(_ctx.$slots, "default")
49
+ ], 2)) : createCommentVNode("v-if", true)
50
+ ], 2);
51
+ };
12
52
  }
13
53
  });
54
+ var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
14
55
 
15
- export { emptyProps };
56
+ export { Empty as default };
16
57
  //# sourceMappingURL=empty.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,57 +1,16 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
2
- import ImgEmpty from './img-empty.mjs';
3
- import { emptyProps } from './empty.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
- import { addUnit } from '../../../utils/dom/style.mjs';
1
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
8
2
 
9
- const __default__ = defineComponent({
10
- name: "ElEmpty"
11
- });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: emptyProps,
15
- setup(__props) {
16
- const props = __props;
17
- const { t } = useLocale();
18
- const ns = useNamespace("empty");
19
- const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
20
- const imageStyle = computed(() => ({
21
- width: addUnit(props.imageSize)
22
- }));
23
- return (_ctx, _cache) => {
24
- return openBlock(), createElementBlock("div", {
25
- class: normalizeClass(unref(ns).b())
26
- }, [
27
- createElementVNode("div", {
28
- class: normalizeClass(unref(ns).e("image")),
29
- style: normalizeStyle(unref(imageStyle))
30
- }, [
31
- _ctx.image ? (openBlock(), createElementBlock("img", {
32
- key: 0,
33
- src: _ctx.image,
34
- ondragstart: "return false"
35
- }, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
36
- createVNode(ImgEmpty)
37
- ])
38
- ], 6),
39
- createElementVNode("div", {
40
- class: normalizeClass(unref(ns).e("description"))
41
- }, [
42
- _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
43
- ], 2),
44
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
45
- key: 0,
46
- class: normalizeClass(unref(ns).e("bottom"))
47
- }, [
48
- renderSlot(_ctx.$slots, "default")
49
- ], 2)) : createCommentVNode("v-if", true)
50
- ], 2);
51
- };
3
+ const emptyProps = buildProps({
4
+ image: {
5
+ type: String,
6
+ default: ""
7
+ },
8
+ imageSize: Number,
9
+ description: {
10
+ type: String,
11
+ default: ""
52
12
  }
53
13
  });
54
- var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
55
14
 
56
- export { Empty as default };
15
+ export { emptyProps };
57
16
  //# sourceMappingURL=empty2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
- import Form from './src/form2.mjs';
1
+ import Form from './src/form.mjs';
2
2
  import FormItem from './src/form-item2.mjs';
3
- export { formEmits, formMetaProps, formProps } from './src/form.mjs';
3
+ export { formEmits, formMetaProps, formProps } from './src/form2.mjs';
4
4
  export { formItemProps, formItemValidateStates } from './src/form-item.mjs';
5
5
  export { formContextKey, formItemContextKey } from './src/constants.mjs';
6
6
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
@@ -12,7 +12,7 @@ import { useFormSize } from './hooks/use-form-common-props.mjs';
12
12
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
13
13
  import { addUnit } from '../../../utils/dom/style.mjs';
14
14
  import { isBoolean } from '../../../utils/types.mjs';
15
- import { isString, isFunction, isArray } from '@vue/shared';
15
+ import { isArray, isFunction } from '@vue/shared';
16
16
 
17
17
  const __default__ = defineComponent({
18
18
  name: "ElFormItem"
@@ -80,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
80
  const propString = computed(() => {
81
81
  if (!props.prop)
82
82
  return "";
83
- return isString(props.prop) ? props.prop : props.prop.join(".");
83
+ return isArray(props.prop) ? props.prop.join(".") : props.prop;
84
84
  });
85
85
  const hasLabel = computed(() => {
86
86
  return !!(props.label || slots.label);
@@ -233,6 +233,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
233
233
  ...toRefs(props),
234
234
  $el: formItemRef,
235
235
  size: _size,
236
+ validateMessage,
236
237
  validateState,
237
238
  labelId,
238
239
  inputIds,
@@ -243,7 +244,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
243
244
  removeInputId,
244
245
  resetField,
245
246
  clearValidate,
246
- validate
247
+ validate,
248
+ propString
247
249
  });
248
250
  provide(formItemContextKey, context);
249
251
  onMounted(() => {