element-plus 2.1.10 → 2.1.11

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 (709) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +404 -1684
  4. package/dist/index.full.min.js +6 -6
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +10 -10
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +404 -1684
  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.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/az.js +1 -1
  18. package/dist/locale/az.min.js +1 -1
  19. package/dist/locale/az.min.mjs +1 -1
  20. package/dist/locale/az.mjs +1 -1
  21. package/dist/locale/bg.js +1 -1
  22. package/dist/locale/bg.min.js +1 -1
  23. package/dist/locale/bg.min.mjs +1 -1
  24. package/dist/locale/bg.mjs +1 -1
  25. package/dist/locale/bn.js +1 -1
  26. package/dist/locale/bn.min.js +1 -1
  27. package/dist/locale/bn.min.mjs +1 -1
  28. package/dist/locale/bn.mjs +1 -1
  29. package/dist/locale/ca.js +1 -1
  30. package/dist/locale/ca.min.js +1 -1
  31. package/dist/locale/ca.min.mjs +1 -1
  32. package/dist/locale/ca.mjs +1 -1
  33. package/dist/locale/cs.js +1 -1
  34. package/dist/locale/cs.min.js +1 -1
  35. package/dist/locale/cs.min.mjs +1 -1
  36. package/dist/locale/cs.mjs +1 -1
  37. package/dist/locale/da.js +1 -1
  38. package/dist/locale/da.min.js +1 -1
  39. package/dist/locale/da.min.mjs +1 -1
  40. package/dist/locale/da.mjs +1 -1
  41. package/dist/locale/de.js +1 -1
  42. package/dist/locale/de.min.js +1 -1
  43. package/dist/locale/de.min.mjs +1 -1
  44. package/dist/locale/de.mjs +1 -1
  45. package/dist/locale/el.js +1 -1
  46. package/dist/locale/el.min.js +1 -1
  47. package/dist/locale/el.min.mjs +1 -1
  48. package/dist/locale/el.mjs +1 -1
  49. package/dist/locale/en.js +1 -1
  50. package/dist/locale/en.min.js +1 -1
  51. package/dist/locale/en.min.mjs +1 -1
  52. package/dist/locale/en.mjs +1 -1
  53. package/dist/locale/eo.js +1 -1
  54. package/dist/locale/eo.min.js +1 -1
  55. package/dist/locale/eo.min.mjs +1 -1
  56. package/dist/locale/eo.mjs +1 -1
  57. package/dist/locale/es.js +1 -1
  58. package/dist/locale/es.min.js +1 -1
  59. package/dist/locale/es.min.mjs +1 -1
  60. package/dist/locale/es.mjs +1 -1
  61. package/dist/locale/et.js +1 -1
  62. package/dist/locale/et.min.js +1 -1
  63. package/dist/locale/et.min.mjs +1 -1
  64. package/dist/locale/et.mjs +1 -1
  65. package/dist/locale/eu.js +1 -1
  66. package/dist/locale/eu.min.js +1 -1
  67. package/dist/locale/eu.min.mjs +1 -1
  68. package/dist/locale/eu.mjs +1 -1
  69. package/dist/locale/fa.js +1 -1
  70. package/dist/locale/fa.min.js +1 -1
  71. package/dist/locale/fa.min.mjs +1 -1
  72. package/dist/locale/fa.mjs +1 -1
  73. package/dist/locale/fi.js +1 -1
  74. package/dist/locale/fi.min.js +1 -1
  75. package/dist/locale/fi.min.mjs +1 -1
  76. package/dist/locale/fi.mjs +1 -1
  77. package/dist/locale/fr.js +1 -1
  78. package/dist/locale/fr.min.js +1 -1
  79. package/dist/locale/fr.min.mjs +1 -1
  80. package/dist/locale/fr.mjs +1 -1
  81. package/dist/locale/he.js +1 -1
  82. package/dist/locale/he.min.js +1 -1
  83. package/dist/locale/he.min.mjs +1 -1
  84. package/dist/locale/he.mjs +1 -1
  85. package/dist/locale/hr.js +1 -1
  86. package/dist/locale/hr.min.js +1 -1
  87. package/dist/locale/hr.min.mjs +1 -1
  88. package/dist/locale/hr.mjs +1 -1
  89. package/dist/locale/hu.js +1 -1
  90. package/dist/locale/hu.min.js +1 -1
  91. package/dist/locale/hu.min.mjs +1 -1
  92. package/dist/locale/hu.mjs +1 -1
  93. package/dist/locale/hy-am.js +1 -1
  94. package/dist/locale/hy-am.min.js +1 -1
  95. package/dist/locale/hy-am.min.mjs +1 -1
  96. package/dist/locale/hy-am.mjs +1 -1
  97. package/dist/locale/id.js +1 -1
  98. package/dist/locale/id.min.js +1 -1
  99. package/dist/locale/id.min.mjs +1 -1
  100. package/dist/locale/id.mjs +1 -1
  101. package/dist/locale/it.js +1 -1
  102. package/dist/locale/it.min.js +1 -1
  103. package/dist/locale/it.min.mjs +1 -1
  104. package/dist/locale/it.mjs +1 -1
  105. package/dist/locale/ja.js +1 -1
  106. package/dist/locale/ja.min.js +1 -1
  107. package/dist/locale/ja.min.mjs +1 -1
  108. package/dist/locale/ja.mjs +1 -1
  109. package/dist/locale/kk.js +1 -1
  110. package/dist/locale/kk.min.js +1 -1
  111. package/dist/locale/kk.min.mjs +1 -1
  112. package/dist/locale/kk.mjs +1 -1
  113. package/dist/locale/km.js +1 -1
  114. package/dist/locale/km.min.js +1 -1
  115. package/dist/locale/km.min.mjs +1 -1
  116. package/dist/locale/km.mjs +1 -1
  117. package/dist/locale/ko.js +1 -1
  118. package/dist/locale/ko.min.js +1 -1
  119. package/dist/locale/ko.min.mjs +1 -1
  120. package/dist/locale/ko.mjs +1 -1
  121. package/dist/locale/ku.js +1 -1
  122. package/dist/locale/ku.min.js +1 -1
  123. package/dist/locale/ku.min.mjs +1 -1
  124. package/dist/locale/ku.mjs +1 -1
  125. package/dist/locale/ky.js +1 -1
  126. package/dist/locale/ky.min.js +1 -1
  127. package/dist/locale/ky.min.mjs +1 -1
  128. package/dist/locale/ky.mjs +1 -1
  129. package/dist/locale/lt.js +1 -1
  130. package/dist/locale/lt.min.js +1 -1
  131. package/dist/locale/lt.min.mjs +1 -1
  132. package/dist/locale/lt.mjs +1 -1
  133. package/dist/locale/lv.js +1 -1
  134. package/dist/locale/lv.min.js +1 -1
  135. package/dist/locale/lv.min.mjs +1 -1
  136. package/dist/locale/lv.mjs +1 -1
  137. package/dist/locale/mg.js +1 -1
  138. package/dist/locale/mg.min.js +1 -1
  139. package/dist/locale/mg.min.mjs +1 -1
  140. package/dist/locale/mg.mjs +1 -1
  141. package/dist/locale/mn.js +1 -1
  142. package/dist/locale/mn.min.js +1 -1
  143. package/dist/locale/mn.min.mjs +1 -1
  144. package/dist/locale/mn.mjs +1 -1
  145. package/dist/locale/nb-no.js +1 -1
  146. package/dist/locale/nb-no.min.js +1 -1
  147. package/dist/locale/nb-no.min.mjs +1 -1
  148. package/dist/locale/nb-no.mjs +1 -1
  149. package/dist/locale/nl.js +1 -1
  150. package/dist/locale/nl.min.js +1 -1
  151. package/dist/locale/nl.min.mjs +1 -1
  152. package/dist/locale/nl.mjs +1 -1
  153. package/dist/locale/pa.js +1 -1
  154. package/dist/locale/pa.min.js +1 -1
  155. package/dist/locale/pa.min.mjs +1 -1
  156. package/dist/locale/pa.mjs +1 -1
  157. package/dist/locale/pl.js +1 -1
  158. package/dist/locale/pl.min.js +1 -1
  159. package/dist/locale/pl.min.mjs +1 -1
  160. package/dist/locale/pl.mjs +1 -1
  161. package/dist/locale/pt-br.js +1 -1
  162. package/dist/locale/pt-br.min.js +1 -1
  163. package/dist/locale/pt-br.min.mjs +1 -1
  164. package/dist/locale/pt-br.mjs +1 -1
  165. package/dist/locale/pt.js +1 -1
  166. package/dist/locale/pt.min.js +1 -1
  167. package/dist/locale/pt.min.mjs +1 -1
  168. package/dist/locale/pt.mjs +1 -1
  169. package/dist/locale/ro.js +1 -1
  170. package/dist/locale/ro.min.js +1 -1
  171. package/dist/locale/ro.min.mjs +1 -1
  172. package/dist/locale/ro.mjs +1 -1
  173. package/dist/locale/ru.js +1 -1
  174. package/dist/locale/ru.min.js +1 -1
  175. package/dist/locale/ru.min.mjs +1 -1
  176. package/dist/locale/ru.mjs +1 -1
  177. package/dist/locale/sk.js +1 -1
  178. package/dist/locale/sk.min.js +1 -1
  179. package/dist/locale/sk.min.mjs +1 -1
  180. package/dist/locale/sk.mjs +1 -1
  181. package/dist/locale/sl.js +1 -1
  182. package/dist/locale/sl.min.js +1 -1
  183. package/dist/locale/sl.min.mjs +1 -1
  184. package/dist/locale/sl.mjs +1 -1
  185. package/dist/locale/sr.js +1 -1
  186. package/dist/locale/sr.min.js +1 -1
  187. package/dist/locale/sr.min.mjs +1 -1
  188. package/dist/locale/sr.mjs +1 -1
  189. package/dist/locale/sv.js +1 -1
  190. package/dist/locale/sv.min.js +1 -1
  191. package/dist/locale/sv.min.mjs +1 -1
  192. package/dist/locale/sv.mjs +1 -1
  193. package/dist/locale/ta.js +1 -1
  194. package/dist/locale/ta.min.js +1 -1
  195. package/dist/locale/ta.min.mjs +1 -1
  196. package/dist/locale/ta.mjs +1 -1
  197. package/dist/locale/th.js +1 -1
  198. package/dist/locale/th.min.js +1 -1
  199. package/dist/locale/th.min.mjs +1 -1
  200. package/dist/locale/th.mjs +1 -1
  201. package/dist/locale/tk.js +1 -1
  202. package/dist/locale/tk.min.js +1 -1
  203. package/dist/locale/tk.min.mjs +1 -1
  204. package/dist/locale/tk.mjs +1 -1
  205. package/dist/locale/tr.js +1 -1
  206. package/dist/locale/tr.min.js +1 -1
  207. package/dist/locale/tr.min.mjs +1 -1
  208. package/dist/locale/tr.mjs +1 -1
  209. package/dist/locale/ug-cn.js +1 -1
  210. package/dist/locale/ug-cn.min.js +1 -1
  211. package/dist/locale/ug-cn.min.mjs +1 -1
  212. package/dist/locale/ug-cn.mjs +1 -1
  213. package/dist/locale/uk.js +1 -1
  214. package/dist/locale/uk.min.js +1 -1
  215. package/dist/locale/uk.min.mjs +1 -1
  216. package/dist/locale/uk.mjs +1 -1
  217. package/dist/locale/uz-uz.js +1 -1
  218. package/dist/locale/uz-uz.min.js +1 -1
  219. package/dist/locale/uz-uz.min.mjs +1 -1
  220. package/dist/locale/uz-uz.mjs +1 -1
  221. package/dist/locale/vi.js +1 -1
  222. package/dist/locale/vi.min.js +1 -1
  223. package/dist/locale/vi.min.mjs +1 -1
  224. package/dist/locale/vi.mjs +1 -1
  225. package/dist/locale/zh-cn.js +1 -1
  226. package/dist/locale/zh-cn.min.js +1 -1
  227. package/dist/locale/zh-cn.min.mjs +1 -1
  228. package/dist/locale/zh-cn.mjs +1 -1
  229. package/dist/locale/zh-tw.js +1 -1
  230. package/dist/locale/zh-tw.min.js +1 -1
  231. package/dist/locale/zh-tw.min.mjs +1 -1
  232. package/dist/locale/zh-tw.mjs +1 -1
  233. package/es/components/autocomplete/index.d.ts +29 -1
  234. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  235. package/es/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
  236. package/es/components/avatar/src/avatar2.mjs +1 -1
  237. package/es/components/calendar/src/calendar2.mjs +1 -1
  238. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  239. package/es/components/calendar/src/date-table2.mjs +3 -2
  240. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  241. package/es/components/cascader/index.d.ts +38 -2
  242. package/es/components/cascader/src/index.mjs +1 -1
  243. package/es/components/cascader/src/index.vue.d.ts +19 -1
  244. package/es/components/col/src/col.d.ts +2 -0
  245. package/es/components/col/src/col.mjs.map +1 -1
  246. package/es/components/color-picker/src/index.mjs +4 -1
  247. package/es/components/color-picker/src/index.mjs.map +1 -1
  248. package/es/components/descriptions/src/descriptions-cell.mjs +1 -1
  249. package/es/components/dropdown/src/dropdown.mjs +1 -1
  250. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  251. package/es/components/form/src/form-item2.mjs +1 -1
  252. package/es/components/icon/src/icon2.mjs +1 -1
  253. package/es/components/image/index.d.ts +8 -0
  254. package/es/components/image/src/image.d.ts +1 -0
  255. package/es/components/image/src/image.mjs +4 -0
  256. package/es/components/image/src/image.mjs.map +1 -1
  257. package/es/components/image/src/image.vue.d.ts +8 -0
  258. package/es/components/image/src/image2.mjs +2 -1
  259. package/es/components/image/src/image2.mjs.map +1 -1
  260. package/es/components/image-viewer/index.d.ts +4 -0
  261. package/es/components/image-viewer/src/image-viewer.d.ts +1 -0
  262. package/es/components/image-viewer/src/image-viewer.mjs +4 -0
  263. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  264. package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
  265. package/es/components/image-viewer/src/image-viewer2.mjs +1 -1
  266. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  267. package/es/components/index.mjs +1 -1
  268. package/es/components/input/index.d.ts +10 -0
  269. package/es/components/input/src/input.d.ts +2 -0
  270. package/es/components/input/src/input.mjs +6 -0
  271. package/es/components/input/src/input.mjs.map +1 -1
  272. package/es/components/input/src/input.vue.d.ts +10 -0
  273. package/es/components/input/src/input2.mjs +30 -17
  274. package/es/components/input/src/input2.mjs.map +1 -1
  275. package/es/components/input-number/index.d.ts +20 -0
  276. package/es/components/input-number/src/input-number.vue.d.ts +20 -0
  277. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  278. package/es/components/popover/src/popover.mjs +1 -1
  279. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  280. package/es/components/scrollbar/src/thumb.vue.d.ts +16 -16
  281. package/es/components/scrollbar/src/util.d.ts +18 -18
  282. package/es/components/scrollbar/src/util.mjs.map +1 -1
  283. package/es/components/select/src/select.mjs +6 -12
  284. package/es/components/select/src/select.mjs.map +1 -1
  285. package/es/components/select/src/useSelect.mjs +1 -1
  286. package/es/components/select/src/useSelect.mjs.map +1 -1
  287. package/es/components/select-v2/src/defaults.mjs +1 -1
  288. package/es/components/table/src/table/style-helper.mjs +1 -4
  289. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  290. package/es/components/table-v2/index.d.ts +4 -1
  291. package/es/components/table-v2/index.mjs +3 -1
  292. package/es/components/table-v2/index.mjs.map +1 -1
  293. package/es/components/table-v2/src/column.d.ts +2 -2
  294. package/es/components/table-v2/src/components/cell.d.ts +4 -0
  295. package/es/components/table-v2/src/components/cell.mjs +22 -0
  296. package/es/components/table-v2/src/components/cell.mjs.map +1 -0
  297. package/{lib/components/table-v2/src → es/components/table-v2/src/components}/expand-icon.d.ts +1 -1
  298. package/es/components/table-v2/src/components/expand-icon.mjs +26 -0
  299. package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -0
  300. package/es/components/table-v2/src/components/header-cell.d.ts +4 -0
  301. package/es/components/table-v2/src/components/header-cell.mjs +15 -0
  302. package/es/components/table-v2/src/components/header-cell.mjs.map +1 -0
  303. package/es/components/table-v2/src/{table-header-row.d.ts → components/header-row.d.ts} +6 -6
  304. package/es/components/table-v2/src/components/header-row.mjs +40 -0
  305. package/es/components/table-v2/src/components/header-row.mjs.map +1 -0
  306. package/{lib/components/table-v2/src/table-header.d.ts → es/components/table-v2/src/components/header.d.ts} +3 -3
  307. package/es/components/table-v2/src/components/header.mjs +96 -0
  308. package/es/components/table-v2/src/components/header.mjs.map +1 -0
  309. package/es/components/table-v2/src/components/index.d.ts +10 -0
  310. package/es/components/table-v2/src/components/index.mjs +8 -0
  311. package/es/components/table-v2/src/components/index.mjs.map +1 -0
  312. package/es/components/table-v2/src/{table-row.d.ts → components/row.d.ts} +18 -19
  313. package/es/components/table-v2/src/components/row.mjs +204 -0
  314. package/es/components/table-v2/src/components/row.mjs.map +1 -0
  315. package/es/components/table-v2/src/{sort-icon.d.ts → components/sort-icon.d.ts} +1 -1
  316. package/es/components/table-v2/src/components/sort-icon.mjs +19 -0
  317. package/es/components/table-v2/src/components/sort-icon.mjs.map +1 -0
  318. package/es/components/table-v2/src/composables/index.d.ts +5 -0
  319. package/es/components/table-v2/src/composables/index.mjs +6 -0
  320. package/es/components/table-v2/src/composables/index.mjs.map +1 -0
  321. package/{lib/components/table-v2/src → es/components/table-v2/src/composables}/use-columns.d.ts +8 -6
  322. package/es/components/table-v2/src/{use-columns.mjs → composables/use-columns.mjs} +26 -30
  323. package/es/components/table-v2/src/composables/use-columns.mjs.map +1 -0
  324. package/es/components/table-v2/src/composables/use-data.d.ts +17 -0
  325. package/es/components/table-v2/src/composables/use-data.mjs +44 -0
  326. package/es/components/table-v2/src/composables/use-data.mjs.map +1 -0
  327. package/es/components/table-v2/src/composables/use-row.d.ts +32 -0
  328. package/es/components/table-v2/src/composables/use-row.mjs +123 -0
  329. package/es/components/table-v2/src/composables/use-row.mjs.map +1 -0
  330. package/es/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
  331. package/es/components/table-v2/src/composables/use-scrollbar.mjs +55 -0
  332. package/es/components/table-v2/src/composables/use-scrollbar.mjs.map +1 -0
  333. package/es/components/table-v2/src/composables/use-styles.d.ts +25 -0
  334. package/es/components/table-v2/src/composables/use-styles.mjs +87 -0
  335. package/es/components/table-v2/src/composables/use-styles.mjs.map +1 -0
  336. package/es/components/table-v2/src/composables/utils.d.ts +3 -0
  337. package/es/components/table-v2/src/composables/utils.mjs +26 -0
  338. package/es/components/table-v2/src/composables/utils.mjs.map +1 -0
  339. package/es/components/table-v2/src/constants.d.ts +4 -0
  340. package/es/components/table-v2/src/constants.mjs +6 -1
  341. package/es/components/table-v2/src/constants.mjs.map +1 -1
  342. package/es/components/table-v2/src/grid.d.ts +4 -1
  343. package/es/components/table-v2/src/grid.mjs +5 -0
  344. package/es/components/table-v2/src/grid.mjs.map +1 -1
  345. package/es/components/table-v2/src/renderers/cell.d.ts +1 -1
  346. package/es/components/table-v2/src/renderers/cell.mjs +91 -0
  347. package/es/components/table-v2/src/renderers/cell.mjs.map +1 -0
  348. package/es/components/table-v2/src/renderers/empty.d.ts +7 -0
  349. package/es/components/table-v2/src/renderers/empty.mjs +15 -0
  350. package/es/components/table-v2/src/renderers/empty.mjs.map +1 -0
  351. package/es/components/table-v2/src/renderers/footer.d.ts +7 -0
  352. package/es/components/table-v2/src/renderers/footer.mjs +15 -0
  353. package/es/components/table-v2/src/renderers/footer.mjs.map +1 -0
  354. package/es/components/table-v2/src/renderers/header-cell.d.ts +1 -1
  355. package/es/components/table-v2/src/renderers/header-cell.mjs +65 -0
  356. package/es/components/table-v2/src/renderers/header-cell.mjs.map +1 -0
  357. package/es/components/table-v2/src/renderers/header.d.ts +1 -1
  358. package/es/components/table-v2/src/renderers/header.mjs +39 -0
  359. package/es/components/table-v2/src/renderers/header.mjs.map +1 -0
  360. package/es/components/table-v2/src/renderers/left-table.mjs +24 -0
  361. package/es/components/table-v2/src/renderers/left-table.mjs.map +1 -0
  362. package/es/components/table-v2/src/renderers/main-table.mjs +22 -0
  363. package/es/components/table-v2/src/renderers/main-table.mjs.map +1 -0
  364. package/es/components/table-v2/src/renderers/overlay.d.ts +3 -0
  365. package/es/components/table-v2/src/renderers/overlay.mjs +15 -0
  366. package/es/components/table-v2/src/renderers/overlay.mjs.map +1 -0
  367. package/es/components/table-v2/src/renderers/right-table.mjs +24 -0
  368. package/es/components/table-v2/src/renderers/right-table.mjs.map +1 -0
  369. package/es/components/table-v2/src/renderers/row.mjs +77 -0
  370. package/es/components/table-v2/src/renderers/row.mjs.map +1 -0
  371. package/es/components/table-v2/src/row.d.ts +6 -1
  372. package/es/components/table-v2/src/row.mjs.map +1 -1
  373. package/es/components/table-v2/src/table-grid.d.ts +8 -2
  374. package/es/components/table-v2/src/table-grid.mjs +221 -0
  375. package/es/components/table-v2/src/table-grid.mjs.map +1 -0
  376. package/es/components/table-v2/src/table-v2.d.ts +3 -12
  377. package/es/components/table-v2/src/table-v2.mjs +250 -0
  378. package/es/components/table-v2/src/table-v2.mjs.map +1 -0
  379. package/es/components/table-v2/src/table.d.ts +2 -5
  380. package/es/components/table-v2/src/table.mjs.map +1 -1
  381. package/es/components/table-v2/src/types.d.ts +15 -2
  382. package/es/components/table-v2/src/use-table.d.ts +20 -29
  383. package/es/components/table-v2/src/use-table.mjs +84 -238
  384. package/es/components/table-v2/src/use-table.mjs.map +1 -1
  385. package/es/components/table-v2/src/utils.mjs +1 -1
  386. package/es/components/table-v2/src/utils.mjs.map +1 -1
  387. package/es/components/tooltip/index.mjs +2 -2
  388. package/es/components/tooltip/src/content.mjs +1 -1
  389. package/es/components/tooltip/src/tooltip.mjs +62 -174
  390. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  391. package/es/components/tooltip/src/tooltip2.mjs +174 -62
  392. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  393. package/es/components/tooltip/src/trigger.mjs +1 -1
  394. package/es/components/upload/index.d.ts +16 -12
  395. package/es/components/upload/src/upload-content.d.ts +1 -1
  396. package/es/components/upload/src/upload-content.vue.d.ts +4 -3
  397. package/es/components/upload/src/upload-content2.mjs +3 -1
  398. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  399. package/es/components/upload/src/upload-list2.mjs +5 -3
  400. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  401. package/es/components/upload/src/upload.d.ts +2 -2
  402. package/es/components/upload/src/upload.mjs +1 -1
  403. package/es/components/upload/src/upload.mjs.map +1 -1
  404. package/es/components/upload/src/upload.vue.d.ts +16 -12
  405. package/es/components/virtual-list/src/builders/build-grid.d.ts +11 -2
  406. package/es/components/virtual-list/src/builders/build-grid.mjs +7 -3
  407. package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
  408. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +11 -2
  409. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +4 -2
  410. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
  411. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +11 -2
  412. package/es/components/virtual-list/src/components/scrollbar.d.ts +2 -2
  413. package/es/components/virtual-list/src/props.d.ts +7 -3
  414. package/es/components/virtual-list/src/props.mjs +5 -1
  415. package/es/components/virtual-list/src/props.mjs.map +1 -1
  416. package/es/components/virtual-list/src/types.d.ts +7 -0
  417. package/es/components/virtual-list/src/utils.d.ts +10 -5
  418. package/es/components/virtual-list/src/utils.mjs.map +1 -1
  419. package/es/constants/index.mjs +1 -1
  420. package/es/constants/size.d.ts +0 -1
  421. package/es/constants/size.mjs +1 -4
  422. package/es/constants/size.mjs.map +1 -1
  423. package/es/directives/mousewheel/index.mjs +1 -7
  424. package/es/directives/mousewheel/index.mjs.map +1 -1
  425. package/es/hooks/index.d.ts +1 -0
  426. package/es/hooks/index.mjs +1 -0
  427. package/es/hooks/index.mjs.map +1 -1
  428. package/es/hooks/use-cursor/index.d.ts +2 -0
  429. package/es/hooks/use-cursor/index.mjs +46 -0
  430. package/es/hooks/use-cursor/index.mjs.map +1 -0
  431. package/es/hooks/use-draggable/index.mjs +1 -1
  432. package/es/index.mjs +3 -2
  433. package/es/index.mjs.map +1 -1
  434. package/es/utils/dom/index.mjs +1 -1
  435. package/es/utils/dom/style.d.ts +1 -0
  436. package/es/utils/dom/style.mjs +15 -3
  437. package/es/utils/dom/style.mjs.map +1 -1
  438. package/es/utils/index.mjs +2 -2
  439. package/es/utils/vue/index.d.ts +1 -1
  440. package/es/utils/vue/index.mjs +1 -1
  441. package/es/utils/vue/size.d.ts +1 -0
  442. package/es/utils/vue/size.mjs +9 -0
  443. package/es/utils/vue/size.mjs.map +1 -0
  444. package/es/version.d.ts +1 -1
  445. package/es/version.mjs +1 -1
  446. package/es/version.mjs.map +1 -1
  447. package/lib/components/autocomplete/index.d.ts +29 -1
  448. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  449. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
  450. package/lib/components/avatar/src/avatar2.js +1 -1
  451. package/lib/components/calendar/src/calendar2.js +1 -1
  452. package/lib/components/calendar/src/calendar2.js.map +1 -1
  453. package/lib/components/calendar/src/date-table2.js +3 -2
  454. package/lib/components/calendar/src/date-table2.js.map +1 -1
  455. package/lib/components/cascader/index.d.ts +38 -2
  456. package/lib/components/cascader/src/index.js +1 -1
  457. package/lib/components/cascader/src/index.vue.d.ts +19 -1
  458. package/lib/components/col/src/col.d.ts +2 -0
  459. package/lib/components/col/src/col.js.map +1 -1
  460. package/lib/components/color-picker/src/index.js +4 -1
  461. package/lib/components/color-picker/src/index.js.map +1 -1
  462. package/lib/components/descriptions/src/descriptions-cell.js +1 -1
  463. package/lib/components/dropdown/src/dropdown.js +1 -1
  464. package/lib/components/dropdown/src/dropdown2.js +1 -1
  465. package/lib/components/form/src/form-item2.js +1 -1
  466. package/lib/components/icon/src/icon2.js +1 -1
  467. package/lib/components/image/index.d.ts +8 -0
  468. package/lib/components/image/src/image.d.ts +1 -0
  469. package/lib/components/image/src/image.js +4 -0
  470. package/lib/components/image/src/image.js.map +1 -1
  471. package/lib/components/image/src/image.vue.d.ts +8 -0
  472. package/lib/components/image/src/image2.js +2 -1
  473. package/lib/components/image/src/image2.js.map +1 -1
  474. package/lib/components/image-viewer/index.d.ts +4 -0
  475. package/lib/components/image-viewer/src/image-viewer.d.ts +1 -0
  476. package/lib/components/image-viewer/src/image-viewer.js +4 -0
  477. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  478. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
  479. package/lib/components/image-viewer/src/image-viewer2.js +1 -1
  480. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  481. package/lib/components/index.js +1 -1
  482. package/lib/components/input/index.d.ts +10 -0
  483. package/lib/components/input/src/input.d.ts +2 -0
  484. package/lib/components/input/src/input.js +6 -0
  485. package/lib/components/input/src/input.js.map +1 -1
  486. package/lib/components/input/src/input.vue.d.ts +10 -0
  487. package/lib/components/input/src/input2.js +35 -22
  488. package/lib/components/input/src/input2.js.map +1 -1
  489. package/lib/components/input-number/index.d.ts +20 -0
  490. package/lib/components/input-number/src/input-number.vue.d.ts +20 -0
  491. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  492. package/lib/components/popover/src/popover.js +1 -1
  493. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  494. package/lib/components/scrollbar/src/thumb.vue.d.ts +16 -16
  495. package/lib/components/scrollbar/src/util.d.ts +18 -18
  496. package/lib/components/scrollbar/src/util.js.map +1 -1
  497. package/lib/components/select/src/select.js +6 -12
  498. package/lib/components/select/src/select.js.map +1 -1
  499. package/lib/components/select/src/useSelect.js +1 -1
  500. package/lib/components/select/src/useSelect.js.map +1 -1
  501. package/lib/components/select-v2/src/defaults.js +1 -1
  502. package/lib/components/table/src/table/style-helper.js +1 -4
  503. package/lib/components/table/src/table/style-helper.js.map +1 -1
  504. package/lib/components/table-v2/index.d.ts +4 -1
  505. package/lib/components/table-v2/index.js +13 -0
  506. package/lib/components/table-v2/index.js.map +1 -1
  507. package/lib/components/table-v2/src/column.d.ts +2 -2
  508. package/lib/components/table-v2/src/components/cell.d.ts +4 -0
  509. package/lib/components/table-v2/src/components/cell.js +26 -0
  510. package/lib/components/table-v2/src/components/cell.js.map +1 -0
  511. package/{es/components/table-v2/src → lib/components/table-v2/src/components}/expand-icon.d.ts +1 -1
  512. package/lib/components/table-v2/src/components/expand-icon.js +30 -0
  513. package/lib/components/table-v2/src/components/expand-icon.js.map +1 -0
  514. package/lib/components/table-v2/src/components/header-cell.d.ts +4 -0
  515. package/lib/components/table-v2/src/components/header-cell.js +19 -0
  516. package/lib/components/table-v2/src/components/header-cell.js.map +1 -0
  517. package/lib/components/table-v2/src/{table-header-row.d.ts → components/header-row.d.ts} +6 -6
  518. package/lib/components/table-v2/src/components/header-row.js +44 -0
  519. package/lib/components/table-v2/src/components/header-row.js.map +1 -0
  520. package/{es/components/table-v2/src/table-header.d.ts → lib/components/table-v2/src/components/header.d.ts} +3 -3
  521. package/lib/components/table-v2/src/components/header.js +100 -0
  522. package/lib/components/table-v2/src/components/header.js.map +1 -0
  523. package/lib/components/table-v2/src/components/index.d.ts +10 -0
  524. package/lib/components/table-v2/src/components/index.js +22 -0
  525. package/lib/components/table-v2/src/components/index.js.map +1 -0
  526. package/lib/components/table-v2/src/{table-row.d.ts → components/row.d.ts} +18 -19
  527. package/lib/components/table-v2/src/components/row.js +208 -0
  528. package/lib/components/table-v2/src/components/row.js.map +1 -0
  529. package/lib/components/table-v2/src/{sort-icon.d.ts → components/sort-icon.d.ts} +1 -1
  530. package/lib/components/table-v2/src/components/sort-icon.js +23 -0
  531. package/lib/components/table-v2/src/components/sort-icon.js.map +1 -0
  532. package/lib/components/table-v2/src/composables/index.d.ts +5 -0
  533. package/lib/components/table-v2/src/composables/index.js +18 -0
  534. package/lib/components/table-v2/src/composables/index.js.map +1 -0
  535. package/{es/components/table-v2/src → lib/components/table-v2/src/composables}/use-columns.d.ts +8 -6
  536. package/lib/components/table-v2/src/{use-columns.js → composables/use-columns.js} +27 -31
  537. package/lib/components/table-v2/src/composables/use-columns.js.map +1 -0
  538. package/lib/components/table-v2/src/composables/use-data.d.ts +17 -0
  539. package/lib/components/table-v2/src/composables/use-data.js +48 -0
  540. package/lib/components/table-v2/src/composables/use-data.js.map +1 -0
  541. package/lib/components/table-v2/src/composables/use-row.d.ts +32 -0
  542. package/lib/components/table-v2/src/composables/use-row.js +127 -0
  543. package/lib/components/table-v2/src/composables/use-row.js.map +1 -0
  544. package/lib/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
  545. package/lib/components/table-v2/src/composables/use-scrollbar.js +59 -0
  546. package/lib/components/table-v2/src/composables/use-scrollbar.js.map +1 -0
  547. package/lib/components/table-v2/src/composables/use-styles.d.ts +25 -0
  548. package/lib/components/table-v2/src/composables/use-styles.js +91 -0
  549. package/lib/components/table-v2/src/composables/use-styles.js.map +1 -0
  550. package/lib/components/table-v2/src/composables/utils.d.ts +3 -0
  551. package/lib/components/table-v2/src/composables/utils.js +30 -0
  552. package/lib/components/table-v2/src/composables/utils.js.map +1 -0
  553. package/lib/components/table-v2/src/constants.d.ts +4 -0
  554. package/lib/components/table-v2/src/constants.js +6 -0
  555. package/lib/components/table-v2/src/constants.js.map +1 -1
  556. package/lib/components/table-v2/src/grid.d.ts +4 -1
  557. package/lib/components/table-v2/src/grid.js +5 -0
  558. package/lib/components/table-v2/src/grid.js.map +1 -1
  559. package/lib/components/table-v2/src/renderers/cell.d.ts +1 -1
  560. package/lib/components/table-v2/src/renderers/cell.js +95 -0
  561. package/lib/components/table-v2/src/renderers/cell.js.map +1 -0
  562. package/lib/components/table-v2/src/renderers/empty.d.ts +7 -0
  563. package/lib/components/table-v2/src/renderers/empty.js +19 -0
  564. package/lib/components/table-v2/src/renderers/empty.js.map +1 -0
  565. package/lib/components/table-v2/src/renderers/footer.d.ts +7 -0
  566. package/lib/components/table-v2/src/renderers/footer.js +19 -0
  567. package/lib/components/table-v2/src/renderers/footer.js.map +1 -0
  568. package/lib/components/table-v2/src/renderers/header-cell.d.ts +1 -1
  569. package/lib/components/table-v2/src/renderers/header-cell.js +69 -0
  570. package/lib/components/table-v2/src/renderers/header-cell.js.map +1 -0
  571. package/lib/components/table-v2/src/renderers/header.d.ts +1 -1
  572. package/lib/components/table-v2/src/renderers/header.js +43 -0
  573. package/lib/components/table-v2/src/renderers/header.js.map +1 -0
  574. package/lib/components/table-v2/src/renderers/left-table.js +28 -0
  575. package/lib/components/table-v2/src/renderers/left-table.js.map +1 -0
  576. package/lib/components/table-v2/src/renderers/main-table.js +26 -0
  577. package/lib/components/table-v2/src/renderers/main-table.js.map +1 -0
  578. package/lib/components/table-v2/src/renderers/overlay.d.ts +3 -0
  579. package/lib/components/table-v2/src/renderers/overlay.js +19 -0
  580. package/lib/components/table-v2/src/renderers/overlay.js.map +1 -0
  581. package/lib/components/table-v2/src/renderers/right-table.js +28 -0
  582. package/lib/components/table-v2/src/renderers/right-table.js.map +1 -0
  583. package/lib/components/table-v2/src/renderers/row.js +81 -0
  584. package/lib/components/table-v2/src/renderers/row.js.map +1 -0
  585. package/lib/components/table-v2/src/row.d.ts +6 -1
  586. package/lib/components/table-v2/src/row.js.map +1 -1
  587. package/lib/components/table-v2/src/table-grid.d.ts +8 -2
  588. package/lib/components/table-v2/src/table-grid.js +225 -0
  589. package/lib/components/table-v2/src/table-grid.js.map +1 -0
  590. package/lib/components/table-v2/src/table-v2.d.ts +3 -12
  591. package/lib/components/table-v2/src/table-v2.js +254 -0
  592. package/lib/components/table-v2/src/table-v2.js.map +1 -0
  593. package/lib/components/table-v2/src/table.d.ts +2 -5
  594. package/lib/components/table-v2/src/table.js.map +1 -1
  595. package/lib/components/table-v2/src/types.d.ts +15 -2
  596. package/lib/components/table-v2/src/use-table.d.ts +20 -29
  597. package/lib/components/table-v2/src/use-table.js +82 -236
  598. package/lib/components/table-v2/src/use-table.js.map +1 -1
  599. package/lib/components/table-v2/src/utils.js +1 -1
  600. package/lib/components/table-v2/src/utils.js.map +1 -1
  601. package/lib/components/tooltip/index.js +2 -2
  602. package/lib/components/tooltip/src/content.js +1 -1
  603. package/lib/components/tooltip/src/tooltip.js +64 -174
  604. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  605. package/lib/components/tooltip/src/tooltip2.js +174 -64
  606. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  607. package/lib/components/tooltip/src/trigger.js +1 -1
  608. package/lib/components/upload/index.d.ts +16 -12
  609. package/lib/components/upload/src/upload-content.d.ts +1 -1
  610. package/lib/components/upload/src/upload-content.vue.d.ts +4 -3
  611. package/lib/components/upload/src/upload-content2.js +3 -1
  612. package/lib/components/upload/src/upload-content2.js.map +1 -1
  613. package/lib/components/upload/src/upload-list2.js +4 -2
  614. package/lib/components/upload/src/upload-list2.js.map +1 -1
  615. package/lib/components/upload/src/upload.d.ts +2 -2
  616. package/lib/components/upload/src/upload.js +1 -1
  617. package/lib/components/upload/src/upload.js.map +1 -1
  618. package/lib/components/upload/src/upload.vue.d.ts +16 -12
  619. package/lib/components/virtual-list/src/builders/build-grid.d.ts +11 -2
  620. package/lib/components/virtual-list/src/builders/build-grid.js +7 -3
  621. package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
  622. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +11 -2
  623. package/lib/components/virtual-list/src/components/dynamic-size-grid.js +4 -2
  624. package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
  625. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +11 -2
  626. package/lib/components/virtual-list/src/components/scrollbar.d.ts +2 -2
  627. package/lib/components/virtual-list/src/props.d.ts +7 -3
  628. package/lib/components/virtual-list/src/props.js +5 -1
  629. package/lib/components/virtual-list/src/props.js.map +1 -1
  630. package/lib/components/virtual-list/src/types.d.ts +7 -0
  631. package/lib/components/virtual-list/src/utils.d.ts +10 -5
  632. package/lib/components/virtual-list/src/utils.js.map +1 -1
  633. package/lib/constants/index.js +0 -1
  634. package/lib/constants/index.js.map +1 -1
  635. package/lib/constants/size.d.ts +0 -1
  636. package/lib/constants/size.js +0 -4
  637. package/lib/constants/size.js.map +1 -1
  638. package/lib/directives/mousewheel/index.js +1 -7
  639. package/lib/directives/mousewheel/index.js.map +1 -1
  640. package/lib/hooks/index.d.ts +1 -0
  641. package/lib/hooks/index.js +2 -0
  642. package/lib/hooks/index.js.map +1 -1
  643. package/lib/hooks/use-cursor/index.d.ts +2 -0
  644. package/lib/hooks/use-cursor/index.js +50 -0
  645. package/lib/hooks/use-cursor/index.js.map +1 -0
  646. package/lib/hooks/use-draggable/index.js +1 -1
  647. package/lib/index.js +3 -2
  648. package/lib/index.js.map +1 -1
  649. package/lib/utils/dom/index.js +1 -0
  650. package/lib/utils/dom/index.js.map +1 -1
  651. package/lib/utils/dom/style.d.ts +1 -0
  652. package/lib/utils/dom/style.js +13 -0
  653. package/lib/utils/dom/style.js.map +1 -1
  654. package/lib/utils/index.js +3 -2
  655. package/lib/utils/index.js.map +1 -1
  656. package/lib/utils/vue/index.d.ts +1 -1
  657. package/lib/utils/vue/index.js +2 -2
  658. package/lib/utils/vue/size.d.ts +1 -0
  659. package/lib/utils/vue/size.js +13 -0
  660. package/lib/utils/vue/size.js.map +1 -0
  661. package/lib/version.d.ts +1 -1
  662. package/lib/version.js +1 -1
  663. package/lib/version.js.map +1 -1
  664. package/package.json +7 -7
  665. package/tags.json +1 -1
  666. package/theme-chalk/el-autocomplete.css +1 -1
  667. package/theme-chalk/el-date-picker.css +1 -1
  668. package/theme-chalk/el-input-number.css +1 -1
  669. package/theme-chalk/el-input.css +1 -1
  670. package/theme-chalk/el-pagination.css +1 -1
  671. package/theme-chalk/el-step.css +1 -1
  672. package/theme-chalk/el-table-v2.css +1 -1
  673. package/theme-chalk/el-tabs.css +1 -1
  674. package/theme-chalk/el-time-picker.css +1 -1
  675. package/theme-chalk/el-upload.css +1 -1
  676. package/theme-chalk/index.css +1 -1
  677. package/theme-chalk/src/autocomplete.scss +9 -9
  678. package/theme-chalk/src/check-tag.scss +5 -5
  679. package/theme-chalk/src/dark/var.scss +7 -7
  680. package/theme-chalk/src/date-picker/time-picker.scss +2 -2
  681. package/theme-chalk/src/date-picker/year-table.scss +2 -2
  682. package/theme-chalk/src/input-number.scss +0 -1
  683. package/theme-chalk/src/input.scss +12 -5
  684. package/theme-chalk/src/pagination.scss +6 -0
  685. package/theme-chalk/src/step.scss +1 -1
  686. package/theme-chalk/src/table-v2.scss +30 -6
  687. package/theme-chalk/src/tabs.scss +1 -1
  688. package/theme-chalk/src/upload.scss +7 -4
  689. package/web-types.json +1 -1
  690. package/es/components/table-v2/src/column-resizer.d.ts +0 -14
  691. package/es/components/table-v2/src/column-resizer.mjs +0 -24
  692. package/es/components/table-v2/src/column-resizer.mjs.map +0 -1
  693. package/es/components/table-v2/src/table-cell.d.ts +0 -9
  694. package/es/components/table-v2/src/table-column-resizer.d.ts +0 -31
  695. package/es/components/table-v2/src/table-header-cell.d.ts +0 -8
  696. package/es/components/table-v2/src/use-columns.mjs.map +0 -1
  697. package/es/utils/vue/style.d.ts +0 -1
  698. package/es/utils/vue/style.mjs +0 -19
  699. package/es/utils/vue/style.mjs.map +0 -1
  700. package/lib/components/table-v2/src/column-resizer.d.ts +0 -14
  701. package/lib/components/table-v2/src/column-resizer.js +0 -28
  702. package/lib/components/table-v2/src/column-resizer.js.map +0 -1
  703. package/lib/components/table-v2/src/table-cell.d.ts +0 -9
  704. package/lib/components/table-v2/src/table-column-resizer.d.ts +0 -31
  705. package/lib/components/table-v2/src/table-header-cell.d.ts +0 -8
  706. package/lib/components/table-v2/src/use-columns.js.map +0 -1
  707. package/lib/utils/vue/style.d.ts +0 -1
  708. package/lib/utils/vue/style.js +0 -23
  709. package/lib/utils/vue/style.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","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, StyleValue } from 'vue'\nimport type { 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 style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\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: 2 } 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 rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\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 VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"names":[],"mappings":";;;;;AAOA,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC1C,EAAE,QAAQ,EAAE,IAAI;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,EAAE,MAAM;AACd,CAA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ACpB,EAAE,WAAW,EAAE,QAAQ;AACvB,EAAE,oBAAoB,EAAE,iBAAiB;AACzC,EAAE,kBAAkB,EAAE,iBAAiB;AACvC,EAAE,cAAc,EAAE,gBAAgB;AAClC,EAAE,aAAa,EAAE,gBAAgB;AACjC,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,WAAW,EAAE,KAAK;AACpB,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,cAAc,EAAE,aAAa;AAC/B,EAAE,cAAc,EAAE,aAAa;AAC/B,EAAE,iBAAiB,EAAE,QAAQ;AAC7B,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,GAAG,gBAAgB;AACrB,CAAC,EAAE;AACS,MAAC,yBAAyB,GAAG,UAAU,CAAC;AACpD,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM;AACR,EAAE,KAAK;AACP,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,aAAa;AACf,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
1
+ {"version":3,"file":"props.mjs","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, 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 style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\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: ({ columnIndex, rowIndex }) => `${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 ...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 VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"names":[],"mappings":";;;;;AAOA,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC1C,EAAE,QAAQ,EAAE,IAAI;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,EAAE,MAAM;AACd,CAAC,CAAC,CAAC;AACH,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AACH,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;AACxB,EAAE,OAAO,EAAE,KAAK;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAC;A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AW,CAAC,CAAC;AACxE,GAAG;AACH,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,WAAW,EAAE,KAAK;AACpB,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,cAAc,EAAE,aAAa;AAC/B,EAAE,cAAc,EAAE,aAAa;AAC/B,EAAE,iBAAiB,EAAE,QAAQ;AAC7B,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,GAAG,gBAAgB;AACrB,CAAC,EAAE;AACS,MAAC,yBAAyB,GAAG,UAAU,CAAC;AACpD,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM;AACR,EAAE,KAAK;AACP,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,aAAa;AACf,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
@@ -128,3 +128,10 @@ export declare type GridScrollOptions = {
128
128
  scrollLeft?: number;
129
129
  scrollTop?: number;
130
130
  };
131
+ export declare type GridItemKeyGetter = <T extends {
132
+ [key: string | number]: any;
133
+ }>(args: {
134
+ columnIndex: number;
135
+ data: T;
136
+ rowIndex: number;
137
+ }) => string | number;
@@ -5,8 +5,13 @@ export declare const isHorizontal: (dir: string) => boolean;
5
5
  export declare const isRTL: (dir: Direction) => boolean;
6
6
  export declare function getRTLOffsetType(recalculate?: boolean): RTLOffsetType;
7
7
  export declare const getRelativePos: (e: TouchEvent | MouseEvent, layout: LayoutDirection) => any;
8
- export declare function renderThumbStyle({ move, size, bar }: {
9
- move: any;
10
- size: any;
11
- bar: any;
12
- }, layout: string): CSSProperties;
8
+ declare type RenderThumbStyleParams = {
9
+ bar: {
10
+ size: 'height' | 'width';
11
+ axis: 'X' | 'Y';
12
+ };
13
+ size: string;
14
+ move: number;
15
+ };
16
+ export declare function renderThumbStyle({ move, size, bar }: RenderThumbStyleParams, layout: string): CSSProperties;
17
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/virtual-list/src/utils.ts"],"sourcesContent":["import {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\nexport function renderThumbStyle({ move, size, bar }, layout: string) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n"],"names":[],"mappings":";;AAWY,MAAC,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,SAAS;AAC/D,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,WAAW;AAC1E,MAAC,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,IAAI;AAC1C,IAAI,eAAe,GAAG,IAAI,CAAC;AACpB,SAAS,gBAAgB,CAAC,WAAW,GAAG,KAAK,EAAE;AACtD,EAAE,IAAI,eAAe,KAAK,IAAI,IAAI,WAAW,EAAE;AAC/C,IAAI,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnD,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC;AACtC,IAAI,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC;AAC9B,IAAI,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC;AAC/B,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnC,IAAI,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC;AACjC,IAAI,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnD,IAAI,MAAM,UAAU,G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AAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACzB,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC9B,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,EAAE,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,MAAM,KAAK,YAAY,EAAE;AAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/virtual-list/src/utils.ts"],"sourcesContent":["import {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\ntype RenderThumbStyleParams = {\n bar: {\n size: 'height' | 'width'\n axis: 'X' | 'Y'\n }\n size: string\n move: number\n}\n\nexport function renderThumbStyle(\n { move, size, bar }: RenderThumbStyleParams,\n layout: string\n) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n"],"names":[],"mappings":";;AAWY,MAAC,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,SAAS;AAC/D,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,WAAW;AAC1E,MAAC,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,IAAI;AAC1C,IAAI,eAAe,GAAG,IAAI,CAAC;AACpB,SAAS,gBAAgB,CAAC,WAAW,GAAG,KAAK,EAAE;AACtD,EAAE,IAAI,eAAe,KAAK,IAAI,IAAI,WAAW,EAAE;AAC/C,IAAI,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnD,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC;AACtC,IAAI,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC;AAC9B,IAA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,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE;AAC9D,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACtD,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACzB,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC9B,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,EAAE,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,MAAM,KAAK,YAAY,EAAE;AAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -1,5 +1,5 @@
1
1
  export { EVENT_CODE } from './aria.mjs';
2
2
  export { WEEK_DAYS, datePickTypes } from './date.mjs';
3
3
  export { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from './event.mjs';
4
- export { componentSizeMap, componentSizes, getComponentSize } from './size.mjs';
4
+ export { componentSizeMap, componentSizes } from './size.mjs';
5
5
  //# sourceMappingURL=index.mjs.map
@@ -5,4 +5,3 @@ export declare const componentSizeMap: {
5
5
  readonly default: 32;
6
6
  readonly small: 24;
7
7
  };
8
- export declare const getComponentSize: (size?: ComponentSize) => 40 | 32 | 24;
@@ -4,9 +4,6 @@ const componentSizeMap = {
4
4
  default: 32,
5
5
  small: 24
6
6
  };
7
- const getComponentSize = (size = "default") => {
8
- return componentSizeMap[size || "default"];
9
- };
10
7
 
11
- export { componentSizeMap, componentSizes, getComponentSize };
8
+ export { componentSizeMap, componentSizes };
12
9
  //# sourceMappingURL=size.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"size.mjs","sources":["../../../../packages/constants/size.ts"],"sourcesContent":["export const componentSizes = ['', 'default', 'small', 'large'] as const\n\nexport type ComponentSize = typeof componentSizes[number]\n\nexport const componentSizeMap = {\n large: 40,\n default: 32,\n small: 24,\n} as const\n\nexport const getComponentSize = (size: ComponentSize = 'default') => {\n return componentSizeMap[size || 'default']\n}\n"],"names":[],"mappings":"AAAY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;AACpD,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,KAAK,EAAE,EAAE;AACX,EAAE;AACU,MAAC,gBAAgB,GAAG,CAAC,IAAI,GAAG,SAAS,KAAK;AACtD,EAAE,OAAO,gBAAgB,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;AAC7C;;;;"}
1
+ {"version":3,"file":"size.mjs","sources":["../../../../packages/constants/size.ts"],"sourcesContent":["export const componentSizes = ['', 'default', 'small', 'large'] as const\n\nexport type ComponentSize = typeof componentSizes[number]\n\nexport const componentSizeMap = {\n large: 40,\n default: 32,\n small: 24,\n} as const\n"],"names":[],"mappings":"AAAY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;AACpD,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,KAAK,EAAE,EAAE;AACX;;;;"}
@@ -1,6 +1,4 @@
1
1
  import normalizeWheel from 'normalize-wheel-es';
2
- import '../../utils/index.mjs';
3
- import { isFirefox } from '../../utils/browser.mjs';
4
2
 
5
3
  const mousewheel = function(element, callback) {
6
4
  if (element && element.addEventListener) {
@@ -8,11 +6,7 @@ const mousewheel = function(element, callback) {
8
6
  const normalized = normalizeWheel(event);
9
7
  callback && Reflect.apply(callback, this, [event, normalized]);
10
8
  };
11
- if (isFirefox()) {
12
- element.addEventListener("DOMMouseScroll", fn);
13
- } else {
14
- element.onmousewheel = fn;
15
- }
9
+ element.addEventListener("wheel", fn, { passive: true });
16
10
  }
17
11
  };
18
12
  const Mousewheel = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\nimport { isFirefox } from '@element-plus/utils'\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\nconst mousewheel = function (element, callback) {\n if (element && element.addEventListener) {\n const fn = function (this: any, event) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n if (isFirefox()) {\n element.addEventListener('DOMMouseScroll', fn)\n } else {\n element.onmousewheel = fn\n }\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n"],"names":[],"mappings":";;;;AAEA,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,QAAQ,EAAE;AAC/C,EAAE,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC3C,IAAI,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE;AAC/B,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACrE,KAAK,CAAC;AACN,IAAI,IAAI,SAAS,EAAE,EAAE;AACrB,MAAM,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AACrD,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC;AAChC,KAAK;AACL,GAAG;AACH,CAAC,CAAC;AACG,MAAC,UAAU,GAAG;AACnB,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAClC,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\nconst mousewheel = function (element, callback) {\n if (element && element.addEventListener) {\n const fn = function (this: any, event) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n element.addEventListener('wheel', fn, { passive: true })\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n"],"names":[],"mappings":";;AACA,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,QAAQ,EAAE;AAC/C,EAAE,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC3C,IAAI,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE;AAC/B,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACrE,KAAK,CAAC;AACN,IAAI,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,GAAG;AACH,CAAC,CAAC;AACG,MAAC,UAAU,GAAG;AACnB,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAClC,GAAG;AACH;;;;"}
@@ -27,3 +27,4 @@ export * from './use-forward-ref';
27
27
  export * from './use-namespace';
28
28
  export * from './use-z-index';
29
29
  export * from './use-floating';
30
+ export * from './use-cursor';
@@ -26,4 +26,5 @@ export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from
26
26
  export { useNamespace } from './use-namespace/index.mjs';
27
27
  export { useZIndex } from './use-z-index/index.mjs';
28
28
  export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './use-floating/index.mjs';
29
+ export { useCursor } from './use-cursor/index.mjs';
29
30
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ import type { ShallowRef } from 'vue';
2
+ export declare function useCursor(input: ShallowRef<HTMLInputElement | undefined>): [() => void, () => void];
@@ -0,0 +1,46 @@
1
+ import { ref } from 'vue';
2
+
3
+ function useCursor(input) {
4
+ const selectionRef = ref();
5
+ function recordCursor() {
6
+ if (input.value == void 0)
7
+ return;
8
+ const { selectionStart, selectionEnd, value } = input.value;
9
+ if (selectionStart == null || selectionEnd == null)
10
+ return;
11
+ const beforeTxt = value.slice(0, Math.max(0, selectionStart));
12
+ const afterTxt = value.slice(Math.max(0, selectionEnd));
13
+ selectionRef.value = {
14
+ selectionStart,
15
+ selectionEnd,
16
+ value,
17
+ beforeTxt,
18
+ afterTxt
19
+ };
20
+ }
21
+ function setCursor() {
22
+ if (input.value == void 0 || selectionRef.value == void 0)
23
+ return;
24
+ const { value } = input.value;
25
+ const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
26
+ if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
27
+ return;
28
+ let startPos = value.length;
29
+ if (value.endsWith(afterTxt)) {
30
+ startPos = value.length - afterTxt.length;
31
+ } else if (value.startsWith(beforeTxt)) {
32
+ startPos = beforeTxt.length;
33
+ } else {
34
+ const beforeLastChar = beforeTxt[selectionStart - 1];
35
+ const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
36
+ if (newIndex !== -1) {
37
+ startPos = newIndex + 1;
38
+ }
39
+ }
40
+ input.value.setSelectionRange(startPos, startPos);
41
+ }
42
+ return [recordCursor, setCursor];
43
+ }
44
+
45
+ export { useCursor };
46
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-cursor/index.ts"],"sourcesContent":["import { ref } from 'vue'\n\nimport type { ShallowRef } from 'vue'\n\n// Keep input cursor in the correct position when we use formatter.\nexport function useCursor(\n input: ShallowRef<HTMLInputElement | undefined>\n): [() => void, () => void] {\n const selectionRef = ref<{\n selectionStart?: number\n selectionEnd?: number\n value?: string\n beforeTxt?: string\n afterTxt?: string\n }>()\n\n function recordCursor() {\n if (input.value == undefined) return\n\n const { selectionStart, selectionEnd, value } = input.value\n\n if (selectionStart == null || selectionEnd == null) return\n\n const beforeTxt = value.slice(0, Math.max(0, selectionStart))\n const afterTxt = value.slice(Math.max(0, selectionEnd))\n\n selectionRef.value = {\n selectionStart,\n selectionEnd,\n value,\n beforeTxt,\n afterTxt,\n }\n }\n function setCursor() {\n if (input.value == undefined || selectionRef.value == undefined) return\n\n const { value } = input.value\n const { beforeTxt, afterTxt, selectionStart } = selectionRef.value\n\n if (\n beforeTxt == undefined ||\n afterTxt == undefined ||\n selectionStart == undefined\n )\n return\n\n let startPos = value.length\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - afterTxt.length\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length\n } else {\n const beforeLastChar = beforeTxt[selectionStart - 1]\n const newIndex = value.indexOf(beforeLastChar, selectionStart - 1)\n if (newIndex !== -1) {\n startPos = newIndex + 1\n }\n }\n\n input.value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AM,OAAO;AACb,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AAChC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAC5C,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC;AAClC,KAAK,MAAM;AACX,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;AAC3D,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AACzE,MAAM,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE;AAC3B,QAAQ,QAAQ,GAAG,QAAQ,GAAG,CAAC,CAAC;AAChC,OAAO;AACP,KAAK;AACL,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,GAAG;AACH,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { onMounted, watchEffect, onBeforeUnmount } from 'vue';
2
2
  import '../../utils/index.mjs';
3
- import { addUnit } from '../../utils/vue/style.mjs';
3
+ import { addUnit } from '../../utils/dom/style.mjs';
4
4
 
5
5
  const useDraggable = (targetRef, dragRef, draggable) => {
6
6
  let transform = {
package/es/index.mjs CHANGED
@@ -146,7 +146,7 @@ export { ElTimePicker } from './components/time-picker/index.mjs';
146
146
  export { ElTimeSelect } from './components/time-select/index.mjs';
147
147
  export { timelineItemProps } from './components/timeline/src/timeline-item.mjs';
148
148
  export { ElTimeline, ElTimelineItem } from './components/timeline/index.mjs';
149
- export { useTooltipContentProps, useTooltipProps, useTooltipTriggerProps } from './components/tooltip/src/tooltip2.mjs';
149
+ export { useTooltipContentProps, useTooltipProps, useTooltipTriggerProps } from './components/tooltip/src/tooltip.mjs';
150
150
  export { TOOLTIP_INJECTION_KEY } from './components/tooltip/src/tokens.mjs';
151
151
  export { ElTooltip } from './components/tooltip/index.mjs';
152
152
  export { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from './constants/event.mjs';
@@ -176,7 +176,7 @@ export { ElNotification } from './components/notification/index.mjs';
176
176
  export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
177
177
  export { EVENT_CODE } from './constants/aria.mjs';
178
178
  export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
179
- export { componentSizeMap, componentSizes, getComponentSize } from './constants/size.mjs';
179
+ export { componentSizeMap, componentSizes } from './constants/size.mjs';
180
180
  export { default as ClickOutside } from './directives/click-outside/index.mjs';
181
181
  export { default as RepeatClick } from './directives/repeat-click/index.mjs';
182
182
  export { default as TrapFocus } from './directives/trap-focus/index.mjs';
@@ -210,6 +210,7 @@ export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from
210
210
  export { useNamespace } from './hooks/use-namespace/index.mjs';
211
211
  export { useZIndex } from './hooks/use-z-index/index.mjs';
212
212
  export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './hooks/use-floating/index.mjs';
213
+ export { useCursor } from './hooks/use-cursor/index.mjs';
213
214
  export { breadcrumbKey } from './tokens/breadcrumb.mjs';
214
215
  export { buttonGroupContextKey } from './tokens/button.mjs';
215
216
  export { carouselContextKey } from './tokens/carousel.mjs';
package/es/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
@@ -3,5 +3,5 @@ export { composeEventHandlers, off, on, once, whenMouse } from './event.mjs';
3
3
  export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './position.mjs';
4
4
  export { addResizeListener, removeResizeListener } from './resize-event.mjs';
5
5
  export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './scroll.mjs';
6
- export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './style.mjs';
6
+ export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './style.mjs';
7
7
  //# sourceMappingURL=index.mjs.map
@@ -6,3 +6,4 @@ export declare const removeClass: (el: Element, cls: string) => void;
6
6
  export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
7
7
  export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number | undefined) => void;
8
8
  export declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
9
+ export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
@@ -1,9 +1,11 @@
1
- import { isClient } from '@vueuse/core';
1
+ import { isClient, isNumber } from '@vueuse/core';
2
2
  import '../types.mjs';
3
3
  import '../strings.mjs';
4
4
  import { entriesOf, keysOf } from '../objects.mjs';
5
- import { camelize, isObject } from '@vue/shared';
5
+ import { debugWarn } from '../error.mjs';
6
+ import { camelize, isObject, isString } from '@vue/shared';
6
7
 
8
+ const SCOPE = "utils/dom/style";
7
9
  const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
8
10
  const hasClass = (el, cls) => {
9
11
  if (!el || !cls)
@@ -58,6 +60,16 @@ const removeStyle = (element, style) => {
58
60
  setStyle(element, style, "");
59
61
  }
60
62
  };
63
+ function addUnit(value, defaultUnit = "px") {
64
+ if (!value)
65
+ return "";
66
+ if (isString(value)) {
67
+ return value;
68
+ } else if (isNumber(value)) {
69
+ return `${value}${defaultUnit}`;
70
+ }
71
+ debugWarn(SCOPE, "binding value must be a string or number");
72
+ }
61
73
 
62
- export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };
74
+ export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };
63
75
  //# sourceMappingURL=style.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\nimport { isObject } from '../types'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport type { CSSProperties } from 'vue'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = element.style[styleName]\n if (style) return style\n const computed = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[styleName] : ''\n } catch {\n return element.style[styleName]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key = camelize(styleName)\n element.style[key] = value\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n"],"names":[],"mappings":";;;;;;AAIY,MAAC,gBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,C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,GAAG,MAAM;AACT,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\nimport { isNumber, isObject, isString } from '../types'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = element.style[styleName]\n if (style) return style\n const computed = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[styleName] : ''\n } catch {\n return element.style[styleName]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key = camelize(styleName)\n element.style[key] = value\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value) return ''\n if (isString(value)) {\n return value\n } else if (isNumber(value)) {\n return `${value}${defaultUnit}`\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,KAAK,GAAG,iBAAiB,CAAC;AACpB,MAAC,gBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;AACjF,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK;AACrC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG;AACjB,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;AACvB,IAAI,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;AAC3D,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpC,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK;AACrC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;AACxB,IAAI,OAAO;AACX,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7C,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK;AACxC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;AACxB,IAAI,OAAO;AACX,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,OAAO,EAAE,SAAS,KAA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KAAK,CAAC;AAC/B,GAAG;AACH,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK;AAC/C,EAAE,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;AACxB,IAAI,OAAO;AACX,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACvB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAChE,GAAG,MAAM;AACT,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,GAAG;AACH,EAAE;AACK,SAAS,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,EAAE;AACnD,EAAE,IAAI,CAAC,KAAK;AACZ,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACvB,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC9B,IAAI,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACpC,GAAG;AACH,EAAE,SAAS,CAAC,KAAK,EAAE,0CAA0C,CAAC,CAAC;AAC/D;;;;"}
@@ -16,13 +16,13 @@ export { composeEventHandlers, off, on, once, whenMouse } from './dom/event.mjs'
16
16
  export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './dom/position.mjs';
17
17
  export { addResizeListener, removeResizeListener } from './dom/resize-event.mjs';
18
18
  export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './dom/scroll.mjs';
19
- export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './dom/style.mjs';
19
+ export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './dom/style.mjs';
20
20
  export { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from './vue/global-node.mjs';
21
21
  export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from './vue/icon.mjs';
22
22
  export { withInstall, withInstallFunction, withNoopInstall } from './vue/install.mjs';
23
23
  export { buildProp, buildProps, definePropType, propKey } from './vue/props.mjs';
24
24
  export { composeRefs } from './vue/refs.mjs';
25
- export { addUnit } from './vue/style.mjs';
25
+ export { getComponentSize } from './vue/size.mjs';
26
26
  export { isValidComponentSize, isValidDatePickType } from './vue/validator.mjs';
27
27
  export { PatchFlags, ensureOnlyChild, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vue/vnode.mjs';
28
28
  export { castArray as ensureArray } from 'lodash-unified';
@@ -3,7 +3,7 @@ export * from './icon';
3
3
  export * from './install';
4
4
  export * from './props';
5
5
  export * from './refs';
6
- export * from './style';
6
+ export * from './size';
7
7
  export * from './typescript';
8
8
  export * from './validator';
9
9
  export * from './vnode';
@@ -3,7 +3,7 @@ export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsM
3
3
  export { withInstall, withInstallFunction, withNoopInstall } from './install.mjs';
4
4
  export { buildProp, buildProps, definePropType, propKey } from './props.mjs';
5
5
  export { composeRefs } from './refs.mjs';
6
- export { addUnit } from './style.mjs';
6
+ export { getComponentSize } from './size.mjs';
7
7
  import './typescript.mjs';
8
8
  export { isValidComponentSize, isValidDatePickType } from './validator.mjs';
9
9
  export { PatchFlags, ensureOnlyChild, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vnode.mjs';
@@ -0,0 +1 @@
1
+ export declare const getComponentSize: (size?: "" | "default" | "small" | "large" | undefined) => 40 | 32 | 24;
@@ -0,0 +1,9 @@
1
+ import '../../constants/index.mjs';
2
+ import { componentSizeMap } from '../../constants/size.mjs';
3
+
4
+ const getComponentSize = (size) => {
5
+ return componentSizeMap[size || "default"];
6
+ };
7
+
8
+ export { getComponentSize };
9
+ //# sourceMappingURL=size.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.mjs","sources":["../../../../../packages/utils/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from '@element-plus/constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\n\nexport const getComponentSize = (size?: ComponentSize) => {\n return componentSizeMap[size || 'default']\n}\n"],"names":[],"mappings":";;;AACY,MAAC,gBAAgB,GAAG,CAAC,IAAI,KAAK;AAC1C,EAAE,OAAO,gBAAgB,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;AAC7C;;;;"}
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.1.10";
1
+ export declare const version = "2.1.11";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "2.1.10";
1
+ const version = "2.1.11";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.1.10'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.1.11'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -94,6 +94,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
94
94
  resize: import("element-plus/es/utils").BuildPropType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>;
95
95
  autosize: import("..").InputAutoSize;
96
96
  autocomplete: string;
97
+ formatter: Function;
98
+ parser: Function;
97
99
  placeholder: string;
98
100
  form: string;
99
101
  readonly: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -113,6 +115,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
113
115
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
114
116
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
115
117
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
118
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
119
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
116
120
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
117
121
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
118
122
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -138,7 +142,7 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
138
142
  onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
139
143
  onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
140
144
  onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
141
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "size" | "disabled" | "label" | "modelValue" | "resize" | "autosize" | "autocomplete" | "placeholder" | "form" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "suffixIcon" | "prefixIcon" | "tabindex" | "validateEvent" | "inputStyle">;
145
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "size" | "disabled" | "label" | "modelValue" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "placeholder" | "form" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "suffixIcon" | "prefixIcon" | "tabindex" | "validateEvent" | "inputStyle">;
142
146
  $attrs: {
143
147
  [x: string]: unknown;
144
148
  };
@@ -160,6 +164,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
160
164
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
161
165
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
162
166
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
167
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
168
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
163
169
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
164
170
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
165
171
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -198,6 +204,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
198
204
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
199
205
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
200
206
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
207
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
208
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
201
209
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
202
210
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
203
211
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -286,6 +294,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
286
294
  textLength: import("vue").ComputedRef<number>;
287
295
  inputExceed: import("vue").ComputedRef<boolean>;
288
296
  suffixVisible: import("vue").ComputedRef<boolean>;
297
+ recordCursor: () => void;
298
+ setCursor: () => void;
289
299
  resizeTextarea: () => void;
290
300
  setNativeInputValue: () => void;
291
301
  calcIconOffset: (place: "prefix" | "suffix") => void;
@@ -360,6 +370,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
360
370
  resize: import("element-plus/es/utils").BuildPropType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>;
361
371
  autosize: import("..").InputAutoSize;
362
372
  autocomplete: string;
373
+ formatter: Function;
374
+ parser: Function;
363
375
  placeholder: string;
364
376
  form: string;
365
377
  readonly: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -399,6 +411,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
399
411
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
400
412
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
401
413
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
414
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
415
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
402
416
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
403
417
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
404
418
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -437,6 +451,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
437
451
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
438
452
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
439
453
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
454
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
455
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
440
456
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
441
457
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
442
458
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -525,6 +541,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
525
541
  textLength: import("vue").ComputedRef<number>;
526
542
  inputExceed: import("vue").ComputedRef<boolean>;
527
543
  suffixVisible: import("vue").ComputedRef<boolean>;
544
+ recordCursor: () => void;
545
+ setCursor: () => void;
528
546
  resizeTextarea: () => void;
529
547
  setNativeInputValue: () => void;
530
548
  calcIconOffset: (place: "prefix" | "suffix") => void;
@@ -1215,6 +1233,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
1215
1233
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
1216
1234
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
1217
1235
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
1236
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1237
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1218
1238
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
1219
1239
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
1220
1240
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -1240,6 +1260,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
1240
1260
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
1241
1261
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
1242
1262
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
1263
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1264
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1243
1265
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
1244
1266
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
1245
1267
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -1328,6 +1350,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
1328
1350
  textLength: import("vue").ComputedRef<number>;
1329
1351
  inputExceed: import("vue").ComputedRef<boolean>;
1330
1352
  suffixVisible: import("vue").ComputedRef<boolean>;
1353
+ recordCursor: () => void;
1354
+ setCursor: () => void;
1331
1355
  resizeTextarea: () => void;
1332
1356
  setNativeInputValue: () => void;
1333
1357
  calcIconOffset: (place: "prefix" | "suffix") => void;
@@ -1401,6 +1425,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
1401
1425
  readonly resize: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, "none" | "both" | "horizontal" | "vertical", unknown>;
1402
1426
  readonly autosize: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("..").InputAutoSize>, false, unknown, unknown, unknown>;
1403
1427
  readonly autocomplete: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "off", unknown, unknown, unknown>;
1428
+ readonly formatter: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1429
+ readonly parser: import("element-plus/es/utils").BuildPropReturn<FunctionConstructor, unknown, unknown, unknown, unknown>;
1404
1430
  readonly placeholder: import("element-plus/es/utils").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
1405
1431
  readonly form: import("element-plus/es/utils").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
1406
1432
  readonly readonly: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
@@ -1435,6 +1461,8 @@ export declare const ElAutocomplete: import("element-plus/es/utils").SFCWithInst
1435
1461
  resize: import("element-plus/es/utils").BuildPropType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>;
1436
1462
  autosize: import("..").InputAutoSize;
1437
1463
  autocomplete: string;
1464
+ formatter: Function;
1465
+ parser: Function;
1438
1466
  placeholder: string;
1439
1467
  form: string;
1440
1468
  readonly: import("element-plus/es/utils").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -7,7 +7,7 @@ require('../../../utils/index.js');
7
7
  require('../../tooltip/index.js');
8
8
  require('../../../constants/index.js');
9
9
  var props = require('../../../utils/vue/props.js');
10
- var tooltip = require('../../tooltip/src/tooltip2.js');
10
+ var tooltip = require('../../tooltip/src/tooltip.js');
11
11
  var event = require('../../../constants/event.js');
12
12
 
13
13
  const autocompleteProps = props.buildProps({