element-plus-secondary 1.2.5 → 1.2.6

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 (480) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +10 -10
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +12 -12
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/es/components/affix/index.mjs +2 -2
  8. package/es/components/affix/src/affix.mjs +118 -25
  9. package/es/components/affix/src/affix.mjs.map +1 -1
  10. package/es/components/affix/src/affix2.mjs +25 -118
  11. package/es/components/affix/src/affix2.mjs.map +1 -1
  12. package/es/components/alert/index.mjs +2 -2
  13. package/es/components/alert/src/alert.mjs +36 -89
  14. package/es/components/alert/src/alert.mjs.map +1 -1
  15. package/es/components/alert/src/alert2.mjs +89 -36
  16. package/es/components/alert/src/alert2.mjs.map +1 -1
  17. package/es/components/anchor/index.mjs +3 -3
  18. package/es/components/anchor/src/anchor-link.mjs +5 -81
  19. package/es/components/anchor/src/anchor-link.mjs.map +1 -1
  20. package/es/components/anchor/src/anchor-link2.mjs +81 -5
  21. package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
  22. package/es/components/anchor/src/anchor.mjs +42 -192
  23. package/es/components/anchor/src/anchor.mjs.map +1 -1
  24. package/es/components/anchor/src/anchor2.mjs +192 -42
  25. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  26. package/es/components/badge/index.mjs +2 -2
  27. package/es/components/badge/src/badge.mjs +32 -71
  28. package/es/components/badge/src/badge.mjs.map +1 -1
  29. package/es/components/badge/src/badge2.mjs +71 -32
  30. package/es/components/badge/src/badge2.mjs.map +1 -1
  31. package/es/components/breadcrumb/index.mjs +2 -2
  32. package/es/components/breadcrumb/src/breadcrumb-item.mjs +8 -56
  33. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  34. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -8
  35. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  36. package/es/components/button/index.mjs +1 -1
  37. package/es/components/button/src/button-group.mjs +6 -29
  38. package/es/components/button/src/button-group.mjs.map +1 -1
  39. package/es/components/button/src/button-group2.mjs +29 -6
  40. package/es/components/button/src/button-group2.mjs.map +1 -1
  41. package/es/components/carousel/index.mjs +2 -2
  42. package/es/components/carousel/src/carousel-item.mjs +7 -69
  43. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  44. package/es/components/carousel/src/carousel-item2.mjs +69 -7
  45. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  46. package/es/components/col/index.mjs +2 -2
  47. package/es/components/col/src/col.mjs +64 -43
  48. package/es/components/col/src/col.mjs.map +1 -1
  49. package/es/components/col/src/col2.mjs +43 -64
  50. package/es/components/col/src/col2.mjs.map +1 -1
  51. package/es/components/collapse/index.mjs +2 -2
  52. package/es/components/collapse/src/collapse-item.mjs +22 -102
  53. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  54. package/es/components/collapse/src/collapse-item2.mjs +102 -22
  55. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  56. package/es/components/collection/index.mjs +1 -1
  57. package/es/components/collection/src/collection.mjs +10 -62
  58. package/es/components/collection/src/collection.mjs.map +1 -1
  59. package/es/components/collection/src/collection2.mjs +62 -10
  60. package/es/components/collection/src/collection2.mjs.map +1 -1
  61. package/es/components/color-picker/index.mjs +2 -2
  62. package/es/components/color-picker/src/color-picker.mjs +477 -49
  63. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  64. package/es/components/color-picker/src/color-picker2.mjs +49 -477
  65. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  66. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  67. package/es/components/config-provider/src/hooks/use-global-config.mjs +1 -1
  68. package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
  69. package/es/components/countdown/index.mjs +2 -2
  70. package/es/components/countdown/src/countdown.mjs +22 -79
  71. package/es/components/countdown/src/countdown.mjs.map +1 -1
  72. package/es/components/countdown/src/countdown2.mjs +79 -22
  73. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  74. package/es/components/descriptions/index.mjs +2 -2
  75. package/es/components/descriptions/src/description.mjs +126 -26
  76. package/es/components/descriptions/src/description.mjs.map +1 -1
  77. package/es/components/descriptions/src/description2.mjs +26 -126
  78. package/es/components/descriptions/src/description2.mjs.map +1 -1
  79. package/es/components/dialog/src/dialog-content.mjs +88 -29
  80. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  81. package/es/components/dialog/src/dialog-content2.mjs +29 -88
  82. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  83. package/es/components/dialog/src/dialog.mjs +1 -1
  84. package/es/components/dialog/src/dialog2.mjs +1 -1
  85. package/es/components/drawer/index.mjs +2 -2
  86. package/es/components/drawer/src/drawer.mjs +178 -30
  87. package/es/components/drawer/src/drawer.mjs.map +1 -1
  88. package/es/components/drawer/src/drawer2.mjs +30 -178
  89. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  90. package/es/components/dropdown/index.mjs +2 -2
  91. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  92. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  93. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  94. package/es/components/dropdown/src/dropdown.mjs +108 -301
  95. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  96. package/es/components/dropdown/src/dropdown2.mjs +301 -108
  97. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  98. package/es/components/empty/index.mjs +2 -2
  99. package/es/components/empty/src/empty.mjs +11 -52
  100. package/es/components/empty/src/empty.mjs.map +1 -1
  101. package/es/components/empty/src/empty2.mjs +52 -11
  102. package/es/components/empty/src/empty2.mjs.map +1 -1
  103. package/es/components/index.mjs +37 -37
  104. package/es/components/input/index.mjs +2 -2
  105. package/es/components/input/src/input.mjs +106 -478
  106. package/es/components/input/src/input.mjs.map +1 -1
  107. package/es/components/input/src/input2.mjs +478 -106
  108. package/es/components/input/src/input2.mjs.map +1 -1
  109. package/es/components/input-number/index.mjs +2 -2
  110. package/es/components/input-number/src/input-number.mjs +374 -64
  111. package/es/components/input-number/src/input-number.mjs.map +1 -1
  112. package/es/components/input-number/src/input-number2.mjs +64 -374
  113. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  114. package/es/components/mention/index.mjs +2 -2
  115. package/es/components/mention/src/mention-dropdown.mjs +15 -166
  116. package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
  117. package/es/components/mention/src/mention-dropdown2.mjs +166 -15
  118. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  119. package/es/components/mention/src/mention.mjs +63 -283
  120. package/es/components/mention/src/mention.mjs.map +1 -1
  121. package/es/components/mention/src/mention2.mjs +283 -63
  122. package/es/components/mention/src/mention2.mjs.map +1 -1
  123. package/es/components/pagination/src/components/jumper.mjs +58 -7
  124. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  125. package/es/components/pagination/src/components/jumper2.mjs +7 -58
  126. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  127. package/es/components/pagination/src/pagination.mjs +1 -1
  128. package/es/components/popconfirm/index.mjs +2 -2
  129. package/es/components/popconfirm/src/popconfirm.mjs +45 -114
  130. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  131. package/es/components/popconfirm/src/popconfirm2.mjs +114 -45
  132. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  133. package/es/components/popover/index.mjs +2 -2
  134. package/es/components/popover/src/popover.mjs +110 -64
  135. package/es/components/popover/src/popover.mjs.map +1 -1
  136. package/es/components/popover/src/popover2.mjs +64 -110
  137. package/es/components/popover/src/popover2.mjs.map +1 -1
  138. package/es/components/popper/index.mjs +2 -2
  139. package/es/components/popper/src/arrow.mjs +38 -7
  140. package/es/components/popper/src/arrow.mjs.map +1 -1
  141. package/es/components/popper/src/arrow2.mjs +7 -38
  142. package/es/components/popper/src/arrow2.mjs.map +1 -1
  143. package/es/components/progress/index.mjs +2 -2
  144. package/es/components/progress/src/progress.mjs +207 -53
  145. package/es/components/progress/src/progress.mjs.map +1 -1
  146. package/es/components/progress/src/progress2.mjs +53 -207
  147. package/es/components/progress/src/progress2.mjs.map +1 -1
  148. package/es/components/radio/index.mjs +4 -4
  149. package/es/components/radio/src/radio-button.mjs +5 -65
  150. package/es/components/radio/src/radio-button.mjs.map +1 -1
  151. package/es/components/radio/src/radio-button2.mjs +65 -5
  152. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  153. package/es/components/radio/src/radio-group.mjs +1 -1
  154. package/es/components/radio/src/radio.mjs +77 -36
  155. package/es/components/radio/src/radio.mjs.map +1 -1
  156. package/es/components/radio/src/radio2.mjs +36 -77
  157. package/es/components/radio/src/radio2.mjs.map +1 -1
  158. package/es/components/result/index.mjs +2 -2
  159. package/es/components/result/src/result.mjs +28 -62
  160. package/es/components/result/src/result.mjs.map +1 -1
  161. package/es/components/result/src/result2.mjs +62 -28
  162. package/es/components/result/src/result2.mjs.map +1 -1
  163. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +1 -1
  164. package/es/components/scrollbar/index.mjs +1 -1
  165. package/es/components/scrollbar/src/bar.mjs +10 -64
  166. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  167. package/es/components/scrollbar/src/bar2.mjs +64 -10
  168. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  169. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  170. package/es/components/scrollbar/src/thumb.mjs +11 -129
  171. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  172. package/es/components/scrollbar/src/thumb2.mjs +129 -11
  173. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  174. package/es/components/select/index.mjs +1 -1
  175. package/es/components/select/src/select.mjs +126 -448
  176. package/es/components/select/src/select.mjs.map +1 -1
  177. package/es/components/select/src/select2.mjs +448 -126
  178. package/es/components/select/src/select2.mjs.map +1 -1
  179. package/es/components/skeleton/index.mjs +2 -2
  180. package/es/components/skeleton/src/skeleton.mjs +21 -48
  181. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  182. package/es/components/skeleton/src/skeleton2.mjs +48 -21
  183. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  184. package/es/components/steps/index.mjs +2 -2
  185. package/es/components/steps/src/steps.mjs +41 -38
  186. package/es/components/steps/src/steps.mjs.map +1 -1
  187. package/es/components/steps/src/steps2.mjs +38 -41
  188. package/es/components/steps/src/steps2.mjs.map +1 -1
  189. package/es/components/switch/index.mjs +2 -2
  190. package/es/components/switch/src/switch.mjs +228 -72
  191. package/es/components/switch/src/switch.mjs.map +1 -1
  192. package/es/components/switch/src/switch2.mjs +72 -228
  193. package/es/components/switch/src/switch2.mjs.map +1 -1
  194. package/es/components/teleport/index.mjs +2 -2
  195. package/es/components/teleport/src/teleport.mjs +18 -8
  196. package/es/components/teleport/src/teleport.mjs.map +1 -1
  197. package/es/components/teleport/src/teleport2.mjs +8 -18
  198. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  199. package/es/components/timeline/index.mjs +2 -2
  200. package/es/components/timeline/src/timeline-item.mjs +72 -33
  201. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  202. package/es/components/timeline/src/timeline-item2.mjs +33 -72
  203. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  204. package/es/components/tooltip/src/tooltip.mjs +1 -1
  205. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  206. package/es/components/tour/index.mjs +5 -5
  207. package/es/components/tour/src/content.mjs +43 -67
  208. package/es/components/tour/src/content.mjs.map +1 -1
  209. package/es/components/tour/src/content2.mjs +67 -43
  210. package/es/components/tour/src/content2.mjs.map +1 -1
  211. package/es/components/tour/src/mask.mjs +75 -18
  212. package/es/components/tour/src/mask.mjs.map +1 -1
  213. package/es/components/tour/src/mask2.mjs +18 -75
  214. package/es/components/tour/src/mask2.mjs.map +1 -1
  215. package/es/components/tour/src/step.mjs +44 -168
  216. package/es/components/tour/src/step.mjs.map +1 -1
  217. package/es/components/tour/src/step2.mjs +168 -44
  218. package/es/components/tour/src/step2.mjs.map +1 -1
  219. package/es/components/tour/src/tour.mjs +153 -68
  220. package/es/components/tour/src/tour.mjs.map +1 -1
  221. package/es/components/tour/src/tour2.mjs +68 -153
  222. package/es/components/tour/src/tour2.mjs.map +1 -1
  223. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  224. package/es/components/transfer/src/transfer-panel.mjs +130 -19
  225. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  226. package/es/components/transfer/src/transfer-panel2.mjs +19 -130
  227. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  228. package/es/components/transfer/src/transfer2.mjs +1 -1
  229. package/es/components/upload/index.mjs +1 -1
  230. package/es/components/upload/src/upload-content.mjs +1 -1
  231. package/es/components/upload/src/upload-dragger.mjs +47 -10
  232. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  233. package/es/components/upload/src/upload-dragger2.mjs +10 -47
  234. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  235. package/es/components/watermark/index.mjs +2 -2
  236. package/es/components/watermark/src/watermark.mjs +27 -210
  237. package/es/components/watermark/src/watermark.mjs.map +1 -1
  238. package/es/components/watermark/src/watermark2.mjs +210 -27
  239. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  240. package/es/hooks/use-z-index/index.mjs +1 -1
  241. package/es/hooks/use-z-index/index.mjs.map +1 -1
  242. package/es/index.mjs +38 -38
  243. package/lib/components/affix/index.js +2 -2
  244. package/lib/components/affix/src/affix.js +118 -26
  245. package/lib/components/affix/src/affix.js.map +1 -1
  246. package/lib/components/affix/src/affix2.js +26 -118
  247. package/lib/components/affix/src/affix2.js.map +1 -1
  248. package/lib/components/alert/index.js +2 -2
  249. package/lib/components/alert/src/alert.js +37 -88
  250. package/lib/components/alert/src/alert.js.map +1 -1
  251. package/lib/components/alert/src/alert2.js +88 -37
  252. package/lib/components/alert/src/alert2.js.map +1 -1
  253. package/lib/components/anchor/index.js +3 -3
  254. package/lib/components/anchor/src/anchor-link.js +5 -81
  255. package/lib/components/anchor/src/anchor-link.js.map +1 -1
  256. package/lib/components/anchor/src/anchor-link2.js +81 -5
  257. package/lib/components/anchor/src/anchor-link2.js.map +1 -1
  258. package/lib/components/anchor/src/anchor.js +42 -191
  259. package/lib/components/anchor/src/anchor.js.map +1 -1
  260. package/lib/components/anchor/src/anchor2.js +191 -42
  261. package/lib/components/anchor/src/anchor2.js.map +1 -1
  262. package/lib/components/badge/index.js +2 -2
  263. package/lib/components/badge/src/badge.js +32 -71
  264. package/lib/components/badge/src/badge.js.map +1 -1
  265. package/lib/components/badge/src/badge2.js +71 -32
  266. package/lib/components/badge/src/badge2.js.map +1 -1
  267. package/lib/components/breadcrumb/index.js +2 -2
  268. package/lib/components/breadcrumb/src/breadcrumb-item.js +8 -56
  269. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  270. package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -8
  271. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  272. package/lib/components/button/index.js +1 -1
  273. package/lib/components/button/src/button-group.js +6 -29
  274. package/lib/components/button/src/button-group.js.map +1 -1
  275. package/lib/components/button/src/button-group2.js +29 -6
  276. package/lib/components/button/src/button-group2.js.map +1 -1
  277. package/lib/components/carousel/index.js +2 -2
  278. package/lib/components/carousel/src/carousel-item.js +7 -69
  279. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  280. package/lib/components/carousel/src/carousel-item2.js +69 -7
  281. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  282. package/lib/components/col/index.js +2 -2
  283. package/lib/components/col/src/col.js +64 -43
  284. package/lib/components/col/src/col.js.map +1 -1
  285. package/lib/components/col/src/col2.js +43 -64
  286. package/lib/components/col/src/col2.js.map +1 -1
  287. package/lib/components/collapse/index.js +2 -2
  288. package/lib/components/collapse/src/collapse-item.js +22 -102
  289. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  290. package/lib/components/collapse/src/collapse-item2.js +102 -22
  291. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  292. package/lib/components/collection/index.js +1 -1
  293. package/lib/components/collection/src/collection.js +9 -62
  294. package/lib/components/collection/src/collection.js.map +1 -1
  295. package/lib/components/collection/src/collection2.js +62 -9
  296. package/lib/components/collection/src/collection2.js.map +1 -1
  297. package/lib/components/color-picker/index.js +2 -2
  298. package/lib/components/color-picker/src/color-picker.js +475 -49
  299. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  300. package/lib/components/color-picker/src/color-picker2.js +49 -475
  301. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  302. package/lib/components/color-picker/src/components/predefine.js +1 -1
  303. package/lib/components/config-provider/src/hooks/use-global-config.js +1 -1
  304. package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
  305. package/lib/components/countdown/index.js +2 -2
  306. package/lib/components/countdown/src/countdown.js +23 -79
  307. package/lib/components/countdown/src/countdown.js.map +1 -1
  308. package/lib/components/countdown/src/countdown2.js +79 -23
  309. package/lib/components/countdown/src/countdown2.js.map +1 -1
  310. package/lib/components/descriptions/index.js +2 -2
  311. package/lib/components/descriptions/src/description.js +126 -26
  312. package/lib/components/descriptions/src/description.js.map +1 -1
  313. package/lib/components/descriptions/src/description2.js +26 -126
  314. package/lib/components/descriptions/src/description2.js.map +1 -1
  315. package/lib/components/dialog/src/dialog-content.js +87 -29
  316. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  317. package/lib/components/dialog/src/dialog-content2.js +29 -87
  318. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  319. package/lib/components/dialog/src/dialog.js +1 -1
  320. package/lib/components/dialog/src/dialog2.js +1 -1
  321. package/lib/components/drawer/index.js +2 -2
  322. package/lib/components/drawer/src/drawer.js +178 -31
  323. package/lib/components/drawer/src/drawer.js.map +1 -1
  324. package/lib/components/drawer/src/drawer2.js +31 -178
  325. package/lib/components/drawer/src/drawer2.js.map +1 -1
  326. package/lib/components/dropdown/index.js +2 -2
  327. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  328. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  329. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  330. package/lib/components/dropdown/src/dropdown.js +117 -301
  331. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  332. package/lib/components/dropdown/src/dropdown2.js +301 -117
  333. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  334. package/lib/components/empty/index.js +2 -2
  335. package/lib/components/empty/src/empty.js +11 -52
  336. package/lib/components/empty/src/empty.js.map +1 -1
  337. package/lib/components/empty/src/empty2.js +52 -11
  338. package/lib/components/empty/src/empty2.js.map +1 -1
  339. package/lib/components/index.js +39 -39
  340. package/lib/components/input/index.js +2 -2
  341. package/lib/components/input/src/input.js +106 -477
  342. package/lib/components/input/src/input.js.map +1 -1
  343. package/lib/components/input/src/input2.js +477 -106
  344. package/lib/components/input/src/input2.js.map +1 -1
  345. package/lib/components/input-number/index.js +2 -2
  346. package/lib/components/input-number/src/input-number.js +372 -63
  347. package/lib/components/input-number/src/input-number.js.map +1 -1
  348. package/lib/components/input-number/src/input-number2.js +63 -372
  349. package/lib/components/input-number/src/input-number2.js.map +1 -1
  350. package/lib/components/mention/index.js +2 -2
  351. package/lib/components/mention/src/mention-dropdown.js +16 -166
  352. package/lib/components/mention/src/mention-dropdown.js.map +1 -1
  353. package/lib/components/mention/src/mention-dropdown2.js +166 -16
  354. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  355. package/lib/components/mention/src/mention.js +62 -281
  356. package/lib/components/mention/src/mention.js.map +1 -1
  357. package/lib/components/mention/src/mention2.js +281 -62
  358. package/lib/components/mention/src/mention2.js.map +1 -1
  359. package/lib/components/pagination/src/components/jumper.js +58 -7
  360. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  361. package/lib/components/pagination/src/components/jumper2.js +7 -58
  362. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  363. package/lib/components/pagination/src/pagination.js +1 -1
  364. package/lib/components/popconfirm/index.js +2 -2
  365. package/lib/components/popconfirm/src/popconfirm.js +46 -114
  366. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  367. package/lib/components/popconfirm/src/popconfirm2.js +114 -46
  368. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  369. package/lib/components/popover/index.js +2 -2
  370. package/lib/components/popover/src/popover.js +110 -65
  371. package/lib/components/popover/src/popover.js.map +1 -1
  372. package/lib/components/popover/src/popover2.js +65 -110
  373. package/lib/components/popover/src/popover2.js.map +1 -1
  374. package/lib/components/popper/index.js +2 -2
  375. package/lib/components/popper/src/arrow.js +38 -8
  376. package/lib/components/popper/src/arrow.js.map +1 -1
  377. package/lib/components/popper/src/arrow2.js +8 -38
  378. package/lib/components/popper/src/arrow2.js.map +1 -1
  379. package/lib/components/progress/index.js +2 -2
  380. package/lib/components/progress/src/progress.js +207 -53
  381. package/lib/components/progress/src/progress.js.map +1 -1
  382. package/lib/components/progress/src/progress2.js +53 -207
  383. package/lib/components/progress/src/progress2.js.map +1 -1
  384. package/lib/components/radio/index.js +4 -4
  385. package/lib/components/radio/src/radio-button.js +5 -65
  386. package/lib/components/radio/src/radio-button.js.map +1 -1
  387. package/lib/components/radio/src/radio-button2.js +65 -5
  388. package/lib/components/radio/src/radio-button2.js.map +1 -1
  389. package/lib/components/radio/src/radio-group.js +1 -1
  390. package/lib/components/radio/src/radio.js +76 -37
  391. package/lib/components/radio/src/radio.js.map +1 -1
  392. package/lib/components/radio/src/radio2.js +37 -76
  393. package/lib/components/radio/src/radio2.js.map +1 -1
  394. package/lib/components/result/index.js +2 -2
  395. package/lib/components/result/src/result.js +30 -62
  396. package/lib/components/result/src/result.js.map +1 -1
  397. package/lib/components/result/src/result2.js +62 -30
  398. package/lib/components/result/src/result2.js.map +1 -1
  399. package/lib/components/roving-focus-group/src/roving-focus-group2.js +1 -1
  400. package/lib/components/scrollbar/index.js +1 -1
  401. package/lib/components/scrollbar/src/bar.js +10 -64
  402. package/lib/components/scrollbar/src/bar.js.map +1 -1
  403. package/lib/components/scrollbar/src/bar2.js +64 -10
  404. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  405. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  406. package/lib/components/scrollbar/src/thumb.js +11 -129
  407. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  408. package/lib/components/scrollbar/src/thumb2.js +129 -11
  409. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  410. package/lib/components/select/index.js +1 -1
  411. package/lib/components/select/src/select.js +125 -447
  412. package/lib/components/select/src/select.js.map +1 -1
  413. package/lib/components/select/src/select2.js +447 -125
  414. package/lib/components/select/src/select2.js.map +1 -1
  415. package/lib/components/skeleton/index.js +2 -2
  416. package/lib/components/skeleton/src/skeleton.js +21 -48
  417. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  418. package/lib/components/skeleton/src/skeleton2.js +48 -21
  419. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  420. package/lib/components/steps/index.js +2 -2
  421. package/lib/components/steps/src/steps.js +42 -38
  422. package/lib/components/steps/src/steps.js.map +1 -1
  423. package/lib/components/steps/src/steps2.js +38 -42
  424. package/lib/components/steps/src/steps2.js.map +1 -1
  425. package/lib/components/switch/index.js +2 -2
  426. package/lib/components/switch/src/switch.js +227 -72
  427. package/lib/components/switch/src/switch.js.map +1 -1
  428. package/lib/components/switch/src/switch2.js +72 -227
  429. package/lib/components/switch/src/switch2.js.map +1 -1
  430. package/lib/components/teleport/index.js +2 -2
  431. package/lib/components/teleport/src/teleport.js +18 -8
  432. package/lib/components/teleport/src/teleport.js.map +1 -1
  433. package/lib/components/teleport/src/teleport2.js +8 -18
  434. package/lib/components/teleport/src/teleport2.js.map +1 -1
  435. package/lib/components/timeline/index.js +2 -2
  436. package/lib/components/timeline/src/timeline-item.js +72 -33
  437. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  438. package/lib/components/timeline/src/timeline-item2.js +33 -72
  439. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  440. package/lib/components/tooltip/src/tooltip.js +1 -1
  441. package/lib/components/tooltip/src/tooltip2.js +1 -1
  442. package/lib/components/tour/index.js +5 -5
  443. package/lib/components/tour/src/content.js +46 -67
  444. package/lib/components/tour/src/content.js.map +1 -1
  445. package/lib/components/tour/src/content2.js +67 -46
  446. package/lib/components/tour/src/content2.js.map +1 -1
  447. package/lib/components/tour/src/mask.js +75 -18
  448. package/lib/components/tour/src/mask.js.map +1 -1
  449. package/lib/components/tour/src/mask2.js +18 -75
  450. package/lib/components/tour/src/mask2.js.map +1 -1
  451. package/lib/components/tour/src/step.js +44 -167
  452. package/lib/components/tour/src/step.js.map +1 -1
  453. package/lib/components/tour/src/step2.js +167 -44
  454. package/lib/components/tour/src/step2.js.map +1 -1
  455. package/lib/components/tour/src/tour.js +151 -67
  456. package/lib/components/tour/src/tour.js.map +1 -1
  457. package/lib/components/tour/src/tour2.js +67 -151
  458. package/lib/components/tour/src/tour2.js.map +1 -1
  459. package/lib/components/transfer/src/composables/use-check.js +1 -1
  460. package/lib/components/transfer/src/transfer-panel.js +130 -21
  461. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  462. package/lib/components/transfer/src/transfer-panel2.js +21 -130
  463. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  464. package/lib/components/transfer/src/transfer2.js +1 -1
  465. package/lib/components/upload/index.js +1 -1
  466. package/lib/components/upload/src/upload-content.js +1 -1
  467. package/lib/components/upload/src/upload-dragger.js +47 -11
  468. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  469. package/lib/components/upload/src/upload-dragger2.js +11 -47
  470. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  471. package/lib/components/watermark/index.js +2 -2
  472. package/lib/components/watermark/src/watermark.js +27 -210
  473. package/lib/components/watermark/src/watermark.js.map +1 -1
  474. package/lib/components/watermark/src/watermark2.js +210 -27
  475. package/lib/components/watermark/src/watermark2.js.map +1 -1
  476. package/lib/hooks/use-z-index/index.js +1 -1
  477. package/lib/hooks/use-z-index/index.js.map +1 -1
  478. package/lib/index.js +41 -41
  479. package/package.json +1 -1
  480. package/web-types.json +1 -1
@@ -1,48 +1,72 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, ref, watch, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
2
+ import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
+ import { tourContentProps, tourContentEmits } from './content.mjs';
4
+ import { useFloating, tourKey } from './helper.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
2
6
 
3
- const tourStrategies = ["absolute", "fixed"];
4
- const tourPlacements = [
5
- "top-start",
6
- "top-end",
7
- "top",
8
- "bottom-start",
9
- "bottom-end",
10
- "bottom",
11
- "left-start",
12
- "left-end",
13
- "left",
14
- "right-start",
15
- "right-end",
16
- "right"
17
- ];
18
- const tourContentProps = buildProps({
19
- placement: {
20
- type: definePropType(String),
21
- values: tourPlacements,
22
- default: "bottom"
23
- },
24
- reference: {
25
- type: definePropType(Object),
26
- default: null
27
- },
28
- strategy: {
29
- type: definePropType(String),
30
- values: tourStrategies,
31
- default: "absolute"
32
- },
33
- offset: {
34
- type: Number,
35
- default: 10
36
- },
37
- showArrow: Boolean,
38
- zIndex: {
39
- type: Number,
40
- default: 2001
7
+ const __default__ = defineComponent({
8
+ name: "ElTourContent"
9
+ });
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: tourContentProps,
13
+ emits: tourContentEmits,
14
+ setup(__props, { emit }) {
15
+ const props = __props;
16
+ const placement = ref(props.placement);
17
+ const strategy = ref(props.strategy);
18
+ const contentRef = ref(null);
19
+ const arrowRef = ref(null);
20
+ watch(() => props.placement, () => {
21
+ placement.value = props.placement;
22
+ });
23
+ const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
24
+ const side = computed(() => {
25
+ return placement.value.split("-")[0];
26
+ });
27
+ const { ns } = inject(tourKey);
28
+ const onCloseRequested = () => {
29
+ emit("close");
30
+ };
31
+ const onFocusoutPrevented = (event) => {
32
+ if (event.detail.focusReason === "pointer") {
33
+ event.preventDefault();
34
+ }
35
+ };
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", {
38
+ ref_key: "contentRef",
39
+ ref: contentRef,
40
+ style: normalizeStyle(unref(contentStyle)),
41
+ class: normalizeClass(unref(ns).e("content")),
42
+ "data-side": unref(side),
43
+ tabindex: "-1"
44
+ }, [
45
+ createVNode(unref(ElFocusTrap), {
46
+ loop: "",
47
+ trapped: "",
48
+ "focus-start-el": "container",
49
+ "focus-trap-el": contentRef.value || void 0,
50
+ onReleaseRequested: onCloseRequested,
51
+ onFocusoutPrevented
52
+ }, {
53
+ default: withCtx(() => [
54
+ renderSlot(_ctx.$slots, "default")
55
+ ]),
56
+ _: 3
57
+ }, 8, ["focus-trap-el"]),
58
+ _ctx.showArrow ? (openBlock(), createElementBlock("span", {
59
+ key: 0,
60
+ ref_key: "arrowRef",
61
+ ref: arrowRef,
62
+ style: normalizeStyle(unref(arrowStyle)),
63
+ class: normalizeClass(unref(ns).e("arrow"))
64
+ }, null, 6)) : createCommentVNode("v-if", true)
65
+ ], 14, ["data-side"]);
66
+ };
41
67
  }
42
68
  });
43
- const tourContentEmits = {
44
- close: () => true
45
- };
69
+ var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
46
70
 
47
- export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies };
71
+ export { ElTourContent as default };
48
72
  //# sourceMappingURL=content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nexport const tourStrategies = ['absolute', 'fixed'] as const\n\nexport const tourPlacements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\nexport type TourContentProps = ExtractPropTypes<typeof tourContentProps>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE;AACxC,MAAC,cAAc,GAAG;AAC9B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,EAAE;AACU,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
1
+ {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n :style=\"contentStyle\"\n :class=\"ns.e('content')\"\n :data-side=\"side\"\n tabindex=\"-1\"\n >\n <el-focus-trap\n loop\n trapped\n focus-start-el=\"container\"\n :focus-trap-el=\"contentRef || undefined\"\n @release-requested=\"onCloseRequested\"\n @focusout-prevented=\"onFocusoutPrevented\"\n >\n <slot />\n </el-focus-trap>\n <span\n v-if=\"showArrow\"\n ref=\"arrowRef\"\n :style=\"arrowStyle\"\n :class=\"ns.e('arrow')\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject, ref, toRef, watch } from 'vue'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { tourContentEmits, tourContentProps } from './content'\nimport { tourKey, useFloating } from './helper'\n\ndefineOptions({\n name: 'ElTourContent',\n})\n\nconst props = defineProps(tourContentProps)\nconst emit = defineEmits(tourContentEmits)\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst contentRef = ref<HTMLElement | null>(null)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nwatch(\n () => props.placement,\n () => {\n placement.value = props.placement\n }\n)\n\nconst { contentStyle, arrowStyle } = useFloating(\n toRef(props, 'reference'),\n contentRef,\n arrowRef,\n placement,\n strategy,\n toRef(props, 'offset'),\n toRef(props, 'zIndex'),\n toRef(props, 'showArrow')\n)\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst { ns } = inject(tourKey)!\n\nconst onCloseRequested = () => {\n emit('close')\n}\n\nconst onFocusoutPrevented = (event: CustomEvent) => {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_createVNode"],"mappings":";;;;;;mCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAa,IAAwB,IAAI,CAAA,CAAA;AAC/C,IAAM,MAAA,QAAA,GAAW,IAAwB,IAAI,CAAA,CAAA;AAE7C,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EAAA,MAAA;AAAA,MACE,SAAY,CAAA,KAAA,GAAA,KAAA,CAAA,SAAA,CAAA;AAAA,KAAA,CACZ,CAAM;AACJ,IAAA,MAAA,EAAA,cAAkB,UAAM,EAAA,GAAA,WAAA,CAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,CAAA,CAAA;AAAA,IAC1B,MAAA,IAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACF,OAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AAA+B,IACnC,MAAA,EAAM,OAAO,MAAW,CAAA,OAAA,CAAA,CAAA;AAAA,IACxB,MAAA,gBAAA,GAAA,MAAA;AAAA,MACA,IAAA,CAAA,OAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAAA,IACA,MAAA,mBAAA,GAAA,CAAA,KAAA,KAAA;AAAA,MACA,IAAA,YAAqB,CAAA,WAAA,KAAA,SAAA,EAAA;AAAA,QACrB,oBAAqB,EAAA,CAAA;AAAA,OACrB;AAAwB,KAC1B,CAAA;AAEA,IAAM,OAAA,CAAA,IAAA,aAAsB;AAC1B,MAAA,OAAOA,SAAU,EAAA,EAAAC,kBAAkB,CAAA,KAAA,EAAA;AAAA,QACpC,OAAA,EAAA,YAAA;AAED,QAAA,GAAQ,EAAA,UAAO;AAEf,QAAA,qBAA+B,CAAAC,KAAA,CAAA,YAAA,CAAA,CAAA;AAC7B,QAAA,KAAY,EAAAC,cAAA,CAAAD,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACd,WAAA,EAAAA,KAAA,CAAA,IAAA,CAAA;AAEA,QAAM,QAAA,EAAA,IAAA;AACJ,OAAI,EAAA;AACF,QAAAE,WAAqB,CAAAF,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,UACvB,IAAA,EAAA,EAAA;AAAA,UACF,OAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,23 +1,80 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
2
+ import { maskProps } from './mask2.mjs';
3
+ import { tourKey } from './helper.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
2
6
 
3
- const maskProps = buildProps({
4
- zIndex: {
5
- type: Number,
6
- default: 1001
7
- },
8
- visible: Boolean,
9
- fill: {
10
- type: String,
11
- default: "rgba(0,0,0,0.5)"
12
- },
13
- pos: {
14
- type: definePropType(Object)
15
- },
16
- targetAreaClickable: {
17
- type: Boolean,
18
- default: true
7
+ const __default__ = defineComponent({
8
+ name: "ElTourMask",
9
+ inheritAttrs: false
10
+ });
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...__default__,
13
+ props: maskProps,
14
+ setup(__props) {
15
+ const props = __props;
16
+ const { ns } = inject(tourKey);
17
+ const radius = computed(() => {
18
+ var _a, _b;
19
+ return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
20
+ });
21
+ const roundInfo = computed(() => {
22
+ const v = radius.value;
23
+ const baseInfo = `a${v},${v} 0 0 1`;
24
+ return {
25
+ topRight: `${baseInfo} ${v},${v}`,
26
+ bottomRight: `${baseInfo} ${-v},${v}`,
27
+ bottomLeft: `${baseInfo} ${-v},${-v}`,
28
+ topLeft: `${baseInfo} ${v},${-v}`
29
+ };
30
+ });
31
+ const path = computed(() => {
32
+ const width = window.innerWidth;
33
+ const height = window.innerHeight;
34
+ const info = roundInfo.value;
35
+ const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
36
+ const _radius = radius.value;
37
+ return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
38
+ });
39
+ const pathStyle = computed(() => {
40
+ return {
41
+ fill: props.fill,
42
+ pointerEvents: "auto",
43
+ cursor: "auto"
44
+ };
45
+ });
46
+ useLockscreen(toRef(props, "visible"), {
47
+ ns
48
+ });
49
+ return (_ctx, _cache) => {
50
+ return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
51
+ key: 0,
52
+ class: unref(ns).e("mask"),
53
+ style: {
54
+ position: "fixed",
55
+ left: 0,
56
+ right: 0,
57
+ top: 0,
58
+ bottom: 0,
59
+ zIndex: _ctx.zIndex,
60
+ pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
61
+ }
62
+ }, _ctx.$attrs), [
63
+ (openBlock(), createElementBlock("svg", { style: {
64
+ width: "100%",
65
+ height: "100%"
66
+ } }, [
67
+ createElementVNode("path", {
68
+ class: normalizeClass(unref(ns).e("hollow")),
69
+ style: normalizeStyle(unref(pathStyle)),
70
+ d: unref(path)
71
+ }, null, 14, ["d"])
72
+ ]))
73
+ ], 16)) : createCommentVNode("v-if", true);
74
+ };
19
75
  }
20
76
  });
77
+ var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
21
78
 
22
- export { maskProps };
79
+ export { ElTourMask as default };
23
80
  //# sourceMappingURL=mask.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,CAAA,GAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAAA,CAAA,CAAA;AACA,IAAO,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,gBACQ,CAAA,KAAA,CAAQ;AAAU,MAAA,iBACf,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAQ,UAAU;AAAC,MACnC,OAAA;AAAmC,QACnC,UAAY,CAAA,EAAA,YAAa,CAAA,CAAA,CAAA,EAAK,CAAC,CAAA,CAAA;AAAA,QACjC,WAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AAAA,QACD,UAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAED,QAAM,OAAA,EAAO,WAAe,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAuB,CAAA,MAAA;AACvB,MAAM,MAAA,KAAA,GAAQ,MAAI,CAAA,UAAmB,CAAA;AACrC,MAAA,MAAM,eAAiB,CAAA,WAAA,CAAA;AACvB,MAAO,MAAA,IAAA,GAAM,SACN,CAAA;AAOH,MACL,MAAA,KAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAM,MAAA,OAAA,GAAY,YAA8B,CAAA;AAC9C,MAAO,OAAA,KAAA,CAAA,GAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,GAAA,OAAA,CAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,UAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AACO,IAAA,MACG,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,OACP;AAAA,QACV,IAAA,EAAA,KAAA,CAAA,IAAA;AAAA,QACD,aAAA,EAAA,MAAA;AAED,QAAc,MAAA,EAAA,MAAA;AAAyB,OACrC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,80 +1,23 @@
1
- import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
2
- import { maskProps } from './mask.mjs';
3
- import { tourKey } from './helper.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
2
 
7
- const __default__ = defineComponent({
8
- name: "ElTourMask",
9
- inheritAttrs: false
10
- });
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- ...__default__,
13
- props: maskProps,
14
- setup(__props) {
15
- const props = __props;
16
- const { ns } = inject(tourKey);
17
- const radius = computed(() => {
18
- var _a, _b;
19
- return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
20
- });
21
- const roundInfo = computed(() => {
22
- const v = radius.value;
23
- const baseInfo = `a${v},${v} 0 0 1`;
24
- return {
25
- topRight: `${baseInfo} ${v},${v}`,
26
- bottomRight: `${baseInfo} ${-v},${v}`,
27
- bottomLeft: `${baseInfo} ${-v},${-v}`,
28
- topLeft: `${baseInfo} ${v},${-v}`
29
- };
30
- });
31
- const path = computed(() => {
32
- const width = window.innerWidth;
33
- const height = window.innerHeight;
34
- const info = roundInfo.value;
35
- const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
36
- const _radius = radius.value;
37
- return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
38
- });
39
- const pathStyle = computed(() => {
40
- return {
41
- fill: props.fill,
42
- pointerEvents: "auto",
43
- cursor: "auto"
44
- };
45
- });
46
- useLockscreen(toRef(props, "visible"), {
47
- ns
48
- });
49
- return (_ctx, _cache) => {
50
- return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
51
- key: 0,
52
- class: unref(ns).e("mask"),
53
- style: {
54
- position: "fixed",
55
- left: 0,
56
- right: 0,
57
- top: 0,
58
- bottom: 0,
59
- zIndex: _ctx.zIndex,
60
- pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
61
- }
62
- }, _ctx.$attrs), [
63
- (openBlock(), createElementBlock("svg", { style: {
64
- width: "100%",
65
- height: "100%"
66
- } }, [
67
- createElementVNode("path", {
68
- class: normalizeClass(unref(ns).e("hollow")),
69
- style: normalizeStyle(unref(pathStyle)),
70
- d: unref(path)
71
- }, null, 14, ["d"])
72
- ]))
73
- ], 16)) : createCommentVNode("v-if", true);
74
- };
3
+ const maskProps = buildProps({
4
+ zIndex: {
5
+ type: Number,
6
+ default: 1001
7
+ },
8
+ visible: Boolean,
9
+ fill: {
10
+ type: String,
11
+ default: "rgba(0,0,0,0.5)"
12
+ },
13
+ pos: {
14
+ type: definePropType(Object)
15
+ },
16
+ targetAreaClickable: {
17
+ type: Boolean,
18
+ default: true
75
19
  }
76
20
  });
77
- var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
78
21
 
79
- export { ElTourMask as default };
22
+ export { maskProps };
80
23
  //# sourceMappingURL=mask2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,CAAA,GAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAAA,CAAA,CAAA;AACA,IAAO,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,gBACQ,CAAA,KAAA,CAAQ;AAAU,MAAA,iBACf,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAQ,UAAU;AAAC,MACnC,OAAA;AAAmC,QACnC,UAAY,CAAA,EAAA,YAAa,CAAA,CAAA,CAAA,EAAK,CAAC,CAAA,CAAA;AAAA,QACjC,WAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AAAA,QACD,UAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAED,QAAM,OAAA,EAAO,WAAe,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAuB,CAAA,MAAA;AACvB,MAAM,MAAA,KAAA,GAAQ,MAAI,CAAA,UAAmB,CAAA;AACrC,MAAA,MAAM,eAAiB,CAAA,WAAA,CAAA;AACvB,MAAO,MAAA,IAAA,GAAM,SACN,CAAA;AAOH,MACL,MAAA,KAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAM,MAAA,OAAA,GAAY,YAA8B,CAAA;AAC9C,MAAO,OAAA,KAAA,CAAA,GAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,GAAA,OAAA,CAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,UAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AACO,IAAA,MACG,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,OACP;AAAA,QACV,IAAA,EAAA,KAAA,CAAA,IAAA;AAAA,QACD,aAAA,EAAA,MAAA;AAED,QAAc,MAAA,EAAA,MAAA;AAAyB,OACrC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
@@ -1,173 +1,49 @@
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-unified';
3
- import { ElButton } from '../../button/index.mjs';
4
- import { ElIcon } from '../../icon/index.mjs';
5
- import { tourStepProps, tourStepEmits } from './step2.mjs';
6
- import { tourKey } from './helper.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
9
- import { CloseComponents } from '../../../utils/vue/icon.mjs';
1
+ import { tourContentProps } from './content.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
+ import { iconPropType } from '../../../utils/vue/icon.mjs';
10
4
 
11
- const __default__ = defineComponent({
12
- name: "ElTourStep"
13
- });
14
- const _sfc_main = /* @__PURE__ */ defineComponent({
15
- ...__default__,
16
- props: tourStepProps,
17
- emits: tourStepEmits,
18
- setup(__props, { emit }) {
19
- const props = __props;
20
- const { Close } = CloseComponents;
21
- const { t } = useLocale();
22
- const {
23
- currentStep,
24
- current,
25
- total,
26
- showClose,
27
- closeIcon,
28
- mergedType,
29
- ns,
30
- slots: tourSlots,
31
- updateModelValue,
32
- onClose: tourOnClose,
33
- onFinish: tourOnFinish,
34
- onChange
35
- } = inject(tourKey);
36
- watch(props, (val) => {
37
- currentStep.value = val;
38
- }, {
39
- immediate: true
40
- });
41
- const mergedShowClose = computed(() => {
42
- var _a;
43
- return (_a = props.showClose) != null ? _a : showClose.value;
44
- });
45
- const mergedCloseIcon = computed(() => {
46
- var _a, _b;
47
- return (_b = (_a = props.closeIcon) != null ? _a : closeIcon.value) != null ? _b : Close;
48
- });
49
- const filterButtonProps = (btnProps) => {
50
- if (!btnProps)
51
- return;
52
- return omit(btnProps, ["children", "onClick"]);
53
- };
54
- const onPrev = () => {
55
- var _a, _b;
56
- current.value -= 1;
57
- if ((_a = props.prevButtonProps) == null ? void 0 : _a.onClick) {
58
- (_b = props.prevButtonProps) == null ? void 0 : _b.onClick();
59
- }
60
- onChange();
61
- };
62
- const onNext = () => {
63
- var _a;
64
- if (current.value >= total.value - 1) {
65
- onFinish();
66
- } else {
67
- current.value += 1;
68
- }
69
- if ((_a = props.nextButtonProps) == null ? void 0 : _a.onClick) {
70
- props.nextButtonProps.onClick();
71
- }
72
- onChange();
73
- };
74
- const onFinish = () => {
75
- onClose();
76
- tourOnFinish();
77
- };
78
- const onClose = () => {
79
- updateModelValue(false);
80
- tourOnClose();
81
- emit("close");
82
- };
83
- return (_ctx, _cache) => {
84
- return openBlock(), createElementBlock(Fragment, null, [
85
- unref(mergedShowClose) ? (openBlock(), createElementBlock("button", {
86
- key: 0,
87
- "aria-label": "Close",
88
- class: normalizeClass(unref(ns).e("closebtn")),
89
- type: "button",
90
- onClick: onClose
91
- }, [
92
- createVNode(unref(ElIcon), {
93
- class: normalizeClass(unref(ns).e("close"))
94
- }, {
95
- default: withCtx(() => [
96
- (openBlock(), createBlock(resolveDynamicComponent(unref(mergedCloseIcon))))
97
- ]),
98
- _: 1
99
- }, 8, ["class"])
100
- ], 2)) : createCommentVNode("v-if", true),
101
- createElementVNode("header", {
102
- class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }])
103
- }, [
104
- renderSlot(_ctx.$slots, "header", {}, () => [
105
- createElementVNode("span", {
106
- role: "heading",
107
- class: normalizeClass(unref(ns).e("title"))
108
- }, toDisplayString(_ctx.title), 3)
109
- ])
110
- ], 2),
111
- createElementVNode("div", {
112
- class: normalizeClass(unref(ns).e("body"))
113
- }, [
114
- renderSlot(_ctx.$slots, "default", {}, () => [
115
- createElementVNode("span", null, toDisplayString(_ctx.description), 1)
116
- ])
117
- ], 2),
118
- createElementVNode("footer", {
119
- class: normalizeClass(unref(ns).e("footer"))
120
- }, [
121
- createElementVNode("div", {
122
- class: normalizeClass(unref(ns).b("indicators"))
123
- }, [
124
- unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), {
125
- key: 0,
126
- current: unref(current),
127
- total: unref(total)
128
- }, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(total), (item, index) => {
129
- return openBlock(), createElementBlock("span", {
130
- key: item,
131
- class: normalizeClass([unref(ns).b("indicator"), index === unref(current) ? "is-active" : ""])
132
- }, null, 2);
133
- }), 128))
134
- ], 2),
135
- createElementVNode("div", {
136
- class: normalizeClass(unref(ns).b("buttons"))
137
- }, [
138
- unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
139
- key: 0,
140
- size: "small",
141
- type: unref(mergedType)
142
- }, filterButtonProps(_ctx.prevButtonProps), { onClick: onPrev }), {
143
- default: withCtx(() => {
144
- var _a, _b;
145
- return [
146
- createTextVNode(toDisplayString((_b = (_a = _ctx.prevButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(t)("el.tour.previous")), 1)
147
- ];
148
- }),
149
- _: 1
150
- }, 16, ["type"])) : createCommentVNode("v-if", true),
151
- unref(current) <= unref(total) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
152
- key: 1,
153
- size: "small",
154
- type: unref(mergedType) === "primary" ? "default" : "primary"
155
- }, filterButtonProps(_ctx.nextButtonProps), { onClick: onNext }), {
156
- default: withCtx(() => {
157
- var _a, _b;
158
- return [
159
- 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)
160
- ];
161
- }),
162
- _: 1
163
- }, 16, ["type"])) : createCommentVNode("v-if", true)
164
- ], 2)
165
- ], 2)
166
- ], 64);
167
- };
5
+ const tourStepProps = buildProps({
6
+ target: {
7
+ type: definePropType([String, Object, Function])
8
+ },
9
+ title: String,
10
+ description: String,
11
+ showClose: {
12
+ type: Boolean,
13
+ default: void 0
14
+ },
15
+ closeIcon: {
16
+ type: iconPropType
17
+ },
18
+ showArrow: {
19
+ type: Boolean,
20
+ default: void 0
21
+ },
22
+ placement: tourContentProps.placement,
23
+ mask: {
24
+ type: definePropType([Boolean, Object]),
25
+ default: void 0
26
+ },
27
+ contentStyle: {
28
+ type: definePropType([Object])
29
+ },
30
+ prevButtonProps: {
31
+ type: definePropType(Object)
32
+ },
33
+ nextButtonProps: {
34
+ type: definePropType(Object)
35
+ },
36
+ scrollIntoViewOptions: {
37
+ type: definePropType([Boolean, Object]),
38
+ default: void 0
39
+ },
40
+ type: {
41
+ type: definePropType(String)
168
42
  }
169
43
  });
170
- var TourStep = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "step.vue"]]);
44
+ const tourStepEmits = {
45
+ close: () => true
46
+ };
171
47
 
172
- export { TourStep as default };
48
+ export { tourStepEmits, tourStepProps };
173
49
  //# sourceMappingURL=step.mjs.map