@element-plus/nightly 0.0.20241106 → 0.0.20241108

Sign up to get free protection for your applications and to get access to all the features.
Files changed (313) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +34 -17
  3. package/dist/index.full.min.js +8 -8
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +9 -9
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +34 -17
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hr.js +1 -1
  93. package/dist/locale/hr.min.js +1 -1
  94. package/dist/locale/hr.min.mjs +1 -1
  95. package/dist/locale/hr.mjs +1 -1
  96. package/dist/locale/hu.js +1 -1
  97. package/dist/locale/hu.min.js +1 -1
  98. package/dist/locale/hu.min.mjs +1 -1
  99. package/dist/locale/hu.mjs +1 -1
  100. package/dist/locale/hy-am.js +1 -1
  101. package/dist/locale/hy-am.min.js +1 -1
  102. package/dist/locale/hy-am.min.mjs +1 -1
  103. package/dist/locale/hy-am.mjs +1 -1
  104. package/dist/locale/id.js +1 -1
  105. package/dist/locale/id.min.js +1 -1
  106. package/dist/locale/id.min.mjs +1 -1
  107. package/dist/locale/id.mjs +1 -1
  108. package/dist/locale/it.js +1 -1
  109. package/dist/locale/it.min.js +1 -1
  110. package/dist/locale/it.min.mjs +1 -1
  111. package/dist/locale/it.mjs +1 -1
  112. package/dist/locale/ja.js +1 -1
  113. package/dist/locale/ja.min.js +1 -1
  114. package/dist/locale/ja.min.mjs +1 -1
  115. package/dist/locale/ja.mjs +1 -1
  116. package/dist/locale/kk.js +1 -1
  117. package/dist/locale/kk.min.js +1 -1
  118. package/dist/locale/kk.min.mjs +1 -1
  119. package/dist/locale/kk.mjs +1 -1
  120. package/dist/locale/km.js +1 -1
  121. package/dist/locale/km.min.js +1 -1
  122. package/dist/locale/km.min.mjs +1 -1
  123. package/dist/locale/km.mjs +1 -1
  124. package/dist/locale/ko.js +1 -1
  125. package/dist/locale/ko.min.js +1 -1
  126. package/dist/locale/ko.min.mjs +1 -1
  127. package/dist/locale/ko.mjs +1 -1
  128. package/dist/locale/ku.js +1 -1
  129. package/dist/locale/ku.min.js +1 -1
  130. package/dist/locale/ku.min.mjs +1 -1
  131. package/dist/locale/ku.mjs +1 -1
  132. package/dist/locale/ky.js +1 -1
  133. package/dist/locale/ky.min.js +1 -1
  134. package/dist/locale/ky.min.mjs +1 -1
  135. package/dist/locale/ky.mjs +1 -1
  136. package/dist/locale/lt.js +1 -1
  137. package/dist/locale/lt.min.js +1 -1
  138. package/dist/locale/lt.min.mjs +1 -1
  139. package/dist/locale/lt.mjs +1 -1
  140. package/dist/locale/lv.js +1 -1
  141. package/dist/locale/lv.min.js +1 -1
  142. package/dist/locale/lv.min.mjs +1 -1
  143. package/dist/locale/lv.mjs +1 -1
  144. package/dist/locale/mg.js +1 -1
  145. package/dist/locale/mg.min.js +1 -1
  146. package/dist/locale/mg.min.mjs +1 -1
  147. package/dist/locale/mg.mjs +1 -1
  148. package/dist/locale/mn.js +1 -1
  149. package/dist/locale/mn.min.js +1 -1
  150. package/dist/locale/mn.min.mjs +1 -1
  151. package/dist/locale/mn.mjs +1 -1
  152. package/dist/locale/my.js +1 -1
  153. package/dist/locale/my.min.js +1 -1
  154. package/dist/locale/my.min.mjs +1 -1
  155. package/dist/locale/my.mjs +1 -1
  156. package/dist/locale/nb-no.js +1 -1
  157. package/dist/locale/nb-no.min.js +1 -1
  158. package/dist/locale/nb-no.min.mjs +1 -1
  159. package/dist/locale/nb-no.mjs +1 -1
  160. package/dist/locale/nl.js +1 -1
  161. package/dist/locale/nl.min.js +1 -1
  162. package/dist/locale/nl.min.mjs +1 -1
  163. package/dist/locale/nl.mjs +1 -1
  164. package/dist/locale/pa.js +1 -1
  165. package/dist/locale/pa.min.js +1 -1
  166. package/dist/locale/pa.min.mjs +1 -1
  167. package/dist/locale/pa.mjs +1 -1
  168. package/dist/locale/pl.js +1 -1
  169. package/dist/locale/pl.min.js +1 -1
  170. package/dist/locale/pl.min.mjs +1 -1
  171. package/dist/locale/pl.mjs +1 -1
  172. package/dist/locale/pt-br.js +1 -1
  173. package/dist/locale/pt-br.min.js +1 -1
  174. package/dist/locale/pt-br.min.mjs +1 -1
  175. package/dist/locale/pt-br.mjs +1 -1
  176. package/dist/locale/pt.js +1 -1
  177. package/dist/locale/pt.min.js +1 -1
  178. package/dist/locale/pt.min.mjs +1 -1
  179. package/dist/locale/pt.mjs +1 -1
  180. package/dist/locale/ro.js +1 -1
  181. package/dist/locale/ro.min.js +1 -1
  182. package/dist/locale/ro.min.mjs +1 -1
  183. package/dist/locale/ro.mjs +1 -1
  184. package/dist/locale/ru.js +1 -1
  185. package/dist/locale/ru.min.js +1 -1
  186. package/dist/locale/ru.min.mjs +1 -1
  187. package/dist/locale/ru.mjs +1 -1
  188. package/dist/locale/sk.js +1 -1
  189. package/dist/locale/sk.min.js +1 -1
  190. package/dist/locale/sk.min.mjs +1 -1
  191. package/dist/locale/sk.mjs +1 -1
  192. package/dist/locale/sl.js +1 -1
  193. package/dist/locale/sl.min.js +1 -1
  194. package/dist/locale/sl.min.mjs +1 -1
  195. package/dist/locale/sl.mjs +1 -1
  196. package/dist/locale/sr.js +1 -1
  197. package/dist/locale/sr.min.js +1 -1
  198. package/dist/locale/sr.min.mjs +1 -1
  199. package/dist/locale/sr.mjs +1 -1
  200. package/dist/locale/sv.js +1 -1
  201. package/dist/locale/sv.min.js +1 -1
  202. package/dist/locale/sv.min.mjs +1 -1
  203. package/dist/locale/sv.mjs +1 -1
  204. package/dist/locale/sw.js +1 -1
  205. package/dist/locale/sw.min.js +1 -1
  206. package/dist/locale/sw.min.mjs +1 -1
  207. package/dist/locale/sw.mjs +1 -1
  208. package/dist/locale/ta.js +1 -1
  209. package/dist/locale/ta.min.js +1 -1
  210. package/dist/locale/ta.min.mjs +1 -1
  211. package/dist/locale/ta.mjs +1 -1
  212. package/dist/locale/th.js +1 -1
  213. package/dist/locale/th.min.js +1 -1
  214. package/dist/locale/th.min.mjs +1 -1
  215. package/dist/locale/th.mjs +1 -1
  216. package/dist/locale/tk.js +1 -1
  217. package/dist/locale/tk.min.js +1 -1
  218. package/dist/locale/tk.min.mjs +1 -1
  219. package/dist/locale/tk.mjs +1 -1
  220. package/dist/locale/tr.js +1 -1
  221. package/dist/locale/tr.min.js +1 -1
  222. package/dist/locale/tr.min.mjs +1 -1
  223. package/dist/locale/tr.mjs +1 -1
  224. package/dist/locale/ug-cn.js +1 -1
  225. package/dist/locale/ug-cn.min.js +1 -1
  226. package/dist/locale/ug-cn.min.mjs +1 -1
  227. package/dist/locale/ug-cn.mjs +1 -1
  228. package/dist/locale/uk.js +1 -1
  229. package/dist/locale/uk.min.js +1 -1
  230. package/dist/locale/uk.min.mjs +1 -1
  231. package/dist/locale/uk.mjs +1 -1
  232. package/dist/locale/uz-uz.js +1 -1
  233. package/dist/locale/uz-uz.min.js +1 -1
  234. package/dist/locale/uz-uz.min.mjs +1 -1
  235. package/dist/locale/uz-uz.mjs +1 -1
  236. package/dist/locale/vi.js +1 -1
  237. package/dist/locale/vi.min.js +1 -1
  238. package/dist/locale/vi.min.mjs +1 -1
  239. package/dist/locale/vi.mjs +1 -1
  240. package/dist/locale/zh-cn.js +1 -1
  241. package/dist/locale/zh-cn.min.js +1 -1
  242. package/dist/locale/zh-cn.min.mjs +1 -1
  243. package/dist/locale/zh-cn.mjs +1 -1
  244. package/dist/locale/zh-tw.js +1 -1
  245. package/dist/locale/zh-tw.min.js +1 -1
  246. package/dist/locale/zh-tw.min.mjs +1 -1
  247. package/dist/locale/zh-tw.mjs +1 -1
  248. package/es/components/drawer/index.mjs +2 -2
  249. package/es/components/drawer/src/drawer.mjs +27 -181
  250. package/es/components/drawer/src/drawer.mjs.map +1 -1
  251. package/es/components/drawer/src/drawer2.mjs +181 -27
  252. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  253. package/es/components/index.mjs +1 -1
  254. package/es/components/mention/src/mention-dropdown2.mjs +1 -1
  255. package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
  256. package/es/components/segmented/src/segmented2.mjs +1 -0
  257. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  258. package/es/components/select/src/option.mjs +2 -2
  259. package/es/components/select/src/option.mjs.map +1 -1
  260. package/es/components/select-v2/src/option-item.mjs +2 -2
  261. package/es/components/select-v2/src/option-item.mjs.map +1 -1
  262. package/es/components/skeleton/src/skeleton.d.ts +10 -1
  263. package/es/components/skeleton/src/skeleton.mjs +2 -2
  264. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  265. package/es/components/skeleton/src/skeleton.vue.d.ts +18 -2
  266. package/es/components/skeleton/src/skeleton2.mjs +1 -1
  267. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  268. package/es/components/tour/src/mask.mjs +76 -19
  269. package/es/components/tour/src/mask.mjs.map +1 -1
  270. package/es/components/tour/src/mask2.mjs +19 -76
  271. package/es/components/tour/src/mask2.mjs.map +1 -1
  272. package/es/components/tour/src/tour2.mjs +1 -1
  273. package/es/hooks/use-throttle-render/index.d.ts +6 -1
  274. package/es/hooks/use-throttle-render/index.mjs +27 -8
  275. package/es/hooks/use-throttle-render/index.mjs.map +1 -1
  276. package/es/index.mjs +1 -1
  277. package/es/version.d.ts +1 -1
  278. package/es/version.mjs +1 -1
  279. package/es/version.mjs.map +1 -1
  280. package/lib/components/drawer/index.js +2 -2
  281. package/lib/components/drawer/src/drawer.js +28 -181
  282. package/lib/components/drawer/src/drawer.js.map +1 -1
  283. package/lib/components/drawer/src/drawer2.js +181 -28
  284. package/lib/components/drawer/src/drawer2.js.map +1 -1
  285. package/lib/components/index.js +1 -1
  286. package/lib/components/mention/src/mention-dropdown2.js +1 -1
  287. package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
  288. package/lib/components/segmented/src/segmented2.js +1 -0
  289. package/lib/components/segmented/src/segmented2.js.map +1 -1
  290. package/lib/components/select/src/option.js +2 -2
  291. package/lib/components/select/src/option.js.map +1 -1
  292. package/lib/components/select-v2/src/option-item.js +2 -2
  293. package/lib/components/select-v2/src/option-item.js.map +1 -1
  294. package/lib/components/skeleton/src/skeleton.d.ts +10 -1
  295. package/lib/components/skeleton/src/skeleton.js +1 -1
  296. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  297. package/lib/components/skeleton/src/skeleton.vue.d.ts +18 -2
  298. package/lib/components/skeleton/src/skeleton2.js +1 -1
  299. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  300. package/lib/components/tour/src/mask.js +76 -19
  301. package/lib/components/tour/src/mask.js.map +1 -1
  302. package/lib/components/tour/src/mask2.js +19 -76
  303. package/lib/components/tour/src/mask2.js.map +1 -1
  304. package/lib/components/tour/src/tour2.js +1 -1
  305. package/lib/hooks/use-throttle-render/index.d.ts +6 -1
  306. package/lib/hooks/use-throttle-render/index.js +27 -8
  307. package/lib/hooks/use-throttle-render/index.js.map +1 -1
  308. package/lib/index.js +1 -1
  309. package/lib/version.d.ts +1 -1
  310. package/lib/version.js +1 -1
  311. package/lib/version.js.map +1 -1
  312. package/package.json +2 -2
  313. package/web-types.json +1 -1
@@ -1,24 +1,81 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
2
+ import '../../../hooks/index.mjs';
3
+ import { maskProps } from './mask2.mjs';
4
+ import { tourKey } from './helper.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
3
7
 
4
- const maskProps = buildProps({
5
- zIndex: {
6
- type: Number,
7
- default: 1001
8
- },
9
- visible: Boolean,
10
- fill: {
11
- type: String,
12
- default: "rgba(0,0,0,0.5)"
13
- },
14
- pos: {
15
- type: definePropType(Object)
16
- },
17
- targetAreaClickable: {
18
- type: Boolean,
19
- default: true
8
+ const __default__ = defineComponent({
9
+ name: "ElTourMask",
10
+ inheritAttrs: false
11
+ });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: maskProps,
15
+ setup(__props) {
16
+ const props = __props;
17
+ const { ns } = inject(tourKey);
18
+ const radius = computed(() => {
19
+ var _a, _b;
20
+ return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
21
+ });
22
+ const roundInfo = computed(() => {
23
+ const v = radius.value;
24
+ const baseInfo = `a${v},${v} 0 0 1`;
25
+ return {
26
+ topRight: `${baseInfo} ${v},${v}`,
27
+ bottomRight: `${baseInfo} ${-v},${v}`,
28
+ bottomLeft: `${baseInfo} ${-v},${-v}`,
29
+ topLeft: `${baseInfo} ${v},${-v}`
30
+ };
31
+ });
32
+ const path = computed(() => {
33
+ const width = window.innerWidth;
34
+ const height = window.innerHeight;
35
+ const info = roundInfo.value;
36
+ const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
37
+ const _radius = radius.value;
38
+ return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
39
+ });
40
+ const pathStyle = computed(() => {
41
+ return {
42
+ fill: props.fill,
43
+ pointerEvents: "auto",
44
+ cursor: "auto"
45
+ };
46
+ });
47
+ useLockscreen(toRef(props, "visible"), {
48
+ ns
49
+ });
50
+ return (_ctx, _cache) => {
51
+ return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
52
+ key: 0,
53
+ class: unref(ns).e("mask"),
54
+ style: {
55
+ position: "fixed",
56
+ left: 0,
57
+ right: 0,
58
+ top: 0,
59
+ bottom: 0,
60
+ zIndex: _ctx.zIndex,
61
+ pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
62
+ }
63
+ }, _ctx.$attrs), [
64
+ (openBlock(), createElementBlock("svg", { style: {
65
+ width: "100%",
66
+ height: "100%"
67
+ } }, [
68
+ createElementVNode("path", {
69
+ class: normalizeClass(unref(ns).e("hollow")),
70
+ style: normalizeStyle(unref(pathStyle)),
71
+ d: unref(path)
72
+ }, null, 14, ["d"])
73
+ ]))
74
+ ], 16)) : createCommentVNode("v-if", true);
75
+ };
20
76
  }
21
77
  });
78
+ var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
22
79
 
23
- export { maskProps };
80
+ export { ElTourMask as default };
24
81
  //# sourceMappingURL=mask.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,CAAA,GAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAAA,CAAA,CAAA;AACA,IAAO,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,gBACQ,CAAA,KAAA,CAAQ;AAAU,MAAA,iBACf,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAQ,UAAU;AAAC,MACnC,OAAA;AAAmC,QACnC,UAAY,CAAA,EAAA,YAAa,CAAA,CAAA,CAAA,EAAK,CAAC,CAAA,CAAA;AAAA,QACjC,WAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AAAA,QACD,UAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAED,QAAM,OAAA,EAAO,WAAe,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAuB,CAAA,MAAA;AACvB,MAAM,MAAA,KAAA,GAAQ,MAAI,CAAA,UAAmB,CAAA;AACrC,MAAA,MAAM,eAAiB,CAAA,WAAA,CAAA;AACvB,MAAO,MAAA,IAAA,GAAM,SACN,CAAA;AAOH,MACL,MAAA,KAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAM,MAAA,OAAA,GAAY,YAA8B,CAAA;AAC9C,MAAO,OAAA,KAAA,CAAA,GAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,GAAA,OAAA,CAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,UAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AACO,IAAA,MACG,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,OACP;AAAA,QACV,IAAA,EAAA,KAAA,CAAA,IAAA;AAAA,QACD,aAAA,EAAA,MAAA;AAED,QAAc,MAAA,EAAA,MAAA;AAAyB,OACrC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,81 +1,24 @@
1
- import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import { maskProps } from './mask.mjs';
4
- import { tourKey } from './helper.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
- import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
7
3
 
8
- const __default__ = defineComponent({
9
- name: "ElTourMask",
10
- inheritAttrs: false
11
- });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: maskProps,
15
- setup(__props) {
16
- const props = __props;
17
- const { ns } = inject(tourKey);
18
- const radius = computed(() => {
19
- var _a, _b;
20
- return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
21
- });
22
- const roundInfo = computed(() => {
23
- const v = radius.value;
24
- const baseInfo = `a${v},${v} 0 0 1`;
25
- return {
26
- topRight: `${baseInfo} ${v},${v}`,
27
- bottomRight: `${baseInfo} ${-v},${v}`,
28
- bottomLeft: `${baseInfo} ${-v},${-v}`,
29
- topLeft: `${baseInfo} ${v},${-v}`
30
- };
31
- });
32
- const path = computed(() => {
33
- const width = window.innerWidth;
34
- const height = window.innerHeight;
35
- const info = roundInfo.value;
36
- const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
37
- const _radius = radius.value;
38
- return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
39
- });
40
- const pathStyle = computed(() => {
41
- return {
42
- fill: props.fill,
43
- pointerEvents: "auto",
44
- cursor: "auto"
45
- };
46
- });
47
- useLockscreen(toRef(props, "visible"), {
48
- ns
49
- });
50
- return (_ctx, _cache) => {
51
- return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
52
- key: 0,
53
- class: unref(ns).e("mask"),
54
- style: {
55
- position: "fixed",
56
- left: 0,
57
- right: 0,
58
- top: 0,
59
- bottom: 0,
60
- zIndex: _ctx.zIndex,
61
- pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
62
- }
63
- }, _ctx.$attrs), [
64
- (openBlock(), createElementBlock("svg", { style: {
65
- width: "100%",
66
- height: "100%"
67
- } }, [
68
- createElementVNode("path", {
69
- class: normalizeClass(unref(ns).e("hollow")),
70
- style: normalizeStyle(unref(pathStyle)),
71
- d: unref(path)
72
- }, null, 14, ["d"])
73
- ]))
74
- ], 16)) : createCommentVNode("v-if", true);
75
- };
4
+ const maskProps = buildProps({
5
+ zIndex: {
6
+ type: Number,
7
+ default: 1001
8
+ },
9
+ visible: Boolean,
10
+ fill: {
11
+ type: String,
12
+ default: "rgba(0,0,0,0.5)"
13
+ },
14
+ pos: {
15
+ type: definePropType(Object)
16
+ },
17
+ targetAreaClickable: {
18
+ type: Boolean,
19
+ default: true
76
20
  }
77
21
  });
78
- var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
79
22
 
80
- export { ElTourMask as default };
23
+ export { maskProps };
81
24
  //# sourceMappingURL=mask2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,CAAA,GAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA;AACjB,KAAA,CAAA,CAAA;AACA,IAAO,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,gBACQ,CAAA,KAAA,CAAQ;AAAU,MAAA,iBACf,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAQ,UAAU;AAAC,MACnC,OAAA;AAAmC,QACnC,UAAY,CAAA,EAAA,YAAa,CAAA,CAAA,CAAA,EAAK,CAAC,CAAA,CAAA;AAAA,QACjC,WAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;AAAA,QACD,UAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAED,QAAM,OAAA,EAAO,WAAe,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,OAAA,CAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,eAAuB,CAAA,MAAA;AACvB,MAAM,MAAA,KAAA,GAAQ,MAAI,CAAA,UAAmB,CAAA;AACrC,MAAA,MAAM,eAAiB,CAAA,WAAA,CAAA;AACvB,MAAO,MAAA,IAAA,GAAM,SACN,CAAA;AAOH,MACL,MAAA,KAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAM,MAAA,OAAA,GAAY,YAA8B,CAAA;AAC9C,MAAO,OAAA,KAAA,CAAA,GAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,IAAA,GAAA,OAAA,CAAA,CAAA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,KAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,UAAA,CAAA,EAAA,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,MAAA,GAAA,OAAA,GAAA,CAAA,CAAA,CAAA,EAAA,IAAA,CAAA,OAAA,CAAA,EAAA,CAAA,GAAA,KAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AACO,IAAA,MACG,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MAAA,OACP;AAAA,QACV,IAAA,EAAA,KAAA,CAAA,IAAA;AAAA,QACD,aAAA,EAAA,MAAA;AAED,QAAc,MAAA,EAAA,MAAA;AAAyB,OACrC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mask2.mjs","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
@@ -3,7 +3,7 @@ import { useVModel } from '@vueuse/core';
3
3
  import '../../../hooks/index.mjs';
4
4
  import '../../../utils/index.mjs';
5
5
  import { ElTeleport } from '../../teleport/index.mjs';
6
- import ElTourMask from './mask2.mjs';
6
+ import ElTourMask from './mask.mjs';
7
7
  import ElTourContent from './content2.mjs';
8
8
  import ElTourSteps from './steps.mjs';
9
9
  import { tourProps, tourEmits } from './tour.mjs';
@@ -1,2 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
- export declare const useThrottleRender: (loading: Ref<boolean>, throttle?: number) => Ref<boolean>;
2
+ export type ThrottleType = {
3
+ leading?: number;
4
+ trailing?: number;
5
+ initVal?: boolean;
6
+ } | number;
7
+ export declare const useThrottleRender: (loading: Ref<boolean>, throttle?: ThrottleType) => Ref<boolean>;
@@ -1,25 +1,44 @@
1
1
  import { ref, onMounted, watch } from 'vue';
2
+ import '../../utils/index.mjs';
3
+ import { isObject } from '@vue/shared';
4
+ import { isUndefined, isNumber } from '../../utils/types.mjs';
2
5
 
3
6
  const useThrottleRender = (loading, throttle = 0) => {
4
7
  if (throttle === 0)
5
8
  return loading;
6
- const throttled = ref(false);
9
+ const initVal = isObject(throttle) && Boolean(throttle.initVal);
10
+ const throttled = ref(initVal);
7
11
  let timeoutHandle = null;
8
- const dispatchThrottling = () => {
12
+ const dispatchThrottling = (timer) => {
13
+ if (isUndefined(timer)) {
14
+ throttled.value = loading.value;
15
+ return;
16
+ }
9
17
  if (timeoutHandle) {
10
18
  clearTimeout(timeoutHandle);
11
19
  }
12
20
  timeoutHandle = setTimeout(() => {
13
21
  throttled.value = loading.value;
14
- }, throttle);
22
+ }, timer);
15
23
  };
16
- onMounted(dispatchThrottling);
17
- watch(() => loading.value, (val) => {
18
- if (val) {
19
- dispatchThrottling();
24
+ const dispatcher = (type) => {
25
+ if (type === "leading") {
26
+ if (isNumber(throttle)) {
27
+ dispatchThrottling(throttle);
28
+ } else {
29
+ dispatchThrottling(throttle.leading);
30
+ }
20
31
  } else {
21
- throttled.value = val;
32
+ if (isObject(throttle)) {
33
+ dispatchThrottling(throttle.trailing);
34
+ } else {
35
+ throttled.value = false;
36
+ }
22
37
  }
38
+ };
39
+ onMounted(() => dispatcher("leading"));
40
+ watch(() => loading.value, (val) => {
41
+ dispatcher(val ? "leading" : "trailing");
23
42
  });
24
43
  return throttled;
25
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-throttle-render/index.ts"],"sourcesContent":["import { onMounted, ref, watch } from 'vue'\n\nimport type { Ref } from 'vue'\n\nexport const useThrottleRender = (loading: Ref<boolean>, throttle = 0) => {\n if (throttle === 0) return loading\n const throttled = ref(false)\n let timeoutHandle: ReturnType<typeof setTimeout> | null = null\n\n const dispatchThrottling = () => {\n if (timeoutHandle) {\n clearTimeout(timeoutHandle)\n }\n timeoutHandle = setTimeout(() => {\n throttled.value = loading.value\n }, throttle)\n }\n onMounted(dispatchThrottling)\n\n watch(\n () => loading.value,\n (val) => {\n if (val) {\n dispatchThrottling()\n } else {\n throttled.value = val\n }\n }\n )\n return throttled\n}\n"],"names":[],"mappings":";;AACY,MAAC,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,CAAC,KAAK;AAC5D,EAAE,IAAI,QAAQ,KAAK,CAAC;AACpB,IAAI,OAAO,OAAO,CAAC;AACnB,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC;AAC3B,EAAE,MAAM,kBAAkB,GAAG,MAAM;AACnC,IAAI,IAAI,aAAa,EAAE;AACvB,MAAM,YAAY,CAAC,aAAa,CAAC,CAAC;AAClC,KAAK;AACL,IAAI,aAAa,GAAG,UAAU,CAAC,MAAM;AACrC,MAAM,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACjB,GAAG,CAAC;AACJ,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAChC,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,MAAM,kBAAkB,EAAE,CAAC;AAC3B,KAAK,MAAM;AACX,MAAM,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC;AAC5B,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,SAAS,CAAC;AACnB;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-throttle-render/index.ts"],"sourcesContent":["import { onMounted, ref, watch } from 'vue'\nimport { isNumber, isObject, isUndefined } from '@element-plus/utils'\n\nimport type { Ref } from 'vue'\n\nexport type ThrottleType =\n | { leading?: number; trailing?: number; initVal?: boolean }\n | number\n\nexport const useThrottleRender = (\n loading: Ref<boolean>,\n throttle: ThrottleType = 0\n) => {\n if (throttle === 0) return loading\n const initVal = isObject(throttle) && Boolean(throttle.initVal)\n const throttled = ref(initVal)\n let timeoutHandle: ReturnType<typeof setTimeout> | null = null\n\n const dispatchThrottling = (timer: number | undefined) => {\n if (isUndefined(timer)) {\n throttled.value = loading.value\n return\n }\n if (timeoutHandle) {\n clearTimeout(timeoutHandle)\n }\n timeoutHandle = setTimeout(() => {\n throttled.value = loading.value\n }, timer)\n }\n\n const dispatcher = (type: 'leading' | 'trailing') => {\n if (type === 'leading') {\n if (isNumber(throttle)) {\n dispatchThrottling(throttle)\n } else {\n dispatchThrottling(throttle.leading)\n }\n } else {\n if (isObject(throttle)) {\n dispatchThrottling(throttle.trailing)\n } else {\n throttled.value = false\n }\n }\n }\n\n onMounted(() => dispatcher('leading'))\n\n watch(\n () => loading.value,\n (val) => {\n dispatcher(val ? 'leading' : 'trailing')\n }\n )\n\n return throttled\n}\n"],"names":[],"mappings":";;;;;AAEY,MAAC,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,CAAC,KAAK;AAC5D,EAAE,IAAI,QAAQ,KAAK,CAAC;AACpB,IAAI,OAAO,OAAO,CAAC;AACnB,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAClE,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;AACjC,EAAE,IAAI,aAAa,GAAG,IAAI,CAAC;AAC3B,EAAE,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACxC,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AAC5B,MAAM,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,MAAM,OAAO;AACb,KAAK;AACL,IAAI,IAAI,aAAa,EAAE;AACvB,MAAM,YAAY,CAAC,aAAa,CAAC,CAAC;AAClC,KAAK;AACL,IAAI,aAAa,GAAG,UAAU,CAAC,MAAM;AACrC,MAAM,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;AACtC,KAAK,EAAE,KAAK,CAAC,CAAC;AACd,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK;AAC/B,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;AAC5B,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC9B,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACrC,OAAO,MAAM;AACb,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7C,OAAO;AACP,KAAK,MAAM;AACX,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC9B,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC9C,OAAO,MAAM;AACb,QAAQ,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;AAChC,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK;AACtC,IAAI,UAAU,CAAC,GAAG,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,SAAS,CAAC;AACnB;;;;"}
package/es/index.mjs CHANGED
@@ -73,7 +73,7 @@ export { dialogInjectionKey } from './components/dialog/src/constants.mjs';
73
73
  export { ElDialog } from './components/dialog/index.mjs';
74
74
  export { dividerProps } from './components/divider/src/divider.mjs';
75
75
  export { ElDivider } from './components/divider/index.mjs';
76
- export { drawerEmits, drawerProps } from './components/drawer/src/drawer2.mjs';
76
+ export { drawerEmits, drawerProps } from './components/drawer/src/drawer.mjs';
77
77
  export { ElDrawer } from './components/drawer/index.mjs';
78
78
  export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './components/dropdown/src/dropdown.mjs';
79
79
  export { DROPDOWN_INJECTION_KEY } from './components/dropdown/src/tokens.mjs';
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20241106";
1
+ export declare const version = "0.0.20241108";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20241106";
1
+ const version = "0.0.20241108";
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.20241106'\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.20241108'\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 drawer$1 = require('./src/drawer.js');
7
- var drawer = require('./src/drawer2.js');
6
+ var drawer$1 = require('./src/drawer2.js');
7
+ var drawer = require('./src/drawer.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElDrawer = install.withInstall(drawer$1["default"]);
@@ -2,190 +2,37 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var iconsVue = require('@element-plus/icons-vue');
7
- var index$4 = require('../../overlay/index.js');
8
- require('../../focus-trap/index.js');
9
- var index$3 = require('../../teleport/index.js');
10
- require('../../dialog/index.js');
11
5
  require('../../../utils/index.js');
12
- var index$5 = require('../../icon/index.js');
13
- require('../../../hooks/index.js');
14
- var drawer = require('./drawer2.js');
15
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
16
- var index = require('../../../hooks/use-deprecated/index.js');
17
- var index$1 = require('../../../hooks/use-namespace/index.js');
18
- var index$2 = require('../../../hooks/use-locale/index.js');
19
- var useDialog = require('../../dialog/src/use-dialog.js');
20
- var style = require('../../../utils/dom/style.js');
21
- var focusTrap = require('../../focus-trap/src/focus-trap.js');
6
+ require('../../dialog/index.js');
7
+ var runtime = require('../../../utils/vue/props/runtime.js');
8
+ var dialog = require('../../dialog/src/dialog.js');
22
9
 
23
- const __default__ = vue.defineComponent({
24
- name: "ElDrawer",
25
- inheritAttrs: false
26
- });
27
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
28
- ...__default__,
29
- props: drawer.drawerProps,
30
- emits: drawer.drawerEmits,
31
- setup(__props, { expose }) {
32
- const props = __props;
33
- const slots = vue.useSlots();
34
- index.useDeprecated({
35
- scope: "el-drawer",
36
- from: "the title slot",
37
- replacement: "the header slot",
38
- version: "3.0.0",
39
- ref: "https://element-plus.org/en-US/component/drawer.html#slots"
40
- }, vue.computed(() => !!slots.title));
41
- const drawerRef = vue.ref();
42
- const focusStartRef = vue.ref();
43
- const ns = index$1.useNamespace("drawer");
44
- const { t } = index$2.useLocale();
45
- const {
46
- afterEnter,
47
- afterLeave,
48
- beforeLeave,
49
- visible,
50
- rendered,
51
- titleId,
52
- bodyId,
53
- zIndex,
54
- onModalClick,
55
- onOpenAutoFocus,
56
- onCloseAutoFocus,
57
- onFocusoutPrevented,
58
- onCloseRequested,
59
- handleClose
60
- } = useDialog.useDialog(props, drawerRef);
61
- const isHorizontal = vue.computed(() => props.direction === "rtl" || props.direction === "ltr");
62
- const drawerSize = vue.computed(() => style.addUnit(props.size));
63
- expose({
64
- handleClose,
65
- afterEnter,
66
- afterLeave
67
- });
68
- return (_ctx, _cache) => {
69
- return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElTeleport), {
70
- to: _ctx.appendTo,
71
- disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
72
- }, {
73
- default: vue.withCtx(() => [
74
- vue.createVNode(vue.Transition, {
75
- name: vue.unref(ns).b("fade"),
76
- onAfterEnter: vue.unref(afterEnter),
77
- onAfterLeave: vue.unref(afterLeave),
78
- onBeforeLeave: vue.unref(beforeLeave),
79
- persisted: ""
80
- }, {
81
- default: vue.withCtx(() => [
82
- vue.withDirectives(vue.createVNode(vue.unref(index$4.ElOverlay), {
83
- mask: _ctx.modal,
84
- "overlay-class": _ctx.modalClass,
85
- "z-index": vue.unref(zIndex),
86
- onClick: vue.unref(onModalClick)
87
- }, {
88
- default: vue.withCtx(() => [
89
- vue.createVNode(vue.unref(focusTrap["default"]), {
90
- loop: "",
91
- trapped: vue.unref(visible),
92
- "focus-trap-el": drawerRef.value,
93
- "focus-start-el": focusStartRef.value,
94
- onFocusAfterTrapped: vue.unref(onOpenAutoFocus),
95
- onFocusAfterReleased: vue.unref(onCloseAutoFocus),
96
- onFocusoutPrevented: vue.unref(onFocusoutPrevented),
97
- onReleaseRequested: vue.unref(onCloseRequested)
98
- }, {
99
- default: vue.withCtx(() => [
100
- vue.createElementVNode("div", vue.mergeProps({
101
- ref_key: "drawerRef",
102
- ref: drawerRef,
103
- "aria-modal": "true",
104
- "aria-label": _ctx.title || void 0,
105
- "aria-labelledby": !_ctx.title ? vue.unref(titleId) : void 0,
106
- "aria-describedby": vue.unref(bodyId)
107
- }, _ctx.$attrs, {
108
- class: [vue.unref(ns).b(), _ctx.direction, vue.unref(visible) && "open"],
109
- style: vue.unref(isHorizontal) ? "width: " + vue.unref(drawerSize) : "height: " + vue.unref(drawerSize),
110
- role: "dialog",
111
- onClick: vue.withModifiers(() => {
112
- }, ["stop"])
113
- }), [
114
- vue.createElementVNode("span", {
115
- ref_key: "focusStartRef",
116
- ref: focusStartRef,
117
- class: vue.normalizeClass(vue.unref(ns).e("sr-focus")),
118
- tabindex: "-1"
119
- }, null, 2),
120
- _ctx.withHeader ? (vue.openBlock(), vue.createElementBlock("header", {
121
- key: 0,
122
- class: vue.normalizeClass(vue.unref(ns).e("header"))
123
- }, [
124
- !_ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "header", {
125
- key: 0,
126
- close: vue.unref(handleClose),
127
- titleId: vue.unref(titleId),
128
- titleClass: vue.unref(ns).e("title")
129
- }, () => [
130
- !_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
131
- key: 0,
132
- id: vue.unref(titleId),
133
- role: "heading",
134
- "aria-level": _ctx.headerAriaLevel,
135
- class: vue.normalizeClass(vue.unref(ns).e("title"))
136
- }, vue.toDisplayString(_ctx.title), 11, ["id", "aria-level"])) : vue.createCommentVNode("v-if", true)
137
- ]) : vue.renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
138
- vue.createCommentVNode(" DEPRECATED SLOT ")
139
- ]),
140
- _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
141
- key: 2,
142
- "aria-label": vue.unref(t)("el.drawer.close"),
143
- class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
144
- type: "button",
145
- onClick: vue.unref(handleClose)
146
- }, [
147
- vue.createVNode(vue.unref(index$5.ElIcon), {
148
- class: vue.normalizeClass(vue.unref(ns).e("close"))
149
- }, {
150
- default: vue.withCtx(() => [
151
- vue.createVNode(vue.unref(iconsVue.Close))
152
- ]),
153
- _: 1
154
- }, 8, ["class"])
155
- ], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
156
- ], 2)) : vue.createCommentVNode("v-if", true),
157
- vue.unref(rendered) ? (vue.openBlock(), vue.createElementBlock("div", {
158
- key: 1,
159
- id: vue.unref(bodyId),
160
- class: vue.normalizeClass(vue.unref(ns).e("body"))
161
- }, [
162
- vue.renderSlot(_ctx.$slots, "default")
163
- ], 10, ["id"])) : vue.createCommentVNode("v-if", true),
164
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
165
- key: 2,
166
- class: vue.normalizeClass(vue.unref(ns).e("footer"))
167
- }, [
168
- vue.renderSlot(_ctx.$slots, "footer")
169
- ], 2)) : vue.createCommentVNode("v-if", true)
170
- ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
171
- ]),
172
- _: 3
173
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
174
- ]),
175
- _: 3
176
- }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
177
- [vue.vShow, vue.unref(visible)]
178
- ])
179
- ]),
180
- _: 3
181
- }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
182
- ]),
183
- _: 3
184
- }, 8, ["to", "disabled"]);
185
- };
10
+ const drawerProps = runtime.buildProps({
11
+ ...dialog.dialogProps,
12
+ direction: {
13
+ type: String,
14
+ default: "rtl",
15
+ values: ["ltr", "rtl", "ttb", "btt"]
16
+ },
17
+ size: {
18
+ type: [String, Number],
19
+ default: "30%"
20
+ },
21
+ withHeader: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ modalFade: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ headerAriaLevel: {
30
+ type: String,
31
+ default: "2"
186
32
  }
187
33
  });
188
- var Drawer = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "drawer.vue"]]);
34
+ const drawerEmits = dialog.dialogEmits;
189
35
 
190
- exports["default"] = Drawer;
36
+ exports.drawerEmits = drawerEmits;
37
+ exports.drawerProps = drawerProps;
191
38
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sources":["../../../../../../packages/components/drawer/src/drawer.vue"],"sourcesContent":["<template>\n <el-teleport\n :to=\"appendTo\"\n :disabled=\"appendTo !== 'body' ? false : !appendToBody\"\n >\n <transition\n :name=\"ns.b('fade')\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n @click=\"onModalClick\"\n >\n <el-focus-trap\n loop\n :trapped=\"visible\"\n :focus-trap-el=\"drawerRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onOpenAutoFocus\"\n @focus-after-released=\"onCloseAutoFocus\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onCloseRequested\"\n >\n <div\n ref=\"drawerRef\"\n aria-modal=\"true\"\n :aria-label=\"title || undefined\"\n :aria-labelledby=\"!title ? titleId : undefined\"\n :aria-describedby=\"bodyId\"\n v-bind=\"$attrs\"\n :class=\"[ns.b(), direction, visible && 'open']\"\n :style=\"\n isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize\n \"\n role=\"dialog\"\n @click.stop\n >\n <span ref=\"focusStartRef\" :class=\"ns.e('sr-focus')\" tabindex=\"-1\" />\n <header v-if=\"withHeader\" :class=\"ns.e('header')\">\n <slot\n v-if=\"!$slots.title\"\n name=\"header\"\n :close=\"handleClose\"\n :title-id=\"titleId\"\n :title-class=\"ns.e('title')\"\n >\n <span\n v-if=\"!$slots.title\"\n :id=\"titleId\"\n role=\"heading\"\n :aria-level=\"headerAriaLevel\"\n :class=\"ns.e('title')\"\n >\n {{ title }}\n </span>\n </slot>\n <slot v-else name=\"title\">\n <!-- DEPRECATED SLOT -->\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.drawer.close')\"\n :class=\"ns.e('close-btn')\"\n type=\"button\"\n @click=\"handleClose\"\n >\n <el-icon :class=\"ns.e('close')\"><close /></el-icon>\n </button>\n </header>\n <template v-if=\"rendered\">\n <div :id=\"bodyId\" :class=\"ns.e('body')\">\n <slot />\n </div>\n </template>\n <div v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n </el-focus-trap>\n </el-overlay>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { Close } from '@element-plus/icons-vue'\n\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport ElTeleport from '@element-plus/components/teleport'\nimport { useDialog } from '@element-plus/components/dialog'\nimport { addUnit } from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport { useDeprecated, useLocale, useNamespace } from '@element-plus/hooks'\nimport { drawerEmits, drawerProps } from './drawer'\n\ndefineOptions({\n name: 'ElDrawer',\n inheritAttrs: false,\n})\n\nconst props = defineProps(drawerProps)\ndefineEmits(drawerEmits)\nconst slots = useSlots()\n\nuseDeprecated(\n {\n scope: 'el-drawer',\n from: 'the title slot',\n replacement: 'the header slot',\n version: '3.0.0',\n ref: 'https://element-plus.org/en-US/component/drawer.html#slots',\n },\n computed(() => !!slots.title)\n)\n\nconst drawerRef = ref<HTMLElement>()\nconst focusStartRef = ref<HTMLElement>()\nconst ns = useNamespace('drawer')\nconst { t } = useLocale()\nconst {\n afterEnter,\n afterLeave,\n beforeLeave,\n visible,\n rendered,\n titleId,\n bodyId,\n zIndex,\n onModalClick,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onFocusoutPrevented,\n onCloseRequested,\n handleClose,\n} = useDialog(props, drawerRef)\n\nconst isHorizontal = computed(\n () => props.direction === 'rtl' || props.direction === 'ltr'\n)\nconst drawerSize = computed(() => addUnit(props.size))\n\ndefineExpose({\n handleClose,\n afterEnter,\n afterLeave,\n})\n</script>\n"],"names":["useSlots","useDeprecated","computed","ref","useNamespace","useDialog","addUnit","_openBlock","_createBlock","_unref","ElTeleport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;uCAsGc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IAAAC,mBAAA,CAAA;AAAA,MACE,KAAA,EAAA,WAAA;AAAA,MAAA,IACS,EAAA,gBAAA;AAAA,MAAA,WACD,EAAA,iBAAA;AAAA,MAAA,OACO,EAAA,OAAA;AAAA,MAAA,GACJ,EAAA,4DAAA;AAAA,KAAA,EAAAC,YACJ,CAAA,MAAA,CAAA,CAAA,KAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IACP,MAAA,SAAA,GAAAC,OAAA,EAAA,CAAA;AAAA,IAAA,MACS,aAAQ,UAAM,EAAK,CAAA;AAAA,IAC9B,MAAA,EAAA,GAAAC,oBAAA,CAAA,QAAA,CAAA,CAAA;AAEA,IAAA,MAAM,yBAA6B,EAAA,CAAA;AACnC,IAAA,MAAM;AACN,MAAM;AACN,MAAM,UAAI;AACV,MAAM,WAAA;AAAA,MACJ,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,gBAAA;AAAA,MACA,mBAAA;AAAA,MACA,gBAAA;AAAA,MACA,WAAA;AAAA,KACA,GAAAC,mBAAA,CAAA,KAAA,EAAA,SAAA,CAAA,CAAA;AAAA,IACA,MAAA,YAAA,GAAAH,YAAA,CAAA,MAAA,KAAA,CAAA,SAAA,KAAA,KAAA,IAAA,KAAA,CAAA,SAAA,KAAA,KAAA,CAAA,CAAA;AAAA,IACA,MAAA,UAAA,GAAAA,YAAA,CAAA,MAAAI,aAAA,CAAA,KAAA,CAAA,IAAA,CAAA,CAAA,CAAA;AAAA,IACF,MAAc,CAAA;AAEd,MAAA,WAAqB;AAAA,MACnB,UAAM;AAAiD,MACzD,UAAA;AACA,KAAA,CAAA,CAAA;AAEA,IAAa,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACX,OAAAC,aAAA,EAAA,EAAAC,eAAA,CAAAC,SAAA,CAAAC,kBAAA,CAAA,EAAA;AAAA,QACA,EAAA,EAAA,IAAA,CAAA,QAAA;AAAA,QACA,QAAA,EAAA,IAAA,CAAA,QAAA,KAAA,MAAA,GAAA,KAAA,GAAA,CAAA,IAAA,CAAA,YAAA;AAAA,OACD,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"drawer.js","sources":["../../../../../../packages/components/drawer/src/drawer.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>\n\nexport const drawerEmits = dialogEmits\n"],"names":["buildProps","dialogProps","dialogEmits"],"mappings":";;;;;;;;;AAEY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,GAAGC,kBAAW;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACxC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAGC;;;;;"}