@element-plus/nightly 0.0.20250527 → 0.0.20250528

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 (534) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.min.js +4 -4
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +4 -4
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +4 -4
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/alert/index.mjs +2 -2
  276. package/es/components/alert/src/alert.mjs +41 -108
  277. package/es/components/alert/src/alert.mjs.map +1 -1
  278. package/es/components/alert/src/alert2.mjs +108 -41
  279. package/es/components/alert/src/alert2.mjs.map +1 -1
  280. package/es/components/anchor/index.mjs +2 -2
  281. package/es/components/anchor/src/anchor.mjs +193 -42
  282. package/es/components/anchor/src/anchor.mjs.map +1 -1
  283. package/es/components/anchor/src/anchor2.mjs +42 -193
  284. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  285. package/es/components/autocomplete/index.mjs +2 -2
  286. package/es/components/autocomplete/src/autocomplete.mjs +370 -80
  287. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  288. package/es/components/autocomplete/src/autocomplete2.mjs +80 -370
  289. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  290. package/es/components/avatar/index.mjs +2 -2
  291. package/es/components/avatar/src/avatar.mjs +31 -65
  292. package/es/components/avatar/src/avatar.mjs.map +1 -1
  293. package/es/components/avatar/src/avatar2.mjs +65 -31
  294. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  295. package/es/components/backtop/index.mjs +2 -2
  296. package/es/components/backtop/src/backtop.mjs +53 -21
  297. package/es/components/backtop/src/backtop.mjs.map +1 -1
  298. package/es/components/backtop/src/backtop2.mjs +21 -53
  299. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  300. package/es/components/breadcrumb/index.mjs +2 -2
  301. package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
  302. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  303. package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
  304. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  305. package/es/components/calendar/index.mjs +2 -2
  306. package/es/components/calendar/src/calendar.mjs +134 -16
  307. package/es/components/calendar/src/calendar.mjs.map +1 -1
  308. package/es/components/calendar/src/calendar2.mjs +16 -134
  309. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  310. package/es/components/cascader-panel/src/index.mjs +2 -2
  311. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  312. package/es/components/cascader-panel/src/menu.mjs +1 -1
  313. package/es/components/cascader-panel/src/node.mjs +115 -206
  314. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  315. package/es/components/cascader-panel/src/node2.mjs +206 -115
  316. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  317. package/es/components/cascader-panel/src/store.mjs +1 -1
  318. package/es/components/checkbox/index.mjs +2 -2
  319. package/es/components/checkbox/src/checkbox-group.mjs +30 -72
  320. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  321. package/es/components/checkbox/src/checkbox-group2.mjs +72 -30
  322. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  323. package/es/components/col/index.mjs +2 -2
  324. package/es/components/col/src/col.mjs +64 -43
  325. package/es/components/col/src/col.mjs.map +1 -1
  326. package/es/components/col/src/col2.mjs +43 -64
  327. package/es/components/col/src/col2.mjs.map +1 -1
  328. package/es/components/divider/index.mjs +2 -2
  329. package/es/components/divider/src/divider.mjs +16 -34
  330. package/es/components/divider/src/divider.mjs.map +1 -1
  331. package/es/components/divider/src/divider2.mjs +34 -16
  332. package/es/components/divider/src/divider2.mjs.map +1 -1
  333. package/es/components/index.mjs +20 -20
  334. package/es/components/popconfirm/index.mjs +2 -2
  335. package/es/components/popconfirm/src/popconfirm.mjs +114 -45
  336. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  337. package/es/components/popconfirm/src/popconfirm2.mjs +45 -114
  338. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  339. package/es/components/popper/index.mjs +2 -2
  340. package/es/components/popper/src/content.mjs +94 -130
  341. package/es/components/popper/src/content.mjs.map +1 -1
  342. package/es/components/popper/src/content2.mjs +130 -94
  343. package/es/components/popper/src/content2.mjs.map +1 -1
  344. package/es/components/radio/index.mjs +2 -2
  345. package/es/components/radio/src/radio-button.mjs +65 -5
  346. package/es/components/radio/src/radio-button.mjs.map +1 -1
  347. package/es/components/radio/src/radio-button2.mjs +5 -65
  348. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  349. package/es/components/scrollbar/index.mjs +1 -1
  350. package/es/components/scrollbar/src/bar2.mjs +1 -1
  351. package/es/components/scrollbar/src/thumb.mjs +131 -11
  352. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  353. package/es/components/scrollbar/src/thumb2.mjs +11 -131
  354. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  355. package/es/components/slider/src/button.mjs +91 -19
  356. package/es/components/slider/src/button.mjs.map +1 -1
  357. package/es/components/slider/src/button2.mjs +19 -91
  358. package/es/components/slider/src/button2.mjs.map +1 -1
  359. package/es/components/slider/src/slider2.mjs +1 -1
  360. package/es/components/switch/index.mjs +2 -2
  361. package/es/components/switch/src/switch.mjs +228 -72
  362. package/es/components/switch/src/switch.mjs.map +1 -1
  363. package/es/components/switch/src/switch2.mjs +72 -228
  364. package/es/components/switch/src/switch2.mjs.map +1 -1
  365. package/es/components/tabs/index.mjs +1 -1
  366. package/es/components/tabs/src/tab-bar.mjs +95 -7
  367. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  368. package/es/components/tabs/src/tab-bar2.mjs +7 -95
  369. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  370. package/es/components/tabs/src/tab-nav.mjs +1 -1
  371. package/es/components/text/index.mjs +2 -2
  372. package/es/components/text/src/text.mjs +67 -21
  373. package/es/components/text/src/text.mjs.map +1 -1
  374. package/es/components/text/src/text2.mjs +21 -67
  375. package/es/components/text/src/text2.mjs.map +1 -1
  376. package/es/components/tooltip/src/content.mjs +1 -1
  377. package/es/components/tooltip/src/content2.mjs +1 -1
  378. package/es/components/tooltip-v2/src/content2.mjs +1 -1
  379. package/es/components/transfer/index.mjs +2 -2
  380. package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
  381. package/es/components/transfer/src/transfer-panel.mjs +1 -1
  382. package/es/components/transfer/src/transfer.mjs +68 -164
  383. package/es/components/transfer/src/transfer.mjs.map +1 -1
  384. package/es/components/transfer/src/transfer2.mjs +164 -68
  385. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  386. package/es/components/upload/index.mjs +1 -1
  387. package/es/components/upload/src/upload-content2.mjs +1 -1
  388. package/es/components/upload/src/upload-dragger.mjs +10 -56
  389. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  390. package/es/components/upload/src/upload-dragger2.mjs +56 -10
  391. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  392. package/es/components/visual-hidden/index.mjs +3 -3
  393. package/es/components/visual-hidden/src/visual-hidden.mjs +6 -35
  394. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  395. package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -6
  396. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  397. package/es/directives/click-outside/index.mjs +1 -1
  398. package/es/hooks/use-focus-controller/index.mjs +1 -1
  399. package/es/hooks/use-lockscreen/index.mjs +1 -1
  400. package/es/index.mjs +20 -20
  401. package/es/version.d.ts +1 -1
  402. package/es/version.mjs +1 -1
  403. package/es/version.mjs.map +1 -1
  404. package/lib/components/alert/index.js +2 -2
  405. package/lib/components/alert/src/alert.js +42 -107
  406. package/lib/components/alert/src/alert.js.map +1 -1
  407. package/lib/components/alert/src/alert2.js +107 -42
  408. package/lib/components/alert/src/alert2.js.map +1 -1
  409. package/lib/components/anchor/index.js +2 -2
  410. package/lib/components/anchor/src/anchor.js +192 -42
  411. package/lib/components/anchor/src/anchor.js.map +1 -1
  412. package/lib/components/anchor/src/anchor2.js +42 -192
  413. package/lib/components/anchor/src/anchor2.js.map +1 -1
  414. package/lib/components/autocomplete/index.js +2 -2
  415. package/lib/components/autocomplete/src/autocomplete.js +368 -79
  416. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  417. package/lib/components/autocomplete/src/autocomplete2.js +79 -368
  418. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  419. package/lib/components/avatar/index.js +2 -2
  420. package/lib/components/avatar/src/avatar.js +32 -65
  421. package/lib/components/avatar/src/avatar.js.map +1 -1
  422. package/lib/components/avatar/src/avatar2.js +65 -32
  423. package/lib/components/avatar/src/avatar2.js.map +1 -1
  424. package/lib/components/backtop/index.js +2 -2
  425. package/lib/components/backtop/src/backtop.js +53 -22
  426. package/lib/components/backtop/src/backtop.js.map +1 -1
  427. package/lib/components/backtop/src/backtop2.js +22 -53
  428. package/lib/components/backtop/src/backtop2.js.map +1 -1
  429. package/lib/components/breadcrumb/index.js +2 -2
  430. package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
  431. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  432. package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
  433. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  434. package/lib/components/calendar/index.js +2 -2
  435. package/lib/components/calendar/src/calendar.js +134 -17
  436. package/lib/components/calendar/src/calendar.js.map +1 -1
  437. package/lib/components/calendar/src/calendar2.js +17 -134
  438. package/lib/components/calendar/src/calendar2.js.map +1 -1
  439. package/lib/components/cascader-panel/src/index.js +2 -2
  440. package/lib/components/cascader-panel/src/index.js.map +1 -1
  441. package/lib/components/cascader-panel/src/menu.js +1 -1
  442. package/lib/components/cascader-panel/src/node.js +115 -206
  443. package/lib/components/cascader-panel/src/node.js.map +1 -1
  444. package/lib/components/cascader-panel/src/node2.js +206 -115
  445. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  446. package/lib/components/cascader-panel/src/store.js +1 -1
  447. package/lib/components/checkbox/index.js +2 -2
  448. package/lib/components/checkbox/src/checkbox-group.js +30 -71
  449. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  450. package/lib/components/checkbox/src/checkbox-group2.js +71 -30
  451. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  452. package/lib/components/col/index.js +2 -2
  453. package/lib/components/col/src/col.js +64 -43
  454. package/lib/components/col/src/col.js.map +1 -1
  455. package/lib/components/col/src/col2.js +43 -64
  456. package/lib/components/col/src/col2.js.map +1 -1
  457. package/lib/components/divider/index.js +2 -2
  458. package/lib/components/divider/src/divider.js +16 -34
  459. package/lib/components/divider/src/divider.js.map +1 -1
  460. package/lib/components/divider/src/divider2.js +34 -16
  461. package/lib/components/divider/src/divider2.js.map +1 -1
  462. package/lib/components/index.js +20 -20
  463. package/lib/components/popconfirm/index.js +2 -2
  464. package/lib/components/popconfirm/src/popconfirm.js +114 -46
  465. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  466. package/lib/components/popconfirm/src/popconfirm2.js +46 -114
  467. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  468. package/lib/components/popper/index.js +2 -2
  469. package/lib/components/popper/src/content.js +99 -130
  470. package/lib/components/popper/src/content.js.map +1 -1
  471. package/lib/components/popper/src/content2.js +130 -99
  472. package/lib/components/popper/src/content2.js.map +1 -1
  473. package/lib/components/radio/index.js +2 -2
  474. package/lib/components/radio/src/radio-button.js +65 -5
  475. package/lib/components/radio/src/radio-button.js.map +1 -1
  476. package/lib/components/radio/src/radio-button2.js +5 -65
  477. package/lib/components/radio/src/radio-button2.js.map +1 -1
  478. package/lib/components/scrollbar/index.js +1 -1
  479. package/lib/components/scrollbar/src/bar2.js +1 -1
  480. package/lib/components/scrollbar/src/thumb.js +131 -11
  481. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  482. package/lib/components/scrollbar/src/thumb2.js +11 -131
  483. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  484. package/lib/components/slider/src/button.js +91 -20
  485. package/lib/components/slider/src/button.js.map +1 -1
  486. package/lib/components/slider/src/button2.js +20 -91
  487. package/lib/components/slider/src/button2.js.map +1 -1
  488. package/lib/components/slider/src/slider2.js +1 -1
  489. package/lib/components/switch/index.js +2 -2
  490. package/lib/components/switch/src/switch.js +227 -72
  491. package/lib/components/switch/src/switch.js.map +1 -1
  492. package/lib/components/switch/src/switch2.js +72 -227
  493. package/lib/components/switch/src/switch2.js.map +1 -1
  494. package/lib/components/tabs/index.js +1 -1
  495. package/lib/components/tabs/src/tab-bar.js +95 -7
  496. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  497. package/lib/components/tabs/src/tab-bar2.js +7 -95
  498. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  499. package/lib/components/tabs/src/tab-nav.js +1 -1
  500. package/lib/components/text/index.js +2 -2
  501. package/lib/components/text/src/text.js +67 -21
  502. package/lib/components/text/src/text.js.map +1 -1
  503. package/lib/components/text/src/text2.js +21 -67
  504. package/lib/components/text/src/text2.js.map +1 -1
  505. package/lib/components/tooltip/src/content.js +1 -1
  506. package/lib/components/tooltip/src/content2.js +1 -1
  507. package/lib/components/tooltip-v2/src/content2.js +1 -1
  508. package/lib/components/transfer/index.js +2 -2
  509. package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
  510. package/lib/components/transfer/src/transfer-panel.js +1 -1
  511. package/lib/components/transfer/src/transfer.js +72 -164
  512. package/lib/components/transfer/src/transfer.js.map +1 -1
  513. package/lib/components/transfer/src/transfer2.js +164 -72
  514. package/lib/components/transfer/src/transfer2.js.map +1 -1
  515. package/lib/components/upload/index.js +1 -1
  516. package/lib/components/upload/src/upload-content2.js +1 -1
  517. package/lib/components/upload/src/upload-dragger.js +11 -56
  518. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  519. package/lib/components/upload/src/upload-dragger2.js +56 -11
  520. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  521. package/lib/components/visual-hidden/index.js +2 -2
  522. package/lib/components/visual-hidden/src/visual-hidden.js +6 -35
  523. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  524. package/lib/components/visual-hidden/src/visual-hidden2.js +35 -6
  525. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  526. package/lib/directives/click-outside/index.js +1 -1
  527. package/lib/hooks/use-focus-controller/index.js +1 -1
  528. package/lib/hooks/use-lockscreen/index.js +1 -1
  529. package/lib/index.js +20 -20
  530. package/lib/version.d.ts +1 -1
  531. package/lib/version.js +1 -1
  532. package/lib/version.js.map +1 -1
  533. package/package.json +2 -2
  534. package/web-types.json +1 -1
@@ -1,26 +1,72 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
- import { componentSizes } from '../../../constants/size.mjs';
1
+ import { defineComponent, ref, computed, onMounted, onUpdated, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot, useAttrs } from 'vue';
2
+ import { textProps } from './text2.mjs';
3
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
+ import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
5
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
6
+ import { isUndefined } from '../../../utils/types.mjs';
3
7
 
4
- const textProps = buildProps({
5
- type: {
6
- type: String,
7
- values: ["primary", "success", "info", "warning", "danger", ""],
8
- default: ""
9
- },
10
- size: {
11
- type: String,
12
- values: componentSizes,
13
- default: ""
14
- },
15
- truncated: Boolean,
16
- lineClamp: {
17
- type: [String, Number]
18
- },
19
- tag: {
20
- type: String,
21
- default: "span"
8
+ const __default__ = defineComponent({
9
+ name: "ElText"
10
+ });
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...__default__,
13
+ props: textProps,
14
+ setup(__props) {
15
+ const props = __props;
16
+ const textRef = ref();
17
+ const textSize = useFormSize();
18
+ const ns = useNamespace("text");
19
+ const textKls = computed(() => [
20
+ ns.b(),
21
+ ns.m(props.type),
22
+ ns.m(textSize.value),
23
+ ns.is("truncated", props.truncated),
24
+ ns.is("line-clamp", !isUndefined(props.lineClamp))
25
+ ]);
26
+ const bindTitle = () => {
27
+ var _a, _b, _c, _d, _e, _f, _g;
28
+ const inheritTitle = useAttrs().title;
29
+ if (inheritTitle)
30
+ return;
31
+ let shouldAddTitle = false;
32
+ const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
33
+ if (props.truncated) {
34
+ const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
35
+ const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
36
+ if (width && scrollWidth && scrollWidth > width) {
37
+ shouldAddTitle = true;
38
+ }
39
+ } else if (!isUndefined(props.lineClamp)) {
40
+ const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
41
+ const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
42
+ if (height && scrollHeight && scrollHeight > height) {
43
+ shouldAddTitle = true;
44
+ }
45
+ }
46
+ if (shouldAddTitle) {
47
+ (_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text);
48
+ } else {
49
+ (_g = textRef.value) == null ? void 0 : _g.removeAttribute("title");
50
+ }
51
+ };
52
+ onMounted(bindTitle);
53
+ onUpdated(bindTitle);
54
+ return (_ctx, _cache) => {
55
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
56
+ ref_key: "textRef",
57
+ ref: textRef,
58
+ class: normalizeClass(unref(textKls)),
59
+ style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
60
+ }, {
61
+ default: withCtx(() => [
62
+ renderSlot(_ctx.$slots, "default")
63
+ ]),
64
+ _: 3
65
+ }, 8, ["class", "style"]);
66
+ };
22
67
  }
23
68
  });
69
+ var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
24
70
 
25
- export { textProps };
71
+ export { Text as default };
26
72
  //# sourceMappingURL=text.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"textRef\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, ref, useAttrs } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\nconst textRef = ref<HTMLElement>()\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n\nconst bindTitle = () => {\n const inheritTitle = useAttrs().title\n\n if (inheritTitle) return\n let shouldAddTitle = false\n const text = textRef.value?.textContent || ''\n\n if (props.truncated) {\n const width = textRef.value?.offsetWidth\n const scrollWidth = textRef.value?.scrollWidth\n if (width && scrollWidth && scrollWidth > width) {\n shouldAddTitle = true\n }\n } else if (!isUndefined(props.lineClamp)) {\n const height = textRef.value?.offsetHeight\n const scrollHeight = textRef.value?.scrollHeight\n if (height && scrollHeight && scrollHeight > height) {\n shouldAddTitle = true\n }\n }\n\n if (shouldAddTitle) {\n textRef.value?.setAttribute('title', text)\n } else {\n textRef.value?.removeAttribute('title')\n }\n}\n\nonMounted(bindTitle)\nonUpdated(bindTitle)\n</script>\n"],"names":[],"mappings":";;;;;;;mCAkBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAA,MAAM,UAAU,GAAiB,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,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AA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAuB,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AACnD,QAAiB,MAAA,YAAA,GAAA,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AAAA,QACnB,IAAA,MAAA,IAAA,YAAA,IAAA,YAAA,GAAA,MAAA,EAAA;AAAA,UACF,cAAA,GAAA,IAAA,CAAA;AAEA,SAAA;AACE,OAAQ;AAAiC,MAC3C,IAAO,cAAA,EAAA;AACL,QAAQ,CAAA,EAAA,GAAA,OAAA,CAAA,iBAAuB,KAAO,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AAAA,OACxC,MAAA;AAAA,QACF,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,eAAA,CAAA,OAAA,CAAA,CAAA;AAEA,OAAA;AACA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,72 +1,26 @@
1
- import { defineComponent, ref, computed, useAttrs, onMounted, onUpdated, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
2
- import { textProps } from './text.mjs';
3
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
- import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
5
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
6
- import { isUndefined } from '../../../utils/types.mjs';
1
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
+ import { componentSizes } from '../../../constants/size.mjs';
7
3
 
8
- const __default__ = defineComponent({
9
- name: "ElText"
10
- });
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- ...__default__,
13
- props: textProps,
14
- setup(__props) {
15
- const props = __props;
16
- const textRef = ref();
17
- const textSize = useFormSize();
18
- const ns = useNamespace("text");
19
- const textKls = computed(() => [
20
- ns.b(),
21
- ns.m(props.type),
22
- ns.m(textSize.value),
23
- ns.is("truncated", props.truncated),
24
- ns.is("line-clamp", !isUndefined(props.lineClamp))
25
- ]);
26
- const inheritTitle = useAttrs().title;
27
- const bindTitle = () => {
28
- var _a, _b, _c, _d, _e, _f, _g;
29
- if (inheritTitle)
30
- return;
31
- let shouldAddTitle = false;
32
- const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
33
- if (props.truncated) {
34
- const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
35
- const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
36
- if (width && scrollWidth && scrollWidth > width) {
37
- shouldAddTitle = true;
38
- }
39
- } else if (!isUndefined(props.lineClamp)) {
40
- const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
41
- const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
42
- if (height && scrollHeight && scrollHeight > height) {
43
- shouldAddTitle = true;
44
- }
45
- }
46
- if (shouldAddTitle) {
47
- (_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text);
48
- } else {
49
- (_g = textRef.value) == null ? void 0 : _g.removeAttribute("title");
50
- }
51
- };
52
- onMounted(bindTitle);
53
- onUpdated(bindTitle);
54
- return (_ctx, _cache) => {
55
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
56
- ref_key: "textRef",
57
- ref: textRef,
58
- class: normalizeClass(unref(textKls)),
59
- style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
60
- }, {
61
- default: withCtx(() => [
62
- renderSlot(_ctx.$slots, "default")
63
- ]),
64
- _: 3
65
- }, 8, ["class", "style"]);
66
- };
4
+ const textProps = buildProps({
5
+ type: {
6
+ type: String,
7
+ values: ["primary", "success", "info", "warning", "danger", ""],
8
+ default: ""
9
+ },
10
+ size: {
11
+ type: String,
12
+ values: componentSizes,
13
+ default: ""
14
+ },
15
+ truncated: Boolean,
16
+ lineClamp: {
17
+ type: [String, Number]
18
+ },
19
+ tag: {
20
+ type: String,
21
+ default: "span"
67
22
  }
68
23
  });
69
- var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
70
24
 
71
- export { Text as default };
25
+ export { textProps };
72
26
  //# sourceMappingURL=text2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"textRef\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, ref, useAttrs } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\nconst textRef = ref<HTMLElement>()\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n\nconst inheritTitle = useAttrs().title\n\nconst bindTitle = () => {\n if (inheritTitle) return\n let shouldAddTitle = false\n const text = textRef.value?.textContent || ''\n if (props.truncated) {\n const width = textRef.value?.offsetWidth\n const scrollWidth = textRef.value?.scrollWidth\n if (width && scrollWidth && scrollWidth > width) {\n shouldAddTitle = true\n }\n } else if (!isUndefined(props.lineClamp)) {\n const height = textRef.value?.offsetHeight\n const scrollHeight = textRef.value?.scrollHeight\n if (height && scrollHeight && scrollHeight > height) {\n shouldAddTitle = true\n }\n }\n if (shouldAddTitle) {\n textRef.value?.setAttribute('title', text)\n } else {\n textRef.value?.removeAttribute('title')\n }\n}\n\nonMounted(bindTitle)\non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A,WAAA,GAAA,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA,CAAA;AAAA,QACnB,IAAA,KAAA,IAAA,WAAA,IAAA,WAAA,GAAA,KAAA,EAAA;AAAA,UACS,cAAa,GAAA,IAAA,CAAA;AACtB,SAAM;AACN,OAAM,MAAA,IAAA,CAAA,WAAe,gBAAe,CAAA,EAAA;AACpC,QAAI,MAAA,MAAA,GAA0B,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAuB,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AACnD,QAAiB,MAAA,YAAA,GAAA,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AAAA,QACnB,IAAA,MAAA,IAAA,YAAA,IAAA,YAAA,GAAA,MAAA,EAAA;AAAA,UACF,cAAA,GAAA,IAAA,CAAA;AACA,SAAA;AACE,OAAQ;AAAiC,MAC3C,IAAO,cAAA,EAAA;AACL,QAAQ,CAAA,EAAA,GAAA,OAAA,CAAA,iBAAuB,KAAO,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AAAA,OACxC,MAAA;AAAA,QACF,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,eAAA,CAAA,OAAA,CAAA,CAAA;AAEA,OAAA;AACA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- import { popperContentProps } from '../../popper/src/content2.mjs';
1
+ import { popperContentProps } from '../../popper/src/content.mjs';
2
2
  import { teleportProps } from '../../teleport/src/teleport.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
@@ -6,7 +6,7 @@ import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
6
6
  import { useTooltipContentProps } from './content.mjs';
7
7
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
8
  import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
9
- import ElPopperContent from '../../popper/src/content.mjs';
9
+ import ElPopperContent from '../../popper/src/content2.mjs';
10
10
  import { tryFocus } from '../../focus-trap/src/utils.mjs';
11
11
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
12
  import { composeEventHandlers } from '../../../utils/dom/event.mjs';
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, computed, unref, watch, onMounted, provide, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createVNode, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
2
2
  import { offset } from '@floating-ui/dom';
3
- import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden.mjs';
3
+ import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden2.mjs';
4
4
  import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
5
5
  import { tooltipV2ContentProps } from './content.mjs';
6
6
  import { tooltipV2CommonProps } from './common.mjs';
@@ -1,5 +1,5 @@
1
- import Transfer from './src/transfer.mjs';
2
- export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './src/transfer2.mjs';
1
+ import Transfer from './src/transfer2.mjs';
2
+ export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './src/transfer.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElTransfer = withInstall(Transfer);
@@ -1,4 +1,4 @@
1
- import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT } from '../transfer2.mjs';
1
+ import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT } from '../transfer.mjs';
2
2
 
3
3
  const useCheckedChange = (checkedState, emit) => {
4
4
  const onSourceCheckedChange = (val, movedKeys) => {
@@ -1,4 +1,4 @@
1
- import { transferProps, transferCheckedChangeFn } from './transfer2.mjs';
1
+ import { transferProps, transferCheckedChangeFn } from './transfer.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
 
4
4
  const CHECKED_CHANGE_EVENT = "checked-change";
@@ -1,169 +1,73 @@
1
- import { defineComponent, useSlots, reactive, ref, computed, watch, h, Comment, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
2
- import { ElButton } from '../../button/index.mjs';
3
- import { ElIcon } from '../../icon/index.mjs';
4
- import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue';
5
- import { transferProps, transferEmits } from './transfer2.mjs';
6
- import TransferPanel from './transfer-panel2.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useComputedData } from './composables/use-computed-data.mjs';
9
- import { useMove } from './composables/use-move.mjs';
10
- import { useCheckedChange } from './composables/use-checked-change.mjs';
11
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
12
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
13
- import { useFormItem } from '../../form/src/hooks/use-form-item.mjs';
14
- import { usePropsAlias } from './composables/use-props-alias.mjs';
15
- import { debugWarn } from '../../../utils/error.mjs';
16
- import { isEmpty, isUndefined } from '../../../utils/types.mjs';
1
+ import { isNil } from 'lodash-unified';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
+ import { mutable } from '../../../utils/typescript.mjs';
4
+ import { isArray } from '@vue/shared';
5
+ import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
17
6
 
18
- const __default__ = defineComponent({
19
- name: "ElTransfer"
20
- });
21
- const _sfc_main = /* @__PURE__ */ defineComponent({
22
- ...__default__,
23
- props: transferProps,
24
- emits: transferEmits,
25
- setup(__props, { expose, emit }) {
26
- const props = __props;
27
- const slots = useSlots();
28
- const { t } = useLocale();
29
- const ns = useNamespace("transfer");
30
- const { formItem } = useFormItem();
31
- const checkedState = reactive({
32
- leftChecked: [],
33
- rightChecked: []
34
- });
35
- const propsAlias = usePropsAlias(props);
36
- const { sourceData, targetData } = useComputedData(props);
37
- const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit);
38
- const { addToLeft, addToRight } = useMove(props, checkedState, emit);
39
- const leftPanel = ref();
40
- const rightPanel = ref();
41
- const clearQuery = (which) => {
42
- switch (which) {
43
- case "left":
44
- leftPanel.value.query = "";
45
- break;
46
- case "right":
47
- rightPanel.value.query = "";
48
- break;
49
- }
50
- };
51
- const hasButtonTexts = computed(() => props.buttonTexts.length === 2);
52
- const leftPanelTitle = computed(() => props.titles[0] || t("el.transfer.titles.0"));
53
- const rightPanelTitle = computed(() => props.titles[1] || t("el.transfer.titles.1"));
54
- const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder"));
55
- watch(() => props.modelValue, () => {
56
- var _a;
57
- if (props.validateEvent) {
58
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
59
- }
60
- });
61
- const optionRender = computed(() => (option) => {
62
- var _a;
63
- if (props.renderContent)
64
- return props.renderContent(h, option);
65
- const defaultSlotVNodes = (((_a = slots.default) == null ? void 0 : _a.call(slots, { option })) || []).filter((node) => node.type !== Comment);
66
- if (defaultSlotVNodes.length) {
67
- return defaultSlotVNodes;
68
- }
69
- return h("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
70
- });
71
- expose({
72
- clearQuery,
73
- leftPanel,
74
- rightPanel
75
- });
76
- return (_ctx, _cache) => {
77
- return openBlock(), createElementBlock("div", {
78
- class: normalizeClass(unref(ns).b())
79
- }, [
80
- createVNode(TransferPanel, {
81
- ref_key: "leftPanel",
82
- ref: leftPanel,
83
- data: unref(sourceData),
84
- "option-render": unref(optionRender),
85
- placeholder: unref(panelFilterPlaceholder),
86
- title: unref(leftPanelTitle),
87
- filterable: _ctx.filterable,
88
- format: _ctx.format,
89
- "filter-method": _ctx.filterMethod,
90
- "default-checked": _ctx.leftDefaultChecked,
91
- props: props.props,
92
- onCheckedChange: unref(onSourceCheckedChange)
93
- }, {
94
- empty: withCtx(() => [
95
- renderSlot(_ctx.$slots, "left-empty")
96
- ]),
97
- default: withCtx(() => [
98
- renderSlot(_ctx.$slots, "left-footer")
99
- ]),
100
- _: 3
101
- }, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]),
102
- createElementVNode("div", {
103
- class: normalizeClass(unref(ns).e("buttons"))
104
- }, [
105
- createVNode(unref(ElButton), {
106
- type: "primary",
107
- class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]),
108
- disabled: unref(isEmpty)(checkedState.rightChecked),
109
- onClick: unref(addToLeft)
110
- }, {
111
- default: withCtx(() => [
112
- createVNode(unref(ElIcon), null, {
113
- default: withCtx(() => [
114
- createVNode(unref(ArrowLeft))
115
- ]),
116
- _: 1
117
- }),
118
- !unref(isUndefined)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)
119
- ]),
120
- _: 1
121
- }, 8, ["class", "disabled", "onClick"]),
122
- createVNode(unref(ElButton), {
123
- type: "primary",
124
- class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]),
125
- disabled: unref(isEmpty)(checkedState.leftChecked),
126
- onClick: unref(addToRight)
127
- }, {
128
- default: withCtx(() => [
129
- !unref(isUndefined)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.buttonTexts[1]), 1)) : createCommentVNode("v-if", true),
130
- createVNode(unref(ElIcon), null, {
131
- default: withCtx(() => [
132
- createVNode(unref(ArrowRight))
133
- ]),
134
- _: 1
135
- })
136
- ]),
137
- _: 1
138
- }, 8, ["class", "disabled", "onClick"])
139
- ], 2),
140
- createVNode(TransferPanel, {
141
- ref_key: "rightPanel",
142
- ref: rightPanel,
143
- data: unref(targetData),
144
- "option-render": unref(optionRender),
145
- placeholder: unref(panelFilterPlaceholder),
146
- filterable: _ctx.filterable,
147
- format: _ctx.format,
148
- "filter-method": _ctx.filterMethod,
149
- title: unref(rightPanelTitle),
150
- "default-checked": _ctx.rightDefaultChecked,
151
- props: props.props,
152
- onCheckedChange: unref(onTargetCheckedChange)
153
- }, {
154
- empty: withCtx(() => [
155
- renderSlot(_ctx.$slots, "right-empty")
156
- ]),
157
- default: withCtx(() => [
158
- renderSlot(_ctx.$slots, "right-footer")
159
- ]),
160
- _: 3
161
- }, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"])
162
- ], 2);
163
- };
7
+ const LEFT_CHECK_CHANGE_EVENT = "left-check-change";
8
+ const RIGHT_CHECK_CHANGE_EVENT = "right-check-change";
9
+ const transferProps = buildProps({
10
+ data: {
11
+ type: definePropType(Array),
12
+ default: () => []
13
+ },
14
+ titles: {
15
+ type: definePropType(Array),
16
+ default: () => []
17
+ },
18
+ buttonTexts: {
19
+ type: definePropType(Array),
20
+ default: () => []
21
+ },
22
+ filterPlaceholder: String,
23
+ filterMethod: {
24
+ type: definePropType(Function)
25
+ },
26
+ leftDefaultChecked: {
27
+ type: definePropType(Array),
28
+ default: () => []
29
+ },
30
+ rightDefaultChecked: {
31
+ type: definePropType(Array),
32
+ default: () => []
33
+ },
34
+ renderContent: {
35
+ type: definePropType(Function)
36
+ },
37
+ modelValue: {
38
+ type: definePropType(Array),
39
+ default: () => []
40
+ },
41
+ format: {
42
+ type: definePropType(Object),
43
+ default: () => ({})
44
+ },
45
+ filterable: Boolean,
46
+ props: {
47
+ type: definePropType(Object),
48
+ default: () => mutable({
49
+ label: "label",
50
+ key: "key",
51
+ disabled: "disabled"
52
+ })
53
+ },
54
+ targetOrder: {
55
+ type: String,
56
+ values: ["original", "push", "unshift"],
57
+ default: "original"
58
+ },
59
+ validateEvent: {
60
+ type: Boolean,
61
+ default: true
164
62
  }
165
63
  });
166
- var Transfer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "transfer.vue"]]);
64
+ const transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray) || isArray(value) && isNil(movedKeys);
65
+ const transferEmits = {
66
+ [CHANGE_EVENT]: (value, direction, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction),
67
+ [UPDATE_MODEL_EVENT]: (value) => isArray(value),
68
+ [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
69
+ [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
70
+ };
167
71
 
168
- export { Transfer as default };
72
+ export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps };
169
73
  //# sourceMappingURL=transfer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transfer.mjs","sources":["../../../../../../packages/components/transfer/src/transfer.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <transfer-panel\n ref=\"leftPanel\"\n :data=\"sourceData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :title=\"leftPanelTitle\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :default-checked=\"leftDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onSourceCheckedChange\"\n >\n <template #empty>\n <slot name=\"left-empty\" />\n </template>\n <slot name=\"left-footer\" />\n </transfer-panel>\n <div :class=\"ns.e('buttons')\">\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.rightChecked)\"\n @click=\"addToLeft\"\n >\n <el-icon><arrow-left /></el-icon>\n <span v-if=\"!isUndefined(buttonTexts[0])\">{{ buttonTexts[0] }}</span>\n </el-button>\n <el-button\n type=\"primary\"\n :class=\"[ns.e('button'), ns.is('with-texts', hasButtonTexts)]\"\n :disabled=\"isEmpty(checkedState.leftChecked)\"\n @click=\"addToRight\"\n >\n <span v-if=\"!isUndefined(buttonTexts[1])\">{{ buttonTexts[1] }}</span>\n <el-icon><arrow-right /></el-icon>\n </el-button>\n </div>\n <transfer-panel\n ref=\"rightPanel\"\n :data=\"targetData\"\n :option-render=\"optionRender\"\n :placeholder=\"panelFilterPlaceholder\"\n :filterable=\"filterable\"\n :format=\"format\"\n :filter-method=\"filterMethod\"\n :title=\"rightPanelTitle\"\n :default-checked=\"rightDefaultChecked\"\n :props=\"props.props\"\n @checked-change=\"onTargetCheckedChange\"\n >\n <template #empty>\n <slot name=\"right-empty\" />\n </template>\n <slot name=\"right-footer\" />\n </transfer-panel>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Comment, computed, h, reactive, ref, useSlots, watch } from 'vue'\nimport { debugWarn, isEmpty, isUndefined } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useFormItem } from '@element-plus/components/form'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { transferEmits, transferProps } from './transfer'\nimport {\n useCheckedChange,\n useComputedData,\n useMove,\n usePropsAlias,\n} from './composables'\nimport TransferPanel from './transfer-panel.vue'\n\nimport type {\n TransferCheckedState,\n TransferDataItem,\n TransferDirection,\n} from './transfer'\nimport type { TransferPanelInstance } from './transfer-panel'\n\ndefineOptions({\n name: 'ElTransfer',\n})\n\nconst props = defineProps(transferProps)\nconst emit = defineEmits(transferEmits)\nconst slots = useSlots()\n\nconst { t } = useLocale()\nconst ns = useNamespace('transfer')\nconst { formItem } = useFormItem()\n\nconst checkedState = reactive<TransferCheckedState>({\n leftChecked: [],\n rightChecked: [],\n})\n\nconst propsAlias = usePropsAlias(props)\n\nconst { sourceData, targetData } = useComputedData(props)\n\nconst { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(\n checkedState,\n emit\n)\n\nconst { addToLeft, addToRight } = useMove(props, checkedState, emit)\n\nconst leftPanel = ref<TransferPanelInstance>()\nconst rightPanel = ref<TransferPanelInstance>()\n\nconst clearQuery = (which: TransferDirection) => {\n switch (which) {\n case 'left':\n leftPanel.value!.query = ''\n break\n case 'right':\n rightPanel.value!.query = ''\n break\n }\n}\n\nconst hasButtonTexts = computed(() => props.buttonTexts.length === 2)\n\nconst leftPanelTitle = computed(\n () => props.titles[0] || t('el.transfer.titles.0')\n)\n\nconst rightPanelTitle = computed(\n () => props.titles[1] || t('el.transfer.titles.1')\n)\n\nconst panelFilterPlaceholder = computed(\n () => props.filterPlaceholder || t('el.transfer.filterPlaceholder')\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n }\n)\n\nconst optionRender = computed(() => (option: TransferDataItem) => {\n if (props.renderContent) return props.renderContent(h, option)\n\n const defaultSlotVNodes = (slots.default?.({ option }) || []).filter(\n (node) => node.type !== Comment\n )\n if (defaultSlotVNodes.length) {\n return defaultSlotVNodes\n }\n\n return h(\n 'span',\n option[propsAlias.value.label] || option[propsAlias.value.key]\n )\n})\n\ndefineExpose({\n /** @description clear the filter keyword of a certain panel */\n clearQuery,\n /** @description left panel ref */\n leftPanel,\n /** @description right panel ref */\n rightPanel,\n})\n</script>\n"],"names":["_normalizeClass","_unref","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;mCAqFc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,EAAE,QAAS,EAAA,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;AAAA,IACF,MAAA,CAAA;AAEA,MAAA,UAAqB;AACnB,MAAA;AAEA,MAAM,UAAA;AAAwD,KAC5D,CAAA,CAAA;AAAwB,IAC1B,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AACA,MAAA,sCAA8B,CAAA,KAAA,EAAA;AAC5B,QAAO,KAAA,EAAAA,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA;AAAA,OACT,EAAA;AAEA,QAAOC,WAAA,CAAA,aAAA,EAAA;AAAA,UACL,OAAA,EAAA,WAAA;AAAA,UACA,GAAA,EAAO;AAAsD,UAC/D,IAAA,EAAAD,KAAA,CAAA,UAAA,CAAA;AAAA,UACD,eAAA,EAAAA,KAAA,CAAA,YAAA,CAAA;AAED,UAAa,WAAA,EAAAA,KAAA,CAAA,sBAAA,CAAA;AAAA,UAAA,KAAA,EAAAA,KAAA,CAAA,cAAA,CAAA;AAAA,UAEX,UAAA,EAAA,IAAA,CAAA,UAAA;AAAA,UAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,UAEA,eAAA,EAAA,IAAA,CAAA,YAAA;AAAA,UAAA,iBAAA,EAAA,IAAA,CAAA,kBAAA;AAAA,UAEA,KAAA,EAAA,KAAA,CAAA,KAAA;AAAA,UACD,eAAA,EAAAA,KAAA,CAAA,qBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"transfer.mjs","sources":["../../../../../../packages/components/transfer/src/transfer.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport {\n buildProps,\n definePropType,\n isArray,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, h as H, VNode } from 'vue'\nimport type Transfer from './transfer.vue'\n\nexport type TransferKey = string | number\nexport type TransferDirection = 'left' | 'right'\n\nexport type TransferDataItem = Record<string, any>\n\nexport type renderContent = (\n h: typeof H,\n option: TransferDataItem\n) => VNode | VNode[]\n\nexport interface TransferFormat {\n noChecked?: string\n hasChecked?: string\n}\n\nexport interface TransferPropsAlias {\n label?: string\n key?: string\n disabled?: string\n}\n\nexport interface TransferCheckedState {\n leftChecked: TransferKey[]\n rightChecked: TransferKey[]\n}\n\nexport const LEFT_CHECK_CHANGE_EVENT = 'left-check-change'\nexport const RIGHT_CHECK_CHANGE_EVENT = 'right-check-change'\n\nexport const transferProps = buildProps({\n /**\n * @description data source\n */\n data: {\n type: definePropType<TransferDataItem[]>(Array),\n default: () => [],\n },\n /**\n * @description custom list titles\n */\n titles: {\n type: definePropType<[string, string]>(Array),\n default: () => [],\n },\n /**\n * @description custom button texts\n */\n buttonTexts: {\n type: definePropType<[string, string]>(Array),\n default: () => [],\n },\n /**\n * @description placeholder for the filter input\n */\n filterPlaceholder: String,\n /**\n * @description custom filter method\n */\n filterMethod: {\n type: definePropType<(query: string, item: TransferDataItem) => boolean>(\n Function\n ),\n },\n /**\n * @description key array of initially checked data items of the left list\n */\n leftDefaultChecked: {\n type: definePropType<TransferKey[]>(Array),\n default: () => [],\n },\n /**\n * @description key array of initially checked data items of the right list\n */\n rightDefaultChecked: {\n type: definePropType<TransferKey[]>(Array),\n default: () => [],\n },\n /**\n * @description custom render function for data items\n */\n renderContent: {\n type: definePropType<renderContent>(Function),\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<TransferKey[]>(Array),\n default: () => [],\n },\n /**\n * @description texts for checking status in list header\n */\n format: {\n type: definePropType<TransferFormat>(Object),\n default: () => ({}),\n },\n /**\n * @description whether Transfer is filterable\n */\n filterable: Boolean,\n /**\n * @description prop aliases for data source\n */\n props: {\n type: definePropType<TransferPropsAlias>(Object),\n default: () =>\n mutable({\n label: 'label',\n key: 'key',\n disabled: 'disabled',\n } as const),\n },\n /**\n * @description order strategy for elements in the target list. If set to `original`, the elements will keep the same order as the data source. If set to `push`, the newly added elements will be pushed to the bottom. If set to `unshift`, the newly added elements will be inserted on the top\n */\n targetOrder: {\n type: String,\n values: ['original', 'push', 'unshift'],\n default: 'original',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type TransferProps = ExtractPropTypes<typeof transferProps>\n\nexport const transferCheckedChangeFn = (\n value: TransferKey[],\n movedKeys?: TransferKey[]\n) => [value, movedKeys].every(isArray) || (isArray(value) && isNil(movedKeys))\n\nexport const transferEmits = {\n [CHANGE_EVENT]: (\n value: TransferKey[],\n direction: TransferDirection,\n movedKeys: TransferKey[]\n ) =>\n [value, movedKeys].every(isArray) && ['left', 'right'].includes(direction),\n [UPDATE_MODEL_EVENT]: (value: TransferKey[]) => isArray(value),\n [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,\n [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,\n}\nexport type TransferEmits = typeof transferEmits\n\nexport type TransferInstance = InstanceType<typeof Transfer> & unknown\n"],"names":[],"mappings":";;;;;;AAQY,MAAC,uBAAuB,GAAG,oBAAoB;AAC/C,MAAC,wBAAwB,GAAG,qBAAqB;AACjD,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,iBAAiB,EAAE,MAAM;AAC3B,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,C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