@element-plus/nightly 0.0.20260427 → 0.0.20260428

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 (440) hide show
  1. package/dist/index.full.js +101 -59
  2. package/dist/index.full.min.js +6 -6
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +6 -6
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +101 -59
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/autocomplete/src/autocomplete.d.ts +1 -6
  276. package/es/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
  277. package/es/components/avatar/src/avatar-group-props.d.ts +3 -7
  278. package/es/components/avatar/src/avatar-group-props.mjs +9 -5
  279. package/es/components/avatar/src/avatar-group-props.mjs.map +1 -1
  280. package/es/components/avatar/src/avatar-group.d.ts +7 -13
  281. package/es/components/badge/src/badge.d.ts +2 -7
  282. package/es/components/badge/src/badge.mjs +9 -5
  283. package/es/components/badge/src/badge.mjs.map +1 -1
  284. package/es/components/card/src/card.mjs +2 -1
  285. package/es/components/card/src/card.mjs.map +1 -1
  286. package/es/components/cascader/src/cascader.d.ts +1 -6
  287. package/es/components/cascader/src/cascader.vue.d.ts +2 -2
  288. package/es/components/color-picker/src/color-picker.d.ts +1 -6
  289. package/es/components/color-picker/src/color-picker.vue.d.ts +2 -2
  290. package/es/components/color-picker-panel/src/color-picker-panel.d.ts +1 -6
  291. package/es/components/color-picker-panel/src/color-picker-panel.mjs +9 -5
  292. package/es/components/color-picker-panel/src/color-picker-panel.mjs.map +1 -1
  293. package/es/components/countdown/src/countdown.d.ts +2 -7
  294. package/es/components/countdown/src/countdown.mjs +9 -5
  295. package/es/components/countdown/src/countdown.mjs.map +1 -1
  296. package/es/components/date-picker/src/date-picker.d.ts +3 -12
  297. package/es/components/date-picker/src/props.d.ts +1 -6
  298. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
  299. package/es/components/drawer/src/drawer.vue.d.ts +1 -1
  300. package/es/components/dropdown/src/dropdown.d.ts +1 -6
  301. package/es/components/dropdown/src/dropdown.vue.d.ts +43 -48
  302. package/es/components/input/src/input.mjs +2 -1
  303. package/es/components/input/src/input.mjs.map +1 -1
  304. package/es/components/input/src/input.vue.d.ts +2 -2
  305. package/es/components/input-tag/src/input-tag.vue.d.ts +2 -2
  306. package/es/components/mention/src/mention.d.ts +1 -6
  307. package/es/components/message/src/message.d.ts +1 -1
  308. package/es/components/notification/src/notification.d.ts +1 -1
  309. package/es/components/popover/src/popover.d.ts +1 -6
  310. package/es/components/popper/src/content.d.ts +4 -24
  311. package/es/components/popper/src/content.mjs +18 -10
  312. package/es/components/popper/src/content.mjs.map +1 -1
  313. package/es/components/roving-focus-group/src/roving-focus-group.d.ts +1 -6
  314. package/es/components/roving-focus-group/src/roving-focus-group.mjs +9 -5
  315. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  316. package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +3 -12
  317. package/es/components/scrollbar/src/scrollbar.d.ts +1 -1
  318. package/es/components/scrollbar/src/scrollbar.mjs +6 -4
  319. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  320. package/es/components/segmented/index.d.ts +15 -1
  321. package/es/components/select/src/select.vue.d.ts +2 -2
  322. package/es/components/select-v2/src/defaults.d.ts +1 -6
  323. package/es/components/select-v2/src/select.vue.d.ts +4 -13
  324. package/es/components/space/src/space.mjs +2 -1
  325. package/es/components/space/src/space.mjs.map +1 -1
  326. package/es/components/statistic/src/statistic.d.ts +2 -7
  327. package/es/components/statistic/src/statistic.mjs +9 -5
  328. package/es/components/statistic/src/statistic.mjs.map +1 -1
  329. package/es/components/table/src/table/defaults.mjs +2 -1
  330. package/es/components/table/src/table/defaults.mjs.map +1 -1
  331. package/es/components/table/src/table-column/index.d.ts +20 -23
  332. package/es/components/table/src/table-header/index.d.ts +20 -23
  333. package/es/components/table/src/table.vue.d.ts +20 -23
  334. package/es/components/table-v2/src/cell.d.ts +2 -7
  335. package/es/components/table-v2/src/cell.mjs +9 -5
  336. package/es/components/table-v2/src/cell.mjs.map +1 -1
  337. package/es/components/time-picker/src/common/picker.vue.d.ts +5 -14
  338. package/es/components/time-picker/src/common/props.d.ts +1 -6
  339. package/es/components/time-picker/src/time-picker.d.ts +3 -12
  340. package/es/components/time-select/src/time-select.vue.d.ts +2 -2
  341. package/es/components/tooltip/src/content.d.ts +2 -12
  342. package/es/components/tooltip/src/tooltip.d.ts +2 -12
  343. package/es/components/tree/src/tree.vue.d.ts +20 -23
  344. package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -12
  345. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -12
  346. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -12
  347. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -12
  348. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +3 -12
  349. package/es/components/virtual-list/src/props.d.ts +3 -18
  350. package/es/components/virtual-list/src/props.mjs +9 -5
  351. package/es/components/virtual-list/src/props.mjs.map +1 -1
  352. package/es/hooks/use-draggable/index.mjs +5 -4
  353. package/es/hooks/use-draggable/index.mjs.map +1 -1
  354. package/es/utils/vue/typescript.d.ts +12 -4
  355. package/es/version.mjs +1 -1
  356. package/es/version.mjs.map +1 -1
  357. package/lib/components/autocomplete/src/autocomplete.d.ts +1 -6
  358. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
  359. package/lib/components/avatar/src/avatar-group-props.d.ts +3 -7
  360. package/lib/components/avatar/src/avatar-group-props.js +9 -5
  361. package/lib/components/avatar/src/avatar-group-props.js.map +1 -1
  362. package/lib/components/avatar/src/avatar-group.d.ts +7 -13
  363. package/lib/components/badge/src/badge.d.ts +2 -7
  364. package/lib/components/badge/src/badge.js +9 -5
  365. package/lib/components/badge/src/badge.js.map +1 -1
  366. package/lib/components/card/src/card.js +2 -1
  367. package/lib/components/card/src/card.js.map +1 -1
  368. package/lib/components/cascader/src/cascader.d.ts +1 -6
  369. package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
  370. package/lib/components/color-picker/src/color-picker.d.ts +1 -6
  371. package/lib/components/color-picker/src/color-picker.vue.d.ts +2 -2
  372. package/lib/components/color-picker-panel/src/color-picker-panel.d.ts +1 -6
  373. package/lib/components/color-picker-panel/src/color-picker-panel.js +9 -5
  374. package/lib/components/color-picker-panel/src/color-picker-panel.js.map +1 -1
  375. package/lib/components/countdown/src/countdown.d.ts +2 -7
  376. package/lib/components/countdown/src/countdown.js +9 -5
  377. package/lib/components/countdown/src/countdown.js.map +1 -1
  378. package/lib/components/date-picker/src/date-picker.d.ts +3 -12
  379. package/lib/components/date-picker/src/props.d.ts +1 -6
  380. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
  381. package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
  382. package/lib/components/dropdown/src/dropdown.d.ts +1 -6
  383. package/lib/components/dropdown/src/dropdown.vue.d.ts +43 -48
  384. package/lib/components/input/src/input.js +2 -1
  385. package/lib/components/input/src/input.js.map +1 -1
  386. package/lib/components/input/src/input.vue.d.ts +2 -2
  387. package/lib/components/input-tag/src/input-tag.vue.d.ts +2 -2
  388. package/lib/components/mention/src/mention.d.ts +1 -6
  389. package/lib/components/message/src/message.d.ts +1 -1
  390. package/lib/components/notification/src/notification.d.ts +1 -1
  391. package/lib/components/popover/src/popover.d.ts +1 -6
  392. package/lib/components/popper/src/content.d.ts +4 -24
  393. package/lib/components/popper/src/content.js +18 -10
  394. package/lib/components/popper/src/content.js.map +1 -1
  395. package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +1 -6
  396. package/lib/components/roving-focus-group/src/roving-focus-group.js +9 -5
  397. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  398. package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +3 -12
  399. package/lib/components/scrollbar/src/scrollbar.d.ts +1 -1
  400. package/lib/components/scrollbar/src/scrollbar.js +6 -4
  401. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  402. package/lib/components/segmented/index.d.ts +15 -1
  403. package/lib/components/select/src/select.vue.d.ts +2 -2
  404. package/lib/components/select-v2/src/defaults.d.ts +1 -6
  405. package/lib/components/select-v2/src/select.vue.d.ts +4 -13
  406. package/lib/components/space/src/space.js +2 -1
  407. package/lib/components/space/src/space.js.map +1 -1
  408. package/lib/components/statistic/src/statistic.d.ts +2 -7
  409. package/lib/components/statistic/src/statistic.js +9 -5
  410. package/lib/components/statistic/src/statistic.js.map +1 -1
  411. package/lib/components/table/src/table/defaults.js +2 -1
  412. package/lib/components/table/src/table/defaults.js.map +1 -1
  413. package/lib/components/table/src/table-column/index.d.ts +20 -23
  414. package/lib/components/table/src/table-header/index.d.ts +20 -23
  415. package/lib/components/table/src/table.vue.d.ts +20 -23
  416. package/lib/components/table-v2/src/cell.d.ts +2 -7
  417. package/lib/components/table-v2/src/cell.js +9 -5
  418. package/lib/components/table-v2/src/cell.js.map +1 -1
  419. package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -14
  420. package/lib/components/time-picker/src/common/props.d.ts +1 -6
  421. package/lib/components/time-picker/src/time-picker.d.ts +3 -12
  422. package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
  423. package/lib/components/tooltip/src/content.d.ts +2 -12
  424. package/lib/components/tooltip/src/tooltip.d.ts +2 -12
  425. package/lib/components/tree/src/tree.vue.d.ts +20 -23
  426. package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -12
  427. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -12
  428. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -12
  429. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -12
  430. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +3 -12
  431. package/lib/components/virtual-list/src/props.d.ts +3 -18
  432. package/lib/components/virtual-list/src/props.js +9 -5
  433. package/lib/components/virtual-list/src/props.js.map +1 -1
  434. package/lib/hooks/use-draggable/index.js +5 -4
  435. package/lib/hooks/use-draggable/index.js.map +1 -1
  436. package/lib/utils/vue/typescript.d.ts +12 -4
  437. package/lib/version.js +1 -1
  438. package/lib/version.js.map +1 -1
  439. package/package.json +2 -2
  440. package/web-types.json +1 -1
@@ -23,12 +23,7 @@ declare const DynamicSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
23
23
  };
24
24
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
25
25
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
26
- readonly style: {
27
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
28
- readonly required: false;
29
- readonly validator: ((val: unknown) => boolean) | undefined;
30
- __epPropKey: true;
31
- };
26
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
32
27
  readonly useIsScrolling: BooleanConstructor;
33
28
  readonly width: {
34
29
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -119,12 +114,7 @@ declare const DynamicSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
119
114
  };
120
115
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
121
116
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
122
- readonly style: {
123
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
124
- readonly required: false;
125
- readonly validator: ((val: unknown) => boolean) | undefined;
126
- __epPropKey: true;
127
- };
117
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
128
118
  readonly useIsScrolling: BooleanConstructor;
129
119
  readonly width: {
130
120
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -204,6 +194,7 @@ declare const DynamicSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
204
194
  onScroll?: ((...args: any[]) => any) | undefined;
205
195
  onItemRendered?: ((...args: any[]) => any) | undefined;
206
196
  }>, {
197
+ readonly style: vue.StyleValue;
207
198
  readonly className: string;
208
199
  readonly direction: EpPropMergeType<StringConstructor, "ltr" | "rtl", never>;
209
200
  readonly data: any[];
@@ -18,12 +18,7 @@ declare const DynamicSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
18
18
  };
19
19
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
20
20
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
21
- readonly style: {
22
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- __epPropKey: true;
26
- };
21
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
27
22
  readonly useIsScrolling: BooleanConstructor;
28
23
  readonly width: {
29
24
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -137,12 +132,7 @@ declare const DynamicSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
137
132
  };
138
133
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
139
134
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
140
- readonly style: {
141
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
142
- readonly required: false;
143
- readonly validator: ((val: unknown) => boolean) | undefined;
144
- __epPropKey: true;
145
- };
135
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
146
136
  readonly useIsScrolling: BooleanConstructor;
147
137
  readonly width: {
148
138
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -185,6 +175,7 @@ declare const DynamicSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
185
175
  "onEnd-reached"?: ((...args: any[]) => any) | undefined;
186
176
  }>, {
187
177
  readonly layout: EpPropMergeType<StringConstructor, "horizontal" | "vertical", never>;
178
+ readonly style: vue.StyleValue;
188
179
  readonly className: string;
189
180
  readonly direction: EpPropMergeType<StringConstructor, "ltr" | "rtl", never>;
190
181
  readonly data: any[];
@@ -18,12 +18,7 @@ declare const FixedSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
18
18
  };
19
19
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
20
20
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
21
- readonly style: {
22
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- __epPropKey: true;
26
- };
21
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
27
22
  readonly useIsScrolling: BooleanConstructor;
28
23
  readonly width: {
29
24
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -114,12 +109,7 @@ declare const FixedSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
114
109
  };
115
110
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
116
111
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
117
- readonly style: {
118
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
119
- readonly required: false;
120
- readonly validator: ((val: unknown) => boolean) | undefined;
121
- __epPropKey: true;
122
- };
112
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
123
113
  readonly useIsScrolling: BooleanConstructor;
124
114
  readonly width: {
125
115
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -199,6 +189,7 @@ declare const FixedSizeGrid: vue.DefineComponent<vue.ExtractPropTypes<{
199
189
  onScroll?: ((...args: any[]) => any) | undefined;
200
190
  onItemRendered?: ((...args: any[]) => any) | undefined;
201
191
  }>, {
192
+ readonly style: vue.StyleValue;
202
193
  readonly className: string;
203
194
  readonly direction: EpPropMergeType<StringConstructor, "ltr" | "rtl", never>;
204
195
  readonly data: any[];
@@ -18,12 +18,7 @@ declare const FixedSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
18
18
  };
19
19
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
20
20
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
21
- readonly style: {
22
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- __epPropKey: true;
26
- };
21
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
27
22
  readonly useIsScrolling: BooleanConstructor;
28
23
  readonly width: {
29
24
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -137,12 +132,7 @@ declare const FixedSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
137
132
  };
138
133
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
139
134
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
140
- readonly style: {
141
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown>>;
142
- readonly required: false;
143
- readonly validator: ((val: unknown) => boolean) | undefined;
144
- __epPropKey: true;
145
- };
135
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | vue.StyleValue[]) | (() => vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
146
136
  readonly useIsScrolling: BooleanConstructor;
147
137
  readonly width: {
148
138
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -185,6 +175,7 @@ declare const FixedSizeList: vue.DefineComponent<vue.ExtractPropTypes<{
185
175
  "onEnd-reached"?: ((...args: any[]) => any) | undefined;
186
176
  }>, {
187
177
  readonly layout: EpPropMergeType<StringConstructor, "horizontal" | "vertical", never>;
178
+ readonly style: vue.StyleValue;
188
179
  readonly className: string;
189
180
  readonly direction: EpPropMergeType<StringConstructor, "ltr" | "rtl", never>;
190
181
  readonly data: any[];
@@ -18,12 +18,7 @@ declare const virtualizedProps: {
18
18
  };
19
19
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
20
20
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
21
- readonly style: {
22
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- __epPropKey: true;
26
- };
21
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
27
22
  readonly useIsScrolling: BooleanConstructor;
28
23
  readonly width: {
29
24
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -53,12 +48,7 @@ declare const virtualizedListProps: {
53
48
  };
54
49
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
55
50
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
56
- readonly style: {
57
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown>>;
58
- readonly required: false;
59
- readonly validator: ((val: unknown) => boolean) | undefined;
60
- __epPropKey: true;
61
- };
51
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
62
52
  readonly useIsScrolling: BooleanConstructor;
63
53
  readonly width: {
64
54
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -109,12 +99,7 @@ declare const virtualizedGridProps: {
109
99
  };
110
100
  readonly innerElement: EpPropFinalized<readonly [StringConstructor, ObjectConstructor], unknown, unknown, "div", boolean>;
111
101
  readonly innerProps: EpPropFinalized<(new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>) | (((new (...args: any[]) => Record<string, unknown>) | (() => Record<string, unknown>)) | null)[], unknown, unknown, () => {}, boolean>;
112
- readonly style: {
113
- readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown>>;
114
- readonly required: false;
115
- readonly validator: ((val: unknown) => boolean) | undefined;
116
- __epPropKey: true;
117
- };
102
+ readonly style: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
118
103
  readonly useIsScrolling: BooleanConstructor;
119
104
  readonly width: {
120
105
  readonly type: vue.PropType<EpPropMergeType<readonly [NumberConstructor, StringConstructor], unknown, unknown>>;
@@ -57,11 +57,15 @@ const virtualizedProps = require_runtime.buildProps({
57
57
  type: require_runtime.definePropType(Object),
58
58
  default: () => ({})
59
59
  },
60
- style: { type: require_runtime.definePropType([
61
- Object,
62
- String,
63
- Array
64
- ]) },
60
+ style: {
61
+ type: require_runtime.definePropType([
62
+ Object,
63
+ String,
64
+ Array,
65
+ Boolean
66
+ ]),
67
+ default: void 0
68
+ },
65
69
  useIsScrolling: Boolean,
66
70
  width: {
67
71
  type: [Number, String],
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","names":["buildProp","definePropType","VERTICAL","buildProps","mutable"],"sources":["../../../../../../packages/components/virtual-list/src/props.ts"],"sourcesContent":["import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType<number | ItemSize>([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType<string | Element>([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType<any[]>(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n innerProps: {\n type: definePropType<Record<string, unknown>>(Object),\n default: () => ({}),\n },\n\n style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: Boolean,\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n innerWidth: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: Boolean,\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType<GridItemKeyGetter>(Function),\n default: ({\n columnIndex,\n rowIndex,\n }: {\n columnIndex: number\n rowIndex: number\n }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes<typeof virtualizedProps>\nexport type VirtualizedPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedProps\n>\nexport type VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedListPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedListProps\n>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\nexport type VirtualizedGridPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedGridProps\n>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\nexport type VirtualizedScrollbarPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"mappings":";;;;;;AAWA,MAAM,WAAWA,0BAAU;CACzB,MAAMC,+BAAkC,CAAC,QAAQ,SAAS,CAAC;CAC3D,UAAU;CACX,CAAU;AAEX,MAAM,oBAAoBD,0BAAU,EAClC,MAAM,QACP,CAAU;AAEX,MAAM,QAAQA,0BAAU;CACtB,MAAM;CACN,SAAS;CACV,CAAU;AAEX,MAAM,YAAYA,0BAAU;CAC1B,MAAM;CACN,QAAQ,CAAC,OAAO,MAAM;CACtB,SAAS;CACV,CAAU;AAEX,MAAM,mBAAmBA,0BAAU;CACjC,MAAM;CACN,SAAS;CACV,CAAU;AAEX,MAAM,QAAQA,0BAAU;CACtB,MAAM;CACN,UAAU;CACX,CAAU;AAEX,MAAM,SAASA,0BAAU;CACvB,MAAM;CACN,QAAQ,CAAC,cAAc,WAAW;CAClC,SAASE;CACV,CAAU;AAEX,MAAa,mBAAmBC,2BAAW;CACzC,WAAW;EACT,MAAM;EACN,SAAS;EACV;CAED,kBAAkB;EAChB,MAAMF,+BAAiC,CAAC,QAAQ,OAAO,CAAC;EACxD,SAAS;EACV;CAED,MAAM;EACJ,MAAMA,+BAAsB,MAAM;EAClC,eAAeG,2BAAQ,EAAE,CAAU;EACpC;CAKD;CAEA,QAAQ;EACN,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,cAAc;EACZ,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS;EACV;CAED,YAAY;EACV,MAAMH,+BAAwC,OAAO;EACrD,gBAAgB,EAAE;EACnB;CAED,OAAO,EACL,MAAMA,+BAA2B;EAAC;EAAQ;EAAQ;EAAM,CAAC,EAC1D;CAED,gBAAgB;CAEhB,OAAO;EACL,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,YAAY;EACV,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACD,mBAAmB;CACpB,CAAU;AAEX,MAAa,uBAAuBE,2BAAW;CAK7C;CAEA;CAKA;CAEA;CAKA;CAEA;CACA,GAAG;CACJ,CAAU;AAEX,MAAM,gBAAgB;CACpB,MAAM;CACN,SAAS;CACV;AAED,MAAM,WAAW;CAAE,MAAM;CAAQ,SAAS;CAAG;AAC7C,MAAM,SAAS;CAAE,MAAM;CAAQ,SAAS;CAAG;AAE3C,MAAa,uBAAuBA,2BAAW;CAC7C,aAAa;CACb,aAAa;CACb,sBAAsB;CACtB,oBAAoB;CACpB,gBAAgB;CAChB,eAAe;CACf,SAAS;EACP,MAAMF,+BAAkC,SAAS;EACjD,UAAU,EACR,aACA,eAII,GAAG,SAAS,GAAG;EACtB;CACD,UAAU;CACV,WAAW;CACX,aAAa;CACb,UAAU;CACV,gBAAgB;CAChB,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;CACjB,MAAM;CACN,GAAG;CACJ,CAAU;AAEX,MAAa,4BAA4BE,2BAAW;CAClD,UAAU;CACV,OAAO;CACP;CACA;CACA,OAAO;EACL,MAAM;EACN,UAAU;EACX;CACD,YAAY;EACV,MAAM;EACN,UAAU;EACX;CACD,YAAY;EACV,MAAM;EACN,UAAU;EACX;CACD;CACA;CACA;CAEA,SAAS;CACV,CAAU"}
1
+ {"version":3,"file":"props.js","names":["buildProp","definePropType","VERTICAL","buildProps","mutable"],"sources":["../../../../../../packages/components/virtual-list/src/props.ts"],"sourcesContent":["import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType<number | ItemSize>([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType<string | Element>([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType<any[]>(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n innerProps: {\n type: definePropType<Record<string, unknown>>(Object),\n default: () => ({}),\n },\n\n style: {\n type: definePropType<StyleValue>([Object, String, Array, Boolean]),\n default: undefined,\n },\n\n useIsScrolling: Boolean,\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n innerWidth: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: Boolean,\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType<GridItemKeyGetter>(Function),\n default: ({\n columnIndex,\n rowIndex,\n }: {\n columnIndex: number\n rowIndex: number\n }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes<typeof virtualizedProps>\nexport type VirtualizedPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedProps\n>\nexport type VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedListPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedListProps\n>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\nexport type VirtualizedGridPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedGridProps\n>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\nexport type VirtualizedScrollbarPropsPublic = ExtractPublicPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"mappings":";;;;;;AAWA,MAAM,WAAWA,0BAAU;CACzB,MAAMC,+BAAkC,CAAC,QAAQ,SAAS,CAAC;CAC3D,UAAU;CACX,CAAU;AAEX,MAAM,oBAAoBD,0BAAU,EAClC,MAAM,QACP,CAAU;AAEX,MAAM,QAAQA,0BAAU;CACtB,MAAM;CACN,SAAS;CACV,CAAU;AAEX,MAAM,YAAYA,0BAAU;CAC1B,MAAM;CACN,QAAQ,CAAC,OAAO,MAAM;CACtB,SAAS;CACV,CAAU;AAEX,MAAM,mBAAmBA,0BAAU;CACjC,MAAM;CACN,SAAS;CACV,CAAU;AAEX,MAAM,QAAQA,0BAAU;CACtB,MAAM;CACN,UAAU;CACX,CAAU;AAEX,MAAM,SAASA,0BAAU;CACvB,MAAM;CACN,QAAQ,CAAC,cAAc,WAAW;CAClC,SAASE;CACV,CAAU;AAEX,MAAa,mBAAmBC,2BAAW;CACzC,WAAW;EACT,MAAM;EACN,SAAS;EACV;CAED,kBAAkB;EAChB,MAAMF,+BAAiC,CAAC,QAAQ,OAAO,CAAC;EACxD,SAAS;EACV;CAED,MAAM;EACJ,MAAMA,+BAAsB,MAAM;EAClC,eAAeG,2BAAQ,EAAE,CAAU;EACpC;CAKD;CAEA,QAAQ;EACN,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,cAAc;EACZ,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS;EACV;CAED,YAAY;EACV,MAAMH,+BAAwC,OAAO;EACrD,gBAAgB,EAAE;EACnB;CAED,OAAO;EACL,MAAMA,+BAA2B;GAAC;GAAQ;GAAQ;GAAO;GAAQ,CAAC;EAClE,SAAS;EACV;CAED,gBAAgB;CAEhB,OAAO;EACL,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,YAAY;EACV,MAAM,CAAC,QAAQ,OAAO;EACtB,UAAU;EACX;CAED,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACD,mBAAmB;CACpB,CAAU;AAEX,MAAa,uBAAuBE,2BAAW;CAK7C;CAEA;CAKA;CAEA;CAKA;CAEA;CACA,GAAG;CACJ,CAAU;AAEX,MAAM,gBAAgB;CACpB,MAAM;CACN,SAAS;CACV;AAED,MAAM,WAAW;CAAE,MAAM;CAAQ,SAAS;CAAG;AAC7C,MAAM,SAAS;CAAE,MAAM;CAAQ,SAAS;CAAG;AAE3C,MAAa,uBAAuBA,2BAAW;CAC7C,aAAa;CACb,aAAa;CACb,sBAAsB;CACtB,oBAAoB;CACpB,gBAAgB;CAChB,eAAe;CACf,SAAS;EACP,MAAMF,+BAAkC,SAAS;EACjD,UAAU,EACR,aACA,eAII,GAAG,SAAS,GAAG;EACtB;CACD,UAAU;CACV,WAAW;CACX,aAAa;CACb,UAAU;CACV,gBAAgB;CAChB,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;CACjB,MAAM;CACN,GAAG;CACJ,CAAU;AAEX,MAAa,4BAA4BE,2BAAW;CAClD,UAAU;CACV,OAAO;CACP;CACA;CACA,OAAO;EACL,MAAM;EACN,UAAU;EACX;CACD,YAAY;EACV,MAAM;EACN,UAAU;EACX;CACD,YAAY;EACV,MAAM;EACN,UAAU;EACX;CACD;CACA;CACA;CAEA,SAAS;CACV,CAAU"}
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.js');
3
3
  const require_style = require('../../utils/dom/style.js');
4
+ let lodash_unified = require("lodash-unified");
4
5
  let vue = require("vue");
5
6
 
6
7
  //#region ../../packages/hooks/use-draggable/index.ts
@@ -14,8 +15,8 @@ const useDraggable = (targetRef, dragRef, draggable, overflow) => {
14
15
  if (targetRef.value) {
15
16
  const { offsetX, offsetY } = transform;
16
17
  const targetRect = targetRef.value.getBoundingClientRect();
17
- const targetLeft = targetRect.left;
18
- const targetTop = targetRect.top;
18
+ const targetLeft = Math.max(targetRect.left, 0);
19
+ const targetTop = Math.max(targetRect.top, 0);
19
20
  const targetWidth = targetRect.width;
20
21
  const targetHeight = targetRect.height;
21
22
  const clientWidth = document.documentElement.clientWidth;
@@ -25,8 +26,8 @@ const useDraggable = (targetRef, dragRef, draggable, overflow) => {
25
26
  const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
26
27
  const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY;
27
28
  if (!overflow?.value) {
28
- moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
29
- moveY = Math.min(Math.max(moveY, minTop), maxTop);
29
+ moveX = (0, lodash_unified.clamp)(moveX, minLeft, maxLeft);
30
+ moveY = (0, lodash_unified.clamp)(moveY, minTop, maxTop);
30
31
  }
31
32
  transform.offsetX = moveX;
32
33
  transform.offsetY = moveY;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["addUnit"],"sources":["../../../../../packages/hooks/use-draggable/index.ts"],"sourcesContent":["import { onBeforeUnmount, onMounted, ref, watchEffect } from 'vue'\nimport { addUnit } from '@element-plus/utils'\n\nimport type { ComputedRef, Ref } from 'vue'\n\nexport const useDraggable = (\n targetRef: Ref<HTMLElement | undefined>,\n dragRef: Ref<HTMLElement | undefined>,\n draggable: ComputedRef<boolean>,\n overflow?: ComputedRef<boolean>\n) => {\n const transform = {\n offsetX: 0,\n offsetY: 0,\n }\n\n const isDragging = ref(false)\n\n const adjustPosition = (moveX: number, moveY: number) => {\n if (targetRef.value) {\n const { offsetX, offsetY } = transform\n const targetRect = targetRef.value.getBoundingClientRect()\n const targetLeft = targetRect.left\n const targetTop = targetRect.top\n const targetWidth = targetRect.width\n const targetHeight = targetRect.height\n\n const clientWidth = document.documentElement.clientWidth\n const clientHeight = document.documentElement.clientHeight\n\n const minLeft = -targetLeft + offsetX\n const minTop = -targetTop + offsetY\n const maxLeft = clientWidth - targetLeft - targetWidth + offsetX\n const maxTop =\n clientHeight -\n targetTop -\n (targetHeight < clientHeight ? targetHeight : 0) +\n offsetY\n\n if (!overflow?.value) {\n moveX = Math.min(Math.max(moveX, minLeft), maxLeft)\n moveY = Math.min(Math.max(moveY, minTop), maxTop)\n }\n\n transform.offsetX = moveX\n transform.offsetY = moveY\n\n targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(\n moveY\n )})`\n }\n }\n\n const onMousedown = (e: MouseEvent) => {\n const downX = e.clientX\n const downY = e.clientY\n const { offsetX, offsetY } = transform\n\n const onMousemove = (e: MouseEvent) => {\n if (!isDragging.value) {\n isDragging.value = true\n }\n const moveX = offsetX + e.clientX - downX\n const moveY = offsetY + e.clientY - downY\n\n adjustPosition(moveX, moveY)\n }\n\n const onMouseup = () => {\n isDragging.value = false\n document.removeEventListener('mousemove', onMousemove)\n document.removeEventListener('mouseup', onMouseup)\n }\n\n document.addEventListener('mousemove', onMousemove)\n document.addEventListener('mouseup', onMouseup)\n }\n\n const onDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.addEventListener('mousedown', onMousedown)\n window.addEventListener('resize', updatePosition)\n }\n }\n\n const offDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.removeEventListener('mousedown', onMousedown)\n window.removeEventListener('resize', updatePosition)\n }\n }\n\n const resetPosition = () => {\n transform.offsetX = 0\n transform.offsetY = 0\n\n if (targetRef.value) {\n targetRef.value.style.transform = ''\n }\n }\n\n const updatePosition = () => {\n const { offsetX, offsetY } = transform\n\n adjustPosition(offsetX, offsetY)\n }\n\n onMounted(() => {\n watchEffect(() => {\n if (draggable.value) {\n onDraggable()\n } else {\n offDraggable()\n }\n })\n })\n\n onBeforeUnmount(() => {\n offDraggable()\n })\n\n return {\n isDragging,\n resetPosition,\n updatePosition,\n }\n}\n"],"mappings":";;;;;;AAKA,MAAa,gBACX,WACA,SACA,WACA,aACG;CACH,MAAM,YAAY;EAChB,SAAS;EACT,SAAS;EACV;CAED,MAAM,0BAAiB,MAAM;CAE7B,MAAM,kBAAkB,OAAe,UAAkB;AACvD,MAAI,UAAU,OAAO;GACnB,MAAM,EAAE,SAAS,YAAY;GAC7B,MAAM,aAAa,UAAU,MAAM,uBAAuB;GAC1D,MAAM,aAAa,WAAW;GAC9B,MAAM,YAAY,WAAW;GAC7B,MAAM,cAAc,WAAW;GAC/B,MAAM,eAAe,WAAW;GAEhC,MAAM,cAAc,SAAS,gBAAgB;GAC7C,MAAM,eAAe,SAAS,gBAAgB;GAE9C,MAAM,UAAU,CAAC,aAAa;GAC9B,MAAM,SAAS,CAAC,YAAY;GAC5B,MAAM,UAAU,cAAc,aAAa,cAAc;GACzD,MAAM,SACJ,eACA,aACC,eAAe,eAAe,eAAe,KAC9C;AAEF,OAAI,CAAC,UAAU,OAAO;AACpB,YAAQ,KAAK,IAAI,KAAK,IAAI,OAAO,QAAQ,EAAE,QAAQ;AACnD,YAAQ,KAAK,IAAI,KAAK,IAAI,OAAO,OAAO,EAAE,OAAO;;AAGnD,aAAU,UAAU;AACpB,aAAU,UAAU;AAEpB,aAAU,MAAM,MAAM,YAAY,aAAaA,sBAAQ,MAAM,CAAC,IAAIA,sBAChE,MACD,CAAC;;;CAIN,MAAM,eAAe,MAAkB;EACrC,MAAM,QAAQ,EAAE;EAChB,MAAM,QAAQ,EAAE;EAChB,MAAM,EAAE,SAAS,YAAY;EAE7B,MAAM,eAAe,MAAkB;AACrC,OAAI,CAAC,WAAW,MACd,YAAW,QAAQ;AAKrB,kBAHc,UAAU,EAAE,UAAU,OACtB,UAAU,EAAE,UAAU,MAER;;EAG9B,MAAM,kBAAkB;AACtB,cAAW,QAAQ;AACnB,YAAS,oBAAoB,aAAa,YAAY;AACtD,YAAS,oBAAoB,WAAW,UAAU;;AAGpD,WAAS,iBAAiB,aAAa,YAAY;AACnD,WAAS,iBAAiB,WAAW,UAAU;;CAGjD,MAAM,oBAAoB;AACxB,MAAI,QAAQ,SAAS,UAAU,OAAO;AACpC,WAAQ,MAAM,iBAAiB,aAAa,YAAY;AACxD,UAAO,iBAAiB,UAAU,eAAe;;;CAIrD,MAAM,qBAAqB;AACzB,MAAI,QAAQ,SAAS,UAAU,OAAO;AACpC,WAAQ,MAAM,oBAAoB,aAAa,YAAY;AAC3D,UAAO,oBAAoB,UAAU,eAAe;;;CAIxD,MAAM,sBAAsB;AAC1B,YAAU,UAAU;AACpB,YAAU,UAAU;AAEpB,MAAI,UAAU,MACZ,WAAU,MAAM,MAAM,YAAY;;CAItC,MAAM,uBAAuB;EAC3B,MAAM,EAAE,SAAS,YAAY;AAE7B,iBAAe,SAAS,QAAQ;;AAGlC,0BAAgB;AACd,6BAAkB;AAChB,OAAI,UAAU,MACZ,cAAa;OAEb,eAAc;IAEhB;GACF;AAEF,gCAAsB;AACpB,gBAAc;GACd;AAEF,QAAO;EACL;EACA;EACA;EACD"}
1
+ {"version":3,"file":"index.js","names":["addUnit"],"sources":["../../../../../packages/hooks/use-draggable/index.ts"],"sourcesContent":["import { onBeforeUnmount, onMounted, ref, watchEffect } from 'vue'\nimport { addUnit } from '@element-plus/utils'\nimport { clamp } from 'lodash-unified'\n\nimport type { ComputedRef, Ref } from 'vue'\n\nexport const useDraggable = (\n targetRef: Ref<HTMLElement | undefined>,\n dragRef: Ref<HTMLElement | undefined>,\n draggable: ComputedRef<boolean>,\n overflow?: ComputedRef<boolean>\n) => {\n const transform = {\n offsetX: 0,\n offsetY: 0,\n }\n\n const isDragging = ref(false)\n\n const adjustPosition = (moveX: number, moveY: number) => {\n if (targetRef.value) {\n const { offsetX, offsetY } = transform\n const targetRect = targetRef.value.getBoundingClientRect()\n const targetLeft = Math.max(targetRect.left, 0)\n const targetTop = Math.max(targetRect.top, 0)\n const targetWidth = targetRect.width\n const targetHeight = targetRect.height\n\n const clientWidth = document.documentElement.clientWidth\n const clientHeight = document.documentElement.clientHeight\n\n const minLeft = -targetLeft + offsetX\n const minTop = -targetTop + offsetY\n const maxLeft = clientWidth - targetLeft - targetWidth + offsetX\n const maxTop =\n clientHeight -\n targetTop -\n (targetHeight < clientHeight ? targetHeight : 0) +\n offsetY\n\n if (!overflow?.value) {\n moveX = clamp(moveX, minLeft, maxLeft)\n moveY = clamp(moveY, minTop, maxTop)\n }\n\n transform.offsetX = moveX\n transform.offsetY = moveY\n\n targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(\n moveY\n )})`\n }\n }\n\n const onMousedown = (e: MouseEvent) => {\n const downX = e.clientX\n const downY = e.clientY\n const { offsetX, offsetY } = transform\n\n const onMousemove = (e: MouseEvent) => {\n if (!isDragging.value) {\n isDragging.value = true\n }\n const moveX = offsetX + e.clientX - downX\n const moveY = offsetY + e.clientY - downY\n\n adjustPosition(moveX, moveY)\n }\n\n const onMouseup = () => {\n isDragging.value = false\n document.removeEventListener('mousemove', onMousemove)\n document.removeEventListener('mouseup', onMouseup)\n }\n\n document.addEventListener('mousemove', onMousemove)\n document.addEventListener('mouseup', onMouseup)\n }\n\n const onDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.addEventListener('mousedown', onMousedown)\n window.addEventListener('resize', updatePosition)\n }\n }\n\n const offDraggable = () => {\n if (dragRef.value && targetRef.value) {\n dragRef.value.removeEventListener('mousedown', onMousedown)\n window.removeEventListener('resize', updatePosition)\n }\n }\n\n const resetPosition = () => {\n transform.offsetX = 0\n transform.offsetY = 0\n\n if (targetRef.value) {\n targetRef.value.style.transform = ''\n }\n }\n\n const updatePosition = () => {\n const { offsetX, offsetY } = transform\n\n adjustPosition(offsetX, offsetY)\n }\n\n onMounted(() => {\n watchEffect(() => {\n if (draggable.value) {\n onDraggable()\n } else {\n offDraggable()\n }\n })\n })\n\n onBeforeUnmount(() => {\n offDraggable()\n })\n\n return {\n isDragging,\n resetPosition,\n updatePosition,\n }\n}\n"],"mappings":";;;;;;;AAMA,MAAa,gBACX,WACA,SACA,WACA,aACG;CACH,MAAM,YAAY;EAChB,SAAS;EACT,SAAS;EACV;CAED,MAAM,0BAAiB,MAAM;CAE7B,MAAM,kBAAkB,OAAe,UAAkB;AACvD,MAAI,UAAU,OAAO;GACnB,MAAM,EAAE,SAAS,YAAY;GAC7B,MAAM,aAAa,UAAU,MAAM,uBAAuB;GAC1D,MAAM,aAAa,KAAK,IAAI,WAAW,MAAM,EAAE;GAC/C,MAAM,YAAY,KAAK,IAAI,WAAW,KAAK,EAAE;GAC7C,MAAM,cAAc,WAAW;GAC/B,MAAM,eAAe,WAAW;GAEhC,MAAM,cAAc,SAAS,gBAAgB;GAC7C,MAAM,eAAe,SAAS,gBAAgB;GAE9C,MAAM,UAAU,CAAC,aAAa;GAC9B,MAAM,SAAS,CAAC,YAAY;GAC5B,MAAM,UAAU,cAAc,aAAa,cAAc;GACzD,MAAM,SACJ,eACA,aACC,eAAe,eAAe,eAAe,KAC9C;AAEF,OAAI,CAAC,UAAU,OAAO;AACpB,sCAAc,OAAO,SAAS,QAAQ;AACtC,sCAAc,OAAO,QAAQ,OAAO;;AAGtC,aAAU,UAAU;AACpB,aAAU,UAAU;AAEpB,aAAU,MAAM,MAAM,YAAY,aAAaA,sBAAQ,MAAM,CAAC,IAAIA,sBAChE,MACD,CAAC;;;CAIN,MAAM,eAAe,MAAkB;EACrC,MAAM,QAAQ,EAAE;EAChB,MAAM,QAAQ,EAAE;EAChB,MAAM,EAAE,SAAS,YAAY;EAE7B,MAAM,eAAe,MAAkB;AACrC,OAAI,CAAC,WAAW,MACd,YAAW,QAAQ;AAKrB,kBAHc,UAAU,EAAE,UAAU,OACtB,UAAU,EAAE,UAAU,MAER;;EAG9B,MAAM,kBAAkB;AACtB,cAAW,QAAQ;AACnB,YAAS,oBAAoB,aAAa,YAAY;AACtD,YAAS,oBAAoB,WAAW,UAAU;;AAGpD,WAAS,iBAAiB,aAAa,YAAY;AACnD,WAAS,iBAAiB,WAAW,UAAU;;CAGjD,MAAM,oBAAoB;AACxB,MAAI,QAAQ,SAAS,UAAU,OAAO;AACpC,WAAQ,MAAM,iBAAiB,aAAa,YAAY;AACxD,UAAO,iBAAiB,UAAU,eAAe;;;CAIrD,MAAM,qBAAqB;AACzB,MAAI,QAAQ,SAAS,UAAU,OAAO;AACpC,WAAQ,MAAM,oBAAoB,aAAa,YAAY;AAC3D,UAAO,oBAAoB,UAAU,eAAe;;;CAIxD,MAAM,sBAAsB;AAC1B,YAAU,UAAU;AACpB,YAAU,UAAU;AAEpB,MAAI,UAAU,MACZ,WAAU,MAAM,MAAM,YAAY;;CAItC,MAAM,uBAAuB;EAC3B,MAAM,EAAE,SAAS,YAAY;AAE7B,iBAAe,SAAS,QAAQ;;AAGlC,0BAAgB;AACd,6BAAkB;AAChB,OAAI,UAAU,MACZ,cAAa;OAEb,eAAc;IAEhB;GACF;AAEF,gCAAsB;AACpB,gBAAc;GACd;AAEF,QAAO;EACL;EACA;EACA;EACD"}
@@ -1,13 +1,21 @@
1
- import { AllowedComponentProps, AppContext, ComponentOptionsBase, EmitsOptions, ObjectPlugin, SetupContext, VNodeProps } from "vue";
1
+ import { AllowedComponentProps, AppContext, Component, EmitsOptions, ObjectPlugin, SetupContext, VNodeProps } from "vue";
2
+ import { ComponentEmit, ComponentProps } from "vue-component-type-helpers";
2
3
 
3
4
  //#region ../../packages/utils/vue/typescript.d.ts
4
- type ExtractEventNames<T> = T extends (new (...args: any[]) => any) ? T extends ComponentOptionsBase<any, any, any, any, any, any, any, any> ? T['emits'] extends (string[] & ThisType<void>) | (infer Emits & ThisType<any>) | undefined ? keyof Emits extends string ? `on${Capitalize<keyof Emits>}` : Emits extends readonly string[] ? `on${Capitalize<Emits[number]>}` : never : never : never : never;
5
+ type NativeType = null | undefined | number | string | boolean | symbol | Function;
6
+ /**
7
+ * Reference from https://github.com/vuejs/core/blob/main/packages/runtime-core/src/apiSetupHelpers.ts#L338-L340
8
+ */
9
+ type InferDefaults<T> = { [K in keyof T as string extends K ? never : K]?: InferDefault<T[K]> };
10
+ type InferDefault<T> = (() => T & {}) | (T extends NativeType ? T : never);
11
+ type ExtractEventNames<T> = ComponentEmit<T> extends ((event: string, ...args: any[]) => any) ? never : keyof { [K in keyof ComponentProps<T> as K extends `on${infer Event}` ? ComponentEmit<T> extends ((event: Uncapitalize<Event>, ...args: any[]) => any) ? K : never : never]: unknown };
12
+ type ExcludedProps<T> = ExtractEventNames<T> | keyof VNodeProps | keyof AllowedComponentProps;
5
13
  type SFCWithInstall<T> = T & ObjectPlugin & SFCWithPropsDefaultsSetter<T>;
6
14
  type SFCInstallWithContext<T> = SFCWithInstall<T> & {
7
15
  _context: AppContext | null;
8
16
  };
9
- type SFCWithPropsDefaultsSetter<T> = T extends (new (...args: any) => any) ? {
10
- setPropsDefaults: (defaults: Partial<Omit<InstanceType<T>['$props'], ExtractEventNames<T> | keyof VNodeProps | keyof AllowedComponentProps>>) => void;
17
+ type SFCWithPropsDefaultsSetter<T> = T extends Component ? {
18
+ setPropsDefaults: (defaults: InferDefaults<{ [K in keyof ComponentProps<T> as K extends ExcludedProps<T> ? never : K]?: ComponentProps<T>[K] }>) => void;
11
19
  } : unknown;
12
20
  type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];
13
21
  //#endregion
package/lib/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  //#region ../../packages/element-plus/version.ts
4
- const version = "0.0.20260427";
4
+ const version = "0.0.20260428";
5
5
 
6
6
  //#endregion
7
7
  exports.version = version;
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20260427'\n"],"mappings":";;;AAAA,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20260428'\n"],"mappings":";;;AAAA,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@element-plus/nightly",
3
- "version": "0.0.20260427",
3
+ "version": "0.0.20260428",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "element-plus",
@@ -110,5 +110,5 @@
110
110
  "not ie 11",
111
111
  "not op_mini all"
112
112
  ],
113
- "gitHead": "575a8380e7ff004b924e85912d4716bf6587f221"
113
+ "gitHead": "87fb0ab045ca1ecd6c50ba305616ca9bf10bba64"
114
114
  }