@element-plus/nightly 0.0.20240227 → 0.0.20240228

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 (496) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +136 -201
  3. package/dist/index.full.min.js +22 -22
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +22 -22
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +137 -202
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hr.js +1 -1
  93. package/dist/locale/hr.min.js +1 -1
  94. package/dist/locale/hr.min.mjs +1 -1
  95. package/dist/locale/hr.mjs +1 -1
  96. package/dist/locale/hu.js +1 -1
  97. package/dist/locale/hu.min.js +1 -1
  98. package/dist/locale/hu.min.mjs +1 -1
  99. package/dist/locale/hu.mjs +1 -1
  100. package/dist/locale/hy-am.js +1 -1
  101. package/dist/locale/hy-am.min.js +1 -1
  102. package/dist/locale/hy-am.min.mjs +1 -1
  103. package/dist/locale/hy-am.mjs +1 -1
  104. package/dist/locale/id.js +1 -1
  105. package/dist/locale/id.min.js +1 -1
  106. package/dist/locale/id.min.mjs +1 -1
  107. package/dist/locale/id.mjs +1 -1
  108. package/dist/locale/it.js +1 -1
  109. package/dist/locale/it.min.js +1 -1
  110. package/dist/locale/it.min.mjs +1 -1
  111. package/dist/locale/it.mjs +1 -1
  112. package/dist/locale/ja.js +1 -1
  113. package/dist/locale/ja.min.js +1 -1
  114. package/dist/locale/ja.min.mjs +1 -1
  115. package/dist/locale/ja.mjs +1 -1
  116. package/dist/locale/kk.js +1 -1
  117. package/dist/locale/kk.min.js +1 -1
  118. package/dist/locale/kk.min.mjs +1 -1
  119. package/dist/locale/kk.mjs +1 -1
  120. package/dist/locale/km.js +1 -1
  121. package/dist/locale/km.min.js +1 -1
  122. package/dist/locale/km.min.mjs +1 -1
  123. package/dist/locale/km.mjs +1 -1
  124. package/dist/locale/ko.js +1 -1
  125. package/dist/locale/ko.min.js +1 -1
  126. package/dist/locale/ko.min.mjs +1 -1
  127. package/dist/locale/ko.mjs +1 -1
  128. package/dist/locale/ku.js +1 -1
  129. package/dist/locale/ku.min.js +1 -1
  130. package/dist/locale/ku.min.mjs +1 -1
  131. package/dist/locale/ku.mjs +1 -1
  132. package/dist/locale/ky.js +1 -1
  133. package/dist/locale/ky.min.js +1 -1
  134. package/dist/locale/ky.min.mjs +1 -1
  135. package/dist/locale/ky.mjs +1 -1
  136. package/dist/locale/lt.js +1 -1
  137. package/dist/locale/lt.min.js +1 -1
  138. package/dist/locale/lt.min.mjs +1 -1
  139. package/dist/locale/lt.mjs +1 -1
  140. package/dist/locale/lv.js +1 -1
  141. package/dist/locale/lv.min.js +1 -1
  142. package/dist/locale/lv.min.mjs +1 -1
  143. package/dist/locale/lv.mjs +1 -1
  144. package/dist/locale/mg.js +1 -1
  145. package/dist/locale/mg.min.js +1 -1
  146. package/dist/locale/mg.min.mjs +1 -1
  147. package/dist/locale/mg.mjs +1 -1
  148. package/dist/locale/mn.js +1 -1
  149. package/dist/locale/mn.min.js +1 -1
  150. package/dist/locale/mn.min.mjs +1 -1
  151. package/dist/locale/mn.mjs +1 -1
  152. package/dist/locale/nb-no.js +1 -1
  153. package/dist/locale/nb-no.min.js +1 -1
  154. package/dist/locale/nb-no.min.mjs +1 -1
  155. package/dist/locale/nb-no.mjs +1 -1
  156. package/dist/locale/nl.js +1 -1
  157. package/dist/locale/nl.min.js +1 -1
  158. package/dist/locale/nl.min.mjs +1 -1
  159. package/dist/locale/nl.mjs +1 -1
  160. package/dist/locale/pa.js +1 -1
  161. package/dist/locale/pa.min.js +1 -1
  162. package/dist/locale/pa.min.mjs +1 -1
  163. package/dist/locale/pa.mjs +1 -1
  164. package/dist/locale/pl.js +1 -1
  165. package/dist/locale/pl.min.js +1 -1
  166. package/dist/locale/pl.min.mjs +1 -1
  167. package/dist/locale/pl.mjs +1 -1
  168. package/dist/locale/pt-br.js +1 -1
  169. package/dist/locale/pt-br.min.js +1 -1
  170. package/dist/locale/pt-br.min.mjs +1 -1
  171. package/dist/locale/pt-br.mjs +1 -1
  172. package/dist/locale/pt.js +1 -1
  173. package/dist/locale/pt.min.js +1 -1
  174. package/dist/locale/pt.min.mjs +1 -1
  175. package/dist/locale/pt.mjs +1 -1
  176. package/dist/locale/ro.js +1 -1
  177. package/dist/locale/ro.min.js +1 -1
  178. package/dist/locale/ro.min.mjs +1 -1
  179. package/dist/locale/ro.mjs +1 -1
  180. package/dist/locale/ru.js +1 -1
  181. package/dist/locale/ru.min.js +1 -1
  182. package/dist/locale/ru.min.mjs +1 -1
  183. package/dist/locale/ru.mjs +1 -1
  184. package/dist/locale/sk.js +1 -1
  185. package/dist/locale/sk.min.js +1 -1
  186. package/dist/locale/sk.min.mjs +1 -1
  187. package/dist/locale/sk.mjs +1 -1
  188. package/dist/locale/sl.js +1 -1
  189. package/dist/locale/sl.min.js +1 -1
  190. package/dist/locale/sl.min.mjs +1 -1
  191. package/dist/locale/sl.mjs +1 -1
  192. package/dist/locale/sr.js +1 -1
  193. package/dist/locale/sr.min.js +1 -1
  194. package/dist/locale/sr.min.mjs +1 -1
  195. package/dist/locale/sr.mjs +1 -1
  196. package/dist/locale/sv.js +1 -1
  197. package/dist/locale/sv.min.js +1 -1
  198. package/dist/locale/sv.min.mjs +1 -1
  199. package/dist/locale/sv.mjs +1 -1
  200. package/dist/locale/sw.js +1 -1
  201. package/dist/locale/sw.min.js +1 -1
  202. package/dist/locale/sw.min.mjs +1 -1
  203. package/dist/locale/sw.mjs +1 -1
  204. package/dist/locale/ta.js +1 -1
  205. package/dist/locale/ta.min.js +1 -1
  206. package/dist/locale/ta.min.mjs +1 -1
  207. package/dist/locale/ta.mjs +1 -1
  208. package/dist/locale/th.js +1 -1
  209. package/dist/locale/th.min.js +1 -1
  210. package/dist/locale/th.min.mjs +1 -1
  211. package/dist/locale/th.mjs +1 -1
  212. package/dist/locale/tk.js +1 -1
  213. package/dist/locale/tk.min.js +1 -1
  214. package/dist/locale/tk.min.mjs +1 -1
  215. package/dist/locale/tk.mjs +1 -1
  216. package/dist/locale/tr.js +1 -1
  217. package/dist/locale/tr.min.js +1 -1
  218. package/dist/locale/tr.min.mjs +1 -1
  219. package/dist/locale/tr.mjs +1 -1
  220. package/dist/locale/ug-cn.js +1 -1
  221. package/dist/locale/ug-cn.min.js +1 -1
  222. package/dist/locale/ug-cn.min.mjs +1 -1
  223. package/dist/locale/ug-cn.mjs +1 -1
  224. package/dist/locale/uk.js +1 -1
  225. package/dist/locale/uk.min.js +1 -1
  226. package/dist/locale/uk.min.mjs +1 -1
  227. package/dist/locale/uk.mjs +1 -1
  228. package/dist/locale/uz-uz.js +1 -1
  229. package/dist/locale/uz-uz.min.js +1 -1
  230. package/dist/locale/uz-uz.min.mjs +1 -1
  231. package/dist/locale/uz-uz.mjs +1 -1
  232. package/dist/locale/vi.js +1 -1
  233. package/dist/locale/vi.min.js +1 -1
  234. package/dist/locale/vi.min.mjs +1 -1
  235. package/dist/locale/vi.mjs +1 -1
  236. package/dist/locale/zh-cn.js +1 -1
  237. package/dist/locale/zh-cn.min.js +1 -1
  238. package/dist/locale/zh-cn.min.mjs +1 -1
  239. package/dist/locale/zh-cn.mjs +1 -1
  240. package/dist/locale/zh-tw.js +1 -1
  241. package/dist/locale/zh-tw.min.js +1 -1
  242. package/dist/locale/zh-tw.min.mjs +1 -1
  243. package/dist/locale/zh-tw.mjs +1 -1
  244. package/es/components/anchor/index.mjs +2 -2
  245. package/es/components/anchor/src/anchor.mjs +190 -38
  246. package/es/components/anchor/src/anchor.mjs.map +1 -1
  247. package/es/components/anchor/src/anchor2.mjs +38 -190
  248. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  249. package/es/components/avatar/index.mjs +2 -2
  250. package/es/components/avatar/src/avatar.mjs +67 -32
  251. package/es/components/avatar/src/avatar.mjs.map +1 -1
  252. package/es/components/avatar/src/avatar2.mjs +32 -67
  253. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  254. package/es/components/calendar/index.mjs +2 -2
  255. package/es/components/calendar/src/calendar.mjs +131 -18
  256. package/es/components/calendar/src/calendar.mjs.map +1 -1
  257. package/es/components/calendar/src/calendar2.mjs +18 -131
  258. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  259. package/es/components/calendar/src/use-calendar.mjs +1 -11
  260. package/es/components/calendar/src/use-calendar.mjs.map +1 -1
  261. package/es/components/carousel/index.mjs +2 -2
  262. package/es/components/carousel/src/carousel-item.mjs +70 -8
  263. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  264. package/es/components/carousel/src/carousel-item2.mjs +8 -70
  265. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  266. package/es/components/cascader/index.mjs +2 -2
  267. package/es/components/cascader/src/cascader.mjs +626 -65
  268. package/es/components/cascader/src/cascader.mjs.map +1 -1
  269. package/es/components/cascader/src/cascader2.mjs +65 -626
  270. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  271. package/es/components/checkbox/index.d.ts +120 -0
  272. package/es/components/checkbox/src/checkbox-button.mjs +5 -4
  273. package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
  274. package/es/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
  275. package/es/components/checkbox/src/checkbox.d.ts +24 -1
  276. package/es/components/checkbox/src/checkbox.mjs +12 -0
  277. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  278. package/es/components/checkbox/src/checkbox.vue.d.ts +40 -0
  279. package/es/components/checkbox/src/checkbox2.mjs +5 -4
  280. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  281. package/es/components/checkbox/src/composables/use-checkbox-event.mjs +2 -2
  282. package/es/components/checkbox/src/composables/use-checkbox-event.mjs.map +1 -1
  283. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
  284. package/es/components/checkbox/src/composables/use-checkbox-status.mjs +15 -8
  285. package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
  286. package/es/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
  287. package/es/components/checkbox/src/composables/use-checkbox.mjs +40 -13
  288. package/es/components/checkbox/src/composables/use-checkbox.mjs.map +1 -1
  289. package/es/components/col/index.mjs +2 -2
  290. package/es/components/col/src/col.mjs +43 -66
  291. package/es/components/col/src/col.mjs.map +1 -1
  292. package/es/components/col/src/col2.mjs +66 -43
  293. package/es/components/col/src/col2.mjs.map +1 -1
  294. package/es/components/date-picker/src/composables/use-basic-date-table.mjs +1 -1
  295. package/es/components/date-picker/src/composables/use-basic-date-table.mjs.map +1 -1
  296. package/es/components/index.mjs +10 -10
  297. package/es/components/menu/index.d.ts +0 -6
  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 +1 -9
  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/index.mjs +2 -2
  340. package/es/components/switch/src/switch.d.ts +0 -4
  341. package/es/components/switch/src/switch.mjs +234 -98
  342. package/es/components/switch/src/switch.mjs.map +1 -1
  343. package/es/components/switch/src/switch.vue.d.ts +0 -19
  344. package/es/components/switch/src/switch2.mjs +82 -268
  345. package/es/components/switch/src/switch2.mjs.map +1 -1
  346. package/es/components/tabs/index.d.ts +0 -12
  347. package/es/components/tabs/src/tabs.d.ts +0 -18
  348. package/es/components/tabs/src/tabs.mjs +7 -29
  349. package/es/components/tabs/src/tabs.mjs.map +1 -1
  350. package/es/components/time-select/index.d.ts +0 -12
  351. package/es/components/time-select/src/time-select.vue.d.ts +0 -6
  352. package/es/components/tooltip/src/content.mjs +1 -1
  353. package/es/components/tooltip/src/content2.mjs +1 -1
  354. package/es/components/tour/index.mjs +2 -2
  355. package/es/components/tour/src/tour.mjs +152 -69
  356. package/es/components/tour/src/tour.mjs.map +1 -1
  357. package/es/components/tour/src/tour2.mjs +69 -152
  358. package/es/components/tour/src/tour2.mjs.map +1 -1
  359. package/es/components/transfer/index.d.ts +400 -0
  360. package/es/components/transfer/src/transfer-panel.vue.d.ts +80 -0
  361. package/es/components/transfer/src/transfer.vue.d.ts +400 -0
  362. package/es/components/tree-v2/index.d.ts +80 -0
  363. package/es/components/tree-v2/src/tree-node.vue.d.ts +80 -0
  364. package/es/components/tree-v2/src/tree.vue.d.ts +80 -0
  365. package/es/index.mjs +10 -10
  366. package/es/version.d.ts +1 -1
  367. package/es/version.mjs +1 -1
  368. package/es/version.mjs.map +1 -1
  369. package/lib/components/anchor/index.js +2 -2
  370. package/lib/components/anchor/src/anchor.js +189 -38
  371. package/lib/components/anchor/src/anchor.js.map +1 -1
  372. package/lib/components/anchor/src/anchor2.js +38 -189
  373. package/lib/components/anchor/src/anchor2.js.map +1 -1
  374. package/lib/components/avatar/index.js +2 -2
  375. package/lib/components/avatar/src/avatar.js +67 -33
  376. package/lib/components/avatar/src/avatar.js.map +1 -1
  377. package/lib/components/avatar/src/avatar2.js +33 -67
  378. package/lib/components/avatar/src/avatar2.js.map +1 -1
  379. package/lib/components/calendar/index.js +2 -2
  380. package/lib/components/calendar/src/calendar.js +131 -19
  381. package/lib/components/calendar/src/calendar.js.map +1 -1
  382. package/lib/components/calendar/src/calendar2.js +19 -131
  383. package/lib/components/calendar/src/calendar2.js.map +1 -1
  384. package/lib/components/calendar/src/use-calendar.js +0 -10
  385. package/lib/components/calendar/src/use-calendar.js.map +1 -1
  386. package/lib/components/carousel/index.js +2 -2
  387. package/lib/components/carousel/src/carousel-item.js +70 -8
  388. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  389. package/lib/components/carousel/src/carousel-item2.js +8 -70
  390. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  391. package/lib/components/cascader/index.js +2 -2
  392. package/lib/components/cascader/src/cascader.js +626 -66
  393. package/lib/components/cascader/src/cascader.js.map +1 -1
  394. package/lib/components/cascader/src/cascader2.js +66 -626
  395. package/lib/components/cascader/src/cascader2.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 +10 -10
  422. package/lib/components/menu/index.d.ts +0 -6
  423. package/lib/components/menu/src/sub-menu.d.ts +0 -4
  424. package/lib/components/menu/src/sub-menu.js +10 -23
  425. package/lib/components/menu/src/sub-menu.js.map +1 -1
  426. package/lib/components/pagination/src/components/sizes.vue.d.ts +0 -3
  427. package/lib/components/popper/index.js +2 -2
  428. package/lib/components/popper/src/content.js +99 -137
  429. package/lib/components/popper/src/content.js.map +1 -1
  430. package/lib/components/popper/src/content2.js +137 -99
  431. package/lib/components/popper/src/content2.js.map +1 -1
  432. package/lib/components/radio/index.d.ts +77 -54
  433. package/lib/components/radio/src/radio-button.d.ts +4 -2
  434. package/lib/components/radio/src/radio-button.js +1 -5
  435. package/lib/components/radio/src/radio-button.js.map +1 -1
  436. package/lib/components/radio/src/radio-button.vue.d.ts +16 -7
  437. package/lib/components/radio/src/radio-button2.js +4 -4
  438. package/lib/components/radio/src/radio-button2.js.map +1 -1
  439. package/lib/components/radio/src/radio-group.d.ts +3 -3
  440. package/lib/components/radio/src/radio-group.js +1 -1
  441. package/lib/components/radio/src/radio-group.js.map +1 -1
  442. package/lib/components/radio/src/radio-group.vue.d.ts +10 -10
  443. package/lib/components/radio/src/radio.d.ts +10 -6
  444. package/lib/components/radio/src/radio.js +13 -9
  445. package/lib/components/radio/src/radio.js.map +1 -1
  446. package/lib/components/radio/src/radio.vue.d.ts +23 -18
  447. package/lib/components/radio/src/radio2.js +4 -4
  448. package/lib/components/radio/src/radio2.js.map +1 -1
  449. package/lib/components/radio/src/use-radio.d.ts +4 -5
  450. package/lib/components/radio/src/use-radio.js +21 -3
  451. package/lib/components/radio/src/use-radio.js.map +1 -1
  452. package/lib/components/select/index.d.ts +0 -3
  453. package/lib/components/select/src/select.d.ts +0 -1
  454. package/lib/components/select/src/select.js +0 -4
  455. package/lib/components/select/src/select.js.map +1 -1
  456. package/lib/components/select/src/select.vue.d.ts +0 -3
  457. package/lib/components/select/src/useSelect.js +4 -20
  458. package/lib/components/select/src/useSelect.js.map +1 -1
  459. package/lib/components/select-v2/src/select-dropdown.js +5 -10
  460. package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
  461. package/lib/components/select-v2/src/useSelect.js +1 -9
  462. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  463. package/lib/components/switch/index.d.ts +0 -19
  464. package/lib/components/switch/index.js +2 -2
  465. package/lib/components/switch/src/switch.d.ts +0 -4
  466. package/lib/components/switch/src/switch.js +233 -98
  467. package/lib/components/switch/src/switch.js.map +1 -1
  468. package/lib/components/switch/src/switch.vue.d.ts +0 -19
  469. package/lib/components/switch/src/switch2.js +82 -267
  470. package/lib/components/switch/src/switch2.js.map +1 -1
  471. package/lib/components/tabs/index.d.ts +0 -12
  472. package/lib/components/tabs/src/tabs.d.ts +0 -18
  473. package/lib/components/tabs/src/tabs.js +7 -29
  474. package/lib/components/tabs/src/tabs.js.map +1 -1
  475. package/lib/components/time-select/index.d.ts +0 -12
  476. package/lib/components/time-select/src/time-select.vue.d.ts +0 -6
  477. package/lib/components/tooltip/src/content.js +1 -1
  478. package/lib/components/tooltip/src/content2.js +1 -1
  479. package/lib/components/tour/index.js +2 -2
  480. package/lib/components/tour/src/tour.js +151 -69
  481. package/lib/components/tour/src/tour.js.map +1 -1
  482. package/lib/components/tour/src/tour2.js +69 -151
  483. package/lib/components/tour/src/tour2.js.map +1 -1
  484. package/lib/components/transfer/index.d.ts +400 -0
  485. package/lib/components/transfer/src/transfer-panel.vue.d.ts +80 -0
  486. package/lib/components/transfer/src/transfer.vue.d.ts +400 -0
  487. package/lib/components/tree-v2/index.d.ts +80 -0
  488. package/lib/components/tree-v2/src/tree-node.vue.d.ts +80 -0
  489. package/lib/components/tree-v2/src/tree.vue.d.ts +80 -0
  490. package/lib/index.js +10 -10
  491. package/lib/version.d.ts +1 -1
  492. package/lib/version.js +1 -1
  493. package/lib/version.js.map +1 -1
  494. package/package.json +2 -2
  495. package/tags.json +1 -1
  496. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n default: undefined,\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes<typeof checkboxProps>\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType<typeof Checkbox>\n"],"names":["useSizeProp","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean"],"mappings":";;;;;;;;;;;;AAGY,MAAC,aAAa,GAAG;AAC7B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC3C,IAAI,OAAO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ox.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description label of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n value: {\n type: [String, Boolean, Number, Object],\n default: undefined,\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueValue: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseValue: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @deprecated use `trueValue` instead\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @deprecated use `falseValue` instead\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes<typeof checkboxProps>\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType<typeof Checkbox>\n"],"names":["useSizeProp","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean"],"mappings":";;;;;;;;;;;;AAGY,MAAC,aAAa,GAAG;AAC7B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,IAAI,EAAEA,iBAAW;AACnB,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5B,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE;AACU,MAAC,aAAa,GAAG;AAC7B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACjF,EAAE,MAAM,EAAE,CAAC,GAAG,KAAKF,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACnE;;;;;"}
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
175
212
  onChange?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
176
213
  "onUpdate:modelValue"?: ((val: import("./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 @@ declare const _default: import("vue").DefineComponent<{
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;
@@ -31,6 +31,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
31
31
  checkboxSize,
32
32
  hasOwnLabel,
33
33
  model,
34
+ actualValue,
34
35
  handleChange,
35
36
  onClickRoot
36
37
  } = useCheckbox.useCheckbox(props, slots);
@@ -63,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
63
64
  vue.createElementVNode("span", {
64
65
  class: vue.normalizeClass(vue.unref(spanKls))
65
66
  }, [
66
- _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
67
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
67
68
  key: 0,
68
69
  id: vue.unref(inputId),
69
70
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(model) ? model.value = $event : null),
@@ -73,8 +74,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
73
74
  name: _ctx.name,
74
75
  tabindex: _ctx.tabindex,
75
76
  disabled: vue.unref(isDisabled),
76
- "true-value": _ctx.trueLabel,
77
- "false-value": _ctx.falseLabel,
77
+ "true-value": _ctx.trueValue || _ctx.trueLabel,
78
+ "false-value": _ctx.falseValue || _ctx.falseLabel,
78
79
  onChange: _cache[1] || (_cache[1] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
79
80
  onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
80
81
  onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
@@ -90,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
90
91
  type: "checkbox",
91
92
  indeterminate: _ctx.indeterminate,
92
93
  disabled: vue.unref(isDisabled),
93
- value: _ctx.label,
94
+ value: vue.unref(actualValue),
94
95
  name: _ctx.name,
95
96
  tabindex: _ctx.tabindex,
96
97
  onChange: _cache[6] || (_cache[6] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\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 :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"label\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span v-if=\"hasOwnLabel\" :class=\"ns.e('label')\">\n <slot />\n <template v-if=\"!$slots.default\">{{ label }}</template>\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxEmits, checkboxProps } from './checkbox'\nimport { useCheckbox } from './composables'\n\ndefineOptions({\n name: 'ElCheckbox',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n} = useCheckbox(props, slots)\n\nconst ns = useNamespace('checkbox')\n\nconst compKls = computed(() => {\n return [\n ns.b(),\n ns.m(checkboxSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('bordered', props.border),\n ns.is('checked', isChecked.value),\n ]\n})\n\nconst spanKls = computed(() => {\n return [\n ns.e('input'),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('indeterminate', props.indeterminate),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":["useSlots","useCheckbox","useNamespace","comput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CAAU,KAAK,CAAA;AAAA,OAChC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueValue || falseValue || trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\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 :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"actualValue\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span v-if=\"hasOwnLabel\" :class=\"ns.e('label')\">\n <slot />\n <template v-if=\"!$slots.default\">{{ label }}</template>\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxEmits, checkboxProps } from './checkbox'\nimport { useCheckbox } from './composables'\n\ndefineOptions({\n name: 'ElCheckbox',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n model,\n actualValue,\n handleChange,\n onClickRoot,\n} = useCheckbox(props, slots)\n\nconst ns = useNamespace('checkbox')\n\nconst compKls = computed(() => {\n return [\n ns.b(),\n ns.m(checkboxSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('bordered', props.border),\n ns.is('checked', isChecked.value),\n ]\n})\n\nconst spanKls = computed(() => {\n return [\n ns.e('input'),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('indeterminate', props.indeterminate),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":["useSlots","useCheckbox","useNamespace","computed"],"mappings":";;;;;;;;;;;;;;uCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,CAAE,CAAA,YAAA,CAAa,KAAK,CAAA;AAAA,QACvB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,QAC9B,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAUA,aAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,EAAA,CAAG,EAAE,OAAO,CAAA;AAAA,QACZ,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,QAChC,EAAG,CAAA,EAAA,CAAG,eAAiB,EAAA,KAAA,CAAM,aAAa,CAAA;AAAA,QAC1C,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAChC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -21,7 +21,7 @@ const useCheckboxEvent = (props, {
21
21
  const { emit } = vue.getCurrentInstance();
22
22
  function getLabeledValue(value) {
23
23
  var _a, _b;
24
- return value === props.trueLabel || value === true ? (_a = props.trueLabel) != null ? _a : true : (_b = props.falseLabel) != null ? _b : false;
24
+ return [true, props.trueValue, props.trueLabel].includes(value) ? (_a = props.trueValue || props.trueLabel) != null ? _a : true : (_b = props.falseValue || props.falseLabel) != null ? _b : false;
25
25
  }
26
26
  function emitChangeEvent(checked, e) {
27
27
  emit("change", getLabeledValue(checked), e);
@@ -39,7 +39,7 @@ const useCheckboxEvent = (props, {
39
39
  const eventTargets = e.composedPath();
40
40
  const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
41
41
  if (!hasLabel) {
42
- model.value = getLabeledValue([false, props.falseLabel].includes(model.value));
42
+ model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
43
43
  await vue.nextTick();
44
44
  emitChangeEvent(model.value, e);
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-event.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-event.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick<CheckboxModel, 'model' | 'isLimitExceeded'> &\n Pick<CheckboxStatus, 'hasOwnLabel'> &\n Pick<CheckboxDisabled, 'isDisabled'> &\n Pick<ReturnType<typeof useFormItemInputId>, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return value === props.trueLabel || value === true\n ? props.trueLabel ?? true\n : props.falseLabel ?? false\n }\n\n function emitChangeEvent(\n checked: string | number | boolean,\n e: InputEvent | MouseEvent\n ) {\n emit('change', getLabeledValue(checked), e)\n }\n\n function handleChange(e: Event) {\n if (isLimitExceeded.value) return\n\n const target = e.target as HTMLInputElement\n emit('change', getLabeledValue(target.checked), e)\n }\n\n async function onClickRoot(e: MouseEvent) {\n if (isLimitExceeded.value) return\n\n if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {\n // fix: https://github.com/element-plus/element-plus/issues/9981\n const eventTargets: EventTarget[] = e.composedPath()\n const hasLabel = eventTargets.some(\n (item) => (item as HTMLElement).tagName === 'LABEL'\n )\n if (!hasLabel) {\n model.value = getLabeledValue(\n [false, props.falseLabel].includes(model.value)\n )\n await nextTick()\n emitChangeEvent(model.value, e)\n }\n }\n }\n\n const validateEvent = computed(\n () => checkboxGroup?.validateEvent || props.validateEvent\n )\n\n watch(\n () => props.modelValue,\n () => {\n if (validateEvent.value) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["inject","checkboxGroupContextKey","useFormItem","getCurrentInstance","nextTick","computed","watch","debugWarn"],"mappings":";;;;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE;AACxC,EAAE,KAAK;AACP,EAAE,eAAe;AACjB,EAAE,WAAW;AACb,EAAE,UAAU;AACZ,EAAE,mBAAmB;AACrB,CAAC,KAAK;AACN,EAAE,MAAM,aAAa,GAAGA,UAAM,CAACC,iCAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAGC,uBAAW,EAAE,CAAC;AACrC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,SAAS,eAAe,CAAC,KAAK,EAAE;AAClC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,OAAO,KAAK,KAAK,KAAK,CAAC,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC;AACnJ,GAAG;AACH,EAAE,SAAS,eAAe,CAAC,OAAO,EAAE,CAAC,EAAE;AACvC,IAAI,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAChD,GAAG;AACH,EAAE,SAAS,YAAY,CAAC,CAAC,EAAE;AAC3B,IAAI,IAAI,eAAe,CAAC,KAAK;AAC7B,MAAM,OAAO;AACb,IAAI,MAAM,MAAM,G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,eAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7F,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-checkbox-event.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-event.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick<CheckboxModel, 'model' | 'isLimitExceeded'> &\n Pick<CheckboxStatus, 'hasOwnLabel'> &\n Pick<CheckboxDisabled, 'isDisabled'> &\n Pick<ReturnType<typeof useFormItemInputId>, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return [true, props.trueValue, props.trueLabel].includes(value)\n ? (props.trueValue || props.trueLabel) ?? true\n : (props.falseValue || props.falseLabel) ?? false\n }\n\n function emitChangeEvent(\n checked: string | number | boolean,\n e: InputEvent | MouseEvent\n ) {\n emit('change', getLabeledValue(checked), e)\n }\n\n function handleChange(e: Event) {\n if (isLimitExceeded.value) return\n\n const target = e.target as HTMLInputElement\n emit('change', getLabeledValue(target.checked), e)\n }\n\n async function onClickRoot(e: MouseEvent) {\n if (isLimitExceeded.value) return\n\n if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {\n // fix: https://github.com/element-plus/element-plus/issues/9981\n const eventTargets: EventTarget[] = e.composedPath()\n const hasLabel = eventTargets.some(\n (item) => (item as HTMLElement).tagName === 'LABEL'\n )\n if (!hasLabel) {\n model.value = getLabeledValue(\n [false, props.falseValue, props.falseLabel].includes(model.value)\n )\n await nextTick()\n emitChangeEvent(model.value, e)\n }\n }\n }\n\n const validateEvent = computed(\n () => checkboxGroup?.validateEvent || props.validateEvent\n )\n\n watch(\n () => props.modelValue,\n () => {\n if (validateEvent.value) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["inject","checkboxGroupContextKey","useFormItem","getCurrentInstance","nextTick","computed","watch","debugWarn"],"mappings":";;;;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE;AACxC,EAAE,KAAK;AACP,EAAE,eAAe;AACjB,EAAE,WAAW;AACb,EAAE,UAAU;AACZ,EAAE,mBAAmB;AACrB,CAAC,KAAK;AACN,EAAE,MAAM,aAAa,GAAGA,UAAM,CAACC,iCAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAGC,uBAAW,EAAE,CAAC;AACrC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,SAAS,eAAe,CAAC,KAAK,EAAE;AAClC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC;AACvM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CAAC,GAAG,aAAa,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9H,EAAEC,SAAK,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,MAAM;AACtC,IAAI,IAAI,aAAa,CAAC,KAAK,EAAE;AAC7B,MAAM,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,KAAKC,eAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7F,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -7,5 +7,6 @@ export declare const useCheckboxStatus: (props: CheckboxProps, slots: ComponentI
7
7
  isFocused: import("vue").Ref<boolean>;
8
8
  checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
9
9
  hasOwnLabel: import("vue").ComputedRef<boolean>;
10
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
10
11
  };
11
12
  export declare type CheckboxStatus = ReturnType<typeof useCheckboxStatus>;
@@ -14,18 +14,24 @@ var useFormCommonProps = require('../../../form/src/hooks/use-form-common-props.
14
14
  const useCheckboxStatus = (props, slots, { model }) => {
15
15
  const checkboxGroup = vue.inject(constants.checkboxGroupContextKey, void 0);
16
16
  const isFocused = vue.ref(false);
17
+ const actualValue = vue.computed(() => {
18
+ if (!types.isPropAbsent(props.value)) {
19
+ return props.value;
20
+ }
21
+ return props.label;
22
+ });
17
23
  const isChecked = vue.computed(() => {
18
24
  const value = model.value;
19
25
  if (types.isBoolean(value)) {
20
26
  return value;
21
27
  } else if (shared.isArray(value)) {
22
- if (shared.isObject(props.label)) {
23
- return value.map(vue.toRaw).some((o) => lodashUnified.isEqual(o, props.label));
28
+ if (shared.isObject(actualValue.value)) {
29
+ return value.map(vue.toRaw).some((o) => lodashUnified.isEqual(o, actualValue.value));
24
30
  } else {
25
- return value.map(vue.toRaw).includes(props.label);
31
+ return value.map(vue.toRaw).includes(actualValue.value);
26
32
  }
27
33
  } else if (value !== null && value !== void 0) {
28
- return value === props.trueLabel;
34
+ return value === props.trueValue || value === props.trueLabel;
29
35
  } else {
30
36
  return !!value;
31
37
  }
@@ -41,14 +47,15 @@ const useCheckboxStatus = (props, slots, { model }) => {
41
47
  return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
42
48
  }));
43
49
  const hasOwnLabel = vue.computed(() => {
44
- return !!slots.default || !lodashUnified.isNil(props.label);
50
+ return !!slots.default || !types.isPropAbsent(actualValue.value);
45
51
  });
46
52
  return {
47
53
  checkboxButtonSize,
48
54
  isChecked,
49
55
  isFocused,
50
56
  checkboxSize,
51
- hasOwnLabel
57
+ hasOwnLabel,
58
+ actualValue
52
59
  };
53
60
  };
54
61
 
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-status.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual, isNil } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!slots.default || !isNil(props.label)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n }\n}\n\nexport type CheckboxStatus = ReturnType<typeof useCheckboxStatus>\n"],"names":["inject","checkboxGroupContextKey","ref","computed","isBoolean","isArray","isObject","toRaw","isEqual","useFormSize","isNil"],"mappings":";;;;;;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa,GAAGA,UAAM,CAACC,iCAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,SAAS,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,SAAS,GAAGC,YAAQ,CAAC,MAAM;AACnC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC9B,IAAI,IAAIC,eAAS,CAAC,KAAK,CAAC,EAAE;AAC1B,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK,MAAM,IAAIC,cAAO,CAAC,KAAK,CAAC,EAAE;AAC/B,MAAM,IAAIC,eAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACjC,QAAQ,OAAO,KAAK,CAAC,GAAG,CAACC,SAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAKC,qBAAO,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE,OAAO,MAAM;AACb,QAAQ,OAAO,KAAK,CAAC,GAAG,CAACD,SAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtD,OAAO;AACP,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE;AACnD,MAAM,OAAO,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;AACvC,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC;AACrB,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,kBAAkB,GAAGE,8BAAW,CAACN,YAAQ,CAAC,MAAM;AACxD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,EAAE;AACN,IAAI,IAAI,EAAE,IAAI;AACd,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,YAAY,GAAGM,8BAAW,CAACN,YAAQ,CAAC,MAAM;AAClD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,WAAW,GAAGA,YAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAACO,mBAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClD,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-checkbox-status.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject, isPropAbsent } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const actualValue = computed(() => {\n // In version 2.x, if there's no props.value, props.label will act as props.value\n // In version 3.x, remove this computed value, use props.value instead.\n if (!isPropAbsent(props.value)) {\n return props.value\n }\n return props.label\n })\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(actualValue.value)) {\n return value.map(toRaw).some((o) => isEqual(o, actualValue.value))\n } else {\n return value.map(toRaw).includes(actualValue.value)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueValue || value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!slots.default || !isPropAbsent(actualValue.value)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n actualValue,\n }\n}\n\nexport type CheckboxStatus = ReturnType<typeof useCheckboxStatus>\n"],"names":["inject","checkboxGroupContextKey","ref","computed","isPropAbsent","isBoolean","isArray","isObject","toRaw","isEqual","useFormSize"],"mappings":";;;;;;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa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BAAkB,GAAGE,8BAAW,CAACP,YAAQ,CAAC,MAAM;AACxD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,EAAE;AACN,IAAI,IAAI,EAAE,IAAI;AACd,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,YAAY,GAAGO,8BAAW,CAACP,YAAQ,CAAC,MAAM;AAClD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,WAAW,GAAGA,YAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAACC,kBAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -10,6 +10,7 @@ export declare const useCheckbox: (props: CheckboxProps, slots: ComponentInterna
10
10
  checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
11
11
  hasOwnLabel: import("vue").ComputedRef<boolean>;
12
12
  model: import("vue").WritableComputedRef<any>;
13
+ actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
13
14
  handleChange: (e: Event) => void;
14
15
  onClickRoot: (e: MouseEvent) => Promise<void>;
15
16
  };
@@ -2,25 +2,19 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
5
6
  require('../../../form/index.js');
6
7
  require('../../../../utils/index.js');
8
+ require('../../../../hooks/index.js');
7
9
  var useCheckboxDisabled = require('./use-checkbox-disabled.js');
8
10
  var useCheckboxEvent = require('./use-checkbox-event.js');
9
11
  var useCheckboxModel = require('./use-checkbox-model.js');
10
12
  var useCheckboxStatus = require('./use-checkbox-status.js');
11
- var shared = require('@vue/shared');
12
13
  var useFormItem = require('../../../form/src/hooks/use-form-item.js');
14
+ var shared = require('@vue/shared');
15
+ var index = require('../../../../hooks/use-deprecated/index.js');
16
+ var types = require('../../../../utils/types.js');
13
17
 
14
- const setStoreValue = (props, { model }) => {
15
- function addToStore() {
16
- if (shared.isArray(model.value) && !model.value.includes(props.label)) {
17
- model.value.push(props.label);
18
- } else {
19
- model.value = props.trueLabel || true;
20
- }
21
- }
22
- props.checked && addToStore();
23
- };
24
18
  const useCheckbox = (props, slots) => {
25
19
  const { formItem: elFormItem } = useFormItem.useFormItem();
26
20
  const { model, isGroup, isLimitExceeded } = useCheckboxModel.useCheckboxModel(props);
@@ -29,7 +23,8 @@ const useCheckbox = (props, slots) => {
29
23
  isChecked,
30
24
  checkboxButtonSize,
31
25
  checkboxSize,
32
- hasOwnLabel
26
+ hasOwnLabel,
27
+ actualValue
33
28
  } = useCheckboxStatus.useCheckboxStatus(props, slots, { model });
34
29
  const { isDisabled } = useCheckboxDisabled.useCheckboxDisabled({ model, isChecked });
35
30
  const { inputId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
@@ -44,7 +39,38 @@ const useCheckbox = (props, slots) => {
44
39
  isDisabled,
45
40
  isLabeledByFormItem
46
41
  });
47
- setStoreValue(props, { model });
42
+ const setStoreValue = () => {
43
+ function addToStore() {
44
+ if (shared.isArray(model.value) && !model.value.includes(actualValue.value)) {
45
+ model.value.push(actualValue.value);
46
+ } else {
47
+ model.value = props.trueValue || props.trueLabel || true;
48
+ }
49
+ }
50
+ props.checked && addToStore();
51
+ };
52
+ setStoreValue();
53
+ index.useDeprecated({
54
+ from: "label act as value",
55
+ replacement: "value",
56
+ version: "3.0.0",
57
+ scope: "el-checkbox",
58
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
59
+ }, vue.computed(() => isGroup.value && types.isPropAbsent(props.value)));
60
+ index.useDeprecated({
61
+ from: "true-label",
62
+ replacement: "true-value",
63
+ version: "3.0.0",
64
+ scope: "el-checkbox",
65
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
66
+ }, vue.computed(() => !!props.trueLabel));
67
+ index.useDeprecated({
68
+ from: "false-label",
69
+ replacement: "false-value",
70
+ version: "3.0.0",
71
+ scope: "el-checkbox",
72
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
73
+ }, vue.computed(() => !!props.falseLabel));
48
74
  return {
49
75
  inputId,
50
76
  isLabeledByFormItem,
@@ -55,6 +81,7 @@ const useCheckbox = (props, slots) => {
55
81
  checkboxSize,
56
82
  hasOwnLabel,
57
83
  model,
84
+ actualValue,
58
85
  handleChange,
59
86
  onClickRoot
60
87
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox.ts"],"sourcesContent":["import { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray } from '@element-plus/utils'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from './use-checkbox-model'\n\nconst setStoreValue = (\n props: CheckboxProps,\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n function addToStore() {\n if (isArray(model.value) && !model.value.includes(props.label)) {\n model.value.push(props.label)\n } else {\n model.value = props.trueLabel || true\n }\n }\n props.checked && addToStore()\n}\n\nexport const useCheckbox = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots']\n) => {\n const { formItem: elFormItem } = useFormItem()\n const { model, isGroup, isLimitExceeded } = useCheckboxModel(props)\n const {\n isFocused,\n isChecked,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n } = useCheckboxStatus(props, slots, { model })\n const { isDisabled } = useCheckboxDisabled({ model, isChecked })\n const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n disableIdGeneration: hasOwnLabel,\n disableIdManagement: isGroup,\n })\n const { handleChange, onClickRoot } = useCheckboxEvent(props, {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n })\n\n setStoreValue(props, { model })\n\n return {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["isArray","useFormItem","useCheckboxModel","useCheckboxStatus","useCheckboxDisabled","useFormItemInputId","useCheckboxEvent"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC5C,EAAE,SAAS,UAAU,GAAG;AACxB,IAAI,IAAIA,cAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACpE,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpC,KAAK,MAAM;AACX,MAAM,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC;AAC5C,KAAK;AACL,GAAG;AACH,EAAE,KAAK,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;AAChC,CAAC,CAAC;AACU,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE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ages/components/checkbox/src/composables/use-checkbox.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray, isPropAbsent } from '@element-plus/utils'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\nimport type { ComponentInternalInstance } from 'vue'\n\nimport type { CheckboxProps } from '../checkbox'\n\nexport const useCheckbox = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots']\n) => {\n const { formItem: elFormItem } = useFormItem()\n const { model, isGroup, isLimitExceeded } = useCheckboxModel(props)\n const {\n isFocused,\n isChecked,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n actualValue,\n } = useCheckboxStatus(props, slots, { model })\n const { isDisabled } = useCheckboxDisabled({ model, isChecked })\n const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n disableIdGeneration: hasOwnLabel,\n disableIdManagement: isGroup,\n })\n const { handleChange, onClickRoot } = useCheckboxEvent(props, {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n })\n\n const setStoreValue = () => {\n function addToStore() {\n if (isArray(model.value) && !model.value.includes(actualValue.value)) {\n model.value.push(actualValue.value)\n } else {\n model.value = props.trueValue || props.trueLabel || true\n }\n }\n props.checked && addToStore()\n }\n\n setStoreValue()\n\n useDeprecated(\n {\n from: 'label act as value',\n replacement: 'value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => isGroup.value && isPropAbsent(props.value))\n )\n\n useDeprecated(\n {\n from: 'true-label',\n replacement: 'true-value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => !!props.trueLabel)\n )\n\n useDeprecated(\n {\n from: 'false-label',\n replacement: 'false-value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => !!props.falseLabel)\n )\n\n return {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n model,\n actualValue,\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["useFormItem","useCheckboxModel","useCheckboxStatus","useCheckboxDisabled","useFormItemInputId","useCheckboxEvent","isArray","useDeprecated","computed","isPropAbsent"],"mappings":";;;;;;;;;;;;;;;;;AAQY,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC7C,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAGA,uBAAW,EAAE,CAAC;AACjD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAGC,iCAAgB,CAAC,KAAK,CAAC,CAAC;AACtE,EAAE,MAAM;AACR,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,GAAG,GAAGC,mCAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,EAAE,MAAM,EAAE,UAAU,EAAE,GAAGC,uCAAmB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACnE,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAGC,8BAAkB,CAAC,KAAK,EAAE;AACrE,IAAI,eAAe,EAAE,UAAU;AAC/B,IAAI,mBAAmB,EAAE,WAAW;AACpC,IAAI,mBAAmB,EAAE,OAAO;AAChC,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAGC,iCAAgB,CAAC,KAAK,EAAE;AAChE,IA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,IAAI,EAAE,aAAa;AACvB,IAAI,WAAW,EAAE,aAAa;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,KAAK,EAAE,aAAa;AACxB,IAAI,GAAG,EAAE,wDAAwD;AACjE,GAAG,EAAEC,YAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,mBAAmB;AACvB,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,KAAK;AACT,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var col$1 = require('./src/col.js');
7
- var col = require('./src/col2.js');
6
+ var col$1 = require('./src/col2.js');
7
+ var col = require('./src/col.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElCol = install.withInstall(col$1["default"]);
@@ -2,75 +2,52 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
5
  require('../../../utils/index.js');
7
- require('../../../hooks/index.js');
8
- require('../../row/index.js');
9
- var col = require('./col2.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
11
- var constants = require('../../row/src/constants.js');
12
- var index = require('../../../hooks/use-namespace/index.js');
13
- var types = require('../../../utils/types.js');
14
- var shared = require('@vue/shared');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
7
+ var typescript = require('../../../utils/typescript.js');
15
8
 
16
- const __default__ = vue.defineComponent({
17
- name: "ElCol"
18
- });
19
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
- ...__default__,
21
- props: col.colProps,
22
- setup(__props) {
23
- const props = __props;
24
- const { gutter } = vue.inject(constants.rowContextKey, { gutter: vue.computed(() => 0) });
25
- const ns = index.useNamespace("col");
26
- const style = vue.computed(() => {
27
- const styles = {};
28
- if (gutter.value) {
29
- styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
30
- }
31
- return styles;
32
- });
33
- const colKls = vue.computed(() => {
34
- const classes = [];
35
- const pos = ["span", "offset", "pull", "push"];
36
- pos.forEach((prop) => {
37
- const size = props[prop];
38
- if (types.isNumber(size)) {
39
- if (prop === "span")
40
- classes.push(ns.b(`${props[prop]}`));
41
- else if (size > 0)
42
- classes.push(ns.b(`${prop}-${props[prop]}`));
43
- }
44
- });
45
- const sizes = ["xs", "sm", "md", "lg", "xl"];
46
- sizes.forEach((size) => {
47
- if (types.isNumber(props[size])) {
48
- classes.push(ns.b(`${size}-${props[size]}`));
49
- } else if (shared.isObject(props[size])) {
50
- Object.entries(props[size]).forEach(([prop, sizeProp]) => {
51
- classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
52
- });
53
- }
54
- });
55
- if (gutter.value) {
56
- classes.push(ns.is("guttered"));
57
- }
58
- return [ns.b(), classes];
59
- });
60
- return (_ctx, _cache) => {
61
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
62
- class: vue.normalizeClass(vue.unref(colKls)),
63
- style: vue.normalizeStyle(vue.unref(style))
64
- }, {
65
- default: vue.withCtx(() => [
66
- vue.renderSlot(_ctx.$slots, "default")
67
- ]),
68
- _: 3
69
- }, 8, ["class", "style"]);
70
- };
9
+ const colProps = runtime.buildProps({
10
+ tag: {
11
+ type: String,
12
+ default: "div"
13
+ },
14
+ span: {
15
+ type: Number,
16
+ default: 24
17
+ },
18
+ offset: {
19
+ type: Number,
20
+ default: 0
21
+ },
22
+ pull: {
23
+ type: Number,
24
+ default: 0
25
+ },
26
+ push: {
27
+ type: Number,
28
+ default: 0
29
+ },
30
+ xs: {
31
+ type: runtime.definePropType([Number, Object]),
32
+ default: () => typescript.mutable({})
33
+ },
34
+ sm: {
35
+ type: runtime.definePropType([Number, Object]),
36
+ default: () => typescript.mutable({})
37
+ },
38
+ md: {
39
+ type: runtime.definePropType([Number, Object]),
40
+ default: () => typescript.mutable({})
41
+ },
42
+ lg: {
43
+ type: runtime.definePropType([Number, Object]),
44
+ default: () => typescript.mutable({})
45
+ },
46
+ xl: {
47
+ type: runtime.definePropType([Number, Object]),
48
+ default: () => typescript.mutable({})
71
49
  }
72
50
  });
73
- var Col = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "col.vue"]]);
74
51
 
75
- exports["default"] = Col;
52
+ exports.colProps = colProps;
76
53
  //# sourceMappingURL=col.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"col.js","sources":["../../../../../../packages/components/col/src/col.vue"],"sourcesContent":["<template>\n <component :is=\"tag\" :class=\"colKls\" :style=\"style\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { isNumber, isObject } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { rowContextKey } from '@element-plus/components/row'\nimport { colProps } from './col'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCol',\n})\n\nconst props = defineProps(colProps)\n\nconst { gutter } = inject(rowContextKey, { gutter: computed(() => 0) })\nconst ns = useNamespace('col')\n\nconst style = computed(() => {\n const styles: CSSProperties = {}\n if (gutter.value) {\n styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`\n }\n return styles\n})\n\nconst colKls = computed(() => {\n const classes: string[] = []\n const pos = ['span', 'offset', 'pull', 'push'] as const\n\n pos.forEach((prop) => {\n const size = props[prop]\n if (isNumber(size)) {\n if (prop === 'span') classes.push(ns.b(`${props[prop]}`))\n else if (size > 0) classes.push(ns.b(`${prop}-${props[prop]}`))\n }\n })\n\n const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const\n sizes.forEach((size) => {\n if (isNumber(props[size])) {\n classes.push(ns.b(`${size}-${props[size]}`))\n } else if (isObject(props[size])) {\n Object.entries(props[size]).forEach(([prop, sizeProp]) => {\n classes.push(\n prop !== 'span'\n ? ns.b(`${size}-${prop}-${sizeProp}`)\n : ns.b(`${size}-${sizeProp}`)\n )\n })\n }\n })\n\n // this is for the fix\n if (gutter.value) {\n classes.push(ns.is('guttered'))\n }\n return [ns.b(), classes]\n})\n</script>\n"],"names":["inject","rowContextKey","computed","useNamespace","isNumber","isObject"],"mappings":";;;;;;;;;;;;;;;uCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,MAAW,EAAA,GAAAA,UAAA,CAAOC,uBAAe,EAAA,EAAE,QAAQC,YAAS,CAAA,MAAM,CAAC,CAAA,EAAG,CAAA,CAAA;AACtE,IAAM,MAAA,EAAA,GAAKC,mBAAa,KAAK,CAAA,CAAA;AAE7B,IAAM,MAAA,KAAA,GAAQD,aAAS,MAAM;AAC3B,MAAA,MAAM,SAAwB,EAAC,CAAA;AAC/B,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,MAAA,CAAO,WAAc,GAAA,MAAA,CAAO,YAAe,GAAA,CAAA,EAAG,OAAO,KAAQ,GAAA,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,OAC/D;AACA,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAASA,aAAS,MAAM;AAC5B,MAAA,MAAM,UAAoB,EAAC,CAAA;AAC3B,MAAA,MAAM,GAAM,GAAA,CAAC,MAAQ,EAAA,QAAA,EAAU,QAAQ,MAAM,CAAA,CAAA;AAE7C,MAAI,GAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AACpB,QAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA,CAAA;AACnB,QAAI,IAAAE,cAAA,CAAS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AA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,OAChC;AACA,MAAA,OAAO,CAAC,EAAA,CAAG,CAAE,EAAA,EAAG,OAAO,CAAA,CAAA;AAAA,KACxB,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"col.js","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col>\n"],"names":["buildProps","definePropType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