@element-plus/nightly 0.0.20251226 → 0.0.20251227

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 (394) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/affix/index.mjs +2 -2
  276. package/es/components/affix/src/affix.mjs +29 -153
  277. package/es/components/affix/src/affix.mjs.map +1 -1
  278. package/es/components/affix/src/affix2.mjs +153 -29
  279. package/es/components/affix/src/affix2.mjs.map +1 -1
  280. package/es/components/autocomplete/index.mjs +2 -2
  281. package/es/components/autocomplete/src/autocomplete.mjs +485 -59
  282. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  283. package/es/components/autocomplete/src/autocomplete2.mjs +59 -485
  284. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  285. package/es/components/calendar/src/calendar2.mjs +1 -1
  286. package/es/components/calendar/src/select-controller.mjs +95 -12
  287. package/es/components/calendar/src/select-controller.mjs.map +1 -1
  288. package/es/components/calendar/src/select-controller2.mjs +12 -95
  289. package/es/components/calendar/src/select-controller2.mjs.map +1 -1
  290. package/es/components/cascader/index.mjs +2 -2
  291. package/es/components/cascader/src/cascader.mjs +822 -103
  292. package/es/components/cascader/src/cascader.mjs.map +1 -1
  293. package/es/components/cascader/src/cascader2.mjs +103 -822
  294. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  295. package/es/components/check-tag/index.mjs +2 -2
  296. package/es/components/check-tag/src/check-tag.mjs +43 -14
  297. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  298. package/es/components/check-tag/src/check-tag2.mjs +14 -43
  299. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  300. package/es/components/color-picker/index.mjs +2 -2
  301. package/es/components/color-picker/src/color-picker.mjs +53 -391
  302. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  303. package/es/components/color-picker/src/color-picker2.mjs +391 -53
  304. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  305. package/es/components/index.mjs +8 -8
  306. package/es/components/pagination/src/components/sizes.mjs +88 -25
  307. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  308. package/es/components/pagination/src/components/sizes2.mjs +25 -88
  309. package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
  310. package/es/components/pagination/src/pagination.mjs +1 -1
  311. package/es/components/radio/index.mjs +2 -2
  312. package/es/components/radio/src/radio-button.mjs +5 -79
  313. package/es/components/radio/src/radio-button.mjs.map +1 -1
  314. package/es/components/radio/src/radio-button2.mjs +79 -5
  315. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  316. package/es/components/radio/src/radio-group2.mjs +1 -1
  317. package/es/components/tour/index.mjs +1 -1
  318. package/es/components/tour/src/content.mjs +85 -42
  319. package/es/components/tour/src/content.mjs.map +1 -1
  320. package/es/components/tour/src/content2.mjs +42 -85
  321. package/es/components/tour/src/content2.mjs.map +1 -1
  322. package/es/components/tour/src/step.mjs +1 -1
  323. package/es/components/tour/src/tour.mjs +1 -1
  324. package/es/components/tour/src/tour2.mjs +1 -1
  325. package/es/components/watermark/index.mjs +2 -2
  326. package/es/components/watermark/src/watermark.mjs +247 -26
  327. package/es/components/watermark/src/watermark.mjs.map +1 -1
  328. package/es/components/watermark/src/watermark2.mjs +26 -247
  329. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  330. package/es/index.mjs +8 -8
  331. package/es/version.d.ts +1 -1
  332. package/es/version.mjs +1 -1
  333. package/es/version.mjs.map +1 -1
  334. package/lib/components/affix/index.js +2 -2
  335. package/lib/components/affix/src/affix.js +30 -153
  336. package/lib/components/affix/src/affix.js.map +1 -1
  337. package/lib/components/affix/src/affix2.js +153 -30
  338. package/lib/components/affix/src/affix2.js.map +1 -1
  339. package/lib/components/autocomplete/index.js +2 -2
  340. package/lib/components/autocomplete/src/autocomplete.js +483 -58
  341. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  342. package/lib/components/autocomplete/src/autocomplete2.js +58 -483
  343. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  344. package/lib/components/calendar/src/calendar2.js +1 -1
  345. package/lib/components/calendar/src/select-controller.js +98 -12
  346. package/lib/components/calendar/src/select-controller.js.map +1 -1
  347. package/lib/components/calendar/src/select-controller2.js +12 -98
  348. package/lib/components/calendar/src/select-controller2.js.map +1 -1
  349. package/lib/components/cascader/index.js +2 -2
  350. package/lib/components/cascader/src/cascader.js +821 -103
  351. package/lib/components/cascader/src/cascader.js.map +1 -1
  352. package/lib/components/cascader/src/cascader2.js +103 -821
  353. package/lib/components/cascader/src/cascader2.js.map +1 -1
  354. package/lib/components/check-tag/index.js +2 -2
  355. package/lib/components/check-tag/src/check-tag.js +43 -15
  356. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  357. package/lib/components/check-tag/src/check-tag2.js +15 -43
  358. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  359. package/lib/components/color-picker/index.js +2 -2
  360. package/lib/components/color-picker/src/color-picker.js +53 -390
  361. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  362. package/lib/components/color-picker/src/color-picker2.js +390 -53
  363. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  364. package/lib/components/index.js +8 -8
  365. package/lib/components/pagination/src/components/sizes.js +88 -25
  366. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  367. package/lib/components/pagination/src/components/sizes2.js +25 -88
  368. package/lib/components/pagination/src/components/sizes2.js.map +1 -1
  369. package/lib/components/pagination/src/pagination.js +1 -1
  370. package/lib/components/radio/index.js +2 -2
  371. package/lib/components/radio/src/radio-button.js +5 -79
  372. package/lib/components/radio/src/radio-button.js.map +1 -1
  373. package/lib/components/radio/src/radio-button2.js +79 -5
  374. package/lib/components/radio/src/radio-button2.js.map +1 -1
  375. package/lib/components/radio/src/radio-group2.js +1 -1
  376. package/lib/components/tour/index.js +1 -1
  377. package/lib/components/tour/src/content.js +85 -45
  378. package/lib/components/tour/src/content.js.map +1 -1
  379. package/lib/components/tour/src/content2.js +45 -85
  380. package/lib/components/tour/src/content2.js.map +1 -1
  381. package/lib/components/tour/src/step.js +1 -1
  382. package/lib/components/tour/src/tour.js +1 -1
  383. package/lib/components/tour/src/tour2.js +1 -1
  384. package/lib/components/watermark/index.js +2 -2
  385. package/lib/components/watermark/src/watermark.js +247 -26
  386. package/lib/components/watermark/src/watermark.js.map +1 -1
  387. package/lib/components/watermark/src/watermark2.js +26 -247
  388. package/lib/components/watermark/src/watermark2.js.map +1 -1
  389. package/lib/index.js +8 -8
  390. package/lib/version.d.ts +1 -1
  391. package/lib/version.js +1 -1
  392. package/lib/version.js.map +1 -1
  393. package/package.json +2 -2
  394. package/web-types.json +1 -1
@@ -1,109 +1,828 @@
1
- import { placements } from '@popperjs/core';
2
- import { CircleClose } from '@element-plus/icons-vue';
3
- import { CommonProps } from '../../cascader-panel/src/config.mjs';
4
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
- import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
- import { iconPropType } from '../../../utils/vue/icon.mjs';
7
- import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
8
- import { tagProps } from '../../tag/src/tag.mjs';
9
- import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
1
+ import { defineComponent, useAttrs, ref, computed, watch, nextTick, onMounted, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, createVNode, createSlots, withModifiers, resolveDynamicComponent, renderSlot, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode, withKeys, vModelText, vShow } from 'vue';
2
+ import { cloneDeep } from 'lodash-unified';
3
+ import { useDebounceFn, useResizeObserver, isClient, useCssVar } from '@vueuse/core';
4
+ import { ElCascaderPanel } from '../../cascader-panel/index.mjs';
5
+ import { ElInput } from '../../input/index.mjs';
6
+ import { ElTooltip } from '../../tooltip/index.mjs';
7
+ import { ElScrollbar } from '../../scrollbar/index.mjs';
8
+ import { ElTag } from '../../tag/index.mjs';
9
+ import { ElIcon } from '../../icon/index.mjs';
10
+ import { ArrowDown, Check } from '@element-plus/icons-vue';
11
+ import { cascaderProps, cascaderEmits } from './cascader2.mjs';
12
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
13
+ import ClickOutside from '../../../directives/click-outside/index.mjs';
14
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
15
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
16
+ import { useFormItem } from '../../form/src/hooks/use-form-item.mjs';
17
+ import { useFormDisabled, useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
18
+ import { useEmptyValues } from '../../../hooks/use-empty-values/index.mjs';
19
+ import { useComposition } from '../../../hooks/use-composition/index.mjs';
20
+ import { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
10
21
  import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
11
- import { isBoolean } from '../../../utils/types.mjs';
22
+ import { debugWarn } from '../../../utils/error.mjs';
23
+ import { isPromise } from '@vue/shared';
24
+ import { getEventCode } from '../../../utils/dom/event.mjs';
25
+ import { EVENT_CODE } from '../../../constants/aria.mjs';
26
+ import { focusNode, getSibling } from '../../../utils/dom/aria.mjs';
12
27
 
13
- const cascaderProps = buildProps({
14
- ...CommonProps,
15
- size: useSizeProp,
16
- placeholder: String,
17
- disabled: {
18
- type: Boolean,
19
- default: void 0
28
+ const _hoisted_1 = ["placeholder"];
29
+ const _hoisted_2 = ["onClick"];
30
+ const _sfc_main = defineComponent({
31
+ ...{
32
+ name: "ElCascader"
20
33
  },
21
- clearable: Boolean,
22
- clearIcon: {
23
- type: iconPropType,
24
- default: CircleClose
25
- },
26
- filterable: Boolean,
27
- filterMethod: {
28
- type: definePropType(
29
- Function
30
- ),
31
- default: (node, keyword) => node.text.includes(keyword)
32
- },
33
- separator: {
34
- type: String,
35
- default: " / "
36
- },
37
- showAllLevels: {
38
- type: Boolean,
39
- default: true
40
- },
41
- collapseTags: Boolean,
42
- maxCollapseTags: {
43
- type: Number,
44
- default: 1
45
- },
46
- collapseTagsTooltip: Boolean,
47
- maxCollapseTagsTooltipHeight: {
48
- type: [String, Number]
49
- },
50
- debounce: {
51
- type: Number,
52
- default: 300
53
- },
54
- beforeFilter: {
55
- type: definePropType(Function),
56
- default: () => true
57
- },
58
- placement: {
59
- type: definePropType(String),
60
- values: placements,
61
- default: "bottom-start"
62
- },
63
- fallbackPlacements: {
64
- type: definePropType(Array),
65
- default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
66
- },
67
- popperClass: useTooltipContentProps.popperClass,
68
- popperStyle: useTooltipContentProps.popperStyle,
69
- teleported: useTooltipContentProps.teleported,
70
- effect: {
71
- type: definePropType(String),
72
- default: "light"
73
- },
74
- tagType: { ...tagProps.type, default: "info" },
75
- tagEffect: { ...tagProps.effect, default: "light" },
76
- validateEvent: {
77
- type: Boolean,
78
- default: true
79
- },
80
- persistent: {
81
- type: Boolean,
82
- default: true
83
- },
84
- showCheckedStrategy: {
85
- type: String,
86
- values: ["parent", "child"],
87
- default: "child"
88
- },
89
- checkOnClickNode: Boolean,
90
- showPrefix: {
91
- type: Boolean,
92
- default: true
93
- },
94
- ...useEmptyValuesProps
34
+ __name: "cascader",
35
+ props: cascaderProps,
36
+ emits: cascaderEmits,
37
+ setup(__props, { expose: __expose, emit: __emit }) {
38
+ const popperOptions = {
39
+ modifiers: [
40
+ {
41
+ name: "arrowPosition",
42
+ enabled: true,
43
+ phase: "main",
44
+ fn: ({ state }) => {
45
+ const { modifiersData, placement } = state;
46
+ if (["right", "left", "bottom", "top"].includes(placement))
47
+ return;
48
+ if (modifiersData.arrow) {
49
+ modifiersData.arrow.x = 35;
50
+ }
51
+ },
52
+ requires: ["arrow"]
53
+ }
54
+ ]
55
+ };
56
+ const props = __props;
57
+ const emit = __emit;
58
+ const attrs = useAttrs();
59
+ let inputInitialHeight = 0;
60
+ let pressDeleteCount = 0;
61
+ const nsCascader = useNamespace("cascader");
62
+ const nsInput = useNamespace("input");
63
+ const { t } = useLocale();
64
+ const { formItem } = useFormItem();
65
+ const isDisabled = useFormDisabled();
66
+ const { valueOnClear } = useEmptyValues(props);
67
+ const { isComposing, handleComposition } = useComposition({
68
+ afterComposition(event) {
69
+ var _a;
70
+ const text = (_a = event.target) == null ? void 0 : _a.value;
71
+ handleInput(text);
72
+ }
73
+ });
74
+ const tooltipRef = ref();
75
+ const tagTooltipRef = ref();
76
+ const inputRef = ref();
77
+ const tagWrapper = ref();
78
+ const cascaderPanelRef = ref();
79
+ const suggestionPanel = ref();
80
+ const popperVisible = ref(false);
81
+ const inputHover = ref(false);
82
+ const filtering = ref(false);
83
+ const inputValue = ref("");
84
+ const searchInputValue = ref("");
85
+ const tags = ref([]);
86
+ const suggestions = ref([]);
87
+ const showTagList = computed(() => {
88
+ if (!props.props.multiple) {
89
+ return [];
90
+ }
91
+ return props.collapseTags ? tags.value.slice(0, props.maxCollapseTags) : tags.value;
92
+ });
93
+ const collapseTagList = computed(() => {
94
+ if (!props.props.multiple) {
95
+ return [];
96
+ }
97
+ return props.collapseTags ? tags.value.slice(props.maxCollapseTags) : [];
98
+ });
99
+ const cascaderStyle = computed(() => {
100
+ return attrs.style;
101
+ });
102
+ const inputPlaceholder = computed(
103
+ () => {
104
+ var _a;
105
+ return (_a = props.placeholder) != null ? _a : t("el.cascader.placeholder");
106
+ }
107
+ );
108
+ const currentPlaceholder = computed(
109
+ () => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value
110
+ );
111
+ const realSize = useFormSize();
112
+ const tagSize = computed(
113
+ () => realSize.value === "small" ? "small" : "default"
114
+ );
115
+ const multiple = computed(() => !!props.props.multiple);
116
+ const readonly = computed(() => !props.filterable || multiple.value);
117
+ const searchKeyword = computed(
118
+ () => multiple.value ? searchInputValue.value : inputValue.value
119
+ );
120
+ const checkedNodes = computed(
121
+ () => {
122
+ var _a;
123
+ return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || [];
124
+ }
125
+ );
126
+ const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
127
+ disabled: isDisabled,
128
+ beforeBlur(event) {
129
+ var _a, _b;
130
+ return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event));
131
+ },
132
+ afterBlur() {
133
+ var _a;
134
+ if (props.validateEvent) {
135
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
136
+ }
137
+ }
138
+ });
139
+ const clearBtnVisible = computed(() => {
140
+ if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value)
141
+ return false;
142
+ return !!checkedNodes.value.length;
143
+ });
144
+ const presentText = computed(() => {
145
+ const { showAllLevels, separator } = props;
146
+ const nodes = checkedNodes.value;
147
+ return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
148
+ });
149
+ const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
150
+ const checkedValue = computed({
151
+ get() {
152
+ return cloneDeep(props.modelValue);
153
+ },
154
+ set(val) {
155
+ const value = val != null ? val : valueOnClear.value;
156
+ emit(UPDATE_MODEL_EVENT, value);
157
+ emit(CHANGE_EVENT, value);
158
+ if (props.validateEvent) {
159
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
160
+ }
161
+ }
162
+ });
163
+ const cascaderKls = computed(() => {
164
+ return [
165
+ nsCascader.b(),
166
+ nsCascader.m(realSize.value),
167
+ nsCascader.is("disabled", isDisabled.value),
168
+ attrs.class
169
+ ];
170
+ });
171
+ const cascaderIconKls = computed(() => {
172
+ return [
173
+ nsInput.e("icon"),
174
+ "icon-arrow-down",
175
+ nsCascader.is("reverse", popperVisible.value)
176
+ ];
177
+ });
178
+ const inputClass = computed(() => nsCascader.is("focus", isFocused.value));
179
+ const contentRef = computed(() => {
180
+ var _a, _b;
181
+ return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
182
+ });
183
+ const handleClickOutside = (event) => {
184
+ if (isFocused.value) {
185
+ const _event = new FocusEvent("blur", event);
186
+ handleBlur(_event);
187
+ }
188
+ togglePopperVisible(false);
189
+ };
190
+ const togglePopperVisible = (visible) => {
191
+ var _a, _b;
192
+ if (isDisabled.value)
193
+ return;
194
+ visible = visible != null ? visible : !popperVisible.value;
195
+ if (visible !== popperVisible.value) {
196
+ popperVisible.value = visible;
197
+ (_b = (_a = inputRef.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
198
+ if (visible) {
199
+ updatePopperPosition();
200
+ cascaderPanelRef.value && nextTick(cascaderPanelRef.value.scrollToExpandingNode);
201
+ } else if (props.filterable) {
202
+ syncPresentTextValue();
203
+ }
204
+ emit("visibleChange", visible);
205
+ }
206
+ };
207
+ const updatePopperPosition = () => {
208
+ nextTick(() => {
209
+ var _a;
210
+ (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
211
+ });
212
+ };
213
+ const hideSuggestionPanel = () => {
214
+ filtering.value = false;
215
+ };
216
+ const genTag = (node) => {
217
+ const { showAllLevels, separator } = props;
218
+ return {
219
+ node,
220
+ key: node.uid,
221
+ text: node.calcText(showAllLevels, separator),
222
+ hitState: false,
223
+ closable: !isDisabled.value && !node.isDisabled
224
+ };
225
+ };
226
+ const deleteTag = (tag) => {
227
+ var _a;
228
+ const node = tag.node;
229
+ node.doCheck(false);
230
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue();
231
+ emit("removeTag", node.valueByOption);
232
+ };
233
+ const getStrategyCheckedNodes = () => {
234
+ switch (props.showCheckedStrategy) {
235
+ case "child":
236
+ return checkedNodes.value;
237
+ case "parent": {
238
+ const clickedNodes = getCheckedNodes(false);
239
+ const clickedNodesValue = clickedNodes.map((o) => o.value);
240
+ const parentNodes = clickedNodes.filter(
241
+ (o) => !o.parent || !clickedNodesValue.includes(o.parent.value)
242
+ );
243
+ return parentNodes;
244
+ }
245
+ default:
246
+ return [];
247
+ }
248
+ };
249
+ const calculatePresentTags = () => {
250
+ if (!multiple.value)
251
+ return;
252
+ const nodes = getStrategyCheckedNodes();
253
+ const allTags = [];
254
+ nodes.forEach((node) => allTags.push(genTag(node)));
255
+ tags.value = allTags;
256
+ };
257
+ const calculateSuggestions = () => {
258
+ var _a, _b;
259
+ const { filterMethod, showAllLevels, separator } = props;
260
+ const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
261
+ if (node.isDisabled)
262
+ return false;
263
+ node.calcText(showAllLevels, separator);
264
+ return filterMethod(node, searchKeyword.value);
265
+ });
266
+ if (multiple.value) {
267
+ tags.value.forEach((tag) => {
268
+ tag.hitState = false;
269
+ });
270
+ }
271
+ filtering.value = true;
272
+ suggestions.value = res;
273
+ updatePopperPosition();
274
+ };
275
+ const focusFirstNode = () => {
276
+ var _a;
277
+ let firstNode;
278
+ if (filtering.value && suggestionPanel.value) {
279
+ firstNode = suggestionPanel.value.$el.querySelector(
280
+ `.${nsCascader.e("suggestion-item")}`
281
+ );
282
+ } else {
283
+ firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector(
284
+ `.${nsCascader.b("node")}[tabindex="-1"]`
285
+ );
286
+ }
287
+ if (firstNode) {
288
+ firstNode.focus();
289
+ !filtering.value && firstNode.click();
290
+ }
291
+ };
292
+ const updateStyle = () => {
293
+ var _a, _b;
294
+ const inputInner = (_a = inputRef.value) == null ? void 0 : _a.input;
295
+ const tagWrapperEl = tagWrapper.value;
296
+ const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
297
+ if (!isClient || !inputInner)
298
+ return;
299
+ if (suggestionPanelEl) {
300
+ const suggestionList = suggestionPanelEl.querySelector(
301
+ `.${nsCascader.e("suggestion-list")}`
302
+ );
303
+ suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
304
+ }
305
+ if (tagWrapperEl) {
306
+ const { offsetHeight } = tagWrapperEl;
307
+ const height = tags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
308
+ inputInner.style.height = height;
309
+ updatePopperPosition();
310
+ }
311
+ };
312
+ const getCheckedNodes = (leafOnly) => {
313
+ var _a;
314
+ return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
315
+ };
316
+ const handleExpandChange = (value) => {
317
+ updatePopperPosition();
318
+ emit("expandChange", value);
319
+ };
320
+ const handleKeyDown = (e) => {
321
+ if (isComposing.value)
322
+ return;
323
+ const code = getEventCode(e);
324
+ switch (code) {
325
+ case EVENT_CODE.enter:
326
+ case EVENT_CODE.numpadEnter:
327
+ togglePopperVisible();
328
+ break;
329
+ case EVENT_CODE.down:
330
+ togglePopperVisible(true);
331
+ nextTick(focusFirstNode);
332
+ e.preventDefault();
333
+ break;
334
+ case EVENT_CODE.esc:
335
+ if (popperVisible.value === true) {
336
+ e.preventDefault();
337
+ e.stopPropagation();
338
+ togglePopperVisible(false);
339
+ }
340
+ break;
341
+ case EVENT_CODE.tab:
342
+ togglePopperVisible(false);
343
+ break;
344
+ }
345
+ };
346
+ const handleClear = () => {
347
+ var _a;
348
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes();
349
+ if (!popperVisible.value && props.filterable) {
350
+ syncPresentTextValue();
351
+ }
352
+ togglePopperVisible(false);
353
+ emit("clear");
354
+ };
355
+ const syncPresentTextValue = () => {
356
+ const { value } = presentText;
357
+ inputValue.value = value;
358
+ searchInputValue.value = value;
359
+ };
360
+ const handleSuggestionClick = (node) => {
361
+ var _a, _b;
362
+ const { checked } = node;
363
+ if (multiple.value) {
364
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
365
+ } else {
366
+ !checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
367
+ togglePopperVisible(false);
368
+ }
369
+ };
370
+ const handleSuggestionKeyDown = (e) => {
371
+ const target = e.target;
372
+ const code = getEventCode(e);
373
+ switch (code) {
374
+ case EVENT_CODE.up:
375
+ case EVENT_CODE.down: {
376
+ e.preventDefault();
377
+ const distance = code === EVENT_CODE.up ? -1 : 1;
378
+ focusNode(
379
+ getSibling(
380
+ target,
381
+ distance,
382
+ `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`
383
+ )
384
+ );
385
+ break;
386
+ }
387
+ case EVENT_CODE.enter:
388
+ case EVENT_CODE.numpadEnter:
389
+ target.click();
390
+ break;
391
+ }
392
+ };
393
+ const handleDelete = () => {
394
+ const lastTag = tags.value[tags.value.length - 1];
395
+ pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
396
+ if (!lastTag || !pressDeleteCount || props.collapseTags && tags.value.length > 1)
397
+ return;
398
+ if (lastTag.hitState) {
399
+ deleteTag(lastTag);
400
+ } else {
401
+ lastTag.hitState = true;
402
+ }
403
+ };
404
+ const debounce = computed(() => props.debounce);
405
+ const handleFilter = useDebounceFn(() => {
406
+ const { value } = searchKeyword;
407
+ if (!value)
408
+ return;
409
+ const passed = props.beforeFilter(value);
410
+ if (isPromise(passed)) {
411
+ passed.then(calculateSuggestions).catch(() => {
412
+ });
413
+ } else if (passed !== false) {
414
+ calculateSuggestions();
415
+ } else {
416
+ hideSuggestionPanel();
417
+ }
418
+ }, debounce);
419
+ const handleInput = (val, e) => {
420
+ !popperVisible.value && togglePopperVisible(true);
421
+ if (e == null ? void 0 : e.isComposing)
422
+ return;
423
+ val ? handleFilter() : hideSuggestionPanel();
424
+ };
425
+ const getInputInnerHeight = (inputInner) => Number.parseFloat(
426
+ useCssVar(nsInput.cssVarName("input-height"), inputInner).value
427
+ ) - 2;
428
+ const focus = () => {
429
+ var _a;
430
+ (_a = inputRef.value) == null ? void 0 : _a.focus();
431
+ };
432
+ const blur = () => {
433
+ var _a;
434
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
435
+ };
436
+ watch(filtering, updatePopperPosition);
437
+ watch(
438
+ [
439
+ checkedNodes,
440
+ isDisabled,
441
+ () => props.collapseTags,
442
+ () => props.maxCollapseTags
443
+ ],
444
+ calculatePresentTags
445
+ );
446
+ watch(tags, () => {
447
+ nextTick(() => updateStyle());
448
+ });
449
+ watch(realSize, async () => {
450
+ await nextTick();
451
+ const inputInner = inputRef.value.input;
452
+ inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
453
+ updateStyle();
454
+ });
455
+ watch(presentText, syncPresentTextValue, { immediate: true });
456
+ watch(
457
+ () => popperVisible.value,
458
+ (val) => {
459
+ var _a;
460
+ if (val && props.props.lazy && props.props.lazyLoad) {
461
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.loadLazyRootNodes();
462
+ }
463
+ }
464
+ );
465
+ onMounted(() => {
466
+ const inputInner = inputRef.value.input;
467
+ const inputInnerHeight = getInputInnerHeight(inputInner);
468
+ inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
469
+ useResizeObserver(inputInner, updateStyle);
470
+ });
471
+ __expose({
472
+ getCheckedNodes,
473
+ cascaderPanelRef,
474
+ togglePopperVisible,
475
+ contentRef,
476
+ presentText,
477
+ focus,
478
+ blur
479
+ });
480
+ return (_ctx, _cache) => {
481
+ return openBlock(), createBlock(unref(ElTooltip), {
482
+ ref_key: "tooltipRef",
483
+ ref: tooltipRef,
484
+ visible: popperVisible.value,
485
+ teleported: _ctx.teleported,
486
+ "popper-class": [unref(nsCascader).e("dropdown"), _ctx.popperClass],
487
+ "popper-style": _ctx.popperStyle,
488
+ "popper-options": popperOptions,
489
+ "fallback-placements": _ctx.fallbackPlacements,
490
+ "stop-popper-mouse-event": false,
491
+ "gpu-acceleration": false,
492
+ placement: _ctx.placement,
493
+ transition: `${unref(nsCascader).namespace.value}-zoom-in-top`,
494
+ effect: _ctx.effect,
495
+ pure: "",
496
+ persistent: _ctx.persistent,
497
+ onHide: hideSuggestionPanel
498
+ }, {
499
+ default: withCtx(() => [
500
+ withDirectives((openBlock(), createElementBlock(
501
+ "div",
502
+ {
503
+ ref_key: "wrapperRef",
504
+ ref: wrapperRef,
505
+ class: normalizeClass(cascaderKls.value),
506
+ style: normalizeStyle(cascaderStyle.value),
507
+ onClick: _cache[8] || (_cache[8] = () => togglePopperVisible(readonly.value ? void 0 : true)),
508
+ onKeydown: handleKeyDown,
509
+ onMouseenter: _cache[9] || (_cache[9] = ($event) => inputHover.value = true),
510
+ onMouseleave: _cache[10] || (_cache[10] = ($event) => inputHover.value = false)
511
+ },
512
+ [
513
+ createVNode(unref(ElInput), {
514
+ ref_key: "inputRef",
515
+ ref: inputRef,
516
+ modelValue: inputValue.value,
517
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
518
+ placeholder: currentPlaceholder.value,
519
+ readonly: readonly.value,
520
+ disabled: unref(isDisabled),
521
+ "validate-event": false,
522
+ size: unref(realSize),
523
+ class: normalizeClass(inputClass.value),
524
+ tabindex: multiple.value && _ctx.filterable && !unref(isDisabled) ? -1 : void 0,
525
+ onCompositionstart: unref(handleComposition),
526
+ onCompositionupdate: unref(handleComposition),
527
+ onCompositionend: unref(handleComposition),
528
+ onInput: handleInput
529
+ }, createSlots({
530
+ suffix: withCtx(() => [
531
+ clearBtnVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
532
+ key: "clear",
533
+ class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]),
534
+ onClick: withModifiers(handleClear, ["stop"])
535
+ }, {
536
+ default: withCtx(() => [
537
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
538
+ ]),
539
+ _: 1
540
+ }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
541
+ key: "arrow-down",
542
+ class: normalizeClass(cascaderIconKls.value),
543
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => togglePopperVisible(), ["stop"]))
544
+ }, {
545
+ default: withCtx(() => [
546
+ createVNode(unref(ArrowDown))
547
+ ]),
548
+ _: 1
549
+ }, 8, ["class"]))
550
+ ]),
551
+ _: 2
552
+ }, [
553
+ _ctx.$slots.prefix ? {
554
+ name: "prefix",
555
+ fn: withCtx(() => [
556
+ renderSlot(_ctx.$slots, "prefix")
557
+ ]),
558
+ key: "0"
559
+ } : void 0
560
+ ]), 1032, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
561
+ multiple.value ? (openBlock(), createElementBlock(
562
+ "div",
563
+ {
564
+ key: 0,
565
+ ref_key: "tagWrapper",
566
+ ref: tagWrapper,
567
+ class: normalizeClass([
568
+ unref(nsCascader).e("tags"),
569
+ unref(nsCascader).is("validate", Boolean(validateState.value))
570
+ ])
571
+ },
572
+ [
573
+ renderSlot(_ctx.$slots, "tag", {
574
+ data: tags.value,
575
+ deleteTag
576
+ }, () => [
577
+ (openBlock(true), createElementBlock(
578
+ Fragment,
579
+ null,
580
+ renderList(showTagList.value, (tag) => {
581
+ return openBlock(), createBlock(unref(ElTag), {
582
+ key: tag.key,
583
+ type: _ctx.tagType,
584
+ size: tagSize.value,
585
+ effect: _ctx.tagEffect,
586
+ hit: tag.hitState,
587
+ closable: tag.closable,
588
+ "disable-transitions": "",
589
+ onClose: ($event) => deleteTag(tag)
590
+ }, {
591
+ default: withCtx(() => [
592
+ createElementVNode(
593
+ "span",
594
+ null,
595
+ toDisplayString(tag.text),
596
+ 1
597
+ )
598
+ ]),
599
+ _: 2
600
+ }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]);
601
+ }),
602
+ 128
603
+ ))
604
+ ]),
605
+ _ctx.collapseTags && tags.value.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
606
+ key: 0,
607
+ ref_key: "tagTooltipRef",
608
+ ref: tagTooltipRef,
609
+ disabled: popperVisible.value || !_ctx.collapseTagsTooltip,
610
+ "fallback-placements": ["bottom", "top", "right", "left"],
611
+ placement: "bottom",
612
+ "popper-class": _ctx.popperClass,
613
+ "popper-style": _ctx.popperStyle,
614
+ effect: _ctx.effect,
615
+ persistent: _ctx.persistent
616
+ }, {
617
+ default: withCtx(() => [
618
+ createVNode(unref(ElTag), {
619
+ closable: false,
620
+ size: tagSize.value,
621
+ type: _ctx.tagType,
622
+ effect: _ctx.tagEffect,
623
+ "disable-transitions": ""
624
+ }, {
625
+ default: withCtx(() => [
626
+ createElementVNode(
627
+ "span",
628
+ {
629
+ class: normalizeClass(unref(nsCascader).e("tags-text"))
630
+ },
631
+ " + " + toDisplayString(tags.value.length - _ctx.maxCollapseTags),
632
+ 3
633
+ )
634
+ ]),
635
+ _: 1
636
+ }, 8, ["size", "type", "effect"])
637
+ ]),
638
+ content: withCtx(() => [
639
+ createVNode(unref(ElScrollbar), { "max-height": _ctx.maxCollapseTagsTooltipHeight }, {
640
+ default: withCtx(() => [
641
+ createElementVNode(
642
+ "div",
643
+ {
644
+ class: normalizeClass(unref(nsCascader).e("collapse-tags"))
645
+ },
646
+ [
647
+ (openBlock(true), createElementBlock(
648
+ Fragment,
649
+ null,
650
+ renderList(collapseTagList.value, (tag, idx) => {
651
+ return openBlock(), createElementBlock(
652
+ "div",
653
+ {
654
+ key: idx,
655
+ class: normalizeClass(unref(nsCascader).e("collapse-tag"))
656
+ },
657
+ [
658
+ (openBlock(), createBlock(unref(ElTag), {
659
+ key: tag.key,
660
+ class: "in-tooltip",
661
+ type: _ctx.tagType,
662
+ size: tagSize.value,
663
+ effect: _ctx.tagEffect,
664
+ hit: tag.hitState,
665
+ closable: tag.closable,
666
+ "disable-transitions": "",
667
+ onClose: ($event) => deleteTag(tag)
668
+ }, {
669
+ default: withCtx(() => [
670
+ createElementVNode(
671
+ "span",
672
+ null,
673
+ toDisplayString(tag.text),
674
+ 1
675
+ )
676
+ ]),
677
+ _: 2
678
+ }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
679
+ ],
680
+ 2
681
+ );
682
+ }),
683
+ 128
684
+ ))
685
+ ],
686
+ 2
687
+ )
688
+ ]),
689
+ _: 1
690
+ }, 8, ["max-height"])
691
+ ]),
692
+ _: 1
693
+ }, 8, ["disabled", "popper-class", "popper-style", "effect", "persistent"])) : createCommentVNode("v-if", true),
694
+ _ctx.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", {
695
+ key: 1,
696
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event),
697
+ type: "text",
698
+ class: normalizeClass(unref(nsCascader).e("search-input")),
699
+ placeholder: presentText.value ? "" : inputPlaceholder.value,
700
+ onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)),
701
+ onClick: _cache[4] || (_cache[4] = withModifiers(($event) => togglePopperVisible(true), ["stop"])),
702
+ onKeydown: withKeys(handleDelete, ["delete"]),
703
+ onCompositionstart: _cache[5] || (_cache[5] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
704
+ onCompositionupdate: _cache[6] || (_cache[6] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
705
+ onCompositionend: _cache[7] || (_cache[7] = (...args) => unref(handleComposition) && unref(handleComposition)(...args))
706
+ }, null, 42, _hoisted_1)), [
707
+ [vModelText, searchInputValue.value]
708
+ ]) : createCommentVNode("v-if", true)
709
+ ],
710
+ 2
711
+ )) : createCommentVNode("v-if", true)
712
+ ],
713
+ 38
714
+ )), [
715
+ [unref(ClickOutside), handleClickOutside, contentRef.value]
716
+ ])
717
+ ]),
718
+ content: withCtx(() => [
719
+ _ctx.$slots.header ? (openBlock(), createElementBlock(
720
+ "div",
721
+ {
722
+ key: 0,
723
+ class: normalizeClass(unref(nsCascader).e("header")),
724
+ onClick: _cache[11] || (_cache[11] = withModifiers(() => {
725
+ }, ["stop"]))
726
+ },
727
+ [
728
+ renderSlot(_ctx.$slots, "header")
729
+ ],
730
+ 2
731
+ )) : createCommentVNode("v-if", true),
732
+ withDirectives(createVNode(unref(ElCascaderPanel), {
733
+ ref_key: "cascaderPanelRef",
734
+ ref: cascaderPanelRef,
735
+ modelValue: checkedValue.value,
736
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => checkedValue.value = $event),
737
+ options: _ctx.options,
738
+ props: props.props,
739
+ border: false,
740
+ "render-label": _ctx.$slots.default,
741
+ onExpandChange: handleExpandChange,
742
+ onClose: _cache[13] || (_cache[13] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false)))
743
+ }, {
744
+ empty: withCtx(() => [
745
+ renderSlot(_ctx.$slots, "empty")
746
+ ]),
747
+ _: 3
748
+ }, 8, ["modelValue", "options", "props", "render-label"]), [
749
+ [vShow, !filtering.value]
750
+ ]),
751
+ _ctx.filterable ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), {
752
+ key: 1,
753
+ ref_key: "suggestionPanel",
754
+ ref: suggestionPanel,
755
+ tag: "ul",
756
+ class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
757
+ "view-class": unref(nsCascader).e("suggestion-list"),
758
+ onKeydown: handleSuggestionKeyDown
759
+ }, {
760
+ default: withCtx(() => [
761
+ suggestions.value.length ? (openBlock(true), createElementBlock(
762
+ Fragment,
763
+ { key: 0 },
764
+ renderList(suggestions.value, (item) => {
765
+ return openBlock(), createElementBlock("li", {
766
+ key: item.uid,
767
+ class: normalizeClass([
768
+ unref(nsCascader).e("suggestion-item"),
769
+ unref(nsCascader).is("checked", item.checked)
770
+ ]),
771
+ tabindex: -1,
772
+ onClick: ($event) => handleSuggestionClick(item)
773
+ }, [
774
+ renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [
775
+ createElementVNode(
776
+ "span",
777
+ null,
778
+ toDisplayString(item.text),
779
+ 1
780
+ ),
781
+ item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
782
+ default: withCtx(() => [
783
+ createVNode(unref(Check))
784
+ ]),
785
+ _: 1
786
+ })) : createCommentVNode("v-if", true)
787
+ ])
788
+ ], 10, _hoisted_2);
789
+ }),
790
+ 128
791
+ )) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
792
+ createElementVNode(
793
+ "li",
794
+ {
795
+ class: normalizeClass(unref(nsCascader).e("empty-text"))
796
+ },
797
+ toDisplayString(unref(t)("el.cascader.noMatch")),
798
+ 3
799
+ )
800
+ ])
801
+ ]),
802
+ _: 3
803
+ }, 8, ["class", "view-class"])), [
804
+ [vShow, filtering.value]
805
+ ]) : createCommentVNode("v-if", true),
806
+ _ctx.$slots.footer ? (openBlock(), createElementBlock(
807
+ "div",
808
+ {
809
+ key: 2,
810
+ class: normalizeClass(unref(nsCascader).e("footer")),
811
+ onClick: _cache[14] || (_cache[14] = withModifiers(() => {
812
+ }, ["stop"]))
813
+ },
814
+ [
815
+ renderSlot(_ctx.$slots, "footer")
816
+ ],
817
+ 2
818
+ )) : createCommentVNode("v-if", true)
819
+ ]),
820
+ _: 3
821
+ }, 8, ["visible", "teleported", "popper-class", "popper-style", "fallback-placements", "placement", "transition", "effect", "persistent"]);
822
+ };
823
+ }
95
824
  });
96
- const emitChangeFn = (value) => true;
97
- const cascaderEmits = {
98
- [UPDATE_MODEL_EVENT]: emitChangeFn,
99
- [CHANGE_EVENT]: emitChangeFn,
100
- focus: (evt) => evt instanceof FocusEvent,
101
- blur: (evt) => evt instanceof FocusEvent,
102
- clear: () => true,
103
- visibleChange: (val) => isBoolean(val),
104
- expandChange: (val) => !!val,
105
- removeTag: (val) => !!val
106
- };
825
+ var Cascader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader/src/cascader.vue"]]);
107
826
 
108
- export { cascaderEmits, cascaderProps };
827
+ export { Cascader as default };
109
828
  //# sourceMappingURL=cascader.mjs.map