@element-plus/nightly 0.0.20241112 → 0.0.20241113

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