@element-plus/nightly 0.0.20250317 → 0.0.20250319

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 (920) hide show
  1. package/dist/index.full.js +29 -43
  2. package/dist/index.full.min.js +10 -10
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +10 -10
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +29 -43
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lt.js +1 -1
  140. package/dist/locale/lt.min.js +1 -1
  141. package/dist/locale/lt.min.mjs +1 -1
  142. package/dist/locale/lt.mjs +1 -1
  143. package/dist/locale/lv.js +1 -1
  144. package/dist/locale/lv.min.js +1 -1
  145. package/dist/locale/lv.min.mjs +1 -1
  146. package/dist/locale/lv.mjs +1 -1
  147. package/dist/locale/mg.js +1 -1
  148. package/dist/locale/mg.min.js +1 -1
  149. package/dist/locale/mg.min.mjs +1 -1
  150. package/dist/locale/mg.mjs +1 -1
  151. package/dist/locale/mn.js +1 -1
  152. package/dist/locale/mn.min.js +1 -1
  153. package/dist/locale/mn.min.mjs +1 -1
  154. package/dist/locale/mn.mjs +1 -1
  155. package/dist/locale/ms.js +2 -2
  156. package/dist/locale/ms.min.js +1 -1
  157. package/dist/locale/ms.min.js.map +1 -1
  158. package/dist/locale/ms.min.mjs +1 -1
  159. package/dist/locale/ms.min.mjs.map +1 -1
  160. package/dist/locale/ms.mjs +2 -2
  161. package/dist/locale/my.js +1 -1
  162. package/dist/locale/my.min.js +1 -1
  163. package/dist/locale/my.min.mjs +1 -1
  164. package/dist/locale/my.mjs +1 -1
  165. package/dist/locale/nb-no.js +1 -1
  166. package/dist/locale/nb-no.min.js +1 -1
  167. package/dist/locale/nb-no.min.mjs +1 -1
  168. package/dist/locale/nb-no.mjs +1 -1
  169. package/dist/locale/nl.js +1 -1
  170. package/dist/locale/nl.min.js +1 -1
  171. package/dist/locale/nl.min.mjs +1 -1
  172. package/dist/locale/nl.mjs +1 -1
  173. package/dist/locale/no.js +1 -1
  174. package/dist/locale/no.min.js +1 -1
  175. package/dist/locale/no.min.mjs +1 -1
  176. package/dist/locale/no.mjs +1 -1
  177. package/dist/locale/pa.js +1 -1
  178. package/dist/locale/pa.min.js +1 -1
  179. package/dist/locale/pa.min.mjs +1 -1
  180. package/dist/locale/pa.mjs +1 -1
  181. package/dist/locale/pl.js +1 -1
  182. package/dist/locale/pl.min.js +1 -1
  183. package/dist/locale/pl.min.mjs +1 -1
  184. package/dist/locale/pl.mjs +1 -1
  185. package/dist/locale/pt-br.js +1 -1
  186. package/dist/locale/pt-br.min.js +1 -1
  187. package/dist/locale/pt-br.min.mjs +1 -1
  188. package/dist/locale/pt-br.mjs +1 -1
  189. package/dist/locale/pt.js +1 -1
  190. package/dist/locale/pt.min.js +1 -1
  191. package/dist/locale/pt.min.mjs +1 -1
  192. package/dist/locale/pt.mjs +1 -1
  193. package/dist/locale/ro.js +1 -1
  194. package/dist/locale/ro.min.js +1 -1
  195. package/dist/locale/ro.min.mjs +1 -1
  196. package/dist/locale/ro.mjs +1 -1
  197. package/dist/locale/ru.js +1 -1
  198. package/dist/locale/ru.min.js +1 -1
  199. package/dist/locale/ru.min.mjs +1 -1
  200. package/dist/locale/ru.mjs +1 -1
  201. package/dist/locale/sk.js +1 -1
  202. package/dist/locale/sk.min.js +1 -1
  203. package/dist/locale/sk.min.mjs +1 -1
  204. package/dist/locale/sk.mjs +1 -1
  205. package/dist/locale/sl.js +1 -1
  206. package/dist/locale/sl.min.js +1 -1
  207. package/dist/locale/sl.min.mjs +1 -1
  208. package/dist/locale/sl.mjs +1 -1
  209. package/dist/locale/sr.js +1 -1
  210. package/dist/locale/sr.min.js +1 -1
  211. package/dist/locale/sr.min.mjs +1 -1
  212. package/dist/locale/sr.mjs +1 -1
  213. package/dist/locale/sv.js +1 -1
  214. package/dist/locale/sv.min.js +1 -1
  215. package/dist/locale/sv.min.mjs +1 -1
  216. package/dist/locale/sv.mjs +1 -1
  217. package/dist/locale/sw.js +1 -1
  218. package/dist/locale/sw.min.js +1 -1
  219. package/dist/locale/sw.min.mjs +1 -1
  220. package/dist/locale/sw.mjs +1 -1
  221. package/dist/locale/ta.js +1 -1
  222. package/dist/locale/ta.min.js +1 -1
  223. package/dist/locale/ta.min.mjs +1 -1
  224. package/dist/locale/ta.mjs +1 -1
  225. package/dist/locale/te.js +1 -1
  226. package/dist/locale/te.min.js +1 -1
  227. package/dist/locale/te.min.mjs +1 -1
  228. package/dist/locale/te.mjs +1 -1
  229. package/dist/locale/th.js +1 -1
  230. package/dist/locale/th.min.js +1 -1
  231. package/dist/locale/th.min.mjs +1 -1
  232. package/dist/locale/th.mjs +1 -1
  233. package/dist/locale/tk.js +1 -1
  234. package/dist/locale/tk.min.js +1 -1
  235. package/dist/locale/tk.min.mjs +1 -1
  236. package/dist/locale/tk.mjs +1 -1
  237. package/dist/locale/tr.js +1 -1
  238. package/dist/locale/tr.min.js +1 -1
  239. package/dist/locale/tr.min.mjs +1 -1
  240. package/dist/locale/tr.mjs +1 -1
  241. package/dist/locale/ug-cn.js +1 -1
  242. package/dist/locale/ug-cn.min.js +1 -1
  243. package/dist/locale/ug-cn.min.mjs +1 -1
  244. package/dist/locale/ug-cn.mjs +1 -1
  245. package/dist/locale/uk.js +1 -1
  246. package/dist/locale/uk.min.js +1 -1
  247. package/dist/locale/uk.min.mjs +1 -1
  248. package/dist/locale/uk.mjs +1 -1
  249. package/dist/locale/uz-uz.js +1 -1
  250. package/dist/locale/uz-uz.min.js +1 -1
  251. package/dist/locale/uz-uz.min.mjs +1 -1
  252. package/dist/locale/uz-uz.mjs +1 -1
  253. package/dist/locale/vi.js +1 -1
  254. package/dist/locale/vi.min.js +1 -1
  255. package/dist/locale/vi.min.mjs +1 -1
  256. package/dist/locale/vi.mjs +1 -1
  257. package/dist/locale/zh-cn.js +1 -1
  258. package/dist/locale/zh-cn.min.js +1 -1
  259. package/dist/locale/zh-cn.min.mjs +1 -1
  260. package/dist/locale/zh-cn.mjs +1 -1
  261. package/dist/locale/zh-hk.js +1 -1
  262. package/dist/locale/zh-hk.min.js +1 -1
  263. package/dist/locale/zh-hk.min.mjs +1 -1
  264. package/dist/locale/zh-hk.mjs +1 -1
  265. package/dist/locale/zh-mo.js +1 -1
  266. package/dist/locale/zh-mo.min.js +1 -1
  267. package/dist/locale/zh-mo.min.mjs +1 -1
  268. package/dist/locale/zh-mo.mjs +1 -1
  269. package/dist/locale/zh-tw.js +1 -1
  270. package/dist/locale/zh-tw.min.js +1 -1
  271. package/dist/locale/zh-tw.min.mjs +1 -1
  272. package/dist/locale/zh-tw.mjs +1 -1
  273. package/es/components/affix/index.mjs +2 -2
  274. package/es/components/affix/src/affix.d.ts +1 -1
  275. package/es/components/affix/src/affix.mjs +119 -24
  276. package/es/components/affix/src/affix.mjs.map +1 -1
  277. package/es/components/affix/src/affix2.mjs +24 -119
  278. package/es/components/affix/src/affix2.mjs.map +1 -1
  279. package/es/components/alert/src/instance.d.ts +1 -1
  280. package/es/components/anchor/index.mjs +2 -2
  281. package/es/components/anchor/src/anchor.d.ts +1 -1
  282. package/es/components/anchor/src/anchor.mjs +42 -193
  283. package/es/components/anchor/src/anchor.mjs.map +1 -1
  284. package/es/components/anchor/src/anchor2.mjs +193 -42
  285. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  286. package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
  287. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  288. package/es/components/autocomplete/src/autocomplete.vue.d.ts +25 -13
  289. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  290. package/es/components/avatar/src/instance.d.ts +1 -1
  291. package/es/components/backtop/index.mjs +2 -2
  292. package/es/components/backtop/src/backtop.mjs +53 -21
  293. package/es/components/backtop/src/backtop.mjs.map +1 -1
  294. package/es/components/backtop/src/backtop2.mjs +21 -53
  295. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  296. package/es/components/backtop/src/instance.d.ts +1 -1
  297. package/es/components/badge/src/instance.d.ts +1 -1
  298. package/es/components/breadcrumb/src/instances.d.ts +2 -2
  299. package/es/components/button/src/button.vue.d.ts +2 -2
  300. package/es/components/button/src/instance.d.ts +2 -2
  301. package/es/components/calendar/src/instance.d.ts +2 -2
  302. package/es/components/card/src/instance.d.ts +1 -1
  303. package/es/components/carousel/src/instance.d.ts +2 -2
  304. package/es/components/cascader/src/cascader.d.ts +1 -1
  305. package/es/components/cascader/src/cascader.vue.d.ts +6 -393
  306. package/es/components/cascader/src/instances.d.ts +1 -1
  307. package/es/components/cascader-panel/src/instance.d.ts +1 -1
  308. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  309. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  310. package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
  311. package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
  312. package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  313. package/es/components/checkbox/src/checkbox.d.ts +1 -1
  314. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  315. package/es/components/col/src/col.d.ts +1 -1
  316. package/es/components/col/src/col.mjs.map +1 -1
  317. package/es/components/collapse/src/collapse-item.vue.d.ts +3 -3
  318. package/es/components/collapse/src/instance.d.ts +2 -2
  319. package/es/components/color-picker/src/color-picker.d.ts +1 -1
  320. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  321. package/es/components/config-provider/src/config-provider.d.ts +3 -3
  322. package/es/components/config-provider/src/config-provider.mjs.map +1 -1
  323. package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  324. package/es/components/container/index.d.ts +5 -5
  325. package/es/components/container/index.mjs.map +1 -1
  326. package/es/components/countdown/src/countdown.d.ts +1 -1
  327. package/es/components/countdown/src/countdown.mjs.map +1 -1
  328. package/es/components/date-picker/src/date-picker.d.ts +9 -9
  329. package/es/components/date-picker/src/panel-utils.d.ts +34 -34
  330. package/es/components/date-picker/src/props/date-picker.d.ts +3 -3
  331. package/es/components/descriptions/src/description.d.ts +1 -1
  332. package/es/components/descriptions/src/description.mjs.map +1 -1
  333. package/es/components/descriptions/src/description2.mjs +1 -1
  334. package/es/components/descriptions/src/descriptions-row.mjs +63 -6
  335. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  336. package/es/components/descriptions/src/descriptions-row.vue.d.ts +3 -3
  337. package/es/components/descriptions/src/descriptions-row2.mjs +6 -63
  338. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  339. package/es/components/dialog/src/dialog.d.ts +1 -1
  340. package/es/components/dialog/src/dialog.mjs.map +1 -1
  341. package/es/components/dialog/src/dialog.vue.d.ts +32 -32
  342. package/es/components/divider/src/divider.d.ts +1 -1
  343. package/es/components/divider/src/divider.mjs.map +1 -1
  344. package/es/components/dropdown/src/dropdown.vue.d.ts +11 -1094
  345. package/es/components/dropdown/src/instance.d.ts +1 -1
  346. package/es/components/dropdown/src/tokens.d.ts +1 -1
  347. package/es/components/dropdown/src/tokens.mjs.map +1 -1
  348. package/es/components/empty/src/img-empty.mjs +4 -27
  349. package/es/components/empty/src/img-empty.mjs.map +1 -1
  350. package/es/components/empty/src/instance.d.ts +1 -1
  351. package/es/components/form/index.d.ts +2 -2
  352. package/es/components/form/index.mjs.map +1 -1
  353. package/es/components/icon/src/icon.d.ts +1 -1
  354. package/es/components/icon/src/icon.mjs.map +1 -1
  355. package/es/components/image/src/image.d.ts +1 -1
  356. package/es/components/image/src/image.mjs.map +1 -1
  357. package/es/components/image/src/image.vue.d.ts +1 -0
  358. package/es/components/image-viewer/src/image-viewer.d.ts +1 -1
  359. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  360. package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -0
  361. package/es/components/image-viewer/src/image-viewer2.mjs +2 -1
  362. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  363. package/es/components/index.mjs +11 -11
  364. package/es/components/input/src/instance.d.ts +1 -1
  365. package/es/components/input-number/src/input-number.d.ts +1 -1
  366. package/es/components/input-number/src/input-number.mjs.map +1 -1
  367. package/es/components/input-tag/src/instance.d.ts +1 -1
  368. package/es/components/link/src/link.d.ts +1 -1
  369. package/es/components/link/src/link.mjs.map +1 -1
  370. package/es/components/mention/src/mention.d.ts +1 -1
  371. package/es/components/mention/src/mention.mjs.map +1 -1
  372. package/es/components/mention/src/mention.vue.d.ts +4 -4
  373. package/es/components/mention/src/mention2.mjs.map +1 -1
  374. package/es/components/menu/src/instance.d.ts +3 -3
  375. package/es/components/message/index.mjs +1 -1
  376. package/es/components/message/src/message.d.ts +1 -1
  377. package/es/components/message/src/message.mjs +145 -91
  378. package/es/components/message/src/message.mjs.map +1 -1
  379. package/es/components/message/src/message.vue.d.ts +1 -1
  380. package/es/components/message/src/message2.mjs +91 -145
  381. package/es/components/message/src/message2.mjs.map +1 -1
  382. package/es/components/message/src/method.mjs +2 -2
  383. package/es/components/notification/src/notification.d.ts +1 -1
  384. package/es/components/notification/src/notification.mjs.map +1 -1
  385. package/es/components/page-header/src/page-header.d.ts +1 -1
  386. package/es/components/page-header/src/page-header.mjs.map +1 -1
  387. package/es/components/pagination/src/components/jumper.d.ts +1 -1
  388. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  389. package/es/components/pagination/src/components/next.d.ts +1 -1
  390. package/es/components/pagination/src/components/next.mjs.map +1 -1
  391. package/es/components/pagination/src/components/pager.d.ts +1 -1
  392. package/es/components/pagination/src/components/pager.mjs +16 -210
  393. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  394. package/es/components/pagination/src/components/pager2.mjs +210 -16
  395. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  396. package/es/components/pagination/src/components/prev.d.ts +1 -1
  397. package/es/components/pagination/src/components/prev.mjs.map +1 -1
  398. package/es/components/pagination/src/components/sizes.d.ts +1 -1
  399. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  400. package/es/components/pagination/src/components/total.d.ts +1 -1
  401. package/es/components/pagination/src/components/total.mjs.map +1 -1
  402. package/es/components/pagination/src/pagination.mjs +1 -1
  403. package/es/components/popconfirm/index.mjs +2 -2
  404. package/es/components/popconfirm/src/popconfirm.d.ts +1 -1
  405. package/es/components/popconfirm/src/popconfirm.mjs +45 -114
  406. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  407. package/es/components/popconfirm/src/popconfirm2.mjs +114 -45
  408. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  409. package/es/components/popover/src/popover.d.ts +4 -4
  410. package/es/components/popover/src/popover.mjs.map +1 -1
  411. package/es/components/popover/src/popover.vue.d.ts +10 -71
  412. package/es/components/popper/src/arrow.d.ts +1 -1
  413. package/es/components/popper/src/arrow.mjs.map +1 -1
  414. package/es/components/popper/src/content.d.ts +1 -1
  415. package/es/components/popper/src/content.mjs.map +1 -1
  416. package/es/components/popper/src/content.vue.d.ts +12 -12
  417. package/es/components/popper/src/popper.d.ts +1 -1
  418. package/es/components/popper/src/popper.mjs.map +1 -1
  419. package/es/components/popper/src/trigger.d.ts +1 -1
  420. package/es/components/popper/src/trigger.mjs.map +1 -1
  421. package/es/components/progress/src/progress.d.ts +1 -1
  422. package/es/components/progress/src/progress.mjs.map +1 -1
  423. package/es/components/radio/src/radio-button.d.ts +1 -1
  424. package/es/components/radio/src/radio-button.mjs.map +1 -1
  425. package/es/components/radio/src/radio-group.d.ts +1 -1
  426. package/es/components/radio/src/radio-group.mjs.map +1 -1
  427. package/es/components/radio/src/radio.d.ts +1 -1
  428. package/es/components/radio/src/radio.mjs.map +1 -1
  429. package/es/components/rate/index.mjs +2 -2
  430. package/es/components/rate/src/rate.d.ts +1 -1
  431. package/es/components/rate/src/rate.mjs +258 -83
  432. package/es/components/rate/src/rate.mjs.map +1 -1
  433. package/es/components/rate/src/rate2.mjs +83 -258
  434. package/es/components/rate/src/rate2.mjs.map +1 -1
  435. package/es/components/result/src/result.d.ts +1 -1
  436. package/es/components/result/src/result.mjs.map +1 -1
  437. package/es/components/row/src/row.d.ts +1 -1
  438. package/es/components/row/src/row.mjs.map +1 -1
  439. package/es/components/scrollbar/src/bar.d.ts +1 -1
  440. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  441. package/es/components/scrollbar/src/scrollbar.d.ts +1 -1
  442. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  443. package/es/components/scrollbar/src/thumb.d.ts +1 -1
  444. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  445. package/es/components/segmented/src/segmented.d.ts +1 -1
  446. package/es/components/segmented/src/segmented.mjs.map +1 -1
  447. package/es/components/select/index.mjs +1 -1
  448. package/es/components/select/src/select.mjs +113 -429
  449. package/es/components/select/src/select.mjs.map +1 -1
  450. package/es/components/select/src/select.vue.d.ts +121 -71
  451. package/es/components/select/src/select2.mjs +429 -113
  452. package/es/components/select/src/select2.mjs.map +1 -1
  453. package/es/components/select/src/useSelect.d.ts +110 -63
  454. package/es/components/select/src/useSelect.mjs.map +1 -1
  455. package/es/components/select-v2/src/select.vue.d.ts +64 -25
  456. package/es/components/select-v2/src/useSelect.d.ts +86 -50
  457. package/es/components/select-v2/src/useSelect.mjs +7 -1
  458. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  459. package/es/components/skeleton/index.mjs +2 -2
  460. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  461. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  462. package/es/components/skeleton/src/skeleton.d.ts +1 -1
  463. package/es/components/skeleton/src/skeleton.mjs +21 -48
  464. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  465. package/es/components/skeleton/src/skeleton2.mjs +48 -21
  466. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  467. package/es/components/slider/src/button.mjs +91 -19
  468. package/es/components/slider/src/button.mjs.map +1 -1
  469. package/es/components/slider/src/button.vue.d.ts +3 -3
  470. package/es/components/slider/src/button2.mjs +19 -91
  471. package/es/components/slider/src/button2.mjs.map +1 -1
  472. package/es/components/slider/src/composables/use-slider-button.d.ts +5 -9
  473. package/es/components/slider/src/composables/use-slider-button.mjs.map +1 -1
  474. package/es/components/slider/src/slider.d.ts +1 -1
  475. package/es/components/slider/src/slider.mjs.map +1 -1
  476. package/es/components/slider/src/slider.vue.d.ts +3 -3
  477. package/es/components/slider/src/slider2.mjs +1 -1
  478. package/es/components/space/src/item.d.ts +1 -1
  479. package/es/components/space/src/item.mjs.map +1 -1
  480. package/es/components/space/src/space.d.ts +1 -1
  481. package/es/components/space/src/space.mjs.map +1 -1
  482. package/es/components/statistic/src/statistic.d.ts +1 -1
  483. package/es/components/statistic/src/statistic.mjs.map +1 -1
  484. package/es/components/steps/index.mjs +2 -2
  485. package/es/components/steps/src/item.d.ts +1 -1
  486. package/es/components/steps/src/item.mjs +190 -19
  487. package/es/components/steps/src/item.mjs.map +1 -1
  488. package/es/components/steps/src/item2.mjs +19 -190
  489. package/es/components/steps/src/item2.mjs.map +1 -1
  490. package/es/components/steps/src/steps.d.ts +1 -1
  491. package/es/components/steps/src/steps.mjs.map +1 -1
  492. package/es/components/switch/src/switch.d.ts +1 -1
  493. package/es/components/switch/src/switch.mjs.map +1 -1
  494. package/es/components/table/index.d.ts +2 -2
  495. package/es/components/table/index.mjs.map +1 -1
  496. package/es/components/table/src/filter-panel.mjs.map +1 -1
  497. package/es/components/table/src/filter-panel.vue.d.ts +2 -1085
  498. package/es/components/table/src/table-body/index.d.ts +1 -1
  499. package/es/components/table/src/table-column/index.d.ts +1 -1
  500. package/es/components/table/src/table-column/index.mjs +1 -1
  501. package/es/components/table/src/table-column/index.mjs.map +1 -1
  502. package/es/components/table-v2/src/table-v2.d.ts +12 -12
  503. package/es/components/table-v2/src/use-table.d.ts +4 -4
  504. package/es/components/tabs/src/tab-bar.d.ts +1 -1
  505. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  506. package/es/components/tabs/src/tab-pane.d.ts +1 -1
  507. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  508. package/es/components/tag/src/tag.d.ts +1 -1
  509. package/es/components/tag/src/tag.mjs.map +1 -1
  510. package/es/components/teleport/src/teleport.d.ts +1 -1
  511. package/es/components/teleport/src/teleport.mjs.map +1 -1
  512. package/es/components/time-picker/src/props/basic-time-spinner.d.ts +3 -3
  513. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +15 -13
  514. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs.map +1 -1
  515. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
  516. package/es/components/time-picker/src/time-picker.d.ts +9 -9
  517. package/es/components/time-select/src/time-select.d.ts +1 -1
  518. package/es/components/time-select/src/time-select.mjs.map +1 -1
  519. package/es/components/time-select/src/time-select.vue.d.ts +3 -3
  520. package/es/components/timeline/src/timeline-item.d.ts +1 -1
  521. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  522. package/es/components/timeline/src/timeline.d.ts +1 -1
  523. package/es/components/timeline/src/timeline.mjs.map +1 -1
  524. package/es/components/tooltip/src/content.d.ts +1 -1
  525. package/es/components/tooltip/src/content.mjs.map +1 -1
  526. package/es/components/tooltip/src/content.vue.d.ts +2 -847
  527. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  528. package/es/components/tooltip/src/tooltip.mjs.map +1 -1
  529. package/es/components/tooltip/src/tooltip.vue.d.ts +27 -7
  530. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  531. package/es/components/tooltip-v2/index.mjs +1 -1
  532. package/es/components/tooltip-v2/src/content.vue.d.ts +3 -3
  533. package/es/components/tooltip-v2/src/tooltip.d.ts +1 -1
  534. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  535. package/es/components/tooltip-v2/src/tooltip.vue.d.ts +3 -3
  536. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  537. package/es/components/tooltip-v2/src/trigger.mjs +89 -12
  538. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  539. package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
  540. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  541. package/es/components/tour/index.mjs +1 -1
  542. package/es/components/tour/src/content.mjs +43 -67
  543. package/es/components/tour/src/content.mjs.map +1 -1
  544. package/es/components/tour/src/content2.mjs +67 -43
  545. package/es/components/tour/src/content2.mjs.map +1 -1
  546. package/es/components/tour/src/step.mjs +1 -1
  547. package/es/components/tour/src/tour.d.ts +1 -1
  548. package/es/components/tour/src/tour.mjs +1 -1
  549. package/es/components/tour/src/tour.mjs.map +1 -1
  550. package/es/components/tour/src/tour.vue.d.ts +8 -8
  551. package/es/components/tour/src/tour2.mjs +1 -1
  552. package/es/components/transfer/src/transfer-panel.d.ts +1 -1
  553. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  554. package/es/components/transfer/src/transfer-panel.vue.d.ts +18 -18
  555. package/es/components/transfer/src/transfer.d.ts +1 -1
  556. package/es/components/transfer/src/transfer.mjs.map +1 -1
  557. package/es/components/transfer/src/transfer.vue.d.ts +5 -3
  558. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  559. package/es/components/tree/src/instance.d.ts +1 -1
  560. package/es/components/tree-v2/src/tree.vue.d.ts +17 -17
  561. package/es/components/upload/index.mjs +1 -1
  562. package/es/components/upload/src/upload-content.d.ts +1 -1
  563. package/es/components/upload/src/upload-content.mjs +33 -196
  564. package/es/components/upload/src/upload-content.mjs.map +1 -1
  565. package/es/components/upload/src/upload-content2.mjs +196 -33
  566. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  567. package/es/components/upload/src/upload-dragger.d.ts +1 -1
  568. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  569. package/es/components/upload/src/upload-list.d.ts +1 -1
  570. package/es/components/upload/src/upload-list.mjs.map +1 -1
  571. package/es/components/upload/src/upload.d.ts +1 -1
  572. package/es/components/upload/src/upload.mjs.map +1 -1
  573. package/es/components/upload/src/upload2.mjs +1 -1
  574. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
  575. package/es/components/virtual-list/src/components/dynamic-size-list.mjs.map +1 -1
  576. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +13 -13
  577. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  578. package/es/components/virtual-list/src/components/fixed-size-list.mjs.map +1 -1
  579. package/es/components/watermark/index.mjs +2 -2
  580. package/es/components/watermark/src/watermark.d.ts +1 -1
  581. package/es/components/watermark/src/watermark.mjs +210 -27
  582. package/es/components/watermark/src/watermark.mjs.map +1 -1
  583. package/es/components/watermark/src/watermark2.mjs +27 -210
  584. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  585. package/es/defaults.d.ts +1 -1
  586. package/es/directives/click-outside/index.mjs +1 -1
  587. package/es/hooks/use-focus-controller/index.mjs +1 -1
  588. package/es/hooks/use-lockscreen/index.mjs +1 -1
  589. package/es/index.d.ts +1 -1
  590. package/es/index.mjs +11 -11
  591. package/es/locale/lang/ms.mjs +1 -1
  592. package/es/locale/lang/ms.mjs.map +1 -1
  593. package/es/version.d.ts +1 -1
  594. package/es/version.mjs +1 -1
  595. package/es/version.mjs.map +1 -1
  596. package/lib/components/affix/index.js +2 -2
  597. package/lib/components/affix/src/affix.d.ts +1 -1
  598. package/lib/components/affix/src/affix.js +119 -25
  599. package/lib/components/affix/src/affix.js.map +1 -1
  600. package/lib/components/affix/src/affix2.js +25 -119
  601. package/lib/components/affix/src/affix2.js.map +1 -1
  602. package/lib/components/alert/src/instance.d.ts +1 -1
  603. package/lib/components/anchor/index.js +2 -2
  604. package/lib/components/anchor/src/anchor.d.ts +1 -1
  605. package/lib/components/anchor/src/anchor.js +42 -192
  606. package/lib/components/anchor/src/anchor.js.map +1 -1
  607. package/lib/components/anchor/src/anchor2.js +192 -42
  608. package/lib/components/anchor/src/anchor2.js.map +1 -1
  609. package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
  610. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  611. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +25 -13
  612. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  613. package/lib/components/avatar/src/instance.d.ts +1 -1
  614. package/lib/components/backtop/index.js +2 -2
  615. package/lib/components/backtop/src/backtop.js +53 -22
  616. package/lib/components/backtop/src/backtop.js.map +1 -1
  617. package/lib/components/backtop/src/backtop2.js +22 -53
  618. package/lib/components/backtop/src/backtop2.js.map +1 -1
  619. package/lib/components/backtop/src/instance.d.ts +1 -1
  620. package/lib/components/badge/src/instance.d.ts +1 -1
  621. package/lib/components/breadcrumb/src/instances.d.ts +2 -2
  622. package/lib/components/button/src/button.vue.d.ts +2 -2
  623. package/lib/components/button/src/instance.d.ts +2 -2
  624. package/lib/components/calendar/src/instance.d.ts +2 -2
  625. package/lib/components/card/src/instance.d.ts +1 -1
  626. package/lib/components/carousel/src/instance.d.ts +2 -2
  627. package/lib/components/cascader/src/cascader.d.ts +1 -1
  628. package/lib/components/cascader/src/cascader.vue.d.ts +6 -393
  629. package/lib/components/cascader/src/instances.d.ts +1 -1
  630. package/lib/components/cascader-panel/src/instance.d.ts +1 -1
  631. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  632. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  633. package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
  634. package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
  635. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  636. package/lib/components/checkbox/src/checkbox.d.ts +1 -1
  637. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  638. package/lib/components/col/src/col.d.ts +1 -1
  639. package/lib/components/col/src/col.js.map +1 -1
  640. package/lib/components/collapse/src/collapse-item.vue.d.ts +3 -3
  641. package/lib/components/collapse/src/instance.d.ts +2 -2
  642. package/lib/components/color-picker/src/color-picker.d.ts +1 -1
  643. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  644. package/lib/components/config-provider/src/config-provider.d.ts +3 -3
  645. package/lib/components/config-provider/src/config-provider.js.map +1 -1
  646. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  647. package/lib/components/container/index.d.ts +5 -5
  648. package/lib/components/container/index.js.map +1 -1
  649. package/lib/components/countdown/src/countdown.d.ts +1 -1
  650. package/lib/components/countdown/src/countdown.js.map +1 -1
  651. package/lib/components/date-picker/src/date-picker.d.ts +9 -9
  652. package/lib/components/date-picker/src/panel-utils.d.ts +34 -34
  653. package/lib/components/date-picker/src/props/date-picker.d.ts +3 -3
  654. package/lib/components/descriptions/src/description.d.ts +1 -1
  655. package/lib/components/descriptions/src/description.js.map +1 -1
  656. package/lib/components/descriptions/src/description2.js +1 -1
  657. package/lib/components/descriptions/src/descriptions-row.js +63 -6
  658. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  659. package/lib/components/descriptions/src/descriptions-row.vue.d.ts +3 -3
  660. package/lib/components/descriptions/src/descriptions-row2.js +6 -63
  661. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  662. package/lib/components/dialog/src/dialog.d.ts +1 -1
  663. package/lib/components/dialog/src/dialog.js.map +1 -1
  664. package/lib/components/dialog/src/dialog.vue.d.ts +32 -32
  665. package/lib/components/divider/src/divider.d.ts +1 -1
  666. package/lib/components/divider/src/divider.js.map +1 -1
  667. package/lib/components/dropdown/src/dropdown.vue.d.ts +11 -1094
  668. package/lib/components/dropdown/src/instance.d.ts +1 -1
  669. package/lib/components/dropdown/src/tokens.d.ts +1 -1
  670. package/lib/components/dropdown/src/tokens.js.map +1 -1
  671. package/lib/components/empty/src/img-empty.js +4 -27
  672. package/lib/components/empty/src/img-empty.js.map +1 -1
  673. package/lib/components/empty/src/instance.d.ts +1 -1
  674. package/lib/components/form/index.d.ts +2 -2
  675. package/lib/components/form/index.js.map +1 -1
  676. package/lib/components/icon/src/icon.d.ts +1 -1
  677. package/lib/components/icon/src/icon.js.map +1 -1
  678. package/lib/components/image/src/image.d.ts +1 -1
  679. package/lib/components/image/src/image.js.map +1 -1
  680. package/lib/components/image/src/image.vue.d.ts +1 -0
  681. package/lib/components/image-viewer/src/image-viewer.d.ts +1 -1
  682. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  683. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -0
  684. package/lib/components/image-viewer/src/image-viewer2.js +2 -1
  685. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  686. package/lib/components/index.js +11 -11
  687. package/lib/components/input/src/instance.d.ts +1 -1
  688. package/lib/components/input-number/src/input-number.d.ts +1 -1
  689. package/lib/components/input-number/src/input-number.js.map +1 -1
  690. package/lib/components/input-tag/src/instance.d.ts +1 -1
  691. package/lib/components/link/src/link.d.ts +1 -1
  692. package/lib/components/link/src/link.js.map +1 -1
  693. package/lib/components/mention/src/mention.d.ts +1 -1
  694. package/lib/components/mention/src/mention.js.map +1 -1
  695. package/lib/components/mention/src/mention.vue.d.ts +4 -4
  696. package/lib/components/mention/src/mention2.js.map +1 -1
  697. package/lib/components/menu/src/instance.d.ts +3 -3
  698. package/lib/components/message/index.js +1 -1
  699. package/lib/components/message/src/message.d.ts +1 -1
  700. package/lib/components/message/src/message.js +144 -93
  701. package/lib/components/message/src/message.js.map +1 -1
  702. package/lib/components/message/src/message.vue.d.ts +1 -1
  703. package/lib/components/message/src/message2.js +93 -144
  704. package/lib/components/message/src/message2.js.map +1 -1
  705. package/lib/components/message/src/method.js +2 -2
  706. package/lib/components/notification/src/notification.d.ts +1 -1
  707. package/lib/components/notification/src/notification.js.map +1 -1
  708. package/lib/components/page-header/src/page-header.d.ts +1 -1
  709. package/lib/components/page-header/src/page-header.js.map +1 -1
  710. package/lib/components/pagination/src/components/jumper.d.ts +1 -1
  711. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  712. package/lib/components/pagination/src/components/next.d.ts +1 -1
  713. package/lib/components/pagination/src/components/next.js.map +1 -1
  714. package/lib/components/pagination/src/components/pager.d.ts +1 -1
  715. package/lib/components/pagination/src/components/pager.js +16 -210
  716. package/lib/components/pagination/src/components/pager.js.map +1 -1
  717. package/lib/components/pagination/src/components/pager2.js +210 -16
  718. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  719. package/lib/components/pagination/src/components/prev.d.ts +1 -1
  720. package/lib/components/pagination/src/components/prev.js.map +1 -1
  721. package/lib/components/pagination/src/components/sizes.d.ts +1 -1
  722. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  723. package/lib/components/pagination/src/components/total.d.ts +1 -1
  724. package/lib/components/pagination/src/components/total.js.map +1 -1
  725. package/lib/components/pagination/src/pagination.js +1 -1
  726. package/lib/components/popconfirm/index.js +2 -2
  727. package/lib/components/popconfirm/src/popconfirm.d.ts +1 -1
  728. package/lib/components/popconfirm/src/popconfirm.js +46 -114
  729. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  730. package/lib/components/popconfirm/src/popconfirm2.js +114 -46
  731. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  732. package/lib/components/popover/src/popover.d.ts +4 -4
  733. package/lib/components/popover/src/popover.js.map +1 -1
  734. package/lib/components/popover/src/popover.vue.d.ts +10 -71
  735. package/lib/components/popper/src/arrow.d.ts +1 -1
  736. package/lib/components/popper/src/arrow.js.map +1 -1
  737. package/lib/components/popper/src/content.d.ts +1 -1
  738. package/lib/components/popper/src/content.js.map +1 -1
  739. package/lib/components/popper/src/content.vue.d.ts +12 -12
  740. package/lib/components/popper/src/popper.d.ts +1 -1
  741. package/lib/components/popper/src/popper.js.map +1 -1
  742. package/lib/components/popper/src/trigger.d.ts +1 -1
  743. package/lib/components/popper/src/trigger.js.map +1 -1
  744. package/lib/components/progress/src/progress.d.ts +1 -1
  745. package/lib/components/progress/src/progress.js.map +1 -1
  746. package/lib/components/radio/src/radio-button.d.ts +1 -1
  747. package/lib/components/radio/src/radio-button.js.map +1 -1
  748. package/lib/components/radio/src/radio-group.d.ts +1 -1
  749. package/lib/components/radio/src/radio-group.js.map +1 -1
  750. package/lib/components/radio/src/radio.d.ts +1 -1
  751. package/lib/components/radio/src/radio.js.map +1 -1
  752. package/lib/components/rate/index.js +2 -2
  753. package/lib/components/rate/src/rate.d.ts +1 -1
  754. package/lib/components/rate/src/rate.js +257 -83
  755. package/lib/components/rate/src/rate.js.map +1 -1
  756. package/lib/components/rate/src/rate2.js +83 -257
  757. package/lib/components/rate/src/rate2.js.map +1 -1
  758. package/lib/components/result/src/result.d.ts +1 -1
  759. package/lib/components/result/src/result.js.map +1 -1
  760. package/lib/components/row/src/row.d.ts +1 -1
  761. package/lib/components/row/src/row.js.map +1 -1
  762. package/lib/components/scrollbar/src/bar.d.ts +1 -1
  763. package/lib/components/scrollbar/src/bar.js.map +1 -1
  764. package/lib/components/scrollbar/src/scrollbar.d.ts +1 -1
  765. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  766. package/lib/components/scrollbar/src/thumb.d.ts +1 -1
  767. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  768. package/lib/components/segmented/src/segmented.d.ts +1 -1
  769. package/lib/components/segmented/src/segmented.js.map +1 -1
  770. package/lib/components/select/index.js +1 -1
  771. package/lib/components/select/src/select.js +113 -429
  772. package/lib/components/select/src/select.js.map +1 -1
  773. package/lib/components/select/src/select.vue.d.ts +121 -71
  774. package/lib/components/select/src/select2.js +429 -113
  775. package/lib/components/select/src/select2.js.map +1 -1
  776. package/lib/components/select/src/useSelect.d.ts +110 -63
  777. package/lib/components/select/src/useSelect.js.map +1 -1
  778. package/lib/components/select-v2/src/select.vue.d.ts +64 -25
  779. package/lib/components/select-v2/src/useSelect.d.ts +86 -50
  780. package/lib/components/select-v2/src/useSelect.js +6 -0
  781. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  782. package/lib/components/skeleton/index.js +2 -2
  783. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  784. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  785. package/lib/components/skeleton/src/skeleton.d.ts +1 -1
  786. package/lib/components/skeleton/src/skeleton.js +21 -48
  787. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  788. package/lib/components/skeleton/src/skeleton2.js +48 -21
  789. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  790. package/lib/components/slider/src/button.js +91 -20
  791. package/lib/components/slider/src/button.js.map +1 -1
  792. package/lib/components/slider/src/button.vue.d.ts +3 -3
  793. package/lib/components/slider/src/button2.js +20 -91
  794. package/lib/components/slider/src/button2.js.map +1 -1
  795. package/lib/components/slider/src/composables/use-slider-button.d.ts +5 -9
  796. package/lib/components/slider/src/composables/use-slider-button.js.map +1 -1
  797. package/lib/components/slider/src/slider.d.ts +1 -1
  798. package/lib/components/slider/src/slider.js.map +1 -1
  799. package/lib/components/slider/src/slider.vue.d.ts +3 -3
  800. package/lib/components/slider/src/slider2.js +1 -1
  801. package/lib/components/space/src/item.d.ts +1 -1
  802. package/lib/components/space/src/item.js.map +1 -1
  803. package/lib/components/space/src/space.d.ts +1 -1
  804. package/lib/components/space/src/space.js.map +1 -1
  805. package/lib/components/statistic/src/statistic.d.ts +1 -1
  806. package/lib/components/statistic/src/statistic.js.map +1 -1
  807. package/lib/components/steps/index.js +2 -2
  808. package/lib/components/steps/src/item.d.ts +1 -1
  809. package/lib/components/steps/src/item.js +190 -19
  810. package/lib/components/steps/src/item.js.map +1 -1
  811. package/lib/components/steps/src/item2.js +19 -190
  812. package/lib/components/steps/src/item2.js.map +1 -1
  813. package/lib/components/steps/src/steps.d.ts +1 -1
  814. package/lib/components/steps/src/steps.js.map +1 -1
  815. package/lib/components/switch/src/switch.d.ts +1 -1
  816. package/lib/components/switch/src/switch.js.map +1 -1
  817. package/lib/components/table/index.d.ts +2 -2
  818. package/lib/components/table/index.js.map +1 -1
  819. package/lib/components/table/src/filter-panel.js.map +1 -1
  820. package/lib/components/table/src/filter-panel.vue.d.ts +2 -1085
  821. package/lib/components/table/src/table-body/index.d.ts +1 -1
  822. package/lib/components/table/src/table-column/index.d.ts +1 -1
  823. package/lib/components/table/src/table-column/index.js +1 -1
  824. package/lib/components/table/src/table-column/index.js.map +1 -1
  825. package/lib/components/table-v2/src/table-v2.d.ts +12 -12
  826. package/lib/components/table-v2/src/use-table.d.ts +4 -4
  827. package/lib/components/tabs/src/tab-bar.d.ts +1 -1
  828. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  829. package/lib/components/tabs/src/tab-pane.d.ts +1 -1
  830. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  831. package/lib/components/tag/src/tag.d.ts +1 -1
  832. package/lib/components/tag/src/tag.js.map +1 -1
  833. package/lib/components/teleport/src/teleport.d.ts +1 -1
  834. package/lib/components/teleport/src/teleport.js.map +1 -1
  835. package/lib/components/time-picker/src/props/basic-time-spinner.d.ts +3 -3
  836. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js +14 -12
  837. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.js.map +1 -1
  838. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
  839. package/lib/components/time-picker/src/time-picker.d.ts +9 -9
  840. package/lib/components/time-select/src/time-select.d.ts +1 -1
  841. package/lib/components/time-select/src/time-select.js.map +1 -1
  842. package/lib/components/time-select/src/time-select.vue.d.ts +3 -3
  843. package/lib/components/timeline/src/timeline-item.d.ts +1 -1
  844. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  845. package/lib/components/timeline/src/timeline.d.ts +1 -1
  846. package/lib/components/timeline/src/timeline.js.map +1 -1
  847. package/lib/components/tooltip/src/content.d.ts +1 -1
  848. package/lib/components/tooltip/src/content.js.map +1 -1
  849. package/lib/components/tooltip/src/content.vue.d.ts +2 -847
  850. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  851. package/lib/components/tooltip/src/tooltip.js.map +1 -1
  852. package/lib/components/tooltip/src/tooltip.vue.d.ts +27 -7
  853. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  854. package/lib/components/tooltip-v2/index.js +1 -1
  855. package/lib/components/tooltip-v2/src/content.vue.d.ts +3 -3
  856. package/lib/components/tooltip-v2/src/tooltip.d.ts +1 -1
  857. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  858. package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +3 -3
  859. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  860. package/lib/components/tooltip-v2/src/trigger.js +89 -12
  861. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  862. package/lib/components/tooltip-v2/src/trigger2.js +12 -89
  863. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  864. package/lib/components/tour/index.js +1 -1
  865. package/lib/components/tour/src/content.js +46 -67
  866. package/lib/components/tour/src/content.js.map +1 -1
  867. package/lib/components/tour/src/content2.js +67 -46
  868. package/lib/components/tour/src/content2.js.map +1 -1
  869. package/lib/components/tour/src/step.js +1 -1
  870. package/lib/components/tour/src/tour.d.ts +1 -1
  871. package/lib/components/tour/src/tour.js +1 -1
  872. package/lib/components/tour/src/tour.js.map +1 -1
  873. package/lib/components/tour/src/tour.vue.d.ts +8 -8
  874. package/lib/components/tour/src/tour2.js +1 -1
  875. package/lib/components/transfer/src/transfer-panel.d.ts +1 -1
  876. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  877. package/lib/components/transfer/src/transfer-panel.vue.d.ts +18 -18
  878. package/lib/components/transfer/src/transfer.d.ts +1 -1
  879. package/lib/components/transfer/src/transfer.js.map +1 -1
  880. package/lib/components/transfer/src/transfer.vue.d.ts +5 -3
  881. package/lib/components/transfer/src/transfer2.js.map +1 -1
  882. package/lib/components/tree/src/instance.d.ts +1 -1
  883. package/lib/components/tree-v2/src/tree.vue.d.ts +17 -17
  884. package/lib/components/upload/index.js +1 -1
  885. package/lib/components/upload/src/upload-content.d.ts +1 -1
  886. package/lib/components/upload/src/upload-content.js +31 -194
  887. package/lib/components/upload/src/upload-content.js.map +1 -1
  888. package/lib/components/upload/src/upload-content2.js +194 -31
  889. package/lib/components/upload/src/upload-content2.js.map +1 -1
  890. package/lib/components/upload/src/upload-dragger.d.ts +1 -1
  891. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  892. package/lib/components/upload/src/upload-list.d.ts +1 -1
  893. package/lib/components/upload/src/upload-list.js.map +1 -1
  894. package/lib/components/upload/src/upload.d.ts +1 -1
  895. package/lib/components/upload/src/upload.js.map +1 -1
  896. package/lib/components/upload/src/upload2.js +1 -1
  897. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
  898. package/lib/components/virtual-list/src/components/dynamic-size-list.js.map +1 -1
  899. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +13 -13
  900. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  901. package/lib/components/virtual-list/src/components/fixed-size-list.js.map +1 -1
  902. package/lib/components/watermark/index.js +2 -2
  903. package/lib/components/watermark/src/watermark.d.ts +1 -1
  904. package/lib/components/watermark/src/watermark.js +210 -27
  905. package/lib/components/watermark/src/watermark.js.map +1 -1
  906. package/lib/components/watermark/src/watermark2.js +27 -210
  907. package/lib/components/watermark/src/watermark2.js.map +1 -1
  908. package/lib/defaults.d.ts +1 -1
  909. package/lib/directives/click-outside/index.js +1 -1
  910. package/lib/hooks/use-focus-controller/index.js +1 -1
  911. package/lib/hooks/use-lockscreen/index.js +1 -1
  912. package/lib/index.d.ts +1 -1
  913. package/lib/index.js +11 -11
  914. package/lib/locale/lang/ms.js +1 -1
  915. package/lib/locale/lang/ms.js.map +1 -1
  916. package/lib/version.d.ts +1 -1
  917. package/lib/version.js +1 -1
  918. package/lib/version.js.map +1 -1
  919. package/package.json +2 -2
  920. package/web-types.json +1 -1
@@ -1,24 +1,96 @@
1
- import { placements } from '@popperjs/core';
2
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
3
- import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
4
- import { isNumber } from '../../../utils/types.mjs';
1
+ import { defineComponent, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createVNode, withCtx, createElementVNode, toDisplayString } from 'vue';
2
+ import { ElTooltip } from '../../tooltip/index.mjs';
3
+ import { sliderButtonProps, sliderButtonEmits } from './button2.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useSliderButton } from './composables/use-slider-button.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
5
7
 
6
- const sliderButtonProps = buildProps({
7
- modelValue: {
8
- type: Number,
9
- default: 0
10
- },
11
- vertical: Boolean,
12
- tooltipClass: String,
13
- placement: {
14
- type: String,
15
- values: placements,
16
- default: "top"
8
+ const __default__ = defineComponent({
9
+ name: "ElSliderButton"
10
+ });
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...__default__,
13
+ props: sliderButtonProps,
14
+ emits: sliderButtonEmits,
15
+ setup(__props, { expose, emit }) {
16
+ const props = __props;
17
+ const ns = useNamespace("slider");
18
+ const initData = reactive({
19
+ hovering: false,
20
+ dragging: false,
21
+ isClick: false,
22
+ startX: 0,
23
+ currentX: 0,
24
+ startY: 0,
25
+ currentY: 0,
26
+ startPosition: 0,
27
+ newPosition: 0,
28
+ oldValue: props.modelValue
29
+ });
30
+ const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
31
+ const {
32
+ disabled,
33
+ button,
34
+ tooltip,
35
+ showTooltip,
36
+ persistent,
37
+ tooltipVisible,
38
+ wrapperStyle,
39
+ formatValue,
40
+ handleMouseEnter,
41
+ handleMouseLeave,
42
+ onButtonDown,
43
+ onKeyDown,
44
+ setPosition
45
+ } = useSliderButton(props, initData, emit);
46
+ const { hovering, dragging } = toRefs(initData);
47
+ expose({
48
+ onButtonDown,
49
+ onKeyDown,
50
+ setPosition,
51
+ hovering,
52
+ dragging
53
+ });
54
+ return (_ctx, _cache) => {
55
+ return openBlock(), createElementBlock("div", {
56
+ ref_key: "button",
57
+ ref: button,
58
+ class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
59
+ style: normalizeStyle(unref(wrapperStyle)),
60
+ tabindex: unref(disabled) ? -1 : 0,
61
+ onMouseenter: unref(handleMouseEnter),
62
+ onMouseleave: unref(handleMouseLeave),
63
+ onMousedown: unref(onButtonDown),
64
+ onFocus: unref(handleMouseEnter),
65
+ onBlur: unref(handleMouseLeave),
66
+ onKeydown: unref(onKeyDown)
67
+ }, [
68
+ createVNode(unref(ElTooltip), {
69
+ ref_key: "tooltip",
70
+ ref: tooltip,
71
+ visible: unref(tooltipVisible),
72
+ placement: _ctx.placement,
73
+ "fallback-placements": ["top", "bottom", "right", "left"],
74
+ "stop-popper-mouse-event": false,
75
+ "popper-class": _ctx.tooltipClass,
76
+ disabled: !unref(showTooltip),
77
+ persistent: unref(tooltipPersistent)
78
+ }, {
79
+ content: withCtx(() => [
80
+ createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
81
+ ]),
82
+ default: withCtx(() => [
83
+ createElementVNode("div", {
84
+ class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
85
+ }, null, 2)
86
+ ]),
87
+ _: 1
88
+ }, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
89
+ ], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
90
+ };
17
91
  }
18
92
  });
19
- const sliderButtonEmits = {
20
- [UPDATE_MODEL_EVENT]: (value) => isNumber(value)
21
- };
93
+ var SliderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button.vue"]]);
22
94
 
23
- export { sliderButtonEmits, sliderButtonProps };
95
+ export { SliderButton as default };
24
96
  //# sourceMappingURL=button.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ComponentPublicInstance, ExtractPropTypes, Ref } from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = ComponentPublicInstance<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD;;;;"}
1
+ {"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? -1 : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n :persistent=\"tooltipPersistent\"\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst tooltipPersistent = computed(() =>\n !showTooltip.value ? false : persistent.value\n)\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n persistent,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;mCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAW,QAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAoB,GAAA,QAAA,CAAA,MAAA,CAAA,WAAA,CAAA,KAAA,GAAA,KAAA,GAAA,UAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MACxB;AAAwC,MAC1C,QAAA;AAEA,MAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACA,GAAA,eAAA,CAAA,KAAA,EAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,IACA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IACF,MAAI,CAAA;AAEJ,MAAA,YAAQ;AAER,MAAa,SAAA;AAAA,MACX,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ declare const _default: import("vue").DefineComponent<{
2
2
  readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
3
3
  readonly vertical: BooleanConstructor;
4
4
  readonly tooltipClass: StringConstructor;
5
- readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("@popperjs/core").Placement, unknown, "top", boolean>;
5
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("element-plus").Placement, unknown, "top", boolean>;
6
6
  }, {
7
7
  onButtonDown: (event: MouseEvent | TouchEvent) => void;
8
8
  onKeyDown: (event: KeyboardEvent) => void;
@@ -15,12 +15,12 @@ declare const _default: import("vue").DefineComponent<{
15
15
  readonly modelValue: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
16
16
  readonly vertical: BooleanConstructor;
17
17
  readonly tooltipClass: StringConstructor;
18
- readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("@popperjs/core").Placement, unknown, "top", boolean>;
18
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("element-plus").Placement, unknown, "top", boolean>;
19
19
  }>> & {
20
20
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
21
21
  }, {
22
22
  readonly vertical: boolean;
23
23
  readonly modelValue: number;
24
- readonly placement: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, import("@popperjs/core").Placement, unknown>;
24
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, import("element-plus").Placement, unknown>;
25
25
  }>;
26
26
  export default _default;
@@ -1,96 +1,24 @@
1
- import { defineComponent, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createVNode, withCtx, createElementVNode, toDisplayString } from 'vue';
2
- import { ElTooltip } from '../../tooltip/index.mjs';
3
- import { sliderButtonProps, sliderButtonEmits } from './button.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useSliderButton } from './composables/use-slider-button.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import { placements } from '@popperjs/core';
2
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
3
+ import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
4
+ import { isNumber } from '../../../utils/types.mjs';
7
5
 
8
- const __default__ = defineComponent({
9
- name: "ElSliderButton"
10
- });
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- ...__default__,
13
- props: sliderButtonProps,
14
- emits: sliderButtonEmits,
15
- setup(__props, { expose, emit }) {
16
- const props = __props;
17
- const ns = useNamespace("slider");
18
- const initData = reactive({
19
- hovering: false,
20
- dragging: false,
21
- isClick: false,
22
- startX: 0,
23
- currentX: 0,
24
- startY: 0,
25
- currentY: 0,
26
- startPosition: 0,
27
- newPosition: 0,
28
- oldValue: props.modelValue
29
- });
30
- const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
31
- const {
32
- disabled,
33
- button,
34
- tooltip,
35
- showTooltip,
36
- persistent,
37
- tooltipVisible,
38
- wrapperStyle,
39
- formatValue,
40
- handleMouseEnter,
41
- handleMouseLeave,
42
- onButtonDown,
43
- onKeyDown,
44
- setPosition
45
- } = useSliderButton(props, initData, emit);
46
- const { hovering, dragging } = toRefs(initData);
47
- expose({
48
- onButtonDown,
49
- onKeyDown,
50
- setPosition,
51
- hovering,
52
- dragging
53
- });
54
- return (_ctx, _cache) => {
55
- return openBlock(), createElementBlock("div", {
56
- ref_key: "button",
57
- ref: button,
58
- class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
59
- style: normalizeStyle(unref(wrapperStyle)),
60
- tabindex: unref(disabled) ? -1 : 0,
61
- onMouseenter: unref(handleMouseEnter),
62
- onMouseleave: unref(handleMouseLeave),
63
- onMousedown: unref(onButtonDown),
64
- onFocus: unref(handleMouseEnter),
65
- onBlur: unref(handleMouseLeave),
66
- onKeydown: unref(onKeyDown)
67
- }, [
68
- createVNode(unref(ElTooltip), {
69
- ref_key: "tooltip",
70
- ref: tooltip,
71
- visible: unref(tooltipVisible),
72
- placement: _ctx.placement,
73
- "fallback-placements": ["top", "bottom", "right", "left"],
74
- "stop-popper-mouse-event": false,
75
- "popper-class": _ctx.tooltipClass,
76
- disabled: !unref(showTooltip),
77
- persistent: unref(tooltipPersistent)
78
- }, {
79
- content: withCtx(() => [
80
- createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
81
- ]),
82
- default: withCtx(() => [
83
- createElementVNode("div", {
84
- class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
85
- }, null, 2)
86
- ]),
87
- _: 1
88
- }, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
89
- ], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
90
- };
6
+ const sliderButtonProps = buildProps({
7
+ modelValue: {
8
+ type: Number,
9
+ default: 0
10
+ },
11
+ vertical: Boolean,
12
+ tooltipClass: String,
13
+ placement: {
14
+ type: String,
15
+ values: placements,
16
+ default: "top"
91
17
  }
92
18
  });
93
- var SliderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button.vue"]]);
19
+ const sliderButtonEmits = {
20
+ [UPDATE_MODEL_EVENT]: (value) => isNumber(value)
21
+ };
94
22
 
95
- export { SliderButton as default };
23
+ export { sliderButtonEmits, sliderButtonProps };
96
24
  //# sourceMappingURL=button2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? -1 : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n :persistent=\"tooltipPersistent\"\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst tooltipPersistent = computed(() =>\n !showTooltip.value ? false : persistent.value\n)\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n persistent,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;mCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAW,QAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAoB,GAAA,QAAA,CAAA,MAAA,CAAA,WAAA,CAAA,KAAA,GAAA,KAAA,GAAA,UAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MACxB;AAAwC,MAC1C,QAAA;AAEA,MAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACA,GAAA,eAAA,CAAA,KAAA,EAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,IACA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IACF,MAAI,CAAA;AAEJ,MAAA,YAAQ;AAER,MAAa,SAAA;AAAA,MACX,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ComponentPublicInstance, ExtractPropTypes, Ref } from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = ComponentPublicInstance<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD;;;;"}
@@ -1,22 +1,18 @@
1
1
  import type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue';
2
- import type { SliderProps } from '../slider';
3
2
  import type { SliderButtonEmits, SliderButtonInitData, SliderButtonProps } from '../button';
4
3
  import type { TooltipInstance } from '@element-plus/nightly/es/components/tooltip';
5
- type HTMLType = HTMLDivElement | undefined;
6
- type useSliderButtonType = (props: SliderButtonProps, initData: SliderButtonInitData, emit: SetupContext<SliderButtonEmits>['emit']) => {
4
+ export declare const useSliderButton: (props: SliderButtonProps, initData: SliderButtonInitData, emit: SetupContext<SliderButtonEmits>["emit"]) => {
7
5
  disabled: Ref<boolean>;
8
- button: Ref<HTMLType>;
6
+ button: Ref<HTMLDivElement | undefined>;
9
7
  tooltip: Ref<TooltipInstance | undefined>;
10
8
  tooltipVisible: Ref<boolean>;
11
- showTooltip: Ref<SliderProps['showTooltip']>;
12
- persistent: Ref<SliderProps['persistent']>;
9
+ showTooltip: Ref<import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
10
+ persistent: Ref<import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
13
11
  wrapperStyle: ComputedRef<CSSProperties>;
14
- formatValue: ComputedRef<number | string>;
12
+ formatValue: ComputedRef<string | number>;
15
13
  handleMouseEnter: () => void;
16
14
  handleMouseLeave: () => void;
17
15
  onButtonDown: (event: MouseEvent | TouchEvent) => void;
18
16
  onKeyDown: (event: KeyboardEvent) => void;
19
17
  setPosition: (newPosition: number) => Promise<void>;
20
18
  };
21
- export declare const useSliderButton: useSliderButtonType;
22
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"use-slider-button.mjs","sources":["../../../../../../../packages/components/slider/src/composables/use-slider-button.ts"],"sourcesContent":["import { computed, inject, nextTick, ref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { useEventListener } from '@vueuse/core'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { sliderContextKey } from '../constants'\n\nimport type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue'\nimport type { SliderProps } from '../slider'\nimport type {\n SliderButtonEmits,\n SliderButtonInitData,\n SliderButtonProps,\n} from '../button'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\nconst useTooltip = (\n props: SliderButtonProps,\n formatTooltip: Ref<SliderProps['formatTooltip']>,\n showTooltip: Ref<SliderProps['showTooltip']>\n) => {\n const tooltip = ref<TooltipInstance>()\n\n const tooltipVisible = ref(false)\n\n const enableFormat = computed(() => {\n return formatTooltip.value instanceof Function\n })\n\n const formatValue = computed(() => {\n return (\n (enableFormat.value && formatTooltip.value!(props.modelValue)) ||\n props.modelValue\n )\n })\n\n const displayTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = true)\n }, 50)\n\n const hideTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = false)\n }, 50)\n\n return {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip,\n }\n}\n\ntype HTMLType = HTMLDivElement | undefined\ntype useSliderButtonType = (\n props: SliderButtonProps,\n initData: SliderButtonInitData,\n emit: SetupContext<SliderButtonEmits>['emit']\n) => {\n disabled: Ref<boolean>\n button: Ref<HTMLType>\n tooltip: Ref<TooltipInstance | undefined>\n tooltipVisible: Ref<boolean>\n showTooltip: Ref<SliderProps['showTooltip']>\n persistent: Ref<SliderProps['persistent']>\n wrapperStyle: ComputedRef<CSSProperties>\n formatValue: ComputedRef<number | string>\n handleMouseEnter: () => void\n handleMouseLeave: () => void\n onButtonDown: (event: MouseEvent | TouchEvent) => void\n onKeyDown: (event: KeyboardEvent) => void\n setPosition: (newPosition: number) => Promise<void>\n}\n\nexport const useSliderButton: useSliderButtonType = (\n props: SliderButtonProps,\n initData: SliderButtonInitData,\n emit: SetupContext<SliderButtonEmits>['emit']\n) => {\n const {\n disabled,\n min,\n max,\n step,\n showTooltip,\n persistent,\n precision,\n sliderSize,\n formatTooltip,\n emitChange,\n resetSize,\n updateDragging,\n } = inject(sliderContextKey)!\n\n const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } =\n useTooltip(props, formatTooltip!, showTooltip)\n\n const button = ref<HTMLDivElement>()\n\n const currentPosition = computed(() => {\n return `${\n ((props.modelValue - min.value) / (max.value - min.value)) * 100\n }%`\n })\n\n const wrapperStyle: ComputedRef<CSSProperties> = computed(() => {\n return props.vertical\n ? { bottom: currentPosition.value }\n : { left: currentPosition.value }\n })\n\n const handleMouseEnter = () => {\n initData.hovering = true\n displayTooltip()\n }\n\n const handleMouseLeave = () => {\n initData.hovering = false\n if (!initData.dragging) {\n hideTooltip()\n }\n }\n\n const onButtonDown = (event: MouseEvent | TouchEvent) => {\n if (disabled.value) return\n event.preventDefault()\n onDragStart(event)\n window.addEventListener('mousemove', onDragging)\n window.addEventListener('touchmove', onDragging)\n window.addEventListener('mouseup', onDragEnd)\n window.addEventListener('touchend', onDragEnd)\n window.addEventListener('contextmenu', onDragEnd)\n button.value!.focus()\n }\n\n const incrementPosition = (amount: number) => {\n if (disabled.value) return\n initData.newPosition =\n Number.parseFloat(currentPosition.value) +\n (amount / (max.value - min.value)) * 100\n setPosition(initData.newPosition)\n emitChange()\n }\n\n const onLeftKeyDown = () => {\n incrementPosition(-step.value)\n }\n\n const onRightKeyDown = () => {\n incrementPosition(step.value)\n }\n\n const onPageDownKeyDown = () => {\n incrementPosition(-step.value * 4)\n }\n\n const onPageUpKeyDown = () => {\n incrementPosition(step.value * 4)\n }\n\n const onHomeKeyDown = () => {\n if (disabled.value) return\n setPosition(0)\n emitChange()\n }\n\n const onEndKeyDown = () => {\n if (disabled.value) return\n setPosition(100)\n emitChange()\n }\n\n const onKeyDown = (event: KeyboardEvent) => {\n let isPreventDefault = true\n\n switch (event.code) {\n case EVENT_CODE.left:\n case EVENT_CODE.down:\n onLeftKeyDown()\n break\n case EVENT_CODE.right:\n case EVENT_CODE.up:\n onRightKeyDown()\n break\n case EVENT_CODE.home:\n onHomeKeyDown()\n break\n case EVENT_CODE.end:\n onEndKeyDown()\n break\n case EVENT_CODE.pageDown:\n onPageDownKeyDown()\n break\n case EVENT_CODE.pageUp:\n onPageUpKeyDown()\n break\n default:\n isPreventDefault = false\n break\n }\n\n isPreventDefault && event.preventDefault()\n }\n\n const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n }\n\n const onDragStart = (event: MouseEvent | TouchEvent) => {\n initData.dragging = true\n initData.isClick = true\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.startY = clientY\n } else {\n initData.startX = clientX\n }\n initData.startPosition = Number.parseFloat(currentPosition.value)\n initData.newPosition = initData.startPosition\n }\n\n const onDragging = (event: MouseEvent | TouchEvent) => {\n if (initData.dragging) {\n initData.isClick = false\n displayTooltip()\n resetSize()\n let diff: number\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.currentY = clientY\n diff = ((initData.startY - initData.currentY) / sliderSize.value) * 100\n } else {\n initData.currentX = clientX\n diff = ((initData.currentX - initData.startX) / sliderSize.value) * 100\n }\n initData.newPosition = initData.startPosition + diff\n setPosition(initData.newPosition)\n }\n }\n\n const onDragEnd = () => {\n if (initData.dragging) {\n /*\n * 防止在 mouseup 后立即触发 click,导致滑块有几率产生一小段位移\n * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上\n */\n setTimeout(() => {\n initData.dragging = false\n if (!initData.hovering) {\n hideTooltip()\n }\n if (!initData.isClick) {\n setPosition(initData.newPosition)\n }\n emitChange()\n }, 0)\n window.removeEventListener('mousemove', onDragging)\n window.removeEventListener('touchmove', onDragging)\n window.removeEventListener('mouseup', onDragEnd)\n window.removeEventListener('touchend', onDragEnd)\n window.removeEventListener('contextmenu', onDragEnd)\n }\n }\n\n const setPosition = async (newPosition: number) => {\n if (newPosition === null || Number.isNaN(+newPosition)) return\n if (newPosition < 0) {\n newPosition = 0\n } else if (newPosition > 100) {\n newPosition = 100\n }\n const lengthPerStep = 100 / ((max.value - min.value) / step.value)\n const steps = Math.round(newPosition / lengthPerStep)\n let value =\n steps * lengthPerStep * (max.value - min.value) * 0.01 + min.value\n value = Number.parseFloat(value.toFixed(precision.value))\n\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n }\n\n if (!initData.dragging && props.modelValue !== initData.oldValue) {\n initData.oldValue = props.modelValue\n }\n\n await nextTick()\n initData.dragging && displayTooltip()\n tooltip.value!.updatePopper()\n }\n\n watch(\n () => initData.dragging,\n (val) => {\n updateDragging(val)\n }\n )\n\n useEventListener(button, 'touchstart', onButtonDown, { passive: false })\n\n return {\n disabled,\n button,\n tooltip,\n tooltipVisible,\n showTooltip,\n persistent,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM;AACtC,IAAI,OAAO,aAAa,CAAC,KAAK,YAAY,QAAQ,CAAC;AACnD,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,YAAY,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC;AAC3F,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM;AACxC,IAAI,WAAW,CAAC,KAAK,KAAK,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;AACvD,GAAG,EAAE,EAAE,CAAC,CAAC;AACT,EAAE,MAAM,WAAW,GAAG,QAAQ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AAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3E,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-slider-button.mjs","sources":["../../../../../../../packages/components/slider/src/composables/use-slider-button.ts"],"sourcesContent":["import { computed, inject, nextTick, ref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { useEventListener } from '@vueuse/core'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { sliderContextKey } from '../constants'\n\nimport type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue'\nimport type { SliderProps } from '../slider'\nimport type {\n SliderButtonEmits,\n SliderButtonInitData,\n SliderButtonProps,\n} from '../button'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\nconst useTooltip = (\n props: SliderButtonProps,\n formatTooltip: Ref<SliderProps['formatTooltip']>,\n showTooltip: Ref<SliderProps['showTooltip']>\n) => {\n const tooltip = ref<TooltipInstance>()\n\n const tooltipVisible = ref(false)\n\n const enableFormat = computed(() => {\n return formatTooltip.value instanceof Function\n })\n\n const formatValue = computed(() => {\n return (\n (enableFormat.value && formatTooltip.value!(props.modelValue)) ||\n props.modelValue\n )\n })\n\n const displayTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = true)\n }, 50)\n\n const hideTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = false)\n }, 50)\n\n return {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip,\n }\n}\n\nexport const useSliderButton = (\n props: SliderButtonProps,\n initData: SliderButtonInitData,\n emit: SetupContext<SliderButtonEmits>['emit']\n) => {\n const {\n disabled,\n min,\n max,\n step,\n showTooltip,\n persistent,\n precision,\n sliderSize,\n formatTooltip,\n emitChange,\n resetSize,\n updateDragging,\n } = inject(sliderContextKey)!\n\n const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } =\n useTooltip(props, formatTooltip!, showTooltip)\n\n const button = ref<HTMLDivElement>()\n\n const currentPosition = computed(() => {\n return `${\n ((props.modelValue - min.value) / (max.value - min.value)) * 100\n }%`\n })\n\n const wrapperStyle: ComputedRef<CSSProperties> = computed(() => {\n return props.vertical\n ? { bottom: currentPosition.value }\n : { left: currentPosition.value }\n })\n\n const handleMouseEnter = () => {\n initData.hovering = true\n displayTooltip()\n }\n\n const handleMouseLeave = () => {\n initData.hovering = false\n if (!initData.dragging) {\n hideTooltip()\n }\n }\n\n const onButtonDown = (event: MouseEvent | TouchEvent) => {\n if (disabled.value) return\n event.preventDefault()\n onDragStart(event)\n window.addEventListener('mousemove', onDragging)\n window.addEventListener('touchmove', onDragging)\n window.addEventListener('mouseup', onDragEnd)\n window.addEventListener('touchend', onDragEnd)\n window.addEventListener('contextmenu', onDragEnd)\n button.value!.focus()\n }\n\n const incrementPosition = (amount: number) => {\n if (disabled.value) return\n initData.newPosition =\n Number.parseFloat(currentPosition.value) +\n (amount / (max.value - min.value)) * 100\n setPosition(initData.newPosition)\n emitChange()\n }\n\n const onLeftKeyDown = () => {\n incrementPosition(-step.value)\n }\n\n const onRightKeyDown = () => {\n incrementPosition(step.value)\n }\n\n const onPageDownKeyDown = () => {\n incrementPosition(-step.value * 4)\n }\n\n const onPageUpKeyDown = () => {\n incrementPosition(step.value * 4)\n }\n\n const onHomeKeyDown = () => {\n if (disabled.value) return\n setPosition(0)\n emitChange()\n }\n\n const onEndKeyDown = () => {\n if (disabled.value) return\n setPosition(100)\n emitChange()\n }\n\n const onKeyDown = (event: KeyboardEvent) => {\n let isPreventDefault = true\n\n switch (event.code) {\n case EVENT_CODE.left:\n case EVENT_CODE.down:\n onLeftKeyDown()\n break\n case EVENT_CODE.right:\n case EVENT_CODE.up:\n onRightKeyDown()\n break\n case EVENT_CODE.home:\n onHomeKeyDown()\n break\n case EVENT_CODE.end:\n onEndKeyDown()\n break\n case EVENT_CODE.pageDown:\n onPageDownKeyDown()\n break\n case EVENT_CODE.pageUp:\n onPageUpKeyDown()\n break\n default:\n isPreventDefault = false\n break\n }\n\n isPreventDefault && event.preventDefault()\n }\n\n const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n }\n\n const onDragStart = (event: MouseEvent | TouchEvent) => {\n initData.dragging = true\n initData.isClick = true\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.startY = clientY\n } else {\n initData.startX = clientX\n }\n initData.startPosition = Number.parseFloat(currentPosition.value)\n initData.newPosition = initData.startPosition\n }\n\n const onDragging = (event: MouseEvent | TouchEvent) => {\n if (initData.dragging) {\n initData.isClick = false\n displayTooltip()\n resetSize()\n let diff: number\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.currentY = clientY\n diff = ((initData.startY - initData.currentY) / sliderSize.value) * 100\n } else {\n initData.currentX = clientX\n diff = ((initData.currentX - initData.startX) / sliderSize.value) * 100\n }\n initData.newPosition = initData.startPosition + diff\n setPosition(initData.newPosition)\n }\n }\n\n const onDragEnd = () => {\n if (initData.dragging) {\n /*\n * 防止在 mouseup 后立即触发 click,导致滑块有几率产生一小段位移\n * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上\n */\n setTimeout(() => {\n initData.dragging = false\n if (!initData.hovering) {\n hideTooltip()\n }\n if (!initData.isClick) {\n setPosition(initData.newPosition)\n }\n emitChange()\n }, 0)\n window.removeEventListener('mousemove', onDragging)\n window.removeEventListener('touchmove', onDragging)\n window.removeEventListener('mouseup', onDragEnd)\n window.removeEventListener('touchend', onDragEnd)\n window.removeEventListener('contextmenu', onDragEnd)\n }\n }\n\n const setPosition = async (newPosition: number) => {\n if (newPosition === null || Number.isNaN(+newPosition)) return\n if (newPosition < 0) {\n newPosition = 0\n } else if (newPosition > 100) {\n newPosition = 100\n }\n const lengthPerStep = 100 / ((max.value - min.value) / step.value)\n const steps = Math.round(newPosition / lengthPerStep)\n let value =\n steps * lengthPerStep * (max.value - min.value) * 0.01 + min.value\n value = Number.parseFloat(value.toFixed(precision.value))\n\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n }\n\n if (!initData.dragging && props.modelValue !== initData.oldValue) {\n initData.oldValue = props.modelValue\n }\n\n await nextTick()\n initData.dragging && displayTooltip()\n tooltip.value!.updatePopper()\n }\n\n watch(\n () => initData.dragging,\n (val) => {\n updateDragging(val)\n }\n )\n\n useEventListener(button, 'touchstart', onButtonDown, { passive: false })\n\n return {\n disabled,\n button,\n tooltip,\n tooltipVisible,\n showTooltip,\n persistent,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM;AACtC,IAAI,OAAO,aAAa,CAAC,KAAK,YAAY,QAAQ,CAAC;AACnD,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,YAAY,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC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CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;AACjC,GAAG,CAAC;AACJ,EAAE,KAAK,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK;AAC1C,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACxB,GAAG,CAAC,CAAC;AACL,EAAE,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3E,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -76,5 +76,5 @@ export declare const sliderEmits: {
76
76
  change: (value: Arrayable<number>) => value is number | number[];
77
77
  };
78
78
  export type SliderEmits = typeof sliderEmits;
79
- export type SliderInstance = InstanceType<typeof Slider>;
79
+ export type SliderInstance = InstanceType<typeof Slider> & unknown;
80
80
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"slider.mjs","sources":["../../../../../../packages/components/slider/src/slider.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { SliderMarkerProps } from './marker'\nimport type Slider from './slider.vue'\n\ntype SliderMarks = Record<number, string | SliderMarkerProps['mark']>\n\nexport interface SliderInitData {\n firstValue: number\n secondValue: number\n oldValue?: Arrayable<number>\n dragging: boolean\n sliderSize: number\n}\n\nexport const sliderProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<Arrayable<number>>([Number, Array]),\n default: 0,\n },\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description minimum value\n */\n min: {\n type: Number,\n default: 0,\n },\n /**\n * @description maximum value\n */\n max: {\n type: Number,\n default: 100,\n },\n /**\n * @description step size\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether to display an input box, works when `range` is false\n */\n showInput: Boolean,\n /**\n * @description whether to display control buttons when `show-input` is true\n */\n showInputControls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of the slider wrapper, will not work in vertical mode\n */\n size: useSizeProp,\n /**\n * @description size of the input box, when set `size`, the default is the value of `size`\n */\n inputSize: useSizeProp,\n /**\n * @description whether to display breakpoints\n */\n showStops: Boolean,\n /**\n * @description whether to display tooltip value\n */\n showTooltip: {\n type: Boolean,\n default: true,\n },\n /**\n * @description format to display tooltip value\n */\n formatTooltip: {\n type: definePropType<(val: number) => number | string>(Function),\n default: undefined,\n },\n /**\n * @description whether Slider is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to select a range\n */\n range: Boolean,\n /**\n * @description vertical mode\n */\n vertical: Boolean,\n /**\n * @description slider height, required in vertical mode\n */\n height: String,\n /**\n * @description debounce delay when typing, in milliseconds, works when `show-input` is true\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description when `range` is true, screen reader label for the start of the range\n */\n rangeStartLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description when `range` is true, screen reader label for the end of the range\n */\n rangeEndLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description format to display the `aria-valuenow` attribute for screen readers\n */\n formatValueText: {\n type: definePropType<(val: number) => string>(Function),\n default: undefined,\n },\n /**\n * @description custom class name for the tooltip\n */\n tooltipClass: {\n type: String,\n default: undefined,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n /**\n * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style\n */\n marks: {\n type: definePropType<SliderMarks>(Object),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type SliderProps = ExtractPropTypes<typeof sliderProps>\n\nconst isValidValue = (value: Arrayable<number>) =>\n isNumber(value) || (isArray(value) && value.every(isNumber))\nexport const sliderEmits = {\n [UPDATE_MODEL_EVENT]: isValidValue,\n [INPUT_EVENT]: isValidValue,\n [CHANGE_EVENT]: isValidValue,\n}\nexport type SliderEmits = typeof sliderEmits\n\nexport type SliderInstance = InstanceType<typeof Slider>\n"],"names":[],"mappings":";;;;;;;;AAaY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,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jB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACH,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC/E,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,WAAW,GAAG,YAAY;AAC7B,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
1
+ {"version":3,"file":"slider.mjs","sources":["../../../../../../packages/components/slider/src/slider.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { SliderMarkerProps } from './marker'\nimport type Slider from './slider.vue'\n\ntype SliderMarks = Record<number, string | SliderMarkerProps['mark']>\n\nexport interface SliderInitData {\n firstValue: number\n secondValue: number\n oldValue?: Arrayable<number>\n dragging: boolean\n sliderSize: number\n}\n\nexport const sliderProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<Arrayable<number>>([Number, Array]),\n default: 0,\n },\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description minimum value\n */\n min: {\n type: Number,\n default: 0,\n },\n /**\n * @description maximum value\n */\n max: {\n type: Number,\n default: 100,\n },\n /**\n * @description step size\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether to display an input box, works when `range` is false\n */\n showInput: Boolean,\n /**\n * @description whether to display control buttons when `show-input` is true\n */\n showInputControls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of the slider wrapper, will not work in vertical mode\n */\n size: useSizeProp,\n /**\n * @description size of the input box, when set `size`, the default is the value of `size`\n */\n inputSize: useSizeProp,\n /**\n * @description whether to display breakpoints\n */\n showStops: Boolean,\n /**\n * @description whether to display tooltip value\n */\n showTooltip: {\n type: Boolean,\n default: true,\n },\n /**\n * @description format to display tooltip value\n */\n formatTooltip: {\n type: definePropType<(val: number) => number | string>(Function),\n default: undefined,\n },\n /**\n * @description whether Slider is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to select a range\n */\n range: Boolean,\n /**\n * @description vertical mode\n */\n vertical: Boolean,\n /**\n * @description slider height, required in vertical mode\n */\n height: String,\n /**\n * @description debounce delay when typing, in milliseconds, works when `show-input` is true\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description when `range` is true, screen reader label for the start of the range\n */\n rangeStartLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description when `range` is true, screen reader label for the end of the range\n */\n rangeEndLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description format to display the `aria-valuenow` attribute for screen readers\n */\n formatValueText: {\n type: definePropType<(val: number) => string>(Function),\n default: undefined,\n },\n /**\n * @description custom class name for the tooltip\n */\n tooltipClass: {\n type: String,\n default: undefined,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n /**\n * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style\n */\n marks: {\n type: definePropType<SliderMarks>(Object),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type SliderProps = ExtractPropTypes<typeof sliderProps>\n\nconst isValidValue = (value: Arrayable<number>) =>\n isNumber(value) || (isArray(value) && value.every(isNumber))\nexport const sliderEmits = {\n [UPDATE_MODEL_EVENT]: isValidValue,\n [INPUT_EVENT]: isValidValue,\n [CHANGE_EVENT]: isValidValue,\n}\nexport type SliderEmits = typeof sliderEmits\n\nexport type SliderInstance = InstanceType<typeof Slider> & unknown\n"],"names":[],"mappings":";;;;;;;;AAaY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,SAAS,EAAE,WAAW;AACxB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,C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,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC/E,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,WAAW,GAAG,YAAY;AAC7B,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
47
47
  readonly prototype: any;
48
48
  })[], unknown, unknown, undefined, boolean>;
49
49
  readonly tooltipClass: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
50
- readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("@popperjs/core").Placement, unknown, "top", boolean>;
50
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("element-plus").Placement, unknown, "top", boolean>;
51
51
  readonly marks: {
52
52
  readonly type: import("vue").PropType<{
53
53
  [x: number]: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | {
@@ -125,7 +125,7 @@ declare const _default: import("vue").DefineComponent<{
125
125
  readonly prototype: any;
126
126
  })[], unknown, unknown, undefined, boolean>;
127
127
  readonly tooltipClass: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
128
- readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("@popperjs/core").Placement, unknown, "top", boolean>;
128
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, import("element-plus").Placement, unknown, "top", boolean>;
129
129
  readonly marks: {
130
130
  readonly type: import("vue").PropType<{
131
131
  [x: number]: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => string | {
@@ -158,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{
158
158
  readonly range: boolean;
159
159
  readonly id: string;
160
160
  readonly modelValue: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => number | number[]) | (() => import("@element-plus/nightly/es/utils").Arrayable<number>) | ((new (...args: any[]) => number | number[]) | (() => import("@element-plus/nightly/es/utils").Arrayable<number>))[], unknown, unknown>;
161
- readonly placement: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, import("@popperjs/core").Placement, unknown>;
161
+ readonly placement: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, import("element-plus").Placement, unknown>;
162
162
  readonly min: number;
163
163
  readonly max: number;
164
164
  readonly validateEvent: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -3,7 +3,7 @@ import { useEventListener } from '@vueuse/core';
3
3
  import { ElInputNumber } from '../../input-number/index.mjs';
4
4
  import { sliderContextKey } from './constants.mjs';
5
5
  import { sliderProps, sliderEmits } from './slider.mjs';
6
- import SliderButton from './button2.mjs';
6
+ import SliderButton from './button.mjs';
7
7
  import SliderMarker from './marker.mjs';
8
8
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
9
  import { useSlide } from './composables/use-slide.mjs';
@@ -25,5 +25,5 @@ declare const SpaceItem: import("vue").DefineComponent<{
25
25
  __epPropKey: true;
26
26
  };
27
27
  }>>, {}>;
28
- export type SpaceItemInstance = InstanceType<typeof SpaceItem>;
28
+ export type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown;
29
29
  export default SpaceItem;
@@ -1 +1 @@
1
- {"version":3,"file":"item.mjs","sources":["../../../../../../packages/components/space/src/item.ts"],"sourcesContent":["import { computed, defineComponent, h, renderSlot } from 'vue'\nimport { buildProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const spaceItemProps = buildProps({\n prefixCls: {\n type: String,\n },\n} as const)\nexport type SpaceItemProps = ExtractPropTypes<typeof spaceItemProps>\n\nconst SpaceItem = defineComponent({\n name: 'ElSpaceItem',\n\n props: spaceItemProps,\n\n setup(props, { slots }) {\n const ns = useNamespace('space')\n\n const classes = computed(() => `${props.prefixCls || ns.b()}__item`)\n\n return () =>\n h('div', { class: classes.value }, renderSlot(slots, 'default'))\n },\n})\nexport type SpaceItemInstance = InstanceType<typeof SpaceItem>\n\nexport default SpaceItem\n"],"names":[],"mappings":";;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACE,MAAC,SAAS,GAAG,eAAe,CAAC;AAClC,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACzE,IAAI,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAClF,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"item.mjs","sources":["../../../../../../packages/components/space/src/item.ts"],"sourcesContent":["import { computed, defineComponent, h, renderSlot } from 'vue'\nimport { buildProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const spaceItemProps = buildProps({\n prefixCls: {\n type: String,\n },\n} as const)\nexport type SpaceItemProps = ExtractPropTypes<typeof spaceItemProps>\n\nconst SpaceItem = defineComponent({\n name: 'ElSpaceItem',\n\n props: spaceItemProps,\n\n setup(props, { slots }) {\n const ns = useNamespace('space')\n\n const classes = computed(() => `${props.prefixCls || ns.b()}__item`)\n\n return () =>\n h('div', { class: classes.value }, renderSlot(slots, 'default'))\n },\n})\nexport type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown\n\nexport default SpaceItem\n"],"names":[],"mappings":";;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACE,MAAC,SAAS,GAAG,eAAe,CAAC;AAClC,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACzE,IAAI,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAClF,GAAG;AACH,CAAC;;;;"}
@@ -88,5 +88,5 @@ declare const Space: import("vue").DefineComponent<{
88
88
  readonly alignment: string;
89
89
  readonly fillRatio: number;
90
90
  }>;
91
- export type SpaceInstance = InstanceType<typeof Space>;
91
+ export type SpaceInstance = InstanceType<typeof Space> & unknown;
92
92
  export default Space;
@@ -1 +1 @@
1
- {"version":3,"file":"space.mjs","sources":["../../../../../../packages/components/space/src/space.ts"],"sourcesContent":["import {\n createTextVNode,\n createVNode,\n defineComponent,\n isVNode,\n renderSlot,\n} from 'vue'\nimport {\n PatchFlags,\n buildProps,\n definePropType,\n isArray,\n isFragment,\n isNumber,\n isString,\n isValidElementNode,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport Item from './item'\nimport { useSpace } from './use-space'\n\nimport type {\n ExtractPropTypes,\n StyleValue,\n VNode,\n VNodeArrayChildren,\n VNodeChild,\n} from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { AlignItemsProperty } from 'csstype'\n\nexport const spaceProps = buildProps({\n /**\n * @description Placement direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Classname\n */\n class: {\n type: definePropType<Arrayable<Record<string, boolean> | string>>([\n String,\n Object,\n Array,\n ]),\n default: '',\n },\n /**\n * @description Extra style rules\n */\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n default: '',\n },\n /**\n * @description Controls the alignment of items\n */\n alignment: {\n type: definePropType<AlignItemsProperty>(String),\n default: 'center',\n },\n /**\n * @description Prefix for space-items\n */\n prefixCls: {\n type: String,\n },\n /**\n * @description Spacer\n */\n spacer: {\n type: definePropType<VNodeChild>([Object, String, Number, Array]),\n default: null,\n validator: (val: unknown) => isVNode(val) || isNumber(val) || isString(val),\n },\n /**\n * @description Auto wrapping\n */\n wrap: Boolean,\n /**\n * @description Whether to fill the container\n */\n fill: Boolean,\n /**\n * @description Ratio of fill\n */\n fillRatio: {\n type: Number,\n default: 100,\n },\n /**\n * @description Spacing size\n */\n size: {\n type: [String, Array, Number],\n values: componentSizes,\n validator: (val: unknown): val is [number, number] | number => {\n return (\n isNumber(val) ||\n (isArray(val) && val.length === 2 && val.every(isNumber))\n )\n },\n },\n} as const)\nexport type SpaceProps = ExtractPropTypes<typeof spaceProps>\n\nconst Space = defineComponent({\n name: 'ElSpace',\n\n props: spaceProps,\n\n setup(props, { slots }) {\n const { classes, containerStyle, itemStyle } = useSpace(props)\n\n // retrieve the children out via a simple for loop\n // the edge case here is that when users uses directives like <v-for>, <v-if>\n // we need to go deeper until the child is not the Fragment type\n function extractChildren(\n children: VNodeArrayChildren,\n parentKey = '',\n extractedChildren: VNode[] = []\n ) {\n const { prefixCls } = props\n children.forEach((child, loopKey) => {\n if (isFragment(child)) {\n if (isArray(child.children)) {\n child.children.forEach((nested, key) => {\n if (isFragment(nested) && isArray(nested.children)) {\n extractChildren(\n nested.children,\n `${parentKey + key}-`,\n extractedChildren\n )\n } else {\n extractedChildren.push(\n createVNode(\n Item,\n {\n style: itemStyle.value,\n prefixCls,\n key: `nested-${parentKey + key}`,\n },\n {\n default: () => [nested],\n },\n PatchFlags.PROPS | PatchFlags.STYLE,\n ['style', 'prefixCls']\n )\n )\n }\n })\n }\n // if the current child is valid vnode, then append this current vnode\n // to item as child node.\n } else if (isValidElementNode(child)) {\n extractedChildren.push(\n createVNode(\n Item,\n {\n style: itemStyle.value,\n prefixCls,\n key: `LoopKey${parentKey + loopKey}`,\n },\n {\n default: () => [child],\n },\n PatchFlags.PROPS | PatchFlags.STYLE,\n ['style', 'prefixCls']\n )\n )\n }\n })\n\n return extractedChildren\n }\n\n return () => {\n const { spacer, direction } = props\n\n const children = renderSlot(slots, 'default', { key: 0 }, () => [])\n\n if ((children.children ?? []).length === 0) return null\n // loop the children, if current children is rendered via `renderList` or `<v-for>`\n if (isArray(children.children)) {\n let extractedChildren = extractChildren(children.children)\n\n if (spacer) {\n // track the current rendering index, when encounters the last element\n // then no need to add a spacer after it.\n const len = extractedChildren.length - 1\n extractedChildren = extractedChildren.reduce<VNode[]>(\n (acc, child, idx) => {\n const children = [...acc, child]\n if (idx !== len) {\n children.push(\n createVNode(\n 'span',\n // adding width 100% for vertical alignment,\n // when the spacer inherit the width from the\n // parent, this span's width was not set, so space\n // might disappear\n {\n style: [\n itemStyle.value,\n direction === 'vertical' ? 'width: 100%' : null,\n ],\n key: idx,\n },\n [\n // if spacer is already a valid vnode, then append it to the current\n // span element.\n // otherwise, treat it as string.\n isVNode(spacer)\n ? spacer\n : createTextVNode(spacer as string, PatchFlags.TEXT),\n ],\n PatchFlags.STYLE\n )\n )\n }\n return children\n },\n []\n )\n }\n\n // spacer container.\n return createVNode(\n 'div',\n {\n class: classes.value,\n style: containerStyle.value,\n },\n extractedChildren,\n PatchFlags.STYLE | PatchFlags.CLASS\n )\n }\n\n return children.children\n }\n },\n})\n\nexport type SpaceInstance = InstanceType<typeof Space>\n\nexport default Space\n"],"names":["Item"],"mappings":";;;;;;;;;AAoBY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACzD,IAAI,OAAO,EAAE,IAAI;AACjB,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AACtE,GAAG;AACH,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI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,cAAc,CAAC,KAAK;AACrC,SAAS,EAAE,iBAAiB,EAAE,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACnE,OAAO;AACP,MAAM,OAAO,QAAQ,CAAC,QAAQ,CAAC;AAC/B,KAAK,CAAC;AACN,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"space.mjs","sources":["../../../../../../packages/components/space/src/space.ts"],"sourcesContent":["import {\n createTextVNode,\n createVNode,\n defineComponent,\n isVNode,\n renderSlot,\n} from 'vue'\nimport {\n PatchFlags,\n buildProps,\n definePropType,\n isArray,\n isFragment,\n isNumber,\n isString,\n isValidElementNode,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport Item from './item'\nimport { useSpace } from './use-space'\n\nimport type {\n ExtractPropTypes,\n StyleValue,\n VNode,\n VNodeArrayChildren,\n VNodeChild,\n} from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { AlignItemsProperty } from 'csstype'\n\nexport const spaceProps = buildProps({\n /**\n * @description Placement direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Classname\n */\n class: {\n type: definePropType<Arrayable<Record<string, boolean> | string>>([\n String,\n Object,\n Array,\n ]),\n default: '',\n },\n /**\n * @description Extra style rules\n */\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n default: '',\n },\n /**\n * @description Controls the alignment of items\n */\n alignment: {\n type: definePropType<AlignItemsProperty>(String),\n default: 'center',\n },\n /**\n * @description Prefix for space-items\n */\n prefixCls: {\n type: String,\n },\n /**\n * @description Spacer\n */\n spacer: {\n type: definePropType<VNodeChild>([Object, String, Number, Array]),\n default: null,\n validator: (val: unknown) => isVNode(val) || isNumber(val) || isString(val),\n },\n /**\n * @description Auto wrapping\n */\n wrap: Boolean,\n /**\n * @description Whether to fill the container\n */\n fill: Boolean,\n /**\n * @description Ratio of fill\n */\n fillRatio: {\n type: Number,\n default: 100,\n },\n /**\n * @description Spacing size\n */\n size: {\n type: [String, Array, Number],\n values: componentSizes,\n validator: (val: unknown): val is [number, number] | number => {\n return (\n isNumber(val) ||\n (isArray(val) && val.length === 2 && val.every(isNumber))\n )\n },\n },\n} as const)\nexport type SpaceProps = ExtractPropTypes<typeof spaceProps>\n\nconst Space = defineComponent({\n name: 'ElSpace',\n\n props: spaceProps,\n\n setup(props, { slots }) {\n const { classes, containerStyle, itemStyle } = useSpace(props)\n\n // retrieve the children out via a simple for loop\n // the edge case here is that when users uses directives like <v-for>, <v-if>\n // we need to go deeper until the child is not the Fragment type\n function extractChildren(\n children: VNodeArrayChildren,\n parentKey = '',\n extractedChildren: VNode[] = []\n ) {\n const { prefixCls } = props\n children.forEach((child, loopKey) => {\n if (isFragment(child)) {\n if (isArray(child.children)) {\n child.children.forEach((nested, key) => {\n if (isFragment(nested) && isArray(nested.children)) {\n extractChildren(\n nested.children,\n `${parentKey + key}-`,\n extractedChildren\n )\n } else {\n extractedChildren.push(\n createVNode(\n Item,\n {\n style: itemStyle.value,\n prefixCls,\n key: `nested-${parentKey + key}`,\n },\n {\n default: () => [nested],\n },\n PatchFlags.PROPS | PatchFlags.STYLE,\n ['style', 'prefixCls']\n )\n )\n }\n })\n }\n // if the current child is valid vnode, then append this current vnode\n // to item as child node.\n } else if (isValidElementNode(child)) {\n extractedChildren.push(\n createVNode(\n Item,\n {\n style: itemStyle.value,\n prefixCls,\n key: `LoopKey${parentKey + loopKey}`,\n },\n {\n default: () => [child],\n },\n PatchFlags.PROPS | PatchFlags.STYLE,\n ['style', 'prefixCls']\n )\n )\n }\n })\n\n return extractedChildren\n }\n\n return () => {\n const { spacer, direction } = props\n\n const children = renderSlot(slots, 'default', { key: 0 }, () => [])\n\n if ((children.children ?? []).length === 0) return null\n // loop the children, if current children is rendered via `renderList` or `<v-for>`\n if (isArray(children.children)) {\n let extractedChildren = extractChildren(children.children)\n\n if (spacer) {\n // track the current rendering index, when encounters the last element\n // then no need to add a spacer after it.\n const len = extractedChildren.length - 1\n extractedChildren = extractedChildren.reduce<VNode[]>(\n (acc, child, idx) => {\n const children = [...acc, child]\n if (idx !== len) {\n children.push(\n createVNode(\n 'span',\n // adding width 100% for vertical alignment,\n // when the spacer inherit the width from the\n // parent, this span's width was not set, so space\n // might disappear\n {\n style: [\n itemStyle.value,\n direction === 'vertical' ? 'width: 100%' : null,\n ],\n key: idx,\n },\n [\n // if spacer is already a valid vnode, then append it to the current\n // span element.\n // otherwise, treat it as string.\n isVNode(spacer)\n ? spacer\n : createTextVNode(spacer as string, PatchFlags.TEXT),\n ],\n PatchFlags.STYLE\n )\n )\n }\n return children\n },\n []\n )\n }\n\n // spacer container.\n return createVNode(\n 'div',\n {\n class: classes.value,\n style: containerStyle.value,\n },\n extractedChildren,\n PatchFlags.STYLE | PatchFlags.CLASS\n )\n }\n\n return children.children\n }\n },\n})\n\nexport type SpaceInstance = InstanceType<typeof Space> & unknown\n\nexport default Space\n"],"names":["Item"],"mappings":";;;;;;;;;AAoBY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,QAAQ;AACrB,GA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jC,kBAAkB,SAAS,KAAK,UAAU,GAAG,aAAa,GAAG,IAAI;AACjE,iBAAiB;AACjB,gBAAgB,GAAG,EAAE,GAAG;AACxB,eAAe,EAAE;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC;AACnF,eAAe,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AACpC,aAAa;AACb,YAAY,OAAO,SAAS,CAAC;AAC7B,WAAW,EAAE,EAAE,CAAC,CAAC;AACjB,SAAS;AACT,QAAQ,OAAO,WAAW,CAAC,KAAK,EAAE;AAClC,UAAU,KAAK,EAAE,OAAO,CAAC,KAAK;AAC9B,UAAU,KAAK,EAAE,cAAc,CAAC,KAAK;AACrC,SAAS,EAAE,iBAAiB,EAAE,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACnE,OAAO;AACP,MAAM,OAAO,QAAQ,CAAC,QAAQ,CAAC;AAC/B,KAAK,CAAC;AACN,GAAG;AACH,CAAC;;;;"}
@@ -18,4 +18,4 @@ export declare const statisticProps: {
18
18
  };
19
19
  };
20
20
  export type StatisticProps = ExtractPropTypes<typeof statisticProps>;
21
- export type StatisticInstance = InstanceType<typeof Statistic>;
21
+ export type StatisticInstance = InstanceType<typeof Statistic> & unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic>\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic> & unknown\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}