@element-plus/nightly 0.0.20241113 → 0.0.20241114

Sign up to get free protection for your applications and to get access to all the features.
Files changed (408) hide show
  1. package/dist/index.full.js +129 -111
  2. package/dist/index.full.min.js +11 -11
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +11 -11
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +129 -111
  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/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/my.js +1 -1
  152. package/dist/locale/my.min.js +1 -1
  153. package/dist/locale/my.min.mjs +1 -1
  154. package/dist/locale/my.mjs +1 -1
  155. package/dist/locale/nb-no.js +1 -1
  156. package/dist/locale/nb-no.min.js +1 -1
  157. package/dist/locale/nb-no.min.mjs +1 -1
  158. package/dist/locale/nb-no.mjs +1 -1
  159. package/dist/locale/nl.js +1 -1
  160. package/dist/locale/nl.min.js +1 -1
  161. package/dist/locale/nl.min.mjs +1 -1
  162. package/dist/locale/nl.mjs +1 -1
  163. package/dist/locale/pa.js +1 -1
  164. package/dist/locale/pa.min.js +1 -1
  165. package/dist/locale/pa.min.mjs +1 -1
  166. package/dist/locale/pa.mjs +1 -1
  167. package/dist/locale/pl.js +1 -1
  168. package/dist/locale/pl.min.js +1 -1
  169. package/dist/locale/pl.min.mjs +1 -1
  170. package/dist/locale/pl.mjs +1 -1
  171. package/dist/locale/pt-br.js +1 -1
  172. package/dist/locale/pt-br.min.js +1 -1
  173. package/dist/locale/pt-br.min.mjs +1 -1
  174. package/dist/locale/pt-br.mjs +1 -1
  175. package/dist/locale/pt.js +1 -1
  176. package/dist/locale/pt.min.js +1 -1
  177. package/dist/locale/pt.min.mjs +1 -1
  178. package/dist/locale/pt.mjs +1 -1
  179. package/dist/locale/ro.js +1 -1
  180. package/dist/locale/ro.min.js +1 -1
  181. package/dist/locale/ro.min.mjs +1 -1
  182. package/dist/locale/ro.mjs +1 -1
  183. package/dist/locale/ru.js +1 -1
  184. package/dist/locale/ru.min.js +1 -1
  185. package/dist/locale/ru.min.mjs +1 -1
  186. package/dist/locale/ru.mjs +1 -1
  187. package/dist/locale/sk.js +1 -1
  188. package/dist/locale/sk.min.js +1 -1
  189. package/dist/locale/sk.min.mjs +1 -1
  190. package/dist/locale/sk.mjs +1 -1
  191. package/dist/locale/sl.js +1 -1
  192. package/dist/locale/sl.min.js +1 -1
  193. package/dist/locale/sl.min.mjs +1 -1
  194. package/dist/locale/sl.mjs +1 -1
  195. package/dist/locale/sr.js +1 -1
  196. package/dist/locale/sr.min.js +1 -1
  197. package/dist/locale/sr.min.mjs +1 -1
  198. package/dist/locale/sr.mjs +1 -1
  199. package/dist/locale/sv.js +1 -1
  200. package/dist/locale/sv.min.js +1 -1
  201. package/dist/locale/sv.min.mjs +1 -1
  202. package/dist/locale/sv.mjs +1 -1
  203. package/dist/locale/sw.js +1 -1
  204. package/dist/locale/sw.min.js +1 -1
  205. package/dist/locale/sw.min.mjs +1 -1
  206. package/dist/locale/sw.mjs +1 -1
  207. package/dist/locale/ta.js +1 -1
  208. package/dist/locale/ta.min.js +1 -1
  209. package/dist/locale/ta.min.mjs +1 -1
  210. package/dist/locale/ta.mjs +1 -1
  211. package/dist/locale/th.js +1 -1
  212. package/dist/locale/th.min.js +1 -1
  213. package/dist/locale/th.min.mjs +1 -1
  214. package/dist/locale/th.mjs +1 -1
  215. package/dist/locale/tk.js +1 -1
  216. package/dist/locale/tk.min.js +1 -1
  217. package/dist/locale/tk.min.mjs +1 -1
  218. package/dist/locale/tk.mjs +1 -1
  219. package/dist/locale/tr.js +1 -1
  220. package/dist/locale/tr.min.js +1 -1
  221. package/dist/locale/tr.min.mjs +1 -1
  222. package/dist/locale/tr.mjs +1 -1
  223. package/dist/locale/ug-cn.js +1 -1
  224. package/dist/locale/ug-cn.min.js +1 -1
  225. package/dist/locale/ug-cn.min.mjs +1 -1
  226. package/dist/locale/ug-cn.mjs +1 -1
  227. package/dist/locale/uk.js +1 -1
  228. package/dist/locale/uk.min.js +1 -1
  229. package/dist/locale/uk.min.mjs +1 -1
  230. package/dist/locale/uk.mjs +1 -1
  231. package/dist/locale/uz-uz.js +1 -1
  232. package/dist/locale/uz-uz.min.js +1 -1
  233. package/dist/locale/uz-uz.min.mjs +1 -1
  234. package/dist/locale/uz-uz.mjs +1 -1
  235. package/dist/locale/vi.js +1 -1
  236. package/dist/locale/vi.min.js +1 -1
  237. package/dist/locale/vi.min.mjs +1 -1
  238. package/dist/locale/vi.mjs +1 -1
  239. package/dist/locale/zh-cn.js +1 -1
  240. package/dist/locale/zh-cn.min.js +1 -1
  241. package/dist/locale/zh-cn.min.mjs +1 -1
  242. package/dist/locale/zh-cn.mjs +1 -1
  243. package/dist/locale/zh-tw.js +1 -1
  244. package/dist/locale/zh-tw.min.js +1 -1
  245. package/dist/locale/zh-tw.min.mjs +1 -1
  246. package/dist/locale/zh-tw.mjs +1 -1
  247. package/es/components/carousel/index.mjs +2 -2
  248. package/es/components/carousel/src/carousel-item.mjs +8 -70
  249. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  250. package/es/components/carousel/src/carousel-item2.mjs +70 -8
  251. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  252. package/es/components/cascader/index.mjs +2 -2
  253. package/es/components/cascader/src/cascader.mjs +83 -627
  254. package/es/components/cascader/src/cascader.mjs.map +1 -1
  255. package/es/components/cascader/src/cascader2.mjs +629 -83
  256. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  257. package/es/components/cascader-panel/src/index.mjs +1 -0
  258. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  259. package/es/components/collapse/index.mjs +2 -2
  260. package/es/components/collapse/src/collapse.mjs +18 -28
  261. package/es/components/collapse/src/collapse.mjs.map +1 -1
  262. package/es/components/collapse/src/collapse2.mjs +28 -18
  263. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  264. package/es/components/color-picker/src/color-picker2.mjs +1 -0
  265. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  266. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -3
  267. package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
  268. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  269. package/es/components/dropdown/src/dropdown2.mjs +7 -2
  270. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  271. package/es/components/dropdown/src/useDropdown.mjs +1 -1
  272. package/es/components/dropdown/src/useDropdown.mjs.map +1 -1
  273. package/es/components/focus-trap/src/focus-trap.mjs +2 -2
  274. package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
  275. package/es/components/index.mjs +5 -5
  276. package/es/components/mention/src/mention2.mjs +51 -45
  277. package/es/components/mention/src/mention2.mjs.map +1 -1
  278. package/es/components/menu/src/utils/menu-item.mjs +1 -0
  279. package/es/components/menu/src/utils/menu-item.mjs.map +1 -1
  280. package/es/components/menu/src/utils/submenu.mjs +1 -0
  281. package/es/components/menu/src/utils/submenu.mjs.map +1 -1
  282. package/es/components/pagination/src/components/next.mjs +36 -19
  283. package/es/components/pagination/src/components/next.mjs.map +1 -1
  284. package/es/components/pagination/src/components/next2.mjs +19 -36
  285. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  286. package/es/components/pagination/src/pagination.mjs +1 -1
  287. package/es/components/roving-focus-group/index.mjs +3 -3
  288. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  289. package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
  290. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  291. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
  292. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  293. package/es/components/roving-focus-group/src/roving-focus-item.mjs +3 -3
  294. package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
  295. package/es/components/roving-focus-group/src/utils.mjs +1 -1
  296. package/es/components/roving-focus-group/src/utils.mjs.map +1 -1
  297. package/es/components/scrollbar/index.mjs +2 -2
  298. package/es/components/scrollbar/src/scrollbar.mjs +55 -171
  299. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  300. package/es/components/scrollbar/src/scrollbar2.mjs +171 -55
  301. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  302. package/es/components/segmented/index.mjs +2 -2
  303. package/es/components/segmented/src/segmented.mjs +34 -169
  304. package/es/components/segmented/src/segmented.mjs.map +1 -1
  305. package/es/components/segmented/src/segmented2.mjs +169 -34
  306. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  307. package/es/components/select-v2/src/select-dropdown.mjs +7 -9
  308. package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
  309. package/es/components/select-v2/src/useSelect.mjs +2 -1
  310. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  311. package/es/components/slider/src/composables/use-slider-button.mjs +24 -15
  312. package/es/components/slider/src/composables/use-slider-button.mjs.map +1 -1
  313. package/es/components/tabs/src/tab-nav.mjs +21 -25
  314. package/es/components/tabs/src/tab-nav.mjs.map +1 -1
  315. package/es/components/tabs/src/tabs.mjs +1 -1
  316. package/es/components/tabs/src/tabs.mjs.map +1 -1
  317. package/es/components/tooltip/src/trigger.mjs +1 -1
  318. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  319. package/es/components/tree/src/model/useKeydown.mjs +1 -1
  320. package/es/components/tree/src/model/useKeydown.mjs.map +1 -1
  321. package/es/hooks/use-escape-keydown/index.mjs +2 -3
  322. package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
  323. package/es/index.mjs +5 -5
  324. package/es/version.d.ts +1 -1
  325. package/es/version.mjs +1 -1
  326. package/es/version.mjs.map +1 -1
  327. package/lib/components/carousel/index.js +2 -2
  328. package/lib/components/carousel/src/carousel-item.js +8 -70
  329. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  330. package/lib/components/carousel/src/carousel-item2.js +70 -8
  331. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  332. package/lib/components/cascader/index.js +2 -2
  333. package/lib/components/cascader/src/cascader.js +84 -627
  334. package/lib/components/cascader/src/cascader.js.map +1 -1
  335. package/lib/components/cascader/src/cascader2.js +629 -84
  336. package/lib/components/cascader/src/cascader2.js.map +1 -1
  337. package/lib/components/cascader-panel/src/index.js +1 -0
  338. package/lib/components/cascader-panel/src/index.js.map +1 -1
  339. package/lib/components/collapse/index.js +2 -2
  340. package/lib/components/collapse/src/collapse.js +20 -28
  341. package/lib/components/collapse/src/collapse.js.map +1 -1
  342. package/lib/components/collapse/src/collapse2.js +28 -20
  343. package/lib/components/collapse/src/collapse2.js.map +1 -1
  344. package/lib/components/color-picker/src/color-picker2.js +1 -0
  345. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  346. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -3
  347. package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
  348. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  349. package/lib/components/dropdown/src/dropdown2.js +7 -2
  350. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  351. package/lib/components/dropdown/src/useDropdown.js +1 -1
  352. package/lib/components/dropdown/src/useDropdown.js.map +1 -1
  353. package/lib/components/focus-trap/src/focus-trap.js +2 -2
  354. package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
  355. package/lib/components/index.js +5 -5
  356. package/lib/components/mention/src/mention2.js +51 -45
  357. package/lib/components/mention/src/mention2.js.map +1 -1
  358. package/lib/components/menu/src/utils/menu-item.js +1 -0
  359. package/lib/components/menu/src/utils/menu-item.js.map +1 -1
  360. package/lib/components/menu/src/utils/submenu.js +1 -0
  361. package/lib/components/menu/src/utils/submenu.js.map +1 -1
  362. package/lib/components/pagination/src/components/next.js +36 -19
  363. package/lib/components/pagination/src/components/next.js.map +1 -1
  364. package/lib/components/pagination/src/components/next2.js +19 -36
  365. package/lib/components/pagination/src/components/next2.js.map +1 -1
  366. package/lib/components/pagination/src/pagination.js +1 -1
  367. package/lib/components/roving-focus-group/index.js +2 -2
  368. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  369. package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
  370. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  371. package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
  372. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  373. package/lib/components/roving-focus-group/src/roving-focus-item.js +3 -3
  374. package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
  375. package/lib/components/roving-focus-group/src/utils.js +1 -1
  376. package/lib/components/roving-focus-group/src/utils.js.map +1 -1
  377. package/lib/components/scrollbar/index.js +2 -2
  378. package/lib/components/scrollbar/src/scrollbar.js +56 -171
  379. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  380. package/lib/components/scrollbar/src/scrollbar2.js +171 -56
  381. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  382. package/lib/components/segmented/index.js +2 -2
  383. package/lib/components/segmented/src/segmented.js +34 -168
  384. package/lib/components/segmented/src/segmented.js.map +1 -1
  385. package/lib/components/segmented/src/segmented2.js +168 -34
  386. package/lib/components/segmented/src/segmented2.js.map +1 -1
  387. package/lib/components/select-v2/src/select-dropdown.js +7 -9
  388. package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
  389. package/lib/components/select-v2/src/useSelect.js +2 -1
  390. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  391. package/lib/components/slider/src/composables/use-slider-button.js +24 -15
  392. package/lib/components/slider/src/composables/use-slider-button.js.map +1 -1
  393. package/lib/components/tabs/src/tab-nav.js +21 -25
  394. package/lib/components/tabs/src/tab-nav.js.map +1 -1
  395. package/lib/components/tabs/src/tabs.js +1 -1
  396. package/lib/components/tabs/src/tabs.js.map +1 -1
  397. package/lib/components/tooltip/src/trigger.js +1 -1
  398. package/lib/components/tooltip/src/trigger.js.map +1 -1
  399. package/lib/components/tree/src/model/useKeydown.js +1 -1
  400. package/lib/components/tree/src/model/useKeydown.js.map +1 -1
  401. package/lib/hooks/use-escape-keydown/index.js +2 -3
  402. package/lib/hooks/use-escape-keydown/index.js.map +1 -1
  403. package/lib/index.js +5 -5
  404. package/lib/version.d.ts +1 -1
  405. package/lib/version.js +1 -1
  406. package/lib/version.js.map +1 -1
  407. package/package.json +2 -2
  408. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cascader2.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { CommonProps } from '@element-plus/components/cascader-panel'\nimport { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { useEmptyValuesProps, useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type {\n CascaderNode,\n CascaderValue,\n} from '@element-plus/components/cascader-panel'\nimport type { Placement } from '@element-plus/components/popper'\n\nexport const cascaderProps = buildProps({\n ...CommonProps,\n /**\n * @description size of input\n */\n size: useSizeProp,\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description whether Cascader is disabled\n */\n disabled: Boolean,\n /**\n * @description whether selected value can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether the options can be searched\n */\n filterable: Boolean,\n /**\n * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.\n */\n filterMethod: {\n type: definePropType<(node: CascaderNode, keyword: string) => boolean>(\n Function\n ),\n default: (node: CascaderNode, keyword: string) =>\n node.text.includes(keyword),\n },\n /**\n * @description option label separator\n */\n separator: {\n type: String,\n default: ' / ',\n },\n /**\n * @description whether to display all levels of the selected value in the input\n */\n showAllLevels: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to collapse tags in multiple selection mode\n */\n collapseTags: Boolean,\n /**\n * @description The max tags number to be shown. To use this, collapse-tags must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description native input id\n */\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n /**\n * @description debounce delay when typing filter keyword, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted\n */\n beforeFilter: {\n type: definePropType<(value: string) => boolean | Promise<any>>(Function),\n default: () => true,\n },\n /**\n * @description position of dropdown\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'bottom-start',\n },\n /**\n * @description list of possible positions for dropdown\n */\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: ['bottom-start', 'bottom', 'top-start', 'top', 'right', 'left'],\n },\n /**\n * @description custom class name for Cascader's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether cascader popup is teleported\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n ...useEmptyValuesProps,\n})\n\nexport const cascaderEmits = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [UPDATE_MODEL_EVENT]: (_: CascaderValue) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [CHANGE_EVENT]: (_: CascaderValue) => true,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n visibleChange: (val: boolean) => isBoolean(val),\n expandChange: (val: CascaderValue) => !!val,\n removeTag: (val: CascaderNode['valueByOption']) => !!val,\n}\n\n// Type name is taken(cascader-panel/src/node), needs discussion\n// export type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport type CascaderEmits = typeof cascaderEmits\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,GAAG,WAAW;AAChB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC3D,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,YAAY,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AAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,aAAa,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC;AACxC,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC9B,EAAE,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC3B;;;;"}
1
+ {"version":3,"file":"cascader2.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"popperVisible\"\n :teleported=\"teleported\"\n :popper-class=\"[nsCascader.e('dropdown'), popperClass]\"\n :popper-options=\"popperOptions\"\n :fallback-placements=\"fallbackPlacements\"\n :stop-popper-mouse-event=\"false\"\n :gpu-acceleration=\"false\"\n :placement=\"placement\"\n :transition=\"`${nsCascader.namespace.value}-zoom-in-top`\"\n effect=\"light\"\n pure\n :persistent=\"persistent\"\n @hide=\"hideSuggestionPanel\"\n >\n <template #default>\n <div\n v-clickoutside:[contentRef]=\"() => togglePopperVisible(false)\"\n :class=\"cascaderKls\"\n :style=\"cascaderStyle\"\n @click=\"() => togglePopperVisible(readonly ? undefined : true)\"\n @keydown=\"handleKeyDown\"\n @mouseenter=\"inputHover = true\"\n @mouseleave=\"inputHover = false\"\n >\n <el-input\n ref=\"input\"\n v-model=\"inputValue\"\n :placeholder=\"currentPlaceholder\"\n :readonly=\"readonly\"\n :disabled=\"isDisabled\"\n :validate-event=\"false\"\n :size=\"realSize\"\n :class=\"inputClass\"\n :tabindex=\"multiple && filterable && !isDisabled ? -1 : undefined\"\n @compositionstart=\"handleComposition\"\n @compositionupdate=\"handleComposition\"\n @compositionend=\"handleComposition\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @input=\"handleInput\"\n >\n <template #suffix>\n <el-icon\n v-if=\"clearBtnVisible\"\n key=\"clear\"\n :class=\"[nsInput.e('icon'), 'icon-circle-close']\"\n @click.stop=\"handleClear\"\n >\n <circle-close />\n </el-icon>\n <el-icon\n v-else\n key=\"arrow-down\"\n :class=\"cascaderIconKls\"\n @click.stop=\"togglePopperVisible()\"\n >\n <arrow-down />\n </el-icon>\n </template>\n </el-input>\n\n <div\n v-if=\"multiple\"\n ref=\"tagWrapper\"\n :class=\"[\n nsCascader.e('tags'),\n nsCascader.is('validate', Boolean(validateState)),\n ]\"\n >\n <el-tag\n v-for=\"tag in presentTags\"\n :key=\"tag.key\"\n :type=\"tagType\"\n :size=\"tagSize\"\n :effect=\"tagEffect\"\n :hit=\"tag.hitState\"\n :closable=\"tag.closable\"\n disable-transitions\n @close=\"deleteTag(tag)\"\n >\n <template v-if=\"tag.isCollapseTag === false\">\n <span>{{ tag.text }}</span>\n </template>\n <template v-else>\n <el-tooltip\n :disabled=\"popperVisible || !collapseTagsTooltip\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n placement=\"bottom\"\n effect=\"light\"\n >\n <template #default>\n <span>{{ tag.text }}</span>\n </template>\n <template #content>\n <div :class=\"nsCascader.e('collapse-tags')\">\n <div\n v-for=\"(tag2, idx) in allPresentTags.slice(\n maxCollapseTags\n )\"\n :key=\"idx\"\n :class=\"nsCascader.e('collapse-tag')\"\n >\n <el-tag\n :key=\"tag2.key\"\n class=\"in-tooltip\"\n :type=\"tagType\"\n :size=\"tagSize\"\n :effect=\"tagEffect\"\n :hit=\"tag2.hitState\"\n :closable=\"tag2.closable\"\n disable-transitions\n @close=\"deleteTag(tag2)\"\n >\n <span>{{ tag2.text }}</span>\n </el-tag>\n </div>\n </div>\n </template>\n </el-tooltip>\n </template>\n </el-tag>\n <input\n v-if=\"filterable && !isDisabled\"\n v-model=\"searchInputValue\"\n type=\"text\"\n :class=\"nsCascader.e('search-input')\"\n :placeholder=\"presentText ? '' : inputPlaceholder\"\n @input=\"(e) => handleInput(searchInputValue, e as KeyboardEvent)\"\n @click.stop=\"togglePopperVisible(true)\"\n @keydown.delete=\"handleDelete\"\n @compositionstart=\"handleComposition\"\n @compositionupdate=\"handleComposition\"\n @compositionend=\"handleComposition\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n </div>\n </div>\n </template>\n\n <template #content>\n <el-cascader-panel\n v-show=\"!filtering\"\n ref=\"cascaderPanelRef\"\n v-model=\"checkedValue\"\n :options=\"options\"\n :props=\"props.props\"\n :border=\"false\"\n :render-label=\"$slots.default\"\n @expand-change=\"handleExpandChange\"\n @close=\"$nextTick(() => togglePopperVisible(false))\"\n >\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </el-cascader-panel>\n <el-scrollbar\n v-if=\"filterable\"\n v-show=\"filtering\"\n ref=\"suggestionPanel\"\n tag=\"ul\"\n :class=\"nsCascader.e('suggestion-panel')\"\n :view-class=\"nsCascader.e('suggestion-list')\"\n @keydown=\"handleSuggestionKeyDown\"\n >\n <template v-if=\"suggestions.length\">\n <li\n v-for=\"item in suggestions\"\n :key=\"item.uid\"\n :class=\"[\n nsCascader.e('suggestion-item'),\n nsCascader.is('checked', item.checked),\n ]\"\n :tabindex=\"-1\"\n @click=\"handleSuggestionClick(item)\"\n >\n <span>{{ item.text }}</span>\n <el-icon v-if=\"item.checked\">\n <check />\n </el-icon>\n </li>\n </template>\n <slot v-else name=\"empty\">\n <li :class=\"nsCascader.e('empty-text')\">\n {{ t('el.cascader.noMatch') }}\n </li>\n </slot>\n </el-scrollbar>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, useAttrs, watch } from 'vue'\nimport { cloneDeep, debounce } from 'lodash-unified'\nimport { useCssVar, useResizeObserver } from '@vueuse/core'\nimport {\n debugWarn,\n focusNode,\n getSibling,\n isClient,\n isPromise,\n} from '@element-plus/utils'\nimport ElCascaderPanel from '@element-plus/components/cascader-panel'\nimport ElInput from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElTag from '@element-plus/components/tag'\nimport ElIcon from '@element-plus/components/icon'\nimport { useFormItem, useFormSize } from '@element-plus/components/form'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport {\n useComposition,\n useEmptyValues,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { ArrowDown, Check, CircleClose } from '@element-plus/icons-vue'\nimport { cascaderEmits, cascaderProps } from './cascader'\n\nimport type { Options } from '@element-plus/components/popper'\nimport type { ComputedRef, Ref, StyleValue } from 'vue'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { ScrollbarInstance } from '@element-plus/components/scrollbar'\nimport type {\n CascaderNode,\n CascaderPanelInstance,\n CascaderValue,\n Tag,\n} from '@element-plus/components/cascader-panel'\n\nconst popperOptions: Partial<Options> = {\n modifiers: [\n {\n name: 'arrowPosition',\n enabled: true,\n phase: 'main',\n fn: ({ state }) => {\n const { modifiersData, placement } = state as any\n if (['right', 'left', 'bottom', 'top'].includes(placement)) return\n modifiersData.arrow.x = 35\n },\n requires: ['arrow'],\n },\n ],\n}\nconst COMPONENT_NAME = 'ElCascader'\n\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(cascaderProps)\nconst emit = defineEmits(cascaderEmits)\nconst attrs = useAttrs()\n\nlet inputInitialHeight = 0\nlet pressDeleteCount = 0\n\nconst nsCascader = useNamespace('cascader')\nconst nsInput = useNamespace('input')\n\nconst { t } = useLocale()\nconst { form, formItem } = useFormItem()\nconst { valueOnClear } = useEmptyValues(props)\nconst { isComposing, handleComposition } = useComposition({\n afterComposition(event) {\n const text = (event.target as HTMLInputElement)?.value\n handleInput(text)\n },\n})\n\nconst tooltipRef: Ref<TooltipInstance | null> = ref(null)\nconst input: Ref<InputInstance | null> = ref(null)\nconst tagWrapper = ref(null)\nconst cascaderPanelRef: Ref<CascaderPanelInstance | null> = ref(null)\nconst suggestionPanel: Ref<ScrollbarInstance | null> = ref(null)\nconst popperVisible = ref(false)\nconst inputHover = ref(false)\nconst filtering = ref(false)\nconst filterFocus = ref(false)\nconst inputValue = ref('')\nconst searchInputValue = ref('')\nconst presentTags: Ref<Tag[]> = ref([])\nconst allPresentTags: Ref<Tag[]> = ref([])\nconst suggestions: Ref<CascaderNode[]> = ref([])\n\nconst cascaderStyle = computed<StyleValue>(() => {\n return attrs.style as StyleValue\n})\n\nconst isDisabled = computed(() => props.disabled || form?.disabled)\nconst inputPlaceholder = computed(\n () => props.placeholder || t('el.cascader.placeholder')\n)\nconst currentPlaceholder = computed(() =>\n searchInputValue.value || presentTags.value.length > 0 || isComposing.value\n ? ''\n : inputPlaceholder.value\n)\nconst realSize = useFormSize()\nconst tagSize = computed(() =>\n ['small'].includes(realSize.value) ? 'small' : 'default'\n)\nconst multiple = computed(() => !!props.props.multiple)\nconst readonly = computed(() => !props.filterable || multiple.value)\nconst searchKeyword = computed(() =>\n multiple.value ? searchInputValue.value : inputValue.value\n)\nconst checkedNodes: ComputedRef<CascaderNode[]> = computed(\n () => cascaderPanelRef.value?.checkedNodes || []\n)\nconst clearBtnVisible = computed(() => {\n if (\n !props.clearable ||\n isDisabled.value ||\n filtering.value ||\n !inputHover.value\n )\n return false\n\n return !!checkedNodes.value.length\n})\nconst presentText = computed(() => {\n const { showAllLevels, separator } = props\n const nodes = checkedNodes.value\n return nodes.length\n ? multiple.value\n ? ''\n : nodes[0].calcText(showAllLevels, separator)\n : ''\n})\n\nconst validateState = computed(() => formItem?.validateState || '')\n\nconst checkedValue = computed<CascaderValue>({\n get() {\n return cloneDeep(props.modelValue) as CascaderValue\n },\n set(val) {\n // https://github.com/element-plus/element-plus/issues/17647\n const value = val ?? valueOnClear.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n },\n})\n\nconst cascaderKls = computed(() => {\n return [\n nsCascader.b(),\n nsCascader.m(realSize.value),\n nsCascader.is('disabled', isDisabled.value),\n attrs.class,\n ]\n})\n\nconst cascaderIconKls = computed(() => {\n return [\n nsInput.e('icon'),\n 'icon-arrow-down',\n nsCascader.is('reverse', popperVisible.value),\n ]\n})\n\nconst inputClass = computed(() => {\n return nsCascader.is('focus', popperVisible.value || filterFocus.value)\n})\n\nconst contentRef = computed(() => {\n return tooltipRef.value?.popperRef?.contentRef\n})\n\nconst togglePopperVisible = (visible?: boolean) => {\n if (isDisabled.value) return\n\n visible = visible ?? !popperVisible.value\n\n if (visible !== popperVisible.value) {\n popperVisible.value = visible\n input.value?.input?.setAttribute('aria-expanded', `${visible}`)\n\n if (visible) {\n updatePopperPosition()\n nextTick(cascaderPanelRef.value?.scrollToExpandingNode)\n } else if (props.filterable) {\n syncPresentTextValue()\n }\n\n emit('visibleChange', visible)\n }\n}\n\nconst updatePopperPosition = () => {\n nextTick(() => {\n tooltipRef.value?.updatePopper()\n })\n}\n\nconst hideSuggestionPanel = () => {\n filtering.value = false\n}\n\nconst genTag = (node: CascaderNode): Tag => {\n const { showAllLevels, separator } = props\n return {\n node,\n key: node.uid,\n text: node.calcText(showAllLevels, separator),\n hitState: false,\n closable: !isDisabled.value && !node.isDisabled,\n isCollapseTag: false,\n }\n}\n\nconst deleteTag = (tag: Tag) => {\n const node = tag.node as CascaderNode\n node.doCheck(false)\n cascaderPanelRef.value?.calculateCheckedValue()\n emit('removeTag', node.valueByOption)\n}\n\nconst calculatePresentTags = () => {\n if (!multiple.value) return\n\n const nodes = checkedNodes.value\n const tags: Tag[] = []\n\n const allTags: Tag[] = []\n nodes.forEach((node) => allTags.push(genTag(node)))\n allPresentTags.value = allTags\n\n if (nodes.length) {\n nodes\n .slice(0, props.maxCollapseTags)\n .forEach((node) => tags.push(genTag(node)))\n const rest = nodes.slice(props.maxCollapseTags)\n const restCount = rest.length\n\n if (restCount) {\n if (props.collapseTags) {\n tags.push({\n key: -1,\n text: `+ ${restCount}`,\n closable: false,\n isCollapseTag: true,\n })\n } else {\n rest.forEach((node) => tags.push(genTag(node)))\n }\n }\n }\n\n presentTags.value = tags\n}\n\nconst calculateSuggestions = () => {\n const { filterMethod, showAllLevels, separator } = props\n const res = cascaderPanelRef.value\n ?.getFlattedNodes(!props.props.checkStrictly)\n ?.filter((node) => {\n if (node.isDisabled) return false\n node.calcText(showAllLevels, separator)\n return filterMethod(node, searchKeyword.value)\n })\n\n if (multiple.value) {\n presentTags.value.forEach((tag) => {\n tag.hitState = false\n })\n allPresentTags.value.forEach((tag) => {\n tag.hitState = false\n })\n }\n\n filtering.value = true\n suggestions.value = res!\n updatePopperPosition()\n}\n\nconst focusFirstNode = () => {\n let firstNode!: HTMLElement\n\n if (filtering.value && suggestionPanel.value) {\n firstNode = suggestionPanel.value.$el.querySelector(\n `.${nsCascader.e('suggestion-item')}`\n )\n } else {\n firstNode = cascaderPanelRef.value?.$el.querySelector(\n `.${nsCascader.b('node')}[tabindex=\"-1\"]`\n )\n }\n\n if (firstNode) {\n firstNode.focus()\n !filtering.value && firstNode.click()\n }\n}\n\nconst updateStyle = () => {\n const inputInner = input.value?.input\n const tagWrapperEl = tagWrapper.value\n const suggestionPanelEl = suggestionPanel.value?.$el\n\n if (!isClient || !inputInner) return\n\n if (suggestionPanelEl) {\n const suggestionList = suggestionPanelEl.querySelector(\n `.${nsCascader.e('suggestion-list')}`\n )\n suggestionList.style.minWidth = `${inputInner.offsetWidth}px`\n }\n\n if (tagWrapperEl) {\n const { offsetHeight } = tagWrapperEl\n const height =\n presentTags.value.length > 0\n ? `${Math.max(offsetHeight + 6, inputInitialHeight)}px`\n : `${inputInitialHeight}px`\n inputInner.style.height = height\n updatePopperPosition()\n }\n}\n\nconst getCheckedNodes = (leafOnly: boolean) => {\n return cascaderPanelRef.value?.getCheckedNodes(leafOnly)\n}\n\nconst handleExpandChange = (value: CascaderValue) => {\n updatePopperPosition()\n emit('expandChange', value)\n}\n\nconst handleKeyDown = (e: KeyboardEvent) => {\n if (isComposing.value) return\n\n switch (e.code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n togglePopperVisible()\n break\n case EVENT_CODE.down:\n togglePopperVisible(true)\n nextTick(focusFirstNode)\n e.preventDefault()\n break\n case EVENT_CODE.esc:\n if (popperVisible.value === true) {\n e.preventDefault()\n e.stopPropagation()\n togglePopperVisible(false)\n }\n break\n case EVENT_CODE.tab:\n togglePopperVisible(false)\n break\n }\n}\n\nconst handleClear = () => {\n cascaderPanelRef.value?.clearCheckedNodes()\n if (!popperVisible.value && props.filterable) {\n syncPresentTextValue()\n }\n togglePopperVisible(false)\n emit('clear')\n}\n\nconst syncPresentTextValue = () => {\n const { value } = presentText\n inputValue.value = value\n searchInputValue.value = value\n}\n\nconst handleSuggestionClick = (node: CascaderNode) => {\n const { checked } = node\n\n if (multiple.value) {\n cascaderPanelRef.value?.handleCheckChange(node, !checked, false)\n } else {\n !checked && cascaderPanelRef.value?.handleCheckChange(node, true, false)\n togglePopperVisible(false)\n }\n}\n\nconst handleSuggestionKeyDown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement\n const { code } = e\n\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down: {\n const distance = code === EVENT_CODE.up ? -1 : 1\n focusNode(\n getSibling(\n target,\n distance,\n `.${nsCascader.e('suggestion-item')}[tabindex=\"-1\"]`\n ) as HTMLElement\n )\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n target.click()\n break\n }\n}\n\nconst handleDelete = () => {\n const tags = presentTags.value\n const lastTag = tags[tags.length - 1]\n pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1\n\n if (!lastTag || !pressDeleteCount || (props.collapseTags && tags.length > 1))\n return\n\n if (lastTag.hitState) {\n deleteTag(lastTag)\n } else {\n lastTag.hitState = true\n }\n}\n\nconst handleFocus = (e: FocusEvent) => {\n const el = e.target as HTMLInputElement\n const name = nsCascader.e('search-input')\n if (el.className === name) {\n filterFocus.value = true\n }\n emit('focus', e)\n}\n\nconst handleBlur = (e: FocusEvent) => {\n filterFocus.value = false\n emit('blur', e)\n}\n\nconst handleFilter = debounce(() => {\n const { value } = searchKeyword\n\n if (!value) return\n\n const passed = props.beforeFilter(value)\n\n if (isPromise(passed)) {\n passed.then(calculateSuggestions).catch(() => {\n /* prevent log error */\n })\n } else if (passed !== false) {\n calculateSuggestions()\n } else {\n hideSuggestionPanel()\n }\n}, props.debounce)\n\nconst handleInput = (val: string, e?: KeyboardEvent) => {\n !popperVisible.value && togglePopperVisible(true)\n\n if (e?.isComposing) return\n\n val ? handleFilter() : hideSuggestionPanel()\n}\n\nconst getInputInnerHeight = (inputInner: HTMLElement): number =>\n Number.parseFloat(\n useCssVar(nsInput.cssVarName('input-height'), inputInner).value\n ) - 2\n\nwatch(filtering, updatePopperPosition)\n\nwatch(\n [checkedNodes, isDisabled, () => props.collapseTags],\n calculatePresentTags\n)\n\nwatch(presentTags, () => {\n nextTick(() => updateStyle())\n})\n\nwatch(realSize, async () => {\n await nextTick()\n const inputInner = input.value!.input!\n inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight\n updateStyle()\n})\n\nwatch(presentText, syncPresentTextValue, { immediate: true })\n\nonMounted(() => {\n const inputInner = input.value!.input!\n\n const inputInnerHeight = getInputInnerHeight(inputInner)\n\n inputInitialHeight = inputInner.offsetHeight || inputInnerHeight\n useResizeObserver(inputInner, updateStyle)\n})\n\ndefineExpose({\n /**\n * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`\n */\n getCheckedNodes,\n /**\n * @description cascader panel ref\n */\n cascaderPanelRef,\n /**\n * @description toggle the visible of popper\n */\n togglePopperVisible,\n /**\n * @description cascader content ref\n */\n contentRef,\n /**\n * @description selected content text\n */\n presentText,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref","_withCtx","_withDirectives","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA;AAAA,QAAA,qBAAA,EAAA,IAAA,CAAA,kBAAA;AAAA,QAAA,yBAAA,EAAA,KAAA;AAAA,QAIA,kBAAA,EAAA,KAAA;AAAA,QAAA,SAAA,EAAA,IAAA,CAAA,SAAA;AAAA,QAAA,UAAA,EAAA,CAAA,EAAAA,KAAA,CAAA,UAAA,CAAA,CAAA,SAAA,CAAA,KAAA,CAAA,YAAA,CAAA;AAAA,QAAA,MAAA,EAAA,OAAA;AAAA,QAIA,IAAA,EAAA,EAAA;AAAA,QAAA,UAAA,EAAA,IAAA,CAAA,UAAA;AAAA,QAAA,MAAA,EAAA,mBAAA;AAAA,OAAA,EAAA;AAAA,QAIA,OAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,UACDC,cAAA,EAAAJ,SAAA,EAAA,EAAAK,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -216,6 +216,7 @@ const _sfc_main = defineComponent({
216
216
  break;
217
217
  }
218
218
  case EVENT_CODE.enter:
219
+ case EVENT_CODE.numpadEnter:
219
220
  checkNode(target);
220
221
  break;
221
222
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/cascader-panel/src/index.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('panel'), ns.is('bordered', border)]\"\n @keydown=\"handleKeyDown\"\n >\n <el-cascader-menu\n v-for=\"(menu, index) in menus\"\n :key=\"index\"\n :ref=\"(item) => (menuList[index] = item)\"\n :index=\"index\"\n :nodes=\"[...menu]\"\n >\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </el-cascader-menu>\n </div>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n nextTick,\n onBeforeUpdate,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { cloneDeep, flattenDeep, isEqual } from 'lodash-unified'\nimport {\n castArray,\n focusNode,\n getSibling,\n isClient,\n isEmpty,\n scrollIntoView,\n unique,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport ElCascaderMenu from './menu.vue'\nimport Store from './store'\nimport Node from './node'\nimport { CommonProps, useCascaderConfig } from './config'\nimport { checkNode, getMenuIndex, sortByOriginalOrder } from './utils'\nimport { CASCADER_PANEL_INJECTION_KEY } from './types'\n\nimport type { PropType } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n default as CascaderNode,\n CascaderNodeValue,\n CascaderOption,\n CascaderValue,\n RenderLabel,\n} from './node'\n\nimport type { ElCascaderPanelContext } from './types'\n\nexport default defineComponent({\n name: 'ElCascaderPanel',\n\n components: {\n ElCascaderMenu,\n },\n\n props: {\n ...CommonProps,\n border: {\n type: Boolean,\n default: true,\n },\n renderLabel: Function as PropType<RenderLabel>,\n },\n\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, 'close', 'expand-change'],\n\n setup(props, { emit, slots }) {\n // for interrupt sync check status in lazy mode\n let manualChecked = false\n\n const ns = useNamespace('cascader')\n const config = useCascaderConfig(props)\n\n let store: Nullable<Store> = null\n const initialLoaded = ref(true)\n const menuList = ref<any[]>([])\n const checkedValue = ref<Nullable<CascaderValue>>(null)\n const menus = ref<CascaderNode[][]>([])\n const expandingNode = ref<Nullable<CascaderNode>>(null)\n const checkedNodes = ref<CascaderNode[]>([])\n\n const isHoverMenu = computed(() => config.value.expandTrigger === 'hover')\n const renderLabelFn = computed(() => props.renderLabel || slots.default)\n\n const initStore = () => {\n const { options } = props\n const cfg = config.value\n\n manualChecked = false\n store = new Store(options, cfg)\n menus.value = [store.getNodes()]\n\n if (cfg.lazy && isEmpty(props.options)) {\n initialLoaded.value = false\n lazyLoad(undefined, (list) => {\n if (list) {\n store = new Store(list, cfg)\n menus.value = [store.getNodes()]\n }\n initialLoaded.value = true\n syncCheckedValue(false, true)\n })\n } else {\n syncCheckedValue(false, true)\n }\n }\n\n const lazyLoad: ElCascaderPanelContext['lazyLoad'] = (node, cb) => {\n const cfg = config.value\n node! = node || new Node({}, cfg, undefined, true)\n node.loading = true\n\n const resolve = (dataList: CascaderOption[]) => {\n const _node = node as Node\n const parent = _node.root ? null : _node\n dataList && store?.appendNodes(dataList, parent as any)\n _node.loading = false\n _node.loaded = true\n _node.childrenData = _node.childrenData || []\n cb && cb(dataList)\n }\n\n cfg.lazyLoad(node, resolve as any)\n }\n\n const expandNode: ElCascaderPanelContext['expandNode'] = (node, silent) => {\n const { level } = node\n const newMenus = menus.value.slice(0, level)\n let newExpandingNode: Nullable<CascaderNode>\n\n if (node.isLeaf) {\n newExpandingNode = node.pathNodes[level - 2]\n } else {\n newExpandingNode = node\n newMenus.push(node.children)\n }\n\n if (expandingNode.value?.uid !== newExpandingNode?.uid) {\n expandingNode.value = node\n menus.value = newMenus\n !silent && emit('expand-change', node?.pathValues || [])\n }\n }\n\n const handleCheckChange: ElCascaderPanelContext['handleCheckChange'] = (\n node,\n checked,\n emitClose = true\n ) => {\n const { checkStrictly, multiple } = config.value\n const oldNode = checkedNodes.value[0]\n manualChecked = true\n\n !multiple && oldNode?.doCheck(false)\n node.doCheck(checked)\n calculateCheckedValue()\n emitClose && !multiple && !checkStrictly && emit('close')\n !emitClose && !multiple && !checkStrictly && expandParentNode(node)\n }\n\n const expandParentNode = (node) => {\n if (!node) return\n node = node.parent\n expandParentNode(node)\n node && expandNode(node)\n }\n\n const getFlattedNodes = (leafOnly: boolean) => {\n return store?.getFlattedNodes(leafOnly)\n }\n\n const getCheckedNodes = (leafOnly: boolean) => {\n return getFlattedNodes(leafOnly)?.filter((node) => node.checked !== false)\n }\n\n const clearCheckedNodes = () => {\n checkedNodes.value.forEach((node) => node.doCheck(false))\n calculateCheckedValue()\n menus.value = menus.value.slice(0, 1)\n expandingNode.value = null\n emit('expand-change', [])\n }\n\n const calculateCheckedValue = () => {\n const { checkStrictly, multiple } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = getCheckedNodes(!checkStrictly)!\n // ensure the original order\n const nodes = sortByOriginalOrder(oldNodes, newNodes)\n const values = nodes.map((node) => node.valueByOption)\n checkedNodes.value = nodes\n checkedValue.value = multiple ? values : values[0] ?? null\n }\n\n const syncCheckedValue = (loaded = false, forced = false) => {\n const { modelValue } = props\n const { lazy, multiple, checkStrictly } = config.value\n const leafOnly = !checkStrictly\n\n if (\n !initialLoaded.value ||\n manualChecked ||\n (!forced && isEqual(modelValue, checkedValue.value))\n )\n return\n\n if (lazy && !loaded) {\n const values: CascaderNodeValue[] = unique(\n flattenDeep(castArray(modelValue))\n )\n const nodes = values\n .map((val) => store?.getNodeByValue(val))\n .filter((node) => !!node && !node.loaded && !node.loading) as Node[]\n\n if (nodes.length) {\n nodes.forEach((node) => {\n lazyLoad(node, () => syncCheckedValue(false, forced))\n })\n } else {\n syncCheckedValue(true, forced)\n }\n } else {\n const values = multiple ? castArray(modelValue) : [modelValue]\n const nodes = unique(\n values.map((val) => store?.getNodeByValue(val, leafOnly))\n ) as Node[]\n syncMenuState(nodes, forced)\n checkedValue.value = cloneDeep(modelValue)\n }\n }\n\n const syncMenuState = (\n newCheckedNodes: CascaderNode[],\n reserveExpandingState = true\n ) => {\n const { checkStrictly } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = newCheckedNodes.filter(\n (node) => !!node && (checkStrictly || node.isLeaf)\n )\n const oldExpandingNode = store?.getSameNode(expandingNode.value!)\n const newExpandingNode =\n (reserveExpandingState && oldExpandingNode) || newNodes[0]\n\n if (newExpandingNode) {\n newExpandingNode.pathNodes.forEach((node) => expandNode(node, true))\n } else {\n expandingNode.value = null\n }\n\n oldNodes.forEach((node) => node.doCheck(false))\n reactive(newNodes).forEach((node) => node.doCheck(true))\n checkedNodes.value = newNodes\n nextTick(scrollToExpandingNode)\n }\n\n const scrollToExpandingNode = () => {\n if (!isClient) return\n\n menuList.value.forEach((menu) => {\n const menuElement = menu?.$el\n if (menuElement) {\n const container = menuElement.querySelector(\n `.${ns.namespace.value}-scrollbar__wrap`\n )\n const activeNode =\n menuElement.querySelector(`.${ns.b('node')}.${ns.is('active')}`) ||\n menuElement.querySelector(`.${ns.b('node')}.in-active-path`)\n scrollIntoView(container, activeNode)\n }\n })\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement\n const { code } = e\n\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down: {\n e.preventDefault()\n const distance = code === EVENT_CODE.up ? -1 : 1\n focusNode(\n getSibling(target, distance, `.${ns.b('node')}[tabindex=\"-1\"]`)\n )\n break\n }\n case EVENT_CODE.left: {\n e.preventDefault()\n const preMenu = menuList.value[getMenuIndex(target) - 1]\n const expandedNode = preMenu?.$el.querySelector(\n `.${ns.b('node')}[aria-expanded=\"true\"]`\n )\n focusNode(expandedNode)\n break\n }\n case EVENT_CODE.right: {\n e.preventDefault()\n const nextMenu = menuList.value[getMenuIndex(target) + 1]\n const firstNode = nextMenu?.$el.querySelector(\n `.${ns.b('node')}[tabindex=\"-1\"]`\n )\n focusNode(firstNode)\n break\n }\n case EVENT_CODE.enter:\n checkNode(target)\n break\n }\n }\n\n provide(\n CASCADER_PANEL_INJECTION_KEY,\n reactive({\n config,\n expandingNode,\n checkedNodes,\n isHoverMenu,\n initialLoaded,\n renderLabelFn,\n lazyLoad,\n expandNode,\n handleCheckChange,\n })\n )\n\n watch([config, () => props.options], initStore, {\n deep: true,\n immediate: true,\n })\n\n watch(\n () => props.modelValue,\n () => {\n manualChecked = false\n syncCheckedValue()\n },\n {\n deep: true,\n }\n )\n\n watch(\n () => checkedValue.value,\n (val) => {\n if (!isEqual(val, props.modelValue)) {\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n }\n }\n )\n\n onBeforeUpdate(() => (menuList.value = []))\n\n onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue())\n\n return {\n ns,\n menuList,\n menus,\n checkedNodes,\n handleKeyDown,\n handleCheckChange,\n getFlattedNodes,\n /**\n * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`\n */\n getCheckedNodes,\n /**\n * @description clear checked nodes\n */\n clearCheckedNodes,\n calculateCheckedValue,\n scrollToExpandingNode,\n }\n },\n})\n</script>\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_Fragment","_renderList","_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoEA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,iBAAA;AAAA,EAEN,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,GACF;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,GAAG,WAAA;AAAA,IACH,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,OAAA;AAAA,MACN,OAAS,EAAA,IAAA;AAAA,KACX;AAAA,IACA,WAAa,EAAA,QAAA;AAAA,GACf;AAAA,EAEA,KAAO,EAAA,CAAC,kBAAoB,EAAA,YAAA,EAAc,SAAS,eAAe,CAAA;AAAA,EAElE,KAAM,CAAA,KAAA,EAAO,EAAE,IAAA,EAAM,OAAS,EAAA;AAE5B,IAAA,IAAI,aAAgB,GAAA,KAAA,CAAA;AAEpB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,MAAA,GAAS,kBAAkB,KAAK,CAAA,CAAA;AAEtC,IAAA,IAAI,KAAyB,GAAA,IAAA,CAAA;AAC7B,IAAM,MAAA,aAAA,GAAgB,IAAI,IAAI,CAAA,CAAA;AAC9B,IAAM,MAAA,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AA,IAAA,CAAA,EAAAC,kBAAA,CAAAE,QAAA,EAAA,IAAA,EAAAC,UAAA,CAAA,IAAA,CAAA,KAAA,EAAA,CAAA,IAAA,EAAA,KAAA,KAAA;AAAA,MACA,OAAAJ,SAAA,EAAA,EAAAK,WAAA,CAAA,2BAAA,EAAA;AAAA,QACA,GAAA,EAAA,KAAA;AAAA,QACA,OAAA,EAAA,IAAA;AAAA,QACA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,IAAA;AAAA,QAAA,KAAA;AAAA,QAAA,KAAA,EAAA,CAAA,GAAA,IAAA,CAAA;AAAA,OAAA,EAAA;AAAA,QAIA,KAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,OAAA,CAAA;AAAA,SAAA,CAAA;AAAA,QAAA,CAAA,EAAA,CAAA;AAAA,OAIA,EAAA,IAAA,EAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,CAAA;AAAA,KACA,CAAA,EAAA,GAAA,CAAA;AAAA,GACA,EAAA,EAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA;AAAA,CACF;AAEJ,oBAAC,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,WAAA,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/cascader-panel/src/index.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('panel'), ns.is('bordered', border)]\"\n @keydown=\"handleKeyDown\"\n >\n <el-cascader-menu\n v-for=\"(menu, index) in menus\"\n :key=\"index\"\n :ref=\"(item) => (menuList[index] = item)\"\n :index=\"index\"\n :nodes=\"[...menu]\"\n >\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </el-cascader-menu>\n </div>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n nextTick,\n onBeforeUpdate,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { cloneDeep, flattenDeep, isEqual } from 'lodash-unified'\nimport {\n castArray,\n focusNode,\n getSibling,\n isClient,\n isEmpty,\n scrollIntoView,\n unique,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport ElCascaderMenu from './menu.vue'\nimport Store from './store'\nimport Node from './node'\nimport { CommonProps, useCascaderConfig } from './config'\nimport { checkNode, getMenuIndex, sortByOriginalOrder } from './utils'\nimport { CASCADER_PANEL_INJECTION_KEY } from './types'\n\nimport type { PropType } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n default as CascaderNode,\n CascaderNodeValue,\n CascaderOption,\n CascaderValue,\n RenderLabel,\n} from './node'\n\nimport type { ElCascaderPanelContext } from './types'\n\nexport default defineComponent({\n name: 'ElCascaderPanel',\n\n components: {\n ElCascaderMenu,\n },\n\n props: {\n ...CommonProps,\n border: {\n type: Boolean,\n default: true,\n },\n renderLabel: Function as PropType<RenderLabel>,\n },\n\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, 'close', 'expand-change'],\n\n setup(props, { emit, slots }) {\n // for interrupt sync check status in lazy mode\n let manualChecked = false\n\n const ns = useNamespace('cascader')\n const config = useCascaderConfig(props)\n\n let store: Nullable<Store> = null\n const initialLoaded = ref(true)\n const menuList = ref<any[]>([])\n const checkedValue = ref<Nullable<CascaderValue>>(null)\n const menus = ref<CascaderNode[][]>([])\n const expandingNode = ref<Nullable<CascaderNode>>(null)\n const checkedNodes = ref<CascaderNode[]>([])\n\n const isHoverMenu = computed(() => config.value.expandTrigger === 'hover')\n const renderLabelFn = computed(() => props.renderLabel || slots.default)\n\n const initStore = () => {\n const { options } = props\n const cfg = config.value\n\n manualChecked = false\n store = new Store(options, cfg)\n menus.value = [store.getNodes()]\n\n if (cfg.lazy && isEmpty(props.options)) {\n initialLoaded.value = false\n lazyLoad(undefined, (list) => {\n if (list) {\n store = new Store(list, cfg)\n menus.value = [store.getNodes()]\n }\n initialLoaded.value = true\n syncCheckedValue(false, true)\n })\n } else {\n syncCheckedValue(false, true)\n }\n }\n\n const lazyLoad: ElCascaderPanelContext['lazyLoad'] = (node, cb) => {\n const cfg = config.value\n node! = node || new Node({}, cfg, undefined, true)\n node.loading = true\n\n const resolve = (dataList: CascaderOption[]) => {\n const _node = node as Node\n const parent = _node.root ? null : _node\n dataList && store?.appendNodes(dataList, parent as any)\n _node.loading = false\n _node.loaded = true\n _node.childrenData = _node.childrenData || []\n cb && cb(dataList)\n }\n\n cfg.lazyLoad(node, resolve as any)\n }\n\n const expandNode: ElCascaderPanelContext['expandNode'] = (node, silent) => {\n const { level } = node\n const newMenus = menus.value.slice(0, level)\n let newExpandingNode: Nullable<CascaderNode>\n\n if (node.isLeaf) {\n newExpandingNode = node.pathNodes[level - 2]\n } else {\n newExpandingNode = node\n newMenus.push(node.children)\n }\n\n if (expandingNode.value?.uid !== newExpandingNode?.uid) {\n expandingNode.value = node\n menus.value = newMenus\n !silent && emit('expand-change', node?.pathValues || [])\n }\n }\n\n const handleCheckChange: ElCascaderPanelContext['handleCheckChange'] = (\n node,\n checked,\n emitClose = true\n ) => {\n const { checkStrictly, multiple } = config.value\n const oldNode = checkedNodes.value[0]\n manualChecked = true\n\n !multiple && oldNode?.doCheck(false)\n node.doCheck(checked)\n calculateCheckedValue()\n emitClose && !multiple && !checkStrictly && emit('close')\n !emitClose && !multiple && !checkStrictly && expandParentNode(node)\n }\n\n const expandParentNode = (node) => {\n if (!node) return\n node = node.parent\n expandParentNode(node)\n node && expandNode(node)\n }\n\n const getFlattedNodes = (leafOnly: boolean) => {\n return store?.getFlattedNodes(leafOnly)\n }\n\n const getCheckedNodes = (leafOnly: boolean) => {\n return getFlattedNodes(leafOnly)?.filter((node) => node.checked !== false)\n }\n\n const clearCheckedNodes = () => {\n checkedNodes.value.forEach((node) => node.doCheck(false))\n calculateCheckedValue()\n menus.value = menus.value.slice(0, 1)\n expandingNode.value = null\n emit('expand-change', [])\n }\n\n const calculateCheckedValue = () => {\n const { checkStrictly, multiple } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = getCheckedNodes(!checkStrictly)!\n // ensure the original order\n const nodes = sortByOriginalOrder(oldNodes, newNodes)\n const values = nodes.map((node) => node.valueByOption)\n checkedNodes.value = nodes\n checkedValue.value = multiple ? values : values[0] ?? null\n }\n\n const syncCheckedValue = (loaded = false, forced = false) => {\n const { modelValue } = props\n const { lazy, multiple, checkStrictly } = config.value\n const leafOnly = !checkStrictly\n\n if (\n !initialLoaded.value ||\n manualChecked ||\n (!forced && isEqual(modelValue, checkedValue.value))\n )\n return\n\n if (lazy && !loaded) {\n const values: CascaderNodeValue[] = unique(\n flattenDeep(castArray(modelValue))\n )\n const nodes = values\n .map((val) => store?.getNodeByValue(val))\n .filter((node) => !!node && !node.loaded && !node.loading) as Node[]\n\n if (nodes.length) {\n nodes.forEach((node) => {\n lazyLoad(node, () => syncCheckedValue(false, forced))\n })\n } else {\n syncCheckedValue(true, forced)\n }\n } else {\n const values = multiple ? castArray(modelValue) : [modelValue]\n const nodes = unique(\n values.map((val) => store?.getNodeByValue(val, leafOnly))\n ) as Node[]\n syncMenuState(nodes, forced)\n checkedValue.value = cloneDeep(modelValue)\n }\n }\n\n const syncMenuState = (\n newCheckedNodes: CascaderNode[],\n reserveExpandingState = true\n ) => {\n const { checkStrictly } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = newCheckedNodes.filter(\n (node) => !!node && (checkStrictly || node.isLeaf)\n )\n const oldExpandingNode = store?.getSameNode(expandingNode.value!)\n const newExpandingNode =\n (reserveExpandingState && oldExpandingNode) || newNodes[0]\n\n if (newExpandingNode) {\n newExpandingNode.pathNodes.forEach((node) => expandNode(node, true))\n } else {\n expandingNode.value = null\n }\n\n oldNodes.forEach((node) => node.doCheck(false))\n reactive(newNodes).forEach((node) => node.doCheck(true))\n checkedNodes.value = newNodes\n nextTick(scrollToExpandingNode)\n }\n\n const scrollToExpandingNode = () => {\n if (!isClient) return\n\n menuList.value.forEach((menu) => {\n const menuElement = menu?.$el\n if (menuElement) {\n const container = menuElement.querySelector(\n `.${ns.namespace.value}-scrollbar__wrap`\n )\n const activeNode =\n menuElement.querySelector(`.${ns.b('node')}.${ns.is('active')}`) ||\n menuElement.querySelector(`.${ns.b('node')}.in-active-path`)\n scrollIntoView(container, activeNode)\n }\n })\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement\n const { code } = e\n\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down: {\n e.preventDefault()\n const distance = code === EVENT_CODE.up ? -1 : 1\n focusNode(\n getSibling(target, distance, `.${ns.b('node')}[tabindex=\"-1\"]`)\n )\n break\n }\n case EVENT_CODE.left: {\n e.preventDefault()\n const preMenu = menuList.value[getMenuIndex(target) - 1]\n const expandedNode = preMenu?.$el.querySelector(\n `.${ns.b('node')}[aria-expanded=\"true\"]`\n )\n focusNode(expandedNode)\n break\n }\n case EVENT_CODE.right: {\n e.preventDefault()\n const nextMenu = menuList.value[getMenuIndex(target) + 1]\n const firstNode = nextMenu?.$el.querySelector(\n `.${ns.b('node')}[tabindex=\"-1\"]`\n )\n focusNode(firstNode)\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n checkNode(target)\n break\n }\n }\n\n provide(\n CASCADER_PANEL_INJECTION_KEY,\n reactive({\n config,\n expandingNode,\n checkedNodes,\n isHoverMenu,\n initialLoaded,\n renderLabelFn,\n lazyLoad,\n expandNode,\n handleCheckChange,\n })\n )\n\n watch([config, () => props.options], initStore, {\n deep: true,\n immediate: true,\n })\n\n watch(\n () => props.modelValue,\n () => {\n manualChecked = false\n syncCheckedValue()\n },\n {\n deep: true,\n }\n )\n\n watch(\n () => checkedValue.value,\n (val) => {\n if (!isEqual(val, props.modelValue)) {\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n }\n }\n )\n\n onBeforeUpdate(() => (menuList.value = []))\n\n onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue())\n\n return {\n ns,\n menuList,\n menus,\n checkedNodes,\n handleKeyDown,\n handleCheckChange,\n getFlattedNodes,\n /**\n * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`\n */\n getCheckedNodes,\n /**\n * @description clear checked nodes\n */\n clearCheckedNodes,\n calculateCheckedValue,\n scrollToExpandingNode,\n }\n },\n})\n</script>\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_Fragment","_renderList","_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoEA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,iBAAA;AAAA,EAEN,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,GACF;AAAA,EAEA,KAAO,EAAA;AAAA,IACL,GAAG,WAAA;AAAA,IACH,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,OAAA;AAAA,MACN,OAAS,EAAA,IAAA;AAAA,KACX;AAAA,IACA,WAAa,EAAA,QAAA;AAAA,GACf;AAAA,EAEA,KAAO,EAAA,CAAC,kBAAoB,EAAA,YAAA,EAAc,SAAS,eAAe,CAAA;AAAA,EAElE,KAAM,CAAA,KAAA,EAAO,EAAE,IAAA,EAAM,OAAS,EAAA;AAE5B,IAAA,IAAI,aAAgB,GAAA,KAAA,CAAA;AAEpB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,MAAA,GAAS,kBAAkB,KAAK,CAAA,CAAA;AAEtC,IAAA,IAAI,KAAyB,GAAA,IAAA,CAAA;AAC7B,IAAM,MAAA,aAAA,GAAgB,IAAI,IAAI,CAAA,CAAA;AAC9B,IAAM,MAAA,QAAA,GAAW,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AA,KACAF,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,CAAAE,QAAA,EAAA,IAAA,EAAAC,UAAA,CAAA,IAAA,CAAA,KAAA,EAAA,CAAA,IAAA,EAAA,KAAA,KAAA;AAAA,MACA,OAAAJ,SAAA,EAAA,EAAAK,WAAA,CAAA,2BAAA,EAAA;AAAA,QACA,GAAA,EAAA,KAAA;AAAA,QACA,OAAA,EAAA,IAAA;AAAA,QACA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,IAAA;AAAA,QAAA,KAAA;AAAA,QAAA,KAAA,EAAA,CAAA,GAAA,IAAA,CAAA;AAAA,OAAA,EAAA;AAAA,QAIA,KAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,OAAA,CAAA;AAAA,SAAA,CAAA;AAAA,QAAA,CAAA,EAAA,CAAA;AAAA,OAIA,EAAA,IAAA,EAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,CAAA;AAAA,KACA,CAAA,EAAA,GAAA,CAAA;AAAA,GACA,EAAA,EAAA,EAAA,CAAA,WAAA,CAAA,CAAA,CAAA;AAAA,CACF;AAEJ,oBAAC,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,WAAA,CAAA,CAAA,CAAA;;;;"}
@@ -1,7 +1,7 @@
1
1
  import '../../utils/index.mjs';
2
- import Collapse from './src/collapse.mjs';
2
+ import Collapse from './src/collapse2.mjs';
3
3
  import CollapseItem from './src/collapse-item2.mjs';
4
- export { collapseEmits, collapseProps, emitChangeFn } from './src/collapse2.mjs';
4
+ export { collapseEmits, collapseProps, emitChangeFn } from './src/collapse.mjs';
5
5
  export { collapseItemProps } from './src/collapse-item.mjs';
6
6
  export { collapseContextKey } from './src/constants.mjs';
7
7
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
@@ -1,33 +1,23 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
- import { collapseProps, collapseEmits } from './collapse2.mjs';
3
- import { useCollapse, useCollapseDOM } from './use-collapse.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import '../../../constants/index.mjs';
3
+ import { isNumber } from '../../../utils/types.mjs';
4
+ import { isString, isArray } from '@vue/shared';
5
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
+ import { mutable } from '../../../utils/typescript.mjs';
7
+ import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
5
8
 
6
- const __default__ = defineComponent({
7
- name: "ElCollapse"
8
- });
9
- const _sfc_main = /* @__PURE__ */ defineComponent({
10
- ...__default__,
11
- props: collapseProps,
12
- emits: collapseEmits,
13
- setup(__props, { expose, emit }) {
14
- const props = __props;
15
- const { activeNames, setActiveNames } = useCollapse(props, emit);
16
- const { rootKls } = useCollapseDOM();
17
- expose({
18
- activeNames,
19
- setActiveNames
20
- });
21
- return (_ctx, _cache) => {
22
- return openBlock(), createElementBlock("div", {
23
- class: normalizeClass(unref(rootKls))
24
- }, [
25
- renderSlot(_ctx.$slots, "default")
26
- ], 2);
27
- };
9
+ const emitChangeFn = (value) => isNumber(value) || isString(value) || isArray(value);
10
+ const collapseProps = buildProps({
11
+ accordion: Boolean,
12
+ modelValue: {
13
+ type: definePropType([Array, String, Number]),
14
+ default: () => mutable([])
28
15
  }
29
16
  });
30
- var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
17
+ const collapseEmits = {
18
+ [UPDATE_MODEL_EVENT]: emitChangeFn,
19
+ [CHANGE_EVENT]: emitChangeFn
20
+ };
31
21
 
32
- export { Collapse as default };
22
+ export { collapseEmits, collapseProps, emitChangeFn };
33
23
  //# sourceMappingURL=collapse.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"rootKls\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { collapseEmits, collapseProps } from './collapse'\nimport { useCollapse, useCollapseDOM } from './use-collapse'\n\ndefineOptions({\n name: 'ElCollapse',\n})\nconst props = defineProps(collapseProps)\nconst emit = defineEmits(collapseEmits)\n\nconst { activeNames, setActiveNames } = useCollapse(props, emit)\n\nconst { rootKls } = useCollapseDOM()\n\ndefineExpose({\n /** @description active names */\n activeNames,\n /** @description set active names */\n setActiveNames,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;mCAUc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,EAAE,WAAa,EAAA,cAAA,EAAmB,GAAA,WAAA,CAAY,OAAO,IAAI,CAAA,CAAA;AAE/D,IAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,cAAe,EAAA,CAAA;AAEnC,IAAa,MAAA,CAAA;AAAA,MAAA,WAAA;AAAA,MAEX,cAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAEA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapse.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable<CollapseActiveName>\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n isNumber(value) || isString(value) || isArray(value)\n\nexport const collapseProps = buildProps({\n /**\n * @description whether to activate accordion mode\n */\n accordion: Boolean,\n /**\n * @description currently active panel, the type is `string` in accordion mode, otherwise it is `array`\n */\n modelValue: {\n type: definePropType<CollapseModelValue>([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes<typeof collapseProps>\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,EAAE;AAChF,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
@@ -1,23 +1,33 @@
1
- import '../../../utils/index.mjs';
2
- import '../../../constants/index.mjs';
3
- import { isNumber } from '../../../utils/types.mjs';
4
- import { isString, isArray } from '@vue/shared';
5
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
- import { mutable } from '../../../utils/typescript.mjs';
7
- import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
+ import { collapseProps, collapseEmits } from './collapse.mjs';
3
+ import { useCollapse, useCollapseDOM } from './use-collapse.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
5
 
9
- const emitChangeFn = (value) => isNumber(value) || isString(value) || isArray(value);
10
- const collapseProps = buildProps({
11
- accordion: Boolean,
12
- modelValue: {
13
- type: definePropType([Array, String, Number]),
14
- default: () => mutable([])
6
+ const __default__ = defineComponent({
7
+ name: "ElCollapse"
8
+ });
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...__default__,
11
+ props: collapseProps,
12
+ emits: collapseEmits,
13
+ setup(__props, { expose, emit }) {
14
+ const props = __props;
15
+ const { activeNames, setActiveNames } = useCollapse(props, emit);
16
+ const { rootKls } = useCollapseDOM();
17
+ expose({
18
+ activeNames,
19
+ setActiveNames
20
+ });
21
+ return (_ctx, _cache) => {
22
+ return openBlock(), createElementBlock("div", {
23
+ class: normalizeClass(unref(rootKls))
24
+ }, [
25
+ renderSlot(_ctx.$slots, "default")
26
+ ], 2);
27
+ };
15
28
  }
16
29
  });
17
- const collapseEmits = {
18
- [UPDATE_MODEL_EVENT]: emitChangeFn,
19
- [CHANGE_EVENT]: emitChangeFn
20
- };
30
+ var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "collapse.vue"]]);
21
31
 
22
- export { collapseEmits, collapseProps, emitChangeFn };
32
+ export { Collapse as default };
23
33
  //# sourceMappingURL=collapse2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable<CollapseActiveName>\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n isNumber(value) || isString(value) || isArray(value)\n\nexport const collapseProps = buildProps({\n /**\n * @description whether to activate accordion mode\n */\n accordion: Boolean,\n /**\n * @description currently active panel, the type is `string` in accordion mode, otherwise it is `array`\n */\n modelValue: {\n type: definePropType<CollapseModelValue>([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes<typeof collapseProps>\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,EAAE;AAChF,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
1
+ {"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"rootKls\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { collapseEmits, collapseProps } from './collapse'\nimport { useCollapse, useCollapseDOM } from './use-collapse'\n\ndefineOptions({\n name: 'ElCollapse',\n})\nconst props = defineProps(collapseProps)\nconst emit = defineEmits(collapseEmits)\n\nconst { activeNames, setActiveNames } = useCollapse(props, emit)\n\nconst { rootKls } = useCollapseDOM()\n\ndefineExpose({\n /** @description active names */\n activeNames,\n /** @description set active names */\n setActiveNames,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;mCAUc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,EAAE,WAAa,EAAA,cAAA,EAAmB,GAAA,WAAA,CAAY,OAAO,IAAI,CAAA,CAAA;AAE/D,IAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,cAAe,EAAA,CAAA;AAEnC,IAAa,MAAA,CAAA;AAAA,MAAA,WAAA;AAAA,MAEX,cAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAEA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;"}
@@ -178,6 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
178
178
  function handleKeyDown(event) {
179
179
  switch (event.code) {
180
180
  case EVENT_CODE.enter:
181
+ case EVENT_CODE.numpadEnter:
181
182
  case EVENT_CODE.space:
182
183
  event.preventDefault();
183
184
  event.stopPropagation();
@@ -1 +1 @@
1
- {"version":3,"file":"color-picker2.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :offset=\"0\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), ns.b('dropdown'), popperClass]\"\n :stop-popper-mouse-event=\"false\"\n effect=\"light\"\n trigger=\"click\"\n :teleported=\"teleported\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n persistent\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <div v-click-outside=\"handleClickOutside\" @keydown.esc=\"handleEsc\">\n <div :class=\"ns.be('dropdown', 'main-wrapper')\">\n <hue-slider ref=\"hue\" class=\"hue-slider\" :color=\"color\" vertical />\n <sv-panel ref=\"sv\" :color=\"color\" />\n </div>\n <alpha-slider v-if=\"showAlpha\" ref=\"alpha\" :color=\"color\" />\n <predefine\n v-if=\"predefine\"\n ref=\"predefine\"\n :enable-alpha=\"showAlpha\"\n :color=\"color\"\n :colors=\"predefine\"\n />\n <div :class=\"ns.be('dropdown', 'btns')\">\n <span :class=\"ns.be('dropdown', 'value')\">\n <el-input\n ref=\"inputRef\"\n v-model=\"customInput\"\n :validate-event=\"false\"\n size=\"small\"\n @keyup.enter=\"handleConfirm\"\n @blur=\"handleConfirm\"\n />\n </span>\n <el-button\n :class=\"ns.be('dropdown', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('dropdown', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </div>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n v-bind=\"$attrs\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? -1 : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n >\n <div v-if=\"colorDisabled\" :class=\"ns.be('picker', 'mask')\" />\n <div :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"modelValue || showPanelColor\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElInput } from '@element-plus/components/input'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport AlphaSlider from './components/alpha-slider.vue'\nimport HueSlider from './components/hue-slider.vue'\nimport Predefine from './components/predefine.vue'\nimport SvPanel from './components/sv-panel.vue'\nimport Color from './utils/color'\nimport {\n colorPickerContextKey,\n colorPickerEmits,\n colorPickerProps,\n} from './color-picker'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = defineProps(colorPickerProps)\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\n\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst hue = ref<InstanceType<typeof HueSlider>>()\nconst sv = ref<InstanceType<typeof SvPanel>>()\nconst alpha = ref<InstanceType<typeof AlphaSlider>>()\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst inputRef = ref()\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {\n beforeFocus() {\n return colorDisabled.value\n },\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n },\n})\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst color = reactive(\n new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n) as Color\n\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\nconst customInput = ref('')\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n if (!(color instanceof Color)) {\n throw new TypeError('color should be instance of _color Class')\n }\n\n const { r, g, b } = color.toRgb()\n return showAlpha\n ? `rgba(${r}, ${g}, ${b}, ${color.get('alpha') / 100})`\n : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\n\nfunction show() {\n if (colorDisabled.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value) return\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction handleConfirm() {\n color.fromString(customInput.value)\n}\n\nfunction confirmValue() {\n const value = color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit('change', value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, null)\n emit('change', null)\n if (props.modelValue !== null && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n resetColor()\n}\n\nfunction handleClickOutside() {\n if (!showPicker.value) return\n hide()\n isFocused.value && focus()\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n inputRef.value.focus()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nonMounted(() => {\n if (props.modelValue) {\n customInput.value = currentColor.value\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => [props.colorFormat, props.showAlpha],\n () => {\n color.enableAlpha = props.showAlpha\n color.format = props.colorFormat || color.format\n color.doOnChange()\n emit(UPDATE_MODEL_EVENT, color.value)\n }\n)\n\nwatch(\n () => currentColor.value,\n (val) => {\n customInput.value = val\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n nextTick(() => {\n hue.value?.update()\n sv.value?.update()\n alpha.value?.update()\n })\n }\n)\n\nprovide(colorPickerContextKey, {\n currentColor,\n})\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"names":["color","_openBlock","_createBlock","_unref","_withCtx","_withDirectives","_createElementBlock","_withKeys","_createElementVNode","_normalizeClass","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAsJc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAY,WAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgB,eAAgB,EAAA,CAAA;AAEtC,IAAA,MAAM,EAAE,OAAS,EAAA,QAAA,EAAU,mBAAoB,EAAA,GAAI,mBAAmB,KAAO,EAAA;AAAA,MAC3E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,MAAM,GAAoC,EAAA,CAAA;AAChD,IAAA,MAAM,KAAK,GAAkC,EAAA,CAAA;AAC7C,IAAA,MAAM,QAAQ,GAAsC,EAA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A,WAAA,CAAA;AAAA,QAAA,yBAAA,EAAA,KAAA;AAAA,QAAA,MAAA,EAAA,OAAA;AAAA,QAAA,OAAA,EAAA,OAAA;AAAA,QAIA,UAAA,EAAA,IAAA,CAAA,UAAA;AAAA,QAAA,UAAA,EAAA,CAAA,EAAAA,KAAA,CAAA,EAAA,CAAA,CAAA,SAAA,CAAA,KAAA,CAAA,YAAA,CAAA;AAAA,QAAA,UAAA,EAAA,EAAA;AAAA,QAAA,MAAA,EAAA,CAAA,MAAA,KAAA,aAAA,CAAA,KAAA,CAAA;AAAA,OAIA,EAAA;AAAA,QAAA,OAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,UAAAC,cAAA,EAAAJ,SAAA,EAAA,EAAAK,kBAAA,CAAA,KAAA,EAAA;AAAA,YAAA,SAAA,EAAAC,QAAA,CAAA,SAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,WAIA,EAAA;AAAA,YAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,cAAA,KAAA,EAAAC,cAAA,CAAAN,KAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,UAAA,EAAA,cAAA,CAAA,CAAA;AAAA,aAAA,EAAA;AAAA,cAIAO,WAAA,CAAA,SAAA,EAAA;AAAA,gBACD,OAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"color-picker2.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :offset=\"0\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), ns.b('dropdown'), popperClass]\"\n :stop-popper-mouse-event=\"false\"\n effect=\"light\"\n trigger=\"click\"\n :teleported=\"teleported\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n persistent\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <div v-click-outside=\"handleClickOutside\" @keydown.esc=\"handleEsc\">\n <div :class=\"ns.be('dropdown', 'main-wrapper')\">\n <hue-slider ref=\"hue\" class=\"hue-slider\" :color=\"color\" vertical />\n <sv-panel ref=\"sv\" :color=\"color\" />\n </div>\n <alpha-slider v-if=\"showAlpha\" ref=\"alpha\" :color=\"color\" />\n <predefine\n v-if=\"predefine\"\n ref=\"predefine\"\n :enable-alpha=\"showAlpha\"\n :color=\"color\"\n :colors=\"predefine\"\n />\n <div :class=\"ns.be('dropdown', 'btns')\">\n <span :class=\"ns.be('dropdown', 'value')\">\n <el-input\n ref=\"inputRef\"\n v-model=\"customInput\"\n :validate-event=\"false\"\n size=\"small\"\n @keyup.enter=\"handleConfirm\"\n @blur=\"handleConfirm\"\n />\n </span>\n <el-button\n :class=\"ns.be('dropdown', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('dropdown', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </div>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n v-bind=\"$attrs\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? -1 : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n >\n <div v-if=\"colorDisabled\" :class=\"ns.be('picker', 'mask')\" />\n <div :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"modelValue || showPanelColor\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElInput } from '@element-plus/components/input'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport AlphaSlider from './components/alpha-slider.vue'\nimport HueSlider from './components/hue-slider.vue'\nimport Predefine from './components/predefine.vue'\nimport SvPanel from './components/sv-panel.vue'\nimport Color from './utils/color'\nimport {\n colorPickerContextKey,\n colorPickerEmits,\n colorPickerProps,\n} from './color-picker'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = defineProps(colorPickerProps)\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\n\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst hue = ref<InstanceType<typeof HueSlider>>()\nconst sv = ref<InstanceType<typeof SvPanel>>()\nconst alpha = ref<InstanceType<typeof AlphaSlider>>()\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst inputRef = ref()\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {\n beforeFocus() {\n return colorDisabled.value\n },\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n },\n})\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst color = reactive(\n new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n) as Color\n\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\nconst customInput = ref('')\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n if (!(color instanceof Color)) {\n throw new TypeError('color should be instance of _color Class')\n }\n\n const { r, g, b } = color.toRgb()\n return showAlpha\n ? `rgba(${r}, ${g}, ${b}, ${color.get('alpha') / 100})`\n : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\n\nfunction show() {\n if (colorDisabled.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value) return\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction handleConfirm() {\n color.fromString(customInput.value)\n}\n\nfunction confirmValue() {\n const value = color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit('change', value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, null)\n emit('change', null)\n if (props.modelValue !== null && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n resetColor()\n}\n\nfunction handleClickOutside() {\n if (!showPicker.value) return\n hide()\n isFocused.value && focus()\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n inputRef.value.focus()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nonMounted(() => {\n if (props.modelValue) {\n customInput.value = currentColor.value\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => [props.colorFormat, props.showAlpha],\n () => {\n color.enableAlpha = props.showAlpha\n color.format = props.colorFormat || color.format\n color.doOnChange()\n emit(UPDATE_MODEL_EVENT, color.value)\n }\n)\n\nwatch(\n () => currentColor.value,\n (val) => {\n customInput.value = val\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n nextTick(() => {\n hue.value?.update()\n sv.value?.update()\n alpha.value?.update()\n })\n }\n)\n\nprovide(colorPickerContextKey, {\n currentColor,\n})\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"names":["color","_openBlock","_createBlock","_unref","_withCtx","_withDirectives","_createElementBlock","_withKeys","_createElementVNode","_normalizeClass","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAsJc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAY,WAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgB,eAAgB,EAAA,CAAA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ import { dropdownItemProps, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as COLLECTION
9
9
  import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
10
10
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
11
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
- import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group2.mjs';
12
+ import { ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group.mjs';
13
13
  import { ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
14
14
  import { composeRefs } from '../../../utils/vue/refs.mjs';
15
15
  import { composeEventHandlers } from '../../../utils/dom/event.mjs';
@@ -45,8 +45,7 @@ const _sfc_main = defineComponent({
45
45
  return "button";
46
46
  });
47
47
  const handleKeydown = composeEventHandlers((e) => {
48
- const { code } = e;
49
- if (code === EVENT_CODE.enter || code === EVENT_CODE.space) {
48
+ if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes(e.code)) {
50
49
  e.preventDefault();
51
50
  e.stopImmediatePropagation();
52
51
  emit("clickimpl", e);
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-item-impl.mjs","sources":["../../../../../../packages/components/dropdown/src/dropdown-item-impl.vue"],"sourcesContent":["<template>\n <li\n v-if=\"divided\"\n role=\"separator\"\n :class=\"ns.bem('menu', 'item', 'divided')\"\n />\n <li\n :ref=\"itemRef\"\n v-bind=\"{ ...dataset, ...$attrs }\"\n :aria-disabled=\"disabled\"\n :class=\"[ns.be('menu', 'item'), ns.is('disabled', disabled)]\"\n :tabindex=\"tabIndex\"\n :role=\"role\"\n @click=\"(e) => $emit('clickimpl', e)\"\n @focus=\"handleFocus\"\n @keydown.self=\"handleKeydown\"\n @mousedown=\"handleMousedown\"\n @pointermove=\"(e) => $emit('pointermove', e)\"\n @pointerleave=\"(e) => $emit('pointerleave', e)\"\n >\n <el-icon v-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot />\n </li>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport { computed, defineComponent, inject } from 'vue'\nimport {\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n} from '@element-plus/components/roving-focus-group'\nimport { COLLECTION_ITEM_SIGN } from '@element-plus/components/collection'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { composeEventHandlers, composeRefs } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport {\n DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n dropdownItemProps,\n} from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nexport default defineComponent({\n name: 'DropdownItemImpl',\n components: {\n ElIcon,\n },\n props: dropdownItemProps,\n emits: ['pointermove', 'pointerleave', 'click', 'clickimpl'],\n setup(_, { emit }) {\n const ns = useNamespace('dropdown')\n\n const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, undefined)!\n\n const { collectionItemRef: dropdownCollectionItemRef } = inject(\n DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n undefined\n )!\n\n const { collectionItemRef: rovingFocusCollectionItemRef } = inject(\n ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n undefined\n )!\n\n const {\n rovingFocusGroupItemRef,\n tabIndex,\n handleFocus,\n handleKeydown: handleItemKeydown,\n handleMousedown,\n } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, undefined)!\n\n const itemRef = composeRefs(\n dropdownCollectionItemRef,\n rovingFocusCollectionItemRef,\n rovingFocusGroupItemRef\n )\n\n const role = computed<string>(() => {\n if (menuRole.value === 'menu') {\n return 'menuitem'\n } else if (menuRole.value === 'navigation') {\n return 'link'\n }\n return 'button'\n })\n\n const handleKeydown = composeEventHandlers((e: KeyboardEvent) => {\n const { code } = e\n if (code === EVENT_CODE.enter || code === EVENT_CODE.space) {\n e.preventDefault()\n e.stopImmediatePropagation()\n emit('clickimpl', e)\n return true\n }\n }, handleItemKeydown)\n\n return {\n ns,\n itemRef,\n dataset: {\n [COLLECTION_ITEM_SIGN]: '',\n },\n role,\n tabIndex,\n handleFocus,\n handleKeydown,\n handleMousedown,\n }\n },\n})\n</script>\n"],"names":["DROPDOWN_COLLECTION_ITEM_INJECTION_KEY","ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_normalizeClass","_createCommentVNode","_createElementVNode","_mergeProps","_createBlock","_withCtx","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;;;;;AA6CA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,kBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAA,iBAAA;AAAA,EACP,KAAO,EAAA,CAAC,aAAe,EAAA,cAAA,EAAgB,SAAS,WAAW,CAAA;AAAA,EAC3D,KAAM,CAAA,CAAA,EAAG,EAAE,IAAA,EAAQ,EAAA;AACjB,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,EAAE,IAAM,EAAA,QAAA,EAAa,GAAA,MAAA,CAAO,wBAAwB,KAAS,CAAA,CAAA,CAAA;AAEnE,IAAM,MAAA,EAAE,iBAAmB,EAAA,yBAAA,EAA8B,GAAA,MAAA,CAAAA,6BAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IACvD,MAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,GAAA,MAAA,CAAAC,+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AAA,CAAA,CAAA;;;;;OAoBX,EAAA,EAAA,CAAA,eAAA,EAAA,kBAjBF,EAAA,oBACY,EAAA,WAAA,EAAA,aAAkB,EAAA,eAAA,EAAA,gBAAA,CAAA,CAAA;AAAA,GAAA,EAAA,EAAA,CAC9B,CAAe;AAAA,CACf;AACU,yBACJ,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,wBAAA,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"dropdown-item-impl.mjs","sources":["../../../../../../packages/components/dropdown/src/dropdown-item-impl.vue"],"sourcesContent":["<template>\n <li\n v-if=\"divided\"\n role=\"separator\"\n :class=\"ns.bem('menu', 'item', 'divided')\"\n />\n <li\n :ref=\"itemRef\"\n v-bind=\"{ ...dataset, ...$attrs }\"\n :aria-disabled=\"disabled\"\n :class=\"[ns.be('menu', 'item'), ns.is('disabled', disabled)]\"\n :tabindex=\"tabIndex\"\n :role=\"role\"\n @click=\"(e) => $emit('clickimpl', e)\"\n @focus=\"handleFocus\"\n @keydown.self=\"handleKeydown\"\n @mousedown=\"handleMousedown\"\n @pointermove=\"(e) => $emit('pointermove', e)\"\n @pointerleave=\"(e) => $emit('pointerleave', e)\"\n >\n <el-icon v-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot />\n </li>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport { computed, defineComponent, inject } from 'vue'\nimport {\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n} from '@element-plus/components/roving-focus-group'\nimport { COLLECTION_ITEM_SIGN } from '@element-plus/components/collection'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { composeEventHandlers, composeRefs } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport {\n DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n dropdownItemProps,\n} from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nexport default defineComponent({\n name: 'DropdownItemImpl',\n components: {\n ElIcon,\n },\n props: dropdownItemProps,\n emits: ['pointermove', 'pointerleave', 'click', 'clickimpl'],\n setup(_, { emit }) {\n const ns = useNamespace('dropdown')\n\n const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, undefined)!\n\n const { collectionItemRef: dropdownCollectionItemRef } = inject(\n DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n undefined\n )!\n\n const { collectionItemRef: rovingFocusCollectionItemRef } = inject(\n ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n undefined\n )!\n\n const {\n rovingFocusGroupItemRef,\n tabIndex,\n handleFocus,\n handleKeydown: handleItemKeydown,\n handleMousedown,\n } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, undefined)!\n\n const itemRef = composeRefs(\n dropdownCollectionItemRef,\n rovingFocusCollectionItemRef,\n rovingFocusGroupItemRef\n )\n\n const role = computed<string>(() => {\n if (menuRole.value === 'menu') {\n return 'menuitem'\n } else if (menuRole.value === 'navigation') {\n return 'link'\n }\n return 'button'\n })\n\n const handleKeydown = composeEventHandlers((e: KeyboardEvent) => {\n if (\n [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes(\n e.code\n )\n ) {\n e.preventDefault()\n e.stopImmediatePropagation()\n emit('clickimpl', e)\n return true\n }\n }, handleItemKeydown)\n\n return {\n ns,\n itemRef,\n dataset: {\n [COLLECTION_ITEM_SIGN]: '',\n },\n role,\n tabIndex,\n handleFocus,\n handleKeydown,\n handleMousedown,\n }\n },\n})\n</script>\n"],"names":["DROPDOWN_COLLECTION_ITEM_INJECTION_KEY","ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_normalizeClass","_createCommentVNode","_createElementVNode","_mergeProps","_createBlock","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,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,IACFC,kBAAA,CAAA,IAAA,EAAAC,UAAA,CAAA,EAAA,GAAA,EAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,GAAA,IAAA,CAAA,OAAA,EAAA,GAAA,IAAA,CAAA,MAAA,EAAA,EAAA;AAAA,MACF,eAAA,EAAA,IAAA,CAAA,QAAA;AACF,MAAC,KAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,CAAA,UAAA,EAAA,IAAA,CAAA,QAAA,CAAA,CAAA;;;;;;;;MAlHS,cADR,EAAA,CAAA,CAAA,KAAA,IAAA,CAAA,KAAA,CAAA,cAAA,EAAA,CAAA,CAAA;AAAA,KAIE,CAAA,EAAA;AAAA,MAAA,IAAA,CAAA,IAAA,IAAAN,SAAA,EAAA,EAAAO,WAAA,CAAA,kBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;AAAA,QAAA,OAAA,EAAAC,OAAA,CAAA,MAAA;WAFKR,SAAA,EAAA,EAAAO,WAAA,CAAAE,uBAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AAAA,SACJ,CAAA;AAAa,QAAA,CAAA,EAAA,CAAA;;;;;;AAKE,yBACV,qCAA6B,EAAA,CAAE,sBAAqB,CAAA,EAAA,CAAA,QAAA,EAAA,wBAAA,CAAA,CAAA,CAAA;;;;"}
@@ -11,7 +11,7 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
11
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
12
  import { FOCUS_TRAP_INJECTION_KEY } from '../../focus-trap/src/tokens.mjs';
13
13
  import { ROVING_FOCUS_GROUP_INJECTION_KEY } from '../../roving-focus-group/src/tokens.mjs';
14
- import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group2.mjs';
14
+ import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY$1 } from '../../roving-focus-group/src/roving-focus-group.mjs';
15
15
  import { composeRefs } from '../../../utils/vue/refs.mjs';
16
16
  import { composeEventHandlers } from '../../../utils/dom/event.mjs';
17
17
  import { EVENT_CODE } from '../../../constants/aria.mjs';
@@ -13,7 +13,7 @@ import '../../../hooks/index.mjs';
13
13
  import { ElCollection, dropdownProps } from './dropdown.mjs';
14
14
  import { DROPDOWN_INJECTION_KEY } from './tokens.mjs';
15
15
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
16
- import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-group.mjs';
16
+ import ElRovingFocusGroup from '../../roving-focus-group/src/roving-focus-group2.mjs';
17
17
  import { OnlyChild } from '../../slot/src/only-child.mjs';
18
18
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
19
19
  import { useLocale } from '../../../hooks/use-locale/index.mjs';
@@ -50,7 +50,12 @@ const _sfc_main = defineComponent({
50
50
  const scrollbar = ref(null);
51
51
  const currentTabId = ref(null);
52
52
  const isUsingKeyboard = ref(false);
53
- const triggerKeys = [EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.down];
53
+ const triggerKeys = [
54
+ EVENT_CODE.enter,
55
+ EVENT_CODE.numpadEnter,
56
+ EVENT_CODE.space,
57
+ EVENT_CODE.down
58
+ ];
54
59
  const wrapStyle = computed(() => ({
55
60
  maxHeight: addUnit(props.maxHeight)
56
61
  }));