element-plus 2.1.8 → 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 (1124) hide show
  1. package/README.md +10 -11
  2. package/attributes.json +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.full.js +1231 -2350
  5. package/dist/index.full.min.js +11 -17
  6. package/dist/index.full.min.js.map +1 -1
  7. package/dist/index.full.min.mjs +11 -17
  8. package/dist/index.full.min.mjs.map +1 -1
  9. package/dist/index.full.mjs +1228 -2349
  10. package/dist/locale/af.js +1 -1
  11. package/dist/locale/af.min.js +1 -1
  12. package/dist/locale/af.min.js.map +1 -1
  13. package/dist/locale/af.min.mjs +1 -1
  14. package/dist/locale/af.min.mjs.map +1 -1
  15. package/dist/locale/af.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.js.map +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.min.mjs.map +1 -1
  21. package/dist/locale/ar.mjs +1 -1
  22. package/dist/locale/az.js +1 -1
  23. package/dist/locale/az.min.js +1 -1
  24. package/dist/locale/az.min.js.map +1 -1
  25. package/dist/locale/az.min.mjs +1 -1
  26. package/dist/locale/az.min.mjs.map +1 -1
  27. package/dist/locale/az.mjs +1 -1
  28. package/dist/locale/bg.js +1 -1
  29. package/dist/locale/bg.min.js +1 -1
  30. package/dist/locale/bg.min.js.map +1 -1
  31. package/dist/locale/bg.min.mjs +1 -1
  32. package/dist/locale/bg.min.mjs.map +1 -1
  33. package/dist/locale/bg.mjs +1 -1
  34. package/dist/locale/bn.js +1 -1
  35. package/dist/locale/bn.min.js +1 -1
  36. package/dist/locale/bn.min.js.map +1 -1
  37. package/dist/locale/bn.min.mjs +1 -1
  38. package/dist/locale/bn.min.mjs.map +1 -1
  39. package/dist/locale/bn.mjs +1 -1
  40. package/dist/locale/ca.js +1 -1
  41. package/dist/locale/ca.min.js +1 -1
  42. package/dist/locale/ca.min.js.map +1 -1
  43. package/dist/locale/ca.min.mjs +1 -1
  44. package/dist/locale/ca.min.mjs.map +1 -1
  45. package/dist/locale/ca.mjs +1 -1
  46. package/dist/locale/cs.js +1 -1
  47. package/dist/locale/cs.min.js +1 -1
  48. package/dist/locale/cs.min.js.map +1 -1
  49. package/dist/locale/cs.min.mjs +1 -1
  50. package/dist/locale/cs.min.mjs.map +1 -1
  51. package/dist/locale/cs.mjs +1 -1
  52. package/dist/locale/da.js +1 -1
  53. package/dist/locale/da.min.js +1 -1
  54. package/dist/locale/da.min.js.map +1 -1
  55. package/dist/locale/da.min.mjs +1 -1
  56. package/dist/locale/da.min.mjs.map +1 -1
  57. package/dist/locale/da.mjs +1 -1
  58. package/dist/locale/de.js +1 -1
  59. package/dist/locale/de.min.js +1 -1
  60. package/dist/locale/de.min.js.map +1 -1
  61. package/dist/locale/de.min.mjs +1 -1
  62. package/dist/locale/de.min.mjs.map +1 -1
  63. package/dist/locale/de.mjs +1 -1
  64. package/dist/locale/el.js +1 -1
  65. package/dist/locale/el.min.js +1 -1
  66. package/dist/locale/el.min.js.map +1 -1
  67. package/dist/locale/el.min.mjs +1 -1
  68. package/dist/locale/el.min.mjs.map +1 -1
  69. package/dist/locale/el.mjs +1 -1
  70. package/dist/locale/en.js +1 -1
  71. package/dist/locale/en.min.js +1 -1
  72. package/dist/locale/en.min.js.map +1 -1
  73. package/dist/locale/en.min.mjs +1 -1
  74. package/dist/locale/en.min.mjs.map +1 -1
  75. package/dist/locale/en.mjs +1 -1
  76. package/dist/locale/eo.js +1 -1
  77. package/dist/locale/eo.min.js +1 -1
  78. package/dist/locale/eo.min.js.map +1 -1
  79. package/dist/locale/eo.min.mjs +1 -1
  80. package/dist/locale/eo.min.mjs.map +1 -1
  81. package/dist/locale/eo.mjs +1 -1
  82. package/dist/locale/es.js +1 -1
  83. package/dist/locale/es.min.js +1 -1
  84. package/dist/locale/es.min.js.map +1 -1
  85. package/dist/locale/es.min.mjs +1 -1
  86. package/dist/locale/es.min.mjs.map +1 -1
  87. package/dist/locale/es.mjs +1 -1
  88. package/dist/locale/et.js +1 -1
  89. package/dist/locale/et.min.js +1 -1
  90. package/dist/locale/et.min.js.map +1 -1
  91. package/dist/locale/et.min.mjs +1 -1
  92. package/dist/locale/et.min.mjs.map +1 -1
  93. package/dist/locale/et.mjs +1 -1
  94. package/dist/locale/eu.js +1 -1
  95. package/dist/locale/eu.min.js +1 -1
  96. package/dist/locale/eu.min.js.map +1 -1
  97. package/dist/locale/eu.min.mjs +1 -1
  98. package/dist/locale/eu.min.mjs.map +1 -1
  99. package/dist/locale/eu.mjs +1 -1
  100. package/dist/locale/fa.js +1 -1
  101. package/dist/locale/fa.min.js +1 -1
  102. package/dist/locale/fa.min.js.map +1 -1
  103. package/dist/locale/fa.min.mjs +1 -1
  104. package/dist/locale/fa.min.mjs.map +1 -1
  105. package/dist/locale/fa.mjs +1 -1
  106. package/dist/locale/fi.js +1 -1
  107. package/dist/locale/fi.min.js +1 -1
  108. package/dist/locale/fi.min.js.map +1 -1
  109. package/dist/locale/fi.min.mjs +1 -1
  110. package/dist/locale/fi.min.mjs.map +1 -1
  111. package/dist/locale/fi.mjs +1 -1
  112. package/dist/locale/fr.js +1 -1
  113. package/dist/locale/fr.min.js +1 -1
  114. package/dist/locale/fr.min.js.map +1 -1
  115. package/dist/locale/fr.min.mjs +1 -1
  116. package/dist/locale/fr.min.mjs.map +1 -1
  117. package/dist/locale/fr.mjs +1 -1
  118. package/dist/locale/he.js +1 -1
  119. package/dist/locale/he.min.js +1 -1
  120. package/dist/locale/he.min.js.map +1 -1
  121. package/dist/locale/he.min.mjs +1 -1
  122. package/dist/locale/he.min.mjs.map +1 -1
  123. package/dist/locale/he.mjs +1 -1
  124. package/dist/locale/hr.js +1 -1
  125. package/dist/locale/hr.min.js +1 -1
  126. package/dist/locale/hr.min.js.map +1 -1
  127. package/dist/locale/hr.min.mjs +1 -1
  128. package/dist/locale/hr.min.mjs.map +1 -1
  129. package/dist/locale/hr.mjs +1 -1
  130. package/dist/locale/hu.js +1 -1
  131. package/dist/locale/hu.min.js +1 -1
  132. package/dist/locale/hu.min.js.map +1 -1
  133. package/dist/locale/hu.min.mjs +1 -1
  134. package/dist/locale/hu.min.mjs.map +1 -1
  135. package/dist/locale/hu.mjs +1 -1
  136. package/dist/locale/hy-am.js +1 -1
  137. package/dist/locale/hy-am.min.js +1 -1
  138. package/dist/locale/hy-am.min.js.map +1 -1
  139. package/dist/locale/hy-am.min.mjs +1 -1
  140. package/dist/locale/hy-am.min.mjs.map +1 -1
  141. package/dist/locale/hy-am.mjs +1 -1
  142. package/dist/locale/id.js +1 -1
  143. package/dist/locale/id.min.js +1 -1
  144. package/dist/locale/id.min.js.map +1 -1
  145. package/dist/locale/id.min.mjs +1 -1
  146. package/dist/locale/id.min.mjs.map +1 -1
  147. package/dist/locale/id.mjs +1 -1
  148. package/dist/locale/it.js +1 -1
  149. package/dist/locale/it.min.js +1 -1
  150. package/dist/locale/it.min.js.map +1 -1
  151. package/dist/locale/it.min.mjs +1 -1
  152. package/dist/locale/it.min.mjs.map +1 -1
  153. package/dist/locale/it.mjs +1 -1
  154. package/dist/locale/ja.js +1 -1
  155. package/dist/locale/ja.min.js +1 -1
  156. package/dist/locale/ja.min.js.map +1 -1
  157. package/dist/locale/ja.min.mjs +1 -1
  158. package/dist/locale/ja.min.mjs.map +1 -1
  159. package/dist/locale/ja.mjs +1 -1
  160. package/dist/locale/kk.js +1 -1
  161. package/dist/locale/kk.min.js +1 -1
  162. package/dist/locale/kk.min.js.map +1 -1
  163. package/dist/locale/kk.min.mjs +1 -1
  164. package/dist/locale/kk.min.mjs.map +1 -1
  165. package/dist/locale/kk.mjs +1 -1
  166. package/dist/locale/km.js +1 -1
  167. package/dist/locale/km.min.js +1 -1
  168. package/dist/locale/km.min.js.map +1 -1
  169. package/dist/locale/km.min.mjs +1 -1
  170. package/dist/locale/km.min.mjs.map +1 -1
  171. package/dist/locale/km.mjs +1 -1
  172. package/dist/locale/ko.js +1 -1
  173. package/dist/locale/ko.min.js +1 -1
  174. package/dist/locale/ko.min.js.map +1 -1
  175. package/dist/locale/ko.min.mjs +1 -1
  176. package/dist/locale/ko.min.mjs.map +1 -1
  177. package/dist/locale/ko.mjs +1 -1
  178. package/dist/locale/ku.js +1 -1
  179. package/dist/locale/ku.min.js +1 -1
  180. package/dist/locale/ku.min.js.map +1 -1
  181. package/dist/locale/ku.min.mjs +1 -1
  182. package/dist/locale/ku.min.mjs.map +1 -1
  183. package/dist/locale/ku.mjs +1 -1
  184. package/dist/locale/ky.js +1 -1
  185. package/dist/locale/ky.min.js +1 -1
  186. package/dist/locale/ky.min.js.map +1 -1
  187. package/dist/locale/ky.min.mjs +1 -1
  188. package/dist/locale/ky.min.mjs.map +1 -1
  189. package/dist/locale/ky.mjs +1 -1
  190. package/dist/locale/lt.js +1 -1
  191. package/dist/locale/lt.min.js +1 -1
  192. package/dist/locale/lt.min.js.map +1 -1
  193. package/dist/locale/lt.min.mjs +1 -1
  194. package/dist/locale/lt.min.mjs.map +1 -1
  195. package/dist/locale/lt.mjs +1 -1
  196. package/dist/locale/lv.js +1 -1
  197. package/dist/locale/lv.min.js +1 -1
  198. package/dist/locale/lv.min.js.map +1 -1
  199. package/dist/locale/lv.min.mjs +1 -1
  200. package/dist/locale/lv.min.mjs.map +1 -1
  201. package/dist/locale/lv.mjs +1 -1
  202. package/dist/locale/mg.js +1 -1
  203. package/dist/locale/mg.min.js +1 -1
  204. package/dist/locale/mg.min.js.map +1 -1
  205. package/dist/locale/mg.min.mjs +1 -1
  206. package/dist/locale/mg.min.mjs.map +1 -1
  207. package/dist/locale/mg.mjs +1 -1
  208. package/dist/locale/mn.js +1 -1
  209. package/dist/locale/mn.min.js +1 -1
  210. package/dist/locale/mn.min.js.map +1 -1
  211. package/dist/locale/mn.min.mjs +1 -1
  212. package/dist/locale/mn.min.mjs.map +1 -1
  213. package/dist/locale/mn.mjs +1 -1
  214. package/dist/locale/nb-no.js +1 -1
  215. package/dist/locale/nb-no.min.js +1 -1
  216. package/dist/locale/nb-no.min.js.map +1 -1
  217. package/dist/locale/nb-no.min.mjs +1 -1
  218. package/dist/locale/nb-no.min.mjs.map +1 -1
  219. package/dist/locale/nb-no.mjs +1 -1
  220. package/dist/locale/nl.js +1 -1
  221. package/dist/locale/nl.min.js +1 -1
  222. package/dist/locale/nl.min.js.map +1 -1
  223. package/dist/locale/nl.min.mjs +1 -1
  224. package/dist/locale/nl.min.mjs.map +1 -1
  225. package/dist/locale/nl.mjs +1 -1
  226. package/dist/locale/pa.js +1 -1
  227. package/dist/locale/pa.min.js +1 -1
  228. package/dist/locale/pa.min.js.map +1 -1
  229. package/dist/locale/pa.min.mjs +1 -1
  230. package/dist/locale/pa.min.mjs.map +1 -1
  231. package/dist/locale/pa.mjs +1 -1
  232. package/dist/locale/pl.js +1 -1
  233. package/dist/locale/pl.min.js +1 -1
  234. package/dist/locale/pl.min.js.map +1 -1
  235. package/dist/locale/pl.min.mjs +1 -1
  236. package/dist/locale/pl.min.mjs.map +1 -1
  237. package/dist/locale/pl.mjs +1 -1
  238. package/dist/locale/pt-br.js +1 -1
  239. package/dist/locale/pt-br.min.js +1 -1
  240. package/dist/locale/pt-br.min.js.map +1 -1
  241. package/dist/locale/pt-br.min.mjs +1 -1
  242. package/dist/locale/pt-br.min.mjs.map +1 -1
  243. package/dist/locale/pt-br.mjs +1 -1
  244. package/dist/locale/pt.js +1 -1
  245. package/dist/locale/pt.min.js +1 -1
  246. package/dist/locale/pt.min.js.map +1 -1
  247. package/dist/locale/pt.min.mjs +1 -1
  248. package/dist/locale/pt.min.mjs.map +1 -1
  249. package/dist/locale/pt.mjs +1 -1
  250. package/dist/locale/ro.js +1 -1
  251. package/dist/locale/ro.min.js +1 -1
  252. package/dist/locale/ro.min.js.map +1 -1
  253. package/dist/locale/ro.min.mjs +1 -1
  254. package/dist/locale/ro.min.mjs.map +1 -1
  255. package/dist/locale/ro.mjs +1 -1
  256. package/dist/locale/ru.js +1 -1
  257. package/dist/locale/ru.min.js +1 -1
  258. package/dist/locale/ru.min.js.map +1 -1
  259. package/dist/locale/ru.min.mjs +1 -1
  260. package/dist/locale/ru.min.mjs.map +1 -1
  261. package/dist/locale/ru.mjs +1 -1
  262. package/dist/locale/sk.js +1 -1
  263. package/dist/locale/sk.min.js +1 -1
  264. package/dist/locale/sk.min.js.map +1 -1
  265. package/dist/locale/sk.min.mjs +1 -1
  266. package/dist/locale/sk.min.mjs.map +1 -1
  267. package/dist/locale/sk.mjs +1 -1
  268. package/dist/locale/sl.js +1 -1
  269. package/dist/locale/sl.min.js +1 -1
  270. package/dist/locale/sl.min.js.map +1 -1
  271. package/dist/locale/sl.min.mjs +1 -1
  272. package/dist/locale/sl.min.mjs.map +1 -1
  273. package/dist/locale/sl.mjs +1 -1
  274. package/dist/locale/sr.js +1 -1
  275. package/dist/locale/sr.min.js +1 -1
  276. package/dist/locale/sr.min.js.map +1 -1
  277. package/dist/locale/sr.min.mjs +1 -1
  278. package/dist/locale/sr.min.mjs.map +1 -1
  279. package/dist/locale/sr.mjs +1 -1
  280. package/dist/locale/sv.js +1 -1
  281. package/dist/locale/sv.min.js +1 -1
  282. package/dist/locale/sv.min.js.map +1 -1
  283. package/dist/locale/sv.min.mjs +1 -1
  284. package/dist/locale/sv.min.mjs.map +1 -1
  285. package/dist/locale/sv.mjs +1 -1
  286. package/dist/locale/ta.js +1 -1
  287. package/dist/locale/ta.min.js +1 -1
  288. package/dist/locale/ta.min.js.map +1 -1
  289. package/dist/locale/ta.min.mjs +1 -1
  290. package/dist/locale/ta.min.mjs.map +1 -1
  291. package/dist/locale/ta.mjs +1 -1
  292. package/dist/locale/th.js +1 -1
  293. package/dist/locale/th.min.js +1 -1
  294. package/dist/locale/th.min.js.map +1 -1
  295. package/dist/locale/th.min.mjs +1 -1
  296. package/dist/locale/th.min.mjs.map +1 -1
  297. package/dist/locale/th.mjs +1 -1
  298. package/dist/locale/tk.js +1 -1
  299. package/dist/locale/tk.min.js +1 -1
  300. package/dist/locale/tk.min.js.map +1 -1
  301. package/dist/locale/tk.min.mjs +1 -1
  302. package/dist/locale/tk.min.mjs.map +1 -1
  303. package/dist/locale/tk.mjs +1 -1
  304. package/dist/locale/tr.js +1 -1
  305. package/dist/locale/tr.min.js +1 -1
  306. package/dist/locale/tr.min.js.map +1 -1
  307. package/dist/locale/tr.min.mjs +1 -1
  308. package/dist/locale/tr.min.mjs.map +1 -1
  309. package/dist/locale/tr.mjs +1 -1
  310. package/dist/locale/ug-cn.js +1 -1
  311. package/dist/locale/ug-cn.min.js +1 -1
  312. package/dist/locale/ug-cn.min.js.map +1 -1
  313. package/dist/locale/ug-cn.min.mjs +1 -1
  314. package/dist/locale/ug-cn.min.mjs.map +1 -1
  315. package/dist/locale/ug-cn.mjs +1 -1
  316. package/dist/locale/uk.js +1 -1
  317. package/dist/locale/uk.min.js +1 -1
  318. package/dist/locale/uk.min.js.map +1 -1
  319. package/dist/locale/uk.min.mjs +1 -1
  320. package/dist/locale/uk.min.mjs.map +1 -1
  321. package/dist/locale/uk.mjs +1 -1
  322. package/dist/locale/uz-uz.js +1 -1
  323. package/dist/locale/uz-uz.min.js +1 -1
  324. package/dist/locale/uz-uz.min.js.map +1 -1
  325. package/dist/locale/uz-uz.min.mjs +1 -1
  326. package/dist/locale/uz-uz.min.mjs.map +1 -1
  327. package/dist/locale/uz-uz.mjs +1 -1
  328. package/dist/locale/vi.js +1 -1
  329. package/dist/locale/vi.min.js +1 -1
  330. package/dist/locale/vi.min.js.map +1 -1
  331. package/dist/locale/vi.min.mjs +1 -1
  332. package/dist/locale/vi.min.mjs.map +1 -1
  333. package/dist/locale/vi.mjs +1 -1
  334. package/dist/locale/zh-cn.js +1 -1
  335. package/dist/locale/zh-cn.min.js +1 -1
  336. package/dist/locale/zh-cn.min.js.map +1 -1
  337. package/dist/locale/zh-cn.min.mjs +1 -1
  338. package/dist/locale/zh-cn.min.mjs.map +1 -1
  339. package/dist/locale/zh-cn.mjs +1 -1
  340. package/dist/locale/zh-tw.js +1 -1
  341. package/dist/locale/zh-tw.min.js +1 -1
  342. package/dist/locale/zh-tw.min.js.map +1 -1
  343. package/dist/locale/zh-tw.min.mjs +1 -1
  344. package/dist/locale/zh-tw.min.mjs.map +1 -1
  345. package/dist/locale/zh-tw.mjs +1 -1
  346. package/es/components/alert/index.d.ts +4 -4
  347. package/es/components/alert/src/alert.d.ts +1 -1
  348. package/es/components/alert/src/alert.vue.d.ts +4 -4
  349. package/es/components/autocomplete/index.d.ts +29 -1
  350. package/es/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
  351. package/es/components/avatar/src/avatar2.mjs +1 -1
  352. package/es/components/button/index.d.ts +4 -0
  353. package/es/components/button/src/button-custom.d.ts +4 -0
  354. package/es/components/button/src/button-custom.mjs +60 -0
  355. package/es/components/button/src/button-custom.mjs.map +1 -0
  356. package/es/components/button/src/button.d.ts +1 -0
  357. package/es/components/button/src/button.mjs +1 -0
  358. package/es/components/button/src/button.mjs.map +1 -1
  359. package/es/components/button/src/button.vue.d.ts +4 -0
  360. package/es/components/button/src/button2.mjs +2 -37
  361. package/es/components/button/src/button2.mjs.map +1 -1
  362. package/es/components/calendar/index.d.ts +4 -0
  363. package/es/components/calendar/src/calendar.vue.d.ts +4 -0
  364. package/es/components/calendar/src/calendar2.mjs +1 -1
  365. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  366. package/es/components/calendar/src/date-table2.mjs +3 -2
  367. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  368. package/es/components/cascader/index.d.ts +38 -2
  369. package/es/components/cascader/src/index.vue.d.ts +19 -1
  370. package/es/components/col/src/col.d.ts +2 -0
  371. package/es/components/col/src/col.mjs.map +1 -1
  372. package/es/components/color-picker/src/index.mjs +4 -1
  373. package/es/components/color-picker/src/index.mjs.map +1 -1
  374. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +2 -1
  375. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
  376. package/es/components/descriptions/src/descriptions-cell.mjs +1 -1
  377. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  378. package/es/components/empty/src/img-empty.mjs +7 -17
  379. package/es/components/empty/src/img-empty.mjs.map +1 -1
  380. package/es/components/form/index.d.ts +4 -6
  381. package/es/components/form/src/form-item.vue.d.ts +2 -3
  382. package/es/components/form/src/form-item2.mjs +23 -23
  383. package/es/components/form/src/form-item2.mjs.map +1 -1
  384. package/es/components/form/src/form-label-wrap.mjs +6 -6
  385. package/es/components/form/src/form-label-wrap.mjs.map +1 -1
  386. package/es/components/icon/src/icon2.mjs +1 -1
  387. package/es/components/image/index.d.ts +12 -0
  388. package/es/components/image/src/image.d.ts +2 -0
  389. package/es/components/image/src/image.mjs +8 -0
  390. package/es/components/image/src/image.mjs.map +1 -1
  391. package/es/components/image/src/image.vue.d.ts +12 -0
  392. package/es/components/image/src/image2.mjs +3 -1
  393. package/es/components/image/src/image2.mjs.map +1 -1
  394. package/es/components/image-viewer/index.d.ts +4 -0
  395. package/es/components/image-viewer/src/image-viewer.d.ts +1 -0
  396. package/es/components/image-viewer/src/image-viewer.mjs +4 -0
  397. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  398. package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
  399. package/es/components/image-viewer/src/image-viewer2.mjs +1 -1
  400. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  401. package/es/components/input/index.d.ts +10 -0
  402. package/es/components/input/src/input.d.ts +2 -0
  403. package/es/components/input/src/input.mjs +6 -0
  404. package/es/components/input/src/input.mjs.map +1 -1
  405. package/es/components/input/src/input.vue.d.ts +10 -0
  406. package/es/components/input/src/input2.mjs +119 -102
  407. package/es/components/input/src/input2.mjs.map +1 -1
  408. package/es/components/input-number/index.d.ts +20 -0
  409. package/es/components/input-number/src/input-number.vue.d.ts +20 -0
  410. package/es/components/loading/src/loading.mjs +3 -1
  411. package/es/components/loading/src/loading.mjs.map +1 -1
  412. package/es/components/loading/src/service.mjs +1 -2
  413. package/es/components/loading/src/service.mjs.map +1 -1
  414. package/es/components/menu/index.d.ts +84 -0
  415. package/es/components/menu/src/menu-collapse-transition.mjs +10 -7
  416. package/es/components/menu/src/menu-collapse-transition.mjs.map +1 -1
  417. package/es/components/menu/src/menu-item-group.vue.d.ts +14 -0
  418. package/es/components/menu/src/menu-item-group2.mjs +12 -7
  419. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  420. package/es/components/menu/src/menu-item.vue.d.ts +28 -0
  421. package/es/components/menu/src/menu-item2.mjs +15 -7
  422. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  423. package/es/components/menu/src/menu.mjs +10 -6
  424. package/es/components/menu/src/menu.mjs.map +1 -1
  425. package/es/components/menu/src/sub-menu.mjs +17 -14
  426. package/es/components/menu/src/sub-menu.mjs.map +1 -1
  427. package/es/components/menu/src/utils/menu-bar.d.ts +2 -2
  428. package/es/components/menu/src/utils/menu-bar.mjs +4 -4
  429. package/es/components/menu/src/utils/menu-bar.mjs.map +1 -1
  430. package/es/components/menu/src/utils/menu-item.d.ts +2 -2
  431. package/es/components/menu/src/utils/menu-item.mjs +4 -4
  432. package/es/components/menu/src/utils/menu-item.mjs.map +1 -1
  433. package/es/components/message-box/src/index.mjs +56 -47
  434. package/es/components/message-box/src/index.mjs.map +1 -1
  435. package/es/components/message-box/src/index.vue.d.ts +17 -1
  436. package/es/components/popover/src/index.mjs +1 -0
  437. package/es/components/popover/src/index.mjs.map +1 -1
  438. package/es/components/popper/src/content.vue.d.ts +1 -1
  439. package/es/components/popper/src/content2.mjs +3 -3
  440. package/es/components/popper/src/content2.mjs.map +1 -1
  441. package/es/components/progress/src/progress2.mjs +1 -1
  442. package/es/components/progress/src/progress2.mjs.map +1 -1
  443. package/es/components/scrollbar/src/scrollbar2.mjs +3 -2
  444. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  445. package/es/components/scrollbar/src/thumb.vue.d.ts +16 -16
  446. package/es/components/scrollbar/src/util.d.ts +18 -18
  447. package/es/components/scrollbar/src/util.mjs.map +1 -1
  448. package/es/components/select/src/select.mjs +9 -21
  449. package/es/components/select/src/select.mjs.map +1 -1
  450. package/es/components/select/src/useSelect.mjs +3 -3
  451. package/es/components/select/src/useSelect.mjs.map +1 -1
  452. package/es/components/table/src/store/current.mjs +1 -0
  453. package/es/components/table/src/store/current.mjs.map +1 -1
  454. package/es/components/table/src/table/defaults.d.ts +1 -1
  455. package/es/components/table/src/table/defaults.mjs.map +1 -1
  456. package/es/components/table/src/table/style-helper.mjs +1 -4
  457. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  458. package/es/components/table/src/table-column/watcher-helper.mjs +8 -8
  459. package/es/components/table/src/table-column/watcher-helper.mjs.map +1 -1
  460. package/es/components/table-v2/index.d.ts +4 -0
  461. package/es/components/table-v2/index.mjs +4 -0
  462. package/es/components/table-v2/index.mjs.map +1 -0
  463. package/es/components/table-v2/src/cell.d.ts +11 -0
  464. package/es/components/table-v2/src/cell.mjs +22 -0
  465. package/es/components/table-v2/src/cell.mjs.map +1 -0
  466. package/es/components/table-v2/src/column.d.ts +19 -0
  467. package/es/components/table-v2/src/column.mjs +41 -0
  468. package/es/components/table-v2/src/column.mjs.map +1 -0
  469. package/es/components/table-v2/src/common.d.ts +42 -0
  470. package/es/components/table-v2/src/common.mjs +38 -0
  471. package/es/components/table-v2/src/common.mjs.map +1 -0
  472. package/es/components/table-v2/src/components/cell.d.ts +4 -0
  473. package/es/components/table-v2/src/components/cell.mjs +22 -0
  474. package/es/components/table-v2/src/components/cell.mjs.map +1 -0
  475. package/es/components/table-v2/src/components/expand-icon.d.ts +11 -0
  476. package/es/components/table-v2/src/components/expand-icon.mjs +26 -0
  477. package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -0
  478. package/es/components/table-v2/src/components/header-cell.d.ts +4 -0
  479. package/es/components/table-v2/src/components/header-cell.mjs +15 -0
  480. package/es/components/table-v2/src/components/header-cell.mjs.map +1 -0
  481. package/es/components/table-v2/src/components/header-row.d.ts +27 -0
  482. package/es/components/table-v2/src/components/header-row.mjs +40 -0
  483. package/es/components/table-v2/src/components/header-row.mjs.map +1 -0
  484. package/es/components/table-v2/src/components/header.d.ts +44 -0
  485. package/es/components/table-v2/src/components/header.mjs +96 -0
  486. package/es/components/table-v2/src/components/header.mjs.map +1 -0
  487. package/es/components/table-v2/src/components/index.d.ts +10 -0
  488. package/es/components/table-v2/src/components/index.mjs +8 -0
  489. package/es/components/table-v2/src/components/index.mjs.map +1 -0
  490. package/es/components/table-v2/src/components/row.d.ts +68 -0
  491. package/es/components/table-v2/src/components/row.mjs +204 -0
  492. package/es/components/table-v2/src/components/row.mjs.map +1 -0
  493. package/es/components/table-v2/src/components/sort-icon.d.ts +8 -0
  494. package/es/components/table-v2/src/components/sort-icon.mjs +19 -0
  495. package/es/components/table-v2/src/components/sort-icon.mjs.map +1 -0
  496. package/es/components/table-v2/src/composables/index.d.ts +5 -0
  497. package/es/components/table-v2/src/composables/index.mjs +6 -0
  498. package/es/components/table-v2/src/composables/index.mjs.map +1 -0
  499. package/es/components/table-v2/src/composables/use-columns.d.ts +20 -0
  500. package/es/components/table-v2/src/composables/use-columns.mjs +88 -0
  501. package/es/components/table-v2/src/composables/use-columns.mjs.map +1 -0
  502. package/es/components/table-v2/src/composables/use-data.d.ts +17 -0
  503. package/es/components/table-v2/src/composables/use-data.mjs +44 -0
  504. package/es/components/table-v2/src/composables/use-data.mjs.map +1 -0
  505. package/es/components/table-v2/src/composables/use-row.d.ts +32 -0
  506. package/es/components/table-v2/src/composables/use-row.mjs +123 -0
  507. package/es/components/table-v2/src/composables/use-row.mjs.map +1 -0
  508. package/es/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
  509. package/es/components/table-v2/src/composables/use-scrollbar.mjs +55 -0
  510. package/es/components/table-v2/src/composables/use-scrollbar.mjs.map +1 -0
  511. package/es/components/table-v2/src/composables/use-styles.d.ts +25 -0
  512. package/es/components/table-v2/src/composables/use-styles.mjs +87 -0
  513. package/es/components/table-v2/src/composables/use-styles.mjs.map +1 -0
  514. package/es/components/table-v2/src/composables/utils.d.ts +3 -0
  515. package/es/components/table-v2/src/composables/utils.mjs +26 -0
  516. package/es/components/table-v2/src/composables/utils.mjs.map +1 -0
  517. package/es/components/table-v2/src/constants.d.ts +17 -0
  518. package/es/components/table-v2/src/constants.mjs +23 -0
  519. package/es/components/table-v2/src/constants.mjs.map +1 -0
  520. package/es/components/table-v2/src/grid.d.ts +39 -0
  521. package/es/components/table-v2/src/grid.mjs +42 -0
  522. package/es/components/table-v2/src/grid.mjs.map +1 -0
  523. package/es/components/table-v2/src/header-cell.d.ts +7 -0
  524. package/es/components/table-v2/src/header-cell.mjs +12 -0
  525. package/es/components/table-v2/src/header-cell.mjs.map +1 -0
  526. package/es/components/table-v2/src/header-row.d.ts +8 -0
  527. package/es/components/table-v2/src/header-row.mjs +13 -0
  528. package/es/components/table-v2/src/header-row.mjs.map +1 -0
  529. package/es/components/table-v2/src/header.d.ts +13 -0
  530. package/es/components/table-v2/src/header.mjs +33 -0
  531. package/es/components/table-v2/src/header.mjs.map +1 -0
  532. package/es/components/table-v2/src/private.d.ts +1 -0
  533. package/es/components/table-v2/src/private.mjs +4 -0
  534. package/es/components/table-v2/src/private.mjs.map +1 -0
  535. package/es/components/table-v2/src/renderers/cell.d.ts +10 -0
  536. package/es/components/table-v2/src/renderers/cell.mjs +91 -0
  537. package/es/components/table-v2/src/renderers/cell.mjs.map +1 -0
  538. package/es/components/table-v2/src/renderers/empty.d.ts +7 -0
  539. package/es/components/table-v2/src/renderers/empty.mjs +15 -0
  540. package/es/components/table-v2/src/renderers/empty.mjs.map +1 -0
  541. package/es/components/table-v2/src/renderers/footer.d.ts +7 -0
  542. package/es/components/table-v2/src/renderers/footer.mjs +15 -0
  543. package/es/components/table-v2/src/renderers/footer.mjs.map +1 -0
  544. package/es/components/table-v2/src/renderers/header-cell.d.ts +10 -0
  545. package/es/components/table-v2/src/renderers/header-cell.mjs +65 -0
  546. package/es/components/table-v2/src/renderers/header-cell.mjs.map +1 -0
  547. package/es/components/table-v2/src/renderers/header.d.ts +9 -0
  548. package/es/components/table-v2/src/renderers/header.mjs +39 -0
  549. package/es/components/table-v2/src/renderers/header.mjs.map +1 -0
  550. package/es/components/table-v2/src/renderers/left-table.d.ts +8 -0
  551. package/es/components/table-v2/src/renderers/left-table.mjs +24 -0
  552. package/es/components/table-v2/src/renderers/left-table.mjs.map +1 -0
  553. package/es/components/table-v2/src/renderers/main-table.d.ts +8 -0
  554. package/es/components/table-v2/src/renderers/main-table.mjs +22 -0
  555. package/es/components/table-v2/src/renderers/main-table.mjs.map +1 -0
  556. package/es/components/table-v2/src/renderers/overlay.d.ts +3 -0
  557. package/es/components/table-v2/src/renderers/overlay.mjs +15 -0
  558. package/es/components/table-v2/src/renderers/overlay.mjs.map +1 -0
  559. package/es/components/table-v2/src/renderers/right-table.d.ts +8 -0
  560. package/es/components/table-v2/src/renderers/right-table.mjs +24 -0
  561. package/es/components/table-v2/src/renderers/right-table.mjs.map +1 -0
  562. package/es/components/table-v2/src/renderers/row.d.ts +10 -0
  563. package/es/components/table-v2/src/renderers/row.mjs +77 -0
  564. package/es/components/table-v2/src/renderers/row.mjs.map +1 -0
  565. package/es/components/table-v2/src/row.d.ts +54 -0
  566. package/es/components/table-v2/src/row.mjs +44 -0
  567. package/es/components/table-v2/src/row.mjs.map +1 -0
  568. package/es/components/table-v2/src/table-grid.d.ts +104 -0
  569. package/es/components/table-v2/src/table-grid.mjs +221 -0
  570. package/es/components/table-v2/src/table-grid.mjs.map +1 -0
  571. package/es/components/table-v2/src/table-v2.d.ts +142 -0
  572. package/es/components/table-v2/src/table-v2.mjs +250 -0
  573. package/es/components/table-v2/src/table-v2.mjs.map +1 -0
  574. package/es/components/table-v2/src/table.d.ts +91 -0
  575. package/es/components/table-v2/src/table.mjs +106 -0
  576. package/es/components/table-v2/src/table.mjs.map +1 -0
  577. package/es/components/table-v2/src/tokens.d.ts +10 -0
  578. package/es/components/table-v2/src/tokens.mjs +4 -0
  579. package/es/components/table-v2/src/tokens.mjs.map +1 -0
  580. package/es/components/table-v2/src/types.d.ts +88 -0
  581. package/es/components/table-v2/src/types.mjs +2 -0
  582. package/es/components/table-v2/src/types.mjs.map +1 -0
  583. package/es/components/table-v2/src/use-table.d.ts +49 -0
  584. package/es/components/table-v2/src/use-table.mjs +150 -0
  585. package/es/components/table-v2/src/use-table.mjs.map +1 -0
  586. package/es/components/table-v2/src/utils.d.ts +7 -0
  587. package/es/components/table-v2/src/utils.mjs +23 -0
  588. package/es/components/table-v2/src/utils.mjs.map +1 -0
  589. package/es/components/tag/index.d.ts +4 -4
  590. package/es/components/tag/src/tag.d.ts +1 -1
  591. package/es/components/tag/src/tag.vue.d.ts +4 -4
  592. package/es/components/time-select/index.d.ts +28 -0
  593. package/es/components/time-select/src/time-select.mjs +7 -3
  594. package/es/components/time-select/src/time-select.mjs.map +1 -1
  595. package/es/components/time-select/src/time-select.vue.d.ts +14 -0
  596. package/es/components/tooltip/src/content.vue.d.ts +2 -2
  597. package/es/components/tree-select/src/tree-select.mjs +1 -0
  598. package/es/components/tree-select/src/tree-select.mjs.map +1 -1
  599. package/es/components/tree-select/src/tree.mjs +16 -3
  600. package/es/components/tree-select/src/tree.mjs.map +1 -1
  601. package/es/components/tree-select/style/css.d.ts +1 -1
  602. package/es/components/tree-select/style/css.mjs +1 -1
  603. package/es/components/upload/index.d.ts +16 -12
  604. package/es/components/upload/src/upload-content.d.ts +1 -1
  605. package/es/components/upload/src/upload-content.vue.d.ts +4 -3
  606. package/es/components/upload/src/upload-content2.mjs +3 -1
  607. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  608. package/es/components/upload/src/upload-list2.mjs +5 -3
  609. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  610. package/es/components/upload/src/upload.d.ts +2 -2
  611. package/es/components/upload/src/upload.mjs +1 -1
  612. package/es/components/upload/src/upload.mjs.map +1 -1
  613. package/es/components/upload/src/upload.vue.d.ts +16 -12
  614. package/es/components/virtual-list/index.d.ts +3 -1
  615. package/es/components/virtual-list/index.mjs +1 -1
  616. package/es/components/virtual-list/src/builders/build-grid.d.ts +45 -6
  617. package/es/components/virtual-list/src/builders/build-grid.mjs +54 -13
  618. package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
  619. package/es/components/virtual-list/src/builders/build-list.d.ts +16 -2
  620. package/es/components/virtual-list/src/builders/build-list.mjs +7 -5
  621. package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
  622. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +38 -5
  623. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +35 -3
  624. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
  625. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +16 -2
  626. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +24 -3
  627. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +16 -2
  628. package/es/components/virtual-list/src/components/scrollbar.d.ts +14 -0
  629. package/es/components/virtual-list/src/components/scrollbar.mjs +27 -28
  630. package/es/components/virtual-list/src/components/scrollbar.mjs.map +1 -1
  631. package/es/components/virtual-list/src/defaults.d.ts +1 -1
  632. package/es/components/virtual-list/src/defaults.mjs +1 -1
  633. package/es/components/virtual-list/src/defaults.mjs.map +1 -1
  634. package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs +7 -2
  635. package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs.map +1 -1
  636. package/es/components/virtual-list/src/props.d.ts +14 -1
  637. package/es/components/virtual-list/src/props.mjs +19 -0
  638. package/es/components/virtual-list/src/props.mjs.map +1 -1
  639. package/es/components/virtual-list/src/types.d.ts +33 -0
  640. package/es/components/virtual-list/src/utils.d.ts +10 -5
  641. package/es/components/virtual-list/src/utils.mjs.map +1 -1
  642. package/es/constants/index.mjs +1 -1
  643. package/es/constants/size.d.ts +5 -0
  644. package/es/constants/size.mjs +6 -1
  645. package/es/constants/size.mjs.map +1 -1
  646. package/es/directives/mousewheel/index.mjs +1 -7
  647. package/es/directives/mousewheel/index.mjs.map +1 -1
  648. package/es/hooks/index.d.ts +1 -0
  649. package/es/hooks/index.mjs +1 -0
  650. package/es/hooks/index.mjs.map +1 -1
  651. package/es/hooks/use-cursor/index.d.ts +2 -0
  652. package/es/hooks/use-cursor/index.mjs +46 -0
  653. package/es/hooks/use-cursor/index.mjs.map +1 -0
  654. package/es/hooks/use-draggable/index.mjs +1 -1
  655. package/es/hooks/use-namespace/index.d.ts +1 -0
  656. package/es/hooks/use-namespace/index.mjs.map +1 -1
  657. package/es/hooks/use-popper-container/index.mjs +8 -5
  658. package/es/hooks/use-popper-container/index.mjs.map +1 -1
  659. package/es/index.mjs +2 -1
  660. package/es/index.mjs.map +1 -1
  661. package/es/utils/animation.mjs +3 -1
  662. package/es/utils/animation.mjs.map +1 -1
  663. package/es/utils/dom/index.mjs +1 -1
  664. package/es/utils/dom/style.d.ts +1 -0
  665. package/es/utils/dom/style.mjs +15 -3
  666. package/es/utils/dom/style.mjs.map +1 -1
  667. package/es/utils/index.mjs +2 -2
  668. package/es/utils/vue/index.d.ts +1 -1
  669. package/es/utils/vue/index.mjs +1 -1
  670. package/es/utils/vue/refs.mjs +1 -1
  671. package/es/utils/vue/refs.mjs.map +1 -1
  672. package/es/utils/vue/size.d.ts +1 -0
  673. package/es/utils/vue/size.mjs +9 -0
  674. package/es/utils/vue/size.mjs.map +1 -0
  675. package/es/version.d.ts +1 -1
  676. package/es/version.mjs +1 -1
  677. package/es/version.mjs.map +1 -1
  678. package/lib/components/alert/index.d.ts +4 -4
  679. package/lib/components/alert/src/alert.d.ts +1 -1
  680. package/lib/components/alert/src/alert.vue.d.ts +4 -4
  681. package/lib/components/autocomplete/index.d.ts +29 -1
  682. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
  683. package/lib/components/avatar/src/avatar2.js +1 -1
  684. package/lib/components/button/index.d.ts +4 -0
  685. package/lib/components/button/src/button-custom.d.ts +4 -0
  686. package/lib/components/button/src/button-custom.js +65 -0
  687. package/lib/components/button/src/button-custom.js.map +1 -0
  688. package/lib/components/button/src/button.d.ts +1 -0
  689. package/lib/components/button/src/button.js +1 -0
  690. package/lib/components/button/src/button.js.map +1 -1
  691. package/lib/components/button/src/button.vue.d.ts +4 -0
  692. package/lib/components/button/src/button2.js +2 -37
  693. package/lib/components/button/src/button2.js.map +1 -1
  694. package/lib/components/calendar/index.d.ts +4 -0
  695. package/lib/components/calendar/src/calendar.vue.d.ts +4 -0
  696. package/lib/components/calendar/src/calendar2.js +1 -1
  697. package/lib/components/calendar/src/calendar2.js.map +1 -1
  698. package/lib/components/calendar/src/date-table2.js +3 -2
  699. package/lib/components/calendar/src/date-table2.js.map +1 -1
  700. package/lib/components/cascader/index.d.ts +38 -2
  701. package/lib/components/cascader/src/index.vue.d.ts +19 -1
  702. package/lib/components/col/src/col.d.ts +2 -0
  703. package/lib/components/col/src/col.js.map +1 -1
  704. package/lib/components/color-picker/src/index.js +4 -1
  705. package/lib/components/color-picker/src/index.js.map +1 -1
  706. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +2 -1
  707. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
  708. package/lib/components/descriptions/src/descriptions-cell.js +1 -1
  709. package/lib/components/dropdown/src/dropdown2.js +1 -1
  710. package/lib/components/empty/src/img-empty.js +7 -17
  711. package/lib/components/empty/src/img-empty.js.map +1 -1
  712. package/lib/components/form/index.d.ts +4 -6
  713. package/lib/components/form/src/form-item.vue.d.ts +2 -3
  714. package/lib/components/form/src/form-item2.js +23 -23
  715. package/lib/components/form/src/form-item2.js.map +1 -1
  716. package/lib/components/form/src/form-label-wrap.js +6 -6
  717. package/lib/components/form/src/form-label-wrap.js.map +1 -1
  718. package/lib/components/icon/src/icon2.js +1 -1
  719. package/lib/components/image/index.d.ts +12 -0
  720. package/lib/components/image/src/image.d.ts +2 -0
  721. package/lib/components/image/src/image.js +8 -0
  722. package/lib/components/image/src/image.js.map +1 -1
  723. package/lib/components/image/src/image.vue.d.ts +12 -0
  724. package/lib/components/image/src/image2.js +3 -1
  725. package/lib/components/image/src/image2.js.map +1 -1
  726. package/lib/components/image-viewer/index.d.ts +4 -0
  727. package/lib/components/image-viewer/src/image-viewer.d.ts +1 -0
  728. package/lib/components/image-viewer/src/image-viewer.js +4 -0
  729. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  730. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
  731. package/lib/components/image-viewer/src/image-viewer2.js +1 -1
  732. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  733. package/lib/components/input/index.d.ts +10 -0
  734. package/lib/components/input/src/input.d.ts +2 -0
  735. package/lib/components/input/src/input.js +6 -0
  736. package/lib/components/input/src/input.js.map +1 -1
  737. package/lib/components/input/src/input.vue.d.ts +10 -0
  738. package/lib/components/input/src/input2.js +119 -102
  739. package/lib/components/input/src/input2.js.map +1 -1
  740. package/lib/components/input-number/index.d.ts +20 -0
  741. package/lib/components/input-number/src/input-number.vue.d.ts +20 -0
  742. package/lib/components/loading/src/loading.js +3 -1
  743. package/lib/components/loading/src/loading.js.map +1 -1
  744. package/lib/components/loading/src/service.js +1 -2
  745. package/lib/components/loading/src/service.js.map +1 -1
  746. package/lib/components/menu/index.d.ts +84 -0
  747. package/lib/components/menu/src/menu-collapse-transition.js +10 -7
  748. package/lib/components/menu/src/menu-collapse-transition.js.map +1 -1
  749. package/lib/components/menu/src/menu-item-group.vue.d.ts +14 -0
  750. package/lib/components/menu/src/menu-item-group2.js +11 -6
  751. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  752. package/lib/components/menu/src/menu-item.vue.d.ts +28 -0
  753. package/lib/components/menu/src/menu-item2.js +15 -7
  754. package/lib/components/menu/src/menu-item2.js.map +1 -1
  755. package/lib/components/menu/src/menu.js +14 -10
  756. package/lib/components/menu/src/menu.js.map +1 -1
  757. package/lib/components/menu/src/sub-menu.js +23 -20
  758. package/lib/components/menu/src/sub-menu.js.map +1 -1
  759. package/lib/components/menu/src/utils/menu-bar.d.ts +2 -2
  760. package/lib/components/menu/src/utils/menu-bar.js +4 -4
  761. package/lib/components/menu/src/utils/menu-bar.js.map +1 -1
  762. package/lib/components/menu/src/utils/menu-item.d.ts +2 -2
  763. package/lib/components/menu/src/utils/menu-item.js +4 -4
  764. package/lib/components/menu/src/utils/menu-item.js.map +1 -1
  765. package/lib/components/message-box/src/index.js +71 -62
  766. package/lib/components/message-box/src/index.js.map +1 -1
  767. package/lib/components/message-box/src/index.vue.d.ts +17 -1
  768. package/lib/components/popover/src/index.js +1 -0
  769. package/lib/components/popover/src/index.js.map +1 -1
  770. package/lib/components/popper/src/content.vue.d.ts +1 -1
  771. package/lib/components/popper/src/content2.js +3 -3
  772. package/lib/components/popper/src/content2.js.map +1 -1
  773. package/lib/components/progress/src/progress2.js +1 -1
  774. package/lib/components/progress/src/progress2.js.map +1 -1
  775. package/lib/components/scrollbar/src/scrollbar2.js +2 -1
  776. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  777. package/lib/components/scrollbar/src/thumb.vue.d.ts +16 -16
  778. package/lib/components/scrollbar/src/util.d.ts +18 -18
  779. package/lib/components/scrollbar/src/util.js.map +1 -1
  780. package/lib/components/select/src/select.js +8 -20
  781. package/lib/components/select/src/select.js.map +1 -1
  782. package/lib/components/select/src/useSelect.js +3 -3
  783. package/lib/components/select/src/useSelect.js.map +1 -1
  784. package/lib/components/table/src/store/current.js +1 -0
  785. package/lib/components/table/src/store/current.js.map +1 -1
  786. package/lib/components/table/src/table/defaults.d.ts +1 -1
  787. package/lib/components/table/src/table/defaults.js.map +1 -1
  788. package/lib/components/table/src/table/style-helper.js +1 -4
  789. package/lib/components/table/src/table/style-helper.js.map +1 -1
  790. package/lib/components/table/src/table-column/watcher-helper.js +8 -8
  791. package/lib/components/table/src/table-column/watcher-helper.js.map +1 -1
  792. package/lib/components/table-v2/index.d.ts +4 -0
  793. package/lib/components/table-v2/index.js +16 -0
  794. package/lib/components/table-v2/index.js.map +1 -0
  795. package/lib/components/table-v2/src/cell.d.ts +11 -0
  796. package/lib/components/table-v2/src/cell.js +26 -0
  797. package/lib/components/table-v2/src/cell.js.map +1 -0
  798. package/lib/components/table-v2/src/column.d.ts +19 -0
  799. package/lib/components/table-v2/src/column.js +45 -0
  800. package/lib/components/table-v2/src/column.js.map +1 -0
  801. package/lib/components/table-v2/src/common.d.ts +42 -0
  802. package/lib/components/table-v2/src/common.js +51 -0
  803. package/lib/components/table-v2/src/common.js.map +1 -0
  804. package/lib/components/table-v2/src/components/cell.d.ts +4 -0
  805. package/lib/components/table-v2/src/components/cell.js +26 -0
  806. package/lib/components/table-v2/src/components/cell.js.map +1 -0
  807. package/lib/components/table-v2/src/components/expand-icon.d.ts +11 -0
  808. package/lib/components/table-v2/src/components/expand-icon.js +30 -0
  809. package/lib/components/table-v2/src/components/expand-icon.js.map +1 -0
  810. package/lib/components/table-v2/src/components/header-cell.d.ts +4 -0
  811. package/lib/components/table-v2/src/components/header-cell.js +19 -0
  812. package/lib/components/table-v2/src/components/header-cell.js.map +1 -0
  813. package/lib/components/table-v2/src/components/header-row.d.ts +27 -0
  814. package/lib/components/table-v2/src/components/header-row.js +44 -0
  815. package/lib/components/table-v2/src/components/header-row.js.map +1 -0
  816. package/lib/components/table-v2/src/components/header.d.ts +44 -0
  817. package/lib/components/table-v2/src/components/header.js +100 -0
  818. package/lib/components/table-v2/src/components/header.js.map +1 -0
  819. package/lib/components/table-v2/src/components/index.d.ts +10 -0
  820. package/lib/components/table-v2/src/components/index.js +22 -0
  821. package/lib/components/table-v2/src/components/index.js.map +1 -0
  822. package/lib/components/table-v2/src/components/row.d.ts +68 -0
  823. package/lib/components/table-v2/src/components/row.js +208 -0
  824. package/lib/components/table-v2/src/components/row.js.map +1 -0
  825. package/lib/components/table-v2/src/components/sort-icon.d.ts +8 -0
  826. package/lib/components/table-v2/src/components/sort-icon.js +23 -0
  827. package/lib/components/table-v2/src/components/sort-icon.js.map +1 -0
  828. package/lib/components/table-v2/src/composables/index.d.ts +5 -0
  829. package/lib/components/table-v2/src/composables/index.js +18 -0
  830. package/lib/components/table-v2/src/composables/index.js.map +1 -0
  831. package/lib/components/table-v2/src/composables/use-columns.d.ts +20 -0
  832. package/lib/components/table-v2/src/composables/use-columns.js +92 -0
  833. package/lib/components/table-v2/src/composables/use-columns.js.map +1 -0
  834. package/lib/components/table-v2/src/composables/use-data.d.ts +17 -0
  835. package/lib/components/table-v2/src/composables/use-data.js +48 -0
  836. package/lib/components/table-v2/src/composables/use-data.js.map +1 -0
  837. package/lib/components/table-v2/src/composables/use-row.d.ts +32 -0
  838. package/lib/components/table-v2/src/composables/use-row.js +127 -0
  839. package/lib/components/table-v2/src/composables/use-row.js.map +1 -0
  840. package/lib/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
  841. package/lib/components/table-v2/src/composables/use-scrollbar.js +59 -0
  842. package/lib/components/table-v2/src/composables/use-scrollbar.js.map +1 -0
  843. package/lib/components/table-v2/src/composables/use-styles.d.ts +25 -0
  844. package/lib/components/table-v2/src/composables/use-styles.js +91 -0
  845. package/lib/components/table-v2/src/composables/use-styles.js.map +1 -0
  846. package/lib/components/table-v2/src/composables/utils.d.ts +3 -0
  847. package/lib/components/table-v2/src/composables/utils.js +30 -0
  848. package/lib/components/table-v2/src/composables/utils.js.map +1 -0
  849. package/lib/components/table-v2/src/constants.d.ts +17 -0
  850. package/lib/components/table-v2/src/constants.js +31 -0
  851. package/lib/components/table-v2/src/constants.js.map +1 -0
  852. package/lib/components/table-v2/src/grid.d.ts +39 -0
  853. package/lib/components/table-v2/src/grid.js +46 -0
  854. package/lib/components/table-v2/src/grid.js.map +1 -0
  855. package/lib/components/table-v2/src/header-cell.d.ts +7 -0
  856. package/lib/components/table-v2/src/header-cell.js +16 -0
  857. package/lib/components/table-v2/src/header-cell.js.map +1 -0
  858. package/lib/components/table-v2/src/header-row.d.ts +8 -0
  859. package/lib/components/table-v2/src/header-row.js +17 -0
  860. package/lib/components/table-v2/src/header-row.js.map +1 -0
  861. package/lib/components/table-v2/src/header.d.ts +13 -0
  862. package/lib/components/table-v2/src/header.js +37 -0
  863. package/lib/components/table-v2/src/header.js.map +1 -0
  864. package/lib/components/table-v2/src/private.d.ts +1 -0
  865. package/lib/components/table-v2/src/private.js +8 -0
  866. package/lib/components/table-v2/src/private.js.map +1 -0
  867. package/lib/components/table-v2/src/renderers/cell.d.ts +10 -0
  868. package/lib/components/table-v2/src/renderers/cell.js +95 -0
  869. package/lib/components/table-v2/src/renderers/cell.js.map +1 -0
  870. package/lib/components/table-v2/src/renderers/empty.d.ts +7 -0
  871. package/lib/components/table-v2/src/renderers/empty.js +19 -0
  872. package/lib/components/table-v2/src/renderers/empty.js.map +1 -0
  873. package/lib/components/table-v2/src/renderers/footer.d.ts +7 -0
  874. package/lib/components/table-v2/src/renderers/footer.js +19 -0
  875. package/lib/components/table-v2/src/renderers/footer.js.map +1 -0
  876. package/lib/components/table-v2/src/renderers/header-cell.d.ts +10 -0
  877. package/lib/components/table-v2/src/renderers/header-cell.js +69 -0
  878. package/lib/components/table-v2/src/renderers/header-cell.js.map +1 -0
  879. package/lib/components/table-v2/src/renderers/header.d.ts +9 -0
  880. package/lib/components/table-v2/src/renderers/header.js +43 -0
  881. package/lib/components/table-v2/src/renderers/header.js.map +1 -0
  882. package/lib/components/table-v2/src/renderers/left-table.d.ts +8 -0
  883. package/lib/components/table-v2/src/renderers/left-table.js +28 -0
  884. package/lib/components/table-v2/src/renderers/left-table.js.map +1 -0
  885. package/lib/components/table-v2/src/renderers/main-table.d.ts +8 -0
  886. package/lib/components/table-v2/src/renderers/main-table.js +26 -0
  887. package/lib/components/table-v2/src/renderers/main-table.js.map +1 -0
  888. package/lib/components/table-v2/src/renderers/overlay.d.ts +3 -0
  889. package/lib/components/table-v2/src/renderers/overlay.js +19 -0
  890. package/lib/components/table-v2/src/renderers/overlay.js.map +1 -0
  891. package/lib/components/table-v2/src/renderers/right-table.d.ts +8 -0
  892. package/lib/components/table-v2/src/renderers/right-table.js +28 -0
  893. package/lib/components/table-v2/src/renderers/right-table.js.map +1 -0
  894. package/lib/components/table-v2/src/renderers/row.d.ts +10 -0
  895. package/lib/components/table-v2/src/renderers/row.js +81 -0
  896. package/lib/components/table-v2/src/renderers/row.js.map +1 -0
  897. package/lib/components/table-v2/src/row.d.ts +54 -0
  898. package/lib/components/table-v2/src/row.js +48 -0
  899. package/lib/components/table-v2/src/row.js.map +1 -0
  900. package/lib/components/table-v2/src/table-grid.d.ts +104 -0
  901. package/lib/components/table-v2/src/table-grid.js +225 -0
  902. package/lib/components/table-v2/src/table-grid.js.map +1 -0
  903. package/lib/components/table-v2/src/table-v2.d.ts +142 -0
  904. package/lib/components/table-v2/src/table-v2.js +254 -0
  905. package/lib/components/table-v2/src/table-v2.js.map +1 -0
  906. package/lib/components/table-v2/src/table.d.ts +91 -0
  907. package/lib/components/table-v2/src/table.js +110 -0
  908. package/lib/components/table-v2/src/table.js.map +1 -0
  909. package/lib/components/table-v2/src/tokens.d.ts +10 -0
  910. package/lib/components/table-v2/src/tokens.js +8 -0
  911. package/lib/components/table-v2/src/tokens.js.map +1 -0
  912. package/lib/components/table-v2/src/types.d.ts +88 -0
  913. package/lib/components/table-v2/src/types.js +3 -0
  914. package/lib/components/table-v2/src/types.js.map +1 -0
  915. package/lib/components/table-v2/src/use-table.d.ts +49 -0
  916. package/lib/components/table-v2/src/use-table.js +154 -0
  917. package/lib/components/table-v2/src/use-table.js.map +1 -0
  918. package/lib/components/table-v2/src/utils.d.ts +7 -0
  919. package/lib/components/table-v2/src/utils.js +30 -0
  920. package/lib/components/table-v2/src/utils.js.map +1 -0
  921. package/lib/components/tag/index.d.ts +4 -4
  922. package/lib/components/tag/src/tag.d.ts +1 -1
  923. package/lib/components/tag/src/tag.vue.d.ts +4 -4
  924. package/lib/components/time-select/index.d.ts +28 -0
  925. package/lib/components/time-select/src/time-select.js +6 -2
  926. package/lib/components/time-select/src/time-select.js.map +1 -1
  927. package/lib/components/time-select/src/time-select.vue.d.ts +14 -0
  928. package/lib/components/tooltip/src/content.vue.d.ts +2 -2
  929. package/lib/components/tree-select/src/tree-select.js +1 -0
  930. package/lib/components/tree-select/src/tree-select.js.map +1 -1
  931. package/lib/components/tree-select/src/tree.js +16 -3
  932. package/lib/components/tree-select/src/tree.js.map +1 -1
  933. package/lib/components/tree-select/style/css.d.ts +1 -1
  934. package/lib/components/tree-select/style/css.js +1 -1
  935. package/lib/components/upload/index.d.ts +16 -12
  936. package/lib/components/upload/src/upload-content.d.ts +1 -1
  937. package/lib/components/upload/src/upload-content.vue.d.ts +4 -3
  938. package/lib/components/upload/src/upload-content2.js +3 -1
  939. package/lib/components/upload/src/upload-content2.js.map +1 -1
  940. package/lib/components/upload/src/upload-list2.js +4 -2
  941. package/lib/components/upload/src/upload-list2.js.map +1 -1
  942. package/lib/components/upload/src/upload.d.ts +2 -2
  943. package/lib/components/upload/src/upload.js +1 -1
  944. package/lib/components/upload/src/upload.js.map +1 -1
  945. package/lib/components/upload/src/upload.vue.d.ts +16 -12
  946. package/lib/components/virtual-list/index.d.ts +3 -1
  947. package/lib/components/virtual-list/index.js +1 -1
  948. package/lib/components/virtual-list/src/builders/build-grid.d.ts +45 -6
  949. package/lib/components/virtual-list/src/builders/build-grid.js +53 -12
  950. package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
  951. package/lib/components/virtual-list/src/builders/build-list.d.ts +16 -2
  952. package/lib/components/virtual-list/src/builders/build-list.js +7 -5
  953. package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
  954. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +38 -5
  955. package/lib/components/virtual-list/src/components/dynamic-size-grid.js +35 -3
  956. package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
  957. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +16 -2
  958. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +24 -3
  959. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +16 -2
  960. package/lib/components/virtual-list/src/components/scrollbar.d.ts +14 -0
  961. package/lib/components/virtual-list/src/components/scrollbar.js +26 -27
  962. package/lib/components/virtual-list/src/components/scrollbar.js.map +1 -1
  963. package/lib/components/virtual-list/src/defaults.d.ts +1 -1
  964. package/lib/components/virtual-list/src/defaults.js +1 -1
  965. package/lib/components/virtual-list/src/defaults.js.map +1 -1
  966. package/lib/components/virtual-list/src/hooks/use-grid-wheel.js +7 -2
  967. package/lib/components/virtual-list/src/hooks/use-grid-wheel.js.map +1 -1
  968. package/lib/components/virtual-list/src/props.d.ts +14 -1
  969. package/lib/components/virtual-list/src/props.js +19 -0
  970. package/lib/components/virtual-list/src/props.js.map +1 -1
  971. package/lib/components/virtual-list/src/types.d.ts +33 -0
  972. package/lib/components/virtual-list/src/utils.d.ts +10 -5
  973. package/lib/components/virtual-list/src/utils.js.map +1 -1
  974. package/lib/constants/index.js +1 -0
  975. package/lib/constants/index.js.map +1 -1
  976. package/lib/constants/size.d.ts +5 -0
  977. package/lib/constants/size.js +6 -0
  978. package/lib/constants/size.js.map +1 -1
  979. package/lib/directives/mousewheel/index.js +1 -7
  980. package/lib/directives/mousewheel/index.js.map +1 -1
  981. package/lib/hooks/index.d.ts +1 -0
  982. package/lib/hooks/index.js +2 -0
  983. package/lib/hooks/index.js.map +1 -1
  984. package/lib/hooks/use-cursor/index.d.ts +2 -0
  985. package/lib/hooks/use-cursor/index.js +50 -0
  986. package/lib/hooks/use-cursor/index.js.map +1 -0
  987. package/lib/hooks/use-draggable/index.js +1 -1
  988. package/lib/hooks/use-namespace/index.d.ts +1 -0
  989. package/lib/hooks/use-namespace/index.js.map +1 -1
  990. package/lib/hooks/use-popper-container/index.js +8 -5
  991. package/lib/hooks/use-popper-container/index.js.map +1 -1
  992. package/lib/index.js +3 -0
  993. package/lib/index.js.map +1 -1
  994. package/lib/utils/animation.js +3 -1
  995. package/lib/utils/animation.js.map +1 -1
  996. package/lib/utils/dom/index.js +1 -0
  997. package/lib/utils/dom/index.js.map +1 -1
  998. package/lib/utils/dom/style.d.ts +1 -0
  999. package/lib/utils/dom/style.js +13 -0
  1000. package/lib/utils/dom/style.js.map +1 -1
  1001. package/lib/utils/index.js +3 -2
  1002. package/lib/utils/index.js.map +1 -1
  1003. package/lib/utils/vue/index.d.ts +1 -1
  1004. package/lib/utils/vue/index.js +2 -2
  1005. package/lib/utils/vue/refs.js +1 -1
  1006. package/lib/utils/vue/refs.js.map +1 -1
  1007. package/lib/utils/vue/size.d.ts +1 -0
  1008. package/lib/utils/vue/size.js +13 -0
  1009. package/lib/utils/vue/size.js.map +1 -0
  1010. package/lib/version.d.ts +1 -1
  1011. package/lib/version.js +1 -1
  1012. package/lib/version.js.map +1 -1
  1013. package/package.json +24 -21
  1014. package/tags.json +1 -1
  1015. package/theme-chalk/base.css +1 -1
  1016. package/theme-chalk/el-alert.css +1 -1
  1017. package/theme-chalk/el-autocomplete.css +1 -1
  1018. package/theme-chalk/el-backtop.css +1 -1
  1019. package/theme-chalk/el-badge.css +1 -1
  1020. package/theme-chalk/el-button.css +1 -1
  1021. package/theme-chalk/el-calendar.css +1 -1
  1022. package/theme-chalk/el-cascader-panel.css +1 -1
  1023. package/theme-chalk/el-cascader.css +1 -1
  1024. package/theme-chalk/el-check-tag.css +1 -1
  1025. package/theme-chalk/el-checkbox-button.css +1 -1
  1026. package/theme-chalk/el-checkbox.css +1 -1
  1027. package/theme-chalk/el-color-picker.css +1 -1
  1028. package/theme-chalk/el-date-picker.css +1 -1
  1029. package/theme-chalk/el-descriptions.css +1 -1
  1030. package/theme-chalk/el-dialog.css +1 -1
  1031. package/theme-chalk/el-divider.css +1 -1
  1032. package/theme-chalk/el-drawer.css +1 -1
  1033. package/theme-chalk/el-dropdown.css +1 -1
  1034. package/theme-chalk/el-form.css +1 -1
  1035. package/theme-chalk/el-input-number.css +1 -1
  1036. package/theme-chalk/el-input.css +1 -1
  1037. package/theme-chalk/el-menu.css +1 -1
  1038. package/theme-chalk/el-message-box.css +1 -1
  1039. package/theme-chalk/el-notification.css +1 -1
  1040. package/theme-chalk/el-option-item.css +1 -1
  1041. package/theme-chalk/el-option.css +1 -1
  1042. package/theme-chalk/el-pagination.css +1 -1
  1043. package/theme-chalk/el-popper.css +1 -1
  1044. package/theme-chalk/el-radio-button.css +1 -1
  1045. package/theme-chalk/el-radio.css +1 -1
  1046. package/theme-chalk/el-result.css +1 -1
  1047. package/theme-chalk/el-select-dropdown.css +1 -1
  1048. package/theme-chalk/el-select-v2.css +1 -1
  1049. package/theme-chalk/el-select.css +1 -1
  1050. package/theme-chalk/el-step.css +1 -1
  1051. package/theme-chalk/el-table-v2.css +1 -0
  1052. package/theme-chalk/el-table.css +1 -1
  1053. package/theme-chalk/el-tabs.css +1 -1
  1054. package/theme-chalk/el-tag.css +1 -1
  1055. package/theme-chalk/el-time-picker.css +1 -1
  1056. package/theme-chalk/el-time-select.css +1 -1
  1057. package/theme-chalk/el-transfer.css +1 -1
  1058. package/theme-chalk/el-tree.css +1 -1
  1059. package/theme-chalk/el-upload.css +1 -1
  1060. package/theme-chalk/el-var.css +1 -1
  1061. package/theme-chalk/el-virtual-list.css +1 -1
  1062. package/theme-chalk/index.css +1 -1
  1063. package/theme-chalk/src/alert.scss +18 -14
  1064. package/theme-chalk/src/autocomplete.scss +9 -9
  1065. package/theme-chalk/src/badge.scss +14 -12
  1066. package/theme-chalk/src/button.scss +2 -0
  1067. package/theme-chalk/src/calendar.scss +2 -2
  1068. package/theme-chalk/src/card.scss +11 -10
  1069. package/theme-chalk/src/cascader.scss +9 -14
  1070. package/theme-chalk/src/check-tag.scss +6 -6
  1071. package/theme-chalk/src/checkbox-button.scss +1 -4
  1072. package/theme-chalk/src/checkbox.scss +1 -1
  1073. package/theme-chalk/src/color-picker.scss +74 -47
  1074. package/theme-chalk/src/common/var.scss +21 -37
  1075. package/theme-chalk/src/dark/css-vars.scss +22 -2
  1076. package/theme-chalk/src/dark/var.scss +130 -1
  1077. package/theme-chalk/src/date-picker/date-picker.scss +1 -1
  1078. package/theme-chalk/src/date-picker/month-table.scss +1 -1
  1079. package/theme-chalk/src/date-picker/picker-panel.scss +3 -3
  1080. package/theme-chalk/src/date-picker/picker.scss +16 -3
  1081. package/theme-chalk/src/date-picker/time-picker.scss +2 -2
  1082. package/theme-chalk/src/date-picker/time-spinner.scss +1 -1
  1083. package/theme-chalk/src/date-picker/year-table.scss +2 -2
  1084. package/theme-chalk/src/descriptions.scss +1 -1
  1085. package/theme-chalk/src/dialog.scss +6 -6
  1086. package/theme-chalk/src/divider.scss +1 -1
  1087. package/theme-chalk/src/drawer.scss +1 -1
  1088. package/theme-chalk/src/dropdown.scss +2 -2
  1089. package/theme-chalk/src/form.scss +4 -2
  1090. package/theme-chalk/src/index.scss +1 -0
  1091. package/theme-chalk/src/input-number.scss +9 -8
  1092. package/theme-chalk/src/input.scss +121 -173
  1093. package/theme-chalk/src/menu.scss +1 -1
  1094. package/theme-chalk/src/message-box.scss +1 -1
  1095. package/theme-chalk/src/mixins/_var.scss +15 -17
  1096. package/theme-chalk/src/mixins/mixins.scss +1 -1
  1097. package/theme-chalk/src/notification.scss +2 -2
  1098. package/theme-chalk/src/option.scss +0 -4
  1099. package/theme-chalk/src/pagination.scss +19 -16
  1100. package/theme-chalk/src/popper.scss +11 -11
  1101. package/theme-chalk/src/radio-button.scss +1 -4
  1102. package/theme-chalk/src/radio.scss +0 -1
  1103. package/theme-chalk/src/result.scss +0 -2
  1104. package/theme-chalk/src/select/common.scss +1 -1
  1105. package/theme-chalk/src/select-v2.scss +1 -1
  1106. package/theme-chalk/src/select.scss +22 -16
  1107. package/theme-chalk/src/step.scss +1 -1
  1108. package/theme-chalk/src/table-column.scss +1 -1
  1109. package/theme-chalk/src/table-v2.scss +213 -0
  1110. package/theme-chalk/src/table.scss +1 -1
  1111. package/theme-chalk/src/tabs.scss +6 -6
  1112. package/theme-chalk/src/tag.scss +24 -20
  1113. package/theme-chalk/src/transfer.scss +2 -2
  1114. package/theme-chalk/src/tree.scss +1 -1
  1115. package/theme-chalk/src/upload.scss +28 -35
  1116. package/theme-chalk/src/var.scss +32 -33
  1117. package/theme-chalk/src/virtual-list.scss +3 -0
  1118. package/web-types.json +1 -1
  1119. package/es/utils/vue/style.d.ts +0 -1
  1120. package/es/utils/vue/style.mjs +0 -19
  1121. package/es/utils/vue/style.mjs.map +0 -1
  1122. package/lib/utils/vue/style.d.ts +0 -1
  1123. package/lib/utils/vue/style.js +0 -23
  1124. package/lib/utils/vue/style.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-columns.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/use-columns.ts"],"sourcesContent":["import { computed, unref } from 'vue'\nimport { isObject } from '@element-plus/utils'\nimport { SortOrder, oppositeOrderMap } from '../constants'\nimport { placeholderSign } from '../private'\nimport { calcColumnStyle } from './utils'\n\nimport type { CSSProperties, Ref } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type { AnyColumns, Column, KeyType } from '../types'\n\nfunction useColumns(\n props: TableV2Props,\n columns: Ref<AnyColumns>,\n fixed: Ref<boolean>\n) {\n const visibleColumns = computed(() => {\n return unref(columns).filter((column) => !column.hidden)\n })\n\n const fixedColumnsOnLeft = computed(() =>\n unref(visibleColumns).filter(\n (column) => column.fixed === 'left' || column.fixed === true\n )\n )\n\n const fixedColumnsOnRight = computed(() =>\n unref(visibleColumns).filter((column) => column.fixed === 'right')\n )\n\n const normalColumns = computed(() =>\n unref(visibleColumns).filter((column) => !column.fixed)\n )\n\n const mainColumns = computed(() => {\n const ret: AnyColumns = []\n\n unref(fixedColumnsOnLeft).forEach((column) => {\n ret.push({\n ...column,\n placeholderSign,\n })\n })\n\n unref(normalColumns).forEach((column) => {\n ret.push(column)\n })\n\n unref(fixedColumnsOnRight).forEach((column) => {\n ret.push({\n ...column,\n placeholderSign,\n })\n })\n\n return ret\n })\n\n const hasFixedColumns = computed(() => {\n return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length\n })\n\n const columnsStyles = computed(() => {\n const _columns = unref(columns)\n\n return _columns.reduce<Record<Column<any>['key'], CSSProperties>>(\n (style, column) => {\n style[column.key] = calcColumnStyle(column, unref(fixed))\n return style\n },\n {}\n )\n })\n\n const columnsTotalWidth = computed(() => {\n return unref(visibleColumns).reduce(\n (width, column) => width + column.width,\n 0\n )\n })\n\n const getColumn = (key: KeyType) => {\n return unref(columns).find((column) => column.key === key)\n }\n\n const getColumnStyle = (key: KeyType) => {\n return unref(columnsStyles)[key]\n }\n\n const updateColumnWidth = (column: Column<any>, width: number) => {\n column.width = width\n }\n\n function onColumnSorted(e: MouseEvent) {\n const { key } = (e.currentTarget as HTMLElement).dataset\n if (!key) return\n const { sortState, sortBy } = props\n\n let order = SortOrder.ASC\n\n if (isObject(sortState)) {\n order = oppositeOrderMap[sortState[key]]\n } else {\n order = oppositeOrderMap[sortBy.order]\n }\n\n props.onColumnSort?.({ column: getColumn(key)!, key, order })\n }\n\n return {\n columns,\n columnsStyles,\n columnsTotalWidth,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n hasFixedColumns,\n mainColumns,\n normalColumns,\n visibleColumns,\n\n getColumn,\n getColumnStyle,\n updateColumnWidth,\n onColumnSorted,\n }\n}\n\nexport { useColumns }\nexport type UseColumnsReturn = ReturnType<typeof useColumns>\n"],"names":[],"mappings":";;;;;;;AAKA,SAAS,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;AAC3C,EAAE,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM;AACxC,IAAI,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7D,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,KAAK,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,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC;AAC5C,IAAI,IAAI,CAAC,GAAG;AACZ,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;AACxC,IAAI,IAAI,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC;AAC9B,IAAI,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC7B,MAAM,KAAK,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,KAAK,MAAM;AACX,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7C,KAAK;AACL,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,YAAY,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AACxG,GAAG;AACH,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,aAAa;AACjB,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,SAAS;AACb,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,17 @@
1
+ import type { TableV2Props } from '../table';
2
+ import type { UseRowReturn } from './use-row';
3
+ declare type UseDataProps = {
4
+ expandedRowKeys: UseRowReturn['expandedRowKeys'];
5
+ lastRenderedRowIndex: UseRowReturn['lastRenderedRowIndex'];
6
+ resetAfterIndex: UseRowReturn['resetAfterIndex'];
7
+ };
8
+ export declare const useData: (props: TableV2Props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }: UseDataProps) => {
9
+ data: import("vue").ComputedRef<any[]>;
10
+ depthMap: import("vue").Ref<{
11
+ [x: string]: number;
12
+ [x: number]: number;
13
+ [x: symbol]: number;
14
+ }>;
15
+ };
16
+ export declare type UseDataReturn = ReturnType<typeof useData>;
17
+ export {};
@@ -0,0 +1,44 @@
1
+ import { ref, computed, unref, watch } from 'vue';
2
+
3
+ const useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => {
4
+ const depthMap = ref({});
5
+ const flattenedData = computed(() => {
6
+ const depths = {};
7
+ const { data: data2, rowKey } = props;
8
+ const _expandedRowKeys = unref(expandedRowKeys);
9
+ if (!_expandedRowKeys || !_expandedRowKeys.length)
10
+ return data2;
11
+ const array = [];
12
+ const keysSet = /* @__PURE__ */ new Set();
13
+ _expandedRowKeys.forEach((x) => keysSet.add(x));
14
+ let copy = data2.slice();
15
+ copy.forEach((x) => depths[x[rowKey]] = 0);
16
+ while (copy.length > 0) {
17
+ const item = copy.shift();
18
+ array.push(item);
19
+ if (keysSet.has(item[rowKey]) && Array.isArray(item.children) && item.children.length > 0) {
20
+ copy = [...item.children, ...copy];
21
+ item.children.forEach((child) => depths[child[rowKey]] = depths[item[rowKey]] + 1);
22
+ }
23
+ }
24
+ depthMap.value = depths;
25
+ return array;
26
+ });
27
+ const data = computed(() => {
28
+ const { data: data2, expandColumnKey } = props;
29
+ return expandColumnKey ? unref(flattenedData) : data2;
30
+ });
31
+ watch(data, (val, prev) => {
32
+ if (val !== prev) {
33
+ lastRenderedRowIndex.value = -1;
34
+ resetAfterIndex(0, true);
35
+ }
36
+ });
37
+ return {
38
+ data,
39
+ depthMap
40
+ };
41
+ };
42
+
43
+ export { useData };
44
+ //# sourceMappingURL=use-data.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-data.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/use-data.ts"],"sourcesContent":["import { computed, ref, unref, watch } from 'vue'\n\nimport type { TableV2Props } from '../table'\nimport type { KeyType } from '../types'\nimport type { UseRowReturn } from './use-row'\n\ntype UseDataProps = {\n expandedRowKeys: UseRowReturn['expandedRowKeys']\n lastRenderedRowIndex: UseRowReturn['lastRenderedRowIndex']\n resetAfterIndex: UseRowReturn['resetAfterIndex']\n}\n\nexport const useData = (\n props: TableV2Props,\n { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }: UseDataProps\n) => {\n const depthMap = ref<Record<KeyType, number>>({})\n\n const flattenedData = computed(() => {\n const depths: Record<KeyType, number> = {}\n const { data, rowKey } = props\n\n const _expandedRowKeys = unref(expandedRowKeys)\n\n if (!_expandedRowKeys || !_expandedRowKeys.length) return data\n\n const array: any[] = []\n const keysSet = new Set()\n _expandedRowKeys.forEach((x) => keysSet.add(x))\n\n let copy: any[] = data.slice()\n copy.forEach((x) => (depths[x[rowKey]] = 0))\n while (copy.length > 0) {\n const item = copy.shift()!\n\n array.push(item)\n if (\n keysSet.has(item[rowKey]) &&\n Array.isArray(item.children) &&\n item.children.length > 0\n ) {\n copy = [...item.children, ...copy]\n item.children.forEach(\n (child: any) => (depths[child[rowKey]] = depths[item[rowKey]] + 1)\n )\n }\n }\n\n depthMap.value = depths\n return array\n })\n\n const data = computed(() => {\n const { data, expandColumnKey } = props\n return expandColumnKey ? unref(flattenedData) : data\n })\n\n watch(data, (val, prev) => {\n if (val !== prev) {\n lastRenderedRowIndex.value = -1\n resetAfterIndex(0, true)\n }\n })\n\n return {\n data,\n depthMap,\n }\n}\n\nexport type UseDataReturn = ReturnType<typeof useData>\n"],"names":[],"mappings":";;AACY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,KAAK;AAC9F,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3B,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;AACtB,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AC,CAAC;AAC3F,OAAO;AACP,KAAK;AACL,IAAI,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC;AAC5B,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM;AAC9B,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;AACnD,IAAI,OAAO,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;AAC1D,GAAG,CAAC,CAAC;AACL,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK;AAC7B,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;AACtB,MAAM,oBAAoB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AACtC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAC/B,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,32 @@
1
+ import type { Ref } from 'vue';
2
+ import type { TableV2Props } from '../table';
3
+ import type { RowExpandParams, RowHeightChangedParams, RowHoverParams } from '../row';
4
+ import type { FixedDirection, KeyType } from '../types';
5
+ import type { onRowRenderedParams } from '../grid';
6
+ import type { TableGridInstance } from '../table-grid';
7
+ declare type GridInstanceRef = Ref<TableGridInstance | undefined>;
8
+ declare type UseRowProps = {
9
+ mainTableRef: GridInstanceRef;
10
+ leftTableRef: GridInstanceRef;
11
+ rightTableRef: GridInstanceRef;
12
+ onMaybeEndReached: () => void;
13
+ };
14
+ export declare const useRow: (props: TableV2Props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }: UseRowProps) => {
15
+ hoveringRowKey: import("vue").ShallowRef<KeyType | null>;
16
+ expandedRowKeys: Ref<KeyType[]>;
17
+ lastRenderedRowIndex: Ref<number>;
18
+ isDynamic: import("vue").ComputedRef<boolean>;
19
+ isResetting: import("vue").ShallowRef<boolean>;
20
+ rowHeights: Ref<{
21
+ [x: string]: number;
22
+ [x: number]: number;
23
+ [x: symbol]: number;
24
+ }>;
25
+ resetAfterIndex: (index: number, forceUpdate?: boolean) => void;
26
+ onRowExpanded: ({ expanded, rowData, rowIndex, rowKey, }: RowExpandParams<any>) => void;
27
+ onRowHovered: ({ hovered, rowKey }: RowHoverParams<any>) => void;
28
+ onRowsRendered: (params: onRowRenderedParams) => void;
29
+ onRowHeightChange: ({ rowKey, height, rowIndex }: RowHeightChangedParams, fixedDir: FixedDirection) => void;
30
+ };
31
+ export declare type UseRowReturn = ReturnType<typeof useRow>;
32
+ export {};
@@ -0,0 +1,123 @@
1
+ import { getCurrentInstance, shallowRef, ref, computed, unref, watch } from 'vue';
2
+ import { debounce } from 'lodash-unified';
3
+ import '../../../../utils/index.mjs';
4
+ import { FixedDir } from '../constants.mjs';
5
+ import { isNumber } from '@vueuse/core';
6
+
7
+ const useRow = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => {
8
+ const vm = getCurrentInstance();
9
+ const { emit } = vm;
10
+ const isResetting = shallowRef(false);
11
+ const hoveringRowKey = shallowRef(null);
12
+ const expandedRowKeys = ref(props.defaultExpandedRowKeys || []);
13
+ const lastRenderedRowIndex = ref(-1);
14
+ const resetIndex = shallowRef(null);
15
+ const rowHeights = ref({});
16
+ const pendingRowHeights = ref({});
17
+ const leftTableHeights = shallowRef({});
18
+ const mainTableHeights = shallowRef({});
19
+ const rightTableHeights = shallowRef({});
20
+ const isDynamic = computed(() => isNumber(props.estimatedRowHeight));
21
+ function onRowsRendered(params) {
22
+ var _a;
23
+ (_a = props.onRowRendered) == null ? void 0 : _a.call(props, params);
24
+ if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {
25
+ lastRenderedRowIndex.value = params.rowCacheEnd;
26
+ }
27
+ }
28
+ function onRowHovered({ hovered, rowKey }) {
29
+ hoveringRowKey.value = hovered ? rowKey : null;
30
+ }
31
+ function onRowExpanded({
32
+ expanded,
33
+ rowData,
34
+ rowIndex,
35
+ rowKey
36
+ }) {
37
+ var _a, _b;
38
+ const _expandedRowKeys = [...unref(expandedRowKeys)];
39
+ const currentKeyIndex = _expandedRowKeys.indexOf(rowKey);
40
+ if (expanded) {
41
+ if (currentKeyIndex === -1)
42
+ _expandedRowKeys.push(rowKey);
43
+ } else {
44
+ if (currentKeyIndex > -1)
45
+ _expandedRowKeys.splice(currentKeyIndex, 1);
46
+ }
47
+ expandedRowKeys.value = _expandedRowKeys;
48
+ emit("update:expandedRowKeys", _expandedRowKeys);
49
+ (_a = props.onRowExpand) == null ? void 0 : _a.call(props, {
50
+ expanded,
51
+ rowData,
52
+ rowIndex,
53
+ rowKey
54
+ });
55
+ (_b = props.onExpandedRowsChange) == null ? void 0 : _b.call(props, _expandedRowKeys);
56
+ }
57
+ const flushingRowHeights = debounce(() => {
58
+ var _a, _b, _c, _d;
59
+ isResetting.value = true;
60
+ rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) };
61
+ resetAfterIndex(unref(resetIndex), false);
62
+ pendingRowHeights.value = {};
63
+ resetIndex.value = null;
64
+ (_a = mainTableRef.value) == null ? void 0 : _a.forceUpdate();
65
+ (_b = leftTableRef.value) == null ? void 0 : _b.forceUpdate();
66
+ (_c = rightTableRef.value) == null ? void 0 : _c.forceUpdate();
67
+ (_d = vm.proxy) == null ? void 0 : _d.$forceUpdate();
68
+ isResetting.value = false;
69
+ }, 0);
70
+ function resetAfterIndex(index, forceUpdate = false) {
71
+ if (!unref(isDynamic))
72
+ return;
73
+ [mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {
74
+ const table = unref(tableRef);
75
+ if (table)
76
+ table.resetAfterRowIndex(index, forceUpdate);
77
+ });
78
+ }
79
+ function resetHeights(rowKey, height, rowIdx) {
80
+ const resetIdx = unref(resetIndex);
81
+ if (resetIdx === null) {
82
+ resetIndex.value = rowIdx;
83
+ } else {
84
+ if (resetIdx > rowIdx) {
85
+ resetIndex.value = rowIdx;
86
+ }
87
+ }
88
+ pendingRowHeights.value[rowKey] = height;
89
+ }
90
+ function onRowHeightChange({ rowKey, height, rowIndex }, fixedDir) {
91
+ if (!fixedDir) {
92
+ mainTableHeights.value[rowKey] = height;
93
+ } else {
94
+ if (fixedDir === FixedDir.RIGHT) {
95
+ rightTableHeights.value[rowKey] = height;
96
+ } else {
97
+ leftTableHeights.value[rowKey] = height;
98
+ }
99
+ }
100
+ const maximumHeight = Math.max(...[leftTableHeights, rightTableHeights, mainTableHeights].map((records) => records.value[rowKey] || 0));
101
+ if (unref(rowHeights)[rowKey] !== maximumHeight) {
102
+ resetHeights(rowKey, maximumHeight, rowIndex);
103
+ flushingRowHeights();
104
+ }
105
+ }
106
+ watch(lastRenderedRowIndex, () => onMaybeEndReached());
107
+ return {
108
+ hoveringRowKey,
109
+ expandedRowKeys,
110
+ lastRenderedRowIndex,
111
+ isDynamic,
112
+ isResetting,
113
+ rowHeights,
114
+ resetAfterIndex,
115
+ onRowExpanded,
116
+ onRowHovered,
117
+ onRowsRendered,
118
+ onRowHeightChange
119
+ };
120
+ };
121
+
122
+ export { useRow };
123
+ //# sourceMappingURL=use-row.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-row.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/use-row.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n ref,\n shallowRef,\n unref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { isNumber } from '@element-plus/utils'\nimport { FixedDir } from '../constants'\n\nimport type { Ref } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type {\n RowExpandParams,\n RowHeightChangedParams,\n RowHoverParams,\n} from '../row'\nimport type { FixedDirection, KeyType } from '../types'\nimport type { onRowRenderedParams } from '../grid'\nimport type { TableGridInstance } from '../table-grid'\n\ntype Heights = Record<KeyType, number>\ntype GridInstanceRef = Ref<TableGridInstance | undefined>\n\ntype UseRowProps = {\n mainTableRef: GridInstanceRef\n leftTableRef: GridInstanceRef\n rightTableRef: GridInstanceRef\n\n onMaybeEndReached: () => void\n}\n\nexport const useRow = (\n props: TableV2Props,\n { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }: UseRowProps\n) => {\n const vm = getCurrentInstance()!\n const { emit } = vm\n const isResetting = shallowRef(false)\n const hoveringRowKey = shallowRef<KeyType | null>(null)\n const expandedRowKeys = ref<KeyType[]>(props.defaultExpandedRowKeys || [])\n const lastRenderedRowIndex = ref(-1)\n const resetIndex = shallowRef<number | null>(null)\n const rowHeights = ref<Heights>({})\n const pendingRowHeights = ref<Heights>({})\n const leftTableHeights = shallowRef<Heights>({})\n const mainTableHeights = shallowRef<Heights>({})\n const rightTableHeights = shallowRef<Heights>({})\n const isDynamic = computed(() => isNumber(props.estimatedRowHeight))\n\n function onRowsRendered(params: onRowRenderedParams) {\n props.onRowRendered?.(params)\n\n if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {\n lastRenderedRowIndex.value = params.rowCacheEnd\n }\n }\n\n function onRowHovered({ hovered, rowKey }: RowHoverParams<any>) {\n hoveringRowKey.value = hovered ? rowKey : null\n }\n\n function onRowExpanded({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n }: RowExpandParams<any>) {\n const _expandedRowKeys = [...unref(expandedRowKeys)]\n const currentKeyIndex = _expandedRowKeys.indexOf(rowKey)\n if (expanded) {\n if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey)\n } else {\n if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1)\n }\n expandedRowKeys.value = _expandedRowKeys\n\n emit('update:expandedRowKeys', _expandedRowKeys)\n props.onRowExpand?.({\n expanded,\n rowData,\n rowIndex,\n rowKey,\n })\n // If this is not controlled, then use this to notify changes\n props.onExpandedRowsChange?.(_expandedRowKeys)\n }\n\n const flushingRowHeights = debounce(() => {\n isResetting.value = true\n rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }\n resetAfterIndex(unref(resetIndex)!, false)\n pendingRowHeights.value = {}\n // force update\n resetIndex.value = null\n mainTableRef.value?.forceUpdate()\n leftTableRef.value?.forceUpdate()\n rightTableRef.value?.forceUpdate()\n vm.proxy?.$forceUpdate()\n isResetting.value = false\n }, 0)\n\n function resetAfterIndex(index: number, forceUpdate = false) {\n if (!unref(isDynamic)) return\n ;[mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {\n const table = unref(tableRef)\n if (table) table.resetAfterRowIndex(index, forceUpdate)\n })\n }\n\n function resetHeights(rowKey: KeyType, height: number, rowIdx: number) {\n const resetIdx = unref(resetIndex)\n if (resetIdx === null) {\n resetIndex.value = rowIdx\n } else {\n if (resetIdx > rowIdx) {\n resetIndex.value = rowIdx\n }\n }\n\n pendingRowHeights.value[rowKey] = height\n }\n\n function onRowHeightChange(\n { rowKey, height, rowIndex }: RowHeightChangedParams,\n fixedDir: FixedDirection\n ) {\n if (!fixedDir) {\n mainTableHeights.value[rowKey] = height\n } else {\n if (fixedDir === FixedDir.RIGHT) {\n rightTableHeights.value[rowKey] = height\n } else {\n leftTableHeights.value[rowKey] = height\n }\n }\n\n const maximumHeight = Math.max(\n ...[leftTableHeights, rightTableHeights, mainTableHeights].map(\n (records) => records.value[rowKey] || 0\n )\n )\n\n if (unref(rowHeights)[rowKey] !== maximumHeight) {\n resetHeights(rowKey, maximumHeight, rowIndex)\n flushingRowHeights()\n }\n }\n // when rendered row changes, maybe reaching the bottom\n watch(lastRenderedRowIndex, () => onMaybeEndReached())\n\n return {\n hoveringRowKey,\n expandedRowKeys,\n lastRenderedRowIndex,\n isDynamic,\n isResetting,\n rowHeights,\n\n resetAfterIndex,\n onRowExpanded,\n onRowHovered,\n onRowsRendered,\n onRowHeightChange,\n }\n}\n\nexport type UseRowReturn = ReturnType<typeof useRow>\n"],"names":[],"mappings":";;;;;;AAWY,MAAC,MAAM,GAAG,CAAC,KAAK,EA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AAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5I,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,aAAa,EAAE;AACrD,MAAM,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;AACpD,MAAM,kBAAkB,EAAE,CAAC;AAC3B,KAAK;AACL,GAAG;AACH,EAAE,KAAK,CAAC,oBAAoB,EAAE,MAAM,iBAAiB,EAAE,CAAC,CAAC;AACzD,EAAE,OAAO;AACT,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,oBAAoB;AACxB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,26 @@
1
+ import type { Ref } from 'vue';
2
+ import type { TableV2Props } from '../table';
3
+ import type { TableGridInstance } from '../table-grid';
4
+ export declare type ScrollPos = {
5
+ scrollLeft: number;
6
+ scrollTop: number;
7
+ };
8
+ declare type GridInstanceRef = Ref<TableGridInstance | undefined>;
9
+ declare type UseScrollBarProps = {
10
+ mainTableRef: GridInstanceRef;
11
+ leftTableRef: GridInstanceRef;
12
+ rightTableRef: GridInstanceRef;
13
+ onMaybeEndReached: () => void;
14
+ };
15
+ export declare const useScrollbar: (props: TableV2Props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached, }: UseScrollBarProps) => {
16
+ scrollPos: Ref<{
17
+ scrollLeft: number;
18
+ scrollTop: number;
19
+ }>;
20
+ scrollTo: (params: ScrollPos) => void;
21
+ scrollToLeft: (scrollLeft: number) => void;
22
+ scrollToTop: (scrollTop: number) => void;
23
+ onScroll: (params: ScrollPos) => void;
24
+ onVerticalScroll: ({ scrollTop }: ScrollPos) => void;
25
+ };
26
+ export {};
@@ -0,0 +1,55 @@
1
+ import { ref, unref, watch } from 'vue';
2
+
3
+ const useScrollbar = (props, {
4
+ mainTableRef,
5
+ leftTableRef,
6
+ rightTableRef,
7
+ onMaybeEndReached
8
+ }) => {
9
+ const scrollPos = ref({ scrollLeft: 0, scrollTop: 0 });
10
+ function doScroll(params) {
11
+ var _a, _b, _c;
12
+ const { scrollTop } = params;
13
+ (_a = mainTableRef.value) == null ? void 0 : _a.scrollTo(params);
14
+ (_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop);
15
+ (_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop);
16
+ }
17
+ function scrollTo(params) {
18
+ scrollPos.value = params;
19
+ doScroll(params);
20
+ }
21
+ function scrollToTop(scrollTop) {
22
+ scrollPos.value.scrollTop = scrollTop;
23
+ doScroll(unref(scrollPos));
24
+ }
25
+ function scrollToLeft(scrollLeft) {
26
+ var _a, _b;
27
+ scrollPos.value.scrollLeft = scrollLeft;
28
+ (_b = (_a = mainTableRef.value) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, unref(scrollPos));
29
+ }
30
+ function onScroll(params) {
31
+ var _a;
32
+ scrollTo(params);
33
+ (_a = props.onScroll) == null ? void 0 : _a.call(props, params);
34
+ }
35
+ function onVerticalScroll({ scrollTop }) {
36
+ const { scrollTop: currentScrollTop } = unref(scrollPos);
37
+ if (scrollTop !== currentScrollTop)
38
+ scrollToTop(scrollTop);
39
+ }
40
+ watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
41
+ if (cur > prev)
42
+ onMaybeEndReached();
43
+ });
44
+ return {
45
+ scrollPos,
46
+ scrollTo,
47
+ scrollToLeft,
48
+ scrollToTop,
49
+ onScroll,
50
+ onVerticalScroll
51
+ };
52
+ };
53
+
54
+ export { useScrollbar };
55
+ //# sourceMappingURL=use-scrollbar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scrollbar.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/use-scrollbar.ts"],"sourcesContent":["import { ref, unref, watch } from 'vue'\n\nimport type { Ref } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type { TableGridInstance } from '../table-grid'\n\nexport type ScrollPos = { scrollLeft: number; scrollTop: number }\ntype GridInstanceRef = Ref<TableGridInstance | undefined>\n\ntype UseScrollBarProps = {\n mainTableRef: GridInstanceRef\n leftTableRef: GridInstanceRef\n rightTableRef: GridInstanceRef\n\n onMaybeEndReached: () => void\n}\n\nexport const useScrollbar = (\n props: TableV2Props,\n {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n onMaybeEndReached,\n }: UseScrollBarProps\n) => {\n const scrollPos = ref<ScrollPos>({ scrollLeft: 0, scrollTop: 0 })\n\n function doScroll(params: ScrollPos) {\n const { scrollTop } = params\n\n mainTableRef.value?.scrollTo(params)\n leftTableRef.value?.scrollToTop(scrollTop)\n rightTableRef.value?.scrollToTop(scrollTop)\n }\n\n // methods\n function scrollTo(params: ScrollPos) {\n scrollPos.value = params\n\n doScroll(params)\n }\n\n function scrollToTop(scrollTop: number) {\n scrollPos.value.scrollTop = scrollTop\n\n doScroll(unref(scrollPos))\n }\n\n function scrollToLeft(scrollLeft: number) {\n scrollPos.value.scrollLeft = scrollLeft\n\n mainTableRef.value?.scrollTo?.(unref(scrollPos))\n }\n\n function onScroll(params: ScrollPos) {\n scrollTo(params)\n props.onScroll?.(params)\n }\n\n function onVerticalScroll({ scrollTop }: ScrollPos) {\n const { scrollTop: currentScrollTop } = unref(scrollPos)\n if (scrollTop !== currentScrollTop) scrollToTop(scrollTop)\n }\n\n // When scrollTop changes, maybe reaching the bottom\n watch(\n () => unref(scrollPos).scrollTop,\n (cur, prev) => {\n if (cur > prev) onMaybeEndReached()\n }\n )\n\n return {\n scrollPos,\n\n scrollTo,\n scrollToLeft,\n scrollToTop,\n onScroll,\n onVerticalScroll,\n }\n}\n"],"names":[],"mappings":";;AACY,MAAC,YA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CAAC;AAC5C,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACrH,GAAG;AACH,EAAE,SAAS,QAAQ,CAAC,MAAM,EAAE;AAC5B,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACpE,GAAG;AACH,EAAE,SAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;AAC3C,IAAI,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAC7D,IAAI,IAAI,SAAS,KAAK,gBAAgB;AACtC,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC;AAC7B,GAAG;AACH,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK;AACzD,IAAI,IAAI,GAAG,GAAG,IAAI;AAClB,MAAM,iBAAiB,EAAE,CAAC;AAC1B,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,25 @@
1
+ import type { CSSProperties } from 'vue';
2
+ import type { TableV2Props } from '../table';
3
+ import type { UseColumnsReturn } from './use-columns';
4
+ import type { UseDataReturn } from './use-data';
5
+ declare type UseStyleProps = {
6
+ columnsTotalWidth: UseColumnsReturn['columnsTotalWidth'];
7
+ data: UseDataReturn['data'];
8
+ fixedColumnsOnLeft: UseColumnsReturn['fixedColumnsOnLeft'];
9
+ fixedColumnsOnRight: UseColumnsReturn['fixedColumnsOnRight'];
10
+ };
11
+ export declare const useStyles: (props: TableV2Props, { columnsTotalWidth, data, fixedColumnsOnLeft, fixedColumnsOnRight, }: UseStyleProps) => {
12
+ bodyWidth: import("vue").ComputedRef<number>;
13
+ fixedTableHeight: import("vue").ComputedRef<number>;
14
+ mainTableHeight: import("vue").ComputedRef<number>;
15
+ leftTableWidth: import("vue").ComputedRef<number>;
16
+ rightTableWidth: import("vue").ComputedRef<number>;
17
+ headerWidth: import("vue").ComputedRef<number>;
18
+ rowsHeight: import("vue").ComputedRef<number>;
19
+ windowHeight: import("vue").ComputedRef<number>;
20
+ footerHeight: import("vue").ComputedRef<CSSProperties>;
21
+ emptyStyle: import("vue").ComputedRef<CSSProperties>;
22
+ rootStyle: import("vue").ComputedRef<CSSProperties>;
23
+ };
24
+ export declare type UseStyleReturn = ReturnType<typeof useStyles>;
25
+ export {};
@@ -0,0 +1,87 @@
1
+ import { computed, unref } from 'vue';
2
+ import '../../../../utils/index.mjs';
3
+ import { sum, enforceUnit } from '../utils.mjs';
4
+ import { isNumber } from '@vueuse/core';
5
+ import { addUnit } from '../../../../utils/dom/style.mjs';
6
+
7
+ const useStyles = (props, {
8
+ columnsTotalWidth,
9
+ data,
10
+ fixedColumnsOnLeft,
11
+ fixedColumnsOnRight
12
+ }) => {
13
+ const bodyWidth = computed(() => {
14
+ const { fixed, width, vScrollbarSize } = props;
15
+ const ret = width - vScrollbarSize;
16
+ return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
17
+ });
18
+ const headerWidth = computed(() => unref(bodyWidth) + (props.fixed ? props.vScrollbarSize : 0));
19
+ const mainTableHeight = computed(() => {
20
+ const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props;
21
+ if (maxHeight > 0) {
22
+ const _fixedRowsHeight = unref(fixedRowsHeight);
23
+ const _rowsHeight = unref(rowsHeight);
24
+ const _headerHeight = unref(headerHeight);
25
+ const total = _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
26
+ return Math.min(total, maxHeight - footerHeight2);
27
+ }
28
+ return height - footerHeight2;
29
+ });
30
+ const rowsHeight = computed(() => {
31
+ const { rowHeight, estimatedRowHeight } = props;
32
+ const _data = unref(data);
33
+ if (isNumber(estimatedRowHeight)) {
34
+ return _data.length * estimatedRowHeight;
35
+ }
36
+ return _data.length * rowHeight;
37
+ });
38
+ const fixedTableHeight = computed(() => {
39
+ const { maxHeight } = props;
40
+ const tableHeight = unref(mainTableHeight);
41
+ if (isNumber(maxHeight) && maxHeight > 0)
42
+ return tableHeight;
43
+ const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight);
44
+ return Math.min(tableHeight, totalHeight);
45
+ });
46
+ const mapColumn = (column) => column.width;
47
+ const leftTableWidth = computed(() => sum(unref(fixedColumnsOnLeft).map(mapColumn)));
48
+ const rightTableWidth = computed(() => sum(unref(fixedColumnsOnRight).map(mapColumn)));
49
+ const headerHeight = computed(() => sum(props.headerHeight));
50
+ const fixedRowsHeight = computed(() => {
51
+ var _a;
52
+ return (((_a = props.fixedData) == null ? void 0 : _a.length) || 0) * props.rowHeight;
53
+ });
54
+ const windowHeight = computed(() => {
55
+ return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight);
56
+ });
57
+ const rootStyle = computed(() => {
58
+ const { style = {}, height, width } = props;
59
+ return enforceUnit({
60
+ ...style,
61
+ height,
62
+ width
63
+ });
64
+ });
65
+ const footerHeight = computed(() => enforceUnit({ height: props.footerHeight }));
66
+ const emptyStyle = computed(() => ({
67
+ top: addUnit(unref(headerHeight)),
68
+ bottom: addUnit(props.footerHeight),
69
+ width: addUnit(props.width)
70
+ }));
71
+ return {
72
+ bodyWidth,
73
+ fixedTableHeight,
74
+ mainTableHeight,
75
+ leftTableWidth,
76
+ rightTableWidth,
77
+ headerWidth,
78
+ rowsHeight,
79
+ windowHeight,
80
+ footerHeight,
81
+ emptyStyle,
82
+ rootStyle
83
+ };
84
+ };
85
+
86
+ export { useStyles };
87
+ //# sourceMappingURL=use-styles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-styles.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/use-styles.ts"],"sourcesContent":["import { computed, unref } from 'vue'\nimport { addUnit, isNumber } from '@element-plus/utils'\nimport { enforceUnit, sum } from '../utils'\n\nimport type { CSSProperties } from 'vue'\nimport type { TableV2Props } from '../table'\nimport type { UseColumnsReturn } from './use-columns'\nimport type { UseDataReturn } from './use-data'\n\ntype UseStyleProps = {\n columnsTotalWidth: UseColumnsReturn['columnsTotalWidth']\n data: UseDataReturn['data']\n fixedColumnsOnLeft: UseColumnsReturn['fixedColumnsOnLeft']\n fixedColumnsOnRight: UseColumnsReturn['fixedColumnsOnRight']\n}\n\nexport const useStyles = (\n props: TableV2Props,\n {\n columnsTotalWidth,\n data,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n }: UseStyleProps\n) => {\n const bodyWidth = computed(() => {\n const { fixed, width, vScrollbarSize } = props\n const ret = width - vScrollbarSize\n return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret\n })\n\n const headerWidth = computed(\n () => unref(bodyWidth) + (props.fixed ? props.vScrollbarSize : 0)\n )\n\n const mainTableHeight = computed(() => {\n const { height = 0, maxHeight = 0, footerHeight, hScrollbarSize } = props\n\n if (maxHeight > 0) {\n const _fixedRowsHeight = unref(fixedRowsHeight)\n const _rowsHeight = unref(rowsHeight)\n const _headerHeight = unref(headerHeight)\n const total =\n _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize\n\n return Math.min(total, maxHeight - footerHeight)\n }\n\n return height - footerHeight\n })\n\n const rowsHeight = computed(() => {\n const { rowHeight, estimatedRowHeight } = props\n const _data = unref(data)\n if (isNumber(estimatedRowHeight)) {\n return _data.length * estimatedRowHeight\n }\n\n return _data.length * rowHeight\n })\n\n const fixedTableHeight = computed(() => {\n const { maxHeight } = props\n const tableHeight = unref(mainTableHeight)\n if (isNumber(maxHeight) && maxHeight > 0) return tableHeight\n\n const totalHeight =\n unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight)\n\n return Math.min(tableHeight, totalHeight)\n })\n\n const mapColumn = (column: TableV2Props['columns'][number]) => column.width\n\n const leftTableWidth = computed(() =>\n sum(unref(fixedColumnsOnLeft).map(mapColumn))\n )\n\n const rightTableWidth = computed(() =>\n sum(unref(fixedColumnsOnRight).map(mapColumn))\n )\n\n const headerHeight = computed(() => sum(props.headerHeight))\n\n const fixedRowsHeight = computed(() => {\n return (props.fixedData?.length || 0) * props.rowHeight\n })\n\n const windowHeight = computed(() => {\n return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight)\n })\n\n const rootStyle = computed<CSSProperties>(() => {\n const { style = {}, height, width } = props\n return enforceUnit({\n ...style,\n height,\n width,\n })\n })\n\n const footerHeight = computed(() =>\n enforceUnit({ height: props.footerHeight })\n )\n\n const emptyStyle = computed<CSSProperties>(() => ({\n top: addUnit(unref(headerHeight)),\n bottom: addUnit(props.footerHeight),\n width: addUnit(props.width),\n }))\n\n return {\n bodyWidth,\n fixedTableHeight,\n mainTableHeight,\n leftTableWidth,\n rightTableWidth,\n headerWidth,\n rowsHeight,\n windowHeight,\n footerHeight,\n emptyStyle,\n rootStyle,\n }\n}\n\nexport type UseStyleReturn = ReturnType<typeof useStyles>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE;AACjC,EAAE,iBAAiB;AACnB,EAAE,IAAI;AACN,EAAE,kBAAkB;AACpB,EAAE,mBAAmB;AACrB,CAAC,KAAK;AACN,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM;AACnC,IAAI,MAA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AI,SAAS;AACb,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from 'vue';
2
+ import type { AnyColumns } from '../types';
3
+ export declare const calcColumnStyle: (column: AnyColumns[number], fixedColumn: boolean) => CSSProperties;
@@ -0,0 +1,26 @@
1
+ const calcColumnStyle = (column, fixedColumn) => {
2
+ var _a;
3
+ const flex = {
4
+ flexGrow: 0,
5
+ flexShrink: 0
6
+ };
7
+ if (column.fixed) {
8
+ flex.flexShrink = 1;
9
+ }
10
+ const style = {
11
+ ...(_a = column.style) != null ? _a : {},
12
+ ...flex,
13
+ flexBasis: "auto",
14
+ width: column.width
15
+ };
16
+ if (!fixedColumn) {
17
+ if (column.maxWidth)
18
+ style.maxWidth = column.maxWidth;
19
+ if (column.minWidth)
20
+ style.maxWidth = column.minWidth;
21
+ }
22
+ return style;
23
+ };
24
+
25
+ export { calcColumnStyle };
26
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","sources":["../../../../../../../packages/components/table-v2/src/composables/utils.ts"],"sourcesContent":["import type { CSSProperties } from 'vue'\nimport type { AnyColumns } from '../types'\n\nexport const calcColumnStyle = (\n column: AnyColumns[number],\n fixedColumn: boolean\n): CSSProperties => {\n const flex = {\n flexGrow: 0,\n flexShrink: 0,\n }\n\n if (column.fixed) {\n flex.flexShrink = 1\n }\n\n const style = {\n ...(column.style ?? {}),\n ...flex,\n flexBasis: 'auto',\n width: column.width,\n }\n\n if (!fixedColumn) {\n if (column.maxWidth) style.maxWidth = column.maxWidth\n if (column.minWidth) style.maxWidth = column.minWidth\n }\n\n return style\n}\n"],"names":[],"mappings":"AAAY,MAAC,eAAe,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK;AACxD,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM,IAAI,GAAG;AACf,IAAI,QAAQ,EAAE,CAAC;AACf,IAAI,UAAU,EAAE,CAAC;AACjB,GAAG,CAAC;AACJ,EAAE,IAAI,MAAM,CAAC,KAAK,EAAE;AACpB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;AACxB,GAAG;AACH,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,KAAK,IAAI,GAAG,EAAE,GAAG,EAAE;AAC5C,IAAI,GAAG,IAAI;AACX,IAAI,SAAS,EAAE,MAAM;AACrB,IAAI,KAAK,EAAE,MAAM,CAAC,KAAK;AACvB,GAAG,CAAC;AACJ,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,IAAI,MAAM,CAAC,QAAQ;AACvB,MAAM,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,IAAI,IAAI,MAAM,CAAC,QAAQ;AACvB,MAAM,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -0,0 +1,17 @@
1
+ export declare enum SortOrder {
2
+ ASC = "asc",
3
+ DESC = "desc"
4
+ }
5
+ export declare enum Alignment {
6
+ CENTER = "center",
7
+ RIGHT = "right"
8
+ }
9
+ export declare enum FixedDir {
10
+ LEFT = "left",
11
+ RIGHT = "right"
12
+ }
13
+ export declare const oppositeOrderMap: {
14
+ asc: SortOrder;
15
+ desc: SortOrder;
16
+ };
17
+ export declare const sortOrders: readonly [SortOrder.ASC, SortOrder.DESC];
@@ -0,0 +1,23 @@
1
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
2
+ SortOrder2["ASC"] = "asc";
3
+ SortOrder2["DESC"] = "desc";
4
+ return SortOrder2;
5
+ })(SortOrder || {});
6
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
7
+ Alignment2["CENTER"] = "center";
8
+ Alignment2["RIGHT"] = "right";
9
+ return Alignment2;
10
+ })(Alignment || {});
11
+ var FixedDir = /* @__PURE__ */ ((FixedDir2) => {
12
+ FixedDir2["LEFT"] = "left";
13
+ FixedDir2["RIGHT"] = "right";
14
+ return FixedDir2;
15
+ })(FixedDir || {});
16
+ const oppositeOrderMap = {
17
+ ["asc" /* ASC */]: "desc" /* DESC */,
18
+ ["desc" /* DESC */]: "asc" /* ASC */
19
+ };
20
+ const sortOrders = ["asc" /* ASC */, "desc" /* DESC */];
21
+
22
+ export { Alignment, FixedDir, SortOrder, oppositeOrderMap, sortOrders };
23
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","sources":["../../../../../../packages/components/table-v2/src/constants.ts"],"sourcesContent":["export enum SortOrder {\n ASC = 'asc',\n DESC = 'desc',\n}\n\nexport enum Alignment {\n CENTER = 'center',\n RIGHT = 'right',\n}\n\nexport enum FixedDir {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport const oppositeOrderMap = {\n [SortOrder.ASC]: SortOrder.DESC,\n [SortOrder.DESC]: SortOrder.ASC,\n}\n\nexport const sortOrders = [SortOrder.ASC, SortOrder.DESC] as const\n"],"names":[],"mappings":"AAAU,IAAC,SAAS,mBAAmB,CAAC,CAAC,UAAU,KAAK;AACxD,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC5B,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC9B,EAAE,OAAO,UAAU,CAAC;AACpB,CAAC,EAAE,SAAS,IAAI,EAAE,EAAE;AACV,IAAC,SAAS,mBAAmB,CAAC,CAAC,UAAU,KAAK;AACxD,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;AAClC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAChC,EAAE,OAAO,UAAU,CAAC;AACpB,CAAC,EAAE,SAAS,IAAI,EAAE,EAAE;AACV,IAAC,QAAQ,mBAAmB,CAAC,CAAC,SAAS,KAAK;AACtD,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7B,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAC/B,EAAE,OAAO,SAAS,CAAC;AACnB,CAAC,EAAE,QAAQ,IAAI,EAAE,EAAE;AACP,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,KAAK,aAAa,MAAM;AAC3B,EAAE,CAAC,MAAM,cAAc,KAAK;AAC5B,EAAE;AACU,MAAC,UAAU,GAAG,CAAC,KAAK,YAAY,MAAM;;;;"}
@@ -0,0 +1,39 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ import type { ItemSize } from 'element-plus/es/components/virtual-list';
3
+ export declare type onRowRenderedParams = {
4
+ rowCacheStart: number;
5
+ rowCacheEnd: number;
6
+ rowVisibleStart: number;
7
+ rowVisibleEnd: number;
8
+ };
9
+ export declare const tableV2GridProps: {
10
+ readonly columns: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("./common").AnyColumn[]>, unknown, true, unknown, unknown>;
11
+ readonly data: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<any[]>, unknown, true, unknown, unknown>;
12
+ readonly fixedData: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<any[]>, unknown, unknown, unknown, unknown>;
13
+ readonly estimatedRowHeight: {
14
+ readonly default: undefined;
15
+ readonly type: import("vue").PropType<number>;
16
+ readonly required: false;
17
+ readonly validator: ((val: unknown) => boolean) | undefined;
18
+ readonly __elPropsReservedKey: true;
19
+ };
20
+ readonly width: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, unknown, true, unknown, unknown>;
21
+ readonly height: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, unknown, true, unknown, unknown>;
22
+ readonly headerWidth: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, unknown, true, unknown, unknown>;
23
+ readonly headerHeight: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<number | number[]>, 50, unknown, unknown, unknown>;
24
+ readonly bodyWidth: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, unknown, true, unknown, unknown>;
25
+ readonly rowHeight: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, unknown, true, unknown, unknown>;
26
+ readonly cache: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 2, false, never, never>;
27
+ readonly useIsScrolling: BooleanConstructor;
28
+ readonly scrollbarAlwaysOn: import("element-plus/es/utils").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
29
+ readonly scrollbarStartGap: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
30
+ readonly scrollbarEndGap: import("element-plus/es/utils").BuildPropReturn<NumberConstructor, 2, unknown, unknown, unknown>;
31
+ readonly class: StringConstructor;
32
+ readonly style: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("vue").CSSProperties>, unknown, unknown, unknown, unknown>;
33
+ readonly containerStyle: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("vue").CSSProperties>, unknown, unknown, unknown, unknown>;
34
+ readonly getRowHeight: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<ItemSize>, unknown, true, unknown, unknown>;
35
+ readonly rowKey: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<import("./types").KeyType>, "id", unknown, unknown, unknown>;
36
+ readonly onRowsRendered: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<(params: onRowRenderedParams) => void>, unknown, unknown, unknown, unknown>;
37
+ readonly onScroll: import("element-plus/es/utils").BuildPropReturn<import("element-plus/es/utils").PropWrapper<(...args: any[]) => void>, unknown, unknown, unknown, unknown>;
38
+ };
39
+ export declare type TableV2GridProps = ExtractPropTypes<typeof tableV2GridProps>;