@element-plus/nightly 0.0.20250104 → 0.0.20250105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (520) hide show
  1. package/dist/index.full.js +4 -4
  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 +4 -4
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/ms.js +1 -1
  152. package/dist/locale/ms.min.js +1 -1
  153. package/dist/locale/ms.min.mjs +1 -1
  154. package/dist/locale/ms.mjs +1 -1
  155. package/dist/locale/my.js +1 -1
  156. package/dist/locale/my.min.js +1 -1
  157. package/dist/locale/my.min.mjs +1 -1
  158. package/dist/locale/my.mjs +1 -1
  159. package/dist/locale/nb-no.js +1 -1
  160. package/dist/locale/nb-no.min.js +1 -1
  161. package/dist/locale/nb-no.min.mjs +1 -1
  162. package/dist/locale/nb-no.mjs +1 -1
  163. package/dist/locale/nl.js +1 -1
  164. package/dist/locale/nl.min.js +1 -1
  165. package/dist/locale/nl.min.mjs +1 -1
  166. package/dist/locale/nl.mjs +1 -1
  167. package/dist/locale/pa.js +1 -1
  168. package/dist/locale/pa.min.js +1 -1
  169. package/dist/locale/pa.min.mjs +1 -1
  170. package/dist/locale/pa.mjs +1 -1
  171. package/dist/locale/pl.js +1 -1
  172. package/dist/locale/pl.min.js +1 -1
  173. package/dist/locale/pl.min.mjs +1 -1
  174. package/dist/locale/pl.mjs +1 -1
  175. package/dist/locale/pt-br.js +1 -1
  176. package/dist/locale/pt-br.min.js +1 -1
  177. package/dist/locale/pt-br.min.mjs +1 -1
  178. package/dist/locale/pt-br.mjs +1 -1
  179. package/dist/locale/pt.js +1 -1
  180. package/dist/locale/pt.min.js +1 -1
  181. package/dist/locale/pt.min.mjs +1 -1
  182. package/dist/locale/pt.mjs +1 -1
  183. package/dist/locale/ro.js +1 -1
  184. package/dist/locale/ro.min.js +1 -1
  185. package/dist/locale/ro.min.mjs +1 -1
  186. package/dist/locale/ro.mjs +1 -1
  187. package/dist/locale/ru.js +1 -1
  188. package/dist/locale/ru.min.js +1 -1
  189. package/dist/locale/ru.min.mjs +1 -1
  190. package/dist/locale/ru.mjs +1 -1
  191. package/dist/locale/sk.js +1 -1
  192. package/dist/locale/sk.min.js +1 -1
  193. package/dist/locale/sk.min.mjs +1 -1
  194. package/dist/locale/sk.mjs +1 -1
  195. package/dist/locale/sl.js +1 -1
  196. package/dist/locale/sl.min.js +1 -1
  197. package/dist/locale/sl.min.mjs +1 -1
  198. package/dist/locale/sl.mjs +1 -1
  199. package/dist/locale/sr.js +1 -1
  200. package/dist/locale/sr.min.js +1 -1
  201. package/dist/locale/sr.min.mjs +1 -1
  202. package/dist/locale/sr.mjs +1 -1
  203. package/dist/locale/sv.js +1 -1
  204. package/dist/locale/sv.min.js +1 -1
  205. package/dist/locale/sv.min.mjs +1 -1
  206. package/dist/locale/sv.mjs +1 -1
  207. package/dist/locale/sw.js +1 -1
  208. package/dist/locale/sw.min.js +1 -1
  209. package/dist/locale/sw.min.mjs +1 -1
  210. package/dist/locale/sw.mjs +1 -1
  211. package/dist/locale/ta.js +1 -1
  212. package/dist/locale/ta.min.js +1 -1
  213. package/dist/locale/ta.min.mjs +1 -1
  214. package/dist/locale/ta.mjs +1 -1
  215. package/dist/locale/th.js +1 -1
  216. package/dist/locale/th.min.js +1 -1
  217. package/dist/locale/th.min.mjs +1 -1
  218. package/dist/locale/th.mjs +1 -1
  219. package/dist/locale/tk.js +1 -1
  220. package/dist/locale/tk.min.js +1 -1
  221. package/dist/locale/tk.min.mjs +1 -1
  222. package/dist/locale/tk.mjs +1 -1
  223. package/dist/locale/tr.js +1 -1
  224. package/dist/locale/tr.min.js +1 -1
  225. package/dist/locale/tr.min.mjs +1 -1
  226. package/dist/locale/tr.mjs +1 -1
  227. package/dist/locale/ug-cn.js +1 -1
  228. package/dist/locale/ug-cn.min.js +1 -1
  229. package/dist/locale/ug-cn.min.mjs +1 -1
  230. package/dist/locale/ug-cn.mjs +1 -1
  231. package/dist/locale/uk.js +1 -1
  232. package/dist/locale/uk.min.js +1 -1
  233. package/dist/locale/uk.min.mjs +1 -1
  234. package/dist/locale/uk.mjs +1 -1
  235. package/dist/locale/uz-uz.js +1 -1
  236. package/dist/locale/uz-uz.min.js +1 -1
  237. package/dist/locale/uz-uz.min.mjs +1 -1
  238. package/dist/locale/uz-uz.mjs +1 -1
  239. package/dist/locale/vi.js +1 -1
  240. package/dist/locale/vi.min.js +1 -1
  241. package/dist/locale/vi.min.mjs +1 -1
  242. package/dist/locale/vi.mjs +1 -1
  243. package/dist/locale/zh-cn.js +1 -1
  244. package/dist/locale/zh-cn.min.js +1 -1
  245. package/dist/locale/zh-cn.min.mjs +1 -1
  246. package/dist/locale/zh-cn.mjs +1 -1
  247. package/dist/locale/zh-tw.js +1 -1
  248. package/dist/locale/zh-tw.min.js +1 -1
  249. package/dist/locale/zh-tw.min.mjs +1 -1
  250. package/dist/locale/zh-tw.mjs +1 -1
  251. package/es/components/anchor/index.mjs +1 -1
  252. package/es/components/anchor/src/anchor-link.mjs +81 -5
  253. package/es/components/anchor/src/anchor-link.mjs.map +1 -1
  254. package/es/components/anchor/src/anchor-link2.mjs +5 -81
  255. package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
  256. package/es/components/autocomplete/index.mjs +2 -2
  257. package/es/components/autocomplete/src/autocomplete.mjs +364 -79
  258. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  259. package/es/components/autocomplete/src/autocomplete2.mjs +79 -364
  260. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  261. package/es/components/button/index.mjs +1 -1
  262. package/es/components/button/src/button-group.mjs +6 -29
  263. package/es/components/button/src/button-group.mjs.map +1 -1
  264. package/es/components/button/src/button-group2.mjs +29 -6
  265. package/es/components/button/src/button-group2.mjs.map +1 -1
  266. package/es/components/card/index.mjs +2 -2
  267. package/es/components/card/src/card.mjs +42 -20
  268. package/es/components/card/src/card.mjs.map +1 -1
  269. package/es/components/card/src/card2.mjs +20 -42
  270. package/es/components/card/src/card2.mjs.map +1 -1
  271. package/es/components/cascader/src/cascader.mjs +1 -1
  272. package/es/components/checkbox/index.mjs +4 -4
  273. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  274. package/es/components/checkbox/src/checkbox-group.mjs +71 -29
  275. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  276. package/es/components/checkbox/src/checkbox-group2.mjs +29 -71
  277. package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
  278. package/es/components/checkbox/src/checkbox.mjs +119 -59
  279. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  280. package/es/components/checkbox/src/checkbox2.mjs +59 -119
  281. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  282. package/es/components/col/index.mjs +2 -2
  283. package/es/components/col/src/col.mjs +64 -43
  284. package/es/components/col/src/col.mjs.map +1 -1
  285. package/es/components/col/src/col2.mjs +43 -64
  286. package/es/components/col/src/col2.mjs.map +1 -1
  287. package/es/components/collection/index.mjs +1 -1
  288. package/es/components/collection/src/collection.mjs +62 -10
  289. package/es/components/collection/src/collection.mjs.map +1 -1
  290. package/es/components/collection/src/collection2.mjs +10 -62
  291. package/es/components/collection/src/collection2.mjs.map +1 -1
  292. package/es/components/countdown/index.mjs +2 -2
  293. package/es/components/countdown/src/countdown.mjs +22 -79
  294. package/es/components/countdown/src/countdown.mjs.map +1 -1
  295. package/es/components/countdown/src/countdown2.mjs +79 -22
  296. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  297. package/es/components/dialog/src/dialog-content.mjs +26 -87
  298. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  299. package/es/components/dialog/src/dialog-content2.mjs +87 -26
  300. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  301. package/es/components/dialog/src/dialog.mjs +1 -1
  302. package/es/components/dialog/src/dialog2.mjs +1 -1
  303. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  304. package/es/components/dropdown/src/dropdown.mjs +1 -1
  305. package/es/components/empty/index.mjs +2 -2
  306. package/es/components/empty/src/empty.mjs +11 -52
  307. package/es/components/empty/src/empty.mjs.map +1 -1
  308. package/es/components/empty/src/empty2.mjs +52 -11
  309. package/es/components/empty/src/empty2.mjs.map +1 -1
  310. package/es/components/index.mjs +16 -16
  311. package/es/components/input/index.mjs +2 -2
  312. package/es/components/input/src/input.mjs +431 -102
  313. package/es/components/input/src/input.mjs.map +1 -1
  314. package/es/components/input/src/input2.mjs +102 -431
  315. package/es/components/input/src/input2.mjs.map +1 -1
  316. package/es/components/input-tag/index.mjs +2 -2
  317. package/es/components/input-tag/src/input-tag.mjs +65 -215
  318. package/es/components/input-tag/src/input-tag.mjs.map +1 -1
  319. package/es/components/input-tag/src/input-tag2.mjs +215 -65
  320. package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
  321. package/es/components/mention/src/mention.mjs +1 -1
  322. package/es/components/mention/src/mention2.mjs +1 -1
  323. package/es/components/pagination/src/components/pager.mjs +209 -16
  324. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  325. package/es/components/pagination/src/components/pager2.mjs +16 -209
  326. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  327. package/es/components/pagination/src/pagination.mjs +1 -1
  328. package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
  329. package/es/components/select/src/select.mjs +1 -1
  330. package/es/components/select-v2/src/defaults.mjs +1 -1
  331. package/es/components/slider/src/button.mjs +19 -89
  332. package/es/components/slider/src/button.mjs.map +1 -1
  333. package/es/components/slider/src/button2.mjs +89 -19
  334. package/es/components/slider/src/button2.mjs.map +1 -1
  335. package/es/components/slider/src/slider2.mjs +1 -1
  336. package/es/components/statistic/index.mjs +2 -2
  337. package/es/components/statistic/src/statistic.mjs +69 -25
  338. package/es/components/statistic/src/statistic.mjs.map +1 -1
  339. package/es/components/statistic/src/statistic2.mjs +25 -69
  340. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  341. package/es/components/switch/index.mjs +2 -2
  342. package/es/components/switch/src/switch.mjs +228 -72
  343. package/es/components/switch/src/switch.mjs.map +1 -1
  344. package/es/components/switch/src/switch2.mjs +72 -228
  345. package/es/components/switch/src/switch2.mjs.map +1 -1
  346. package/es/components/tabs/index.mjs +2 -2
  347. package/es/components/tabs/src/tab-pane.mjs +71 -13
  348. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  349. package/es/components/tabs/src/tab-pane2.mjs +13 -71
  350. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  351. package/es/components/tag/index.mjs +2 -2
  352. package/es/components/tag/src/tag.mjs +27 -99
  353. package/es/components/tag/src/tag.mjs.map +1 -1
  354. package/es/components/tag/src/tag2.mjs +99 -27
  355. package/es/components/tag/src/tag2.mjs.map +1 -1
  356. package/es/components/text/index.mjs +2 -2
  357. package/es/components/text/src/text.mjs +21 -36
  358. package/es/components/text/src/text.mjs.map +1 -1
  359. package/es/components/text/src/text2.mjs +36 -21
  360. package/es/components/text/src/text2.mjs.map +1 -1
  361. package/es/components/tooltip-v2/index.mjs +2 -2
  362. package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
  363. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  364. package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
  365. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  366. package/es/components/tour/index.mjs +1 -1
  367. package/es/components/tour/src/content.mjs +43 -67
  368. package/es/components/tour/src/content.mjs.map +1 -1
  369. package/es/components/tour/src/content2.mjs +67 -43
  370. package/es/components/tour/src/content2.mjs.map +1 -1
  371. package/es/components/tour/src/step.mjs +1 -1
  372. package/es/components/tour/src/tour.mjs +1 -1
  373. package/es/components/tour/src/tour2.mjs +1 -1
  374. package/es/components/watermark/index.mjs +2 -2
  375. package/es/components/watermark/src/watermark.mjs +210 -27
  376. package/es/components/watermark/src/watermark.mjs.map +1 -1
  377. package/es/components/watermark/src/watermark2.mjs +27 -210
  378. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  379. package/es/hooks/use-lockscreen/index.mjs +3 -3
  380. package/es/hooks/use-lockscreen/index.mjs.map +1 -1
  381. package/es/index.mjs +16 -16
  382. package/es/version.d.ts +1 -1
  383. package/es/version.mjs +1 -1
  384. package/es/version.mjs.map +1 -1
  385. package/lib/components/anchor/index.js +1 -1
  386. package/lib/components/anchor/src/anchor-link.js +81 -5
  387. package/lib/components/anchor/src/anchor-link.js.map +1 -1
  388. package/lib/components/anchor/src/anchor-link2.js +5 -81
  389. package/lib/components/anchor/src/anchor-link2.js.map +1 -1
  390. package/lib/components/autocomplete/index.js +2 -2
  391. package/lib/components/autocomplete/src/autocomplete.js +363 -79
  392. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  393. package/lib/components/autocomplete/src/autocomplete2.js +79 -363
  394. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  395. package/lib/components/button/index.js +1 -1
  396. package/lib/components/button/src/button-group.js +6 -29
  397. package/lib/components/button/src/button-group.js.map +1 -1
  398. package/lib/components/button/src/button-group2.js +29 -6
  399. package/lib/components/button/src/button-group2.js.map +1 -1
  400. package/lib/components/card/index.js +2 -2
  401. package/lib/components/card/src/card.js +42 -20
  402. package/lib/components/card/src/card.js.map +1 -1
  403. package/lib/components/card/src/card2.js +20 -42
  404. package/lib/components/card/src/card2.js.map +1 -1
  405. package/lib/components/cascader/src/cascader.js +1 -1
  406. package/lib/components/checkbox/index.js +4 -4
  407. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  408. package/lib/components/checkbox/src/checkbox-group.js +71 -30
  409. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  410. package/lib/components/checkbox/src/checkbox-group2.js +30 -71
  411. package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
  412. package/lib/components/checkbox/src/checkbox.js +119 -60
  413. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  414. package/lib/components/checkbox/src/checkbox2.js +60 -119
  415. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  416. package/lib/components/col/index.js +2 -2
  417. package/lib/components/col/src/col.js +64 -43
  418. package/lib/components/col/src/col.js.map +1 -1
  419. package/lib/components/col/src/col2.js +43 -64
  420. package/lib/components/col/src/col2.js.map +1 -1
  421. package/lib/components/collection/index.js +1 -1
  422. package/lib/components/collection/src/collection.js +62 -9
  423. package/lib/components/collection/src/collection.js.map +1 -1
  424. package/lib/components/collection/src/collection2.js +9 -62
  425. package/lib/components/collection/src/collection2.js.map +1 -1
  426. package/lib/components/countdown/index.js +2 -2
  427. package/lib/components/countdown/src/countdown.js +23 -79
  428. package/lib/components/countdown/src/countdown.js.map +1 -1
  429. package/lib/components/countdown/src/countdown2.js +79 -23
  430. package/lib/components/countdown/src/countdown2.js.map +1 -1
  431. package/lib/components/dialog/src/dialog-content.js +26 -86
  432. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  433. package/lib/components/dialog/src/dialog-content2.js +86 -26
  434. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  435. package/lib/components/dialog/src/dialog.js +1 -1
  436. package/lib/components/dialog/src/dialog2.js +1 -1
  437. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  438. package/lib/components/dropdown/src/dropdown.js +1 -1
  439. package/lib/components/empty/index.js +2 -2
  440. package/lib/components/empty/src/empty.js +11 -52
  441. package/lib/components/empty/src/empty.js.map +1 -1
  442. package/lib/components/empty/src/empty2.js +52 -11
  443. package/lib/components/empty/src/empty2.js.map +1 -1
  444. package/lib/components/index.js +16 -16
  445. package/lib/components/input/index.js +2 -2
  446. package/lib/components/input/src/input.js +430 -102
  447. package/lib/components/input/src/input.js.map +1 -1
  448. package/lib/components/input/src/input2.js +102 -430
  449. package/lib/components/input/src/input2.js.map +1 -1
  450. package/lib/components/input-tag/index.js +2 -2
  451. package/lib/components/input-tag/src/input-tag.js +65 -214
  452. package/lib/components/input-tag/src/input-tag.js.map +1 -1
  453. package/lib/components/input-tag/src/input-tag2.js +214 -65
  454. package/lib/components/input-tag/src/input-tag2.js.map +1 -1
  455. package/lib/components/mention/src/mention.js +1 -1
  456. package/lib/components/mention/src/mention2.js +1 -1
  457. package/lib/components/pagination/src/components/pager.js +209 -16
  458. package/lib/components/pagination/src/components/pager.js.map +1 -1
  459. package/lib/components/pagination/src/components/pager2.js +16 -209
  460. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  461. package/lib/components/pagination/src/pagination.js +1 -1
  462. package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
  463. package/lib/components/select/src/select.js +1 -1
  464. package/lib/components/select-v2/src/defaults.js +1 -1
  465. package/lib/components/slider/src/button.js +20 -89
  466. package/lib/components/slider/src/button.js.map +1 -1
  467. package/lib/components/slider/src/button2.js +89 -20
  468. package/lib/components/slider/src/button2.js.map +1 -1
  469. package/lib/components/slider/src/slider2.js +1 -1
  470. package/lib/components/statistic/index.js +2 -2
  471. package/lib/components/statistic/src/statistic.js +69 -25
  472. package/lib/components/statistic/src/statistic.js.map +1 -1
  473. package/lib/components/statistic/src/statistic2.js +25 -69
  474. package/lib/components/statistic/src/statistic2.js.map +1 -1
  475. package/lib/components/switch/index.js +2 -2
  476. package/lib/components/switch/src/switch.js +227 -72
  477. package/lib/components/switch/src/switch.js.map +1 -1
  478. package/lib/components/switch/src/switch2.js +72 -227
  479. package/lib/components/switch/src/switch2.js.map +1 -1
  480. package/lib/components/tabs/index.js +2 -2
  481. package/lib/components/tabs/src/tab-pane.js +71 -13
  482. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  483. package/lib/components/tabs/src/tab-pane2.js +13 -71
  484. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  485. package/lib/components/tag/index.js +2 -2
  486. package/lib/components/tag/src/tag.js +28 -99
  487. package/lib/components/tag/src/tag.js.map +1 -1
  488. package/lib/components/tag/src/tag2.js +99 -28
  489. package/lib/components/tag/src/tag2.js.map +1 -1
  490. package/lib/components/text/index.js +2 -2
  491. package/lib/components/text/src/text.js +21 -36
  492. package/lib/components/text/src/text.js.map +1 -1
  493. package/lib/components/text/src/text2.js +36 -21
  494. package/lib/components/text/src/text2.js.map +1 -1
  495. package/lib/components/tooltip-v2/index.js +2 -2
  496. package/lib/components/tooltip-v2/src/tooltip.js +19 -77
  497. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  498. package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
  499. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  500. package/lib/components/tour/index.js +1 -1
  501. package/lib/components/tour/src/content.js +46 -67
  502. package/lib/components/tour/src/content.js.map +1 -1
  503. package/lib/components/tour/src/content2.js +67 -46
  504. package/lib/components/tour/src/content2.js.map +1 -1
  505. package/lib/components/tour/src/step.js +1 -1
  506. package/lib/components/tour/src/tour.js +1 -1
  507. package/lib/components/tour/src/tour2.js +1 -1
  508. package/lib/components/watermark/index.js +2 -2
  509. package/lib/components/watermark/src/watermark.js +210 -27
  510. package/lib/components/watermark/src/watermark.js.map +1 -1
  511. package/lib/components/watermark/src/watermark2.js +27 -210
  512. package/lib/components/watermark/src/watermark2.js.map +1 -1
  513. package/lib/hooks/use-lockscreen/index.js +2 -2
  514. package/lib/hooks/use-lockscreen/index.js.map +1 -1
  515. package/lib/index.js +16 -16
  516. package/lib/version.d.ts +1 -1
  517. package/lib/version.js +1 -1
  518. package/lib/version.js.map +1 -1
  519. package/package.json +2 -2
  520. package/web-types.json +1 -1
@@ -88,7 +88,7 @@ var fixedSizeGrid = require('./virtual-list/src/components/fixed-size-grid.js');
88
88
  var dynamicSizeGrid = require('./virtual-list/src/components/dynamic-size-grid.js');
89
89
  var affix = require('./affix/src/affix.js');
90
90
  var alert = require('./alert/src/alert.js');
91
- var autocomplete = require('./autocomplete/src/autocomplete.js');
91
+ var autocomplete = require('./autocomplete/src/autocomplete2.js');
92
92
  var avatar = require('./avatar/src/avatar.js');
93
93
  var backtop = require('./backtop/src/backtop.js');
94
94
  var badge = require('./badge/src/badge.js');
@@ -98,7 +98,7 @@ var constants = require('./breadcrumb/src/constants.js');
98
98
  var button = require('./button/src/button.js');
99
99
  var constants$1 = require('./button/src/constants.js');
100
100
  var calendar = require('./calendar/src/calendar.js');
101
- var card = require('./card/src/card.js');
101
+ var card = require('./card/src/card2.js');
102
102
  var carousel = require('./carousel/src/carousel.js');
103
103
  var carouselItem = require('./carousel/src/carousel-item.js');
104
104
  var constants$2 = require('./carousel/src/constants.js');
@@ -106,10 +106,10 @@ var cascader = require('./cascader/src/cascader.js');
106
106
  var types = require('./cascader-panel/src/types.js');
107
107
  var config = require('./cascader-panel/src/config.js');
108
108
  var checkTag = require('./check-tag/src/check-tag.js');
109
- var checkboxGroup = require('./checkbox/src/checkbox-group.js');
110
- var checkbox = require('./checkbox/src/checkbox.js');
109
+ var checkboxGroup = require('./checkbox/src/checkbox-group2.js');
110
+ var checkbox = require('./checkbox/src/checkbox2.js');
111
111
  var constants$3 = require('./checkbox/src/constants.js');
112
- var col = require('./col/src/col.js');
112
+ var col = require('./col/src/col2.js');
113
113
  var collapse = require('./collapse/src/collapse.js');
114
114
  var collapseItem = require('./collapse/src/collapse-item.js');
115
115
  var constants$4 = require('./collapse/src/constants.js');
@@ -118,7 +118,7 @@ var configProvider = require('./config-provider/src/config-provider.js');
118
118
  var configProviderProps = require('./config-provider/src/config-provider-props.js');
119
119
  var constants$5 = require('./config-provider/src/constants.js');
120
120
  var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
121
- var countdown = require('./countdown/src/countdown2.js');
121
+ var countdown = require('./countdown/src/countdown.js');
122
122
  var constants$6 = require('./date-picker/src/constants.js');
123
123
  var datePicker = require('./date-picker/src/props/date-picker.js');
124
124
  var description = require('./descriptions/src/description.js');
@@ -130,7 +130,7 @@ var divider = require('./divider/src/divider.js');
130
130
  var drawer = require('./drawer/src/drawer.js');
131
131
  var dropdown = require('./dropdown/src/dropdown.js');
132
132
  var tokens = require('./dropdown/src/tokens.js');
133
- var empty = require('./empty/src/empty2.js');
133
+ var empty = require('./empty/src/empty.js');
134
134
  var form = require('./form/src/form.js');
135
135
  var formItem = require('./form/src/form-item.js');
136
136
  var constants$8 = require('./form/src/constants.js');
@@ -139,9 +139,9 @@ var useFormItem = require('./form/src/hooks/use-form-item.js');
139
139
  var icon = require('./icon/src/icon.js');
140
140
  var image = require('./image/src/image.js');
141
141
  var imageViewer = require('./image-viewer/src/image-viewer2.js');
142
- var input = require('./input/src/input.js');
142
+ var input = require('./input/src/input2.js');
143
143
  var inputNumber = require('./input-number/src/input-number.js');
144
- var inputTag = require('./input-tag/src/input-tag2.js');
144
+ var inputTag = require('./input-tag/src/input-tag.js');
145
145
  var link = require('./link/src/link2.js');
146
146
  var menu = require('./menu/src/menu.js');
147
147
  var menuItem = require('./menu/src/menu-item.js');
@@ -182,10 +182,10 @@ var constants$e = require('./slider/src/constants.js');
182
182
  var space = require('./space/src/space.js');
183
183
  var item = require('./space/src/item.js');
184
184
  var useSpace = require('./space/src/use-space.js');
185
- var statistic = require('./statistic/src/statistic.js');
185
+ var statistic = require('./statistic/src/statistic2.js');
186
186
  var item$1 = require('./steps/src/item.js');
187
187
  var steps = require('./steps/src/steps.js');
188
- var _switch = require('./switch/src/switch.js');
188
+ var _switch = require('./switch/src/switch2.js');
189
189
  var constants$f = require('./table-v2/src/constants.js');
190
190
  var tableV2 = require('./table-v2/src/table-v2.js');
191
191
  var _private = require('./table-v2/src/private.js');
@@ -195,10 +195,10 @@ var row$1 = require('./table-v2/src/row.js');
195
195
  var tabs = require('./tabs/src/tabs.js');
196
196
  var tabBar = require('./tabs/src/tab-bar.js');
197
197
  var tabNav = require('./tabs/src/tab-nav.js');
198
- var tabPane = require('./tabs/src/tab-pane.js');
198
+ var tabPane = require('./tabs/src/tab-pane2.js');
199
199
  var constants$g = require('./tabs/src/constants.js');
200
- var tag = require('./tag/src/tag2.js');
201
- var text = require('./text/src/text2.js');
200
+ var tag = require('./tag/src/tag.js');
201
+ var text = require('./text/src/text.js');
202
202
  var utils = require('./time-picker/src/utils.js');
203
203
  var constants$h = require('./time-picker/src/constants.js');
204
204
  var props = require('./time-picker/src/common/props.js');
@@ -219,10 +219,10 @@ var constants$j = require('./upload/src/constants.js');
219
219
  var fixedSizeList = require('./virtual-list/src/components/fixed-size-list.js');
220
220
  var dynamicSizeList = require('./virtual-list/src/components/dynamic-size-list.js');
221
221
  var props$1 = require('./virtual-list/src/props.js');
222
- var watermark = require('./watermark/src/watermark.js');
222
+ var watermark = require('./watermark/src/watermark2.js');
223
223
  var tour = require('./tour/src/tour.js');
224
224
  var step = require('./tour/src/step.js');
225
- var content$3 = require('./tour/src/content2.js');
225
+ var content$3 = require('./tour/src/content.js');
226
226
  var anchor = require('./anchor/src/anchor.js');
227
227
  var segmented = require('./segmented/src/segmented.js');
228
228
  var mention = require('./mention/src/mention.js');
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var input$1 = require('./src/input2.js');
6
- var input = require('./src/input.js');
5
+ var input$1 = require('./src/input.js');
6
+ var input = require('./src/input2.js');
7
7
  var install = require('../../utils/vue/install.js');
8
8
 
9
9
  const ElInput = install.withInstall(input$1["default"]);
@@ -2,111 +2,439 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../../hooks/use-size/index.js');
5
+ var vue = require('vue');
6
+ var core = require('@vueuse/core');
7
+ var lodashUnified = require('lodash-unified');
8
+ var index$4 = require('../../icon/index.js');
9
+ var iconsVue = require('@element-plus/icons-vue');
10
+ var utils = require('./utils.js');
11
+ var input = require('./input2.js');
12
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
+ var index = require('../../../hooks/use-attrs/index.js');
14
+ var useFormItem = require('../../form/src/hooks/use-form-item.js');
15
+ var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
16
+ var index$2 = require('../../../hooks/use-focus-controller/index.js');
6
17
  var icon = require('../../../utils/vue/icon.js');
7
- var typescript = require('../../../utils/typescript.js');
8
- var index$1 = require('../../../hooks/use-aria/index.js');
9
- var event = require('../../../constants/event.js');
10
- var runtime = require('../../../utils/vue/props/runtime.js');
18
+ var index$3 = require('../../../hooks/use-composition/index.js');
19
+ var index$5 = require('../../../hooks/use-cursor/index.js');
20
+ var index$1 = require('../../../hooks/use-namespace/index.js');
21
+ var error = require('../../../utils/error.js');
11
22
  var shared = require('@vue/shared');
23
+ var event = require('../../../constants/event.js');
12
24
 
13
- const inputProps = runtime.buildProps({
14
- id: {
15
- type: String,
16
- default: void 0
17
- },
18
- size: index.useSizeProp,
19
- disabled: Boolean,
20
- modelValue: {
21
- type: runtime.definePropType([
22
- String,
23
- Number,
24
- Object
25
- ]),
26
- default: ""
27
- },
28
- maxlength: {
29
- type: [String, Number]
30
- },
31
- minlength: {
32
- type: [String, Number]
33
- },
34
- type: {
35
- type: String,
36
- default: "text"
37
- },
38
- resize: {
39
- type: String,
40
- values: ["none", "both", "horizontal", "vertical"]
41
- },
42
- autosize: {
43
- type: runtime.definePropType([Boolean, Object]),
44
- default: false
45
- },
46
- autocomplete: {
47
- type: String,
48
- default: "off"
49
- },
50
- formatter: {
51
- type: Function
52
- },
53
- parser: {
54
- type: Function
55
- },
56
- placeholder: {
57
- type: String
58
- },
59
- form: {
60
- type: String
61
- },
62
- readonly: Boolean,
63
- clearable: Boolean,
64
- showPassword: Boolean,
65
- showWordLimit: Boolean,
66
- suffixIcon: {
67
- type: icon.iconPropType
68
- },
69
- prefixIcon: {
70
- type: icon.iconPropType
71
- },
72
- containerRole: {
73
- type: String,
74
- default: void 0
75
- },
76
- tabindex: {
77
- type: [String, Number],
78
- default: 0
79
- },
80
- validateEvent: {
81
- type: Boolean,
82
- default: true
83
- },
84
- inputStyle: {
85
- type: runtime.definePropType([Object, Array, String]),
86
- default: () => typescript.mutable({})
87
- },
88
- autofocus: Boolean,
89
- rows: {
90
- type: Number,
91
- default: 2
92
- },
93
- ...index$1.useAriaProps(["ariaLabel"])
25
+ const __default__ = vue.defineComponent({
26
+ name: "ElInput",
27
+ inheritAttrs: false
28
+ });
29
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
+ ...__default__,
31
+ props: input.inputProps,
32
+ emits: input.inputEmits,
33
+ setup(__props, { expose, emit }) {
34
+ const props = __props;
35
+ const rawAttrs = vue.useAttrs();
36
+ const attrs = index.useAttrs();
37
+ const slots = vue.useSlots();
38
+ const containerKls = vue.computed(() => [
39
+ props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
40
+ nsInput.m(inputSize.value),
41
+ nsInput.is("disabled", inputDisabled.value),
42
+ nsInput.is("exceed", inputExceed.value),
43
+ {
44
+ [nsInput.b("group")]: slots.prepend || slots.append,
45
+ [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
46
+ [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
47
+ [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
48
+ [nsInput.b("hidden")]: props.type === "hidden"
49
+ },
50
+ rawAttrs.class
51
+ ]);
52
+ const wrapperKls = vue.computed(() => [
53
+ nsInput.e("wrapper"),
54
+ nsInput.is("focus", isFocused.value)
55
+ ]);
56
+ const { form: elForm, formItem: elFormItem } = useFormItem.useFormItem();
57
+ const { inputId } = useFormItem.useFormItemInputId(props, {
58
+ formItemContext: elFormItem
59
+ });
60
+ const inputSize = useFormCommonProps.useFormSize();
61
+ const inputDisabled = useFormCommonProps.useFormDisabled();
62
+ const nsInput = index$1.useNamespace("input");
63
+ const nsTextarea = index$1.useNamespace("textarea");
64
+ const input = vue.shallowRef();
65
+ const textarea = vue.shallowRef();
66
+ const hovering = vue.ref(false);
67
+ const passwordVisible = vue.ref(false);
68
+ const countStyle = vue.ref();
69
+ const textareaCalcStyle = vue.shallowRef(props.inputStyle);
70
+ const _ref = vue.computed(() => input.value || textarea.value);
71
+ const { wrapperRef, isFocused, handleFocus, handleBlur } = index$2.useFocusController(_ref, {
72
+ beforeFocus() {
73
+ return inputDisabled.value;
74
+ },
75
+ afterBlur() {
76
+ var _a;
77
+ if (props.validateEvent) {
78
+ (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur").catch((err) => error.debugWarn(err));
79
+ }
80
+ }
81
+ });
82
+ const needStatusIcon = vue.computed(() => {
83
+ var _a;
84
+ return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
85
+ });
86
+ const validateState = vue.computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
87
+ const validateIcon = vue.computed(() => validateState.value && icon.ValidateComponentsMap[validateState.value]);
88
+ const passwordIcon = vue.computed(() => passwordVisible.value ? iconsVue.View : iconsVue.Hide);
89
+ const containerStyle = vue.computed(() => [
90
+ rawAttrs.style
91
+ ]);
92
+ const textareaStyle = vue.computed(() => [
93
+ props.inputStyle,
94
+ textareaCalcStyle.value,
95
+ { resize: props.resize }
96
+ ]);
97
+ const nativeInputValue = vue.computed(() => lodashUnified.isNil(props.modelValue) ? "" : String(props.modelValue));
98
+ const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
99
+ const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !!nativeInputValue.value && (!!nativeInputValue.value || isFocused.value));
100
+ const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
101
+ const textLength = vue.computed(() => nativeInputValue.value.length);
102
+ const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
103
+ const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
104
+ const [recordCursor, setCursor] = index$5.useCursor(input);
105
+ core.useResizeObserver(textarea, (entries) => {
106
+ onceInitSizeTextarea();
107
+ if (!isWordLimitVisible.value || props.resize !== "both")
108
+ return;
109
+ const entry = entries[0];
110
+ const { width } = entry.contentRect;
111
+ countStyle.value = {
112
+ right: `calc(100% - ${width + 15 + 6}px)`
113
+ };
114
+ });
115
+ const resizeTextarea = () => {
116
+ const { type, autosize } = props;
117
+ if (!core.isClient || type !== "textarea" || !textarea.value)
118
+ return;
119
+ if (autosize) {
120
+ const minRows = shared.isObject(autosize) ? autosize.minRows : void 0;
121
+ const maxRows = shared.isObject(autosize) ? autosize.maxRows : void 0;
122
+ const textareaStyle2 = utils.calcTextareaHeight(textarea.value, minRows, maxRows);
123
+ textareaCalcStyle.value = {
124
+ overflowY: "hidden",
125
+ ...textareaStyle2
126
+ };
127
+ vue.nextTick(() => {
128
+ textarea.value.offsetHeight;
129
+ textareaCalcStyle.value = textareaStyle2;
130
+ });
131
+ } else {
132
+ textareaCalcStyle.value = {
133
+ minHeight: utils.calcTextareaHeight(textarea.value).minHeight
134
+ };
135
+ }
136
+ };
137
+ const createOnceInitResize = (resizeTextarea2) => {
138
+ let isInit = false;
139
+ return () => {
140
+ var _a;
141
+ if (isInit || !props.autosize)
142
+ return;
143
+ const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null;
144
+ if (!isElHidden) {
145
+ resizeTextarea2();
146
+ isInit = true;
147
+ }
148
+ };
149
+ };
150
+ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
151
+ const setNativeInputValue = () => {
152
+ const input2 = _ref.value;
153
+ const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
154
+ if (!input2 || input2.value === formatterValue)
155
+ return;
156
+ input2.value = formatterValue;
157
+ };
158
+ const handleInput = async (event$1) => {
159
+ recordCursor();
160
+ let { value } = event$1.target;
161
+ if (props.formatter) {
162
+ value = props.parser ? props.parser(value) : value;
163
+ }
164
+ if (isComposing.value)
165
+ return;
166
+ if (value === nativeInputValue.value) {
167
+ setNativeInputValue();
168
+ return;
169
+ }
170
+ emit(event.UPDATE_MODEL_EVENT, value);
171
+ emit("input", value);
172
+ await vue.nextTick();
173
+ setNativeInputValue();
174
+ setCursor();
175
+ };
176
+ const handleChange = (event) => {
177
+ emit("change", event.target.value);
178
+ };
179
+ const {
180
+ isComposing,
181
+ handleCompositionStart,
182
+ handleCompositionUpdate,
183
+ handleCompositionEnd
184
+ } = index$3.useComposition({ emit, afterComposition: handleInput });
185
+ const handlePasswordVisible = () => {
186
+ recordCursor();
187
+ passwordVisible.value = !passwordVisible.value;
188
+ setTimeout(setCursor);
189
+ };
190
+ const focus = () => {
191
+ var _a;
192
+ return (_a = _ref.value) == null ? void 0 : _a.focus();
193
+ };
194
+ const blur = () => {
195
+ var _a;
196
+ return (_a = _ref.value) == null ? void 0 : _a.blur();
197
+ };
198
+ const handleMouseLeave = (evt) => {
199
+ hovering.value = false;
200
+ emit("mouseleave", evt);
201
+ };
202
+ const handleMouseEnter = (evt) => {
203
+ hovering.value = true;
204
+ emit("mouseenter", evt);
205
+ };
206
+ const handleKeydown = (evt) => {
207
+ emit("keydown", evt);
208
+ };
209
+ const select = () => {
210
+ var _a;
211
+ (_a = _ref.value) == null ? void 0 : _a.select();
212
+ };
213
+ const clear = () => {
214
+ emit(event.UPDATE_MODEL_EVENT, "");
215
+ emit("change", "");
216
+ emit("clear");
217
+ emit("input", "");
218
+ };
219
+ vue.watch(() => props.modelValue, () => {
220
+ var _a;
221
+ vue.nextTick(() => resizeTextarea());
222
+ if (props.validateEvent) {
223
+ (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => error.debugWarn(err));
224
+ }
225
+ });
226
+ vue.watch(nativeInputValue, () => setNativeInputValue());
227
+ vue.watch(() => props.type, async () => {
228
+ await vue.nextTick();
229
+ setNativeInputValue();
230
+ resizeTextarea();
231
+ });
232
+ vue.onMounted(() => {
233
+ if (!props.formatter && props.parser) {
234
+ error.debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
235
+ }
236
+ setNativeInputValue();
237
+ vue.nextTick(resizeTextarea);
238
+ });
239
+ expose({
240
+ input,
241
+ textarea,
242
+ ref: _ref,
243
+ textareaStyle,
244
+ autosize: vue.toRef(props, "autosize"),
245
+ isComposing,
246
+ focus,
247
+ blur,
248
+ select,
249
+ clear,
250
+ resizeTextarea
251
+ });
252
+ return (_ctx, _cache) => {
253
+ return vue.openBlock(), vue.createElementBlock("div", {
254
+ class: vue.normalizeClass([
255
+ vue.unref(containerKls),
256
+ {
257
+ [vue.unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
258
+ [vue.unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend
259
+ }
260
+ ]),
261
+ style: vue.normalizeStyle(vue.unref(containerStyle)),
262
+ onMouseenter: handleMouseEnter,
263
+ onMouseleave: handleMouseLeave
264
+ }, [
265
+ vue.createCommentVNode(" input "),
266
+ _ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
267
+ vue.createCommentVNode(" prepend slot "),
268
+ _ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
269
+ key: 0,
270
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
271
+ }, [
272
+ vue.renderSlot(_ctx.$slots, "prepend")
273
+ ], 2)) : vue.createCommentVNode("v-if", true),
274
+ vue.createElementVNode("div", {
275
+ ref_key: "wrapperRef",
276
+ ref: wrapperRef,
277
+ class: vue.normalizeClass(vue.unref(wrapperKls))
278
+ }, [
279
+ vue.createCommentVNode(" prefix slot "),
280
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
281
+ key: 0,
282
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
283
+ }, [
284
+ vue.createElementVNode("span", {
285
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner"))
286
+ }, [
287
+ vue.renderSlot(_ctx.$slots, "prefix"),
288
+ _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
289
+ key: 0,
290
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
291
+ }, {
292
+ default: vue.withCtx(() => [
293
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
294
+ ]),
295
+ _: 1
296
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
297
+ ], 2)
298
+ ], 2)) : vue.createCommentVNode("v-if", true),
299
+ vue.createElementVNode("input", vue.mergeProps({
300
+ id: vue.unref(inputId),
301
+ ref_key: "input",
302
+ ref: input,
303
+ class: vue.unref(nsInput).e("inner")
304
+ }, vue.unref(attrs), {
305
+ minlength: _ctx.minlength,
306
+ maxlength: _ctx.maxlength,
307
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
308
+ disabled: vue.unref(inputDisabled),
309
+ readonly: _ctx.readonly,
310
+ autocomplete: _ctx.autocomplete,
311
+ tabindex: _ctx.tabindex,
312
+ "aria-label": _ctx.ariaLabel,
313
+ placeholder: _ctx.placeholder,
314
+ style: _ctx.inputStyle,
315
+ form: _ctx.form,
316
+ autofocus: _ctx.autofocus,
317
+ role: _ctx.containerRole,
318
+ onCompositionstart: vue.unref(handleCompositionStart),
319
+ onCompositionupdate: vue.unref(handleCompositionUpdate),
320
+ onCompositionend: vue.unref(handleCompositionEnd),
321
+ onInput: handleInput,
322
+ onChange: handleChange,
323
+ onKeydown: handleKeydown
324
+ }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
325
+ vue.createCommentVNode(" suffix slot "),
326
+ vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
327
+ key: 1,
328
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
329
+ }, [
330
+ vue.createElementVNode("span", {
331
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner"))
332
+ }, [
333
+ !vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
334
+ vue.renderSlot(_ctx.$slots, "suffix"),
335
+ _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
336
+ key: 0,
337
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
338
+ }, {
339
+ default: vue.withCtx(() => [
340
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
341
+ ]),
342
+ _: 1
343
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
344
+ ], 64)) : vue.createCommentVNode("v-if", true),
345
+ vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
346
+ key: 1,
347
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")]),
348
+ onMousedown: vue.withModifiers(vue.unref(shared.NOOP), ["prevent"]),
349
+ onClick: clear
350
+ }, {
351
+ default: vue.withCtx(() => [
352
+ vue.createVNode(vue.unref(iconsVue.CircleClose))
353
+ ]),
354
+ _: 1
355
+ }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true),
356
+ vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
357
+ key: 2,
358
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")]),
359
+ onClick: handlePasswordVisible
360
+ }, {
361
+ default: vue.withCtx(() => [
362
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
363
+ ]),
364
+ _: 1
365
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
366
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
367
+ key: 3,
368
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
369
+ }, [
370
+ vue.createElementVNode("span", {
371
+ class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
372
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(_ctx.maxlength), 3)
373
+ ], 2)) : vue.createCommentVNode("v-if", true),
374
+ vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElIcon), {
375
+ key: 4,
376
+ class: vue.normalizeClass([
377
+ vue.unref(nsInput).e("icon"),
378
+ vue.unref(nsInput).e("validateIcon"),
379
+ vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
380
+ ])
381
+ }, {
382
+ default: vue.withCtx(() => [
383
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
384
+ ]),
385
+ _: 1
386
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
387
+ ], 2)
388
+ ], 2)) : vue.createCommentVNode("v-if", true)
389
+ ], 2),
390
+ vue.createCommentVNode(" append slot "),
391
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
392
+ key: 1,
393
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
394
+ }, [
395
+ vue.renderSlot(_ctx.$slots, "append")
396
+ ], 2)) : vue.createCommentVNode("v-if", true)
397
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
398
+ vue.createCommentVNode(" textarea "),
399
+ vue.createElementVNode("textarea", vue.mergeProps({
400
+ id: vue.unref(inputId),
401
+ ref_key: "textarea",
402
+ ref: textarea,
403
+ class: [vue.unref(nsTextarea).e("inner"), vue.unref(nsInput).is("focus", vue.unref(isFocused))]
404
+ }, vue.unref(attrs), {
405
+ minlength: _ctx.minlength,
406
+ maxlength: _ctx.maxlength,
407
+ tabindex: _ctx.tabindex,
408
+ disabled: vue.unref(inputDisabled),
409
+ readonly: _ctx.readonly,
410
+ autocomplete: _ctx.autocomplete,
411
+ style: vue.unref(textareaStyle),
412
+ "aria-label": _ctx.ariaLabel,
413
+ placeholder: _ctx.placeholder,
414
+ form: _ctx.form,
415
+ autofocus: _ctx.autofocus,
416
+ rows: _ctx.rows,
417
+ role: _ctx.containerRole,
418
+ onCompositionstart: vue.unref(handleCompositionStart),
419
+ onCompositionupdate: vue.unref(handleCompositionUpdate),
420
+ onCompositionend: vue.unref(handleCompositionEnd),
421
+ onInput: handleInput,
422
+ onFocus: vue.unref(handleFocus),
423
+ onBlur: vue.unref(handleBlur),
424
+ onChange: handleChange,
425
+ onKeydown: handleKeydown
426
+ }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
427
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
428
+ key: 0,
429
+ style: vue.normalizeStyle(countStyle.value),
430
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
431
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(_ctx.maxlength), 7)) : vue.createCommentVNode("v-if", true)
432
+ ], 64))
433
+ ], 38);
434
+ };
435
+ }
94
436
  });
95
- const inputEmits = {
96
- [event.UPDATE_MODEL_EVENT]: (value) => shared.isString(value),
97
- input: (value) => shared.isString(value),
98
- change: (value) => shared.isString(value),
99
- focus: (evt) => evt instanceof FocusEvent,
100
- blur: (evt) => evt instanceof FocusEvent,
101
- clear: () => true,
102
- mouseleave: (evt) => evt instanceof MouseEvent,
103
- mouseenter: (evt) => evt instanceof MouseEvent,
104
- keydown: (evt) => evt instanceof Event,
105
- compositionstart: (evt) => evt instanceof CompositionEvent,
106
- compositionupdate: (evt) => evt instanceof CompositionEvent,
107
- compositionend: (evt) => evt instanceof CompositionEvent
108
- };
437
+ var Input = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "input.vue"]]);
109
438
 
110
- exports.inputEmits = inputEmits;
111
- exports.inputProps = inputProps;
439
+ exports["default"] = Input;
112
440
  //# sourceMappingURL=input.js.map