@element-plus/nightly 0.0.20251115 → 0.0.20251117

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 (574) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +51 -41
  3. package/dist/index.full.min.js +10 -10
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +12 -12
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +52 -42
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/alert/index.mjs +2 -2
  277. package/es/components/alert/src/alert.d.ts +4 -5
  278. package/es/components/alert/src/alert.mjs +96 -42
  279. package/es/components/alert/src/alert.mjs.map +1 -1
  280. package/es/components/alert/src/alert.vue.d.ts +8 -12
  281. package/es/components/alert/src/alert2.mjs +40 -109
  282. package/es/components/alert/src/alert2.mjs.map +1 -1
  283. package/es/components/anchor/index.mjs +1 -1
  284. package/es/components/anchor/src/anchor-link.mjs +5 -81
  285. package/es/components/anchor/src/anchor-link.mjs.map +1 -1
  286. package/es/components/anchor/src/anchor-link2.mjs +81 -5
  287. package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
  288. package/es/components/avatar/index.mjs +2 -2
  289. package/es/components/avatar/src/avatar.mjs +31 -65
  290. package/es/components/avatar/src/avatar.mjs.map +1 -1
  291. package/es/components/avatar/src/avatar2.mjs +65 -31
  292. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  293. package/es/components/button/index.mjs +1 -1
  294. package/es/components/button/src/button-group.mjs +6 -29
  295. package/es/components/button/src/button-group.mjs.map +1 -1
  296. package/es/components/button/src/button-group2.mjs +29 -6
  297. package/es/components/button/src/button-group2.mjs.map +1 -1
  298. package/es/components/cascader/index.mjs +2 -2
  299. package/es/components/cascader/src/cascader.mjs +717 -99
  300. package/es/components/cascader/src/cascader.mjs.map +1 -1
  301. package/es/components/cascader/src/cascader2.mjs +99 -717
  302. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  303. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -60
  304. package/es/components/dialog/src/dialog-content.mjs +89 -38
  305. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  306. package/es/components/dialog/src/dialog-content2.mjs +38 -89
  307. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  308. package/es/components/dialog/src/dialog.mjs +1 -1
  309. package/es/components/dialog/src/dialog.vue.d.ts +1 -1
  310. package/es/components/dialog/src/dialog2.mjs +1 -1
  311. package/es/components/drawer/src/drawer.vue.d.ts +1 -1
  312. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  313. package/es/components/form/src/form.vue.d.ts +1 -570
  314. package/es/components/icon/index.mjs +2 -2
  315. package/es/components/icon/src/icon.mjs +8 -35
  316. package/es/components/icon/src/icon.mjs.map +1 -1
  317. package/es/components/icon/src/icon2.mjs +35 -8
  318. package/es/components/icon/src/icon2.mjs.map +1 -1
  319. package/es/components/index.mjs +19 -19
  320. package/es/components/input/src/input.d.ts +1 -1
  321. package/es/components/input/src/input.mjs +2 -2
  322. package/es/components/input/src/input.mjs.map +1 -1
  323. package/es/components/input/src/input.vue.d.ts +2 -2
  324. package/es/components/input/src/input2.mjs +1 -1
  325. package/es/components/input/src/input2.mjs.map +1 -1
  326. package/es/components/menu/src/menu.d.ts +1 -1
  327. package/es/components/message-box/src/index.vue.d.ts +1 -21
  328. package/es/components/notification/index.mjs +1 -1
  329. package/es/components/notification/src/notification.mjs +73 -147
  330. package/es/components/notification/src/notification.mjs.map +1 -1
  331. package/es/components/notification/src/notification2.mjs +147 -73
  332. package/es/components/notification/src/notification2.mjs.map +1 -1
  333. package/es/components/notification/src/notify.mjs +2 -2
  334. package/es/components/page-header/index.mjs +2 -2
  335. package/es/components/page-header/src/page-header.mjs +16 -97
  336. package/es/components/page-header/src/page-header.mjs.map +1 -1
  337. package/es/components/page-header/src/page-header2.mjs +97 -16
  338. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  339. package/es/components/pagination/src/components/jumper.mjs +7 -58
  340. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  341. package/es/components/pagination/src/components/jumper2.mjs +58 -7
  342. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  343. package/es/components/pagination/src/components/total.mjs +6 -26
  344. package/es/components/pagination/src/components/total.mjs.map +1 -1
  345. package/es/components/pagination/src/components/total2.mjs +26 -6
  346. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  347. package/es/components/pagination/src/pagination.mjs +2 -2
  348. package/es/components/popconfirm/index.mjs +2 -2
  349. package/es/components/popconfirm/src/popconfirm.mjs +133 -50
  350. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  351. package/es/components/popconfirm/src/popconfirm2.mjs +50 -133
  352. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  353. package/es/components/popper/index.mjs +2 -2
  354. package/es/components/popper/src/popper.mjs +22 -32
  355. package/es/components/popper/src/popper.mjs.map +1 -1
  356. package/es/components/popper/src/popper2.mjs +32 -22
  357. package/es/components/popper/src/popper2.mjs.map +1 -1
  358. package/es/components/progress/index.mjs +2 -2
  359. package/es/components/progress/src/progress.mjs +53 -207
  360. package/es/components/progress/src/progress.mjs.map +1 -1
  361. package/es/components/progress/src/progress2.mjs +207 -53
  362. package/es/components/progress/src/progress2.mjs.map +1 -1
  363. package/es/components/rate/index.mjs +2 -2
  364. package/es/components/rate/src/rate.mjs +83 -256
  365. package/es/components/rate/src/rate.mjs.map +1 -1
  366. package/es/components/rate/src/rate2.mjs +256 -83
  367. package/es/components/rate/src/rate2.mjs.map +1 -1
  368. package/es/components/result/index.mjs +2 -2
  369. package/es/components/result/src/result.mjs +30 -62
  370. package/es/components/result/src/result.mjs.map +1 -1
  371. package/es/components/result/src/result2.mjs +62 -30
  372. package/es/components/result/src/result2.mjs.map +1 -1
  373. package/es/components/scrollbar/src/bar.mjs +10 -64
  374. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  375. package/es/components/scrollbar/src/bar2.mjs +64 -10
  376. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  377. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  378. package/es/components/select/src/select.vue.d.ts +2 -2
  379. package/es/components/select/src/useSelect.d.ts +2 -2
  380. package/es/components/slider/index.mjs +2 -2
  381. package/es/components/slider/src/slider.mjs +88 -237
  382. package/es/components/slider/src/slider.mjs.map +1 -1
  383. package/es/components/slider/src/slider2.mjs +237 -88
  384. package/es/components/slider/src/slider2.mjs.map +1 -1
  385. package/es/components/splitter/src/split-panel.vue.d.ts +4 -1
  386. package/es/components/splitter/src/split-panel2.mjs +4 -1
  387. package/es/components/splitter/src/split-panel2.mjs.map +1 -1
  388. package/es/components/table/src/table-header/index.d.ts +1 -1
  389. package/es/components/tabs/index.mjs +2 -2
  390. package/es/components/tabs/src/tab-pane.mjs +16 -85
  391. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  392. package/es/components/tabs/src/tab-pane2.mjs +85 -16
  393. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  394. package/es/components/time-select/index.mjs +2 -2
  395. package/es/components/time-select/src/time-select.mjs +134 -64
  396. package/es/components/time-select/src/time-select.mjs.map +1 -1
  397. package/es/components/time-select/src/time-select2.mjs +64 -134
  398. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  399. package/es/components/tooltip/src/content.mjs +1 -1
  400. package/es/components/tooltip/src/tooltip.mjs +1 -1
  401. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  402. package/es/components/tree/src/model/node.d.ts +13 -0
  403. package/es/components/tree/src/model/node.mjs +25 -12
  404. package/es/components/tree/src/model/node.mjs.map +1 -1
  405. package/es/components/tree/src/model/useDragNode.d.ts +2 -0
  406. package/es/components/tree/src/tree-node.mjs +6 -1
  407. package/es/components/tree/src/tree-node.mjs.map +1 -1
  408. package/es/components/tree/src/tree.type.d.ts +1 -0
  409. package/es/components/tree/src/tree.vue.d.ts +6 -0
  410. package/es/components/tree-v2/src/composables/useFilter.d.ts +2 -2
  411. package/es/components/upload/index.mjs +1 -1
  412. package/es/components/upload/src/upload-list.mjs +25 -175
  413. package/es/components/upload/src/upload-list.mjs.map +1 -1
  414. package/es/components/upload/src/upload-list2.mjs +175 -25
  415. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  416. package/es/components/upload/src/upload2.mjs +1 -1
  417. package/es/directives/click-outside/index.mjs +1 -1
  418. package/es/hooks/use-focus-controller/index.mjs +1 -1
  419. package/es/hooks/use-model-toggle/index.mjs +1 -1
  420. package/es/index.mjs +19 -19
  421. package/es/version.d.ts +1 -1
  422. package/es/version.mjs +1 -1
  423. package/es/version.mjs.map +1 -1
  424. package/lib/components/alert/index.js +2 -2
  425. package/lib/components/alert/src/alert.d.ts +4 -5
  426. package/lib/components/alert/src/alert.js +95 -43
  427. package/lib/components/alert/src/alert.js.map +1 -1
  428. package/lib/components/alert/src/alert.vue.d.ts +8 -12
  429. package/lib/components/alert/src/alert2.js +41 -108
  430. package/lib/components/alert/src/alert2.js.map +1 -1
  431. package/lib/components/anchor/index.js +1 -1
  432. package/lib/components/anchor/src/anchor-link.js +5 -81
  433. package/lib/components/anchor/src/anchor-link.js.map +1 -1
  434. package/lib/components/anchor/src/anchor-link2.js +81 -5
  435. package/lib/components/anchor/src/anchor-link2.js.map +1 -1
  436. package/lib/components/avatar/index.js +2 -2
  437. package/lib/components/avatar/src/avatar.js +32 -65
  438. package/lib/components/avatar/src/avatar.js.map +1 -1
  439. package/lib/components/avatar/src/avatar2.js +65 -32
  440. package/lib/components/avatar/src/avatar2.js.map +1 -1
  441. package/lib/components/button/index.js +1 -1
  442. package/lib/components/button/src/button-group.js +6 -29
  443. package/lib/components/button/src/button-group.js.map +1 -1
  444. package/lib/components/button/src/button-group2.js +29 -6
  445. package/lib/components/button/src/button-group2.js.map +1 -1
  446. package/lib/components/cascader/index.js +2 -2
  447. package/lib/components/cascader/src/cascader.js +716 -99
  448. package/lib/components/cascader/src/cascader.js.map +1 -1
  449. package/lib/components/cascader/src/cascader2.js +99 -716
  450. package/lib/components/cascader/src/cascader2.js.map +1 -1
  451. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -60
  452. package/lib/components/dialog/src/dialog-content.js +88 -38
  453. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  454. package/lib/components/dialog/src/dialog-content2.js +38 -88
  455. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  456. package/lib/components/dialog/src/dialog.js +1 -1
  457. package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
  458. package/lib/components/dialog/src/dialog2.js +1 -1
  459. package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
  460. package/lib/components/dropdown/src/dropdown2.js +1 -1
  461. package/lib/components/form/src/form.vue.d.ts +1 -570
  462. package/lib/components/icon/index.js +2 -2
  463. package/lib/components/icon/src/icon.js +8 -35
  464. package/lib/components/icon/src/icon.js.map +1 -1
  465. package/lib/components/icon/src/icon2.js +35 -8
  466. package/lib/components/icon/src/icon2.js.map +1 -1
  467. package/lib/components/index.js +24 -24
  468. package/lib/components/input/src/input.d.ts +1 -1
  469. package/lib/components/input/src/input.js +2 -2
  470. package/lib/components/input/src/input.js.map +1 -1
  471. package/lib/components/input/src/input.vue.d.ts +2 -2
  472. package/lib/components/input/src/input2.js +1 -1
  473. package/lib/components/input/src/input2.js.map +1 -1
  474. package/lib/components/menu/src/menu.d.ts +1 -1
  475. package/lib/components/message-box/src/index.vue.d.ts +1 -21
  476. package/lib/components/notification/index.js +1 -1
  477. package/lib/components/notification/src/notification.js +74 -146
  478. package/lib/components/notification/src/notification.js.map +1 -1
  479. package/lib/components/notification/src/notification2.js +146 -74
  480. package/lib/components/notification/src/notification2.js.map +1 -1
  481. package/lib/components/notification/src/notify.js +2 -2
  482. package/lib/components/page-header/index.js +2 -2
  483. package/lib/components/page-header/src/page-header.js +17 -97
  484. package/lib/components/page-header/src/page-header.js.map +1 -1
  485. package/lib/components/page-header/src/page-header2.js +97 -17
  486. package/lib/components/page-header/src/page-header2.js.map +1 -1
  487. package/lib/components/pagination/src/components/jumper.js +7 -58
  488. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  489. package/lib/components/pagination/src/components/jumper2.js +58 -7
  490. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  491. package/lib/components/pagination/src/components/total.js +6 -26
  492. package/lib/components/pagination/src/components/total.js.map +1 -1
  493. package/lib/components/pagination/src/components/total2.js +26 -6
  494. package/lib/components/pagination/src/components/total2.js.map +1 -1
  495. package/lib/components/pagination/src/pagination.js +2 -2
  496. package/lib/components/popconfirm/index.js +2 -2
  497. package/lib/components/popconfirm/src/popconfirm.js +133 -51
  498. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  499. package/lib/components/popconfirm/src/popconfirm2.js +51 -133
  500. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  501. package/lib/components/popper/index.js +2 -2
  502. package/lib/components/popper/src/popper.js +25 -32
  503. package/lib/components/popper/src/popper.js.map +1 -1
  504. package/lib/components/popper/src/popper2.js +32 -25
  505. package/lib/components/popper/src/popper2.js.map +1 -1
  506. package/lib/components/progress/index.js +2 -2
  507. package/lib/components/progress/src/progress.js +53 -207
  508. package/lib/components/progress/src/progress.js.map +1 -1
  509. package/lib/components/progress/src/progress2.js +207 -53
  510. package/lib/components/progress/src/progress2.js.map +1 -1
  511. package/lib/components/rate/index.js +2 -2
  512. package/lib/components/rate/src/rate.js +83 -255
  513. package/lib/components/rate/src/rate.js.map +1 -1
  514. package/lib/components/rate/src/rate2.js +255 -83
  515. package/lib/components/rate/src/rate2.js.map +1 -1
  516. package/lib/components/result/index.js +2 -2
  517. package/lib/components/result/src/result.js +32 -62
  518. package/lib/components/result/src/result.js.map +1 -1
  519. package/lib/components/result/src/result2.js +62 -32
  520. package/lib/components/result/src/result2.js.map +1 -1
  521. package/lib/components/scrollbar/src/bar.js +10 -64
  522. package/lib/components/scrollbar/src/bar.js.map +1 -1
  523. package/lib/components/scrollbar/src/bar2.js +64 -10
  524. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  525. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  526. package/lib/components/select/src/select.vue.d.ts +2 -2
  527. package/lib/components/select/src/useSelect.d.ts +2 -2
  528. package/lib/components/slider/index.js +2 -2
  529. package/lib/components/slider/src/slider.js +89 -237
  530. package/lib/components/slider/src/slider.js.map +1 -1
  531. package/lib/components/slider/src/slider2.js +237 -89
  532. package/lib/components/slider/src/slider2.js.map +1 -1
  533. package/lib/components/splitter/src/split-panel.vue.d.ts +4 -1
  534. package/lib/components/splitter/src/split-panel2.js +4 -1
  535. package/lib/components/splitter/src/split-panel2.js.map +1 -1
  536. package/lib/components/table/src/table-header/index.d.ts +1 -1
  537. package/lib/components/tabs/index.js +2 -2
  538. package/lib/components/tabs/src/tab-pane.js +16 -85
  539. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  540. package/lib/components/tabs/src/tab-pane2.js +85 -16
  541. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  542. package/lib/components/time-select/index.js +2 -2
  543. package/lib/components/time-select/src/time-select.js +139 -64
  544. package/lib/components/time-select/src/time-select.js.map +1 -1
  545. package/lib/components/time-select/src/time-select2.js +64 -139
  546. package/lib/components/time-select/src/time-select2.js.map +1 -1
  547. package/lib/components/tooltip/src/content.js +1 -1
  548. package/lib/components/tooltip/src/tooltip.js +1 -1
  549. package/lib/components/tooltip/src/tooltip2.js +1 -1
  550. package/lib/components/tree/src/model/node.d.ts +13 -0
  551. package/lib/components/tree/src/model/node.js +25 -12
  552. package/lib/components/tree/src/model/node.js.map +1 -1
  553. package/lib/components/tree/src/model/useDragNode.d.ts +2 -0
  554. package/lib/components/tree/src/tree-node.js +6 -1
  555. package/lib/components/tree/src/tree-node.js.map +1 -1
  556. package/lib/components/tree/src/tree.type.d.ts +1 -0
  557. package/lib/components/tree/src/tree.vue.d.ts +6 -0
  558. package/lib/components/tree-v2/src/composables/useFilter.d.ts +2 -2
  559. package/lib/components/upload/index.js +1 -1
  560. package/lib/components/upload/src/upload-list.js +26 -175
  561. package/lib/components/upload/src/upload-list.js.map +1 -1
  562. package/lib/components/upload/src/upload-list2.js +175 -26
  563. package/lib/components/upload/src/upload-list2.js.map +1 -1
  564. package/lib/components/upload/src/upload2.js +1 -1
  565. package/lib/directives/click-outside/index.js +1 -1
  566. package/lib/hooks/use-focus-controller/index.js +1 -1
  567. package/lib/hooks/use-model-toggle/index.js +1 -1
  568. package/lib/index.js +24 -24
  569. package/lib/version.d.ts +1 -1
  570. package/lib/version.js +1 -1
  571. package/lib/version.js.map +1 -1
  572. package/package.json +2 -2
  573. package/tags.json +1 -1
  574. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"result2.js","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\n\nimport type { Component, ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n primary: 'icon-primary',\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n (typeof IconMap)[keyof typeof IconMap],\n Component\n> = {\n [IconMap.primary]: InfoFilled,\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\nexport type ResultPropsPublic = __ExtractPublicPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result> & unknown\n"],"names":["InfoFilled","CircleCheckFilled","WarningFilled","CircleCloseFilled","buildProps"],"mappings":";;;;;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGA,mBAAU;AAC/B,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,0BAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,sBAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAGC,0BAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAGH,mBAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAGI,kBAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AAC9D,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;;;"}
1
+ {"version":3,"file":"result2.js","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":["useNamespace","computed","IconMap","IconComponentMap"],"mappings":";;;;;;;;;uCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAaC,aAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,YAAY,IAAQ,IAAAC,cAAA,CAAQ,IAAI,CAAI,GAAAA,cAAA,CAAQ,IAAI,CAAI,GAAA,WAAA,CAAA;AAC1D,MAAA,MAAM,aACJ,GAAAC,uBAAA,CAAiB,SAAS,CAAA,IAAKA,wBAAiB,WAAW,CAAA,CAAA;AAE7D,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,72 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var util = require('./util.js');
7
- var thumb = require('./thumb2.js');
8
- var bar = require('./bar2.js');
9
- var constants = require('./constants.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
5
+ var runtime = require('../../../utils/vue/props/runtime.js');
11
6
 
12
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
13
- __name: "bar",
14
- props: bar.barProps,
15
- setup(__props, { expose }) {
16
- const props = __props;
17
- const scrollbar = vue.inject(constants.scrollbarContextKey);
18
- const moveX = vue.ref(0);
19
- const moveY = vue.ref(0);
20
- const sizeWidth = vue.ref("");
21
- const sizeHeight = vue.ref("");
22
- const ratioY = vue.ref(1);
23
- const ratioX = vue.ref(1);
24
- const handleScroll = (wrap) => {
25
- if (wrap) {
26
- const offsetHeight = wrap.offsetHeight - util.GAP;
27
- const offsetWidth = wrap.offsetWidth - util.GAP;
28
- moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
29
- moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
30
- }
31
- };
32
- const update = () => {
33
- const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
34
- if (!wrap)
35
- return;
36
- const offsetHeight = wrap.offsetHeight - util.GAP;
37
- const offsetWidth = wrap.offsetWidth - util.GAP;
38
- const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
39
- const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
40
- const height = Math.max(originalHeight, props.minSize);
41
- const width = Math.max(originalWidth, props.minSize);
42
- ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
43
- ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
44
- sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
45
- sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
46
- };
47
- expose({
48
- handleScroll,
49
- update
50
- });
51
- return (_ctx, _cache) => {
52
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
53
- vue.createVNode(thumb["default"], {
54
- move: moveX.value,
55
- ratio: ratioX.value,
56
- size: sizeWidth.value,
57
- always: _ctx.always
58
- }, null, 8, ["move", "ratio", "size", "always"]),
59
- vue.createVNode(thumb["default"], {
60
- move: moveY.value,
61
- ratio: ratioY.value,
62
- size: sizeHeight.value,
63
- vertical: "",
64
- always: _ctx.always
65
- }, null, 8, ["move", "ratio", "size", "always"])
66
- ], 64);
67
- };
7
+ const barProps = runtime.buildProps({
8
+ always: {
9
+ type: Boolean,
10
+ default: true
11
+ },
12
+ minSize: {
13
+ type: Number,
14
+ required: true
68
15
  }
69
16
  });
70
- var Bar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "bar.vue"]]);
71
17
 
72
- exports["default"] = Bar;
18
+ exports.barProps = barProps;
73
19
  //# sourceMappingURL=bar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bar.js","sources":["../../../../../../packages/components/scrollbar/src/bar.vue"],"sourcesContent":["<template>\n <thumb :move=\"moveX\" :ratio=\"ratioX\" :size=\"sizeWidth\" :always=\"always\" />\n <thumb\n :move=\"moveY\"\n :ratio=\"ratioY\"\n :size=\"sizeHeight\"\n vertical\n :always=\"always\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { GAP } from './util'\nimport Thumb from './thumb.vue'\nimport { barProps } from './bar'\nimport { scrollbarContextKey } from './constants'\n\nconst props = defineProps(barProps)\n\nconst scrollbar = inject(scrollbarContextKey)\n\nconst moveX = ref(0)\nconst moveY = ref(0)\nconst sizeWidth = ref('')\nconst sizeHeight = ref('')\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst handleScroll = (wrap: HTMLDivElement) => {\n if (wrap) {\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n moveY.value = ((wrap.scrollTop * 100) / offsetHeight) * ratioY.value\n moveX.value = ((wrap.scrollLeft * 100) / offsetWidth) * ratioX.value\n }\n}\n\nconst update = () => {\n const wrap = scrollbar?.wrapElement\n if (!wrap) return\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\ndefineExpose({\n handleScroll,\n update,\n})\n</script>\n"],"names":["inject","scrollbarContextKey","ref","GAP"],"mappings":";;;;;;;;;;;;;;;;AAoBA,IAAM,MAAA,SAAA,GAAYA,WAAOC,6BAAmB,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQC,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,KAAA,GAAQA,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,SAAA,GAAYA,QAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,UAAA,GAAaA,QAAI,EAAE,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AAEpB,IAAM,MAAA,YAAA,GAAe,CAAC,IAAyB,KAAA;AAC7C,MAAA,IAAI,IAAM,EAAA;AACR,QAAM,MAAA,YAAA,GAAe,KAAK,YAAe,GAAAC,QAAA,CAAA;AACzC,QAAM,MAAA,WAAA,GAAc,KAAK,WAAc,GAAAA,QAAA,CAAA;AAEvC,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,SAAY,GAAA,GAAA,GAAO,eAAgB,MAAO,CAAA,KAAA,CAAA;AAC/D,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,UAAa,GAAA,GAAA,GAAO,cAAe,MAAO,CAAA,KAAA,CAAA;AAAA,OACjE;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,OAAO,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,WAAA,CAAA;AACxB,MAAA,IAAI,CAAC,IAAM;AACX,QAAM,OAAA;AACN,MAAM,MAAA,YAAA,OAAmB,CAAc,YAAA,GAAAA,QAAA,CAAA;AAEvC,MAAM,MAAA,WAAA,GAAA,IAAiC,CAAA,WAAA,GAAAA,QAAA,CAAI;AAC3C,MAAM,MAAA,cAAA,GAA+B,YAAA,IAAA,CAAA,GAAS,IAAA,CAAA,YAAA,CAAA;AAC9C,MAAA,MAAM,aAAS,GAAS,WAAA,IAAA,CAAA,QAAsB,WAAO,CAAA;AACrD,MAAA,MAAM,MAAQ,GAAA,IAAK,CAAI,GAAA,CAAA,cAAe,OAAa,CAAA,OAAA,CAAA,CAAA;AAEnD,MAAA,MAAA,KACE,GAAA,IAAA,CAAA,GAAA,CAAA,aACgB,EAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAElB,MAAA,MAAA,CAAO,KACL,GAAA,cAAA,IACe,YAAA,GAAA,cAAA,CAAA,UACL,IAAc,YAAA,GAAA,MAAA,CAAA,CAAA,CAAA;AAE1B,MAAA,MAAA,CAAA,qBAA4B,IAAA,WAAqB,GAAA,aAAgB,CAAA,IAAA,KAAA,IAAA,WAAA,GAAA,KAAA,CAAA,CAAA,CAAA;AACjE,MAAA,UAAU,SAAgB,MAAA,GAAAA,QAAA,GAAoB,YAAA,GAAG,SAAY,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAAA,MAC/D,SAAA,CAAA,KAAA,GAAA,KAAA,GAAAA,QAAA,GAAA,WAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAEA,KAAa,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MACA,YAAA;AAAA,MACD,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"bar.js","sources":["../../../../../../packages/components/scrollbar/src/bar.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n minSize: {\n type: Number,\n required: true,\n },\n} as const)\nexport type BarProps = ExtractPropTypes<typeof barProps>\nexport type BarPropsPublic = __ExtractPublicPropTypes<typeof barProps>\n\nexport type BarInstance = InstanceType<typeof Bar> & unknown\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
@@ -2,18 +2,72 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ var util = require('./util.js');
7
+ var thumb = require('./thumb2.js');
8
+ var bar = require('./bar.js');
9
+ var constants = require('./constants.js');
10
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
6
11
 
7
- const barProps = runtime.buildProps({
8
- always: {
9
- type: Boolean,
10
- default: true
11
- },
12
- minSize: {
13
- type: Number,
14
- required: true
12
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
13
+ __name: "bar",
14
+ props: bar.barProps,
15
+ setup(__props, { expose }) {
16
+ const props = __props;
17
+ const scrollbar = vue.inject(constants.scrollbarContextKey);
18
+ const moveX = vue.ref(0);
19
+ const moveY = vue.ref(0);
20
+ const sizeWidth = vue.ref("");
21
+ const sizeHeight = vue.ref("");
22
+ const ratioY = vue.ref(1);
23
+ const ratioX = vue.ref(1);
24
+ const handleScroll = (wrap) => {
25
+ if (wrap) {
26
+ const offsetHeight = wrap.offsetHeight - util.GAP;
27
+ const offsetWidth = wrap.offsetWidth - util.GAP;
28
+ moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
29
+ moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
30
+ }
31
+ };
32
+ const update = () => {
33
+ const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
34
+ if (!wrap)
35
+ return;
36
+ const offsetHeight = wrap.offsetHeight - util.GAP;
37
+ const offsetWidth = wrap.offsetWidth - util.GAP;
38
+ const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
39
+ const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
40
+ const height = Math.max(originalHeight, props.minSize);
41
+ const width = Math.max(originalWidth, props.minSize);
42
+ ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
43
+ ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
44
+ sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
45
+ sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
46
+ };
47
+ expose({
48
+ handleScroll,
49
+ update
50
+ });
51
+ return (_ctx, _cache) => {
52
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
53
+ vue.createVNode(thumb["default"], {
54
+ move: moveX.value,
55
+ ratio: ratioX.value,
56
+ size: sizeWidth.value,
57
+ always: _ctx.always
58
+ }, null, 8, ["move", "ratio", "size", "always"]),
59
+ vue.createVNode(thumb["default"], {
60
+ move: moveY.value,
61
+ ratio: ratioY.value,
62
+ size: sizeHeight.value,
63
+ vertical: "",
64
+ always: _ctx.always
65
+ }, null, 8, ["move", "ratio", "size", "always"])
66
+ ], 64);
67
+ };
15
68
  }
16
69
  });
70
+ var Bar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "bar.vue"]]);
17
71
 
18
- exports.barProps = barProps;
72
+ exports["default"] = Bar;
19
73
  //# sourceMappingURL=bar2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bar2.js","sources":["../../../../../../packages/components/scrollbar/src/bar.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n minSize: {\n type: Number,\n required: true,\n },\n} as const)\nexport type BarProps = ExtractPropTypes<typeof barProps>\nexport type BarPropsPublic = __ExtractPublicPropTypes<typeof barProps>\n\nexport type BarInstance = InstanceType<typeof Bar> & unknown\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"bar2.js","sources":["../../../../../../packages/components/scrollbar/src/bar.vue"],"sourcesContent":["<template>\n <thumb :move=\"moveX\" :ratio=\"ratioX\" :size=\"sizeWidth\" :always=\"always\" />\n <thumb\n :move=\"moveY\"\n :ratio=\"ratioY\"\n :size=\"sizeHeight\"\n vertical\n :always=\"always\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { GAP } from './util'\nimport Thumb from './thumb.vue'\nimport { barProps } from './bar'\nimport { scrollbarContextKey } from './constants'\n\nconst props = defineProps(barProps)\n\nconst scrollbar = inject(scrollbarContextKey)\n\nconst moveX = ref(0)\nconst moveY = ref(0)\nconst sizeWidth = ref('')\nconst sizeHeight = ref('')\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst handleScroll = (wrap: HTMLDivElement) => {\n if (wrap) {\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n moveY.value = ((wrap.scrollTop * 100) / offsetHeight) * ratioY.value\n moveX.value = ((wrap.scrollLeft * 100) / offsetWidth) * ratioX.value\n }\n}\n\nconst update = () => {\n const wrap = scrollbar?.wrapElement\n if (!wrap) return\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\ndefineExpose({\n handleScroll,\n update,\n})\n</script>\n"],"names":["inject","scrollbarContextKey","ref","GAP"],"mappings":";;;;;;;;;;;;;;;;AAoBA,IAAM,MAAA,SAAA,GAAYA,WAAOC,6BAAmB,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQC,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,KAAA,GAAQA,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,SAAA,GAAYA,QAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,UAAA,GAAaA,QAAI,EAAE,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AAEpB,IAAM,MAAA,YAAA,GAAe,CAAC,IAAyB,KAAA;AAC7C,MAAA,IAAI,IAAM,EAAA;AACR,QAAM,MAAA,YAAA,GAAe,KAAK,YAAe,GAAAC,QAAA,CAAA;AACzC,QAAM,MAAA,WAAA,GAAc,KAAK,WAAc,GAAAA,QAAA,CAAA;AAEvC,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,SAAY,GAAA,GAAA,GAAO,eAAgB,MAAO,CAAA,KAAA,CAAA;AAC/D,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,UAAa,GAAA,GAAA,GAAO,cAAe,MAAO,CAAA,KAAA,CAAA;AAAA,OACjE;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,OAAO,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,WAAA,CAAA;AACxB,MAAA,IAAI,CAAC,IAAM;AACX,QAAM,OAAA;AACN,MAAM,MAAA,YAAA,OAAmB,CAAc,YAAA,GAAAA,QAAA,CAAA;AAEvC,MAAM,MAAA,WAAA,GAAA,IAAiC,CAAA,WAAA,GAAAA,QAAA,CAAI;AAC3C,MAAM,MAAA,cAAA,GAA+B,YAAA,IAAA,CAAA,GAAS,IAAA,CAAA,YAAA,CAAA;AAC9C,MAAA,MAAM,aAAS,GAAS,WAAA,IAAA,CAAA,QAAsB,WAAO,CAAA;AACrD,MAAA,MAAM,MAAQ,GAAA,IAAK,CAAI,GAAA,CAAA,cAAe,OAAa,CAAA,OAAA,CAAA,CAAA;AAEnD,MAAA,MAAA,KACE,GAAA,IAAA,CAAA,GAAA,CAAA,aACgB,EAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAElB,MAAA,MAAA,CAAO,KACL,GAAA,cAAA,IACe,YAAA,GAAA,cAAA,CAAA,UACL,IAAc,YAAA,GAAA,MAAA,CAAA,CAAA,CAAA;AAE1B,MAAA,MAAA,CAAA,qBAA4B,IAAA,WAAqB,GAAA,aAAgB,CAAA,IAAA,KAAA,IAAA,WAAA,GAAA,KAAA,CAAA,CAAA,CAAA;AACjE,MAAA,UAAU,SAAgB,MAAA,GAAAA,QAAA,GAAoB,YAAA,GAAG,SAAY,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAAA,MAC/D,SAAA,CAAA,KAAA,GAAA,KAAA,GAAAA,QAAA,GAAA,WAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAEA,KAAa,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MACA,YAAA;AAAA,MACD,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  var core = require('@vueuse/core');
7
- var bar = require('./bar.js');
7
+ var bar = require('./bar2.js');
8
8
  var constants = require('./constants.js');
9
9
  var scrollbar = require('./scrollbar.js');
10
10
  var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
@@ -163,8 +163,8 @@ declare const _default: import("vue").DefineComponent<{
163
163
  };
164
164
  states: {
165
165
  inputValue: string;
166
- options: Map<import("./type").OptionValue, import("./type").OptionPublicInstance>;
167
- cachedOptions: Map<import("./type").OptionValue, import("./type").OptionPublicInstance>;
166
+ options: Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, import("./type").OptionPublicInstance> & Omit<Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, import("./type").OptionPublicInstance>, keyof Map<any, any>>;
167
+ cachedOptions: Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, import("./type").OptionPublicInstance> & Omit<Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, import("./type").OptionPublicInstance>, keyof Map<any, any>>;
168
168
  optionValues: import("./type").OptionValue[];
169
169
  selected: {
170
170
  index: number;
@@ -44,8 +44,8 @@ export declare const useSelect: (props: SelectProps, emit: SelectEmits) => {
44
44
  };
45
45
  states: {
46
46
  inputValue: string;
47
- options: Map<OptionValue, OptionPublicInstance>;
48
- cachedOptions: Map<OptionValue, OptionPublicInstance>;
47
+ options: Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
48
+ cachedOptions: Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<import("@element-plus/nightly/es/utils").EpPropMergeType<(ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
49
49
  optionValues: OptionValue[];
50
50
  selected: {
51
51
  index: number;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var slider$1 = require('./src/slider.js');
6
- var slider = require('./src/slider2.js');
5
+ var slider$1 = require('./src/slider2.js');
6
+ var slider = require('./src/slider.js');
7
7
  var constants = require('./src/constants.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
@@ -2,244 +2,96 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var core = require('@vueuse/core');
7
- var index$2 = require('../../input-number/index.js');
8
- var constants = require('./constants.js');
9
- var slider = require('./slider2.js');
10
- var button = require('./button2.js');
11
- var marker = require('./marker.js');
12
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
- var useSlide = require('./composables/use-slide.js');
14
- var useStops = require('./composables/use-stops.js');
15
- var useMarks = require('./composables/use-marks.js');
16
- var useWatch = require('./composables/use-watch.js');
17
- var useLifecycle = require('./composables/use-lifecycle.js');
18
- var index = require('../../../hooks/use-namespace/index.js');
19
- var index$1 = require('../../../hooks/use-locale/index.js');
20
- var useFormItem = require('../../form/src/hooks/use-form-item.js');
21
- var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
5
+ var core = require('@popperjs/core');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
7
+ var index = require('../../../hooks/use-size/index.js');
8
+ var index$1 = require('../../../hooks/use-aria/index.js');
9
+ var event = require('../../../constants/event.js');
10
+ var types = require('../../../utils/types.js');
11
+ var shared = require('@vue/shared');
22
12
 
23
- const __default__ = vue.defineComponent({
24
- name: "ElSlider"
13
+ const sliderProps = runtime.buildProps({
14
+ modelValue: {
15
+ type: runtime.definePropType([Number, Array]),
16
+ default: 0
17
+ },
18
+ id: {
19
+ type: String,
20
+ default: void 0
21
+ },
22
+ min: {
23
+ type: Number,
24
+ default: 0
25
+ },
26
+ max: {
27
+ type: Number,
28
+ default: 100
29
+ },
30
+ step: {
31
+ type: Number,
32
+ default: 1
33
+ },
34
+ showInput: Boolean,
35
+ showInputControls: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ size: index.useSizeProp,
40
+ inputSize: index.useSizeProp,
41
+ showStops: Boolean,
42
+ showTooltip: {
43
+ type: Boolean,
44
+ default: true
45
+ },
46
+ formatTooltip: {
47
+ type: runtime.definePropType(Function),
48
+ default: void 0
49
+ },
50
+ disabled: Boolean,
51
+ range: Boolean,
52
+ vertical: Boolean,
53
+ height: String,
54
+ rangeStartLabel: {
55
+ type: String,
56
+ default: void 0
57
+ },
58
+ rangeEndLabel: {
59
+ type: String,
60
+ default: void 0
61
+ },
62
+ formatValueText: {
63
+ type: runtime.definePropType(Function),
64
+ default: void 0
65
+ },
66
+ tooltipClass: {
67
+ type: String,
68
+ default: void 0
69
+ },
70
+ placement: {
71
+ type: String,
72
+ values: core.placements,
73
+ default: "top"
74
+ },
75
+ marks: {
76
+ type: runtime.definePropType(Object)
77
+ },
78
+ validateEvent: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ persistent: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ ...index$1.useAriaProps(["ariaLabel"])
25
87
  });
26
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
- ...__default__,
28
- props: slider.sliderProps,
29
- emits: slider.sliderEmits,
30
- setup(__props, { expose, emit }) {
31
- const props = __props;
32
- const ns = index.useNamespace("slider");
33
- const { t } = index$1.useLocale();
34
- const initData = vue.reactive({
35
- firstValue: 0,
36
- secondValue: 0,
37
- oldValue: 0,
38
- dragging: false,
39
- sliderSize: 1
40
- });
41
- const {
42
- elFormItem,
43
- slider,
44
- firstButton,
45
- secondButton,
46
- sliderDisabled,
47
- minValue,
48
- maxValue,
49
- runwayStyle,
50
- barStyle,
51
- resetSize,
52
- emitChange,
53
- onSliderWrapperPrevent,
54
- onSliderClick,
55
- onSliderDown,
56
- onSliderMarkerDown,
57
- setFirstValue,
58
- setSecondValue
59
- } = useSlide.useSlide(props, initData, emit);
60
- const { stops, getStopStyle } = useStops.useStops(props, initData, minValue, maxValue);
61
- const { inputId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
62
- formItemContext: elFormItem
63
- });
64
- const sliderWrapperSize = useFormCommonProps.useFormSize();
65
- const sliderInputSize = vue.computed(() => props.inputSize || sliderWrapperSize.value);
66
- const groupLabel = vue.computed(() => {
67
- return props.ariaLabel || t("el.slider.defaultLabel", {
68
- min: props.min,
69
- max: props.max
70
- });
71
- });
72
- const firstButtonLabel = vue.computed(() => {
73
- if (props.range) {
74
- return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
75
- } else {
76
- return groupLabel.value;
77
- }
78
- });
79
- const firstValueText = vue.computed(() => {
80
- return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
81
- });
82
- const secondButtonLabel = vue.computed(() => {
83
- return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
84
- });
85
- const secondValueText = vue.computed(() => {
86
- return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
87
- });
88
- const sliderKls = vue.computed(() => [
89
- ns.b(),
90
- ns.m(sliderWrapperSize.value),
91
- ns.is("vertical", props.vertical),
92
- { [ns.m("with-input")]: props.showInput }
93
- ]);
94
- const markList = useMarks.useMarks(props);
95
- useWatch.useWatch(props, initData, minValue, maxValue, emit, elFormItem);
96
- const precision = vue.computed(() => {
97
- const precisions = [props.min, props.max, props.step].map((item) => {
98
- const decimal = `${item}`.split(".")[1];
99
- return decimal ? decimal.length : 0;
100
- });
101
- return Math.max.apply(null, precisions);
102
- });
103
- const { sliderWrapper } = useLifecycle.useLifecycle(props, initData, resetSize);
104
- const { firstValue, secondValue, sliderSize } = vue.toRefs(initData);
105
- const updateDragging = (val) => {
106
- initData.dragging = val;
107
- };
108
- core.useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, {
109
- passive: false
110
- });
111
- core.useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, {
112
- passive: false
113
- });
114
- vue.provide(constants.sliderContextKey, {
115
- ...vue.toRefs(props),
116
- sliderSize,
117
- disabled: sliderDisabled,
118
- precision,
119
- emitChange,
120
- resetSize,
121
- updateDragging
122
- });
123
- expose({
124
- onSliderClick
125
- });
126
- return (_ctx, _cache) => {
127
- var _a, _b;
128
- return vue.openBlock(), vue.createElementBlock("div", {
129
- id: _ctx.range ? vue.unref(inputId) : void 0,
130
- ref_key: "sliderWrapper",
131
- ref: sliderWrapper,
132
- class: vue.normalizeClass(vue.unref(sliderKls)),
133
- role: _ctx.range ? "group" : void 0,
134
- "aria-label": _ctx.range && !vue.unref(isLabeledByFormItem) ? vue.unref(groupLabel) : void 0,
135
- "aria-labelledby": _ctx.range && vue.unref(isLabeledByFormItem) ? (_a = vue.unref(elFormItem)) == null ? void 0 : _a.labelId : void 0
136
- }, [
137
- vue.createElementVNode("div", {
138
- ref_key: "slider",
139
- ref: slider,
140
- class: vue.normalizeClass([
141
- vue.unref(ns).e("runway"),
142
- { "show-input": _ctx.showInput && !_ctx.range },
143
- vue.unref(ns).is("disabled", vue.unref(sliderDisabled))
144
- ]),
145
- style: vue.normalizeStyle(vue.unref(runwayStyle)),
146
- onMousedown: vue.unref(onSliderDown),
147
- onTouchstartPassive: vue.unref(onSliderDown)
148
- }, [
149
- vue.createElementVNode("div", {
150
- class: vue.normalizeClass(vue.unref(ns).e("bar")),
151
- style: vue.normalizeStyle(vue.unref(barStyle))
152
- }, null, 6),
153
- vue.createVNode(button["default"], {
154
- id: !_ctx.range ? vue.unref(inputId) : void 0,
155
- ref_key: "firstButton",
156
- ref: firstButton,
157
- "model-value": vue.unref(firstValue),
158
- vertical: _ctx.vertical,
159
- "tooltip-class": _ctx.tooltipClass,
160
- placement: _ctx.placement,
161
- role: "slider",
162
- "aria-label": _ctx.range || !vue.unref(isLabeledByFormItem) ? vue.unref(firstButtonLabel) : void 0,
163
- "aria-labelledby": !_ctx.range && vue.unref(isLabeledByFormItem) ? (_b = vue.unref(elFormItem)) == null ? void 0 : _b.labelId : void 0,
164
- "aria-valuemin": _ctx.min,
165
- "aria-valuemax": _ctx.range ? vue.unref(secondValue) : _ctx.max,
166
- "aria-valuenow": vue.unref(firstValue),
167
- "aria-valuetext": vue.unref(firstValueText),
168
- "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
169
- "aria-disabled": vue.unref(sliderDisabled),
170
- "onUpdate:modelValue": vue.unref(setFirstValue)
171
- }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
172
- _ctx.range ? (vue.openBlock(), vue.createBlock(button["default"], {
173
- key: 0,
174
- ref_key: "secondButton",
175
- ref: secondButton,
176
- "model-value": vue.unref(secondValue),
177
- vertical: _ctx.vertical,
178
- "tooltip-class": _ctx.tooltipClass,
179
- placement: _ctx.placement,
180
- role: "slider",
181
- "aria-label": vue.unref(secondButtonLabel),
182
- "aria-valuemin": vue.unref(firstValue),
183
- "aria-valuemax": _ctx.max,
184
- "aria-valuenow": vue.unref(secondValue),
185
- "aria-valuetext": vue.unref(secondValueText),
186
- "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
187
- "aria-disabled": vue.unref(sliderDisabled),
188
- "onUpdate:modelValue": vue.unref(setSecondValue)
189
- }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
190
- _ctx.showStops ? (vue.openBlock(), vue.createElementBlock("div", { key: 1 }, [
191
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(stops), (item, key) => {
192
- return vue.openBlock(), vue.createElementBlock("div", {
193
- key,
194
- class: vue.normalizeClass(vue.unref(ns).e("stop")),
195
- style: vue.normalizeStyle(vue.unref(getStopStyle)(item))
196
- }, null, 6);
197
- }), 128))
198
- ])) : vue.createCommentVNode("v-if", true),
199
- vue.unref(markList).length > 0 ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
200
- vue.createElementVNode("div", null, [
201
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(markList), (item, key) => {
202
- return vue.openBlock(), vue.createElementBlock("div", {
203
- key,
204
- style: vue.normalizeStyle(vue.unref(getStopStyle)(item.position)),
205
- class: vue.normalizeClass([vue.unref(ns).e("stop"), vue.unref(ns).e("marks-stop")])
206
- }, null, 6);
207
- }), 128))
208
- ]),
209
- vue.createElementVNode("div", {
210
- class: vue.normalizeClass(vue.unref(ns).e("marks"))
211
- }, [
212
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(markList), (item, key) => {
213
- return vue.openBlock(), vue.createBlock(vue.unref(marker["default"]), {
214
- key,
215
- mark: item.mark,
216
- style: vue.normalizeStyle(vue.unref(getStopStyle)(item.position)),
217
- onMousedown: vue.withModifiers(($event) => vue.unref(onSliderMarkerDown)(item.position), ["stop"])
218
- }, null, 8, ["mark", "style", "onMousedown"]);
219
- }), 128))
220
- ], 2)
221
- ], 64)) : vue.createCommentVNode("v-if", true)
222
- ], 46, ["onMousedown", "onTouchstartPassive"]),
223
- _ctx.showInput && !_ctx.range ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElInputNumber), {
224
- key: 0,
225
- ref: "input",
226
- "model-value": vue.unref(firstValue),
227
- class: vue.normalizeClass(vue.unref(ns).e("input")),
228
- step: _ctx.step,
229
- disabled: vue.unref(sliderDisabled),
230
- controls: _ctx.showInputControls,
231
- min: _ctx.min,
232
- max: _ctx.max,
233
- precision: vue.unref(precision),
234
- size: vue.unref(sliderInputSize),
235
- "onUpdate:modelValue": vue.unref(setFirstValue),
236
- onChange: vue.unref(emitChange)
237
- }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "size", "onUpdate:modelValue", "onChange"])) : vue.createCommentVNode("v-if", true)
238
- ], 10, ["id", "role", "aria-label", "aria-labelledby"]);
239
- };
240
- }
241
- });
242
- var Slider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "slider.vue"]]);
88
+ const isValidValue = (value) => types.isNumber(value) || shared.isArray(value) && value.every(types.isNumber);
89
+ const sliderEmits = {
90
+ [event.UPDATE_MODEL_EVENT]: isValidValue,
91
+ [event.INPUT_EVENT]: isValidValue,
92
+ [event.CHANGE_EVENT]: isValidValue
93
+ };
243
94
 
244
- exports["default"] = Slider;
95
+ exports.sliderEmits = sliderEmits;
96
+ exports.sliderProps = sliderProps;
245
97
  //# sourceMappingURL=slider.js.map