element-plus 2.3.3 → 2.3.5

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 (796) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +323 -225
  4. package/dist/index.full.min.js +18 -18
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +18 -18
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +323 -226
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/az.js +1 -1
  18. package/dist/locale/az.min.js +1 -1
  19. package/dist/locale/az.min.mjs +1 -1
  20. package/dist/locale/az.mjs +1 -1
  21. package/dist/locale/bg.js +1 -1
  22. package/dist/locale/bg.min.js +1 -1
  23. package/dist/locale/bg.min.mjs +1 -1
  24. package/dist/locale/bg.mjs +1 -1
  25. package/dist/locale/bn.js +1 -1
  26. package/dist/locale/bn.min.js +1 -1
  27. package/dist/locale/bn.min.mjs +1 -1
  28. package/dist/locale/bn.mjs +1 -1
  29. package/dist/locale/ca.js +1 -1
  30. package/dist/locale/ca.min.js +1 -1
  31. package/dist/locale/ca.min.mjs +1 -1
  32. package/dist/locale/ca.mjs +1 -1
  33. package/dist/locale/ckb.js +1 -1
  34. package/dist/locale/ckb.min.js +1 -1
  35. package/dist/locale/ckb.min.mjs +1 -1
  36. package/dist/locale/ckb.mjs +1 -1
  37. package/dist/locale/cs.js +1 -1
  38. package/dist/locale/cs.min.js +1 -1
  39. package/dist/locale/cs.min.mjs +1 -1
  40. package/dist/locale/cs.mjs +1 -1
  41. package/dist/locale/da.js +1 -1
  42. package/dist/locale/da.min.js +1 -1
  43. package/dist/locale/da.min.mjs +1 -1
  44. package/dist/locale/da.mjs +1 -1
  45. package/dist/locale/de.js +1 -1
  46. package/dist/locale/de.min.js +1 -1
  47. package/dist/locale/de.min.mjs +1 -1
  48. package/dist/locale/de.mjs +1 -1
  49. package/dist/locale/el.js +1 -1
  50. package/dist/locale/el.min.js +1 -1
  51. package/dist/locale/el.min.mjs +1 -1
  52. package/dist/locale/el.mjs +1 -1
  53. package/dist/locale/en.js +1 -1
  54. package/dist/locale/en.min.js +1 -1
  55. package/dist/locale/en.min.mjs +1 -1
  56. package/dist/locale/en.mjs +1 -1
  57. package/dist/locale/eo.js +1 -1
  58. package/dist/locale/eo.min.js +1 -1
  59. package/dist/locale/eo.min.mjs +1 -1
  60. package/dist/locale/eo.mjs +1 -1
  61. package/dist/locale/es.js +1 -1
  62. package/dist/locale/es.min.js +1 -1
  63. package/dist/locale/es.min.mjs +1 -1
  64. package/dist/locale/es.mjs +1 -1
  65. package/dist/locale/et.js +1 -1
  66. package/dist/locale/et.min.js +1 -1
  67. package/dist/locale/et.min.mjs +1 -1
  68. package/dist/locale/et.mjs +1 -1
  69. package/dist/locale/eu.js +1 -1
  70. package/dist/locale/eu.min.js +1 -1
  71. package/dist/locale/eu.min.mjs +1 -1
  72. package/dist/locale/eu.mjs +1 -1
  73. package/dist/locale/fa.js +21 -21
  74. package/dist/locale/fa.min.js +1 -1
  75. package/dist/locale/fa.min.js.map +1 -1
  76. package/dist/locale/fa.min.mjs +1 -1
  77. package/dist/locale/fa.min.mjs.map +1 -1
  78. package/dist/locale/fa.mjs +21 -21
  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/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/nb-no.js +1 -1
  152. package/dist/locale/nb-no.min.js +1 -1
  153. package/dist/locale/nb-no.min.mjs +1 -1
  154. package/dist/locale/nb-no.mjs +1 -1
  155. package/dist/locale/nl.js +1 -1
  156. package/dist/locale/nl.min.js +1 -1
  157. package/dist/locale/nl.min.mjs +1 -1
  158. package/dist/locale/nl.mjs +1 -1
  159. package/dist/locale/pa.js +1 -1
  160. package/dist/locale/pa.min.js +1 -1
  161. package/dist/locale/pa.min.mjs +1 -1
  162. package/dist/locale/pa.mjs +1 -1
  163. package/dist/locale/pl.js +1 -1
  164. package/dist/locale/pl.min.js +1 -1
  165. package/dist/locale/pl.min.mjs +1 -1
  166. package/dist/locale/pl.mjs +1 -1
  167. package/dist/locale/pt-br.js +1 -1
  168. package/dist/locale/pt-br.min.js +1 -1
  169. package/dist/locale/pt-br.min.mjs +1 -1
  170. package/dist/locale/pt-br.mjs +1 -1
  171. package/dist/locale/pt.js +1 -1
  172. package/dist/locale/pt.min.js +1 -1
  173. package/dist/locale/pt.min.mjs +1 -1
  174. package/dist/locale/pt.mjs +1 -1
  175. package/dist/locale/ro.js +1 -1
  176. package/dist/locale/ro.min.js +1 -1
  177. package/dist/locale/ro.min.mjs +1 -1
  178. package/dist/locale/ro.mjs +1 -1
  179. package/dist/locale/ru.js +1 -1
  180. package/dist/locale/ru.min.js +1 -1
  181. package/dist/locale/ru.min.mjs +1 -1
  182. package/dist/locale/ru.mjs +1 -1
  183. package/dist/locale/sk.js +1 -1
  184. package/dist/locale/sk.min.js +1 -1
  185. package/dist/locale/sk.min.mjs +1 -1
  186. package/dist/locale/sk.mjs +1 -1
  187. package/dist/locale/sl.js +1 -1
  188. package/dist/locale/sl.min.js +1 -1
  189. package/dist/locale/sl.min.mjs +1 -1
  190. package/dist/locale/sl.mjs +1 -1
  191. package/dist/locale/sr.js +1 -1
  192. package/dist/locale/sr.min.js +1 -1
  193. package/dist/locale/sr.min.mjs +1 -1
  194. package/dist/locale/sr.mjs +1 -1
  195. package/dist/locale/sv.js +1 -1
  196. package/dist/locale/sv.min.js +1 -1
  197. package/dist/locale/sv.min.mjs +1 -1
  198. package/dist/locale/sv.mjs +1 -1
  199. package/dist/locale/ta.js +1 -1
  200. package/dist/locale/ta.min.js +1 -1
  201. package/dist/locale/ta.min.mjs +1 -1
  202. package/dist/locale/ta.mjs +1 -1
  203. package/dist/locale/th.js +1 -1
  204. package/dist/locale/th.min.js +1 -1
  205. package/dist/locale/th.min.mjs +1 -1
  206. package/dist/locale/th.mjs +1 -1
  207. package/dist/locale/tk.js +1 -1
  208. package/dist/locale/tk.min.js +1 -1
  209. package/dist/locale/tk.min.mjs +1 -1
  210. package/dist/locale/tk.mjs +1 -1
  211. package/dist/locale/tr.js +1 -1
  212. package/dist/locale/tr.min.js +1 -1
  213. package/dist/locale/tr.min.mjs +1 -1
  214. package/dist/locale/tr.mjs +1 -1
  215. package/dist/locale/ug-cn.js +1 -1
  216. package/dist/locale/ug-cn.min.js +1 -1
  217. package/dist/locale/ug-cn.min.mjs +1 -1
  218. package/dist/locale/ug-cn.mjs +1 -1
  219. package/dist/locale/uk.js +1 -1
  220. package/dist/locale/uk.min.js +1 -1
  221. package/dist/locale/uk.min.mjs +1 -1
  222. package/dist/locale/uk.mjs +1 -1
  223. package/dist/locale/uz-uz.js +1 -1
  224. package/dist/locale/uz-uz.min.js +1 -1
  225. package/dist/locale/uz-uz.min.mjs +1 -1
  226. package/dist/locale/uz-uz.mjs +1 -1
  227. package/dist/locale/vi.js +1 -1
  228. package/dist/locale/vi.min.js +1 -1
  229. package/dist/locale/vi.min.mjs +1 -1
  230. package/dist/locale/vi.mjs +1 -1
  231. package/dist/locale/zh-cn.js +1 -1
  232. package/dist/locale/zh-cn.min.js +1 -1
  233. package/dist/locale/zh-cn.min.mjs +1 -1
  234. package/dist/locale/zh-cn.mjs +1 -1
  235. package/dist/locale/zh-tw.js +1 -1
  236. package/dist/locale/zh-tw.min.js +1 -1
  237. package/dist/locale/zh-tw.min.mjs +1 -1
  238. package/dist/locale/zh-tw.mjs +1 -1
  239. package/es/components/affix/src/affix.mjs +1 -1
  240. package/es/components/avatar/src/avatar.mjs +1 -1
  241. package/es/components/avatar/src/avatar2.mjs +1 -1
  242. package/es/components/badge/src/badge2.mjs +1 -1
  243. package/es/components/button/index.d.ts +15 -0
  244. package/es/components/button/src/button.d.ts +4 -3
  245. package/es/components/button/src/button.mjs +5 -1
  246. package/es/components/button/src/button.mjs.map +1 -1
  247. package/es/components/button/src/button.vue.d.ts +15 -0
  248. package/es/components/button/src/button2.mjs +34 -35
  249. package/es/components/button/src/button2.mjs.map +1 -1
  250. package/es/components/button/src/use-button.d.ts +11 -0
  251. package/es/components/button/src/use-button.mjs +12 -0
  252. package/es/components/button/src/use-button.mjs.map +1 -1
  253. package/es/components/calendar/index.d.ts +15 -0
  254. package/es/components/calendar/src/calendar.vue.d.ts +17 -2
  255. package/es/components/carousel/index.d.ts +10 -0
  256. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -0
  257. package/es/components/carousel/src/carousel-item2.mjs +7 -1
  258. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  259. package/es/components/carousel/src/carousel.mjs +1 -1
  260. package/es/components/carousel/src/carousel.vue.d.ts +8 -0
  261. package/es/components/carousel/src/carousel2.mjs +7 -2
  262. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  263. package/es/components/carousel/src/constants.d.ts +1 -0
  264. package/es/components/carousel/src/constants.mjs.map +1 -1
  265. package/es/components/carousel/src/use-carousel-item.d.ts +1 -0
  266. package/es/components/carousel/src/use-carousel-item.mjs +7 -5
  267. package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
  268. package/es/components/carousel/src/use-carousel.d.ts +8 -0
  269. package/es/components/carousel/src/use-carousel.mjs +21 -1
  270. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  271. package/es/components/cascader/index.d.ts +16 -16
  272. package/es/components/cascader/src/cascader.mjs +1 -1
  273. package/es/components/cascader/src/cascader.vue.d.ts +8 -8
  274. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  275. package/es/components/cascader-panel/src/index.mjs +1 -1
  276. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  277. package/es/components/check-tag/index.d.ts +1 -0
  278. package/es/components/check-tag/src/check-tag.mjs +1 -1
  279. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  280. package/es/components/check-tag/src/check-tag.vue.d.ts +1 -0
  281. package/es/components/check-tag/src/check-tag2.mjs +3 -2
  282. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  283. package/es/components/checkbox/src/checkbox.mjs +1 -1
  284. package/es/components/checkbox/src/composables/use-checkbox-status.mjs +1 -1
  285. package/es/components/col/src/col2.mjs +1 -1
  286. package/es/components/collapse/src/collapse.mjs +1 -1
  287. package/es/components/color-picker/index.d.ts +15 -0
  288. package/es/components/color-picker/src/color-picker.vue.d.ts +15 -0
  289. package/es/components/color-picker/src/utils/draggable.mjs +1 -0
  290. package/es/components/color-picker/src/utils/draggable.mjs.map +1 -1
  291. package/es/components/countdown/src/countdown.mjs +1 -1
  292. package/es/components/countdown/src/utils.mjs +1 -1
  293. package/es/components/date-picker/index.d.ts +173 -172
  294. package/es/components/date-picker/index.mjs +1 -0
  295. package/es/components/date-picker/index.mjs.map +1 -1
  296. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
  297. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
  298. package/es/components/date-picker/src/date-picker.d.ts +86 -86
  299. package/es/components/date-picker/src/date-picker.mjs +1 -5
  300. package/es/components/date-picker/src/date-picker.mjs.map +1 -1
  301. package/es/components/date-picker/src/panel-utils.d.ts +30 -0
  302. package/es/components/date-picker/src/props/date-picker.d.ts +77 -0
  303. package/es/components/date-picker/src/props/date-picker.mjs +3 -0
  304. package/es/components/date-picker/src/props/date-picker.mjs.map +1 -1
  305. package/es/components/dialog/src/dialog.mjs +1 -1
  306. package/es/components/dialog/src/use-dialog.mjs.map +1 -1
  307. package/es/components/dropdown/index.d.ts +1 -0
  308. package/es/components/dropdown/index.mjs +1 -0
  309. package/es/components/dropdown/index.mjs.map +1 -1
  310. package/es/components/dropdown/src/instance.d.ts +2 -0
  311. package/es/components/dropdown/src/instance.mjs +2 -0
  312. package/es/components/dropdown/src/instance.mjs.map +1 -0
  313. package/es/components/empty/src/empty.mjs.map +1 -1
  314. package/es/components/form/src/form-item2.mjs +2 -1
  315. package/es/components/form/src/form-item2.mjs.map +1 -1
  316. package/es/components/form/src/form.mjs +1 -1
  317. package/es/components/image/src/image.mjs +1 -1
  318. package/es/components/image/src/image2.mjs +31 -29
  319. package/es/components/image/src/image2.mjs.map +1 -1
  320. package/es/components/image-viewer/src/image-viewer.mjs +1 -1
  321. package/es/components/image-viewer/src/image-viewer2.mjs +2 -1
  322. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  323. package/es/components/index.mjs +1 -0
  324. package/es/components/index.mjs.map +1 -1
  325. package/es/components/input/src/input2.mjs.map +1 -1
  326. package/es/components/input/src/utils.mjs +1 -1
  327. package/es/components/input-number/src/input-number.mjs +1 -1
  328. package/es/components/input-number/src/input-number2.mjs +5 -3
  329. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  330. package/es/components/loading/src/loading.mjs +1 -4
  331. package/es/components/loading/src/loading.mjs.map +1 -1
  332. package/es/components/loading/src/service.mjs +4 -4
  333. package/es/components/loading/src/service.mjs.map +1 -1
  334. package/es/components/menu/src/menu.mjs +1 -1
  335. package/es/components/menu/src/menu.mjs.map +1 -1
  336. package/es/components/menu/src/sub-menu.mjs +1 -1
  337. package/es/components/menu/src/sub-menu.mjs.map +1 -1
  338. package/es/components/message/src/message.mjs +1 -1
  339. package/es/components/message/src/message.mjs.map +1 -1
  340. package/es/components/message/src/method.mjs +2 -2
  341. package/es/components/message/src/method.mjs.map +1 -1
  342. package/es/components/message-box/src/messageBox.mjs +1 -1
  343. package/es/components/message-box/src/messageBox.mjs.map +1 -1
  344. package/es/components/notification/src/notify.mjs +1 -1
  345. package/es/components/notification/src/notify.mjs.map +1 -1
  346. package/es/components/page-header/src/page-header.mjs.map +1 -1
  347. package/es/components/pagination/src/pagination.mjs +1 -1
  348. package/es/components/popconfirm/index.d.ts +15 -0
  349. package/es/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
  350. package/es/components/popover/src/popover.mjs +1 -1
  351. package/es/components/popper/src/utils.d.ts +1 -1
  352. package/es/components/popper/src/utils.mjs +1 -0
  353. package/es/components/popper/src/utils.mjs.map +1 -1
  354. package/es/components/progress/index.d.ts +8 -0
  355. package/es/components/progress/src/progress.d.ts +2 -0
  356. package/es/components/progress/src/progress.mjs +2 -0
  357. package/es/components/progress/src/progress.mjs.map +1 -1
  358. package/es/components/progress/src/progress.vue.d.ts +8 -0
  359. package/es/components/progress/src/progress2.mjs +3 -1
  360. package/es/components/progress/src/progress2.mjs.map +1 -1
  361. package/es/components/radio/src/radio.mjs +1 -1
  362. package/es/components/rate/src/rate.mjs +1 -1
  363. package/es/components/result/src/result.mjs.map +1 -1
  364. package/es/components/scrollbar/src/scrollbar.mjs +1 -1
  365. package/es/components/scrollbar/src/scrollbar2.mjs +2 -1
  366. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  367. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  368. package/es/components/select/src/select.mjs.map +1 -1
  369. package/es/components/select/src/useSelect.mjs +10 -3
  370. package/es/components/select/src/useSelect.mjs.map +1 -1
  371. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  372. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  373. package/es/components/slider/src/button.mjs +1 -1
  374. package/es/components/slider/src/slider.mjs +1 -1
  375. package/es/components/space/src/space.mjs +1 -1
  376. package/es/components/space/src/use-space.mjs +1 -1
  377. package/es/components/statistic/src/statistic2.mjs +1 -1
  378. package/es/components/steps/index.d.ts +2 -0
  379. package/es/components/steps/src/item.vue.d.ts +1 -0
  380. package/es/components/steps/src/item2.mjs +10 -7
  381. package/es/components/steps/src/item2.mjs.map +1 -1
  382. package/es/components/steps/src/steps.mjs +1 -1
  383. package/es/components/switch/src/switch.mjs +1 -1
  384. package/es/components/switch/src/switch2.mjs +1 -1
  385. package/es/components/table/src/composables/use-scrollbar.mjs +1 -1
  386. package/es/components/table/src/table-body/index.mjs +1 -1
  387. package/es/components/table/src/table-body/index.mjs.map +1 -1
  388. package/es/components/table/src/table-header/event-helper.mjs +7 -3
  389. package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
  390. package/es/components/table/src/table-layout.mjs +1 -1
  391. package/es/components/table/src/table-layout.mjs.map +1 -1
  392. package/es/components/table/src/util.mjs +1 -1
  393. package/es/components/table-v2/src/components/row.mjs +1 -1
  394. package/es/components/table-v2/src/composables/use-row.mjs +1 -1
  395. package/es/components/table-v2/src/composables/use-styles.mjs +1 -1
  396. package/es/components/table-v2/src/renderers/cell.mjs +1 -1
  397. package/es/components/table-v2/src/renderers/cell.mjs.map +1 -1
  398. package/es/components/table-v2/src/table-grid.mjs +1 -1
  399. package/es/components/tabs/src/tabs.mjs +1 -2
  400. package/es/components/tabs/src/tabs.mjs.map +1 -1
  401. package/es/components/tag/index.d.ts +8 -8
  402. package/es/components/tag/src/tag.d.ts +2 -2
  403. package/es/components/tag/src/tag.mjs +2 -2
  404. package/es/components/tag/src/tag.mjs.map +1 -1
  405. package/es/components/tag/src/tag.vue.d.ts +8 -8
  406. package/es/components/tag/src/tag2.mjs +3 -3
  407. package/es/components/tag/src/tag2.mjs.map +1 -1
  408. package/es/components/time-picker/src/common/props.d.ts +27 -9
  409. package/es/components/time-picker/src/common/props.mjs.map +1 -1
  410. package/es/components/time-picker/src/props/shared.mjs.map +1 -1
  411. package/es/components/time-picker/src/time-picker.d.ts +6 -0
  412. package/es/components/time-picker/src/time-picker.mjs.map +1 -1
  413. package/es/components/time-select/src/time-select.mjs.map +1 -1
  414. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  415. package/es/components/timeline/index.d.ts +38 -0
  416. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  417. package/es/components/timeline/src/timeline-item.vue.d.ts +19 -0
  418. package/es/components/timeline/src/timeline-item2.mjs +9 -7
  419. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  420. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  421. package/es/components/tooltip-v2/src/root2.mjs +2 -2
  422. package/es/components/transfer/index.d.ts +15 -0
  423. package/es/components/transfer/src/transfer.vue.d.ts +15 -0
  424. package/es/components/tree/index.d.ts +2 -2
  425. package/es/components/tree/src/model/useDragNode.mjs +2 -2
  426. package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
  427. package/es/components/tree/src/tree.mjs +9 -5
  428. package/es/components/tree/src/tree.mjs.map +1 -1
  429. package/es/components/tree/src/tree.type.d.ts +1 -1
  430. package/es/components/tree/src/tree.vue.d.ts +1 -1
  431. package/es/components/tree-select/src/tree-select.mjs.map +1 -1
  432. package/es/components/tree-select/src/tree.mjs +20 -3
  433. package/es/components/tree-select/src/tree.mjs.map +1 -1
  434. package/es/components/upload/index.d.ts +8 -0
  435. package/es/components/upload/src/upload-content2.mjs +5 -1
  436. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  437. package/es/components/upload/src/upload-list.vue.d.ts +8 -0
  438. package/es/components/upload/src/upload.vue.d.ts +8 -0
  439. package/es/components/virtual-list/src/builders/build-grid.mjs +2 -1
  440. package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
  441. package/es/components/virtual-list/src/builders/build-list.mjs +2 -1
  442. package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
  443. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +1 -2
  444. package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
  445. package/es/components/virtual-list/src/components/fixed-size-grid.mjs +1 -1
  446. package/es/directives/click-outside/index.mjs +1 -1
  447. package/es/directives/click-outside/index.mjs.map +1 -1
  448. package/es/hooks/use-delayed-toggle/index.mjs +1 -1
  449. package/es/hooks/use-escape-keydown/index.mjs +2 -1
  450. package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
  451. package/es/hooks/use-floating/index.mjs.map +1 -1
  452. package/es/hooks/use-id/index.mjs +1 -1
  453. package/es/hooks/use-id/index.mjs.map +1 -1
  454. package/es/hooks/use-lockscreen/index.mjs +1 -1
  455. package/es/hooks/use-lockscreen/index.mjs.map +1 -1
  456. package/es/hooks/use-model-toggle/index.mjs +2 -1
  457. package/es/hooks/use-model-toggle/index.mjs.map +1 -1
  458. package/es/hooks/use-popper-container/index.mjs +2 -1
  459. package/es/hooks/use-popper-container/index.mjs.map +1 -1
  460. package/es/hooks/use-teleport/index.mjs +1 -1
  461. package/es/hooks/use-teleport/index.mjs.map +1 -1
  462. package/es/hooks/use-z-index/index.mjs +1 -1
  463. package/es/index.mjs +1 -0
  464. package/es/index.mjs.map +1 -1
  465. package/es/locale/lang/fa.mjs +20 -20
  466. package/es/locale/lang/fa.mjs.map +1 -1
  467. package/es/utils/browser.d.ts +2 -0
  468. package/es/utils/browser.mjs +1 -0
  469. package/es/utils/browser.mjs.map +1 -1
  470. package/es/utils/dom/position.mjs +1 -0
  471. package/es/utils/dom/position.mjs.map +1 -1
  472. package/es/utils/dom/scroll.mjs +2 -1
  473. package/es/utils/dom/scroll.mjs.map +1 -1
  474. package/es/utils/dom/style.mjs +3 -2
  475. package/es/utils/dom/style.mjs.map +1 -1
  476. package/es/utils/i18n.mjs +1 -1
  477. package/es/utils/i18n.mjs.map +1 -1
  478. package/es/utils/index.mjs +2 -2
  479. package/es/utils/raf.mjs +1 -0
  480. package/es/utils/raf.mjs.map +1 -1
  481. package/es/utils/types.d.ts +2 -1
  482. package/es/utils/types.mjs +3 -2
  483. package/es/utils/types.mjs.map +1 -1
  484. package/es/utils/vue/global-node.mjs +1 -0
  485. package/es/utils/vue/global-node.mjs.map +1 -1
  486. package/es/version.d.ts +1 -1
  487. package/es/version.mjs +1 -1
  488. package/es/version.mjs.map +1 -1
  489. package/lib/components/affix/src/affix.js +3 -3
  490. package/lib/components/affix/src/affix.js.map +1 -1
  491. package/lib/components/avatar/src/avatar.js +2 -2
  492. package/lib/components/avatar/src/avatar.js.map +1 -1
  493. package/lib/components/avatar/src/avatar2.js +2 -2
  494. package/lib/components/avatar/src/avatar2.js.map +1 -1
  495. package/lib/components/badge/src/badge2.js +2 -2
  496. package/lib/components/badge/src/badge2.js.map +1 -1
  497. package/lib/components/button/index.d.ts +15 -0
  498. package/lib/components/button/src/button.d.ts +4 -3
  499. package/lib/components/button/src/button.js +4 -0
  500. package/lib/components/button/src/button.js.map +1 -1
  501. package/lib/components/button/src/button.vue.d.ts +15 -0
  502. package/lib/components/button/src/button2.js +33 -34
  503. package/lib/components/button/src/button2.js.map +1 -1
  504. package/lib/components/button/src/use-button.d.ts +11 -0
  505. package/lib/components/button/src/use-button.js +12 -0
  506. package/lib/components/button/src/use-button.js.map +1 -1
  507. package/lib/components/calendar/index.d.ts +15 -0
  508. package/lib/components/calendar/src/calendar.vue.d.ts +17 -2
  509. package/lib/components/carousel/index.d.ts +10 -0
  510. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -0
  511. package/lib/components/carousel/src/carousel-item2.js +7 -1
  512. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  513. package/lib/components/carousel/src/carousel.js +2 -2
  514. package/lib/components/carousel/src/carousel.js.map +1 -1
  515. package/lib/components/carousel/src/carousel.vue.d.ts +8 -0
  516. package/lib/components/carousel/src/carousel2.js +7 -2
  517. package/lib/components/carousel/src/carousel2.js.map +1 -1
  518. package/lib/components/carousel/src/constants.d.ts +1 -0
  519. package/lib/components/carousel/src/constants.js.map +1 -1
  520. package/lib/components/carousel/src/use-carousel-item.d.ts +1 -0
  521. package/lib/components/carousel/src/use-carousel-item.js +7 -5
  522. package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
  523. package/lib/components/carousel/src/use-carousel.d.ts +8 -0
  524. package/lib/components/carousel/src/use-carousel.js +21 -1
  525. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  526. package/lib/components/cascader/index.d.ts +16 -16
  527. package/lib/components/cascader/src/cascader.js +2 -2
  528. package/lib/components/cascader/src/cascader.js.map +1 -1
  529. package/lib/components/cascader/src/cascader.vue.d.ts +8 -8
  530. package/lib/components/cascader/src/cascader2.js.map +1 -1
  531. package/lib/components/cascader-panel/src/index.js +1 -1
  532. package/lib/components/cascader-panel/src/index.js.map +1 -1
  533. package/lib/components/check-tag/index.d.ts +1 -0
  534. package/lib/components/check-tag/src/check-tag.js +3 -3
  535. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  536. package/lib/components/check-tag/src/check-tag.vue.d.ts +1 -0
  537. package/lib/components/check-tag/src/check-tag2.js +2 -1
  538. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  539. package/lib/components/checkbox/src/checkbox.js +3 -3
  540. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  541. package/lib/components/checkbox/src/composables/use-checkbox-status.js +2 -2
  542. package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
  543. package/lib/components/col/src/col2.js +3 -3
  544. package/lib/components/col/src/col2.js.map +1 -1
  545. package/lib/components/collapse/src/collapse.js +2 -2
  546. package/lib/components/collapse/src/collapse.js.map +1 -1
  547. package/lib/components/color-picker/index.d.ts +15 -0
  548. package/lib/components/color-picker/src/color-picker.vue.d.ts +15 -0
  549. package/lib/components/color-picker/src/utils/draggable.js +1 -0
  550. package/lib/components/color-picker/src/utils/draggable.js.map +1 -1
  551. package/lib/components/countdown/src/countdown.js +2 -2
  552. package/lib/components/countdown/src/countdown.js.map +1 -1
  553. package/lib/components/countdown/src/utils.js +2 -2
  554. package/lib/components/countdown/src/utils.js.map +1 -1
  555. package/lib/components/date-picker/index.d.ts +173 -172
  556. package/lib/components/date-picker/index.js +4 -2
  557. package/lib/components/date-picker/index.js.map +1 -1
  558. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
  559. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
  560. package/lib/components/date-picker/src/date-picker.d.ts +86 -86
  561. package/lib/components/date-picker/src/date-picker.js +1 -5
  562. package/lib/components/date-picker/src/date-picker.js.map +1 -1
  563. package/lib/components/date-picker/src/panel-utils.d.ts +30 -0
  564. package/lib/components/date-picker/src/props/date-picker.d.ts +77 -0
  565. package/lib/components/date-picker/src/props/date-picker.js +3 -0
  566. package/lib/components/date-picker/src/props/date-picker.js.map +1 -1
  567. package/lib/components/dialog/src/dialog.js +2 -2
  568. package/lib/components/dialog/src/dialog.js.map +1 -1
  569. package/lib/components/dialog/src/use-dialog.js.map +1 -1
  570. package/lib/components/dropdown/index.d.ts +1 -0
  571. package/lib/components/dropdown/index.js +1 -0
  572. package/lib/components/dropdown/index.js.map +1 -1
  573. package/lib/components/dropdown/src/instance.d.ts +2 -0
  574. package/lib/components/dropdown/src/instance.js +3 -0
  575. package/lib/components/dropdown/src/instance.js.map +1 -0
  576. package/lib/components/empty/src/empty.js.map +1 -1
  577. package/lib/components/form/src/form-item2.js +2 -1
  578. package/lib/components/form/src/form-item2.js.map +1 -1
  579. package/lib/components/form/src/form.js +2 -2
  580. package/lib/components/form/src/form.js.map +1 -1
  581. package/lib/components/image/src/image.js +2 -2
  582. package/lib/components/image/src/image.js.map +1 -1
  583. package/lib/components/image/src/image2.js +30 -28
  584. package/lib/components/image/src/image2.js.map +1 -1
  585. package/lib/components/image-viewer/src/image-viewer.js +2 -2
  586. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  587. package/lib/components/image-viewer/src/image-viewer2.js +2 -1
  588. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  589. package/lib/components/index.js +2 -0
  590. package/lib/components/index.js.map +1 -1
  591. package/lib/components/input/src/input2.js.map +1 -1
  592. package/lib/components/input/src/utils.js +3 -3
  593. package/lib/components/input/src/utils.js.map +1 -1
  594. package/lib/components/input-number/src/input-number.js +4 -4
  595. package/lib/components/input-number/src/input-number.js.map +1 -1
  596. package/lib/components/input-number/src/input-number2.js +10 -8
  597. package/lib/components/input-number/src/input-number2.js.map +1 -1
  598. package/lib/components/loading/src/loading.js +1 -4
  599. package/lib/components/loading/src/loading.js.map +1 -1
  600. package/lib/components/loading/src/service.js +4 -4
  601. package/lib/components/loading/src/service.js.map +1 -1
  602. package/lib/components/menu/src/menu.js +1 -1
  603. package/lib/components/menu/src/menu.js.map +1 -1
  604. package/lib/components/menu/src/sub-menu.js +1 -1
  605. package/lib/components/menu/src/sub-menu.js.map +1 -1
  606. package/lib/components/message/src/message.js +1 -1
  607. package/lib/components/message/src/message.js.map +1 -1
  608. package/lib/components/message/src/method.js +2 -2
  609. package/lib/components/message/src/method.js.map +1 -1
  610. package/lib/components/message-box/src/messageBox.js +1 -1
  611. package/lib/components/message-box/src/messageBox.js.map +1 -1
  612. package/lib/components/notification/src/notify.js +1 -1
  613. package/lib/components/notification/src/notify.js.map +1 -1
  614. package/lib/components/page-header/src/page-header.js.map +1 -1
  615. package/lib/components/pagination/src/pagination.js +8 -8
  616. package/lib/components/pagination/src/pagination.js.map +1 -1
  617. package/lib/components/popconfirm/index.d.ts +15 -0
  618. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
  619. package/lib/components/popover/src/popover.js +2 -2
  620. package/lib/components/popover/src/popover.js.map +1 -1
  621. package/lib/components/popper/src/utils.d.ts +1 -1
  622. package/lib/components/popper/src/utils.js +1 -0
  623. package/lib/components/popper/src/utils.js.map +1 -1
  624. package/lib/components/progress/index.d.ts +8 -0
  625. package/lib/components/progress/src/progress.d.ts +2 -0
  626. package/lib/components/progress/src/progress.js +2 -0
  627. package/lib/components/progress/src/progress.js.map +1 -1
  628. package/lib/components/progress/src/progress.vue.d.ts +8 -0
  629. package/lib/components/progress/src/progress2.js +3 -1
  630. package/lib/components/progress/src/progress2.js.map +1 -1
  631. package/lib/components/radio/src/radio.js +3 -3
  632. package/lib/components/radio/src/radio.js.map +1 -1
  633. package/lib/components/rate/src/rate.js +3 -3
  634. package/lib/components/rate/src/rate.js.map +1 -1
  635. package/lib/components/result/src/result.js.map +1 -1
  636. package/lib/components/scrollbar/src/scrollbar.js +2 -2
  637. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  638. package/lib/components/scrollbar/src/scrollbar2.js +4 -3
  639. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  640. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  641. package/lib/components/select/src/select.js.map +1 -1
  642. package/lib/components/select/src/useSelect.js +11 -4
  643. package/lib/components/select/src/useSelect.js.map +1 -1
  644. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  645. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  646. package/lib/components/slider/src/button.js +2 -2
  647. package/lib/components/slider/src/button.js.map +1 -1
  648. package/lib/components/slider/src/slider.js +2 -2
  649. package/lib/components/slider/src/slider.js.map +1 -1
  650. package/lib/components/space/src/space.js +3 -3
  651. package/lib/components/space/src/space.js.map +1 -1
  652. package/lib/components/space/src/use-space.js +2 -2
  653. package/lib/components/space/src/use-space.js.map +1 -1
  654. package/lib/components/statistic/src/statistic2.js +2 -2
  655. package/lib/components/statistic/src/statistic2.js.map +1 -1
  656. package/lib/components/steps/index.d.ts +2 -0
  657. package/lib/components/steps/src/item.vue.d.ts +1 -0
  658. package/lib/components/steps/src/item2.js +11 -8
  659. package/lib/components/steps/src/item2.js.map +1 -1
  660. package/lib/components/steps/src/steps.js +2 -2
  661. package/lib/components/steps/src/steps.js.map +1 -1
  662. package/lib/components/switch/src/switch.js +4 -4
  663. package/lib/components/switch/src/switch.js.map +1 -1
  664. package/lib/components/switch/src/switch2.js +4 -4
  665. package/lib/components/switch/src/switch2.js.map +1 -1
  666. package/lib/components/table/src/composables/use-scrollbar.js +2 -2
  667. package/lib/components/table/src/composables/use-scrollbar.js.map +1 -1
  668. package/lib/components/table/src/table-body/index.js +1 -1
  669. package/lib/components/table/src/table-body/index.js.map +1 -1
  670. package/lib/components/table/src/table-header/event-helper.js +7 -3
  671. package/lib/components/table/src/table-header/event-helper.js.map +1 -1
  672. package/lib/components/table/src/table-layout.js +1 -1
  673. package/lib/components/table/src/table-layout.js.map +1 -1
  674. package/lib/components/table/src/util.js +4 -4
  675. package/lib/components/table/src/util.js.map +1 -1
  676. package/lib/components/table-v2/src/components/row.js +2 -2
  677. package/lib/components/table-v2/src/components/row.js.map +1 -1
  678. package/lib/components/table-v2/src/composables/use-row.js +2 -2
  679. package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
  680. package/lib/components/table-v2/src/composables/use-styles.js +3 -3
  681. package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
  682. package/lib/components/table-v2/src/renderers/cell.js +1 -1
  683. package/lib/components/table-v2/src/renderers/cell.js.map +1 -1
  684. package/lib/components/table-v2/src/table-grid.js +2 -2
  685. package/lib/components/table-v2/src/table-grid.js.map +1 -1
  686. package/lib/components/tabs/src/tabs.js +2 -3
  687. package/lib/components/tabs/src/tabs.js.map +1 -1
  688. package/lib/components/tag/index.d.ts +8 -8
  689. package/lib/components/tag/src/tag.d.ts +2 -2
  690. package/lib/components/tag/src/tag.js +2 -2
  691. package/lib/components/tag/src/tag.js.map +1 -1
  692. package/lib/components/tag/src/tag.vue.d.ts +8 -8
  693. package/lib/components/tag/src/tag2.js +3 -3
  694. package/lib/components/tag/src/tag2.js.map +1 -1
  695. package/lib/components/time-picker/src/common/props.d.ts +27 -9
  696. package/lib/components/time-picker/src/common/props.js.map +1 -1
  697. package/lib/components/time-picker/src/props/shared.js.map +1 -1
  698. package/lib/components/time-picker/src/time-picker.d.ts +6 -0
  699. package/lib/components/time-picker/src/time-picker.js.map +1 -1
  700. package/lib/components/time-select/src/time-select.js.map +1 -1
  701. package/lib/components/time-select/src/time-select2.js.map +1 -1
  702. package/lib/components/timeline/index.d.ts +38 -0
  703. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  704. package/lib/components/timeline/src/timeline-item.vue.d.ts +19 -0
  705. package/lib/components/timeline/src/timeline-item2.js +8 -6
  706. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  707. package/lib/components/tooltip/src/tooltip2.js +2 -2
  708. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  709. package/lib/components/tooltip-v2/src/root2.js +1 -1
  710. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  711. package/lib/components/transfer/index.d.ts +15 -0
  712. package/lib/components/transfer/src/transfer.vue.d.ts +15 -0
  713. package/lib/components/tree/index.d.ts +2 -2
  714. package/lib/components/tree/src/model/useDragNode.js +2 -2
  715. package/lib/components/tree/src/model/useDragNode.js.map +1 -1
  716. package/lib/components/tree/src/tree.js +8 -4
  717. package/lib/components/tree/src/tree.js.map +1 -1
  718. package/lib/components/tree/src/tree.type.d.ts +1 -1
  719. package/lib/components/tree/src/tree.vue.d.ts +1 -1
  720. package/lib/components/tree-select/src/tree-select.js.map +1 -1
  721. package/lib/components/tree-select/src/tree.js +20 -3
  722. package/lib/components/tree-select/src/tree.js.map +1 -1
  723. package/lib/components/upload/index.d.ts +8 -0
  724. package/lib/components/upload/src/upload-content2.js +4 -0
  725. package/lib/components/upload/src/upload-content2.js.map +1 -1
  726. package/lib/components/upload/src/upload-list.vue.d.ts +8 -0
  727. package/lib/components/upload/src/upload.vue.d.ts +8 -0
  728. package/lib/components/virtual-list/src/builders/build-grid.js +8 -7
  729. package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
  730. package/lib/components/virtual-list/src/builders/build-list.js +6 -5
  731. package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
  732. package/lib/components/virtual-list/src/components/dynamic-size-grid.js +2 -3
  733. package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
  734. package/lib/components/virtual-list/src/components/fixed-size-grid.js +3 -3
  735. package/lib/components/virtual-list/src/components/fixed-size-grid.js.map +1 -1
  736. package/lib/directives/click-outside/index.js +1 -1
  737. package/lib/directives/click-outside/index.js.map +1 -1
  738. package/lib/hooks/use-delayed-toggle/index.js +2 -2
  739. package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
  740. package/lib/hooks/use-escape-keydown/index.js +2 -1
  741. package/lib/hooks/use-escape-keydown/index.js.map +1 -1
  742. package/lib/hooks/use-floating/index.js.map +1 -1
  743. package/lib/hooks/use-id/index.js +1 -1
  744. package/lib/hooks/use-id/index.js.map +1 -1
  745. package/lib/hooks/use-lockscreen/index.js +1 -1
  746. package/lib/hooks/use-lockscreen/index.js.map +1 -1
  747. package/lib/hooks/use-model-toggle/index.js +3 -2
  748. package/lib/hooks/use-model-toggle/index.js.map +1 -1
  749. package/lib/hooks/use-popper-container/index.js +2 -1
  750. package/lib/hooks/use-popper-container/index.js.map +1 -1
  751. package/lib/hooks/use-teleport/index.js +1 -1
  752. package/lib/hooks/use-teleport/index.js.map +1 -1
  753. package/lib/hooks/use-z-index/index.js +2 -2
  754. package/lib/hooks/use-z-index/index.js.map +1 -1
  755. package/lib/index.js +2 -0
  756. package/lib/index.js.map +1 -1
  757. package/lib/locale/lang/fa.js +20 -20
  758. package/lib/locale/lang/fa.js.map +1 -1
  759. package/lib/utils/browser.d.ts +2 -0
  760. package/lib/utils/browser.js +8 -0
  761. package/lib/utils/browser.js.map +1 -1
  762. package/lib/utils/dom/position.js +1 -0
  763. package/lib/utils/dom/position.js.map +1 -1
  764. package/lib/utils/dom/scroll.js +2 -1
  765. package/lib/utils/dom/scroll.js.map +1 -1
  766. package/lib/utils/dom/style.js +3 -2
  767. package/lib/utils/dom/style.js.map +1 -1
  768. package/lib/utils/i18n.js +1 -1
  769. package/lib/utils/i18n.js.map +1 -1
  770. package/lib/utils/index.js +11 -9
  771. package/lib/utils/index.js.map +1 -1
  772. package/lib/utils/raf.js +1 -0
  773. package/lib/utils/raf.js.map +1 -1
  774. package/lib/utils/types.d.ts +2 -1
  775. package/lib/utils/types.js +4 -9
  776. package/lib/utils/types.js.map +1 -1
  777. package/lib/utils/vue/global-node.js +1 -0
  778. package/lib/utils/vue/global-node.js.map +1 -1
  779. package/lib/version.d.ts +1 -1
  780. package/lib/version.js +1 -1
  781. package/lib/version.js.map +1 -1
  782. package/package.json +2 -2
  783. package/tags.json +1 -1
  784. package/theme-chalk/el-carousel-item.css +1 -1
  785. package/theme-chalk/el-carousel.css +1 -1
  786. package/theme-chalk/el-menu.css +1 -1
  787. package/theme-chalk/el-progress.css +1 -1
  788. package/theme-chalk/el-transfer.css +1 -1
  789. package/theme-chalk/index.css +1 -1
  790. package/theme-chalk/src/carousel-item.scss +8 -0
  791. package/theme-chalk/src/carousel.scss +9 -2
  792. package/theme-chalk/src/menu.scss +1 -0
  793. package/theme-chalk/src/progress.scss +27 -0
  794. package/theme-chalk/src/text.scss +1 -1
  795. package/theme-chalk/src/transfer.scss +1 -2
  796. package/web-types.json +1 -1
@@ -11,7 +11,6 @@ var buttonCustom = require('./button-custom.js');
11
11
  var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
12
  var index = require('../../../hooks/use-namespace/index.js');
13
13
 
14
- const _hoisted_1 = ["aria-disabled", "disabled", "autofocus", "type"];
15
14
  const __default__ = vue.defineComponent({
16
15
  name: "ElButton"
17
16
  });
@@ -23,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
23
22
  const props = __props;
24
23
  const buttonStyle = buttonCustom.useButtonCustomStyle(props);
25
24
  const ns = index.useNamespace("button");
26
- const { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } = useButton.useButton(props, emit);
25
+ const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton.useButton(props, emit);
27
26
  expose({
28
27
  ref: _ref,
29
28
  size: _size,
@@ -32,10 +31,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
32
31
  shouldAddSpace
33
32
  });
34
33
  return (_ctx, _cache) => {
35
- return vue.openBlock(), vue.createElementBlock("button", {
34
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), vue.mergeProps({
36
35
  ref_key: "_ref",
37
- ref: _ref,
38
- class: vue.normalizeClass([
36
+ ref: _ref
37
+ }, vue.unref(_props), {
38
+ class: [
39
39
  vue.unref(ns).b(),
40
40
  vue.unref(ns).m(vue.unref(_type)),
41
41
  vue.unref(ns).m(vue.unref(_size)),
@@ -47,37 +47,36 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
47
47
  vue.unref(ns).is("text", _ctx.text),
48
48
  vue.unref(ns).is("link", _ctx.link),
49
49
  vue.unref(ns).is("has-bg", _ctx.bg)
50
- ]),
51
- "aria-disabled": vue.unref(_disabled) || _ctx.loading,
52
- disabled: vue.unref(_disabled) || _ctx.loading,
53
- autofocus: _ctx.autofocus,
54
- type: _ctx.nativeType,
55
- style: vue.normalizeStyle(vue.unref(buttonStyle)),
56
- onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleClick) && vue.unref(handleClick)(...args))
57
- }, [
58
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
59
- _ctx.$slots.loading ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
60
- key: 1,
61
- class: vue.normalizeClass(vue.unref(ns).is("loading"))
62
- }, {
50
+ ],
51
+ style: vue.unref(buttonStyle),
52
+ onClick: vue.unref(handleClick)
53
+ }), {
54
+ default: vue.withCtx(() => [
55
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
56
+ _ctx.$slots.loading ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
57
+ key: 1,
58
+ class: vue.normalizeClass(vue.unref(ns).is("loading"))
59
+ }, {
60
+ default: vue.withCtx(() => [
61
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.loadingIcon)))
62
+ ]),
63
+ _: 1
64
+ }, 8, ["class"]))
65
+ ], 64)) : _ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
63
66
  default: vue.withCtx(() => [
64
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.loadingIcon)))
67
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), { key: 0 })) : vue.renderSlot(_ctx.$slots, "icon", { key: 1 })
65
68
  ]),
66
- _: 1
67
- }, 8, ["class"]))
68
- ], 64)) : _ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
69
- default: vue.withCtx(() => [
70
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), { key: 0 })) : vue.renderSlot(_ctx.$slots, "icon", { key: 1 })
71
- ]),
72
- _: 3
73
- })) : vue.createCommentVNode("v-if", true),
74
- _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
75
- key: 2,
76
- class: vue.normalizeClass({ [vue.unref(ns).em("text", "expand")]: vue.unref(shouldAddSpace) })
77
- }, [
78
- vue.renderSlot(_ctx.$slots, "default")
79
- ], 2)) : vue.createCommentVNode("v-if", true)
80
- ], 14, _hoisted_1);
69
+ _: 3
70
+ })) : vue.createCommentVNode("v-if", true),
71
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
72
+ key: 2,
73
+ class: vue.normalizeClass({ [vue.unref(ns).em("text", "expand")]: vue.unref(shouldAddSpace) })
74
+ }, [
75
+ vue.renderSlot(_ctx.$slots, "default")
76
+ ], 2)) : vue.createCommentVNode("v-if", true)
77
+ ]),
78
+ _: 3
79
+ }, 16, ["class", "style", "onClick"]);
81
80
  };
82
81
  }
83
82
  });
@@ -1 +1 @@
1
- {"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <button\n ref=\"_ref\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ns.is('text', text),\n ns.is('link', link),\n ns.is('has-bg', bg),\n ]\"\n :aria-disabled=\"_disabled || loading\"\n :disabled=\"_disabled || loading\"\n :autofocus=\"autofocus\"\n :type=\"nativeType\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits, buttonProps } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } =\n useButton(props, emit)\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":["useButtonCustomStyle","useNamespace","useButton"],"mappings":";;;;;;;;;;;;;;uCAiDc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAcA,kCAAqB,KAAK,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,MAAM,KAAO,EAAA,KAAA,EAAO,WAAW,cAAgB,EAAA,WAAA,EAAA,GACrDC,mBAAU,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEvB,IAAa,MAAA,CAAA;AAAA,MAEX,GAAK,EAAA,IAAA;AAAA,MAEL,IAAM,EAAA,KAAA;AAAA,MAEN,IAAM,EAAA,KAAA;AAAA,MAEN,QAAU,EAAA,SAAA;AAAA,MAEV,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ns.is('text', text),\n ns.is('link', link),\n ns.is('has-bg', bg),\n ]\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits, buttonProps } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } =\n useButton(props, emit)\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":["useButtonCustomStyle","useNamespace","useButton"],"mappings":";;;;;;;;;;;;;uCA+Cc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAcA,kCAAqB,KAAK,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAO,KAAO,EAAA,SAAA,EAAW,QAAQ,cAAgB,EAAA,WAAA,EAAA,GAC7DC,mBAAU,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEvB,IAAa,MAAA,CAAA;AAAA,MAEX,GAAK,EAAA,IAAA;AAAA,MAEL,IAAM,EAAA,KAAA;AAAA,MAEN,IAAM,EAAA,KAAA;AAAA,MAEN,QAAU,EAAA,SAAA;AAAA,MAEV,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,6 +5,17 @@ export declare const useButton: (props: ButtonProps, emit: SetupContext<ButtonEm
5
5
  _size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
6
6
  _type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
7
7
  _ref: import("vue").Ref<HTMLButtonElement | undefined>;
8
+ _props: import("vue").ComputedRef<{
9
+ ariaDisabled: boolean;
10
+ disabled: boolean;
11
+ autofocus: boolean;
12
+ type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
13
+ } | {
14
+ ariaDisabled?: undefined;
15
+ disabled?: undefined;
16
+ autofocus?: undefined;
17
+ type?: undefined;
18
+ }>;
8
19
  shouldAddSpace: import("vue").ComputedRef<boolean>;
9
20
  handleClick: (evt: MouseEvent) => void;
10
21
  };
@@ -32,6 +32,17 @@ const useButton = (props, emit) => {
32
32
  var _a, _b, _c;
33
33
  return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false;
34
34
  });
35
+ const _props = vue.computed(() => {
36
+ if (props.tag === "button") {
37
+ return {
38
+ ariaDisabled: _disabled.value || props.loading,
39
+ disabled: _disabled.value || props.loading,
40
+ autofocus: props.autofocus,
41
+ type: props.nativeType
42
+ };
43
+ }
44
+ return {};
45
+ });
35
46
  const shouldAddSpace = vue.computed(() => {
36
47
  var _a;
37
48
  const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots);
@@ -55,6 +66,7 @@ const useButton = (props, emit) => {
55
66
  _size,
56
67
  _type,
57
68
  _ref,
69
+ _props,
58
70
  shouldAddSpace,
59
71
  handleClick
60
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-button.js","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":["useDeprecated","computed","inject","buttonGroupContextKey","useGlobalConfig","useFormItem","useFormSize","useFormDisabled","ref","useSlots","Text"],"mappings":"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"}
1
+ {"version":3,"file":"use-button.js","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":["useDeprecated","computed","inject","buttonGroupContextKey","useGlobalConfig","useFormItem","useFormSize","useFormDisabled","ref","useSlots","Text"],"mappings":"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"}
@@ -85,6 +85,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
85
85
  readonly color: StringConstructor;
86
86
  readonly dark: BooleanConstructor;
87
87
  readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
88
+ readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
88
89
  }, {
89
90
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
90
91
  readonly size: {
@@ -114,6 +115,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
114
115
  readonly color: StringConstructor;
115
116
  readonly dark: BooleanConstructor;
116
117
  readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
118
+ readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
117
119
  }>> & {
118
120
  onClick?: ((evt: MouseEvent) => any) | undefined;
119
121
  }>>;
@@ -141,6 +143,17 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
141
143
  _size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
142
144
  _type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
143
145
  _disabled: import("vue").ComputedRef<boolean>;
146
+ _props: import("vue").ComputedRef<{
147
+ ariaDisabled: boolean;
148
+ disabled: boolean;
149
+ autofocus: boolean;
150
+ type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
151
+ } | {
152
+ ariaDisabled?: undefined;
153
+ disabled?: undefined;
154
+ autofocus?: undefined;
155
+ type?: undefined;
156
+ }>;
144
157
  shouldAddSpace: import("vue").ComputedRef<boolean>;
145
158
  handleClick: (evt: MouseEvent) => void;
146
159
  ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -236,6 +249,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
236
249
  readonly color: StringConstructor;
237
250
  readonly dark: BooleanConstructor;
238
251
  readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
252
+ readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
239
253
  }>> & {
240
254
  onClick?: ((evt: MouseEvent) => any) | undefined;
241
255
  }, {
@@ -246,6 +260,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
246
260
  readonly text: boolean;
247
261
  readonly round: boolean;
248
262
  readonly circle: boolean;
263
+ readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
249
264
  readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
250
265
  readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
251
266
  readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
85
85
  readonly color: StringConstructor;
86
86
  readonly dark: BooleanConstructor;
87
87
  readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
88
+ readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
88
89
  }, {
89
90
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
90
91
  readonly size: {
@@ -114,11 +115,12 @@ declare const _default: import("vue").DefineComponent<{
114
115
  readonly color: StringConstructor;
115
116
  readonly dark: BooleanConstructor;
116
117
  readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
118
+ readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
117
119
  }>> & {
118
120
  onClick?: ((evt: MouseEvent) => any) | undefined;
119
121
  }>>;
120
122
  emit: (event: "click", evt: MouseEvent) => void;
121
- buttonStyle: import("vue").ComputedRef<Record<string, string>>; /** @description currently selected date */
123
+ buttonStyle: import("vue").ComputedRef<Record<string, string>>;
122
124
  ns: {
123
125
  namespace: import("vue").ComputedRef<string>;
124
126
  b: (blockSuffix?: string) => string;
@@ -141,8 +143,19 @@ declare const _default: import("vue").DefineComponent<{
141
143
  _size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
142
144
  _type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
143
145
  _disabled: import("vue").ComputedRef<boolean>;
146
+ _props: import("vue").ComputedRef<{
147
+ ariaDisabled: boolean;
148
+ disabled: boolean;
149
+ autofocus: boolean;
150
+ type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
151
+ } | {
152
+ ariaDisabled?: undefined;
153
+ disabled?: undefined;
154
+ autofocus?: undefined;
155
+ type?: undefined;
156
+ }>;
144
157
  shouldAddSpace: import("vue").ComputedRef<boolean>;
145
- handleClick: (evt: MouseEvent) => void;
158
+ handleClick: (evt: MouseEvent) => void; /** @description select a specific date */
146
159
  ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
147
160
  readonly size: {
148
161
  readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
@@ -236,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
236
249
  readonly color: StringConstructor;
237
250
  readonly dark: BooleanConstructor;
238
251
  readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
252
+ readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
239
253
  }>> & {
240
254
  onClick?: ((evt: MouseEvent) => any) | undefined;
241
255
  }, {
@@ -246,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
246
260
  readonly text: boolean;
247
261
  readonly round: boolean;
248
262
  readonly circle: boolean;
263
+ readonly tag: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
249
264
  readonly nativeType: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
250
265
  readonly loadingIcon: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
251
266
  readonly autoInsertSpace: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -35,6 +35,14 @@ export declare const ElCarousel: import("element-plus/es/utils").SFCWithInstall<
35
35
  hover: import("vue").Ref<boolean>;
36
36
  isCardType: import("vue").ComputedRef<boolean>;
37
37
  items: import("vue").ShallowRef<import("./src/constants").CarouselItemContext[]>;
38
+ isVertical: import("vue").ComputedRef<boolean>;
39
+ containerStyle: import("vue").ComputedRef<{
40
+ height: string;
41
+ overflow?: undefined;
42
+ } | {
43
+ height: string;
44
+ overflow: string;
45
+ }>;
38
46
  handleButtonEnter: (arrow: "right" | "left") => void;
39
47
  handleButtonLeave: () => void;
40
48
  handleIndicatorClick: (index: number) => void;
@@ -188,6 +196,7 @@ export declare const ElCarousel: import("element-plus/es/utils").SFCWithInstall<
188
196
  cssVarBlockName: (name: string) => string;
189
197
  };
190
198
  COMPONENT_NAME: string;
199
+ carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
191
200
  active: import("vue").Ref<boolean>;
192
201
  animating: import("vue").Ref<boolean>;
193
202
  hover: import("vue").Ref<boolean>;
@@ -237,6 +246,7 @@ export declare const ElCarouselItem: import("element-plus/es/utils").SFCWithInst
237
246
  cssVarBlockName: (name: string) => string;
238
247
  };
239
248
  COMPONENT_NAME: string;
249
+ carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
240
250
  active: import("vue").Ref<boolean>;
241
251
  animating: import("vue").Ref<boolean>;
242
252
  hover: import("vue").Ref<boolean>;
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
28
28
  cssVarBlockName: (name: string) => string;
29
29
  };
30
30
  COMPONENT_NAME: string;
31
+ carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
31
32
  active: import("vue").Ref<boolean>;
32
33
  animating: import("vue").Ref<boolean>;
33
34
  hover: import("vue").Ref<boolean>;
@@ -20,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
20
  const props = __props;
21
21
  const ns = index.useNamespace("carousel");
22
22
  const {
23
+ carouselItemRef,
23
24
  active,
24
25
  animating,
25
26
  hover,
@@ -42,13 +43,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
43
  });
43
44
  return (_ctx, _cache) => {
44
45
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
46
+ ref_key: "carouselItemRef",
47
+ ref: carouselItemRef,
45
48
  class: vue.normalizeClass([
46
49
  vue.unref(ns).e("item"),
47
50
  vue.unref(ns).is("active", vue.unref(active)),
48
51
  vue.unref(ns).is("in-stage", vue.unref(inStage)),
49
52
  vue.unref(ns).is("hover", vue.unref(hover)),
50
53
  vue.unref(ns).is("animating", vue.unref(animating)),
51
- { [vue.unref(ns).em("item", "card")]: vue.unref(isCardType) }
54
+ {
55
+ [vue.unref(ns).em("item", "card")]: vue.unref(isCardType),
56
+ [vue.unref(ns).em("item", "card-vertical")]: vue.unref(isCardType) && vue.unref(isVertical)
57
+ }
52
58
  ]),
53
59
  style: vue.normalizeStyle(vue.unref(itemStyle)),
54
60
  onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n :class=\"[\n ns.e('item'),\n ns.is('active', active),\n ns.is('in-stage', inStage),\n ns.is('hover', hover),\n ns.is('animating', animating),\n { [ns.em('item', 'card')]: isCardType },\n ]\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACE,GAAAC,+BAAA,CAAgB,OAAO,cAAc,CAAA,CAAA;AAEzC,IAAM,MAAA,SAAA,GAAYC,aAAwB,MAAM;AAC9C,MAAA,MAAM,aAAgB,GAAA,CAAA,SAAA,EAAYC,SAAM,CAAA,UAAU,IAAI,GAAM,GAAA,GAAA,CAAA,CAAA,CAAA;AAC5D,MAAA,MAAM,UAAa,GAAA,CAAA,EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"[\n ns.e('item'),\n ns.is('active', active),\n ns.is('in-stage', inStage),\n ns.is('hover', hover),\n ns.is('animating', animating),\n {\n [ns.em('item', 'card')]: isCardType,\n [ns.em('item', 'card-vertical')]: isCardType && isVertical,\n },\n ]\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACE,GAAAC,+BAAA,CAAgB,OAAO,cAAc,CAAA,CAAA;AAEzC,IAAM,MAAA,SAAA,GAAYC,aAAwB,MAAM;AAC9C,MAAA,MAAM,aAAgB,GAAA,CAAA,SAAA,EAAYC,SAAM,CAAA,UAAU,IAAI,GAAM,GAAA,GAAA,CAAA,CAAA,CAAA;AAC5D,MAAA,MAAM,UAAa,GAAA,CAAA,EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../../utils/index.js');
6
6
  var runtime = require('../../../utils/vue/props/runtime.js');
7
- var core = require('@vueuse/core');
7
+ var types = require('../../../utils/types.js');
8
8
 
9
9
  const carouselProps = runtime.buildProps({
10
10
  initialIndex: {
@@ -58,7 +58,7 @@ const carouselProps = runtime.buildProps({
58
58
  }
59
59
  });
60
60
  const carouselEmits = {
61
- change: (current, prev) => [current, prev].every(core.isNumber)
61
+ change: (current, prev) => [current, prev].every(types.isNumber)
62
62
  };
63
63
 
64
64
  exports.carouselEmits = carouselEmits;
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\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,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,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAACC,aAAQ,CAAC;AAC5D;;;;;"}
1
+ {"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\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,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,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;;;;;"}
@@ -35,6 +35,14 @@ declare const _default: import("vue").DefineComponent<{
35
35
  hover: import("vue").Ref<boolean>;
36
36
  isCardType: import("vue").ComputedRef<boolean>;
37
37
  items: import("vue").ShallowRef<import("./constants").CarouselItemContext[]>;
38
+ isVertical: import("vue").ComputedRef<boolean>;
39
+ containerStyle: import("vue").ComputedRef<{
40
+ height: string;
41
+ overflow?: undefined;
42
+ } | {
43
+ height: string;
44
+ overflow: string;
45
+ }>;
38
46
  handleButtonEnter: (arrow: "right" | "left") => void;
39
47
  handleButtonLeave: () => void;
40
48
  handleIndicatorClick: (index: number) => void;
@@ -31,6 +31,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
31
31
  hover,
32
32
  isCardType,
33
33
  items,
34
+ isVertical,
35
+ containerStyle,
34
36
  handleButtonEnter,
35
37
  handleButtonLeave,
36
38
  handleIndicatorClick,
@@ -55,9 +57,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55
57
  if (vue.unref(hasLabel)) {
56
58
  classes.push(ns.em("indicators", "labels"));
57
59
  }
58
- if (props.indicatorPosition === "outside" || vue.unref(isCardType)) {
60
+ if (props.indicatorPosition === "outside") {
59
61
  classes.push(ns.em("indicators", "outside"));
60
62
  }
63
+ if (vue.unref(isVertical)) {
64
+ classes.push(ns.em("indicators", "right"));
65
+ }
61
66
  return classes;
62
67
  });
63
68
  expose({
@@ -75,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
75
80
  }, [
76
81
  vue.createElementVNode("div", {
77
82
  class: vue.normalizeClass(vue.unref(ns).e("container")),
78
- style: vue.normalizeStyle({ height: _ctx.height })
83
+ style: vue.normalizeStyle(vue.unref(containerStyle))
79
84
  }, [
80
85
  vue.unref(arrowDisplay) ? (vue.openBlock(), vue.createBlock(vue.Transition, {
81
86
  key: 0,
@@ -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 <div :class=\"ns.e('container')\" :style=\"{ height: height }\">\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 @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 @mouseenter=\"handleButtonEnter('right')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex + 1)\"\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </button>\n </transition>\n <slot />\n </div>\n <ul v-if=\"indicatorPosition !== 'none'\" :class=\"indicatorsClasses\">\n <li\n v-for=\"(item, index) in items\"\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 :class=\"ns.e('button')\">\n <span v-if=\"hasLabel\">{{ item.props.label }}</span>\n </button>\n </li>\n </ul>\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 { 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 handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n throttledArrowClick,\n throttledIndicatorHover,\n} = useCarousel(props, emit, COMPONENT_NAME)\nconst ns = useNamespace('carousel')\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' || unref(isCardType)) {\n classes.push(ns.em('indicators', 'outside'))\n }\n return classes\n})\n\ndefineExpose({\n /** @description manually switch slide */\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","computed","unref"],"mappings":";;;;;;;;;;;;;;;;uCAwEc,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,iBAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;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,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,CAAA,MAAM,CAAC,CAAA,CAAA;AAAA,OAC3B;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoBD,aAAS,MAAM;AACvC,MAAM,MAAA,OAAA,GAAU,CAAC,EAAA,CAAG,CAAE,CAAA,YAAY,CAAG,EAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,KAAM,CAAA,SAAS,CAAC,CAAA,CAAA;AACzE,MAAI,IAAAC,SAAA,CAAM,QAAQ,CAAG,EAAA;AACnB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,QAAQ,CAAC,CAAA,CAAA;AAAA,OAC5C;AACA,MAAA,IAAI,KAAM,CAAA,iBAAA,KAAsB,SAAa,IAAAA,SAAA,CAAM,UAAU,CAAG,EAAA;AAC9D,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,SAAS,CAAC,CAAA,CAAA;AAAA,OAC7C;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,aAAA;AAAA,MAEA,IAAA;AAAA,MAEA,IAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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 <div :class=\"ns.e('container')\" :style=\"containerStyle\">\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 @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 @mouseenter=\"handleButtonEnter('right')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex + 1)\"\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </button>\n </transition>\n <slot />\n </div>\n <ul v-if=\"indicatorPosition !== 'none'\" :class=\"indicatorsClasses\">\n <li\n v-for=\"(item, index) in items\"\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 :class=\"ns.e('button')\">\n <span v-if=\"hasLabel\">{{ item.props.label }}</span>\n </button>\n </li>\n </ul>\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 { 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 throttledArrowClick,\n throttledIndicatorHover,\n} = useCarousel(props, emit, COMPONENT_NAME)\nconst ns = useNamespace('carousel')\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\ndefineExpose({\n /** @description manually switch slide */\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","computed","unref"],"mappings":";;;;;;;;;;;;;;;;uCAwEc,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,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,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,CAAA,MAAM,CAAC,CAAA,CAAA;AAAA,OAC3B;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoBD,aAAS,MAAM;AACvC,MAAM,MAAA,OAAA,GAAU,CAAC,EAAA,CAAG,CAAE,CAAA,YAAY,CAAG,EAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,KAAM,CAAA,SAAS,CAAC,CAAA,CAAA;AACzE,MAAI,IAAAC,SAAA,CAAM,QAAQ,CAAG,EAAA;AACnB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,QAAQ,CAAC,CAAA,CAAA;AAAA,OAC5C;AACA,MAAI,IAAA,KAAA,CAAM,sBAAsB,SAAW,EAAA;AACzC,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,SAAS,CAAC,CAAA,CAAA;AAAA,OAC7C;AACA,MAAI,IAAAA,SAAA,CAAM,UAAU,CAAG,EAAA;AACrB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,OAAO,CAAC,CAAA,CAAA;AAAA,OAC3C;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,aAAA;AAAA,MAEA,IAAA;AAAA,MAEA,IAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -24,5 +24,6 @@ export declare type CarouselContext = {
24
24
  addItem: (item: CarouselItemContext) => void;
25
25
  removeItem: (uid: number) => void;
26
26
  setActiveItem: (index: number) => void;
27
+ setContainerHeight: (height: number) => void;
27
28
  };
28
29
  export declare const carouselContextKey: InjectionKey<CarouselContext>;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\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 addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\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 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"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
@@ -1,5 +1,6 @@
1
1
  import type { CarouselItemProps } from './carousel-item';
2
2
  export declare const useCarouselItem: (props: CarouselItemProps, componentName: string) => {
3
+ carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
3
4
  active: import("vue").Ref<boolean>;
4
5
  animating: import("vue").Ref<boolean>;
5
6
  hover: import("vue").Ref<boolean>;
@@ -18,6 +18,7 @@ const useCarouselItem = (props, componentName) => {
18
18
  error.debugWarn(componentName, "compositional hook can only be invoked inside setups");
19
19
  }
20
20
  const CARD_SCALE = 0.83;
21
+ const carouselItemRef = vue.ref();
21
22
  const hover = vue.ref(false);
22
23
  const translate = vue.ref(0);
23
24
  const scale = vue.ref(1);
@@ -43,8 +44,8 @@ const useCarouselItem = (props, componentName) => {
43
44
  return index;
44
45
  }
45
46
  function calcCardTranslate(index, activeIndex) {
46
- var _a;
47
- const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
47
+ var _a, _b;
48
+ const parentWidth = vue.unref(isVertical) ? ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0;
48
49
  if (inStage.value) {
49
50
  return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
50
51
  } else if (index < activeIndex) {
@@ -74,9 +75,6 @@ const useCarouselItem = (props, componentName) => {
74
75
  const _isVertical = vue.unref(isVertical);
75
76
  active.value = isActive;
76
77
  if (_isCardType) {
77
- if (_isVertical) {
78
- error.debugWarn("Carousel", "vertical direction is not supported for card mode");
79
- }
80
78
  inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
81
79
  translate.value = calcCardTranslate(index, activeIndex);
82
80
  scale.value = vue.unref(active) ? 1 : CARD_SCALE;
@@ -84,6 +82,9 @@ const useCarouselItem = (props, componentName) => {
84
82
  translate.value = calcTranslate(index, activeIndex, _isVertical);
85
83
  }
86
84
  ready.value = true;
85
+ if (isActive && carouselItemRef.value) {
86
+ carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
87
+ }
87
88
  };
88
89
  function handleItemClick() {
89
90
  if (carouselContext && vue.unref(isCardType)) {
@@ -111,6 +112,7 @@ const useCarouselItem = (props, componentName) => {
111
112
  carouselContext.removeItem(instance.uid);
112
113
  });
113
114
  return {
115
+ carouselItemRef,
114
116
  active,
115
117
  animating,
116
118
  hover,