@element-plus/nightly 0.0.20240228 → 0.0.20240229

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +158 -85
  4. package/dist/index.full.min.js +19 -19
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +19 -19
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +158 -85
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/nb-no.js +1 -1
  154. package/dist/locale/nb-no.min.js +1 -1
  155. package/dist/locale/nb-no.min.mjs +1 -1
  156. package/dist/locale/nb-no.mjs +1 -1
  157. package/dist/locale/nl.js +1 -1
  158. package/dist/locale/nl.min.js +1 -1
  159. package/dist/locale/nl.min.mjs +1 -1
  160. package/dist/locale/nl.mjs +1 -1
  161. package/dist/locale/pa.js +1 -1
  162. package/dist/locale/pa.min.js +1 -1
  163. package/dist/locale/pa.min.mjs +1 -1
  164. package/dist/locale/pa.mjs +1 -1
  165. package/dist/locale/pl.js +1 -1
  166. package/dist/locale/pl.min.js +1 -1
  167. package/dist/locale/pl.min.mjs +1 -1
  168. package/dist/locale/pl.mjs +1 -1
  169. package/dist/locale/pt-br.js +1 -1
  170. package/dist/locale/pt-br.min.js +1 -1
  171. package/dist/locale/pt-br.min.mjs +1 -1
  172. package/dist/locale/pt-br.mjs +1 -1
  173. package/dist/locale/pt.js +1 -1
  174. package/dist/locale/pt.min.js +1 -1
  175. package/dist/locale/pt.min.mjs +1 -1
  176. package/dist/locale/pt.mjs +1 -1
  177. package/dist/locale/ro.js +1 -1
  178. package/dist/locale/ro.min.js +1 -1
  179. package/dist/locale/ro.min.mjs +1 -1
  180. package/dist/locale/ro.mjs +1 -1
  181. package/dist/locale/ru.js +1 -1
  182. package/dist/locale/ru.min.js +1 -1
  183. package/dist/locale/ru.min.mjs +1 -1
  184. package/dist/locale/ru.mjs +1 -1
  185. package/dist/locale/sk.js +1 -1
  186. package/dist/locale/sk.min.js +1 -1
  187. package/dist/locale/sk.min.mjs +1 -1
  188. package/dist/locale/sk.mjs +1 -1
  189. package/dist/locale/sl.js +1 -1
  190. package/dist/locale/sl.min.js +1 -1
  191. package/dist/locale/sl.min.mjs +1 -1
  192. package/dist/locale/sl.mjs +1 -1
  193. package/dist/locale/sr.js +1 -1
  194. package/dist/locale/sr.min.js +1 -1
  195. package/dist/locale/sr.min.mjs +1 -1
  196. package/dist/locale/sr.mjs +1 -1
  197. package/dist/locale/sv.js +1 -1
  198. package/dist/locale/sv.min.js +1 -1
  199. package/dist/locale/sv.min.mjs +1 -1
  200. package/dist/locale/sv.mjs +1 -1
  201. package/dist/locale/sw.js +1 -1
  202. package/dist/locale/sw.min.js +1 -1
  203. package/dist/locale/sw.min.mjs +1 -1
  204. package/dist/locale/sw.mjs +1 -1
  205. package/dist/locale/ta.js +1 -1
  206. package/dist/locale/ta.min.js +1 -1
  207. package/dist/locale/ta.min.mjs +1 -1
  208. package/dist/locale/ta.mjs +1 -1
  209. package/dist/locale/th.js +1 -1
  210. package/dist/locale/th.min.js +1 -1
  211. package/dist/locale/th.min.mjs +1 -1
  212. package/dist/locale/th.mjs +1 -1
  213. package/dist/locale/tk.js +1 -1
  214. package/dist/locale/tk.min.js +1 -1
  215. package/dist/locale/tk.min.mjs +1 -1
  216. package/dist/locale/tk.mjs +1 -1
  217. package/dist/locale/tr.js +1 -1
  218. package/dist/locale/tr.min.js +1 -1
  219. package/dist/locale/tr.min.mjs +1 -1
  220. package/dist/locale/tr.mjs +1 -1
  221. package/dist/locale/ug-cn.js +1 -1
  222. package/dist/locale/ug-cn.min.js +1 -1
  223. package/dist/locale/ug-cn.min.mjs +1 -1
  224. package/dist/locale/ug-cn.mjs +1 -1
  225. package/dist/locale/uk.js +1 -1
  226. package/dist/locale/uk.min.js +1 -1
  227. package/dist/locale/uk.min.mjs +1 -1
  228. package/dist/locale/uk.mjs +1 -1
  229. package/dist/locale/uz-uz.js +1 -1
  230. package/dist/locale/uz-uz.min.js +1 -1
  231. package/dist/locale/uz-uz.min.mjs +1 -1
  232. package/dist/locale/uz-uz.mjs +1 -1
  233. package/dist/locale/vi.js +1 -1
  234. package/dist/locale/vi.min.js +1 -1
  235. package/dist/locale/vi.min.mjs +1 -1
  236. package/dist/locale/vi.mjs +1 -1
  237. package/dist/locale/zh-cn.js +1 -1
  238. package/dist/locale/zh-cn.min.js +1 -1
  239. package/dist/locale/zh-cn.min.mjs +1 -1
  240. package/dist/locale/zh-cn.mjs +1 -1
  241. package/dist/locale/zh-tw.js +1 -1
  242. package/dist/locale/zh-tw.min.js +1 -1
  243. package/dist/locale/zh-tw.min.mjs +1 -1
  244. package/dist/locale/zh-tw.mjs +1 -1
  245. package/es/components/anchor/index.mjs +2 -2
  246. package/es/components/anchor/src/anchor.mjs +38 -190
  247. package/es/components/anchor/src/anchor.mjs.map +1 -1
  248. package/es/components/anchor/src/anchor2.mjs +190 -38
  249. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  250. package/es/components/avatar/index.mjs +2 -2
  251. package/es/components/avatar/src/avatar.mjs +32 -67
  252. package/es/components/avatar/src/avatar.mjs.map +1 -1
  253. package/es/components/avatar/src/avatar2.mjs +67 -32
  254. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  255. package/es/components/calendar/index.mjs +2 -2
  256. package/es/components/calendar/src/calendar.mjs +18 -131
  257. package/es/components/calendar/src/calendar.mjs.map +1 -1
  258. package/es/components/calendar/src/calendar2.mjs +131 -18
  259. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  260. package/es/components/card/index.mjs +2 -2
  261. package/es/components/card/src/card.mjs +43 -21
  262. package/es/components/card/src/card.mjs.map +1 -1
  263. package/es/components/card/src/card2.mjs +21 -43
  264. package/es/components/card/src/card2.mjs.map +1 -1
  265. package/es/components/carousel/index.d.ts +7 -0
  266. package/es/components/carousel/index.mjs +2 -2
  267. package/es/components/carousel/src/carousel-item.mjs +8 -70
  268. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  269. package/es/components/carousel/src/carousel-item2.mjs +70 -8
  270. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  271. package/es/components/carousel/src/carousel.d.ts +1 -0
  272. package/es/components/carousel/src/carousel.mjs +4 -0
  273. package/es/components/carousel/src/carousel.mjs.map +1 -1
  274. package/es/components/carousel/src/carousel.vue.d.ts +7 -0
  275. package/es/components/carousel/src/carousel2.mjs +100 -66
  276. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  277. package/es/components/carousel/src/use-carousel.d.ts +2 -0
  278. package/es/components/carousel/src/use-carousel.mjs +23 -0
  279. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  280. package/es/components/cascader/index.mjs +2 -2
  281. package/es/components/cascader/src/cascader.mjs +65 -626
  282. package/es/components/cascader/src/cascader.mjs.map +1 -1
  283. package/es/components/cascader/src/cascader2.mjs +626 -65
  284. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  285. package/es/components/index.mjs +10 -10
  286. package/es/components/menu/index.mjs +2 -2
  287. package/es/components/menu/src/menu-item-group.mjs +35 -4
  288. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  289. package/es/components/menu/src/menu-item-group2.mjs +4 -35
  290. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  291. package/es/components/menu/src/menu.mjs +2 -0
  292. package/es/components/menu/src/menu.mjs.map +1 -1
  293. package/es/components/select-v2/src/useSelect.mjs +9 -2
  294. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  295. package/es/components/switch/index.mjs +2 -2
  296. package/es/components/switch/src/switch.mjs +82 -234
  297. package/es/components/switch/src/switch.mjs.map +1 -1
  298. package/es/components/switch/src/switch2.mjs +234 -82
  299. package/es/components/switch/src/switch2.mjs.map +1 -1
  300. package/es/components/tour/index.mjs +2 -2
  301. package/es/components/tour/src/tour.mjs +69 -152
  302. package/es/components/tour/src/tour.mjs.map +1 -1
  303. package/es/components/tour/src/tour2.mjs +152 -69
  304. package/es/components/tour/src/tour2.mjs.map +1 -1
  305. package/es/components/tree-select/src/select.d.ts +1 -1
  306. package/es/components/tree-select/src/select.mjs +15 -11
  307. package/es/components/tree-select/src/select.mjs.map +1 -1
  308. package/es/components/tree-select/src/tree.mjs +5 -6
  309. package/es/components/tree-select/src/tree.mjs.map +1 -1
  310. package/es/components/upload/index.mjs +2 -2
  311. package/es/components/upload/src/upload-content.mjs +1 -1
  312. package/es/components/upload/src/upload-content2.mjs +1 -1
  313. package/es/components/upload/src/upload-list.mjs +1 -1
  314. package/es/components/upload/src/upload.mjs +118 -104
  315. package/es/components/upload/src/upload.mjs.map +1 -1
  316. package/es/components/upload/src/upload2.mjs +104 -118
  317. package/es/components/upload/src/upload2.mjs.map +1 -1
  318. package/es/components/upload/src/use-handlers.mjs +1 -1
  319. package/es/index.mjs +10 -10
  320. package/es/version.d.ts +1 -1
  321. package/es/version.mjs +1 -1
  322. package/es/version.mjs.map +1 -1
  323. package/lib/components/anchor/index.js +2 -2
  324. package/lib/components/anchor/src/anchor.js +38 -189
  325. package/lib/components/anchor/src/anchor.js.map +1 -1
  326. package/lib/components/anchor/src/anchor2.js +189 -38
  327. package/lib/components/anchor/src/anchor2.js.map +1 -1
  328. package/lib/components/avatar/index.js +2 -2
  329. package/lib/components/avatar/src/avatar.js +33 -67
  330. package/lib/components/avatar/src/avatar.js.map +1 -1
  331. package/lib/components/avatar/src/avatar2.js +67 -33
  332. package/lib/components/avatar/src/avatar2.js.map +1 -1
  333. package/lib/components/calendar/index.js +2 -2
  334. package/lib/components/calendar/src/calendar.js +19 -131
  335. package/lib/components/calendar/src/calendar.js.map +1 -1
  336. package/lib/components/calendar/src/calendar2.js +131 -19
  337. package/lib/components/calendar/src/calendar2.js.map +1 -1
  338. package/lib/components/card/index.js +2 -2
  339. package/lib/components/card/src/card.js +43 -21
  340. package/lib/components/card/src/card.js.map +1 -1
  341. package/lib/components/card/src/card2.js +21 -43
  342. package/lib/components/card/src/card2.js.map +1 -1
  343. package/lib/components/carousel/index.d.ts +7 -0
  344. package/lib/components/carousel/index.js +2 -2
  345. package/lib/components/carousel/src/carousel-item.js +8 -70
  346. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  347. package/lib/components/carousel/src/carousel-item2.js +70 -8
  348. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  349. package/lib/components/carousel/src/carousel.d.ts +1 -0
  350. package/lib/components/carousel/src/carousel.js +4 -0
  351. package/lib/components/carousel/src/carousel.js.map +1 -1
  352. package/lib/components/carousel/src/carousel.vue.d.ts +7 -0
  353. package/lib/components/carousel/src/carousel2.js +99 -65
  354. package/lib/components/carousel/src/carousel2.js.map +1 -1
  355. package/lib/components/carousel/src/use-carousel.d.ts +2 -0
  356. package/lib/components/carousel/src/use-carousel.js +23 -0
  357. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  358. package/lib/components/cascader/index.js +2 -2
  359. package/lib/components/cascader/src/cascader.js +66 -626
  360. package/lib/components/cascader/src/cascader.js.map +1 -1
  361. package/lib/components/cascader/src/cascader2.js +626 -66
  362. package/lib/components/cascader/src/cascader2.js.map +1 -1
  363. package/lib/components/index.js +10 -10
  364. package/lib/components/menu/index.js +2 -2
  365. package/lib/components/menu/src/menu-item-group.js +35 -4
  366. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  367. package/lib/components/menu/src/menu-item-group2.js +4 -35
  368. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  369. package/lib/components/menu/src/menu.js +2 -0
  370. package/lib/components/menu/src/menu.js.map +1 -1
  371. package/lib/components/select-v2/src/useSelect.js +9 -2
  372. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  373. package/lib/components/switch/index.js +2 -2
  374. package/lib/components/switch/src/switch.js +82 -233
  375. package/lib/components/switch/src/switch.js.map +1 -1
  376. package/lib/components/switch/src/switch2.js +233 -82
  377. package/lib/components/switch/src/switch2.js.map +1 -1
  378. package/lib/components/tour/index.js +2 -2
  379. package/lib/components/tour/src/tour.js +69 -151
  380. package/lib/components/tour/src/tour.js.map +1 -1
  381. package/lib/components/tour/src/tour2.js +151 -69
  382. package/lib/components/tour/src/tour2.js.map +1 -1
  383. package/lib/components/tree-select/src/select.d.ts +1 -1
  384. package/lib/components/tree-select/src/select.js +14 -10
  385. package/lib/components/tree-select/src/select.js.map +1 -1
  386. package/lib/components/tree-select/src/tree.js +5 -6
  387. package/lib/components/tree-select/src/tree.js.map +1 -1
  388. package/lib/components/upload/index.js +2 -2
  389. package/lib/components/upload/src/upload-content.js +1 -1
  390. package/lib/components/upload/src/upload-content2.js +1 -1
  391. package/lib/components/upload/src/upload-list.js +1 -1
  392. package/lib/components/upload/src/upload.js +118 -107
  393. package/lib/components/upload/src/upload.js.map +1 -1
  394. package/lib/components/upload/src/upload2.js +107 -118
  395. package/lib/components/upload/src/upload2.js.map +1 -1
  396. package/lib/components/upload/src/use-handlers.js +1 -1
  397. package/lib/index.js +10 -10
  398. package/lib/version.d.ts +1 -1
  399. package/lib/version.js +1 -1
  400. package/lib/version.js.map +1 -1
  401. package/package.json +2 -2
  402. package/tags.json +1 -1
  403. package/theme-chalk/el-carousel.css +1 -1
  404. package/theme-chalk/index.css +1 -1
  405. package/theme-chalk/src/carousel.scss +8 -0
  406. package/web-types.json +1 -1
@@ -2,77 +2,637 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../cascader-panel/index.js');
6
- require('../../../utils/index.js');
5
+ var vue = require('vue');
6
+ var shared = require('@vue/shared');
7
+ var lodashUnified = require('lodash-unified');
8
+ var core = require('@vueuse/core');
9
+ var index$7 = require('../../cascader-panel/index.js');
10
+ var index$3 = require('../../input/index.js');
11
+ var index$2 = require('../../tooltip/index.js');
12
+ var index$8 = require('../../scrollbar/index.js');
13
+ var index$5 = require('../../tag/index.js');
14
+ var index$4 = require('../../icon/index.js');
15
+ require('../../form/index.js');
16
+ require('../../../directives/index.js');
7
17
  require('../../../hooks/index.js');
8
- require('../../tooltip/index.js');
9
- require('../../tag/index.js');
18
+ require('../../../utils/index.js');
10
19
  require('../../../constants/index.js');
11
- var runtime = require('../../../utils/vue/props/runtime.js');
12
- var config = require('../../cascader-panel/src/config.js');
13
- var index = require('../../../hooks/use-size/index.js');
14
- var content = require('../../tooltip/src/content.js');
15
- var tag = require('../../tag/src/tag.js');
20
+ var iconsVue = require('@element-plus/icons-vue');
21
+ var cascader = require('./cascader.js');
22
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
23
+ var index = require('../../../hooks/use-namespace/index.js');
24
+ var index$1 = require('../../../hooks/use-locale/index.js');
25
+ var useFormItem = require('../../form/src/hooks/use-form-item.js');
26
+ var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
16
27
  var event = require('../../../constants/event.js');
17
- var types = require('../../../utils/types.js');
28
+ var error = require('../../../utils/error.js');
29
+ var i18n = require('../../../utils/i18n.js');
30
+ var aria = require('../../../constants/aria.js');
31
+ var aria$1 = require('../../../utils/dom/aria.js');
32
+ var index$6 = require('../../../directives/click-outside/index.js');
18
33
 
19
- const cascaderProps = runtime.buildProps({
20
- ...config.CommonProps,
21
- size: index.useSizeProp,
22
- placeholder: String,
23
- disabled: Boolean,
24
- clearable: Boolean,
25
- filterable: Boolean,
26
- filterMethod: {
27
- type: runtime.definePropType(Function),
28
- default: (node, keyword) => node.text.includes(keyword)
29
- },
30
- separator: {
31
- type: String,
32
- default: " / "
33
- },
34
- showAllLevels: {
35
- type: Boolean,
36
- default: true
37
- },
38
- collapseTags: Boolean,
39
- maxCollapseTags: {
40
- type: Number,
41
- default: 1
42
- },
43
- collapseTagsTooltip: {
44
- type: Boolean,
45
- default: false
46
- },
47
- debounce: {
48
- type: Number,
49
- default: 300
50
- },
51
- beforeFilter: {
52
- type: runtime.definePropType(Function),
53
- default: () => true
54
- },
55
- popperClass: {
56
- type: String,
57
- default: ""
58
- },
59
- teleported: content.useTooltipContentProps.teleported,
60
- tagType: { ...tag.tagProps.type, default: "info" },
61
- validateEvent: {
62
- type: Boolean,
63
- default: true
34
+ const _hoisted_1 = { key: 0 };
35
+ const _hoisted_2 = ["placeholder", "onKeydown"];
36
+ const _hoisted_3 = ["onClick"];
37
+ const COMPONENT_NAME = "ElCascader";
38
+ const __default__ = vue.defineComponent({
39
+ name: COMPONENT_NAME
40
+ });
41
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
+ ...__default__,
43
+ props: cascader.cascaderProps,
44
+ emits: cascader.cascaderEmits,
45
+ setup(__props, { expose, emit }) {
46
+ const props = __props;
47
+ const popperOptions = {
48
+ modifiers: [
49
+ {
50
+ name: "arrowPosition",
51
+ enabled: true,
52
+ phase: "main",
53
+ fn: ({ state }) => {
54
+ const { modifiersData, placement } = state;
55
+ if (["right", "left", "bottom", "top"].includes(placement))
56
+ return;
57
+ modifiersData.arrow.x = 35;
58
+ },
59
+ requires: ["arrow"]
60
+ }
61
+ ]
62
+ };
63
+ const attrs = vue.useAttrs();
64
+ let inputInitialHeight = 0;
65
+ let pressDeleteCount = 0;
66
+ const nsCascader = index.useNamespace("cascader");
67
+ const nsInput = index.useNamespace("input");
68
+ const { t } = index$1.useLocale();
69
+ const { form, formItem } = useFormItem.useFormItem();
70
+ const tooltipRef = vue.ref(null);
71
+ const input = vue.ref(null);
72
+ const tagWrapper = vue.ref(null);
73
+ const cascaderPanelRef = vue.ref(null);
74
+ const suggestionPanel = vue.ref(null);
75
+ const popperVisible = vue.ref(false);
76
+ const inputHover = vue.ref(false);
77
+ const filtering = vue.ref(false);
78
+ const filterFocus = vue.ref(false);
79
+ const inputValue = vue.ref("");
80
+ const searchInputValue = vue.ref("");
81
+ const presentTags = vue.ref([]);
82
+ const allPresentTags = vue.ref([]);
83
+ const suggestions = vue.ref([]);
84
+ const isOnComposition = vue.ref(false);
85
+ const cascaderStyle = vue.computed(() => {
86
+ return attrs.style;
87
+ });
88
+ const isDisabled = vue.computed(() => props.disabled || (form == null ? void 0 : form.disabled));
89
+ const inputPlaceholder = vue.computed(() => props.placeholder || t("el.cascader.placeholder"));
90
+ const currentPlaceholder = vue.computed(() => searchInputValue.value || presentTags.value.length > 0 || isOnComposition.value ? "" : inputPlaceholder.value);
91
+ const realSize = useFormCommonProps.useFormSize();
92
+ const tagSize = vue.computed(() => ["small"].includes(realSize.value) ? "small" : "default");
93
+ const multiple = vue.computed(() => !!props.props.multiple);
94
+ const readonly = vue.computed(() => !props.filterable || multiple.value);
95
+ const searchKeyword = vue.computed(() => multiple.value ? searchInputValue.value : inputValue.value);
96
+ const checkedNodes = vue.computed(() => {
97
+ var _a;
98
+ return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || [];
99
+ });
100
+ const clearBtnVisible = vue.computed(() => {
101
+ if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)
102
+ return false;
103
+ return !!checkedNodes.value.length;
104
+ });
105
+ const presentText = vue.computed(() => {
106
+ const { showAllLevels, separator } = props;
107
+ const nodes = checkedNodes.value;
108
+ return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
109
+ });
110
+ const checkedValue = vue.computed({
111
+ get() {
112
+ return lodashUnified.cloneDeep(props.modelValue);
113
+ },
114
+ set(val) {
115
+ emit(event.UPDATE_MODEL_EVENT, val);
116
+ emit(event.CHANGE_EVENT, val);
117
+ if (props.validateEvent) {
118
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
119
+ }
120
+ }
121
+ });
122
+ const cascaderKls = vue.computed(() => {
123
+ return [
124
+ nsCascader.b(),
125
+ nsCascader.m(realSize.value),
126
+ nsCascader.is("disabled", isDisabled.value),
127
+ attrs.class
128
+ ];
129
+ });
130
+ const cascaderIconKls = vue.computed(() => {
131
+ return [
132
+ nsInput.e("icon"),
133
+ "icon-arrow-down",
134
+ nsCascader.is("reverse", popperVisible.value)
135
+ ];
136
+ });
137
+ const inputClass = vue.computed(() => {
138
+ return nsCascader.is("focus", popperVisible.value || filterFocus.value);
139
+ });
140
+ const contentRef = vue.computed(() => {
141
+ var _a, _b;
142
+ return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
143
+ });
144
+ const togglePopperVisible = (visible) => {
145
+ var _a, _b, _c;
146
+ if (isDisabled.value)
147
+ return;
148
+ visible = visible != null ? visible : !popperVisible.value;
149
+ if (visible !== popperVisible.value) {
150
+ popperVisible.value = visible;
151
+ (_b = (_a = input.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
152
+ if (visible) {
153
+ updatePopperPosition();
154
+ vue.nextTick((_c = cascaderPanelRef.value) == null ? void 0 : _c.scrollToExpandingNode);
155
+ } else if (props.filterable) {
156
+ syncPresentTextValue();
157
+ }
158
+ emit("visibleChange", visible);
159
+ }
160
+ };
161
+ const updatePopperPosition = () => {
162
+ vue.nextTick(() => {
163
+ var _a;
164
+ (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
165
+ });
166
+ };
167
+ const hideSuggestionPanel = () => {
168
+ filtering.value = false;
169
+ };
170
+ const genTag = (node) => {
171
+ const { showAllLevels, separator } = props;
172
+ return {
173
+ node,
174
+ key: node.uid,
175
+ text: node.calcText(showAllLevels, separator),
176
+ hitState: false,
177
+ closable: !isDisabled.value && !node.isDisabled,
178
+ isCollapseTag: false
179
+ };
180
+ };
181
+ const deleteTag = (tag) => {
182
+ var _a;
183
+ const node = tag.node;
184
+ node.doCheck(false);
185
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue();
186
+ emit("removeTag", node.valueByOption);
187
+ };
188
+ const calculatePresentTags = () => {
189
+ if (!multiple.value)
190
+ return;
191
+ const nodes = checkedNodes.value;
192
+ const tags = [];
193
+ const allTags = [];
194
+ nodes.forEach((node) => allTags.push(genTag(node)));
195
+ allPresentTags.value = allTags;
196
+ if (nodes.length) {
197
+ nodes.slice(0, props.maxCollapseTags).forEach((node) => tags.push(genTag(node)));
198
+ const rest = nodes.slice(props.maxCollapseTags);
199
+ const restCount = rest.length;
200
+ if (restCount) {
201
+ if (props.collapseTags) {
202
+ tags.push({
203
+ key: -1,
204
+ text: `+ ${restCount}`,
205
+ closable: false,
206
+ isCollapseTag: true
207
+ });
208
+ } else {
209
+ rest.forEach((node) => tags.push(genTag(node)));
210
+ }
211
+ }
212
+ }
213
+ presentTags.value = tags;
214
+ };
215
+ const calculateSuggestions = () => {
216
+ var _a, _b;
217
+ const { filterMethod, showAllLevels, separator } = props;
218
+ const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
219
+ if (node.isDisabled)
220
+ return false;
221
+ node.calcText(showAllLevels, separator);
222
+ return filterMethod(node, searchKeyword.value);
223
+ });
224
+ if (multiple.value) {
225
+ presentTags.value.forEach((tag) => {
226
+ tag.hitState = false;
227
+ });
228
+ allPresentTags.value.forEach((tag) => {
229
+ tag.hitState = false;
230
+ });
231
+ }
232
+ filtering.value = true;
233
+ suggestions.value = res;
234
+ updatePopperPosition();
235
+ };
236
+ const focusFirstNode = () => {
237
+ var _a;
238
+ let firstNode;
239
+ if (filtering.value && suggestionPanel.value) {
240
+ firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
241
+ } else {
242
+ firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
243
+ }
244
+ if (firstNode) {
245
+ firstNode.focus();
246
+ !filtering.value && firstNode.click();
247
+ }
248
+ };
249
+ const updateStyle = () => {
250
+ var _a, _b;
251
+ const inputInner = (_a = input.value) == null ? void 0 : _a.input;
252
+ const tagWrapperEl = tagWrapper.value;
253
+ const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
254
+ if (!core.isClient || !inputInner)
255
+ return;
256
+ if (suggestionPanelEl) {
257
+ const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
258
+ suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
259
+ }
260
+ if (tagWrapperEl) {
261
+ const { offsetHeight } = tagWrapperEl;
262
+ const height = presentTags.value.length > 0 ? `${Math.max(offsetHeight + 6, inputInitialHeight)}px` : `${inputInitialHeight}px`;
263
+ inputInner.style.height = height;
264
+ updatePopperPosition();
265
+ }
266
+ };
267
+ const getCheckedNodes = (leafOnly) => {
268
+ var _a;
269
+ return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
270
+ };
271
+ const handleExpandChange = (value) => {
272
+ updatePopperPosition();
273
+ emit("expandChange", value);
274
+ };
275
+ const handleComposition = (event) => {
276
+ var _a;
277
+ const text = (_a = event.target) == null ? void 0 : _a.value;
278
+ if (event.type === "compositionend") {
279
+ isOnComposition.value = false;
280
+ vue.nextTick(() => handleInput(text));
281
+ } else {
282
+ const lastCharacter = text[text.length - 1] || "";
283
+ isOnComposition.value = !i18n.isKorean(lastCharacter);
284
+ }
285
+ };
286
+ const handleKeyDown = (e) => {
287
+ if (isOnComposition.value)
288
+ return;
289
+ switch (e.code) {
290
+ case aria.EVENT_CODE.enter:
291
+ togglePopperVisible();
292
+ break;
293
+ case aria.EVENT_CODE.down:
294
+ togglePopperVisible(true);
295
+ vue.nextTick(focusFirstNode);
296
+ e.preventDefault();
297
+ break;
298
+ case aria.EVENT_CODE.esc:
299
+ if (popperVisible.value === true) {
300
+ e.preventDefault();
301
+ e.stopPropagation();
302
+ togglePopperVisible(false);
303
+ }
304
+ break;
305
+ case aria.EVENT_CODE.tab:
306
+ togglePopperVisible(false);
307
+ break;
308
+ }
309
+ };
310
+ const handleClear = () => {
311
+ var _a;
312
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes();
313
+ if (!popperVisible.value && props.filterable) {
314
+ syncPresentTextValue();
315
+ }
316
+ togglePopperVisible(false);
317
+ };
318
+ const syncPresentTextValue = () => {
319
+ const { value } = presentText;
320
+ inputValue.value = value;
321
+ searchInputValue.value = value;
322
+ };
323
+ const handleSuggestionClick = (node) => {
324
+ var _a, _b;
325
+ const { checked } = node;
326
+ if (multiple.value) {
327
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
328
+ } else {
329
+ !checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
330
+ togglePopperVisible(false);
331
+ }
332
+ };
333
+ const handleSuggestionKeyDown = (e) => {
334
+ const target = e.target;
335
+ const { code } = e;
336
+ switch (code) {
337
+ case aria.EVENT_CODE.up:
338
+ case aria.EVENT_CODE.down: {
339
+ const distance = code === aria.EVENT_CODE.up ? -1 : 1;
340
+ aria$1.focusNode(aria$1.getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
341
+ break;
342
+ }
343
+ case aria.EVENT_CODE.enter:
344
+ target.click();
345
+ break;
346
+ }
347
+ };
348
+ const handleDelete = () => {
349
+ const tags = presentTags.value;
350
+ const lastTag = tags[tags.length - 1];
351
+ pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
352
+ if (!lastTag || !pressDeleteCount || props.collapseTags && tags.length > 1)
353
+ return;
354
+ if (lastTag.hitState) {
355
+ deleteTag(lastTag);
356
+ } else {
357
+ lastTag.hitState = true;
358
+ }
359
+ };
360
+ const handleFocus = (e) => {
361
+ const el = e.target;
362
+ const name = nsCascader.e("search-input");
363
+ if (el.className === name) {
364
+ filterFocus.value = true;
365
+ }
366
+ emit("focus", e);
367
+ };
368
+ const handleBlur = (e) => {
369
+ filterFocus.value = false;
370
+ emit("blur", e);
371
+ };
372
+ const handleFilter = lodashUnified.debounce(() => {
373
+ const { value } = searchKeyword;
374
+ if (!value)
375
+ return;
376
+ const passed = props.beforeFilter(value);
377
+ if (shared.isPromise(passed)) {
378
+ passed.then(calculateSuggestions).catch(() => {
379
+ });
380
+ } else if (passed !== false) {
381
+ calculateSuggestions();
382
+ } else {
383
+ hideSuggestionPanel();
384
+ }
385
+ }, props.debounce);
386
+ const handleInput = (val, e) => {
387
+ !popperVisible.value && togglePopperVisible(true);
388
+ if (e == null ? void 0 : e.isComposing)
389
+ return;
390
+ val ? handleFilter() : hideSuggestionPanel();
391
+ };
392
+ const getInputInnerHeight = (inputInner) => Number.parseFloat(core.useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
393
+ vue.watch(filtering, updatePopperPosition);
394
+ vue.watch([checkedNodes, isDisabled], calculatePresentTags);
395
+ vue.watch(presentTags, () => {
396
+ vue.nextTick(() => updateStyle());
397
+ });
398
+ vue.watch(realSize, async () => {
399
+ await vue.nextTick();
400
+ const inputInner = input.value.input;
401
+ inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
402
+ updateStyle();
403
+ });
404
+ vue.watch(presentText, syncPresentTextValue, { immediate: true });
405
+ vue.onMounted(() => {
406
+ const inputInner = input.value.input;
407
+ const inputInnerHeight = getInputInnerHeight(inputInner);
408
+ inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
409
+ core.useResizeObserver(inputInner, updateStyle);
410
+ });
411
+ expose({
412
+ getCheckedNodes,
413
+ cascaderPanelRef,
414
+ togglePopperVisible,
415
+ contentRef
416
+ });
417
+ return (_ctx, _cache) => {
418
+ return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElTooltip), {
419
+ ref_key: "tooltipRef",
420
+ ref: tooltipRef,
421
+ visible: popperVisible.value,
422
+ teleported: _ctx.teleported,
423
+ "popper-class": [vue.unref(nsCascader).e("dropdown"), _ctx.popperClass],
424
+ "popper-options": popperOptions,
425
+ "fallback-placements": [
426
+ "bottom-start",
427
+ "bottom",
428
+ "top-start",
429
+ "top",
430
+ "right",
431
+ "left"
432
+ ],
433
+ "stop-popper-mouse-event": false,
434
+ "gpu-acceleration": false,
435
+ placement: "bottom-start",
436
+ transition: `${vue.unref(nsCascader).namespace.value}-zoom-in-top`,
437
+ effect: "light",
438
+ pure: "",
439
+ persistent: "",
440
+ onHide: hideSuggestionPanel
441
+ }, {
442
+ default: vue.withCtx(() => [
443
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
444
+ class: vue.normalizeClass(vue.unref(cascaderKls)),
445
+ style: vue.normalizeStyle(vue.unref(cascaderStyle)),
446
+ onClick: _cache[5] || (_cache[5] = () => togglePopperVisible(vue.unref(readonly) ? void 0 : true)),
447
+ onKeydown: handleKeyDown,
448
+ onMouseenter: _cache[6] || (_cache[6] = ($event) => inputHover.value = true),
449
+ onMouseleave: _cache[7] || (_cache[7] = ($event) => inputHover.value = false)
450
+ }, [
451
+ vue.createVNode(vue.unref(index$3.ElInput), {
452
+ ref_key: "input",
453
+ ref: input,
454
+ modelValue: inputValue.value,
455
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
456
+ placeholder: vue.unref(currentPlaceholder),
457
+ readonly: vue.unref(readonly),
458
+ disabled: vue.unref(isDisabled),
459
+ "validate-event": false,
460
+ size: vue.unref(realSize),
461
+ class: vue.normalizeClass(vue.unref(inputClass)),
462
+ tabindex: vue.unref(multiple) && _ctx.filterable && !vue.unref(isDisabled) ? -1 : void 0,
463
+ onCompositionstart: handleComposition,
464
+ onCompositionupdate: handleComposition,
465
+ onCompositionend: handleComposition,
466
+ onFocus: handleFocus,
467
+ onBlur: handleBlur,
468
+ onInput: handleInput
469
+ }, {
470
+ suffix: vue.withCtx(() => [
471
+ vue.unref(clearBtnVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
472
+ key: "clear",
473
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), "icon-circle-close"]),
474
+ onClick: vue.withModifiers(handleClear, ["stop"])
475
+ }, {
476
+ default: vue.withCtx(() => [
477
+ vue.createVNode(vue.unref(iconsVue.CircleClose))
478
+ ]),
479
+ _: 1
480
+ }, 8, ["class", "onClick"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
481
+ key: "arrow-down",
482
+ class: vue.normalizeClass(vue.unref(cascaderIconKls)),
483
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => togglePopperVisible(), ["stop"]))
484
+ }, {
485
+ default: vue.withCtx(() => [
486
+ vue.createVNode(vue.unref(iconsVue.ArrowDown))
487
+ ]),
488
+ _: 1
489
+ }, 8, ["class"]))
490
+ ]),
491
+ _: 1
492
+ }, 8, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex"]),
493
+ vue.unref(multiple) ? (vue.openBlock(), vue.createElementBlock("div", {
494
+ key: 0,
495
+ ref_key: "tagWrapper",
496
+ ref: tagWrapper,
497
+ class: vue.normalizeClass(vue.unref(nsCascader).e("tags"))
498
+ }, [
499
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(presentTags.value, (tag) => {
500
+ return vue.openBlock(), vue.createBlock(vue.unref(index$5.ElTag), {
501
+ key: tag.key,
502
+ type: _ctx.tagType,
503
+ size: vue.unref(tagSize),
504
+ hit: tag.hitState,
505
+ closable: tag.closable,
506
+ "disable-transitions": "",
507
+ onClose: ($event) => deleteTag(tag)
508
+ }, {
509
+ default: vue.withCtx(() => [
510
+ tag.isCollapseTag === false ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, vue.toDisplayString(tag.text), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElTooltip), {
511
+ key: 1,
512
+ disabled: popperVisible.value || !_ctx.collapseTagsTooltip,
513
+ "fallback-placements": ["bottom", "top", "right", "left"],
514
+ placement: "bottom",
515
+ effect: "light"
516
+ }, {
517
+ default: vue.withCtx(() => [
518
+ vue.createElementVNode("span", null, vue.toDisplayString(tag.text), 1)
519
+ ]),
520
+ content: vue.withCtx(() => [
521
+ vue.createElementVNode("div", {
522
+ class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tags"))
523
+ }, [
524
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(allPresentTags.value.slice(_ctx.maxCollapseTags), (tag2, idx) => {
525
+ return vue.openBlock(), vue.createElementBlock("div", {
526
+ key: idx,
527
+ class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tag"))
528
+ }, [
529
+ (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElTag), {
530
+ key: tag2.key,
531
+ class: "in-tooltip",
532
+ type: _ctx.tagType,
533
+ size: vue.unref(tagSize),
534
+ hit: tag2.hitState,
535
+ closable: tag2.closable,
536
+ "disable-transitions": "",
537
+ onClose: ($event) => deleteTag(tag2)
538
+ }, {
539
+ default: vue.withCtx(() => [
540
+ vue.createElementVNode("span", null, vue.toDisplayString(tag2.text), 1)
541
+ ]),
542
+ _: 2
543
+ }, 1032, ["type", "size", "hit", "closable", "onClose"]))
544
+ ], 2);
545
+ }), 128))
546
+ ], 2)
547
+ ]),
548
+ _: 2
549
+ }, 1032, ["disabled"]))
550
+ ]),
551
+ _: 2
552
+ }, 1032, ["type", "size", "hit", "closable", "onClose"]);
553
+ }), 128)),
554
+ _ctx.filterable && !vue.unref(isDisabled) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
555
+ key: 0,
556
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event),
557
+ type: "text",
558
+ class: vue.normalizeClass(vue.unref(nsCascader).e("search-input")),
559
+ placeholder: vue.unref(presentText) ? "" : vue.unref(inputPlaceholder),
560
+ onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)),
561
+ onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => togglePopperVisible(true), ["stop"])),
562
+ onKeydown: vue.withKeys(handleDelete, ["delete"]),
563
+ onCompositionstart: handleComposition,
564
+ onCompositionupdate: handleComposition,
565
+ onCompositionend: handleComposition,
566
+ onFocus: handleFocus,
567
+ onBlur: handleBlur
568
+ }, null, 42, _hoisted_2)), [
569
+ [vue.vModelText, searchInputValue.value]
570
+ ]) : vue.createCommentVNode("v-if", true)
571
+ ], 2)) : vue.createCommentVNode("v-if", true)
572
+ ], 38)), [
573
+ [vue.unref(index$6["default"]), () => togglePopperVisible(false), vue.unref(contentRef)]
574
+ ])
575
+ ]),
576
+ content: vue.withCtx(() => [
577
+ vue.withDirectives(vue.createVNode(vue.unref(index$7["default"]), {
578
+ ref_key: "cascaderPanelRef",
579
+ ref: cascaderPanelRef,
580
+ modelValue: vue.unref(checkedValue),
581
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.isRef(checkedValue) ? checkedValue.value = $event : null),
582
+ options: _ctx.options,
583
+ props: props.props,
584
+ border: false,
585
+ "render-label": _ctx.$slots.default,
586
+ onExpandChange: handleExpandChange,
587
+ onClose: _cache[9] || (_cache[9] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false)))
588
+ }, null, 8, ["modelValue", "options", "props", "render-label"]), [
589
+ [vue.vShow, !filtering.value]
590
+ ]),
591
+ _ctx.filterable ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$8.ElScrollbar), {
592
+ key: 0,
593
+ ref_key: "suggestionPanel",
594
+ ref: suggestionPanel,
595
+ tag: "ul",
596
+ class: vue.normalizeClass(vue.unref(nsCascader).e("suggestion-panel")),
597
+ "view-class": vue.unref(nsCascader).e("suggestion-list"),
598
+ onKeydown: handleSuggestionKeyDown
599
+ }, {
600
+ default: vue.withCtx(() => [
601
+ suggestions.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(suggestions.value, (item) => {
602
+ return vue.openBlock(), vue.createElementBlock("li", {
603
+ key: item.uid,
604
+ class: vue.normalizeClass([
605
+ vue.unref(nsCascader).e("suggestion-item"),
606
+ vue.unref(nsCascader).is("checked", item.checked)
607
+ ]),
608
+ tabindex: -1,
609
+ onClick: ($event) => handleSuggestionClick(item)
610
+ }, [
611
+ vue.createElementVNode("span", null, vue.toDisplayString(item.text), 1),
612
+ item.checked ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), { key: 0 }, {
613
+ default: vue.withCtx(() => [
614
+ vue.createVNode(vue.unref(iconsVue.Check))
615
+ ]),
616
+ _: 1
617
+ })) : vue.createCommentVNode("v-if", true)
618
+ ], 10, _hoisted_3);
619
+ }), 128)) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
620
+ vue.createElementVNode("li", {
621
+ class: vue.normalizeClass(vue.unref(nsCascader).e("empty-text"))
622
+ }, vue.toDisplayString(vue.unref(t)("el.cascader.noMatch")), 3)
623
+ ])
624
+ ]),
625
+ _: 3
626
+ }, 8, ["class", "view-class"])), [
627
+ [vue.vShow, filtering.value]
628
+ ]) : vue.createCommentVNode("v-if", true)
629
+ ]),
630
+ _: 3
631
+ }, 8, ["visible", "teleported", "popper-class", "transition"]);
632
+ };
64
633
  }
65
634
  });
66
- const cascaderEmits = {
67
- [event.UPDATE_MODEL_EVENT]: (val) => !!val || val === null,
68
- [event.CHANGE_EVENT]: (val) => !!val || val === null,
69
- focus: (evt) => evt instanceof FocusEvent,
70
- blur: (evt) => evt instanceof FocusEvent,
71
- visibleChange: (val) => types.isBoolean(val),
72
- expandChange: (val) => !!val,
73
- removeTag: (val) => !!val
74
- };
635
+ var Cascader = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "cascader.vue"]]);
75
636
 
76
- exports.cascaderEmits = cascaderEmits;
77
- exports.cascaderProps = cascaderProps;
637
+ exports["default"] = Cascader;
78
638
  //# sourceMappingURL=cascader2.js.map