@element-plus/nightly 0.0.20261007 → 0.0.20261009

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (806) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +56 -56
  32. package/dist/locale/ca.min.js +2 -2
  33. package/dist/locale/ca.min.js.map +1 -1
  34. package/dist/locale/ca.min.mjs +2 -2
  35. package/dist/locale/ca.min.mjs.map +1 -1
  36. package/dist/locale/ca.mjs +56 -56
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +56 -56
  66. package/dist/locale/es.min.js +2 -2
  67. package/dist/locale/es.min.js.map +1 -1
  68. package/dist/locale/es.min.mjs +2 -2
  69. package/dist/locale/es.min.mjs.map +1 -1
  70. package/dist/locale/es.mjs +56 -56
  71. package/dist/locale/et.js +1 -1
  72. package/dist/locale/et.min.js +1 -1
  73. package/dist/locale/et.min.mjs +1 -1
  74. package/dist/locale/et.mjs +1 -1
  75. package/dist/locale/eu.js +56 -56
  76. package/dist/locale/eu.min.js +2 -2
  77. package/dist/locale/eu.min.js.map +1 -1
  78. package/dist/locale/eu.min.mjs +2 -2
  79. package/dist/locale/eu.min.mjs.map +1 -1
  80. package/dist/locale/eu.mjs +56 -56
  81. package/dist/locale/fa.js +1 -1
  82. package/dist/locale/fa.min.js +1 -1
  83. package/dist/locale/fa.min.mjs +1 -1
  84. package/dist/locale/fa.mjs +1 -1
  85. package/dist/locale/fi.js +1 -1
  86. package/dist/locale/fi.min.js +1 -1
  87. package/dist/locale/fi.min.mjs +1 -1
  88. package/dist/locale/fi.mjs +1 -1
  89. package/dist/locale/fr.js +1 -1
  90. package/dist/locale/fr.min.js +1 -1
  91. package/dist/locale/fr.min.mjs +1 -1
  92. package/dist/locale/fr.mjs +1 -1
  93. package/dist/locale/gl.js +194 -0
  94. package/dist/locale/gl.min.js +3 -0
  95. package/dist/locale/gl.min.js.map +1 -0
  96. package/dist/locale/gl.min.mjs +3 -0
  97. package/dist/locale/gl.min.mjs.map +1 -0
  98. package/dist/locale/gl.mjs +188 -0
  99. package/dist/locale/he.js +1 -1
  100. package/dist/locale/he.min.js +1 -1
  101. package/dist/locale/he.min.mjs +1 -1
  102. package/dist/locale/he.mjs +1 -1
  103. package/dist/locale/hi.js +1 -1
  104. package/dist/locale/hi.min.js +1 -1
  105. package/dist/locale/hi.min.mjs +1 -1
  106. package/dist/locale/hi.mjs +1 -1
  107. package/dist/locale/hr.js +1 -1
  108. package/dist/locale/hr.min.js +1 -1
  109. package/dist/locale/hr.min.mjs +1 -1
  110. package/dist/locale/hr.mjs +1 -1
  111. package/dist/locale/hu.js +1 -1
  112. package/dist/locale/hu.min.js +1 -1
  113. package/dist/locale/hu.min.mjs +1 -1
  114. package/dist/locale/hu.mjs +1 -1
  115. package/dist/locale/hy-am.js +1 -1
  116. package/dist/locale/hy-am.min.js +1 -1
  117. package/dist/locale/hy-am.min.mjs +1 -1
  118. package/dist/locale/hy-am.mjs +1 -1
  119. package/dist/locale/id.js +1 -1
  120. package/dist/locale/id.min.js +1 -1
  121. package/dist/locale/id.min.mjs +1 -1
  122. package/dist/locale/id.mjs +1 -1
  123. package/dist/locale/it.js +1 -1
  124. package/dist/locale/it.min.js +1 -1
  125. package/dist/locale/it.min.mjs +1 -1
  126. package/dist/locale/it.mjs +1 -1
  127. package/dist/locale/ja.js +1 -1
  128. package/dist/locale/ja.min.js +1 -1
  129. package/dist/locale/ja.min.mjs +1 -1
  130. package/dist/locale/ja.mjs +1 -1
  131. package/dist/locale/kk.js +1 -1
  132. package/dist/locale/kk.min.js +1 -1
  133. package/dist/locale/kk.min.mjs +1 -1
  134. package/dist/locale/kk.mjs +1 -1
  135. package/dist/locale/km.js +1 -1
  136. package/dist/locale/km.min.js +1 -1
  137. package/dist/locale/km.min.mjs +1 -1
  138. package/dist/locale/km.mjs +1 -1
  139. package/dist/locale/ko.js +1 -1
  140. package/dist/locale/ko.min.js +1 -1
  141. package/dist/locale/ko.min.mjs +1 -1
  142. package/dist/locale/ko.mjs +1 -1
  143. package/dist/locale/ku.js +1 -1
  144. package/dist/locale/ku.min.js +1 -1
  145. package/dist/locale/ku.min.mjs +1 -1
  146. package/dist/locale/ku.mjs +1 -1
  147. package/dist/locale/ky.js +1 -1
  148. package/dist/locale/ky.min.js +1 -1
  149. package/dist/locale/ky.min.mjs +1 -1
  150. package/dist/locale/ky.mjs +1 -1
  151. package/dist/locale/lo.js +1 -1
  152. package/dist/locale/lo.min.js +1 -1
  153. package/dist/locale/lo.min.mjs +1 -1
  154. package/dist/locale/lo.mjs +1 -1
  155. package/dist/locale/lt.js +1 -1
  156. package/dist/locale/lt.min.js +1 -1
  157. package/dist/locale/lt.min.mjs +1 -1
  158. package/dist/locale/lt.mjs +1 -1
  159. package/dist/locale/lv.js +1 -1
  160. package/dist/locale/lv.min.js +1 -1
  161. package/dist/locale/lv.min.mjs +1 -1
  162. package/dist/locale/lv.mjs +1 -1
  163. package/dist/locale/mg.js +1 -1
  164. package/dist/locale/mg.min.js +1 -1
  165. package/dist/locale/mg.min.mjs +1 -1
  166. package/dist/locale/mg.mjs +1 -1
  167. package/dist/locale/mn.js +1 -1
  168. package/dist/locale/mn.min.js +1 -1
  169. package/dist/locale/mn.min.mjs +1 -1
  170. package/dist/locale/mn.mjs +1 -1
  171. package/dist/locale/ms.js +1 -1
  172. package/dist/locale/ms.min.js +1 -1
  173. package/dist/locale/ms.min.mjs +1 -1
  174. package/dist/locale/ms.mjs +1 -1
  175. package/dist/locale/my.js +1 -1
  176. package/dist/locale/my.min.js +1 -1
  177. package/dist/locale/my.min.mjs +1 -1
  178. package/dist/locale/my.mjs +1 -1
  179. package/dist/locale/nb-no.js +1 -1
  180. package/dist/locale/nb-no.min.js +1 -1
  181. package/dist/locale/nb-no.min.mjs +1 -1
  182. package/dist/locale/nb-no.mjs +1 -1
  183. package/dist/locale/nl.js +1 -1
  184. package/dist/locale/nl.min.js +1 -1
  185. package/dist/locale/nl.min.mjs +1 -1
  186. package/dist/locale/nl.mjs +1 -1
  187. package/dist/locale/no.js +1 -1
  188. package/dist/locale/no.min.js +1 -1
  189. package/dist/locale/no.min.mjs +1 -1
  190. package/dist/locale/no.mjs +1 -1
  191. package/dist/locale/pa.js +1 -1
  192. package/dist/locale/pa.min.js +1 -1
  193. package/dist/locale/pa.min.mjs +1 -1
  194. package/dist/locale/pa.mjs +1 -1
  195. package/dist/locale/pl.js +1 -1
  196. package/dist/locale/pl.min.js +1 -1
  197. package/dist/locale/pl.min.mjs +1 -1
  198. package/dist/locale/pl.mjs +1 -1
  199. package/dist/locale/pt-br.js +52 -52
  200. package/dist/locale/pt-br.min.js +2 -2
  201. package/dist/locale/pt-br.min.js.map +1 -1
  202. package/dist/locale/pt-br.min.mjs +2 -2
  203. package/dist/locale/pt-br.min.mjs.map +1 -1
  204. package/dist/locale/pt-br.mjs +52 -52
  205. package/dist/locale/pt.js +69 -69
  206. package/dist/locale/pt.min.js +2 -2
  207. package/dist/locale/pt.min.js.map +1 -1
  208. package/dist/locale/pt.min.mjs +2 -2
  209. package/dist/locale/pt.min.mjs.map +1 -1
  210. package/dist/locale/pt.mjs +69 -69
  211. package/dist/locale/ro.js +1 -1
  212. package/dist/locale/ro.min.js +1 -1
  213. package/dist/locale/ro.min.mjs +1 -1
  214. package/dist/locale/ro.mjs +1 -1
  215. package/dist/locale/ru.js +1 -1
  216. package/dist/locale/ru.min.js +1 -1
  217. package/dist/locale/ru.min.mjs +1 -1
  218. package/dist/locale/ru.mjs +1 -1
  219. package/dist/locale/sk.js +1 -1
  220. package/dist/locale/sk.min.js +1 -1
  221. package/dist/locale/sk.min.mjs +1 -1
  222. package/dist/locale/sk.mjs +1 -1
  223. package/dist/locale/sl.js +1 -1
  224. package/dist/locale/sl.min.js +1 -1
  225. package/dist/locale/sl.min.mjs +1 -1
  226. package/dist/locale/sl.mjs +1 -1
  227. package/dist/locale/sr.js +1 -1
  228. package/dist/locale/sr.min.js +1 -1
  229. package/dist/locale/sr.min.mjs +1 -1
  230. package/dist/locale/sr.mjs +1 -1
  231. package/dist/locale/sv.js +1 -1
  232. package/dist/locale/sv.min.js +1 -1
  233. package/dist/locale/sv.min.mjs +1 -1
  234. package/dist/locale/sv.mjs +1 -1
  235. package/dist/locale/sw.js +1 -1
  236. package/dist/locale/sw.min.js +1 -1
  237. package/dist/locale/sw.min.mjs +1 -1
  238. package/dist/locale/sw.mjs +1 -1
  239. package/dist/locale/ta.js +1 -1
  240. package/dist/locale/ta.min.js +1 -1
  241. package/dist/locale/ta.min.mjs +1 -1
  242. package/dist/locale/ta.mjs +1 -1
  243. package/dist/locale/te.js +1 -1
  244. package/dist/locale/te.min.js +1 -1
  245. package/dist/locale/te.min.mjs +1 -1
  246. package/dist/locale/te.mjs +1 -1
  247. package/dist/locale/th.js +1 -1
  248. package/dist/locale/th.min.js +1 -1
  249. package/dist/locale/th.min.mjs +1 -1
  250. package/dist/locale/th.mjs +1 -1
  251. package/dist/locale/tk.js +1 -1
  252. package/dist/locale/tk.min.js +1 -1
  253. package/dist/locale/tk.min.mjs +1 -1
  254. package/dist/locale/tk.mjs +1 -1
  255. package/dist/locale/tr.js +1 -1
  256. package/dist/locale/tr.min.js +1 -1
  257. package/dist/locale/tr.min.mjs +1 -1
  258. package/dist/locale/tr.mjs +1 -1
  259. package/dist/locale/ug-cn.js +1 -1
  260. package/dist/locale/ug-cn.min.js +1 -1
  261. package/dist/locale/ug-cn.min.mjs +1 -1
  262. package/dist/locale/ug-cn.mjs +1 -1
  263. package/dist/locale/uk.js +1 -1
  264. package/dist/locale/uk.min.js +1 -1
  265. package/dist/locale/uk.min.mjs +1 -1
  266. package/dist/locale/uk.mjs +1 -1
  267. package/dist/locale/uz-uz.js +1 -1
  268. package/dist/locale/uz-uz.min.js +1 -1
  269. package/dist/locale/uz-uz.min.mjs +1 -1
  270. package/dist/locale/uz-uz.mjs +1 -1
  271. package/dist/locale/vi.js +1 -1
  272. package/dist/locale/vi.min.js +1 -1
  273. package/dist/locale/vi.min.mjs +1 -1
  274. package/dist/locale/vi.mjs +1 -1
  275. package/dist/locale/zh-cn.js +1 -1
  276. package/dist/locale/zh-cn.min.js +1 -1
  277. package/dist/locale/zh-cn.min.mjs +1 -1
  278. package/dist/locale/zh-cn.mjs +1 -1
  279. package/dist/locale/zh-hk.js +1 -1
  280. package/dist/locale/zh-hk.min.js +1 -1
  281. package/dist/locale/zh-hk.min.mjs +1 -1
  282. package/dist/locale/zh-hk.mjs +1 -1
  283. package/dist/locale/zh-mo.js +1 -1
  284. package/dist/locale/zh-mo.min.js +1 -1
  285. package/dist/locale/zh-mo.min.mjs +1 -1
  286. package/dist/locale/zh-mo.mjs +1 -1
  287. package/dist/locale/zh-tw.js +1 -1
  288. package/dist/locale/zh-tw.min.js +1 -1
  289. package/dist/locale/zh-tw.min.mjs +1 -1
  290. package/dist/locale/zh-tw.mjs +1 -1
  291. package/es/component.mjs +3 -3
  292. package/es/components/affix/src/affix.vue.d.ts +2 -2
  293. package/es/components/alert/src/alert.vue.d.ts +1 -2
  294. package/es/components/anchor/src/anchor.d.ts +1 -1
  295. package/es/components/anchor/src/anchor.vue.d.ts +3 -3
  296. package/es/components/autocomplete/src/autocomplete.d.ts +3 -3
  297. package/es/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
  298. package/es/components/avatar/src/avatar-group-props.d.ts +1 -1
  299. package/es/components/avatar/src/avatar-group.d.ts +3 -3
  300. package/es/components/avatar/src/avatar.d.ts +2 -2
  301. package/es/components/backtop/src/backtop.vue.d.ts +1 -1
  302. package/es/components/badge/src/badge.vue.d.ts +3 -3
  303. package/es/components/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
  304. package/es/components/button/src/button-group.d.ts +2 -2
  305. package/es/components/button/src/button-group.vue.d.ts +1 -1
  306. package/es/components/button/src/button.d.ts +2 -2
  307. package/es/components/button/src/button.vue.d.ts +11 -11
  308. package/es/components/button/src/use-button.d.ts +2 -2
  309. package/es/components/calendar/src/calendar.d.ts +1 -1
  310. package/es/components/calendar/src/calendar.vue.d.ts +2 -2
  311. package/es/components/calendar/src/date-table.vue.d.ts +2 -2
  312. package/es/components/card/src/card.vue.d.ts +1 -1
  313. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
  314. package/es/components/carousel/src/carousel.d.ts +1 -1
  315. package/es/components/carousel/src/carousel.vue.d.ts +2 -2
  316. package/es/components/cascader/src/cascader.d.ts +3 -3
  317. package/es/components/cascader/src/cascader.vue.d.ts +22 -22
  318. package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +2 -2
  319. package/es/components/cascader-panel/src/index.vue.d.ts +7 -7
  320. package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +1 -1
  321. package/es/components/cascader-panel/src/menu.vue.d.ts +3 -3
  322. package/es/components/check-tag/src/check-tag.vue.d.ts +1 -1
  323. package/es/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  324. package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
  325. package/es/components/checkbox/src/checkbox-group.vue.d.ts +7 -7
  326. package/es/components/checkbox/src/checkbox.d.ts +4 -4
  327. package/es/components/checkbox/src/checkbox.vue.d.ts +8 -8
  328. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  329. package/es/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  330. package/es/components/col/src/col.vue.d.ts +4 -4
  331. package/es/components/collapse/src/collapse.d.ts +1 -1
  332. package/es/components/collapse/src/collapse.vue.d.ts +1 -1
  333. package/es/components/color-picker/src/color-picker.d.ts +1 -1
  334. package/es/components/color-picker/src/color-picker.vue.d.ts +6 -6
  335. package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs +1 -1
  336. package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +3 -3
  337. package/es/components/config-provider/src/config-provider-props.d.ts +1 -1
  338. package/es/components/config-provider/src/config-provider.d.ts +3 -3
  339. package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  340. package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
  341. package/es/components/date-picker/src/date-picker.d.ts +14 -14
  342. package/es/components/date-picker/src/props.d.ts +4 -4
  343. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  344. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +9 -9
  345. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs +1 -1
  346. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +12 -12
  347. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +1 -1
  348. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +6 -6
  349. package/es/components/date-picker-panel/src/date-picker-com/panel-quarter-range.vue.d.ts +6 -6
  350. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +6 -6
  351. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +9 -9
  352. package/es/components/date-picker-panel/src/panel-utils.d.ts +18 -18
  353. package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
  354. package/es/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
  355. package/es/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
  356. package/es/components/date-picker-panel/src/props/shared.d.ts +1 -1
  357. package/es/components/descriptions/src/description-item.d.ts +10 -10
  358. package/es/components/descriptions/src/description.d.ts +1 -1
  359. package/es/components/descriptions/src/description.vue.d.ts +1 -1
  360. package/es/components/dialog/src/dialog.vue.d.ts +8 -8
  361. package/es/components/divider/src/divider.d.ts +1 -1
  362. package/es/components/divider/src/divider.vue.d.ts +2 -2
  363. package/es/components/drawer/src/drawer.vue.d.ts +10 -10
  364. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  365. package/es/components/dropdown/src/dropdown.d.ts +4 -4
  366. package/es/components/dropdown/src/dropdown.vue.d.ts +74 -74
  367. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  368. package/es/components/form/src/form-item.d.ts +2 -2
  369. package/es/components/form/src/form-item.vue.d.ts +2 -2
  370. package/es/components/form/src/form.d.ts +4 -4
  371. package/es/components/form/src/form.vue.d.ts +1 -1
  372. package/es/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  373. package/es/components/image/src/image.vue.d.ts +2 -2
  374. package/es/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
  375. package/es/components/index.mjs +6 -6
  376. package/es/components/input/src/input.d.ts +2 -2
  377. package/es/components/input/src/input.vue.d.ts +8 -8
  378. package/es/components/input-number/src/input-number.d.ts +3 -3
  379. package/es/components/input-number/src/input-number.vue.d.ts +10 -10
  380. package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +1 -1
  381. package/es/components/input-otp/src/input-otp.vue.d.ts +5 -5
  382. package/es/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  383. package/es/components/input-tag/src/input-tag.d.ts +1 -1
  384. package/es/components/input-tag/src/input-tag.vue.d.ts +8 -8
  385. package/es/components/link/src/link.d.ts +1 -1
  386. package/es/components/link/src/link.vue.d.ts +2 -2
  387. package/es/components/mention/src/mention-dropdown.vue.d.ts +5 -5
  388. package/es/components/mention/src/mention.d.ts +2 -2
  389. package/es/components/mention/src/mention.vue.d.ts +3 -3
  390. package/es/components/menu/src/menu.d.ts +5 -5
  391. package/es/components/menu/src/menu.mjs +1 -1
  392. package/es/components/menu/src/sub-menu.d.ts +1 -1
  393. package/es/components/menu/src/utils/menu-item.mjs +1 -1
  394. package/es/components/menu/src/utils/submenu.mjs +1 -1
  395. package/es/components/message/src/message.vue.d.ts +10 -8
  396. package/es/components/message-box/src/index.vue.d.ts +46 -46
  397. package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
  398. package/es/components/notification/src/notification.vue.d.ts +7 -5
  399. package/es/components/page-header/src/page-header.vue.d.ts +1 -1
  400. package/es/components/pagination/src/components/jumper.d.ts +1 -1
  401. package/es/components/pagination/src/components/jumper.vue.d.ts +2 -2
  402. package/es/components/pagination/src/components/sizes.d.ts +1 -1
  403. package/es/components/pagination/src/components/sizes.vue.d.ts +3 -3
  404. package/es/components/pagination/src/pagination.d.ts +5 -5
  405. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  406. package/es/components/popconfirm/src/popconfirm.vue.d.ts +8 -9
  407. package/es/components/popover/src/popover.d.ts +27 -27
  408. package/es/components/popover/src/popover.vue.d.ts +10 -10
  409. package/es/components/popper/src/composables/use-content.d.ts +7 -7
  410. package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  411. package/es/components/popper/src/content.d.ts +4 -4
  412. package/es/components/popper/src/content.vue.d.ts +3 -3
  413. package/es/components/popper/src/popper.d.ts +2 -2
  414. package/es/components/popper/src/popper.vue.d.ts +2 -2
  415. package/es/components/popper/src/trigger.vue.d.ts +2 -2
  416. package/es/components/progress/src/progress.vue.d.ts +6 -6
  417. package/es/components/radio/src/radio-button.d.ts +4 -4
  418. package/es/components/radio/src/radio-button.vue.d.ts +3 -3
  419. package/es/components/radio/src/radio-group.d.ts +1 -1
  420. package/es/components/radio/src/radio-group.vue.d.ts +6 -6
  421. package/es/components/radio/src/radio.d.ts +8 -8
  422. package/es/components/radio/src/radio.vue.d.ts +5 -5
  423. package/es/components/radio/src/use-radio.d.ts +1 -1
  424. package/es/components/rate/src/rate.d.ts +1 -1
  425. package/es/components/rate/src/rate.vue.d.ts +6 -6
  426. package/es/components/result/src/result.vue.d.ts +1 -1
  427. package/es/components/row/src/row.d.ts +2 -2
  428. package/es/components/row/src/row.vue.d.ts +4 -4
  429. package/es/components/scrollbar/src/scrollbar.vue.d.ts +7 -7
  430. package/es/components/segmented/index.d.ts +3 -3
  431. package/es/components/segmented/src/segmented.d.ts +2 -2
  432. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  433. package/es/components/select/src/option.d.ts +1 -1
  434. package/es/components/select/src/option.vue.d.ts +2 -2
  435. package/es/components/select/src/select.d.ts +3 -3
  436. package/es/components/select/src/select.vue.d.ts +65 -65
  437. package/es/components/select/src/select.vue_vue_type_script_lang.mjs +1 -1
  438. package/es/components/select/src/useSelect.d.ts +6 -6
  439. package/es/components/select-v2/src/defaults.d.ts +2 -2
  440. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  441. package/es/components/select-v2/src/select.vue.d.ts +43 -43
  442. package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +1 -1
  443. package/es/components/select-v2/src/useSelect.d.ts +1 -1
  444. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  445. package/es/components/skeleton/src/skeleton-item.vue.d.ts +1 -1
  446. package/es/components/skeleton/src/skeleton.vue.d.ts +4 -4
  447. package/es/components/slider/src/button.vue.d.ts +1 -1
  448. package/es/components/slider/src/slider.d.ts +2 -2
  449. package/es/components/slider/src/slider.vue.d.ts +9 -9
  450. package/es/components/space/src/space.d.ts +4 -4
  451. package/es/components/statistic/src/statistic.vue.d.ts +2 -2
  452. package/es/components/steps/src/item.vue.d.ts +2 -2
  453. package/es/components/steps/src/steps.vue.d.ts +2 -2
  454. package/es/components/switch/src/switch.d.ts +1 -1
  455. package/es/components/switch/src/switch.vue.d.ts +7 -7
  456. package/es/components/table/src/filter-panel.vue.d.ts +67 -67
  457. package/es/components/table/src/table/defaults.d.ts +1 -1
  458. package/es/components/table/src/table/style-helper.d.ts +1 -1
  459. package/es/components/table/src/table-column/defaults.d.ts +2 -2
  460. package/es/components/table/src/table-header/index.d.ts +18 -18
  461. package/es/components/table/src/table.vue.d.ts +2 -2
  462. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +1 -1
  463. package/es/components/tabs/src/tab-bar.vue.d.ts +20 -3
  464. package/es/components/tabs/src/tabs.d.ts +5 -5
  465. package/es/components/tag/src/tag.d.ts +1 -1
  466. package/es/components/tag/src/tag.vue.d.ts +2 -2
  467. package/es/components/text/src/text.d.ts +1 -1
  468. package/es/components/text/src/text.vue.d.ts +4 -5
  469. package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
  470. package/es/components/time-picker/src/common/picker.vue.d.ts +18 -18
  471. package/es/components/time-picker/src/common/props.d.ts +3 -3
  472. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs +1 -1
  473. package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  474. package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
  475. package/es/components/time-picker/src/time-picker.d.ts +11 -11
  476. package/es/components/time-select/src/time-select.d.ts +1 -1
  477. package/es/components/time-select/src/time-select.vue.d.ts +8 -8
  478. package/es/components/timeline/src/timeline-item.vue.d.ts +3 -3
  479. package/es/components/tooltip/src/content.d.ts +1 -1
  480. package/es/components/tooltip/src/content.vue.d.ts +6 -6
  481. package/es/components/tooltip/src/tooltip.d.ts +3 -3
  482. package/es/components/tooltip/src/tooltip.vue.d.ts +11 -11
  483. package/es/components/tooltip/src/trigger.d.ts +1 -1
  484. package/es/components/tooltip/src/trigger.vue.d.ts +2 -2
  485. package/es/components/tour/src/content.d.ts +2 -2
  486. package/es/components/tour/src/content.vue.d.ts +2 -2
  487. package/es/components/tour/src/step.d.ts +2 -2
  488. package/es/components/tour/src/tour.d.ts +2 -2
  489. package/es/components/tour/src/tour.vue.d.ts +5 -5
  490. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  491. package/es/components/tree/src/tree-node.vue.d.ts +19 -19
  492. package/es/components/tree/src/tree.vue.d.ts +20 -20
  493. package/es/components/tree-select/src/tree-select-option.d.ts +2 -2
  494. package/es/components/tree-select/src/tree-select.vue.d.ts +14 -14
  495. package/es/components/tree-v2/src/composables/useTree.d.ts +10 -10
  496. package/es/components/tree-v2/src/tree.vue.d.ts +2 -2
  497. package/es/components/upload/src/upload-content.d.ts +1 -1
  498. package/es/components/upload/src/upload-content.vue.d.ts +6 -6
  499. package/es/components/upload/src/upload-list.d.ts +1 -1
  500. package/es/components/upload/src/upload-list.vue.d.ts +2 -2
  501. package/es/components/upload/src/upload.d.ts +2 -2
  502. package/es/components/upload/src/upload.vue.d.ts +20 -20
  503. package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  504. package/es/components/virtual-list/src/builders/build-list.d.ts +5 -5
  505. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  506. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +5 -5
  507. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  508. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +5 -5
  509. package/es/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  510. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  511. package/es/constants/index.mjs +2 -2
  512. package/es/directives/trap-focus/index.mjs +1 -1
  513. package/es/hooks/use-floating/index.d.ts +8 -8
  514. package/es/hooks/use-popper/index.d.ts +7 -7
  515. package/es/hooks/use-size/index.d.ts +3 -3
  516. package/es/index.mjs +13 -13
  517. package/es/locale/index.d.ts +49 -48
  518. package/es/locale/index.mjs +2 -1
  519. package/es/locale/lang/ca.mjs +55 -55
  520. package/es/locale/lang/ca.mjs.map +1 -1
  521. package/es/locale/lang/es.mjs +55 -55
  522. package/es/locale/lang/es.mjs.map +1 -1
  523. package/es/locale/lang/eu.mjs +55 -55
  524. package/es/locale/lang/eu.mjs.map +1 -1
  525. package/es/locale/lang/gl.d.ts +205 -0
  526. package/es/locale/lang/gl.mjs +187 -0
  527. package/es/locale/lang/gl.mjs.map +1 -0
  528. package/es/locale/lang/pt-br.mjs +51 -51
  529. package/es/locale/lang/pt-br.mjs.map +1 -1
  530. package/es/locale/lang/pt.mjs +68 -68
  531. package/es/locale/lang/pt.mjs.map +1 -1
  532. package/es/locales.d.ts +49 -48
  533. package/es/locales.mjs +2 -1
  534. package/es/plugin.mjs +1 -1
  535. package/es/utils/vue/size.d.ts +1 -1
  536. package/es/utils/vue/vnode.d.ts +4 -4
  537. package/es/version.d.ts +1 -1
  538. package/es/version.mjs +1 -1
  539. package/es/version.mjs.map +1 -1
  540. package/lib/component.js +109 -109
  541. package/lib/components/affix/src/affix.vue.d.ts +2 -2
  542. package/lib/components/alert/src/alert.vue.d.ts +1 -2
  543. package/lib/components/anchor/src/anchor.d.ts +1 -1
  544. package/lib/components/anchor/src/anchor.vue.d.ts +3 -3
  545. package/lib/components/autocomplete/src/autocomplete.d.ts +3 -3
  546. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
  547. package/lib/components/avatar/src/avatar-group-props.d.ts +1 -1
  548. package/lib/components/avatar/src/avatar-group.d.ts +3 -3
  549. package/lib/components/avatar/src/avatar.d.ts +2 -2
  550. package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
  551. package/lib/components/badge/src/badge.vue.d.ts +3 -3
  552. package/lib/components/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
  553. package/lib/components/button/src/button-group.d.ts +2 -2
  554. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  555. package/lib/components/button/src/button.d.ts +2 -2
  556. package/lib/components/button/src/button.vue.d.ts +11 -11
  557. package/lib/components/button/src/use-button.d.ts +2 -2
  558. package/lib/components/calendar/src/calendar.d.ts +1 -1
  559. package/lib/components/calendar/src/calendar.vue.d.ts +2 -2
  560. package/lib/components/calendar/src/date-table.vue.d.ts +2 -2
  561. package/lib/components/card/src/card.vue.d.ts +1 -1
  562. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
  563. package/lib/components/carousel/src/carousel.d.ts +1 -1
  564. package/lib/components/carousel/src/carousel.vue.d.ts +2 -2
  565. package/lib/components/cascader/src/cascader.d.ts +3 -3
  566. package/lib/components/cascader/src/cascader.vue.d.ts +22 -22
  567. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +40 -40
  568. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  569. package/lib/components/cascader-panel/src/index.vue.d.ts +7 -7
  570. package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +12 -12
  571. package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js.map +1 -1
  572. package/lib/components/cascader-panel/src/menu.vue.d.ts +3 -3
  573. package/lib/components/check-tag/src/check-tag.vue.d.ts +1 -1
  574. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  575. package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
  576. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +7 -7
  577. package/lib/components/checkbox/src/checkbox.d.ts +4 -4
  578. package/lib/components/checkbox/src/checkbox.vue.d.ts +8 -8
  579. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  580. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  581. package/lib/components/col/src/col.vue.d.ts +4 -4
  582. package/lib/components/collapse/src/collapse.d.ts +1 -1
  583. package/lib/components/collapse/src/collapse.vue.d.ts +1 -1
  584. package/lib/components/color-picker/src/color-picker.d.ts +1 -1
  585. package/lib/components/color-picker/src/color-picker.vue.d.ts +6 -6
  586. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js +18 -18
  587. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  588. package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +3 -3
  589. package/lib/components/config-provider/src/config-provider-props.d.ts +1 -1
  590. package/lib/components/config-provider/src/config-provider.d.ts +3 -3
  591. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  592. package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
  593. package/lib/components/date-picker/src/date-picker.d.ts +14 -14
  594. package/lib/components/date-picker/src/props.d.ts +4 -4
  595. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  596. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +9 -9
  597. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js +18 -18
  598. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js.map +1 -1
  599. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +12 -12
  600. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +23 -23
  601. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
  602. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +6 -6
  603. package/lib/components/date-picker-panel/src/date-picker-com/panel-quarter-range.vue.d.ts +6 -6
  604. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +6 -6
  605. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +9 -9
  606. package/lib/components/date-picker-panel/src/panel-utils.d.ts +18 -18
  607. package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
  608. package/lib/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
  609. package/lib/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
  610. package/lib/components/date-picker-panel/src/props/shared.d.ts +1 -1
  611. package/lib/components/descriptions/src/description-item.d.ts +10 -10
  612. package/lib/components/descriptions/src/description.d.ts +1 -1
  613. package/lib/components/descriptions/src/description.vue.d.ts +1 -1
  614. package/lib/components/dialog/src/dialog.vue.d.ts +8 -8
  615. package/lib/components/divider/src/divider.d.ts +1 -1
  616. package/lib/components/divider/src/divider.vue.d.ts +2 -2
  617. package/lib/components/drawer/src/drawer.vue.d.ts +10 -10
  618. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  619. package/lib/components/dropdown/src/dropdown.d.ts +4 -4
  620. package/lib/components/dropdown/src/dropdown.vue.d.ts +74 -74
  621. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  622. package/lib/components/form/src/form-item.d.ts +2 -2
  623. package/lib/components/form/src/form-item.vue.d.ts +2 -2
  624. package/lib/components/form/src/form.d.ts +4 -4
  625. package/lib/components/form/src/form.vue.d.ts +1 -1
  626. package/lib/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  627. package/lib/components/image/src/image.vue.d.ts +2 -2
  628. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
  629. package/lib/components/index.js +125 -125
  630. package/lib/components/input/src/input.d.ts +2 -2
  631. package/lib/components/input/src/input.vue.d.ts +8 -8
  632. package/lib/components/input-number/src/input-number.d.ts +3 -3
  633. package/lib/components/input-number/src/input-number.vue.d.ts +10 -10
  634. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +12 -12
  635. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
  636. package/lib/components/input-otp/src/input-otp.vue.d.ts +5 -5
  637. package/lib/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  638. package/lib/components/input-tag/src/input-tag.d.ts +1 -1
  639. package/lib/components/input-tag/src/input-tag.vue.d.ts +8 -8
  640. package/lib/components/link/src/link.d.ts +1 -1
  641. package/lib/components/link/src/link.vue.d.ts +2 -2
  642. package/lib/components/mention/src/mention-dropdown.vue.d.ts +5 -5
  643. package/lib/components/mention/src/mention.d.ts +2 -2
  644. package/lib/components/mention/src/mention.vue.d.ts +3 -3
  645. package/lib/components/menu/src/menu.d.ts +5 -5
  646. package/lib/components/menu/src/menu.js +7 -7
  647. package/lib/components/menu/src/menu.js.map +1 -1
  648. package/lib/components/menu/src/sub-menu.d.ts +1 -1
  649. package/lib/components/menu/src/utils/menu-item.js +11 -11
  650. package/lib/components/menu/src/utils/menu-item.js.map +1 -1
  651. package/lib/components/menu/src/utils/submenu.js +9 -9
  652. package/lib/components/menu/src/utils/submenu.js.map +1 -1
  653. package/lib/components/message/src/message.vue.d.ts +10 -8
  654. package/lib/components/message-box/src/index.vue.d.ts +46 -46
  655. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +19 -19
  656. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
  657. package/lib/components/notification/src/notification.vue.d.ts +7 -5
  658. package/lib/components/page-header/src/page-header.vue.d.ts +1 -1
  659. package/lib/components/pagination/src/components/jumper.d.ts +1 -1
  660. package/lib/components/pagination/src/components/jumper.vue.d.ts +2 -2
  661. package/lib/components/pagination/src/components/sizes.d.ts +1 -1
  662. package/lib/components/pagination/src/components/sizes.vue.d.ts +3 -3
  663. package/lib/components/pagination/src/pagination.d.ts +5 -5
  664. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  665. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +8 -9
  666. package/lib/components/popover/src/popover.d.ts +27 -27
  667. package/lib/components/popover/src/popover.vue.d.ts +10 -10
  668. package/lib/components/popper/src/composables/use-content.d.ts +7 -7
  669. package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  670. package/lib/components/popper/src/content.d.ts +4 -4
  671. package/lib/components/popper/src/content.vue.d.ts +3 -3
  672. package/lib/components/popper/src/popper.d.ts +2 -2
  673. package/lib/components/popper/src/popper.vue.d.ts +2 -2
  674. package/lib/components/popper/src/trigger.vue.d.ts +2 -2
  675. package/lib/components/progress/src/progress.vue.d.ts +6 -6
  676. package/lib/components/radio/src/radio-button.d.ts +4 -4
  677. package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
  678. package/lib/components/radio/src/radio-group.d.ts +1 -1
  679. package/lib/components/radio/src/radio-group.vue.d.ts +6 -6
  680. package/lib/components/radio/src/radio.d.ts +8 -8
  681. package/lib/components/radio/src/radio.vue.d.ts +5 -5
  682. package/lib/components/radio/src/use-radio.d.ts +1 -1
  683. package/lib/components/rate/src/rate.d.ts +1 -1
  684. package/lib/components/rate/src/rate.vue.d.ts +6 -6
  685. package/lib/components/result/src/result.vue.d.ts +1 -1
  686. package/lib/components/row/src/row.d.ts +2 -2
  687. package/lib/components/row/src/row.vue.d.ts +4 -4
  688. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +7 -7
  689. package/lib/components/segmented/index.d.ts +3 -3
  690. package/lib/components/segmented/src/segmented.d.ts +2 -2
  691. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  692. package/lib/components/select/src/option.d.ts +1 -1
  693. package/lib/components/select/src/option.vue.d.ts +2 -2
  694. package/lib/components/select/src/select.d.ts +3 -3
  695. package/lib/components/select/src/select.vue.d.ts +65 -65
  696. package/lib/components/select/src/select.vue_vue_type_script_lang.js +10 -10
  697. package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
  698. package/lib/components/select/src/useSelect.d.ts +6 -6
  699. package/lib/components/select-v2/src/defaults.d.ts +2 -2
  700. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  701. package/lib/components/select-v2/src/select.vue.d.ts +43 -43
  702. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +10 -10
  703. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
  704. package/lib/components/select-v2/src/useSelect.d.ts +1 -1
  705. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  706. package/lib/components/skeleton/src/skeleton-item.vue.d.ts +1 -1
  707. package/lib/components/skeleton/src/skeleton.vue.d.ts +4 -4
  708. package/lib/components/slider/src/button.vue.d.ts +1 -1
  709. package/lib/components/slider/src/slider.d.ts +2 -2
  710. package/lib/components/slider/src/slider.vue.d.ts +9 -9
  711. package/lib/components/space/src/space.d.ts +4 -4
  712. package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
  713. package/lib/components/steps/src/item.vue.d.ts +2 -2
  714. package/lib/components/steps/src/steps.vue.d.ts +2 -2
  715. package/lib/components/switch/src/switch.d.ts +1 -1
  716. package/lib/components/switch/src/switch.vue.d.ts +7 -7
  717. package/lib/components/table/src/filter-panel.vue.d.ts +67 -67
  718. package/lib/components/table/src/table/defaults.d.ts +1 -1
  719. package/lib/components/table/src/table/style-helper.d.ts +1 -1
  720. package/lib/components/table/src/table-column/defaults.d.ts +2 -2
  721. package/lib/components/table/src/table-header/index.d.ts +18 -18
  722. package/lib/components/table/src/table.vue.d.ts +2 -2
  723. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +9 -9
  724. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -1
  725. package/lib/components/tabs/src/tab-bar.vue.d.ts +20 -3
  726. package/lib/components/tabs/src/tabs.d.ts +5 -5
  727. package/lib/components/tag/src/tag.d.ts +1 -1
  728. package/lib/components/tag/src/tag.vue.d.ts +2 -2
  729. package/lib/components/text/src/text.d.ts +1 -1
  730. package/lib/components/text/src/text.vue.d.ts +4 -5
  731. package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
  732. package/lib/components/time-picker/src/common/picker.vue.d.ts +18 -18
  733. package/lib/components/time-picker/src/common/props.d.ts +3 -3
  734. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js +10 -10
  735. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  736. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  737. package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
  738. package/lib/components/time-picker/src/time-picker.d.ts +11 -11
  739. package/lib/components/time-select/src/time-select.d.ts +1 -1
  740. package/lib/components/time-select/src/time-select.vue.d.ts +8 -8
  741. package/lib/components/timeline/src/timeline-item.vue.d.ts +3 -3
  742. package/lib/components/tooltip/src/content.d.ts +1 -1
  743. package/lib/components/tooltip/src/content.vue.d.ts +6 -6
  744. package/lib/components/tooltip/src/tooltip.d.ts +3 -3
  745. package/lib/components/tooltip/src/tooltip.vue.d.ts +11 -11
  746. package/lib/components/tooltip/src/trigger.d.ts +1 -1
  747. package/lib/components/tooltip/src/trigger.vue.d.ts +2 -2
  748. package/lib/components/tour/src/content.d.ts +2 -2
  749. package/lib/components/tour/src/content.vue.d.ts +2 -2
  750. package/lib/components/tour/src/step.d.ts +2 -2
  751. package/lib/components/tour/src/tour.d.ts +2 -2
  752. package/lib/components/tour/src/tour.vue.d.ts +5 -5
  753. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  754. package/lib/components/tree/src/tree-node.vue.d.ts +19 -19
  755. package/lib/components/tree/src/tree.vue.d.ts +20 -20
  756. package/lib/components/tree-select/src/tree-select-option.d.ts +2 -2
  757. package/lib/components/tree-select/src/tree-select.vue.d.ts +14 -14
  758. package/lib/components/tree-v2/src/composables/useTree.d.ts +10 -10
  759. package/lib/components/tree-v2/src/tree.vue.d.ts +2 -2
  760. package/lib/components/upload/src/upload-content.d.ts +1 -1
  761. package/lib/components/upload/src/upload-content.vue.d.ts +6 -6
  762. package/lib/components/upload/src/upload-list.d.ts +1 -1
  763. package/lib/components/upload/src/upload-list.vue.d.ts +2 -2
  764. package/lib/components/upload/src/upload.d.ts +2 -2
  765. package/lib/components/upload/src/upload.vue.d.ts +20 -20
  766. package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  767. package/lib/components/virtual-list/src/builders/build-list.d.ts +5 -5
  768. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  769. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +5 -5
  770. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  771. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +5 -5
  772. package/lib/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  773. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  774. package/lib/constants/index.js +2 -2
  775. package/lib/directives/trap-focus/index.js +5 -5
  776. package/lib/directives/trap-focus/index.js.map +1 -1
  777. package/lib/hooks/use-floating/index.d.ts +8 -8
  778. package/lib/hooks/use-popper/index.d.ts +7 -7
  779. package/lib/hooks/use-size/index.d.ts +3 -3
  780. package/lib/index.js +269 -269
  781. package/lib/locale/index.d.ts +49 -48
  782. package/lib/locale/index.js +2 -0
  783. package/lib/locale/lang/ca.js +55 -55
  784. package/lib/locale/lang/ca.js.map +1 -1
  785. package/lib/locale/lang/es.js +55 -55
  786. package/lib/locale/lang/es.js.map +1 -1
  787. package/lib/locale/lang/eu.js +55 -55
  788. package/lib/locale/lang/eu.js.map +1 -1
  789. package/lib/locale/lang/gl.d.ts +205 -0
  790. package/lib/locale/lang/gl.js +191 -0
  791. package/lib/locale/lang/gl.js.map +1 -0
  792. package/lib/locale/lang/pt-br.js +51 -51
  793. package/lib/locale/lang/pt-br.js.map +1 -1
  794. package/lib/locale/lang/pt.js +68 -68
  795. package/lib/locale/lang/pt.js.map +1 -1
  796. package/lib/locales.d.ts +49 -48
  797. package/lib/locales.js +2 -0
  798. package/lib/plugin.js +12 -12
  799. package/lib/plugin.js.map +1 -1
  800. package/lib/utils/vue/size.d.ts +1 -1
  801. package/lib/utils/vue/vnode.d.ts +4 -4
  802. package/lib/version.d.ts +1 -1
  803. package/lib/version.js +1 -1
  804. package/lib/version.js.map +1 -1
  805. package/package.json +2 -2
  806. package/web-types.json +1 -1
@@ -3,13 +3,13 @@ const require_event = require("../../../constants/event.js");
3
3
  const require_event$1 = require("../../../utils/dom/event.js");
4
4
  const require_types = require("../../../utils/types.js");
5
5
  const require_error = require("../../../utils/error.js");
6
- const require_index = require("../../../directives/repeat-click/index.js");
7
- const require_index$1 = require("../../../hooks/use-locale/index.js");
8
- const require_index$2 = require("../../../hooks/use-namespace/index.js");
9
- const require_index$3 = require("../../icon/index.js");
6
+ const require_index = require("../../../hooks/use-locale/index.js");
7
+ const require_index$1 = require("../../../hooks/use-namespace/index.js");
8
+ const require_index$2 = require("../../icon/index.js");
10
9
  const require_use_form_common_props = require("../../form/src/hooks/use-form-common-props.js");
11
10
  const require_use_form_item = require("../../form/src/hooks/use-form-item.js");
12
- const require_index$4 = require("../../input/index.js");
11
+ const require_index$3 = require("../../input/index.js");
12
+ const require_index$4 = require("../../../directives/repeat-click/index.js");
13
13
  const require_input_number = require("./input-number.js");
14
14
  let lodash_unified = require("lodash-unified");
15
15
  let _element_plus_icons_vue = require("@element-plus/icons-vue");
@@ -26,8 +26,8 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
26
26
  setup(__props, { expose: __expose, emit: __emit }) {
27
27
  const props = __props;
28
28
  const emit = __emit;
29
- const { t } = require_index$1.useLocale();
30
- const ns = require_index$2.useNamespace("input-number");
29
+ const { t } = require_index.useLocale();
30
+ const ns = require_index$1.useNamespace("input-number");
31
31
  const input = (0, vue.ref)();
32
32
  const data = (0, vue.reactive)({
33
33
  currentValue: props.modelValue,
@@ -243,21 +243,21 @@ var input_number_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
243
243
  "aria-label": (0, vue.unref)(t)("el.inputNumber.decrease"),
244
244
  class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("decrease"), (0, vue.unref)(ns).is("disabled", minDisabled.value)]),
245
245
  onKeydown: (0, vue.withKeys)(decrease, ["enter"])
246
- }, [(0, vue.renderSlot)(_ctx.$slots, "decrease-icon", {}, () => [(0, vue.createVNode)((0, vue.unref)(require_index$3.ElIcon), null, {
246
+ }, [(0, vue.renderSlot)(_ctx.$slots, "decrease-icon", {}, () => [(0, vue.createVNode)((0, vue.unref)(require_index$2.ElIcon), null, {
247
247
  default: (0, vue.withCtx)(() => [controlsAtRight.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.ArrowDown), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.Minus), { key: 1 }))]),
248
248
  _: 1
249
- })])], 42, _hoisted_1)), [[(0, vue.unref)(require_index.vRepeatClick), decrease]]) : (0, vue.createCommentVNode)("v-if", true),
249
+ })])], 42, _hoisted_1)), [[(0, vue.unref)(require_index$4.vRepeatClick), decrease]]) : (0, vue.createCommentVNode)("v-if", true),
250
250
  __props.controls ? (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
251
251
  key: 1,
252
252
  role: "button",
253
253
  "aria-label": (0, vue.unref)(t)("el.inputNumber.increase"),
254
254
  class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("increase"), (0, vue.unref)(ns).is("disabled", maxDisabled.value)]),
255
255
  onKeydown: (0, vue.withKeys)(increase, ["enter"])
256
- }, [(0, vue.renderSlot)(_ctx.$slots, "increase-icon", {}, () => [(0, vue.createVNode)((0, vue.unref)(require_index$3.ElIcon), null, {
256
+ }, [(0, vue.renderSlot)(_ctx.$slots, "increase-icon", {}, () => [(0, vue.createVNode)((0, vue.unref)(require_index$2.ElIcon), null, {
257
257
  default: (0, vue.withCtx)(() => [controlsAtRight.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.ArrowUp), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.Plus), { key: 1 }))]),
258
258
  _: 1
259
- })])], 42, _hoisted_2)), [[(0, vue.unref)(require_index.vRepeatClick), increase]]) : (0, vue.createCommentVNode)("v-if", true),
260
- (0, vue.createVNode)((0, vue.unref)(require_index$4.ElInput), {
259
+ })])], 42, _hoisted_2)), [[(0, vue.unref)(require_index$4.vRepeatClick), increase]]) : (0, vue.createCommentVNode)("v-if", true),
260
+ (0, vue.createVNode)((0, vue.unref)(require_index$3.ElInput), {
261
261
  id: __props.id,
262
262
  ref_key: "input",
263
263
  ref: input,
@@ -1 +1 @@
1
- {"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAmHA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,gBAAA,UAAU;EACxB,MAAM,KAAK,gBAAA,aAAa,cAAc;EACtC,MAAM,SAAA,GAAQ,IAAA,IAAA,CAAmB;EAMjC,MAAM,QAAA,GAAO,IAAA,SAAA,CAAe;GAC1B,cAAc,MAAM;GACpB,WAAW;EACb,CAAC;EAED,MAAM,EAAE,aAAa,sBAAA,YAAY;EAEjC,MAAM,eAAA,GAAc,IAAA,SAAA,OACZ,cAAA,SAAS,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,GAChE;EACA,MAAM,eAAA,GAAc,IAAA,SAAA,OACZ,cAAA,SAAS,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,GAChE;EAEA,MAAM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wBAAA,IAAA,GAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA;;IATH,CAAA,CAAA,CAAA,CAAA,GAAA,IAAA,UAAA,IAAA,CAAA,EAAA,GAAA,IAAA,MAAA,CAAA,cAAA,YAAA,GAAA,QAAQ,CAAA,CAAA,KAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA;KAa1B,GAAA,IAAA,YAAA,EAAA,GA+BW,IAAA,MAAA,CAAA,gBAAA,OAAA,GAAA;KA9BR,IAAI,QAAA;KACD,SAAA;KAAJ,KAAI;KACH,MAAM,QAAA,YAAS,SAAA;KACf,MAAM,QAAA;KACN,eAAa,aAAA;KACb,aAAa,QAAA;KACb,UAAU,QAAA;KACV,WAAA,GAAU,IAAA,MAAA,CAAA,mBAAA;KACV,OAAA,GAAM,IAAA,MAAA,CAAA,eAAA;KACN,KAAK,QAAA;KACL,KAAK,QAAA;KACL,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,kBAAgB;KAChB,WAAW,QAAA;KACX,WAAW,QAAA;KACX,QAAQ,QAAA;KACR,UAAU,QAAA;KACV,WAAS;KACT,QAAM;KACN,SAAO;KACP,SAAO;KACP,UAAQ;IAEOA,IAAAA,GAAAA,IAAAA,YAAAA,CAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,KAAAA,OAAO,SAAA;KAAS,MAAA;KAC9B,KAAA,GAAA,IAAA,QAAA,OAAsB,EAAA,GAAtB,IAAA,WAAA,CAAsB,KAAA,QAAA,QAAA,CAAA,CAAA;;IAERA,IAAAA,KAAAA,GAAAA,KAAAA,OAAO,SAAA;KAAS,MAAA;KAC9B,KAAA,GAAA,IAAA,QAAA,OAAsB,EAAA,GAAtB,IAAA,WAAA,CAAsB,KAAA,QAAA,QAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAmHA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,cAAA,UAAU;EACxB,MAAM,KAAK,gBAAA,aAAa,cAAc;EACtC,MAAM,SAAA,GAAQ,IAAA,IAAA,CAAmB;EAMjC,MAAM,QAAA,GAAO,IAAA,SAAA,CAAe;GAC1B,cAAc,MAAM;GACpB,WAAW;EACb,CAAC;EAED,MAAM,EAAE,aAAa,sBAAA,YAAY;EAEjC,MAAM,eAAA,GAAc,IAAA,SAAA,OACZ,cAAA,SAAS,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,GAChE;EACA,MAAM,eAAA,GAAc,IAAA,SAAA,OACZ,cAAA,SAAS,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,GAChE;EAEA,MAAM,gBAAA,GAAe,IAAA,SAAA,OAAe;GAClC,MAAM,gBAAgB,aAAa,MAAM,IAAI;GAC7C,IAAI,CAAC,cAAA,YAAY,MAAM,SAAS,GAAG;IACjC,IAAI,gBAAgB,MAAM,WACxB,cAAA,UACE,eACA,8DACF;IAEF,O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AA,KAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA;KAa1B,GAAA,IAAA,YAAA,EAAA,GA+BW,IAAA,MAAA,CAAA,gBAAA,OAAA,GAAA;KA9BR,IAAI,QAAA;KACD,SAAA;KAAJ,KAAI;KACH,MAAM,QAAA,YAAS,SAAA;KACf,MAAM,QAAA;KACN,eAAa,aAAA;KACb,aAAa,QAAA;KACb,UAAU,QAAA;KACV,WAAA,GAAU,IAAA,MAAA,CAAA,mBAAA;KACV,OAAA,GAAM,IAAA,MAAA,CAAA,eAAA;KACN,KAAK,QAAA;KACL,KAAK,QAAA;KACL,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,kBAAgB;KAChB,WAAW,QAAA;KACX,WAAW,QAAA;KACX,QAAQ,QAAA;KACR,UAAU,QAAA;KACV,WAAS;KACT,QAAM;KACN,SAAO;KACP,SAAO;KACP,UAAQ;IAEOA,IAAAA,GAAAA,IAAAA,YAAAA,CAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,KAAAA,OAAO,SAAA;KAAS,MAAA;KAC9B,KAAA,GAAA,IAAA,QAAA,OAAsB,EAAA,GAAtB,IAAA,WAAA,CAAsB,KAAA,QAAA,QAAA,CAAA,CAAA;;IAERA,IAAAA,KAAAA,GAAAA,KAAAA,OAAO,SAAA;KAAS,MAAA;KAC9B,KAAA,GAAA,IAAA,QAAA,OAAsB,EAAA,GAAtB,IAAA,WAAA,CAAsB,KAAA,QAAA,QAAA,CAAA,CAAA"}
@@ -2,11 +2,11 @@ import { InputOtpProps } from "./input-otp.js";
2
2
  import * as _$vue from "vue";
3
3
 
4
4
  //#region ../../packages/components/input-otp/src/input-otp.vue.d.ts
5
- declare var __VLS_1: {
5
+ declare var __VLS_2: {
6
6
  index: number;
7
7
  };
8
8
  type __VLS_Slots = {} & {
9
- separator?: (props: typeof __VLS_1) => any;
9
+ separator?: (props: typeof __VLS_2) => any;
10
10
  };
11
11
  declare const __VLS_base: _$vue.DefineComponent<InputOtpProps, {
12
12
  /**
@@ -28,16 +28,16 @@ declare const __VLS_base: _$vue.DefineComponent<InputOtpProps, {
28
28
  blur: (eve: FocusEvent) => void;
29
29
  finish: (value: string) => void;
30
30
  }, string, _$vue.PublicProps, Readonly<InputOtpProps> & Readonly<{
31
- onChange?: ((value: string) => any) | undefined;
32
31
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
32
+ onChange?: ((value: string) => any) | undefined;
33
33
  onFocus?: ((eve: FocusEvent) => any) | undefined;
34
34
  onBlur?: ((eve: FocusEvent) => any) | undefined;
35
35
  onFinish?: ((value: string) => any) | undefined;
36
36
  }>, {
37
- validator: (char: string, index: number) => boolean;
38
- type: "outlined" | "filled" | "underlined";
39
37
  length: number;
38
+ type: "filled" | "outlined" | "underlined";
40
39
  disabled: boolean;
40
+ validator: (char: string, index: number) => boolean;
41
41
  validateEvent: boolean;
42
42
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
43
43
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -21,7 +21,7 @@ declare function useInputTag({
21
21
  isFocused: _$vue.Ref<boolean, boolean>;
22
22
  isComposing: _$vue.Ref<boolean, boolean>;
23
23
  inputValue: _$vue.Ref<string | undefined, string | undefined>;
24
- size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
24
+ size: _$vue.ComputedRef<"" | "small" | "default" | "large">;
25
25
  tagSize: _$vue.ComputedRef<"default" | "small">;
26
26
  placeholder: _$vue.ComputedRef<string | undefined>;
27
27
  closable: _$vue.ComputedRef<boolean>;
@@ -138,7 +138,7 @@ declare const inputTagProps: {
138
138
  readonly draggable: BooleanConstructor;
139
139
  readonly delimiter: EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
140
140
  readonly size: {
141
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
141
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
142
142
  readonly required: false;
143
143
  readonly validator: ((val: unknown) => boolean) | undefined;
144
144
  __epPropKey: true;
@@ -4,7 +4,7 @@ import { InputTagProps } from "./input-tag.js";
4
4
  import * as _$vue from "vue";
5
5
 
6
6
  //#region ../../packages/components/input-tag/src/input-tag.vue.d.ts
7
- declare var __VLS_1: {}, __VLS_15: {
7
+ declare var __VLS_1: {}, __VLS_16: {
8
8
  value: string;
9
9
  index: number;
10
10
  }, __VLS_41: {
@@ -14,7 +14,7 @@ declare var __VLS_1: {}, __VLS_15: {
14
14
  type __VLS_Slots = {} & {
15
15
  prefix?: (props: typeof __VLS_1) => any;
16
16
  } & {
17
- tag?: (props: typeof __VLS_15) => any;
17
+ tag?: (props: typeof __VLS_16) => any;
18
18
  } & {
19
19
  tag?: (props: typeof __VLS_41) => any;
20
20
  } & {
@@ -24,32 +24,32 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
24
24
  focus: () => void;
25
25
  blur: () => void;
26
26
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
27
- clear: () => void;
28
27
  "update:modelValue": (value?: string[] | undefined) => void;
29
- input: (value: string) => void;
30
28
  change: (value?: string[] | undefined) => void;
29
+ input: (value: string) => void;
30
+ clear: () => void;
31
31
  focus: (evt: FocusEvent) => void;
32
32
  blur: (evt: FocusEvent) => void;
33
33
  "add-tag": (value: string | string[]) => void;
34
34
  "remove-tag": (value: string, index: number) => void;
35
35
  "drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
36
36
  }, string, _$vue.PublicProps, Readonly<InputTagProps> & Readonly<{
37
- onClear?: (() => any) | undefined;
38
- onChange?: ((value?: string[] | undefined) => any) | undefined;
39
37
  "onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
38
+ onChange?: ((value?: string[] | undefined) => any) | undefined;
40
39
  onInput?: ((value: string) => any) | undefined;
40
+ onClear?: (() => any) | undefined;
41
41
  onFocus?: ((evt: FocusEvent) => any) | undefined;
42
42
  onBlur?: ((evt: FocusEvent) => any) | undefined;
43
43
  "onAdd-tag"?: ((value: string | string[]) => any) | undefined;
44
44
  "onRemove-tag"?: ((value: string, index: number) => any) | undefined;
45
45
  "onDrag-tag"?: ((oldIndex: number, newIndex: number, value: string) => any) | undefined;
46
46
  }>, {
47
- effect: PopperEffect;
48
47
  id: string;
49
48
  disabled: boolean;
49
+ tabindex: string | number;
50
+ effect: PopperEffect;
50
51
  autocomplete: string;
51
52
  clearIcon: IconPropType;
52
- tabindex: string | number;
53
53
  validateEvent: boolean;
54
54
  trigger: "Enter" | "Space";
55
55
  maxCollapseTags: number;
@@ -35,7 +35,7 @@ interface LinkProps {
35
35
  * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
36
36
  */
37
37
  declare const linkProps: {
38
- readonly type: EpPropFinalized<StringConstructor, "default" | "info" | "primary" | "success" | "warning" | "danger", unknown, undefined, boolean>;
38
+ readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "default" | "danger", unknown, undefined, boolean>;
39
39
  readonly underline: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
40
40
  readonly disabled: BooleanConstructor;
41
41
  readonly href: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -13,10 +13,10 @@ declare const __VLS_base: _$vue.DefineComponent<LinkProps, {}, {}, {}, {}, _$vue
13
13
  }, string, _$vue.PublicProps, Readonly<LinkProps> & Readonly<{
14
14
  onClick?: ((evt: MouseEvent) => any) | undefined;
15
15
  }>, {
16
- type: "primary" | "success" | "warning" | "info" | "danger" | "default";
16
+ type: "info" | "primary" | "success" | "warning" | "default" | "danger";
17
+ target: (string & {}) | "_self" | "_blank" | "_parent" | "_top";
17
18
  underline: boolean | "always" | "never" | "hover";
18
19
  href: string;
19
- target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
20
20
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
22
  declare const _default: typeof __VLS_export;
@@ -3,18 +3,18 @@ import { MentionDropdownProps } from "./mention-dropdown.js";
3
3
  import * as _$vue from "vue";
4
4
 
5
5
  //#region ../../packages/components/mention/src/mention-dropdown.vue.d.ts
6
- declare var __VLS_1: {}, __VLS_11: {
6
+ declare var __VLS_1: {}, __VLS_10: {
7
7
  item: MentionOption;
8
8
  index: number;
9
- }, __VLS_13: {}, __VLS_15: {};
9
+ }, __VLS_12: {}, __VLS_14: {};
10
10
  type __VLS_Slots = {} & {
11
11
  header?: (props: typeof __VLS_1) => any;
12
12
  } & {
13
- label?: (props: typeof __VLS_11) => any;
13
+ label?: (props: typeof __VLS_10) => any;
14
14
  } & {
15
- loading?: (props: typeof __VLS_13) => any;
15
+ loading?: (props: typeof __VLS_12) => any;
16
16
  } & {
17
- footer?: (props: typeof __VLS_15) => any;
17
+ footer?: (props: typeof __VLS_14) => any;
18
18
  };
19
19
  declare const __VLS_base: _$vue.DefineComponent<MentionDropdownProps, {
20
20
  hoveringIndex: _$vue.Ref<number, number>;
@@ -97,12 +97,12 @@ declare const mentionProps: {
97
97
  popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
98
98
  popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
99
99
  props: EpPropFinalized<(new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps) | (((new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps)) | null)[], unknown, unknown, () => Required<MentionOptionProps>, boolean>;
100
- inputmode: EpPropFinalized<(new (...args: any[]) => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
100
+ inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
101
101
  name: StringConstructor;
102
102
  ariaLabel: StringConstructor;
103
103
  id: EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
104
104
  size: {
105
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
105
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
106
106
  readonly required: false;
107
107
  readonly validator: ((val: unknown) => boolean) | undefined;
108
108
  __epPropKey: true;
@@ -9,10 +9,10 @@ declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_prop
9
9
  props: _$vue.PublicProps & __VLS_PrettifyLocal<MentionProps<T> & {
10
10
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
11
11
  onInput?: ((value: string) => any) | undefined;
12
+ onSearch?: ((pattern: string, prefix: string) => any) | undefined;
13
+ onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
12
14
  onFocus?: ((evt: FocusEvent) => any) | undefined;
13
15
  onBlur?: ((evt: FocusEvent) => any) | undefined;
14
- onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
15
- onSearch?: ((pattern: string, prefix: string) => any) | undefined;
16
16
  "onWhole-remove"?: ((pattern: string, prefix: string) => any) | undefined;
17
17
  }> & (typeof globalThis extends {
18
18
  __VLS_PROPS_FALLBACK: infer P;
@@ -46,7 +46,7 @@ declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_prop
46
46
  index: number;
47
47
  }) => any;
48
48
  };
49
- emit: ((event: "update:modelValue", value: string) => void) & ((event: "input", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "select", option: MentionOption, prefix: string) => void) & ((event: "search", pattern: string, prefix: string) => void) & ((event: "whole-remove", pattern: string, prefix: string) => void);
49
+ emit: ((event: "update:modelValue", value: string) => void) & ((event: "input", value: string) => void) & ((event: "search", pattern: string, prefix: string) => void) & ((event: "select", option: MentionOption, prefix: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "whole-remove", pattern: string, prefix: string) => void);
50
50
  }>) => _$vue.VNode & {
51
51
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
52
52
  };
@@ -13,7 +13,7 @@ declare const menuProps: {
13
13
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
14
14
  readonly uniqueOpened: BooleanConstructor;
15
15
  readonly router: BooleanConstructor;
16
- readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
16
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
17
17
  readonly collapse: BooleanConstructor;
18
18
  readonly backgroundColor: StringConstructor;
19
19
  readonly textColor: StringConstructor;
@@ -44,7 +44,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
44
44
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
45
45
  readonly uniqueOpened: BooleanConstructor;
46
46
  readonly router: BooleanConstructor;
47
- readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
47
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
48
48
  readonly collapse: BooleanConstructor;
49
49
  readonly backgroundColor: StringConstructor;
50
50
  readonly textColor: StringConstructor;
@@ -72,7 +72,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
72
72
  readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
73
73
  readonly uniqueOpened: BooleanConstructor;
74
74
  readonly router: BooleanConstructor;
75
- readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
75
+ readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
76
76
  readonly collapse: BooleanConstructor;
77
77
  readonly backgroundColor: StringConstructor;
78
78
  readonly textColor: StringConstructor;
@@ -89,8 +89,8 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
89
89
  readonly hideTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
90
90
  readonly persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
91
91
  }>> & Readonly<{
92
- onClose?: ((index: string, indexPath: string[]) => any) | undefined;
93
92
  onSelect?: ((index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => any) | undefined;
93
+ onClose?: ((index: string, indexPath: string[]) => any) | undefined;
94
94
  onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
95
95
  }>, {
96
96
  readonly collapse: boolean;
@@ -103,7 +103,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
103
103
  readonly hideTimeout: number;
104
104
  readonly defaultActive: string;
105
105
  readonly defaultOpeneds: string[];
106
- readonly menuTrigger: EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
106
+ readonly menuTrigger: EpPropMergeType<StringConstructor, "hover" | "click", unknown>;
107
107
  readonly collapseTransition: EpPropMergeType<BooleanConstructor, unknown, unknown>;
108
108
  readonly popperOffset: number;
109
109
  readonly ellipsisIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
@@ -7,9 +7,9 @@ const require_runtime = require("../../../utils/vue/props/runtime.js");
7
7
  const require_icon = require("../../../utils/vue/icon.js");
8
8
  const require_vnode = require("../../../utils/vue/vnode.js");
9
9
  const require_typescript = require("../../../utils/typescript.js");
10
- const require_index = require("../../../directives/click-outside/index.js");
11
- const require_index$1 = require("../../../hooks/use-namespace/index.js");
12
- const require_index$2 = require("../../icon/index.js");
10
+ const require_index = require("../../../hooks/use-namespace/index.js");
11
+ const require_index$1 = require("../../icon/index.js");
12
+ const require_index$2 = require("../../../directives/click-outside/index.js");
13
13
  const require_menu_bar = require("./utils/menu-bar.js");
14
14
  const require_menu_collapse_transition = require("./menu-collapse-transition.js");
15
15
  const require_use_menu_css_var = require("./use-menu-css-var.js");
@@ -180,8 +180,8 @@ var menu_default = (0, vue.defineComponent)({
180
180
  const router = instance.appContext.config.globalProperties.$router;
181
181
  const menu = (0, vue.ref)();
182
182
  const subMenu = (0, vue.ref)();
183
- const nsMenu = require_index$1.useNamespace("menu");
184
- const nsSubMenu = require_index$1.useNamespace("sub-menu");
183
+ const nsMenu = require_index.useNamespace("menu");
184
+ const nsSubMenu = require_index.useNamespace("sub-menu");
185
185
  let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
186
186
  const sliceIndex = (0, vue.ref)(-1);
187
187
  const openedMenus = (0, vue.ref)(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
@@ -370,12 +370,12 @@ var menu_default = (0, vue.defineComponent)({
370
370
  class: nsSubMenu.e("hide-arrow"),
371
371
  popperOffset: props.popperOffset
372
372
  }, {
373
- title: () => (0, vue.h)(require_index$2.ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => (0, vue.h)(props.ellipsisIcon) }),
373
+ title: () => (0, vue.h)(require_index$1.ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => (0, vue.h)(props.ellipsisIcon) }),
374
374
  default: () => slotMore
375
375
  }));
376
376
  }
377
377
  }
378
- const directives = props.closeOnClickOutside ? [[require_index.default, () => {
378
+ const directives = props.closeOnClickOutside ? [[require_index$2.default, () => {
379
379
  if (!openedMenus.value.length) return;
380
380
  if (!mouseInChild.value) {
381
381
  openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isArray","isString","isObject","isUndefined","defineComponent","getCurrentInstance","ref","useNamespace","computed","isNil","unrefElement","useResizeObserver","MENU_INJECTION_KEY","reactive","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","h","ElSubMenu","ElIcon","vClickoutside","withDirectives","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { ClassValue } from '@element-plus/utils'\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n StyleValue,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n }) as unknown as MenuProvider // Avoid TS2589\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,UAAU;EACjC,SAAS;CACX;;;;CAIA,eAAe;EACb,MAAM;EACN,SAAS;CACX;;;;CAIA,gBAAgB;EACd,MAAMC,gBAAAA,eAAyB,KAAK;EACpC,eAAeC,mBAAAA,QAAQ,CAAC,CAAU;CACpC;;;;CAIA,cAAc;;;;CAId,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,QAAQ,CAAC,SAAS,OAAO;EACzB,SAAS;CACX;;;;CAIA,UAAU;;;;;CAKV,iBAAiB;;;;;CAKjB,WAAW;;;;;CAKX,iBAAiB;;;;CAIjB,qBAAqB;;;;CAIrB,oBAAoB;EAClB,MAAM;EACN,SAAS;CACX;;;;CAIA,UAAU;EACR,MAAM;EACN,SAAS;CACX;;;;CAIA,cAAc;EACZ,MAAM;EACN,SAAS;CACX;;;;CAIA,cAAc;EACZ,MAAMC,aAAAA;EACN,eAAeC,wBAAAA;CACjB;;;;CAIA,cAAc;EACZ,MAAMH,gBAAAA,eAA6B,MAAM;EACzC,SAAS;CACX;;;;CAIA,aAAa;EACX,MAAMA,gBAAAA,eAA2B;GAAC;GAAQ;GAAO;GAAQ;EAAO,CAAC;EACjE,SAAS,KAAA;CACX;;;;C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G,WAAW,KAAK;IAE5C,MAAM,WACJ,WAAW,UAAU,KAAK,CAAC,IAAI,aAAa,MAAM,WAAW,KAAK;IAEpE,IAAI,UAAU,UAAU,MAAM,UAAU;KACtC,OAAO;KACP,UAAU,MAAA,GACRC,IAAAA,EAAAA,CACEC,iBAAAA,SACA;MACE,KAAK;MACL,OAAO;MACP,OAAO,UAAU,EAAE,YAAY;MAC/B,cAAc,MAAM;KACtB,GACA;MACE,cAAA,GACED,IAAAA,EAAAA,CACEE,gBAAAA,QACA,EACE,OAAO,UAAU,EAAE,WAAW,EAChC,GACA,EACE,gBAAA,GAAeF,IAAAA,EAAAA,CAAE,MAAM,YAAyB,EAClD,CACF;MACF,eAAe;KACjB,CACF,CACF;IACF;GACF;GAEA,MAAM,aAAiC,MAAM,sBACzC,CACE,CACEG,cAAAA,eACM;IACJ,IAAI,CAAC,YAAY,MAAM,QAAQ;IAE/B,IAAI,CAAC,aAAa,OAAO;KACvB,YAAY,MAAM,SAAS,eACzB,KAAK,SAAS,YAAY,aAAa,UAAU,CAAC,CACpD;KAEA,YAAY,QAAQ,CAAC;IACvB;GACF,CACF,CACF,IACA,CAAC;GAEL,MAAM,SAAA,GAAQC,IAAAA,eAAAA,EAAAA,GACZJ,IAAAA,EAAAA,CACE,MACA;IACE,KAAK,OAAO,MAAM,QAAQ;IAC1B,MAAM;IACN,KAAK;IACL,OAAO,QAAQ;IACf,OAAO;MACJ,OAAO,EAAE,IAAI;MACb,OAAO,EAAE,MAAM,IAAI,IAAI;MACvB,OAAO,EAAE,UAAU,IAAI,MAAM;IAChC;GACF,GACA,CAAC,GAAG,MAAM,GAAG,SAAS,CACxB,GACA,UACF;GAEA,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAOA,IAAAA,EAAAA,CAAEK,iCAAAA,eAAgC,KAAK;GAGhD,OAAO;EACT;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isArray","isString","isObject","isUndefined","defineComponent","getCurrentInstance","ref","useNamespace","computed","isNil","unrefElement","useResizeObserver","MENU_INJECTION_KEY","reactive","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","h","ElSubMenu","ElIcon","vClickoutside","withDirectives","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { ClassValue } from '@element-plus/utils'\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n StyleValue,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n }) as unknown as MenuProvider // Avoid TS2589\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,UAAU;EACjC,SAAS;CACX;;;;CAIA,eAAe;EACb,MAAM;EACN,SAAS;CACX;;;;CAIA,gBAAgB;EACd,MA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,YAAY,MAAM,SAAS,eACzB,KAAK,SAAS,YAAY,aAAa,UAAU,CAAC,CACpD;KAEA,YAAY,QAAQ,CAAC;IACvB;GACF,CACF,CACF,IACA,CAAC;GAEL,MAAM,SAAA,GAAQC,IAAAA,eAAAA,EAAAA,GACZJ,IAAAA,EAAAA,CACE,MACA;IACE,KAAK,OAAO,MAAM,QAAQ;IAC1B,MAAM;IACN,KAAK;IACL,OAAO,QAAQ;IACf,OAAO;MACJ,OAAO,EAAE,IAAI;MACb,OAAO,EAAE,MAAM,IAAI,IAAI;MACvB,OAAO,EAAE,UAAU,IAAI,MAAM;IAChC;GACF,GACA,CAAC,GAAG,MAAM,GAAG,SAAS,CACxB,GACA,UACF;GAEA,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAOA,IAAAA,EAAAA,CAAEK,iCAAAA,eAAgC,KAAK;GAGhD,OAAO;EACT;CACF;AACF,CAAC"}
@@ -125,9 +125,9 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
125
125
  };
126
126
  }>> & Readonly<{}>, {
127
127
  readonly disabled: boolean;
128
+ readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
128
129
  readonly popperClass: ClassValue;
129
130
  readonly popperStyle: StyleValue;
130
- readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
131
131
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
132
132
  //#endregion
133
133
  export { SubMenuProps, SubMenuPropsPublic, _default as default, subMenuProps };