@element-plus/nightly 0.0.20260106 → 0.0.20260107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (610) hide show
  1. package/dist/index.full.js +41 -7
  2. package/dist/index.full.min.js +16 -16
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +15 -15
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +41 -7
  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/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/affix/src/affix.mjs +1 -1
  276. package/es/components/alert/src/alert2.mjs +11 -1
  277. package/es/components/alert/src/alert2.mjs.map +1 -1
  278. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  279. package/es/components/autocomplete/src/autocomplete2.mjs +1 -1
  280. package/es/components/badge/index.mjs +2 -2
  281. package/es/components/badge/src/badge.mjs +31 -83
  282. package/es/components/badge/src/badge.mjs.map +1 -1
  283. package/es/components/badge/src/badge2.mjs +83 -31
  284. package/es/components/badge/src/badge2.mjs.map +1 -1
  285. package/es/components/calendar/index.mjs +2 -2
  286. package/es/components/calendar/src/calendar.mjs +23 -196
  287. package/es/components/calendar/src/calendar.mjs.map +1 -1
  288. package/es/components/calendar/src/calendar2.mjs +196 -23
  289. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  290. package/es/components/checkbox/index.mjs +2 -2
  291. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  292. package/es/components/checkbox/src/checkbox-group2.mjs +1 -1
  293. package/es/components/checkbox/src/checkbox.mjs +134 -62
  294. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  295. package/es/components/checkbox/src/checkbox2.mjs +62 -134
  296. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  297. package/es/components/countdown/index.mjs +2 -2
  298. package/es/components/countdown/src/countdown.mjs +83 -20
  299. package/es/components/countdown/src/countdown.mjs.map +1 -1
  300. package/es/components/countdown/src/countdown2.mjs +20 -83
  301. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  302. package/es/components/dialog/src/dialog.mjs +1 -1
  303. package/es/components/divider/index.mjs +2 -2
  304. package/es/components/divider/src/divider.mjs +15 -43
  305. package/es/components/divider/src/divider.mjs.map +1 -1
  306. package/es/components/divider/src/divider2.mjs +43 -15
  307. package/es/components/divider/src/divider2.mjs.map +1 -1
  308. package/es/components/empty/index.mjs +2 -2
  309. package/es/components/empty/src/empty.mjs +80 -10
  310. package/es/components/empty/src/empty.mjs.map +1 -1
  311. package/es/components/empty/src/empty2.mjs +10 -80
  312. package/es/components/empty/src/empty2.mjs.map +1 -1
  313. package/es/components/form/src/form-item.vue.d.ts +4 -0
  314. package/es/components/form/src/form-item2.mjs +8 -3
  315. package/es/components/form/src/form-item2.mjs.map +1 -1
  316. package/es/components/form/src/form.vue.d.ts +4 -0
  317. package/es/components/form/src/form2.mjs +26 -1
  318. package/es/components/form/src/form2.mjs.map +1 -1
  319. package/es/components/form/src/types.d.ts +2 -0
  320. package/es/components/icon/index.mjs +2 -2
  321. package/es/components/icon/src/icon.mjs +39 -7
  322. package/es/components/icon/src/icon.mjs.map +1 -1
  323. package/es/components/icon/src/icon2.mjs +7 -39
  324. package/es/components/icon/src/icon2.mjs.map +1 -1
  325. package/es/components/image/index.mjs +2 -2
  326. package/es/components/image/src/image.mjs +279 -68
  327. package/es/components/image/src/image.mjs.map +1 -1
  328. package/es/components/image/src/image2.mjs +68 -279
  329. package/es/components/image/src/image2.mjs.map +1 -1
  330. package/es/components/index.mjs +23 -23
  331. package/es/components/input/index.mjs +2 -2
  332. package/es/components/input/src/input.mjs +124 -586
  333. package/es/components/input/src/input.mjs.map +1 -1
  334. package/es/components/input/src/input2.mjs +586 -124
  335. package/es/components/input/src/input2.mjs.map +1 -1
  336. package/es/components/input-number/index.mjs +2 -2
  337. package/es/components/input-number/src/input-number.mjs +414 -73
  338. package/es/components/input-number/src/input-number.mjs.map +1 -1
  339. package/es/components/input-number/src/input-number2.mjs +73 -414
  340. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  341. package/es/components/input-tag/index.mjs +2 -2
  342. package/es/components/input-tag/src/input-tag.mjs +344 -82
  343. package/es/components/input-tag/src/input-tag.mjs.map +1 -1
  344. package/es/components/input-tag/src/input-tag2.mjs +82 -344
  345. package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
  346. package/es/components/link/index.mjs +2 -2
  347. package/es/components/link/src/link.mjs +80 -24
  348. package/es/components/link/src/link.mjs.map +1 -1
  349. package/es/components/link/src/link2.mjs +24 -80
  350. package/es/components/link/src/link2.mjs.map +1 -1
  351. package/es/components/mention/src/mention-dropdown.mjs +205 -14
  352. package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
  353. package/es/components/mention/src/mention-dropdown2.mjs +14 -205
  354. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  355. package/es/components/mention/src/mention.mjs +1 -1
  356. package/es/components/mention/src/mention2.mjs +2 -2
  357. package/es/components/notification/index.mjs +1 -1
  358. package/es/components/notification/src/notification.mjs +174 -72
  359. package/es/components/notification/src/notification.mjs.map +1 -1
  360. package/es/components/notification/src/notification2.mjs +72 -174
  361. package/es/components/notification/src/notification2.mjs.map +1 -1
  362. package/es/components/notification/src/notify.mjs +2 -2
  363. package/es/components/page-header/index.mjs +2 -2
  364. package/es/components/page-header/src/page-header.mjs +149 -15
  365. package/es/components/page-header/src/page-header.mjs.map +1 -1
  366. package/es/components/page-header/src/page-header2.mjs +15 -149
  367. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  368. package/es/components/pagination/src/components/jumper.mjs +7 -69
  369. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  370. package/es/components/pagination/src/components/jumper2.mjs +69 -7
  371. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  372. package/es/components/pagination/src/components/pager.mjs +15 -229
  373. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  374. package/es/components/pagination/src/components/pager2.mjs +229 -15
  375. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  376. package/es/components/pagination/src/pagination.mjs +2 -2
  377. package/es/components/popconfirm/index.mjs +2 -2
  378. package/es/components/popconfirm/src/popconfirm.mjs +163 -49
  379. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  380. package/es/components/popconfirm/src/popconfirm2.mjs +49 -163
  381. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  382. package/es/components/popover/index.mjs +2 -2
  383. package/es/components/popover/src/popover.mjs +65 -120
  384. package/es/components/popover/src/popover.mjs.map +1 -1
  385. package/es/components/popover/src/popover2.mjs +120 -65
  386. package/es/components/popover/src/popover2.mjs.map +1 -1
  387. package/es/components/progress/index.mjs +2 -2
  388. package/es/components/progress/src/progress.mjs +52 -256
  389. package/es/components/progress/src/progress.mjs.map +1 -1
  390. package/es/components/progress/src/progress2.mjs +256 -52
  391. package/es/components/progress/src/progress2.mjs.map +1 -1
  392. package/es/components/result/index.mjs +2 -2
  393. package/es/components/result/src/result.mjs +29 -96
  394. package/es/components/result/src/result.mjs.map +1 -1
  395. package/es/components/result/src/result2.mjs +96 -29
  396. package/es/components/result/src/result2.mjs.map +1 -1
  397. package/es/components/select/index.mjs +2 -2
  398. package/es/components/select/src/select.mjs +728 -152
  399. package/es/components/select/src/select.mjs.map +1 -1
  400. package/es/components/select/src/select2.mjs +152 -728
  401. package/es/components/select/src/select2.mjs.map +1 -1
  402. package/es/components/table-v2/src/components/expand-icon.d.ts +11 -8
  403. package/es/components/table-v2/src/components/expand-icon.mjs +1 -0
  404. package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -1
  405. package/es/components/teleport/index.mjs +2 -2
  406. package/es/components/teleport/src/teleport.mjs +8 -18
  407. package/es/components/teleport/src/teleport.mjs.map +1 -1
  408. package/es/components/teleport/src/teleport2.mjs +18 -8
  409. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  410. package/es/components/text/index.mjs +2 -2
  411. package/es/components/text/src/text.mjs +20 -66
  412. package/es/components/text/src/text.mjs.map +1 -1
  413. package/es/components/text/src/text2.mjs +66 -20
  414. package/es/components/text/src/text2.mjs.map +1 -1
  415. package/es/components/time-select/index.mjs +2 -2
  416. package/es/components/time-select/src/time-select.mjs +66 -138
  417. package/es/components/time-select/src/time-select.mjs.map +1 -1
  418. package/es/components/time-select/src/time-select2.mjs +138 -66
  419. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  420. package/es/components/tooltip/src/content.mjs +1 -1
  421. package/es/components/tour/index.mjs +2 -2
  422. package/es/components/tour/src/step.mjs +43 -255
  423. package/es/components/tour/src/step.mjs.map +1 -1
  424. package/es/components/tour/src/step2.mjs +255 -43
  425. package/es/components/tour/src/step2.mjs.map +1 -1
  426. package/es/components/tour/src/tour.mjs +1 -1
  427. package/es/components/tour/src/tour2.mjs +2 -1
  428. package/es/components/tour/src/tour2.mjs.map +1 -1
  429. package/es/components/transfer/index.mjs +2 -2
  430. package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
  431. package/es/components/transfer/src/transfer-panel2.mjs +1 -1
  432. package/es/components/transfer/src/transfer.mjs +203 -69
  433. package/es/components/transfer/src/transfer.mjs.map +1 -1
  434. package/es/components/transfer/src/transfer2.mjs +69 -203
  435. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  436. package/es/components/tree-select/src/tree-select.mjs +1 -1
  437. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  438. package/es/index.mjs +23 -23
  439. package/es/version.d.ts +1 -1
  440. package/es/version.mjs +1 -1
  441. package/es/version.mjs.map +1 -1
  442. package/lib/components/affix/src/affix.js +1 -1
  443. package/lib/components/alert/src/alert2.js +11 -1
  444. package/lib/components/alert/src/alert2.js.map +1 -1
  445. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  446. package/lib/components/autocomplete/src/autocomplete2.js +1 -1
  447. package/lib/components/badge/index.js +2 -2
  448. package/lib/components/badge/src/badge.js +31 -83
  449. package/lib/components/badge/src/badge.js.map +1 -1
  450. package/lib/components/badge/src/badge2.js +83 -31
  451. package/lib/components/badge/src/badge2.js.map +1 -1
  452. package/lib/components/calendar/index.js +2 -2
  453. package/lib/components/calendar/src/calendar.js +24 -196
  454. package/lib/components/calendar/src/calendar.js.map +1 -1
  455. package/lib/components/calendar/src/calendar2.js +196 -24
  456. package/lib/components/calendar/src/calendar2.js.map +1 -1
  457. package/lib/components/checkbox/index.js +2 -2
  458. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  459. package/lib/components/checkbox/src/checkbox-group2.js +1 -1
  460. package/lib/components/checkbox/src/checkbox.js +134 -63
  461. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  462. package/lib/components/checkbox/src/checkbox2.js +63 -134
  463. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  464. package/lib/components/countdown/index.js +2 -2
  465. package/lib/components/countdown/src/countdown.js +83 -21
  466. package/lib/components/countdown/src/countdown.js.map +1 -1
  467. package/lib/components/countdown/src/countdown2.js +21 -83
  468. package/lib/components/countdown/src/countdown2.js.map +1 -1
  469. package/lib/components/dialog/src/dialog.js +1 -1
  470. package/lib/components/divider/index.js +2 -2
  471. package/lib/components/divider/src/divider.js +15 -43
  472. package/lib/components/divider/src/divider.js.map +1 -1
  473. package/lib/components/divider/src/divider2.js +43 -15
  474. package/lib/components/divider/src/divider2.js.map +1 -1
  475. package/lib/components/empty/index.js +2 -2
  476. package/lib/components/empty/src/empty.js +80 -10
  477. package/lib/components/empty/src/empty.js.map +1 -1
  478. package/lib/components/empty/src/empty2.js +10 -80
  479. package/lib/components/empty/src/empty2.js.map +1 -1
  480. package/lib/components/form/src/form-item.vue.d.ts +4 -0
  481. package/lib/components/form/src/form-item2.js +8 -3
  482. package/lib/components/form/src/form-item2.js.map +1 -1
  483. package/lib/components/form/src/form.vue.d.ts +4 -0
  484. package/lib/components/form/src/form2.js +26 -1
  485. package/lib/components/form/src/form2.js.map +1 -1
  486. package/lib/components/form/src/types.d.ts +2 -0
  487. package/lib/components/icon/index.js +2 -2
  488. package/lib/components/icon/src/icon.js +39 -7
  489. package/lib/components/icon/src/icon.js.map +1 -1
  490. package/lib/components/icon/src/icon2.js +7 -39
  491. package/lib/components/icon/src/icon2.js.map +1 -1
  492. package/lib/components/image/index.js +2 -2
  493. package/lib/components/image/src/image.js +278 -68
  494. package/lib/components/image/src/image.js.map +1 -1
  495. package/lib/components/image/src/image2.js +68 -278
  496. package/lib/components/image/src/image2.js.map +1 -1
  497. package/lib/components/index.js +23 -23
  498. package/lib/components/input/index.js +2 -2
  499. package/lib/components/input/src/input.js +121 -582
  500. package/lib/components/input/src/input.js.map +1 -1
  501. package/lib/components/input/src/input2.js +582 -121
  502. package/lib/components/input/src/input2.js.map +1 -1
  503. package/lib/components/input-number/index.js +2 -2
  504. package/lib/components/input-number/src/input-number.js +412 -72
  505. package/lib/components/input-number/src/input-number.js.map +1 -1
  506. package/lib/components/input-number/src/input-number2.js +72 -412
  507. package/lib/components/input-number/src/input-number2.js.map +1 -1
  508. package/lib/components/input-tag/index.js +2 -2
  509. package/lib/components/input-tag/src/input-tag.js +342 -81
  510. package/lib/components/input-tag/src/input-tag.js.map +1 -1
  511. package/lib/components/input-tag/src/input-tag2.js +81 -342
  512. package/lib/components/input-tag/src/input-tag2.js.map +1 -1
  513. package/lib/components/link/index.js +2 -2
  514. package/lib/components/link/src/link.js +80 -25
  515. package/lib/components/link/src/link.js.map +1 -1
  516. package/lib/components/link/src/link2.js +25 -80
  517. package/lib/components/link/src/link2.js.map +1 -1
  518. package/lib/components/mention/src/mention-dropdown.js +205 -15
  519. package/lib/components/mention/src/mention-dropdown.js.map +1 -1
  520. package/lib/components/mention/src/mention-dropdown2.js +15 -205
  521. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  522. package/lib/components/mention/src/mention.js +1 -1
  523. package/lib/components/mention/src/mention2.js +2 -2
  524. package/lib/components/notification/index.js +1 -1
  525. package/lib/components/notification/src/notification.js +173 -73
  526. package/lib/components/notification/src/notification.js.map +1 -1
  527. package/lib/components/notification/src/notification2.js +73 -173
  528. package/lib/components/notification/src/notification2.js.map +1 -1
  529. package/lib/components/notification/src/notify.js +2 -2
  530. package/lib/components/page-header/index.js +2 -2
  531. package/lib/components/page-header/src/page-header.js +149 -16
  532. package/lib/components/page-header/src/page-header.js.map +1 -1
  533. package/lib/components/page-header/src/page-header2.js +16 -149
  534. package/lib/components/page-header/src/page-header2.js.map +1 -1
  535. package/lib/components/pagination/src/components/jumper.js +7 -69
  536. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  537. package/lib/components/pagination/src/components/jumper2.js +69 -7
  538. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  539. package/lib/components/pagination/src/components/pager.js +15 -229
  540. package/lib/components/pagination/src/components/pager.js.map +1 -1
  541. package/lib/components/pagination/src/components/pager2.js +229 -15
  542. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  543. package/lib/components/pagination/src/pagination.js +2 -2
  544. package/lib/components/popconfirm/index.js +2 -2
  545. package/lib/components/popconfirm/src/popconfirm.js +163 -50
  546. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  547. package/lib/components/popconfirm/src/popconfirm2.js +50 -163
  548. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  549. package/lib/components/popover/index.js +2 -2
  550. package/lib/components/popover/src/popover.js +66 -120
  551. package/lib/components/popover/src/popover.js.map +1 -1
  552. package/lib/components/popover/src/popover2.js +120 -66
  553. package/lib/components/popover/src/popover2.js.map +1 -1
  554. package/lib/components/progress/index.js +2 -2
  555. package/lib/components/progress/src/progress.js +52 -256
  556. package/lib/components/progress/src/progress.js.map +1 -1
  557. package/lib/components/progress/src/progress2.js +256 -52
  558. package/lib/components/progress/src/progress2.js.map +1 -1
  559. package/lib/components/result/index.js +2 -2
  560. package/lib/components/result/src/result.js +31 -96
  561. package/lib/components/result/src/result.js.map +1 -1
  562. package/lib/components/result/src/result2.js +96 -31
  563. package/lib/components/result/src/result2.js.map +1 -1
  564. package/lib/components/select/index.js +2 -2
  565. package/lib/components/select/src/select.js +727 -152
  566. package/lib/components/select/src/select.js.map +1 -1
  567. package/lib/components/select/src/select2.js +152 -727
  568. package/lib/components/select/src/select2.js.map +1 -1
  569. package/lib/components/table-v2/src/components/expand-icon.d.ts +11 -8
  570. package/lib/components/table-v2/src/components/expand-icon.js +1 -0
  571. package/lib/components/table-v2/src/components/expand-icon.js.map +1 -1
  572. package/lib/components/teleport/index.js +2 -2
  573. package/lib/components/teleport/src/teleport.js +8 -18
  574. package/lib/components/teleport/src/teleport.js.map +1 -1
  575. package/lib/components/teleport/src/teleport2.js +18 -8
  576. package/lib/components/teleport/src/teleport2.js.map +1 -1
  577. package/lib/components/text/index.js +2 -2
  578. package/lib/components/text/src/text.js +20 -66
  579. package/lib/components/text/src/text.js.map +1 -1
  580. package/lib/components/text/src/text2.js +66 -20
  581. package/lib/components/text/src/text2.js.map +1 -1
  582. package/lib/components/time-select/index.js +2 -2
  583. package/lib/components/time-select/src/time-select.js +66 -143
  584. package/lib/components/time-select/src/time-select.js.map +1 -1
  585. package/lib/components/time-select/src/time-select2.js +143 -66
  586. package/lib/components/time-select/src/time-select2.js.map +1 -1
  587. package/lib/components/tooltip/src/content.js +1 -1
  588. package/lib/components/tour/index.js +2 -2
  589. package/lib/components/tour/src/step.js +43 -254
  590. package/lib/components/tour/src/step.js.map +1 -1
  591. package/lib/components/tour/src/step2.js +254 -43
  592. package/lib/components/tour/src/step2.js.map +1 -1
  593. package/lib/components/tour/src/tour.js +1 -1
  594. package/lib/components/tour/src/tour2.js +2 -1
  595. package/lib/components/tour/src/tour2.js.map +1 -1
  596. package/lib/components/transfer/index.js +2 -2
  597. package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
  598. package/lib/components/transfer/src/transfer-panel2.js +1 -1
  599. package/lib/components/transfer/src/transfer.js +203 -73
  600. package/lib/components/transfer/src/transfer.js.map +1 -1
  601. package/lib/components/transfer/src/transfer2.js +73 -203
  602. package/lib/components/transfer/src/transfer2.js.map +1 -1
  603. package/lib/components/tree-select/src/tree-select.js +1 -1
  604. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  605. package/lib/index.js +23 -23
  606. package/lib/version.d.ts +1 -1
  607. package/lib/version.js +1 -1
  608. package/lib/version.js.map +1 -1
  609. package/package.json +2 -2
  610. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"input-number.js","sources":["../../../../../../packages/components/input-number/src/input-number.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\n\nimport type {\n ExtractPropTypes,\n ExtractPublicPropTypes,\n HTMLAttributes,\n} from 'vue'\nimport type InputNumber from './input-number.vue'\n\nexport const inputNumberProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description incremental step\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether input value can only be multiple of step\n */\n stepStrictly: Boolean,\n /**\n * @description the maximum allowed value\n */\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n /**\n * @description the minimum allowed value\n */\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, null],\n },\n /**\n * @description same as `readonly` in native input\n */\n readonly: Boolean,\n /**\n * @description whether the component is disabled\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description size of the component\n */\n size: useSizeProp,\n /**\n * @description whether to enable the control buttons\n */\n controls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the control buttons\n */\n controlsPosition: {\n type: String,\n default: '',\n values: ['', 'right'],\n },\n /**\n * @description value should be set when input box is cleared\n */\n valueOnClear: {\n type: definePropType<'min' | 'max' | number | null>([String, Number, null]),\n validator: (val: 'min' | 'max' | number | null) =>\n val === null || isNumber(val) || ['min', 'max'].includes(val),\n default: null,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description same as `placeholder` in native input\n */\n placeholder: String,\n /**\n * @description precision of input value\n */\n precision: {\n type: Number,\n validator: (val: number) =>\n val >= 0 && val === Number.parseInt(`${val}`, 10),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n /**\n * @description native input mode for virtual keyboards\n */\n inputmode: {\n type: definePropType<HTMLAttributes['inputmode']>(String),\n default: undefined,\n },\n /**\n * @description alignment for the inner input text\n */\n align: {\n type: definePropType<'left' | 'right' | 'center'>(String),\n default: 'center',\n },\n /**\n * @description whether to disable scientific notation input (e.g. 'e', 'E')\n */\n disabledScientific: Boolean,\n} as const)\nexport type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>\nexport type InputNumberPropsPublic = ExtractPublicPropTypes<\n typeof inputNumberProps\n>\n\nexport const inputNumberEmits = {\n [CHANGE_EVENT]: (cur: number | undefined, prev: number | undefined) =>\n prev !== cur,\n blur: (e: FocusEvent) => e instanceof FocusEvent,\n focus: (e: FocusEvent) => e instanceof FocusEvent,\n [INPUT_EVENT]: (val: number | null | undefined) =>\n isNumber(val) || isNil(val),\n [UPDATE_MODEL_EVENT]: (val: number | undefined) =>\n isNumber(val) || isNil(val),\n}\nexport type InputNumberEmits = typeof inputNumberEmits\n\nexport type InputNumberInstance = InstanceType<typeof InputNumber> & unknown\n"],"names":["buildProps","useSizeProp","definePropType","isNumber","useAriaProps","CHANGE_EVENT","INPUT_EVENT","isNil","UPDATE_MODEL_EVENT"],"mappings":";;;;;;;;;;;AAgBO,MAAM,mBAAmBA,kBAAW,CAAA;AAAA,EAIzC,EAAI,EAAA;AAAA,IACF,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,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IACN,SAAA,EAAW,CAAC,GAAA,KACV,GAAO,IAAA,CAAA,IAAK,QAAQ,MAAO,CAAA,QAAA,CAAS,CAAG,EAAA,GAAA,CAAA,CAAA,EAAO,EAAE,CAAA;AAAA,GACpD;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,GAAGC,oBAAA,CAAa,CAAC,WAAW,CAAC,CAAA;AAAA,EAI7B,SAAW,EAAA;AAAA,IACT,IAAA,EAAMF,uBAA4C,MAAM,CAAA;AAAA,IACxD,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAA,EAAMA,uBAA4C,MAAM,CAAA;AAAA,IACxD,OAAS,EAAA,QAAA;AAAA,GACX;AAAA,EAIA,kBAAoB,EAAA,OAAA;AACtB,CAAU,EAAA;AAMH,MAAM,gBAAmB,GAAA;AAAA,EAC9B,CAACG,kBAAA,GAAe,CAAC,GAAA,EAAyB,SACxC,IAAS,KAAA,GAAA;AAAA,EACX,IAAA,EAAM,CAAC,CAAA,KAAkB,CAAa,YAAA,UAAA;AAAA,EACtC,KAAA,EAAO,CAAC,CAAA,KAAkB,CAAa,YAAA,UAAA;AAAA,EACvC,CAACC,oBAAc,CAAC,GAAA,KACdH,eAAS,GAAG,CAAA,IAAKI,oBAAM,GAAG,CAAA;AAAA,EAC5B,CAACC,2BAAqB,CAAC,GAAA,KACrBL,eAAS,GAAG,CAAA,IAAKI,oBAAM,GAAG,CAAA;AAC9B;;;;;"}
1
+ {"version":3,"file":"input-number.js","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":["useLocale","useNamespace","ref","reactive","useFormItem","computed","isNumber","isUndefined","debugWarn","useFormSize","useFormDisabled","isNil","getEventCode","getEventKey","EVENT_CODE","INPUT_EVENT","throwError","isString","UPDATE_MODEL_EVENT","CHANGE_EVENT","watch","onMounted","onUpdated","_openBlock","_createElementBlock","_normalizeClass","_unref","controls","align","_withModifiers","_withKeys","_renderSlot","_createVNode","ElIcon","_withCtx","_createBlock","ArrowDown","Minus","_createCommentVNode","ArrowUp","Plus","ElInput","id","step","placeholder","readonly","max","min","name","ariaLabel","inputmode","_createSlots","$slots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEP,IAAA,MAAA,EAAE,CAAE,EAAA,GAAIA,eAAU,EAAA,CAAA;AAClB,IAAA,MAAA,EAAA,GAAKC,qBAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQC,OAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAOC,YAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAEK,IAAA,MAAA,EAAE,QAAS,EAAA,GAAIC,uBAAY,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAc,GAAAC,YAAA;AAAA,MAClB,MAAMC,cAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,cAAc,KAAM,CAAA,GAAA;AAAA,KAChE,CAAA;AACA,IAAA,MAAM,WAAc,GAAAD,YAAA;AAAA,MAClB,MAAMC,cAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,cAAc,KAAM,CAAA,GAAA;AAAA,KAChE,CAAA;AAEM,IAAA,MAAA,YAAA,GAAeD,aAAS,MAAM;AAC5B,MAAA,MAAA,aAAA,GAAgB,YAAa,CAAA,KAAA,CAAM,IA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ACJ,IAAK,EAAA,QAAA;AAAA,YACJ,MAAMC,IAAAA,CAAAA,IAAAA;AAAAA,YACN,eAAa,YAAA,CAAA,KAAA;AAAA,YACb,aAAaC,IAAAA,CAAAA,WAAAA;AAAAA,YACb,UAAUC,IAAAA,CAAAA,QAAAA;AAAAA,YACV,QAAA,EAAUnB,UAAA,mBAAA,CAAA;AAAA,YACV,IAAA,EAAMA,UAAA,eAAA,CAAA;AAAA,YACN,KAAKoB,IAAAA,CAAAA,GAAAA;AAAAA,YACL,KAAKC,IAAAA,CAAAA,GAAAA;AAAAA,YACL,MAAMC,IAAAA,CAAAA,IAAAA;AAAAA,YACN,cAAYC,IAAAA,CAAAA,SAAAA;AAAAA,YACZ,gBAAgB,EAAA,KAAA;AAAA,YAChB,WAAWC,IAAAA,CAAAA,SAAAA;AAAAA,YACX,SAAS,EAAA,aAAA;AAAA,YACT,MAAM,EAAA,UAAA;AAAA,YACN,OAAO,EAAA,WAAA;AAAA,YACP,OAAO,EAAA,WAAA;AAAA,YACP,QAAQ,EAAA,iBAAA;AAAA,aAAAC,eAAA,CAAA;AAAA;;YAEOC,IAAAA,CAAO,OAAA,MAAA,GAAA;AAAA,cAAS,IAAA,EAAA,QAAA;AAAA,cAAA,EAAA,EAAAlB,YAC9B,MAAsB;AAAA,gBAAtBH,cAAA,CAAsB,IAAA,CAAA,MAAA,EAAA,QAAA,CAAA;AAAA,eAAA,CAAA;AAAA;;YAERqB,IAAAA,CAAO,OAAA,MAAA,GAAA;AAAA,cAAS,IAAA,EAAA,QAAA;AAAA,cAAA,EAAA,EAAAlB,YAC9B,MAAsB;AAAA,gBAAtBH,cAAA,CAAsB,IAAA,CAAA,MAAA,EAAA,QAAA,CAAA;AAAA,eAAA,CAAA;AAAA;;;;;;;;;;;;;"}
@@ -2,423 +2,83 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
5
  var lodashUnified = require('lodash-unified');
7
- var index$4 = require('../../input/index.js');
8
- var index$2 = require('../../icon/index.js');
9
- var iconsVue = require('@element-plus/icons-vue');
10
- var inputNumber = require('./input-number.js');
11
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
- var index$3 = require('../../../directives/repeat-click/index.js');
13
- var event$1 = require('../../../utils/dom/event.js');
14
- var index = require('../../../hooks/use-locale/index.js');
15
- var index$1 = require('../../../hooks/use-namespace/index.js');
16
- var useFormItem = require('../../form/src/hooks/use-form-item.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
7
+ var index = require('../../../hooks/use-size/index.js');
17
8
  var types = require('../../../utils/types.js');
18
- var error = require('../../../utils/error.js');
19
- var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
9
+ var index$1 = require('../../../hooks/use-aria/index.js');
20
10
  var event = require('../../../constants/event.js');
21
- var aria = require('../../../constants/aria.js');
22
- var shared = require('@vue/shared');
23
11
 
24
- const _hoisted_1 = ["aria-label"];
25
- const _hoisted_2 = ["aria-label"];
26
- const _sfc_main = vue.defineComponent({
27
- ...{
28
- name: "ElInputNumber"
12
+ const inputNumberProps = runtime.buildProps({
13
+ id: {
14
+ type: String,
15
+ default: void 0
29
16
  },
30
- __name: "input-number",
31
- props: inputNumber.inputNumberProps,
32
- emits: inputNumber.inputNumberEmits,
33
- setup(__props, { expose: __expose, emit: __emit }) {
34
- const props = __props;
35
- const emit = __emit;
36
- const { t } = index.useLocale();
37
- const ns = index$1.useNamespace("input-number");
38
- const input = vue.ref();
39
- const data = vue.reactive({
40
- currentValue: props.modelValue,
41
- userInput: null
42
- });
43
- const { formItem } = useFormItem.useFormItem();
44
- const minDisabled = vue.computed(
45
- () => types.isNumber(props.modelValue) && props.modelValue <= props.min
46
- );
47
- const maxDisabled = vue.computed(
48
- () => types.isNumber(props.modelValue) && props.modelValue >= props.max
49
- );
50
- const numPrecision = vue.computed(() => {
51
- const stepPrecision = getPrecision(props.step);
52
- if (!types.isUndefined(props.precision)) {
53
- if (stepPrecision > props.precision) {
54
- error.debugWarn(
55
- "InputNumber",
56
- "precision should not be less than the decimal places of step"
57
- );
58
- }
59
- return props.precision;
60
- } else {
61
- return Math.max(getPrecision(props.modelValue), stepPrecision);
62
- }
63
- });
64
- const controlsAtRight = vue.computed(() => {
65
- return props.controls && props.controlsPosition === "right";
66
- });
67
- const inputNumberSize = useFormCommonProps.useFormSize();
68
- const inputNumberDisabled = useFormCommonProps.useFormDisabled();
69
- const displayValue = vue.computed(() => {
70
- if (data.userInput !== null) {
71
- return data.userInput;
72
- }
73
- let currentValue = data.currentValue;
74
- if (lodashUnified.isNil(currentValue))
75
- return "";
76
- if (types.isNumber(currentValue)) {
77
- if (Number.isNaN(currentValue))
78
- return "";
79
- if (!types.isUndefined(props.precision)) {
80
- currentValue = currentValue.toFixed(props.precision);
81
- }
82
- }
83
- return currentValue;
84
- });
85
- const toPrecision = (num, pre) => {
86
- if (types.isUndefined(pre))
87
- pre = numPrecision.value;
88
- if (pre === 0)
89
- return Math.round(num);
90
- let snum = String(num);
91
- const pointPos = snum.indexOf(".");
92
- if (pointPos === -1)
93
- return num;
94
- const nums = snum.replace(".", "").split("");
95
- const datum = nums[pointPos + pre];
96
- if (!datum)
97
- return num;
98
- const length = snum.length;
99
- if (snum.charAt(length - 1) === "5") {
100
- snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
101
- }
102
- return Number.parseFloat(Number(snum).toFixed(pre));
103
- };
104
- const getPrecision = (value) => {
105
- if (lodashUnified.isNil(value))
106
- return 0;
107
- const valueString = value.toString();
108
- const dotPosition = valueString.indexOf(".");
109
- let precision = 0;
110
- if (dotPosition !== -1) {
111
- precision = valueString.length - dotPosition - 1;
112
- }
113
- return precision;
114
- };
115
- const ensurePrecision = (val, coefficient = 1) => {
116
- if (!types.isNumber(val))
117
- return data.currentValue;
118
- if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {
119
- error.debugWarn(
120
- "InputNumber",
121
- "The value has reached the maximum safe integer limit."
122
- );
123
- return val;
124
- } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {
125
- error.debugWarn(
126
- "InputNumber",
127
- "The value has reached the minimum safe integer limit."
128
- );
129
- return val;
130
- }
131
- return toPrecision(val + props.step * coefficient);
132
- };
133
- const handleKeydown = (event) => {
134
- const code = event$1.getEventCode(event);
135
- const key = event$1.getEventKey(event);
136
- if (props.disabledScientific && ["e", "E"].includes(key)) {
137
- event.preventDefault();
138
- return;
139
- }
140
- switch (code) {
141
- case aria.EVENT_CODE.up: {
142
- event.preventDefault();
143
- increase();
144
- break;
145
- }
146
- case aria.EVENT_CODE.down: {
147
- event.preventDefault();
148
- decrease();
149
- break;
150
- }
151
- }
152
- };
153
- const increase = () => {
154
- if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
155
- return;
156
- const value = Number(displayValue.value) || 0;
157
- const newVal = ensurePrecision(value);
158
- setCurrentValue(newVal);
159
- emit(event.INPUT_EVENT, data.currentValue);
160
- setCurrentValueToModelValue();
161
- };
162
- const decrease = () => {
163
- if (props.readonly || inputNumberDisabled.value || minDisabled.value)
164
- return;
165
- const value = Number(displayValue.value) || 0;
166
- const newVal = ensurePrecision(value, -1);
167
- setCurrentValue(newVal);
168
- emit(event.INPUT_EVENT, data.currentValue);
169
- setCurrentValueToModelValue();
170
- };
171
- const verifyValue = (value, update) => {
172
- const { max, min, step, precision, stepStrictly, valueOnClear } = props;
173
- if (max < min) {
174
- error.throwError("InputNumber", "min should not be greater than max.");
175
- }
176
- let newVal = Number(value);
177
- if (lodashUnified.isNil(value) || Number.isNaN(newVal)) {
178
- return null;
179
- }
180
- if (value === "") {
181
- if (valueOnClear === null) {
182
- return null;
183
- }
184
- newVal = shared.isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear;
185
- }
186
- if (stepStrictly) {
187
- newVal = toPrecision(
188
- Math.round(toPrecision(newVal / step)) * step,
189
- precision
190
- );
191
- if (newVal !== value) {
192
- update && emit(event.UPDATE_MODEL_EVENT, newVal);
193
- }
194
- }
195
- if (!types.isUndefined(precision)) {
196
- newVal = toPrecision(newVal, precision);
197
- }
198
- if (newVal > max || newVal < min) {
199
- newVal = newVal > max ? max : min;
200
- update && emit(event.UPDATE_MODEL_EVENT, newVal);
201
- }
202
- return newVal;
203
- };
204
- const setCurrentValue = (value, emitChange = true) => {
205
- var _a;
206
- const oldVal = data.currentValue;
207
- const newVal = verifyValue(value);
208
- if (!emitChange) {
209
- emit(event.UPDATE_MODEL_EVENT, newVal);
210
- return;
211
- }
212
- data.userInput = null;
213
- if (oldVal === newVal && value)
214
- return;
215
- emit(event.UPDATE_MODEL_EVENT, newVal);
216
- if (oldVal !== newVal) {
217
- emit(event.CHANGE_EVENT, newVal, oldVal);
218
- }
219
- if (props.validateEvent) {
220
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => error.debugWarn(err));
221
- }
222
- data.currentValue = newVal;
223
- };
224
- const handleInput = (value) => {
225
- data.userInput = value;
226
- const newVal = value === "" ? null : Number(value);
227
- emit(event.INPUT_EVENT, newVal);
228
- setCurrentValue(newVal, false);
229
- };
230
- const handleInputChange = (value) => {
231
- const newVal = value !== "" ? Number(value) : "";
232
- if (types.isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
233
- setCurrentValue(newVal);
234
- }
235
- setCurrentValueToModelValue();
236
- data.userInput = null;
237
- };
238
- const focus = () => {
239
- var _a, _b;
240
- (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
241
- };
242
- const blur = () => {
243
- var _a, _b;
244
- (_b = (_a = input.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
245
- };
246
- const handleFocus = (event) => {
247
- emit("focus", event);
248
- };
249
- const handleBlur = (event) => {
250
- var _a, _b;
251
- data.userInput = null;
252
- if (data.currentValue === null && ((_a = input.value) == null ? void 0 : _a.input)) {
253
- input.value.input.value = "";
254
- }
255
- emit("blur", event);
256
- if (props.validateEvent) {
257
- (_b = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _b.call(formItem, "blur").catch((err) => error.debugWarn(err));
258
- }
259
- };
260
- const setCurrentValueToModelValue = () => {
261
- if (data.currentValue !== props.modelValue) {
262
- data.currentValue = props.modelValue;
263
- }
264
- };
265
- const handleWheel = (e) => {
266
- if (document.activeElement === e.target)
267
- e.preventDefault();
268
- };
269
- vue.watch(
270
- () => props.modelValue,
271
- (value, oldValue) => {
272
- const newValue = verifyValue(value, true);
273
- if (data.userInput === null && newValue !== oldValue) {
274
- data.currentValue = newValue;
275
- }
276
- },
277
- { immediate: true }
278
- );
279
- vue.watch(
280
- () => props.precision,
281
- () => {
282
- data.currentValue = verifyValue(props.modelValue);
283
- }
284
- );
285
- vue.onMounted(() => {
286
- var _a;
287
- const { min, max, modelValue } = props;
288
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
289
- innerInput.setAttribute("role", "spinbutton");
290
- if (Number.isFinite(max)) {
291
- innerInput.setAttribute("aria-valuemax", String(max));
292
- } else {
293
- innerInput.removeAttribute("aria-valuemax");
294
- }
295
- if (Number.isFinite(min)) {
296
- innerInput.setAttribute("aria-valuemin", String(min));
297
- } else {
298
- innerInput.removeAttribute("aria-valuemin");
299
- }
300
- innerInput.setAttribute(
301
- "aria-valuenow",
302
- data.currentValue || data.currentValue === 0 ? String(data.currentValue) : ""
303
- );
304
- innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
305
- if (!types.isNumber(modelValue) && modelValue != null) {
306
- let val = Number(modelValue);
307
- if (Number.isNaN(val)) {
308
- val = null;
309
- }
310
- emit(event.UPDATE_MODEL_EVENT, val);
311
- }
312
- innerInput.addEventListener("wheel", handleWheel, { passive: false });
313
- });
314
- vue.onUpdated(() => {
315
- var _a, _b;
316
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
317
- innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${(_b = data.currentValue) != null ? _b : ""}`);
318
- });
319
- __expose({
320
- focus,
321
- blur
322
- });
323
- return (_ctx, _cache) => {
324
- return vue.openBlock(), vue.createElementBlock(
325
- "div",
326
- {
327
- class: vue.normalizeClass([
328
- vue.unref(ns).b(),
329
- vue.unref(ns).m(vue.unref(inputNumberSize)),
330
- vue.unref(ns).is("disabled", vue.unref(inputNumberDisabled)),
331
- vue.unref(ns).is("without-controls", !_ctx.controls),
332
- vue.unref(ns).is("controls-right", controlsAtRight.value),
333
- vue.unref(ns).is(_ctx.align, !!_ctx.align)
334
- ]),
335
- onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
336
- }, ["prevent"]))
337
- },
338
- [
339
- _ctx.controls ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
340
- key: 0,
341
- role: "button",
342
- "aria-label": vue.unref(t)("el.inputNumber.decrease"),
343
- class: vue.normalizeClass([vue.unref(ns).e("decrease"), vue.unref(ns).is("disabled", minDisabled.value)]),
344
- onKeydown: vue.withKeys(decrease, ["enter"])
345
- }, [
346
- vue.renderSlot(_ctx.$slots, "decrease-icon", {}, () => [
347
- vue.createVNode(vue.unref(index$2.ElIcon), null, {
348
- default: vue.withCtx(() => [
349
- controlsAtRight.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.ArrowDown), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.Minus), { key: 1 }))
350
- ]),
351
- _: 1
352
- })
353
- ])
354
- ], 42, _hoisted_1)), [
355
- [vue.unref(index$3.vRepeatClick), decrease]
356
- ]) : vue.createCommentVNode("v-if", true),
357
- _ctx.controls ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
358
- key: 1,
359
- role: "button",
360
- "aria-label": vue.unref(t)("el.inputNumber.increase"),
361
- class: vue.normalizeClass([vue.unref(ns).e("increase"), vue.unref(ns).is("disabled", maxDisabled.value)]),
362
- onKeydown: vue.withKeys(increase, ["enter"])
363
- }, [
364
- vue.renderSlot(_ctx.$slots, "increase-icon", {}, () => [
365
- vue.createVNode(vue.unref(index$2.ElIcon), null, {
366
- default: vue.withCtx(() => [
367
- controlsAtRight.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.ArrowUp), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.Plus), { key: 1 }))
368
- ]),
369
- _: 1
370
- })
371
- ])
372
- ], 42, _hoisted_2)), [
373
- [vue.unref(index$3.vRepeatClick), increase]
374
- ]) : vue.createCommentVNode("v-if", true),
375
- vue.createVNode(vue.unref(index$4.ElInput), {
376
- id: _ctx.id,
377
- ref_key: "input",
378
- ref: input,
379
- type: "number",
380
- step: _ctx.step,
381
- "model-value": displayValue.value,
382
- placeholder: _ctx.placeholder,
383
- readonly: _ctx.readonly,
384
- disabled: vue.unref(inputNumberDisabled),
385
- size: vue.unref(inputNumberSize),
386
- max: _ctx.max,
387
- min: _ctx.min,
388
- name: _ctx.name,
389
- "aria-label": _ctx.ariaLabel,
390
- "validate-event": false,
391
- inputmode: _ctx.inputmode,
392
- onKeydown: handleKeydown,
393
- onBlur: handleBlur,
394
- onFocus: handleFocus,
395
- onInput: handleInput,
396
- onChange: handleInputChange
397
- }, vue.createSlots({
398
- _: 2
399
- }, [
400
- _ctx.$slots.prefix ? {
401
- name: "prefix",
402
- fn: vue.withCtx(() => [
403
- vue.renderSlot(_ctx.$slots, "prefix")
404
- ]),
405
- key: "0"
406
- } : void 0,
407
- _ctx.$slots.suffix ? {
408
- name: "suffix",
409
- fn: vue.withCtx(() => [
410
- vue.renderSlot(_ctx.$slots, "suffix")
411
- ]),
412
- key: "1"
413
- } : void 0
414
- ]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "inputmode"])
415
- ],
416
- 34
417
- );
418
- };
419
- }
17
+ step: {
18
+ type: Number,
19
+ default: 1
20
+ },
21
+ stepStrictly: Boolean,
22
+ max: {
23
+ type: Number,
24
+ default: Number.MAX_SAFE_INTEGER
25
+ },
26
+ min: {
27
+ type: Number,
28
+ default: Number.MIN_SAFE_INTEGER
29
+ },
30
+ modelValue: {
31
+ type: [Number, null]
32
+ },
33
+ readonly: Boolean,
34
+ disabled: {
35
+ type: Boolean,
36
+ default: void 0
37
+ },
38
+ size: index.useSizeProp,
39
+ controls: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ controlsPosition: {
44
+ type: String,
45
+ default: "",
46
+ values: ["", "right"]
47
+ },
48
+ valueOnClear: {
49
+ type: runtime.definePropType([String, Number, null]),
50
+ validator: (val) => val === null || types.isNumber(val) || ["min", "max"].includes(val),
51
+ default: null
52
+ },
53
+ name: String,
54
+ placeholder: String,
55
+ precision: {
56
+ type: Number,
57
+ validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
58
+ },
59
+ validateEvent: {
60
+ type: Boolean,
61
+ default: true
62
+ },
63
+ ...index$1.useAriaProps(["ariaLabel"]),
64
+ inputmode: {
65
+ type: runtime.definePropType(String),
66
+ default: void 0
67
+ },
68
+ align: {
69
+ type: runtime.definePropType(String),
70
+ default: "center"
71
+ },
72
+ disabledScientific: Boolean
420
73
  });
421
- var InputNumber = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
74
+ const inputNumberEmits = {
75
+ [event.CHANGE_EVENT]: (cur, prev) => prev !== cur,
76
+ blur: (e) => e instanceof FocusEvent,
77
+ focus: (e) => e instanceof FocusEvent,
78
+ [event.INPUT_EVENT]: (val) => types.isNumber(val) || lodashUnified.isNil(val),
79
+ [event.UPDATE_MODEL_EVENT]: (val) => types.isNumber(val) || lodashUnified.isNil(val)
80
+ };
422
81
 
423
- exports["default"] = InputNumber;
82
+ exports.inputNumberEmits = inputNumberEmits;
83
+ exports.inputNumberProps = inputNumberProps;
424
84
  //# sourceMappingURL=input-number2.js.map