@element-plus/nightly 0.0.20250824 → 0.0.20250825

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 (547) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +27 -22
  3. package/dist/index.full.min.js +5 -5
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +3 -3
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +27 -22
  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/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/calendar/src/calendar2.mjs +1 -1
  277. package/es/components/calendar/src/date-table.mjs +89 -31
  278. package/es/components/calendar/src/date-table.mjs.map +1 -1
  279. package/es/components/calendar/src/date-table2.mjs +31 -89
  280. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  281. package/es/components/calendar/src/use-date-table.mjs +1 -1
  282. package/es/components/cascader/src/cascader.d.ts +1 -1
  283. package/es/components/cascader/src/cascader.mjs +1 -1
  284. package/es/components/cascader/src/cascader.vue.d.ts +2 -2
  285. package/es/components/cascader-panel/src/config.d.ts +2 -2
  286. package/es/components/cascader-panel/src/config.mjs +1 -1
  287. package/es/components/cascader-panel/src/config.mjs.map +1 -1
  288. package/es/components/cascader-panel/src/index.vue.d.ts +2 -2
  289. package/es/components/cascader-panel/src/node.d.ts +1 -1
  290. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  291. package/es/components/cascader-panel/src/types.d.ts +1 -1
  292. package/es/components/cascader-panel/src/types.mjs.map +1 -1
  293. package/es/components/check-tag/index.mjs +2 -2
  294. package/es/components/check-tag/src/check-tag.mjs +14 -38
  295. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  296. package/es/components/check-tag/src/check-tag2.mjs +38 -14
  297. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  298. package/es/components/collapse/index.mjs +2 -2
  299. package/es/components/collapse/src/collapse.mjs +28 -23
  300. package/es/components/collapse/src/collapse.mjs.map +1 -1
  301. package/es/components/collapse/src/collapse2.mjs +23 -28
  302. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  303. package/es/components/date-picker-panel/src/composables/use-range-picker.d.ts +3 -3
  304. package/es/components/date-picker-panel/src/composables/use-range-picker.mjs +6 -6
  305. package/es/components/date-picker-panel/src/composables/use-range-picker.mjs.map +1 -1
  306. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs +6 -5
  307. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs.map +1 -1
  308. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs +4 -4
  309. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs.map +1 -1
  310. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs +4 -4
  311. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs.map +1 -1
  312. package/es/components/dropdown/src/dropdown.mjs +1 -1
  313. package/es/components/empty/index.mjs +2 -2
  314. package/es/components/empty/src/empty.mjs +52 -11
  315. package/es/components/empty/src/empty.mjs.map +1 -1
  316. package/es/components/empty/src/empty2.mjs +11 -52
  317. package/es/components/empty/src/empty2.mjs.map +1 -1
  318. package/es/components/image/index.mjs +2 -2
  319. package/es/components/image/src/image.mjs +227 -65
  320. package/es/components/image/src/image.mjs.map +1 -1
  321. package/es/components/image/src/image2.mjs +65 -227
  322. package/es/components/image/src/image2.mjs.map +1 -1
  323. package/es/components/index.mjs +19 -19
  324. package/es/components/input-tag/src/input-tag.mjs +1 -1
  325. package/es/components/input-tag/style/css.d.ts +1 -0
  326. package/es/components/input-tag/style/css.mjs +1 -0
  327. package/es/components/input-tag/style/css.mjs.map +1 -1
  328. package/es/components/input-tag/style/index.d.ts +2 -1
  329. package/es/components/input-tag/style/index.mjs +1 -0
  330. package/es/components/input-tag/style/index.mjs.map +1 -1
  331. package/es/components/menu/index.mjs +4 -4
  332. package/es/components/menu/src/menu-item-group.mjs +4 -33
  333. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  334. package/es/components/menu/src/menu-item-group2.mjs +33 -4
  335. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  336. package/es/components/menu/src/menu-item.mjs +100 -15
  337. package/es/components/menu/src/menu-item.mjs.map +1 -1
  338. package/es/components/menu/src/menu-item2.mjs +15 -100
  339. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  340. package/es/components/page-header/index.mjs +2 -2
  341. package/es/components/page-header/src/page-header.mjs +97 -16
  342. package/es/components/page-header/src/page-header.mjs.map +1 -1
  343. package/es/components/page-header/src/page-header2.mjs +16 -97
  344. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  345. package/es/components/popover/src/popover.mjs +1 -1
  346. package/es/components/popper/src/trigger2.mjs +1 -1
  347. package/es/components/progress/index.mjs +2 -2
  348. package/es/components/progress/src/progress.mjs +207 -53
  349. package/es/components/progress/src/progress.mjs.map +1 -1
  350. package/es/components/progress/src/progress2.mjs +53 -207
  351. package/es/components/progress/src/progress2.mjs.map +1 -1
  352. package/es/components/scrollbar/src/bar.mjs +64 -10
  353. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  354. package/es/components/scrollbar/src/bar2.mjs +10 -64
  355. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  356. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  357. package/es/components/select/src/select.mjs +1 -1
  358. package/es/components/select-v2/src/defaults.mjs +1 -1
  359. package/es/components/skeleton/index.mjs +2 -2
  360. package/es/components/skeleton/src/skeleton.mjs +18 -48
  361. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  362. package/es/components/skeleton/src/skeleton2.mjs +48 -18
  363. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  364. package/es/components/splitter/index.mjs +2 -2
  365. package/es/components/splitter/src/split-panel2.mjs +4 -0
  366. package/es/components/splitter/src/split-panel2.mjs.map +1 -1
  367. package/es/components/splitter/src/splitter.mjs +99 -9
  368. package/es/components/splitter/src/splitter.mjs.map +1 -1
  369. package/es/components/splitter/src/splitter2.mjs +9 -99
  370. package/es/components/splitter/src/splitter2.mjs.map +1 -1
  371. package/es/components/steps/index.mjs +2 -2
  372. package/es/components/steps/src/item.mjs +193 -19
  373. package/es/components/steps/src/item.mjs.map +1 -1
  374. package/es/components/steps/src/item2.mjs +19 -193
  375. package/es/components/steps/src/item2.mjs.map +1 -1
  376. package/es/components/tabs/index.mjs +1 -1
  377. package/es/components/tabs/src/tab-bar.mjs +87 -11
  378. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  379. package/es/components/tabs/src/tab-bar2.mjs +11 -87
  380. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  381. package/es/components/tabs/src/tab-nav.mjs +1 -1
  382. package/es/components/tag/index.mjs +2 -2
  383. package/es/components/tag/src/tag.mjs +27 -99
  384. package/es/components/tag/src/tag.mjs.map +1 -1
  385. package/es/components/tag/src/tag2.mjs +99 -27
  386. package/es/components/tag/src/tag2.mjs.map +1 -1
  387. package/es/components/tooltip/index.mjs +1 -1
  388. package/es/components/tooltip/src/tooltip.mjs +1 -1
  389. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  390. package/es/components/tooltip/src/trigger.mjs +14 -72
  391. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  392. package/es/components/tooltip/src/trigger2.mjs +72 -14
  393. package/es/components/tooltip/src/trigger2.mjs.map +1 -1
  394. package/es/components/tour/index.mjs +2 -2
  395. package/es/components/tour/src/mask.mjs +74 -18
  396. package/es/components/tour/src/mask.mjs.map +1 -1
  397. package/es/components/tour/src/mask2.mjs +18 -74
  398. package/es/components/tour/src/mask2.mjs.map +1 -1
  399. package/es/components/tour/src/step.mjs +189 -44
  400. package/es/components/tour/src/step.mjs.map +1 -1
  401. package/es/components/tour/src/step2.mjs +44 -189
  402. package/es/components/tour/src/step2.mjs.map +1 -1
  403. package/es/components/tour/src/tour2.mjs +1 -1
  404. package/es/directives/click-outside/index.mjs +1 -1
  405. package/es/hooks/use-lockscreen/index.mjs +1 -1
  406. package/es/index.d.ts +9 -9
  407. package/es/index.mjs +19 -19
  408. package/es/version.d.ts +1 -1
  409. package/es/version.mjs +1 -1
  410. package/es/version.mjs.map +1 -1
  411. package/lib/components/calendar/src/calendar2.js +1 -1
  412. package/lib/components/calendar/src/date-table.js +89 -35
  413. package/lib/components/calendar/src/date-table.js.map +1 -1
  414. package/lib/components/calendar/src/date-table2.js +35 -89
  415. package/lib/components/calendar/src/date-table2.js.map +1 -1
  416. package/lib/components/calendar/src/use-date-table.js +1 -1
  417. package/lib/components/cascader/src/cascader.d.ts +1 -1
  418. package/lib/components/cascader/src/cascader.js +1 -1
  419. package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
  420. package/lib/components/cascader-panel/src/config.d.ts +2 -2
  421. package/lib/components/cascader-panel/src/config.js +1 -1
  422. package/lib/components/cascader-panel/src/config.js.map +1 -1
  423. package/lib/components/cascader-panel/src/index.vue.d.ts +2 -2
  424. package/lib/components/cascader-panel/src/node.d.ts +1 -1
  425. package/lib/components/cascader-panel/src/node.js.map +1 -1
  426. package/lib/components/cascader-panel/src/types.d.ts +1 -1
  427. package/lib/components/cascader-panel/src/types.js.map +1 -1
  428. package/lib/components/check-tag/index.js +2 -2
  429. package/lib/components/check-tag/src/check-tag.js +15 -38
  430. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  431. package/lib/components/check-tag/src/check-tag2.js +38 -15
  432. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  433. package/lib/components/collapse/index.js +2 -2
  434. package/lib/components/collapse/src/collapse.js +28 -25
  435. package/lib/components/collapse/src/collapse.js.map +1 -1
  436. package/lib/components/collapse/src/collapse2.js +25 -28
  437. package/lib/components/collapse/src/collapse2.js.map +1 -1
  438. package/lib/components/date-picker-panel/src/composables/use-range-picker.d.ts +3 -3
  439. package/lib/components/date-picker-panel/src/composables/use-range-picker.js +6 -6
  440. package/lib/components/date-picker-panel/src/composables/use-range-picker.js.map +1 -1
  441. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js +6 -5
  442. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js.map +1 -1
  443. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.js +4 -4
  444. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.js.map +1 -1
  445. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.js +4 -4
  446. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.js.map +1 -1
  447. package/lib/components/dropdown/src/dropdown.js +1 -1
  448. package/lib/components/empty/index.js +2 -2
  449. package/lib/components/empty/src/empty.js +52 -11
  450. package/lib/components/empty/src/empty.js.map +1 -1
  451. package/lib/components/empty/src/empty2.js +11 -52
  452. package/lib/components/empty/src/empty2.js.map +1 -1
  453. package/lib/components/image/index.js +2 -2
  454. package/lib/components/image/src/image.js +226 -65
  455. package/lib/components/image/src/image.js.map +1 -1
  456. package/lib/components/image/src/image2.js +65 -226
  457. package/lib/components/image/src/image2.js.map +1 -1
  458. package/lib/components/index.js +24 -24
  459. package/lib/components/input-tag/src/input-tag.js +1 -1
  460. package/lib/components/input-tag/style/css.d.ts +1 -0
  461. package/lib/components/input-tag/style/css.js +1 -0
  462. package/lib/components/input-tag/style/css.js.map +1 -1
  463. package/lib/components/input-tag/style/index.d.ts +2 -1
  464. package/lib/components/input-tag/style/index.js +1 -0
  465. package/lib/components/input-tag/style/index.js.map +1 -1
  466. package/lib/components/menu/index.js +4 -4
  467. package/lib/components/menu/src/menu-item-group.js +4 -33
  468. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  469. package/lib/components/menu/src/menu-item-group2.js +33 -4
  470. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  471. package/lib/components/menu/src/menu-item.js +100 -16
  472. package/lib/components/menu/src/menu-item.js.map +1 -1
  473. package/lib/components/menu/src/menu-item2.js +16 -100
  474. package/lib/components/menu/src/menu-item2.js.map +1 -1
  475. package/lib/components/page-header/index.js +2 -2
  476. package/lib/components/page-header/src/page-header.js +97 -17
  477. package/lib/components/page-header/src/page-header.js.map +1 -1
  478. package/lib/components/page-header/src/page-header2.js +17 -97
  479. package/lib/components/page-header/src/page-header2.js.map +1 -1
  480. package/lib/components/popover/src/popover.js +1 -1
  481. package/lib/components/popper/src/trigger2.js +1 -1
  482. package/lib/components/progress/index.js +2 -2
  483. package/lib/components/progress/src/progress.js +207 -53
  484. package/lib/components/progress/src/progress.js.map +1 -1
  485. package/lib/components/progress/src/progress2.js +53 -207
  486. package/lib/components/progress/src/progress2.js.map +1 -1
  487. package/lib/components/scrollbar/src/bar.js +64 -10
  488. package/lib/components/scrollbar/src/bar.js.map +1 -1
  489. package/lib/components/scrollbar/src/bar2.js +10 -64
  490. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  491. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  492. package/lib/components/select/src/select.js +1 -1
  493. package/lib/components/select-v2/src/defaults.js +1 -1
  494. package/lib/components/skeleton/index.js +2 -2
  495. package/lib/components/skeleton/src/skeleton.js +18 -48
  496. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  497. package/lib/components/skeleton/src/skeleton2.js +48 -18
  498. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  499. package/lib/components/splitter/index.js +2 -2
  500. package/lib/components/splitter/src/split-panel2.js +4 -0
  501. package/lib/components/splitter/src/split-panel2.js.map +1 -1
  502. package/lib/components/splitter/src/splitter.js +99 -9
  503. package/lib/components/splitter/src/splitter.js.map +1 -1
  504. package/lib/components/splitter/src/splitter2.js +9 -99
  505. package/lib/components/splitter/src/splitter2.js.map +1 -1
  506. package/lib/components/steps/index.js +2 -2
  507. package/lib/components/steps/src/item.js +193 -19
  508. package/lib/components/steps/src/item.js.map +1 -1
  509. package/lib/components/steps/src/item2.js +19 -193
  510. package/lib/components/steps/src/item2.js.map +1 -1
  511. package/lib/components/tabs/index.js +1 -1
  512. package/lib/components/tabs/src/tab-bar.js +87 -11
  513. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  514. package/lib/components/tabs/src/tab-bar2.js +11 -87
  515. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  516. package/lib/components/tabs/src/tab-nav.js +1 -1
  517. package/lib/components/tag/index.js +2 -2
  518. package/lib/components/tag/src/tag.js +28 -99
  519. package/lib/components/tag/src/tag.js.map +1 -1
  520. package/lib/components/tag/src/tag2.js +99 -28
  521. package/lib/components/tag/src/tag2.js.map +1 -1
  522. package/lib/components/tooltip/index.js +1 -1
  523. package/lib/components/tooltip/src/tooltip.js +1 -1
  524. package/lib/components/tooltip/src/tooltip2.js +1 -1
  525. package/lib/components/tooltip/src/trigger.js +14 -72
  526. package/lib/components/tooltip/src/trigger.js.map +1 -1
  527. package/lib/components/tooltip/src/trigger2.js +72 -14
  528. package/lib/components/tooltip/src/trigger2.js.map +1 -1
  529. package/lib/components/tour/index.js +2 -2
  530. package/lib/components/tour/src/mask.js +74 -18
  531. package/lib/components/tour/src/mask.js.map +1 -1
  532. package/lib/components/tour/src/mask2.js +18 -74
  533. package/lib/components/tour/src/mask2.js.map +1 -1
  534. package/lib/components/tour/src/step.js +188 -44
  535. package/lib/components/tour/src/step.js.map +1 -1
  536. package/lib/components/tour/src/step2.js +44 -188
  537. package/lib/components/tour/src/step2.js.map +1 -1
  538. package/lib/components/tour/src/tour2.js +1 -1
  539. package/lib/directives/click-outside/index.js +1 -1
  540. package/lib/hooks/use-lockscreen/index.js +1 -1
  541. package/lib/index.d.ts +9 -9
  542. package/lib/index.js +24 -24
  543. package/lib/version.d.ts +1 -1
  544. package/lib/version.js +1 -1
  545. package/lib/version.js.map +1 -1
  546. package/package.json +2 -2
  547. package/web-types.json +1 -1
@@ -1,95 +1,37 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, renderSlot } from 'vue';
2
- import { dateTableProps, dateTableEmits } from './date-table.mjs';
3
- import { useDateTable } from './use-date-table.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import { rangeArr } from '../../time-picker/src/utils.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
+ import { isObject } from '@vue/shared';
6
4
 
7
- const __default__ = defineComponent({
8
- name: "DateTable"
5
+ const getPrevMonthLastDays = (date, count) => {
6
+ const lastDay = date.subtract(1, "month").endOf("month").date();
7
+ return rangeArr(count).map((_, index) => lastDay - (count - index - 1));
8
+ };
9
+ const getMonthDays = (date) => {
10
+ const days = date.daysInMonth();
11
+ return rangeArr(days).map((_, index) => index + 1);
12
+ };
13
+ const toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
14
+ const start = index * 7;
15
+ return days.slice(start, start + 7);
9
16
  });
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: dateTableProps,
13
- emits: dateTableEmits,
14
- setup(__props, { expose, emit }) {
15
- const props = __props;
16
- const {
17
- isInRange,
18
- now,
19
- rows,
20
- weekDays,
21
- getFormattedDate,
22
- handlePickDay,
23
- getSlotData
24
- } = useDateTable(props, emit);
25
- const nsTable = useNamespace("calendar-table");
26
- const nsDay = useNamespace("calendar-day");
27
- const getCellClass = ({ text, type }) => {
28
- const classes = [type];
29
- if (type === "current") {
30
- const date = getFormattedDate(text, type);
31
- if (date.isSame(props.selectedDay, "day")) {
32
- classes.push(nsDay.is("selected"));
33
- }
34
- if (date.isSame(now, "day")) {
35
- classes.push(nsDay.is("today"));
36
- }
37
- }
38
- return classes;
39
- };
40
- expose({
41
- getFormattedDate
42
- });
43
- return (_ctx, _cache) => {
44
- return openBlock(), createElementBlock("table", {
45
- class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
46
- cellspacing: "0",
47
- cellpadding: "0"
48
- }, [
49
- !_ctx.hideHeader ? (openBlock(), createElementBlock("thead", { key: 0 }, [
50
- createElementVNode("tr", null, [
51
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
52
- return openBlock(), createElementBlock("th", {
53
- key: day,
54
- scope: "col"
55
- }, toDisplayString(day), 1);
56
- }), 128))
57
- ])
58
- ])) : createCommentVNode("v-if", true),
59
- createElementVNode("tbody", null, [
60
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
61
- return openBlock(), createElementBlock("tr", {
62
- key: index,
63
- class: normalizeClass({
64
- [unref(nsTable).e("row")]: true,
65
- [unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader
66
- })
67
- }, [
68
- (openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
69
- return openBlock(), createElementBlock("td", {
70
- key,
71
- class: normalizeClass(getCellClass(cell)),
72
- onClick: ($event) => unref(handlePickDay)(cell)
73
- }, [
74
- createElementVNode("div", {
75
- class: normalizeClass(unref(nsDay).b())
76
- }, [
77
- renderSlot(_ctx.$slots, "date-cell", {
78
- data: unref(getSlotData)(cell)
79
- }, () => [
80
- createElementVNode("span", null, toDisplayString(cell.text), 1)
81
- ])
82
- ], 2)
83
- ], 10, ["onClick"]);
84
- }), 128))
85
- ], 2);
86
- }), 128))
87
- ])
88
- ], 2);
89
- };
17
+ const dateTableProps = buildProps({
18
+ selectedDay: {
19
+ type: definePropType(Object)
20
+ },
21
+ range: {
22
+ type: definePropType(Array)
23
+ },
24
+ date: {
25
+ type: definePropType(Object),
26
+ required: true
27
+ },
28
+ hideHeader: {
29
+ type: Boolean
90
30
  }
91
31
  });
92
- var DateTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-table.vue"]]);
32
+ const dateTableEmits = {
33
+ pick: (value) => isObject(value)
34
+ };
93
35
 
94
- export { DateTable as default };
36
+ export { dateTableEmits, dateTableProps, getMonthDays, getPrevMonthLastDays, toNestedArr };
95
37
  //# sourceMappingURL=date-table2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-table2.mjs","sources":["../../../../../../packages/components/calendar/src/date-table.vue"],"sourcesContent":["<template>\n <table\n :class=\"[nsTable.b(), nsTable.is('range', isInRange)]\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n >\n <thead v-if=\"!hideHeader\">\n <tr>\n <th v-for=\"day in weekDays\" :key=\"day\" scope=\"col\">{{ day }}</th>\n </tr>\n </thead>\n\n <tbody>\n <tr\n v-for=\"(row, index) in rows\"\n :key=\"index\"\n :class=\"{\n [nsTable.e('row')]: true,\n [nsTable.em('row', 'hide-border')]: index === 0 && hideHeader,\n }\"\n >\n <td\n v-for=\"(cell, key) in row\"\n :key=\"key\"\n :class=\"getCellClass(cell)\"\n @click=\"handlePickDay(cell)\"\n >\n <div :class=\"nsDay.b()\">\n <slot name=\"date-cell\" :data=\"getSlotData(cell)\">\n <span>{{ cell.text }}</span>\n </slot>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { dateTableEmits, dateTableProps } from './date-table'\nimport { useDateTable } from './use-date-table'\n\nimport type { CalendarDateCell } from './date-table'\n\ndefineOptions({\n name: 'DateTable',\n})\n\nconst props = defineProps(dateTableProps)\nconst emit = defineEmits(dateTableEmits)\n\nconst {\n isInRange,\n now,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n} = useDateTable(props, emit)\n\nconst nsTable = useNamespace('calendar-table')\nconst nsDay = useNamespace('calendar-day')\n\nconst getCellClass = ({ text, type }: CalendarDateCell) => {\n const classes: string[] = [type]\n if (type === 'current') {\n const date = getFormattedDate(text, type)\n if (date.isSame(props.selectedDay, 'day')) {\n classes.push(nsDay.is('selected'))\n }\n if (date.isSame(now, 'day')) {\n classes.push(nsDay.is('today'))\n }\n }\n return classes\n}\n\ndefineExpose({\n /** @description toggle date panel */\n getFormattedDate,\n})\n</script>\n"],"names":[],"mappings":";;;;;;mCA6Cc,CAAA;AAAA,EAC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/calendar/src/date-table.ts"],"sourcesContent":["import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType<Dayjs>(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType<Dayjs>(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes<typeof dateTableProps>\nexport type DateTablePropsPublic = __ExtractPublicPropTypes<\n typeof dateTableProps\n>\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n"],"names":[],"mappings":";;;;AAEY,MAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AACrD,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClC,EAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC;AACrD,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK;AAC9E,EAAE,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AAC1B,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACtC,CAAC,EAAE;AACS,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { computed } from 'vue';
2
2
  import dayjs from 'dayjs';
3
3
  import localeData from 'dayjs/plugin/localeData.js';
4
- import { getPrevMonthLastDays, getMonthDays, toNestedArr } from './date-table.mjs';
4
+ import { getPrevMonthLastDays, getMonthDays, toNestedArr } from './date-table2.mjs';
5
5
  import { WEEK_DAYS } from '../../../constants/date.mjs';
6
6
  import { useLocale } from '../../../hooks/use-locale/index.mjs';
7
7
  import { rangeArr } from '../../time-picker/src/utils.mjs';
@@ -181,7 +181,7 @@ export declare const cascaderProps: {
181
181
  checkOnClickNode: BooleanConstructor;
182
182
  showPrefix: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
183
183
  modelValue: {
184
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
184
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
185
185
  readonly required: false;
186
186
  readonly validator: ((val: unknown) => boolean) | undefined;
187
187
  __epPropKey: true;
@@ -1,7 +1,7 @@
1
1
  import { placements } from '@popperjs/core';
2
2
  import { CircleClose } from '@element-plus/icons-vue';
3
3
  import { CommonProps } from '../../cascader-panel/src/config.mjs';
4
- import { tagProps } from '../../tag/src/tag2.mjs';
4
+ import { tagProps } from '../../tag/src/tag.mjs';
5
5
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
6
  import { useSizeProp } from '../../../hooks/use-size/index.mjs';
7
7
  import { iconPropType } from '../../../utils/vue/icon.mjs';
@@ -195,7 +195,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
195
195
  checkOnClickNode: BooleanConstructor;
196
196
  showPrefix: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
197
197
  modelValue: {
198
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
198
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
199
199
  readonly required: false;
200
200
  readonly validator: ((val: unknown) => boolean) | undefined;
201
201
  __epPropKey: true;
@@ -413,7 +413,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
413
413
  checkOnClickNode: BooleanConstructor;
414
414
  showPrefix: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
415
415
  modelValue: {
416
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
416
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("../../cascader-panel/src/node").CascaderNodePathValue | (import("../../cascader-panel/src/node").CascaderNodeValue | import("../../cascader-panel/src/node").CascaderNodePathValue)[]) | (() => import("../../cascader-panel/src/node").CascaderValue | null))[], unknown, unknown>>;
417
417
  readonly required: false;
418
418
  readonly validator: ((val: unknown) => boolean) | undefined;
419
419
  __epPropKey: true;
@@ -2,7 +2,7 @@ import type { PropType } from 'vue';
2
2
  import type { CascaderConfig, CascaderNodePathValue, CascaderOption, CascaderProps, CascaderValue, RenderLabel } from './node';
3
3
  export declare const CommonProps: {
4
4
  readonly modelValue: {
5
- readonly type: PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
5
+ readonly type: PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
6
6
  readonly required: false;
7
7
  readonly validator: ((val: unknown) => boolean) | undefined;
8
8
  __epPropKey: true;
@@ -20,7 +20,7 @@ export declare const cascaderPanelProps: {
20
20
  __epPropKey: true;
21
21
  };
22
22
  modelValue: {
23
- readonly type: PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
23
+ readonly type: PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | CascaderNodePathValue | (import("./node").CascaderNodeValue | CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
24
24
  readonly required: false;
25
25
  readonly validator: ((val: unknown) => boolean) | undefined;
26
26
  __epPropKey: true;
@@ -5,7 +5,7 @@ import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
5
5
 
6
6
  const CommonProps = buildProps({
7
7
  modelValue: {
8
- type: definePropType([Number, String, Array])
8
+ type: definePropType([Number, String, Array, Object])
9
9
  },
10
10
  options: {
11
11
  type: definePropType(Array),
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","sources":["../../../../../../packages/components/cascader-panel/src/config.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { NOOP, buildProps, definePropType } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { PropType } from 'vue'\nimport type {\n CascaderConfig,\n CascaderNodePathValue,\n CascaderOption,\n CascaderProps,\n CascaderValue,\n RenderLabel,\n} from './node'\n\nexport const CommonProps = buildProps({\n /**\n * @description specify which key of node object is used as the node's value\n */\n modelValue: {\n type: definePropType<CascaderValue | null>([Number, String, Array]),\n },\n /**\n * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n */\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n /**\n * @description configuration options, see the following `CascaderProps` table.\n */\n props: {\n type: definePropType<CascaderProps>(Object),\n default: () => ({} as CascaderProps),\n },\n} as const)\n\nexport const DefaultProps: CascaderConfig = {\n /**\n * @description trigger mode of expanding options\n */\n expandTrigger: 'click',\n /**\n * @description whether multiple selection is enabled\n */\n multiple: false,\n /**\n * @description whether checked state of a node not affects its parent and child nodes\n */\n checkStrictly: false, // whether all nodes can be selected\n /**\n * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n */\n emitPath: true, // wether to emit an array of all levels value in which node is located\n /**\n * @description whether to dynamic load child nodes, use with `lazyload` attribute\n */\n lazy: false,\n /**\n * @description method for loading child nodes data, only works when `lazy` is true\n */\n lazyLoad: NOOP,\n /**\n * @description specify which key of node object is used as the node's value\n */\n value: 'value',\n /**\n * @description specify which key of node object is used as the node's label\n */\n label: 'label',\n /**\n * @description specify which key of node object is used as the node's children\n */\n children: 'children',\n /**\n * @description specify which key of node object is used as the node's leaf\n */\n leaf: 'leaf',\n /**\n * @description specify which key of node object is used as the node's disabled\n */\n disabled: 'disabled',\n /**\n * @description hover threshold of expanding options\n */\n hoverThreshold: 500,\n /**\n * @description whether to check or uncheck node when clicking on the node\n */\n checkOnClickNode: false,\n /**\n * @description whether to check or uncheck node when clicking on leaf node (last children).\n */\n checkOnClickLeaf: true,\n /**\n * @description whether to show the radio or checkbox prefix\n */\n showPrefix: true,\n}\n\nexport const cascaderPanelProps = buildProps({\n ...CommonProps,\n border: {\n type: Boolean,\n default: true,\n },\n renderLabel: {\n type: Function as PropType<RenderLabel>,\n },\n})\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst emitChangeFn = (value: CascaderValue | undefined | null) => true\n\nexport const cascaderPanelEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n close: () => true,\n 'expand-change': (value: CascaderNodePathValue) => value,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps }) => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props,\n }))\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,IAAI,EAAE,KAAK;AACb,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,cAAc,EAAE,GAAG;AACrB,EAAE,gBAAgB,EAAE,KAAK;AACzB,EAAE,gBAAgB,EAAE,IAAI;AACxB,EAAE,UAAU,EAAE,IAAI;AAClB,EAAE;AACU,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,GAAG,WAAW;AAChB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,QAAQ;AAClB,GAAG;AACH,CAAC,EAAE;AACH,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC;AACzB,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,eAAe,EAAE,CAAC,KAAK,KAAK,KAAK;AACnC,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,KAAK,KAAK;AAC5C,EAAE,OAAO,QAAQ,CAAC,OAAO;AACzB,IAAI,GAAG,YAAY;AACnB,IAAI,GAAG,KAAK,CAAC,KAAK;AAClB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"config.mjs","sources":["../../../../../../packages/components/cascader-panel/src/config.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { NOOP, buildProps, definePropType } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { PropType } from 'vue'\nimport type {\n CascaderConfig,\n CascaderNodePathValue,\n CascaderOption,\n CascaderProps,\n CascaderValue,\n RenderLabel,\n} from './node'\n\nexport const CommonProps = buildProps({\n /**\n * @description specify which key of node object is used as the node's value\n */\n modelValue: {\n type: definePropType<CascaderValue | null>([Number, String, Array, Object]),\n },\n /**\n * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n */\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n /**\n * @description configuration options, see the following `CascaderProps` table.\n */\n props: {\n type: definePropType<CascaderProps>(Object),\n default: () => ({} as CascaderProps),\n },\n} as const)\n\nexport const DefaultProps: CascaderConfig = {\n /**\n * @description trigger mode of expanding options\n */\n expandTrigger: 'click',\n /**\n * @description whether multiple selection is enabled\n */\n multiple: false,\n /**\n * @description whether checked state of a node not affects its parent and child nodes\n */\n checkStrictly: false, // whether all nodes can be selected\n /**\n * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n */\n emitPath: true, // wether to emit an array of all levels value in which node is located\n /**\n * @description whether to dynamic load child nodes, use with `lazyload` attribute\n */\n lazy: false,\n /**\n * @description method for loading child nodes data, only works when `lazy` is true\n */\n lazyLoad: NOOP,\n /**\n * @description specify which key of node object is used as the node's value\n */\n value: 'value',\n /**\n * @description specify which key of node object is used as the node's label\n */\n label: 'label',\n /**\n * @description specify which key of node object is used as the node's children\n */\n children: 'children',\n /**\n * @description specify which key of node object is used as the node's leaf\n */\n leaf: 'leaf',\n /**\n * @description specify which key of node object is used as the node's disabled\n */\n disabled: 'disabled',\n /**\n * @description hover threshold of expanding options\n */\n hoverThreshold: 500,\n /**\n * @description whether to check or uncheck node when clicking on the node\n */\n checkOnClickNode: false,\n /**\n * @description whether to check or uncheck node when clicking on leaf node (last children).\n */\n checkOnClickLeaf: true,\n /**\n * @description whether to show the radio or checkbox prefix\n */\n showPrefix: true,\n}\n\nexport const cascaderPanelProps = buildProps({\n ...CommonProps,\n border: {\n type: Boolean,\n default: true,\n },\n renderLabel: {\n type: Function as PropType<RenderLabel>,\n },\n})\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst emitChangeFn = (value: CascaderValue | undefined | null) => true\n\nexport const cascaderPanelEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n close: () => true,\n 'expand-change': (value: CascaderNodePathValue) => value,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps }) => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props,\n }))\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACzD,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,IAAI,EAAE,KAAK;AACb,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,cAAc,EAAE,GAAG;AACrB,EAAE,gBAAgB,EAAE,KAAK;AACzB,EAAE,gBAAgB,EAAE,IAAI;AACxB,EAAE,UAAU,EAAE,IAAI;AAClB,EAAE;AACU,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,GAAG,WAAW;AAChB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,QAAQ;AAClB,GAAG;AACH,CAAC,EAAE;AACH,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC;AACzB,MAAC,kBAAkB,GAAG;AAClC,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,eAAe,EAAE,CAAC,KAAK,KAAK,KAAK;AACnC,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,KAAK,KAAK;AAC5C,EAAE,OAAO,QAAQ,CAAC,OAAO;AACzB,IAAI,GAAG,YAAY;AACnB,IAAI,GAAG,KAAK,CAAC,KAAK;AAClB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
@@ -13,7 +13,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
13
13
  __epPropKey: true;
14
14
  };
15
15
  modelValue: {
16
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
16
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
17
17
  readonly required: false;
18
18
  readonly validator: ((val: unknown) => boolean) | undefined;
19
19
  __epPropKey: true;
@@ -171,7 +171,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
171
171
  __epPropKey: true;
172
172
  };
173
173
  modelValue: {
174
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
174
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("./node").CascaderNodePathValue | (CascaderNodeValue | import("./node").CascaderNodePathValue)[]) | (() => CascaderValue | null))[], unknown, unknown>>;
175
175
  readonly required: false;
176
176
  readonly validator: ((val: unknown) => boolean) | undefined;
177
177
  __epPropKey: true;
@@ -1,5 +1,5 @@
1
1
  import type { VNode } from 'vue';
2
- export type CascaderNodeValue = string | number;
2
+ export type CascaderNodeValue = string | number | Record<string, any>;
3
3
  export type CascaderNodePathValue = CascaderNodeValue[];
4
4
  export type CascaderValue = CascaderNodeValue | CascaderNodePathValue | (CascaderNodeValue | CascaderNodePathValue)[];
5
5
  export type CascaderConfig = Required<CascaderProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"node.mjs","sources":["../../../../../../packages/components/cascader-panel/src/node.ts"],"sourcesContent":["import { isArray, isEmpty, isFunction, isUndefined } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport interface RenderLabelProps {\n node: Node\n data: CascaderOption\n}\nexport type RenderLabel = (props: RenderLabelProps) => VNode | VNode[]\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n checkOnClickNode?: boolean\n checkOnClickLeaf?: boolean\n showPrefix?: boolean\n}\n\nexport type Nullable<T> = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n /**\n * Is it checked\n *\n * @default false\n */\n checked = false\n /**\n * Used to indicate the intermediate state of unchecked and fully checked child nodes\n *\n * @default false\n */\n indeterminate = false\n /**\n * Loading Status\n *\n * @default false\n */\n loading = false\n\n constructor(\n readonly data: CascaderOption,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n this.text = ''\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && !!parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(checked: boolean) {\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(checked)\n child.onParentCheck?.(checked)\n }\n })\n }\n\n emit() {\n const { parent } = this\n if (parent) {\n parent.onChildCheck?.()\n parent.emit()\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast(checked)\n this.setCheckState(checked)\n this.emit()\n }\n }\n}\n\nexport default Node\n"],"names":[],"mappings":";;;AACA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,MAAM,kBAAkB,GAAG,CAAC,IAAI,KAAK;AACrC,EAAE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;AACvB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AACF,MAAM,IAAI,CAAC;AACX,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE;AAClD,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,CAAC,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AAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;AAChJ,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;AAClF,GAAG;AACH,EAAE,OAAO,CAAC,OAAO,EAAE;AACnB,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;AAChC,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;AACpD,IAAI,IAAI,aAAa,IAAI,CAAC,QAAQ,EAAE;AACpC,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AAClB,KAAK;AACL,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"node.mjs","sources":["../../../../../../packages/components/cascader-panel/src/node.ts"],"sourcesContent":["import { isArray, isEmpty, isFunction, isUndefined } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number | Record<string, any>\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport interface RenderLabelProps {\n node: Node\n data: CascaderOption\n}\nexport type RenderLabel = (props: RenderLabelProps) => VNode | VNode[]\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n checkOnClickNode?: boolean\n checkOnClickLeaf?: boolean\n showPrefix?: boolean\n}\n\nexport type Nullable<T> = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n /**\n * Is it checked\n *\n * @default false\n */\n checked = false\n /**\n * Used to indicate the intermediate state of unchecked and fully checked child nodes\n *\n * @default false\n */\n indeterminate = false\n /**\n * Loading Status\n *\n * @default false\n */\n loading = false\n\n constructor(\n readonly data: CascaderOption,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n this.text = ''\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && !!parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(checked: boolean) {\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(checked)\n child.onParentCheck?.(checked)\n }\n })\n }\n\n emit() {\n const { parent } = this\n if (parent) {\n parent.onChildCheck?.()\n parent.emit()\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast(checked)\n this.setCheckState(checked)\n this.emit()\n }\n }\n}\n\nexport default Node\n"],"names":[],"mappings":";;;AACA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,MAAM,kBAAkB,GAAG,CAAC,IAAI,KAAK;AACrC,EAAE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;AACvB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AACF,MAAM,IAAI,CAAC;AACX,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE;AAClD,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACzB,IAAI,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;AAC/B,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACzB,IAAI,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,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,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;AAClF,GAAG;AACH,EAAE,OAAO,CAAC,OAAO,EAAE;AACnB,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;AAChC,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;AACpD,IAAI,IAAI,aAAa,IAAI,CAAC,QAAQ,EAAE;AACpC,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AAClB,KAAK;AACL,GAAG;AACH;;;;"}
@@ -1,7 +1,7 @@
1
1
  import type { InjectionKey, VNode } from 'vue';
2
2
  import type { default as CascaderNode, CascaderOption, CascaderProps, ExpandTrigger } from './node';
3
3
  export type { CascaderNode, CascaderOption, CascaderProps, ExpandTrigger };
4
- export type CascaderNodeValue = string | number;
4
+ export type CascaderNodeValue = string | number | Record<string, any>;
5
5
  export type CascaderNodePathValue = CascaderNodeValue[];
6
6
  export type CascaderValue = CascaderNodeValue | CascaderNodePathValue | (CascaderNodeValue | CascaderNodePathValue)[];
7
7
  export type CascaderConfig = Required<CascaderProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sources":["../../../../../../packages/components/cascader-panel/src/types.ts"],"sourcesContent":["import type { InjectionKey, VNode } from 'vue'\nimport type {\n default as CascaderNode,\n CascaderOption,\n CascaderProps,\n ExpandTrigger,\n} from './node'\n\nexport type { CascaderNode, CascaderOption, CascaderProps, ExpandTrigger }\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type isDisabled = (data: CascaderOption, node: CascaderNode) => boolean\nexport type isLeaf = (data: CascaderOption, node: CascaderNode) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: CascaderNode, resolve: Resolve) => void\nexport interface RenderLabelProps {\n node: CascaderNode\n data: CascaderOption\n}\nexport type RenderLabel = (props: RenderLabelProps) => VNode | VNode[]\n\nexport interface Tag {\n node?: CascaderNode\n key: number\n text: string\n hitState?: boolean\n closable: boolean\n isCollapseTag: boolean\n}\n\nexport interface ElCascaderPanelContext {\n config: CascaderConfig\n expandingNode: CascaderNode | undefined\n checkedNodes: CascaderNode[]\n isHoverMenu: boolean\n initialLoaded: boolean\n renderLabelFn: RenderLabel\n lazyLoad: (\n node?: CascaderNode,\n cb?: (dataList: CascaderOption[]) => void\n ) => void\n expandNode: (node: CascaderNode, silent?: boolean) => void\n handleCheckChange: (\n node: CascaderNode,\n checked: boolean,\n emitClose?: boolean\n ) => void\n}\n\nexport const CASCADER_PANEL_INJECTION_KEY: InjectionKey<ElCascaderPanelContext> =\n Symbol()\n"],"names":[],"mappings":"AAAY,MAAC,4BAA4B,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"types.mjs","sources":["../../../../../../packages/components/cascader-panel/src/types.ts"],"sourcesContent":["import type { InjectionKey, VNode } from 'vue'\nimport type {\n default as CascaderNode,\n CascaderOption,\n CascaderProps,\n ExpandTrigger,\n} from './node'\n\nexport type { CascaderNode, CascaderOption, CascaderProps, ExpandTrigger }\n\nexport type CascaderNodeValue = string | number | Record<string, any>\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type isDisabled = (data: CascaderOption, node: CascaderNode) => boolean\nexport type isLeaf = (data: CascaderOption, node: CascaderNode) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: CascaderNode, resolve: Resolve) => void\nexport interface RenderLabelProps {\n node: CascaderNode\n data: CascaderOption\n}\nexport type RenderLabel = (props: RenderLabelProps) => VNode | VNode[]\n\nexport interface Tag {\n node?: CascaderNode\n key: number\n text: string\n hitState?: boolean\n closable: boolean\n isCollapseTag: boolean\n}\n\nexport interface ElCascaderPanelContext {\n config: CascaderConfig\n expandingNode: CascaderNode | undefined\n checkedNodes: CascaderNode[]\n isHoverMenu: boolean\n initialLoaded: boolean\n renderLabelFn: RenderLabel\n lazyLoad: (\n node?: CascaderNode,\n cb?: (dataList: CascaderOption[]) => void\n ) => void\n expandNode: (node: CascaderNode, silent?: boolean) => void\n handleCheckChange: (\n node: CascaderNode,\n checked: boolean,\n emitClose?: boolean\n ) => void\n}\n\nexport const CASCADER_PANEL_INJECTION_KEY: InjectionKey<ElCascaderPanelContext> =\n Symbol()\n"],"names":[],"mappings":"AAAY,MAAC,4BAA4B,GAAG,MAAM;;;;"}
@@ -1,5 +1,5 @@
1
- import CheckTag from './src/check-tag.mjs';
2
- export { checkTagEmits, checkTagProps } from './src/check-tag2.mjs';
1
+ import CheckTag from './src/check-tag2.mjs';
2
+ export { checkTagEmits, checkTagProps } from './src/check-tag.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElCheckTag = withInstall(CheckTag);
@@ -1,44 +1,20 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
- import { checkTagProps, checkTagEmits } from './check-tag2.mjs';
3
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
+ import { isBoolean } from '../../../utils/types.mjs';
5
3
  import { CHANGE_EVENT } from '../../../constants/event.mjs';
6
4
 
7
- const __default__ = defineComponent({
8
- name: "ElCheckTag"
9
- });
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: checkTagProps,
13
- emits: checkTagEmits,
14
- setup(__props, { emit }) {
15
- const props = __props;
16
- const ns = useNamespace("check-tag");
17
- const isDisabled = computed(() => props.disabled);
18
- const containerKls = computed(() => [
19
- ns.b(),
20
- ns.is("checked", props.checked),
21
- ns.is("disabled", isDisabled.value),
22
- ns.m(props.type || "primary")
23
- ]);
24
- const handleChange = () => {
25
- if (isDisabled.value)
26
- return;
27
- const checked = !props.checked;
28
- emit(CHANGE_EVENT, checked);
29
- emit("update:checked", checked);
30
- };
31
- return (_ctx, _cache) => {
32
- return openBlock(), createElementBlock("span", {
33
- class: normalizeClass(unref(containerKls)),
34
- onClick: handleChange
35
- }, [
36
- renderSlot(_ctx.$slots, "default")
37
- ], 2);
38
- };
5
+ const checkTagProps = buildProps({
6
+ checked: Boolean,
7
+ disabled: Boolean,
8
+ type: {
9
+ type: String,
10
+ values: ["primary", "success", "info", "warning", "danger"],
11
+ default: "primary"
39
12
  }
40
13
  });
41
- var CheckTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "check-tag.vue"]]);
14
+ const checkTagEmits = {
15
+ "update:checked": (value) => isBoolean(value),
16
+ [CHANGE_EVENT]: (value) => isBoolean(value)
17
+ };
42
18
 
43
- export { CheckTag as default };
19
+ export { checkTagEmits, checkTagProps };
44
20
  //# sourceMappingURL=check-tag.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-tag.mjs","sources":["../../../../../../packages/components/check-tag/src/check-tag.vue"],"sourcesContent":["<template>\n <span :class=\"containerKls\" @click=\"handleChange\">\n <slot />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkTagEmits, checkTagProps } from './check-tag'\n\ndefineOptions({\n name: 'ElCheckTag',\n})\nconst props = defineProps(checkTagProps)\nconst emit = defineEmits(checkTagEmits)\n\nconst ns = useNamespace('check-tag')\nconst isDisabled = computed(() => props.disabled)\nconst containerKls = computed(() => [\n ns.b(),\n ns.is('checked', props.checked),\n ns.is('disabled', isDisabled.value),\n ns.m(props.type || 'primary'),\n])\n\nconst handleChange = () => {\n if (isDisabled.value) return\n\n const checked = !props.checked\n emit(CHANGE_EVENT, checked)\n emit('update:checked', checked)\n}\n</script>\n"],"names":[],"mappings":";;;;;;mCAYc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AACnC,IAAA,MAAM,UAAa,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAAA,MAClC,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,KAAA,CAAM,OAAO,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,MAClC,EAAG,CAAA,CAAA,CAAE,KAAM,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,KAC7B,CAAA,CAAA;AAED,IAAA,MAAM,eAAe,MAAM;AACzB,MAAA,IAAI,WAAW,KAAO;AAEtB,QAAM,OAAA;AACN,MAAA,sBAA0B,CAAA,OAAA,CAAA;AAC1B,MAAA,IAAA,CAAK,qBAAyB,CAAA,CAAA;AAAA,MAChC,IAAA,CAAA,gBAAA,EAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"check-tag.mjs","sources":["../../../../../../packages/components/check-tag/src/check-tag.ts"],"sourcesContent":["import { buildProps, isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type CheckTag from './check-tag.vue'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const checkTagProps = buildProps({\n /**\n * @description is checked\n */\n checked: Boolean,\n /**\n * @description whether the check-tag is disabled\n */\n disabled: Boolean,\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n} as const)\nexport type CheckTagProps = ExtractPropTypes<typeof checkTagProps>\nexport type CheckTagPropsPublic = __ExtractPublicPropTypes<typeof checkTagProps>\n\nexport const checkTagEmits = {\n 'update:checked': (value: boolean) => isBoolean(value),\n [CHANGE_EVENT]: (value: boolean) => isBoolean(value),\n}\nexport type CheckTagEmits = typeof checkTagEmits\n\nexport type CheckTagInstance = InstanceType<typeof CheckTag> & unknown\n"],"names":[],"mappings":";;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC/C,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
@@ -1,20 +1,44 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
- import { isBoolean } from '../../../utils/types.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+ import { checkTagProps, checkTagEmits } from './check-tag.mjs';
3
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
5
  import { CHANGE_EVENT } from '../../../constants/event.mjs';
4
6
 
5
- const checkTagProps = buildProps({
6
- checked: Boolean,
7
- disabled: Boolean,
8
- type: {
9
- type: String,
10
- values: ["primary", "success", "info", "warning", "danger"],
11
- default: "primary"
7
+ const __default__ = defineComponent({
8
+ name: "ElCheckTag"
9
+ });
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: checkTagProps,
13
+ emits: checkTagEmits,
14
+ setup(__props, { emit }) {
15
+ const props = __props;
16
+ const ns = useNamespace("check-tag");
17
+ const isDisabled = computed(() => props.disabled);
18
+ const containerKls = computed(() => [
19
+ ns.b(),
20
+ ns.is("checked", props.checked),
21
+ ns.is("disabled", isDisabled.value),
22
+ ns.m(props.type || "primary")
23
+ ]);
24
+ const handleChange = () => {
25
+ if (isDisabled.value)
26
+ return;
27
+ const checked = !props.checked;
28
+ emit(CHANGE_EVENT, checked);
29
+ emit("update:checked", checked);
30
+ };
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock("span", {
33
+ class: normalizeClass(unref(containerKls)),
34
+ onClick: handleChange
35
+ }, [
36
+ renderSlot(_ctx.$slots, "default")
37
+ ], 2);
38
+ };
12
39
  }
13
40
  });
14
- const checkTagEmits = {
15
- "update:checked": (value) => isBoolean(value),
16
- [CHANGE_EVENT]: (value) => isBoolean(value)
17
- };
41
+ var CheckTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "check-tag.vue"]]);
18
42
 
19
- export { checkTagEmits, checkTagProps };
43
+ export { CheckTag as default };
20
44
  //# sourceMappingURL=check-tag2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-tag2.mjs","sources":["../../../../../../packages/components/check-tag/src/check-tag.ts"],"sourcesContent":["import { buildProps, isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type CheckTag from './check-tag.vue'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const checkTagProps = buildProps({\n /**\n * @description is checked\n */\n checked: Boolean,\n /**\n * @description whether the check-tag is disabled\n */\n disabled: Boolean,\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n} as const)\nexport type CheckTagProps = ExtractPropTypes<typeof checkTagProps>\nexport type CheckTagPropsPublic = __ExtractPublicPropTypes<typeof checkTagProps>\n\nexport const checkTagEmits = {\n 'update:checked': (value: boolean) => isBoolean(value),\n [CHANGE_EVENT]: (value: boolean) => isBoolean(value),\n}\nexport type CheckTagEmits = typeof checkTagEmits\n\nexport type CheckTagInstance = InstanceType<typeof CheckTag> & unknown\n"],"names":[],"mappings":";;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC/C,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
1
+ {"version":3,"file":"check-tag2.mjs","sources":["../../../../../../packages/components/check-tag/src/check-tag.vue"],"sourcesContent":["<template>\n <span :class=\"containerKls\" @click=\"handleChange\">\n <slot />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkTagEmits, checkTagProps } from './check-tag'\n\ndefineOptions({\n name: 'ElCheckTag',\n})\nconst props = defineProps(checkTagProps)\nconst emit = defineEmits(checkTagEmits)\n\nconst ns = useNamespace('check-tag')\nconst isDisabled = computed(() => props.disabled)\nconst containerKls = computed(() => [\n ns.b(),\n ns.is('checked', props.checked),\n ns.is('disabled', isDisabled.value),\n ns.m(props.type || 'primary'),\n])\n\nconst handleChange = () => {\n if (isDisabled.value) return\n\n const checked = !props.checked\n emit(CHANGE_EVENT, checked)\n emit('update:checked', checked)\n}\n</script>\n"],"names":[],"mappings":";;;;;;mCAYc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AACnC,IAAA,MAAM,UAAa,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAAA,MAClC,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,KAAA,CAAM,OAAO,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,MAClC,EAAG,CAAA,CAAA,CAAE,KAAM,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,KAC7B,CAAA,CAAA;AAED,IAAA,MAAM,eAAe,MAAM;AACzB,MAAA,IAAI,WAAW,KAAO;AAEtB,QAAM,OAAA;AACN,MAAA,sBAA0B,CAAA,OAAA,CAAA;AAC1B,MAAA,IAAA,CAAK,qBAAyB,CAAA,CAAA;AAAA,MAChC,IAAA,CAAA,gBAAA,EAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
- import Collapse from './src/collapse2.mjs';
1
+ import Collapse from './src/collapse.mjs';
2
2
  import CollapseItem from './src/collapse-item2.mjs';
3
- export { collapseEmits, collapseProps, emitChangeFn } from './src/collapse.mjs';
3
+ export { collapseEmits, collapseProps, emitChangeFn } from './src/collapse2.mjs';
4
4
  export { collapseItemProps } from './src/collapse-item.mjs';
5
5
  export { collapseContextKey } from './src/constants.mjs';
6
6
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';