@element-plus/nightly 0.0.20241119 → 0.0.20241121

Sign up to get free protection for your applications and to get access to all the features.
Files changed (389) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +158 -128
  4. package/dist/index.full.min.js +13 -13
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +12 -12
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +158 -128
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/ms.js +1 -1
  154. package/dist/locale/ms.min.js +1 -1
  155. package/dist/locale/ms.min.mjs +1 -1
  156. package/dist/locale/ms.mjs +1 -1
  157. package/dist/locale/my.js +1 -1
  158. package/dist/locale/my.min.js +1 -1
  159. package/dist/locale/my.min.mjs +1 -1
  160. package/dist/locale/my.mjs +1 -1
  161. package/dist/locale/nb-no.js +1 -1
  162. package/dist/locale/nb-no.min.js +1 -1
  163. package/dist/locale/nb-no.min.mjs +1 -1
  164. package/dist/locale/nb-no.mjs +1 -1
  165. package/dist/locale/nl.js +1 -1
  166. package/dist/locale/nl.min.js +1 -1
  167. package/dist/locale/nl.min.mjs +1 -1
  168. package/dist/locale/nl.mjs +1 -1
  169. package/dist/locale/pa.js +1 -1
  170. package/dist/locale/pa.min.js +1 -1
  171. package/dist/locale/pa.min.mjs +1 -1
  172. package/dist/locale/pa.mjs +1 -1
  173. package/dist/locale/pl.js +1 -1
  174. package/dist/locale/pl.min.js +1 -1
  175. package/dist/locale/pl.min.mjs +1 -1
  176. package/dist/locale/pl.mjs +1 -1
  177. package/dist/locale/pt-br.js +1 -1
  178. package/dist/locale/pt-br.min.js +1 -1
  179. package/dist/locale/pt-br.min.mjs +1 -1
  180. package/dist/locale/pt-br.mjs +1 -1
  181. package/dist/locale/pt.js +1 -1
  182. package/dist/locale/pt.min.js +1 -1
  183. package/dist/locale/pt.min.mjs +1 -1
  184. package/dist/locale/pt.mjs +1 -1
  185. package/dist/locale/ro.js +1 -1
  186. package/dist/locale/ro.min.js +1 -1
  187. package/dist/locale/ro.min.mjs +1 -1
  188. package/dist/locale/ro.mjs +1 -1
  189. package/dist/locale/ru.js +1 -1
  190. package/dist/locale/ru.min.js +1 -1
  191. package/dist/locale/ru.min.mjs +1 -1
  192. package/dist/locale/ru.mjs +1 -1
  193. package/dist/locale/sk.js +1 -1
  194. package/dist/locale/sk.min.js +1 -1
  195. package/dist/locale/sk.min.mjs +1 -1
  196. package/dist/locale/sk.mjs +1 -1
  197. package/dist/locale/sl.js +1 -1
  198. package/dist/locale/sl.min.js +1 -1
  199. package/dist/locale/sl.min.mjs +1 -1
  200. package/dist/locale/sl.mjs +1 -1
  201. package/dist/locale/sr.js +1 -1
  202. package/dist/locale/sr.min.js +1 -1
  203. package/dist/locale/sr.min.mjs +1 -1
  204. package/dist/locale/sr.mjs +1 -1
  205. package/dist/locale/sv.js +1 -1
  206. package/dist/locale/sv.min.js +1 -1
  207. package/dist/locale/sv.min.mjs +1 -1
  208. package/dist/locale/sv.mjs +1 -1
  209. package/dist/locale/sw.js +1 -1
  210. package/dist/locale/sw.min.js +1 -1
  211. package/dist/locale/sw.min.mjs +1 -1
  212. package/dist/locale/sw.mjs +1 -1
  213. package/dist/locale/ta.js +1 -1
  214. package/dist/locale/ta.min.js +1 -1
  215. package/dist/locale/ta.min.mjs +1 -1
  216. package/dist/locale/ta.mjs +1 -1
  217. package/dist/locale/th.js +1 -1
  218. package/dist/locale/th.min.js +1 -1
  219. package/dist/locale/th.min.mjs +1 -1
  220. package/dist/locale/th.mjs +1 -1
  221. package/dist/locale/tk.js +1 -1
  222. package/dist/locale/tk.min.js +1 -1
  223. package/dist/locale/tk.min.mjs +1 -1
  224. package/dist/locale/tk.mjs +1 -1
  225. package/dist/locale/tr.js +1 -1
  226. package/dist/locale/tr.min.js +1 -1
  227. package/dist/locale/tr.min.mjs +1 -1
  228. package/dist/locale/tr.mjs +1 -1
  229. package/dist/locale/ug-cn.js +1 -1
  230. package/dist/locale/ug-cn.min.js +1 -1
  231. package/dist/locale/ug-cn.min.mjs +1 -1
  232. package/dist/locale/ug-cn.mjs +1 -1
  233. package/dist/locale/uk.js +1 -1
  234. package/dist/locale/uk.min.js +1 -1
  235. package/dist/locale/uk.min.mjs +1 -1
  236. package/dist/locale/uk.mjs +1 -1
  237. package/dist/locale/uz-uz.js +1 -1
  238. package/dist/locale/uz-uz.min.js +1 -1
  239. package/dist/locale/uz-uz.min.mjs +1 -1
  240. package/dist/locale/uz-uz.mjs +1 -1
  241. package/dist/locale/vi.js +1 -1
  242. package/dist/locale/vi.min.js +1 -1
  243. package/dist/locale/vi.min.mjs +1 -1
  244. package/dist/locale/vi.mjs +1 -1
  245. package/dist/locale/zh-cn.js +1 -1
  246. package/dist/locale/zh-cn.min.js +1 -1
  247. package/dist/locale/zh-cn.min.mjs +1 -1
  248. package/dist/locale/zh-cn.mjs +1 -1
  249. package/dist/locale/zh-tw.js +1 -1
  250. package/dist/locale/zh-tw.min.js +1 -1
  251. package/dist/locale/zh-tw.min.mjs +1 -1
  252. package/dist/locale/zh-tw.mjs +1 -1
  253. package/es/components/image-viewer/index.mjs +2 -2
  254. package/es/components/image-viewer/src/image-viewer.mjs +45 -392
  255. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  256. package/es/components/image-viewer/src/image-viewer2.mjs +415 -45
  257. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  258. package/es/components/index.mjs +9 -9
  259. package/es/components/link/index.mjs +2 -2
  260. package/es/components/link/src/link.mjs +25 -50
  261. package/es/components/link/src/link.mjs.map +1 -1
  262. package/es/components/link/src/link2.mjs +50 -25
  263. package/es/components/link/src/link2.mjs.map +1 -1
  264. package/es/components/page-header/index.mjs +2 -2
  265. package/es/components/page-header/src/page-header.mjs +17 -102
  266. package/es/components/page-header/src/page-header.mjs.map +1 -1
  267. package/es/components/page-header/src/page-header2.mjs +102 -17
  268. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  269. package/es/components/popper/index.mjs +2 -2
  270. package/es/components/popper/src/content.mjs +137 -93
  271. package/es/components/popper/src/content.mjs.map +1 -1
  272. package/es/components/popper/src/content2.mjs +93 -137
  273. package/es/components/popper/src/content2.mjs.map +1 -1
  274. package/es/components/result/index.mjs +2 -2
  275. package/es/components/result/src/result.mjs +29 -63
  276. package/es/components/result/src/result.mjs.map +1 -1
  277. package/es/components/result/src/result2.mjs +63 -29
  278. package/es/components/result/src/result2.mjs.map +1 -1
  279. package/es/components/scrollbar/index.mjs +1 -1
  280. package/es/components/scrollbar/src/bar2.mjs +1 -1
  281. package/es/components/scrollbar/src/thumb.mjs +11 -130
  282. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  283. package/es/components/scrollbar/src/thumb2.mjs +130 -11
  284. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  285. package/es/components/slider/src/button.mjs +21 -91
  286. package/es/components/slider/src/button.mjs.map +1 -1
  287. package/es/components/slider/src/button2.mjs +91 -21
  288. package/es/components/slider/src/button2.mjs.map +1 -1
  289. package/es/components/slider/src/slider2.mjs +1 -1
  290. package/es/components/switch/index.mjs +2 -2
  291. package/es/components/switch/src/switch.mjs +229 -72
  292. package/es/components/switch/src/switch.mjs.map +1 -1
  293. package/es/components/switch/src/switch2.mjs +72 -229
  294. package/es/components/switch/src/switch2.mjs.map +1 -1
  295. package/es/components/table/src/table.mjs +5 -3
  296. package/es/components/table/src/table.mjs.map +1 -1
  297. package/es/components/table/src/table.vue.d.ts +2 -1
  298. package/es/components/tag/src/tag2.mjs +4 -1
  299. package/es/components/tag/src/tag2.mjs.map +1 -1
  300. package/es/components/tooltip/src/content.mjs +1 -1
  301. package/es/components/tooltip/src/content2.mjs +1 -1
  302. package/es/components/tree-v2/src/tree.mjs +9 -5
  303. package/es/components/tree-v2/src/tree.mjs.map +1 -1
  304. package/es/components/tree-v2/src/tree.vue.d.ts +10 -1
  305. package/es/components/upload/index.mjs +2 -2
  306. package/es/components/upload/src/upload-content.mjs +1 -1
  307. package/es/components/upload/src/upload-content2.mjs +1 -1
  308. package/es/components/upload/src/upload-list.mjs +1 -1
  309. package/es/components/upload/src/upload.mjs +98 -126
  310. package/es/components/upload/src/upload.mjs.map +1 -1
  311. package/es/components/upload/src/upload2.mjs +126 -98
  312. package/es/components/upload/src/upload2.mjs.map +1 -1
  313. package/es/components/upload/src/use-handlers.mjs +1 -1
  314. package/es/index.mjs +9 -9
  315. package/es/version.d.ts +1 -1
  316. package/es/version.mjs +1 -1
  317. package/es/version.mjs.map +1 -1
  318. package/global.d.ts +2 -0
  319. package/lib/components/image-viewer/index.js +2 -2
  320. package/lib/components/image-viewer/src/image-viewer.js +46 -392
  321. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  322. package/lib/components/image-viewer/src/image-viewer2.js +415 -46
  323. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  324. package/lib/components/index.js +9 -9
  325. package/lib/components/link/index.js +2 -2
  326. package/lib/components/link/src/link.js +26 -50
  327. package/lib/components/link/src/link.js.map +1 -1
  328. package/lib/components/link/src/link2.js +50 -26
  329. package/lib/components/link/src/link2.js.map +1 -1
  330. package/lib/components/page-header/index.js +2 -2
  331. package/lib/components/page-header/src/page-header.js +18 -102
  332. package/lib/components/page-header/src/page-header.js.map +1 -1
  333. package/lib/components/page-header/src/page-header2.js +102 -18
  334. package/lib/components/page-header/src/page-header2.js.map +1 -1
  335. package/lib/components/popper/index.js +2 -2
  336. package/lib/components/popper/src/content.js +137 -98
  337. package/lib/components/popper/src/content.js.map +1 -1
  338. package/lib/components/popper/src/content2.js +98 -137
  339. package/lib/components/popper/src/content2.js.map +1 -1
  340. package/lib/components/result/index.js +2 -2
  341. package/lib/components/result/src/result.js +31 -63
  342. package/lib/components/result/src/result.js.map +1 -1
  343. package/lib/components/result/src/result2.js +63 -31
  344. package/lib/components/result/src/result2.js.map +1 -1
  345. package/lib/components/scrollbar/index.js +1 -1
  346. package/lib/components/scrollbar/src/bar2.js +1 -1
  347. package/lib/components/scrollbar/src/thumb.js +11 -130
  348. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  349. package/lib/components/scrollbar/src/thumb2.js +130 -11
  350. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  351. package/lib/components/slider/src/button.js +22 -91
  352. package/lib/components/slider/src/button.js.map +1 -1
  353. package/lib/components/slider/src/button2.js +91 -22
  354. package/lib/components/slider/src/button2.js.map +1 -1
  355. package/lib/components/slider/src/slider2.js +1 -1
  356. package/lib/components/switch/index.js +2 -2
  357. package/lib/components/switch/src/switch.js +228 -72
  358. package/lib/components/switch/src/switch.js.map +1 -1
  359. package/lib/components/switch/src/switch2.js +72 -228
  360. package/lib/components/switch/src/switch2.js.map +1 -1
  361. package/lib/components/table/src/table.js +5 -3
  362. package/lib/components/table/src/table.js.map +1 -1
  363. package/lib/components/table/src/table.vue.d.ts +2 -1
  364. package/lib/components/tag/src/tag2.js +4 -1
  365. package/lib/components/tag/src/tag2.js.map +1 -1
  366. package/lib/components/tooltip/src/content.js +1 -1
  367. package/lib/components/tooltip/src/content2.js +1 -1
  368. package/lib/components/tree-v2/src/tree.js +8 -4
  369. package/lib/components/tree-v2/src/tree.js.map +1 -1
  370. package/lib/components/tree-v2/src/tree.vue.d.ts +10 -1
  371. package/lib/components/upload/index.js +2 -2
  372. package/lib/components/upload/src/upload-content.js +1 -1
  373. package/lib/components/upload/src/upload-content2.js +1 -1
  374. package/lib/components/upload/src/upload-list.js +1 -1
  375. package/lib/components/upload/src/upload.js +101 -126
  376. package/lib/components/upload/src/upload.js.map +1 -1
  377. package/lib/components/upload/src/upload2.js +126 -101
  378. package/lib/components/upload/src/upload2.js.map +1 -1
  379. package/lib/components/upload/src/use-handlers.js +1 -1
  380. package/lib/index.js +9 -9
  381. package/lib/version.d.ts +1 -1
  382. package/lib/version.js +1 -1
  383. package/lib/version.js.map +1 -1
  384. package/package.json +2 -2
  385. package/tags.json +1 -1
  386. package/theme-chalk/el-image-viewer.css +1 -1
  387. package/theme-chalk/index.css +1 -1
  388. package/theme-chalk/src/image-viewer.scss +4 -0
  389. package/web-types.json +1 -1
@@ -2,107 +2,146 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var core = require('@popperjs/core');
5
+ var vue = require('vue');
6
+ var lodashUnified = require('lodash-unified');
6
7
  require('../../../utils/index.js');
7
- require('../../../hooks/index.js');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var index = require('../../../hooks/use-aria/index.js');
8
+ require('../../focus-trap/index.js');
9
+ require('../../form/index.js');
10
+ var constants$1 = require('./constants.js');
11
+ var content = require('./content2.js');
12
+ require('./composables/index.js');
13
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
14
+ var useFocusTrap = require('./composables/use-focus-trap.js');
15
+ var useContent = require('./composables/use-content.js');
16
+ var useContentDom = require('./composables/use-content-dom.js');
17
+ var constants = require('../../form/src/constants.js');
18
+ var shared = require('@vue/shared');
19
+ var types = require('../../../utils/types.js');
20
+ var focusTrap = require('../../focus-trap/src/focus-trap.js');
10
21
 
11
- const POSITIONING_STRATEGIES = ["fixed", "absolute"];
12
- const popperCoreConfigProps = runtime.buildProps({
13
- boundariesPadding: {
14
- type: Number,
15
- default: 0
16
- },
17
- fallbackPlacements: {
18
- type: runtime.definePropType(Array),
19
- default: void 0
20
- },
21
- gpuAcceleration: {
22
- type: Boolean,
23
- default: true
24
- },
25
- offset: {
26
- type: Number,
27
- default: 12
28
- },
29
- placement: {
30
- type: String,
31
- values: core.placements,
32
- default: "bottom"
33
- },
34
- popperOptions: {
35
- type: runtime.definePropType(Object),
36
- default: () => ({})
37
- },
38
- strategy: {
39
- type: String,
40
- values: POSITIONING_STRATEGIES,
41
- default: "absolute"
42
- }
22
+ const __default__ = vue.defineComponent({
23
+ name: "ElPopperContent"
43
24
  });
44
- const popperContentProps = runtime.buildProps({
45
- ...popperCoreConfigProps,
46
- id: String,
47
- style: {
48
- type: runtime.definePropType([String, Array, Object])
49
- },
50
- className: {
51
- type: runtime.definePropType([String, Array, Object])
52
- },
53
- effect: {
54
- type: runtime.definePropType(String),
55
- default: "dark"
56
- },
57
- visible: Boolean,
58
- enterable: {
59
- type: Boolean,
60
- default: true
61
- },
62
- pure: Boolean,
63
- focusOnShow: {
64
- type: Boolean,
65
- default: false
66
- },
67
- trapping: {
68
- type: Boolean,
69
- default: false
70
- },
71
- popperClass: {
72
- type: runtime.definePropType([String, Array, Object])
73
- },
74
- popperStyle: {
75
- type: runtime.definePropType([String, Array, Object])
76
- },
77
- referenceEl: {
78
- type: runtime.definePropType(Object)
79
- },
80
- triggerTargetEl: {
81
- type: runtime.definePropType(Object)
82
- },
83
- stopPopperMouseEvent: {
84
- type: Boolean,
85
- default: true
86
- },
87
- virtualTriggering: Boolean,
88
- zIndex: Number,
89
- ...index.useAriaProps(["ariaLabel"])
25
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26
+ ...__default__,
27
+ props: content.popperContentProps,
28
+ emits: content.popperContentEmits,
29
+ setup(__props, { expose, emit }) {
30
+ const props = __props;
31
+ const {
32
+ focusStartRef,
33
+ trapped,
34
+ onFocusAfterReleased,
35
+ onFocusAfterTrapped,
36
+ onFocusInTrap,
37
+ onFocusoutPrevented,
38
+ onReleaseRequested
39
+ } = useFocusTrap.usePopperContentFocusTrap(props, emit);
40
+ const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = useContent.usePopperContent(props);
41
+ const {
42
+ ariaModal,
43
+ arrowStyle,
44
+ contentAttrs,
45
+ contentClass,
46
+ contentStyle,
47
+ updateZIndex
48
+ } = useContentDom.usePopperContentDOM(props, {
49
+ styles,
50
+ attributes,
51
+ role
52
+ });
53
+ const formItemContext = vue.inject(constants.formItemContextKey, void 0);
54
+ const arrowOffset = vue.ref();
55
+ vue.provide(constants$1.POPPER_CONTENT_INJECTION_KEY, {
56
+ arrowStyle,
57
+ arrowRef,
58
+ arrowOffset
59
+ });
60
+ if (formItemContext) {
61
+ vue.provide(constants.formItemContextKey, {
62
+ ...formItemContext,
63
+ addInputId: shared.NOOP,
64
+ removeInputId: shared.NOOP
65
+ });
66
+ }
67
+ let triggerTargetAriaStopWatch = void 0;
68
+ const updatePopper = (shouldUpdateZIndex = true) => {
69
+ update();
70
+ shouldUpdateZIndex && updateZIndex();
71
+ };
72
+ const togglePopperAlive = () => {
73
+ updatePopper(false);
74
+ if (props.visible && props.focusOnShow) {
75
+ trapped.value = true;
76
+ } else if (props.visible === false) {
77
+ trapped.value = false;
78
+ }
79
+ };
80
+ vue.onMounted(() => {
81
+ vue.watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
82
+ triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
83
+ triggerTargetAriaStopWatch = void 0;
84
+ const el = vue.unref(triggerTargetEl || contentRef.value);
85
+ const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value);
86
+ if (types.isElement(el)) {
87
+ triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
88
+ ;
89
+ ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
90
+ lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
91
+ });
92
+ }, { immediate: true });
93
+ }
94
+ if (prevEl !== el && types.isElement(prevEl)) {
95
+ ;
96
+ ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
97
+ prevEl.removeAttribute(key);
98
+ });
99
+ }
100
+ }, { immediate: true });
101
+ vue.watch(() => props.visible, togglePopperAlive, { immediate: true });
102
+ });
103
+ vue.onBeforeUnmount(() => {
104
+ triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
105
+ triggerTargetAriaStopWatch = void 0;
106
+ });
107
+ expose({
108
+ popperContentRef: contentRef,
109
+ popperInstanceRef: instanceRef,
110
+ updatePopper,
111
+ contentStyle
112
+ });
113
+ return (_ctx, _cache) => {
114
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
115
+ ref_key: "contentRef",
116
+ ref: contentRef
117
+ }, vue.unref(contentAttrs), {
118
+ style: vue.unref(contentStyle),
119
+ class: vue.unref(contentClass),
120
+ tabindex: "-1",
121
+ onMouseenter: (e) => _ctx.$emit("mouseenter", e),
122
+ onMouseleave: (e) => _ctx.$emit("mouseleave", e)
123
+ }), [
124
+ vue.createVNode(vue.unref(focusTrap["default"]), {
125
+ trapped: vue.unref(trapped),
126
+ "trap-on-focus-in": true,
127
+ "focus-trap-el": vue.unref(contentRef),
128
+ "focus-start-el": vue.unref(focusStartRef),
129
+ onFocusAfterTrapped: vue.unref(onFocusAfterTrapped),
130
+ onFocusAfterReleased: vue.unref(onFocusAfterReleased),
131
+ onFocusin: vue.unref(onFocusInTrap),
132
+ onFocusoutPrevented: vue.unref(onFocusoutPrevented),
133
+ onReleaseRequested: vue.unref(onReleaseRequested)
134
+ }, {
135
+ default: vue.withCtx(() => [
136
+ vue.renderSlot(_ctx.$slots, "default")
137
+ ]),
138
+ _: 3
139
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
140
+ ], 16, ["onMouseenter", "onMouseleave"]);
141
+ };
142
+ }
90
143
  });
91
- const popperContentEmits = {
92
- mouseenter: (evt) => evt instanceof MouseEvent,
93
- mouseleave: (evt) => evt instanceof MouseEvent,
94
- focus: () => true,
95
- blur: () => true,
96
- close: () => true
97
- };
98
- const usePopperCoreConfigProps = popperCoreConfigProps;
99
- const usePopperContentProps = popperContentProps;
100
- const usePopperContentEmits = popperContentEmits;
144
+ var ElPopperContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "content.vue"]]);
101
145
 
102
- exports.popperContentEmits = popperContentEmits;
103
- exports.popperContentProps = popperContentProps;
104
- exports.popperCoreConfigProps = popperCoreConfigProps;
105
- exports.usePopperContentEmits = usePopperContentEmits;
106
- exports.usePopperContentProps = usePopperContentProps;
107
- exports.usePopperCoreConfigProps = usePopperCoreConfigProps;
146
+ exports["default"] = ElPopperContent;
108
147
  //# sourceMappingURL=content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":["buildProps","definePropType","placements","useAriaProps"],"mappings":";;;;;;;;;;AAGA,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,MAAC,qBAAqB,GAAGA,kBAAU,CAAC;AAChD,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,eAAU;AACtB,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAED,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,sBAAsB;AAClC,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGD,kBAAU,CAAC;AAC7C,EAAE,GAAG,qBAAqB;AAC1B,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GA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AAC,kBAAkB,GAAG;AAClC,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE;AACU,MAAC,wBAAwB,GAAG,sBAAsB;AAClD,MAAC,qBAAqB,GAAG,mBAAmB;AAC5C,MAAC,qBAAqB,GAAG;;;;;;;;;"}
1
+ {"version":3,"file":"content.js","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { NOOP, isElement } from '@element-plus/utils'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (formItemContext) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":["usePopperContentFocusTrap","usePopperContent","usePopperContentDOM","inject","formItemContextKey","ref","provide","POPPER_CONTENT_INJECTION_KEY","NOOP","onMounted","watch","unref","isElement","isNil","onBeforeUnmount","_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode","ElFocusTrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;uCAkDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA;AAAA,MACJ,aAAA;AAAA,MACA,OAAA;AAAA,MAEA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,aAAA;AAAA,MACA,mBAAA;AAAA,MACA,kBAAA;AAAA,KACF,GAAIA,sCAA0B,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,EAAE,UAAY,EAAA,QAAA,EAAU,UAAY,EAAA,MAAA,EAAQ,aAAa,IAAM,EAAA,MAAA,EACnE,GAAAC,2BAAA,CAAiB,KAAK,CAAA,CAAA;AAExB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KACF,GAAIC,kCAAoB,KAAO,EAAA;AAAA,MAC7B,MAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,K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;AAAA,UACD,mBAAA,EAAAA,SAAA,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;"}
@@ -2,146 +2,107 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var lodashUnified = require('lodash-unified');
5
+ var core = require('@popperjs/core');
7
6
  require('../../../utils/index.js');
8
- require('../../focus-trap/index.js');
9
- require('../../form/index.js');
10
- var constants$1 = require('./constants.js');
11
- var content = require('./content.js');
12
- require('./composables/index.js');
13
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
14
- var useFocusTrap = require('./composables/use-focus-trap.js');
15
- var useContent = require('./composables/use-content.js');
16
- var useContentDom = require('./composables/use-content-dom.js');
17
- var constants = require('../../form/src/constants.js');
18
- var shared = require('@vue/shared');
19
- var types = require('../../../utils/types.js');
20
- var focusTrap = require('../../focus-trap/src/focus-trap.js');
7
+ require('../../../hooks/index.js');
8
+ var runtime = require('../../../utils/vue/props/runtime.js');
9
+ var index = require('../../../hooks/use-aria/index.js');
21
10
 
22
- const __default__ = vue.defineComponent({
23
- name: "ElPopperContent"
24
- });
25
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26
- ...__default__,
27
- props: content.popperContentProps,
28
- emits: content.popperContentEmits,
29
- setup(__props, { expose, emit }) {
30
- const props = __props;
31
- const {
32
- focusStartRef,
33
- trapped,
34
- onFocusAfterReleased,
35
- onFocusAfterTrapped,
36
- onFocusInTrap,
37
- onFocusoutPrevented,
38
- onReleaseRequested
39
- } = useFocusTrap.usePopperContentFocusTrap(props, emit);
40
- const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = useContent.usePopperContent(props);
41
- const {
42
- ariaModal,
43
- arrowStyle,
44
- contentAttrs,
45
- contentClass,
46
- contentStyle,
47
- updateZIndex
48
- } = useContentDom.usePopperContentDOM(props, {
49
- styles,
50
- attributes,
51
- role
52
- });
53
- const formItemContext = vue.inject(constants.formItemContextKey, void 0);
54
- const arrowOffset = vue.ref();
55
- vue.provide(constants$1.POPPER_CONTENT_INJECTION_KEY, {
56
- arrowStyle,
57
- arrowRef,
58
- arrowOffset
59
- });
60
- if (formItemContext) {
61
- vue.provide(constants.formItemContextKey, {
62
- ...formItemContext,
63
- addInputId: shared.NOOP,
64
- removeInputId: shared.NOOP
65
- });
66
- }
67
- let triggerTargetAriaStopWatch = void 0;
68
- const updatePopper = (shouldUpdateZIndex = true) => {
69
- update();
70
- shouldUpdateZIndex && updateZIndex();
71
- };
72
- const togglePopperAlive = () => {
73
- updatePopper(false);
74
- if (props.visible && props.focusOnShow) {
75
- trapped.value = true;
76
- } else if (props.visible === false) {
77
- trapped.value = false;
78
- }
79
- };
80
- vue.onMounted(() => {
81
- vue.watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
82
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
83
- triggerTargetAriaStopWatch = void 0;
84
- const el = vue.unref(triggerTargetEl || contentRef.value);
85
- const prevEl = vue.unref(prevTriggerTargetEl || contentRef.value);
86
- if (types.isElement(el)) {
87
- triggerTargetAriaStopWatch = vue.watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
88
- ;
89
- ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
90
- lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
91
- });
92
- }, { immediate: true });
93
- }
94
- if (prevEl !== el && types.isElement(prevEl)) {
95
- ;
96
- ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
97
- prevEl.removeAttribute(key);
98
- });
99
- }
100
- }, { immediate: true });
101
- vue.watch(() => props.visible, togglePopperAlive, { immediate: true });
102
- });
103
- vue.onBeforeUnmount(() => {
104
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
105
- triggerTargetAriaStopWatch = void 0;
106
- });
107
- expose({
108
- popperContentRef: contentRef,
109
- popperInstanceRef: instanceRef,
110
- updatePopper,
111
- contentStyle
112
- });
113
- return (_ctx, _cache) => {
114
- return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
115
- ref_key: "contentRef",
116
- ref: contentRef
117
- }, vue.unref(contentAttrs), {
118
- style: vue.unref(contentStyle),
119
- class: vue.unref(contentClass),
120
- tabindex: "-1",
121
- onMouseenter: (e) => _ctx.$emit("mouseenter", e),
122
- onMouseleave: (e) => _ctx.$emit("mouseleave", e)
123
- }), [
124
- vue.createVNode(vue.unref(focusTrap["default"]), {
125
- trapped: vue.unref(trapped),
126
- "trap-on-focus-in": true,
127
- "focus-trap-el": vue.unref(contentRef),
128
- "focus-start-el": vue.unref(focusStartRef),
129
- onFocusAfterTrapped: vue.unref(onFocusAfterTrapped),
130
- onFocusAfterReleased: vue.unref(onFocusAfterReleased),
131
- onFocusin: vue.unref(onFocusInTrap),
132
- onFocusoutPrevented: vue.unref(onFocusoutPrevented),
133
- onReleaseRequested: vue.unref(onReleaseRequested)
134
- }, {
135
- default: vue.withCtx(() => [
136
- vue.renderSlot(_ctx.$slots, "default")
137
- ]),
138
- _: 3
139
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
140
- ], 16, ["onMouseenter", "onMouseleave"]);
141
- };
11
+ const POSITIONING_STRATEGIES = ["fixed", "absolute"];
12
+ const popperCoreConfigProps = runtime.buildProps({
13
+ boundariesPadding: {
14
+ type: Number,
15
+ default: 0
16
+ },
17
+ fallbackPlacements: {
18
+ type: runtime.definePropType(Array),
19
+ default: void 0
20
+ },
21
+ gpuAcceleration: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ offset: {
26
+ type: Number,
27
+ default: 12
28
+ },
29
+ placement: {
30
+ type: String,
31
+ values: core.placements,
32
+ default: "bottom"
33
+ },
34
+ popperOptions: {
35
+ type: runtime.definePropType(Object),
36
+ default: () => ({})
37
+ },
38
+ strategy: {
39
+ type: String,
40
+ values: POSITIONING_STRATEGIES,
41
+ default: "absolute"
142
42
  }
143
43
  });
144
- var ElPopperContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "content.vue"]]);
44
+ const popperContentProps = runtime.buildProps({
45
+ ...popperCoreConfigProps,
46
+ id: String,
47
+ style: {
48
+ type: runtime.definePropType([String, Array, Object])
49
+ },
50
+ className: {
51
+ type: runtime.definePropType([String, Array, Object])
52
+ },
53
+ effect: {
54
+ type: runtime.definePropType(String),
55
+ default: "dark"
56
+ },
57
+ visible: Boolean,
58
+ enterable: {
59
+ type: Boolean,
60
+ default: true
61
+ },
62
+ pure: Boolean,
63
+ focusOnShow: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ trapping: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ popperClass: {
72
+ type: runtime.definePropType([String, Array, Object])
73
+ },
74
+ popperStyle: {
75
+ type: runtime.definePropType([String, Array, Object])
76
+ },
77
+ referenceEl: {
78
+ type: runtime.definePropType(Object)
79
+ },
80
+ triggerTargetEl: {
81
+ type: runtime.definePropType(Object)
82
+ },
83
+ stopPopperMouseEvent: {
84
+ type: Boolean,
85
+ default: true
86
+ },
87
+ virtualTriggering: Boolean,
88
+ zIndex: Number,
89
+ ...index.useAriaProps(["ariaLabel"])
90
+ });
91
+ const popperContentEmits = {
92
+ mouseenter: (evt) => evt instanceof MouseEvent,
93
+ mouseleave: (evt) => evt instanceof MouseEvent,
94
+ focus: () => true,
95
+ blur: () => true,
96
+ close: () => true
97
+ };
98
+ const usePopperCoreConfigProps = popperCoreConfigProps;
99
+ const usePopperContentProps = popperContentProps;
100
+ const usePopperContentEmits = popperContentEmits;
145
101
 
146
- exports["default"] = ElPopperContent;
102
+ exports.popperContentEmits = popperContentEmits;
103
+ exports.popperContentProps = popperContentProps;
104
+ exports.popperCoreConfigProps = popperCoreConfigProps;
105
+ exports.usePopperContentEmits = usePopperContentEmits;
106
+ exports.usePopperContentProps = usePopperContentProps;
107
+ exports.usePopperCoreConfigProps = usePopperCoreConfigProps;
147
108
  //# sourceMappingURL=content2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { NOOP, isElement } from '@element-plus/utils'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (formItemContext) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":["usePopperContentFocusTrap","usePopperContent","usePopperContentDOM","inject","formItemContextKey","ref","provide","POPPER_CONTENT_INJECTION_KEY","NOOP","onMounted","watch","unref","isElement","isNil","onBeforeUnmount","_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode","ElFocusTrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;uCAkDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA;AAAA,MACJ,aAAA;AAAA,MACA,OAAA;AAAA,MAEA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,aAAA;AAAA,MACA,mBAAA;AAAA,MACA,kBAAA;AAAA,KACF,GAAIA,sCAA0B,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,EAAE,UAAY,EAAA,QAAA,EAAU,UAAY,EAAA,MAAA,EAAQ,aAAa,IAAM,EAAA,MAAA,EACnE,GAAAC,2BAAA,CAAiB,KAAK,CAAA,CAAA;AAExB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KACF,GAAIC,kCAAoB,KAAO,EAAA;AAAA,MAC7B,MAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,eAAA,GAAkBC,UAAO,CAAAC,4BAAA,EAAoB,KAAS,CAAA,CAAA,CAAA;AAC5D,IAAA,MAAM,cAAcC,OAAY,EAAA,CAAA;AAEhC,IAAAC,WAAA,CAAQC,wCAA8B,EAAA;AAAA,MACpC,UAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,IAAI,eAAiB,EA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AAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAC9B,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAED,QAAa,OAAA,EAAA,YAAA;AAAA,QAAA,GAAA,EAAA,UAAA;AAAA,OAAA,EAAAC,SAAA,CAAA,YAAA,CAAA,EAAA;AAAA,QAAA,KAAA,EAAAA,SAAA,CAAA,YAAA,CAAA;AAAA,QAIO,KAAA,EAAAA,SAAA,CAAA,YAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,YAAA,EAAA,CAAA,CAAA,KAAA,IAAA,CAAA,KAAA,CAAA,YAAA,EAAA,CAAA,CAAA;AAAA,QAAA,YAAA,EAAA,CAAA,CAAA,KAAA,IAAA,CAAA,KAAA,CAAA,YAAA,EAAA,CAAA,CAAA;AAAA,OAIC,CAAA,EAAA;AAAA,QAAAC,eAAA,CAAAD,SAAA,CAAAE,oBAAA,CAAA,EAAA;AAAA,UAAA,OAAA,EAAAF,SAAA,CAAA,OAAA,CAAA;AAAA,UAAA,kBAAA,EAAA,IAAA;AAAA,UAInB,eAAA,EAAAA,SAAA,CAAA,UAAA,CAAA;AAAA,UAAA,gBAAA,EAAAA,SAAA,CAAA,aAAA,CAAA;AAAA,UAAA,mBAAA,EAAAA,SAAA,CAAA,mBAAA,CAAA;AAAA,UAAA,oBAAA,EAAAA,SAAA,CAAA,oBAAA,CAAA;AAAA,UAKA,SAAA,EAAAA,SAAA,CAAA,aAAA,CAAA;AAAA,UACD,mBAAA,EAAAA,SAAA,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":["buildProps","definePropType","placements","useAriaProps"],"mappings":";;;;;;;;;;AAGA,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,MAAC,qBAAqB,GAAGA,kBAAU,CAAC;AAChD,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV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OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,iBAAiB,EAAE,OAAO;AAC5B,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,GAAGE,kBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE;AACU,MAAC,wBAAwB,GAAG,sBAAsB;AAClD,MAAC,qBAAqB,GAAG,mBAAmB;AAC5C,MAAC,qBAAqB,GAAG;;;;;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var result$1 = require('./src/result.js');
7
- var result = require('./src/result2.js');
6
+ var result$1 = require('./src/result2.js');
7
+ var result = require('./src/result.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElResult = install.withInstall(result$1["default"]);