@element-plus/nightly 0.0.20241208 → 0.0.20241209

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.min.js +3 -3
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +3 -3
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +4 -4
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/ms.js +1 -1
  152. package/dist/locale/ms.min.js +1 -1
  153. package/dist/locale/ms.min.mjs +1 -1
  154. package/dist/locale/ms.mjs +1 -1
  155. package/dist/locale/my.js +1 -1
  156. package/dist/locale/my.min.js +1 -1
  157. package/dist/locale/my.min.mjs +1 -1
  158. package/dist/locale/my.mjs +1 -1
  159. package/dist/locale/nb-no.js +1 -1
  160. package/dist/locale/nb-no.min.js +1 -1
  161. package/dist/locale/nb-no.min.mjs +1 -1
  162. package/dist/locale/nb-no.mjs +1 -1
  163. package/dist/locale/nl.js +1 -1
  164. package/dist/locale/nl.min.js +1 -1
  165. package/dist/locale/nl.min.mjs +1 -1
  166. package/dist/locale/nl.mjs +1 -1
  167. package/dist/locale/pa.js +1 -1
  168. package/dist/locale/pa.min.js +1 -1
  169. package/dist/locale/pa.min.mjs +1 -1
  170. package/dist/locale/pa.mjs +1 -1
  171. package/dist/locale/pl.js +1 -1
  172. package/dist/locale/pl.min.js +1 -1
  173. package/dist/locale/pl.min.mjs +1 -1
  174. package/dist/locale/pl.mjs +1 -1
  175. package/dist/locale/pt-br.js +1 -1
  176. package/dist/locale/pt-br.min.js +1 -1
  177. package/dist/locale/pt-br.min.mjs +1 -1
  178. package/dist/locale/pt-br.mjs +1 -1
  179. package/dist/locale/pt.js +1 -1
  180. package/dist/locale/pt.min.js +1 -1
  181. package/dist/locale/pt.min.mjs +1 -1
  182. package/dist/locale/pt.mjs +1 -1
  183. package/dist/locale/ro.js +1 -1
  184. package/dist/locale/ro.min.js +1 -1
  185. package/dist/locale/ro.min.mjs +1 -1
  186. package/dist/locale/ro.mjs +1 -1
  187. package/dist/locale/ru.js +1 -1
  188. package/dist/locale/ru.min.js +1 -1
  189. package/dist/locale/ru.min.mjs +1 -1
  190. package/dist/locale/ru.mjs +1 -1
  191. package/dist/locale/sk.js +1 -1
  192. package/dist/locale/sk.min.js +1 -1
  193. package/dist/locale/sk.min.mjs +1 -1
  194. package/dist/locale/sk.mjs +1 -1
  195. package/dist/locale/sl.js +1 -1
  196. package/dist/locale/sl.min.js +1 -1
  197. package/dist/locale/sl.min.mjs +1 -1
  198. package/dist/locale/sl.mjs +1 -1
  199. package/dist/locale/sr.js +1 -1
  200. package/dist/locale/sr.min.js +1 -1
  201. package/dist/locale/sr.min.mjs +1 -1
  202. package/dist/locale/sr.mjs +1 -1
  203. package/dist/locale/sv.js +1 -1
  204. package/dist/locale/sv.min.js +1 -1
  205. package/dist/locale/sv.min.mjs +1 -1
  206. package/dist/locale/sv.mjs +1 -1
  207. package/dist/locale/sw.js +1 -1
  208. package/dist/locale/sw.min.js +1 -1
  209. package/dist/locale/sw.min.mjs +1 -1
  210. package/dist/locale/sw.mjs +1 -1
  211. package/dist/locale/ta.js +1 -1
  212. package/dist/locale/ta.min.js +1 -1
  213. package/dist/locale/ta.min.mjs +1 -1
  214. package/dist/locale/ta.mjs +1 -1
  215. package/dist/locale/th.js +1 -1
  216. package/dist/locale/th.min.js +1 -1
  217. package/dist/locale/th.min.mjs +1 -1
  218. package/dist/locale/th.mjs +1 -1
  219. package/dist/locale/tk.js +1 -1
  220. package/dist/locale/tk.min.js +1 -1
  221. package/dist/locale/tk.min.mjs +1 -1
  222. package/dist/locale/tk.mjs +1 -1
  223. package/dist/locale/tr.js +1 -1
  224. package/dist/locale/tr.min.js +1 -1
  225. package/dist/locale/tr.min.mjs +1 -1
  226. package/dist/locale/tr.mjs +1 -1
  227. package/dist/locale/ug-cn.js +1 -1
  228. package/dist/locale/ug-cn.min.js +1 -1
  229. package/dist/locale/ug-cn.min.mjs +1 -1
  230. package/dist/locale/ug-cn.mjs +1 -1
  231. package/dist/locale/uk.js +1 -1
  232. package/dist/locale/uk.min.js +1 -1
  233. package/dist/locale/uk.min.mjs +1 -1
  234. package/dist/locale/uk.mjs +1 -1
  235. package/dist/locale/uz-uz.js +1 -1
  236. package/dist/locale/uz-uz.min.js +1 -1
  237. package/dist/locale/uz-uz.min.mjs +1 -1
  238. package/dist/locale/uz-uz.mjs +1 -1
  239. package/dist/locale/vi.js +1 -1
  240. package/dist/locale/vi.min.js +1 -1
  241. package/dist/locale/vi.min.mjs +1 -1
  242. package/dist/locale/vi.mjs +1 -1
  243. package/dist/locale/zh-cn.js +1 -1
  244. package/dist/locale/zh-cn.min.js +1 -1
  245. package/dist/locale/zh-cn.min.mjs +1 -1
  246. package/dist/locale/zh-cn.mjs +1 -1
  247. package/dist/locale/zh-tw.js +1 -1
  248. package/dist/locale/zh-tw.min.js +1 -1
  249. package/dist/locale/zh-tw.min.mjs +1 -1
  250. package/dist/locale/zh-tw.mjs +1 -1
  251. package/es/components/color-picker/index.mjs +2 -2
  252. package/es/components/color-picker/src/color-picker.mjs +399 -40
  253. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  254. package/es/components/color-picker/src/color-picker2.mjs +40 -399
  255. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  256. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  257. package/es/components/index.mjs +4 -4
  258. package/es/components/link/index.mjs +2 -2
  259. package/es/components/link/src/link.mjs +49 -24
  260. package/es/components/link/src/link.mjs.map +1 -1
  261. package/es/components/link/src/link2.mjs +24 -49
  262. package/es/components/link/src/link2.mjs.map +1 -1
  263. package/es/components/select-v2/src/useSelect.mjs +1 -1
  264. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  265. package/es/components/skeleton/index.mjs +2 -2
  266. package/es/components/skeleton/src/skeleton.mjs +48 -21
  267. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  268. package/es/components/skeleton/src/skeleton2.mjs +21 -48
  269. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  270. package/es/components/tooltip-v2/index.mjs +1 -1
  271. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  272. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  273. package/es/components/tooltip-v2/src/trigger.mjs +12 -89
  274. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  275. package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
  276. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  277. package/es/components/tour/index.mjs +1 -1
  278. package/es/components/tour/src/content.mjs +67 -43
  279. package/es/components/tour/src/content.mjs.map +1 -1
  280. package/es/components/tour/src/content2.mjs +43 -67
  281. package/es/components/tour/src/content2.mjs.map +1 -1
  282. package/es/components/tour/src/step.mjs +1 -1
  283. package/es/components/tour/src/tour.mjs +1 -1
  284. package/es/components/tour/src/tour2.mjs +1 -1
  285. package/es/components/transfer/src/composables/use-check.mjs +1 -1
  286. package/es/components/transfer/src/transfer-panel.mjs +19 -130
  287. package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
  288. package/es/components/transfer/src/transfer-panel2.mjs +130 -19
  289. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  290. package/es/components/transfer/src/transfer2.mjs +1 -1
  291. package/es/components/tree-v2/src/composables/useFilter.mjs +1 -1
  292. package/es/components/tree-v2/src/composables/useFilter.mjs.map +1 -1
  293. package/es/components/tree-v2/src/types.d.ts +1 -1
  294. package/es/index.mjs +4 -4
  295. package/es/version.d.ts +1 -1
  296. package/es/version.mjs +1 -1
  297. package/es/version.mjs.map +1 -1
  298. package/lib/components/color-picker/index.js +2 -2
  299. package/lib/components/color-picker/src/color-picker.js +397 -40
  300. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  301. package/lib/components/color-picker/src/color-picker2.js +40 -397
  302. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  303. package/lib/components/color-picker/src/components/predefine.js +1 -1
  304. package/lib/components/index.js +4 -4
  305. package/lib/components/link/index.js +2 -2
  306. package/lib/components/link/src/link.js +49 -25
  307. package/lib/components/link/src/link.js.map +1 -1
  308. package/lib/components/link/src/link2.js +25 -49
  309. package/lib/components/link/src/link2.js.map +1 -1
  310. package/lib/components/select-v2/src/useSelect.js +1 -1
  311. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  312. package/lib/components/skeleton/index.js +2 -2
  313. package/lib/components/skeleton/src/skeleton.js +48 -21
  314. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  315. package/lib/components/skeleton/src/skeleton2.js +21 -48
  316. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  317. package/lib/components/tooltip-v2/index.js +1 -1
  318. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  319. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  320. package/lib/components/tooltip-v2/src/trigger.js +12 -89
  321. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  322. package/lib/components/tooltip-v2/src/trigger2.js +89 -12
  323. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  324. package/lib/components/tour/index.js +1 -1
  325. package/lib/components/tour/src/content.js +67 -46
  326. package/lib/components/tour/src/content.js.map +1 -1
  327. package/lib/components/tour/src/content2.js +46 -67
  328. package/lib/components/tour/src/content2.js.map +1 -1
  329. package/lib/components/tour/src/step.js +1 -1
  330. package/lib/components/tour/src/tour.js +1 -1
  331. package/lib/components/tour/src/tour2.js +1 -1
  332. package/lib/components/transfer/src/composables/use-check.js +1 -1
  333. package/lib/components/transfer/src/transfer-panel.js +21 -130
  334. package/lib/components/transfer/src/transfer-panel.js.map +1 -1
  335. package/lib/components/transfer/src/transfer-panel2.js +130 -21
  336. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  337. package/lib/components/transfer/src/transfer2.js +1 -1
  338. package/lib/components/tree-v2/src/composables/useFilter.js +1 -1
  339. package/lib/components/tree-v2/src/composables/useFilter.js.map +1 -1
  340. package/lib/components/tree-v2/src/types.d.ts +1 -1
  341. package/lib/index.js +4 -4
  342. package/lib/version.d.ts +1 -1
  343. package/lib/version.js +1 -1
  344. package/lib/version.js.map +1 -1
  345. package/package.json +2 -2
  346. package/web-types.json +1 -1
@@ -1,93 +1,16 @@
1
- import { defineComponent, inject, watch, onBeforeUnmount, openBlock, createBlock, unref, withCtx, renderSlot, createElementBlock, mergeProps } from 'vue';
2
- import { tooltipV2RootKey } from './constants.mjs';
3
- import ForwardRef from './forward-ref.mjs';
4
- import { tooltipV2TriggerProps } from './trigger2.mjs';
5
- import { tooltipV2CommonProps } from './common.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { composeEventHandlers } from '../../../utils/dom/event.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
8
2
 
9
- const __default__ = defineComponent({
10
- name: "ElTooltipV2Trigger"
3
+ const EventHandler = {
4
+ type: definePropType(Function)
5
+ };
6
+ const tooltipV2TriggerProps = buildProps({
7
+ onBlur: EventHandler,
8
+ onClick: EventHandler,
9
+ onFocus: EventHandler,
10
+ onMouseDown: EventHandler,
11
+ onMouseEnter: EventHandler,
12
+ onMouseLeave: EventHandler
11
13
  });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: {
15
- ...tooltipV2CommonProps,
16
- ...tooltipV2TriggerProps
17
- },
18
- setup(__props) {
19
- const props = __props;
20
- const { onClose, onOpen, onDelayOpen, triggerRef, contentId } = inject(tooltipV2RootKey);
21
- let isMousedown = false;
22
- const setTriggerRef = (el) => {
23
- triggerRef.value = el;
24
- };
25
- const onMouseup = () => {
26
- isMousedown = false;
27
- };
28
- const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen);
29
- const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose);
30
- const onMousedown = composeEventHandlers(props.onMouseDown, () => {
31
- onClose();
32
- isMousedown = true;
33
- document.addEventListener("mouseup", onMouseup, { once: true });
34
- });
35
- const onFocus = composeEventHandlers(props.onFocus, () => {
36
- if (!isMousedown)
37
- onOpen();
38
- });
39
- const onBlur = composeEventHandlers(props.onBlur, onClose);
40
- const onClick = composeEventHandlers(props.onClick, (e) => {
41
- if (e.detail === 0)
42
- onClose();
43
- });
44
- const events = {
45
- blur: onBlur,
46
- click: onClick,
47
- focus: onFocus,
48
- mousedown: onMousedown,
49
- mouseenter: onMouseenter,
50
- mouseleave: onMouseleave
51
- };
52
- const setEvents = (el, events2, type) => {
53
- if (el) {
54
- Object.entries(events2).forEach(([name, handler]) => {
55
- el[type](name, handler);
56
- });
57
- }
58
- };
59
- watch(triggerRef, (triggerEl, previousTriggerEl) => {
60
- setEvents(triggerEl, events, "addEventListener");
61
- setEvents(previousTriggerEl, events, "removeEventListener");
62
- if (triggerEl) {
63
- triggerEl.setAttribute("aria-describedby", contentId.value);
64
- }
65
- });
66
- onBeforeUnmount(() => {
67
- setEvents(triggerRef.value, events, "removeEventListener");
68
- document.removeEventListener("mouseup", onMouseup);
69
- });
70
- return (_ctx, _cache) => {
71
- return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), {
72
- key: 0,
73
- "set-ref": setTriggerRef,
74
- "only-child": ""
75
- }, {
76
- default: withCtx(() => [
77
- renderSlot(_ctx.$slots, "default")
78
- ]),
79
- _: 3
80
- })) : (openBlock(), createElementBlock("button", mergeProps({
81
- key: 1,
82
- ref_key: "triggerRef",
83
- ref: triggerRef
84
- }, _ctx.$attrs), [
85
- renderSlot(_ctx.$slots, "default")
86
- ], 16));
87
- };
88
- }
89
- });
90
- var TooltipV2Trigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "trigger.vue"]]);
91
14
 
92
- export { TooltipV2Trigger as default };
15
+ export { tooltipV2TriggerProps };
93
16
  //# sourceMappingURL=trigger.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.vue"],"sourcesContent":["<template>\n <forward-ref v-if=\"nowrap\" :set-ref=\"setTriggerRef\" only-child>\n <slot />\n </forward-ref>\n <button v-else ref=\"triggerRef\" v-bind=\"$attrs\">\n <slot />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, onBeforeUnmount, watch } from 'vue'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { tooltipV2RootKey } from './constants'\nimport ForwardRef from './forward-ref'\nimport { tooltipV2TriggerProps } from './trigger'\nimport { tooltipV2CommonProps } from './common'\n\ndefineOptions({\n name: 'ElTooltipV2Trigger',\n})\n\nconst props = defineProps({\n ...tooltipV2CommonProps,\n ...tooltipV2TriggerProps,\n})\n\n/**\n * onOpen opens the tooltip instantly, onTrigger acts a lil bit differently,\n * it will check if delayDuration is set to greater than 0 and based on that result,\n * if true, it opens the tooltip after delayDuration, otherwise it opens it instantly.\n */\nconst { onClose, onOpen, onDelayOpen, triggerRef, contentId } =\n inject(tooltipV2RootKey)!\n\nlet isMousedown = false\n\nconst setTriggerRef = (el: HTMLElement | null) => {\n triggerRef.value = el\n}\n\nconst onMouseup = () => {\n isMousedown = false\n}\n\nconst onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen)\n\nconst onMouseleave = composeEventHandlers(props.onMouseLeave, onClose)\n\nconst onMousedown = composeEventHandlers(props.onMouseDown, () => {\n onClose()\n isMousedown = true\n document.addEventListener('mouseup', onMouseup, { once: true })\n})\n\nconst onFocus = composeEventHandlers(props.onFocus, () => {\n if (!isMousedown) onOpen()\n})\n\nconst onBlur = composeEventHandlers(props.onBlur, onClose)\n\nconst onClick = composeEventHandlers(props.onClick, (e) => {\n if ((e as MouseEvent).detail === 0) onClose()\n})\n\nconst events = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n mousedown: onMousedown,\n mouseenter: onMouseenter,\n mouseleave: onMouseleave,\n}\n\nconst setEvents = <T extends (e: Event) => void>(\n el: HTMLElement | null | undefined,\n events: Record<string, T>,\n type: 'addEventListener' | 'removeEventListener'\n) => {\n if (el) {\n Object.entries(events).forEach(([name, handler]) => {\n el[type](name, handler)\n })\n }\n}\n\nwatch(triggerRef, (triggerEl, previousTriggerEl) => {\n setEvents(triggerEl, events, 'addEventListener')\n setEvents(previousTriggerEl, events, 'removeEventListener')\n\n if (triggerEl) {\n triggerEl.setAttribute('aria-describedby', contentId.value)\n }\n})\n\nonBeforeUnmount(() => {\n setEvents(triggerRef.value, events, 'removeEventListener')\n document.removeEventListener('mouseup', onMouseup)\n})\n</script>\n"],"names":["events"],"mappings":";;;;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAYA,IAAM,MAAA,EAAE,SAAS,MAAQ,EAAA,WAAA,EAAa,YAAY,SAAU,EAAA,GAC1D,OAAO,gBAAgB,CAAA,CAAA;AAEzB,IAAA,IAAI,WAAc,GAAA,KAAA,CAAA;AAElB,IAAM,MAAA,aAAA,GAAgB,CAAC,EAA2B,KAAA;AAChD,MAAA,UAAA,CAAW,KAAQ,GAAA,EAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,YAAY,MAAM;AACtB,MAAc,WAAA,GAAA,KAAA,CAAA;AAAA,KAChB,CAAA;AAEA,IAAA,MAAM,YAAe,GAAA,oBAAA,CAAqB,KAAM,CAAA,YAAA,EAAc,WAAW,CAAA,CAAA;AAEzE,IAAA,MAAM,YAAe,GAAA,oBAAA,CAAqB,KAAM,CAAA,YAAA,EAAc,OAAO,CAAA,CAAA;AAErE,IAAA,MAAM,WAAc,GAAA,oBAAA,CAAqB,KAAM,CAAA,WAAA,EAAa,MAAM;AAChE,MAAQ,OAAA,EAAA,CAAA;AACR,MAAc,WAAA,GAAA,IAAA,CAAA;AACd,MAAA,QAAA,CAAS,iBAAiB,SAAW,EAAA,SAAA,EAAW,EAAE,IAAA,EAAM,MAAM,CAAA,CAAA;AAAA,KAC/D,CAAA,CAAA;AAED,IAAA,MAAM,OAAU,GAAA,oBAAA,CAAqB,KAAM,CAAA,OAAA,EAAS,MAAM;AACxD,MAAI,IAAA,CAAC;AAAoB,QAC1B,MAAA,EAAA,CAAA;AAED,KAAA,CAAA,CAAA;AAEA,IAAA,MAAM,MAAU,GAAA,oBAAA,CAAA,KAA2B,CAAA,MAAA,EAAA,OAAgB,CAAA,CAAA;AACzD,IAAK,MAAA,OAA4B,GAAA,oBAAW,CAAA,KAAA,CAAA,OAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MAC7C,IAAA,CAAA,CAAA,MAAA,KAAA,CAAA;AAED,QAAA,OAAe,EAAA,CAAA;AAAA,KAAA,CACb,CAAM;AAAA,IAAA,MACC,MAAA,GAAA;AAAA,MACP,IAAO,EAAA,MAAA;AAAA,MACP,KAAW,EAAA,OAAA;AAAA,MACX,KAAY,EAAA,OAAA;AAAA,MACZ,SAAY,EAAA,WAAA;AAAA,MACd,UAAA,EAAA,YAAA;AAEA,MAAA,UAAkB,EAAA,YAEhBA;AAGA,KAAA,CAAA;AACE,IAAO,MAAA,SAAA,GAAA,CAAQA,WAAQ,EAAA,IAAQ,KAAE;AAC/B,MAAG,IAAA,EAAA,EAAA;AAAmB,QACxB,MAAC,CAAA,OAAA,CAAA,OAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,KAAA;AAAA,UACH,EAAA,CAAA,IAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AAAA,SACF,CAAA,CAAA;AAEA,OAAM;AACJ,KAAU,CAAA;AACV,IAAU,KAAA,CAAA,UAAA,EAAA,CAAA,SAAA,EAAA,iBAAgD,KAAA;AAE1D,MAAA,SAAe,CAAA,SAAA,EAAA,MAAA,EAAA,kBAAA,CAAA,CAAA;AACb,MAAU,SAAA,CAAA,iBAAiC,EAAA,MAAA,EAAA,qBAAe,CAAA,CAAA;AAAA,MAC5D,IAAA,SAAA,EAAA;AAAA,QACD,SAAA,CAAA,YAAA,CAAA,kBAAA,EAAA,SAAA,CAAA,KAAA,CAAA,CAAA;AAED,OAAA;AACE,KAAU,CAAA,CAAA;AACV,IAAS,eAAA,CAAA,MAAA;AAAwC,MAClD,SAAA,CAAA,UAAA,CAAA,KAAA,EAAA,MAAA,EAAA,qBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nconst EventHandler = {\n type: definePropType<(e: Event) => boolean | void>(Function),\n} as const\n\nexport const tooltipV2TriggerProps = buildProps({\n onBlur: EventHandler,\n onClick: EventHandler,\n onFocus: EventHandler,\n onMouseDown: EventHandler,\n onMouseEnter: EventHandler,\n onMouseLeave: EventHandler,\n} as const)\n\nexport type TooltipV2TriggerProps = ExtractPropTypes<\n typeof tooltipV2TriggerProps\n>\n"],"names":[],"mappings":";;AACA,MAAM,YAAY,GAAG;AACrB,EAAE,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAChC,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,MAAM,EAAE,YAAY;AACtB,EAAE,OAAO,EAAE,YAAY;AACvB,EAAE,OAAO,EAAE,YAAY;AACvB,EAAE,WAAW,EAAE,YAAY;AAC3B,EAAE,YAAY,EAAE,YAAY;AAC5B,EAAE,YAAY,EAAE,YAAY;AAC5B,CAAC;;;;"}
@@ -1,16 +1,93 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, watch, onBeforeUnmount, openBlock, createBlock, unref, withCtx, renderSlot, createElementBlock, mergeProps } from 'vue';
2
+ import { tooltipV2RootKey } from './constants.mjs';
3
+ import ForwardRef from './forward-ref.mjs';
4
+ import { tooltipV2TriggerProps } from './trigger.mjs';
5
+ import { tooltipV2CommonProps } from './common.mjs';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
+ import { composeEventHandlers } from '../../../utils/dom/event.mjs';
2
8
 
3
- const EventHandler = {
4
- type: definePropType(Function)
5
- };
6
- const tooltipV2TriggerProps = buildProps({
7
- onBlur: EventHandler,
8
- onClick: EventHandler,
9
- onFocus: EventHandler,
10
- onMouseDown: EventHandler,
11
- onMouseEnter: EventHandler,
12
- onMouseLeave: EventHandler
9
+ const __default__ = defineComponent({
10
+ name: "ElTooltipV2Trigger"
13
11
  });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: {
15
+ ...tooltipV2CommonProps,
16
+ ...tooltipV2TriggerProps
17
+ },
18
+ setup(__props) {
19
+ const props = __props;
20
+ const { onClose, onOpen, onDelayOpen, triggerRef, contentId } = inject(tooltipV2RootKey);
21
+ let isMousedown = false;
22
+ const setTriggerRef = (el) => {
23
+ triggerRef.value = el;
24
+ };
25
+ const onMouseup = () => {
26
+ isMousedown = false;
27
+ };
28
+ const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen);
29
+ const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose);
30
+ const onMousedown = composeEventHandlers(props.onMouseDown, () => {
31
+ onClose();
32
+ isMousedown = true;
33
+ document.addEventListener("mouseup", onMouseup, { once: true });
34
+ });
35
+ const onFocus = composeEventHandlers(props.onFocus, () => {
36
+ if (!isMousedown)
37
+ onOpen();
38
+ });
39
+ const onBlur = composeEventHandlers(props.onBlur, onClose);
40
+ const onClick = composeEventHandlers(props.onClick, (e) => {
41
+ if (e.detail === 0)
42
+ onClose();
43
+ });
44
+ const events = {
45
+ blur: onBlur,
46
+ click: onClick,
47
+ focus: onFocus,
48
+ mousedown: onMousedown,
49
+ mouseenter: onMouseenter,
50
+ mouseleave: onMouseleave
51
+ };
52
+ const setEvents = (el, events2, type) => {
53
+ if (el) {
54
+ Object.entries(events2).forEach(([name, handler]) => {
55
+ el[type](name, handler);
56
+ });
57
+ }
58
+ };
59
+ watch(triggerRef, (triggerEl, previousTriggerEl) => {
60
+ setEvents(triggerEl, events, "addEventListener");
61
+ setEvents(previousTriggerEl, events, "removeEventListener");
62
+ if (triggerEl) {
63
+ triggerEl.setAttribute("aria-describedby", contentId.value);
64
+ }
65
+ });
66
+ onBeforeUnmount(() => {
67
+ setEvents(triggerRef.value, events, "removeEventListener");
68
+ document.removeEventListener("mouseup", onMouseup);
69
+ });
70
+ return (_ctx, _cache) => {
71
+ return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), {
72
+ key: 0,
73
+ "set-ref": setTriggerRef,
74
+ "only-child": ""
75
+ }, {
76
+ default: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "default")
78
+ ]),
79
+ _: 3
80
+ })) : (openBlock(), createElementBlock("button", mergeProps({
81
+ key: 1,
82
+ ref_key: "triggerRef",
83
+ ref: triggerRef
84
+ }, _ctx.$attrs), [
85
+ renderSlot(_ctx.$slots, "default")
86
+ ], 16));
87
+ };
88
+ }
89
+ });
90
+ var TooltipV2Trigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "trigger.vue"]]);
14
91
 
15
- export { tooltipV2TriggerProps };
92
+ export { TooltipV2Trigger as default };
16
93
  //# sourceMappingURL=trigger2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nconst EventHandler = {\n type: definePropType<(e: Event) => boolean | void>(Function),\n} as const\n\nexport const tooltipV2TriggerProps = buildProps({\n onBlur: EventHandler,\n onClick: EventHandler,\n onFocus: EventHandler,\n onMouseDown: EventHandler,\n onMouseEnter: EventHandler,\n onMouseLeave: EventHandler,\n} as const)\n\nexport type TooltipV2TriggerProps = ExtractPropTypes<\n typeof tooltipV2TriggerProps\n>\n"],"names":[],"mappings":";;AACA,MAAM,YAAY,GAAG;AACrB,EAAE,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAChC,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,MAAM,EAAE,YAAY;AACtB,EAAE,OAAO,EAAE,YAAY;AACvB,EAAE,OAAO,EAAE,YAAY;AACvB,EAAE,WAAW,EAAE,YAAY;AAC3B,EAAE,YAAY,EAAE,YAAY;AAC5B,EAAE,YAAY,EAAE,YAAY;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.vue"],"sourcesContent":["<template>\n <forward-ref v-if=\"nowrap\" :set-ref=\"setTriggerRef\" only-child>\n <slot />\n </forward-ref>\n <button v-else ref=\"triggerRef\" v-bind=\"$attrs\">\n <slot />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, onBeforeUnmount, watch } from 'vue'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { tooltipV2RootKey } from './constants'\nimport ForwardRef from './forward-ref'\nimport { tooltipV2TriggerProps } from './trigger'\nimport { tooltipV2CommonProps } from './common'\n\ndefineOptions({\n name: 'ElTooltipV2Trigger',\n})\n\nconst props = defineProps({\n ...tooltipV2CommonProps,\n ...tooltipV2TriggerProps,\n})\n\n/**\n * onOpen opens the tooltip instantly, onTrigger acts a lil bit differently,\n * it will check if delayDuration is set to greater than 0 and based on that result,\n * if true, it opens the tooltip after delayDuration, otherwise it opens it instantly.\n */\nconst { onClose, onOpen, onDelayOpen, triggerRef, contentId } =\n inject(tooltipV2RootKey)!\n\nlet isMousedown = false\n\nconst setTriggerRef = (el: HTMLElement | null) => {\n triggerRef.value = el\n}\n\nconst onMouseup = () => {\n isMousedown = false\n}\n\nconst onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen)\n\nconst onMouseleave = composeEventHandlers(props.onMouseLeave, onClose)\n\nconst onMousedown = composeEventHandlers(props.onMouseDown, () => {\n onClose()\n isMousedown = true\n document.addEventListener('mouseup', onMouseup, { once: true })\n})\n\nconst onFocus = composeEventHandlers(props.onFocus, () => {\n if (!isMousedown) onOpen()\n})\n\nconst onBlur = composeEventHandlers(props.onBlur, onClose)\n\nconst onClick = composeEventHandlers(props.onClick, (e) => {\n if ((e as MouseEvent).detail === 0) onClose()\n})\n\nconst events = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n mousedown: onMousedown,\n mouseenter: onMouseenter,\n mouseleave: onMouseleave,\n}\n\nconst setEvents = <T extends (e: Event) => void>(\n el: HTMLElement | null | undefined,\n events: Record<string, T>,\n type: 'addEventListener' | 'removeEventListener'\n) => {\n if (el) {\n Object.entries(events).forEach(([name, handler]) => {\n el[type](name, handler)\n })\n }\n}\n\nwatch(triggerRef, (triggerEl, previousTriggerEl) => {\n setEvents(triggerEl, events, 'addEventListener')\n setEvents(previousTriggerEl, events, 'removeEventListener')\n\n if (triggerEl) {\n triggerEl.setAttribute('aria-describedby', contentId.value)\n }\n})\n\nonBeforeUnmount(() => {\n setEvents(triggerRef.value, events, 'removeEventListener')\n document.removeEventListener('mouseup', onMouseup)\n})\n</script>\n"],"names":["events"],"mappings":";;;;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAYA,IAAM,MAAA,EAAE,SAAS,MAAQ,EAAA,WAAA,EAAa,YAAY,SAAU,EAAA,GAC1D,OAAO,gBAAgB,CAAA,CAAA;AAEzB,IAAA,IAAI,WAAc,GAAA,KAAA,CAAA;AAElB,IAAM,MAAA,aAAA,GAAgB,CAAC,EAA2B,KAAA;AAChD,MAAA,UAAA,CAAW,KAAQ,GAAA,EAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,YAAY,MAAM;AACtB,MAAc,WAAA,GAAA,KAAA,CAAA;AAAA,KAChB,CAAA;AAEA,IAAA,MAAM,YAAe,GAAA,oBAAA,CAAqB,KAAM,CAAA,YAAA,EAAc,WAAW,CAAA,CAAA;AAEzE,IAAA,MAAM,YAAe,GAAA,oBAAA,CAAqB,KAAM,CAAA,YAAA,EAAc,OAAO,CAAA,CAAA;AAErE,IAAA,MAAM,WAAc,GAAA,oBAAA,CAAqB,KAAM,CAAA,WAAA,EAAa,MAAM;AAChE,MAAQ,OAAA,EAAA,CAAA;AACR,MAAc,WAAA,GAAA,IAAA,CAAA;AACd,MAAA,QAAA,CAAS,iBAAiB,SAAW,EAAA,SAAA,EAAW,EAAE,IAAA,EAAM,MAAM,CAAA,CAAA;AAAA,KAC/D,CAAA,CAAA;AAED,IAAA,MAAM,OAAU,GAAA,oBAAA,CAAqB,KAAM,CAAA,OAAA,EAAS,MAAM;AACxD,MAAI,IAAA,CAAC;AAAoB,QAC1B,MAAA,EAAA,CAAA;AAED,KAAA,CAAA,CAAA;AAEA,IAAA,MAAM,MAAU,GAAA,oBAAA,CAAA,KAA2B,CAAA,MAAA,EAAA,OAAgB,CAAA,CAAA;AACzD,IAAK,MAAA,OAA4B,GAAA,oBAAW,CAAA,KAAA,CAAA,OAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MAC7C,IAAA,CAAA,CAAA,MAAA,KAAA,CAAA;AAED,QAAA,OAAe,EAAA,CAAA;AAAA,KAAA,CACb,CAAM;AAAA,IAAA,MACC,MAAA,GAAA;AAAA,MACP,IAAO,EAAA,MAAA;AAAA,MACP,KAAW,EAAA,OAAA;AAAA,MACX,KAAY,EAAA,OAAA;AAAA,MACZ,SAAY,EAAA,WAAA;AAAA,MACd,UAAA,EAAA,YAAA;AAEA,MAAA,UAAkB,EAAA,YAEhBA;AAGA,KAAA,CAAA;AACE,IAAO,MAAA,SAAA,GAAA,CAAQA,WAAQ,EAAA,IAAQ,KAAE;AAC/B,MAAG,IAAA,EAAA,EAAA;AAAmB,QACxB,MAAC,CAAA,OAAA,CAAA,OAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,KAAA;AAAA,UACH,EAAA,CAAA,IAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AAAA,SACF,CAAA,CAAA;AAEA,OAAM;AACJ,KAAU,CAAA;AACV,IAAU,KAAA,CAAA,UAAA,EAAA,CAAA,SAAA,EAAA,iBAAgD,KAAA;AAE1D,MAAA,SAAe,CAAA,SAAA,EAAA,MAAA,EAAA,kBAAA,CAAA,CAAA;AACb,MAAU,SAAA,CAAA,iBAAiC,EAAA,MAAA,EAAA,qBAAe,CAAA,CAAA;AAAA,MAC5D,IAAA,SAAA,EAAA;AAAA,QACD,SAAA,CAAA,YAAA,CAAA,kBAAA,EAAA,SAAA,CAAA,KAAA,CAAA,CAAA;AAED,OAAA;AACE,KAAU,CAAA,CAAA;AACV,IAAS,eAAA,CAAA,MAAA;AAAwC,MAClD,SAAA,CAAA,UAAA,CAAA,KAAA,EAAA,MAAA,EAAA,qBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import Tour from './src/tour2.mjs';
2
2
  import TourStep from './src/step2.mjs';
3
3
  export { tourEmits, tourProps } from './src/tour.mjs';
4
4
  export { tourStepEmits, tourStepProps } from './src/step.mjs';
5
- export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content.mjs';
5
+ export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content2.mjs';
6
6
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
7
7
 
8
8
  const ElTour = withInstall(Tour, {
@@ -1,48 +1,72 @@
1
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, ref, watch, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
2
+ import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
+ import { tourContentProps, tourContentEmits } from './content2.mjs';
4
+ import { useFloating, tourKey } from './helper.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
2
6
 
3
- const tourStrategies = ["absolute", "fixed"];
4
- const tourPlacements = [
5
- "top-start",
6
- "top-end",
7
- "top",
8
- "bottom-start",
9
- "bottom-end",
10
- "bottom",
11
- "left-start",
12
- "left-end",
13
- "left",
14
- "right-start",
15
- "right-end",
16
- "right"
17
- ];
18
- const tourContentProps = buildProps({
19
- placement: {
20
- type: definePropType(String),
21
- values: tourPlacements,
22
- default: "bottom"
23
- },
24
- reference: {
25
- type: definePropType(Object),
26
- default: null
27
- },
28
- strategy: {
29
- type: definePropType(String),
30
- values: tourStrategies,
31
- default: "absolute"
32
- },
33
- offset: {
34
- type: Number,
35
- default: 10
36
- },
37
- showArrow: Boolean,
38
- zIndex: {
39
- type: Number,
40
- default: 2001
7
+ const __default__ = defineComponent({
8
+ name: "ElTourContent"
9
+ });
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: tourContentProps,
13
+ emits: tourContentEmits,
14
+ setup(__props, { emit }) {
15
+ const props = __props;
16
+ const placement = ref(props.placement);
17
+ const strategy = ref(props.strategy);
18
+ const contentRef = ref(null);
19
+ const arrowRef = ref(null);
20
+ watch(() => props.placement, () => {
21
+ placement.value = props.placement;
22
+ });
23
+ const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
24
+ const side = computed(() => {
25
+ return placement.value.split("-")[0];
26
+ });
27
+ const { ns } = inject(tourKey);
28
+ const onCloseRequested = () => {
29
+ emit("close");
30
+ };
31
+ const onFocusoutPrevented = (event) => {
32
+ if (event.detail.focusReason === "pointer") {
33
+ event.preventDefault();
34
+ }
35
+ };
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", {
38
+ ref_key: "contentRef",
39
+ ref: contentRef,
40
+ style: normalizeStyle(unref(contentStyle)),
41
+ class: normalizeClass(unref(ns).e("content")),
42
+ "data-side": unref(side),
43
+ tabindex: "-1"
44
+ }, [
45
+ createVNode(unref(ElFocusTrap), {
46
+ loop: "",
47
+ trapped: "",
48
+ "focus-start-el": "container",
49
+ "focus-trap-el": contentRef.value || void 0,
50
+ onReleaseRequested: onCloseRequested,
51
+ onFocusoutPrevented
52
+ }, {
53
+ default: withCtx(() => [
54
+ renderSlot(_ctx.$slots, "default")
55
+ ]),
56
+ _: 3
57
+ }, 8, ["focus-trap-el"]),
58
+ _ctx.showArrow ? (openBlock(), createElementBlock("span", {
59
+ key: 0,
60
+ ref_key: "arrowRef",
61
+ ref: arrowRef,
62
+ style: normalizeStyle(unref(arrowStyle)),
63
+ class: normalizeClass(unref(ns).e("arrow"))
64
+ }, null, 6)) : createCommentVNode("v-if", true)
65
+ ], 14, ["data-side"]);
66
+ };
41
67
  }
42
68
  });
43
- const tourContentEmits = {
44
- close: () => true
45
- };
69
+ var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
46
70
 
47
- export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies };
71
+ export { ElTourContent as default };
48
72
  //# sourceMappingURL=content.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nexport const tourStrategies = ['absolute', 'fixed'] as const\n\nexport const tourPlacements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\nexport type TourContentProps = ExtractPropTypes<typeof tourContentProps>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE;AACxC,MAAC,cAAc,GAAG;AAC9B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,EAAE;AACU,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
1
+ {"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tour/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n :style=\"contentStyle\"\n :class=\"ns.e('content')\"\n :data-side=\"side\"\n tabindex=\"-1\"\n >\n <el-focus-trap\n loop\n trapped\n focus-start-el=\"container\"\n :focus-trap-el=\"contentRef || undefined\"\n @release-requested=\"onCloseRequested\"\n @focusout-prevented=\"onFocusoutPrevented\"\n >\n <slot />\n </el-focus-trap>\n <span\n v-if=\"showArrow\"\n ref=\"arrowRef\"\n :style=\"arrowStyle\"\n :class=\"ns.e('arrow')\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject, ref, toRef, watch } from 'vue'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { tourContentEmits, tourContentProps } from './content'\nimport { tourKey, useFloating } from './helper'\n\ndefineOptions({\n name: 'ElTourContent',\n})\n\nconst props = defineProps(tourContentProps)\nconst emit = defineEmits(tourContentEmits)\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst contentRef = ref<HTMLElement | null>(null)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nwatch(\n () => props.placement,\n () => {\n placement.value = props.placement\n }\n)\n\nconst { contentStyle, arrowStyle } = useFloating(\n toRef(props, 'reference'),\n contentRef,\n arrowRef,\n placement,\n strategy,\n toRef(props, 'offset'),\n toRef(props, 'zIndex'),\n toRef(props, 'showArrow')\n)\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst { ns } = inject(tourKey)!\n\nconst onCloseRequested = () => {\n emit('close')\n}\n\nconst onFocusoutPrevented = (event: CustomEvent) => {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_createVNode"],"mappings":";;;;;;mCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAa,IAAwB,IAAI,CAAA,CAAA;AAC/C,IAAM,MAAA,QAAA,GAAW,IAAwB,IAAI,CAAA,CAAA;AAE7C,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EAAA,MAAA;AAAA,MACE,SAAY,CAAA,KAAA,GAAA,KAAA,CAAA,SAAA,CAAA;AAAA,KAAA,CACZ,CAAM;AACJ,IAAA,MAAA,EAAA,cAAkB,UAAM,EAAA,GAAA,WAAA,CAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,CAAA,CAAA;AAAA,IAC1B,MAAA,IAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACF,OAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AAA+B,IACnC,MAAA,EAAM,OAAO,MAAW,CAAA,OAAA,CAAA,CAAA;AAAA,IACxB,MAAA,gBAAA,GAAA,MAAA;AAAA,MACA,IAAA,CAAA,OAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAAA,IACA,MAAA,mBAAA,GAAA,CAAA,KAAA,KAAA;AAAA,MACA,IAAA,YAAqB,CAAA,WAAA,KAAA,SAAA,EAAA;AAAA,QACrB,oBAAqB,EAAA,CAAA;AAAA,OACrB;AAAwB,KAC1B,CAAA;AAEA,IAAM,OAAA,CAAA,IAAA,aAAsB;AAC1B,MAAA,OAAOA,SAAU,EAAA,EAAAC,kBAAkB,CAAA,KAAA,EAAA;AAAA,QACpC,OAAA,EAAA,YAAA;AAED,QAAA,GAAQ,EAAA,UAAO;AAEf,QAAA,qBAA+B,CAAAC,KAAA,CAAA,YAAA,CAAA,CAAA;AAC7B,QAAA,KAAY,EAAAC,cAAA,CAAAD,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACd,WAAA,EAAAA,KAAA,CAAA,IAAA,CAAA;AAEA,QAAM,QAAA,EAAA,IAAA;AACJ,OAAI,EAAA;AACF,QAAAE,WAAqB,CAAAF,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,UACvB,IAAA,EAAA,EAAA;AAAA,UACF,OAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,72 +1,48 @@
1
- import { defineComponent, ref, watch, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
2
- import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
- import { tourContentProps, tourContentEmits } from './content.mjs';
4
- import { useFloating, tourKey } from './helper.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
6
2
 
7
- const __default__ = defineComponent({
8
- name: "ElTourContent"
9
- });
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: tourContentProps,
13
- emits: tourContentEmits,
14
- setup(__props, { emit }) {
15
- const props = __props;
16
- const placement = ref(props.placement);
17
- const strategy = ref(props.strategy);
18
- const contentRef = ref(null);
19
- const arrowRef = ref(null);
20
- watch(() => props.placement, () => {
21
- placement.value = props.placement;
22
- });
23
- const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
24
- const side = computed(() => {
25
- return placement.value.split("-")[0];
26
- });
27
- const { ns } = inject(tourKey);
28
- const onCloseRequested = () => {
29
- emit("close");
30
- };
31
- const onFocusoutPrevented = (event) => {
32
- if (event.detail.focusReason === "pointer") {
33
- event.preventDefault();
34
- }
35
- };
36
- return (_ctx, _cache) => {
37
- return openBlock(), createElementBlock("div", {
38
- ref_key: "contentRef",
39
- ref: contentRef,
40
- style: normalizeStyle(unref(contentStyle)),
41
- class: normalizeClass(unref(ns).e("content")),
42
- "data-side": unref(side),
43
- tabindex: "-1"
44
- }, [
45
- createVNode(unref(ElFocusTrap), {
46
- loop: "",
47
- trapped: "",
48
- "focus-start-el": "container",
49
- "focus-trap-el": contentRef.value || void 0,
50
- onReleaseRequested: onCloseRequested,
51
- onFocusoutPrevented
52
- }, {
53
- default: withCtx(() => [
54
- renderSlot(_ctx.$slots, "default")
55
- ]),
56
- _: 3
57
- }, 8, ["focus-trap-el"]),
58
- _ctx.showArrow ? (openBlock(), createElementBlock("span", {
59
- key: 0,
60
- ref_key: "arrowRef",
61
- ref: arrowRef,
62
- style: normalizeStyle(unref(arrowStyle)),
63
- class: normalizeClass(unref(ns).e("arrow"))
64
- }, null, 6)) : createCommentVNode("v-if", true)
65
- ], 14, ["data-side"]);
66
- };
3
+ const tourStrategies = ["absolute", "fixed"];
4
+ const tourPlacements = [
5
+ "top-start",
6
+ "top-end",
7
+ "top",
8
+ "bottom-start",
9
+ "bottom-end",
10
+ "bottom",
11
+ "left-start",
12
+ "left-end",
13
+ "left",
14
+ "right-start",
15
+ "right-end",
16
+ "right"
17
+ ];
18
+ const tourContentProps = buildProps({
19
+ placement: {
20
+ type: definePropType(String),
21
+ values: tourPlacements,
22
+ default: "bottom"
23
+ },
24
+ reference: {
25
+ type: definePropType(Object),
26
+ default: null
27
+ },
28
+ strategy: {
29
+ type: definePropType(String),
30
+ values: tourStrategies,
31
+ default: "absolute"
32
+ },
33
+ offset: {
34
+ type: Number,
35
+ default: 10
36
+ },
37
+ showArrow: Boolean,
38
+ zIndex: {
39
+ type: Number,
40
+ default: 2001
67
41
  }
68
42
  });
69
- var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
43
+ const tourContentEmits = {
44
+ close: () => true
45
+ };
70
46
 
71
- export { ElTourContent as default };
47
+ export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies };
72
48
  //# sourceMappingURL=content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n :style=\"contentStyle\"\n :class=\"ns.e('content')\"\n :data-side=\"side\"\n tabindex=\"-1\"\n >\n <el-focus-trap\n loop\n trapped\n focus-start-el=\"container\"\n :focus-trap-el=\"contentRef || undefined\"\n @release-requested=\"onCloseRequested\"\n @focusout-prevented=\"onFocusoutPrevented\"\n >\n <slot />\n </el-focus-trap>\n <span\n v-if=\"showArrow\"\n ref=\"arrowRef\"\n :style=\"arrowStyle\"\n :class=\"ns.e('arrow')\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject, ref, toRef, watch } from 'vue'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { tourContentEmits, tourContentProps } from './content'\nimport { tourKey, useFloating } from './helper'\n\ndefineOptions({\n name: 'ElTourContent',\n})\n\nconst props = defineProps(tourContentProps)\nconst emit = defineEmits(tourContentEmits)\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst contentRef = ref<HTMLElement | null>(null)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nwatch(\n () => props.placement,\n () => {\n placement.value = props.placement\n }\n)\n\nconst { contentStyle, arrowStyle } = useFloating(\n toRef(props, 'reference'),\n contentRef,\n arrowRef,\n placement,\n strategy,\n toRef(props, 'offset'),\n toRef(props, 'zIndex'),\n toRef(props, 'showArrow')\n)\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst { ns } = inject(tourKey)!\n\nconst onCloseRequested = () => {\n emit('close')\n}\n\nconst onFocusoutPrevented = (event: CustomEvent) => {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_createVNode"],"mappings":";;;;;;mCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAa,IAAwB,IAAI,CAAA,CAAA;AAC/C,IAAM,MAAA,QAAA,GAAW,IAAwB,IAAI,CAAA,CAAA;AAE7C,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EAAA,MAAA;AAAA,MACE,SAAY,CAAA,KAAA,GAAA,KAAA,CAAA,SAAA,CAAA;AAAA,KAAA,CACZ,CAAM;AACJ,IAAA,MAAA,EAAA,cAAkB,UAAM,EAAA,GAAA,WAAA,CAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,CAAA,CAAA;AAAA,IAC1B,MAAA,IAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACF,OAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AAA+B,IACnC,MAAA,EAAM,OAAO,MAAW,CAAA,OAAA,CAAA,CAAA;AAAA,IACxB,MAAA,gBAAA,GAAA,MAAA;AAAA,MACA,IAAA,CAAA,OAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAAA,IACA,MAAA,mBAAA,GAAA,CAAA,KAAA,KAAA;AAAA,MACA,IAAA,YAAqB,CAAA,WAAA,KAAA,SAAA,EAAA;AAAA,QACrB,oBAAqB,EAAA,CAAA;AAAA,OACrB;AAAwB,KAC1B,CAAA;AAEA,IAAM,OAAA,CAAA,IAAA,aAAsB;AAC1B,MAAA,OAAOA,SAAU,EAAA,EAAAC,kBAAkB,CAAA,KAAA,EAAA;AAAA,QACpC,OAAA,EAAA,YAAA;AAED,QAAA,GAAQ,EAAA,UAAO;AAEf,QAAA,qBAA+B,CAAAC,KAAA,CAAA,YAAA,CAAA,CAAA;AAC7B,QAAA,KAAY,EAAAC,cAAA,CAAAD,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACd,WAAA,EAAAA,KAAA,CAAA,IAAA,CAAA;AAEA,QAAM,QAAA,EAAA,IAAA;AACJ,OAAI,EAAA;AACF,QAAAE,WAAqB,CAAAF,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,UACvB,IAAA,EAAA,EAAA;AAAA,UACF,OAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nexport const tourStrategies = ['absolute', 'fixed'] as const\n\nexport const tourPlacements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\nexport type TourContentProps = ExtractPropTypes<typeof tourContentProps>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE;AACxC,MAAC,cAAc,GAAG;AAC9B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,EAAE;AACU,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
@@ -1,4 +1,4 @@
1
- import { tourContentProps } from './content.mjs';
1
+ import { tourContentProps } from './content2.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
  import { iconPropType } from '../../../utils/vue/icon.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { tourContentProps } from './content.mjs';
1
+ import { tourContentProps } from './content2.mjs';
2
2
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
  import { iconPropType } from '../../../utils/vue/icon.mjs';
4
4
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, toRef, watch, useSlots, provide, openBl
2
2
  import { useVModel } from '@vueuse/core';
3
3
  import { ElTeleport } from '../../teleport/index.mjs';
4
4
  import ElTourMask from './mask2.mjs';
5
- import ElTourContent from './content2.mjs';
5
+ import ElTourContent from './content.mjs';
6
6
  import ElTourSteps from './steps.mjs';
7
7
  import { tourProps, tourEmits } from './tour.mjs';
8
8
  import { useTarget, tourKey } from './helper.mjs';
@@ -1,5 +1,5 @@
1
1
  import { computed, watch } from 'vue';
2
- import { CHECKED_CHANGE_EVENT } from '../transfer-panel2.mjs';
2
+ import { CHECKED_CHANGE_EVENT } from '../transfer-panel.mjs';
3
3
  import { usePropsAlias } from './use-props-alias.mjs';
4
4
  import { isFunction } from '@vue/shared';
5
5