@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.mjs","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":[],"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,aAAa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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":[],"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,EAAE,WAAW;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,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,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;
@@ -27,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  checkboxSize,
28
28
  hasOwnLabel,
29
29
  model,
30
+ actualValue,
30
31
  handleChange,
31
32
  onClickRoot
32
33
  } = useCheckbox(props, slots);
@@ -59,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  createElementVNode("span", {
60
61
  class: normalizeClass(unref(spanKls))
61
62
  }, [
62
- _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
63
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
63
64
  key: 0,
64
65
  id: unref(inputId),
65
66
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
@@ -69,8 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
70
  name: _ctx.name,
70
71
  tabindex: _ctx.tabindex,
71
72
  disabled: unref(isDisabled),
72
- "true-value": _ctx.trueLabel,
73
- "false-value": _ctx.falseLabel,
73
+ "true-value": _ctx.trueValue || _ctx.trueLabel,
74
+ "false-value": _ctx.falseValue || _ctx.falseLabel,
74
75
  onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
75
76
  onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
76
77
  onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
@@ -86,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
87
  type: "checkbox",
87
88
  indeterminate: _ctx.indeterminate,
88
89
  disabled: unref(isDisabled),
89
- value: _ctx.label,
90
+ value: unref(actualValue),
90
91
  name: _ctx.name,
91
92
  tabindex: _ctx.tabindex,
92
93
  onChange: _cache[6] || (_cache[6] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox2.mjs","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":[],"mappings":";;;;;;;;;;mCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,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,YAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAA,WAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAU,SAAS,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,GAAU,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox2.mjs","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":[],"mappings":";;;;;;;;;;mCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,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,GAAA,WAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAU,SAAS,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,GAAU,SAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,7 +17,7 @@ const useCheckboxEvent = (props, {
17
17
  const { emit } = getCurrentInstance();
18
18
  function getLabeledValue(value) {
19
19
  var _a, _b;
20
- return value === props.trueLabel || value === true ? (_a = props.trueLabel) != null ? _a : true : (_b = props.falseLabel) != null ? _b : false;
20
+ return [true, props.trueValue, props.trueLabel].includes(value) ? (_a = props.trueValue || props.trueLabel) != null ? _a : true : (_b = props.falseValue || props.falseLabel) != null ? _b : false;
21
21
  }
22
22
  function emitChangeEvent(checked, e) {
23
23
  emit("change", getLabeledValue(checked), e);
@@ -35,7 +35,7 @@ const useCheckboxEvent = (props, {
35
35
  const eventTargets = e.composedPath();
36
36
  const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
37
37
  if (!hasLabel) {
38
- model.value = getLabeledValue([false, props.falseLabel].includes(model.value));
38
+ model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
39
39
  await nextTick();
40
40
  emitChangeEvent(model.value, e);
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-event.mjs","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":[],"mappings":";;;;;;;AAIY,MAAC,gBAAgB,GAAG,CAAC,KAAK,EAAE;AACxC,EAAE,KAAK;AACP,EAA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E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;AAC5C,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AAC7E,MAAM,IAAI,CAAC,QAAQ,EAAE;AACrB,QAAQ,KAAK,CAAC,KAAK,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACvF,QAAQ,MAAM,QAAQ,EAAE,CAAC;AACzB,QAAQ,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACxC,OAAO;AACP,KAAK;AACL,GAAG;AACH,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9H,EAAE,KAAK,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,KAAK,SAAS,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.mjs","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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AAI,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>;
@@ -1,27 +1,33 @@
1
1
  import { inject, ref, computed, toRaw } from 'vue';
2
- import { isEqual, isNil } from 'lodash-unified';
2
+ import { isEqual } from 'lodash-unified';
3
3
  import '../../../form/index.mjs';
4
4
  import '../../../../utils/index.mjs';
5
5
  import { checkboxGroupContextKey } from '../constants.mjs';
6
- import { isBoolean } from '../../../../utils/types.mjs';
6
+ import { isPropAbsent, isBoolean } from '../../../../utils/types.mjs';
7
7
  import { isArray, isObject } from '@vue/shared';
8
8
  import { useFormSize } from '../../../form/src/hooks/use-form-common-props.mjs';
9
9
 
10
10
  const useCheckboxStatus = (props, slots, { model }) => {
11
11
  const checkboxGroup = inject(checkboxGroupContextKey, void 0);
12
12
  const isFocused = ref(false);
13
+ const actualValue = computed(() => {
14
+ if (!isPropAbsent(props.value)) {
15
+ return props.value;
16
+ }
17
+ return props.label;
18
+ });
13
19
  const isChecked = computed(() => {
14
20
  const value = model.value;
15
21
  if (isBoolean(value)) {
16
22
  return value;
17
23
  } else if (isArray(value)) {
18
- if (isObject(props.label)) {
19
- return value.map(toRaw).some((o) => isEqual(o, props.label));
24
+ if (isObject(actualValue.value)) {
25
+ return value.map(toRaw).some((o) => isEqual(o, actualValue.value));
20
26
  } else {
21
- return value.map(toRaw).includes(props.label);
27
+ return value.map(toRaw).includes(actualValue.value);
22
28
  }
23
29
  } else if (value !== null && value !== void 0) {
24
- return value === props.trueLabel;
30
+ return value === props.trueValue || value === props.trueLabel;
25
31
  } else {
26
32
  return !!value;
27
33
  }
@@ -37,14 +43,15 @@ const useCheckboxStatus = (props, slots, { model }) => {
37
43
  return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
38
44
  }));
39
45
  const hasOwnLabel = computed(() => {
40
- return !!slots.default || !isNil(props.label);
46
+ return !!slots.default || !isPropAbsent(actualValue.value);
41
47
  });
42
48
  return {
43
49
  checkboxButtonSize,
44
50
  isChecked,
45
51
  isFocused,
46
52
  checkboxSize,
47
- hasOwnLabel
53
+ hasOwnLabel,
54
+ actualValue
48
55
  };
49
56
  };
50
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox-status.mjs","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 })\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AM;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,GAAG,WAAW,CAAC,QAAQ,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,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,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.mjs","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":[],"mappings":";;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa,GAAG,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACpC,MAAM,OAAO,KAAK,CAAC,KAAK,CAAC;AACzB,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC;AACvB,GAAG,CAAC,CAAC;AACL,E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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,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,YAAY,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
  };
@@ -1,22 +1,16 @@
1
+ import { computed } from 'vue';
1
2
  import '../../../form/index.mjs';
2
3
  import '../../../../utils/index.mjs';
4
+ import '../../../../hooks/index.mjs';
3
5
  import { useCheckboxDisabled } from './use-checkbox-disabled.mjs';
4
6
  import { useCheckboxEvent } from './use-checkbox-event.mjs';
5
7
  import { useCheckboxModel } from './use-checkbox-model.mjs';
6
8
  import { useCheckboxStatus } from './use-checkbox-status.mjs';
7
- import { isArray } from '@vue/shared';
8
9
  import { useFormItem, useFormItemInputId } from '../../../form/src/hooks/use-form-item.mjs';
10
+ import { isArray } from '@vue/shared';
11
+ import { useDeprecated } from '../../../../hooks/use-deprecated/index.mjs';
12
+ import { isPropAbsent } from '../../../../utils/types.mjs';
9
13
 
10
- const setStoreValue = (props, { model }) => {
11
- function addToStore() {
12
- if (isArray(model.value) && !model.value.includes(props.label)) {
13
- model.value.push(props.label);
14
- } else {
15
- model.value = props.trueLabel || true;
16
- }
17
- }
18
- props.checked && addToStore();
19
- };
20
14
  const useCheckbox = (props, slots) => {
21
15
  const { formItem: elFormItem } = useFormItem();
22
16
  const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
@@ -25,7 +19,8 @@ const useCheckbox = (props, slots) => {
25
19
  isChecked,
26
20
  checkboxButtonSize,
27
21
  checkboxSize,
28
- hasOwnLabel
22
+ hasOwnLabel,
23
+ actualValue
29
24
  } = useCheckboxStatus(props, slots, { model });
30
25
  const { isDisabled } = useCheckboxDisabled({ model, isChecked });
31
26
  const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
@@ -40,7 +35,38 @@ const useCheckbox = (props, slots) => {
40
35
  isDisabled,
41
36
  isLabeledByFormItem
42
37
  });
43
- setStoreValue(props, { model });
38
+ const setStoreValue = () => {
39
+ function addToStore() {
40
+ if (isArray(model.value) && !model.value.includes(actualValue.value)) {
41
+ model.value.push(actualValue.value);
42
+ } else {
43
+ model.value = props.trueValue || props.trueLabel || true;
44
+ }
45
+ }
46
+ props.checked && addToStore();
47
+ };
48
+ setStoreValue();
49
+ useDeprecated({
50
+ from: "label act as value",
51
+ replacement: "value",
52
+ version: "3.0.0",
53
+ scope: "el-checkbox",
54
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
55
+ }, computed(() => isGroup.value && isPropAbsent(props.value)));
56
+ useDeprecated({
57
+ from: "true-label",
58
+ replacement: "true-value",
59
+ version: "3.0.0",
60
+ scope: "el-checkbox",
61
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
62
+ }, computed(() => !!props.trueLabel));
63
+ useDeprecated({
64
+ from: "false-label",
65
+ replacement: "false-value",
66
+ version: "3.0.0",
67
+ scope: "el-checkbox",
68
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
69
+ }, computed(() => !!props.falseLabel));
44
70
  return {
45
71
  inputId,
46
72
  isLabeledByFormItem,
@@ -51,6 +77,7 @@ const useCheckbox = (props, slots) => {
51
77
  checkboxSize,
52
78
  hasOwnLabel,
53
79
  model,
80
+ actualValue,
54
81
  handleChange,
55
82
  onClickRoot
56
83
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkbox.mjs","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":[],"mappings":";;;;;;;;;AAMA,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC5C,EAAE,SAAS,UAAU,GAAG;AACxB,IAAI,IAAI,OAAO,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,KAAK,KAAK;AAC7C,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AACjD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtE,EAAE,MAAM;AACR,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,GAAG,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACnE,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,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,GAAG,gBAAgB,CAAC,KAAK,EAAE;AAChE,IAAI,KAAK;AACT,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,mBAAmB;AACvB,GAAG,CAAC,CAAC;AACL,EAAE,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AAClC,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,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-checkbox.mjs","sources":["../../../../../../../packages/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":[],"mappings":";;;;;;;;;;;;;AAQY,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC7C,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AACjD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;A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AE,aAAa,CAAC;AAChB,IAAI,IAAI,EAAE,oBAAoB;AAC9B,IAAI,WAAW,EAAE,OAAO;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,KAAK,EAAE,aAAa;AACxB,IAAI,GAAG,EAAE,wDAAwD;AACjE,GAAG,EAAE,QAAQ,CAAC,MAAM,OAAO,CAAC,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACjE,EAAE,aAAa,CAAC;AAChB,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,WAAW,EAAE,YAAY;AAC7B,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,KAAK,EAAE,aAAa;AACxB,IAAI,GAAG,EAAE,wDAAwD;AACjE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACxC,EAAE,aAAa,CAAC;AAChB,IAAI,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,EAAE,QAAQ,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;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Col from './src/col.mjs';
3
- export { colProps } from './src/col2.mjs';
2
+ import Col from './src/col2.mjs';
3
+ export { colProps } from './src/col.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const ElCol = withInstall(Col);
@@ -1,72 +1,49 @@
1
- import { defineComponent, inject, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
2
1
  import '../../../utils/index.mjs';
3
- import '../../../hooks/index.mjs';
4
- import '../../row/index.mjs';
5
- import { colProps } from './col2.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { rowContextKey } from '../../row/src/constants.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
- import { isNumber } from '../../../utils/types.mjs';
10
- import { isObject } from '@vue/shared';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
+ import { mutable } from '../../../utils/typescript.mjs';
11
4
 
12
- const __default__ = defineComponent({
13
- name: "ElCol"
14
- });
15
- const _sfc_main = /* @__PURE__ */ defineComponent({
16
- ...__default__,
17
- props: colProps,
18
- setup(__props) {
19
- const props = __props;
20
- const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
21
- const ns = useNamespace("col");
22
- const style = computed(() => {
23
- const styles = {};
24
- if (gutter.value) {
25
- styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
26
- }
27
- return styles;
28
- });
29
- const colKls = computed(() => {
30
- const classes = [];
31
- const pos = ["span", "offset", "pull", "push"];
32
- pos.forEach((prop) => {
33
- const size = props[prop];
34
- if (isNumber(size)) {
35
- if (prop === "span")
36
- classes.push(ns.b(`${props[prop]}`));
37
- else if (size > 0)
38
- classes.push(ns.b(`${prop}-${props[prop]}`));
39
- }
40
- });
41
- const sizes = ["xs", "sm", "md", "lg", "xl"];
42
- sizes.forEach((size) => {
43
- if (isNumber(props[size])) {
44
- classes.push(ns.b(`${size}-${props[size]}`));
45
- } else if (isObject(props[size])) {
46
- Object.entries(props[size]).forEach(([prop, sizeProp]) => {
47
- classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
48
- });
49
- }
50
- });
51
- if (gutter.value) {
52
- classes.push(ns.is("guttered"));
53
- }
54
- return [ns.b(), classes];
55
- });
56
- return (_ctx, _cache) => {
57
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
58
- class: normalizeClass(unref(colKls)),
59
- style: normalizeStyle(unref(style))
60
- }, {
61
- default: withCtx(() => [
62
- renderSlot(_ctx.$slots, "default")
63
- ]),
64
- _: 3
65
- }, 8, ["class", "style"]);
66
- };
5
+ const colProps = buildProps({
6
+ tag: {
7
+ type: String,
8
+ default: "div"
9
+ },
10
+ span: {
11
+ type: Number,
12
+ default: 24
13
+ },
14
+ offset: {
15
+ type: Number,
16
+ default: 0
17
+ },
18
+ pull: {
19
+ type: Number,
20
+ default: 0
21
+ },
22
+ push: {
23
+ type: Number,
24
+ default: 0
25
+ },
26
+ xs: {
27
+ type: definePropType([Number, Object]),
28
+ default: () => mutable({})
29
+ },
30
+ sm: {
31
+ type: definePropType([Number, Object]),
32
+ default: () => mutable({})
33
+ },
34
+ md: {
35
+ type: definePropType([Number, Object]),
36
+ default: () => mutable({})
37
+ },
38
+ lg: {
39
+ type: definePropType([Number, Object]),
40
+ default: () => mutable({})
41
+ },
42
+ xl: {
43
+ type: definePropType([Number, Object]),
44
+ default: () => mutable({})
67
45
  }
68
46
  });
69
- var Col = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "col.vue"]]);
70
47
 
71
- export { Col as default };
48
+ export { colProps };
72
49
  //# sourceMappingURL=col.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"col.mjs","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":[],"mappings":";;;;;;;;;;;mCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,MAAW,EAAA,GAAA,MAAA,CAAO,aAAe,EAAA,EAAE,QAAQ,QAAS,CAAA,MAAM,CAAC,CAAA,EAAG,CAAA,CAAA;AACtE,IAAM,MAAA,EAAA,GAAK,aAAa,KAAK,CAAA,CAAA;AAE7B,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,MAAM,SAAwB,EAAC,CAAA;AAC/B,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,MAAA,CAAO,WAAc,GAAA,MAAA,CAAO,YAAe,GA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AQ,MAAM,IAAK,CAAA,CAAA,CAAE,QAAQ,CAAC,CAAC,MAAM,QAAc,CAAA,KAAA;AACxD,YAAA,OAAA,CAAQ,IACN,CAAA,IAAA,KAAS,MACL,GAAA,EAAA,CAAG,EAAE,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,IAAQ,CAAA,CAAA,EAAA,QAAA,CAAA,CAAU,IAClC,EAAG,CAAA,CAAA,CAAE,CAAG,EAAA,IAAA,CAAA,CAAA,EAAQ,UAAU,CAChC,CAAA,CAAA;AAAA,WACD,CAAA,CAAA;AAAA,SACH;AAAA,OACD,CAAA,CAAA;AAGD,MAAA,IAAI,OAAO,KAAO,EAAA;AAChB,QAAA,OAAA,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.mjs","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":[],"mappings":";;;;AACY,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO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