@element-plus/nightly 0.0.20250109 → 0.0.20250111

Sign up to get free protection for your applications and to get access to all the features.
Files changed (611) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +26 -9
  4. package/dist/index.full.min.js +19 -19
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +19 -19
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +26 -10
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hi.js +1 -1
  94. package/dist/locale/hi.min.js +1 -1
  95. package/dist/locale/hi.min.mjs +1 -1
  96. package/dist/locale/hi.mjs +1 -1
  97. package/dist/locale/hr.js +1 -1
  98. package/dist/locale/hr.min.js +1 -1
  99. package/dist/locale/hr.min.mjs +1 -1
  100. package/dist/locale/hr.mjs +1 -1
  101. package/dist/locale/hu.js +1 -1
  102. package/dist/locale/hu.min.js +1 -1
  103. package/dist/locale/hu.min.mjs +1 -1
  104. package/dist/locale/hu.mjs +1 -1
  105. package/dist/locale/hy-am.js +1 -1
  106. package/dist/locale/hy-am.min.js +1 -1
  107. package/dist/locale/hy-am.min.mjs +1 -1
  108. package/dist/locale/hy-am.mjs +1 -1
  109. package/dist/locale/id.js +1 -1
  110. package/dist/locale/id.min.js +1 -1
  111. package/dist/locale/id.min.mjs +1 -1
  112. package/dist/locale/id.mjs +1 -1
  113. package/dist/locale/it.js +1 -1
  114. package/dist/locale/it.min.js +1 -1
  115. package/dist/locale/it.min.mjs +1 -1
  116. package/dist/locale/it.mjs +1 -1
  117. package/dist/locale/ja.js +1 -1
  118. package/dist/locale/ja.min.js +1 -1
  119. package/dist/locale/ja.min.mjs +1 -1
  120. package/dist/locale/ja.mjs +1 -1
  121. package/dist/locale/kk.js +1 -1
  122. package/dist/locale/kk.min.js +1 -1
  123. package/dist/locale/kk.min.mjs +1 -1
  124. package/dist/locale/kk.mjs +1 -1
  125. package/dist/locale/km.js +1 -1
  126. package/dist/locale/km.min.js +1 -1
  127. package/dist/locale/km.min.mjs +1 -1
  128. package/dist/locale/km.mjs +1 -1
  129. package/dist/locale/ko.js +1 -1
  130. package/dist/locale/ko.min.js +1 -1
  131. package/dist/locale/ko.min.mjs +1 -1
  132. package/dist/locale/ko.mjs +1 -1
  133. package/dist/locale/ku.js +1 -1
  134. package/dist/locale/ku.min.js +1 -1
  135. package/dist/locale/ku.min.mjs +1 -1
  136. package/dist/locale/ku.mjs +1 -1
  137. package/dist/locale/ky.js +1 -1
  138. package/dist/locale/ky.min.js +1 -1
  139. package/dist/locale/ky.min.mjs +1 -1
  140. package/dist/locale/ky.mjs +1 -1
  141. package/dist/locale/lt.js +1 -1
  142. package/dist/locale/lt.min.js +1 -1
  143. package/dist/locale/lt.min.mjs +1 -1
  144. package/dist/locale/lt.mjs +1 -1
  145. package/dist/locale/lv.js +1 -1
  146. package/dist/locale/lv.min.js +1 -1
  147. package/dist/locale/lv.min.mjs +1 -1
  148. package/dist/locale/lv.mjs +1 -1
  149. package/dist/locale/mg.js +1 -1
  150. package/dist/locale/mg.min.js +1 -1
  151. package/dist/locale/mg.min.mjs +1 -1
  152. package/dist/locale/mg.mjs +1 -1
  153. package/dist/locale/mn.js +1 -1
  154. package/dist/locale/mn.min.js +1 -1
  155. package/dist/locale/mn.min.mjs +1 -1
  156. package/dist/locale/mn.mjs +1 -1
  157. package/dist/locale/ms.js +1 -1
  158. package/dist/locale/ms.min.js +1 -1
  159. package/dist/locale/ms.min.mjs +1 -1
  160. package/dist/locale/ms.mjs +1 -1
  161. package/dist/locale/my.js +1 -1
  162. package/dist/locale/my.min.js +1 -1
  163. package/dist/locale/my.min.mjs +1 -1
  164. package/dist/locale/my.mjs +1 -1
  165. package/dist/locale/nb-no.js +1 -1
  166. package/dist/locale/nb-no.min.js +1 -1
  167. package/dist/locale/nb-no.min.mjs +1 -1
  168. package/dist/locale/nb-no.mjs +1 -1
  169. package/dist/locale/nl.js +1 -1
  170. package/dist/locale/nl.min.js +1 -1
  171. package/dist/locale/nl.min.mjs +1 -1
  172. package/dist/locale/nl.mjs +1 -1
  173. package/dist/locale/no.js +1 -1
  174. package/dist/locale/no.min.js +1 -1
  175. package/dist/locale/no.min.mjs +1 -1
  176. package/dist/locale/no.mjs +1 -1
  177. package/dist/locale/pa.js +1 -1
  178. package/dist/locale/pa.min.js +1 -1
  179. package/dist/locale/pa.min.mjs +1 -1
  180. package/dist/locale/pa.mjs +1 -1
  181. package/dist/locale/pl.js +1 -1
  182. package/dist/locale/pl.min.js +1 -1
  183. package/dist/locale/pl.min.mjs +1 -1
  184. package/dist/locale/pl.mjs +1 -1
  185. package/dist/locale/pt-br.js +1 -1
  186. package/dist/locale/pt-br.min.js +1 -1
  187. package/dist/locale/pt-br.min.mjs +1 -1
  188. package/dist/locale/pt-br.mjs +1 -1
  189. package/dist/locale/pt.js +1 -1
  190. package/dist/locale/pt.min.js +1 -1
  191. package/dist/locale/pt.min.mjs +1 -1
  192. package/dist/locale/pt.mjs +1 -1
  193. package/dist/locale/ro.js +1 -1
  194. package/dist/locale/ro.min.js +1 -1
  195. package/dist/locale/ro.min.mjs +1 -1
  196. package/dist/locale/ro.mjs +1 -1
  197. package/dist/locale/ru.js +1 -1
  198. package/dist/locale/ru.min.js +1 -1
  199. package/dist/locale/ru.min.mjs +1 -1
  200. package/dist/locale/ru.mjs +1 -1
  201. package/dist/locale/sk.js +1 -1
  202. package/dist/locale/sk.min.js +1 -1
  203. package/dist/locale/sk.min.mjs +1 -1
  204. package/dist/locale/sk.mjs +1 -1
  205. package/dist/locale/sl.js +1 -1
  206. package/dist/locale/sl.min.js +1 -1
  207. package/dist/locale/sl.min.mjs +1 -1
  208. package/dist/locale/sl.mjs +1 -1
  209. package/dist/locale/sr.js +1 -1
  210. package/dist/locale/sr.min.js +1 -1
  211. package/dist/locale/sr.min.mjs +1 -1
  212. package/dist/locale/sr.mjs +1 -1
  213. package/dist/locale/sv.js +1 -1
  214. package/dist/locale/sv.min.js +1 -1
  215. package/dist/locale/sv.min.mjs +1 -1
  216. package/dist/locale/sv.mjs +1 -1
  217. package/dist/locale/sw.js +1 -1
  218. package/dist/locale/sw.min.js +1 -1
  219. package/dist/locale/sw.min.mjs +1 -1
  220. package/dist/locale/sw.mjs +1 -1
  221. package/dist/locale/ta.js +1 -1
  222. package/dist/locale/ta.min.js +1 -1
  223. package/dist/locale/ta.min.mjs +1 -1
  224. package/dist/locale/ta.mjs +1 -1
  225. package/dist/locale/th.js +1 -1
  226. package/dist/locale/th.min.js +1 -1
  227. package/dist/locale/th.min.mjs +1 -1
  228. package/dist/locale/th.mjs +1 -1
  229. package/dist/locale/tk.js +1 -1
  230. package/dist/locale/tk.min.js +1 -1
  231. package/dist/locale/tk.min.mjs +1 -1
  232. package/dist/locale/tk.mjs +1 -1
  233. package/dist/locale/tr.js +1 -1
  234. package/dist/locale/tr.min.js +1 -1
  235. package/dist/locale/tr.min.mjs +1 -1
  236. package/dist/locale/tr.mjs +1 -1
  237. package/dist/locale/ug-cn.js +1 -1
  238. package/dist/locale/ug-cn.min.js +1 -1
  239. package/dist/locale/ug-cn.min.mjs +1 -1
  240. package/dist/locale/ug-cn.mjs +1 -1
  241. package/dist/locale/uk.js +1 -1
  242. package/dist/locale/uk.min.js +1 -1
  243. package/dist/locale/uk.min.mjs +1 -1
  244. package/dist/locale/uk.mjs +1 -1
  245. package/dist/locale/uz-uz.js +1 -1
  246. package/dist/locale/uz-uz.min.js +1 -1
  247. package/dist/locale/uz-uz.min.mjs +1 -1
  248. package/dist/locale/uz-uz.mjs +1 -1
  249. package/dist/locale/vi.js +1 -1
  250. package/dist/locale/vi.min.js +1 -1
  251. package/dist/locale/vi.min.mjs +1 -1
  252. package/dist/locale/vi.mjs +1 -1
  253. package/dist/locale/zh-cn.js +1 -1
  254. package/dist/locale/zh-cn.min.js +1 -1
  255. package/dist/locale/zh-cn.min.mjs +1 -1
  256. package/dist/locale/zh-cn.mjs +1 -1
  257. package/dist/locale/zh-tw.js +1 -1
  258. package/dist/locale/zh-tw.min.js +1 -1
  259. package/dist/locale/zh-tw.min.mjs +1 -1
  260. package/dist/locale/zh-tw.mjs +1 -1
  261. package/es/components/alert/index.mjs +2 -2
  262. package/es/components/alert/src/alert.mjs +89 -36
  263. package/es/components/alert/src/alert.mjs.map +1 -1
  264. package/es/components/alert/src/alert2.mjs +36 -89
  265. package/es/components/alert/src/alert2.mjs.map +1 -1
  266. package/es/components/anchor/index.mjs +3 -3
  267. package/es/components/anchor/src/anchor-link.mjs +5 -81
  268. package/es/components/anchor/src/anchor-link.mjs.map +1 -1
  269. package/es/components/anchor/src/anchor-link2.mjs +81 -5
  270. package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
  271. package/es/components/anchor/src/anchor.mjs +42 -192
  272. package/es/components/anchor/src/anchor.mjs.map +1 -1
  273. package/es/components/anchor/src/anchor2.mjs +192 -42
  274. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  275. package/es/components/autocomplete/index.mjs +2 -2
  276. package/es/components/autocomplete/src/autocomplete.mjs +364 -79
  277. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  278. package/es/components/autocomplete/src/autocomplete2.mjs +79 -364
  279. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  280. package/es/components/card/index.mjs +2 -2
  281. package/es/components/card/src/card.mjs +20 -42
  282. package/es/components/card/src/card.mjs.map +1 -1
  283. package/es/components/card/src/card2.mjs +42 -20
  284. package/es/components/card/src/card2.mjs.map +1 -1
  285. package/es/components/carousel/index.mjs +2 -2
  286. package/es/components/carousel/src/carousel.mjs +61 -204
  287. package/es/components/carousel/src/carousel.mjs.map +1 -1
  288. package/es/components/carousel/src/carousel2.mjs +204 -61
  289. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  290. package/es/components/check-tag/index.mjs +2 -2
  291. package/es/components/check-tag/src/check-tag.mjs +14 -38
  292. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  293. package/es/components/check-tag/src/check-tag2.mjs +38 -14
  294. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  295. package/es/components/collection/index.mjs +1 -1
  296. package/es/components/collection/src/collection.mjs +62 -10
  297. package/es/components/collection/src/collection.mjs.map +1 -1
  298. package/es/components/collection/src/collection2.mjs +10 -62
  299. package/es/components/collection/src/collection2.mjs.map +1 -1
  300. package/es/components/color-picker/index.mjs +2 -2
  301. package/es/components/color-picker/src/color-picker.mjs +40 -402
  302. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  303. package/es/components/color-picker/src/color-picker2.mjs +402 -40
  304. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  305. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  306. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  307. package/es/components/dropdown/src/dropdown.mjs +1 -1
  308. package/es/components/empty/index.mjs +2 -2
  309. package/es/components/empty/src/empty.mjs +52 -11
  310. package/es/components/empty/src/empty.mjs.map +1 -1
  311. package/es/components/empty/src/empty2.mjs +11 -52
  312. package/es/components/empty/src/empty2.mjs.map +1 -1
  313. package/es/components/form/index.mjs +2 -2
  314. package/es/components/form/src/form-item.mjs +47 -319
  315. package/es/components/form/src/form-item.mjs.map +1 -1
  316. package/es/components/form/src/form-item2.mjs +319 -47
  317. package/es/components/form/src/form-item2.mjs.map +1 -1
  318. package/es/components/image/index.mjs +2 -2
  319. package/es/components/image/src/image.d.ts +2 -0
  320. package/es/components/image/src/image.mjs +64 -232
  321. package/es/components/image/src/image.mjs.map +1 -1
  322. package/es/components/image/src/image.vue.d.ts +5 -1
  323. package/es/components/image/src/image2.mjs +235 -64
  324. package/es/components/image/src/image2.mjs.map +1 -1
  325. package/es/components/image-viewer/index.mjs +2 -2
  326. package/es/components/image-viewer/src/image-viewer.mjs +45 -412
  327. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  328. package/es/components/image-viewer/src/image-viewer2.mjs +412 -45
  329. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  330. package/es/components/index.mjs +24 -24
  331. package/es/components/input/index.mjs +2 -2
  332. package/es/components/input/src/input.mjs +102 -431
  333. package/es/components/input/src/input.mjs.map +1 -1
  334. package/es/components/input/src/input2.mjs +431 -102
  335. package/es/components/input/src/input2.mjs.map +1 -1
  336. package/es/components/mention/src/mention.mjs +1 -1
  337. package/es/components/mention/src/mention2.mjs +1 -1
  338. package/es/components/pagination/src/components/prev.mjs +17 -35
  339. package/es/components/pagination/src/components/prev.mjs.map +1 -1
  340. package/es/components/pagination/src/components/prev2.mjs +35 -17
  341. package/es/components/pagination/src/components/prev2.mjs.map +1 -1
  342. package/es/components/pagination/src/pagination.mjs +1 -1
  343. package/es/components/popper/index.mjs +2 -2
  344. package/es/components/popper/src/arrow.mjs +36 -7
  345. package/es/components/popper/src/arrow.mjs.map +1 -1
  346. package/es/components/popper/src/arrow2.mjs +7 -36
  347. package/es/components/popper/src/arrow2.mjs.map +1 -1
  348. package/es/components/progress/index.mjs +2 -2
  349. package/es/components/progress/src/progress.mjs +53 -207
  350. package/es/components/progress/src/progress.mjs.map +1 -1
  351. package/es/components/progress/src/progress2.mjs +207 -53
  352. package/es/components/progress/src/progress2.mjs.map +1 -1
  353. package/es/components/result/index.mjs +2 -2
  354. package/es/components/result/src/result.mjs +28 -62
  355. package/es/components/result/src/result.mjs.map +1 -1
  356. package/es/components/result/src/result2.mjs +62 -28
  357. package/es/components/result/src/result2.mjs.map +1 -1
  358. package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
  359. package/es/components/scrollbar/index.mjs +1 -1
  360. package/es/components/scrollbar/src/bar.mjs +10 -64
  361. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  362. package/es/components/scrollbar/src/bar2.mjs +64 -10
  363. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  364. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  365. package/es/components/scrollbar/src/thumb.mjs +129 -11
  366. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  367. package/es/components/scrollbar/src/thumb2.mjs +11 -129
  368. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  369. package/es/components/slider/index.mjs +2 -2
  370. package/es/components/slider/src/slider.mjs +88 -238
  371. package/es/components/slider/src/slider.mjs.map +1 -1
  372. package/es/components/slider/src/slider2.mjs +238 -88
  373. package/es/components/slider/src/slider2.mjs.map +1 -1
  374. package/es/components/text/index.mjs +2 -2
  375. package/es/components/text/src/text.mjs +67 -21
  376. package/es/components/text/src/text.mjs.map +1 -1
  377. package/es/components/text/src/text2.mjs +21 -67
  378. package/es/components/text/src/text2.mjs.map +1 -1
  379. package/es/components/time-picker/index.mjs +1 -1
  380. package/es/components/time-picker/src/common/picker-range-trigger.mjs +2 -2
  381. package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
  382. package/es/components/time-picker/src/common/props.d.ts +25 -0
  383. package/es/components/time-picker/src/common/props.mjs +3 -2
  384. package/es/components/time-picker/src/common/props.mjs.map +1 -1
  385. package/es/components/time-select/src/time-select.d.ts +1 -0
  386. package/es/components/time-select/src/time-select.mjs +4 -0
  387. package/es/components/time-select/src/time-select.mjs.map +1 -1
  388. package/es/components/time-select/src/time-select.vue.d.ts +3 -0
  389. package/es/components/time-select/src/time-select2.mjs +12 -4
  390. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  391. package/es/components/tooltip/src/tooltip.mjs +1 -1
  392. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  393. package/es/components/tooltip-v2/index.mjs +2 -2
  394. package/es/components/tooltip-v2/src/content.mjs +110 -48
  395. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  396. package/es/components/tooltip-v2/src/content2.mjs +48 -110
  397. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  398. package/es/components/tooltip-v2/src/root.mjs +79 -17
  399. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  400. package/es/components/tooltip-v2/src/root2.mjs +17 -79
  401. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  402. package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
  403. package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
  404. package/es/components/tour/index.mjs +3 -3
  405. package/es/components/tour/src/content.mjs +67 -43
  406. package/es/components/tour/src/content.mjs.map +1 -1
  407. package/es/components/tour/src/content2.mjs +43 -67
  408. package/es/components/tour/src/content2.mjs.map +1 -1
  409. package/es/components/tour/src/mask.mjs +75 -18
  410. package/es/components/tour/src/mask.mjs.map +1 -1
  411. package/es/components/tour/src/mask2.mjs +18 -75
  412. package/es/components/tour/src/mask2.mjs.map +1 -1
  413. package/es/components/tour/src/step.mjs +1 -1
  414. package/es/components/tour/src/tour.mjs +68 -153
  415. package/es/components/tour/src/tour.mjs.map +1 -1
  416. package/es/components/tour/src/tour2.mjs +153 -68
  417. package/es/components/tour/src/tour2.mjs.map +1 -1
  418. package/es/components/upload/index.mjs +2 -2
  419. package/es/components/upload/src/upload-content.mjs +196 -33
  420. package/es/components/upload/src/upload-content.mjs.map +1 -1
  421. package/es/components/upload/src/upload-content2.mjs +33 -196
  422. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  423. package/es/components/upload/src/upload-dragger.mjs +10 -47
  424. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  425. package/es/components/upload/src/upload-dragger2.mjs +47 -10
  426. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  427. package/es/components/upload/src/upload2.mjs +1 -1
  428. package/es/index.mjs +24 -24
  429. package/es/version.d.ts +1 -1
  430. package/es/version.mjs +1 -1
  431. package/es/version.mjs.map +1 -1
  432. package/lib/components/alert/index.js +2 -2
  433. package/lib/components/alert/src/alert.js +88 -37
  434. package/lib/components/alert/src/alert.js.map +1 -1
  435. package/lib/components/alert/src/alert2.js +37 -88
  436. package/lib/components/alert/src/alert2.js.map +1 -1
  437. package/lib/components/anchor/index.js +3 -3
  438. package/lib/components/anchor/src/anchor-link.js +5 -81
  439. package/lib/components/anchor/src/anchor-link.js.map +1 -1
  440. package/lib/components/anchor/src/anchor-link2.js +81 -5
  441. package/lib/components/anchor/src/anchor-link2.js.map +1 -1
  442. package/lib/components/anchor/src/anchor.js +42 -191
  443. package/lib/components/anchor/src/anchor.js.map +1 -1
  444. package/lib/components/anchor/src/anchor2.js +191 -42
  445. package/lib/components/anchor/src/anchor2.js.map +1 -1
  446. package/lib/components/autocomplete/index.js +2 -2
  447. package/lib/components/autocomplete/src/autocomplete.js +363 -79
  448. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  449. package/lib/components/autocomplete/src/autocomplete2.js +79 -363
  450. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  451. package/lib/components/card/index.js +2 -2
  452. package/lib/components/card/src/card.js +20 -42
  453. package/lib/components/card/src/card.js.map +1 -1
  454. package/lib/components/card/src/card2.js +42 -20
  455. package/lib/components/card/src/card2.js.map +1 -1
  456. package/lib/components/carousel/index.js +2 -2
  457. package/lib/components/carousel/src/carousel.js +62 -204
  458. package/lib/components/carousel/src/carousel.js.map +1 -1
  459. package/lib/components/carousel/src/carousel2.js +204 -62
  460. package/lib/components/carousel/src/carousel2.js.map +1 -1
  461. package/lib/components/check-tag/index.js +2 -2
  462. package/lib/components/check-tag/src/check-tag.js +15 -38
  463. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  464. package/lib/components/check-tag/src/check-tag2.js +38 -15
  465. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  466. package/lib/components/collection/index.js +1 -1
  467. package/lib/components/collection/src/collection.js +62 -9
  468. package/lib/components/collection/src/collection.js.map +1 -1
  469. package/lib/components/collection/src/collection2.js +9 -62
  470. package/lib/components/collection/src/collection2.js.map +1 -1
  471. package/lib/components/color-picker/index.js +2 -2
  472. package/lib/components/color-picker/src/color-picker.js +40 -400
  473. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  474. package/lib/components/color-picker/src/color-picker2.js +400 -40
  475. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  476. package/lib/components/color-picker/src/components/predefine.js +1 -1
  477. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  478. package/lib/components/dropdown/src/dropdown.js +1 -1
  479. package/lib/components/empty/index.js +2 -2
  480. package/lib/components/empty/src/empty.js +52 -11
  481. package/lib/components/empty/src/empty.js.map +1 -1
  482. package/lib/components/empty/src/empty2.js +11 -52
  483. package/lib/components/empty/src/empty2.js.map +1 -1
  484. package/lib/components/form/index.js +2 -2
  485. package/lib/components/form/src/form-item.js +48 -323
  486. package/lib/components/form/src/form-item.js.map +1 -1
  487. package/lib/components/form/src/form-item2.js +323 -48
  488. package/lib/components/form/src/form-item2.js.map +1 -1
  489. package/lib/components/image/index.js +2 -2
  490. package/lib/components/image/src/image.d.ts +2 -0
  491. package/lib/components/image/src/image.js +64 -231
  492. package/lib/components/image/src/image.js.map +1 -1
  493. package/lib/components/image/src/image.vue.d.ts +5 -1
  494. package/lib/components/image/src/image2.js +234 -64
  495. package/lib/components/image/src/image2.js.map +1 -1
  496. package/lib/components/image-viewer/index.js +2 -2
  497. package/lib/components/image-viewer/src/image-viewer.js +46 -412
  498. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  499. package/lib/components/image-viewer/src/image-viewer2.js +412 -46
  500. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  501. package/lib/components/index.js +24 -23
  502. package/lib/components/index.js.map +1 -1
  503. package/lib/components/input/index.js +2 -2
  504. package/lib/components/input/src/input.js +102 -430
  505. package/lib/components/input/src/input.js.map +1 -1
  506. package/lib/components/input/src/input2.js +430 -102
  507. package/lib/components/input/src/input2.js.map +1 -1
  508. package/lib/components/mention/src/mention.js +1 -1
  509. package/lib/components/mention/src/mention2.js +1 -1
  510. package/lib/components/pagination/src/components/prev.js +18 -35
  511. package/lib/components/pagination/src/components/prev.js.map +1 -1
  512. package/lib/components/pagination/src/components/prev2.js +35 -18
  513. package/lib/components/pagination/src/components/prev2.js.map +1 -1
  514. package/lib/components/pagination/src/pagination.js +1 -1
  515. package/lib/components/popper/index.js +2 -2
  516. package/lib/components/popper/src/arrow.js +36 -8
  517. package/lib/components/popper/src/arrow.js.map +1 -1
  518. package/lib/components/popper/src/arrow2.js +8 -36
  519. package/lib/components/popper/src/arrow2.js.map +1 -1
  520. package/lib/components/progress/index.js +2 -2
  521. package/lib/components/progress/src/progress.js +53 -207
  522. package/lib/components/progress/src/progress.js.map +1 -1
  523. package/lib/components/progress/src/progress2.js +207 -53
  524. package/lib/components/progress/src/progress2.js.map +1 -1
  525. package/lib/components/result/index.js +2 -2
  526. package/lib/components/result/src/result.js +30 -62
  527. package/lib/components/result/src/result.js.map +1 -1
  528. package/lib/components/result/src/result2.js +62 -30
  529. package/lib/components/result/src/result2.js.map +1 -1
  530. package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
  531. package/lib/components/scrollbar/index.js +1 -1
  532. package/lib/components/scrollbar/src/bar.js +10 -64
  533. package/lib/components/scrollbar/src/bar.js.map +1 -1
  534. package/lib/components/scrollbar/src/bar2.js +64 -10
  535. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  536. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  537. package/lib/components/scrollbar/src/thumb.js +129 -11
  538. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  539. package/lib/components/scrollbar/src/thumb2.js +11 -129
  540. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  541. package/lib/components/slider/index.js +2 -2
  542. package/lib/components/slider/src/slider.js +89 -238
  543. package/lib/components/slider/src/slider.js.map +1 -1
  544. package/lib/components/slider/src/slider2.js +238 -89
  545. package/lib/components/slider/src/slider2.js.map +1 -1
  546. package/lib/components/text/index.js +2 -2
  547. package/lib/components/text/src/text.js +67 -21
  548. package/lib/components/text/src/text.js.map +1 -1
  549. package/lib/components/text/src/text2.js +21 -67
  550. package/lib/components/text/src/text2.js.map +1 -1
  551. package/lib/components/time-picker/index.js +1 -0
  552. package/lib/components/time-picker/index.js.map +1 -1
  553. package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
  554. package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
  555. package/lib/components/time-picker/src/common/props.d.ts +25 -0
  556. package/lib/components/time-picker/src/common/props.js +3 -1
  557. package/lib/components/time-picker/src/common/props.js.map +1 -1
  558. package/lib/components/time-select/src/time-select.d.ts +1 -0
  559. package/lib/components/time-select/src/time-select.js +4 -0
  560. package/lib/components/time-select/src/time-select.js.map +1 -1
  561. package/lib/components/time-select/src/time-select.vue.d.ts +3 -0
  562. package/lib/components/time-select/src/time-select2.js +12 -4
  563. package/lib/components/time-select/src/time-select2.js.map +1 -1
  564. package/lib/components/tooltip/src/tooltip.js +1 -1
  565. package/lib/components/tooltip/src/tooltip2.js +1 -1
  566. package/lib/components/tooltip-v2/index.js +2 -2
  567. package/lib/components/tooltip-v2/src/content.js +110 -48
  568. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  569. package/lib/components/tooltip-v2/src/content2.js +48 -110
  570. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  571. package/lib/components/tooltip-v2/src/root.js +79 -17
  572. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  573. package/lib/components/tooltip-v2/src/root2.js +17 -79
  574. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  575. package/lib/components/tooltip-v2/src/tooltip.js +2 -2
  576. package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
  577. package/lib/components/tour/index.js +3 -3
  578. package/lib/components/tour/src/content.js +67 -46
  579. package/lib/components/tour/src/content.js.map +1 -1
  580. package/lib/components/tour/src/content2.js +46 -67
  581. package/lib/components/tour/src/content2.js.map +1 -1
  582. package/lib/components/tour/src/mask.js +75 -18
  583. package/lib/components/tour/src/mask.js.map +1 -1
  584. package/lib/components/tour/src/mask2.js +18 -75
  585. package/lib/components/tour/src/mask2.js.map +1 -1
  586. package/lib/components/tour/src/step.js +1 -1
  587. package/lib/components/tour/src/tour.js +67 -151
  588. package/lib/components/tour/src/tour.js.map +1 -1
  589. package/lib/components/tour/src/tour2.js +151 -67
  590. package/lib/components/tour/src/tour2.js.map +1 -1
  591. package/lib/components/upload/index.js +2 -2
  592. package/lib/components/upload/src/upload-content.js +194 -31
  593. package/lib/components/upload/src/upload-content.js.map +1 -1
  594. package/lib/components/upload/src/upload-content2.js +31 -194
  595. package/lib/components/upload/src/upload-content2.js.map +1 -1
  596. package/lib/components/upload/src/upload-dragger.js +11 -47
  597. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  598. package/lib/components/upload/src/upload-dragger2.js +47 -11
  599. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  600. package/lib/components/upload/src/upload2.js +1 -1
  601. package/lib/index.js +24 -23
  602. package/lib/index.js.map +1 -1
  603. package/lib/version.d.ts +1 -1
  604. package/lib/version.js +1 -1
  605. package/lib/version.js.map +1 -1
  606. package/package.json +2 -2
  607. package/tags.json +1 -1
  608. package/theme-chalk/el-dialog.css +1 -1
  609. package/theme-chalk/index.css +1 -1
  610. package/theme-chalk/src/dialog.scss +1 -0
  611. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var input$1 = require('./src/input.js');
6
- var input = require('./src/input2.js');
5
+ var input$1 = require('./src/input2.js');
6
+ var input = require('./src/input.js');
7
7
  var install = require('../../utils/vue/install.js');
8
8
 
9
9
  const ElInput = install.withInstall(input$1["default"]);
@@ -2,439 +2,111 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
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');
5
+ var index = require('../../../hooks/use-size/index.js');
17
6
  var icon = require('../../../utils/vue/icon.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');
22
- var shared = require('@vue/shared');
7
+ var typescript = require('../../../utils/typescript.js');
8
+ var index$1 = require('../../../hooks/use-aria/index.js');
23
9
  var event = require('../../../constants/event.js');
10
+ var runtime = require('../../../utils/vue/props/runtime.js');
11
+ var shared = require('@vue/shared');
24
12
 
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
- }
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"])
436
94
  });
437
- var Input = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "input.vue"]]);
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
+ };
438
109
 
439
- exports["default"] = Input;
110
+ exports.inputEmits = inputEmits;
111
+ exports.inputProps = inputProps;
440
112
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n containerKls,\n {\n [nsInput.bm('group', 'append')]: $slots.append,\n [nsInput.bm('group', 'prepend')]: $slots.prepend,\n },\n ]\"\n :style=\"containerStyle\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- input -->\n <template v-if=\"type !== 'textarea'\">\n <!-- prepend slot -->\n <div v-if=\"$slots.prepend\" :class=\"nsInput.be('group', 'prepend')\">\n <slot name=\"prepend\" />\n </div>\n\n <div ref=\"wrapperRef\" :class=\"wrapperKls\">\n <!-- prefix slot -->\n <span v-if=\"$slots.prefix || prefixIcon\" :class=\"nsInput.e('prefix')\">\n <span :class=\"nsInput.e('prefix-inner')\">\n <slot name=\"prefix\" />\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </span>\n </span>\n\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"nsInput.e('inner')\"\n v-bind=\"attrs\"\n :minlength=\"minlength\"\n :maxlength=\"maxlength\"\n :type=\"showPassword ? (passwordVisible ? 'text' : 'password') : type\"\n :disabled=\"inputDisabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :tabindex=\"tabindex\"\n :aria-label=\"ariaLabel\"\n :placeholder=\"placeholder\"\n :style=\"inputStyle\"\n :form=\"form\"\n :autofocus=\"autofocus\"\n :role=\"containerRole\"\n @compositionstart=\"handleCompositionStart\"\n @compositionupdate=\"handleCompositionUpdate\"\n @compositionend=\"handleCompositionEnd\"\n @input=\"handleInput\"\n @change=\"handleChange\"\n @keydown=\"handleKeydown\"\n />\n\n <!-- suffix slot -->\n <span v-if=\"suffixVisible\" :class=\"nsInput.e('suffix')\">\n <span :class=\"nsInput.e('suffix-inner')\">\n <template\n v-if=\"!showClear || !showPwdVisible || !isWordLimitVisible\"\n >\n <slot name=\"suffix\" />\n <el-icon v-if=\"suffixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"suffixIcon\" />\n </el-icon>\n </template>\n <el-icon\n v-if=\"showClear\"\n :class=\"[nsInput.e('icon'), nsInput.e('clear')]\"\n @mousedown.prevent=\"NOOP\"\n @click=\"clear\"\n >\n <circle-close />\n </el-icon>\n <el-icon\n v-if=\"showPwdVisible\"\n :class=\"[nsInput.e('icon'), nsInput.e('password')]\"\n @click=\"handlePasswordVisible\"\n >\n <component :is=\"passwordIcon\" />\n </el-icon>\n <span v-if=\"isWordLimitVisible\" :class=\"nsInput.e('count')\">\n <span :class=\"nsInput.e('count-inner')\">\n {{ textLength }} / {{ maxlength }}\n </span>\n </span>\n <el-icon\n v-if=\"validateState && validateIcon && needStatusIcon\"\n :class=\"[\n nsInput.e('icon'),\n nsInput.e('validateIcon'),\n nsInput.is('loading', validateState === 'validating'),\n ]\"\n >\n <component :is=\"validateIcon\" />\n </el-icon>\n </span>\n </span>\n </div>\n\n <!-- append slot -->\n <div v-if=\"$slots.append\" :class=\"nsInput.be('group', 'append')\">\n <slot name=\"append\" />\n </div>\n </template>\n\n <!-- textarea -->\n <template v-else>\n <textarea\n :id=\"inputId\"\n ref=\"textarea\"\n :class=\"[nsTextarea.e('inner'), nsInput.is('focus', isFocused)]\"\n v-bind=\"attrs\"\n :minlength=\"minlength\"\n :maxlength=\"maxlength\"\n :tabindex=\"tabindex\"\n :disabled=\"inputDisabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :style=\"textareaStyle\"\n :aria-label=\"ariaLabel\"\n :placeholder=\"placeholder\"\n :form=\"form\"\n :autofocus=\"autofocus\"\n :rows=\"rows\"\n :role=\"containerRole\"\n @compositionstart=\"handleCompositionStart\"\n @compositionupdate=\"handleCompositionUpdate\"\n @compositionend=\"handleCompositionEnd\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @change=\"handleChange\"\n @keydown=\"handleKeydown\"\n />\n <span\n v-if=\"isWordLimitVisible\"\n :style=\"countStyle\"\n :class=\"nsInput.e('count')\"\n >\n {{ textLength }} / {{ maxlength }}\n </span>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n shallowRef,\n toRef,\n useAttrs as useRawAttrs,\n useSlots,\n watch,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n CircleClose,\n Hide as IconHide,\n View as IconView,\n} from '@element-plus/icons-vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n NOOP,\n ValidateComponentsMap,\n debugWarn,\n isClient,\n isObject,\n} from '@element-plus/utils'\nimport {\n useAttrs,\n useComposition,\n useCursor,\n useFocusController,\n useNamespace,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { calcTextareaHeight } from './utils'\nimport { inputEmits, inputProps } from './input'\nimport type { StyleValue } from 'vue'\n\ntype TargetElement = HTMLInputElement | HTMLTextAreaElement\n\ndefineOptions({\n name: 'ElInput',\n inheritAttrs: false,\n})\nconst props = defineProps(inputProps)\nconst emit = defineEmits(inputEmits)\n\nconst rawAttrs = useRawAttrs()\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst containerKls = computed(() => [\n props.type === 'textarea' ? nsTextarea.b() : nsInput.b(),\n nsInput.m(inputSize.value),\n nsInput.is('disabled', inputDisabled.value),\n nsInput.is('exceed', inputExceed.value),\n {\n [nsInput.b('group')]: slots.prepend || slots.append,\n [nsInput.m('prefix')]: slots.prefix || props.prefixIcon,\n [nsInput.m('suffix')]:\n slots.suffix || props.suffixIcon || props.clearable || props.showPassword,\n [nsInput.bm('suffix', 'password-clear')]:\n showClear.value && showPwdVisible.value,\n [nsInput.b('hidden')]: props.type === 'hidden',\n },\n rawAttrs.class,\n])\n\nconst wrapperKls = computed(() => [\n nsInput.e('wrapper'),\n nsInput.is('focus', isFocused.value),\n])\n\nconst { form: elForm, formItem: elFormItem } = useFormItem()\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n})\nconst inputSize = useFormSize()\nconst inputDisabled = useFormDisabled()\nconst nsInput = useNamespace('input')\nconst nsTextarea = useNamespace('textarea')\n\nconst input = shallowRef<HTMLInputElement>()\nconst textarea = shallowRef<HTMLTextAreaElement>()\n\nconst hovering = ref(false)\nconst passwordVisible = ref(false)\nconst countStyle = ref<StyleValue>()\nconst textareaCalcStyle = shallowRef(props.inputStyle)\n\nconst _ref = computed(() => input.value || textarea.value)\n\n// wrapperRef for type=\"text\", handleFocus and handleBlur for type=\"textarea\"\nconst { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(\n _ref,\n {\n beforeFocus() {\n return inputDisabled.value\n },\n afterBlur() {\n if (props.validateEvent) {\n elFormItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n },\n }\n)\n\nconst needStatusIcon = computed(() => elForm?.statusIcon ?? false)\nconst validateState = computed(() => elFormItem?.validateState || '')\nconst validateIcon = computed(\n () => validateState.value && ValidateComponentsMap[validateState.value]\n)\nconst passwordIcon = computed(() =>\n passwordVisible.value ? IconView : IconHide\n)\nconst containerStyle = computed<StyleValue>(() => [\n rawAttrs.style as StyleValue,\n])\nconst textareaStyle = computed<StyleValue>(() => [\n props.inputStyle,\n textareaCalcStyle.value,\n { resize: props.resize },\n])\nconst nativeInputValue = computed(() =>\n isNil(props.modelValue) ? '' : String(props.modelValue)\n)\nconst showClear = computed(\n () =>\n props.clearable &&\n !inputDisabled.value &&\n !props.readonly &&\n !!nativeInputValue.value &&\n (isFocused.value || hovering.value)\n)\nconst showPwdVisible = computed(\n () =>\n props.showPassword &&\n !inputDisabled.value &&\n !!nativeInputValue.value &&\n (!!nativeInputValue.value || isFocused.value)\n)\nconst isWordLimitVisible = computed(\n () =>\n props.showWordLimit &&\n !!props.maxlength &&\n (props.type === 'text' || props.type === 'textarea') &&\n !inputDisabled.value &&\n !props.readonly &&\n !props.showPassword\n)\nconst textLength = computed(() => nativeInputValue.value.length)\nconst inputExceed = computed(\n () =>\n // show exceed style if length of initial value greater then maxlength\n !!isWordLimitVisible.value && textLength.value > Number(props.maxlength)\n)\nconst suffixVisible = computed(\n () =>\n !!slots.suffix ||\n !!props.suffixIcon ||\n showClear.value ||\n props.showPassword ||\n isWordLimitVisible.value ||\n (!!validateState.value && needStatusIcon.value)\n)\n\nconst [recordCursor, setCursor] = useCursor(input)\n\nuseResizeObserver(textarea, (entries) => {\n onceInitSizeTextarea()\n if (!isWordLimitVisible.value || props.resize !== 'both') return\n const entry = entries[0]\n const { width } = entry.contentRect\n countStyle.value = {\n /** right: 100% - width + padding(15) + right(6) */\n right: `calc(100% - ${width + 15 + 6}px)`,\n }\n})\n\nconst resizeTextarea = () => {\n const { type, autosize } = props\n\n if (!isClient || type !== 'textarea' || !textarea.value) return\n\n if (autosize) {\n const minRows = isObject(autosize) ? autosize.minRows : undefined\n const maxRows = isObject(autosize) ? autosize.maxRows : undefined\n const textareaStyle = calcTextareaHeight(textarea.value, minRows, maxRows)\n\n // If the scrollbar is displayed, the height of the textarea needs more space than the calculated height.\n // If set textarea height in this case, the scrollbar will not hide.\n // So we need to hide scrollbar first, and reset it in next tick.\n // see https://github.com/element-plus/element-plus/issues/8825\n textareaCalcStyle.value = {\n overflowY: 'hidden',\n ...textareaStyle,\n }\n\n nextTick(() => {\n // NOTE: Force repaint to make sure the style set above is applied.\n textarea.value!.offsetHeight\n textareaCalcStyle.value = textareaStyle\n })\n } else {\n textareaCalcStyle.value = {\n minHeight: calcTextareaHeight(textarea.value).minHeight,\n }\n }\n}\n\nconst createOnceInitResize = (resizeTextarea: () => void) => {\n let isInit = false\n return () => {\n if (isInit || !props.autosize) return\n const isElHidden = textarea.value?.offsetParent === null\n if (!isElHidden) {\n resizeTextarea()\n isInit = true\n }\n }\n}\n// fix: https://github.com/element-plus/element-plus/issues/12074\nconst onceInitSizeTextarea = createOnceInitResize(resizeTextarea)\n\nconst setNativeInputValue = () => {\n const input = _ref.value\n const formatterValue = props.formatter\n ? props.formatter(nativeInputValue.value)\n : nativeInputValue.value\n if (!input || input.value === formatterValue) return\n input.value = formatterValue\n}\n\nconst handleInput = async (event: Event) => {\n recordCursor()\n\n let { value } = event.target as TargetElement\n\n if (props.formatter) {\n value = props.parser ? props.parser(value) : value\n }\n\n // should not emit input during composition\n // see: https://github.com/ElemeFE/element/issues/10516\n if (isComposing.value) return\n\n // hack for https://github.com/ElemeFE/element/issues/8548\n // should remove the following line when we don't support IE\n if (value === nativeInputValue.value) {\n setNativeInputValue()\n return\n }\n\n emit(UPDATE_MODEL_EVENT, value)\n emit('input', value)\n\n // ensure native input value is controlled\n // see: https://github.com/ElemeFE/element/issues/12850\n await nextTick()\n setNativeInputValue()\n setCursor()\n}\n\nconst handleChange = (event: Event) => {\n emit('change', (event.target as TargetElement).value)\n}\n\nconst {\n isComposing,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n} = useComposition({ emit, afterComposition: handleInput })\n\nconst handlePasswordVisible = () => {\n recordCursor()\n passwordVisible.value = !passwordVisible.value\n // The native input needs a little time to regain focus\n setTimeout(setCursor)\n}\n\nconst focus = () => _ref.value?.focus()\n\nconst blur = () => _ref.value?.blur()\n\nconst handleMouseLeave = (evt: MouseEvent) => {\n hovering.value = false\n emit('mouseleave', evt)\n}\n\nconst handleMouseEnter = (evt: MouseEvent) => {\n hovering.value = true\n emit('mouseenter', evt)\n}\n\nconst handleKeydown = (evt: KeyboardEvent) => {\n emit('keydown', evt)\n}\n\nconst select = () => {\n _ref.value?.select()\n}\n\nconst clear = () => {\n emit(UPDATE_MODEL_EVENT, '')\n emit('change', '')\n emit('clear')\n emit('input', '')\n}\n\nwatch(\n () => props.modelValue,\n () => {\n nextTick(() => resizeTextarea())\n if (props.validateEvent) {\n elFormItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n }\n)\n\n// native input value is set explicitly\n// do not use v-model / :value in template\n// see: https://github.com/ElemeFE/element/issues/14521\nwatch(nativeInputValue, () => setNativeInputValue())\n\n// when change between <input> and <textarea>,\n// update DOM dependent value and styles\n// https://github.com/ElemeFE/element/issues/14857\nwatch(\n () => props.type,\n async () => {\n await nextTick()\n setNativeInputValue()\n resizeTextarea()\n }\n)\n\nonMounted(() => {\n if (!props.formatter && props.parser) {\n debugWarn(\n 'ElInput',\n 'If you set the parser, you also need to set the formatter.'\n )\n }\n setNativeInputValue()\n nextTick(resizeTextarea)\n})\n\ndefineExpose({\n /** @description HTML input element */\n input,\n /** @description HTML textarea element */\n textarea,\n /** @description HTML element, input or textarea */\n ref: _ref,\n /** @description style of textarea. */\n textareaStyle,\n\n /** @description from props (used on unit test) */\n autosize: toRef(props, 'autosize'),\n\n /** @description is input composing */\n isComposing,\n\n /** @description HTML input element native method */\n focus,\n /** @description HTML input element native method */\n blur,\n /** @description HTML input element native method */\n select,\n /** @description clear input value */\n clear,\n /** @description resize textarea. */\n resizeTextarea,\n})\n</script>\n"],"names":["useRawAttrs","useAttrs","useSlots","computed","useFormItem","useFormItemInputId","useFormSize","useFormDisabled","useNamespace","shallowRef","ref","useFocusController","debugWarn","IconView","IconHide","isNil","useResizeObserver","isClient","isObject","calcTextareaHeight","nextTick","textareaStyle","event","resizeTextarea","input","useComposition","UPDATE_MODEL_EVENT","watch","onMounted","toRef","_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_createCommentVNode","_Fragment","_renderSlot","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;uCAmMc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,WAAWA,YAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,QAAQC,cAAS,EAAA,CAAA;AACvB,IAAA,MAAM,QA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"input.js","sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n Object,\n ]),\n default: '',\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 type of input\n */\n type: {\n type: String,\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType<InputAutoSize>([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: Boolean,\n /**\n * @description native input readonly\n */\n clearable: Boolean,\n /**\n * @description toggleable password input\n */\n showPassword: Boolean,\n /**\n * @description word count\n */\n showWordLimit: Boolean,\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or textarea element style\n */\n inputStyle: {\n type: definePropType<StyleValue>([Object, Array, String]),\n default: () => mutable({} as const),\n },\n /**\n * @description native input autofocus\n */\n autofocus: Boolean,\n rows: {\n type: Number,\n default: 2,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type InputProps = ExtractPropTypes<typeof inputProps>\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n"],"names":["buildProps","useSizeProp","definePropType","iconPropType","mutable","useAriaProps","UPDATE_MODEL_EVENT","isString"],"mappings":";;;;;;;;;;;;AASY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EA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