@element-plus/nightly 0.0.20240120 → 0.0.20240123

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 (336) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.min.js +4 -4
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +4 -4
  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/nb-no.js +1 -1
  152. package/dist/locale/nb-no.min.js +1 -1
  153. package/dist/locale/nb-no.min.mjs +1 -1
  154. package/dist/locale/nb-no.mjs +1 -1
  155. package/dist/locale/nl.js +1 -1
  156. package/dist/locale/nl.min.js +1 -1
  157. package/dist/locale/nl.min.mjs +1 -1
  158. package/dist/locale/nl.mjs +1 -1
  159. package/dist/locale/pa.js +1 -1
  160. package/dist/locale/pa.min.js +1 -1
  161. package/dist/locale/pa.min.mjs +1 -1
  162. package/dist/locale/pa.mjs +1 -1
  163. package/dist/locale/pl.js +1 -1
  164. package/dist/locale/pl.min.js +1 -1
  165. package/dist/locale/pl.min.mjs +1 -1
  166. package/dist/locale/pl.mjs +1 -1
  167. package/dist/locale/pt-br.js +1 -1
  168. package/dist/locale/pt-br.min.js +1 -1
  169. package/dist/locale/pt-br.min.mjs +1 -1
  170. package/dist/locale/pt-br.mjs +1 -1
  171. package/dist/locale/pt.js +1 -1
  172. package/dist/locale/pt.min.js +1 -1
  173. package/dist/locale/pt.min.mjs +1 -1
  174. package/dist/locale/pt.mjs +1 -1
  175. package/dist/locale/ro.js +1 -1
  176. package/dist/locale/ro.min.js +1 -1
  177. package/dist/locale/ro.min.mjs +1 -1
  178. package/dist/locale/ro.mjs +1 -1
  179. package/dist/locale/ru.js +1 -1
  180. package/dist/locale/ru.min.js +1 -1
  181. package/dist/locale/ru.min.mjs +1 -1
  182. package/dist/locale/ru.mjs +1 -1
  183. package/dist/locale/sk.js +1 -1
  184. package/dist/locale/sk.min.js +1 -1
  185. package/dist/locale/sk.min.mjs +1 -1
  186. package/dist/locale/sk.mjs +1 -1
  187. package/dist/locale/sl.js +1 -1
  188. package/dist/locale/sl.min.js +1 -1
  189. package/dist/locale/sl.min.mjs +1 -1
  190. package/dist/locale/sl.mjs +1 -1
  191. package/dist/locale/sr.js +1 -1
  192. package/dist/locale/sr.min.js +1 -1
  193. package/dist/locale/sr.min.mjs +1 -1
  194. package/dist/locale/sr.mjs +1 -1
  195. package/dist/locale/sv.js +1 -1
  196. package/dist/locale/sv.min.js +1 -1
  197. package/dist/locale/sv.min.mjs +1 -1
  198. package/dist/locale/sv.mjs +1 -1
  199. package/dist/locale/sw.js +1 -1
  200. package/dist/locale/sw.min.js +1 -1
  201. package/dist/locale/sw.min.mjs +1 -1
  202. package/dist/locale/sw.mjs +1 -1
  203. package/dist/locale/ta.js +1 -1
  204. package/dist/locale/ta.min.js +1 -1
  205. package/dist/locale/ta.min.mjs +1 -1
  206. package/dist/locale/ta.mjs +1 -1
  207. package/dist/locale/th.js +1 -1
  208. package/dist/locale/th.min.js +1 -1
  209. package/dist/locale/th.min.mjs +1 -1
  210. package/dist/locale/th.mjs +1 -1
  211. package/dist/locale/tk.js +1 -1
  212. package/dist/locale/tk.min.js +1 -1
  213. package/dist/locale/tk.min.mjs +1 -1
  214. package/dist/locale/tk.mjs +1 -1
  215. package/dist/locale/tr.js +1 -1
  216. package/dist/locale/tr.min.js +1 -1
  217. package/dist/locale/tr.min.mjs +1 -1
  218. package/dist/locale/tr.mjs +1 -1
  219. package/dist/locale/ug-cn.js +1 -1
  220. package/dist/locale/ug-cn.min.js +1 -1
  221. package/dist/locale/ug-cn.min.mjs +1 -1
  222. package/dist/locale/ug-cn.mjs +1 -1
  223. package/dist/locale/uk.js +1 -1
  224. package/dist/locale/uk.min.js +1 -1
  225. package/dist/locale/uk.min.mjs +1 -1
  226. package/dist/locale/uk.mjs +1 -1
  227. package/dist/locale/uz-uz.js +1 -1
  228. package/dist/locale/uz-uz.min.js +1 -1
  229. package/dist/locale/uz-uz.min.mjs +1 -1
  230. package/dist/locale/uz-uz.mjs +1 -1
  231. package/dist/locale/vi.js +1 -1
  232. package/dist/locale/vi.min.js +1 -1
  233. package/dist/locale/vi.min.mjs +1 -1
  234. package/dist/locale/vi.mjs +1 -1
  235. package/dist/locale/zh-cn.js +1 -1
  236. package/dist/locale/zh-cn.min.js +1 -1
  237. package/dist/locale/zh-cn.min.mjs +1 -1
  238. package/dist/locale/zh-cn.mjs +1 -1
  239. package/dist/locale/zh-tw.js +1 -1
  240. package/dist/locale/zh-tw.min.js +1 -1
  241. package/dist/locale/zh-tw.min.mjs +1 -1
  242. package/dist/locale/zh-tw.mjs +1 -1
  243. package/es/components/alert/index.mjs +2 -2
  244. package/es/components/alert/src/alert.mjs +36 -96
  245. package/es/components/alert/src/alert.mjs.map +1 -1
  246. package/es/components/alert/src/alert2.mjs +96 -36
  247. package/es/components/alert/src/alert2.mjs.map +1 -1
  248. package/es/components/breadcrumb/index.mjs +4 -4
  249. package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -56
  250. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  251. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -11
  252. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  253. package/es/components/breadcrumb/src/breadcrumb.mjs +11 -36
  254. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  255. package/es/components/breadcrumb/src/breadcrumb2.mjs +36 -11
  256. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  257. package/es/components/form/index.mjs +2 -2
  258. package/es/components/form/src/form.mjs +152 -54
  259. package/es/components/form/src/form.mjs.map +1 -1
  260. package/es/components/form/src/form2.mjs +54 -152
  261. package/es/components/form/src/form2.mjs.map +1 -1
  262. package/es/components/index.mjs +5 -5
  263. package/es/components/scrollbar/index.mjs +1 -1
  264. package/es/components/scrollbar/src/bar2.mjs +1 -1
  265. package/es/components/scrollbar/src/thumb.mjs +130 -11
  266. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  267. package/es/components/scrollbar/src/thumb2.mjs +11 -130
  268. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  269. package/es/components/select/src/select2.mjs +1 -1
  270. package/es/components/select/src/select2.mjs.map +1 -1
  271. package/es/components/select-v2/src/select.mjs +1 -1
  272. package/es/components/select-v2/src/select.mjs.map +1 -1
  273. package/es/components/time-select/index.mjs +1 -1
  274. package/es/components/time-select/src/time-select.mjs +120 -48
  275. package/es/components/time-select/src/time-select.mjs.map +1 -1
  276. package/es/components/time-select/src/time-select2.mjs +48 -120
  277. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  278. package/es/components/tour/src/content.mjs +63 -44
  279. package/es/components/tour/src/content.mjs.map +1 -1
  280. package/es/components/tour/src/content2.mjs +44 -63
  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/index.mjs +5 -5
  286. package/es/version.d.ts +1 -1
  287. package/es/version.mjs +1 -1
  288. package/es/version.mjs.map +1 -1
  289. package/lib/components/alert/index.js +2 -2
  290. package/lib/components/alert/src/alert.js +37 -95
  291. package/lib/components/alert/src/alert.js.map +1 -1
  292. package/lib/components/alert/src/alert2.js +95 -37
  293. package/lib/components/alert/src/alert2.js.map +1 -1
  294. package/lib/components/breadcrumb/index.js +4 -4
  295. package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -56
  296. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  297. package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -11
  298. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  299. package/lib/components/breadcrumb/src/breadcrumb.js +11 -36
  300. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  301. package/lib/components/breadcrumb/src/breadcrumb2.js +36 -11
  302. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  303. package/lib/components/form/index.js +2 -2
  304. package/lib/components/form/src/form.js +151 -54
  305. package/lib/components/form/src/form.js.map +1 -1
  306. package/lib/components/form/src/form2.js +54 -151
  307. package/lib/components/form/src/form2.js.map +1 -1
  308. package/lib/components/index.js +5 -5
  309. package/lib/components/scrollbar/index.js +1 -1
  310. package/lib/components/scrollbar/src/bar2.js +1 -1
  311. package/lib/components/scrollbar/src/thumb.js +130 -11
  312. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  313. package/lib/components/scrollbar/src/thumb2.js +11 -130
  314. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  315. package/lib/components/select/src/select2.js +1 -1
  316. package/lib/components/select/src/select2.js.map +1 -1
  317. package/lib/components/select-v2/src/select.js +1 -1
  318. package/lib/components/select-v2/src/select.js.map +1 -1
  319. package/lib/components/time-select/index.js +1 -1
  320. package/lib/components/time-select/src/time-select.js +125 -48
  321. package/lib/components/time-select/src/time-select.js.map +1 -1
  322. package/lib/components/time-select/src/time-select2.js +48 -125
  323. package/lib/components/time-select/src/time-select2.js.map +1 -1
  324. package/lib/components/tour/src/content.js +63 -45
  325. package/lib/components/tour/src/content.js.map +1 -1
  326. package/lib/components/tour/src/content2.js +45 -63
  327. package/lib/components/tour/src/content2.js.map +1 -1
  328. package/lib/components/tour/src/step.js +1 -1
  329. package/lib/components/tour/src/tour.js +1 -1
  330. package/lib/components/tour/src/tour2.js +1 -1
  331. package/lib/index.js +5 -5
  332. package/lib/version.d.ts +1 -1
  333. package/lib/version.js +1 -1
  334. package/lib/version.js.map +1 -1
  335. package/package.json +2 -2
  336. package/web-types.json +1 -1
@@ -1,49 +1,68 @@
1
- import '../../../utils/index.mjs';
2
- 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 '../../focus-trap/index.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';
6
+ import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
7
 
4
- const tourStrategies = ["absolute", "fixed"];
5
- const tourPlacements = [
6
- "top-start",
7
- "top-end",
8
- "top",
9
- "bottom-start",
10
- "bottom-end",
11
- "bottom",
12
- "left-start",
13
- "left-end",
14
- "left",
15
- "right-start",
16
- "right-end",
17
- "right"
18
- ];
19
- const tourContentProps = buildProps({
20
- placement: {
21
- type: definePropType(String),
22
- values: tourPlacements,
23
- default: "bottom"
24
- },
25
- reference: {
26
- type: definePropType(Object),
27
- default: null
28
- },
29
- strategy: {
30
- type: definePropType(String),
31
- values: tourStrategies,
32
- default: "absolute"
33
- },
34
- offset: {
35
- type: Number,
36
- default: 10
37
- },
38
- showArrow: Boolean,
39
- zIndex: {
40
- type: Number,
41
- default: 2001
8
+ const _hoisted_1 = ["data-side"];
9
+ const __default__ = defineComponent({
10
+ name: "ElTourContent"
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: tourContentProps,
15
+ emits: tourContentEmits,
16
+ setup(__props, { emit }) {
17
+ const props = __props;
18
+ const placement = ref(props.placement);
19
+ const strategy = ref(props.strategy);
20
+ const contentRef = ref(null);
21
+ const arrowRef = ref(null);
22
+ watch(() => props.placement, () => {
23
+ placement.value = props.placement;
24
+ });
25
+ const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
26
+ const side = computed(() => {
27
+ return placement.value.split("-")[0];
28
+ });
29
+ const { ns } = inject(tourKey);
30
+ const onCloseRequested = () => {
31
+ emit("close");
32
+ };
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ ref_key: "contentRef",
36
+ ref: contentRef,
37
+ style: normalizeStyle(unref(contentStyle)),
38
+ class: normalizeClass(unref(ns).e("content")),
39
+ "data-side": unref(side),
40
+ tabindex: "-1"
41
+ }, [
42
+ createVNode(unref(ElFocusTrap), {
43
+ loop: "",
44
+ trapped: "",
45
+ "focus-start-el": "container",
46
+ "focus-trap-el": contentRef.value || void 0,
47
+ onReleaseRequested: onCloseRequested
48
+ }, {
49
+ default: withCtx(() => [
50
+ renderSlot(_ctx.$slots, "default")
51
+ ]),
52
+ _: 3
53
+ }, 8, ["focus-trap-el"]),
54
+ _ctx.showArrow ? (openBlock(), createElementBlock("span", {
55
+ key: 0,
56
+ ref_key: "arrowRef",
57
+ ref: arrowRef,
58
+ style: normalizeStyle(unref(arrowStyle)),
59
+ class: normalizeClass(unref(ns).e("arrow"))
60
+ }, null, 6)) : createCommentVNode("v-if", true)
61
+ ], 14, _hoisted_1);
62
+ };
42
63
  }
43
64
  });
44
- const tourContentEmits = {
45
- close: () => true
46
- };
65
+ var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
47
66
 
48
- export { tourContentEmits, tourContentProps };
67
+ export { ElTourContent as default };
49
68
  //# 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\nconst tourStrategies = ['absolute', 'fixed'] as const\n\nconst 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":";;;AACA,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC7C,MAAM,cAAc,GAAG;AACvB,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,CAAC,CAAC;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 >\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</script>\n"],"names":[],"mappings":";;;;;;;;mCA+Bc,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,IACE,KAAA,CAAA,MAAM,KAAM,CAAA,SAAA,EACZ,MAAM;AACJ,MAAA,SAAA,CAAU,QAAQ,KAAM,CAAA,SAAA,CAAA;AAAA,KAE5B,CAAA,CAAA;AAEA,IAAM,MAAA,EAAE,cAAc,UAAe,EAAA,GAAA,WAAA,CACnC,MAAM,KAAO,EAAA,WAAW,CACxB,EAAA,UAAA,EACA,QACA,EAAA,SAAA,EACA,UACA,KAAM,CAAA,KAAA,EAAO,QAAQ,CAAA,EACrB,KAAM,CAAA,KAAA,EAAO,QAAQ,CACrB,EAAA,KAAA,CAAM,KAAO,EAAA,WAAW,CAC1B,CAAA,CAAA;AAEA,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAA,OAAO,SAAU,CAAA,KAAA,CAAM,KAAM,CAAA,GAAG,CAAE,CAAA,CAAA,CAAA,CAAA;AAAA,KACnC,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAE7B,IAAA,MAAM,mBAAmB,MAAM;AAC7B,MAAA,IAAA,CAAK,OAAO,CAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,68 +1,49 @@
1
- import { defineComponent, ref, watch, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
2
- import '../../focus-trap/index.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';
6
- import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
7
3
 
8
- const _hoisted_1 = ["data-side"];
9
- const __default__ = defineComponent({
10
- name: "ElTourContent"
11
- });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: tourContentProps,
15
- emits: tourContentEmits,
16
- setup(__props, { emit }) {
17
- const props = __props;
18
- const placement = ref(props.placement);
19
- const strategy = ref(props.strategy);
20
- const contentRef = ref(null);
21
- const arrowRef = ref(null);
22
- watch(() => props.placement, () => {
23
- placement.value = props.placement;
24
- });
25
- const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
26
- const side = computed(() => {
27
- return placement.value.split("-")[0];
28
- });
29
- const { ns } = inject(tourKey);
30
- const onCloseRequested = () => {
31
- emit("close");
32
- };
33
- return (_ctx, _cache) => {
34
- return openBlock(), createElementBlock("div", {
35
- ref_key: "contentRef",
36
- ref: contentRef,
37
- style: normalizeStyle(unref(contentStyle)),
38
- class: normalizeClass(unref(ns).e("content")),
39
- "data-side": unref(side),
40
- tabindex: "-1"
41
- }, [
42
- createVNode(unref(ElFocusTrap), {
43
- loop: "",
44
- trapped: "",
45
- "focus-start-el": "container",
46
- "focus-trap-el": contentRef.value || void 0,
47
- onReleaseRequested: onCloseRequested
48
- }, {
49
- default: withCtx(() => [
50
- renderSlot(_ctx.$slots, "default")
51
- ]),
52
- _: 3
53
- }, 8, ["focus-trap-el"]),
54
- _ctx.showArrow ? (openBlock(), createElementBlock("span", {
55
- key: 0,
56
- ref_key: "arrowRef",
57
- ref: arrowRef,
58
- style: normalizeStyle(unref(arrowStyle)),
59
- class: normalizeClass(unref(ns).e("arrow"))
60
- }, null, 6)) : createCommentVNode("v-if", true)
61
- ], 14, _hoisted_1);
62
- };
4
+ const tourStrategies = ["absolute", "fixed"];
5
+ const tourPlacements = [
6
+ "top-start",
7
+ "top-end",
8
+ "top",
9
+ "bottom-start",
10
+ "bottom-end",
11
+ "bottom",
12
+ "left-start",
13
+ "left-end",
14
+ "left",
15
+ "right-start",
16
+ "right-end",
17
+ "right"
18
+ ];
19
+ const tourContentProps = buildProps({
20
+ placement: {
21
+ type: definePropType(String),
22
+ values: tourPlacements,
23
+ default: "bottom"
24
+ },
25
+ reference: {
26
+ type: definePropType(Object),
27
+ default: null
28
+ },
29
+ strategy: {
30
+ type: definePropType(String),
31
+ values: tourStrategies,
32
+ default: "absolute"
33
+ },
34
+ offset: {
35
+ type: Number,
36
+ default: 10
37
+ },
38
+ showArrow: Boolean,
39
+ zIndex: {
40
+ type: Number,
41
+ default: 2001
63
42
  }
64
43
  });
65
- var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
44
+ const tourContentEmits = {
45
+ close: () => true
46
+ };
66
47
 
67
- export { ElTourContent as default };
48
+ export { tourContentEmits, tourContentProps };
68
49
  //# 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 >\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</script>\n"],"names":[],"mappings":";;;;;;;;mCA+Bc,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,IACE,KAAA,CAAA,MAAM,KAAM,CAAA,SAAA,EACZ,MAAM;AACJ,MAAA,SAAA,CAAU,QAAQ,KAAM,CAAA,SAAA,CAAA;AAAA,KAE5B,CAAA,CAAA;AAEA,IAAM,MAAA,EAAE,cAAc,UAAe,EAAA,GAAA,WAAA,CACnC,MAAM,KAAO,EAAA,WAAW,CACxB,EAAA,UAAA,EACA,QACA,EAAA,SAAA,EACA,UACA,KAAM,CAAA,KAAA,EAAO,QAAQ,CAAA,EACrB,KAAM,CAAA,KAAA,EAAO,QAAQ,CACrB,EAAA,KAAA,CAAM,KAAO,EAAA,WAAW,CAC1B,CAAA,CAAA;AAEA,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAA,OAAO,SAAU,CAAA,KAAA,CAAM,KAAM,CAAA,GAAG,CAAE,CAAA,CAAA,CAAA,CAAA;AAAA,KACnC,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAE7B,IAAA,MAAM,mBAAmB,MAAM;AAC7B,MAAA,IAAA,CAAK,OAAO,CAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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\nconst tourStrategies = ['absolute', 'fixed'] as const\n\nconst 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":";;;AACA,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC7C,MAAM,cAAc,GAAG;AACvB,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,CAAC,CAAC;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,5 +1,5 @@
1
1
  import '../../../utils/index.mjs';
2
- import { tourContentProps } from './content.mjs';
2
+ import { tourContentProps } from './content2.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { iconPropType } from '../../../utils/vue/icon.mjs';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import '../../../utils/index.mjs';
2
2
  import '../../../constants/index.mjs';
3
- import { tourContentProps } from './content.mjs';
3
+ import { tourContentProps } from './content2.mjs';
4
4
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
5
  import { iconPropType } from '../../../utils/vue/icon.mjs';
6
6
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
@@ -3,7 +3,7 @@ import { useVModel } from '@vueuse/core';
3
3
  import '../../../hooks/index.mjs';
4
4
  import '../../../utils/index.mjs';
5
5
  import ElTourMask from './mask2.mjs';
6
- import ElTourContent from './content2.mjs';
6
+ import ElTourContent from './content.mjs';
7
7
  import ElTourSteps from './steps.mjs';
8
8
  import { tourProps, tourEmits } from './tour.mjs';
9
9
  import { useTarget, tourKey } from './helper.mjs';
package/es/index.mjs CHANGED
@@ -8,7 +8,7 @@ export { makeInstaller } from './make-installer.mjs';
8
8
  export { default as dayjs } from 'dayjs';
9
9
  export { affixEmits, affixProps } from './components/affix/src/affix.mjs';
10
10
  export { ElAffix } from './components/affix/index.mjs';
11
- export { alertEffects, alertEmits, alertProps } from './components/alert/src/alert2.mjs';
11
+ export { alertEffects, alertEmits, alertProps } from './components/alert/src/alert.mjs';
12
12
  export { ElAlert } from './components/alert/index.mjs';
13
13
  export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/autocomplete.mjs';
14
14
  export { ElAutocomplete } from './components/autocomplete/index.mjs';
@@ -18,8 +18,8 @@ export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs
18
18
  export { ElBacktop } from './components/backtop/index.mjs';
19
19
  export { badgeProps } from './components/badge/src/badge.mjs';
20
20
  export { ElBadge } from './components/badge/index.mjs';
21
- export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb2.mjs';
22
- export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item2.mjs';
21
+ export { breadcrumbProps } from './components/breadcrumb/src/breadcrumb.mjs';
22
+ export { breadcrumbItemProps } from './components/breadcrumb/src/breadcrumb-item.mjs';
23
23
  export { breadcrumbKey } from './components/breadcrumb/src/constants.mjs';
24
24
  export { ElBreadcrumb, ElBreadcrumbItem } from './components/breadcrumb/index.mjs';
25
25
  export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './components/button/src/button.mjs';
@@ -79,7 +79,7 @@ export { DROPDOWN_INJECTION_KEY } from './components/dropdown/src/tokens.mjs';
79
79
  export { ElDropdown, ElDropdownItem, ElDropdownMenu } from './components/dropdown/index.mjs';
80
80
  export { emptyProps } from './components/empty/src/empty.mjs';
81
81
  export { ElEmpty } from './components/empty/index.mjs';
82
- export { formEmits, formProps } from './components/form/src/form.mjs';
82
+ export { formEmits, formProps } from './components/form/src/form2.mjs';
83
83
  export { formItemProps, formItemValidateStates } from './components/form/src/form-item.mjs';
84
84
  export { formContextKey, formItemContextKey } from './components/form/src/constants.mjs';
85
85
  export { useDisabled, useFormDisabled, useFormSize, useSize } from './components/form/src/hooks/use-form-common-props.mjs';
@@ -136,7 +136,7 @@ export { rowContextKey } from './components/row/src/constants.mjs';
136
136
  export { ElRow } from './components/row/index.mjs';
137
137
  export { BAR_MAP, GAP, renderThumbStyle } from './components/scrollbar/src/util.mjs';
138
138
  export { scrollbarEmits, scrollbarProps } from './components/scrollbar/src/scrollbar.mjs';
139
- export { thumbProps } from './components/scrollbar/src/thumb.mjs';
139
+ export { thumbProps } from './components/scrollbar/src/thumb2.mjs';
140
140
  export { scrollbarContextKey } from './components/scrollbar/src/constants.mjs';
141
141
  export { ElScrollbar } from './components/scrollbar/index.mjs';
142
142
  export { selectGroupKey, selectKey } from './components/select/src/token.mjs';
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20240120";
1
+ export declare const version = "0.0.20240123";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20240120";
1
+ const version = "0.0.20240123";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240120'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240123'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var alert$1 = require('./src/alert.js');
7
- var alert = require('./src/alert2.js');
6
+ var alert$1 = require('./src/alert2.js');
7
+ var alert = require('./src/alert.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElAlert = install.withInstall(alert$1["default"]);
@@ -2,105 +2,47 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$1 = require('../../icon/index.js');
7
5
  require('../../../utils/index.js');
8
- require('../../../hooks/index.js');
9
- var alert = require('./alert2.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
7
+ var objects = require('../../../utils/objects.js');
11
8
  var icon = require('../../../utils/vue/icon.js');
12
- var index = require('../../../hooks/use-namespace/index.js');
13
9
 
14
- const __default__ = vue.defineComponent({
15
- name: "ElAlert"
16
- });
17
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
- ...__default__,
19
- props: alert.alertProps,
20
- emits: alert.alertEmits,
21
- setup(__props, { emit }) {
22
- const props = __props;
23
- const { Close } = icon.TypeComponents;
24
- const slots = vue.useSlots();
25
- const ns = index.useNamespace("alert");
26
- const visible = vue.ref(true);
27
- const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type]);
28
- const iconClass = vue.computed(() => [
29
- ns.e("icon"),
30
- { [ns.is("big")]: !!props.description || !!slots.default }
31
- ]);
32
- const isBoldTitle = vue.computed(() => {
33
- return { [ns.is("bold")]: props.description || slots.default };
34
- });
35
- const close = (evt) => {
36
- visible.value = false;
37
- emit("close", evt);
38
- };
39
- return (_ctx, _cache) => {
40
- return vue.openBlock(), vue.createBlock(vue.Transition, {
41
- name: vue.unref(ns).b("fade"),
42
- persisted: ""
43
- }, {
44
- default: vue.withCtx(() => [
45
- vue.withDirectives(vue.createElementVNode("div", {
46
- class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is("center", _ctx.center), vue.unref(ns).is(_ctx.effect)]),
47
- role: "alert"
48
- }, [
49
- _ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
50
- key: 0,
51
- class: vue.normalizeClass(vue.unref(iconClass))
52
- }, {
53
- default: vue.withCtx(() => [
54
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
55
- ]),
56
- _: 1
57
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
58
- vue.createElementVNode("div", {
59
- class: vue.normalizeClass(vue.unref(ns).e("content"))
60
- }, [
61
- _ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
62
- key: 0,
63
- class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(isBoldTitle)])
64
- }, [
65
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
66
- vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
67
- ])
68
- ], 2)) : vue.createCommentVNode("v-if", true),
69
- _ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
70
- key: 1,
71
- class: vue.normalizeClass(vue.unref(ns).e("description"))
72
- }, [
73
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
74
- vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
75
- ])
76
- ], 2)) : vue.createCommentVNode("v-if", true),
77
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
78
- _ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
79
- key: 0,
80
- class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")]),
81
- onClick: close
82
- }, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
83
- key: 1,
84
- class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
85
- onClick: close
86
- }, {
87
- default: vue.withCtx(() => [
88
- vue.createVNode(vue.unref(Close))
89
- ]),
90
- _: 1
91
- }, 8, ["class"]))
92
- ], 64)) : vue.createCommentVNode("v-if", true)
93
- ], 2)
94
- ], 2), [
95
- [vue.vShow, visible.value]
96
- ])
97
- ]),
98
- _: 3
99
- }, 8, ["name"]);
100
- };
10
+ const alertEffects = ["light", "dark"];
11
+ const alertProps = runtime.buildProps({
12
+ title: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ description: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ type: {
21
+ type: String,
22
+ values: objects.keysOf(icon.TypeComponentsMap),
23
+ default: "info"
24
+ },
25
+ closable: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ closeText: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ showIcon: Boolean,
34
+ center: Boolean,
35
+ effect: {
36
+ type: String,
37
+ values: alertEffects,
38
+ default: "light"
101
39
  }
102
40
  });
103
- var Alert = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "alert.vue"]]);
41
+ const alertEmits = {
42
+ close: (evt) => evt instanceof MouseEvent
43
+ };
104
44
 
105
- exports["default"] = Alert;
45
+ exports.alertEffects = alertEffects;
46
+ exports.alertEmits = alertEmits;
47
+ exports.alertProps = alertProps;
106
48
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <el-icon v-if=\"showIcon && iconComponent\" :class=\"iconClass\">\n <component :is=\"iconComponent\" />\n </el-icon>\n\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), isBoldTitle]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n @click=\"close\"\n >\n {{ closeText }}\n </div>\n <el-icon v-else :class=\"ns.e('close-btn')\" @click=\"close\">\n <Close />\n </el-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { alertEmits, alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'ElAlert',\n})\n\nconst props = defineProps(alertProps)\nconst emit = defineEmits(alertEmits)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\nconst visible = ref(true)\n\nconst iconComponent = computed(() => TypeComponentsMap[props.type])\n\nconst iconClass = computed(() => [\n ns.e('icon'),\n { [ns.is('big')]: !!props.description || !!slots.default },\n])\n\nconst isBoldTitle = computed(() => {\n return { [ns.is('bold')]: props.description || slots.default }\n})\n\nconst close = (evt: MouseEvent) => {\n visible.value = false\n emit('close', evt)\n}\n</script>\n"],"names":["TypeComponents","useSlots","useNamespace","ref","computed","TypeComponentsMap"],"mappings":";;;;;;;;;;;;;uCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAJA,IAAA,MAAM,EAAE,KAAU,EAAA,GAAAA,mBAAA,CAAA;AAQlB,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAA,GAAKC,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAM,MAAA,OAAA,GAAUC,QAAI,IAAI,CAAA,CAAA;AAExB,IAAA,MAAM,aAAgB,GAAAC,YAAA,CAAS,MAAMC,sBAAA,CAAkB,MAAM,IAAK,CAAA,CAAA,CAAA;AAElE,IAAM,MAAA,SAAA,GAAYD,aAAS,MAAM;AAAA,MAC/B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAE,CAAC,EAAG,CAAA,EAAA,CAAG,KAAK,CAAA,GAAI,CAAC,CAAC,KAAM,CAAA,WAAA,IAAe,CAAC,CAAC,MAAM,OAAQ,EAAA;AAAA,KAC1D,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAcA,aAAS,MAAM;AACjC,MAAO,OAAA,EAAE,CAAC,EAAG,CAAA,EAAA,CAAG,MAAM,CAAI,GAAA,KAAA,CAAM,WAAe,IAAA,KAAA,CAAM,OAAQ,EAAA,CAAA;AAAA,KAC9D,CAAA,CAAA;AAED,IAAM,MAAA,KAAA,GAAQ,CAAC,GAAoB,KAAA;AACjC,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,KACnB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":["buildProps","keysOf","TypeComponentsMap"],"mappings":";;;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,cAAM,CAACC,sBAAiB,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;;"}