@element-plus/nightly 0.0.20250625 → 0.0.20250626

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 (656) hide show
  1. package/dist/index.full.js +118 -104
  2. package/dist/index.full.min.js +16 -16
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +17 -17
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +119 -105
  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/affix/index.mjs +2 -2
  276. package/es/components/affix/src/affix.mjs +24 -119
  277. package/es/components/affix/src/affix.mjs.map +1 -1
  278. package/es/components/affix/src/affix2.mjs +119 -24
  279. package/es/components/affix/src/affix2.mjs.map +1 -1
  280. package/es/components/breadcrumb/index.mjs +4 -4
  281. package/es/components/breadcrumb/src/breadcrumb-item.mjs +8 -56
  282. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  283. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -8
  284. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  285. package/es/components/breadcrumb/src/breadcrumb.mjs +37 -10
  286. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  287. package/es/components/breadcrumb/src/breadcrumb2.mjs +10 -37
  288. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  289. package/es/components/button/index.mjs +1 -1
  290. package/es/components/button/src/button-group.mjs +29 -6
  291. package/es/components/button/src/button-group.mjs.map +1 -1
  292. package/es/components/button/src/button-group2.mjs +6 -29
  293. package/es/components/button/src/button-group2.mjs.map +1 -1
  294. package/es/components/calendar/index.mjs +2 -2
  295. package/es/components/calendar/src/calendar.mjs +134 -16
  296. package/es/components/calendar/src/calendar.mjs.map +1 -1
  297. package/es/components/calendar/src/calendar2.mjs +16 -134
  298. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  299. package/es/components/carousel/index.mjs +2 -2
  300. package/es/components/carousel/src/carousel.mjs +214 -61
  301. package/es/components/carousel/src/carousel.mjs.map +1 -1
  302. package/es/components/carousel/src/carousel2.mjs +61 -208
  303. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  304. package/es/components/carousel/src/constants.d.ts +1 -1
  305. package/es/components/carousel/src/constants.mjs.map +1 -1
  306. package/es/components/carousel/src/use-carousel-item.mjs +18 -19
  307. package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
  308. package/es/components/carousel/src/use-carousel.d.ts +3 -0
  309. package/es/components/carousel/src/use-carousel.mjs +3 -1
  310. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  311. package/es/components/cascader/src/cascader.mjs +1 -1
  312. package/es/components/cascader-panel/src/index.mjs +1 -1
  313. package/es/components/cascader-panel/src/menu.mjs +1 -1
  314. package/es/components/cascader-panel/src/node.mjs +178 -115
  315. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  316. package/es/components/cascader-panel/src/node2.mjs +115 -178
  317. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  318. package/es/components/cascader-panel/src/store.mjs +1 -1
  319. package/es/components/check-tag/index.mjs +2 -2
  320. package/es/components/check-tag/src/check-tag.mjs +38 -14
  321. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  322. package/es/components/check-tag/src/check-tag2.mjs +14 -38
  323. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  324. package/es/components/col/index.mjs +2 -2
  325. package/es/components/col/src/col.mjs +43 -64
  326. package/es/components/col/src/col.mjs.map +1 -1
  327. package/es/components/col/src/col2.mjs +64 -43
  328. package/es/components/col/src/col2.mjs.map +1 -1
  329. package/es/components/collapse/index.mjs +4 -4
  330. package/es/components/collapse/src/collapse-item.mjs +18 -95
  331. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  332. package/es/components/collapse/src/collapse-item2.mjs +95 -18
  333. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  334. package/es/components/collapse/src/collapse.mjs +23 -28
  335. package/es/components/collapse/src/collapse.mjs.map +1 -1
  336. package/es/components/collapse/src/collapse2.mjs +28 -23
  337. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  338. package/es/components/color-picker/index.mjs +2 -2
  339. package/es/components/color-picker/src/color-picker.mjs +401 -44
  340. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  341. package/es/components/color-picker/src/color-picker2.mjs +44 -401
  342. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  343. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  344. package/es/components/countdown/index.mjs +2 -2
  345. package/es/components/countdown/src/countdown.mjs +21 -79
  346. package/es/components/countdown/src/countdown.mjs.map +1 -1
  347. package/es/components/countdown/src/countdown2.mjs +79 -21
  348. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  349. package/es/components/dialog/src/dialog-content.mjs +88 -29
  350. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  351. package/es/components/dialog/src/dialog-content2.mjs +29 -88
  352. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  353. package/es/components/dialog/src/dialog.mjs +2 -2
  354. package/es/components/dialog/src/dialog2.mjs +1 -1
  355. package/es/components/dropdown/index.mjs +2 -2
  356. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  357. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  358. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  359. package/es/components/dropdown/src/dropdown.mjs +108 -299
  360. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  361. package/es/components/dropdown/src/dropdown2.mjs +299 -108
  362. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  363. package/es/components/form/index.mjs +2 -2
  364. package/es/components/form/src/form.mjs +161 -54
  365. package/es/components/form/src/form.mjs.map +1 -1
  366. package/es/components/form/src/form2.mjs +54 -161
  367. package/es/components/form/src/form2.mjs.map +1 -1
  368. package/es/components/image/index.mjs +2 -2
  369. package/es/components/image/src/image.mjs +68 -226
  370. package/es/components/image/src/image.mjs.map +1 -1
  371. package/es/components/image/src/image2.mjs +226 -68
  372. package/es/components/image/src/image2.mjs.map +1 -1
  373. package/es/components/image-viewer/index.mjs +2 -2
  374. package/es/components/image-viewer/src/image-viewer.mjs +49 -447
  375. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  376. package/es/components/image-viewer/src/image-viewer2.mjs +447 -49
  377. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  378. package/es/components/index.mjs +24 -24
  379. package/es/components/input-tag/src/input-tag.mjs +1 -1
  380. package/es/components/page-header/index.mjs +2 -2
  381. package/es/components/page-header/src/page-header.mjs +97 -16
  382. package/es/components/page-header/src/page-header.mjs.map +1 -1
  383. package/es/components/page-header/src/page-header2.mjs +16 -97
  384. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  385. package/es/components/popover/src/popover.mjs +2 -2
  386. package/es/components/popper/index.mjs +2 -2
  387. package/es/components/popper/src/trigger.mjs +31 -127
  388. package/es/components/popper/src/trigger.mjs.map +1 -1
  389. package/es/components/popper/src/trigger2.mjs +127 -31
  390. package/es/components/popper/src/trigger2.mjs.map +1 -1
  391. package/es/components/select/src/select.mjs +1 -1
  392. package/es/components/select-v2/src/defaults.mjs +1 -1
  393. package/es/components/splitter/src/split-panel2.mjs +4 -7
  394. package/es/components/splitter/src/split-panel2.mjs.map +1 -1
  395. package/es/components/splitter/src/splitter2.mjs +5 -6
  396. package/es/components/splitter/src/splitter2.mjs.map +1 -1
  397. package/es/components/splitter/src/type.d.ts +1 -2
  398. package/es/components/splitter/src/type.mjs.map +1 -1
  399. package/es/components/statistic/index.mjs +2 -2
  400. package/es/components/statistic/src/statistic.mjs +25 -69
  401. package/es/components/statistic/src/statistic.mjs.map +1 -1
  402. package/es/components/statistic/src/statistic2.mjs +69 -25
  403. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  404. package/es/components/steps/src/item.vue.d.ts +1 -1
  405. package/es/components/steps/src/item2.mjs +5 -5
  406. package/es/components/steps/src/item2.mjs.map +1 -1
  407. package/es/components/steps/src/steps2.mjs +5 -3
  408. package/es/components/steps/src/steps2.mjs.map +1 -1
  409. package/es/components/tabs/index.mjs +2 -2
  410. package/es/components/tabs/src/constants.d.ts +1 -2
  411. package/es/components/tabs/src/constants.mjs.map +1 -1
  412. package/es/components/tabs/src/tab-pane.mjs +13 -71
  413. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  414. package/es/components/tabs/src/tab-pane2.mjs +68 -13
  415. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  416. package/es/components/tabs/src/tabs.d.ts +2 -2
  417. package/es/components/tabs/src/tabs.mjs +23 -28
  418. package/es/components/tabs/src/tabs.mjs.map +1 -1
  419. package/es/components/tag/index.mjs +2 -2
  420. package/es/components/tag/src/tag.mjs +27 -99
  421. package/es/components/tag/src/tag.mjs.map +1 -1
  422. package/es/components/tag/src/tag2.mjs +99 -27
  423. package/es/components/tag/src/tag2.mjs.map +1 -1
  424. package/es/components/teleport/index.mjs +2 -2
  425. package/es/components/teleport/src/teleport.mjs +18 -8
  426. package/es/components/teleport/src/teleport.mjs.map +1 -1
  427. package/es/components/teleport/src/teleport2.mjs +8 -18
  428. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  429. package/es/components/text/index.mjs +2 -2
  430. package/es/components/text/src/text.mjs +21 -67
  431. package/es/components/text/src/text.mjs.map +1 -1
  432. package/es/components/text/src/text2.mjs +67 -21
  433. package/es/components/text/src/text2.mjs.map +1 -1
  434. package/es/components/tooltip/index.mjs +1 -1
  435. package/es/components/tooltip/src/content2.mjs +1 -1
  436. package/es/components/tooltip/src/tooltip.mjs +1 -1
  437. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  438. package/es/components/tooltip/src/trigger.mjs +72 -14
  439. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  440. package/es/components/tooltip/src/trigger2.mjs +14 -72
  441. package/es/components/tooltip/src/trigger2.mjs.map +1 -1
  442. package/es/components/tour/src/mask.mjs +18 -75
  443. package/es/components/tour/src/mask.mjs.map +1 -1
  444. package/es/components/tour/src/mask2.mjs +75 -18
  445. package/es/components/tour/src/mask2.mjs.map +1 -1
  446. package/es/components/tour/src/tour.mjs +1 -1
  447. package/es/components/tour/src/tour2.mjs +1 -1
  448. package/es/components/upload/index.mjs +2 -2
  449. package/es/components/upload/src/upload-content.mjs +1 -1
  450. package/es/components/upload/src/upload-content2.mjs +1 -1
  451. package/es/components/upload/src/upload-list.mjs +1 -1
  452. package/es/components/upload/src/upload.mjs +125 -97
  453. package/es/components/upload/src/upload.mjs.map +1 -1
  454. package/es/components/upload/src/upload2.mjs +97 -125
  455. package/es/components/upload/src/upload2.mjs.map +1 -1
  456. package/es/components/upload/src/use-handlers.mjs +1 -1
  457. package/es/hooks/use-ordered-children/index.d.ts +5 -2
  458. package/es/hooks/use-ordered-children/index.mjs +25 -8
  459. package/es/hooks/use-ordered-children/index.mjs.map +1 -1
  460. package/es/index.d.ts +6 -4
  461. package/es/index.mjs +24 -24
  462. package/es/version.d.ts +1 -1
  463. package/es/version.mjs +1 -1
  464. package/es/version.mjs.map +1 -1
  465. package/lib/components/affix/index.js +2 -2
  466. package/lib/components/affix/src/affix.js +25 -119
  467. package/lib/components/affix/src/affix.js.map +1 -1
  468. package/lib/components/affix/src/affix2.js +119 -25
  469. package/lib/components/affix/src/affix2.js.map +1 -1
  470. package/lib/components/breadcrumb/index.js +4 -4
  471. package/lib/components/breadcrumb/src/breadcrumb-item.js +8 -56
  472. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  473. package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -8
  474. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  475. package/lib/components/breadcrumb/src/breadcrumb.js +37 -10
  476. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  477. package/lib/components/breadcrumb/src/breadcrumb2.js +10 -37
  478. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  479. package/lib/components/button/index.js +1 -1
  480. package/lib/components/button/src/button-group.js +29 -6
  481. package/lib/components/button/src/button-group.js.map +1 -1
  482. package/lib/components/button/src/button-group2.js +6 -29
  483. package/lib/components/button/src/button-group2.js.map +1 -1
  484. package/lib/components/calendar/index.js +2 -2
  485. package/lib/components/calendar/src/calendar.js +134 -17
  486. package/lib/components/calendar/src/calendar.js.map +1 -1
  487. package/lib/components/calendar/src/calendar2.js +17 -134
  488. package/lib/components/calendar/src/calendar2.js.map +1 -1
  489. package/lib/components/carousel/index.js +2 -2
  490. package/lib/components/carousel/src/carousel.js +214 -62
  491. package/lib/components/carousel/src/carousel.js.map +1 -1
  492. package/lib/components/carousel/src/carousel2.js +62 -208
  493. package/lib/components/carousel/src/carousel2.js.map +1 -1
  494. package/lib/components/carousel/src/constants.d.ts +1 -1
  495. package/lib/components/carousel/src/constants.js.map +1 -1
  496. package/lib/components/carousel/src/use-carousel-item.js +17 -18
  497. package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
  498. package/lib/components/carousel/src/use-carousel.d.ts +3 -0
  499. package/lib/components/carousel/src/use-carousel.js +3 -1
  500. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  501. package/lib/components/cascader/src/cascader.js +1 -1
  502. package/lib/components/cascader-panel/src/index.js +1 -1
  503. package/lib/components/cascader-panel/src/menu.js +1 -1
  504. package/lib/components/cascader-panel/src/node.js +178 -115
  505. package/lib/components/cascader-panel/src/node.js.map +1 -1
  506. package/lib/components/cascader-panel/src/node2.js +115 -178
  507. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  508. package/lib/components/cascader-panel/src/store.js +1 -1
  509. package/lib/components/check-tag/index.js +2 -2
  510. package/lib/components/check-tag/src/check-tag.js +38 -15
  511. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  512. package/lib/components/check-tag/src/check-tag2.js +15 -38
  513. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  514. package/lib/components/col/index.js +2 -2
  515. package/lib/components/col/src/col.js +43 -64
  516. package/lib/components/col/src/col.js.map +1 -1
  517. package/lib/components/col/src/col2.js +64 -43
  518. package/lib/components/col/src/col2.js.map +1 -1
  519. package/lib/components/collapse/index.js +4 -4
  520. package/lib/components/collapse/src/collapse-item.js +18 -95
  521. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  522. package/lib/components/collapse/src/collapse-item2.js +95 -18
  523. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  524. package/lib/components/collapse/src/collapse.js +25 -28
  525. package/lib/components/collapse/src/collapse.js.map +1 -1
  526. package/lib/components/collapse/src/collapse2.js +28 -25
  527. package/lib/components/collapse/src/collapse2.js.map +1 -1
  528. package/lib/components/color-picker/index.js +2 -2
  529. package/lib/components/color-picker/src/color-picker.js +400 -45
  530. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  531. package/lib/components/color-picker/src/color-picker2.js +45 -400
  532. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  533. package/lib/components/color-picker/src/components/predefine.js +1 -1
  534. package/lib/components/countdown/index.js +2 -2
  535. package/lib/components/countdown/src/countdown.js +22 -79
  536. package/lib/components/countdown/src/countdown.js.map +1 -1
  537. package/lib/components/countdown/src/countdown2.js +79 -22
  538. package/lib/components/countdown/src/countdown2.js.map +1 -1
  539. package/lib/components/dialog/src/dialog-content.js +87 -29
  540. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  541. package/lib/components/dialog/src/dialog-content2.js +29 -87
  542. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  543. package/lib/components/dialog/src/dialog.js +2 -2
  544. package/lib/components/dialog/src/dialog2.js +1 -1
  545. package/lib/components/dropdown/index.js +2 -2
  546. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  547. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  548. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  549. package/lib/components/dropdown/src/dropdown.js +117 -299
  550. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  551. package/lib/components/dropdown/src/dropdown2.js +299 -117
  552. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  553. package/lib/components/form/index.js +2 -2
  554. package/lib/components/form/src/form.js +160 -55
  555. package/lib/components/form/src/form.js.map +1 -1
  556. package/lib/components/form/src/form2.js +55 -160
  557. package/lib/components/form/src/form2.js.map +1 -1
  558. package/lib/components/image/index.js +2 -2
  559. package/lib/components/image/src/image.js +68 -225
  560. package/lib/components/image/src/image.js.map +1 -1
  561. package/lib/components/image/src/image2.js +225 -68
  562. package/lib/components/image/src/image2.js.map +1 -1
  563. package/lib/components/image-viewer/index.js +2 -2
  564. package/lib/components/image-viewer/src/image-viewer.js +50 -447
  565. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  566. package/lib/components/image-viewer/src/image-viewer2.js +447 -50
  567. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  568. package/lib/components/index.js +24 -24
  569. package/lib/components/input-tag/src/input-tag.js +1 -1
  570. package/lib/components/page-header/index.js +2 -2
  571. package/lib/components/page-header/src/page-header.js +97 -17
  572. package/lib/components/page-header/src/page-header.js.map +1 -1
  573. package/lib/components/page-header/src/page-header2.js +17 -97
  574. package/lib/components/page-header/src/page-header2.js.map +1 -1
  575. package/lib/components/popover/src/popover.js +2 -2
  576. package/lib/components/popper/index.js +2 -2
  577. package/lib/components/popper/src/trigger.js +32 -127
  578. package/lib/components/popper/src/trigger.js.map +1 -1
  579. package/lib/components/popper/src/trigger2.js +127 -32
  580. package/lib/components/popper/src/trigger2.js.map +1 -1
  581. package/lib/components/select/src/select.js +1 -1
  582. package/lib/components/select-v2/src/defaults.js +1 -1
  583. package/lib/components/splitter/src/split-panel2.js +3 -6
  584. package/lib/components/splitter/src/split-panel2.js.map +1 -1
  585. package/lib/components/splitter/src/splitter2.js +4 -5
  586. package/lib/components/splitter/src/splitter2.js.map +1 -1
  587. package/lib/components/splitter/src/type.d.ts +1 -2
  588. package/lib/components/splitter/src/type.js.map +1 -1
  589. package/lib/components/statistic/index.js +2 -2
  590. package/lib/components/statistic/src/statistic.js +25 -69
  591. package/lib/components/statistic/src/statistic.js.map +1 -1
  592. package/lib/components/statistic/src/statistic2.js +69 -25
  593. package/lib/components/statistic/src/statistic2.js.map +1 -1
  594. package/lib/components/steps/src/item.vue.d.ts +1 -1
  595. package/lib/components/steps/src/item2.js +4 -4
  596. package/lib/components/steps/src/item2.js.map +1 -1
  597. package/lib/components/steps/src/steps2.js +4 -2
  598. package/lib/components/steps/src/steps2.js.map +1 -1
  599. package/lib/components/tabs/index.js +2 -2
  600. package/lib/components/tabs/src/constants.d.ts +1 -2
  601. package/lib/components/tabs/src/constants.js.map +1 -1
  602. package/lib/components/tabs/src/tab-pane.js +13 -71
  603. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  604. package/lib/components/tabs/src/tab-pane2.js +68 -13
  605. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  606. package/lib/components/tabs/src/tabs.d.ts +2 -2
  607. package/lib/components/tabs/src/tabs.js +23 -28
  608. package/lib/components/tabs/src/tabs.js.map +1 -1
  609. package/lib/components/tag/index.js +2 -2
  610. package/lib/components/tag/src/tag.js +28 -99
  611. package/lib/components/tag/src/tag.js.map +1 -1
  612. package/lib/components/tag/src/tag2.js +99 -28
  613. package/lib/components/tag/src/tag2.js.map +1 -1
  614. package/lib/components/teleport/index.js +2 -2
  615. package/lib/components/teleport/src/teleport.js +18 -8
  616. package/lib/components/teleport/src/teleport.js.map +1 -1
  617. package/lib/components/teleport/src/teleport2.js +8 -18
  618. package/lib/components/teleport/src/teleport2.js.map +1 -1
  619. package/lib/components/text/index.js +2 -2
  620. package/lib/components/text/src/text.js +21 -67
  621. package/lib/components/text/src/text.js.map +1 -1
  622. package/lib/components/text/src/text2.js +67 -21
  623. package/lib/components/text/src/text2.js.map +1 -1
  624. package/lib/components/tooltip/index.js +1 -1
  625. package/lib/components/tooltip/src/content2.js +1 -1
  626. package/lib/components/tooltip/src/tooltip.js +1 -1
  627. package/lib/components/tooltip/src/tooltip2.js +1 -1
  628. package/lib/components/tooltip/src/trigger.js +72 -14
  629. package/lib/components/tooltip/src/trigger.js.map +1 -1
  630. package/lib/components/tooltip/src/trigger2.js +14 -72
  631. package/lib/components/tooltip/src/trigger2.js.map +1 -1
  632. package/lib/components/tour/src/mask.js +18 -75
  633. package/lib/components/tour/src/mask.js.map +1 -1
  634. package/lib/components/tour/src/mask2.js +75 -18
  635. package/lib/components/tour/src/mask2.js.map +1 -1
  636. package/lib/components/tour/src/tour.js +1 -1
  637. package/lib/components/tour/src/tour2.js +1 -1
  638. package/lib/components/upload/index.js +2 -2
  639. package/lib/components/upload/src/upload-content.js +1 -1
  640. package/lib/components/upload/src/upload-content2.js +1 -1
  641. package/lib/components/upload/src/upload-list.js +1 -1
  642. package/lib/components/upload/src/upload.js +125 -100
  643. package/lib/components/upload/src/upload.js.map +1 -1
  644. package/lib/components/upload/src/upload2.js +100 -125
  645. package/lib/components/upload/src/upload2.js.map +1 -1
  646. package/lib/components/upload/src/use-handlers.js +1 -1
  647. package/lib/hooks/use-ordered-children/index.d.ts +5 -2
  648. package/lib/hooks/use-ordered-children/index.js +24 -7
  649. package/lib/hooks/use-ordered-children/index.js.map +1 -1
  650. package/lib/index.d.ts +6 -4
  651. package/lib/index.js +24 -24
  652. package/lib/version.d.ts +1 -1
  653. package/lib/version.js +1 -1
  654. package/lib/version.js.map +1 -1
  655. package/package.json +2 -2
  656. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"carousel2.js","sources":["../../../../../../packages/components/carousel/src/carousel.vue"],"sourcesContent":["<template>\n <div\n ref=\"root\"\n :class=\"carouselClasses\"\n @mouseenter.stop=\"handleMouseEnter\"\n @mouseleave.stop=\"handleMouseLeave\"\n >\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-left\">\n <button\n v-show=\"\n (arrow === 'always' || hover) && (props.loop || activeIndex > 0)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'left')]\"\n :aria-label=\"t('el.carousel.leftArrow')\"\n @mouseenter=\"handleButtonEnter('left')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex - 1)\"\n >\n <ElIcon>\n <ArrowLeft />\n </ElIcon>\n </button>\n </transition>\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-right\">\n <button\n v-show=\"\n (arrow === 'always' || hover) &&\n (props.loop || activeIndex < items.length - 1)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'right')]\"\n :aria-label=\"t('el.carousel.rightArrow')\"\n @mouseenter=\"handleButtonEnter('right')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex + 1)\"\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </button>\n </transition>\n <div\n :class=\"ns.e('container')\"\n :style=\"containerStyle\"\n @transitionstart=\"handleTransitionStart\"\n @transitionend=\"handleTransitionEnd\"\n >\n <PlaceholderItem />\n <slot />\n </div>\n <ul v-if=\"indicatorPosition !== 'none'\" :class=\"indicatorsClasses\">\n <li\n v-for=\"(item, index) in items\"\n v-show=\"isTwoLengthShow(index)\"\n :key=\"index\"\n :class=\"[\n ns.e('indicator'),\n ns.em('indicator', direction),\n ns.is('active', index === activeIndex),\n ]\"\n @mouseenter=\"throttledIndicatorHover(index)\"\n @click.stop=\"handleIndicatorClick(index)\"\n >\n <button\n :class=\"ns.e('button')\"\n :aria-label=\"t('el.carousel.indicator', { index: index + 1 })\"\n >\n <span v-if=\"hasLabel\">{{ item.props.label }}</span>\n </button>\n </li>\n </ul>\n <svg\n v-if=\"props.motionBlur\"\n xmlns=\"http://www.w3.org/2000/svg\"\n version=\"1.1\"\n style=\"display: none\"\n >\n <defs>\n <filter id=\"elCarouselHorizontal\">\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"12,0\" />\n </filter>\n <filter id=\"elCarouselVertical\">\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"0,10\" />\n </filter>\n </defs>\n </svg>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { carouselEmits, carouselProps } from './carousel'\nimport { useCarousel } from './use-carousel'\n\nconst COMPONENT_NAME = 'ElCarousel'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(carouselProps)\nconst emit = defineEmits(carouselEmits)\nconst {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n} = useCarousel(props, emit, COMPONENT_NAME)\nconst ns = useNamespace('carousel')\n\nconst { t } = useLocale()\n\nconst carouselClasses = computed(() => {\n const classes = [ns.b(), ns.m(props.direction)]\n if (unref(isCardType)) {\n classes.push(ns.m('card'))\n }\n return classes\n})\n\nconst indicatorsClasses = computed(() => {\n const classes = [ns.e('indicators'), ns.em('indicators', props.direction)]\n if (unref(hasLabel)) {\n classes.push(ns.em('indicators', 'labels'))\n }\n if (props.indicatorPosition === 'outside') {\n classes.push(ns.em('indicators', 'outside'))\n }\n if (unref(isVertical)) {\n classes.push(ns.em('indicators', 'right'))\n }\n return classes\n})\n\nfunction handleTransitionStart(e: TransitionEvent) {\n if (!props.motionBlur) return\n\n const kls = unref(isVertical)\n ? `${ns.namespace.value}-transitioning-vertical`\n : `${ns.namespace.value}-transitioning`\n ;(e.currentTarget as HTMLDivElement).classList.add(kls)\n}\n\nfunction handleTransitionEnd(e: TransitionEvent) {\n if (!props.motionBlur) return\n\n const kls = unref(isVertical)\n ? `${ns.namespace.value}-transitioning-vertical`\n : `${ns.namespace.value}-transitioning`\n ;(e.currentTarget as HTMLDivElement).classList.remove(kls)\n}\n\ndefineExpose({\n /** @description active slide index */\n activeIndex,\n /** @description manually switch slide, index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item` */\n setActiveItem,\n /** @description switch to the previous slide */\n prev,\n /** @description switch to the next slide */\n next,\n})\n</script>\n"],"names":["useCarousel","useNamespace","useLocale","computed","unref","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;;;;uCAmGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAIA,IAAM,MAAA;AAAA,MACJ,IAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,QAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,iBAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,eAAA;AAAA,MACA,eAAA;AAAA,MACA,mBAAA;AAAA,MACA,uBAAA;AAAA,KACE,GAAAA,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,EAAE,CAAE,EAAA,GAAIC,iBAAU,EAAA,CAAA;AAExB,IAAM,MAAA,eAAA,GAAkBC,aAAS,MAAM;AACrC,MAAM,MAAA,OAAA,GAAU,CAAC,EAAG,CAAA,CAAA,IAAK,EAAG,CAAA,CAAA,CAAE,KAAM,CAAA,SAAS,CAAC,CAAA,CAAA;AAC9C,MAAI,IAAAC,SAAA,CAAM,UAAU,CAAG,EAAA;AACrB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,CAAE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AA,EAAA;AAEvB,MAAA,IAAA,CAAA,KAAY,CAAA,UAAgB;AAG3B,QAAG,OAAA;AAAqD,MAC3D,MAAA,GAAA,GAAAA,SAAA,CAAA,UAAA,CAAA,GAAA,CAAA,EAAA,EAAA,CAAA,SAAA,CAAA,KAAA,CAAA,uBAAA,CAAA,GAAA,CAAA,EAAA,EAAA,CAAA,SAAA,CAAA,KAAA,CAAA,cAAA,CAAA,CAAA;AAEA,MAAa,CAAA,CAAA,aAAA,CAAA,SAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA;AAAA,KAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAAA,WAAA;AAAA,MAEA,aAAA;AAAA,MAAA,IAAA;AAAA,MAEA,IAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAEA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"carousel2.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n /**\n * @description index of the initially active slide (starting from 0)\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description height of the carousel\n */\n height: {\n type: String,\n default: '',\n },\n /**\n * @description how indicators are triggered\n */\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether automatically loop the slides\n */\n autoplay: {\n type: Boolean,\n default: true,\n },\n /**\n * @description interval of the auto loop, in milliseconds\n */\n interval: {\n type: Number,\n default: 3000,\n },\n /**\n * @description position of the indicators\n */\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n /**\n * @description when arrows are shown\n */\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n /**\n * @description type of the Carousel\n */\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n /**\n * @description when type is card, scaled size of secondary cards\n */\n cardScale: {\n type: Number,\n default: 0.83,\n },\n /**\n * @description display the items in loop\n */\n loop: {\n type: Boolean,\n default: true,\n },\n /**\n * @description display direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description pause autoplay when hover\n */\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n /**\n * @description infuse dynamism and smoothness into the carousel\n */\n motionBlur: Boolean,\n} as const)\n\nexport const carouselEmits = {\n /**\n * @description triggers when the active slide switches\n * @param current index of the new active slide\n * @param prev index of the old active slide\n */\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":["buildProps","isNumber"],"mappings":";;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;AACxB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE,OAAO;AACrB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAACC,cAAQ,CAAC;AAC5D;;;;;"}
@@ -23,7 +23,7 @@ export type CarouselContext = {
23
23
  loop: boolean;
24
24
  cardScale: number;
25
25
  addItem: (item: CarouselItemContext) => void;
26
- removeItem: (uid: number) => void;
26
+ removeItem: (item: CarouselItemContext) => void;
27
27
  setActiveItem: (index: number) => void;
28
28
  setContainerHeight: (height: number) => void;
29
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n cardScale: number\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n\nexport const CAROUSEL_ITEM_NAME = 'ElCarouselItem'\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACnD,MAAC,kBAAkB,GAAG;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n cardScale: number\n addItem: (item: CarouselItemContext) => void\n removeItem: (item: CarouselItemContext) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n\nexport const CAROUSEL_ITEM_NAME = 'ElCarouselItem'\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACnD,MAAC,kBAAkB,GAAG;;;;;"}
@@ -90,24 +90,23 @@ const useCarouselItem = (props) => {
90
90
  carouselContext.setActiveItem(index);
91
91
  }
92
92
  }
93
- vue.onMounted(() => {
94
- carouselContext.addItem({
95
- props,
96
- states: vue.reactive({
97
- hover,
98
- translate,
99
- scale,
100
- active,
101
- ready,
102
- inStage,
103
- animating
104
- }),
105
- uid: instance.uid,
106
- translateItem
107
- });
108
- });
109
- vue.onUnmounted(() => {
110
- carouselContext.removeItem(instance.uid);
93
+ const carouselItemContext = {
94
+ props,
95
+ states: vue.reactive({
96
+ hover,
97
+ translate,
98
+ scale,
99
+ active,
100
+ ready,
101
+ inStage,
102
+ animating
103
+ }),
104
+ uid: instance.uid,
105
+ translateItem
106
+ };
107
+ carouselContext.addItem(carouselItemContext);
108
+ vue.onBeforeUnmount(() => {
109
+ carouselContext.removeItem(carouselItemContext);
111
110
  });
112
111
  return {
113
112
  carouselItemRef,
@@ -1 +1 @@
1
- {"version":3,"file":"use-carousel-item.js","sources":["../../../../../../packages/components/carousel/src/use-carousel-item.ts"],"sourcesContent":["import {\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { CAROUSEL_ITEM_NAME, carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (props: CarouselItemProps) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n CAROUSEL_ITEM_NAME,\n 'usage: <el-carousel></el-carousel-item></el-carousel>'\n )\n }\n\n if (!instance) {\n debugWarn(\n CAROUSEL_ITEM_NAME,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const carouselItemRef = ref<HTMLElement>()\n const hover = ref(false)\n const translate = ref(0)\n const scale = ref(1)\n const active = ref(false)\n const ready = ref(false)\n const inStage = ref(false)\n const animating = ref(false)\n\n // computed\n const { isCardType, isVertical, cardScale } = carouselContext\n\n // methods\n\n function processIndex(index: number, activeIndex: number, length: number) {\n const lastItemIndex = length - 1\n const prevItemIndex = activeIndex - 1\n const nextItemIndex = activeIndex + 1\n const halfItemIndex = length / 2\n\n if (activeIndex === 0 && index === lastItemIndex) {\n return -1\n } else if (activeIndex === lastItemIndex && index === 0) {\n return length\n } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {\n return length + 1\n } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {\n return -2\n }\n return index\n }\n\n function calcCardTranslate(index: number, activeIndex: number) {\n const parentWidth = unref(isVertical)\n ? carouselContext.root.value?.offsetHeight || 0\n : carouselContext.root.value?.offsetWidth || 0\n\n if (inStage.value) {\n return (parentWidth * ((2 - cardScale) * (index - activeIndex) + 1)) / 4\n } else if (index < activeIndex) {\n return (-(1 + cardScale) * parentWidth) / 4\n } else {\n return ((3 + cardScale) * parentWidth) / 4\n }\n }\n\n function calcTranslate(\n index: number,\n activeIndex: number,\n isVertical: boolean\n ) {\n const rootEl = carouselContext.root.value\n if (!rootEl) return 0\n\n const distance =\n (isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0\n return distance * (index - activeIndex)\n }\n\n const translateItem = (\n index: number,\n activeIndex: number,\n oldIndex?: number\n ) => {\n const _isCardType = unref(isCardType)\n const carouselItemLength = carouselContext.items.value.length ?? Number.NaN\n\n const isActive = index === activeIndex\n if (!_isCardType && !isUndefined(oldIndex)) {\n animating.value = isActive || index === oldIndex\n }\n\n if (!isActive && carouselItemLength > 2 && carouselContext.loop) {\n index = processIndex(index, activeIndex, carouselItemLength)\n }\n\n const _isVertical = unref(isVertical)\n active.value = isActive\n\n if (_isCardType) {\n inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1\n translate.value = calcCardTranslate(index, activeIndex)\n scale.value = unref(active) ? 1 : cardScale\n } else {\n translate.value = calcTranslate(index, activeIndex, _isVertical)\n }\n\n ready.value = true\n\n if (isActive && carouselItemRef.value) {\n carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight)\n }\n }\n\n function handleItemClick() {\n if (carouselContext && unref(isCardType)) {\n const index = carouselContext.items.value.findIndex(\n ({ uid }) => uid === instance.uid\n )\n carouselContext.setActiveItem(index)\n }\n }\n\n // lifecycle\n onMounted(() => {\n carouselContext.addItem({\n props,\n states: reactive({\n hover,\n translate,\n scale,\n active,\n ready,\n inStage,\n animating,\n }),\n uid: instance.uid,\n translateItem,\n })\n })\n\n onUnmounted(() => {\n carouselContext.removeItem(instance.uid)\n })\n\n return {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n }\n}\n"],"names":["inject","carouselContextKey","getCurrentInstance","debugWarn","CAROUSEL_ITEM_NAME","ref","unref","isUndefined","onMounted","reactive","onUnmounted"],"mappings":";;;;;;;;;AAWY,MAAC,eAAe,GAAG,CAAC,KAAK,KAAK;AAC1C,EAAE,MAAM,eAAe,GAAGA,UAAM,CAACC,4BAAkB,CAAC,CAAC;AACrD,EAAE,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB,IAAIC,eAAS,CAACC,4BAAkB,EAAE,uDAAuD,CAAC,CAAC;AAC3F,GAAG;AACH,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAID,eAAS,CAACC,4BAAkB,EAAE,sDAAsD,CAAC,CAAC;AAC1F,GAAG;AACH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IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,KAAK;AACT,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-carousel-item.js","sources":["../../../../../../packages/components/carousel/src/use-carousel-item.ts"],"sourcesContent":["import {\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { CAROUSEL_ITEM_NAME, carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (props: CarouselItemProps) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n CAROUSEL_ITEM_NAME,\n 'usage: <el-carousel></el-carousel-item></el-carousel>'\n )\n }\n\n if (!instance) {\n debugWarn(\n CAROUSEL_ITEM_NAME,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const carouselItemRef = ref<HTMLElement>()\n const hover = ref(false)\n const translate = ref(0)\n const scale = ref(1)\n const active = ref(false)\n const ready = ref(false)\n const inStage = ref(false)\n const animating = ref(false)\n\n // computed\n const { isCardType, isVertical, cardScale } = carouselContext\n\n // methods\n\n function processIndex(index: number, activeIndex: number, length: number) {\n const lastItemIndex = length - 1\n const prevItemIndex = activeIndex - 1\n const nextItemIndex = activeIndex + 1\n const halfItemIndex = length / 2\n\n if (activeIndex === 0 && index === lastItemIndex) {\n return -1\n } else if (activeIndex === lastItemIndex && index === 0) {\n return length\n } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {\n return length + 1\n } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {\n return -2\n }\n return index\n }\n\n function calcCardTranslate(index: number, activeIndex: number) {\n const parentWidth = unref(isVertical)\n ? carouselContext.root.value?.offsetHeight || 0\n : carouselContext.root.value?.offsetWidth || 0\n\n if (inStage.value) {\n return (parentWidth * ((2 - cardScale) * (index - activeIndex) + 1)) / 4\n } else if (index < activeIndex) {\n return (-(1 + cardScale) * parentWidth) / 4\n } else {\n return ((3 + cardScale) * parentWidth) / 4\n }\n }\n\n function calcTranslate(\n index: number,\n activeIndex: number,\n isVertical: boolean\n ) {\n const rootEl = carouselContext.root.value\n if (!rootEl) return 0\n\n const distance =\n (isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0\n return distance * (index - activeIndex)\n }\n\n const translateItem = (\n index: number,\n activeIndex: number,\n oldIndex?: number\n ) => {\n const _isCardType = unref(isCardType)\n const carouselItemLength = carouselContext.items.value.length ?? Number.NaN\n\n const isActive = index === activeIndex\n if (!_isCardType && !isUndefined(oldIndex)) {\n animating.value = isActive || index === oldIndex\n }\n\n if (!isActive && carouselItemLength > 2 && carouselContext.loop) {\n index = processIndex(index, activeIndex, carouselItemLength)\n }\n\n const _isVertical = unref(isVertical)\n active.value = isActive\n\n if (_isCardType) {\n inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1\n translate.value = calcCardTranslate(index, activeIndex)\n scale.value = unref(active) ? 1 : cardScale\n } else {\n translate.value = calcTranslate(index, activeIndex, _isVertical)\n }\n\n ready.value = true\n\n if (isActive && carouselItemRef.value) {\n carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight)\n }\n }\n\n function handleItemClick() {\n if (carouselContext && unref(isCardType)) {\n const index = carouselContext.items.value.findIndex(\n ({ uid }) => uid === instance.uid\n )\n carouselContext.setActiveItem(index)\n }\n }\n\n const carouselItemContext = {\n props,\n states: reactive({\n hover,\n translate,\n scale,\n active,\n ready,\n inStage,\n animating,\n }),\n uid: instance.uid,\n translateItem,\n }\n\n carouselContext.addItem(carouselItemContext)\n\n onBeforeUnmount(() => {\n carouselContext.removeItem(carouselItemContext)\n })\n\n return {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick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E,YAAQ,CAAC;AACrB,MAAM,KAAK;AACX,MAAM,SAAS;AACf,MAAM,KAAK;AACX,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,MAAM,OAAO;AACb,MAAM,SAAS;AACf,KAAK,CAAC;AACN,IAAI,GAAG,EAAE,QAAQ,CAAC,GAAG;AACrB,IAAI,aAAa;AACjB,GAAG,CAAC;AACJ,EAAE,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC/C,EAAEC,mBAAe,CAAC,MAAM;AACxB,IAAI,eAAe,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACpD,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,eAAe;AACnB,IAAI,MAAM;AACV,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,KAAK;AACT,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
@@ -31,6 +31,9 @@ export declare const useCarousel: (props: CarouselProps, emit: SetupContext<Caro
31
31
  $stable?: boolean;
32
32
  })[] | null;
33
33
  isTwoLengthShow: (index: number) => boolean;
34
+ ItemsSorter: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
35
+ [key: string]: any;
36
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
34
37
  throttledArrowClick: import("lodash").DebouncedFunc<(index: number) => void>;
35
38
  throttledIndicatorHover: import("lodash").DebouncedFunc<(index: number) => void>;
36
39
  };
@@ -17,7 +17,8 @@ const useCarousel = (props, emit, componentName) => {
17
17
  const {
18
18
  children: items,
19
19
  addChild: addItem,
20
- removeChild: removeItem
20
+ removeChild: removeItem,
21
+ ChildrenSorter: ItemsSorter
21
22
  } = index.useOrderedChildren(vue.getCurrentInstance(), constants.CAROUSEL_ITEM_NAME);
22
23
  const slots = vue.useSlots();
23
24
  const activeIndex = vue.ref(-1);
@@ -259,6 +260,7 @@ const useCarousel = (props, emit, componentName) => {
259
260
  next,
260
261
  PlaceholderItem,
261
262
  isTwoLengthShow,
263
+ ItemsSorter,
262
264
  throttledArrowClick,
263
265
  throttledIndicatorHover
264
266
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-carousel.js","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { CAROUSEL_ITEM_NAME, carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n CAROUSEL_ITEM_NAME\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === CAROUSEL_ITEM_NAME\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit(CHANGE_EVENT, current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n cardScale: props.cardScale,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":["useOrderedChildren","getCurrentInstance","CAROUSEL_ITEM_NAME","useSlots","ref","computed","unref","throttle","isString","debugWarn","flattedChildren","isVNode","watch","CHANGE_EVENT","shallowRef","onMounted","useResizeObserver","onBeforeUnmount","provide","carouselContextKey"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,aAAa,GAAG,GAAG,CAAC;AACd,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM;AACR,IAA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AAK;AAC1C,MAAM,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAClC,GAAG,CAAC,CAAC;AACL,EAAEC,WAAO,CAACC,4BAAkB,EAAE;AAC9B,IAAI,IAAI;AACR,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,SAAS,EAAE,KAAK,CAAC,SAAS;AAC9B,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,kBAAkB;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,iBAAiB;AACrB,IAAI,iBAAiB;AACrB,IAAI,oBAAoB;AACxB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-carousel.js","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { CAROUSEL_ITEM_NAME, carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n ChildrenSorter: ItemsSorter,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n CAROUSEL_ITEM_NAME\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === CAROUSEL_ITEM_NAME\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit(CHANGE_EVENT, current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n cardScale: props.cardScale,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n ItemsSorter,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":["useOrderedChildren","getCurrentInstance","CAROUSEL_ITEM_NAME","useSlots","ref","computed","unref","throttle","isString","debugWarn","flattedChildren","isVNode","watch","CHANGE_EVENT","shallowRef","onMounted","useResizeObserver","onBeforeUnmount","provide","carouselContextKey"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,aAAa,GAAG,GAAG,CAAC;AACd,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM;AACR,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,QAAQ,EAAE,OAAO;AACrB,IAAI,WAAW,EAAE,UAAU;AAC3B,IAAI,cAAc,EAAE,WAAW;AAC/B,GAAG,GAAGA,wBAAkB,CAACC,sBAAkB,EAAE,EAAEC,4BAAkB,CAAC,CAAC;AACnE,EAAE,MAAM,KAAK,GAAGC,YAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,WAAW,GAAGC,OAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,EAAE,MAAM,KAAK,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AAC1B,EAAE,MAAM,KAAK,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC3B,EAAE,MAAM,IAAI,GAAGA,OAAG,EAAE,CAAC;AACrB,EAAE,MAAM,eAAe,GAAGA,OAAG,CAAC,CAAC,CAAC,CAAC;AACjC,EAAE,MAAM,gBAAgB,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AACrC,EAAE,MAAM,YAAY,GAAGC,YAAQ,CAAC,MAAM,KAAK,CAAC,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AgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@popperjs/core');
6
6
  var config = require('../../cascader-panel/src/config.js');
7
- var tag = require('../../tag/src/tag2.js');
7
+ var tag = require('../../tag/src/tag.js');
8
8
  var runtime = require('../../../utils/vue/props/runtime.js');
9
9
  var index = require('../../../hooks/use-size/index.js');
10
10
  var content = require('../../tooltip/src/content2.js');
@@ -6,7 +6,7 @@ var vue = require('vue');
6
6
  var lodashUnified = require('lodash-unified');
7
7
  var menu = require('./menu.js');
8
8
  var store = require('./store.js');
9
- var node = require('./node.js');
9
+ var node = require('./node2.js');
10
10
  var config = require('./config.js');
11
11
  var utils = require('./utils.js');
12
12
  var types = require('./types.js');
@@ -6,7 +6,7 @@ var vue = require('vue');
6
6
  var index$3 = require('../../scrollbar/index.js');
7
7
  var iconsVue = require('@element-plus/icons-vue');
8
8
  var index$4 = require('../../icon/index.js');
9
- var node = require('./node2.js');
9
+ var node = require('./node.js');
10
10
  var types = require('./types.js');
11
11
  var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
12
  var index = require('../../../hooks/use-namespace/index.js');
@@ -2,124 +2,187 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var types = require('../../../utils/types.js');
6
- var shared = require('@vue/shared');
5
+ var vue = require('vue');
6
+ var index$1 = require('../../checkbox/index.js');
7
+ var index$2 = require('../../radio/index.js');
8
+ var index$3 = require('../../icon/index.js');
9
+ var iconsVue = require('@element-plus/icons-vue');
10
+ var nodeContent = require('./node-content.js');
11
+ var types = require('./types.js');
12
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
+ var index = require('../../../hooks/use-namespace/index.js');
7
14
 
8
- let uid = 0;
9
- const calculatePathNodes = (node) => {
10
- const nodes = [node];
11
- let { parent } = node;
12
- while (parent) {
13
- nodes.unshift(parent);
14
- parent = parent.parent;
15
- }
16
- return nodes;
17
- };
18
- class Node {
19
- constructor(data, config, parent, root = false) {
20
- this.data = data;
21
- this.config = config;
22
- this.parent = parent;
23
- this.root = root;
24
- this.uid = uid++;
25
- this.checked = false;
26
- this.indeterminate = false;
27
- this.loading = false;
28
- const { value: valueKey, label: labelKey, children: childrenKey } = config;
29
- const childrenData = data[childrenKey];
30
- const pathNodes = calculatePathNodes(this);
31
- this.level = root ? 0 : parent ? parent.level + 1 : 1;
32
- this.value = data[valueKey];
33
- this.label = data[labelKey];
34
- this.pathNodes = pathNodes;
35
- this.pathValues = pathNodes.map((node) => node.value);
36
- this.pathLabels = pathNodes.map((node) => node.label);
37
- this.childrenData = childrenData;
38
- this.children = (childrenData || []).map((child) => new Node(child, config, this));
39
- this.loaded = !config.lazy || this.isLeaf || !types.isEmpty(childrenData);
40
- this.text = "";
41
- }
42
- get isDisabled() {
43
- const { data, parent, config } = this;
44
- const { disabled, checkStrictly } = config;
45
- const isDisabled = shared.isFunction(disabled) ? disabled(data, this) : !!data[disabled];
46
- return isDisabled || !checkStrictly && !!(parent == null ? void 0 : parent.isDisabled);
47
- }
48
- get isLeaf() {
49
- const { data, config, childrenData, loaded } = this;
50
- const { lazy, leaf } = config;
51
- const isLeaf = shared.isFunction(leaf) ? leaf(data, this) : data[leaf];
52
- return types.isUndefined(isLeaf) ? lazy && !loaded ? false : !(shared.isArray(childrenData) && childrenData.length) : !!isLeaf;
53
- }
54
- get valueByOption() {
55
- return this.config.emitPath ? this.pathValues : this.value;
56
- }
57
- appendChild(childData) {
58
- const { childrenData, children } = this;
59
- const node = new Node(childData, this.config, this);
60
- if (shared.isArray(childrenData)) {
61
- childrenData.push(childData);
62
- } else {
63
- this.childrenData = [childData];
64
- }
65
- children.push(node);
66
- return node;
67
- }
68
- calcText(allLevels, separator) {
69
- const text = allLevels ? this.pathLabels.join(separator) : this.label;
70
- this.text = text;
71
- return text;
72
- }
73
- broadcast(checked) {
74
- this.children.forEach((child) => {
15
+ const __default__ = vue.defineComponent({
16
+ name: "ElCascaderNode"
17
+ });
18
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
+ ...__default__,
20
+ props: {
21
+ node: {
22
+ type: Object,
23
+ required: true
24
+ },
25
+ menuId: String
26
+ },
27
+ emits: ["expand"],
28
+ setup(__props, { emit }) {
29
+ const props = __props;
30
+ const panel = vue.inject(types.CASCADER_PANEL_INJECTION_KEY);
31
+ const ns = index.useNamespace("cascader-node");
32
+ const isHoverMenu = vue.computed(() => panel.isHoverMenu);
33
+ const multiple = vue.computed(() => panel.config.multiple);
34
+ const checkStrictly = vue.computed(() => panel.config.checkStrictly);
35
+ const checkedNodeId = vue.computed(() => {
75
36
  var _a;
76
- if (child) {
77
- child.broadcast(checked);
78
- (_a = child.onParentCheck) == null ? void 0 : _a.call(child, checked);
79
- }
37
+ return (_a = panel.checkedNodes[0]) == null ? void 0 : _a.uid;
80
38
  });
39
+ const isDisabled = vue.computed(() => props.node.isDisabled);
40
+ const isLeaf = vue.computed(() => props.node.isLeaf);
41
+ const expandable = vue.computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);
42
+ const inExpandingPath = vue.computed(() => isInPath(panel.expandingNode));
43
+ const inCheckedPath = vue.computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
44
+ const isInPath = (node) => {
45
+ var _a;
46
+ const { level, uid } = props.node;
47
+ return ((_a = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a.uid) === uid;
48
+ };
49
+ const doExpand = () => {
50
+ if (inExpandingPath.value)
51
+ return;
52
+ panel.expandNode(props.node);
53
+ };
54
+ const doCheck = (checked) => {
55
+ const { node } = props;
56
+ if (checked === node.checked)
57
+ return;
58
+ panel.handleCheckChange(node, checked);
59
+ };
60
+ const doLoad = () => {
61
+ panel.lazyLoad(props.node, () => {
62
+ if (!isLeaf.value)
63
+ doExpand();
64
+ });
65
+ };
66
+ const handleHoverExpand = (e) => {
67
+ if (!isHoverMenu.value)
68
+ return;
69
+ handleExpand();
70
+ !isLeaf.value && emit("expand", e);
71
+ };
72
+ const handleExpand = () => {
73
+ const { node } = props;
74
+ if (!expandable.value || node.loading)
75
+ return;
76
+ node.loaded ? doExpand() : doLoad();
77
+ };
78
+ const handleClick = () => {
79
+ if (isHoverMenu.value && !isLeaf.value)
80
+ return;
81
+ if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) {
82
+ handleCheck(true);
83
+ } else {
84
+ handleExpand();
85
+ }
86
+ };
87
+ const handleSelectCheck = (checked) => {
88
+ if (checkStrictly.value) {
89
+ doCheck(checked);
90
+ if (props.node.loaded) {
91
+ doExpand();
92
+ }
93
+ } else {
94
+ handleCheck(checked);
95
+ }
96
+ };
97
+ const handleCheck = (checked) => {
98
+ if (!props.node.loaded) {
99
+ doLoad();
100
+ } else {
101
+ doCheck(checked);
102
+ !checkStrictly.value && doExpand();
103
+ }
104
+ };
105
+ return (_ctx, _cache) => {
106
+ return vue.openBlock(), vue.createElementBlock("li", {
107
+ id: `${__props.menuId}-${__props.node.uid}`,
108
+ role: "menuitem",
109
+ "aria-haspopup": !vue.unref(isLeaf),
110
+ "aria-owns": vue.unref(isLeaf) ? void 0 : __props.menuId,
111
+ "aria-expanded": vue.unref(inExpandingPath),
112
+ tabindex: vue.unref(expandable) ? -1 : void 0,
113
+ class: vue.normalizeClass([
114
+ vue.unref(ns).b(),
115
+ vue.unref(ns).is("selectable", vue.unref(checkStrictly)),
116
+ vue.unref(ns).is("active", __props.node.checked),
117
+ vue.unref(ns).is("disabled", !vue.unref(expandable)),
118
+ vue.unref(inExpandingPath) && "in-active-path",
119
+ vue.unref(inCheckedPath) && "in-checked-path"
120
+ ]),
121
+ onMouseenter: handleHoverExpand,
122
+ onFocus: handleHoverExpand,
123
+ onClick: handleClick
124
+ }, [
125
+ vue.createCommentVNode(" prefix "),
126
+ vue.unref(multiple) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElCheckbox), {
127
+ key: 0,
128
+ "model-value": __props.node.checked,
129
+ indeterminate: __props.node.indeterminate,
130
+ disabled: vue.unref(isDisabled),
131
+ onClick: vue.withModifiers(() => {
132
+ }, ["stop"]),
133
+ "onUpdate:modelValue": handleSelectCheck
134
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : vue.unref(checkStrictly) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElRadio), {
135
+ key: 1,
136
+ "model-value": vue.unref(checkedNodeId),
137
+ label: __props.node.uid,
138
+ disabled: vue.unref(isDisabled),
139
+ "onUpdate:modelValue": handleSelectCheck,
140
+ onClick: vue.withModifiers(() => {
141
+ }, ["stop"])
142
+ }, {
143
+ default: vue.withCtx(() => [
144
+ vue.createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "),
145
+ vue.createElementVNode("span")
146
+ ]),
147
+ _: 1
148
+ }, 8, ["model-value", "label", "disabled", "onClick"])) : vue.unref(isLeaf) && __props.node.checked ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
149
+ key: 2,
150
+ class: vue.normalizeClass(vue.unref(ns).e("prefix"))
151
+ }, {
152
+ default: vue.withCtx(() => [
153
+ vue.createVNode(vue.unref(iconsVue.Check))
154
+ ]),
155
+ _: 1
156
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
157
+ vue.createVNode(vue.unref(nodeContent["default"]), {
158
+ "render-label-fn": vue.unref(panel).renderLabelFn,
159
+ node: __props.node
160
+ }, null, 8, ["render-label-fn", "node"]),
161
+ vue.createCommentVNode(" postfix "),
162
+ !vue.unref(isLeaf) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
163
+ __props.node.loading ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
164
+ key: 0,
165
+ class: vue.normalizeClass([vue.unref(ns).is("loading"), vue.unref(ns).e("postfix")])
166
+ }, {
167
+ default: vue.withCtx(() => [
168
+ vue.createVNode(vue.unref(iconsVue.Loading))
169
+ ]),
170
+ _: 1
171
+ }, 8, ["class"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
172
+ key: 1,
173
+ class: vue.normalizeClass(["arrow-right", vue.unref(ns).e("postfix")])
174
+ }, {
175
+ default: vue.withCtx(() => [
176
+ vue.createVNode(vue.unref(iconsVue.ArrowRight))
177
+ ]),
178
+ _: 1
179
+ }, 8, ["class"]))
180
+ ], 64)) : vue.createCommentVNode("v-if", true)
181
+ ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"]);
182
+ };
81
183
  }
82
- emit() {
83
- var _a;
84
- const { parent } = this;
85
- if (parent) {
86
- (_a = parent.onChildCheck) == null ? void 0 : _a.call(parent);
87
- parent.emit();
88
- }
89
- }
90
- onParentCheck(checked) {
91
- if (!this.isDisabled) {
92
- this.setCheckState(checked);
93
- }
94
- }
95
- onChildCheck() {
96
- const { children } = this;
97
- const validChildren = children.filter((child) => !child.isDisabled);
98
- const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
99
- this.setCheckState(checked);
100
- }
101
- setCheckState(checked) {
102
- const totalNum = this.children.length;
103
- const checkedNum = this.children.reduce((c, p) => {
104
- const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
105
- return c + num;
106
- }, 0);
107
- this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
108
- this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
109
- }
110
- doCheck(checked) {
111
- if (this.checked === checked)
112
- return;
113
- const { checkStrictly, multiple } = this.config;
114
- if (checkStrictly || !multiple) {
115
- this.checked = checked;
116
- } else {
117
- this.broadcast(checked);
118
- this.setCheckState(checked);
119
- this.emit();
120
- }
121
- }
122
- }
184
+ });
185
+ var ElCascaderNode = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "node.vue"]]);
123
186
 
124
- exports["default"] = Node;
187
+ exports["default"] = ElCascaderNode;
125
188
  //# sourceMappingURL=node.js.map