@element-plus/nightly 0.0.20241106 → 0.0.20241107

Sign up to get free protection for your applications and to get access to all the features.
Files changed (339) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +33 -16
  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 +33 -16
  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 +3 -3
  254. package/es/components/segmented/src/segmented2.mjs +1 -0
  255. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  256. package/es/components/select/src/option.mjs +2 -2
  257. package/es/components/select/src/option.mjs.map +1 -1
  258. package/es/components/select-v2/src/option-item.mjs +2 -2
  259. package/es/components/select-v2/src/option-item.mjs.map +1 -1
  260. package/es/components/skeleton/src/skeleton.d.ts +10 -1
  261. package/es/components/skeleton/src/skeleton.mjs +2 -2
  262. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  263. package/es/components/skeleton/src/skeleton.vue.d.ts +18 -2
  264. package/es/components/skeleton/src/skeleton2.mjs +1 -1
  265. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  266. package/es/components/tooltip-v2/src/content2.mjs +1 -1
  267. package/es/components/upload/index.mjs +2 -2
  268. package/es/components/upload/src/upload-content.mjs +1 -1
  269. package/es/components/upload/src/upload-content2.mjs +1 -1
  270. package/es/components/upload/src/upload-list.mjs +1 -1
  271. package/es/components/upload/src/upload.mjs +126 -98
  272. package/es/components/upload/src/upload.mjs.map +1 -1
  273. package/es/components/upload/src/upload2.mjs +98 -126
  274. package/es/components/upload/src/upload2.mjs.map +1 -1
  275. package/es/components/upload/src/use-handlers.mjs +1 -1
  276. package/es/components/visual-hidden/index.mjs +3 -3
  277. package/es/components/visual-hidden/src/visual-hidden.mjs +35 -7
  278. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  279. package/es/components/visual-hidden/src/visual-hidden2.mjs +7 -35
  280. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  281. package/es/components/watermark/index.mjs +2 -2
  282. package/es/components/watermark/src/watermark.mjs +210 -27
  283. package/es/components/watermark/src/watermark.mjs.map +1 -1
  284. package/es/components/watermark/src/watermark2.mjs +27 -210
  285. package/es/components/watermark/src/watermark2.mjs.map +1 -1
  286. package/es/hooks/use-throttle-render/index.d.ts +6 -1
  287. package/es/hooks/use-throttle-render/index.mjs +27 -8
  288. package/es/hooks/use-throttle-render/index.mjs.map +1 -1
  289. package/es/index.mjs +3 -3
  290. package/es/version.d.ts +1 -1
  291. package/es/version.mjs +1 -1
  292. package/es/version.mjs.map +1 -1
  293. package/lib/components/drawer/index.js +2 -2
  294. package/lib/components/drawer/src/drawer.js +28 -181
  295. package/lib/components/drawer/src/drawer.js.map +1 -1
  296. package/lib/components/drawer/src/drawer2.js +181 -28
  297. package/lib/components/drawer/src/drawer2.js.map +1 -1
  298. package/lib/components/index.js +3 -3
  299. package/lib/components/segmented/src/segmented2.js +1 -0
  300. package/lib/components/segmented/src/segmented2.js.map +1 -1
  301. package/lib/components/select/src/option.js +2 -2
  302. package/lib/components/select/src/option.js.map +1 -1
  303. package/lib/components/select-v2/src/option-item.js +2 -2
  304. package/lib/components/select-v2/src/option-item.js.map +1 -1
  305. package/lib/components/skeleton/src/skeleton.d.ts +10 -1
  306. package/lib/components/skeleton/src/skeleton.js +1 -1
  307. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  308. package/lib/components/skeleton/src/skeleton.vue.d.ts +18 -2
  309. package/lib/components/skeleton/src/skeleton2.js +1 -1
  310. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  311. package/lib/components/tooltip-v2/src/content2.js +1 -1
  312. package/lib/components/upload/index.js +2 -2
  313. package/lib/components/upload/src/upload-content.js +1 -1
  314. package/lib/components/upload/src/upload-content2.js +1 -1
  315. package/lib/components/upload/src/upload-list.js +1 -1
  316. package/lib/components/upload/src/upload.js +126 -101
  317. package/lib/components/upload/src/upload.js.map +1 -1
  318. package/lib/components/upload/src/upload2.js +101 -126
  319. package/lib/components/upload/src/upload2.js.map +1 -1
  320. package/lib/components/upload/src/use-handlers.js +1 -1
  321. package/lib/components/visual-hidden/index.js +2 -2
  322. package/lib/components/visual-hidden/src/visual-hidden.js +35 -7
  323. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  324. package/lib/components/visual-hidden/src/visual-hidden2.js +7 -35
  325. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  326. package/lib/components/watermark/index.js +2 -2
  327. package/lib/components/watermark/src/watermark.js +210 -27
  328. package/lib/components/watermark/src/watermark.js.map +1 -1
  329. package/lib/components/watermark/src/watermark2.js +27 -210
  330. package/lib/components/watermark/src/watermark2.js.map +1 -1
  331. package/lib/hooks/use-throttle-render/index.d.ts +6 -1
  332. package/lib/hooks/use-throttle-render/index.js +27 -8
  333. package/lib/hooks/use-throttle-render/index.js.map +1 -1
  334. package/lib/index.js +3 -3
  335. package/lib/version.d.ts +1 -1
  336. package/lib/version.js +1 -1
  337. package/lib/version.js.map +1 -1
  338. package/package.json +2 -2
  339. package/web-types.json +1 -1
@@ -1,33 +1,187 @@
1
- import '../../../utils/index.mjs';
1
+ import { defineComponent, useSlots, computed, ref, openBlock, createBlock, unref, withCtx, createVNode, Transition, withDirectives, createElementVNode, mergeProps, withModifiers, normalizeClass, createElementBlock, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';
2
+ import { Close } from '@element-plus/icons-vue';
3
+ import { ElOverlay } from '../../overlay/index.mjs';
4
+ import '../../focus-trap/index.mjs';
5
+ import { ElTeleport } from '../../teleport/index.mjs';
2
6
  import '../../dialog/index.mjs';
3
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
4
- import { dialogProps, dialogEmits } from '../../dialog/src/dialog.mjs';
7
+ import '../../../utils/index.mjs';
8
+ import { ElIcon } from '../../icon/index.mjs';
9
+ import '../../../hooks/index.mjs';
10
+ import { drawerProps, drawerEmits } from './drawer.mjs';
11
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
12
+ import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
13
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
14
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
15
+ import { useDialog } from '../../dialog/src/use-dialog.mjs';
16
+ import { addUnit } from '../../../utils/dom/style.mjs';
17
+ import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
5
18
 
6
- const drawerProps = buildProps({
7
- ...dialogProps,
8
- direction: {
9
- type: String,
10
- default: "rtl",
11
- values: ["ltr", "rtl", "ttb", "btt"]
12
- },
13
- size: {
14
- type: [String, Number],
15
- default: "30%"
16
- },
17
- withHeader: {
18
- type: Boolean,
19
- default: true
20
- },
21
- modalFade: {
22
- type: Boolean,
23
- default: true
24
- },
25
- headerAriaLevel: {
26
- type: String,
27
- default: "2"
19
+ const __default__ = defineComponent({
20
+ name: "ElDrawer",
21
+ inheritAttrs: false
22
+ });
23
+ const _sfc_main = /* @__PURE__ */ defineComponent({
24
+ ...__default__,
25
+ props: drawerProps,
26
+ emits: drawerEmits,
27
+ setup(__props, { expose }) {
28
+ const props = __props;
29
+ const slots = useSlots();
30
+ useDeprecated({
31
+ scope: "el-drawer",
32
+ from: "the title slot",
33
+ replacement: "the header slot",
34
+ version: "3.0.0",
35
+ ref: "https://element-plus.org/en-US/component/drawer.html#slots"
36
+ }, computed(() => !!slots.title));
37
+ const drawerRef = ref();
38
+ const focusStartRef = ref();
39
+ const ns = useNamespace("drawer");
40
+ const { t } = useLocale();
41
+ const {
42
+ afterEnter,
43
+ afterLeave,
44
+ beforeLeave,
45
+ visible,
46
+ rendered,
47
+ titleId,
48
+ bodyId,
49
+ zIndex,
50
+ onModalClick,
51
+ onOpenAutoFocus,
52
+ onCloseAutoFocus,
53
+ onFocusoutPrevented,
54
+ onCloseRequested,
55
+ handleClose
56
+ } = useDialog(props, drawerRef);
57
+ const isHorizontal = computed(() => props.direction === "rtl" || props.direction === "ltr");
58
+ const drawerSize = computed(() => addUnit(props.size));
59
+ expose({
60
+ handleClose,
61
+ afterEnter,
62
+ afterLeave
63
+ });
64
+ return (_ctx, _cache) => {
65
+ return openBlock(), createBlock(unref(ElTeleport), {
66
+ to: _ctx.appendTo,
67
+ disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
68
+ }, {
69
+ default: withCtx(() => [
70
+ createVNode(Transition, {
71
+ name: unref(ns).b("fade"),
72
+ onAfterEnter: unref(afterEnter),
73
+ onAfterLeave: unref(afterLeave),
74
+ onBeforeLeave: unref(beforeLeave),
75
+ persisted: ""
76
+ }, {
77
+ default: withCtx(() => [
78
+ withDirectives(createVNode(unref(ElOverlay), {
79
+ mask: _ctx.modal,
80
+ "overlay-class": _ctx.modalClass,
81
+ "z-index": unref(zIndex),
82
+ onClick: unref(onModalClick)
83
+ }, {
84
+ default: withCtx(() => [
85
+ createVNode(unref(ElFocusTrap), {
86
+ loop: "",
87
+ trapped: unref(visible),
88
+ "focus-trap-el": drawerRef.value,
89
+ "focus-start-el": focusStartRef.value,
90
+ onFocusAfterTrapped: unref(onOpenAutoFocus),
91
+ onFocusAfterReleased: unref(onCloseAutoFocus),
92
+ onFocusoutPrevented: unref(onFocusoutPrevented),
93
+ onReleaseRequested: unref(onCloseRequested)
94
+ }, {
95
+ default: withCtx(() => [
96
+ createElementVNode("div", mergeProps({
97
+ ref_key: "drawerRef",
98
+ ref: drawerRef,
99
+ "aria-modal": "true",
100
+ "aria-label": _ctx.title || void 0,
101
+ "aria-labelledby": !_ctx.title ? unref(titleId) : void 0,
102
+ "aria-describedby": unref(bodyId)
103
+ }, _ctx.$attrs, {
104
+ class: [unref(ns).b(), _ctx.direction, unref(visible) && "open"],
105
+ style: unref(isHorizontal) ? "width: " + unref(drawerSize) : "height: " + unref(drawerSize),
106
+ role: "dialog",
107
+ onClick: withModifiers(() => {
108
+ }, ["stop"])
109
+ }), [
110
+ createElementVNode("span", {
111
+ ref_key: "focusStartRef",
112
+ ref: focusStartRef,
113
+ class: normalizeClass(unref(ns).e("sr-focus")),
114
+ tabindex: "-1"
115
+ }, null, 2),
116
+ _ctx.withHeader ? (openBlock(), createElementBlock("header", {
117
+ key: 0,
118
+ class: normalizeClass(unref(ns).e("header"))
119
+ }, [
120
+ !_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
121
+ key: 0,
122
+ close: unref(handleClose),
123
+ titleId: unref(titleId),
124
+ titleClass: unref(ns).e("title")
125
+ }, () => [
126
+ !_ctx.$slots.title ? (openBlock(), createElementBlock("span", {
127
+ key: 0,
128
+ id: unref(titleId),
129
+ role: "heading",
130
+ "aria-level": _ctx.headerAriaLevel,
131
+ class: normalizeClass(unref(ns).e("title"))
132
+ }, toDisplayString(_ctx.title), 11, ["id", "aria-level"])) : createCommentVNode("v-if", true)
133
+ ]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
134
+ createCommentVNode(" DEPRECATED SLOT ")
135
+ ]),
136
+ _ctx.showClose ? (openBlock(), createElementBlock("button", {
137
+ key: 2,
138
+ "aria-label": unref(t)("el.drawer.close"),
139
+ class: normalizeClass(unref(ns).e("close-btn")),
140
+ type: "button",
141
+ onClick: unref(handleClose)
142
+ }, [
143
+ createVNode(unref(ElIcon), {
144
+ class: normalizeClass(unref(ns).e("close"))
145
+ }, {
146
+ default: withCtx(() => [
147
+ createVNode(unref(Close))
148
+ ]),
149
+ _: 1
150
+ }, 8, ["class"])
151
+ ], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
152
+ ], 2)) : createCommentVNode("v-if", true),
153
+ unref(rendered) ? (openBlock(), createElementBlock("div", {
154
+ key: 1,
155
+ id: unref(bodyId),
156
+ class: normalizeClass(unref(ns).e("body"))
157
+ }, [
158
+ renderSlot(_ctx.$slots, "default")
159
+ ], 10, ["id"])) : createCommentVNode("v-if", true),
160
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
161
+ key: 2,
162
+ class: normalizeClass(unref(ns).e("footer"))
163
+ }, [
164
+ renderSlot(_ctx.$slots, "footer")
165
+ ], 2)) : createCommentVNode("v-if", true)
166
+ ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
167
+ ]),
168
+ _: 3
169
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
170
+ ]),
171
+ _: 3
172
+ }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
173
+ [vShow, unref(visible)]
174
+ ])
175
+ ]),
176
+ _: 3
177
+ }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
178
+ ]),
179
+ _: 3
180
+ }, 8, ["to", "disabled"]);
181
+ };
28
182
  }
29
183
  });
30
- const drawerEmits = dialogEmits;
184
+ var Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "drawer.vue"]]);
31
185
 
32
- export { drawerEmits, drawerProps };
186
+ export { Drawer as default };
33
187
  //# sourceMappingURL=drawer2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer2.mjs","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":[],"mappings":";;;;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,GAAG,WAAW;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,GAAG;;;;"}
1
+ {"version":3,"file":"drawer2.mjs","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":["_openBl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AAiD,MACzD,UAAA;AACA,KAAA,CAAA,CAAA;AAEA,IAAa,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACX,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,KAAA,CAAA,UAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -121,7 +121,7 @@ export { useDialog } from './dialog/src/use-dialog.mjs';
121
121
  export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
122
122
  export { dialogInjectionKey } from './dialog/src/constants.mjs';
123
123
  export { dividerProps } from './divider/src/divider.mjs';
124
- export { drawerEmits, drawerProps } from './drawer/src/drawer2.mjs';
124
+ export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
125
125
  export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
126
126
  export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
127
127
  export { emptyProps } from './empty/src/empty.mjs';
@@ -204,7 +204,7 @@ export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
204
204
  export { useTooltipContentProps } from './tooltip/src/content.mjs';
205
205
  export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
206
206
  export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer.mjs';
207
- export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
207
+ export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload2.mjs';
208
208
  export { uploadContentProps } from './upload/src/upload-content.mjs';
209
209
  export { uploadListEmits, uploadListProps } from './upload/src/upload-list.mjs';
210
210
  export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-dragger.mjs';
@@ -214,7 +214,7 @@ export { default as DynamicSizeList } from './virtual-list/src/components/dynami
214
214
  export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-size-grid.mjs';
215
215
  export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
216
216
  export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
217
- export { watermarkProps } from './watermark/src/watermark.mjs';
217
+ export { watermarkProps } from './watermark/src/watermark2.mjs';
218
218
  export { tourEmits, tourProps } from './tour/src/tour.mjs';
219
219
  export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
220
220
  export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
@@ -75,6 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
75
  const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
76
76
  if (!selectedItem || !selectedItemInput) {
77
77
  state.width = 0;
78
+ state.height = 0;
78
79
  state.translateX = 0;
79
80
  state.translateY = 0;
80
81
  state.focusVisible = false;
@@ -1 +1 @@
1
- {"version":3,"file":"segmented2.mjs","sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(props.direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange(item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { debugWarn, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { segmentedEmits, segmentedProps } from './segmented'\nimport type { Option } from './types'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = defineProps(segmentedProps)\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (item: Option) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n}\n\nconst getValue = (item: Option) => {\n return isObject(item) ? item.value : item\n}\n\nconst getLabel = (item: Option) => {\n return isObject(item) ? item.label : item\n}\n\nconst getDisabled = (item: Option | undefined) => {\n return !!(_disabled.value || (isObject(item) ? item.disabled : false))\n}\n\nconst getSelected = (item: Option) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: Option) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n const rect = selectedItem.getBoundingClientRect()\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = rect.height\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = rect.width\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(\n () => props.modelValue,\n () => {\n updateSelect()\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n },\n {\n flush: 'post',\n }\n)\n</script>\n"],"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ACb,MAAA,KAAA,QAAyB;AACvB,KAAU,CAAA,CAAA;AAAkD,IAC9D,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,OAAA,IAAA,CAAA,OAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,QACA,GAAA,EAAA,CAAA;AAAA,QACE,EAAO,EAAAC,KAAA,CAAA,OAAA,CAAA;AAAA,QACT,OAAA,EAAA,cAAA;AAAA,QACF,GAAA,EAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"segmented2.mjs","sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(props.direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange(item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { debugWarn, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { segmentedEmits, segmentedProps } from './segmented'\nimport type { Option } from './types'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = defineProps(segmentedProps)\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (item: Option) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n}\n\nconst getValue = (item: Option) => {\n return isObject(item) ? item.value : item\n}\n\nconst getLabel = (item: Option) => {\n return isObject(item) ? item.label : item\n}\n\nconst getDisabled = (item: Option | undefined) => {\n return !!(_disabled.value || (isObject(item) ? item.disabled : false))\n}\n\nconst getSelected = (item: Option) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: Option) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.height = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n const rect = selectedItem.getBoundingClientRect()\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = rect.height\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = rect.width\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(\n () => props.modelValue,\n () => {\n updateSelect()\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n },\n {\n flush: 'post',\n }\n)\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref"],"mappings":";;;;;;;;;;;;;;;;mCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AACnC,IAAA,MAAM,cAAc,KAAM,EAAA,CAAA;AAC1B,IAAA,MAAM,gBAAgB,WAAY,EAAA,CAAA;AAClC,IAAA,MAAM,YAAY,eAAgB,EAAA,CAAA;AAClC,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,mBAAoB,EAAA,GAAI,mBAAmB,KAAO,EAAA;AAAA,MACjE,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,YAAA,GAAe,IAAwB,IAAI,CAAA,CAAA;AACjD,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EF,MAAM,EAAA,CAAA,EAAA,CAAA,sBAA6B,CAAA,YAAA,CAAA;AAAA,KACjC,CAAA,CAAA;AAAoB,IACpB,UAAkB,GAAA,QAAA,CAAA,MAAA;AAAwC,MAC1D,OAAuB,KAAA,CAAA,IAAA,IAAA,WAAkB,CAAA,KAAA,CAAA;AAAA,KAC1C,CAAA,CAAA;AAED,IAAM,8BAAsB,EAAA,YAAA,CAAA,CAAA;AAC1B,IAAO,KAAA,CAAA,2BAA0B,CAAA,CAAA;AAAA,IACnC,KAAC,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,MAAA;AAED,MAAA,IAAA,EAAA,CAAA;AAEA,MAAA;AAEA,MAAA,IAAA,KAAA,CAAA,aAAA,EAAA;AAAA,cACc,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,QAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,QAAA,EAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,GAAA,KAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA,OACN;AACJ,KAAa,EAAA;AACb,MAAA,KAAA,QAAyB;AACvB,KAAU,CAAA,CAAA;AAAkD,IAC9D,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACF,OAAA,IAAA,CAAA,OAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;AAAA,QACA,GAAA,EAAA,CAAA;AAAA,QACE,EAAO,EAAAC,KAAA,CAAA,OAAA,CAAA;AAAA,QACT,OAAA,EAAA,cAAA;AAAA,QACF,GAAA,EAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -86,13 +86,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
86
  role: "option",
87
87
  "aria-disabled": _ctx.isDisabled || void 0,
88
88
  "aria-selected": _ctx.itemSelected,
89
- onMouseenter: _ctx.hoverItem,
89
+ onMousemove: _ctx.hoverItem,
90
90
  onClick: withModifiers(_ctx.selectOptionClick, ["stop"])
91
91
  }, [
92
92
  renderSlot(_ctx.$slots, "default", {}, () => [
93
93
  createElementVNode("span", null, toDisplayString(_ctx.currentLabel), 1)
94
94
  ])
95
- ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
95
+ ], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"])), [
96
96
  [vShow, _ctx.visible]
97
97
  ]);
98
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"option.mjs","sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mouseenter=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport type { SelectOptionProxy } from './token'\n\nexport default defineComponent({\n name: 'ElOption',\n componentName: 'ElOption',\n\n props: {\n /**\n * @description value of option\n */\n value: {\n required: true,\n type: [String, Number, Boolean, Object],\n },\n /**\n * @description label of option, same as `value` if omitted\n */\n label: [String, Number],\n created: Boolean,\n /**\n * @description whether option is disabled\n */\n disabled: Boolean,\n },\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = getCurrentInstance().proxy as unknown as SelectOptionProxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n const { selected } = select.states\n const selectedOptions = select.props.multiple ? selected : [selected]\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n // if option is not selected, remove it from cache\n nextTick(() => {\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n visible,\n hover,\n selectOptionClick,\n states,\n }\n },\n})\n</script>\n"],"names":["_withDirectives","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;AAiCA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,UAAA;AAAA,EACN,aAAe,EAAA,UAAA;AAAA,EAEf,KAAO,EAAA;AAAA,IAAA,KAAA,EAAA;AAAA,MAAA,QAAA,EAAA,IAAA;AAAA,MAAA,IAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAAA,KAIE;AAAA,IAAA,KACK,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;AAAA,IAAA,OACJ,EAAC,OAAQ;AAAuB,IACxC,QAAA,EAAA,OAAA;AAAA,GAAA;AAAA,EAAA,KAAA,CAAA,KAAA,EAAA;AAAA,IAAA,MAAA,EAAA,GAAA,YAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IAIA,MAAA,EAAQ,GAAA,KAAQ,EAAM,CAAA;AAAA,IACtB,MAAS,YAAA,G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AAA;AACF,IAAC,YAAA,EAAA,IAAA,CAAA,SAAA;;;uCA9HC,EAaK,EAAA,MAAA;AAAA,MAXEC,kBAAA,CAAA,MAAA,EAAA,IAAA,EAAAC,eAAA,CAAA,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACJ,CAAA;AAAmB,GAAA,EACf,EAAA,EAAA,CAAA,IAAA,EAAA,eAAA,EAAA,eAAA,EAAA,cAAA,EAAA,SAAA,CAAA,CAAA,GAAA;AAAA,IACJ,oBAA6B,CAAA;AAAA,GAAA,CAC7B,CAAe;AAAA,CAAA;AAEc,aAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,YAAA,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"option.mjs","sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport type { SelectOptionProxy } from './token'\n\nexport default defineComponent({\n name: 'ElOption',\n componentName: 'ElOption',\n\n props: {\n /**\n * @description value of option\n */\n value: {\n required: true,\n type: [String, Number, Boolean, Object],\n },\n /**\n * @description label of option, same as `value` if omitted\n */\n label: [String, Number],\n created: Boolean,\n /**\n * @description whether option is disabled\n */\n disabled: Boolean,\n },\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = getCurrentInstance().proxy as unknown as SelectOptionProxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n const { selected } = select.states\n const selectedOptions = select.props.multiple ? selected : [selected]\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n // if option is not selected, remove it from cache\n nextTick(() => {\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n visible,\n hover,\n selectOptionClick,\n states,\n }\n },\n})\n</script>\n"],"names":["_withDirectives","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;AAiCA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,UAAA;AAAA,EACN,aAAe,EAAA,UAAA;AAAA,EAEf,KAAO,EAAA;AAAA,IAAA,KAAA,EAAA;AAAA,MAAA,QAAA,EAAA,IAAA;AAAA,MAAA,IAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAAA,KAIE;AAAA,IAAA,KACK,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;AAAA,IAAA,OACJ,EAAC,OAAQ;AAAuB,IACxC,QAAA,EAAA,OAAA;AAAA,GAAA;AAAA,EAAA,KAAA,CAAA,KAAA,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CAAA,YAAA,CAAA;AAAA,IACA,IAAA,EAAA,QAAA;AAAA,IACF,eAAA,EAAA,IAAA,CAAA,UAAA,IAAA,KAAA,CAAA;AAAA,IACF,eAAA,EAAA,IAAA,CAAA,YAAA;AACF,IAAC,WAAA,EAAA,IAAA,CAAA,SAAA;;;uCA9HC,EAaK,EAAA,MAAA;AAAA,MAXEC,kBAAA,CAAA,MAAA,EAAA,IAAA,EAAAC,eAAA,CAAA,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACJ,CAAA;AAAmB,GAAA,EACf,EAAA,EAAA,CAAA,IAAA,EAAA,eAAA,EAAA,eAAA,EAAA,aAAA,EAAA,SAAA,CAAA,CAAA,GAAA;AAAA,IACJ,oBAA6B,CAAA;AAAA,GAAA,CAC7B,CAAe;AAAA,CAAA;AAEc,aAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,YAAA,CAAA,CAAA,CAAA;;;;"}
@@ -34,7 +34,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
34
34
  _ctx.ns.is("created", _ctx.created),
35
35
  _ctx.ns.is("hovering", _ctx.hovering)
36
36
  ]),
37
- onMouseenter: _ctx.hoverItem,
37
+ onMousemove: _ctx.hoverItem,
38
38
  onClick: withModifiers(_ctx.selectOptionClick, ["stop"])
39
39
  }, [
40
40
  renderSlot(_ctx.$slots, "default", {
@@ -44,7 +44,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
44
44
  }, () => [
45
45
  createElementVNode("span", null, toDisplayString(_ctx.getLabel(_ctx.item)), 1)
46
46
  ])
47
- ], 46, ["aria-selected", "onMouseenter", "onClick"]);
47
+ ], 46, ["aria-selected", "onMousemove", "onClick"]);
48
48
  }
49
49
  var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "option-item.vue"]]);
50
50
 
@@ -1 +1 @@
1
- {"version":3,"file":"option-item.mjs","sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :aria-selected=\"selected\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mouseenter=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { OptionProps, optionEmits } from './defaults'\nimport { selectV2InjectionKey } from './token'\n\nexport default defineComponent({\n props: OptionProps,\n emits: optionEmits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n\n return {\n ns,\n hoverItem,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_normalizeStyle","_normalizeClass","_withModifiers","_renderSlot","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;;;AA4BA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,KAAO,EAAA,WAAA;AAAA,EACP,KAAO,EAAA,WAAA;AAAA,EACP,KAAM,CAAA,KAAA,EAAO,EAAE,IAAA,EAAQ,EAAA;AACrB,IAAM,MAAA,MAAA,GAAS,OAAO,oBAAoB,CAAA,CAAA;AAC1C,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,WAAW,iBAAkB,EAAA,GAAI,UAAU,KAAO,EAAA,EAAE,MAAM,CAAA,CAAA;AAClE,IAAA,MAAM,EAAE,QAAA,EAAa,GAAA,QAAA,CAAS,OAAO,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iC,CAAA;AAAA,GAAA,EAAA,EAAA,EAAA,CAAA,eAAA,EAAA,cAAA,EAAA,SAAA,CAAA,CAAA,CAAA;AAAA,CAAA;AAAX,iBAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,iBAAA,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"option-item.mjs","sources":["../../../../../../packages/components/select-v2/src/option-item.vue"],"sourcesContent":["<template>\n <li\n :aria-selected=\"selected\"\n :style=\"style\"\n :class=\"[\n ns.be('dropdown', 'item'),\n ns.is('selected', selected),\n ns.is('disabled', disabled),\n ns.is('created', created),\n ns.is('hovering', hovering),\n ]\"\n @mousemove=\"hoverItem\"\n @click.stop=\"selectOptionClick\"\n >\n <slot :item=\"item\" :index=\"index\" :disabled=\"disabled\">\n <span>{{ getLabel(item) }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { useProps } from './useProps'\nimport { OptionProps, optionEmits } from './defaults'\nimport { selectV2InjectionKey } from './token'\n\nexport default defineComponent({\n props: OptionProps,\n emits: optionEmits,\n setup(props, { emit }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const { hoverItem, selectOptionClick } = useOption(props, { emit })\n const { getLabel } = useProps(select.props)\n\n return {\n ns,\n hoverItem,\n selectOptionClick,\n getLabel,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_normalizeStyle","_normalizeClass","_withModifiers","_renderSlot","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;;;AA4BA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,KAAO,EAAA,WAAA;AAAA,EACP,KAAO,EAAA,WAAA;AAAA,EACP,KAAM,CAAA,KAAA,EAAO,EAAE,IAAA,EAAQ,EAAA;AACrB,IAAM,MAAA,MAAA,GAA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EAAA,IAAA,CAAA,KAAA;AAAA,MAAQ,QAAU,EAAA,IAAA,CAAA,QAAA;AAAA,KAAA,EAA7C,MAEO;AAAA,MADLC,kBAAA,CAAA,MAAA,EAAA,IAAA,EAAAC,eAAA,CAAA,IAAA,CAAA,QAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KAAiC,CAAA;AAAA,GAAA,EAAA,EAAA,EAAA,CAAA,eAAA,EAAA,aAAA,EAAA,SAAA,CAAA,CAAA,CAAA;AAAA,CAAA;AAAX,iBAAA,gBAAA,WAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,QAAA,EAAA,iBAAA,CAAA,CAAA,CAAA;;;;"}
@@ -1,12 +1,21 @@
1
1
  import type Skeleton from './skeleton.vue';
2
2
  import type { ExtractPropTypes } from 'vue';
3
+ import type { ThrottleType } from '@element-plus/nightly/es/hooks';
3
4
  export declare const skeletonProps: {
4
5
  readonly animated: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
5
6
  readonly count: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
6
7
  readonly rows: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
7
8
  readonly loading: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
8
9
  readonly throttle: {
9
- readonly type: import("vue").PropType<number>;
10
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => number | {
11
+ leading?: number;
12
+ trailing?: number;
13
+ initVal?: boolean;
14
+ }) | (() => ThrottleType) | ((new (...args: any[]) => number | {
15
+ leading?: number;
16
+ trailing?: number;
17
+ initVal?: boolean;
18
+ }) | (() => ThrottleType))[], unknown, unknown>>;
10
19
  readonly required: false;
11
20
  readonly validator: ((val: unknown) => boolean) | undefined;
12
21
  __epPropKey: true;
@@ -1,5 +1,5 @@
1
1
  import '../../../utils/index.mjs';
2
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
3
3
 
4
4
  const skeletonProps = buildProps({
5
5
  animated: {
@@ -19,7 +19,7 @@ const skeletonProps = buildProps({
19
19
  default: true
20
20
  },
21
21
  throttle: {
22
- type: Number
22
+ type: definePropType([Number, Object])
23
23
  }
24
24
  });
25
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const skeletonProps = buildProps({\n /**\n * @description whether showing the animation\n */\n animated: {\n type: Boolean,\n default: false,\n },\n /**\n * @description how many fake items to render to the DOM\n */\n count: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether showing the real DOM\n */\n rows: {\n type: Number,\n default: 3,\n },\n /**\n * @description numbers of the row, only useful when no template slot were given\n */\n loading: {\n type: Boolean,\n default: true,\n },\n /**\n * @description rendering delay in milliseconds\n */\n throttle: {\n type: Number,\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"skeleton.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type Skeleton from './skeleton.vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ThrottleType } from '@element-plus/hooks'\n\nexport const skeletonProps = buildProps({\n /**\n * @description whether showing the animation\n */\n animated: {\n type: Boolean,\n default: false,\n },\n /**\n * @description how many fake items to render to the DOM\n */\n count: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether showing the real DOM\n */\n rows: {\n type: Number,\n default: 3,\n },\n /**\n * @description numbers of the row, only useful when no template slot were given\n */\n loading: {\n type: Boolean,\n default: true,\n },\n /**\n * @description rendering delay in milliseconds\n */\n throttle: {\n type: definePropType<ThrottleType>([Number, Object]),\n },\n} as const)\nexport type SkeletonProps = ExtractPropTypes<typeof skeletonProps>\n\nexport type SkeletonInstance = InstanceType<typeof Skeleton>\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,CAAC;;;;"}
@@ -12,7 +12,15 @@ declare const __VLS_component: import("vue").DefineComponent<{
12
12
  readonly rows: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
13
13
  readonly loading: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
14
14
  readonly throttle: {
15
- readonly type: import("vue").PropType<number>;
15
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => number | {
16
+ leading?: number;
17
+ trailing?: number;
18
+ initVal?: boolean;
19
+ }) | (() => import("@element-plus/nightly/es/hooks").ThrottleType) | ((new (...args: any[]) => number | {
20
+ leading?: number;
21
+ trailing?: number;
22
+ initVal?: boolean;
23
+ }) | (() => import("@element-plus/nightly/es/hooks").ThrottleType))[], unknown, unknown>>;
16
24
  readonly required: false;
17
25
  readonly validator: ((val: unknown) => boolean) | undefined;
18
26
  __epPropKey: true;
@@ -26,7 +34,15 @@ declare const __VLS_component: import("vue").DefineComponent<{
26
34
  readonly rows: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
27
35
  readonly loading: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
28
36
  readonly throttle: {
29
- readonly type: import("vue").PropType<number>;
37
+ readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<(new (...args: any[]) => number | {
38
+ leading?: number;
39
+ trailing?: number;
40
+ initVal?: boolean;
41
+ }) | (() => import("@element-plus/nightly/es/hooks").ThrottleType) | ((new (...args: any[]) => number | {
42
+ leading?: number;
43
+ trailing?: number;
44
+ initVal?: boolean;
45
+ }) | (() => import("@element-plus/nightly/es/hooks").ThrottleType))[], unknown, unknown>>;
30
46
  readonly required: false;
31
47
  readonly validator: ((val: unknown) => boolean) | undefined;
32
48
  __epPropKey: true;
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  }, _ctx.$attrs), [
27
27
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (i) => {
28
28
  return openBlock(), createElementBlock(Fragment, { key: i }, [
29
- _ctx.loading ? renderSlot(_ctx.$slots, "template", { key: i }, () => [
29
+ unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [
30
30
  createVNode(SkeletonItem, {
31
31
  class: normalizeClass(unref(ns).is("first")),
32
32
  variant: "p"
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton2.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.vue"],"sourcesContent":["<template>\n <template v-if=\"uiLoading\">\n <div :class=\"[ns.b(), ns.is('animated', animated)]\" v-bind=\"$attrs\">\n <template v-for=\"i in count\" :key=\"i\">\n <slot v-if=\"loading\" :key=\"i\" name=\"template\">\n <el-skeleton-item :class=\"ns.is('first')\" variant=\"p\" />\n <el-skeleton-item\n v-for=\"item in rows\"\n :key=\"item\"\n :class=\"[\n ns.e('paragraph'),\n ns.is('last', item === rows && rows > 1),\n ]\"\n variant=\"p\"\n />\n </slot>\n </template>\n </div>\n </template>\n <template v-else>\n <slot v-bind=\"$attrs\" />\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { toRef } from 'vue'\nimport { useNamespace, useThrottleRender } from '@element-plus/hooks'\nimport { skeletonProps } from './skeleton'\nimport ElSkeletonItem from './skeleton-item.vue'\n\ndefineOptions({\n name: 'ElSkeleton',\n})\nconst props = defineProps(skeletonProps)\n\nconst ns = useNamespace('skeleton')\nconst uiLoading = useThrottleRender(toRef(props, 'loading'), props.throttle)\n\ndefineExpose({\n /** @description loading state */\n uiLoading,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,YAAY,iBAAkB,CAAA,KAAA,CAAM,OAAO,SAAS,CAAA,EAAG,MAAM,QAAQ,CAAA,CAAA;AAE3E,IAAa,MAAA,CAAA;AAAA,MAAA,SAAA;AAAA,KAEX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"skeleton2.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton.vue"],"sourcesContent":["<template>\n <template v-if=\"uiLoading\">\n <div :class=\"[ns.b(), ns.is('animated', animated)]\" v-bind=\"$attrs\">\n <template v-for=\"i in count\" :key=\"i\">\n <slot v-if=\"uiLoading\" :key=\"i\" name=\"template\">\n <el-skeleton-item :class=\"ns.is('first')\" variant=\"p\" />\n <el-skeleton-item\n v-for=\"item in rows\"\n :key=\"item\"\n :class=\"[\n ns.e('paragraph'),\n ns.is('last', item === rows && rows > 1),\n ]\"\n variant=\"p\"\n />\n </slot>\n </template>\n </div>\n </template>\n <template v-else>\n <slot v-bind=\"$attrs\" />\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { toRef } from 'vue'\nimport { useNamespace, useThrottleRender } from '@element-plus/hooks'\nimport { skeletonProps } from './skeleton'\nimport ElSkeletonItem from './skeleton-item.vue'\n\ndefineOptions({\n name: 'ElSkeleton',\n})\nconst props = defineProps(skeletonProps)\n\nconst ns = useNamespace('skeleton')\nconst uiLoading = useThrottleRender(toRef(props, 'loading'), props.throttle)\n\ndefineExpose({\n /** @description loading state */\n uiLoading,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,YAAY,iBAAkB,CAAA,KAAA,CAAM,OAAO,SAAS,CAAA,EAAG,MAAM,QAAQ,CAAA,CAAA;AAE3E,IAAa,MAAA,CAAA;AAAA,MAAA,SAAA;AAAA,KAEX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
9
  import { useFloating, arrowMiddleware } from '../../../hooks/use-floating/index.mjs';
10
10
  import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
11
11
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
- import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden2.mjs';
12
+ import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden.mjs';
13
13
 
14
14
  const __default__ = defineComponent({
15
15
  name: "ElTooltipV2Content"
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Upload from './src/upload2.mjs';
3
- export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload.mjs';
2
+ import Upload from './src/upload.mjs';
3
+ export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload2.mjs';
4
4
  export { uploadContentProps } from './src/upload-content.mjs';
5
5
  export { uploadListEmits, uploadListProps } from './src/upload-list.mjs';
6
6
  export { uploadDraggerEmits, uploadDraggerProps } from './src/upload-dragger.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../../../utils/index.mjs';
2
- import { uploadBaseProps } from './upload.mjs';
2
+ import { uploadBaseProps } from './upload2.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { NOOP } from '@vue/shared';
5
5
 
@@ -5,7 +5,7 @@ import '../../../hooks/index.mjs';
5
5
  import '../../form/index.mjs';
6
6
  import UploadDragger from './upload-dragger2.mjs';
7
7
  import { uploadContentProps } from './upload-content.mjs';
8
- import { genFileId } from './upload.mjs';
8
+ import { genFileId } from './upload2.mjs';
9
9
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
10
10
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
11
11
  import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../../../utils/index.mjs';
2
- import { uploadListTypes } from './upload.mjs';
2
+ import { uploadListTypes } from './upload2.mjs';
3
3
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
4
4
  import { mutable } from '../../../utils/typescript.mjs';
5
5
  import { NOOP } from '@vue/shared';