@element-plus/nightly 0.0.20240227 → 0.0.20240229

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 (514) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +292 -284
  4. package/dist/index.full.min.js +26 -26
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +26 -26
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +293 -285
  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-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/nb-no.js +1 -1
  154. package/dist/locale/nb-no.min.js +1 -1
  155. package/dist/locale/nb-no.min.mjs +1 -1
  156. package/dist/locale/nb-no.mjs +1 -1
  157. package/dist/locale/nl.js +1 -1
  158. package/dist/locale/nl.min.js +1 -1
  159. package/dist/locale/nl.min.mjs +1 -1
  160. package/dist/locale/nl.mjs +1 -1
  161. package/dist/locale/pa.js +1 -1
  162. package/dist/locale/pa.min.js +1 -1
  163. package/dist/locale/pa.min.mjs +1 -1
  164. package/dist/locale/pa.mjs +1 -1
  165. package/dist/locale/pl.js +1 -1
  166. package/dist/locale/pl.min.js +1 -1
  167. package/dist/locale/pl.min.mjs +1 -1
  168. package/dist/locale/pl.mjs +1 -1
  169. package/dist/locale/pt-br.js +1 -1
  170. package/dist/locale/pt-br.min.js +1 -1
  171. package/dist/locale/pt-br.min.mjs +1 -1
  172. package/dist/locale/pt-br.mjs +1 -1
  173. package/dist/locale/pt.js +1 -1
  174. package/dist/locale/pt.min.js +1 -1
  175. package/dist/locale/pt.min.mjs +1 -1
  176. package/dist/locale/pt.mjs +1 -1
  177. package/dist/locale/ro.js +1 -1
  178. package/dist/locale/ro.min.js +1 -1
  179. package/dist/locale/ro.min.mjs +1 -1
  180. package/dist/locale/ro.mjs +1 -1
  181. package/dist/locale/ru.js +1 -1
  182. package/dist/locale/ru.min.js +1 -1
  183. package/dist/locale/ru.min.mjs +1 -1
  184. package/dist/locale/ru.mjs +1 -1
  185. package/dist/locale/sk.js +1 -1
  186. package/dist/locale/sk.min.js +1 -1
  187. package/dist/locale/sk.min.mjs +1 -1
  188. package/dist/locale/sk.mjs +1 -1
  189. package/dist/locale/sl.js +1 -1
  190. package/dist/locale/sl.min.js +1 -1
  191. package/dist/locale/sl.min.mjs +1 -1
  192. package/dist/locale/sl.mjs +1 -1
  193. package/dist/locale/sr.js +1 -1
  194. package/dist/locale/sr.min.js +1 -1
  195. package/dist/locale/sr.min.mjs +1 -1
  196. package/dist/locale/sr.mjs +1 -1
  197. package/dist/locale/sv.js +1 -1
  198. package/dist/locale/sv.min.js +1 -1
  199. package/dist/locale/sv.min.mjs +1 -1
  200. package/dist/locale/sv.mjs +1 -1
  201. package/dist/locale/sw.js +1 -1
  202. package/dist/locale/sw.min.js +1 -1
  203. package/dist/locale/sw.min.mjs +1 -1
  204. package/dist/locale/sw.mjs +1 -1
  205. package/dist/locale/ta.js +1 -1
  206. package/dist/locale/ta.min.js +1 -1
  207. package/dist/locale/ta.min.mjs +1 -1
  208. package/dist/locale/ta.mjs +1 -1
  209. package/dist/locale/th.js +1 -1
  210. package/dist/locale/th.min.js +1 -1
  211. package/dist/locale/th.min.mjs +1 -1
  212. package/dist/locale/th.mjs +1 -1
  213. package/dist/locale/tk.js +1 -1
  214. package/dist/locale/tk.min.js +1 -1
  215. package/dist/locale/tk.min.mjs +1 -1
  216. package/dist/locale/tk.mjs +1 -1
  217. package/dist/locale/tr.js +1 -1
  218. package/dist/locale/tr.min.js +1 -1
  219. package/dist/locale/tr.min.mjs +1 -1
  220. package/dist/locale/tr.mjs +1 -1
  221. package/dist/locale/ug-cn.js +1 -1
  222. package/dist/locale/ug-cn.min.js +1 -1
  223. package/dist/locale/ug-cn.min.mjs +1 -1
  224. package/dist/locale/ug-cn.mjs +1 -1
  225. package/dist/locale/uk.js +1 -1
  226. package/dist/locale/uk.min.js +1 -1
  227. package/dist/locale/uk.min.mjs +1 -1
  228. package/dist/locale/uk.mjs +1 -1
  229. package/dist/locale/uz-uz.js +1 -1
  230. package/dist/locale/uz-uz.min.js +1 -1
  231. package/dist/locale/uz-uz.min.mjs +1 -1
  232. package/dist/locale/uz-uz.mjs +1 -1
  233. package/dist/locale/vi.js +1 -1
  234. package/dist/locale/vi.min.js +1 -1
  235. package/dist/locale/vi.min.mjs +1 -1
  236. package/dist/locale/vi.mjs +1 -1
  237. package/dist/locale/zh-cn.js +1 -1
  238. package/dist/locale/zh-cn.min.js +1 -1
  239. package/dist/locale/zh-cn.min.mjs +1 -1
  240. package/dist/locale/zh-cn.mjs +1 -1
  241. package/dist/locale/zh-tw.js +1 -1
  242. package/dist/locale/zh-tw.min.js +1 -1
  243. package/dist/locale/zh-tw.min.mjs +1 -1
  244. package/dist/locale/zh-tw.mjs +1 -1
  245. package/es/components/calendar/src/calendar2.mjs +5 -5
  246. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  247. package/es/components/calendar/src/use-calendar.mjs +1 -11
  248. package/es/components/calendar/src/use-calendar.mjs.map +1 -1
  249. package/es/components/card/index.mjs +2 -2
  250. package/es/components/card/src/card.mjs +43 -21
  251. package/es/components/card/src/card.mjs.map +1 -1
  252. package/es/components/card/src/card2.mjs +21 -43
  253. package/es/components/card/src/card2.mjs.map +1 -1
  254. package/es/components/carousel/index.d.ts +7 -0
  255. package/es/components/carousel/src/carousel.d.ts +1 -0
  256. package/es/components/carousel/src/carousel.mjs +4 -0
  257. package/es/components/carousel/src/carousel.mjs.map +1 -1
  258. package/es/components/carousel/src/carousel.vue.d.ts +7 -0
  259. package/es/components/carousel/src/carousel2.mjs +100 -66
  260. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  261. package/es/components/carousel/src/use-carousel.d.ts +2 -0
  262. package/es/components/carousel/src/use-carousel.mjs +23 -0
  263. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  264. package/es/components/checkbox/index.d.ts +120 -0
  265. package/es/components/checkbox/src/checkbox-button.mjs +5 -4
  266. package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
  267. package/es/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
  268. package/es/components/checkbox/src/checkbox.d.ts +24 -1
  269. package/es/components/checkbox/src/checkbox.mjs +12 -0
  270. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  271. package/es/components/checkbox/src/checkbox.vue.d.ts +40 -0
  272. package/es/components/checkbox/src/checkbox2.mjs +5 -4
  273. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  274. package/es/components/checkbox/src/composables/use-checkbox-event.mjs +2 -2
  275. package/es/components/checkbox/src/composables/use-checkbox-event.mjs.map +1 -1
  276. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
  277. package/es/components/checkbox/src/composables/use-checkbox-status.mjs +15 -8
  278. package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
  279. package/es/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
  280. package/es/components/checkbox/src/composables/use-checkbox.mjs +40 -13
  281. package/es/components/checkbox/src/composables/use-checkbox.mjs.map +1 -1
  282. package/es/components/col/index.mjs +2 -2
  283. package/es/components/col/src/col.mjs +43 -66
  284. package/es/components/col/src/col.mjs.map +1 -1
  285. package/es/components/col/src/col2.mjs +66 -43
  286. package/es/components/col/src/col2.mjs.map +1 -1
  287. package/es/components/date-picker/src/composables/use-basic-date-table.mjs +1 -1
  288. package/es/components/date-picker/src/composables/use-basic-date-table.mjs.map +1 -1
  289. package/es/components/index.mjs +6 -6
  290. package/es/components/menu/index.d.ts +0 -6
  291. package/es/components/menu/index.mjs +2 -2
  292. package/es/components/menu/src/menu-item-group.mjs +35 -4
  293. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  294. package/es/components/menu/src/menu-item-group2.mjs +4 -35
  295. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  296. package/es/components/menu/src/menu.mjs +2 -0
  297. package/es/components/menu/src/menu.mjs.map +1 -1
  298. package/es/components/menu/src/sub-menu.d.ts +0 -4
  299. package/es/components/menu/src/sub-menu.mjs +2 -15
  300. package/es/components/menu/src/sub-menu.mjs.map +1 -1
  301. package/es/components/pagination/src/components/sizes.vue.d.ts +0 -3
  302. package/es/components/popper/index.mjs +2 -2
  303. package/es/components/popper/src/content.mjs +94 -137
  304. package/es/components/popper/src/content.mjs.map +1 -1
  305. package/es/components/popper/src/content2.mjs +137 -94
  306. package/es/components/popper/src/content2.mjs.map +1 -1
  307. package/es/components/radio/index.d.ts +77 -54
  308. package/es/components/radio/src/radio-button.d.ts +4 -2
  309. package/es/components/radio/src/radio-button.mjs +1 -5
  310. package/es/components/radio/src/radio-button.mjs.map +1 -1
  311. package/es/components/radio/src/radio-button.vue.d.ts +16 -7
  312. package/es/components/radio/src/radio-button2.mjs +4 -4
  313. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  314. package/es/components/radio/src/radio-group.d.ts +3 -3
  315. package/es/components/radio/src/radio-group.mjs +1 -1
  316. package/es/components/radio/src/radio-group.mjs.map +1 -1
  317. package/es/components/radio/src/radio-group.vue.d.ts +10 -10
  318. package/es/components/radio/src/radio.d.ts +10 -6
  319. package/es/components/radio/src/radio.mjs +13 -9
  320. package/es/components/radio/src/radio.mjs.map +1 -1
  321. package/es/components/radio/src/radio.vue.d.ts +23 -18
  322. package/es/components/radio/src/radio2.mjs +4 -4
  323. package/es/components/radio/src/radio2.mjs.map +1 -1
  324. package/es/components/radio/src/use-radio.d.ts +4 -5
  325. package/es/components/radio/src/use-radio.mjs +21 -3
  326. package/es/components/radio/src/use-radio.mjs.map +1 -1
  327. package/es/components/select/index.d.ts +0 -3
  328. package/es/components/select/src/select.d.ts +0 -1
  329. package/es/components/select/src/select.mjs +0 -4
  330. package/es/components/select/src/select.mjs.map +1 -1
  331. package/es/components/select/src/select.vue.d.ts +0 -3
  332. package/es/components/select/src/useSelect.mjs +3 -19
  333. package/es/components/select/src/useSelect.mjs.map +1 -1
  334. package/es/components/select-v2/src/select-dropdown.mjs +5 -10
  335. package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
  336. package/es/components/select-v2/src/useSelect.mjs +10 -11
  337. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  338. package/es/components/switch/index.d.ts +0 -19
  339. package/es/components/switch/src/switch.d.ts +0 -4
  340. package/es/components/switch/src/switch.mjs +0 -16
  341. package/es/components/switch/src/switch.mjs.map +1 -1
  342. package/es/components/switch/src/switch.vue.d.ts +0 -19
  343. package/es/components/switch/src/switch2.mjs +3 -37
  344. package/es/components/switch/src/switch2.mjs.map +1 -1
  345. package/es/components/tabs/index.d.ts +0 -12
  346. package/es/components/tabs/src/tabs.d.ts +0 -18
  347. package/es/components/tabs/src/tabs.mjs +7 -29
  348. package/es/components/tabs/src/tabs.mjs.map +1 -1
  349. package/es/components/time-select/index.d.ts +0 -12
  350. package/es/components/time-select/src/time-select.vue.d.ts +0 -6
  351. package/es/components/tooltip/src/content.mjs +1 -1
  352. package/es/components/tooltip/src/content2.mjs +1 -1
  353. package/es/components/transfer/index.d.ts +400 -0
  354. package/es/components/transfer/src/transfer-panel.vue.d.ts +80 -0
  355. package/es/components/transfer/src/transfer.vue.d.ts +400 -0
  356. package/es/components/tree-select/src/select.d.ts +1 -1
  357. package/es/components/tree-select/src/select.mjs +15 -11
  358. package/es/components/tree-select/src/select.mjs.map +1 -1
  359. package/es/components/tree-select/src/tree.mjs +5 -6
  360. package/es/components/tree-select/src/tree.mjs.map +1 -1
  361. package/es/components/tree-v2/index.d.ts +80 -0
  362. package/es/components/tree-v2/src/tree-node.vue.d.ts +80 -0
  363. package/es/components/tree-v2/src/tree.vue.d.ts +80 -0
  364. package/es/components/upload/index.mjs +2 -2
  365. package/es/components/upload/src/upload-content.mjs +1 -1
  366. package/es/components/upload/src/upload-content2.mjs +1 -1
  367. package/es/components/upload/src/upload-list.mjs +1 -1
  368. package/es/components/upload/src/upload.mjs +118 -104
  369. package/es/components/upload/src/upload.mjs.map +1 -1
  370. package/es/components/upload/src/upload2.mjs +104 -118
  371. package/es/components/upload/src/upload2.mjs.map +1 -1
  372. package/es/components/upload/src/use-handlers.mjs +1 -1
  373. package/es/index.mjs +6 -6
  374. package/es/version.d.ts +1 -1
  375. package/es/version.mjs +1 -1
  376. package/es/version.mjs.map +1 -1
  377. package/lib/components/calendar/src/calendar2.js +4 -4
  378. package/lib/components/calendar/src/calendar2.js.map +1 -1
  379. package/lib/components/calendar/src/use-calendar.js +0 -10
  380. package/lib/components/calendar/src/use-calendar.js.map +1 -1
  381. package/lib/components/card/index.js +2 -2
  382. package/lib/components/card/src/card.js +43 -21
  383. package/lib/components/card/src/card.js.map +1 -1
  384. package/lib/components/card/src/card2.js +21 -43
  385. package/lib/components/card/src/card2.js.map +1 -1
  386. package/lib/components/carousel/index.d.ts +7 -0
  387. package/lib/components/carousel/src/carousel.d.ts +1 -0
  388. package/lib/components/carousel/src/carousel.js +4 -0
  389. package/lib/components/carousel/src/carousel.js.map +1 -1
  390. package/lib/components/carousel/src/carousel.vue.d.ts +7 -0
  391. package/lib/components/carousel/src/carousel2.js +99 -65
  392. package/lib/components/carousel/src/carousel2.js.map +1 -1
  393. package/lib/components/carousel/src/use-carousel.d.ts +2 -0
  394. package/lib/components/carousel/src/use-carousel.js +23 -0
  395. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  396. package/lib/components/checkbox/index.d.ts +120 -0
  397. package/lib/components/checkbox/src/checkbox-button.js +5 -4
  398. package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
  399. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
  400. package/lib/components/checkbox/src/checkbox.d.ts +24 -1
  401. package/lib/components/checkbox/src/checkbox.js +12 -0
  402. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  403. package/lib/components/checkbox/src/checkbox.vue.d.ts +40 -0
  404. package/lib/components/checkbox/src/checkbox2.js +5 -4
  405. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  406. package/lib/components/checkbox/src/composables/use-checkbox-event.js +2 -2
  407. package/lib/components/checkbox/src/composables/use-checkbox-event.js.map +1 -1
  408. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
  409. package/lib/components/checkbox/src/composables/use-checkbox-status.js +13 -6
  410. package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
  411. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
  412. package/lib/components/checkbox/src/composables/use-checkbox.js +40 -13
  413. package/lib/components/checkbox/src/composables/use-checkbox.js.map +1 -1
  414. package/lib/components/col/index.js +2 -2
  415. package/lib/components/col/src/col.js +43 -66
  416. package/lib/components/col/src/col.js.map +1 -1
  417. package/lib/components/col/src/col2.js +66 -43
  418. package/lib/components/col/src/col2.js.map +1 -1
  419. package/lib/components/date-picker/src/composables/use-basic-date-table.js +1 -1
  420. package/lib/components/date-picker/src/composables/use-basic-date-table.js.map +1 -1
  421. package/lib/components/index.js +6 -6
  422. package/lib/components/menu/index.d.ts +0 -6
  423. package/lib/components/menu/index.js +2 -2
  424. package/lib/components/menu/src/menu-item-group.js +35 -4
  425. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  426. package/lib/components/menu/src/menu-item-group2.js +4 -35
  427. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  428. package/lib/components/menu/src/menu.js +2 -0
  429. package/lib/components/menu/src/menu.js.map +1 -1
  430. package/lib/components/menu/src/sub-menu.d.ts +0 -4
  431. package/lib/components/menu/src/sub-menu.js +10 -23
  432. package/lib/components/menu/src/sub-menu.js.map +1 -1
  433. package/lib/components/pagination/src/components/sizes.vue.d.ts +0 -3
  434. package/lib/components/popper/index.js +2 -2
  435. package/lib/components/popper/src/content.js +99 -137
  436. package/lib/components/popper/src/content.js.map +1 -1
  437. package/lib/components/popper/src/content2.js +137 -99
  438. package/lib/components/popper/src/content2.js.map +1 -1
  439. package/lib/components/radio/index.d.ts +77 -54
  440. package/lib/components/radio/src/radio-button.d.ts +4 -2
  441. package/lib/components/radio/src/radio-button.js +1 -5
  442. package/lib/components/radio/src/radio-button.js.map +1 -1
  443. package/lib/components/radio/src/radio-button.vue.d.ts +16 -7
  444. package/lib/components/radio/src/radio-button2.js +4 -4
  445. package/lib/components/radio/src/radio-button2.js.map +1 -1
  446. package/lib/components/radio/src/radio-group.d.ts +3 -3
  447. package/lib/components/radio/src/radio-group.js +1 -1
  448. package/lib/components/radio/src/radio-group.js.map +1 -1
  449. package/lib/components/radio/src/radio-group.vue.d.ts +10 -10
  450. package/lib/components/radio/src/radio.d.ts +10 -6
  451. package/lib/components/radio/src/radio.js +13 -9
  452. package/lib/components/radio/src/radio.js.map +1 -1
  453. package/lib/components/radio/src/radio.vue.d.ts +23 -18
  454. package/lib/components/radio/src/radio2.js +4 -4
  455. package/lib/components/radio/src/radio2.js.map +1 -1
  456. package/lib/components/radio/src/use-radio.d.ts +4 -5
  457. package/lib/components/radio/src/use-radio.js +21 -3
  458. package/lib/components/radio/src/use-radio.js.map +1 -1
  459. package/lib/components/select/index.d.ts +0 -3
  460. package/lib/components/select/src/select.d.ts +0 -1
  461. package/lib/components/select/src/select.js +0 -4
  462. package/lib/components/select/src/select.js.map +1 -1
  463. package/lib/components/select/src/select.vue.d.ts +0 -3
  464. package/lib/components/select/src/useSelect.js +4 -20
  465. package/lib/components/select/src/useSelect.js.map +1 -1
  466. package/lib/components/select-v2/src/select-dropdown.js +5 -10
  467. package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
  468. package/lib/components/select-v2/src/useSelect.js +10 -11
  469. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  470. package/lib/components/switch/index.d.ts +0 -19
  471. package/lib/components/switch/src/switch.d.ts +0 -4
  472. package/lib/components/switch/src/switch.js +0 -16
  473. package/lib/components/switch/src/switch.js.map +1 -1
  474. package/lib/components/switch/src/switch.vue.d.ts +0 -19
  475. package/lib/components/switch/src/switch2.js +9 -43
  476. package/lib/components/switch/src/switch2.js.map +1 -1
  477. package/lib/components/tabs/index.d.ts +0 -12
  478. package/lib/components/tabs/src/tabs.d.ts +0 -18
  479. package/lib/components/tabs/src/tabs.js +7 -29
  480. package/lib/components/tabs/src/tabs.js.map +1 -1
  481. package/lib/components/time-select/index.d.ts +0 -12
  482. package/lib/components/time-select/src/time-select.vue.d.ts +0 -6
  483. package/lib/components/tooltip/src/content.js +1 -1
  484. package/lib/components/tooltip/src/content2.js +1 -1
  485. package/lib/components/transfer/index.d.ts +400 -0
  486. package/lib/components/transfer/src/transfer-panel.vue.d.ts +80 -0
  487. package/lib/components/transfer/src/transfer.vue.d.ts +400 -0
  488. package/lib/components/tree-select/src/select.d.ts +1 -1
  489. package/lib/components/tree-select/src/select.js +14 -10
  490. package/lib/components/tree-select/src/select.js.map +1 -1
  491. package/lib/components/tree-select/src/tree.js +5 -6
  492. package/lib/components/tree-select/src/tree.js.map +1 -1
  493. package/lib/components/tree-v2/index.d.ts +80 -0
  494. package/lib/components/tree-v2/src/tree-node.vue.d.ts +80 -0
  495. package/lib/components/tree-v2/src/tree.vue.d.ts +80 -0
  496. package/lib/components/upload/index.js +2 -2
  497. package/lib/components/upload/src/upload-content.js +1 -1
  498. package/lib/components/upload/src/upload-content2.js +1 -1
  499. package/lib/components/upload/src/upload-list.js +1 -1
  500. package/lib/components/upload/src/upload.js +118 -107
  501. package/lib/components/upload/src/upload.js.map +1 -1
  502. package/lib/components/upload/src/upload2.js +107 -118
  503. package/lib/components/upload/src/upload2.js.map +1 -1
  504. package/lib/components/upload/src/use-handlers.js +1 -1
  505. package/lib/index.js +6 -6
  506. package/lib/version.d.ts +1 -1
  507. package/lib/version.js +1 -1
  508. package/lib/version.js.map +1 -1
  509. package/package.json +2 -2
  510. package/tags.json +1 -1
  511. package/theme-chalk/el-carousel.css +1 -1
  512. package/theme-chalk/index.css +1 -1
  513. package/theme-chalk/src/carousel.scss +8 -0
  514. package/web-types.json +1 -1
@@ -23,6 +23,8 @@ const useCarousel = (props, emit, componentName) => {
23
23
  const root = ref();
24
24
  const containerHeight = ref(0);
25
25
  const isItemsTwoLength = ref(true);
26
+ const isFirstCall = ref(true);
27
+ const isTransitioning = ref(false);
26
28
  const arrowDisplay = computed(() => props.arrow !== "never" && !unref(isVertical));
27
29
  const hasLabel = computed(() => {
28
30
  return items.value.some((item) => item.props.label.toString().length > 0);
@@ -63,6 +65,10 @@ const useCarousel = (props, emit, componentName) => {
63
65
  timer.value = setInterval(() => playSlides(), props.interval);
64
66
  }
65
67
  const playSlides = () => {
68
+ if (!isFirstCall.value) {
69
+ isTransitioning.value = true;
70
+ }
71
+ isFirstCall.value = false;
66
72
  if (activeIndex.value < items.value.length - 1) {
67
73
  activeIndex.value = activeIndex.value + 1;
68
74
  } else if (props.loop) {
@@ -70,6 +76,10 @@ const useCarousel = (props, emit, componentName) => {
70
76
  }
71
77
  };
72
78
  function setActiveItem(index) {
79
+ if (!isFirstCall.value) {
80
+ isTransitioning.value = true;
81
+ }
82
+ isFirstCall.value = false;
73
83
  if (isString(index)) {
74
84
  const filteredItems = items.value.filter((item) => item.props.name === index);
75
85
  if (filteredItems.length > 0) {
@@ -130,6 +140,9 @@ const useCarousel = (props, emit, componentName) => {
130
140
  hover.value = false;
131
141
  startTimer();
132
142
  }
143
+ function handleTransitionEnd() {
144
+ isTransitioning.value = false;
145
+ }
133
146
  function handleButtonEnter(arrow) {
134
147
  if (unref(isVertical))
135
148
  return;
@@ -147,11 +160,19 @@ const useCarousel = (props, emit, componentName) => {
147
160
  });
148
161
  }
149
162
  function handleIndicatorClick(index) {
163
+ if (index !== activeIndex.value) {
164
+ if (!isFirstCall.value) {
165
+ isTransitioning.value = true;
166
+ }
167
+ }
150
168
  activeIndex.value = index;
151
169
  }
152
170
  function handleIndicatorHover(index) {
153
171
  if (props.trigger === "hover" && index !== activeIndex.value) {
154
172
  activeIndex.value = index;
173
+ if (!isFirstCall.value) {
174
+ isTransitioning.value = true;
175
+ }
155
176
  }
156
177
  }
157
178
  function prev() {
@@ -242,11 +263,13 @@ const useCarousel = (props, emit, componentName) => {
242
263
  hasLabel,
243
264
  hover,
244
265
  isCardType,
266
+ isTransitioning,
245
267
  items,
246
268
  isVertical,
247
269
  containerStyle,
248
270
  isItemsTwoLength,
249
271
  handleButtonEnter,
272
+ handleTransitionEnd,
250
273
  handleButtonLeave,
251
274
  handleIndicatorClick,
252
275
  handleMouseEnter,
@@ -1 +1 @@
1
- {"version":3,"file":"use-carousel.mjs","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const carouselItemsName = 'ElCarouselItem'\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === carouselItemsName\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA,MAAM,aAAa,GAAG,GAAG,CAAC;AACd,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM;AACR,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,QAAQ,EAAE,OAAO;AACrB,IAAI,WAAW,EAAE,UAAU;AAC3B,GAAG,GAAG,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AO,CAAC,kBAAkB,EAAE;AAC9B,IAAI,IAAI;AACR,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,kBAAkB;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,iBAAiB;AACrB,IAAI,iBAAiB;AACrB,IAAI,oBAAoB;AACxB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-carousel.mjs","sources":["../../../../../../packages/components/carousel/src/use-carousel.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n isVNode,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n useSlots,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, flattedChildren, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext<CarouselEmits>['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren<CarouselItemContext>(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n const slots = useSlots()\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref<ReturnType<typeof setInterval> | null>(null)\n const hover = ref(false)\n const root = ref<HTMLDivElement>()\n const containerHeight = ref<number>(0)\n const isItemsTwoLength = ref(true)\n const isFirstCall = ref(true)\n const isTransitioning = ref(false)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n const isTwoLengthShow = (index: number) => {\n if (!isItemsTwoLength.value) return true\n return activeIndex.value <= 1 ? index <= 1 : index > 1\n }\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n isFirstCall.value = false\n\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleTransitionEnd() {\n isTransitioning.value = false\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n if (index !== activeIndex.value) {\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n if (!isFirstCall.value) {\n isTransitioning.value = true\n }\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n if (!props.pauseOnHover) startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n function PlaceholderItem() {\n // fix: https://github.com/element-plus/element-plus/issues/12139\n const defaultSlots = slots.default?.()\n if (!defaultSlots) return null\n\n const flatSlots = flattedChildren(defaultSlots)\n\n const carouselItemsName = 'ElCarouselItem'\n\n const normalizeSlots = flatSlots.filter((slot) => {\n return isVNode(slot) && (slot.type as any).name === carouselItemsName\n })\n\n if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {\n isItemsTwoLength.value = true\n return normalizeSlots\n }\n isItemsTwoLength.value = false\n return null\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (isItemsTwoLength.value) {\n current = current % 2\n prev = prev % 2\n }\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n const resizeObserver = shallowRef<ReturnType<typeof useResizeObserver>>()\n // lifecycle\n onMounted(() => {\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n },\n {\n immediate: true,\n }\n )\n\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n isTransitioning,\n items,\n isVertical,\n containerStyle,\n isItemsTwoLength,\n handleButtonEnter,\n handleTransitionEnd,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA,MAAM,aAAa,GAAG,GAAG,CAAC;AACd,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,KAAK;AAC3D,EAAE,MAAM;AACR,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,QAAQ,EAAE,OAAO;AACrB,IAAI,WAAW,EAAE,UAAU;AAC3B,GAAG,GAAG,kBAAkB,CAAC,kBAAkB,EAAE,EAAE,gBAAgB,CAAC,CAAC;AACjE,EAAE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1B,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC3B,EAAE,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;AACrB,EAAE,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,EAAE,MAAM,gBAAgB,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACrC,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AAChC,EAAE,MAAM,eAAe,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACrC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,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AI,IAAI,CAAC,KAAK,IAAI,cAAc,CAAC,KAAK;AAC1C,MAAM,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAClC,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,CAAC,kBAAkB,EAAE;AAC9B,IAAI,IAAI;AACR,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,kBAAkB;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,eAAe;AACnB,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,iBAAiB;AACrB,IAAI,mBAAmB;AACvB,IAAI,iBAAiB;AACrB,IAAI,oBAAoB;AACxB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
@@ -7,6 +7,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
7
7
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
8
8
  default: undefined;
9
9
  };
10
+ value: {
11
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
12
+ default: undefined;
13
+ };
10
14
  indeterminate: BooleanConstructor;
11
15
  disabled: BooleanConstructor;
12
16
  checked: BooleanConstructor;
@@ -14,6 +18,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
14
18
  type: StringConstructor;
15
19
  default: undefined;
16
20
  };
21
+ trueValue: {
22
+ type: (NumberConstructor | StringConstructor)[];
23
+ default: undefined;
24
+ };
25
+ falseValue: {
26
+ type: (NumberConstructor | StringConstructor)[];
27
+ default: undefined;
28
+ };
17
29
  trueLabel: {
18
30
  type: (NumberConstructor | StringConstructor)[];
19
31
  default: undefined;
@@ -52,6 +64,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
52
64
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
53
65
  default: undefined;
54
66
  };
67
+ value: {
68
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
69
+ default: undefined;
70
+ };
55
71
  indeterminate: BooleanConstructor;
56
72
  disabled: BooleanConstructor;
57
73
  checked: BooleanConstructor;
@@ -59,6 +75,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
59
75
  type: StringConstructor;
60
76
  default: undefined;
61
77
  };
78
+ trueValue: {
79
+ type: (NumberConstructor | StringConstructor)[];
80
+ default: undefined;
81
+ };
82
+ falseValue: {
83
+ type: (NumberConstructor | StringConstructor)[];
84
+ default: undefined;
85
+ };
62
86
  trueLabel: {
63
87
  type: (NumberConstructor | StringConstructor)[];
64
88
  default: undefined;
@@ -102,6 +126,7 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
102
126
  checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
103
127
  hasOwnLabel: import("vue").ComputedRef<boolean>;
104
128
  model: import("vue").WritableComputedRef<any>;
129
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
105
130
  handleChange: (e: Event) => void;
106
131
  onClickRoot: (e: MouseEvent) => Promise<void>;
107
132
  ns: {
@@ -136,6 +161,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
136
161
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
137
162
  default: undefined;
138
163
  };
164
+ value: {
165
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
166
+ default: undefined;
167
+ };
139
168
  indeterminate: BooleanConstructor;
140
169
  disabled: BooleanConstructor;
141
170
  checked: BooleanConstructor;
@@ -143,6 +172,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
143
172
  type: StringConstructor;
144
173
  default: undefined;
145
174
  };
175
+ trueValue: {
176
+ type: (NumberConstructor | StringConstructor)[];
177
+ default: undefined;
178
+ };
179
+ falseValue: {
180
+ type: (NumberConstructor | StringConstructor)[];
181
+ default: undefined;
182
+ };
146
183
  trueLabel: {
147
184
  type: (NumberConstructor | StringConstructor)[];
148
185
  default: undefined;
@@ -175,6 +212,7 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
175
212
  onChange?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
176
213
  "onUpdate:modelValue"?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
177
214
  }, {
215
+ value: string | number | boolean | Record<string, any>;
178
216
  modelValue: string | number | boolean;
179
217
  label: string | number | boolean | Record<string, any>;
180
218
  id: string;
@@ -184,6 +222,8 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
184
222
  border: boolean;
185
223
  indeterminate: boolean;
186
224
  checked: boolean;
225
+ trueValue: string | number;
226
+ falseValue: string | number;
187
227
  trueLabel: string | number;
188
228
  falseLabel: string | number;
189
229
  controls: string;
@@ -197,6 +237,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
197
237
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
198
238
  default: undefined;
199
239
  };
240
+ value: {
241
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
242
+ default: undefined;
243
+ };
200
244
  indeterminate: BooleanConstructor;
201
245
  disabled: BooleanConstructor;
202
246
  checked: BooleanConstructor;
@@ -204,6 +248,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
204
248
  type: StringConstructor;
205
249
  default: undefined;
206
250
  };
251
+ trueValue: {
252
+ type: (NumberConstructor | StringConstructor)[];
253
+ default: undefined;
254
+ };
255
+ falseValue: {
256
+ type: (NumberConstructor | StringConstructor)[];
257
+ default: undefined;
258
+ };
207
259
  trueLabel: {
208
260
  type: (NumberConstructor | StringConstructor)[];
209
261
  default: undefined;
@@ -242,6 +294,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
242
294
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
243
295
  default: undefined;
244
296
  };
297
+ value: {
298
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
299
+ default: undefined;
300
+ };
245
301
  indeterminate: BooleanConstructor;
246
302
  disabled: BooleanConstructor;
247
303
  checked: BooleanConstructor;
@@ -249,6 +305,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
249
305
  type: StringConstructor;
250
306
  default: undefined;
251
307
  };
308
+ trueValue: {
309
+ type: (NumberConstructor | StringConstructor)[];
310
+ default: undefined;
311
+ };
312
+ falseValue: {
313
+ type: (NumberConstructor | StringConstructor)[];
314
+ default: undefined;
315
+ };
252
316
  trueLabel: {
253
317
  type: (NumberConstructor | StringConstructor)[];
254
318
  default: undefined;
@@ -289,6 +353,7 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
289
353
  isDisabled: import("vue").ComputedRef<boolean>;
290
354
  checkboxButtonSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
291
355
  model: import("vue").WritableComputedRef<any>;
356
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
292
357
  handleChange: (e: Event) => void;
293
358
  checkboxGroup: ({
294
359
  modelValue?: import("vue").WritableComputedRef<any> | undefined;
@@ -326,6 +391,10 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
326
391
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
327
392
  default: undefined;
328
393
  };
394
+ value: {
395
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
396
+ default: undefined;
397
+ };
329
398
  indeterminate: BooleanConstructor;
330
399
  disabled: BooleanConstructor;
331
400
  checked: BooleanConstructor;
@@ -333,6 +402,14 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
333
402
  type: StringConstructor;
334
403
  default: undefined;
335
404
  };
405
+ trueValue: {
406
+ type: (NumberConstructor | StringConstructor)[];
407
+ default: undefined;
408
+ };
409
+ falseValue: {
410
+ type: (NumberConstructor | StringConstructor)[];
411
+ default: undefined;
412
+ };
336
413
  trueLabel: {
337
414
  type: (NumberConstructor | StringConstructor)[];
338
415
  default: undefined;
@@ -365,6 +442,7 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
365
442
  onChange?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
366
443
  "onUpdate:modelValue"?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
367
444
  }, {
445
+ value: string | number | boolean | Record<string, any>;
368
446
  modelValue: string | number | boolean;
369
447
  label: string | number | boolean | Record<string, any>;
370
448
  id: string;
@@ -374,6 +452,8 @@ export declare const ElCheckbox: import("@element-plus/nightly/es/utils").SFCWit
374
452
  border: boolean;
375
453
  indeterminate: boolean;
376
454
  checked: boolean;
455
+ trueValue: string | number;
456
+ falseValue: string | number;
377
457
  trueLabel: string | number;
378
458
  falseLabel: string | number;
379
459
  controls: string;
@@ -478,6 +558,10 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
478
558
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
479
559
  default: undefined;
480
560
  };
561
+ value: {
562
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
563
+ default: undefined;
564
+ };
481
565
  indeterminate: BooleanConstructor;
482
566
  disabled: BooleanConstructor;
483
567
  checked: BooleanConstructor;
@@ -485,6 +569,14 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
485
569
  type: StringConstructor;
486
570
  default: undefined;
487
571
  };
572
+ trueValue: {
573
+ type: (NumberConstructor | StringConstructor)[];
574
+ default: undefined;
575
+ };
576
+ falseValue: {
577
+ type: (NumberConstructor | StringConstructor)[];
578
+ default: undefined;
579
+ };
488
580
  trueLabel: {
489
581
  type: (NumberConstructor | StringConstructor)[];
490
582
  default: undefined;
@@ -523,6 +615,10 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
523
615
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
524
616
  default: undefined;
525
617
  };
618
+ value: {
619
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
620
+ default: undefined;
621
+ };
526
622
  indeterminate: BooleanConstructor;
527
623
  disabled: BooleanConstructor;
528
624
  checked: BooleanConstructor;
@@ -530,6 +626,14 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
530
626
  type: StringConstructor;
531
627
  default: undefined;
532
628
  };
629
+ trueValue: {
630
+ type: (NumberConstructor | StringConstructor)[];
631
+ default: undefined;
632
+ };
633
+ falseValue: {
634
+ type: (NumberConstructor | StringConstructor)[];
635
+ default: undefined;
636
+ };
533
637
  trueLabel: {
534
638
  type: (NumberConstructor | StringConstructor)[];
535
639
  default: undefined;
@@ -570,6 +674,7 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
570
674
  isDisabled: import("vue").ComputedRef<boolean>;
571
675
  checkboxButtonSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
572
676
  model: import("vue").WritableComputedRef<any>;
677
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
573
678
  handleChange: (e: Event) => void;
574
679
  checkboxGroup: ({
575
680
  modelValue?: import("vue").WritableComputedRef<any> | undefined;
@@ -607,6 +712,10 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
607
712
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
608
713
  default: undefined;
609
714
  };
715
+ value: {
716
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
717
+ default: undefined;
718
+ };
610
719
  indeterminate: BooleanConstructor;
611
720
  disabled: BooleanConstructor;
612
721
  checked: BooleanConstructor;
@@ -614,6 +723,14 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
614
723
  type: StringConstructor;
615
724
  default: undefined;
616
725
  };
726
+ trueValue: {
727
+ type: (NumberConstructor | StringConstructor)[];
728
+ default: undefined;
729
+ };
730
+ falseValue: {
731
+ type: (NumberConstructor | StringConstructor)[];
732
+ default: undefined;
733
+ };
617
734
  trueLabel: {
618
735
  type: (NumberConstructor | StringConstructor)[];
619
736
  default: undefined;
@@ -646,6 +763,7 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
646
763
  onChange?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
647
764
  "onUpdate:modelValue"?: ((val: import("./src/checkbox").CheckboxValueType) => any) | undefined;
648
765
  }, {
766
+ value: string | number | boolean | Record<string, any>;
649
767
  modelValue: string | number | boolean;
650
768
  label: string | number | boolean | Record<string, any>;
651
769
  id: string;
@@ -655,6 +773,8 @@ export declare const ElCheckboxButton: import("@element-plus/nightly/es/utils").
655
773
  border: boolean;
656
774
  indeterminate: boolean;
657
775
  checked: boolean;
776
+ trueValue: string | number;
777
+ falseValue: string | number;
658
778
  trueLabel: string | number;
659
779
  falseLabel: string | number;
660
780
  controls: string;
@@ -25,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  isDisabled,
26
26
  checkboxButtonSize,
27
27
  model,
28
+ actualValue,
28
29
  handleChange
29
30
  } = useCheckbox(props, slots);
30
31
  const checkboxGroup = inject(checkboxGroupContextKey, void 0);
@@ -52,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
53
  return openBlock(), createElementBlock("label", {
53
54
  class: normalizeClass(unref(labelKls))
54
55
  }, [
55
- _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
56
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
56
57
  key: 0,
57
58
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
58
59
  class: normalizeClass(unref(ns).be("button", "original")),
@@ -60,8 +61,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
61
  name: _ctx.name,
61
62
  tabindex: _ctx.tabindex,
62
63
  disabled: unref(isDisabled),
63
- "true-value": _ctx.trueLabel,
64
- "false-value": _ctx.falseLabel,
64
+ "true-value": _ctx.trueValue || _ctx.trueLabel,
65
+ "false-value": _ctx.falseValue || _ctx.falseLabel,
65
66
  onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
66
67
  onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
67
68
  onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
@@ -77,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
78
  name: _ctx.name,
78
79
  tabindex: _ctx.tabindex,
79
80
  disabled: unref(isDisabled),
80
- value: _ctx.label,
81
+ value: unref(actualValue),
81
82
  onChange: _cache[6] || (_cache[6] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
82
83
  onFocus: _cache[7] || (_cache[7] = ($event) => isFocused.value = true),
83
84
  onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false),
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-button.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-button.vue"],"sourcesContent":["<template>\n <label :class=\"labelKls\">\n <input\n v-if=\"trueLabel || falseLabel\"\n v-model=\"model\"\n :class=\"ns.be('button', 'original')\"\n type=\"checkbox\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueLabel\"\n :false-value=\"falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n v-model=\"model\"\n :class=\"ns.be('button', 'original')\"\n type=\"checkbox\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :value=\"label\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n\n <span\n v-if=\"$slots.default || label\"\n :class=\"ns.be('button', 'inner')\"\n :style=\"isChecked ? activeStyle : undefined\"\n >\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxGroupContextKey } from './constants'\nimport { useCheckbox } from './composables'\nimport { checkboxEmits, checkboxProps } from './checkbox'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCheckboxButton',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n isFocused,\n isChecked,\n isDisabled,\n checkboxButtonSize,\n model,\n handleChange,\n} = useCheckbox(props, slots)\nconst checkboxGroup = inject(checkboxGroupContextKey, undefined)\nconst ns = useNamespace('checkbox')\n\nconst activeStyle = computed<CSSProperties>(() => {\n const fillValue = checkboxGroup?.fill?.value ?? ''\n return {\n backgroundColor: fillValue,\n borderColor: fillValue,\n color: checkboxGroup?.textColor?.value ?? '',\n boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : undefined,\n }\n})\n\nconst labelKls = computed(() => {\n return [\n ns.b('button'),\n ns.bm('button', checkboxButtonSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":[],"mappings":";;;;;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AAA,MAAA;AAAA,MACL,OAAK;AAAQ,QACb,EAAG,CAAA,CAAA,CAAA,QAAa,CAAA;AAAwB,QACxC,EAAG,CAAA,EAAA,CAAG,QAAY,EAAA,kBAAgB,CAAA,KAAA,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,UAAW,EAAA,UAAe,CAAA,KAAA,CAAA;AAAA,QAChC,EAAG,CAAA,EAAA,CAAG,SAAS,EAAA,SAAe,CAAA,KAAA,CAAA;AAAA,QAChC,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,KAAA,CAAA;AAAA,OACD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox-button.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox-button.vue"],"sourcesContent":["<template>\n <label :class=\"labelKls\">\n <input\n v-if=\"trueValue || falseValue || trueLabel || falseLabel\"\n v-model=\"model\"\n :class=\"ns.be('button', 'original')\"\n type=\"checkbox\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueValue || trueLabel\"\n :false-value=\"falseValue || falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n v-model=\"model\"\n :class=\"ns.be('button', 'original')\"\n type=\"checkbox\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :value=\"actualValue\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n\n <span\n v-if=\"$slots.default || label\"\n :class=\"ns.be('button', 'inner')\"\n :style=\"isChecked ? activeStyle : undefined\"\n >\n <slot>{{ label }}</slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxGroupContextKey } from './constants'\nimport { useCheckbox } from './composables'\nimport { checkboxEmits, checkboxProps } from './checkbox'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCheckboxButton',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n isFocused,\n isChecked,\n isDisabled,\n checkboxButtonSize,\n model,\n actualValue,\n handleChange,\n} = useCheckbox(props, slots)\nconst checkboxGroup = inject(checkboxGroupContextKey, undefined)\nconst ns = useNamespace('checkbox')\n\nconst activeStyle = computed<CSSProperties>(() => {\n const fillValue = checkboxGroup?.fill?.value ?? ''\n return {\n backgroundColor: fillValue,\n borderColor: fillValue,\n color: checkboxGroup?.textColor?.value ?? '',\n boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : undefined,\n }\n})\n\nconst labelKls = computed(() => {\n return [\n ns.b('button'),\n ns.bm('button', checkboxButtonSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;mCAmDc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,kBAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,KACE,GAAA,WAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,aAAA,GAAgB,MAAO,CAAA,uBAAA,EAAyB,KAAS,CAAA,CAAA,CAAA;AAC/D,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,WAAA,GAAc,SAAwB,MAAM;AAChD,MAAM,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,E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| StringConstructor)[];
9
9
  default: undefined;
10
10
  };
11
+ value: {
12
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
13
+ default: undefined;
14
+ };
11
15
  indeterminate: BooleanConstructor;
12
16
  disabled: BooleanConstructor;
13
17
  checked: BooleanConstructor;
@@ -15,6 +19,14 @@ declare const _default: import("vue").DefineComponent<{
15
19
  type: StringConstructor;
16
20
  default: undefined;
17
21
  };
22
+ trueValue: {
23
+ type: (NumberConstructor | StringConstructor)[];
24
+ default: undefined;
25
+ };
26
+ falseValue: {
27
+ type: (NumberConstructor | StringConstructor)[];
28
+ default: undefined;
29
+ };
18
30
  trueLabel: {
19
31
  type: (NumberConstructor | StringConstructor)[];
20
32
  default: undefined;
@@ -53,6 +65,10 @@ declare const _default: import("vue").DefineComponent<{
53
65
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
54
66
  default: undefined;
55
67
  };
68
+ value: {
69
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
70
+ default: undefined;
71
+ };
56
72
  indeterminate: BooleanConstructor;
57
73
  disabled: BooleanConstructor;
58
74
  checked: BooleanConstructor;
@@ -60,6 +76,14 @@ declare const _default: import("vue").DefineComponent<{
60
76
  type: StringConstructor;
61
77
  default: undefined;
62
78
  };
79
+ trueValue: {
80
+ type: (NumberConstructor | StringConstructor)[];
81
+ default: undefined;
82
+ };
83
+ falseValue: {
84
+ type: (NumberConstructor | StringConstructor)[];
85
+ default: undefined;
86
+ };
63
87
  trueLabel: {
64
88
  type: (NumberConstructor | StringConstructor)[];
65
89
  default: undefined;
@@ -100,6 +124,7 @@ declare const _default: import("vue").DefineComponent<{
100
124
  isDisabled: import("vue").ComputedRef<boolean>;
101
125
  checkboxButtonSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
102
126
  model: import("vue").WritableComputedRef<any>;
127
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
103
128
  handleChange: (e: Event) => void;
104
129
  checkboxGroup: ({
105
130
  modelValue?: import("vue").WritableComputedRef<any> | undefined;
@@ -137,6 +162,10 @@ declare const _default: import("vue").DefineComponent<{
137
162
  type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
138
163
  default: undefined;
139
164
  };
165
+ value: {
166
+ type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
167
+ default: undefined;
168
+ };
140
169
  indeterminate: BooleanConstructor;
141
170
  disabled: BooleanConstructor;
142
171
  checked: BooleanConstructor;
@@ -144,6 +173,14 @@ declare const _default: import("vue").DefineComponent<{
144
173
  type: StringConstructor;
145
174
  default: undefined;
146
175
  };
176
+ trueValue: {
177
+ type: (NumberConstructor | StringConstructor)[];
178
+ default: undefined;
179
+ };
180
+ falseValue: {
181
+ type: (NumberConstructor | StringConstructor)[];
182
+ default: undefined;
183
+ };
147
184
  trueLabel: {
148
185
  type: (NumberConstructor | StringConstructor)[];
149
186
  default: undefined;
@@ -176,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
176
213
  onChange?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
177
214
  "onUpdate:modelValue"?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
178
215
  }, {
216
+ value: string | number | boolean | Record<string, any>;
179
217
  modelValue: string | number | boolean;
180
218
  label: string | number | boolean | Record<string, any>;
181
219
  id: string;
@@ -185,6 +223,8 @@ declare const _default: import("vue").DefineComponent<{
185
223
  border: boolean;
186
224
  indeterminate: boolean;
187
225
  checked: boolean;
226
+ trueValue: string | number;
227
+ falseValue: string | number;
188
228
  trueLabel: string | number;
189
229
  falseLabel: string | number;
190
230
  controls: string;