@element-plus/nightly 0.0.20241128 → 0.0.20241130

Sign up to get free protection for your applications and to get access to all the features.
Files changed (439) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +907 -317
  4. package/dist/index.full.min.js +17 -17
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +14 -14
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +904 -318
  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/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/ms.js +1 -1
  154. package/dist/locale/ms.min.js +1 -1
  155. package/dist/locale/ms.min.mjs +1 -1
  156. package/dist/locale/ms.mjs +1 -1
  157. package/dist/locale/my.js +1 -1
  158. package/dist/locale/my.min.js +1 -1
  159. package/dist/locale/my.min.mjs +1 -1
  160. package/dist/locale/my.mjs +1 -1
  161. package/dist/locale/nb-no.js +1 -1
  162. package/dist/locale/nb-no.min.js +1 -1
  163. package/dist/locale/nb-no.min.mjs +1 -1
  164. package/dist/locale/nb-no.mjs +1 -1
  165. package/dist/locale/nl.js +1 -1
  166. package/dist/locale/nl.min.js +1 -1
  167. package/dist/locale/nl.min.mjs +1 -1
  168. package/dist/locale/nl.mjs +1 -1
  169. package/dist/locale/pa.js +1 -1
  170. package/dist/locale/pa.min.js +1 -1
  171. package/dist/locale/pa.min.mjs +1 -1
  172. package/dist/locale/pa.mjs +1 -1
  173. package/dist/locale/pl.js +1 -1
  174. package/dist/locale/pl.min.js +1 -1
  175. package/dist/locale/pl.min.mjs +1 -1
  176. package/dist/locale/pl.mjs +1 -1
  177. package/dist/locale/pt-br.js +1 -1
  178. package/dist/locale/pt-br.min.js +1 -1
  179. package/dist/locale/pt-br.min.mjs +1 -1
  180. package/dist/locale/pt-br.mjs +1 -1
  181. package/dist/locale/pt.js +1 -1
  182. package/dist/locale/pt.min.js +1 -1
  183. package/dist/locale/pt.min.mjs +1 -1
  184. package/dist/locale/pt.mjs +1 -1
  185. package/dist/locale/ro.js +1 -1
  186. package/dist/locale/ro.min.js +1 -1
  187. package/dist/locale/ro.min.mjs +1 -1
  188. package/dist/locale/ro.mjs +1 -1
  189. package/dist/locale/ru.js +1 -1
  190. package/dist/locale/ru.min.js +1 -1
  191. package/dist/locale/ru.min.mjs +1 -1
  192. package/dist/locale/ru.mjs +1 -1
  193. package/dist/locale/sk.js +1 -1
  194. package/dist/locale/sk.min.js +1 -1
  195. package/dist/locale/sk.min.mjs +1 -1
  196. package/dist/locale/sk.mjs +1 -1
  197. package/dist/locale/sl.js +1 -1
  198. package/dist/locale/sl.min.js +1 -1
  199. package/dist/locale/sl.min.mjs +1 -1
  200. package/dist/locale/sl.mjs +1 -1
  201. package/dist/locale/sr.js +1 -1
  202. package/dist/locale/sr.min.js +1 -1
  203. package/dist/locale/sr.min.mjs +1 -1
  204. package/dist/locale/sr.mjs +1 -1
  205. package/dist/locale/sv.js +1 -1
  206. package/dist/locale/sv.min.js +1 -1
  207. package/dist/locale/sv.min.mjs +1 -1
  208. package/dist/locale/sv.mjs +1 -1
  209. package/dist/locale/sw.js +1 -1
  210. package/dist/locale/sw.min.js +1 -1
  211. package/dist/locale/sw.min.mjs +1 -1
  212. package/dist/locale/sw.mjs +1 -1
  213. package/dist/locale/ta.js +1 -1
  214. package/dist/locale/ta.min.js +1 -1
  215. package/dist/locale/ta.min.mjs +1 -1
  216. package/dist/locale/ta.mjs +1 -1
  217. package/dist/locale/th.js +1 -1
  218. package/dist/locale/th.min.js +1 -1
  219. package/dist/locale/th.min.mjs +1 -1
  220. package/dist/locale/th.mjs +1 -1
  221. package/dist/locale/tk.js +1 -1
  222. package/dist/locale/tk.min.js +1 -1
  223. package/dist/locale/tk.min.mjs +1 -1
  224. package/dist/locale/tk.mjs +1 -1
  225. package/dist/locale/tr.js +1 -1
  226. package/dist/locale/tr.min.js +1 -1
  227. package/dist/locale/tr.min.mjs +1 -1
  228. package/dist/locale/tr.mjs +1 -1
  229. package/dist/locale/ug-cn.js +1 -1
  230. package/dist/locale/ug-cn.min.js +1 -1
  231. package/dist/locale/ug-cn.min.mjs +1 -1
  232. package/dist/locale/ug-cn.mjs +1 -1
  233. package/dist/locale/uk.js +1 -1
  234. package/dist/locale/uk.min.js +1 -1
  235. package/dist/locale/uk.min.mjs +1 -1
  236. package/dist/locale/uk.mjs +1 -1
  237. package/dist/locale/uz-uz.js +1 -1
  238. package/dist/locale/uz-uz.min.js +1 -1
  239. package/dist/locale/uz-uz.min.mjs +1 -1
  240. package/dist/locale/uz-uz.mjs +1 -1
  241. package/dist/locale/vi.js +1 -1
  242. package/dist/locale/vi.min.js +1 -1
  243. package/dist/locale/vi.min.mjs +1 -1
  244. package/dist/locale/vi.mjs +1 -1
  245. package/dist/locale/zh-cn.js +1 -1
  246. package/dist/locale/zh-cn.min.js +1 -1
  247. package/dist/locale/zh-cn.min.mjs +1 -1
  248. package/dist/locale/zh-cn.mjs +1 -1
  249. package/dist/locale/zh-tw.js +1 -1
  250. package/dist/locale/zh-tw.min.js +1 -1
  251. package/dist/locale/zh-tw.min.mjs +1 -1
  252. package/dist/locale/zh-tw.mjs +1 -1
  253. package/es/component.mjs +2 -0
  254. package/es/component.mjs.map +1 -1
  255. package/es/components/alert/index.mjs +2 -2
  256. package/es/components/alert/src/alert.mjs +36 -95
  257. package/es/components/alert/src/alert.mjs.map +1 -1
  258. package/es/components/alert/src/alert2.mjs +95 -36
  259. package/es/components/alert/src/alert2.mjs.map +1 -1
  260. package/es/components/carousel/index.mjs +2 -2
  261. package/es/components/carousel/src/carousel-item.mjs +69 -7
  262. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  263. package/es/components/carousel/src/carousel-item2.mjs +7 -69
  264. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  265. package/es/components/dialog/src/dialog-content.mjs +87 -26
  266. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  267. package/es/components/dialog/src/dialog-content2.mjs +26 -87
  268. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  269. package/es/components/dialog/src/dialog.mjs +1 -1
  270. package/es/components/dialog/src/dialog2.mjs +1 -1
  271. package/es/components/index.d.ts +1 -0
  272. package/es/components/index.mjs +6 -4
  273. package/es/components/index.mjs.map +1 -1
  274. package/es/components/input-number/src/input-number2.mjs +2 -1
  275. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  276. package/es/components/input-tag/index.d.ts +6 -0
  277. package/es/components/input-tag/index.mjs +8 -0
  278. package/es/components/input-tag/index.mjs.map +1 -0
  279. package/es/components/input-tag/src/composables/index.d.ts +4 -0
  280. package/es/components/input-tag/src/composables/index.mjs +5 -0
  281. package/es/components/input-tag/src/composables/index.mjs.map +1 -0
  282. package/es/components/input-tag/src/composables/use-drag-tag.d.ts +15 -0
  283. package/es/components/input-tag/src/composables/use-drag-tag.mjs +92 -0
  284. package/es/components/input-tag/src/composables/use-drag-tag.mjs.map +1 -0
  285. package/es/components/input-tag/src/composables/use-hovering.d.ts +5 -0
  286. package/es/components/input-tag/src/composables/use-hovering.mjs +19 -0
  287. package/es/components/input-tag/src/composables/use-hovering.mjs.map +1 -0
  288. package/es/components/input-tag/src/composables/use-input-tag-dom.d.ts +58 -0
  289. package/es/components/input-tag/src/composables/use-input-tag-dom.mjs +57 -0
  290. package/es/components/input-tag/src/composables/use-input-tag-dom.mjs.map +1 -0
  291. package/es/components/input-tag/src/composables/use-input-tag.d.ts +33 -0
  292. package/es/components/input-tag/src/composables/use-input-tag.mjs +153 -0
  293. package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -0
  294. package/es/components/input-tag/src/input-tag.d.ts +60 -0
  295. package/es/components/input-tag/src/input-tag.mjs +219 -0
  296. package/es/components/input-tag/src/input-tag.mjs.map +1 -0
  297. package/es/components/input-tag/src/input-tag.vue.d.ts +142 -0
  298. package/es/components/input-tag/src/input-tag2.mjs +69 -0
  299. package/es/components/input-tag/src/input-tag2.mjs.map +1 -0
  300. package/es/components/input-tag/src/instance.d.ts +2 -0
  301. package/es/components/input-tag/src/instance.mjs +2 -0
  302. package/es/components/input-tag/src/instance.mjs.map +1 -0
  303. package/es/components/input-tag/style/css.d.ts +3 -0
  304. package/es/components/input-tag/style/css.mjs +4 -0
  305. package/es/components/input-tag/style/css.mjs.map +1 -0
  306. package/es/components/input-tag/style/index.d.ts +3 -0
  307. package/es/components/input-tag/style/index.mjs +4 -0
  308. package/es/components/input-tag/style/index.mjs.map +1 -0
  309. package/es/components/menu/index.mjs +2 -2
  310. package/es/components/menu/src/menu-item.mjs +14 -96
  311. package/es/components/menu/src/menu-item.mjs.map +1 -1
  312. package/es/components/menu/src/menu-item2.mjs +96 -14
  313. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  314. package/es/components/notification/src/notification.d.ts +12 -6
  315. package/es/components/notification/src/notification.mjs.map +1 -1
  316. package/es/components/notification/src/notify.mjs +5 -8
  317. package/es/components/notification/src/notify.mjs.map +1 -1
  318. package/es/components/time-picker/src/common/picker-range-trigger.mjs +1 -1
  319. package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
  320. package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs +3 -0
  321. package/es/components/time-picker/src/time-picker-com/panel-time-range.mjs.map +1 -1
  322. package/es/components/tour/index.mjs +2 -2
  323. package/es/components/tour/src/step.mjs +168 -44
  324. package/es/components/tour/src/step.mjs.map +1 -1
  325. package/es/components/tour/src/step2.mjs +44 -168
  326. package/es/components/tour/src/step2.mjs.map +1 -1
  327. package/es/directives/click-outside/index.mjs +1 -1
  328. package/es/hooks/index.d.ts +1 -0
  329. package/es/hooks/index.mjs +1 -0
  330. package/es/hooks/index.mjs.map +1 -1
  331. package/es/hooks/use-calc-input-width/index.d.ts +7 -0
  332. package/es/hooks/use-calc-input-width/index.mjs +24 -0
  333. package/es/hooks/use-calc-input-width/index.mjs.map +1 -0
  334. package/es/hooks/use-focus-controller/index.mjs +1 -1
  335. package/es/hooks/use-lockscreen/index.mjs +1 -1
  336. package/es/index.mjs +7 -4
  337. package/es/index.mjs.map +1 -1
  338. package/es/version.d.ts +1 -1
  339. package/es/version.mjs +1 -1
  340. package/es/version.mjs.map +1 -1
  341. package/global.d.ts +1 -0
  342. package/lib/component.js +98 -96
  343. package/lib/component.js.map +1 -1
  344. package/lib/components/alert/index.js +2 -2
  345. package/lib/components/alert/src/alert.js +37 -94
  346. package/lib/components/alert/src/alert.js.map +1 -1
  347. package/lib/components/alert/src/alert2.js +94 -37
  348. package/lib/components/alert/src/alert2.js.map +1 -1
  349. package/lib/components/carousel/index.js +2 -2
  350. package/lib/components/carousel/src/carousel-item.js +69 -7
  351. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  352. package/lib/components/carousel/src/carousel-item2.js +7 -69
  353. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  354. package/lib/components/dialog/src/dialog-content.js +86 -26
  355. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  356. package/lib/components/dialog/src/dialog-content2.js +26 -86
  357. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  358. package/lib/components/dialog/src/dialog.js +1 -1
  359. package/lib/components/dialog/src/dialog2.js +1 -1
  360. package/lib/components/index.d.ts +1 -0
  361. package/lib/components/index.js +117 -112
  362. package/lib/components/index.js.map +1 -1
  363. package/lib/components/input-number/src/input-number2.js +2 -1
  364. package/lib/components/input-number/src/input-number2.js.map +1 -1
  365. package/lib/components/input-tag/index.d.ts +6 -0
  366. package/lib/components/input-tag/index.js +15 -0
  367. package/lib/components/input-tag/index.js.map +1 -0
  368. package/lib/components/input-tag/src/composables/index.d.ts +4 -0
  369. package/lib/components/input-tag/src/composables/index.js +16 -0
  370. package/lib/components/input-tag/src/composables/index.js.map +1 -0
  371. package/lib/components/input-tag/src/composables/use-drag-tag.d.ts +15 -0
  372. package/lib/components/input-tag/src/composables/use-drag-tag.js +96 -0
  373. package/lib/components/input-tag/src/composables/use-drag-tag.js.map +1 -0
  374. package/lib/components/input-tag/src/composables/use-hovering.d.ts +5 -0
  375. package/lib/components/input-tag/src/composables/use-hovering.js +23 -0
  376. package/lib/components/input-tag/src/composables/use-hovering.js.map +1 -0
  377. package/lib/components/input-tag/src/composables/use-input-tag-dom.d.ts +58 -0
  378. package/lib/components/input-tag/src/composables/use-input-tag-dom.js +61 -0
  379. package/lib/components/input-tag/src/composables/use-input-tag-dom.js.map +1 -0
  380. package/lib/components/input-tag/src/composables/use-input-tag.d.ts +33 -0
  381. package/lib/components/input-tag/src/composables/use-input-tag.js +157 -0
  382. package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -0
  383. package/lib/components/input-tag/src/input-tag.d.ts +60 -0
  384. package/lib/components/input-tag/src/input-tag.js +223 -0
  385. package/lib/components/input-tag/src/input-tag.js.map +1 -0
  386. package/lib/components/input-tag/src/input-tag.vue.d.ts +142 -0
  387. package/lib/components/input-tag/src/input-tag2.js +74 -0
  388. package/lib/components/input-tag/src/input-tag2.js.map +1 -0
  389. package/lib/components/input-tag/src/instance.d.ts +2 -0
  390. package/lib/components/input-tag/src/instance.js +3 -0
  391. package/lib/components/input-tag/src/instance.js.map +1 -0
  392. package/lib/components/input-tag/style/css.d.ts +3 -0
  393. package/lib/components/input-tag/style/css.js +7 -0
  394. package/lib/components/input-tag/style/css.js.map +1 -0
  395. package/lib/components/input-tag/style/index.d.ts +3 -0
  396. package/lib/components/input-tag/style/index.js +7 -0
  397. package/lib/components/input-tag/style/index.js.map +1 -0
  398. package/lib/components/menu/index.js +2 -2
  399. package/lib/components/menu/src/menu-item.js +15 -96
  400. package/lib/components/menu/src/menu-item.js.map +1 -1
  401. package/lib/components/menu/src/menu-item2.js +96 -15
  402. package/lib/components/menu/src/menu-item2.js.map +1 -1
  403. package/lib/components/notification/src/notification.d.ts +12 -6
  404. package/lib/components/notification/src/notification.js.map +1 -1
  405. package/lib/components/notification/src/notify.js +4 -7
  406. package/lib/components/notification/src/notify.js.map +1 -1
  407. package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
  408. package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
  409. package/lib/components/time-picker/src/time-picker-com/panel-time-range.js +3 -0
  410. package/lib/components/time-picker/src/time-picker-com/panel-time-range.js.map +1 -1
  411. package/lib/components/tour/index.js +2 -2
  412. package/lib/components/tour/src/step.js +167 -44
  413. package/lib/components/tour/src/step.js.map +1 -1
  414. package/lib/components/tour/src/step2.js +44 -167
  415. package/lib/components/tour/src/step2.js.map +1 -1
  416. package/lib/directives/click-outside/index.js +1 -1
  417. package/lib/hooks/index.d.ts +1 -0
  418. package/lib/hooks/index.js +96 -94
  419. package/lib/hooks/index.js.map +1 -1
  420. package/lib/hooks/use-calc-input-width/index.d.ts +7 -0
  421. package/lib/hooks/use-calc-input-width/index.js +28 -0
  422. package/lib/hooks/use-calc-input-width/index.js.map +1 -0
  423. package/lib/hooks/use-focus-controller/index.js +1 -1
  424. package/lib/hooks/use-lockscreen/index.js +1 -1
  425. package/lib/index.js +223 -216
  426. package/lib/index.js.map +1 -1
  427. package/lib/version.d.ts +1 -1
  428. package/lib/version.js +1 -1
  429. package/lib/version.js.map +1 -1
  430. package/package.json +2 -2
  431. package/tags.json +1 -1
  432. package/theme-chalk/el-form.css +1 -1
  433. package/theme-chalk/el-input-tag.css +1 -0
  434. package/theme-chalk/index.css +1 -1
  435. package/theme-chalk/src/common/var.scss +47 -0
  436. package/theme-chalk/src/form.scss +2 -1
  437. package/theme-chalk/src/index.scss +1 -0
  438. package/theme-chalk/src/input-tag.scss +215 -0
  439. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n <header\n ref=\"headerRef\"\n :class=\"[ns.e('header'), { 'show-close': showClose }]\"\n >\n <slot name=\"header\">\n <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.dialog.close')\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </header>\n <div :id=\"bodyId\" :class=\"ns.e('body')\">\n <slot />\n </div>\n <footer v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport { dialogContentEmits, dialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = defineProps(dialogContentProps)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst dialogKls = computed(() => [\n ns.b(),\n ns.is('fullscreen', props.fullscreen),\n ns.is('draggable', props.draggable),\n ns.is('align-center', props.alignCenter),\n { [ns.m('center')]: props.center },\n])\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => props.draggable)\nconst overflow = computed(() => props.overflow)\nconst { resetPosition } = useDraggable(\n dialogRef,\n headerRef,\n draggable,\n overflow\n)\n\nd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AAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAEA,QAAa,GAAA,EAAAC,KAAA,CAAA,iBAAA,CAAA;AAAA,QACX,KAAA,EAAAC,cAAA,CAAAD,KAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACD,KAAA,EAAAE,cAAA,CAAAF,KAAA,CAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n"],"names":[],"mappings":";;;AACY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
@@ -1,4 +1,4 @@
1
- import { dialogContentProps } from './dialog-content.mjs';
1
+ import { dialogContentProps } from './dialog-content2.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
4
4
  import { isBoolean } from '../../../utils/types.mjs';
@@ -2,7 +2,7 @@ import { defineComponent, useSlots, computed, ref, provide, openBlock, createBlo
2
2
  import { ElOverlay } from '../../overlay/index.mjs';
3
3
  import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
4
4
  import { ElTeleport } from '../../teleport/index.mjs';
5
- import ElDialogContent from './dialog-content2.mjs';
5
+ import ElDialogContent from './dialog-content.mjs';
6
6
  import { dialogInjectionKey } from './constants.mjs';
7
7
  import { dialogProps, dialogEmits } from './dialog.mjs';
8
8
  import { useDialog } from './use-dialog.mjs';
@@ -33,6 +33,7 @@ export * from './image';
33
33
  export * from './image-viewer';
34
34
  export * from './input';
35
35
  export * from './input-number';
36
+ export * from './input-tag';
36
37
  export * from './link';
37
38
  export * from './menu';
38
39
  export * from './overlay';
@@ -33,6 +33,7 @@ export { ElImage } from './image/index.mjs';
33
33
  export { ElImageViewer } from './image-viewer/index.mjs';
34
34
  export { ElInput } from './input/index.mjs';
35
35
  export { ElInputNumber } from './input-number/index.mjs';
36
+ export { ElInputTag } from './input-tag/index.mjs';
36
37
  export { ElLink } from './link/index.mjs';
37
38
  export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './menu/index.mjs';
38
39
  export { ElOverlay } from './overlay/index.mjs';
@@ -82,7 +83,7 @@ export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
82
83
  export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-size-grid.mjs';
83
84
  export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
84
85
  export { affixEmits, affixProps } from './affix/src/affix.mjs';
85
- export { alertEffects, alertEmits, alertProps } from './alert/src/alert2.mjs';
86
+ export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
86
87
  export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
87
88
  export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
88
89
  export { backtopEmits, backtopProps } from './backtop/src/backtop.mjs';
@@ -95,7 +96,7 @@ export { buttonGroupContextKey } from './button/src/constants.mjs';
95
96
  export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
96
97
  export { cardProps } from './card/src/card.mjs';
97
98
  export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
98
- export { carouselItemProps } from './carousel/src/carousel-item.mjs';
99
+ export { carouselItemProps } from './carousel/src/carousel-item2.mjs';
99
100
  export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
100
101
  export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
101
102
  export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
@@ -136,9 +137,10 @@ export { imageEmits, imageProps } from './image/src/image.mjs';
136
137
  export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-viewer.mjs';
137
138
  export { inputEmits, inputProps } from './input/src/input.mjs';
138
139
  export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
140
+ export { inputTagEmits, inputTagProps } from './input-tag/src/input-tag2.mjs';
139
141
  export { linkEmits, linkProps } from './link/src/link.mjs';
140
142
  export { menuEmits, menuProps } from './menu/src/menu.mjs';
141
- export { menuItemEmits, menuItemProps } from './menu/src/menu-item2.mjs';
143
+ export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
142
144
  export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
143
145
  export { subMenuProps } from './menu/src/sub-menu.mjs';
144
146
  export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
@@ -215,7 +217,7 @@ export { default as DynamicSizeList } from './virtual-list/src/components/dynami
215
217
  export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
216
218
  export { watermarkProps } from './watermark/src/watermark.mjs';
217
219
  export { tourEmits, tourProps } from './tour/src/tour.mjs';
218
- export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
220
+ export { tourStepEmits, tourStepProps } from './tour/src/step2.mjs';
219
221
  export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
220
222
  export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
221
223
  export { segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -14,6 +14,7 @@ import { debugWarn, throwError } from '../../../utils/error.mjs';
14
14
  import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
15
15
  import { UPDATE_MODEL_EVENT, INPUT_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
16
16
  import { isString } from '@vue/shared';
17
+ import { isFirefox } from '../../../utils/browser.mjs';
17
18
 
18
19
  const __default__ = defineComponent({
19
20
  name: "ElInputNumber"
@@ -197,7 +198,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
197
198
  const handleBlur = (event) => {
198
199
  var _a, _b;
199
200
  data.userInput = null;
200
- if (data.currentValue === null && ((_a = input.value) == null ? void 0 : _a.input)) {
201
+ if (isFirefox() && data.currentValue === null && ((_a = input.value) == null ? void 0 : _a.input)) {
201
202
  input.value.input.value = "";
202
203
  }
203
204
  emit("blur", event);
@@ -1 +1 @@
1
- {"version":3,"file":"input-number2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n debugWarn,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n if (oldVal === newVal && value) return\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;mCAqGc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQ,GAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAO,QAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAc,GAAA,QAAA,CAAA,MAAA,QAAA,CAAA,KAAA,CAAA,UAAA,CAAA,IAAA,KAAA,CAAA,UAAA,IAAA,KAAA,CAAA,GAAA,CAAA,CAAA;AAAA,IAAA,iBACH,GAAA,eAAqB,QAAA,CAAM,gBAAoB,CAAA,IAAA,KAAA,CAAA,UAAA,IAAA,KAAA,CAAA,GAAA,CAAA,CAAA;AAAA,IAChE,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA;AACA,MAAA,MAAoB,aAAA,GAAA,YAAA,CAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAAA,MAClB,gBAAe,CAAA,eAAqB,CAAA,EAAA;AAA0B,QAChE,IAAA,aAAA,G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,MAAM,IAAA,CAAA,QAAA,CAAA,UAAA,CAAA,IAAA,UAAA,IAAA,IAAA,EAAA;AAAA,QACR,IAAA,GAAA,GAAA,MAAA,CAAA,UAAA,CAAA,CAAA;AACA,QAAA,IAAA;AAA6B,UAC/B,GAAA,GAAA,IAAA,CAAA;AACA,SAAA;AAAoE,QACrE,IAAA,CAAA,kBAAA,EAAA,GAAA,CAAA,CAAA;AACD,OAAA;AACE,MAAM,UAAA,CAAA,gBAA0B,CAAA,OAAA,EAAA,WAAA,EAAA,EAAA,OAAA,EAAA,KAAA,EAAA,CAAA,CAAA;AAChC,KAAA,CAAA,CAAA;AAAsE,IACxE,SAAC,CAAA,MAAA;AACD,MAAa,IAAA,EAAA,EAAA,EAAA,CAAA;AAAA,MAAA,MAAA,UAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,MAEX,UAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,YAAA,CAAA,eAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,IAAA,CAAA,YAAA,KAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAEA,MAAA,CAAA;AAAA,MACD,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"input-number2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n debugWarn,\n isFirefox,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n if (oldVal === newVal && value) return\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // This is a Firefox-specific problem. When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (isFirefox() && data.currentValue === null && input.value?.input) {\n input.value.input.value = ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;mCAsGc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQ,GAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAO,QAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAc,GAAA,QAAA,CAAA,MAAA,QAAA,CAAA,KAAA,CAAA,UAAA,CAAA,IAAA,KAAA,CAAA,UAAA,IAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ import InputTag from './src/input-tag.vue';
2
+ import type { SFCWithInstall } from '@element-plus/nightly/es/utils';
3
+ export declare const ElInputTag: SFCWithInstall<typeof InputTag>;
4
+ export default ElInputTag;
5
+ export * from './src/input-tag';
6
+ export type { InputTagInstance } from './src/instance';
@@ -0,0 +1,8 @@
1
+ import InputTag from './src/input-tag.mjs';
2
+ export { inputTagEmits, inputTagProps } from './src/input-tag2.mjs';
3
+ import { withInstall } from '../../utils/vue/install.mjs';
4
+
5
+ const ElInputTag = withInstall(InputTag);
6
+
7
+ export { ElInputTag, ElInputTag as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/input-tag/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport InputTag from './src/input-tag.vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElInputTag: SFCWithInstall<typeof InputTag> = withInstall(InputTag)\nexport default ElInputTag\n\nexport * from './src/input-tag'\nexport type { InputTagInstance } from './src/instance'\n"],"names":[],"mappings":";;;;AAEY,MAAC,UAAU,GAAG,WAAW,CAAC,QAAQ;;;;"}
@@ -0,0 +1,4 @@
1
+ export * from './use-drag-tag';
2
+ export * from './use-hovering';
3
+ export * from './use-input-tag';
4
+ export * from './use-input-tag-dom';
@@ -0,0 +1,5 @@
1
+ export { useDragTag } from './use-drag-tag.mjs';
2
+ export { useHovering } from './use-hovering.mjs';
3
+ export { useInputTag } from './use-input-tag.mjs';
4
+ export { useInputTagDom } from './use-input-tag-dom.mjs';
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,15 @@
1
+ import { type ShallowRef } from 'vue';
2
+ type DropType = 'before' | 'after';
3
+ interface UseDragTagOptions {
4
+ wrapperRef: ShallowRef<HTMLElement | undefined>;
5
+ handleDragged: (draggingIndex: number, dropIndex: number, type: DropType) => void;
6
+ afterDragged?: () => void;
7
+ }
8
+ export declare function useDragTag({ wrapperRef, handleDragged, afterDragged, }: UseDragTagOptions): {
9
+ dropIndicatorRef: ShallowRef<HTMLElement | undefined>;
10
+ showDropIndicator: import("vue").Ref<boolean>;
11
+ handleDragStart: (event: DragEvent, index: number) => void;
12
+ handleDragOver: (event: DragEvent, index: number) => void;
13
+ handleDragEnd: (event: DragEvent) => void;
14
+ };
15
+ export {};
@@ -0,0 +1,92 @@
1
+ import { shallowRef, ref } from 'vue';
2
+ import { getStyle, setStyle } from '../../../../utils/dom/style.mjs';
3
+ import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
4
+ import { isUndefined } from '../../../../utils/types.mjs';
5
+
6
+ function useDragTag({
7
+ wrapperRef,
8
+ handleDragged,
9
+ afterDragged
10
+ }) {
11
+ const ns = useNamespace("input-tag");
12
+ const dropIndicatorRef = shallowRef();
13
+ const showDropIndicator = ref(false);
14
+ let draggingIndex;
15
+ let draggingTag;
16
+ let dropIndex;
17
+ let dropType;
18
+ function getTagClassName(index) {
19
+ return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`;
20
+ }
21
+ function handleDragStart(event, index) {
22
+ draggingIndex = index;
23
+ draggingTag = wrapperRef.value.querySelector(getTagClassName(index));
24
+ if (draggingTag) {
25
+ draggingTag.style.opacity = "0.5";
26
+ }
27
+ event.dataTransfer.effectAllowed = "move";
28
+ }
29
+ function handleDragOver(event, index) {
30
+ dropIndex = index;
31
+ event.preventDefault();
32
+ event.dataTransfer.dropEffect = "move";
33
+ if (isUndefined(draggingIndex) || draggingIndex === index) {
34
+ showDropIndicator.value = false;
35
+ return;
36
+ }
37
+ const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect();
38
+ const dropPrev = !(draggingIndex + 1 === index);
39
+ const dropNext = !(draggingIndex - 1 === index);
40
+ const distance = event.clientX - dropPosition.left;
41
+ const prevPercent = dropPrev ? dropNext ? 0.5 : 1 : -1;
42
+ const nextPercent = dropNext ? dropPrev ? 0.5 : 0 : 1;
43
+ if (distance <= dropPosition.width * prevPercent) {
44
+ dropType = "before";
45
+ } else if (distance > dropPosition.width * nextPercent) {
46
+ dropType = "after";
47
+ } else {
48
+ dropType = void 0;
49
+ }
50
+ const innerEl = wrapperRef.value.querySelector(`.${ns.e("inner")}`);
51
+ const innerPosition = innerEl.getBoundingClientRect();
52
+ const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2;
53
+ const indicatorTop = dropPosition.top - innerPosition.top;
54
+ let indicatorLeft = -9999;
55
+ if (dropType === "before") {
56
+ indicatorLeft = Math.max(dropPosition.left - innerPosition.left - gap, Math.floor(-gap / 2));
57
+ } else if (dropType === "after") {
58
+ const left = dropPosition.right - innerPosition.left;
59
+ indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap);
60
+ }
61
+ setStyle(dropIndicatorRef.value, {
62
+ top: `${indicatorTop}px`,
63
+ left: `${indicatorLeft}px`
64
+ });
65
+ showDropIndicator.value = !!dropType;
66
+ }
67
+ function handleDragEnd(event) {
68
+ event.preventDefault();
69
+ if (draggingTag) {
70
+ draggingTag.style.opacity = "";
71
+ }
72
+ if (dropType && !isUndefined(draggingIndex) && !isUndefined(dropIndex) && draggingIndex !== dropIndex) {
73
+ handleDragged(draggingIndex, dropIndex, dropType);
74
+ }
75
+ showDropIndicator.value = false;
76
+ draggingIndex = void 0;
77
+ draggingTag = null;
78
+ dropIndex = void 0;
79
+ dropType = void 0;
80
+ afterDragged == null ? void 0 : afterDragged();
81
+ }
82
+ return {
83
+ dropIndicatorRef,
84
+ showDropIndicator,
85
+ handleDragStart,
86
+ handleDragOver,
87
+ handleDragEnd
88
+ };
89
+ }
90
+
91
+ export { useDragTag };
92
+ //# sourceMappingURL=use-drag-tag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag-tag.mjs","sources":["../../../../../../../packages/components/input-tag/src/composables/use-drag-tag.ts"],"sourcesContent":["import { type ShallowRef, ref, shallowRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { getStyle, isUndefined, setStyle } from '@element-plus/utils'\n\ntype DropType = 'before' | 'after'\n\ninterface UseDragTagOptions {\n wrapperRef: ShallowRef<HTMLElement | undefined>\n handleDragged: (\n draggingIndex: number,\n dropIndex: number,\n type: DropType\n ) => void\n afterDragged?: () => void\n}\n\nexport function useDragTag({\n wrapperRef,\n handleDragged,\n afterDragged,\n}: UseDragTagOptions) {\n const ns = useNamespace('input-tag')\n const dropIndicatorRef = shallowRef<HTMLElement>()\n const showDropIndicator = ref(false)\n\n let draggingIndex: number | undefined\n let draggingTag: HTMLElement | null\n let dropIndex: number | undefined\n let dropType: DropType | undefined\n\n function getTagClassName(index: number) {\n return `.${ns.e('inner')} .${ns.namespace.value}-tag:nth-child(${\n index + 1\n })`\n }\n\n function handleDragStart(event: DragEvent, index: number) {\n draggingIndex = index\n draggingTag = wrapperRef.value!.querySelector<HTMLElement>(\n getTagClassName(index)\n )\n\n if (draggingTag) {\n draggingTag.style.opacity = '0.5'\n }\n event.dataTransfer!.effectAllowed = 'move'\n }\n\n function handleDragOver(event: DragEvent, index: number) {\n dropIndex = index\n event.preventDefault()\n event.dataTransfer!.dropEffect = 'move'\n\n if (isUndefined(draggingIndex) || draggingIndex === index) {\n showDropIndicator.value = false\n return\n }\n\n const dropPosition = wrapperRef\n .value!.querySelector<HTMLElement>(getTagClassName(index))!\n .getBoundingClientRect()\n const dropPrev = !(draggingIndex + 1 === index)\n const dropNext = !(draggingIndex - 1 === index)\n const distance = event.clientX - dropPosition.left\n const prevPercent = dropPrev ? (dropNext ? 0.5 : 1) : -1\n const nextPercent = dropNext ? (dropPrev ? 0.5 : 0) : 1\n\n if (distance <= dropPosition.width * prevPercent) {\n dropType = 'before'\n } else if (distance > dropPosition.width * nextPercent) {\n dropType = 'after'\n } else {\n dropType = undefined\n }\n\n const innerEl = wrapperRef.value!.querySelector<HTMLElement>(\n `.${ns.e('inner')}`\n )!\n const innerPosition = innerEl.getBoundingClientRect()\n const gap = Number.parseFloat(getStyle(innerEl, 'gap')) / 2\n\n const indicatorTop = dropPosition.top - innerPosition.top\n let indicatorLeft = -9999\n\n if (dropType === 'before') {\n indicatorLeft = Math.max(\n dropPosition.left - innerPosition.left - gap,\n Math.floor(-gap / 2)\n )\n } else if (dropType === 'after') {\n const left = dropPosition.right - innerPosition.left\n indicatorLeft =\n left + (innerPosition.width === left ? Math.floor(gap / 2) : gap)\n }\n\n setStyle(dropIndicatorRef.value!, {\n top: `${indicatorTop}px`,\n left: `${indicatorLeft}px`,\n })\n showDropIndicator.value = !!dropType\n }\n\n function handleDragEnd(event: DragEvent) {\n event.preventDefault()\n\n if (draggingTag) {\n draggingTag.style.opacity = ''\n }\n\n if (\n dropType &&\n !isUndefined(draggingIndex) &&\n !isUndefined(dropIndex) &&\n draggingIndex !== dropIndex\n ) {\n handleDragged(draggingIndex, dropIndex, dropType)\n }\n\n showDropIndicator.value = false\n draggingIndex = undefined\n draggingTag = null\n dropIndex = undefined\n dropType = undefined\n afterDragged?.()\n }\n\n return {\n dropIndicatorRef,\n showDropIndicator,\n handleDragStart,\n handleDragOver,\n handleDragEnd,\n }\n}\n"],"names":[],"mappings":";;;;;AAGO,SAAS,UAAU,CAAC;AAC3B,EAAE,UAAU;AACZ,EAAE,aAAa;AACf,EAAE,YAAY;AACd,CAAC,EAAE;AACH,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AACvC,EAAE,MAAM,gBAAgB,GAAG,UAAU,EAAE,CAAC;AACxC,EAAE,MAAM,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACvC,EAAE,IAAI,aAAa,CAAC;AACpB,EAAE,IAAI,WAAW,CAAC;AAClB,EAAE,IAAI,SAAS,CAAC;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AC,GAAG,YAAY,EAAE,CAAC;AACnD,GAAG;AACH,EAAE,OAAO;AACT,IAAI,gBAAgB;AACpB,IAAI,iBAAiB;AACrB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,5 @@
1
+ export declare function useHovering(): {
2
+ hovering: import("vue").Ref<boolean>;
3
+ handleMouseEnter: () => void;
4
+ handleMouseLeave: () => void;
5
+ };
@@ -0,0 +1,19 @@
1
+ import { ref } from 'vue';
2
+
3
+ function useHovering() {
4
+ const hovering = ref(false);
5
+ const handleMouseEnter = () => {
6
+ hovering.value = true;
7
+ };
8
+ const handleMouseLeave = () => {
9
+ hovering.value = false;
10
+ };
11
+ return {
12
+ hovering,
13
+ handleMouseEnter,
14
+ handleMouseLeave
15
+ };
16
+ }
17
+
18
+ export { useHovering };
19
+ //# sourceMappingURL=use-hovering.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-hovering.mjs","sources":["../../../../../../../packages/components/input-tag/src/composables/use-hovering.ts"],"sourcesContent":["import { ref } from 'vue'\n\nexport function useHovering() {\n const hovering = ref(false)\n\n const handleMouseEnter = () => {\n hovering.value = true\n }\n\n const handleMouseLeave = () => {\n hovering.value = false\n }\n\n return {\n hovering,\n handleMouseEnter,\n handleMouseLeave,\n }\n}\n"],"names":[],"mappings":";;AACO,SAAS,WAAW,GAAG;AAC9B,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,gBAAgB,GAAG,MAAM;AACjC,IAAI,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;AAC1B,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG,MAAM;AACjC,IAAI,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;AAC3B,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,58 @@
1
+ import type { ComputedRef, Ref, StyleValue } from 'vue';
2
+ import type { ComponentSize } from '@element-plus/nightly/es/constants';
3
+ import type { InputTagProps } from '../input-tag';
4
+ interface UseInputTagDomOptions {
5
+ props: InputTagProps;
6
+ isFocused: Ref<boolean>;
7
+ hovering: Ref<boolean>;
8
+ disabled: ComputedRef<boolean>;
9
+ inputValue: Ref<string | undefined>;
10
+ size: ComputedRef<ComponentSize>;
11
+ validateState: ComputedRef<string>;
12
+ validateIcon: ComputedRef<boolean>;
13
+ needStatusIcon: ComputedRef<boolean>;
14
+ }
15
+ export declare function useInputTagDom({ props, isFocused, hovering, disabled, inputValue, size, validateState, validateIcon, needStatusIcon, }: UseInputTagDomOptions): {
16
+ ns: {
17
+ namespace: ComputedRef<string>;
18
+ b: (blockSuffix?: string) => string;
19
+ e: (element?: string) => string;
20
+ m: (modifier?: string) => string;
21
+ be: (blockSuffix?: string, element?: string) => string;
22
+ em: (element?: string, modifier?: string) => string;
23
+ bm: (blockSuffix?: string, modifier?: string) => string;
24
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
25
+ is: {
26
+ (name: string, state: boolean | undefined): string;
27
+ (name: string): string;
28
+ };
29
+ cssVar: (object: Record<string, string>) => Record<string, string>;
30
+ cssVarName: (name: string) => string;
31
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
32
+ cssVarBlockName: (name: string) => string;
33
+ };
34
+ nsInput: {
35
+ namespace: ComputedRef<string>;
36
+ b: (blockSuffix?: string) => string;
37
+ e: (element?: string) => string;
38
+ m: (modifier?: string) => string;
39
+ be: (blockSuffix?: string, element?: string) => string;
40
+ em: (element?: string, modifier?: string) => string;
41
+ bm: (blockSuffix?: string, modifier?: string) => string;
42
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
43
+ is: {
44
+ (name: string, state: boolean | undefined): string;
45
+ (name: string): string;
46
+ };
47
+ cssVar: (object: Record<string, string>) => Record<string, string>;
48
+ cssVarName: (name: string) => string;
49
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
50
+ cssVarBlockName: (name: string) => string;
51
+ };
52
+ containerKls: ComputedRef<unknown[]>;
53
+ containerStyle: ComputedRef<StyleValue>;
54
+ innerKls: ComputedRef<string[]>;
55
+ showClear: ComputedRef<boolean | "" | 0 | undefined>;
56
+ showSuffix: ComputedRef<boolean | "" | import("vue").Slot>;
57
+ };
58
+ export {};
@@ -0,0 +1,57 @@
1
+ import { useAttrs, useSlots, computed } from 'vue';
2
+ import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
3
+
4
+ function useInputTagDom({
5
+ props,
6
+ isFocused,
7
+ hovering,
8
+ disabled,
9
+ inputValue,
10
+ size,
11
+ validateState,
12
+ validateIcon,
13
+ needStatusIcon
14
+ }) {
15
+ const attrs = useAttrs();
16
+ const slots = useSlots();
17
+ const ns = useNamespace("input-tag");
18
+ const nsInput = useNamespace("input");
19
+ const containerKls = computed(() => [
20
+ ns.b(),
21
+ ns.is("focused", isFocused.value),
22
+ ns.is("hovering", hovering.value),
23
+ ns.is("disabled", disabled.value),
24
+ ns.m(size.value),
25
+ ns.e("wrapper"),
26
+ attrs.class
27
+ ]);
28
+ const containerStyle = computed(() => [attrs.style]);
29
+ const innerKls = computed(() => {
30
+ var _a, _b;
31
+ return [
32
+ ns.e("inner"),
33
+ ns.is("draggable", props.draggable),
34
+ ns.is("left-space", !((_a = props.modelValue) == null ? void 0 : _a.length) && !slots.prefix),
35
+ ns.is("right-space", !((_b = props.modelValue) == null ? void 0 : _b.length) && !showSuffix.value)
36
+ ];
37
+ });
38
+ const showClear = computed(() => {
39
+ var _a;
40
+ return props.clearable && !disabled.value && !props.readonly && (((_a = props.modelValue) == null ? void 0 : _a.length) || inputValue.value) && (isFocused.value || hovering.value);
41
+ });
42
+ const showSuffix = computed(() => {
43
+ return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value;
44
+ });
45
+ return {
46
+ ns,
47
+ nsInput,
48
+ containerKls,
49
+ containerStyle,
50
+ innerKls,
51
+ showClear,
52
+ showSuffix
53
+ };
54
+ }
55
+
56
+ export { useInputTagDom };
57
+ //# sourceMappingURL=use-input-tag-dom.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-input-tag-dom.mjs","sources":["../../../../../../../packages/components/input-tag/src/composables/use-input-tag-dom.ts"],"sourcesContent":["import { computed, useAttrs, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { ComputedRef, Ref, StyleValue } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { InputTagProps } from '../input-tag'\n\ninterface UseInputTagDomOptions {\n props: InputTagProps\n isFocused: Ref<boolean>\n hovering: Ref<boolean>\n disabled: ComputedRef<boolean>\n inputValue: Ref<string | undefined>\n size: ComputedRef<ComponentSize>\n validateState: ComputedRef<string>\n validateIcon: ComputedRef<boolean>\n needStatusIcon: ComputedRef<boolean>\n}\n\nexport function useInputTagDom({\n props,\n isFocused,\n hovering,\n disabled,\n inputValue,\n size,\n validateState,\n validateIcon,\n needStatusIcon,\n}: UseInputTagDomOptions) {\n const attrs = useAttrs()\n const slots = useSlots()\n const ns = useNamespace('input-tag')\n const nsInput = useNamespace('input')\n\n const containerKls = computed(() => [\n ns.b(),\n ns.is('focused', isFocused.value),\n ns.is('hovering', hovering.value),\n ns.is('disabled', disabled.value),\n ns.m(size.value),\n ns.e('wrapper'),\n attrs.class,\n ])\n const containerStyle = computed<StyleValue>(() => [attrs.style as StyleValue])\n const innerKls = computed(() => [\n ns.e('inner'),\n ns.is('draggable', props.draggable),\n ns.is('left-space', !props.modelValue?.length && !slots.prefix),\n ns.is('right-space', !props.modelValue?.length && !showSuffix.value),\n ])\n const showClear = computed(() => {\n return (\n props.clearable &&\n !disabled.value &&\n !props.readonly &&\n (props.modelValue?.length || inputValue.value) &&\n (isFocused.value || hovering.value)\n )\n })\n const showSuffix = computed(() => {\n return (\n slots.suffix ||\n showClear.value ||\n (validateState.value && validateIcon.value && needStatusIcon.value)\n )\n })\n\n return {\n ns,\n nsInput,\n containerKls,\n containerStyle,\n innerKls,\n showClear,\n showSuffix,\n }\n}\n"],"names":[],"mappings":";;;AAEO,SAAS,cAAc,CAAC;AAC/B,EAAE,KAAK;AACP,EAAE,SAAS;AACX,EAAE,QAAQ;AACV,EAAE,QAAQ;AACV,EAAE,UAAU;AACZ,EAAE,IAAI;AACN,EAAE,aAAa;AACf,EAAE,YAAY;AACd,EAAE,cAAc;AAChB,CAAC,EAAE;AACH,EAAE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;AAC3B,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AACvC,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACxC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM;AACtC,IAAI,EAAE,CAAC,CAAC,EAAE;AACV,IAAI,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC;AACrC,IAAI,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC;AACrC,IAAI,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC;AACrC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AACpB,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnB,IAAI,KAAK,CAAC,KAAK;AACf,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACvD,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM;AAClC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,O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,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,33 @@
1
+ import { type EmitFn } from '@element-plus/nightly/es/utils';
2
+ import { type FormItemContext } from '@element-plus/nightly/es/components/form';
3
+ import type { InputTagEmits, InputTagProps } from '../input-tag';
4
+ interface UseInputTagOptions {
5
+ props: InputTagProps;
6
+ emit: EmitFn<InputTagEmits>;
7
+ formItem?: FormItemContext;
8
+ }
9
+ export declare function useInputTag({ props, emit, formItem }: UseInputTagOptions): {
10
+ inputRef: import("vue").ShallowRef<HTMLInputElement | undefined>;
11
+ wrapperRef: import("vue").ShallowRef<HTMLElement | undefined>;
12
+ isFocused: import("vue").Ref<boolean>;
13
+ isComposing: import("vue").Ref<boolean>;
14
+ inputValue: import("vue").Ref<string | undefined>;
15
+ size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
16
+ tagSize: import("vue").ComputedRef<"default" | "small">;
17
+ placeholder: import("vue").ComputedRef<string | undefined>;
18
+ closable: import("vue").ComputedRef<boolean>;
19
+ disabled: import("vue").ComputedRef<boolean>;
20
+ inputLimit: import("vue").ComputedRef<boolean>;
21
+ handleDragged: (draggingIndex: number, dropIndex: number, type: "before" | "after") => void;
22
+ handleInput: (event: Event) => void;
23
+ handleKeydown: (event: KeyboardEvent) => void;
24
+ handleAddTag: () => void;
25
+ handleRemoveTag: (index: number) => void;
26
+ handleClear: () => void;
27
+ handleCompositionStart: (event: CompositionEvent) => void;
28
+ handleCompositionUpdate: (event: CompositionEvent) => void;
29
+ handleCompositionEnd: (event: CompositionEvent) => void;
30
+ focus: () => void;
31
+ blur: () => void;
32
+ };
33
+ export {};