element-plus 2.14.1 → 2.14.3

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 (789) hide show
  1. package/README.md +10 -0
  2. package/attributes.json +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.full.js +141 -56
  5. package/dist/index.full.min.js +6 -6
  6. package/dist/index.full.min.js.map +1 -1
  7. package/dist/index.full.min.mjs +9 -9
  8. package/dist/index.full.min.mjs.map +1 -1
  9. package/dist/index.full.mjs +140 -57
  10. package/dist/locale/af.js +1 -1
  11. package/dist/locale/af.min.js +1 -1
  12. package/dist/locale/af.min.mjs +1 -1
  13. package/dist/locale/af.mjs +1 -1
  14. package/dist/locale/ar-eg.js +1 -1
  15. package/dist/locale/ar-eg.min.js +1 -1
  16. package/dist/locale/ar-eg.min.mjs +1 -1
  17. package/dist/locale/ar-eg.mjs +1 -1
  18. package/dist/locale/ar.js +1 -1
  19. package/dist/locale/ar.min.js +1 -1
  20. package/dist/locale/ar.min.mjs +1 -1
  21. package/dist/locale/ar.mjs +1 -1
  22. package/dist/locale/az.js +1 -1
  23. package/dist/locale/az.min.js +1 -1
  24. package/dist/locale/az.min.mjs +1 -1
  25. package/dist/locale/az.mjs +1 -1
  26. package/dist/locale/bg.js +1 -1
  27. package/dist/locale/bg.min.js +1 -1
  28. package/dist/locale/bg.min.mjs +1 -1
  29. package/dist/locale/bg.mjs +1 -1
  30. package/dist/locale/bn.js +1 -1
  31. package/dist/locale/bn.min.js +1 -1
  32. package/dist/locale/bn.min.mjs +1 -1
  33. package/dist/locale/bn.mjs +1 -1
  34. package/dist/locale/ca.js +1 -1
  35. package/dist/locale/ca.min.js +1 -1
  36. package/dist/locale/ca.min.mjs +1 -1
  37. package/dist/locale/ca.mjs +1 -1
  38. package/dist/locale/ckb.js +1 -1
  39. package/dist/locale/ckb.min.js +1 -1
  40. package/dist/locale/ckb.min.mjs +1 -1
  41. package/dist/locale/ckb.mjs +1 -1
  42. package/dist/locale/cs.js +1 -1
  43. package/dist/locale/cs.min.js +1 -1
  44. package/dist/locale/cs.min.mjs +1 -1
  45. package/dist/locale/cs.mjs +1 -1
  46. package/dist/locale/da.js +1 -1
  47. package/dist/locale/da.min.js +1 -1
  48. package/dist/locale/da.min.mjs +1 -1
  49. package/dist/locale/da.mjs +1 -1
  50. package/dist/locale/de.js +1 -1
  51. package/dist/locale/de.min.js +1 -1
  52. package/dist/locale/de.min.mjs +1 -1
  53. package/dist/locale/de.mjs +1 -1
  54. package/dist/locale/el.js +1 -1
  55. package/dist/locale/el.min.js +1 -1
  56. package/dist/locale/el.min.mjs +1 -1
  57. package/dist/locale/el.mjs +1 -1
  58. package/dist/locale/en.js +1 -1
  59. package/dist/locale/en.min.js +1 -1
  60. package/dist/locale/en.min.mjs +1 -1
  61. package/dist/locale/en.mjs +1 -1
  62. package/dist/locale/eo.js +1 -1
  63. package/dist/locale/eo.min.js +1 -1
  64. package/dist/locale/eo.min.mjs +1 -1
  65. package/dist/locale/eo.mjs +1 -1
  66. package/dist/locale/es.js +1 -1
  67. package/dist/locale/es.min.js +1 -1
  68. package/dist/locale/es.min.mjs +1 -1
  69. package/dist/locale/es.mjs +1 -1
  70. package/dist/locale/et.js +1 -1
  71. package/dist/locale/et.min.js +1 -1
  72. package/dist/locale/et.min.mjs +1 -1
  73. package/dist/locale/et.mjs +1 -1
  74. package/dist/locale/eu.js +1 -1
  75. package/dist/locale/eu.min.js +1 -1
  76. package/dist/locale/eu.min.mjs +1 -1
  77. package/dist/locale/eu.mjs +1 -1
  78. package/dist/locale/fa.js +1 -1
  79. package/dist/locale/fa.min.js +1 -1
  80. package/dist/locale/fa.min.mjs +1 -1
  81. package/dist/locale/fa.mjs +1 -1
  82. package/dist/locale/fi.js +1 -1
  83. package/dist/locale/fi.min.js +1 -1
  84. package/dist/locale/fi.min.mjs +1 -1
  85. package/dist/locale/fi.mjs +1 -1
  86. package/dist/locale/fr.js +1 -1
  87. package/dist/locale/fr.min.js +1 -1
  88. package/dist/locale/fr.min.mjs +1 -1
  89. package/dist/locale/fr.mjs +1 -1
  90. package/dist/locale/he.js +1 -1
  91. package/dist/locale/he.min.js +1 -1
  92. package/dist/locale/he.min.mjs +1 -1
  93. package/dist/locale/he.mjs +1 -1
  94. package/dist/locale/hi.js +1 -1
  95. package/dist/locale/hi.min.js +1 -1
  96. package/dist/locale/hi.min.mjs +1 -1
  97. package/dist/locale/hi.mjs +1 -1
  98. package/dist/locale/hr.js +1 -1
  99. package/dist/locale/hr.min.js +1 -1
  100. package/dist/locale/hr.min.mjs +1 -1
  101. package/dist/locale/hr.mjs +1 -1
  102. package/dist/locale/hu.js +1 -1
  103. package/dist/locale/hu.min.js +1 -1
  104. package/dist/locale/hu.min.mjs +1 -1
  105. package/dist/locale/hu.mjs +1 -1
  106. package/dist/locale/hy-am.js +1 -1
  107. package/dist/locale/hy-am.min.js +1 -1
  108. package/dist/locale/hy-am.min.mjs +1 -1
  109. package/dist/locale/hy-am.mjs +1 -1
  110. package/dist/locale/id.js +1 -1
  111. package/dist/locale/id.min.js +1 -1
  112. package/dist/locale/id.min.mjs +1 -1
  113. package/dist/locale/id.mjs +1 -1
  114. package/dist/locale/it.js +1 -1
  115. package/dist/locale/it.min.js +1 -1
  116. package/dist/locale/it.min.mjs +1 -1
  117. package/dist/locale/it.mjs +1 -1
  118. package/dist/locale/ja.js +1 -1
  119. package/dist/locale/ja.min.js +1 -1
  120. package/dist/locale/ja.min.mjs +1 -1
  121. package/dist/locale/ja.mjs +1 -1
  122. package/dist/locale/kk.js +1 -1
  123. package/dist/locale/kk.min.js +1 -1
  124. package/dist/locale/kk.min.mjs +1 -1
  125. package/dist/locale/kk.mjs +1 -1
  126. package/dist/locale/km.js +1 -1
  127. package/dist/locale/km.min.js +1 -1
  128. package/dist/locale/km.min.mjs +1 -1
  129. package/dist/locale/km.mjs +1 -1
  130. package/dist/locale/ko.js +1 -1
  131. package/dist/locale/ko.min.js +1 -1
  132. package/dist/locale/ko.min.mjs +1 -1
  133. package/dist/locale/ko.mjs +1 -1
  134. package/dist/locale/ku.js +1 -1
  135. package/dist/locale/ku.min.js +1 -1
  136. package/dist/locale/ku.min.mjs +1 -1
  137. package/dist/locale/ku.mjs +1 -1
  138. package/dist/locale/ky.js +1 -1
  139. package/dist/locale/ky.min.js +1 -1
  140. package/dist/locale/ky.min.mjs +1 -1
  141. package/dist/locale/ky.mjs +1 -1
  142. package/dist/locale/lo.js +1 -1
  143. package/dist/locale/lo.min.js +1 -1
  144. package/dist/locale/lo.min.mjs +1 -1
  145. package/dist/locale/lo.mjs +1 -1
  146. package/dist/locale/lt.js +1 -1
  147. package/dist/locale/lt.min.js +1 -1
  148. package/dist/locale/lt.min.mjs +1 -1
  149. package/dist/locale/lt.mjs +1 -1
  150. package/dist/locale/lv.js +1 -1
  151. package/dist/locale/lv.min.js +1 -1
  152. package/dist/locale/lv.min.mjs +1 -1
  153. package/dist/locale/lv.mjs +1 -1
  154. package/dist/locale/mg.js +1 -1
  155. package/dist/locale/mg.min.js +1 -1
  156. package/dist/locale/mg.min.mjs +1 -1
  157. package/dist/locale/mg.mjs +1 -1
  158. package/dist/locale/mn.js +1 -1
  159. package/dist/locale/mn.min.js +1 -1
  160. package/dist/locale/mn.min.mjs +1 -1
  161. package/dist/locale/mn.mjs +1 -1
  162. package/dist/locale/ms.js +1 -1
  163. package/dist/locale/ms.min.js +1 -1
  164. package/dist/locale/ms.min.mjs +1 -1
  165. package/dist/locale/ms.mjs +1 -1
  166. package/dist/locale/my.js +1 -1
  167. package/dist/locale/my.min.js +1 -1
  168. package/dist/locale/my.min.mjs +1 -1
  169. package/dist/locale/my.mjs +1 -1
  170. package/dist/locale/nb-no.js +55 -55
  171. package/dist/locale/nb-no.min.js +2 -2
  172. package/dist/locale/nb-no.min.js.map +1 -1
  173. package/dist/locale/nb-no.min.mjs +2 -2
  174. package/dist/locale/nb-no.min.mjs.map +1 -1
  175. package/dist/locale/nb-no.mjs +55 -55
  176. package/dist/locale/nl.js +1 -1
  177. package/dist/locale/nl.min.js +1 -1
  178. package/dist/locale/nl.min.mjs +1 -1
  179. package/dist/locale/nl.mjs +1 -1
  180. package/dist/locale/no.js +17 -17
  181. package/dist/locale/no.min.js +2 -2
  182. package/dist/locale/no.min.js.map +1 -1
  183. package/dist/locale/no.min.mjs +2 -2
  184. package/dist/locale/no.min.mjs.map +1 -1
  185. package/dist/locale/no.mjs +17 -17
  186. package/dist/locale/pa.js +1 -1
  187. package/dist/locale/pa.min.js +1 -1
  188. package/dist/locale/pa.min.mjs +1 -1
  189. package/dist/locale/pa.mjs +1 -1
  190. package/dist/locale/pl.js +1 -1
  191. package/dist/locale/pl.min.js +1 -1
  192. package/dist/locale/pl.min.mjs +1 -1
  193. package/dist/locale/pl.mjs +1 -1
  194. package/dist/locale/pt-br.js +1 -1
  195. package/dist/locale/pt-br.min.js +1 -1
  196. package/dist/locale/pt-br.min.mjs +1 -1
  197. package/dist/locale/pt-br.mjs +1 -1
  198. package/dist/locale/pt.js +1 -1
  199. package/dist/locale/pt.min.js +1 -1
  200. package/dist/locale/pt.min.mjs +1 -1
  201. package/dist/locale/pt.mjs +1 -1
  202. package/dist/locale/ro.js +1 -1
  203. package/dist/locale/ro.min.js +1 -1
  204. package/dist/locale/ro.min.mjs +1 -1
  205. package/dist/locale/ro.mjs +1 -1
  206. package/dist/locale/ru.js +1 -1
  207. package/dist/locale/ru.min.js +1 -1
  208. package/dist/locale/ru.min.mjs +1 -1
  209. package/dist/locale/ru.mjs +1 -1
  210. package/dist/locale/sk.js +1 -1
  211. package/dist/locale/sk.min.js +1 -1
  212. package/dist/locale/sk.min.mjs +1 -1
  213. package/dist/locale/sk.mjs +1 -1
  214. package/dist/locale/sl.js +1 -1
  215. package/dist/locale/sl.min.js +1 -1
  216. package/dist/locale/sl.min.mjs +1 -1
  217. package/dist/locale/sl.mjs +1 -1
  218. package/dist/locale/sr.js +1 -1
  219. package/dist/locale/sr.min.js +1 -1
  220. package/dist/locale/sr.min.mjs +1 -1
  221. package/dist/locale/sr.mjs +1 -1
  222. package/dist/locale/sv.js +1 -1
  223. package/dist/locale/sv.min.js +1 -1
  224. package/dist/locale/sv.min.mjs +1 -1
  225. package/dist/locale/sv.mjs +1 -1
  226. package/dist/locale/sw.js +1 -1
  227. package/dist/locale/sw.min.js +1 -1
  228. package/dist/locale/sw.min.mjs +1 -1
  229. package/dist/locale/sw.mjs +1 -1
  230. package/dist/locale/ta.js +1 -1
  231. package/dist/locale/ta.min.js +1 -1
  232. package/dist/locale/ta.min.mjs +1 -1
  233. package/dist/locale/ta.mjs +1 -1
  234. package/dist/locale/te.js +1 -1
  235. package/dist/locale/te.min.js +1 -1
  236. package/dist/locale/te.min.mjs +1 -1
  237. package/dist/locale/te.mjs +1 -1
  238. package/dist/locale/th.js +1 -1
  239. package/dist/locale/th.min.js +1 -1
  240. package/dist/locale/th.min.mjs +1 -1
  241. package/dist/locale/th.mjs +1 -1
  242. package/dist/locale/tk.js +1 -1
  243. package/dist/locale/tk.min.js +1 -1
  244. package/dist/locale/tk.min.mjs +1 -1
  245. package/dist/locale/tk.mjs +1 -1
  246. package/dist/locale/tr.js +1 -1
  247. package/dist/locale/tr.min.js +1 -1
  248. package/dist/locale/tr.min.mjs +1 -1
  249. package/dist/locale/tr.mjs +1 -1
  250. package/dist/locale/ug-cn.js +1 -1
  251. package/dist/locale/ug-cn.min.js +1 -1
  252. package/dist/locale/ug-cn.min.mjs +1 -1
  253. package/dist/locale/ug-cn.mjs +1 -1
  254. package/dist/locale/uk.js +1 -1
  255. package/dist/locale/uk.min.js +1 -1
  256. package/dist/locale/uk.min.mjs +1 -1
  257. package/dist/locale/uk.mjs +1 -1
  258. package/dist/locale/uz-uz.js +1 -1
  259. package/dist/locale/uz-uz.min.js +1 -1
  260. package/dist/locale/uz-uz.min.mjs +1 -1
  261. package/dist/locale/uz-uz.mjs +1 -1
  262. package/dist/locale/vi.js +1 -1
  263. package/dist/locale/vi.min.js +1 -1
  264. package/dist/locale/vi.min.mjs +1 -1
  265. package/dist/locale/vi.mjs +1 -1
  266. package/dist/locale/zh-cn.js +1 -1
  267. package/dist/locale/zh-cn.min.js +1 -1
  268. package/dist/locale/zh-cn.min.mjs +1 -1
  269. package/dist/locale/zh-cn.mjs +1 -1
  270. package/dist/locale/zh-hk.js +1 -1
  271. package/dist/locale/zh-hk.min.js +1 -1
  272. package/dist/locale/zh-hk.min.mjs +1 -1
  273. package/dist/locale/zh-hk.mjs +1 -1
  274. package/dist/locale/zh-mo.js +1 -1
  275. package/dist/locale/zh-mo.min.js +1 -1
  276. package/dist/locale/zh-mo.min.mjs +1 -1
  277. package/dist/locale/zh-mo.mjs +1 -1
  278. package/dist/locale/zh-tw.js +1 -1
  279. package/dist/locale/zh-tw.min.js +1 -1
  280. package/dist/locale/zh-tw.min.mjs +1 -1
  281. package/dist/locale/zh-tw.mjs +1 -1
  282. package/es/components/affix/src/affix.vue.d.ts +2 -2
  283. package/es/components/alert/src/alert.d.ts +1 -1
  284. package/es/components/alert/src/alert.vue.d.ts +2 -2
  285. package/es/components/autocomplete/src/autocomplete.d.ts +2 -2
  286. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  287. package/es/components/avatar/src/avatar-group.d.ts +1 -1
  288. package/es/components/avatar/src/avatar.d.ts +1 -1
  289. package/es/components/badge/src/badge.d.ts +1 -1
  290. package/es/components/badge/src/badge.vue.d.ts +1 -1
  291. package/es/components/button/src/button-group.d.ts +1 -1
  292. package/es/components/button/src/button-group.vue.d.ts +1 -1
  293. package/es/components/button/src/button.d.ts +1 -1
  294. package/es/components/button/src/button.vue.d.ts +4 -4
  295. package/es/components/button/src/use-button.d.ts +1 -1
  296. package/es/components/calendar/src/use-calendar.mjs +1 -1
  297. package/es/components/calendar/src/use-calendar.mjs.map +1 -1
  298. package/es/components/card/src/card.vue.d.ts +1 -1
  299. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
  300. package/es/components/carousel/src/carousel.d.ts +1 -1
  301. package/es/components/carousel/src/carousel.vue.d.ts +1 -1
  302. package/es/components/cascader/src/cascader.d.ts +2 -2
  303. package/es/components/cascader/src/cascader.vue.d.ts +13 -13
  304. package/es/components/cascader-panel/src/index.vue.d.ts +3 -3
  305. package/es/components/cascader-panel/src/menu.vue.d.ts +1 -1
  306. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  307. package/es/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
  308. package/es/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
  309. package/es/components/checkbox/src/checkbox.d.ts +8 -8
  310. package/es/components/checkbox/src/checkbox.vue.d.ts +5 -5
  311. package/es/components/col/src/col.vue.d.ts +1 -1
  312. package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
  313. package/es/components/color-picker/src/color-picker.vue.d.ts +7 -7
  314. package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  315. package/es/components/countdown/src/countdown.vue.d.ts +2 -2
  316. package/es/components/date-picker/src/date-picker.d.ts +8 -8
  317. package/es/components/date-picker/src/props.d.ts +1 -1
  318. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  319. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  320. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  321. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
  322. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +1 -1
  323. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +6 -6
  324. package/es/components/date-picker-panel/src/panel-utils.d.ts +12 -12
  325. package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  326. package/es/components/descriptions/src/description-item.d.ts +12 -12
  327. package/es/components/descriptions/src/description.vue.d.ts +1 -1
  328. package/es/components/dialog/src/dialog.vue.d.ts +5 -5
  329. package/es/components/divider/src/divider.vue.d.ts +1 -1
  330. package/es/components/drawer/src/drawer.vue.d.ts +5 -5
  331. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  332. package/es/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  333. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  334. package/es/components/dropdown/src/dropdown.d.ts +3 -3
  335. package/es/components/dropdown/src/dropdown.vue.d.ts +51 -51
  336. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  337. package/es/components/form/src/form-item.d.ts +1 -1
  338. package/es/components/form/src/form-item.vue.d.ts +1 -1
  339. package/es/components/image/src/image.d.ts +1 -1
  340. package/es/components/image/src/image.vue.d.ts +6 -6
  341. package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  342. package/es/components/index.d.ts +2 -2
  343. package/es/components/index.mjs +2 -2
  344. package/es/components/input/src/input.d.ts +2 -2
  345. package/es/components/input/src/input.vue.d.ts +16 -16
  346. package/es/components/input-number/src/input-number.d.ts +2 -2
  347. package/es/components/input-number/src/input-number.vue.d.ts +9 -9
  348. package/es/components/input-otp/src/input-otp.d.ts +1 -1
  349. package/es/components/input-otp/src/input-otp.mjs.map +1 -1
  350. package/es/components/input-otp/src/input-otp.vue.d.ts +7 -9
  351. package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs +4 -4
  352. package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  353. package/es/components/input-otp/src/input-otp2.mjs.map +1 -1
  354. package/es/components/input-tag/src/input-tag.d.ts +2 -2
  355. package/es/components/input-tag/src/input-tag.vue.d.ts +10 -10
  356. package/es/components/link/src/link.d.ts +1 -1
  357. package/es/components/mention/src/mention.d.ts +2 -2
  358. package/es/components/mention/src/mention.vue.d.ts +5 -5
  359. package/es/components/menu/src/menu.d.ts +9 -9
  360. package/es/components/message/src/message.d.ts +1 -1
  361. package/es/components/message/src/message.vue.d.ts +3 -3
  362. package/es/components/message-box/src/index.vue.d.ts +61 -61
  363. package/es/components/notification/src/notification.d.ts +1 -1
  364. package/es/components/notification/src/notification.vue.d.ts +3 -3
  365. package/es/components/pagination/src/components/next.vue.d.ts +1 -1
  366. package/es/components/pagination/src/components/pager.vue.d.ts +1 -1
  367. package/es/components/pagination/src/components/prev.vue.d.ts +1 -1
  368. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  369. package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  370. package/es/components/popover/src/popover.d.ts +1 -1
  371. package/es/components/popover/src/popover.vue.d.ts +4 -4
  372. package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  373. package/es/components/popper/src/content.d.ts +4 -4
  374. package/es/components/popper/src/content.vue.d.ts +10 -10
  375. package/es/components/popper/src/popper.d.ts +2 -2
  376. package/es/components/progress/src/progress.vue.d.ts +2 -2
  377. package/es/components/radio/src/radio-button.d.ts +3 -3
  378. package/es/components/radio/src/radio-button.vue.d.ts +3 -3
  379. package/es/components/radio/src/radio-group.vue.d.ts +6 -6
  380. package/es/components/radio/src/radio.d.ts +6 -6
  381. package/es/components/radio/src/radio.vue.d.ts +3 -3
  382. package/es/components/rate/src/rate.vue.d.ts +2 -2
  383. package/es/components/result/src/result.d.ts +1 -1
  384. package/es/components/result/src/result.vue.d.ts +1 -1
  385. package/es/components/row/src/row.vue.d.ts +1 -1
  386. package/es/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
  387. package/es/components/segmented/index.d.ts +3 -3
  388. package/es/components/segmented/src/segmented.d.ts +1 -1
  389. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  390. package/es/components/select/src/option.d.ts +2 -2
  391. package/es/components/select/src/option.vue.d.ts +5 -5
  392. package/es/components/select/src/select.d.ts +3 -3
  393. package/es/components/select/src/select.vue.d.ts +53 -53
  394. package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
  395. package/es/components/select/src/select2.mjs +1 -1
  396. package/es/components/select/src/select2.mjs.map +1 -1
  397. package/es/components/select/src/useOption.d.ts +2 -2
  398. package/es/components/select/src/useSelect.d.ts +5 -5
  399. package/es/components/select-v2/src/defaults.d.ts +1 -1
  400. package/es/components/select-v2/src/select.mjs +1 -1
  401. package/es/components/select-v2/src/select.mjs.map +1 -1
  402. package/es/components/select-v2/src/select.vue.d.ts +37 -37
  403. package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs.map +1 -1
  404. package/es/components/select-v2/src/useSelect.d.ts +1 -1
  405. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  406. package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
  407. package/es/components/slider/src/slider.vue.d.ts +7 -7
  408. package/es/components/space/src/space.d.ts +1 -1
  409. package/es/components/steps/src/item.d.ts +1 -1
  410. package/es/components/steps/src/item.vue.d.ts +2 -2
  411. package/es/components/steps/src/steps.d.ts +2 -2
  412. package/es/components/steps/src/steps.vue.d.ts +1 -1
  413. package/es/components/switch/src/switch.vue.d.ts +3 -3
  414. package/es/components/switch/src/switch.vue_vue_type_script_setup_true_lang.mjs +1 -0
  415. package/es/components/switch/src/switch.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  416. package/es/components/switch/src/switch2.mjs.map +1 -1
  417. package/es/components/table/src/filter-panel.vue.d.ts +50 -50
  418. package/es/components/table/src/store/helper.d.ts +1 -0
  419. package/es/components/table/src/store/index.d.ts +2 -0
  420. package/es/components/table/src/store/watcher.d.ts +1 -0
  421. package/es/components/table/src/store/watcher.mjs +17 -3
  422. package/es/components/table/src/store/watcher.mjs.map +1 -1
  423. package/es/components/table/src/table/defaults.d.ts +5 -5
  424. package/es/components/table/src/table/utils-helper.d.ts +1 -0
  425. package/es/components/table/src/table/utils-helper.mjs +4 -0
  426. package/es/components/table/src/table/utils-helper.mjs.map +1 -1
  427. package/es/components/table/src/table-column/defaults.d.ts +2 -2
  428. package/es/components/table/src/table-column/index.vue.d.ts +1 -1
  429. package/es/components/table/src/table-footer/index.d.ts +1 -1
  430. package/es/components/table/src/table-header/index.d.ts +16 -16
  431. package/es/components/table/src/table.mjs.map +1 -1
  432. package/es/components/table/src/table.vue.d.ts +8 -3
  433. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +5 -1
  434. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  435. package/es/components/table-v2/src/components/header.d.ts +1 -1
  436. package/es/components/table-v2/src/components/row.d.ts +1 -1
  437. package/es/components/table-v2/src/table-grid.d.ts +3 -3
  438. package/es/components/table-v2/src/table-v2.d.ts +5 -5
  439. package/es/components/tag/src/tag.d.ts +1 -1
  440. package/es/components/text/src/text.d.ts +1 -1
  441. package/es/components/text/src/text.vue.d.ts +1 -1
  442. package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  443. package/es/components/time-picker/src/common/picker.vue.d.ts +12 -12
  444. package/es/components/time-picker/src/common/props.d.ts +1 -1
  445. package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  446. package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
  447. package/es/components/time-picker/src/time-picker.d.ts +8 -8
  448. package/es/components/time-select/index.d.ts +2 -2
  449. package/es/components/time-select/index.mjs +2 -2
  450. package/es/components/time-select/src/time-select.d.ts +3 -1
  451. package/es/components/time-select/src/time-select.mjs +5 -3
  452. package/es/components/time-select/src/time-select.mjs.map +1 -1
  453. package/es/components/time-select/src/time-select.vue.d.ts +10 -10
  454. package/es/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.mjs +18 -25
  455. package/es/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  456. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  457. package/es/components/time-select/src/utils.d.ts +2 -1
  458. package/es/components/time-select/src/utils.mjs +3 -1
  459. package/es/components/time-select/src/utils.mjs.map +1 -1
  460. package/es/components/timeline/src/timeline-item.d.ts +1 -1
  461. package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
  462. package/es/components/tooltip/src/content.d.ts +1 -1
  463. package/es/components/tooltip/src/content.vue.d.ts +4 -4
  464. package/es/components/tooltip/src/tooltip.d.ts +3 -3
  465. package/es/components/tooltip/src/tooltip.vue.d.ts +7 -7
  466. package/es/components/tooltip/src/trigger.d.ts +1 -1
  467. package/es/components/tour/src/content.d.ts +1 -1
  468. package/es/components/tour/src/helper.d.ts +0 -1
  469. package/es/components/tour/src/helper.mjs.map +1 -1
  470. package/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs +1 -3
  471. package/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  472. package/es/components/tour/src/step2.mjs.map +1 -1
  473. package/es/components/tour/src/tour.d.ts +6 -1
  474. package/es/components/tour/src/tour.mjs +1 -4
  475. package/es/components/tour/src/tour.mjs.map +1 -1
  476. package/es/components/tour/src/tour.vue.d.ts +4 -5
  477. package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs +21 -9
  478. package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  479. package/es/components/tour/src/tour2.mjs.map +1 -1
  480. package/es/components/transfer/src/composables/use-check.d.ts +6 -1
  481. package/es/components/transfer/src/composables/use-check.mjs +12 -1
  482. package/es/components/transfer/src/composables/use-check.mjs.map +1 -1
  483. package/es/components/transfer/src/transfer-panel.d.ts +4 -0
  484. package/es/components/transfer/src/transfer-panel.mjs +3 -1
  485. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  486. package/es/components/transfer/src/transfer-panel.vue.d.ts +1 -1
  487. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs +38 -4
  488. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  489. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  490. package/es/components/transfer/src/transfer.d.ts +10 -0
  491. package/es/components/transfer/src/transfer.mjs +11 -0
  492. package/es/components/transfer/src/transfer.mjs.map +1 -1
  493. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  494. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs +8 -0
  495. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  496. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  497. package/es/components/transfer/style/css.mjs +1 -0
  498. package/es/components/transfer/style/index.mjs +1 -0
  499. package/es/components/tree/src/tree-node.vue.d.ts +15 -15
  500. package/es/components/tree/src/tree.vue.d.ts +15 -15
  501. package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
  502. package/es/components/tree-select/src/tree-select.vue.d.ts +19 -19
  503. package/es/components/tree-v2/src/composables/useTree.d.ts +12 -12
  504. package/es/components/tree-v2/src/composables/useTree.mjs +1 -1
  505. package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
  506. package/es/components/tree-v2/src/tree.vue.d.ts +3 -3
  507. package/es/components/upload/src/upload-content.d.ts +1 -1
  508. package/es/components/upload/src/upload-content.vue.d.ts +1 -1
  509. package/es/components/upload/src/upload-list.d.ts +1 -1
  510. package/es/components/upload/src/upload.d.ts +2 -2
  511. package/es/components/upload/src/upload.vue.d.ts +2 -2
  512. package/es/components/virtual-list/src/builders/build-grid.d.ts +6 -6
  513. package/es/components/virtual-list/src/builders/build-list.d.ts +6 -6
  514. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +6 -6
  515. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +6 -6
  516. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +6 -6
  517. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +6 -6
  518. package/es/components/virtual-list/src/utils.d.ts +1 -1
  519. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  520. package/es/hooks/use-floating/index.d.ts +8 -8
  521. package/es/index.d.ts +2 -2
  522. package/es/index.mjs +2 -2
  523. package/es/locale/lang/nb-no.mjs +54 -54
  524. package/es/locale/lang/nb-no.mjs.map +1 -1
  525. package/es/locale/lang/no.mjs +16 -16
  526. package/es/locale/lang/no.mjs.map +1 -1
  527. package/es/utils/vue/vnode.d.ts +4 -4
  528. package/es/version.d.ts +1 -1
  529. package/es/version.mjs +1 -1
  530. package/es/version.mjs.map +1 -1
  531. package/lib/components/affix/src/affix.vue.d.ts +2 -2
  532. package/lib/components/alert/src/alert.d.ts +1 -1
  533. package/lib/components/alert/src/alert.vue.d.ts +2 -2
  534. package/lib/components/autocomplete/src/autocomplete.d.ts +2 -2
  535. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  536. package/lib/components/avatar/src/avatar-group.d.ts +1 -1
  537. package/lib/components/avatar/src/avatar.d.ts +1 -1
  538. package/lib/components/badge/src/badge.d.ts +1 -1
  539. package/lib/components/badge/src/badge.vue.d.ts +1 -1
  540. package/lib/components/button/src/button-group.d.ts +1 -1
  541. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  542. package/lib/components/button/src/button.d.ts +1 -1
  543. package/lib/components/button/src/button.vue.d.ts +4 -4
  544. package/lib/components/button/src/use-button.d.ts +1 -1
  545. package/lib/components/calendar/src/use-calendar.js +1 -1
  546. package/lib/components/calendar/src/use-calendar.js.map +1 -1
  547. package/lib/components/card/src/card.vue.d.ts +1 -1
  548. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
  549. package/lib/components/carousel/src/carousel.d.ts +1 -1
  550. package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
  551. package/lib/components/cascader/src/cascader.d.ts +2 -2
  552. package/lib/components/cascader/src/cascader.vue.d.ts +13 -13
  553. package/lib/components/cascader-panel/src/index.vue.d.ts +3 -3
  554. package/lib/components/cascader-panel/src/menu.vue.d.ts +1 -1
  555. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  556. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +5 -5
  557. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
  558. package/lib/components/checkbox/src/checkbox.d.ts +8 -8
  559. package/lib/components/checkbox/src/checkbox.vue.d.ts +5 -5
  560. package/lib/components/col/src/col.vue.d.ts +1 -1
  561. package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
  562. package/lib/components/color-picker/src/color-picker.vue.d.ts +7 -7
  563. package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  564. package/lib/components/countdown/src/countdown.vue.d.ts +2 -2
  565. package/lib/components/date-picker/src/date-picker.d.ts +8 -8
  566. package/lib/components/date-picker/src/props.d.ts +1 -1
  567. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  568. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  569. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  570. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
  571. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +1 -1
  572. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +6 -6
  573. package/lib/components/date-picker-panel/src/panel-utils.d.ts +12 -12
  574. package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  575. package/lib/components/descriptions/src/description-item.d.ts +12 -12
  576. package/lib/components/descriptions/src/description.vue.d.ts +1 -1
  577. package/lib/components/dialog/src/dialog.vue.d.ts +5 -5
  578. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  579. package/lib/components/drawer/src/drawer.vue.d.ts +5 -5
  580. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  581. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  582. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  583. package/lib/components/dropdown/src/dropdown.d.ts +3 -3
  584. package/lib/components/dropdown/src/dropdown.vue.d.ts +51 -51
  585. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  586. package/lib/components/form/src/form-item.d.ts +1 -1
  587. package/lib/components/form/src/form-item.vue.d.ts +1 -1
  588. package/lib/components/image/src/image.d.ts +1 -1
  589. package/lib/components/image/src/image.vue.d.ts +6 -6
  590. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  591. package/lib/components/index.d.ts +2 -2
  592. package/lib/components/index.js +2 -0
  593. package/lib/components/input/src/input.d.ts +2 -2
  594. package/lib/components/input/src/input.vue.d.ts +16 -16
  595. package/lib/components/input-number/src/input-number.d.ts +2 -2
  596. package/lib/components/input-number/src/input-number.vue.d.ts +9 -9
  597. package/lib/components/input-otp/src/input-otp.d.ts +1 -1
  598. package/lib/components/input-otp/src/input-otp.js.map +1 -1
  599. package/lib/components/input-otp/src/input-otp.vue.d.ts +7 -9
  600. package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js +3 -3
  601. package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js.map +1 -1
  602. package/lib/components/input-otp/src/input-otp2.js.map +1 -1
  603. package/lib/components/input-tag/src/input-tag.d.ts +2 -2
  604. package/lib/components/input-tag/src/input-tag.vue.d.ts +10 -10
  605. package/lib/components/link/src/link.d.ts +1 -1
  606. package/lib/components/mention/src/mention.d.ts +2 -2
  607. package/lib/components/mention/src/mention.vue.d.ts +5 -5
  608. package/lib/components/menu/src/menu.d.ts +9 -9
  609. package/lib/components/message/src/message.d.ts +1 -1
  610. package/lib/components/message/src/message.vue.d.ts +3 -3
  611. package/lib/components/message-box/src/index.vue.d.ts +61 -61
  612. package/lib/components/notification/src/notification.d.ts +1 -1
  613. package/lib/components/notification/src/notification.vue.d.ts +3 -3
  614. package/lib/components/pagination/src/components/next.vue.d.ts +1 -1
  615. package/lib/components/pagination/src/components/pager.vue.d.ts +1 -1
  616. package/lib/components/pagination/src/components/prev.vue.d.ts +1 -1
  617. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  618. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  619. package/lib/components/popover/src/popover.d.ts +1 -1
  620. package/lib/components/popover/src/popover.vue.d.ts +4 -4
  621. package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  622. package/lib/components/popper/src/content.d.ts +4 -4
  623. package/lib/components/popper/src/content.vue.d.ts +10 -10
  624. package/lib/components/popper/src/popper.d.ts +2 -2
  625. package/lib/components/progress/src/progress.vue.d.ts +2 -2
  626. package/lib/components/radio/src/radio-button.d.ts +3 -3
  627. package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
  628. package/lib/components/radio/src/radio-group.vue.d.ts +6 -6
  629. package/lib/components/radio/src/radio.d.ts +6 -6
  630. package/lib/components/radio/src/radio.vue.d.ts +3 -3
  631. package/lib/components/rate/src/rate.vue.d.ts +2 -2
  632. package/lib/components/result/src/result.d.ts +1 -1
  633. package/lib/components/result/src/result.vue.d.ts +1 -1
  634. package/lib/components/row/src/row.vue.d.ts +1 -1
  635. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +1 -1
  636. package/lib/components/segmented/index.d.ts +3 -3
  637. package/lib/components/segmented/src/segmented.d.ts +1 -1
  638. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  639. package/lib/components/select/src/option.d.ts +2 -2
  640. package/lib/components/select/src/option.vue.d.ts +5 -5
  641. package/lib/components/select/src/select.d.ts +3 -3
  642. package/lib/components/select/src/select.vue.d.ts +53 -53
  643. package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
  644. package/lib/components/select/src/select2.js +1 -1
  645. package/lib/components/select/src/select2.js.map +1 -1
  646. package/lib/components/select/src/useOption.d.ts +2 -2
  647. package/lib/components/select/src/useSelect.d.ts +5 -5
  648. package/lib/components/select-v2/src/defaults.d.ts +1 -1
  649. package/lib/components/select-v2/src/select.js +1 -1
  650. package/lib/components/select-v2/src/select.js.map +1 -1
  651. package/lib/components/select-v2/src/select.vue.d.ts +37 -37
  652. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
  653. package/lib/components/select-v2/src/useSelect.d.ts +1 -1
  654. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  655. package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
  656. package/lib/components/slider/src/slider.vue.d.ts +7 -7
  657. package/lib/components/space/src/space.d.ts +1 -1
  658. package/lib/components/steps/src/item.d.ts +1 -1
  659. package/lib/components/steps/src/item.vue.d.ts +2 -2
  660. package/lib/components/steps/src/steps.d.ts +2 -2
  661. package/lib/components/steps/src/steps.vue.d.ts +1 -1
  662. package/lib/components/switch/src/switch.vue.d.ts +3 -3
  663. package/lib/components/switch/src/switch.vue_vue_type_script_setup_true_lang.js +1 -0
  664. package/lib/components/switch/src/switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  665. package/lib/components/switch/src/switch2.js.map +1 -1
  666. package/lib/components/table/src/filter-panel.vue.d.ts +50 -50
  667. package/lib/components/table/src/store/helper.d.ts +1 -0
  668. package/lib/components/table/src/store/index.d.ts +2 -0
  669. package/lib/components/table/src/store/watcher.d.ts +1 -0
  670. package/lib/components/table/src/store/watcher.js +17 -3
  671. package/lib/components/table/src/store/watcher.js.map +1 -1
  672. package/lib/components/table/src/table/defaults.d.ts +5 -5
  673. package/lib/components/table/src/table/utils-helper.d.ts +1 -0
  674. package/lib/components/table/src/table/utils-helper.js +4 -0
  675. package/lib/components/table/src/table/utils-helper.js.map +1 -1
  676. package/lib/components/table/src/table-column/defaults.d.ts +2 -2
  677. package/lib/components/table/src/table-column/index.vue.d.ts +1 -1
  678. package/lib/components/table/src/table-footer/index.d.ts +1 -1
  679. package/lib/components/table/src/table-header/index.d.ts +16 -16
  680. package/lib/components/table/src/table.js.map +1 -1
  681. package/lib/components/table/src/table.vue.d.ts +8 -3
  682. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +5 -1
  683. package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -1
  684. package/lib/components/table-v2/src/components/header.d.ts +1 -1
  685. package/lib/components/table-v2/src/components/row.d.ts +1 -1
  686. package/lib/components/table-v2/src/table-grid.d.ts +3 -3
  687. package/lib/components/table-v2/src/table-v2.d.ts +5 -5
  688. package/lib/components/tag/src/tag.d.ts +1 -1
  689. package/lib/components/text/src/text.d.ts +1 -1
  690. package/lib/components/text/src/text.vue.d.ts +1 -1
  691. package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  692. package/lib/components/time-picker/src/common/picker.vue.d.ts +12 -12
  693. package/lib/components/time-picker/src/common/props.d.ts +1 -1
  694. package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
  695. package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
  696. package/lib/components/time-picker/src/time-picker.d.ts +8 -8
  697. package/lib/components/time-select/index.d.ts +2 -2
  698. package/lib/components/time-select/index.js +2 -0
  699. package/lib/components/time-select/src/time-select.d.ts +3 -1
  700. package/lib/components/time-select/src/time-select.js +6 -2
  701. package/lib/components/time-select/src/time-select.js.map +1 -1
  702. package/lib/components/time-select/src/time-select.vue.d.ts +10 -10
  703. package/lib/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.js +16 -23
  704. package/lib/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  705. package/lib/components/time-select/src/time-select2.js.map +1 -1
  706. package/lib/components/time-select/src/utils.d.ts +2 -1
  707. package/lib/components/time-select/src/utils.js +3 -0
  708. package/lib/components/time-select/src/utils.js.map +1 -1
  709. package/lib/components/timeline/src/timeline-item.d.ts +1 -1
  710. package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
  711. package/lib/components/tooltip/src/content.d.ts +1 -1
  712. package/lib/components/tooltip/src/content.vue.d.ts +4 -4
  713. package/lib/components/tooltip/src/tooltip.d.ts +3 -3
  714. package/lib/components/tooltip/src/tooltip.vue.d.ts +7 -7
  715. package/lib/components/tooltip/src/trigger.d.ts +1 -1
  716. package/lib/components/tour/src/content.d.ts +1 -1
  717. package/lib/components/tour/src/helper.d.ts +0 -1
  718. package/lib/components/tour/src/helper.js.map +1 -1
  719. package/lib/components/tour/src/step.vue_vue_type_script_setup_true_lang.js +1 -3
  720. package/lib/components/tour/src/step.vue_vue_type_script_setup_true_lang.js.map +1 -1
  721. package/lib/components/tour/src/step2.js.map +1 -1
  722. package/lib/components/tour/src/tour.d.ts +6 -1
  723. package/lib/components/tour/src/tour.js +1 -4
  724. package/lib/components/tour/src/tour.js.map +1 -1
  725. package/lib/components/tour/src/tour.vue.d.ts +4 -5
  726. package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js +20 -8
  727. package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
  728. package/lib/components/tour/src/tour2.js.map +1 -1
  729. package/lib/components/transfer/src/composables/use-check.d.ts +6 -1
  730. package/lib/components/transfer/src/composables/use-check.js +11 -0
  731. package/lib/components/transfer/src/composables/use-check.js.map +1 -1
  732. package/lib/components/transfer/src/transfer-panel.d.ts +4 -0
  733. package/lib/components/transfer/src/transfer-panel.js +3 -1
  734. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  735. package/lib/components/transfer/src/transfer-panel.vue.d.ts +1 -1
  736. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js +37 -3
  737. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  738. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  739. package/lib/components/transfer/src/transfer.d.ts +10 -0
  740. package/lib/components/transfer/src/transfer.js +11 -0
  741. package/lib/components/transfer/src/transfer.js.map +1 -1
  742. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  743. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js +8 -0
  744. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  745. package/lib/components/transfer/src/transfer2.js.map +1 -1
  746. package/lib/components/transfer/style/css.js +1 -0
  747. package/lib/components/transfer/style/index.js +1 -0
  748. package/lib/components/tree/src/tree-node.vue.d.ts +15 -15
  749. package/lib/components/tree/src/tree.vue.d.ts +15 -15
  750. package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
  751. package/lib/components/tree-select/src/tree-select.vue.d.ts +19 -19
  752. package/lib/components/tree-v2/src/composables/useTree.d.ts +12 -12
  753. package/lib/components/tree-v2/src/composables/useTree.js +1 -1
  754. package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
  755. package/lib/components/tree-v2/src/tree.vue.d.ts +3 -3
  756. package/lib/components/upload/src/upload-content.d.ts +1 -1
  757. package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
  758. package/lib/components/upload/src/upload-list.d.ts +1 -1
  759. package/lib/components/upload/src/upload.d.ts +2 -2
  760. package/lib/components/upload/src/upload.vue.d.ts +2 -2
  761. package/lib/components/virtual-list/src/builders/build-grid.d.ts +6 -6
  762. package/lib/components/virtual-list/src/builders/build-list.d.ts +6 -6
  763. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +6 -6
  764. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +6 -6
  765. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +6 -6
  766. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +6 -6
  767. package/lib/components/virtual-list/src/utils.d.ts +1 -1
  768. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  769. package/lib/hooks/use-floating/index.d.ts +8 -8
  770. package/lib/index.d.ts +2 -2
  771. package/lib/index.js +2 -0
  772. package/lib/locale/lang/nb-no.js +54 -54
  773. package/lib/locale/lang/nb-no.js.map +1 -1
  774. package/lib/locale/lang/no.js +16 -16
  775. package/lib/locale/lang/no.js.map +1 -1
  776. package/lib/utils/vue/vnode.d.ts +4 -4
  777. package/lib/version.d.ts +1 -1
  778. package/lib/version.js +1 -1
  779. package/lib/version.js.map +1 -1
  780. package/package.json +5 -4
  781. package/tags.json +1 -1
  782. package/theme-chalk/el-drawer.css +1 -1
  783. package/theme-chalk/el-input-otp.css +1 -1
  784. package/theme-chalk/el-input.css +1 -1
  785. package/theme-chalk/index.css +1 -1
  786. package/theme-chalk/src/drawer.scss +1 -0
  787. package/theme-chalk/src/input-otp.scss +31 -12
  788. package/theme-chalk/src/input.scss +1 -0
  789. package/web-types.json +1 -1
@@ -34,7 +34,7 @@ declare const useTooltipTriggerPropsDefaults: {
34
34
  */
35
35
  declare const useTooltipTriggerProps: {
36
36
  readonly disabled: BooleanConstructor;
37
- readonly trigger: EpPropFinalized<(new (...args: any[]) => "focus" | "hover" | "click" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>) | (((new (...args: any[]) => "focus" | "hover" | "click" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>)) | null)[], unknown, unknown, "hover", boolean>;
37
+ readonly trigger: EpPropFinalized<(new (...args: any[]) => "click" | "contextmenu" | "focus" | "hover" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>) | (((new (...args: any[]) => "click" | "contextmenu" | "focus" | "hover" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>)) | null)[], unknown, unknown, "hover", boolean>;
38
38
  readonly triggerKeys: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => string[], boolean>;
39
39
  readonly focusOnTarget: BooleanConstructor;
40
40
  readonly virtualRef: {
@@ -37,7 +37,7 @@ interface TourContentProps {
37
37
  declare const tourContentProps: {
38
38
  placement: EpPropFinalized<(new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
39
39
  reference: EpPropFinalized<(new (...args: any[]) => HTMLElement | VirtualElement) | (() => HTMLElement | VirtualElement | null) | (((new (...args: any[]) => HTMLElement | VirtualElement) | (() => HTMLElement | VirtualElement | null)) | null)[], unknown, unknown, null, boolean>;
40
- strategy: EpPropFinalized<(new (...args: any[]) => "fixed" | "absolute") | (() => Strategy) | (((new (...args: any[]) => "fixed" | "absolute") | (() => Strategy)) | null)[], "fixed" | "absolute", unknown, string, boolean>;
40
+ strategy: EpPropFinalized<(new (...args: any[]) => "absolute" | "fixed") | (() => Strategy) | (((new (...args: any[]) => "absolute" | "fixed") | (() => Strategy)) | null)[], "absolute" | "fixed", unknown, string, boolean>;
41
41
  offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
42
42
  showArrow: BooleanConstructor;
43
43
  zIndex: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
@@ -30,7 +30,6 @@ interface TourContext {
30
30
  updateModelValue(modelValue: boolean): void;
31
31
  onClose(): void;
32
32
  onFinish(): void;
33
- onChange(): void;
34
33
  }
35
34
  declare const tourKey: InjectionKey<TourContext>;
36
35
  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>) => {
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","names":["isClient"],"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 offsetMiddleware,\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)) {\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 | undefined>\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 offsetMiddleware(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 const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (referenceEl && contentEl) {\n cleanup = autoUpdate(referenceEl, contentEl, update)\n }\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"],"mappings":";;;;;;;;AA4CA,MAAa,aACX,QAGA,MACA,KACA,YACA,0BACG;CACH,MAAM,WAAA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A,GAAA,IAAA,iBAAgB;EACd,MAAM,eAAA,GAAA,IAAA,OAAoB,aAAa;EACvC,MAAM,aAAA,GAAA,IAAA,OAAkB,WAAW;EACnC,IAAI,eAAe,WACjB,WAAA,GAAA,iBAAA,YAAqB,aAAa,WAAW,OAAO;EAGtD,CAAA,GAAA,IAAA,mBAAkB;GAChB,QAAQ;IACR;GACF;CAEF,CAAA,GAAA,IAAA,uBAAsB;EACpB,WAAW,SAAS;GACpB;CAEF,OAAO;EACL;EACA;EACA;EACD;;AAGH,MAAM,2BAAuC;CAC3C,OAAO;EACL,MAAM;EACN,MAAM,GAAG,OAAO;GACd,MAAM,WAAW,OAAA,GAAA,iBAAA,gBAAqB,MAAM;GAC5C,IAAI,YAAY;GAChB,IAAI,SAAS,OAAO,GAAG,YAAY,SAAS;GAC5C,IAAI,SAAS,QAAQ,GAAG,YAAY,SAAS;GAE7C,OAAO,EACL,MAAM,EACJ,UAHkB,MAAM,MAAM,SAAS,QAGb,WAC3B,EACF;;EAEJ"}
1
+ {"version":3,"file":"helper.js","names":["isClient"],"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 offsetMiddleware,\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)) {\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 | undefined>\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}\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 offsetMiddleware(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 const referenceEl = unref(referenceRef)\n const contentEl = unref(contentRef)\n if (referenceEl && contentEl) {\n cleanup = autoUpdate(referenceEl, contentEl, update)\n }\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"],"mappings":";;;;;;;;AA4CA,MAAa,aACX,QAGA,MACA,KACA,YACA,0BACG;CACH,MAAM,WAAA,GAAA,IAAA,KAAmC,KAAK;CAE9C,MAAM,oBAAoB;EACxB,IAAI;EACJ,KAAA,GAAA,YAAA,UAAa,OAAO,MAAM,EACxB,WAAW,SAAS,cAA2B,OAAO,MAAM;OACvD,KAAA,GAAA,YAAA,YAAe,OAAO,MAAM,EACjC,WAAW,OAAO,OAAO;OAEzB,WAAW,OAAO;EAEpB,OAAO;;CAGT,MAAM,sBAAsB;EAC1B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EACpB,WAAW,SAAS;GACpB;CAEF,OAAO;EACL;EACA;EACA;EACD;;AAGH,MAAM,2BAAuC;CAC3C,OAAO;EACL,MAAM;EACN,MAAM,GAAG,OAAO;GACd,MAAM,WAAW,OAAA,GAAA,iBAAA,gBAAqB,MAAM;GAC5C,IAAI,YAAY;GAChB,IAAI,SAAS,OAAO,GAAG,YAAY,SAAS;GAC5C,IAAI,SAAS,QAAQ,GAAG,YAAY,SAAS;GAE7C,OAAO,EACL,MAAM,EACJ,UAHkB,MAAM,MAAM,SAAS,QAGb,WAC3B,EACF;;EAEJ"}
@@ -21,7 +21,7 @@ var step_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
21
21
  const emit = __emit;
22
22
  const { Close } = require_icon.CloseComponents;
23
23
  const { t } = require_index.useLocale();
24
- const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish, onChange } = (0, vue.inject)(require_helper.tourKey);
24
+ const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish } = (0, vue.inject)(require_helper.tourKey);
25
25
  (0, vue.watch)(props, (val) => {
26
26
  currentStep.value = val;
27
27
  }, { immediate: true });
@@ -34,13 +34,11 @@ var step_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
34
34
  const onPrev = () => {
35
35
  current.value -= 1;
36
36
  if (props.prevButtonProps?.onClick) props.prevButtonProps?.onClick();
37
- onChange();
38
37
  };
39
38
  const onNext = () => {
40
39
  if (current.value >= total.value - 1) onFinish();
41
40
  else current.value += 1;
42
41
  if (props.nextButtonProps?.onClick) props.nextButtonProps.onClick();
43
- onChange();
44
42
  };
45
43
  const onFinish = () => {
46
44
  onClose();
@@ -1 +1 @@
1
- {"version":3,"file":"step.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n onChange,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n onChange()\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n onChange()\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":";;;;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EAAA,EAAA,CAAA,CAAA;;kFAG3B,QAAO,KAAA,GAAA,IAAA,OAAI,MAAK,GAAA,MAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OAUZ,gBAAA,SAAA,GAAA,GAAA,IAAA,YAAA;;KATV,MAAK;KACJ,OAAA,GAAA,IAAA,OAAM,WAAU,KAAA,YAAA,YAAA;OACT,kBAAkB,QAAA,gBAAe,EAAA,EACxC,SAAO,QAAM,CAAA,EAAA;qCAKZ,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAFA,QAAA,iBAAiB,cAAA,GAAA,IAAA,OAAuB,QAAO,MAAA,GAAA,IAAA,OAAK,MAAK,GAAA,KAAA,GAAA,IAAA,OAAO,EAAC,CAAA,iBAAA,IAAA,GAAA,IAAA,OAAqB,EAAC,CAAA,eAAA,EAAA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"step.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAoFA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAEb,MAAM,EAAE,UAAU,aAAA;EAElB,MAAM,EAAE,MAAM,cAAA,WAAU;EAExB,MAAM,EACJ,aACA,SACA,OACA,WACA,WACA,YACA,IACA,OAAO,WACP,kBACA,SAAS,aACT,UAAU,kBAAA,GAAA,IAAA,QACD,eAAA,QAAQ;EAEnB,CAAA,GAAA,IAAA,OACE,QACC,QAAQ;GACP,YAAY,QAAQ;KAEtB,EACE,WAAW,MACb,CACF;EAEA,MAAM,mBAAA,GAAA,IAAA,gBAAiC,MAAM,aAAa,UAAU,MAAK;EACzE,MAAM,mBAAA,GAAA,IAAA,gBACE,MAAM,aAAa,UAAU,SAAS,MAC9C;EAEA,MAAM,qBAAqB,aAA4B;GACrD,IAAI,CAAC,UAAU;GACf,QAAA,GAAA,eAAA,MAAY,UAAU,CAAC,YAAY,UAAU,CAAA;;EAG/C,MAAM,eAAe;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src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n onChange,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n onChange()\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n onChange()\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"step2.js","names":[],"sources":["../../../../../../packages/components/tour/src/step.vue"],"sourcesContent":["<template>\n <button\n v-if=\"mergedShowClose\"\n :aria-label=\"t('el.tour.close')\"\n :class=\"ns.e('closebtn')\"\n type=\"button\"\n @click=\"onClose\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"mergedCloseIcon\" />\n </el-icon>\n </button>\n <header :class=\"[ns.e('header'), { 'show-close': showClose }]\">\n <slot name=\"header\">\n <span role=\"heading\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </header>\n <div :class=\"ns.e('body')\">\n <slot>\n <span>{{ description }}</span>\n </slot>\n </div>\n <footer :class=\"ns.e('footer')\">\n <div :class=\"ns.b('indicators')\">\n <component\n :is=\"tourSlots.indicators\"\n v-if=\"tourSlots.indicators\"\n :current=\"current\"\n :total=\"total\"\n />\n <template v-else>\n <span\n v-for=\"(item, index) in total\"\n :key=\"item\"\n :class=\"[ns.b('indicator'), ns.is('active', index === current)]\"\n />\n </template>\n </div>\n <div :class=\"ns.b('buttons')\">\n <el-button\n v-if=\"current > 0\"\n size=\"small\"\n :type=\"mergedType\"\n v-bind=\"filterButtonProps(prevButtonProps)\"\n @click=\"onPrev\"\n >\n {{ prevButtonProps?.children ?? t('el.tour.previous') }}\n </el-button>\n <el-button\n v-if=\"current <= total - 1\"\n size=\"small\"\n :type=\"mergedType === 'primary' ? 'default' : 'primary'\"\n v-bind=\"filterButtonProps(nextButtonProps)\"\n @click=\"onNext\"\n >\n {{\n nextButtonProps?.children ??\n (current === total - 1 ? t('el.tour.finish') : t('el.tour.next'))\n }}\n </el-button>\n </div>\n </footer>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { omit } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { CloseComponents, getEventCode } from '@element-plus/utils'\nimport { useLocale } from '@element-plus/hooks'\nimport { tourStepEmits } from './step'\nimport { tourKey } from './helper'\n\nimport type { TourBtnProps } from './types'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTourStep',\n})\n\nconst props = withDefaults(defineProps<TourStepProps>(), {\n showClose: undefined,\n showArrow: undefined,\n placement: 'bottom',\n mask: undefined,\n scrollIntoViewOptions: undefined,\n})\nconst emit = defineEmits(tourStepEmits)\n\nconst { Close } = CloseComponents\n\nconst { t } = useLocale()\n\nconst {\n currentStep,\n current,\n total,\n showClose,\n closeIcon,\n mergedType,\n ns,\n slots: tourSlots,\n updateModelValue,\n onClose: tourOnClose,\n onFinish: tourOnFinish,\n} = inject(tourKey)!\n\nwatch(\n props,\n (val) => {\n currentStep.value = val\n },\n {\n immediate: true,\n }\n)\n\nconst mergedShowClose = computed(() => props.showClose ?? showClose.value)\nconst mergedCloseIcon = computed(\n () => props.closeIcon ?? closeIcon.value ?? Close\n)\n\nconst filterButtonProps = (btnProps?: TourBtnProps) => {\n if (!btnProps) return\n return omit(btnProps, ['children', 'onClick'])\n}\n\nconst onPrev = () => {\n current.value -= 1\n if (props.prevButtonProps?.onClick) {\n props.prevButtonProps?.onClick()\n }\n}\n\nconst onNext = () => {\n if (current.value >= total.value - 1) {\n onFinish()\n } else {\n current.value += 1\n }\n if (props.nextButtonProps?.onClick) {\n props.nextButtonProps.onClick()\n }\n}\n\nconst onFinish = () => {\n onClose()\n tourOnFinish()\n}\n\nconst onClose = () => {\n updateModelValue(false)\n tourOnClose()\n emit('close')\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement | null\n if (target?.isContentEditable) return\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.left:\n e.preventDefault()\n current.value > 0 && onPrev()\n break\n case EVENT_CODE.right:\n e.preventDefault()\n onNext()\n break\n }\n}\n\nonMounted(() => {\n window.addEventListener('keydown', handleKeydown)\n})\n\nonBeforeUnmount(() => {\n window.removeEventListener('keydown', handleKeydown)\n})\n</script>\n"],"mappings":""}
@@ -75,7 +75,12 @@ interface TourProps {
75
75
  */
76
76
  declare const tourProps: {
77
77
  modelValue: BooleanConstructor;
78
- current: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
78
+ current: {
79
+ readonly type: _$vue.PropType<number>;
80
+ readonly required: false;
81
+ readonly validator: ((val: unknown) => boolean) | undefined;
82
+ __epPropKey: true;
83
+ };
79
84
  showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
80
85
  showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
81
86
  closeIcon: {
@@ -16,10 +16,7 @@ const tourProps = require_runtime.buildProps({
16
16
  /**
17
17
  * @description what is the current step
18
18
  */
19
- current: {
20
- type: Number,
21
- default: 0
22
- },
19
+ current: { type: Number },
23
20
  /**
24
21
  * @description whether to show the arrow
25
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tour.js","names":["buildProps","iconPropType","tourContentProps","definePropType","UPDATE_MODEL_EVENT","isBoolean","isNumber"],"sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\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\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\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: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\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\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport type TourPropsPublic = ExtractPublicPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour> & unknown\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"mappings":";;;;;;;;;;AAkFA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,YAAY;;;;CAIZ,SAAS;EACP,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW,EACT,MAAMC,aAAAA,cACP;;;;CAID,WAAWC,gBAAAA,iBAAiB;;;;CAI5B,cAAc,EACZ,MAAMC,gBAAAA,eAA8B,CAAC,OAAO,CAAC,EAC9C;;;;CAID,MAAM;EACJ,MAAMA,gBAAAA,eAAyB,CAAC,SAAS,OAAO,CAAC;EACjD,SAAS;EACV;;;;CAID,KAAK;EACH,MAAMA,gBAAAA,eAAwB,OAAO;EACrC,gBAAgB;GACd,QAAQ;GACR,QAAQ;GACT;EACF;;;;CAID,QAAQ,EACN,MAAM,QACP;;;;CAID,uBAAuB;EACrB,MAAMA,gBAAAA,eAAgD,CAAC,SAAS,OAAO,CAAC;EACxE,gBAAgB,EACd,OAAO,UACR;EACF;;;;CAID,MAAM,EACJ,MAAMA,gBAAAA,eAAsC,OAAO,EACpD;;;;CAID,UAAU;EACR,MAAMA,gBAAAA,eAAqC,CAAC,QAAQ,OAAO,CAAC;EAC5D,SAAS;EACV;;;;CAID,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAQF,MAAa,YAAY;EACtBC,cAAAA,sBAAsB,UAAmBC,cAAAA,UAAU,MAAM;EACzD,oBAAoB,YAAoBC,cAAAA,SAAS,QAAQ;CAC1D,QAAQ,YAAoBA,cAAAA,SAAS,QAAQ;CAC7C,cAAc;CACd,SAAS,YAAoBA,cAAAA,SAAS,QAAQ;CAC/C"}
1
+ {"version":3,"file":"tour.js","names":["buildProps","iconPropType","tourContentProps","definePropType","UPDATE_MODEL_EVENT","isBoolean","isNumber"],"sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\n\nimport type { TourContentProps } from './content'\nimport type { CSSProperties, ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport interface TourProps {\n /**\n * @description open tour\n */\n modelValue?: boolean\n /**\n * @description what is the current step\n */\n current?: number\n /**\n * @description whether to show the arrow\n */\n showArrow?: boolean\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description custom close icon\n */\n closeIcon?: IconPropType\n /**\n * @description position of the guide card relative to the target element\n */\n placement?: TourContentProps['placement']\n /**\n * @description custom style for content\n */\n contentStyle?: CSSProperties\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask?: TourMask\n /**\n * @description transparent gap between mask and target\n */\n gap?: TourGap\n /**\n * @description tour's zIndex\n */\n zIndex?: number\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions?: boolean | ScrollIntoViewOptions\n /**\n * @description type, affects the background color and text color\n */\n type?: 'default' | 'primary'\n /**\n * @description which element the TourContent appends to\n */\n appendTo?: string | HTMLElement\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape?: boolean\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\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\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\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: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\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\n/**\n * @deprecated Removed after 3.0.0, Use `TourProps` instead.\n */\nexport type TourPropsPublic = ExtractPublicPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour> & unknown\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"mappings":";;;;;;;;;;AAkFA,MAAa,YAAYA,gBAAAA,WAAW;;;;CAIlC,YAAY;;;;CAIZ,SAAS,EACP,MAAM,QACP;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW,EACT,MAAMC,aAAAA,cACP;;;;CAID,WAAWC,gBAAAA,iBAAiB;;;;CAI5B,cAAc,EACZ,MAAMC,gBAAAA,eAA8B,CAAC,OAAO,CAAC,EAC9C;;;;CAID,MAAM;EACJ,MAAMA,gBAAAA,eAAyB,CAAC,SAAS,OAAO,CAAC;EACjD,SAAS;EACV;;;;CAID,KAAK;EACH,MAAMA,gBAAAA,eAAwB,OAAO;EACrC,gBAAgB;GACd,QAAQ;GACR,QAAQ;GACT;EACF;;;;CAID,QAAQ,EACN,MAAM,QACP;;;;CAID,uBAAuB;EACrB,MAAMA,gBAAAA,eAAgD,CAAC,SAAS,OAAO,CAAC;EACxE,gBAAgB,EACd,OAAO,UACR;EACF;;;;CAID,MAAM,EACJ,MAAMA,gBAAAA,eAAsC,OAAO,EACpD;;;;CAID,UAAU;EACR,MAAMA,gBAAAA,eAAqC,CAAC,QAAQ,OAAO,CAAC;EAC5D,SAAS;EACV;;;;CAID,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,qBAAqB;EACnB,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAQF,MAAa,YAAY;EACtBC,cAAAA,sBAAsB,UAAmBC,cAAAA,UAAU,MAAM;EACzD,oBAAoB,YAAoBC,cAAAA,SAAS,QAAQ;CAC1D,QAAQ,YAAoBA,cAAAA,SAAS,QAAQ;CAC7C,cAAc;CACd,SAAS,YAAoBA,cAAAA,SAAS,QAAQ;CAC/C"}
@@ -15,26 +15,25 @@ type __VLS_Slots = {} & {
15
15
  };
16
16
  declare const __VLS_base: _$vue.DefineComponent<TourProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
17
17
  "update:modelValue": (value: boolean) => void;
18
- change: (current: number) => void;
19
18
  close: (current: number) => void;
20
19
  finish: () => void;
20
+ change: (current: number) => void;
21
21
  "update:current": (current: number) => void;
22
22
  }, string, _$vue.PublicProps, Readonly<TourProps> & Readonly<{
23
23
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
24
- onChange?: ((current: number) => any) | undefined;
25
24
  onClose?: ((current: number) => any) | undefined;
26
25
  onFinish?: (() => any) | undefined;
26
+ onChange?: ((current: number) => any) | undefined;
27
27
  "onUpdate:current"?: ((current: number) => any) | undefined;
28
28
  }>, {
29
- appendTo: string | HTMLElement;
29
+ closeOnPressEscape: boolean;
30
30
  placement: _$_floating_ui_dom0.Placement;
31
31
  showArrow: boolean;
32
+ appendTo: string | HTMLElement;
32
33
  gap: TourGap;
33
34
  mask: TourMask;
34
- closeOnPressEscape: boolean;
35
35
  showClose: boolean;
36
36
  scrollIntoViewOptions: boolean | ScrollIntoViewOptions;
37
- current: number;
38
37
  targetAreaClickable: boolean;
39
38
  }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
40
39
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -8,7 +8,6 @@ const require_helper = require("./helper.js");
8
8
  const require_mask = require("./mask2.js");
9
9
  const require_content = require("./content2.js");
10
10
  const require_steps = require("./steps.js");
11
- let _vueuse_core = require("@vueuse/core");
12
11
  let vue = require("vue");
13
12
  //#region ../../packages/components/tour/src/tour.vue?vue&type=script&setup=true&lang.ts
14
13
  var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -23,7 +22,18 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
23
22
  const ns = require_index.useNamespace("tour");
24
23
  const total = (0, vue.ref)(0);
25
24
  const currentStep = (0, vue.ref)();
26
- const current = (0, _vueuse_core.useVModel)(props, "current", emit, { passive: true });
25
+ const isControlled = (0, vue.computed)(() => !require_types.isUndefined(props.current));
26
+ const innerCurrent = (0, vue.ref)(props.current ?? 0);
27
+ const current = (0, vue.computed)({
28
+ get() {
29
+ return require_types.isUndefined(props.current) ? innerCurrent.value : props.current;
30
+ },
31
+ set(newValue) {
32
+ if ((isControlled.value ? props.current : innerCurrent.value) === newValue) return;
33
+ if (!isControlled.value) innerCurrent.value = newValue;
34
+ emit("update:current", newValue);
35
+ }
36
+ });
27
37
  const currentTarget = (0, vue.computed)(() => currentStep.value?.target);
28
38
  const kls = (0, vue.computed)(() => [ns.b(), mergedType.value === "primary" ? ns.m("primary") : ""]);
29
39
  const mergedPlacement = (0, vue.computed)(() => currentStep.value?.placement || props.placement);
@@ -38,8 +48,13 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
38
48
  const nowZIndex = nextZIndex();
39
49
  const mergedZIndex = (0, vue.computed)(() => props.zIndex ?? nowZIndex);
40
50
  const { mergedPosInfo: pos, triggerTarget } = require_helper.useTarget(currentTarget, (0, vue.toRef)(props, "modelValue"), (0, vue.toRef)(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
51
+ (0, vue.watch)(() => props.current, (val) => !require_types.isUndefined(val) && (innerCurrent.value = val));
52
+ (0, vue.watch)(current, (newCurrent, oldCurrent) => {
53
+ if (!props.modelValue || newCurrent === oldCurrent) return;
54
+ emit(require_event.CHANGE_EVENT, newCurrent);
55
+ }, { flush: "post" });
41
56
  (0, vue.watch)(() => props.modelValue, (val) => {
42
- if (!val) current.value = 0;
57
+ if (!val && current.value !== 0) current.value = 0;
43
58
  });
44
59
  const onEscClose = () => {
45
60
  if (props.closeOnPressEscape) {
@@ -68,9 +83,6 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
68
83
  },
69
84
  onFinish() {
70
85
  emit("finish");
71
- },
72
- onChange() {
73
- emit(require_event.CHANGE_EVENT, current.value);
74
86
  }
75
87
  });
76
88
  return (_ctx, _cache) => {
@@ -90,7 +102,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
90
102
  "z-index",
91
103
  "target-area-clickable"
92
104
  ]), __props.modelValue ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_content.default, {
93
- key: (0, vue.unref)(current),
105
+ key: current.value,
94
106
  reference: (0, vue.unref)(triggerTarget),
95
107
  placement: mergedPlacement.value,
96
108
  "show-arrow": mergedShowArrow.value,
@@ -99,7 +111,7 @@ var tour_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
99
111
  onClose: onEscClose
100
112
  }, {
101
113
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(require_steps.default), {
102
- current: (0, vue.unref)(current),
114
+ current: current.value,
103
115
  onUpdateTotal
104
116
  }, {
105
117
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
@@ -1 +1 @@
1
- {"version":3,"file":"tour.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n current: 0,\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit(CHANGE_EVENT, current.value)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAYd,MAAM,OAAO;EAEb,MAAM,KAAK,cAAA,aAAa,OAAM;EAC9B,MAAM,SAAA,GAAA,IAAA,KAAY,EAAC;EACnB,MAAM,eAAA,GAAA,IAAA,MAAiC;EAEvC,MAAM,WAAA,GAAA,aAAA,WAAoB,OAAO,WAAW,MAAM,EAChD,SAAS,MACV,C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AA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;gCAKhB,iBAAqB"}
1
+ {"version":3,"file":"tour.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean, isUndefined } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\nconst isControlled = computed(() => !isUndefined(props.current))\nconst innerCurrent = ref(props.current ?? 0)\n\nconst current = computed<number>({\n get() {\n return isUndefined(props.current) ? innerCurrent.value : props.current\n },\n set(newValue) {\n const oldValue = isControlled.value ? props.current : innerCurrent.value\n if (oldValue === newValue) return\n\n if (!isControlled.value) {\n innerCurrent.value = newValue\n }\n\n emit('update:current', newValue)\n },\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.current,\n (val) => !isUndefined(val) && (innerCurrent.value = val)\n)\n\nwatch(\n current,\n (newCurrent, oldCurrent) => {\n if (!props.modelValue || newCurrent === oldCurrent) return\n emit(CHANGE_EVENT, newCurrent)\n },\n { flush: 'post' }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val && current.value !== 0) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAkDA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAEb,MAAM,KAAK,cAAA,aAAa,OAAM;EAC9B,MAAM,SAAA,GAAA,IAAA,KAAY,EAAC;EACnB,MAAM,eAAA,GAAA,IAAA,MAAiC;EACvC,MAAM,gBAAA,GAAA,IAAA,gBAA8B,CAAC,cAAA,YAAY,MAAM,QAAQ,CAAA;EAC/D,MAAM,gBAAA,GAAA,IAAA,KAAmB,MAAM,WAAW,EAAC;EAE3C,MAAM,WAAA,GAAA,IAAA,UAA2B;GAC/B,MAAM;IACJ,OAAO,cAAA,YAAY,MAAM,QAAQ,GAAG,aAAa,QAAQ,MAAM;;GAEjE,IAAI,UAAU;IAEZ,KADiB,aAAa,QAAQ,MAAM,UAAU,aAAa,WAClD,UAAU;IAE3B,IAAI,CAAC,aAAa,OAChB,aAAa,QAAQ;IAGvB,KAAK,kBAAkB,SAAQ;;GAElC,CAAA;EAED,MAAM,iBAAA,GAAA,IAAA,gBAA+B,YAAY,OAAO,OAAM;EAE9D,MAAM,OAAA,GAAA,IAAA,gBAAqB,CACzB,GAAG,GAAG,EACN,WAAW,UAAU,YAAY,GAAG,EAAE,UAAU,GAAG,GACpD,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AA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;gCAKhB,iBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"tour2.js","names":[],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n current: 0,\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit(CHANGE_EVENT, current.value)\n },\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"tour2.js","names":[],"sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean, isUndefined } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits } from './tour'\nimport { tourKey, useTarget } from './helper'\n\nimport type { TourStepProps } from './step'\nimport type { TourProps } from './tour'\n\ndefineOptions({\n name: 'ElTour',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TourProps>(), {\n showArrow: true,\n showClose: true,\n placement: 'bottom',\n mask: true,\n gap: () => ({ offset: 6, radius: 2 }),\n scrollIntoViewOptions: () => ({ block: 'center' }),\n appendTo: 'body',\n closeOnPressEscape: true,\n targetAreaClickable: true,\n})\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\nconst isControlled = computed(() => !isUndefined(props.current))\nconst innerCurrent = ref(props.current ?? 0)\n\nconst current = computed<number>({\n get() {\n return isUndefined(props.current) ? innerCurrent.value : props.current\n },\n set(newValue) {\n const oldValue = isControlled.value ? props.current : innerCurrent.value\n if (oldValue === newValue) return\n\n if (!isControlled.value) {\n innerCurrent.value = newValue\n }\n\n emit('update:current', newValue)\n },\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.current,\n (val) => !isUndefined(val) && (innerCurrent.value = val)\n)\n\nwatch(\n current,\n (newCurrent, oldCurrent) => {\n if (!props.modelValue || newCurrent === oldCurrent) return\n emit(CHANGE_EVENT, newCurrent)\n },\n { flush: 'post' }\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val && current.value !== 0) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit(UPDATE_MODEL_EVENT, false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon'),\n mergedType,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit(UPDATE_MODEL_EVENT, modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n})\n</script>\n"],"mappings":""}
@@ -1,17 +1,22 @@
1
+ import { FixedSizeListInstance } from "../../../virtual-list/src/components/fixed-size-list.js";
1
2
  import { CheckboxValueType } from "../../../checkbox/src/checkbox.js";
3
+ import { CheckboxGroupInstance } from "../../../checkbox/src/checkbox-group.js";
2
4
  import { TransferDataItem } from "../transfer.js";
3
5
  import { TransferPanelEmits, TransferPanelProps, TransferPanelState } from "../transfer-panel.js";
4
6
  import * as _$vue from "vue";
5
7
  import { SetupContext } from "vue";
6
8
 
7
9
  //#region ../../packages/components/transfer/src/composables/use-check.d.ts
8
- declare const useCheck: <T extends TransferDataItem = TransferDataItem>(props: Required<Pick<TransferPanelProps<T>, "data" | "format" | "defaultChecked" | "props">> & {
10
+ declare const useCheck: <T extends TransferDataItem = TransferDataItem>(props: Required<Pick<TransferPanelProps<T>, "data" | "format" | "defaultChecked" | "props" | "virtualScroll">> & {
9
11
  filterMethod: TransferPanelProps<T>["filterMethod"];
10
12
  }, panelState: TransferPanelState, emit: SetupContext<TransferPanelEmits>["emit"]) => {
11
13
  filteredData: _$vue.ComputedRef<T[]>;
12
14
  checkableData: _$vue.ComputedRef<T[]>;
13
15
  checkedSummary: _$vue.ComputedRef<string>;
16
+ virtualListRef: _$vue.Ref<FixedSizeListInstance | undefined, FixedSizeListInstance | undefined>;
14
17
  isIndeterminate: _$vue.ComputedRef<boolean>;
18
+ checkboxGroupRef: _$vue.Ref<CheckboxGroupInstance | undefined, CheckboxGroupInstance | undefined>;
19
+ virtualListHeight: _$vue.ShallowRef<number>;
15
20
  updateAllChecked: () => void;
16
21
  handleAllCheckedChange: (value: CheckboxValueType) => void;
17
22
  };
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_transfer_panel = require("../transfer-panel.js");
4
4
  const require_use_props_alias = require("./use-props-alias.js");
5
+ let _vueuse_core = require("@vueuse/core");
5
6
  let vue = require("vue");
6
7
  let _vue_shared = require("@vue/shared");
7
8
  //#region ../../packages/components/transfer/src/composables/use-check.ts
@@ -32,6 +33,9 @@ const useCheck = (props, panelState, emit) => {
32
33
  const handleAllCheckedChange = (value) => {
33
34
  panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
34
35
  };
36
+ const checkboxGroupRef = (0, vue.ref)();
37
+ const { height: virtualListHeight } = (0, _vueuse_core.useElementSize)((0, vue.computed)(() => checkboxGroupRef.value?.$el));
38
+ const virtualListRef = (0, vue.ref)();
35
39
  (0, vue.watch)(() => panelState.checked, (val, oldVal) => {
36
40
  updateAllChecked();
37
41
  if (panelState.checkChangeByUser) emit(require_transfer_panel.CHECKED_CHANGE_EVENT, val, val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v)));
@@ -62,11 +66,18 @@ const useCheck = (props, panelState, emit) => {
62
66
  panelState.checkChangeByUser = false;
63
67
  panelState.checked = checked;
64
68
  }, { immediate: true });
69
+ (0, vue.watch)(() => panelState.query, () => {
70
+ if (!props.virtualScroll) return;
71
+ virtualListRef.value?.scrollToItem(0);
72
+ }, { flush: "post" });
65
73
  return {
66
74
  filteredData,
67
75
  checkableData,
68
76
  checkedSummary,
77
+ virtualListRef,
69
78
  isIndeterminate,
79
+ checkboxGroupRef,
80
+ virtualListHeight,
70
81
  updateAllChecked,
71
82
  handleAllCheckedChange
72
83
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-check.js","names":["usePropsAlias","CHECKED_CHANGE_EVENT"],"sources":["../../../../../../../packages/components/transfer/src/composables/use-check.ts"],"sourcesContent":["import { computed, watch } from 'vue'\nimport { isFunction } from '@element-plus/utils'\nimport { CHECKED_CHANGE_EVENT } from '../transfer-panel'\nimport { usePropsAlias } from './use-props-alias'\n\nimport type { SetupContext } from 'vue'\nimport type { CheckboxValueType } from '@element-plus/components/checkbox'\nimport type { TransferDataItem, TransferKey } from '../transfer'\nimport type {\n TransferPanelEmits,\n TransferPanelProps,\n TransferPanelState,\n} from '../transfer-panel'\n\nexport const useCheck = <T extends TransferDataItem = TransferDataItem>(\n props: Required<\n Pick<\n TransferPanelProps<T>,\n 'data' | 'format' | 'defaultChecked' | 'props' // 'props' needed by usePropsAlias\n >\n > & { filterMethod: TransferPanelProps<T>['filterMethod'] },\n panelState: TransferPanelState,\n emit: SetupContext<TransferPanelEmits>['emit']\n) => {\n const propsAlias = usePropsAlias(props)\n\n const filteredData = computed(() => {\n return props.data.filter((item) => {\n if (isFunction(props.filterMethod)) {\n return props.filterMethod(panelState.query, item)\n } else {\n const label = String(\n item[propsAlias.value.label] || item[propsAlias.value.key]\n )\n return label.toLowerCase().includes(panelState.query.toLowerCase())\n }\n })\n })\n\n const checkableData = computed(() =>\n filteredData.value.filter((item) => !item[propsAlias.value.disabled])\n )\n\n const checkedSummary = computed(() => {\n const checkedLength = panelState.checked.length\n const dataLength = props.data.length\n const { noChecked, hasChecked } = props.format\n\n if (noChecked && hasChecked) {\n return checkedLength > 0\n ? hasChecked\n .replace(/\\${checked}/g, checkedLength.toString())\n .replace(/\\${total}/g, dataLength.toString())\n : noChecked.replace(/\\${total}/g, dataLength.toString())\n } else {\n return `${checkedLength}/${dataLength}`\n }\n })\n\n const isIndeterminate = computed(() => {\n const checkedLength = panelState.checked.length\n return checkedLength > 0 && checkedLength < checkableData.value.length\n })\n\n const updateAllChecked = () => {\n const checkableDataKeys = checkableData.value.map(\n (item) => item[propsAlias.value.key]\n )\n panelState.allChecked =\n checkableDataKeys.length > 0 &&\n checkableDataKeys.every((item) => panelState.checked.includes(item))\n }\n\n const handleAllCheckedChange = (value: CheckboxValueType) => {\n panelState.checked = value\n ? checkableData.value.map((item) => item[propsAlias.value.key])\n : []\n }\n\n watch(\n () => panelState.checked,\n (val, oldVal) => {\n updateAllChecked()\n\n if (panelState.checkChangeByUser) {\n const movedKeys = val\n .concat(oldVal)\n .filter((v) => !val.includes(v) || !oldVal.includes(v))\n emit(CHECKED_CHANGE_EVENT, val, movedKeys)\n } else {\n emit(CHECKED_CHANGE_EVENT, val)\n panelState.checkChangeByUser = true\n }\n }\n )\n\n watch(checkableData, () => {\n updateAllChecked()\n })\n\n watch(\n () => props.data,\n () => {\n const checked: TransferKey[] = []\n const filteredDataKeys = filteredData.value.map(\n (item) => item[propsAlias.value.key]\n )\n panelState.checked.forEach((item) => {\n if (filteredDataKeys.includes(item)) {\n checked.push(item)\n }\n })\n panelState.checkChangeByUser = false\n panelState.checked = checked\n }\n )\n\n watch(\n () => props.defaultChecked,\n (val, oldVal) => {\n if (\n oldVal &&\n val.length === oldVal.length &&\n val.every((item) => oldVal.includes(item))\n )\n return\n\n const checked: TransferKey[] = []\n const checkableDataKeys = checkableData.value.map(\n (item) => item[propsAlias.value.key]\n )\n\n val.forEach((item) => {\n if (checkableDataKeys.includes(item)) {\n checked.push(item)\n }\n })\n panelState.checkChangeByUser = false\n panelState.checked = checked\n },\n {\n immediate: true,\n }\n )\n\n return {\n filteredData,\n checkableData,\n checkedSummary,\n isIndeterminate,\n updateAllChecked,\n handleAllCheckedChange,\n }\n}\n"],"mappings":";;;;;;;AAcA,MAAa,YACX,OAMA,YACA,SACG;CACH,MAA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K,WAAW;EACf,kBAAkB;EAElB,IAAI,WAAW,mBAIb,KAAKC,uBAAAA,sBAAsB,KAHT,IACf,OAAO,OAAO,CACd,QAAQ,MAAM,CAAC,IAAI,SAAS,EAAE,IAAI,CAAC,OAAO,SAAS,EAAE,CACf,CAAC;OACrC;GACL,KAAKA,uBAAAA,sBAAsB,IAAI;GAC/B,WAAW,oBAAoB;;GAGpC;CAED,CAAA,GAAA,IAAA,OAAM,qBAAqB;EACzB,kBAAkB;GAClB;CAEF,CAAA,GAAA,IAAA,aACQ,MAAM,YACN;EACJ,MAAM,UAAyB,EAAE;EACjC,MAAM,mBAAmB,aAAa,MAAM,KACzC,SAAS,KAAK,WAAW,MAAM,KACjC;EACD,WAAW,QAAQ,SAAS,SAAS;GACnC,IAAI,iBAAiB,SAAS,KAAK,EACjC,QAAQ,KAAK,KAAK;IAEpB;EACF,WAAW,oBAAoB;EAC/B,WAAW,UAAU;GAExB;CAED,CAAA,GAAA,IAAA,aACQ,MAAM,iBACX,KAAK,WAAW;EACf,IACE,UACA,IAAI,WAAW,OAAO,UACtB,IAAI,OAAO,SAAS,OAAO,SAAS,KAAK,CAAC,EAE1C;EAEF,MAAM,UAAyB,EAAE;EACjC,MAAM,oBAAoB,cAAc,MAAM,KAC3C,SAAS,KAAK,WAAW,MAAM,KACjC;EAED,IAAI,SAAS,SAAS;GACpB,IAAI,kBAAkB,SAAS,KAAK,EAClC,QAAQ,KAAK,KAAK;IAEpB;EACF,WAAW,oBAAoB;EAC/B,WAAW,UAAU;IAEvB,EACE,WAAW,MACZ,CACF;CAED,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACD"}
1
+ {"version":3,"file":"use-check.js","names":["usePropsAlias","CHECKED_CHANGE_EVENT"],"sources":["../../../../../../../packages/components/transfer/src/composables/use-check.ts"],"sourcesContent":["import { computed, ref, watch } from 'vue'\nimport { isFunction } from '@element-plus/utils'\nimport { useElementSize } from '@vueuse/core'\nimport { CHECKED_CHANGE_EVENT } from '../transfer-panel'\nimport { usePropsAlias } from './use-props-alias'\n\nimport type { SetupContext } from 'vue'\nimport type {\n CheckboxGroupInstance,\n CheckboxValueType,\n} from '@element-plus/components/checkbox'\nimport type { TransferDataItem, TransferKey } from '../transfer'\nimport type {\n TransferPanelEmits,\n TransferPanelProps,\n TransferPanelState,\n} from '../transfer-panel'\nimport type { FixedSizeListInstance } from '@element-plus/components/virtual-list'\n\nexport const useCheck = <T extends TransferDataItem = TransferDataItem>(\n props: Required<\n Pick<\n TransferPanelProps<T>,\n 'data' | 'format' | 'defaultChecked' | 'props' | 'virtualScroll' // 'props' needed by usePropsAlias\n >\n > & { filterMethod: TransferPanelProps<T>['filterMethod'] },\n panelState: TransferPanelState,\n emit: SetupContext<TransferPanelEmits>['emit']\n) => {\n const propsAlias = usePropsAlias(props)\n\n const filteredData = computed(() => {\n return props.data.filter((item) => {\n if (isFunction(props.filterMethod)) {\n return props.filterMethod(panelState.query, item)\n } else {\n const label = String(\n item[propsAlias.value.label] || item[propsAlias.value.key]\n )\n return label.toLowerCase().includes(panelState.query.toLowerCase())\n }\n })\n })\n\n const checkableData = computed(() =>\n filteredData.value.filter((item) => !item[propsAlias.value.disabled])\n )\n\n const checkedSummary = computed(() => {\n const checkedLength = panelState.checked.length\n const dataLength = props.data.length\n const { noChecked, hasChecked } = props.format\n\n if (noChecked && hasChecked) {\n return checkedLength > 0\n ? hasChecked\n .replace(/\\${checked}/g, checkedLength.toString())\n .replace(/\\${total}/g, dataLength.toString())\n : noChecked.replace(/\\${total}/g, dataLength.toString())\n } else {\n return `${checkedLength}/${dataLength}`\n }\n })\n\n const isIndeterminate = computed(() => {\n const checkedLength = panelState.checked.length\n return checkedLength > 0 && checkedLength < checkableData.value.length\n })\n\n const updateAllChecked = () => {\n const checkableDataKeys = checkableData.value.map(\n (item) => item[propsAlias.value.key]\n )\n panelState.allChecked =\n checkableDataKeys.length > 0 &&\n checkableDataKeys.every((item) => panelState.checked.includes(item))\n }\n\n const handleAllCheckedChange = (value: CheckboxValueType) => {\n panelState.checked = value\n ? checkableData.value.map((item) => item[propsAlias.value.key])\n : []\n }\n\n const checkboxGroupRef = ref<CheckboxGroupInstance>()\n const { height: virtualListHeight } = useElementSize(\n computed(() => checkboxGroupRef.value?.$el)\n )\n\n const virtualListRef = ref<FixedSizeListInstance>()\n\n watch(\n () => panelState.checked,\n (val, oldVal) => {\n updateAllChecked()\n\n if (panelState.checkChangeByUser) {\n const movedKeys = val\n .concat(oldVal)\n .filter((v) => !val.includes(v) || !oldVal.includes(v))\n emit(CHECKED_CHANGE_EVENT, val, movedKeys)\n } else {\n emit(CHECKED_CHANGE_EVENT, val)\n panelState.checkChangeByUser = true\n }\n }\n )\n\n watch(checkableData, () => {\n updateAllChecked()\n })\n\n watch(\n () => props.data,\n () => {\n const checked: TransferKey[] = []\n const filteredDataKeys = filteredData.value.map(\n (item) => item[propsAlias.value.key]\n )\n panelState.checked.forEach((item) => {\n if (filteredDataKeys.includes(item)) {\n checked.push(item)\n }\n })\n panelState.checkChangeByUser = false\n panelState.checked = checked\n }\n )\n\n watch(\n () => props.defaultChecked,\n (val, oldVal) => {\n if (\n oldVal &&\n val.length === oldVal.length &&\n val.every((item) => oldVal.includes(item))\n )\n return\n\n const checked: TransferKey[] = []\n const checkableDataKeys = checkableData.value.map(\n (item) => item[propsAlias.value.key]\n )\n\n val.forEach((item) => {\n if (checkableDataKeys.includes(item)) {\n checked.push(item)\n }\n })\n panelState.checkChangeByUser = false\n panelState.checked = checked\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => panelState.query,\n () => {\n if (!props.virtualScroll) {\n return\n }\n virtualListRef.value?.scrollToItem(0)\n },\n { flush: 'post' }\n )\n\n return {\n filteredData,\n checkableData,\n checkedSummary,\n virtualListRef,\n isIndeterminate,\n checkboxGroupRef,\n virtualListHeight,\n updateAllChecked,\n handleAllCheckedChange,\n }\n}\n"],"mappings":";;;;;;;;AAmBA,MAAa,YACX,OAMA,YACA,SACG;CACH,MAAM,aAAaA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AE;IAEvC,EAAE,OAAO,QAAQ,CAClB;CAED,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
@@ -24,6 +24,8 @@ interface TransferPanelProps<T extends TransferDataItem = TransferDataItem> {
24
24
  filterMethod?: (query: string, item: T) => boolean;
25
25
  defaultChecked?: TransferKey[];
26
26
  props?: TransferPropsAlias;
27
+ virtualScroll?: boolean;
28
+ itemSize?: number;
27
29
  }
28
30
  /**
29
31
  * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.
@@ -52,6 +54,8 @@ declare const transferPanelProps: {
52
54
  readonly key: "key";
53
55
  readonly disabled: "disabled";
54
56
  }>, boolean>;
57
+ readonly virtualScroll: BooleanConstructor;
58
+ readonly itemSize: EpPropFinalized<NumberConstructor, unknown, unknown, 30, boolean>;
55
59
  };
56
60
  /**
57
61
  * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.
@@ -15,7 +15,9 @@ const transferPanelProps = require_runtime.buildProps({
15
15
  format: require_transfer.transferProps.format,
16
16
  filterMethod: require_transfer.transferProps.filterMethod,
17
17
  defaultChecked: require_transfer.transferProps.leftDefaultChecked,
18
- props: require_transfer.transferProps.props
18
+ props: require_transfer.transferProps.props,
19
+ virtualScroll: require_transfer.transferProps.virtualScroll,
20
+ itemSize: require_transfer.transferProps.itemSize
19
21
  });
20
22
  const transferPanelEmits = { [CHECKED_CHANGE_EVENT]: require_transfer.transferCheckedChangeFn };
21
23
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"transfer-panel.js","names":["buildProps","transferProps","definePropType","transferCheckedChangeFn"],"sources":["../../../../../../packages/components/transfer/src/transfer-panel.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { transferCheckedChangeFn, transferProps } from './transfer'\n\nimport type { ComponentInstance, ExtractPublicPropTypes, VNode } from 'vue'\nimport type { ComponentExposed } from 'vue-component-type-helpers'\nimport type {\n TransferDataItem,\n TransferFormat,\n TransferKey,\n TransferPropsAlias,\n} from './transfer'\nimport type TransferPanel from './transfer-panel.vue'\n\nexport interface TransferPanelState {\n checked: TransferKey[]\n allChecked: boolean\n query: string\n checkChangeByUser: boolean\n}\n\nexport const CHECKED_CHANGE_EVENT = 'checked-change'\n\nexport interface TransferPanelProps<\n T extends TransferDataItem = TransferDataItem,\n> {\n data?: T[]\n optionRender?: (option: T) => VNode | VNode[]\n placeholder?: string\n title?: string\n filterable?: boolean\n format?: TransferFormat\n filterMethod?: (query: string, item: T) => boolean\n defaultChecked?: TransferKey[]\n props?: TransferPropsAlias\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.\n */\nexport const transferPanelProps = buildProps({\n data: transferProps.data,\n optionRender: {\n type: definePropType<(option: TransferDataItem) => VNode | VNode[]>(\n Function\n ),\n },\n placeholder: String,\n title: String,\n filterable: Boolean,\n format: transferProps.format,\n filterMethod: transferProps.filterMethod,\n defaultChecked: transferProps.leftDefaultChecked,\n props: transferProps.props,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.\n */\nexport type TransferPanelPropsPublic = ExtractPublicPropTypes<\n typeof transferPanelProps\n>\n\nexport const transferPanelEmits = {\n [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn,\n}\nexport type TransferPanelEmits = typeof transferPanelEmits\n\nexport type TransferPanelInstance = ComponentInstance<typeof TransferPanel> &\n ComponentExposed<typeof TransferPanel>\n"],"mappings":";;;;AAoBA,MAAa,uBAAuB;;;;AAmBpC,MAAa,qBAAqBA,gBAAAA,WAAW;CAC3C,MAAMC,iBAAAA,cAAc;CACpB,cAAc,EACZ,MAAMC,gBAAAA,eACJ,SACD,EACF;CACD,aAAa;CACb,OAAO;CACP,YAAY;CACZ,QAAQD,iBAAAA,cAAc;CACtB,cAAcA,iBAAAA,cAAc;CAC5B,gBAAgBA,iBAAAA,cAAc;CAC9B,OAAOA,iBAAAA,cAAc;CACtB,CAAU;AASX,MAAa,qBAAqB,GAC/B,uBAAuBE,iBAAAA,yBACzB"}
1
+ {"version":3,"file":"transfer-panel.js","names":["buildProps","transferProps","definePropType","transferCheckedChangeFn"],"sources":["../../../../../../packages/components/transfer/src/transfer-panel.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { transferCheckedChangeFn, transferProps } from './transfer'\n\nimport type { ComponentInstance, ExtractPublicPropTypes, VNode } from 'vue'\nimport type { ComponentExposed } from 'vue-component-type-helpers'\nimport type {\n TransferDataItem,\n TransferFormat,\n TransferKey,\n TransferPropsAlias,\n} from './transfer'\nimport type TransferPanel from './transfer-panel.vue'\n\nexport interface TransferPanelState {\n checked: TransferKey[]\n allChecked: boolean\n query: string\n checkChangeByUser: boolean\n}\n\nexport const CHECKED_CHANGE_EVENT = 'checked-change'\n\nexport interface TransferPanelProps<\n T extends TransferDataItem = TransferDataItem,\n> {\n data?: T[]\n optionRender?: (option: T) => VNode | VNode[]\n placeholder?: string\n title?: string\n filterable?: boolean\n format?: TransferFormat\n filterMethod?: (query: string, item: T) => boolean\n defaultChecked?: TransferKey[]\n props?: TransferPropsAlias\n virtualScroll?: boolean\n itemSize?: number\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.\n */\nexport const transferPanelProps = buildProps({\n data: transferProps.data,\n optionRender: {\n type: definePropType<(option: TransferDataItem) => VNode | VNode[]>(\n Function\n ),\n },\n placeholder: String,\n title: String,\n filterable: Boolean,\n format: transferProps.format,\n filterMethod: transferProps.filterMethod,\n defaultChecked: transferProps.leftDefaultChecked,\n props: transferProps.props,\n virtualScroll: transferProps.virtualScroll,\n itemSize: transferProps.itemSize,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.\n */\nexport type TransferPanelPropsPublic = ExtractPublicPropTypes<\n typeof transferPanelProps\n>\n\nexport const transferPanelEmits = {\n [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn,\n}\nexport type TransferPanelEmits = typeof transferPanelEmits\n\nexport type TransferPanelInstance = ComponentInstance<typeof TransferPanel> &\n ComponentExposed<typeof TransferPanel>\n"],"mappings":";;;;AAoBA,MAAa,uBAAuB;;;;AAqBpC,MAAa,qBAAqBA,gBAAAA,WAAW;CAC3C,MAAMC,iBAAAA,cAAc;CACpB,cAAc,EACZ,MAAMC,gBAAAA,eACJ,SACD,EACF;CACD,aAAa;CACb,OAAO;CACP,YAAY;CACZ,QAAQD,iBAAAA,cAAc;CACtB,cAAcA,iBAAAA,cAAc;CAC5B,gBAAgBA,iBAAAA,cAAc;CAC9B,OAAOA,iBAAAA,cAAc;CACrB,eAAeA,iBAAAA,cAAc;CAC7B,UAAUA,iBAAAA,cAAc;CACzB,CAAU;AASX,MAAa,qBAAqB,GAC/B,uBAAuBE,iBAAAA,yBACzB"}
@@ -20,7 +20,7 @@ declare const __VLS_export: <T extends TransferDataItem = TransferDataItem>(__VL
20
20
  };
21
21
  emit: (event: "checked-change", value: TransferKey[], movedKeys?: TransferKey[] | undefined) => void;
22
22
  }>) => _$vue.VNode & {
23
- __ctx?: Awaited<typeof __VLS_setup>;
23
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
24
24
  };
25
25
  declare const _default: typeof __VLS_export;
26
26
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};