@element-plus/nightly 0.0.20250707 → 0.0.20250709

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 (522) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +31 -16
  3. package/dist/index.full.min.js +11 -11
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +11 -11
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +31 -16
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/badge/index.mjs +2 -2
  277. package/es/components/badge/src/badge.mjs +32 -71
  278. package/es/components/badge/src/badge.mjs.map +1 -1
  279. package/es/components/badge/src/badge2.mjs +71 -32
  280. package/es/components/badge/src/badge2.mjs.map +1 -1
  281. package/es/components/button/index.mjs +1 -1
  282. package/es/components/button/src/button-group.mjs +29 -6
  283. package/es/components/button/src/button-group.mjs.map +1 -1
  284. package/es/components/button/src/button-group2.mjs +6 -29
  285. package/es/components/button/src/button-group2.mjs.map +1 -1
  286. package/es/components/calendar/index.mjs +2 -2
  287. package/es/components/calendar/src/calendar.mjs +134 -16
  288. package/es/components/calendar/src/calendar.mjs.map +1 -1
  289. package/es/components/calendar/src/calendar2.mjs +16 -134
  290. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  291. package/es/components/cascader/index.mjs +2 -2
  292. package/es/components/cascader/src/cascader.mjs +652 -81
  293. package/es/components/cascader/src/cascader.mjs.map +1 -1
  294. package/es/components/cascader/src/cascader2.mjs +81 -652
  295. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  296. package/es/components/checkbox/index.mjs +2 -2
  297. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  298. package/es/components/checkbox/src/checkbox.mjs +119 -59
  299. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  300. package/es/components/checkbox/src/checkbox2.mjs +59 -119
  301. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  302. package/es/components/countdown/index.mjs +2 -2
  303. package/es/components/countdown/src/countdown.mjs +79 -21
  304. package/es/components/countdown/src/countdown.mjs.map +1 -1
  305. package/es/components/countdown/src/countdown2.mjs +21 -79
  306. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  307. package/es/components/descriptions/index.mjs +2 -2
  308. package/es/components/descriptions/src/description.mjs +26 -127
  309. package/es/components/descriptions/src/description.mjs.map +1 -1
  310. package/es/components/descriptions/src/description2.mjs +127 -26
  311. package/es/components/descriptions/src/description2.mjs.map +1 -1
  312. package/es/components/dialog/src/dialog.mjs +1 -1
  313. package/es/components/empty/index.mjs +2 -2
  314. package/es/components/empty/src/empty.mjs +52 -11
  315. package/es/components/empty/src/empty.mjs.map +1 -1
  316. package/es/components/empty/src/empty2.mjs +11 -52
  317. package/es/components/empty/src/empty2.mjs.map +1 -1
  318. package/es/components/index.mjs +15 -15
  319. package/es/components/input-tag/src/composables/use-input-tag.d.ts +2 -2
  320. package/es/components/input-tag/src/composables/use-input-tag.mjs +24 -12
  321. package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -1
  322. package/es/components/input-tag/src/input-tag.d.ts +1 -1
  323. package/es/components/input-tag/src/input-tag.mjs +1 -1
  324. package/es/components/input-tag/src/input-tag.mjs.map +1 -1
  325. package/es/components/input-tag/src/input-tag.vue.d.ts +2 -2
  326. package/es/components/menu/index.mjs +2 -2
  327. package/es/components/menu/src/menu-item.mjs +15 -100
  328. package/es/components/menu/src/menu-item.mjs.map +1 -1
  329. package/es/components/menu/src/menu-item2.mjs +100 -15
  330. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  331. package/es/components/page-header/index.mjs +2 -2
  332. package/es/components/page-header/src/page-header.mjs +97 -16
  333. package/es/components/page-header/src/page-header.mjs.map +1 -1
  334. package/es/components/page-header/src/page-header2.mjs +16 -97
  335. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  336. package/es/components/pagination/src/components/jumper.mjs +7 -58
  337. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  338. package/es/components/pagination/src/components/jumper2.mjs +58 -7
  339. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  340. package/es/components/pagination/src/components/next.mjs +35 -18
  341. package/es/components/pagination/src/components/next.mjs.map +1 -1
  342. package/es/components/pagination/src/components/next2.mjs +18 -35
  343. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  344. package/es/components/pagination/src/components/pager.mjs +210 -16
  345. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  346. package/es/components/pagination/src/components/pager2.mjs +16 -210
  347. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  348. package/es/components/pagination/src/pagination.mjs +3 -3
  349. package/es/components/radio/index.mjs +2 -2
  350. package/es/components/radio/src/radio-group.mjs +65 -34
  351. package/es/components/radio/src/radio-group.mjs.map +1 -1
  352. package/es/components/radio/src/radio-group2.mjs +34 -65
  353. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  354. package/es/components/scrollbar/index.mjs +1 -1
  355. package/es/components/scrollbar/src/bar2.mjs +1 -1
  356. package/es/components/scrollbar/src/thumb.mjs +11 -139
  357. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  358. package/es/components/scrollbar/src/thumb2.mjs +139 -11
  359. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  360. package/es/components/segmented/index.mjs +2 -2
  361. package/es/components/segmented/src/segmented.mjs +42 -168
  362. package/es/components/segmented/src/segmented.mjs.map +1 -1
  363. package/es/components/segmented/src/segmented2.mjs +168 -42
  364. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  365. package/es/components/select/src/select2.mjs +4 -1
  366. package/es/components/select/src/select2.mjs.map +1 -1
  367. package/es/components/tabs/index.mjs +1 -1
  368. package/es/components/tabs/src/tab-bar.mjs +11 -87
  369. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  370. package/es/components/tabs/src/tab-bar2.mjs +87 -11
  371. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  372. package/es/components/tabs/src/tab-nav.mjs +1 -1
  373. package/es/components/tabs/src/tab-pane2.mjs +2 -1
  374. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  375. package/es/components/teleport/index.mjs +2 -2
  376. package/es/components/teleport/src/teleport.mjs +8 -18
  377. package/es/components/teleport/src/teleport.mjs.map +1 -1
  378. package/es/components/teleport/src/teleport2.mjs +18 -8
  379. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  380. package/es/components/timeline/index.mjs +2 -2
  381. package/es/components/timeline/src/timeline-item.mjs +72 -33
  382. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  383. package/es/components/timeline/src/timeline-item2.mjs +33 -72
  384. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  385. package/es/components/tooltip/src/content.mjs +1 -1
  386. package/es/components/tour/src/tour.mjs +1 -1
  387. package/es/components/watermark/index.mjs +2 -2
  388. package/es/components/watermark/src/watermark.mjs +220 -27
  389. package/es/components/watermark/src/watermark.mjs.map +1 -1
  390. package/es/components/watermark/src/watermark2.mjs +27 -220
  391. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  392. package/es/index.d.ts +3 -3
  393. package/es/index.mjs +15 -15
  394. package/es/version.d.ts +1 -1
  395. package/es/version.mjs +1 -1
  396. package/es/version.mjs.map +1 -1
  397. package/lib/components/badge/index.js +2 -2
  398. package/lib/components/badge/src/badge.js +32 -71
  399. package/lib/components/badge/src/badge.js.map +1 -1
  400. package/lib/components/badge/src/badge2.js +71 -32
  401. package/lib/components/badge/src/badge2.js.map +1 -1
  402. package/lib/components/button/index.js +1 -1
  403. package/lib/components/button/src/button-group.js +29 -6
  404. package/lib/components/button/src/button-group.js.map +1 -1
  405. package/lib/components/button/src/button-group2.js +6 -29
  406. package/lib/components/button/src/button-group2.js.map +1 -1
  407. package/lib/components/calendar/index.js +2 -2
  408. package/lib/components/calendar/src/calendar.js +134 -17
  409. package/lib/components/calendar/src/calendar.js.map +1 -1
  410. package/lib/components/calendar/src/calendar2.js +17 -134
  411. package/lib/components/calendar/src/calendar2.js.map +1 -1
  412. package/lib/components/cascader/index.js +2 -2
  413. package/lib/components/cascader/src/cascader.js +652 -82
  414. package/lib/components/cascader/src/cascader.js.map +1 -1
  415. package/lib/components/cascader/src/cascader2.js +82 -652
  416. package/lib/components/cascader/src/cascader2.js.map +1 -1
  417. package/lib/components/checkbox/index.js +2 -2
  418. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  419. package/lib/components/checkbox/src/checkbox.js +119 -60
  420. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  421. package/lib/components/checkbox/src/checkbox2.js +60 -119
  422. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  423. package/lib/components/countdown/index.js +2 -2
  424. package/lib/components/countdown/src/countdown.js +79 -22
  425. package/lib/components/countdown/src/countdown.js.map +1 -1
  426. package/lib/components/countdown/src/countdown2.js +22 -79
  427. package/lib/components/countdown/src/countdown2.js.map +1 -1
  428. package/lib/components/descriptions/index.js +2 -2
  429. package/lib/components/descriptions/src/description.js +26 -127
  430. package/lib/components/descriptions/src/description.js.map +1 -1
  431. package/lib/components/descriptions/src/description2.js +127 -26
  432. package/lib/components/descriptions/src/description2.js.map +1 -1
  433. package/lib/components/dialog/src/dialog.js +1 -1
  434. package/lib/components/empty/index.js +2 -2
  435. package/lib/components/empty/src/empty.js +52 -11
  436. package/lib/components/empty/src/empty.js.map +1 -1
  437. package/lib/components/empty/src/empty2.js +11 -52
  438. package/lib/components/empty/src/empty2.js.map +1 -1
  439. package/lib/components/index.js +15 -15
  440. package/lib/components/input-tag/src/composables/use-input-tag.d.ts +2 -2
  441. package/lib/components/input-tag/src/composables/use-input-tag.js +24 -12
  442. package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -1
  443. package/lib/components/input-tag/src/input-tag.d.ts +1 -1
  444. package/lib/components/input-tag/src/input-tag.js +1 -1
  445. package/lib/components/input-tag/src/input-tag.js.map +1 -1
  446. package/lib/components/input-tag/src/input-tag.vue.d.ts +2 -2
  447. package/lib/components/menu/index.js +2 -2
  448. package/lib/components/menu/src/menu-item.js +16 -100
  449. package/lib/components/menu/src/menu-item.js.map +1 -1
  450. package/lib/components/menu/src/menu-item2.js +100 -16
  451. package/lib/components/menu/src/menu-item2.js.map +1 -1
  452. package/lib/components/page-header/index.js +2 -2
  453. package/lib/components/page-header/src/page-header.js +97 -17
  454. package/lib/components/page-header/src/page-header.js.map +1 -1
  455. package/lib/components/page-header/src/page-header2.js +17 -97
  456. package/lib/components/page-header/src/page-header2.js.map +1 -1
  457. package/lib/components/pagination/src/components/jumper.js +7 -58
  458. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  459. package/lib/components/pagination/src/components/jumper2.js +58 -7
  460. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  461. package/lib/components/pagination/src/components/next.js +35 -18
  462. package/lib/components/pagination/src/components/next.js.map +1 -1
  463. package/lib/components/pagination/src/components/next2.js +18 -35
  464. package/lib/components/pagination/src/components/next2.js.map +1 -1
  465. package/lib/components/pagination/src/components/pager.js +210 -16
  466. package/lib/components/pagination/src/components/pager.js.map +1 -1
  467. package/lib/components/pagination/src/components/pager2.js +16 -210
  468. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  469. package/lib/components/pagination/src/pagination.js +3 -3
  470. package/lib/components/radio/index.js +2 -2
  471. package/lib/components/radio/src/radio-group.js +65 -35
  472. package/lib/components/radio/src/radio-group.js.map +1 -1
  473. package/lib/components/radio/src/radio-group2.js +35 -65
  474. package/lib/components/radio/src/radio-group2.js.map +1 -1
  475. package/lib/components/scrollbar/index.js +1 -1
  476. package/lib/components/scrollbar/src/bar2.js +1 -1
  477. package/lib/components/scrollbar/src/thumb.js +11 -139
  478. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  479. package/lib/components/scrollbar/src/thumb2.js +139 -11
  480. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  481. package/lib/components/segmented/index.js +2 -2
  482. package/lib/components/segmented/src/segmented.js +44 -168
  483. package/lib/components/segmented/src/segmented.js.map +1 -1
  484. package/lib/components/segmented/src/segmented2.js +168 -44
  485. package/lib/components/segmented/src/segmented2.js.map +1 -1
  486. package/lib/components/select/src/select2.js +3 -0
  487. package/lib/components/select/src/select2.js.map +1 -1
  488. package/lib/components/tabs/index.js +1 -1
  489. package/lib/components/tabs/src/tab-bar.js +11 -87
  490. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  491. package/lib/components/tabs/src/tab-bar2.js +87 -11
  492. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  493. package/lib/components/tabs/src/tab-nav.js +1 -1
  494. package/lib/components/tabs/src/tab-pane2.js +2 -1
  495. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  496. package/lib/components/teleport/index.js +2 -2
  497. package/lib/components/teleport/src/teleport.js +8 -18
  498. package/lib/components/teleport/src/teleport.js.map +1 -1
  499. package/lib/components/teleport/src/teleport2.js +18 -8
  500. package/lib/components/teleport/src/teleport2.js.map +1 -1
  501. package/lib/components/timeline/index.js +2 -2
  502. package/lib/components/timeline/src/timeline-item.js +72 -33
  503. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  504. package/lib/components/timeline/src/timeline-item2.js +33 -72
  505. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  506. package/lib/components/tooltip/src/content.js +1 -1
  507. package/lib/components/tour/src/tour.js +1 -1
  508. package/lib/components/watermark/index.js +2 -2
  509. package/lib/components/watermark/src/watermark.js +220 -27
  510. package/lib/components/watermark/src/watermark.js.map +1 -1
  511. package/lib/components/watermark/src/watermark2.js +27 -220
  512. package/lib/components/watermark/src/watermark2.js.map +1 -1
  513. package/lib/index.d.ts +3 -3
  514. package/lib/index.js +15 -15
  515. package/lib/version.d.ts +1 -1
  516. package/lib/version.js +1 -1
  517. package/lib/version.js.map +1 -1
  518. package/package.json +2 -2
  519. package/theme-chalk/el-popper.css +1 -1
  520. package/theme-chalk/index.css +1 -1
  521. package/theme-chalk/src/popper.scss +1 -0
  522. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"description2.mjs","sources":["../../../../../../packages/components/descriptions/src/description.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n /**\n * @description with or without border\n */\n border: Boolean,\n /**\n * @description numbers of `Descriptions Item` in one line\n */\n column: {\n type: Number,\n default: 3,\n },\n /**\n * @description direction of list\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description size of list\n */\n size: useSizeProp,\n /**\n * @description title text, display on the top left\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description extra text, display on the top right\n */\n extra: {\n type: String,\n default: '',\n },\n /**\n * @description width of every label column\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type DescriptionProps = ExtractPropTypes<typeof descriptionProps>\nexport type DescriptionPropsPublic = __ExtractPublicPropTypes<\n typeof descriptionProps\n>\nexport type DescriptionInstance = InstanceType<typeof Description> & unknown\n"],"names":[],"mappings":";;;AAEY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"description2.mjs","sources":["../../../../../../packages/components/descriptions/src/description.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, _index) in getRows()\" :key=\"_index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, useSlots } from 'vue'\nimport { flattedChildren } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport ElDescriptionsRow from './descriptions-row.vue'\nimport { descriptionsKey } from './token'\nimport { descriptionProps } from './description'\nimport { COMPONENT_NAME } from './constants'\n\nimport type { IDescriptionsInject } from './descriptions.type'\nimport type { DescriptionItemVNode } from './description-item'\n\ndefineOptions({\n name: 'ElDescriptions',\n})\n\nconst props = defineProps(descriptionProps)\n\nconst ns = useNamespace('descriptions')\n\nconst descriptionsSize = useFormSize()\n\nconst slots = useSlots()\n\nprovide(descriptionsKey, props as IDescriptionsInject)\n\nconst descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)])\n\nconst filledNode = (\n node: DescriptionItemVNode,\n span: number,\n count: number,\n isLast = false\n) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n}\n\nconst getRows = () => {\n if (!slots.default) return []\n\n const children = flattedChildren(slots.default()).filter(\n (node): node is DescriptionItemVNode =>\n (node as any)?.type?.name === COMPONENT_NAME\n )\n const rows: DescriptionItemVNode[][] = []\n let temp: DescriptionItemVNode[] = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n const rowspanTemp: number[] = [] // the number of row spans\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n const rowspan = node.props?.rowspan || 1\n const rowNo = rows.length\n rowspanTemp[rowNo] ||= 0\n\n if (rowspan > 1) {\n for (let i = 1; i < rowspan; i++) {\n rowspanTemp[rowNo + i] ||= 0\n rowspanTemp[rowNo + i]++\n totalSpan++\n }\n }\n if (rowspanTemp[rowNo] > 0) {\n count -= rowspanTemp[rowNo]\n rowspanTemp[rowNo] = 0\n }\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return rows\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AAEtC,IAAA,MAAM,mBAAmB,WAAY,EAAA,CAAA;AAErC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAA,OAAA,CAAQ,iBAAiB,KAA4B,CAAA,CAAA;AAErD,IAAA,MAAM,cAAiB,GAAA,QAAA,CAAS,MAAM,CAAC,EAAG,CAAA,CAAA,EAAK,EAAA,EAAA,CAAG,CAA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,IAAA,EAAA,QAAA,EAAA,KAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AAEA,UAAA,SAAW,CAAO,IAAA,CAAA,CAAA;AAChB,UAAS,OAAA;AACT,SAAA;AAAc,QAChB,IAAO,IAAA,GAAA,KAAA,EAAA;AACL,UAAA,KAAK,IAAK,IAAA,CAAA;AACV,UAAA,IAAA,CAAK,KAAK,IAAI,CAAA,CAAA;AACd,SAAA,MAAA;AACA,UAAA,IAAA,CAAA,IAAQ,CAAA,UAAA,CAAA,IAAA,EAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA,UACV,IAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AAAA,UACD,KAAA,GAAA,KAAA,CAAA,MAAA,CAAA;AAED,UAAO,IAAA,GAAA,EAAA,CAAA;AAAA,SACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { dialogContentProps } from './dialog-content.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
- import { teleportProps } from '../../teleport/src/teleport2.mjs';
3
+ import { teleportProps } from '../../teleport/src/teleport.mjs';
4
4
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
5
5
  import { isBoolean } from '../../../utils/types.mjs';
6
6
 
@@ -1,5 +1,5 @@
1
- import Empty from './src/empty2.mjs';
2
- export { emptyProps } from './src/empty.mjs';
1
+ import Empty from './src/empty.mjs';
2
+ export { emptyProps } from './src/empty2.mjs';
3
3
  import { withInstall } from '../../utils/vue/install.mjs';
4
4
 
5
5
  const ElEmpty = withInstall(Empty);
@@ -1,16 +1,57 @@
1
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
2
+ import ImgEmpty from './img-empty.mjs';
3
+ import { emptyProps } from './empty2.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
+ import { addUnit } from '../../../utils/dom/style.mjs';
2
8
 
3
- const emptyProps = buildProps({
4
- image: {
5
- type: String,
6
- default: ""
7
- },
8
- imageSize: Number,
9
- description: {
10
- type: String,
11
- default: ""
9
+ const __default__ = defineComponent({
10
+ name: "ElEmpty"
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: emptyProps,
15
+ setup(__props) {
16
+ const props = __props;
17
+ const { t } = useLocale();
18
+ const ns = useNamespace("empty");
19
+ const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
20
+ const imageStyle = computed(() => ({
21
+ width: addUnit(props.imageSize)
22
+ }));
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createElementBlock("div", {
25
+ class: normalizeClass(unref(ns).b())
26
+ }, [
27
+ createElementVNode("div", {
28
+ class: normalizeClass(unref(ns).e("image")),
29
+ style: normalizeStyle(unref(imageStyle))
30
+ }, [
31
+ _ctx.image ? (openBlock(), createElementBlock("img", {
32
+ key: 0,
33
+ src: _ctx.image,
34
+ ondragstart: "return false"
35
+ }, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
36
+ createVNode(ImgEmpty)
37
+ ])
38
+ ], 6),
39
+ createElementVNode("div", {
40
+ class: normalizeClass(unref(ns).e("description"))
41
+ }, [
42
+ _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
43
+ ], 2),
44
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
45
+ key: 0,
46
+ class: normalizeClass(unref(ns).e("bottom"))
47
+ }, [
48
+ renderSlot(_ctx.$slots, "default")
49
+ ], 2)) : createCommentVNode("v-if", true)
50
+ ], 2);
51
+ };
12
52
  }
13
53
  });
54
+ var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
14
55
 
15
- export { emptyProps };
56
+ export { Empty as default };
16
57
  //# sourceMappingURL=empty.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\nexport type EmptyPropsPublic = __ExtractPublicPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,57 +1,16 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
2
- import ImgEmpty from './img-empty.mjs';
3
- import { emptyProps } from './empty.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
- import { addUnit } from '../../../utils/dom/style.mjs';
1
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
8
2
 
9
- const __default__ = defineComponent({
10
- name: "ElEmpty"
11
- });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: emptyProps,
15
- setup(__props) {
16
- const props = __props;
17
- const { t } = useLocale();
18
- const ns = useNamespace("empty");
19
- const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
20
- const imageStyle = computed(() => ({
21
- width: addUnit(props.imageSize)
22
- }));
23
- return (_ctx, _cache) => {
24
- return openBlock(), createElementBlock("div", {
25
- class: normalizeClass(unref(ns).b())
26
- }, [
27
- createElementVNode("div", {
28
- class: normalizeClass(unref(ns).e("image")),
29
- style: normalizeStyle(unref(imageStyle))
30
- }, [
31
- _ctx.image ? (openBlock(), createElementBlock("img", {
32
- key: 0,
33
- src: _ctx.image,
34
- ondragstart: "return false"
35
- }, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
36
- createVNode(ImgEmpty)
37
- ])
38
- ], 6),
39
- createElementVNode("div", {
40
- class: normalizeClass(unref(ns).e("description"))
41
- }, [
42
- _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
43
- ], 2),
44
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
45
- key: 0,
46
- class: normalizeClass(unref(ns).e("bottom"))
47
- }, [
48
- renderSlot(_ctx.$slots, "default")
49
- ], 2)) : createCommentVNode("v-if", true)
50
- ], 2);
51
- };
3
+ const emptyProps = buildProps({
4
+ image: {
5
+ type: String,
6
+ default: ""
7
+ },
8
+ imageSize: Number,
9
+ description: {
10
+ type: String,
11
+ default: ""
52
12
  }
53
13
  });
54
- var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
55
14
 
56
- export { Empty as default };
15
+ export { emptyProps };
57
16
  //# sourceMappingURL=empty2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\nexport type EmptyPropsPublic = __ExtractPublicPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -90,23 +90,23 @@ export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
90
90
  export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
91
91
  export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
92
92
  export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
93
- export { badgeProps } from './badge/src/badge2.mjs';
93
+ export { badgeProps } from './badge/src/badge.mjs';
94
94
  export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
95
95
  export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
96
96
  export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
97
97
  export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
98
98
  export { buttonGroupContextKey } from './button/src/constants.mjs';
99
- export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
99
+ export { calendarEmits, calendarProps } from './calendar/src/calendar2.mjs';
100
100
  export { cardProps } from './card/src/card.mjs';
101
101
  export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
102
102
  export { carouselItemProps } from './carousel/src/carousel-item.mjs';
103
103
  export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
104
- export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
104
+ export { cascaderEmits, cascaderProps } from './cascader/src/cascader2.mjs';
105
105
  export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
106
106
  export { CommonProps, DefaultProps, cascaderPanelEmits, cascaderPanelProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
107
107
  export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
108
108
  export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
109
- export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
109
+ export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox2.mjs';
110
110
  export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
111
111
  export { colProps } from './col/src/col.mjs';
112
112
  export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
@@ -117,10 +117,10 @@ export { messageConfig } from './config-provider/src/config-provider.mjs';
117
117
  export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
118
118
  export { configProviderContextKey } from './config-provider/src/constants.mjs';
119
119
  export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
120
- export { countdownEmits, countdownProps } from './countdown/src/countdown.mjs';
120
+ export { countdownEmits, countdownProps } from './countdown/src/countdown2.mjs';
121
121
  export { ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY } from './date-picker/src/constants.mjs';
122
122
  export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
123
- export { descriptionProps } from './descriptions/src/description2.mjs';
123
+ export { descriptionProps } from './descriptions/src/description.mjs';
124
124
  export { descriptionItemProps } from './descriptions/src/description-item.mjs';
125
125
  export { useDialog } from './dialog/src/use-dialog.mjs';
126
126
  export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
@@ -129,7 +129,7 @@ export { dividerProps } from './divider/src/divider.mjs';
129
129
  export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
130
130
  export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
131
131
  export { DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY } from './dropdown/src/tokens.mjs';
132
- export { emptyProps } from './empty/src/empty.mjs';
132
+ export { emptyProps } from './empty/src/empty2.mjs';
133
133
  export { formEmits, formMetaProps, formProps } from './form/src/form.mjs';
134
134
  export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
135
135
  export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
@@ -143,12 +143,12 @@ export { inputNumberEmits, inputNumberProps } from './input-number/src/input-num
143
143
  export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag.mjs';
144
144
  export { linkEmits, linkProps } from './link/src/link.mjs';
145
145
  export { menuEmits, menuProps } from './menu/src/menu.mjs';
146
- export { menuItemEmits, menuItemProps } from './menu/src/menu-item2.mjs';
146
+ export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
147
147
  export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
148
148
  export { subMenuProps } from './menu/src/sub-menu.mjs';
149
149
  export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './menu/src/tokens.mjs';
150
150
  export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
151
- export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
151
+ export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header2.mjs';
152
152
  export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
153
153
  export { elPaginationKey } from './pagination/src/constants.mjs';
154
154
  export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
@@ -162,7 +162,7 @@ export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
162
162
  export { default as ElPopperContent } from './popper/src/content2.mjs';
163
163
  export { progressProps } from './progress/src/progress.mjs';
164
164
  export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
165
- export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
165
+ export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group2.mjs';
166
166
  export { radioButtonProps } from './radio/src/radio-button.mjs';
167
167
  export { radioGroupKey } from './radio/src/constants.mjs';
168
168
  export { rateEmits, rateProps } from './rate/src/rate.mjs';
@@ -171,7 +171,7 @@ export { RowAlign, RowJustify, rowProps } from './row/src/row.mjs';
171
171
  export { rowContextKey } from './row/src/constants.mjs';
172
172
  export { BAR_MAP, GAP, renderThumbStyle } from './scrollbar/src/util.mjs';
173
173
  export { scrollbarEmits, scrollbarProps } from './scrollbar/src/scrollbar.mjs';
174
- export { thumbProps } from './scrollbar/src/thumb2.mjs';
174
+ export { thumbProps } from './scrollbar/src/thumb.mjs';
175
175
  export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
176
176
  export { selectGroupKey, selectKey } from './select/src/token.mjs';
177
177
  export { selectEmits, selectProps } from './select/src/select.mjs';
@@ -195,7 +195,7 @@ export { autoResizerProps } from './table-v2/src/auto-resizer.mjs';
195
195
  export { tableV2Props } from './table-v2/src/table.mjs';
196
196
  export { tableV2RowProps } from './table-v2/src/row.mjs';
197
197
  export { tabsEmits, tabsProps } from './tabs/src/tabs.mjs';
198
- export { tabBarProps } from './tabs/src/tab-bar2.mjs';
198
+ export { tabBarProps } from './tabs/src/tab-bar.mjs';
199
199
  export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
200
200
  export { tabPaneProps } from './tabs/src/tab-pane.mjs';
201
201
  export { tabsRootContextKey } from './tabs/src/constants.mjs';
@@ -207,7 +207,7 @@ export { timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTrig
207
207
  export { default as CommonPicker } from './time-picker/src/common/picker.mjs';
208
208
  export { default as TimePickPanel } from './time-picker/src/time-picker-com/panel-time-pick.mjs';
209
209
  export { timeSelectProps } from './time-select/src/time-select.mjs';
210
- export { timelineItemProps } from './timeline/src/timeline-item.mjs';
210
+ export { timelineItemProps } from './timeline/src/timeline-item2.mjs';
211
211
  export { TIMELINE_INJECTION_KEY } from './timeline/src/tokens.mjs';
212
212
  export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
213
213
  export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
@@ -223,12 +223,12 @@ export { uploadContextKey } from './upload/src/constants.mjs';
223
223
  export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
224
224
  export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
225
225
  export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
226
- export { watermarkProps } from './watermark/src/watermark.mjs';
226
+ export { watermarkProps } from './watermark/src/watermark2.mjs';
227
227
  export { tourEmits, tourProps } from './tour/src/tour.mjs';
228
228
  export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
229
229
  export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
230
230
  export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
231
- export { defaultProps, segmentedEmits, segmentedProps } from './segmented/src/segmented2.mjs';
231
+ export { defaultProps, segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
232
232
  export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
233
233
  export { splitterProps } from './splitter/src/splitter.mjs';
234
234
  export { splitterPanelProps } from './splitter/src/split-panel.mjs';
@@ -1,5 +1,5 @@
1
- import { type EmitFn } from '@element-plus/nightly/es/utils';
2
- import { type FormItemContext } from '@element-plus/nightly/es/components/form';
1
+ import type { EmitFn } from '@element-plus/nightly/es/utils';
2
+ import type { FormItemContext } from '@element-plus/nightly/es/components/form';
3
3
  import type { InputTagEmits, InputTagProps } from '../input-tag';
4
4
  interface UseInputTagOptions {
5
5
  props: InputTagProps;
@@ -6,6 +6,7 @@ import { EVENT_CODE } from '../../../../constants/aria.mjs';
6
6
  import { useFocusController } from '../../../../hooks/use-focus-controller/index.mjs';
7
7
  import { debugWarn } from '../../../../utils/error.mjs';
8
8
  import { useComposition } from '../../../../hooks/use-composition/index.mjs';
9
+ import { castArray } from 'lodash-unified';
9
10
 
10
11
  function useInputTag({ props, emit, formItem }) {
11
12
  const disabled = useFormDisabled();
@@ -24,19 +25,34 @@ function useInputTag({ props, emit, formItem }) {
24
25
  var _a, _b;
25
26
  return isUndefined(props.max) ? false : ((_b = (_a = props.modelValue) == null ? void 0 : _a.length) != null ? _b : 0) >= props.max;
26
27
  });
27
- const handleInput = (event) => {
28
+ const addTagsEmit = (value) => {
29
+ var _a;
30
+ const list = [...(_a = props.modelValue) != null ? _a : [], ...castArray(value)];
31
+ emit(UPDATE_MODEL_EVENT, list);
32
+ emit(CHANGE_EVENT, list);
33
+ emit("add-tag", value);
34
+ inputValue.value = void 0;
35
+ };
36
+ const getDelimitedTags = (input) => {
28
37
  var _a, _b;
38
+ const tags = input.split(props.delimiter).filter((val) => val && val !== input);
39
+ if (props.max) {
40
+ const maxInsert = props.max - ((_b = (_a = props.modelValue) == null ? void 0 : _a.length) != null ? _b : 0);
41
+ tags.splice(maxInsert);
42
+ }
43
+ return tags.length === 1 ? tags[0] : tags;
44
+ };
45
+ const handleInput = (event) => {
29
46
  if (inputLimit.value) {
30
47
  inputValue.value = void 0;
31
48
  return;
32
49
  }
33
50
  if (isComposing.value)
34
51
  return;
35
- if (props.delimiter) {
36
- const replacement = (_a = inputValue.value) == null ? void 0 : _a.replace(props.delimiter, "");
37
- if ((replacement == null ? void 0 : replacement.length) !== ((_b = inputValue.value) == null ? void 0 : _b.length)) {
38
- inputValue.value = replacement;
39
- handleAddTag();
52
+ if (props.delimiter && inputValue.value) {
53
+ const tags = getDelimitedTags(inputValue.value);
54
+ if (tags.length) {
55
+ addTagsEmit(tags);
40
56
  }
41
57
  }
42
58
  emit(INPUT_EVENT, event.target.value);
@@ -68,15 +84,11 @@ function useInputTag({ props, emit, formItem }) {
68
84
  }
69
85
  };
70
86
  const handleAddTag = () => {
71
- var _a, _b;
87
+ var _a;
72
88
  const value = (_a = inputValue.value) == null ? void 0 : _a.trim();
73
89
  if (!value || inputLimit.value)
74
90
  return;
75
- const list = [...(_b = props.modelValue) != null ? _b : [], value];
76
- emit(UPDATE_MODEL_EVENT, list);
77
- emit(CHANGE_EVENT, list);
78
- emit("add-tag", value);
79
- inputValue.value = void 0;
91
+ addTagsEmit(value);
80
92
  };
81
93
  const handleRemoveTag = (index) => {
82
94
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"use-input-tag.mjs","sources":["../../../../../../../packages/components/input-tag/src/composables/use-input-tag.ts"],"sourcesContent":["import { computed, ref, shallowRef, watch } from 'vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { type EmitFn, debugWarn, isUndefined } from '@element-plus/utils'\nimport { useComposition, useFocusController } from '@element-plus/hooks'\nimport {\n type FormItemContext,\n useFormDisabled,\n useFormSize,\n} from '@element-plus/components/form'\n\nimport type { InputTagEmits, InputTagProps } from '../input-tag'\n\ninterface UseInputTagOptions {\n props: InputTagProps\n emit: EmitFn<InputTagEmits>\n formItem?: FormItemContext\n}\n\nexport function useInputTag({ props, emit, formItem }: UseInputTagOptions) {\n const disabled = useFormDisabled()\n const size = useFormSize()\n\n const inputRef = shallowRef<HTMLInputElement>()\n const inputValue = ref<string>()\n\n const tagSize = computed(() => {\n return ['small'].includes(size.value) ? 'small' : 'default'\n })\n const placeholder = computed(() => {\n return props.modelValue?.length ? undefined : props.placeholder\n })\n const closable = computed(() => !(props.readonly || disabled.value))\n const inputLimit = computed(() => {\n return isUndefined(props.max)\n ? false\n : (props.modelValue?.length ?? 0) >= props.max\n })\n\n const handleInput = (event: Event) => {\n if (inputLimit.value) {\n inputValue.value = undefined\n return\n }\n\n if (isComposing.value) return\n if (props.delimiter) {\n const replacement = inputValue.value?.replace(props.delimiter, '')\n if (replacement?.length !== inputValue.value?.length) {\n inputValue.value = replacement\n handleAddTag()\n }\n }\n emit(INPUT_EVENT, (event.target as HTMLInputElement).value)\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (isComposing.value) return\n switch (event.code) {\n case props.trigger:\n event.preventDefault()\n event.stopPropagation()\n handleAddTag()\n break\n case EVENT_CODE.numpadEnter:\n if (props.trigger === EVENT_CODE.enter) {\n event.preventDefault()\n event.stopPropagation()\n handleAddTag()\n }\n break\n case EVENT_CODE.backspace:\n if (!inputValue.value && props.modelValue?.length) {\n event.preventDefault()\n event.stopPropagation()\n handleRemoveTag(props.modelValue.length - 1)\n }\n break\n }\n }\n\n const handleAddTag = () => {\n const value = inputValue.value?.trim()\n if (!value || inputLimit.value) return\n const list = [...(props.modelValue ?? []), value]\n\n emit(UPDATE_MODEL_EVENT, list)\n emit(CHANGE_EVENT, list)\n emit('add-tag', value)\n inputValue.value = undefined\n }\n\n const handleRemoveTag = (index: number) => {\n const value = (props.modelValue ?? []).slice()\n const [item] = value.splice(index, 1)\n\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n emit('remove-tag', item)\n }\n\n const handleClear = () => {\n inputValue.value = undefined\n emit(UPDATE_MODEL_EVENT, undefined)\n emit(CHANGE_EVENT, undefined)\n emit('clear')\n }\n\n const handleDragged = (\n draggingIndex: number,\n dropIndex: number,\n type: 'before' | 'after'\n ) => {\n const value = (props.modelValue ?? []).slice()\n const [draggedItem] = value.splice(draggingIndex, 1)\n const step =\n dropIndex > draggingIndex && type === 'before'\n ? -1\n : dropIndex < draggingIndex && type === 'after'\n ? 1\n : 0\n\n value.splice(dropIndex + step, 0, draggedItem)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n }\n\n const focus = () => {\n inputRef.value?.focus()\n }\n\n const blur = () => {\n inputRef.value?.blur()\n }\n\n const { wrapperRef, isFocused } = useFocusController(inputRef, {\n disabled,\n afterBlur() {\n if (props.saveOnBlur) {\n handleAddTag()\n } else {\n inputValue.value = undefined\n }\n\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n },\n })\n\n const {\n isComposing,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n } = useComposition({ afterComposition: handleInput })\n\n watch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate?.(CHANGE_EVENT).catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n inputRef,\n wrapperRef,\n isFocused,\n isComposing,\n inputValue,\n size,\n tagSize,\n placeholder,\n closable,\n disabled,\n inputLimit,\n handleDragged,\n handleInput,\n handleKeydown,\n handleAddTag,\n handleRemoveTag,\n handleClear,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n focus,\n blur,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAaO,SAAS,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;AACvD,EAAE,MAAM,QAAQ,GA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AC,CAAC;AACL,EAAE,MAAM;AACR,IAAI,WAAW;AACf,IAAI,sBAAsB;AAC1B,IAAI,uBAAuB;AAC3B,IAAI,oBAAoB;AACxB,GAAG,GAAG,cAAc,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CAAC;AACxD,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,MAAM;AACtC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,KAAK,CAAC,aAAa,EAAE;AAC7B,MAAM,CAAC,EAAE,GAAG,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7I,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,sBAAsB;AAC1B,IAAI,uBAAuB;AAC3B,IAAI,oBAAoB;AACxB,IAAI,KAAK;AACT,IAAI,IAAI;AACR,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-input-tag.mjs","sources":["../../../../../../../packages/components/input-tag/src/composables/use-input-tag.ts"],"sourcesContent":["import { computed, ref, shallowRef, watch } from 'vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { debugWarn, ensureArray, isUndefined } from '@element-plus/utils'\nimport { useComposition, useFocusController } from '@element-plus/hooks'\nimport { useFormDisabled, useFormSize } from '@element-plus/components/form'\n\nimport type { EmitFn } from '@element-plus/utils'\nimport type { FormItemContext } from '@element-plus/components/form'\nimport type { InputTagEmits, InputTagProps } from '../input-tag'\n\ninterface UseInputTagOptions {\n props: InputTagProps\n emit: EmitFn<InputTagEmits>\n formItem?: FormItemContext\n}\n\nexport function useInputTag({ props, emit, formItem }: UseInputTagOptions) {\n const disabled = useFormDisabled()\n const size = useFormSize()\n\n const inputRef = shallowRef<HTMLInputElement>()\n const inputValue = ref<string>()\n\n const tagSize = computed(() => {\n return ['small'].includes(size.value) ? 'small' : 'default'\n })\n const placeholder = computed(() => {\n return props.modelValue?.length ? undefined : props.placeholder\n })\n const closable = computed(() => !(props.readonly || disabled.value))\n const inputLimit = computed(() => {\n return isUndefined(props.max)\n ? false\n : (props.modelValue?.length ?? 0) >= props.max\n })\n\n const addTagsEmit = (value: string | string[]) => {\n const list = [...(props.modelValue ?? []), ...ensureArray(value)]\n\n emit(UPDATE_MODEL_EVENT, list)\n emit(CHANGE_EVENT, list)\n emit('add-tag', value)\n inputValue.value = undefined\n }\n\n const getDelimitedTags = (input: string) => {\n const tags = input\n .split(props.delimiter)\n .filter((val) => val && val !== input)\n if (props.max) {\n const maxInsert = props.max - (props.modelValue?.length ?? 0)\n tags.splice(maxInsert)\n }\n return tags.length === 1 ? tags[0] : tags\n }\n\n const handleInput = (event: Event) => {\n if (inputLimit.value) {\n inputValue.value = undefined\n return\n }\n\n if (isComposing.value) return\n if (props.delimiter && inputValue.value) {\n const tags = getDelimitedTags(inputValue.value)\n if (tags.length) {\n addTagsEmit(tags)\n }\n }\n emit(INPUT_EVENT, (event.target as HTMLInputElement).value)\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (isComposing.value) return\n switch (event.code) {\n case props.trigger:\n event.preventDefault()\n event.stopPropagation()\n handleAddTag()\n break\n case EVENT_CODE.numpadEnter:\n if (props.trigger === EVENT_CODE.enter) {\n event.preventDefault()\n event.stopPropagation()\n handleAddTag()\n }\n break\n case EVENT_CODE.backspace:\n if (!inputValue.value && props.modelValue?.length) {\n event.preventDefault()\n event.stopPropagation()\n handleRemoveTag(props.modelValue.length - 1)\n }\n break\n }\n }\n\n const handleAddTag = () => {\n const value = inputValue.value?.trim()\n if (!value || inputLimit.value) return\n addTagsEmit(value)\n }\n\n const handleRemoveTag = (index: number) => {\n const value = (props.modelValue ?? []).slice()\n const [item] = value.splice(index, 1)\n\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n emit('remove-tag', item)\n }\n\n const handleClear = () => {\n inputValue.value = undefined\n emit(UPDATE_MODEL_EVENT, undefined)\n emit(CHANGE_EVENT, undefined)\n emit('clear')\n }\n\n const handleDragged = (\n draggingIndex: number,\n dropIndex: number,\n type: 'before' | 'after'\n ) => {\n const value = (props.modelValue ?? []).slice()\n const [draggedItem] = value.splice(draggingIndex, 1)\n const step =\n dropIndex > draggingIndex && type === 'before'\n ? -1\n : dropIndex < draggingIndex && type === 'after'\n ? 1\n : 0\n\n value.splice(dropIndex + step, 0, draggedItem)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n }\n\n const focus = () => {\n inputRef.value?.focus()\n }\n\n const blur = () => {\n inputRef.value?.blur()\n }\n\n const { wrapperRef, isFocused } = useFocusController(inputRef, {\n disabled,\n afterBlur() {\n if (props.saveOnBlur) {\n handleAddTag()\n } else {\n inputValue.value = undefined\n }\n\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n },\n })\n\n const {\n isComposing,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n } = useComposition({ afterComposition: handleInput })\n\n watch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate?.(CHANGE_EVENT).catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n inputRef,\n wrapperRef,\n isFocused,\n isComposing,\n inputValue,\n size,\n tagSize,\n placeholder,\n closable,\n disabled,\n inputLimit,\n handleDragged,\n handleInput,\n handleKeydown,\n handleAddTag,\n handleRemoveTag,\n handleClear,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n focus,\n blur,\n }\n}\n"],"names":["ensureArray"],"mappings":";;;;;;;;;;AAUO,SAAS,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;AACvD,EAAE,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;AACrC,EAAE,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;AAC7B,EAAE,MAAM,QAAQ,GAAG,UAAU,EAAE,CAAC;AAChC,EAAE,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM;AACjC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,SAAS,CAAC;AAChE,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;AAC/F,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACvE,EAAE,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM;AACpC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,CA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G,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7I,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,IAAI;AACR,IAAI,OAAO;AACX,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,sBAAsB;AAC1B,IAAI,uBAAuB;AAC3B,IAAI,oBAAoB;AACxB,IAAI,KAAK;AACT,IAAI,IAAI;AACR,GAAG,CAAC;AACJ;;;;"}
@@ -54,7 +54,7 @@ export declare const inputTagEmits: {
54
54
  "update:modelValue": (value?: string[]) => boolean;
55
55
  change: (value?: string[]) => boolean;
56
56
  input: (value: string) => boolean;
57
- 'add-tag': (value: string) => boolean;
57
+ 'add-tag': (value: string | string[]) => boolean;
58
58
  'remove-tag': (value: string) => boolean;
59
59
  focus: (evt: FocusEvent) => boolean;
60
60
  blur: (evt: FocusEvent) => boolean;
@@ -63,7 +63,7 @@ const inputTagEmits = {
63
63
  [UPDATE_MODEL_EVENT]: (value) => isArray(value) || isUndefined(value),
64
64
  [CHANGE_EVENT]: (value) => isArray(value) || isUndefined(value),
65
65
  [INPUT_EVENT]: (value) => isString(value),
66
- "add-tag": (value) => isString(value),
66
+ "add-tag": (value) => isString(value) || isArray(value),
67
67
  "remove-tag": (value) => isString(value),
68
68
  focus: (evt) => evt instanceof FocusEvent,
69
69
  blur: (evt) => evt instanceof FocusEvent,
@@ -1 +1 @@
1
- {"version":3,"file":"input-tag.mjs","sources":["../../../../../../packages/components/input-tag/src/input-tag.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { tagProps } from '@element-plus/components/tag/src/tag'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const inputTagProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description max number tags that can be enter\n */\n max: Number,\n /**\n * @description tag type\n */\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: tagProps.effect,\n /**\n * @description the key to trigger input tag\n */\n trigger: {\n type: definePropType<'Enter' | 'Space'>(String),\n default: EVENT_CODE.enter,\n },\n /**\n * @description whether tags can be dragged\n */\n draggable: Boolean,\n /**\n * @description add a tag when a delimiter is matched\n */\n delimiter: {\n type: [String, RegExp],\n default: '',\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to show clear button\n */\n clearable: Boolean,\n /**\n * @description whether to disable input-tag\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native input readonly\n */\n readonly: Boolean,\n /**\n * @description native input autofocus\n */\n autofocus: Boolean,\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as `tabindex` in native input\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description same as `maxlength` in native input\n */\n maxlength: {\n type: [String, Number],\n },\n /**\n * @description same as `minlength` in native input\n */\n minlength: {\n type: [String, Number],\n },\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description whether to save the input value when the input loses focus\n */\n saveOnBlur: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n} as const)\nexport type InputTagProps = ExtractPropTypes<typeof inputTagProps>\nexport type InputTagPropsPublic = __ExtractPublicPropTypes<typeof inputTagProps>\n\nexport const inputTagEmits = {\n [UPDATE_MODEL_EVENT]: (value?: string[]) =>\n isArray(value) || isUndefined(value),\n [CHANGE_EVENT]: (value?: string[]) => isArray(value) || isUndefined(value),\n [INPUT_EVENT]: (value: string) => isString(value),\n 'add-tag': (value: string) => isString(value),\n 'remove-tag': (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n}\nexport type InputTagEmits = typeof inputTagEmits\n"],"names":[],"mappings":";;;;;;;;AAeY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM;AAC5B,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,UAAU,CAAC,KAAK;AAC7B,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,SAAS,EA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CAAC;AAC3C,EAAE,SAAS,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACvC,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC1C,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
1
+ {"version":3,"file":"input-tag.mjs","sources":["../../../../../../packages/components/input-tag/src/input-tag.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { tagProps } from '@element-plus/components/tag/src/tag'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const inputTagProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description max number tags that can be enter\n */\n max: Number,\n /**\n * @description tag type\n */\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: tagProps.effect,\n /**\n * @description the key to trigger input tag\n */\n trigger: {\n type: definePropType<'Enter' | 'Space'>(String),\n default: EVENT_CODE.enter,\n },\n /**\n * @description whether tags can be dragged\n */\n draggable: Boolean,\n /**\n * @description add a tag when a delimiter is matched\n */\n delimiter: {\n type: [String, RegExp],\n default: '',\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to show clear button\n */\n clearable: Boolean,\n /**\n * @description whether to disable input-tag\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native input readonly\n */\n readonly: Boolean,\n /**\n * @description native input autofocus\n */\n autofocus: Boolean,\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as `tabindex` in native input\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description same as `maxlength` in native input\n */\n maxlength: {\n type: [String, Number],\n },\n /**\n * @description same as `minlength` in native input\n */\n minlength: {\n type: [String, Number],\n },\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description whether to save the input value when the input loses focus\n */\n saveOnBlur: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n} as const)\nexport type InputTagProps = ExtractPropTypes<typeof inputTagProps>\nexport type InputTagPropsPublic = __ExtractPublicPropTypes<typeof inputTagProps>\n\nexport const inputTagEmits = {\n [UPDATE_MODEL_EVENT]: (value?: string[]) =>\n isArray(value) || isUndefined(value),\n [CHANGE_EVENT]: (value?: string[]) => isArray(value) || isUndefined(value),\n [INPUT_EVENT]: (value: string) => isString(value),\n 'add-tag': (value: string | string[]) => isString(value) || isArray(value),\n 'remove-tag': (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n}\nexport type InputTagEmits = typeof inputTagEmits\n"],"names":[],"mappings":";;;;;;;;AAeY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,GAAG,EAAE,MAAM;AACb,EAAE,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM;AAC5B,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,c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AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC;AACvE,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC;AACjE,EAAE,CAAC,WAAW,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC3C,EAAE,SAAS,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC;AACzD,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAC1C,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
@@ -64,7 +64,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
64
64
  input: (value: string) => void;
65
65
  blur: (evt: FocusEvent) => void;
66
66
  focus: (evt: FocusEvent) => void;
67
- "add-tag": (value: string) => void;
67
+ "add-tag": (value: string | string[]) => void;
68
68
  "remove-tag": (value: string) => void;
69
69
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
70
70
  readonly modelValue: {
@@ -121,7 +121,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
121
121
  onBlur?: ((evt: FocusEvent) => any) | undefined;
122
122
  onInput?: ((value: string) => any) | undefined;
123
123
  onClear?: (() => any) | undefined;
124
- "onAdd-tag"?: ((value: string) => any) | undefined;
124
+ "onAdd-tag"?: ((value: string | string[]) => any) | undefined;
125
125
  "onRemove-tag"?: ((value: string) => any) | undefined;
126
126
  }, {
127
127
  readonly disabled: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -1,10 +1,10 @@
1
1
  import Menu from './src/menu.mjs';
2
2
  export { menuEmits, menuProps } from './src/menu.mjs';
3
- import MenuItem from './src/menu-item.mjs';
3
+ import MenuItem from './src/menu-item2.mjs';
4
4
  import MenuItemGroup from './src/menu-item-group2.mjs';
5
5
  import SubMenu from './src/sub-menu.mjs';
6
6
  export { subMenuProps } from './src/sub-menu.mjs';
7
- export { menuItemEmits, menuItemProps } from './src/menu-item2.mjs';
7
+ export { menuItemEmits, menuItemProps } from './src/menu-item.mjs';
8
8
  export { menuItemGroupProps } from './src/menu-item-group.mjs';
9
9
  export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './src/tokens.mjs';
10
10
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';