element-plus 2.14.2 → 2.14.3

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 (764) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +67 -9
  4. package/dist/index.full.min.js +4 -4
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +9 -9
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +67 -9
  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/lo.js +1 -1
  142. package/dist/locale/lo.min.js +1 -1
  143. package/dist/locale/lo.min.mjs +1 -1
  144. package/dist/locale/lo.mjs +1 -1
  145. package/dist/locale/lt.js +1 -1
  146. package/dist/locale/lt.min.js +1 -1
  147. package/dist/locale/lt.min.mjs +1 -1
  148. package/dist/locale/lt.mjs +1 -1
  149. package/dist/locale/lv.js +1 -1
  150. package/dist/locale/lv.min.js +1 -1
  151. package/dist/locale/lv.min.mjs +1 -1
  152. package/dist/locale/lv.mjs +1 -1
  153. package/dist/locale/mg.js +1 -1
  154. package/dist/locale/mg.min.js +1 -1
  155. package/dist/locale/mg.min.mjs +1 -1
  156. package/dist/locale/mg.mjs +1 -1
  157. package/dist/locale/mn.js +1 -1
  158. package/dist/locale/mn.min.js +1 -1
  159. package/dist/locale/mn.min.mjs +1 -1
  160. package/dist/locale/mn.mjs +1 -1
  161. package/dist/locale/ms.js +1 -1
  162. package/dist/locale/ms.min.js +1 -1
  163. package/dist/locale/ms.min.mjs +1 -1
  164. package/dist/locale/ms.mjs +1 -1
  165. package/dist/locale/my.js +1 -1
  166. package/dist/locale/my.min.js +1 -1
  167. package/dist/locale/my.min.mjs +1 -1
  168. package/dist/locale/my.mjs +1 -1
  169. package/dist/locale/nb-no.js +55 -55
  170. package/dist/locale/nb-no.min.js +2 -2
  171. package/dist/locale/nb-no.min.js.map +1 -1
  172. package/dist/locale/nb-no.min.mjs +2 -2
  173. package/dist/locale/nb-no.min.mjs.map +1 -1
  174. package/dist/locale/nb-no.mjs +55 -55
  175. package/dist/locale/nl.js +1 -1
  176. package/dist/locale/nl.min.js +1 -1
  177. package/dist/locale/nl.min.mjs +1 -1
  178. package/dist/locale/nl.mjs +1 -1
  179. package/dist/locale/no.js +17 -17
  180. package/dist/locale/no.min.js +2 -2
  181. package/dist/locale/no.min.js.map +1 -1
  182. package/dist/locale/no.min.mjs +2 -2
  183. package/dist/locale/no.min.mjs.map +1 -1
  184. package/dist/locale/no.mjs +17 -17
  185. package/dist/locale/pa.js +1 -1
  186. package/dist/locale/pa.min.js +1 -1
  187. package/dist/locale/pa.min.mjs +1 -1
  188. package/dist/locale/pa.mjs +1 -1
  189. package/dist/locale/pl.js +1 -1
  190. package/dist/locale/pl.min.js +1 -1
  191. package/dist/locale/pl.min.mjs +1 -1
  192. package/dist/locale/pl.mjs +1 -1
  193. package/dist/locale/pt-br.js +1 -1
  194. package/dist/locale/pt-br.min.js +1 -1
  195. package/dist/locale/pt-br.min.mjs +1 -1
  196. package/dist/locale/pt-br.mjs +1 -1
  197. package/dist/locale/pt.js +1 -1
  198. package/dist/locale/pt.min.js +1 -1
  199. package/dist/locale/pt.min.mjs +1 -1
  200. package/dist/locale/pt.mjs +1 -1
  201. package/dist/locale/ro.js +1 -1
  202. package/dist/locale/ro.min.js +1 -1
  203. package/dist/locale/ro.min.mjs +1 -1
  204. package/dist/locale/ro.mjs +1 -1
  205. package/dist/locale/ru.js +1 -1
  206. package/dist/locale/ru.min.js +1 -1
  207. package/dist/locale/ru.min.mjs +1 -1
  208. package/dist/locale/ru.mjs +1 -1
  209. package/dist/locale/sk.js +1 -1
  210. package/dist/locale/sk.min.js +1 -1
  211. package/dist/locale/sk.min.mjs +1 -1
  212. package/dist/locale/sk.mjs +1 -1
  213. package/dist/locale/sl.js +1 -1
  214. package/dist/locale/sl.min.js +1 -1
  215. package/dist/locale/sl.min.mjs +1 -1
  216. package/dist/locale/sl.mjs +1 -1
  217. package/dist/locale/sr.js +1 -1
  218. package/dist/locale/sr.min.js +1 -1
  219. package/dist/locale/sr.min.mjs +1 -1
  220. package/dist/locale/sr.mjs +1 -1
  221. package/dist/locale/sv.js +1 -1
  222. package/dist/locale/sv.min.js +1 -1
  223. package/dist/locale/sv.min.mjs +1 -1
  224. package/dist/locale/sv.mjs +1 -1
  225. package/dist/locale/sw.js +1 -1
  226. package/dist/locale/sw.min.js +1 -1
  227. package/dist/locale/sw.min.mjs +1 -1
  228. package/dist/locale/sw.mjs +1 -1
  229. package/dist/locale/ta.js +1 -1
  230. package/dist/locale/ta.min.js +1 -1
  231. package/dist/locale/ta.min.mjs +1 -1
  232. package/dist/locale/ta.mjs +1 -1
  233. package/dist/locale/te.js +1 -1
  234. package/dist/locale/te.min.js +1 -1
  235. package/dist/locale/te.min.mjs +1 -1
  236. package/dist/locale/te.mjs +1 -1
  237. package/dist/locale/th.js +1 -1
  238. package/dist/locale/th.min.js +1 -1
  239. package/dist/locale/th.min.mjs +1 -1
  240. package/dist/locale/th.mjs +1 -1
  241. package/dist/locale/tk.js +1 -1
  242. package/dist/locale/tk.min.js +1 -1
  243. package/dist/locale/tk.min.mjs +1 -1
  244. package/dist/locale/tk.mjs +1 -1
  245. package/dist/locale/tr.js +1 -1
  246. package/dist/locale/tr.min.js +1 -1
  247. package/dist/locale/tr.min.mjs +1 -1
  248. package/dist/locale/tr.mjs +1 -1
  249. package/dist/locale/ug-cn.js +1 -1
  250. package/dist/locale/ug-cn.min.js +1 -1
  251. package/dist/locale/ug-cn.min.mjs +1 -1
  252. package/dist/locale/ug-cn.mjs +1 -1
  253. package/dist/locale/uk.js +1 -1
  254. package/dist/locale/uk.min.js +1 -1
  255. package/dist/locale/uk.min.mjs +1 -1
  256. package/dist/locale/uk.mjs +1 -1
  257. package/dist/locale/uz-uz.js +1 -1
  258. package/dist/locale/uz-uz.min.js +1 -1
  259. package/dist/locale/uz-uz.min.mjs +1 -1
  260. package/dist/locale/uz-uz.mjs +1 -1
  261. package/dist/locale/vi.js +1 -1
  262. package/dist/locale/vi.min.js +1 -1
  263. package/dist/locale/vi.min.mjs +1 -1
  264. package/dist/locale/vi.mjs +1 -1
  265. package/dist/locale/zh-cn.js +1 -1
  266. package/dist/locale/zh-cn.min.js +1 -1
  267. package/dist/locale/zh-cn.min.mjs +1 -1
  268. package/dist/locale/zh-cn.mjs +1 -1
  269. package/dist/locale/zh-hk.js +1 -1
  270. package/dist/locale/zh-hk.min.js +1 -1
  271. package/dist/locale/zh-hk.min.mjs +1 -1
  272. package/dist/locale/zh-hk.mjs +1 -1
  273. package/dist/locale/zh-mo.js +1 -1
  274. package/dist/locale/zh-mo.min.js +1 -1
  275. package/dist/locale/zh-mo.min.mjs +1 -1
  276. package/dist/locale/zh-mo.mjs +1 -1
  277. package/dist/locale/zh-tw.js +1 -1
  278. package/dist/locale/zh-tw.min.js +1 -1
  279. package/dist/locale/zh-tw.min.mjs +1 -1
  280. package/dist/locale/zh-tw.mjs +1 -1
  281. package/es/components/affix/src/affix.d.ts +1 -1
  282. package/es/components/affix/src/affix.vue.d.ts +3 -3
  283. package/es/components/alert/src/alert.d.ts +1 -1
  284. package/es/components/alert/src/alert.vue.d.ts +2 -2
  285. package/es/components/anchor/src/anchor.vue.d.ts +3 -3
  286. package/es/components/autocomplete/src/autocomplete.d.ts +4 -4
  287. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  288. package/es/components/avatar/src/avatar-group-props.d.ts +1 -1
  289. package/es/components/avatar/src/avatar-group.d.ts +4 -4
  290. package/es/components/avatar/src/avatar.d.ts +1 -1
  291. package/es/components/badge/src/badge.d.ts +1 -1
  292. package/es/components/badge/src/badge.vue.d.ts +1 -1
  293. package/es/components/button/src/button-group.d.ts +2 -2
  294. package/es/components/button/src/button-group.vue.d.ts +1 -1
  295. package/es/components/button/src/button.d.ts +2 -2
  296. package/es/components/button/src/button.vue.d.ts +4 -4
  297. package/es/components/button/src/use-button.d.ts +2 -2
  298. package/es/components/card/src/card.vue.d.ts +1 -1
  299. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
  300. package/es/components/carousel/src/carousel.vue.d.ts +1 -1
  301. package/es/components/cascader/src/cascader.d.ts +4 -4
  302. package/es/components/cascader/src/cascader.vue.d.ts +15 -15
  303. package/es/components/cascader-panel/src/index.vue.d.ts +4 -4
  304. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  305. package/es/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
  306. package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
  307. package/es/components/checkbox/src/checkbox-group.vue.d.ts +3 -3
  308. package/es/components/checkbox/src/checkbox.d.ts +9 -9
  309. package/es/components/checkbox/src/checkbox.vue.d.ts +5 -5
  310. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  311. package/es/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  312. package/es/components/col/src/col.vue.d.ts +1 -1
  313. package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
  314. package/es/components/color-picker/src/color-picker.d.ts +1 -1
  315. package/es/components/color-picker/src/color-picker.vue.d.ts +9 -9
  316. package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  317. package/es/components/config-provider/src/config-provider-props.d.ts +1 -1
  318. package/es/components/config-provider/src/config-provider.d.ts +3 -3
  319. package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  320. package/es/components/countdown/src/countdown.vue.d.ts +3 -3
  321. package/es/components/date-picker/src/date-picker.d.ts +19 -19
  322. package/es/components/date-picker/src/props.d.ts +4 -4
  323. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  324. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +5 -5
  325. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +4 -4
  326. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  327. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  328. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +8 -8
  329. package/es/components/date-picker-panel/src/panel-utils.d.ts +27 -27
  330. package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
  331. package/es/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
  332. package/es/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
  333. package/es/components/date-picker-panel/src/props/shared.d.ts +1 -1
  334. package/es/components/descriptions/src/description-item.d.ts +19 -19
  335. package/es/components/descriptions/src/description.d.ts +1 -1
  336. package/es/components/descriptions/src/description.vue.d.ts +2 -2
  337. package/es/components/dialog/src/dialog-content.vue.d.ts +1 -1
  338. package/es/components/dialog/src/dialog.vue.d.ts +4 -4
  339. package/es/components/divider/src/divider.d.ts +1 -1
  340. package/es/components/divider/src/divider.vue.d.ts +1 -1
  341. package/es/components/drawer/src/drawer.vue.d.ts +7 -7
  342. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  343. package/es/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  344. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  345. package/es/components/dropdown/src/dropdown.d.ts +4 -4
  346. package/es/components/dropdown/src/dropdown.vue.d.ts +93 -93
  347. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  348. package/es/components/form/src/form-item.d.ts +2 -2
  349. package/es/components/form/src/form-item.vue.d.ts +2 -2
  350. package/es/components/form/src/form.d.ts +2 -2
  351. package/es/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  352. package/es/components/image/src/image.vue.d.ts +6 -6
  353. package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  354. package/es/components/input/src/input.d.ts +3 -3
  355. package/es/components/input/src/input.vue.d.ts +16 -16
  356. package/es/components/input-number/src/input-number.d.ts +3 -3
  357. package/es/components/input-number/src/input-number.vue.d.ts +10 -10
  358. package/es/components/input-otp/src/input-otp.d.ts +1 -1
  359. package/es/components/input-otp/src/input-otp.mjs.map +1 -1
  360. package/es/components/input-otp/src/input-otp.vue.d.ts +7 -9
  361. package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs +4 -4
  362. package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  363. package/es/components/input-otp/src/input-otp2.mjs.map +1 -1
  364. package/es/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  365. package/es/components/input-tag/src/input-tag.d.ts +2 -2
  366. package/es/components/input-tag/src/input-tag.vue.d.ts +12 -12
  367. package/es/components/link/src/link.d.ts +1 -1
  368. package/es/components/mention/src/mention.d.ts +4 -4
  369. package/es/components/mention/src/mention.vue.d.ts +5 -5
  370. package/es/components/menu/src/menu.d.ts +5 -5
  371. package/es/components/message/src/instance.d.ts +1 -1
  372. package/es/components/message/src/message.d.ts +2 -2
  373. package/es/components/message/src/message.vue.d.ts +3 -3
  374. package/es/components/message-box/src/index.vue.d.ts +62 -62
  375. package/es/components/notification/src/notification.d.ts +1 -1
  376. package/es/components/notification/src/notification.vue.d.ts +4 -4
  377. package/es/components/pagination/src/components/jumper.d.ts +1 -1
  378. package/es/components/pagination/src/components/jumper.vue.d.ts +2 -2
  379. package/es/components/pagination/src/components/next.vue.d.ts +1 -1
  380. package/es/components/pagination/src/components/pager.vue.d.ts +1 -1
  381. package/es/components/pagination/src/components/prev.vue.d.ts +1 -1
  382. package/es/components/pagination/src/components/sizes.d.ts +1 -1
  383. package/es/components/pagination/src/components/sizes.vue.d.ts +2 -2
  384. package/es/components/pagination/src/pagination.d.ts +7 -7
  385. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  386. package/es/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
  387. package/es/components/popover/src/popover.d.ts +2 -2
  388. package/es/components/popover/src/popover.vue.d.ts +9 -9
  389. package/es/components/popper/src/composables/use-content.d.ts +2 -2
  390. package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  391. package/es/components/popper/src/content.d.ts +4 -4
  392. package/es/components/popper/src/content.vue.d.ts +16 -16
  393. package/es/components/popper/src/popper.d.ts +2 -2
  394. package/es/components/progress/src/progress.vue.d.ts +1 -1
  395. package/es/components/radio/src/radio-button.d.ts +4 -4
  396. package/es/components/radio/src/radio-button.vue.d.ts +3 -3
  397. package/es/components/radio/src/radio-group.d.ts +1 -1
  398. package/es/components/radio/src/radio-group.vue.d.ts +4 -4
  399. package/es/components/radio/src/radio.d.ts +8 -8
  400. package/es/components/radio/src/radio.vue.d.ts +4 -4
  401. package/es/components/radio/src/use-radio.d.ts +1 -1
  402. package/es/components/rate/src/rate.d.ts +1 -1
  403. package/es/components/rate/src/rate.vue.d.ts +2 -2
  404. package/es/components/result/src/result.d.ts +1 -1
  405. package/es/components/result/src/result.vue.d.ts +1 -1
  406. package/es/components/row/src/row.d.ts +2 -2
  407. package/es/components/row/src/row.vue.d.ts +1 -1
  408. package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  409. package/es/components/segmented/index.d.ts +3 -3
  410. package/es/components/segmented/src/segmented.d.ts +2 -2
  411. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  412. package/es/components/select/src/option.d.ts +2 -2
  413. package/es/components/select/src/option.vue.d.ts +5 -5
  414. package/es/components/select/src/select.d.ts +5 -5
  415. package/es/components/select/src/select.vue.d.ts +99 -99
  416. package/es/components/select/src/useOption.d.ts +2 -2
  417. package/es/components/select/src/useSelect.d.ts +7 -7
  418. package/es/components/select-v2/src/defaults.d.ts +3 -3
  419. package/es/components/select-v2/src/select.vue.d.ts +79 -79
  420. package/es/components/select-v2/src/useSelect.d.ts +2 -2
  421. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  422. package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
  423. package/es/components/slider/src/button.vue.d.ts +1 -1
  424. package/es/components/slider/src/slider.d.ts +2 -2
  425. package/es/components/slider/src/slider.vue.d.ts +11 -11
  426. package/es/components/space/src/space.d.ts +5 -5
  427. package/es/components/splitter/src/splitter.vue.d.ts +2 -2
  428. package/es/components/steps/src/item.d.ts +1 -1
  429. package/es/components/steps/src/item.vue.d.ts +2 -2
  430. package/es/components/steps/src/steps.d.ts +2 -2
  431. package/es/components/switch/src/switch.d.ts +1 -1
  432. package/es/components/switch/src/switch.vue.d.ts +5 -5
  433. package/es/components/table/src/filter-panel.vue.d.ts +78 -78
  434. package/es/components/table/src/table/defaults.d.ts +6 -6
  435. package/es/components/table/src/table/style-helper.d.ts +1 -1
  436. package/es/components/table/src/table-column/defaults.d.ts +2 -2
  437. package/es/components/table/src/table-column/index.vue.d.ts +1 -1
  438. package/es/components/table/src/table-footer/index.d.ts +1 -1
  439. package/es/components/table/src/table-header/index.d.ts +17 -17
  440. package/es/components/table/src/table.vue.d.ts +4 -4
  441. package/es/components/table-v2/src/components/header.d.ts +1 -1
  442. package/es/components/table-v2/src/table-grid.d.ts +2 -2
  443. package/es/components/table-v2/src/table-v2.d.ts +4 -4
  444. package/es/components/tabs/src/tab-nav.d.ts +1 -1
  445. package/es/components/tabs/src/tab-pane.vue.d.ts +1 -1
  446. package/es/components/tabs/src/tabs.d.ts +6 -6
  447. package/es/components/tag/src/tag.d.ts +2 -2
  448. package/es/components/tag/src/tag.vue.d.ts +2 -2
  449. package/es/components/text/src/text.d.ts +2 -2
  450. package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  451. package/es/components/time-picker/src/common/picker.vue.d.ts +22 -22
  452. package/es/components/time-picker/src/common/props.d.ts +3 -3
  453. package/es/components/time-picker/src/time-picker.d.ts +16 -16
  454. package/es/components/time-select/src/time-select.d.ts +1 -1
  455. package/es/components/time-select/src/time-select.vue.d.ts +11 -11
  456. package/es/components/timeline/src/timeline-item.d.ts +3 -3
  457. package/es/components/timeline/src/timeline.d.ts +4 -4
  458. package/es/components/tooltip/src/content.d.ts +1 -1
  459. package/es/components/tooltip/src/content.vue.d.ts +14 -14
  460. package/es/components/tooltip/src/tooltip.d.ts +3 -3
  461. package/es/components/tooltip/src/tooltip.vue.d.ts +16 -16
  462. package/es/components/tooltip/src/trigger.d.ts +1 -1
  463. package/es/components/tour/src/content.d.ts +2 -2
  464. package/es/components/tour/src/step.d.ts +1 -1
  465. package/es/components/tour/src/step.vue.d.ts +1 -1
  466. package/es/components/tour/src/tour.d.ts +1 -1
  467. package/es/components/tour/src/tour.vue.d.ts +6 -6
  468. package/es/components/transfer/src/composables/use-check.d.ts +6 -1
  469. package/es/components/transfer/src/composables/use-check.mjs +12 -1
  470. package/es/components/transfer/src/composables/use-check.mjs.map +1 -1
  471. package/es/components/transfer/src/transfer-panel.d.ts +4 -0
  472. package/es/components/transfer/src/transfer-panel.mjs +3 -1
  473. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  474. package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -1
  475. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs +38 -4
  476. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  477. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  478. package/es/components/transfer/src/transfer.d.ts +10 -0
  479. package/es/components/transfer/src/transfer.mjs +11 -0
  480. package/es/components/transfer/src/transfer.mjs.map +1 -1
  481. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  482. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs +8 -0
  483. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  484. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  485. package/es/components/transfer/style/css.mjs +1 -0
  486. package/es/components/transfer/style/index.mjs +1 -0
  487. package/es/components/tree/src/tree-node.vue.d.ts +16 -16
  488. package/es/components/tree/src/tree.vue.d.ts +16 -16
  489. package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
  490. package/es/components/tree-select/src/tree-select.vue.d.ts +26 -26
  491. package/es/components/tree-v2/src/composables/useTree.d.ts +8 -8
  492. package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
  493. package/es/components/upload/src/upload-content.d.ts +1 -1
  494. package/es/components/upload/src/upload-content.vue.d.ts +1 -1
  495. package/es/components/upload/src/upload-list.d.ts +1 -1
  496. package/es/components/upload/src/upload.d.ts +2 -2
  497. package/es/components/upload/src/upload.vue.d.ts +2 -2
  498. package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  499. package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
  500. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  501. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  502. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  503. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  504. package/es/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  505. package/es/components/virtual-list/src/utils.d.ts +1 -1
  506. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  507. package/es/hooks/use-floating/index.d.ts +12 -12
  508. package/es/hooks/use-popper/index.d.ts +2 -2
  509. package/es/hooks/use-size/index.d.ts +3 -3
  510. package/es/locale/lang/nb-no.mjs +54 -54
  511. package/es/locale/lang/nb-no.mjs.map +1 -1
  512. package/es/locale/lang/no.mjs +16 -16
  513. package/es/locale/lang/no.mjs.map +1 -1
  514. package/es/utils/vue/vnode.d.ts +4 -4
  515. package/es/version.d.ts +1 -1
  516. package/es/version.mjs +1 -1
  517. package/es/version.mjs.map +1 -1
  518. package/lib/components/affix/src/affix.d.ts +1 -1
  519. package/lib/components/affix/src/affix.vue.d.ts +3 -3
  520. package/lib/components/alert/src/alert.d.ts +1 -1
  521. package/lib/components/alert/src/alert.vue.d.ts +2 -2
  522. package/lib/components/anchor/src/anchor.vue.d.ts +3 -3
  523. package/lib/components/autocomplete/src/autocomplete.d.ts +4 -4
  524. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  525. package/lib/components/avatar/src/avatar-group-props.d.ts +1 -1
  526. package/lib/components/avatar/src/avatar-group.d.ts +4 -4
  527. package/lib/components/avatar/src/avatar.d.ts +1 -1
  528. package/lib/components/badge/src/badge.d.ts +1 -1
  529. package/lib/components/badge/src/badge.vue.d.ts +1 -1
  530. package/lib/components/button/src/button-group.d.ts +2 -2
  531. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  532. package/lib/components/button/src/button.d.ts +2 -2
  533. package/lib/components/button/src/button.vue.d.ts +4 -4
  534. package/lib/components/button/src/use-button.d.ts +2 -2
  535. package/lib/components/card/src/card.vue.d.ts +1 -1
  536. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
  537. package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
  538. package/lib/components/cascader/src/cascader.d.ts +4 -4
  539. package/lib/components/cascader/src/cascader.vue.d.ts +15 -15
  540. package/lib/components/cascader-panel/src/index.vue.d.ts +4 -4
  541. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  542. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
  543. package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
  544. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +3 -3
  545. package/lib/components/checkbox/src/checkbox.d.ts +9 -9
  546. package/lib/components/checkbox/src/checkbox.vue.d.ts +5 -5
  547. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  548. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  549. package/lib/components/col/src/col.vue.d.ts +1 -1
  550. package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
  551. package/lib/components/color-picker/src/color-picker.d.ts +1 -1
  552. package/lib/components/color-picker/src/color-picker.vue.d.ts +9 -9
  553. package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  554. package/lib/components/config-provider/src/config-provider-props.d.ts +1 -1
  555. package/lib/components/config-provider/src/config-provider.d.ts +3 -3
  556. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  557. package/lib/components/countdown/src/countdown.vue.d.ts +3 -3
  558. package/lib/components/date-picker/src/date-picker.d.ts +19 -19
  559. package/lib/components/date-picker/src/props.d.ts +4 -4
  560. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  561. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +5 -5
  562. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +4 -4
  563. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  564. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  565. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +8 -8
  566. package/lib/components/date-picker-panel/src/panel-utils.d.ts +27 -27
  567. package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
  568. package/lib/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
  569. package/lib/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
  570. package/lib/components/date-picker-panel/src/props/shared.d.ts +1 -1
  571. package/lib/components/descriptions/src/description-item.d.ts +19 -19
  572. package/lib/components/descriptions/src/description.d.ts +1 -1
  573. package/lib/components/descriptions/src/description.vue.d.ts +2 -2
  574. package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -1
  575. package/lib/components/dialog/src/dialog.vue.d.ts +4 -4
  576. package/lib/components/divider/src/divider.d.ts +1 -1
  577. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  578. package/lib/components/drawer/src/drawer.vue.d.ts +7 -7
  579. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  580. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  581. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  582. package/lib/components/dropdown/src/dropdown.d.ts +4 -4
  583. package/lib/components/dropdown/src/dropdown.vue.d.ts +93 -93
  584. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  585. package/lib/components/form/src/form-item.d.ts +2 -2
  586. package/lib/components/form/src/form-item.vue.d.ts +2 -2
  587. package/lib/components/form/src/form.d.ts +2 -2
  588. package/lib/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  589. package/lib/components/image/src/image.vue.d.ts +6 -6
  590. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  591. package/lib/components/input/src/input.d.ts +3 -3
  592. package/lib/components/input/src/input.vue.d.ts +16 -16
  593. package/lib/components/input-number/src/input-number.d.ts +3 -3
  594. package/lib/components/input-number/src/input-number.vue.d.ts +10 -10
  595. package/lib/components/input-otp/src/input-otp.d.ts +1 -1
  596. package/lib/components/input-otp/src/input-otp.js.map +1 -1
  597. package/lib/components/input-otp/src/input-otp.vue.d.ts +7 -9
  598. package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js +3 -3
  599. package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js.map +1 -1
  600. package/lib/components/input-otp/src/input-otp2.js.map +1 -1
  601. package/lib/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  602. package/lib/components/input-tag/src/input-tag.d.ts +2 -2
  603. package/lib/components/input-tag/src/input-tag.vue.d.ts +12 -12
  604. package/lib/components/link/src/link.d.ts +1 -1
  605. package/lib/components/mention/src/mention.d.ts +4 -4
  606. package/lib/components/mention/src/mention.vue.d.ts +5 -5
  607. package/lib/components/menu/src/menu.d.ts +5 -5
  608. package/lib/components/message/src/instance.d.ts +1 -1
  609. package/lib/components/message/src/message.d.ts +2 -2
  610. package/lib/components/message/src/message.vue.d.ts +3 -3
  611. package/lib/components/message-box/src/index.vue.d.ts +62 -62
  612. package/lib/components/notification/src/notification.d.ts +1 -1
  613. package/lib/components/notification/src/notification.vue.d.ts +4 -4
  614. package/lib/components/pagination/src/components/jumper.d.ts +1 -1
  615. package/lib/components/pagination/src/components/jumper.vue.d.ts +2 -2
  616. package/lib/components/pagination/src/components/next.vue.d.ts +1 -1
  617. package/lib/components/pagination/src/components/pager.vue.d.ts +1 -1
  618. package/lib/components/pagination/src/components/prev.vue.d.ts +1 -1
  619. package/lib/components/pagination/src/components/sizes.d.ts +1 -1
  620. package/lib/components/pagination/src/components/sizes.vue.d.ts +2 -2
  621. package/lib/components/pagination/src/pagination.d.ts +7 -7
  622. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  623. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
  624. package/lib/components/popover/src/popover.d.ts +2 -2
  625. package/lib/components/popover/src/popover.vue.d.ts +9 -9
  626. package/lib/components/popper/src/composables/use-content.d.ts +2 -2
  627. package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  628. package/lib/components/popper/src/content.d.ts +4 -4
  629. package/lib/components/popper/src/content.vue.d.ts +16 -16
  630. package/lib/components/popper/src/popper.d.ts +2 -2
  631. package/lib/components/progress/src/progress.vue.d.ts +1 -1
  632. package/lib/components/radio/src/radio-button.d.ts +4 -4
  633. package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
  634. package/lib/components/radio/src/radio-group.d.ts +1 -1
  635. package/lib/components/radio/src/radio-group.vue.d.ts +4 -4
  636. package/lib/components/radio/src/radio.d.ts +8 -8
  637. package/lib/components/radio/src/radio.vue.d.ts +4 -4
  638. package/lib/components/radio/src/use-radio.d.ts +1 -1
  639. package/lib/components/rate/src/rate.d.ts +1 -1
  640. package/lib/components/rate/src/rate.vue.d.ts +2 -2
  641. package/lib/components/result/src/result.d.ts +1 -1
  642. package/lib/components/result/src/result.vue.d.ts +1 -1
  643. package/lib/components/row/src/row.d.ts +2 -2
  644. package/lib/components/row/src/row.vue.d.ts +1 -1
  645. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  646. package/lib/components/segmented/index.d.ts +3 -3
  647. package/lib/components/segmented/src/segmented.d.ts +2 -2
  648. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  649. package/lib/components/select/src/option.d.ts +2 -2
  650. package/lib/components/select/src/option.vue.d.ts +5 -5
  651. package/lib/components/select/src/select.d.ts +5 -5
  652. package/lib/components/select/src/select.vue.d.ts +99 -99
  653. package/lib/components/select/src/useOption.d.ts +2 -2
  654. package/lib/components/select/src/useSelect.d.ts +7 -7
  655. package/lib/components/select-v2/src/defaults.d.ts +3 -3
  656. package/lib/components/select-v2/src/select.vue.d.ts +79 -79
  657. package/lib/components/select-v2/src/useSelect.d.ts +2 -2
  658. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  659. package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
  660. package/lib/components/slider/src/button.vue.d.ts +1 -1
  661. package/lib/components/slider/src/slider.d.ts +2 -2
  662. package/lib/components/slider/src/slider.vue.d.ts +11 -11
  663. package/lib/components/space/src/space.d.ts +5 -5
  664. package/lib/components/splitter/src/splitter.vue.d.ts +2 -2
  665. package/lib/components/steps/src/item.d.ts +1 -1
  666. package/lib/components/steps/src/item.vue.d.ts +2 -2
  667. package/lib/components/steps/src/steps.d.ts +2 -2
  668. package/lib/components/switch/src/switch.d.ts +1 -1
  669. package/lib/components/switch/src/switch.vue.d.ts +5 -5
  670. package/lib/components/table/src/filter-panel.vue.d.ts +78 -78
  671. package/lib/components/table/src/table/defaults.d.ts +6 -6
  672. package/lib/components/table/src/table/style-helper.d.ts +1 -1
  673. package/lib/components/table/src/table-column/defaults.d.ts +2 -2
  674. package/lib/components/table/src/table-column/index.vue.d.ts +1 -1
  675. package/lib/components/table/src/table-footer/index.d.ts +1 -1
  676. package/lib/components/table/src/table-header/index.d.ts +17 -17
  677. package/lib/components/table/src/table.vue.d.ts +4 -4
  678. package/lib/components/table-v2/src/components/header.d.ts +1 -1
  679. package/lib/components/table-v2/src/table-grid.d.ts +2 -2
  680. package/lib/components/table-v2/src/table-v2.d.ts +4 -4
  681. package/lib/components/tabs/src/tab-nav.d.ts +1 -1
  682. package/lib/components/tabs/src/tab-pane.vue.d.ts +1 -1
  683. package/lib/components/tabs/src/tabs.d.ts +6 -6
  684. package/lib/components/tag/src/tag.d.ts +2 -2
  685. package/lib/components/tag/src/tag.vue.d.ts +2 -2
  686. package/lib/components/text/src/text.d.ts +2 -2
  687. package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  688. package/lib/components/time-picker/src/common/picker.vue.d.ts +22 -22
  689. package/lib/components/time-picker/src/common/props.d.ts +3 -3
  690. package/lib/components/time-picker/src/time-picker.d.ts +16 -16
  691. package/lib/components/time-select/src/time-select.d.ts +1 -1
  692. package/lib/components/time-select/src/time-select.vue.d.ts +11 -11
  693. package/lib/components/timeline/src/timeline-item.d.ts +3 -3
  694. package/lib/components/timeline/src/timeline.d.ts +4 -4
  695. package/lib/components/tooltip/src/content.d.ts +1 -1
  696. package/lib/components/tooltip/src/content.vue.d.ts +14 -14
  697. package/lib/components/tooltip/src/tooltip.d.ts +3 -3
  698. package/lib/components/tooltip/src/tooltip.vue.d.ts +16 -16
  699. package/lib/components/tooltip/src/trigger.d.ts +1 -1
  700. package/lib/components/tour/src/content.d.ts +2 -2
  701. package/lib/components/tour/src/step.d.ts +1 -1
  702. package/lib/components/tour/src/step.vue.d.ts +1 -1
  703. package/lib/components/tour/src/tour.d.ts +1 -1
  704. package/lib/components/tour/src/tour.vue.d.ts +6 -6
  705. package/lib/components/transfer/src/composables/use-check.d.ts +6 -1
  706. package/lib/components/transfer/src/composables/use-check.js +11 -0
  707. package/lib/components/transfer/src/composables/use-check.js.map +1 -1
  708. package/lib/components/transfer/src/transfer-panel.d.ts +4 -0
  709. package/lib/components/transfer/src/transfer-panel.js +3 -1
  710. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  711. package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -1
  712. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js +37 -3
  713. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  714. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  715. package/lib/components/transfer/src/transfer.d.ts +10 -0
  716. package/lib/components/transfer/src/transfer.js +11 -0
  717. package/lib/components/transfer/src/transfer.js.map +1 -1
  718. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  719. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js +8 -0
  720. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  721. package/lib/components/transfer/src/transfer2.js.map +1 -1
  722. package/lib/components/transfer/style/css.js +1 -0
  723. package/lib/components/transfer/style/index.js +1 -0
  724. package/lib/components/tree/src/tree-node.vue.d.ts +16 -16
  725. package/lib/components/tree/src/tree.vue.d.ts +16 -16
  726. package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
  727. package/lib/components/tree-select/src/tree-select.vue.d.ts +26 -26
  728. package/lib/components/tree-v2/src/composables/useTree.d.ts +8 -8
  729. package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
  730. package/lib/components/upload/src/upload-content.d.ts +1 -1
  731. package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
  732. package/lib/components/upload/src/upload-list.d.ts +1 -1
  733. package/lib/components/upload/src/upload.d.ts +2 -2
  734. package/lib/components/upload/src/upload.vue.d.ts +2 -2
  735. package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  736. package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
  737. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  738. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  739. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  740. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  741. package/lib/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  742. package/lib/components/virtual-list/src/utils.d.ts +1 -1
  743. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  744. package/lib/hooks/use-floating/index.d.ts +12 -12
  745. package/lib/hooks/use-popper/index.d.ts +2 -2
  746. package/lib/hooks/use-size/index.d.ts +3 -3
  747. package/lib/locale/lang/nb-no.js +54 -54
  748. package/lib/locale/lang/nb-no.js.map +1 -1
  749. package/lib/locale/lang/no.js +16 -16
  750. package/lib/locale/lang/no.js.map +1 -1
  751. package/lib/utils/vue/vnode.d.ts +4 -4
  752. package/lib/version.d.ts +1 -1
  753. package/lib/version.js +1 -1
  754. package/lib/version.js.map +1 -1
  755. package/package.json +3 -3
  756. package/tags.json +1 -1
  757. package/theme-chalk/el-drawer.css +1 -1
  758. package/theme-chalk/el-input-otp.css +1 -1
  759. package/theme-chalk/el-input.css +1 -1
  760. package/theme-chalk/index.css +1 -1
  761. package/theme-chalk/src/drawer.scss +1 -0
  762. package/theme-chalk/src/input-otp.scss +1 -0
  763. package/theme-chalk/src/input.scss +1 -0
  764. package/web-types.json +1 -1
@@ -86,7 +86,7 @@ declare const formItemProps: {
86
86
  };
87
87
  readonly error: StringConstructor;
88
88
  readonly validateStatus: {
89
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
89
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
90
90
  readonly required: false;
91
91
  readonly validator: ((val: unknown) => boolean) | undefined;
92
92
  __epPropKey: true;
@@ -95,7 +95,7 @@ declare const formItemProps: {
95
95
  readonly inlineMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
96
96
  readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
97
97
  readonly size: {
98
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", unknown>>;
98
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
99
99
  readonly required: false;
100
100
  readonly validator: ((val: unknown) => boolean) | undefined;
101
101
  __epPropKey: true;
@@ -19,7 +19,7 @@ declare const __VLS_base: _$vue.DefineComponent<FormItemProps, {
19
19
  /**
20
20
  * @description Form item size.
21
21
  */
22
- size: _$vue.ComputedRef<"" | "default" | "large" | "small">;
22
+ size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
23
23
  /**
24
24
  * @description Validation message.
25
25
  */
@@ -27,7 +27,7 @@ declare const __VLS_base: _$vue.DefineComponent<FormItemProps, {
27
27
  /**
28
28
  * @description Validation state.
29
29
  */
30
- validateState: _$vue.Ref<"" | "success" | "error" | "validating", "" | "success" | "error" | "validating">;
30
+ validateState: _$vue.Ref<"" | "error" | "success" | "validating", "" | "error" | "success" | "validating">;
31
31
  /**
32
32
  * @description Validate form item.
33
33
  */
@@ -22,7 +22,7 @@ interface FormMetaProps {
22
22
  */
23
23
  declare const formMetaProps: {
24
24
  readonly size: {
25
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", unknown>>;
25
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
26
26
  readonly required: false;
27
27
  readonly validator: ((val: unknown) => boolean) | undefined;
28
28
  __epPropKey: true;
@@ -111,7 +111,7 @@ declare const formProps: {
111
111
  readonly scrollToError: BooleanConstructor;
112
112
  readonly scrollIntoViewOptions: EpPropFinalized<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | (((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions)) | null)[], unknown, unknown, true, boolean>;
113
113
  readonly size: {
114
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", unknown>>;
114
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
115
115
  readonly required: false;
116
116
  readonly validator: ((val: unknown) => boolean) | undefined;
117
117
  __epPropKey: true;
@@ -3,9 +3,9 @@ import * as _$vue from "vue";
3
3
  import { MaybeRef } from "vue";
4
4
 
5
5
  //#region ../../packages/components/form/src/hooks/use-form-common-props.d.ts
6
- declare const useFormSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => _$vue.ComputedRef<"" | "default" | "large" | "small">;
6
+ declare const useFormSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => _$vue.ComputedRef<"" | "default" | "small" | "large">;
7
7
  declare const useFormDisabled: (fallback?: MaybeRef<boolean | undefined>) => _$vue.ComputedRef<boolean>;
8
- declare const useSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => _$vue.ComputedRef<"" | "default" | "large" | "small">;
8
+ declare const useSize: (fallback?: MaybeRef<ComponentSize | undefined>, ignore?: Partial<Record<"prop" | "form" | "formItem" | "global", boolean>>) => _$vue.ComputedRef<"" | "default" | "small" | "large">;
9
9
  declare const useDisabled: (fallback?: MaybeRef<boolean | undefined>) => _$vue.ComputedRef<boolean>;
10
10
  //#endregion
11
11
  export { useDisabled, useFormDisabled, useFormSize, useSize };
@@ -34,28 +34,28 @@ type __VLS_Slots = {} & {
34
34
  declare const __VLS_base: _$vue.DefineComponent<ImageProps, {
35
35
  /** @description manually open preview */showPreview: typeof clickHandler;
36
36
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
37
- show: () => void;
38
37
  close: () => void;
39
38
  error: (evt: Event) => void;
40
39
  load: (evt: Event) => void;
40
+ show: () => void;
41
41
  switch: (val: number) => void;
42
42
  }, string, _$vue.PublicProps, Readonly<ImageProps> & Readonly<{
43
- onShow?: (() => any) | undefined;
44
43
  onClose?: (() => any) | undefined;
45
44
  onError?: ((evt: Event) => any) | undefined;
46
45
  onLoad?: ((evt: Event) => any) | undefined;
46
+ onShow?: (() => any) | undefined;
47
47
  onSwitch?: ((val: number) => any) | undefined;
48
48
  }>, {
49
49
  infinite: boolean;
50
- scale: number;
51
- src: string;
52
- fit: ImageFitType;
53
50
  initialIndex: number;
54
51
  closeOnPressEscape: boolean;
55
- previewSrcList: string[];
56
52
  zoomRate: number;
53
+ scale: number;
57
54
  minScale: number;
58
55
  maxScale: number;
56
+ src: string;
57
+ fit: ImageFitType;
58
+ previewSrcList: string[];
59
59
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
60
60
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
61
61
  declare const _default: typeof __VLS_export;
@@ -36,24 +36,24 @@ declare const __VLS_base: _$vue.DefineComponent<ImageViewerProps, {
36
36
  */
37
37
  setActiveItem: typeof setActiveItem;
38
38
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
39
- rotate: (deg: number) => void;
40
39
  close: () => void;
41
40
  error: (evt: Event) => void;
42
41
  switch: (index: number) => void;
42
+ rotate: (deg: number) => void;
43
43
  }, string, _$vue.PublicProps, Readonly<ImageViewerProps> & Readonly<{
44
- onRotate?: ((deg: number) => any) | undefined;
45
44
  onClose?: (() => any) | undefined;
46
45
  onError?: ((evt: Event) => any) | undefined;
47
46
  onSwitch?: ((index: number) => any) | undefined;
47
+ onRotate?: ((deg: number) => any) | undefined;
48
48
  }>, {
49
49
  infinite: boolean;
50
- scale: number;
50
+ urlList: string[];
51
51
  initialIndex: number;
52
52
  closeOnPressEscape: boolean;
53
53
  zoomRate: number;
54
+ scale: number;
54
55
  minScale: number;
55
56
  maxScale: number;
56
- urlList: string[];
57
57
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
58
58
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
59
59
  declare const _default: typeof __VLS_export;
@@ -155,12 +155,12 @@ interface InputProps {
155
155
  * @deprecated Removed after 3.0.0, Use `InputProps` instead.
156
156
  */
157
157
  declare const inputProps: {
158
- readonly inputmode: EpPropFinalized<(new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
158
+ readonly inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
159
159
  readonly name: StringConstructor;
160
160
  readonly ariaLabel: StringConstructor;
161
161
  readonly id: EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
162
162
  readonly size: {
163
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
163
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
164
164
  readonly required: false;
165
165
  readonly validator: ((val: unknown) => boolean) | undefined;
166
166
  __epPropKey: true;
@@ -182,7 +182,7 @@ declare const inputProps: {
182
182
  };
183
183
  readonly type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
184
184
  readonly resize: {
185
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "horizontal" | "vertical" | "none" | "both", unknown>>;
185
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
186
186
  readonly required: false;
187
187
  readonly validator: ((val: unknown) => boolean) | undefined;
188
188
  __epPropKey: true;
@@ -33,39 +33,39 @@ declare const __VLS_base: _$vue.DefineComponent<InputProps, {
33
33
  resizeTextarea: () => void;
34
34
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
35
35
  clear: (evt: MouseEvent | undefined) => void;
36
- mouseenter: (evt: MouseEvent) => void;
37
- mouseleave: (evt: MouseEvent) => void;
38
- focus: (evt: FocusEvent) => void;
39
- blur: (evt: FocusEvent) => void;
40
36
  "update:modelValue": (value: string) => void;
41
- change: (value: string, evt?: Event | undefined) => void;
42
- keydown: (evt: Event | KeyboardEvent) => void;
43
37
  input: (value: string) => void;
38
+ change: (value: string, evt?: Event | undefined) => void;
39
+ blur: (evt: FocusEvent) => void;
40
+ compositionend: (evt: CompositionEvent) => void;
44
41
  compositionstart: (evt: CompositionEvent) => void;
45
42
  compositionupdate: (evt: CompositionEvent) => void;
46
- compositionend: (evt: CompositionEvent) => void;
43
+ focus: (evt: FocusEvent) => void;
44
+ keydown: (evt: Event | KeyboardEvent) => void;
45
+ mouseenter: (evt: MouseEvent) => void;
46
+ mouseleave: (evt: MouseEvent) => void;
47
47
  }, string, _$vue.PublicProps, Readonly<InputProps> & Readonly<{
48
48
  onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
49
- onMouseenter?: ((evt: MouseEvent) => any) | undefined;
50
- onMouseleave?: ((evt: MouseEvent) => any) | undefined;
51
- onFocus?: ((evt: FocusEvent) => any) | undefined;
52
- onBlur?: ((evt: FocusEvent) => any) | undefined;
53
49
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
54
- onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
55
- onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
56
50
  onInput?: ((value: string) => any) | undefined;
51
+ onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
52
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
53
+ onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
57
54
  onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
58
55
  onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
59
- onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
56
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
57
+ onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
58
+ onMouseenter?: ((evt: MouseEvent) => any) | undefined;
59
+ onMouseleave?: ((evt: MouseEvent) => any) | undefined;
60
60
  }>, {
61
61
  type: InputType;
62
- disabled: boolean;
63
62
  modelValue: string | number | null;
64
- clearIcon: IconPropType;
63
+ disabled: boolean;
65
64
  tabindex: string | number;
66
65
  validateEvent: boolean;
67
66
  modelModifiers: InputModelModifiers;
68
67
  autocomplete: string;
68
+ clearIcon: IconPropType;
69
69
  wordLimitPosition: "inside" | "outside";
70
70
  inputStyle: string | false | _$vue.CSSProperties | StyleValue[] | null;
71
71
  rows: number;
@@ -106,8 +106,8 @@ interface InputNumberProps {
106
106
  * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
107
107
  */
108
108
  declare const inputNumberProps: {
109
- readonly inputmode: EpPropFinalized<(new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
110
- readonly align: EpPropFinalized<(new (...args: any[]) => "left" | "center" | "right") | (() => "left" | "center" | "right") | (((new (...args: any[]) => "left" | "center" | "right") | (() => "left" | "center" | "right")) | null)[], unknown, unknown, "center", boolean>;
109
+ readonly inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
110
+ readonly align: EpPropFinalized<(new (...args: any[]) => "center" | "left" | "right") | (() => "center" | "left" | "right") | (((new (...args: any[]) => "center" | "left" | "right") | (() => "center" | "left" | "right")) | null)[], unknown, unknown, "center", boolean>;
111
111
  readonly disabledScientific: BooleanConstructor;
112
112
  readonly formatter: {
113
113
  readonly type: _$vue.PropType<Function>;
@@ -137,7 +137,7 @@ declare const inputNumberProps: {
137
137
  readonly readonly: BooleanConstructor;
138
138
  readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
139
139
  readonly size: {
140
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
140
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
141
141
  readonly required: false;
142
142
  readonly validator: ((val: unknown) => boolean) | undefined;
143
143
  __epPropKey: true;
@@ -16,28 +16,28 @@ declare const __VLS_base: _$vue.DefineComponent<InputNumberProps, {
16
16
  /** @description get focus the input component */focus: () => void; /** @description remove focus the input component */
17
17
  blur: () => void;
18
18
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
19
- focus: (e: FocusEvent) => void;
20
- blur: (e: FocusEvent) => void;
21
19
  "update:modelValue": (val: number | undefined) => void;
22
- change: (cur: number | undefined, prev: number | undefined) => void;
23
20
  input: (val: number | null | undefined) => void;
21
+ change: (cur: number | undefined, prev: number | undefined) => void;
22
+ blur: (e: FocusEvent) => void;
23
+ focus: (e: FocusEvent) => void;
24
24
  }, string, _$vue.PublicProps, Readonly<InputNumberProps> & Readonly<{
25
- onFocus?: ((e: FocusEvent) => any) | undefined;
26
- onBlur?: ((e: FocusEvent) => any) | undefined;
27
25
  "onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined;
28
- onChange?: ((cur: number | undefined, prev: number | undefined) => any) | undefined;
29
26
  onInput?: ((val: number | null | undefined) => any) | undefined;
27
+ onChange?: ((cur: number | undefined, prev: number | undefined) => any) | undefined;
28
+ onBlur?: ((e: FocusEvent) => any) | undefined;
29
+ onFocus?: ((e: FocusEvent) => any) | undefined;
30
30
  }>, {
31
- id: string;
32
31
  disabled: boolean;
32
+ id: string;
33
33
  tabindex: string | number;
34
34
  validateEvent: boolean;
35
- valueOnClear: "min" | "max" | number | null;
36
- readonly: boolean;
37
- inputmode: "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal";
38
35
  min: number;
39
36
  max: number;
37
+ valueOnClear: "min" | "max" | number | null;
40
38
  align: "left" | "right" | "center";
39
+ readonly: boolean;
40
+ inputmode: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
41
41
  step: number;
42
42
  stepStrictly: boolean;
43
43
  controls: boolean;
@@ -33,7 +33,7 @@ interface InputOtpProps extends Pick<AriaProps, 'ariaLabel'> {
33
33
  type?: 'outlined' | 'filled' | 'underlined';
34
34
  /**
35
35
  * @description The size of the OTP fields
36
- * @default 'default'
36
+ * @default undefined
37
37
  */
38
38
  size?: ComponentSize;
39
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.js","names":["UPDATE_MODEL_EVENT","CHANGE_EVENT"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.ts"],"sourcesContent":["import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isString } from '@element-plus/utils'\n\nimport type { InputHTMLAttributes, VNode } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { AriaProps } from '@element-plus/hooks'\n\nexport interface InputOtpProps extends Pick<AriaProps, 'ariaLabel'> {\n /**\n * @description The value of the OTP fields.\n *\n * Since numbers must not have leading zeros, `modelValue` is allowed to be a number only during initialization.\n *\n * @default undefined\n */\n modelValue?: string | number\n /**\n * @description The OTP fields length\n * @default 6\n */\n length?: number\n /**\n * @description Custom validator function\n * @default () => true\n */\n validator?: (char: string, index: number) => boolean\n /**\n * @description Native input mode for virtual keyboards\n */\n inputmode?: InputHTMLAttributes['inputmode']\n /**\n * @description The type of the OTP fields\n * @default 'outlined'\n */\n type?: 'outlined' | 'filled' | 'underlined'\n /**\n * @description The size of the OTP fields\n * @default 'default'\n */\n size?: ComponentSize\n /**\n * @description Whether to enable password mode\n */\n mask?: boolean\n /**\n * @description Whether the OTP fields are disabled\n * @default undefined\n */\n disabled?: boolean\n /**\n * @description Same as `readonly` in native input\n */\n readonly?: boolean\n /**\n * @description Same as `id` in native input\n */\n id?: string\n /**\n * @description Whether to trigger form validation\n */\n validateEvent?: boolean\n /**\n * @description The separator between OTP fields\n */\n separator?: string | VNode | ((index: number) => string | VNode)\n}\n\nexport const inputOtpEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n [CHANGE_EVENT]: (value: string) => isString(value),\n finish: (value: string) => isString(value),\n focus: (eve: FocusEvent) => eve instanceof FocusEvent,\n blur: (eve: FocusEvent) => eve instanceof FocusEvent,\n}\n\nexport type InputOtpEmits = typeof inputOtpEmits\n"],"mappings":";;;;;AAmEA,MAAa,gBAAgB;EAC1BA,cAAAA,sBAAsB,WAAA,GAAA,YAAA,UAA2B,MAAM;EACvDC,cAAAA,gBAAgB,WAAA,GAAA,YAAA,UAA2B,MAAM;CAClD,SAAS,WAAA,GAAA,YAAA,UAA2B,MAAM;CAC1C,QAAQ,QAAoB,eAAe;CAC3C,OAAO,QAAoB,eAAe;CAC3C"}
1
+ {"version":3,"file":"input-otp.js","names":["UPDATE_MODEL_EVENT","CHANGE_EVENT"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.ts"],"sourcesContent":["import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isString } from '@element-plus/utils'\n\nimport type { InputHTMLAttributes, VNode } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { AriaProps } from '@element-plus/hooks'\n\nexport interface InputOtpProps extends Pick<AriaProps, 'ariaLabel'> {\n /**\n * @description The value of the OTP fields.\n *\n * Since numbers must not have leading zeros, `modelValue` is allowed to be a number only during initialization.\n *\n * @default undefined\n */\n modelValue?: string | number\n /**\n * @description The OTP fields length\n * @default 6\n */\n length?: number\n /**\n * @description Custom validator function\n * @default () => true\n */\n validator?: (char: string, index: number) => boolean\n /**\n * @description Native input mode for virtual keyboards\n */\n inputmode?: InputHTMLAttributes['inputmode']\n /**\n * @description The type of the OTP fields\n * @default 'outlined'\n */\n type?: 'outlined' | 'filled' | 'underlined'\n /**\n * @description The size of the OTP fields\n * @default undefined\n */\n size?: ComponentSize\n /**\n * @description Whether to enable password mode\n */\n mask?: boolean\n /**\n * @description Whether the OTP fields are disabled\n * @default undefined\n */\n disabled?: boolean\n /**\n * @description Same as `readonly` in native input\n */\n readonly?: boolean\n /**\n * @description Same as `id` in native input\n */\n id?: string\n /**\n * @description Whether to trigger form validation\n */\n validateEvent?: boolean\n /**\n * @description The separator between OTP fields\n */\n separator?: string | VNode | ((index: number) => string | VNode)\n}\n\nexport const inputOtpEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n [CHANGE_EVENT]: (value: string) => isString(value),\n finish: (value: string) => isString(value),\n focus: (eve: FocusEvent) => eve instanceof FocusEvent,\n blur: (eve: FocusEvent) => eve instanceof FocusEvent,\n}\n\nexport type InputOtpEmits = typeof inputOtpEmits\n"],"mappings":";;;;;AAmEA,MAAa,gBAAgB;EAC1BA,cAAAA,sBAAsB,WAAA,GAAA,YAAA,UAA2B,MAAM;EACvDC,cAAAA,gBAAgB,WAAA,GAAA,YAAA,UAA2B,MAAM;CAClD,SAAS,WAAA,GAAA,YAAA,UAA2B,MAAM;CAC1C,QAAQ,QAAoB,eAAe;CAC3C,OAAO,QAAoB,eAAe;CAC3C"}
@@ -1,4 +1,3 @@
1
- import { ComponentSize } from "../../../constants/size.js";
2
1
  import { InputOtpProps } from "./input-otp.js";
3
2
  import * as _$vue from "vue";
4
3
 
@@ -23,24 +22,23 @@ declare const __VLS_base: _$vue.DefineComponent<InputOtpProps, {
23
22
  */
24
23
  blur: () => void;
25
24
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
26
- focus: (eve: FocusEvent) => void;
27
- blur: (eve: FocusEvent) => void;
28
25
  "update:modelValue": (value: string) => void;
29
- change: (value: string) => void;
30
26
  finish: (value: string) => void;
27
+ change: (value: string) => void;
28
+ blur: (eve: FocusEvent) => void;
29
+ focus: (eve: FocusEvent) => void;
31
30
  }, string, _$vue.PublicProps, Readonly<InputOtpProps> & Readonly<{
32
- onFocus?: ((eve: FocusEvent) => any) | undefined;
33
- onBlur?: ((eve: FocusEvent) => any) | undefined;
34
31
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
35
- onChange?: ((value: string) => any) | undefined;
36
32
  onFinish?: ((value: string) => any) | undefined;
33
+ onChange?: ((value: string) => any) | undefined;
34
+ onBlur?: ((eve: FocusEvent) => any) | undefined;
35
+ onFocus?: ((eve: FocusEvent) => any) | undefined;
37
36
  }>, {
38
37
  type: "outlined" | "filled" | "underlined";
39
- validator: (char: string, index: number) => boolean;
40
38
  length: number;
41
- size: ComponentSize;
42
39
  disabled: boolean;
43
40
  validateEvent: boolean;
41
+ validator: (char: string, index: number) => boolean;
44
42
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
45
43
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
44
  declare const _default: typeof __VLS_export;
@@ -57,8 +57,7 @@ var input_otp_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
57
57
  },
58
58
  size: {
59
59
  type: null,
60
- required: false,
61
- default: "default"
60
+ required: false
62
61
  },
63
62
  mask: {
64
63
  type: Boolean,
@@ -115,6 +114,7 @@ var input_otp_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
115
114
  const { t } = require_index.useLocale();
116
115
  const { formItem } = require_use_form_item.useFormItem();
117
116
  const { inputId, isLabeledByFormItem } = require_use_form_item.useFormItemInputId(props, { formItemContext: formItem });
117
+ const size = require_use_form_common_props.useFormSize();
118
118
  const disabled = require_use_form_common_props.useFormDisabled();
119
119
  let modelValueOnFocus = props.modelValue;
120
120
  const getFirstIndex = (maxIndex) => {
@@ -244,7 +244,7 @@ var input_otp_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
244
244
  id: (0, vue.unref)(inputId),
245
245
  class: (0, vue.normalizeClass)([
246
246
  (0, vue.unref)(ns).b(),
247
- (0, vue.unref)(ns).m(__props.size),
247
+ (0, vue.unref)(ns).m((0, vue.unref)(size)),
248
248
  (0, vue.unref)(ns).m(__props.type),
249
249
  (0, vue.unref)(ns).is("disabled", (0, vue.unref)(disabled))
250
250
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n size: 'default',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEA,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MAAM,gBAAA,GAAA,IAAA,gBAA8B;GAClC,MAAM,QAAQ,OAAO,MAAM,cAAc,GAAE;GAC3C,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,QAAQ,GAAG,GAAG,MAAM,MAAM,OAAO,EAAE,CAAA;IACtE;EAED,MAAM,cAAA,GAAA,IAAA,gBAA4B;GAChC,MAAM,EAAE,cAAc;GACtB,MAAM,cAAA,GAAA,YAAA,YAAwB,UAAU,GAAG,kBAAkB;GAC7D,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,SAAS,GAAG,GAAG,GAAG,MAAM,WAAW,EAAE,C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AAA,GAAA,IAAA,OAAiB,oBAAmB,IAAA,GAAA,IAAA,OAAG,SAAQ,EAAE,UAAU,KAAA;8DA4BjD,IAAA,UAAA,OAAA,GAAA,IAAA,YA1BoB,QAAA,SAAb,GAAG,UAAK;kFAAmB,OAAK,EAAA,EAAA,GAAA,IAAA,oBAkBxC,SAAA,EAjBA,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,GAAE,CAAC,EAAC,cAAA,CAAA,EAAA,EAAA,EAAA,GAAA,IAAA,oBAgBf,SAAA;;cAdI;KAAJ,KAAI;KACH,OAAO,WAAA,MAAW;KAClB,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,GAAE,CAAC,EAAC,QAAA,CAAA;KACX,MAAM,QAAA,OAAI,aAAA;KACV,WAAA,GAAA,IAAA,OAAU,SAAQ;KAClB,UAAU,QAAA;KACV,WAAW,QAAA;KACZ,cAAa;KACZ,eAAA,GAAA,IAAA,OAAY,EAAC,CAAA,4BAAA,EAAA,OAAsC,QAAK,GAAA,CAAA;KACxD,SAAO;KACP,QAAM;KACN,UAAK,WAAE,MAAM,MAAK;KAClB,YAAO,WAAE,cAAc,QAAQ,MAAK;KACpC,UAAK,WAAE,YAAY,QAAQ,MAAK;oCAI5BA,KAAAA,OAAO,aAAa,WAAA,MAAW,WAAW,QAAQ,QAAA,SAAM,KAAA,GAAA,IAAA,YAK1D,KAAA,QAAA,aAAA;;KAHG;aAGH,GAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,+BADiB,WAAA,MAAW,OAAK,CAAA,EAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"input-otp.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst size = useFormSize()\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAEb,MAAM,gBAAA,GAAA,IAAA,gBAA8B;GAClC,MAAM,QAAQ,OAAO,MAAM,cAAc,GAAE;GAC3C,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,QAAQ,GAAG,GAAG,MAAM,MAAM,OAAO,EAAE,CAAA;IACtE;EAED,MAAM,cAAA,GAAA,IAAA,gBAA4B;GAChC,MAAM,EAAE,cAAc;GACtB,MAAM,cAAA,GAAA,YAAA,YAAwB,UAAU,GAAG,kBAAkB;GAC7D,OAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,SAAS,GAAG,GAAG,GAAG,MAAM,WAAW,EAAE,CAAA;IACxE;EAED,MAAM,cAAA,GAAA,IAAA,KAA2B,aAAa,MAAK;EACnD,MAAM,aAAA,GAAA,IAAA,KAAgB,MAAK;EAC3B,MAAM,aAAA,GAAA,IAAA,KAAkD,EAAE,CAAA;EAE1D,MAAM,KAAK,gBAAA,aAAa,YAAW;EACnC,MAAM,EAAE,MAAM,cAAA,WAAU;EACxB,MAAM,EAAE,aAAa,sBAAA,aAAY;EACjC,MAAM,EAAE,SAAS,wBAAwB,sBAAA,mBAAmB,OAAO,EACjE,iBAAiB,UAClB,CAAA;EACD,MAAM,OAAO,8BAAA,aAAY;EACzB,MAAM,WAAW,8BAAA,iBAAgB;EACjC,IAAI,oBAAoB,MAAM;EAE9B,MAAM,iBAAiB,aAAqB;GAC1C,MAAM,QAAQ,WAAW,MAAM,WAAW,MAAM,MAAM,CAAC,QAAQ,KAAK,SAA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WAAA,GAAA,IAAA,OAAU,SAAQ;KAClB,UAAU,QAAA;KACV,WAAW,QAAA;KACZ,cAAa;KACZ,eAAA,GAAA,IAAA,OAAY,EAAC,CAAA,4BAAA,EAAA,OAAsC,QAAK,GAAA,CAAA;KACxD,SAAO;KACP,QAAM;KACN,UAAK,WAAE,MAAM,MAAK;KAClB,YAAO,WAAE,cAAc,QAAQ,MAAK;KACpC,UAAK,WAAE,YAAY,QAAQ,MAAK;oCAI5BA,KAAAA,OAAO,aAAa,WAAA,MAAW,WAAW,QAAQ,QAAA,SAAM,KAAA,GAAA,IAAA,YAK1D,KAAA,QAAA,aAAA;;KAHG;aAGH,GAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,+BADiB,WAAA,MAAW,OAAK,CAAA,EAAA,CAAA,IAAA,GAAA,IAAA,oBAAA,QAAA,KAAA,CAAA,EAAA,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp2.js","names":[],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n size: 'default',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"input-otp2.js","names":[],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst size = useFormSize()\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":""}
@@ -21,7 +21,7 @@ declare function useInputTag({
21
21
  isFocused: _$vue.Ref<boolean, boolean>;
22
22
  isComposing: _$vue.Ref<boolean, boolean>;
23
23
  inputValue: _$vue.Ref<string | undefined, string | undefined>;
24
- size: _$vue.ComputedRef<"" | "default" | "large" | "small">;
24
+ size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
25
25
  tagSize: _$vue.ComputedRef<"default" | "small">;
26
26
  placeholder: _$vue.ComputedRef<string | undefined>;
27
27
  closable: _$vue.ComputedRef<boolean>;
@@ -127,7 +127,7 @@ declare const inputTagProps: {
127
127
  readonly max: NumberConstructor;
128
128
  readonly tagType: {
129
129
  readonly default: "info";
130
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
130
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "primary" | "success" | "info" | "warning" | "danger", unknown>>;
131
131
  readonly required: false;
132
132
  readonly validator: ((val: unknown) => boolean) | undefined;
133
133
  readonly __epPropKey: true;
@@ -138,7 +138,7 @@ declare const inputTagProps: {
138
138
  readonly draggable: BooleanConstructor;
139
139
  readonly delimiter: EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
140
140
  readonly size: {
141
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
141
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
142
142
  readonly required: false;
143
143
  readonly validator: ((val: unknown) => boolean) | undefined;
144
144
  __epPropKey: true;
@@ -25,37 +25,37 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
25
25
  blur: () => void;
26
26
  }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
27
27
  clear: () => void;
28
- focus: (evt: FocusEvent) => void;
29
- blur: (evt: FocusEvent) => void;
30
28
  "update:modelValue": (value?: string[] | undefined) => void;
31
- change: (value?: string[] | undefined) => void;
32
29
  input: (value: string) => void;
30
+ change: (value?: string[] | undefined) => void;
31
+ blur: (evt: FocusEvent) => void;
32
+ focus: (evt: FocusEvent) => void;
33
33
  "add-tag": (value: string | string[]) => void;
34
34
  "remove-tag": (value: string, index: number) => void;
35
35
  "drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
36
36
  }, string, _$vue.PublicProps, Readonly<InputTagProps> & Readonly<{
37
37
  onClear?: (() => any) | undefined;
38
- onFocus?: ((evt: FocusEvent) => any) | undefined;
39
- onBlur?: ((evt: FocusEvent) => any) | undefined;
40
38
  "onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
41
- onChange?: ((value?: string[] | undefined) => any) | undefined;
42
39
  onInput?: ((value: string) => any) | undefined;
40
+ onChange?: ((value?: string[] | undefined) => any) | undefined;
41
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
42
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
43
43
  "onAdd-tag"?: ((value: string | string[]) => any) | undefined;
44
44
  "onRemove-tag"?: ((value: string, index: number) => any) | undefined;
45
45
  "onDrag-tag"?: ((oldIndex: number, newIndex: number, value: string) => any) | undefined;
46
46
  }>, {
47
- id: string;
48
47
  disabled: boolean;
49
- effect: PopperEffect;
50
- clearIcon: IconPropType;
51
- saveOnBlur: boolean;
48
+ id: string;
52
49
  tabindex: string | number;
53
50
  validateEvent: boolean;
54
- autocomplete: string;
51
+ effect: PopperEffect;
55
52
  trigger: "Enter" | "Space";
53
+ autocomplete: string;
54
+ clearIcon: IconPropType;
56
55
  maxCollapseTags: number;
57
- tagType: "info" | "primary" | "success" | "warning" | "danger";
56
+ tagType: "primary" | "success" | "info" | "warning" | "danger";
58
57
  tagEffect: "dark" | "light" | "plain";
58
+ saveOnBlur: boolean;
59
59
  delimiter: string | RegExp;
60
60
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
61
61
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -35,7 +35,7 @@ interface LinkProps {
35
35
  * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
36
36
  */
37
37
  declare const linkProps: {
38
- readonly type: EpPropFinalized<StringConstructor, "default" | "info" | "primary" | "success" | "warning" | "danger", unknown, undefined, boolean>;
38
+ readonly type: EpPropFinalized<StringConstructor, "default" | "primary" | "success" | "info" | "warning" | "danger", unknown, undefined, boolean>;
39
39
  readonly underline: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
40
40
  readonly disabled: BooleanConstructor;
41
41
  readonly href: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -81,7 +81,7 @@ declare const mentionProps: {
81
81
  prefix: EpPropFinalized<(new (...args: any[]) => string | string[]) | (() => string | string[]) | (((new (...args: any[]) => string | string[]) | (() => string | string[])) | null)[], unknown, unknown, string, boolean>;
82
82
  split: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
83
83
  filterOption: EpPropFinalized<(new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (((new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean))) | null)[], unknown, unknown, () => <T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean, boolean>;
84
- placement: EpPropFinalized<(new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom") | (((new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom")) | null)[], unknown, unknown, string, boolean>;
84
+ placement: EpPropFinalized<(new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top") | (((new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top")) | null)[], unknown, unknown, string, boolean>;
85
85
  showArrow: BooleanConstructor;
86
86
  offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
87
87
  whole: BooleanConstructor;
@@ -198,12 +198,12 @@ declare const mentionProps: {
198
198
  popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
199
199
  popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
200
200
  props: EpPropFinalized<(new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps) | (((new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps)) | null)[], unknown, unknown, () => Required<MentionOptionProps>, boolean>;
201
- inputmode: EpPropFinalized<(new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal") | (() => "none" | "text" | "email" | "search" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
201
+ inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
202
202
  name: StringConstructor;
203
203
  ariaLabel: StringConstructor;
204
204
  id: EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
205
205
  size: {
206
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
206
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
207
207
  readonly required: false;
208
208
  readonly validator: ((val: unknown) => boolean) | undefined;
209
209
  __epPropKey: true;
@@ -224,7 +224,7 @@ declare const mentionProps: {
224
224
  };
225
225
  type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
226
226
  resize: {
227
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "horizontal" | "vertical" | "none" | "both", unknown>>;
227
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
228
228
  readonly required: false;
229
229
  readonly validator: ((val: unknown) => boolean) | undefined;
230
230
  __epPropKey: true;