@element-plus/nightly 0.0.20240130 → 0.0.20240201

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 (555) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +89 -89
  4. package/dist/index.full.min.js +10 -10
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +14 -14
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +90 -90
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/nb-no.js +1 -1
  154. package/dist/locale/nb-no.min.js +1 -1
  155. package/dist/locale/nb-no.min.mjs +1 -1
  156. package/dist/locale/nb-no.mjs +1 -1
  157. package/dist/locale/nl.js +1 -1
  158. package/dist/locale/nl.min.js +1 -1
  159. package/dist/locale/nl.min.mjs +1 -1
  160. package/dist/locale/nl.mjs +1 -1
  161. package/dist/locale/pa.js +1 -1
  162. package/dist/locale/pa.min.js +1 -1
  163. package/dist/locale/pa.min.mjs +1 -1
  164. package/dist/locale/pa.mjs +1 -1
  165. package/dist/locale/pl.js +1 -1
  166. package/dist/locale/pl.min.js +1 -1
  167. package/dist/locale/pl.min.mjs +1 -1
  168. package/dist/locale/pl.mjs +1 -1
  169. package/dist/locale/pt-br.js +1 -1
  170. package/dist/locale/pt-br.min.js +1 -1
  171. package/dist/locale/pt-br.min.mjs +1 -1
  172. package/dist/locale/pt-br.mjs +1 -1
  173. package/dist/locale/pt.js +1 -1
  174. package/dist/locale/pt.min.js +1 -1
  175. package/dist/locale/pt.min.mjs +1 -1
  176. package/dist/locale/pt.mjs +1 -1
  177. package/dist/locale/ro.js +1 -1
  178. package/dist/locale/ro.min.js +1 -1
  179. package/dist/locale/ro.min.mjs +1 -1
  180. package/dist/locale/ro.mjs +1 -1
  181. package/dist/locale/ru.js +1 -1
  182. package/dist/locale/ru.min.js +1 -1
  183. package/dist/locale/ru.min.mjs +1 -1
  184. package/dist/locale/ru.mjs +1 -1
  185. package/dist/locale/sk.js +1 -1
  186. package/dist/locale/sk.min.js +1 -1
  187. package/dist/locale/sk.min.mjs +1 -1
  188. package/dist/locale/sk.mjs +1 -1
  189. package/dist/locale/sl.js +1 -1
  190. package/dist/locale/sl.min.js +1 -1
  191. package/dist/locale/sl.min.mjs +1 -1
  192. package/dist/locale/sl.mjs +1 -1
  193. package/dist/locale/sr.js +1 -1
  194. package/dist/locale/sr.min.js +1 -1
  195. package/dist/locale/sr.min.mjs +1 -1
  196. package/dist/locale/sr.mjs +1 -1
  197. package/dist/locale/sv.js +1 -1
  198. package/dist/locale/sv.min.js +1 -1
  199. package/dist/locale/sv.min.mjs +1 -1
  200. package/dist/locale/sv.mjs +1 -1
  201. package/dist/locale/sw.js +1 -1
  202. package/dist/locale/sw.min.js +1 -1
  203. package/dist/locale/sw.min.mjs +1 -1
  204. package/dist/locale/sw.mjs +1 -1
  205. package/dist/locale/ta.js +1 -1
  206. package/dist/locale/ta.min.js +1 -1
  207. package/dist/locale/ta.min.mjs +1 -1
  208. package/dist/locale/ta.mjs +1 -1
  209. package/dist/locale/th.js +1 -1
  210. package/dist/locale/th.min.js +1 -1
  211. package/dist/locale/th.min.mjs +1 -1
  212. package/dist/locale/th.mjs +1 -1
  213. package/dist/locale/tk.js +1 -1
  214. package/dist/locale/tk.min.js +1 -1
  215. package/dist/locale/tk.min.mjs +1 -1
  216. package/dist/locale/tk.mjs +1 -1
  217. package/dist/locale/tr.js +1 -1
  218. package/dist/locale/tr.min.js +1 -1
  219. package/dist/locale/tr.min.mjs +1 -1
  220. package/dist/locale/tr.mjs +1 -1
  221. package/dist/locale/ug-cn.js +1 -1
  222. package/dist/locale/ug-cn.min.js +1 -1
  223. package/dist/locale/ug-cn.min.mjs +1 -1
  224. package/dist/locale/ug-cn.mjs +1 -1
  225. package/dist/locale/uk.js +1 -1
  226. package/dist/locale/uk.min.js +1 -1
  227. package/dist/locale/uk.min.mjs +1 -1
  228. package/dist/locale/uk.mjs +1 -1
  229. package/dist/locale/uz-uz.js +1 -1
  230. package/dist/locale/uz-uz.min.js +1 -1
  231. package/dist/locale/uz-uz.min.mjs +1 -1
  232. package/dist/locale/uz-uz.mjs +1 -1
  233. package/dist/locale/vi.js +1 -1
  234. package/dist/locale/vi.min.js +1 -1
  235. package/dist/locale/vi.min.mjs +1 -1
  236. package/dist/locale/vi.mjs +1 -1
  237. package/dist/locale/zh-cn.js +1 -1
  238. package/dist/locale/zh-cn.min.js +1 -1
  239. package/dist/locale/zh-cn.min.mjs +1 -1
  240. package/dist/locale/zh-cn.mjs +1 -1
  241. package/dist/locale/zh-tw.js +1 -1
  242. package/dist/locale/zh-tw.min.js +1 -1
  243. package/dist/locale/zh-tw.min.mjs +1 -1
  244. package/dist/locale/zh-tw.mjs +1 -1
  245. package/es/components/alert/index.d.ts +4 -4
  246. package/es/components/alert/src/alert.d.ts +1 -1
  247. package/es/components/alert/src/alert.vue.d.ts +4 -4
  248. package/es/components/autocomplete/index.d.ts +65 -65
  249. package/es/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
  250. package/es/components/button/index.d.ts +5 -5
  251. package/es/components/button/src/button.d.ts +1 -1
  252. package/es/components/button/src/button.vue.d.ts +5 -5
  253. package/es/components/button/src/use-button.d.ts +1 -1
  254. package/es/components/calendar/index.d.ts +5 -5
  255. package/es/components/calendar/src/calendar.vue.d.ts +5 -5
  256. package/es/components/carousel/index.d.ts +5 -5
  257. package/es/components/carousel/src/carousel.d.ts +1 -1
  258. package/es/components/carousel/src/carousel.vue.d.ts +5 -5
  259. package/es/components/cascader/index.d.ts +128 -128
  260. package/es/components/cascader/src/cascader.vue.d.ts +64 -64
  261. package/es/components/color-picker/index.d.ts +38 -38
  262. package/es/components/color-picker/src/color-picker.vue.d.ts +38 -38
  263. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
  264. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
  265. package/es/components/date-picker/src/panel-utils.d.ts +34 -34
  266. package/es/components/dialog/index.d.ts +1 -1
  267. package/es/components/dialog/src/dialog.vue.d.ts +1 -1
  268. package/es/components/drawer/index.d.ts +4 -1
  269. package/es/components/drawer/src/drawer.vue.d.ts +4 -1
  270. package/es/components/drawer/src/drawer2.mjs +7 -1
  271. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  272. package/es/components/dropdown/index.d.ts +14 -14
  273. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  274. package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
  275. package/es/components/dropdown/src/dropdown.vue.d.ts +12 -12
  276. package/es/components/empty/index.mjs +2 -2
  277. package/es/components/empty/src/empty.mjs +55 -11
  278. package/es/components/empty/src/empty.mjs.map +1 -1
  279. package/es/components/empty/src/empty2.mjs +11 -55
  280. package/es/components/empty/src/empty2.mjs.map +1 -1
  281. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  282. package/es/components/form/index.d.ts +12 -12
  283. package/es/components/form/src/form-item.d.ts +1 -1
  284. package/es/components/form/src/form-item.vue.d.ts +5 -5
  285. package/es/components/image/index.d.ts +1 -1
  286. package/es/components/image/src/image.vue.d.ts +1 -1
  287. package/es/components/index.mjs +2 -2
  288. package/es/components/input/index.d.ts +12 -12
  289. package/es/components/input/src/input.vue.d.ts +12 -12
  290. package/es/components/input-number/index.d.ts +45 -45
  291. package/es/components/input-number/src/input-number.vue.d.ts +45 -45
  292. package/es/components/menu/index.d.ts +3 -3
  293. package/es/components/menu/src/menu.d.ts +4 -4
  294. package/es/components/menu/src/menu.mjs +10 -3
  295. package/es/components/menu/src/menu.mjs.map +1 -1
  296. package/es/components/message/src/message.d.ts +1 -1
  297. package/es/components/message/src/message.vue.d.ts +4 -4
  298. package/es/components/message-box/src/index.vue.d.ts +1 -1
  299. package/es/components/notification/src/notification.d.ts +1 -1
  300. package/es/components/notification/src/notification.vue.d.ts +4 -4
  301. package/es/components/pagination/src/components/jumper.vue.d.ts +12 -12
  302. package/es/components/pagination/src/components/sizes.vue.d.ts +27 -27
  303. package/es/components/popconfirm/index.d.ts +23 -23
  304. package/es/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
  305. package/es/components/popover/index.d.ts +18 -18
  306. package/es/components/popover/src/popover.vue.d.ts +18 -18
  307. package/es/components/popper/src/content.vue.d.ts +6 -6
  308. package/es/components/radio/index.mjs +2 -2
  309. package/es/components/radio/src/radio-button.mjs +1 -1
  310. package/es/components/radio/src/radio-group.mjs +1 -1
  311. package/es/components/radio/src/radio.mjs +73 -30
  312. package/es/components/radio/src/radio.mjs.map +1 -1
  313. package/es/components/radio/src/radio2.mjs +30 -73
  314. package/es/components/radio/src/radio2.mjs.map +1 -1
  315. package/es/components/result/index.d.ts +4 -4
  316. package/es/components/result/src/result.d.ts +1 -1
  317. package/es/components/result/src/result.vue.d.ts +4 -4
  318. package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
  319. package/es/components/select/index.d.ts +27 -27
  320. package/es/components/select/index.mjs +1 -1
  321. package/es/components/select/src/option-group.mjs +3 -1
  322. package/es/components/select/src/option-group.mjs.map +1 -1
  323. package/es/components/select/src/select.mjs +370 -102
  324. package/es/components/select/src/select.mjs.map +1 -1
  325. package/es/components/select/src/select.vue.d.ts +27 -27
  326. package/es/components/select/src/select2.mjs +102 -370
  327. package/es/components/select/src/select2.mjs.map +1 -1
  328. package/es/components/select/src/useSelect.d.ts +25 -25
  329. package/es/components/select-v2/index.d.ts +54 -54
  330. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  331. package/es/components/select-v2/src/select.vue.d.ts +27 -27
  332. package/es/components/select-v2/src/useSelect.d.ts +25 -25
  333. package/es/components/slider/index.d.ts +75 -75
  334. package/es/components/slider/src/button.vue.d.ts +6 -6
  335. package/es/components/slider/src/composables/use-slide.d.ts +24 -24
  336. package/es/components/slider/src/slider.vue.d.ts +75 -75
  337. package/es/components/steps/index.d.ts +16 -16
  338. package/es/components/steps/src/item.d.ts +1 -1
  339. package/es/components/steps/src/item.vue.d.ts +4 -4
  340. package/es/components/steps/src/steps.d.ts +2 -2
  341. package/es/components/steps/src/steps.vue.d.ts +8 -8
  342. package/es/components/table/index.d.ts +1 -1
  343. package/es/components/table/src/filter-panel.vue.d.ts +12 -12
  344. package/es/components/table/src/table.vue.d.ts +1 -1
  345. package/es/components/tag/index.d.ts +1 -1
  346. package/es/components/tag/src/tag.vue.d.ts +1 -1
  347. package/es/components/time-picker/src/common/picker.vue.d.ts +34 -34
  348. package/es/components/time-select/index.d.ts +114 -114
  349. package/es/components/time-select/src/time-select.vue.d.ts +57 -57
  350. package/es/components/tooltip/index.d.ts +6 -6
  351. package/es/components/tooltip/src/content.vue.d.ts +6 -6
  352. package/es/components/tooltip/src/tooltip.vue.d.ts +6 -6
  353. package/es/components/tooltip-v2/index.d.ts +4 -4
  354. package/es/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
  355. package/es/components/tour/index.d.ts +53 -6252
  356. package/es/components/tour/src/content.vue.d.ts +1 -1
  357. package/es/components/tour/src/helper.d.ts +8 -8
  358. package/es/components/tour/src/helper.mjs +3 -45
  359. package/es/components/tour/src/helper.mjs.map +1 -1
  360. package/es/components/tour/src/step.d.ts +4 -14
  361. package/es/components/tour/src/step.mjs +6 -4
  362. package/es/components/tour/src/step.mjs.map +1 -1
  363. package/es/components/tour/src/step.vue.d.ts +29 -54
  364. package/es/components/tour/src/step2.mjs +17 -5
  365. package/es/components/tour/src/step2.mjs.map +1 -1
  366. package/es/components/tour/src/steps.d.ts +2 -2
  367. package/es/components/tour/src/steps.mjs +7 -9
  368. package/es/components/tour/src/steps.mjs.map +1 -1
  369. package/es/components/tour/src/tour.vue.d.ts +10 -6156
  370. package/es/components/tour/src/tour2.mjs +26 -20
  371. package/es/components/tour/src/tour2.mjs.map +1 -1
  372. package/es/components/tour/src/types.d.ts +5 -16
  373. package/es/components/transfer/index.d.ts +65 -65
  374. package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  375. package/es/components/transfer/src/transfer.vue.d.ts +65 -65
  376. package/es/components/tree-v2/index.d.ts +1 -1
  377. package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
  378. package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
  379. package/es/components/upload/index.d.ts +41 -5
  380. package/es/components/upload/src/upload-content.vue.d.ts +1 -1
  381. package/es/components/upload/src/upload-list.d.ts +6 -0
  382. package/es/components/upload/src/upload-list.mjs +3 -0
  383. package/es/components/upload/src/upload-list.mjs.map +1 -1
  384. package/es/components/upload/src/upload-list.vue.d.ts +18 -0
  385. package/es/components/upload/src/upload-list2.mjs +2 -1
  386. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  387. package/es/components/upload/src/upload.d.ts +8 -0
  388. package/es/components/upload/src/upload.mjs +3 -0
  389. package/es/components/upload/src/upload.mjs.map +1 -1
  390. package/es/components/upload/src/upload.vue.d.ts +41 -5
  391. package/es/components/upload/src/upload2.mjs +4 -2
  392. package/es/components/upload/src/upload2.mjs.map +1 -1
  393. package/es/index.mjs +2 -2
  394. package/es/version.d.ts +1 -1
  395. package/es/version.mjs +1 -1
  396. package/es/version.mjs.map +1 -1
  397. package/lib/components/alert/index.d.ts +4 -4
  398. package/lib/components/alert/src/alert.d.ts +1 -1
  399. package/lib/components/alert/src/alert.vue.d.ts +4 -4
  400. package/lib/components/autocomplete/index.d.ts +65 -65
  401. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
  402. package/lib/components/button/index.d.ts +5 -5
  403. package/lib/components/button/src/button.d.ts +1 -1
  404. package/lib/components/button/src/button.vue.d.ts +5 -5
  405. package/lib/components/button/src/use-button.d.ts +1 -1
  406. package/lib/components/calendar/index.d.ts +5 -5
  407. package/lib/components/calendar/src/calendar.vue.d.ts +5 -5
  408. package/lib/components/carousel/index.d.ts +5 -5
  409. package/lib/components/carousel/src/carousel.d.ts +1 -1
  410. package/lib/components/carousel/src/carousel.vue.d.ts +5 -5
  411. package/lib/components/cascader/index.d.ts +128 -128
  412. package/lib/components/cascader/src/cascader.vue.d.ts +64 -64
  413. package/lib/components/color-picker/index.d.ts +38 -38
  414. package/lib/components/color-picker/src/color-picker.vue.d.ts +38 -38
  415. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
  416. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
  417. package/lib/components/date-picker/src/panel-utils.d.ts +34 -34
  418. package/lib/components/dialog/index.d.ts +1 -1
  419. package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
  420. package/lib/components/drawer/index.d.ts +4 -1
  421. package/lib/components/drawer/src/drawer.vue.d.ts +4 -1
  422. package/lib/components/drawer/src/drawer2.js +7 -1
  423. package/lib/components/drawer/src/drawer2.js.map +1 -1
  424. package/lib/components/dropdown/index.d.ts +14 -14
  425. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  426. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
  427. package/lib/components/dropdown/src/dropdown.vue.d.ts +12 -12
  428. package/lib/components/empty/index.js +2 -2
  429. package/lib/components/empty/src/empty.js +55 -11
  430. package/lib/components/empty/src/empty.js.map +1 -1
  431. package/lib/components/empty/src/empty2.js +11 -55
  432. package/lib/components/empty/src/empty2.js.map +1 -1
  433. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  434. package/lib/components/form/index.d.ts +12 -12
  435. package/lib/components/form/src/form-item.d.ts +1 -1
  436. package/lib/components/form/src/form-item.vue.d.ts +5 -5
  437. package/lib/components/image/index.d.ts +1 -1
  438. package/lib/components/image/src/image.vue.d.ts +1 -1
  439. package/lib/components/index.js +2 -2
  440. package/lib/components/input/index.d.ts +12 -12
  441. package/lib/components/input/src/input.vue.d.ts +12 -12
  442. package/lib/components/input-number/index.d.ts +45 -45
  443. package/lib/components/input-number/src/input-number.vue.d.ts +45 -45
  444. package/lib/components/menu/index.d.ts +3 -3
  445. package/lib/components/menu/src/menu.d.ts +4 -4
  446. package/lib/components/menu/src/menu.js +10 -3
  447. package/lib/components/menu/src/menu.js.map +1 -1
  448. package/lib/components/message/src/message.d.ts +1 -1
  449. package/lib/components/message/src/message.vue.d.ts +4 -4
  450. package/lib/components/message-box/src/index.vue.d.ts +1 -1
  451. package/lib/components/notification/src/notification.d.ts +1 -1
  452. package/lib/components/notification/src/notification.vue.d.ts +4 -4
  453. package/lib/components/pagination/src/components/jumper.vue.d.ts +12 -12
  454. package/lib/components/pagination/src/components/sizes.vue.d.ts +27 -27
  455. package/lib/components/popconfirm/index.d.ts +23 -23
  456. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
  457. package/lib/components/popover/index.d.ts +18 -18
  458. package/lib/components/popover/src/popover.vue.d.ts +18 -18
  459. package/lib/components/popper/src/content.vue.d.ts +6 -6
  460. package/lib/components/radio/index.js +2 -2
  461. package/lib/components/radio/src/radio-button.js +1 -1
  462. package/lib/components/radio/src/radio-group.js +1 -1
  463. package/lib/components/radio/src/radio.js +73 -32
  464. package/lib/components/radio/src/radio.js.map +1 -1
  465. package/lib/components/radio/src/radio2.js +32 -73
  466. package/lib/components/radio/src/radio2.js.map +1 -1
  467. package/lib/components/result/index.d.ts +4 -4
  468. package/lib/components/result/src/result.d.ts +1 -1
  469. package/lib/components/result/src/result.vue.d.ts +4 -4
  470. package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
  471. package/lib/components/select/index.d.ts +27 -27
  472. package/lib/components/select/index.js +1 -1
  473. package/lib/components/select/src/option-group.js +3 -1
  474. package/lib/components/select/src/option-group.js.map +1 -1
  475. package/lib/components/select/src/select.js +370 -102
  476. package/lib/components/select/src/select.js.map +1 -1
  477. package/lib/components/select/src/select.vue.d.ts +27 -27
  478. package/lib/components/select/src/select2.js +102 -370
  479. package/lib/components/select/src/select2.js.map +1 -1
  480. package/lib/components/select/src/useSelect.d.ts +25 -25
  481. package/lib/components/select-v2/index.d.ts +54 -54
  482. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  483. package/lib/components/select-v2/src/select.vue.d.ts +27 -27
  484. package/lib/components/select-v2/src/useSelect.d.ts +25 -25
  485. package/lib/components/slider/index.d.ts +75 -75
  486. package/lib/components/slider/src/button.vue.d.ts +6 -6
  487. package/lib/components/slider/src/composables/use-slide.d.ts +24 -24
  488. package/lib/components/slider/src/slider.vue.d.ts +75 -75
  489. package/lib/components/steps/index.d.ts +16 -16
  490. package/lib/components/steps/src/item.d.ts +1 -1
  491. package/lib/components/steps/src/item.vue.d.ts +4 -4
  492. package/lib/components/steps/src/steps.d.ts +2 -2
  493. package/lib/components/steps/src/steps.vue.d.ts +8 -8
  494. package/lib/components/table/index.d.ts +1 -1
  495. package/lib/components/table/src/filter-panel.vue.d.ts +12 -12
  496. package/lib/components/table/src/table.vue.d.ts +1 -1
  497. package/lib/components/tag/index.d.ts +1 -1
  498. package/lib/components/tag/src/tag.vue.d.ts +1 -1
  499. package/lib/components/time-picker/src/common/picker.vue.d.ts +34 -34
  500. package/lib/components/time-select/index.d.ts +114 -114
  501. package/lib/components/time-select/src/time-select.vue.d.ts +57 -57
  502. package/lib/components/tooltip/index.d.ts +6 -6
  503. package/lib/components/tooltip/src/content.vue.d.ts +6 -6
  504. package/lib/components/tooltip/src/tooltip.vue.d.ts +6 -6
  505. package/lib/components/tooltip-v2/index.d.ts +4 -4
  506. package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
  507. package/lib/components/tour/index.d.ts +53 -6252
  508. package/lib/components/tour/src/content.vue.d.ts +1 -1
  509. package/lib/components/tour/src/helper.d.ts +8 -8
  510. package/lib/components/tour/src/helper.js +0 -44
  511. package/lib/components/tour/src/helper.js.map +1 -1
  512. package/lib/components/tour/src/step.d.ts +4 -14
  513. package/lib/components/tour/src/step.js +6 -4
  514. package/lib/components/tour/src/step.js.map +1 -1
  515. package/lib/components/tour/src/step.vue.d.ts +29 -54
  516. package/lib/components/tour/src/step2.js +16 -4
  517. package/lib/components/tour/src/step2.js.map +1 -1
  518. package/lib/components/tour/src/steps.d.ts +2 -2
  519. package/lib/components/tour/src/steps.js +7 -9
  520. package/lib/components/tour/src/steps.js.map +1 -1
  521. package/lib/components/tour/src/tour.vue.d.ts +10 -6156
  522. package/lib/components/tour/src/tour2.js +26 -20
  523. package/lib/components/tour/src/tour2.js.map +1 -1
  524. package/lib/components/tour/src/types.d.ts +5 -16
  525. package/lib/components/transfer/index.d.ts +65 -65
  526. package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  527. package/lib/components/transfer/src/transfer.vue.d.ts +65 -65
  528. package/lib/components/tree-v2/index.d.ts +1 -1
  529. package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
  530. package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
  531. package/lib/components/upload/index.d.ts +41 -5
  532. package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
  533. package/lib/components/upload/src/upload-list.d.ts +6 -0
  534. package/lib/components/upload/src/upload-list.js +3 -0
  535. package/lib/components/upload/src/upload-list.js.map +1 -1
  536. package/lib/components/upload/src/upload-list.vue.d.ts +18 -0
  537. package/lib/components/upload/src/upload-list2.js +2 -1
  538. package/lib/components/upload/src/upload-list2.js.map +1 -1
  539. package/lib/components/upload/src/upload.d.ts +8 -0
  540. package/lib/components/upload/src/upload.js +3 -0
  541. package/lib/components/upload/src/upload.js.map +1 -1
  542. package/lib/components/upload/src/upload.vue.d.ts +41 -5
  543. package/lib/components/upload/src/upload2.js +4 -2
  544. package/lib/components/upload/src/upload2.js.map +1 -1
  545. package/lib/index.js +2 -2
  546. package/lib/version.d.ts +1 -1
  547. package/lib/version.js +1 -1
  548. package/lib/version.js.map +1 -1
  549. package/package.json +2 -2
  550. package/tags.json +1 -1
  551. package/theme-chalk/el-tour.css +1 -1
  552. package/theme-chalk/index.css +1 -1
  553. package/theme-chalk/src/common/var.scss +2 -2
  554. package/theme-chalk/src/tour.scss +16 -13
  555. package/web-types.json +1 -1
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
53
53
  };
54
54
  }, {
55
55
  onKeydown: (e: KeyboardEvent) => void;
56
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusin" | "focusout" | "focusAfterTrapped" | "focusAfterReleased" | "focusout-prevented" | "release-requested")[], "focusin" | "focusout" | "focusAfterTrapped" | "focusAfterReleased" | "focusout-prevented" | "release-requested", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested")[], "focusAfterTrapped" | "focusAfterReleased" | "focusin" | "focusout" | "focusout-prevented" | "release-requested", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
57
57
  loop: BooleanConstructor;
58
58
  trapped: BooleanConstructor;
59
59
  focusTrapEl: import("vue").PropType<HTMLElement>;
@@ -1,22 +1,24 @@
1
- import type { CSSProperties, Component, ComputedRef, InjectionKey, Ref, SetupContext, VNode } from 'vue';
1
+ import type { CSSProperties, Component, InjectionKey, Ref, SetupContext } from 'vue';
2
2
  import type { UseNamespaceReturn } from '@element-plus/nightly/es/hooks';
3
3
  import type { TourGap, TourMask } from './types';
4
4
  import type { Placement, Strategy, VirtualElement } from '@floating-ui/dom';
5
+ import type { TourStepProps } from './step';
5
6
  export declare const useTarget: (target: Ref<string | HTMLElement | (() => HTMLElement | null) | null | undefined>, open: Ref<boolean>, gap: Ref<TourGap>, mergedMask: Ref<TourMask>, scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>) => {
6
- mergedPosInfo: ComputedRef<{
7
+ mergedPosInfo: import("vue").ComputedRef<{
7
8
  left: number;
8
9
  top: number;
9
10
  width: number;
10
11
  height: number;
11
12
  radius: number;
12
13
  } | null>;
13
- triggerTarget: ComputedRef<HTMLElement | {
14
+ triggerTarget: import("vue").ComputedRef<HTMLElement | {
14
15
  getBoundingClientRect(): DOMRect;
15
16
  } | undefined>;
16
17
  };
17
18
  export interface TourContext {
19
+ currentStep: Ref<TourStepProps | undefined>;
18
20
  current: Ref<number>;
19
- total: ComputedRef<number>;
21
+ total: Ref<number>;
20
22
  showClose: Ref<boolean>;
21
23
  closeIcon: Ref<string | Component>;
22
24
  mergedType: Ref<'default' | 'primary' | undefined>;
@@ -28,10 +30,8 @@ export interface TourContext {
28
30
  onChange(): void;
29
31
  }
30
32
  export declare const tourKey: InjectionKey<TourContext>;
31
- export declare function isSameSteps(a: any[], b: any[]): boolean;
32
- export declare const getNormalizedProps: (node: VNode, booleanKeys: string[]) => Record<string, any>;
33
33
  export declare const useFloating: (referenceRef: Ref<HTMLElement | VirtualElement | null>, contentRef: Ref<HTMLElement | null>, arrowRef: Ref<HTMLElement | null>, placement: Ref<Placement | undefined>, strategy: Ref<Strategy>, offset: Ref<number>, zIndex: Ref<number>, showArrow: Ref<boolean>) => {
34
34
  update: () => Promise<void>;
35
- contentStyle: ComputedRef<CSSProperties>;
36
- arrowStyle: ComputedRef<CSSProperties>;
35
+ contentStyle: import("vue").ComputedRef<CSSProperties>;
36
+ arrowStyle: import("vue").ComputedRef<CSSProperties>;
37
37
  };
@@ -1,7 +1,7 @@
1
- import { ref, onMounted, watch, onBeforeUnmount, computed, isVNode, camelize, unref, watchEffect } from 'vue';
1
+ import { ref, onMounted, watch, onBeforeUnmount, computed, unref, watchEffect } from 'vue';
2
2
  import { offset, flip, shift, arrow, computePosition, autoUpdate, detectOverflow } from '@floating-ui/dom';
3
3
  import '../../../utils/index.mjs';
4
- import { isString, isFunction, isArray, hasOwn } from '@vue/shared';
4
+ import { isString, isFunction, isArray } from '@vue/shared';
5
5
  import { isClient } from '@vueuse/core';
6
6
  import { keysOf } from '../../../utils/objects.mjs';
7
7
 
@@ -95,48 +95,6 @@ function isInViewPort(element) {
95
95
  const { top, right, bottom, left } = element.getBoundingClientRect();
96
96
  return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
97
97
  }
98
- const isSameProps = (a, b) => {
99
- if (Object.keys(a).length !== Object.keys(b).length)
100
- return false;
101
- for (const key in a) {
102
- if (a[key] !== b[key]) {
103
- return false;
104
- }
105
- }
106
- return true;
107
- };
108
- function isSameSteps(a, b) {
109
- if (a.length !== b.length)
110
- return false;
111
- for (const [index] of a.entries()) {
112
- if (isSameProps(a[index], b[index])) {
113
- return false;
114
- }
115
- }
116
- return true;
117
- }
118
- const getNormalizedProps = (node, booleanKeys) => {
119
- var _a;
120
- if (!isVNode(node)) {
121
- return {};
122
- }
123
- const raw = node.props || {};
124
- const type = ((_a = node.type) == null ? void 0 : _a.props) || {};
125
- const props = {};
126
- Object.keys(type).forEach((key) => {
127
- if (hasOwn(type[key], "default")) {
128
- props[key] = type[key].default;
129
- }
130
- });
131
- Object.keys(raw).forEach((key) => {
132
- const cameKey = camelize(key);
133
- props[cameKey] = raw[key];
134
- if (booleanKeys.includes(cameKey) && props[cameKey] === "") {
135
- props[cameKey] = true;
136
- }
137
- });
138
- return props;
139
- };
140
98
  const useFloating = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
141
99
  const x = ref();
142
100
  const y = ref();
@@ -243,5 +201,5 @@ const overflowMiddleware = () => {
243
201
  };
244
202
  };
245
203
 
246
- export { getNormalizedProps, isSameSteps, tourKey, useFloating, useTarget };
204
+ export { tourKey, useFloating, useTarget };
247
205
  //# sourceMappingURL=helper.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.mjs","sources":["../../../../../../packages/components/tour/src/helper.ts"],"sourcesContent":["import {\n camelize,\n computed,\n isVNode,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n detectOverflow,\n flip,\n offset as offsetMiddelware,\n shift,\n} from '@floating-ui/dom'\nimport {\n hasOwn,\n isArray,\n isClient,\n isFunction,\n isString,\n keysOf,\n} from '@element-plus/utils'\n\nimport type {\n CSSProperties,\n Component,\n ComputedRef,\n InjectionKey,\n Ref,\n SetupContext,\n VNode,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { PosInfo, TourGap, TourMask } from './types'\nimport type {\n ComputePositionReturn,\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n} from '@floating-ui/dom'\n\nexport const useTarget = (\n target: Ref<\n string | HTMLElement | (() => HTMLElement | null) | null | undefined\n >,\n open: Ref<boolean>,\n gap: Ref<TourGap>,\n mergedMask: Ref<TourMask>,\n scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>\n) => {\n const posInfo: Ref<PosInfo | null> = ref(null)\n\n const getTargetEl = () => {\n let targetEl: HTMLElement | null | undefined\n if (isString(target.value)) {\n targetEl = document.querySelector<HTMLElement>(target.value)\n } else if (isFunction(target.value)) {\n targetEl = target.value()\n } else {\n targetEl = target.value\n }\n return targetEl\n }\n\n const updatePosInfo = () => {\n const targetEl = getTargetEl()\n if (!targetEl || !open.value) {\n posInfo.value = null\n return\n }\n if (!isInViewPort(targetEl) && open.value) {\n targetEl.scrollIntoView(scrollIntoViewOptions.value)\n }\n const { left, top, width, height } = targetEl.getBoundingClientRect()\n posInfo.value = {\n left,\n top,\n width,\n height,\n radius: 0,\n }\n }\n\n onMounted(() => {\n watch(\n [open, target],\n () => {\n updatePosInfo()\n },\n {\n immediate: true,\n }\n )\n window.addEventListener('resize', updatePosInfo)\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', updatePosInfo)\n })\n\n const getGapOffset = (index: number) =>\n (isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ??\n 6\n\n const mergedPosInfo = computed(() => {\n if (!posInfo.value) return posInfo.value\n\n const gapOffsetX = getGapOffset(0)\n const gapOffsetY = getGapOffset(1)\n const gapRadius = gap.value?.radius || 2\n\n return {\n left: posInfo.value.left - gapOffsetX,\n top: posInfo.value.top - gapOffsetY,\n width: posInfo.value.width + gapOffsetX * 2,\n height: posInfo.value.height + gapOffsetY * 2,\n radius: gapRadius,\n }\n })\n\n const triggerTarget = computed(() => {\n const targetEl = getTargetEl()\n if (!mergedMask.value || !targetEl || !window.DOMRect) {\n return targetEl || undefined\n }\n\n return {\n getBoundingClientRect() {\n return window.DOMRect.fromRect({\n width: mergedPosInfo.value?.width || 0,\n height: mergedPosInfo.value?.height || 0,\n x: mergedPosInfo.value?.left || 0,\n y: mergedPosInfo.value?.top || 0,\n })\n },\n }\n })\n\n return {\n mergedPosInfo,\n triggerTarget,\n }\n}\n\nexport interface TourContext {\n current: Ref<number>\n total: ComputedRef<number>\n showClose: Ref<boolean>\n closeIcon: Ref<string | Component>\n mergedType: Ref<'default' | 'primary' | undefined>\n ns: UseNamespaceReturn\n slots: SetupContext['slots']\n updateModelValue(modelValue: boolean): void\n onClose(): void\n onFinish(): void\n onChange(): void\n}\n\nexport const tourKey: InjectionKey<TourContext> = Symbol('ElTour')\n\nfunction isInViewPort(element: HTMLElement) {\n const viewWidth = window.innerWidth || document.documentElement.clientWidth\n const viewHeight = window.innerHeight || document.documentElement.clientHeight\n const { top, right, bottom, left } = element.getBoundingClientRect()\n\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight\n}\n\nconst isSameProps = (a: Record<string, any>, b: Record<string, any>) => {\n if (Object.keys(a).length !== Object.keys(b).length) return false\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false\n }\n }\n return true\n}\n\nexport function isSameSteps(a: any[], b: any[]) {\n if (a.length !== b.length) return false\n for (const [index] of a.entries()) {\n if (isSameProps(a[index], b[index])) {\n return false\n }\n }\n return true\n}\n\nexport const getNormalizedProps = (node: VNode, booleanKeys: string[]) => {\n if (!isVNode(node)) {\n return {}\n }\n\n const raw = node.props || {}\n const type = (node.type as any)?.props || {}\n const props: Record<string, any> = {}\n Object.keys(type).forEach((key) => {\n if (hasOwn(type[key], 'default')) {\n props[key] = type[key].default\n }\n })\n\n Object.keys(raw).forEach((key) => {\n const cameKey = camelize(key)\n props[cameKey] = raw[key]\n if (booleanKeys.includes(cameKey) && props[cameKey] === '') {\n props[cameKey] = true\n }\n })\n\n return props\n}\n\nexport const useFloating = (\n referenceRef: Ref<HTMLElement | VirtualElement | null>,\n contentRef: Ref<HTMLElement | null>,\n arrowRef: Ref<HTMLElement | null>,\n placement: Ref<Placement | undefined>,\n strategy: Ref<Strategy>,\n offset: Ref<number>,\n zIndex: Ref<number>,\n showArrow: Ref<boolean>\n) => {\n const x = ref<number>()\n const y = ref<number>()\n const middlewareData = ref<ComputePositionReturn['middlewareData']>({})\n\n const states = {\n x,\n y,\n placement,\n strategy,\n middlewareData,\n } as const\n\n const middleware = computed(() => {\n const _middleware: Middleware[] = [\n offsetMiddelware(unref(offset)),\n flip(),\n shift(),\n overflowMiddleware(),\n ]\n\n if (unref(showArrow) && unref(arrowRef)) {\n _middleware.push(\n arrow({\n element: unref(arrowRef)!,\n })\n )\n }\n return _middleware\n })\n\n const update = async () => {\n if (!isClient) return\n\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (!referenceEl || !contentEl) return\n\n const data = await computePosition(referenceEl, contentEl, {\n placement: unref(placement),\n strategy: unref(strategy),\n middleware: unref(middleware),\n })\n\n keysOf(states).forEach((key) => {\n states[key].value = data[key]\n })\n }\n\n const contentStyle = computed<CSSProperties>(() => {\n if (!unref(referenceRef)) {\n return {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate3d(-50%, -50%, 0)',\n maxWidth: '100vw',\n zIndex: unref(zIndex),\n }\n }\n\n const { overflow } = unref(middlewareData)\n\n return {\n position: unref(strategy),\n zIndex: unref(zIndex),\n top: unref(y) != null ? `${unref(y)}px` : '',\n left: unref(x) != null ? `${unref(x)}px` : '',\n maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : '',\n }\n })\n\n const arrowStyle = computed<CSSProperties>(() => {\n if (!unref(showArrow)) return {}\n\n const { arrow } = unref(middlewareData)\n return {\n left: arrow?.x != null ? `${arrow?.x}px` : '',\n top: arrow?.y != null ? `${arrow?.y}px` : '',\n }\n })\n\n let cleanup: any\n onMounted(() => {\n cleanup = autoUpdate(unref(referenceRef)!, unref(contentRef)!, update)\n\n watchEffect(() => {\n update()\n })\n })\n\n onBeforeUnmount(() => {\n cleanup && cleanup()\n })\n\n return {\n update,\n contentStyle,\n arrowStyle,\n }\n}\n\nconst overflowMiddleware = (): Middleware => {\n return {\n name: 'overflow',\n async fn(state) {\n const overflow = await detectOverflow(state)\n let overWidth = 0\n if (overflow.left > 0) overWidth = overflow.left\n if (overflow.right > 0) overWidth = overflow.right\n const floatingWidth = state.rects.floating.width\n return {\n data: {\n maxWidth: floatingWidth - overWidth,\n },\n }\n },\n }\n}\n"],"names":["offset","offsetMiddelware"],"mappings":";;;;;;;AA4BY,MAAC,SAAS,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,qBAAqB,KAAK;AACnF,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,EAAE,MAAM,WAAW,GAAG,MAAM;AAC5B,IAAI,IAAI,QAAQ,CAAC;AACjB,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AAChC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACtD,KAAK,MAAM,IAAI,UAAU,CAAC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Y;AAChB,IAAI,UAAU;AACd,GAAG,CAAC;AACJ,EAAE;AACF,MAAM,kBAAkB,GAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE;AACpB,MAAM,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;AACnD,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC;AACxB,MAAM,IAAI,QAAQ,CAAC,IAAI,GAAG,CAAC;AAC3B,QAAQ,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC;AAClC,MAAM,IAAI,QAAQ,CAAC,KAAK,GAAG,CAAC;AAC5B,QAAQ,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnC,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACvD,MAAM,OAAO;AACb,QAAQ,IAAI,EAAE;AACd,UAAU,QAAQ,EAAE,aAAa,GAAG,SAAS;AAC7C,SAAS;AACT,OAAO,CAAC;AACR,KAAK;AACL,GAAG,CAAC;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"helper.mjs","sources":["../../../../../../packages/components/tour/src/helper.ts"],"sourcesContent":["import {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n detectOverflow,\n flip,\n offset as offsetMiddelware,\n shift,\n} from '@floating-ui/dom'\nimport {\n isArray,\n isClient,\n isFunction,\n isString,\n keysOf,\n} from '@element-plus/utils'\n\nimport type {\n CSSProperties,\n Component,\n InjectionKey,\n Ref,\n SetupContext,\n} from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { PosInfo, TourGap, TourMask } from './types'\nimport type {\n ComputePositionReturn,\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n} from '@floating-ui/dom'\nimport type { TourStepProps } from './step'\n\nexport const useTarget = (\n target: Ref<\n string | HTMLElement | (() => HTMLElement | null) | null | undefined\n >,\n open: Ref<boolean>,\n gap: Ref<TourGap>,\n mergedMask: Ref<TourMask>,\n scrollIntoViewOptions: Ref<boolean | ScrollIntoViewOptions>\n) => {\n const posInfo: Ref<PosInfo | null> = ref(null)\n\n const getTargetEl = () => {\n let targetEl: HTMLElement | null | undefined\n if (isString(target.value)) {\n targetEl = document.querySelector<HTMLElement>(target.value)\n } else if (isFunction(target.value)) {\n targetEl = target.value()\n } else {\n targetEl = target.value\n }\n return targetEl\n }\n\n const updatePosInfo = () => {\n const targetEl = getTargetEl()\n if (!targetEl || !open.value) {\n posInfo.value = null\n return\n }\n if (!isInViewPort(targetEl) && open.value) {\n targetEl.scrollIntoView(scrollIntoViewOptions.value)\n }\n const { left, top, width, height } = targetEl.getBoundingClientRect()\n posInfo.value = {\n left,\n top,\n width,\n height,\n radius: 0,\n }\n }\n\n onMounted(() => {\n watch(\n [open, target],\n () => {\n updatePosInfo()\n },\n {\n immediate: true,\n }\n )\n window.addEventListener('resize', updatePosInfo)\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('resize', updatePosInfo)\n })\n\n const getGapOffset = (index: number) =>\n (isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ??\n 6\n\n const mergedPosInfo = computed(() => {\n if (!posInfo.value) return posInfo.value\n\n const gapOffsetX = getGapOffset(0)\n const gapOffsetY = getGapOffset(1)\n const gapRadius = gap.value?.radius || 2\n\n return {\n left: posInfo.value.left - gapOffsetX,\n top: posInfo.value.top - gapOffsetY,\n width: posInfo.value.width + gapOffsetX * 2,\n height: posInfo.value.height + gapOffsetY * 2,\n radius: gapRadius,\n }\n })\n\n const triggerTarget = computed(() => {\n const targetEl = getTargetEl()\n if (!mergedMask.value || !targetEl || !window.DOMRect) {\n return targetEl || undefined\n }\n\n return {\n getBoundingClientRect() {\n return window.DOMRect.fromRect({\n width: mergedPosInfo.value?.width || 0,\n height: mergedPosInfo.value?.height || 0,\n x: mergedPosInfo.value?.left || 0,\n y: mergedPosInfo.value?.top || 0,\n })\n },\n }\n })\n\n return {\n mergedPosInfo,\n triggerTarget,\n }\n}\n\nexport interface TourContext {\n currentStep: Ref<TourStepProps | undefined>\n current: Ref<number>\n total: Ref<number>\n showClose: Ref<boolean>\n closeIcon: Ref<string | Component>\n mergedType: Ref<'default' | 'primary' | undefined>\n ns: UseNamespaceReturn\n slots: SetupContext['slots']\n updateModelValue(modelValue: boolean): void\n onClose(): void\n onFinish(): void\n onChange(): void\n}\n\nexport const tourKey: InjectionKey<TourContext> = Symbol('ElTour')\n\nfunction isInViewPort(element: HTMLElement) {\n const viewWidth = window.innerWidth || document.documentElement.clientWidth\n const viewHeight = window.innerHeight || document.documentElement.clientHeight\n const { top, right, bottom, left } = element.getBoundingClientRect()\n\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight\n}\n\nexport const useFloating = (\n referenceRef: Ref<HTMLElement | VirtualElement | null>,\n contentRef: Ref<HTMLElement | null>,\n arrowRef: Ref<HTMLElement | null>,\n placement: Ref<Placement | undefined>,\n strategy: Ref<Strategy>,\n offset: Ref<number>,\n zIndex: Ref<number>,\n showArrow: Ref<boolean>\n) => {\n const x = ref<number>()\n const y = ref<number>()\n const middlewareData = ref<ComputePositionReturn['middlewareData']>({})\n\n const states = {\n x,\n y,\n placement,\n strategy,\n middlewareData,\n } as const\n\n const middleware = computed(() => {\n const _middleware: Middleware[] = [\n offsetMiddelware(unref(offset)),\n flip(),\n shift(),\n overflowMiddleware(),\n ]\n\n if (unref(showArrow) && unref(arrowRef)) {\n _middleware.push(\n arrow({\n element: unref(arrowRef)!,\n })\n )\n }\n return _middleware\n })\n\n const update = async () => {\n if (!isClient) return\n\n const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (!referenceEl || !contentEl) return\n\n const data = await computePosition(referenceEl, contentEl, {\n placement: unref(placement),\n strategy: unref(strategy),\n middleware: unref(middleware),\n })\n\n keysOf(states).forEach((key) => {\n states[key].value = data[key]\n })\n }\n\n const contentStyle = computed<CSSProperties>(() => {\n if (!unref(referenceRef)) {\n return {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate3d(-50%, -50%, 0)',\n maxWidth: '100vw',\n zIndex: unref(zIndex),\n }\n }\n\n const { overflow } = unref(middlewareData)\n\n return {\n position: unref(strategy),\n zIndex: unref(zIndex),\n top: unref(y) != null ? `${unref(y)}px` : '',\n left: unref(x) != null ? `${unref(x)}px` : '',\n maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : '',\n }\n })\n\n const arrowStyle = computed<CSSProperties>(() => {\n if (!unref(showArrow)) return {}\n\n const { arrow } = unref(middlewareData)\n return {\n left: arrow?.x != null ? `${arrow?.x}px` : '',\n top: arrow?.y != null ? `${arrow?.y}px` : '',\n }\n })\n\n let cleanup: any\n onMounted(() => {\n cleanup = autoUpdate(unref(referenceRef)!, unref(contentRef)!, update)\n\n watchEffect(() => {\n update()\n })\n })\n\n onBeforeUnmount(() => {\n cleanup && cleanup()\n })\n\n return {\n update,\n contentStyle,\n arrowStyle,\n }\n}\n\nconst overflowMiddleware = (): Middleware => {\n return {\n name: 'overflow',\n async fn(state) {\n const overflow = await detectOverflow(state)\n let overWidth = 0\n if (overflow.left > 0) overWidth = overflow.left\n if (overflow.right > 0) overWidth = overflow.right\n const floatingWidth = state.rects.floating.width\n return {\n data: {\n maxWidth: floatingWidth - overWidth,\n },\n }\n },\n }\n}\n"],"names":["offset","offsetMiddelware"],"mappings":";;;;;;;AAyBY,MAAC,SAAS,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,qBAAqB,KAAK;AACnF,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,EAAE,MAAM,WAAW,GAAG,MAAM;AAC5B,IAAI,IAAI,QAAQ,CAAC;AACjB,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC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AAG,SAAS;AAC7C,SAAS;AACT,OAAO,CAAC;AACR,KAAK;AACL,GAAG,CAAC;AACJ,CAAC;;;;"}
@@ -9,21 +9,16 @@ export declare const tourStepProps: {
9
9
  };
10
10
  title: StringConstructor;
11
11
  description: StringConstructor;
12
- showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
12
+ showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
13
13
  closeIcon: {
14
14
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
15
15
  readonly required: false;
16
16
  readonly validator: ((val: unknown) => boolean) | undefined;
17
17
  __epPropKey: true;
18
18
  };
19
- showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
19
+ showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
20
20
  placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
21
- mask: {
22
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => TourMask & {}) | (() => TourMask) | ((new (...args: any[]) => TourMask & {}) | (() => TourMask))[], unknown, unknown>>;
23
- readonly required: false;
24
- readonly validator: ((val: unknown) => boolean) | undefined;
25
- __epPropKey: true;
26
- };
21
+ mask: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => TourMask & {}) | (() => TourMask) | ((new (...args: any[]) => TourMask & {}) | (() => TourMask))[], unknown, unknown, undefined, boolean>;
27
22
  contentStyle: {
28
23
  readonly type: import("vue").PropType<CSSProperties>;
29
24
  readonly required: false;
@@ -42,12 +37,7 @@ export declare const tourStepProps: {
42
37
  readonly validator: ((val: unknown) => boolean) | undefined;
43
38
  __epPropKey: true;
44
39
  };
45
- scrollIntoViewOptions: {
46
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>>;
47
- readonly required: false;
48
- readonly validator: ((val: unknown) => boolean) | undefined;
49
- __epPropKey: true;
50
- };
40
+ scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
51
41
  type: {
52
42
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut") | ((new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut"))[], unknown, unknown>>;
53
43
  readonly required: false;
@@ -11,18 +11,19 @@ const tourStepProps = buildProps({
11
11
  description: String,
12
12
  showClose: {
13
13
  type: Boolean,
14
- default: true
14
+ default: void 0
15
15
  },
16
16
  closeIcon: {
17
17
  type: iconPropType
18
18
  },
19
19
  showArrow: {
20
20
  type: Boolean,
21
- default: true
21
+ default: void 0
22
22
  },
23
23
  placement: tourContentProps.placement,
24
24
  mask: {
25
- type: definePropType([Boolean, Object])
25
+ type: definePropType([Boolean, Object]),
26
+ default: void 0
26
27
  },
27
28
  contentStyle: {
28
29
  type: definePropType([Object])
@@ -34,7 +35,8 @@ const tourStepProps = buildProps({
34
35
  type: definePropType(Object)
35
36
  },
36
37
  scrollIntoViewOptions: {
37
- type: definePropType([Boolean, Object])
38
+ type: definePropType([Boolean, Object]),
39
+ default: void 0
38
40
  },
39
41
  type: {
40
42
  type: definePropType(String)
@@ -1 +1 @@
1
- {"version":3,"file":"step.mjs","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TourBtnProps, TourMask } from './types'\n\nexport const tourStepProps = buildProps({\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target: {\n type: definePropType<\n string | HTMLElement | (() => HTMLElement | null) | null\n >([String, Object, Function]),\n },\n /**\n * @description the title of the tour content\n */\n title: String,\n /**\n * @description description\n */\n description: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n },\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description properties of the previous button\n */\n prevButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description properties of the Next button\n */\n nextButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'defalut' | 'primary'>(String),\n },\n})\n\nexport type TourStepProps = ExtractPropTypes<typeof tourStepProps>\n\nexport const tourStepEmits = {\n close: () => true,\n}\nexport type TourStepEmits = typeof tourStepEmits\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpD,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
1
+ {"version":3,"file":"step.mjs","sources":["../../../../../../packages/components/tour/src/step.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TourBtnProps, TourMask } from './types'\n\nexport const tourStepProps = buildProps({\n /**\n * @description get the element the guide card points to. empty makes it show in center of screen\n */\n target: {\n type: definePropType<\n string | HTMLElement | (() => HTMLElement | null) | null\n >([String, Object, Function]),\n },\n /**\n * @description the title of the tour content\n */\n title: String,\n /**\n * @description description\n */\n description: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description properties of the previous button\n */\n prevButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description properties of the Next button\n */\n nextButtonProps: {\n type: definePropType<TourBtnProps>(Object),\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: undefined,\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'defalut' | 'primary'>(String),\n },\n})\n\nexport type TourStepProps = ExtractPropTypes<typeof tourStepProps>\n\nexport const tourStepEmits = {\n close: () => true,\n}\nexport type TourStepEmits = typeof tourStepEmits\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpD,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
@@ -1,3 +1,4 @@
1
+ import type { TourBtnProps } from './types';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  target: {
3
4
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | HTMLElement | (() => HTMLElement | null) | null) & {}) | (() => string | HTMLElement | (() => HTMLElement | null) | null) | ((new (...args: any[]) => (string | HTMLElement | (() => HTMLElement | null) | null) & {}) | (() => string | HTMLElement | (() => HTMLElement | null) | null))[], unknown, unknown>>;
@@ -7,21 +8,16 @@ declare const _default: import("vue").DefineComponent<{
7
8
  };
8
9
  title: StringConstructor;
9
10
  description: StringConstructor;
10
- showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
11
+ showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
11
12
  closeIcon: {
12
13
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
13
14
  readonly required: false;
14
15
  readonly validator: ((val: unknown) => boolean) | undefined;
15
16
  __epPropKey: true;
16
17
  };
17
- showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
18
+ showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
18
19
  placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
19
- mask: {
20
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown>>;
21
- readonly required: false;
22
- readonly validator: ((val: unknown) => boolean) | undefined;
23
- __epPropKey: true;
24
- };
20
+ mask: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown, undefined, boolean>;
25
21
  contentStyle: {
26
22
  readonly type: import("vue").PropType<import("vue").CSSProperties>;
27
23
  readonly required: false;
@@ -29,23 +25,18 @@ declare const _default: import("vue").DefineComponent<{
29
25
  __epPropKey: true;
30
26
  };
31
27
  prevButtonProps: {
32
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
28
+ readonly type: import("vue").PropType<TourBtnProps>;
33
29
  readonly required: false;
34
30
  readonly validator: ((val: unknown) => boolean) | undefined;
35
31
  __epPropKey: true;
36
32
  };
37
33
  nextButtonProps: {
38
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
39
- readonly required: false;
40
- readonly validator: ((val: unknown) => boolean) | undefined;
41
- __epPropKey: true;
42
- };
43
- scrollIntoViewOptions: {
44
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>>;
34
+ readonly type: import("vue").PropType<TourBtnProps>;
45
35
  readonly required: false;
46
36
  readonly validator: ((val: unknown) => boolean) | undefined;
47
37
  __epPropKey: true;
48
38
  };
39
+ scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
49
40
  type: {
50
41
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut") | ((new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut"))[], unknown, unknown>>;
51
42
  readonly required: false;
@@ -62,21 +53,16 @@ declare const _default: import("vue").DefineComponent<{
62
53
  };
63
54
  title: StringConstructor;
64
55
  description: StringConstructor;
65
- showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
56
+ showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
66
57
  closeIcon: {
67
58
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
68
59
  readonly required: false;
69
60
  readonly validator: ((val: unknown) => boolean) | undefined;
70
61
  __epPropKey: true;
71
62
  };
72
- showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
63
+ showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
73
64
  placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
74
- mask: {
75
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown>>;
76
- readonly required: false;
77
- readonly validator: ((val: unknown) => boolean) | undefined;
78
- __epPropKey: true;
79
- };
65
+ mask: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown, undefined, boolean>;
80
66
  contentStyle: {
81
67
  readonly type: import("vue").PropType<import("vue").CSSProperties>;
82
68
  readonly required: false;
@@ -84,23 +70,18 @@ declare const _default: import("vue").DefineComponent<{
84
70
  __epPropKey: true;
85
71
  };
86
72
  prevButtonProps: {
87
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
73
+ readonly type: import("vue").PropType<TourBtnProps>;
88
74
  readonly required: false;
89
75
  readonly validator: ((val: unknown) => boolean) | undefined;
90
76
  __epPropKey: true;
91
77
  };
92
78
  nextButtonProps: {
93
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
94
- readonly required: false;
95
- readonly validator: ((val: unknown) => boolean) | undefined;
96
- __epPropKey: true;
97
- };
98
- scrollIntoViewOptions: {
99
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>>;
79
+ readonly type: import("vue").PropType<TourBtnProps>;
100
80
  readonly required: false;
101
81
  readonly validator: ((val: unknown) => boolean) | undefined;
102
82
  __epPropKey: true;
103
83
  };
84
+ scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
104
85
  type: {
105
86
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut") | ((new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut"))[], unknown, unknown>>;
106
87
  readonly required: false;
@@ -113,8 +94,9 @@ declare const _default: import("vue").DefineComponent<{
113
94
  emit: (event: "close") => void;
114
95
  Close: any;
115
96
  t: import("@element-plus/nightly/es/hooks").Translator;
97
+ currentStep: import("vue").Ref<import("./step").TourStepProps | undefined>;
116
98
  current: import("vue").Ref<number>;
117
- total: import("vue").ComputedRef<number>;
99
+ total: import("vue").Ref<number>;
118
100
  showClose: import("vue").Ref<boolean>;
119
101
  closeIcon: import("vue").Ref<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
120
102
  mergedType: import("vue").Ref<"default" | "primary" | undefined>;
@@ -150,6 +132,7 @@ declare const _default: import("vue").DefineComponent<{
150
132
  __isTeleport?: undefined;
151
133
  __isSuspense?: undefined;
152
134
  }>;
135
+ filterButtonProps: (btnProps?: TourBtnProps | undefined) => import("lodash").Omit<TourBtnProps, "onClick" | "children"> | undefined;
153
136
  onPrev: () => void;
154
137
  onNext: () => void;
155
138
  onFinish: () => void;
@@ -169,7 +152,7 @@ declare const _default: import("vue").DefineComponent<{
169
152
  readonly validator: ((val: unknown) => boolean) | undefined;
170
153
  __epPropKey: true;
171
154
  };
172
- readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "reset" | "submit" | "button", unknown, "button", boolean>;
155
+ readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
173
156
  readonly loading: BooleanConstructor;
174
157
  readonly loadingIcon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => any, boolean>;
175
158
  readonly plain: BooleanConstructor;
@@ -199,7 +182,7 @@ declare const _default: import("vue").DefineComponent<{
199
182
  readonly validator: ((val: unknown) => boolean) | undefined;
200
183
  __epPropKey: true;
201
184
  };
202
- readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "reset" | "submit" | "button", unknown, "button", boolean>;
185
+ readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
203
186
  readonly loading: BooleanConstructor;
204
187
  readonly loadingIcon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => any, boolean>;
205
188
  readonly plain: BooleanConstructor;
@@ -244,7 +227,7 @@ declare const _default: import("vue").DefineComponent<{
244
227
  ariaDisabled: boolean;
245
228
  disabled: boolean;
246
229
  autofocus: boolean;
247
- type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "reset" | "submit" | "button", unknown>;
230
+ type: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
248
231
  } | {
249
232
  ariaDisabled?: undefined;
250
233
  disabled?: undefined;
@@ -333,7 +316,7 @@ declare const _default: import("vue").DefineComponent<{
333
316
  readonly validator: ((val: unknown) => boolean) | undefined;
334
317
  __epPropKey: true;
335
318
  };
336
- readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "reset" | "submit" | "button", unknown, "button", boolean>;
319
+ readonly nativeType: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
337
320
  readonly loading: BooleanConstructor;
338
321
  readonly loadingIcon: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => any, boolean>;
339
322
  readonly plain: BooleanConstructor;
@@ -359,7 +342,7 @@ declare const _default: import("vue").DefineComponent<{
359
342
  readonly round: boolean;
360
343
  readonly circle: boolean;
361
344
  readonly tag: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
362
- readonly nativeType: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "reset" | "submit" | "button", unknown>;
345
+ readonly nativeType: import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
363
346
  readonly loadingIcon: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
364
347
  readonly autoInsertSpace: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
365
348
  readonly loading: boolean;
@@ -490,21 +473,16 @@ declare const _default: import("vue").DefineComponent<{
490
473
  };
491
474
  title: StringConstructor;
492
475
  description: StringConstructor;
493
- showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
476
+ showClose: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
494
477
  closeIcon: {
495
478
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
496
479
  readonly required: false;
497
480
  readonly validator: ((val: unknown) => boolean) | undefined;
498
481
  __epPropKey: true;
499
482
  };
500
- showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
483
+ showArrow: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
501
484
  placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
502
- mask: {
503
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown>>;
504
- readonly required: false;
505
- readonly validator: ((val: unknown) => boolean) | undefined;
506
- __epPropKey: true;
507
- };
485
+ mask: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask) | ((new (...args: any[]) => import("./types").TourMask & {}) | (() => import("./types").TourMask))[], unknown, unknown, undefined, boolean>;
508
486
  contentStyle: {
509
487
  readonly type: import("vue").PropType<import("vue").CSSProperties>;
510
488
  readonly required: false;
@@ -512,23 +490,18 @@ declare const _default: import("vue").DefineComponent<{
512
490
  __epPropKey: true;
513
491
  };
514
492
  prevButtonProps: {
515
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
493
+ readonly type: import("vue").PropType<TourBtnProps>;
516
494
  readonly required: false;
517
495
  readonly validator: ((val: unknown) => boolean) | undefined;
518
496
  __epPropKey: true;
519
497
  };
520
498
  nextButtonProps: {
521
- readonly type: import("vue").PropType<import("./types").TourBtnProps>;
522
- readonly required: false;
523
- readonly validator: ((val: unknown) => boolean) | undefined;
524
- __epPropKey: true;
525
- };
526
- scrollIntoViewOptions: {
527
- readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>>;
499
+ readonly type: import("vue").PropType<TourBtnProps>;
528
500
  readonly required: false;
529
501
  readonly validator: ((val: unknown) => boolean) | undefined;
530
502
  __epPropKey: true;
531
503
  };
504
+ scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown, undefined, boolean>;
532
505
  type: {
533
506
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut") | ((new (...args: any[]) => ("primary" | "defalut") & {}) | (() => "primary" | "defalut"))[], unknown, unknown>>;
534
507
  readonly required: false;
@@ -539,6 +512,8 @@ declare const _default: import("vue").DefineComponent<{
539
512
  onClose?: (() => any) | undefined;
540
513
  }, {
541
514
  placement: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement) | ((new (...args: any[]) => import("@floating-ui/core").Placement & {}) | (() => import("@floating-ui/core").Placement))[], "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown>;
515
+ scrollIntoViewOptions: import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions) | ((new (...args: any[]) => (boolean | ScrollIntoViewOptions) & {}) | (() => boolean | ScrollIntoViewOptions))[], unknown, unknown>;
516
+ mask: import("./types").TourMask;
542
517
  showArrow: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
543
518
  showClose: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
544
519
  }>;
@@ -1,4 +1,5 @@
1
- import { defineComponent, inject, computed, openBlock, createElementBlock, Fragment, unref, normalizeClass, createVNode, withCtx, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot, toDisplayString, renderList, mergeProps, createTextVNode } from 'vue';
1
+ import { defineComponent, inject, watch, computed, openBlock, createElementBlock, Fragment, unref, normalizeClass, createVNode, withCtx, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot, toDisplayString, renderList, mergeProps, createTextVNode } from 'vue';
2
+ import { omit } from 'lodash-es';
2
3
  import { ElButton } from '../../button/index.mjs';
3
4
  import { ElIcon } from '../../icon/index.mjs';
4
5
  import '../../../utils/index.mjs';
@@ -21,6 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  const { Close } = CloseComponents;
22
23
  const { t } = useLocale();
23
24
  const {
25
+ currentStep,
24
26
  current,
25
27
  total,
26
28
  showClose,
@@ -33,6 +35,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
35
  onFinish: tourOnFinish,
34
36
  onChange
35
37
  } = inject(tourKey);
38
+ watch(props, (val) => {
39
+ currentStep.value = val;
40
+ }, {
41
+ immediate: true
42
+ });
36
43
  const mergedShowClose = computed(() => {
37
44
  var _a;
38
45
  return (_a = props.showClose) != null ? _a : showClose.value;
@@ -41,6 +48,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
48
  var _a, _b;
42
49
  return (_b = (_a = props.closeIcon) != null ? _a : closeIcon.value) != null ? _b : Close;
43
50
  });
51
+ const filterButtonProps = (btnProps) => {
52
+ if (!btnProps)
53
+ return;
54
+ return omit(btnProps, ["children", "onClick"]);
55
+ };
44
56
  const onPrev = () => {
45
57
  var _a, _b;
46
58
  current.value -= 1;
@@ -89,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
101
  }, 8, ["class"])
90
102
  ], 2)) : createCommentVNode("v-if", true),
91
103
  createElementVNode("header", {
92
- class: normalizeClass(unref(ns).e("header"))
104
+ class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }])
93
105
  }, [
94
106
  renderSlot(_ctx.$slots, "header", {}, () => [
95
107
  createElementVNode("span", {
@@ -129,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
129
141
  key: 0,
130
142
  size: "small",
131
143
  type: unref(mergedType)
132
- }, _ctx.prevButtonProps, { onClick: onPrev }), {
144
+ }, filterButtonProps(_ctx.prevButtonProps), { onClick: onPrev }), {
133
145
  default: withCtx(() => {
134
146
  var _a, _b;
135
147
  return [
@@ -142,11 +154,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
154
  key: 1,
143
155
  size: "small",
144
156
  type: unref(mergedType) === "primary" ? "default" : "primary"
145
- }, _ctx.nextButtonProps, { onClick: onNext }), {
157
+ }, filterButtonProps(_ctx.nextButtonProps), { onClick: onNext }), {
146
158
  default: withCtx(() => {
147
159
  var _a, _b;
148
160
  return [
149
- createTextVNode(toDisplayString(((_b = (_a = _ctx.nextButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(current) === unref(total) - 1) ? unref(t)("el.tour.finish") : unref(t)("el.tour.next")), 1)
161
+ createTextVNode(toDisplayString((_b = (_a = _ctx.nextButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(current) === unref(total) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next")), 1)
150
162
  ];
151
163
  }),
152
164
  _: 1