@wfrog/vc-ui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +3 -3
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
  13. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  14. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  15. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  16. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  17. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  18. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  19. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  20. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  21. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  22. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  23. package/dist/es/chunk/CidLkmft.mjs +188 -0
  24. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  25. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  26. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  27. package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
  28. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  29. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  30. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  31. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  32. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  33. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  34. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  35. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  36. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  37. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  38. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  39. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  40. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  41. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  42. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  43. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  44. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  45. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  46. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  47. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  48. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  49. package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
  50. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  51. package/dist/es/components/button/button.mjs +105 -76
  52. package/dist/es/components/choice/choice.mjs +2 -2
  53. package/dist/es/components/config-provider/config-provider.d.ts +1 -0
  54. package/dist/es/components/config-provider/config-provider.mjs +13 -5
  55. package/dist/es/components/cropper/cropper.mjs +44 -33
  56. package/dist/es/components/currency/currency.mjs +5 -5
  57. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  58. package/dist/es/components/dialog/dialog.mjs +213 -172
  59. package/dist/es/components/dialog/index.css +1 -1
  60. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
  61. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
  62. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  63. package/dist/es/components/dialog-upload-images/index.css +1 -1
  64. package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
  65. package/dist/es/components/drawer/drawer.mjs +136 -94
  66. package/dist/es/components/drawer/index.css +1 -1
  67. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  68. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  69. package/dist/es/components/el-icon/index.css +3 -2
  70. package/dist/es/components/flag/flag.mjs +2 -1
  71. package/dist/es/components/icon/icon.mjs +10 -31
  72. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  73. package/dist/es/components/icon/icon2.mjs +1 -1
  74. package/dist/es/components/icon/index.mjs +2 -2
  75. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  76. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  77. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  78. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  79. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  80. package/dist/es/components/icon-picker/index.css +121 -0
  81. package/dist/es/components/icon-picker/index.d.ts +4 -0
  82. package/dist/es/components/icon-picker/index.mjs +6 -0
  83. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  84. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  85. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  86. package/dist/es/components/iconify-icon/index.css +11 -0
  87. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  88. package/dist/es/components/iconify-icon/index.mjs +6 -0
  89. package/dist/es/components/image/image.mjs +5 -5
  90. package/dist/es/components/input/input.mjs +4 -4
  91. package/dist/es/components/input/input.vue.d.ts +63 -54
  92. package/dist/es/components/input-number/input-number.mjs +5 -5
  93. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  94. package/dist/es/components/pca-picker/index.css +1 -1
  95. package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
  96. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  97. package/dist/es/components/qr-code/qr-code.mjs +2 -1
  98. package/dist/es/components/screenfull/screenfull.mjs +6 -5
  99. package/dist/es/components/scrollbar/index.css +18 -0
  100. package/dist/es/components/scrollbar/index.d.ts +4 -0
  101. package/dist/es/components/scrollbar/index.mjs +6 -0
  102. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  103. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  104. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  105. package/dist/es/components/select/select.mjs +7 -7
  106. package/dist/es/components/single-player/index.css +1 -1
  107. package/dist/es/components/single-player/single-player.mjs +265 -166
  108. package/dist/es/components/svg-icon/index.css +3 -2
  109. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  110. package/dist/es/components/switch/switch.mjs +2 -2
  111. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  112. package/dist/es/components/tags/tags.mjs +9 -9
  113. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  114. package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
  115. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  116. package/dist/es/components/tinymce/index.css +1 -1
  117. package/dist/es/components/tinymce/tinymce.mjs +9 -8
  118. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  119. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  120. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  121. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  122. package/dist/es/components/upload-file/upload-file.mjs +3 -3
  123. package/dist/es/index.d.ts +3 -0
  124. package/dist/es/index.mjs +41 -31
  125. package/dist/global.d.ts +3 -0
  126. package/dist/index.css +166 -22
  127. package/package.json +8 -2
  128. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  129. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  130. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  131. package/dist/es/chunk/DihosKp1.mjs +0 -140
  132. package/dist/es/components/icon/index.css +0 -9
@@ -1,12 +1,12 @@
1
- import { defineComponent, ref, computed, provide, renderSlot, inject, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, withDirectives, cloneVNode, Comment, Fragment, Text, createVNode, onMounted, watch, createBlock, createCommentVNode, mergeProps, withCtx, nextTick, shallowRef, getCurrentInstance, toRef, Teleport as Teleport$1, onBeforeMount, Transition, vShow, readonly, onDeactivated, toDisplayString } from 'vue';
2
- import { c as buildProps, u as useNamespace, d as definePropType, N as NOOP, e as debugWarn, p as isObject, n as isElement, k as isNil, h as isString, m as fromPairs, f as isNumber, r as buildProp, j as isFunction, q as isBoolean, i as isArray, s as useGetDerivedNamespace } from './DRoyW749.mjs';
3
- import { _ as _export_sfc, w as withInstall } from './DTLPXrjb.mjs';
1
+ import { defineComponent, renderSlot, createBlock, openBlock, Teleport as Teleport$1, ref, computed, provide, inject, onBeforeUnmount, createElementBlock, normalizeStyle, normalizeClass, unref, withDirectives, cloneVNode, Comment, Fragment, Text, createVNode, onMounted, watch, createCommentVNode, mergeProps, withCtx, nextTick, shallowRef, getCurrentInstance, toRef, onBeforeMount, Transition, vShow, readonly, onDeactivated, toDisplayString } from 'vue';
2
+ import { c as buildProps, d as definePropType, u as useNamespace, N as NOOP, e as debugWarn, p as isObject, n as isElement, k as isNil, h as isString, m as fromPairs, f as isNumber, r as buildProp, j as isFunction, q as isBoolean, i as isArray, s as useGetDerivedNamespace } from './CcKUdl3e.mjs';
3
+ import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
4
4
  import { unrefElement, isClient, tryOnScopeDispose, computedEager, onClickOutside } from '@vueuse/core';
5
- import { u as useAriaProps } from './BpqBBo4z.mjs';
5
+ import { u as useAriaProps } from './BDyXj_90.mjs';
6
6
  import { g as getEventCode, E as EVENT_CODE, c as composeEventHandlers } from './BTpNRPQW.mjs';
7
7
  import { a as isFocusable, f as focusElement } from './CsLIbnzG.mjs';
8
- import { f as formItemContextKey, a as useIdInjection, u as useId } from './CBSopeeE.mjs';
9
- import { u as useZIndex } from './BI0vrXwX.mjs';
8
+ import { f as formItemContextKey, a as useIdInjection, u as useId } from './DQHGjqG5.mjs';
9
+ import { u as useZIndex } from './BI-fNJhk.mjs';
10
10
 
11
11
  /**
12
12
  * Checks if `value` is `undefined`.
@@ -29,6 +29,32 @@ function isUndefined(value) {
29
29
  return value === undefined;
30
30
  }
31
31
 
32
+ const teleportProps = buildProps({
33
+ to: {
34
+ type: definePropType([String, Object]),
35
+ required: true
36
+ },
37
+ disabled: Boolean
38
+ });
39
+
40
+ const _sfc_main$8 = defineComponent({
41
+ __name: "teleport",
42
+ props: teleportProps,
43
+ setup(__props) {
44
+ return (_ctx, _cache) => {
45
+ return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport$1, {
46
+ key: 1,
47
+ to: _ctx.to
48
+ }, [
49
+ renderSlot(_ctx.$slots, "default")
50
+ ], 8, ["to"]));
51
+ };
52
+ }
53
+ });
54
+ var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/teleport/src/teleport.vue"]]);
55
+
56
+ const ElTeleport = withInstall(Teleport);
57
+
32
58
  const POPPER_INJECTION_KEY = Symbol("popper");
33
59
  const POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
34
60
 
@@ -50,14 +76,14 @@ const popperProps = buildProps({
50
76
  }
51
77
  });
52
78
 
53
- const __default__$6 = defineComponent({
54
- name: "ElPopper",
55
- inheritAttrs: false
56
- });
57
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
58
- ...__default__$6,
79
+ const _sfc_main$7 = defineComponent({
80
+ ...{
81
+ name: "ElPopper",
82
+ inheritAttrs: false
83
+ },
84
+ __name: "popper",
59
85
  props: popperProps,
60
- setup(__props, { expose }) {
86
+ setup(__props, { expose: __expose }) {
61
87
  const props = __props;
62
88
  const triggerRef = ref();
63
89
  const popperInstanceRef = ref();
@@ -71,42 +97,50 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
71
97
  referenceRef,
72
98
  role
73
99
  };
74
- expose(popperProvides);
100
+ __expose(popperProvides);
75
101
  provide(POPPER_INJECTION_KEY, popperProvides);
76
102
  return (_ctx, _cache) => {
77
103
  return renderSlot(_ctx.$slots, "default");
78
104
  };
79
105
  }
80
106
  });
81
- var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "popper.vue"]]);
107
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);
82
108
 
83
- const __default__$5 = defineComponent({
84
- name: "ElPopperArrow",
85
- inheritAttrs: false
86
- });
87
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
88
- ...__default__$5,
89
- setup(__props, { expose }) {
109
+ const _sfc_main$6 = defineComponent({
110
+ ...{
111
+ name: "ElPopperArrow",
112
+ inheritAttrs: false
113
+ },
114
+ __name: "arrow",
115
+ setup(__props, { expose: __expose }) {
90
116
  const ns = useNamespace("popper");
91
- const { arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
117
+ const { arrowRef, arrowStyle } = inject(
118
+ POPPER_CONTENT_INJECTION_KEY,
119
+ void 0
120
+ );
92
121
  onBeforeUnmount(() => {
93
122
  arrowRef.value = void 0;
94
123
  });
95
- expose({
124
+ __expose({
96
125
  arrowRef
97
126
  });
98
127
  return (_ctx, _cache) => {
99
- return openBlock(), createElementBlock("span", {
100
- ref_key: "arrowRef",
101
- ref: arrowRef,
102
- class: normalizeClass(unref(ns).e("arrow")),
103
- style: normalizeStyle(unref(arrowStyle)),
104
- "data-popper-arrow": ""
105
- }, null, 6);
128
+ return openBlock(), createElementBlock(
129
+ "span",
130
+ {
131
+ ref_key: "arrowRef",
132
+ ref: arrowRef,
133
+ class: normalizeClass(unref(ns).e("arrow")),
134
+ style: normalizeStyle(unref(arrowStyle)),
135
+ "data-popper-arrow": ""
136
+ },
137
+ null,
138
+ 6
139
+ );
106
140
  };
107
141
  }
108
142
  });
109
- var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "arrow.vue"]]);
143
+ var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);
110
144
 
111
145
  const popperTriggerProps = buildProps({
112
146
  virtualRef: {
@@ -218,14 +252,14 @@ function wrapTextContent(s) {
218
252
  }, [s]);
219
253
  }
220
254
 
221
- const __default__$4 = defineComponent({
222
- name: "ElPopperTrigger",
223
- inheritAttrs: false
224
- });
225
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
226
- ...__default__$4,
255
+ const _sfc_main$5 = defineComponent({
256
+ ...{
257
+ name: "ElPopperTrigger",
258
+ inheritAttrs: false
259
+ },
260
+ __name: "trigger",
227
261
  props: popperTriggerProps,
228
- setup(__props, { expose }) {
262
+ setup(__props, { expose: __expose }) {
229
263
  const props = __props;
230
264
  const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
231
265
  useForwardRef(triggerRef);
@@ -258,55 +292,75 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
258
292
  "onContextmenu"
259
293
  ];
260
294
  onMounted(() => {
261
- watch(() => props.virtualRef, (virtualEl) => {
262
- if (virtualEl) {
263
- triggerRef.value = unrefElement(virtualEl);
264
- }
265
- }, {
266
- immediate: true
267
- });
268
- watch(triggerRef, (el, prevEl) => {
269
- virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
270
- virtualTriggerAriaStopWatch = void 0;
271
- if (isElement(prevEl)) {
272
- TRIGGER_ELE_EVENTS.forEach((eventName) => {
273
- const handler = props[eventName];
274
- if (handler) {
275
- prevEl.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
276
- }
277
- });
295
+ watch(
296
+ () => props.virtualRef,
297
+ (virtualEl) => {
298
+ if (virtualEl) {
299
+ triggerRef.value = unrefElement(virtualEl);
300
+ }
301
+ },
302
+ {
303
+ immediate: true
278
304
  }
279
- if (isElement(el)) {
280
- TRIGGER_ELE_EVENTS.forEach((eventName) => {
281
- const handler = props[eventName];
282
- if (handler) {
283
- el.addEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
305
+ );
306
+ watch(
307
+ triggerRef,
308
+ (el, prevEl) => {
309
+ virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
310
+ virtualTriggerAriaStopWatch = void 0;
311
+ if (isElement(prevEl)) {
312
+ TRIGGER_ELE_EVENTS.forEach((eventName) => {
313
+ const handler = props[eventName];
314
+ if (handler) {
315
+ prevEl.removeEventListener(
316
+ eventName.slice(2).toLowerCase(),
317
+ handler,
318
+ ["onFocus", "onBlur"].includes(eventName)
319
+ );
320
+ }
321
+ });
322
+ }
323
+ if (isElement(el)) {
324
+ TRIGGER_ELE_EVENTS.forEach((eventName) => {
325
+ const handler = props[eventName];
326
+ if (handler) {
327
+ el.addEventListener(
328
+ eventName.slice(2).toLowerCase(),
329
+ handler,
330
+ ["onFocus", "onBlur"].includes(eventName)
331
+ );
332
+ }
333
+ });
334
+ if (isFocusable(el)) {
335
+ virtualTriggerAriaStopWatch = watch(
336
+ [ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded],
337
+ (watches) => {
338
+ [
339
+ "aria-controls",
340
+ "aria-describedby",
341
+ "aria-haspopup",
342
+ "aria-expanded"
343
+ ].forEach((key, idx) => {
344
+ isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
345
+ });
346
+ },
347
+ { immediate: true }
348
+ );
284
349
  }
285
- });
286
- if (isFocusable(el)) {
287
- virtualTriggerAriaStopWatch = watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
288
- [
289
- "aria-controls",
290
- "aria-describedby",
291
- "aria-haspopup",
292
- "aria-expanded"
293
- ].forEach((key, idx) => {
294
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
295
- });
296
- }, { immediate: true });
297
350
  }
351
+ if (isElement(prevEl) && isFocusable(prevEl)) {
352
+ [
353
+ "aria-controls",
354
+ "aria-describedby",
355
+ "aria-haspopup",
356
+ "aria-expanded"
357
+ ].forEach((key) => prevEl.removeAttribute(key));
358
+ }
359
+ },
360
+ {
361
+ immediate: true
298
362
  }
299
- if (isElement(prevEl) && isFocusable(prevEl)) {
300
- [
301
- "aria-controls",
302
- "aria-describedby",
303
- "aria-haspopup",
304
- "aria-expanded"
305
- ].forEach((key) => prevEl.removeAttribute(key));
306
- }
307
- }, {
308
- immediate: true
309
- });
363
+ );
310
364
  });
311
365
  onBeforeUnmount(() => {
312
366
  virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
@@ -316,21 +370,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
316
370
  TRIGGER_ELE_EVENTS.forEach((eventName) => {
317
371
  const handler = props[eventName];
318
372
  if (handler) {
319
- el.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
373
+ el.removeEventListener(
374
+ eventName.slice(2).toLowerCase(),
375
+ handler,
376
+ ["onFocus", "onBlur"].includes(eventName)
377
+ );
320
378
  }
321
379
  });
322
380
  triggerRef.value = void 0;
323
381
  }
324
382
  });
325
- expose({
383
+ __expose({
326
384
  triggerRef
327
385
  });
328
386
  return (_ctx, _cache) => {
329
387
  return !_ctx.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
330
- "aria-controls": unref(ariaControls),
331
- "aria-describedby": unref(ariaDescribedby),
332
- "aria-expanded": unref(ariaExpanded),
333
- "aria-haspopup": unref(ariaHaspopup)
388
+ "aria-controls": ariaControls.value,
389
+ "aria-describedby": ariaDescribedby.value,
390
+ "aria-expanded": ariaExpanded.value,
391
+ "aria-haspopup": ariaHaspopup.value
334
392
  }), {
335
393
  default: withCtx(() => [
336
394
  renderSlot(_ctx.$slots, "default")
@@ -340,7 +398,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
340
398
  };
341
399
  }
342
400
  });
343
- var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "trigger.vue"]]);
401
+ var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
344
402
 
345
403
  const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
346
404
  const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
@@ -382,7 +440,7 @@ const getVisibleElement = (elements, container) => {
382
440
  }
383
441
  };
384
442
  const isHidden = (element, container) => {
385
- if (typeof process !== "undefined" && process.env.NODE_ENV === "test")
443
+ if (process.env.NODE_ENV === "test")
386
444
  return false;
387
445
  if (getComputedStyle(element).visibility === "hidden")
388
446
  return true;
@@ -496,7 +554,9 @@ let registeredEscapeHandlers = [];
496
554
  const cachedHandler = (event) => {
497
555
  const code = getEventCode(event);
498
556
  if (code === EVENT_CODE.esc) {
499
- registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
557
+ registeredEscapeHandlers.forEach(
558
+ (registeredHandler) => registeredHandler(event)
559
+ );
500
560
  }
501
561
  };
502
562
  const useEscapeKeydown = (handler) => {
@@ -508,7 +568,9 @@ const useEscapeKeydown = (handler) => {
508
568
  registeredEscapeHandlers.push(handler);
509
569
  });
510
570
  onBeforeUnmount(() => {
511
- registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
571
+ registeredEscapeHandlers = registeredEscapeHandlers.filter(
572
+ (registeredHandler) => registeredHandler !== handler
573
+ );
512
574
  if (registeredEscapeHandlers.length === 0) {
513
575
  if (isClient)
514
576
  document.removeEventListener("keydown", cachedHandler);
@@ -516,7 +578,7 @@ const useEscapeKeydown = (handler) => {
516
578
  });
517
579
  };
518
580
 
519
- const _sfc_main$5 = defineComponent({
581
+ const _sfc_main$4 = defineComponent({
520
582
  name: "ElFocusTrap",
521
583
  inheritAttrs: false,
522
584
  props: {
@@ -608,11 +670,15 @@ const _sfc_main$5 = defineComponent({
608
670
  focusTrapRef: forwardRef,
609
671
  onKeydown
610
672
  });
611
- watch(() => props.focusTrapEl, (focusTrapEl) => {
612
- if (focusTrapEl) {
613
- forwardRef.value = focusTrapEl;
614
- }
615
- }, { immediate: true });
673
+ watch(
674
+ () => props.focusTrapEl,
675
+ (focusTrapEl) => {
676
+ if (focusTrapEl) {
677
+ forwardRef.value = focusTrapEl;
678
+ }
679
+ },
680
+ { immediate: true }
681
+ );
616
682
  watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
617
683
  if (forwardRef2) {
618
684
  forwardRef2.addEventListener("keydown", onKeydown);
@@ -685,11 +751,16 @@ const _sfc_main$5 = defineComponent({
685
751
  const trapContainer = unref(forwardRef);
686
752
  if (trapContainer) {
687
753
  focusableStack.push(focusLayer);
688
- const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
754
+ const prevFocusedElement = trapContainer.contains(
755
+ document.activeElement
756
+ ) ? lastFocusBeforeTrapped : document.activeElement;
689
757
  lastFocusBeforeTrapped = prevFocusedElement;
690
758
  const isPrevFocusContained = trapContainer.contains(prevFocusedElement);
691
759
  if (!isPrevFocusContained) {
692
- const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
760
+ const focusEvent = new Event(
761
+ FOCUS_AFTER_TRAPPED,
762
+ FOCUS_AFTER_TRAPPED_OPTS
763
+ );
693
764
  trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
694
765
  trapContainer.dispatchEvent(focusEvent);
695
766
  if (!focusEvent.defaultPrevented) {
@@ -702,7 +773,10 @@ const _sfc_main$5 = defineComponent({
702
773
  }
703
774
  }
704
775
  if (focusStartEl === "first") {
705
- focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
776
+ focusFirstDescendant(
777
+ obtainAllFocusableElements(trapContainer),
778
+ true
779
+ );
706
780
  }
707
781
  if (document.activeElement === prevFocusedElement || focusStartEl === "container") {
708
782
  tryFocus(trapContainer);
@@ -737,13 +811,16 @@ const _sfc_main$5 = defineComponent({
737
811
  if (props.trapped) {
738
812
  startTrap();
739
813
  }
740
- watch(() => props.trapped, (trapped) => {
741
- if (trapped) {
742
- startTrap();
743
- } else {
744
- stopTrap();
814
+ watch(
815
+ () => props.trapped,
816
+ (trapped) => {
817
+ if (trapped) {
818
+ startTrap();
819
+ } else {
820
+ stopTrap();
821
+ }
745
822
  }
746
- });
823
+ );
747
824
  });
748
825
  onBeforeUnmount(() => {
749
826
  if (props.trapped) {
@@ -766,7 +843,7 @@ const _sfc_main$5 = defineComponent({
766
843
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
767
844
  return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
768
845
  }
769
- var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render], ["__file", "focus-trap.vue"]]);
846
+ var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
770
847
 
771
848
  var E="top",R="bottom",W="right",P="left",me="auto",G=[E,R,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(t,e){return t.concat([e+"-"+U,e+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+"-"+U,e+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot=="undefined")return false;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!B(i)||!C(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===false?i.removeAttribute(a):i.setAttribute(a,s===true?"":s);}));});}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(f,c){return f[c]="",f},{});!B(o)||!C(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(f){o.removeAttribute(f);}));});}}var Ae={name:"applyStyles",enabled:true,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(t){return t.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=false);var n=t.getBoundingClientRect(),r=1,o=1;if(B(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Z(n.width)/a||1),i>0&&(o=Z(n.height)/i||1);}return {width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return true;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return true;r=r.parentNode||r.host;}while(r)}return false}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return ["table","td","th"].indexOf(C(t))>=0}function I(t){return ((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)==="html"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return !B(t)||N(t).position==="fixed"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(t)){var r=N(t);if(r.position==="fixed")return null}var o=ge(t);for(Pe(o)&&(o=o.host);B(o)&&["html","body"].indexOf(C(o))<0;){var i=N(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode;}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?e:n||Bt(t)||e}function Le(t){return ["top","bottom"].indexOf(t)>=0?"x":"y"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return {top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!="number"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=q(n.placement),f=Le(s),c=[P,W].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var m=Tt(o.padding,n),v=ke(i),l=f==="y"?E:P,h=f==="y"?R:W,p=n.rects.reference[u]+n.rects.reference[f]-a[f]-n.rects.popper[u],g=a[f]-n.rects.reference[f],x=se(i),y=x?f==="y"?x.clientHeight||0:x.clientWidth||0:0,$=p/2-g/2,d=m[l],b=y-v[u]-m[h],w=y/2-v[u]/2+$,O=fe(d,w,b),j=f;n.modifiersData[r]=(e={},e[j]=O,e.centerOffset=O-w,e);}}function Ct(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!it(e.elements.popper,o)||(e.elements.arrow=o));}var pt={name:"arrow",enabled:true,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return {x:Z(e*o)/o||0,y:Z(n*o)/o||0}}function ut(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,m=t.isFixed,v=a.x,l=v===void 0?0:v,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:l,y:p}):{x:l,y:p};l=g.x,p=g.y;var x=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),$=P,d=E,b=window;if(c){var w=se(n),O="clientHeight",j="clientWidth";if(w===H(n)&&(w=I(n),N(w).position!=="static"&&s==="absolute"&&(O="scrollHeight",j="scrollWidth")),w=w,o===E||(o===P||o===W)&&i===J){d=R;var A=m&&w===b&&b.visualViewport?b.visualViewport.height:w[O];p-=A-r.height,p*=f?1:-1;}if(o===P||(o===E||o===R)&&i===J){$=W;var k=m&&w===b&&b.visualViewport?b.visualViewport.width:w[j];l-=k-r.width,l*=f?1:-1;}}var D=Object.assign({position:s},c&&qt),S=u===true?Vt({x:l,y:p}):{x:l,y:p};if(l=S.x,p=S.y,f){var L;return Object.assign({},D,(L={},L[d]=y?"0":"",L[$]=x?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+l+"px, "+p+"px)":"translate3d("+l+"px, "+p+"px, 0)",L))}return Object.assign({},D,(e={},e[d]=y?p+"px":"",e[$]=x?l+"px":"",e.transform="",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?true:r,i=n.adaptive,a=i===void 0?true:i,s=n.roundOffsets,f=s===void 0?true:s,c={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement});}var Me={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:true};function It(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?true:o,a=r.resize,s=a===void 0?true:a,f=H(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ye);}),s&&f.addEventListener("resize",n.update,ye),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ye);}),s&&f.removeEventListener("resize",n.update,ye);}}var Re={name:"eventListeners",enabled:true,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return {scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Be(t),y:s}}function Ut(t){var e,n=I(t),r=We(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(t),f=-r.scrollTop;return N(o||n).direction==="rtl"&&(s+=X(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return /auto|scroll|overlay|hidden/.test(n+o+r)}function dt(t){return ["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=H(r),a=o?[i].concat(i.visualViewport||[],Se(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(ce(ge(a)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=["absolute","fixed"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(o){return Q(o)&&it(o,r)&&C(o)!=="body"}):[]}function Gt(t,e,n){var r=e==="clippingParents"?Yt(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,f){var c=ht(t,f);return s.top=X(c.top,s.top),s.right=ve(c.right,s.right),s.bottom=ve(c.bottom,s.bottom),s.left=X(c.left,s.left),s},ht(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,n=t.element,r=t.placement,o=r?q(r):null,i=r?te(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,f;switch(o){case E:f={x:a,y:e.y-n.height};break;case R:f={x:a,y:e.y+e.height};break;case W:f={x:e.x+e.width,y:s};break;case P:f={x:e.x-n.width,y:s};break;default:f={x:e.x,y:e.y};}var c=o?Le(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case U:f[c]=f[c]-(e[u]/2-n[u]/2);break;case J:f[c]=f[c]+(e[u]/2-n[u]/2);break}}return f}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?Xe:i,s=n.rootBoundary,f=s===void 0?je:s,c=n.elementContext,u=c===void 0?K:c,m=n.altBoundary,v=m===void 0?false:m,l=n.padding,h=l===void 0?0:l,p=ft(typeof h!="number"?h:ct(h,G)),g=u===K?Ye:K,x=t.rects.popper,y=t.elements[v?g:u],$=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),a,f),d=ee(t.elements.reference),b=mt({reference:d,element:x,placement:o}),w=Te(Object.assign({},x,b)),O=u===K?w:d,j={top:$.top-O.top+p.top,bottom:O.bottom-$.bottom+p.bottom,left:$.left-O.left+p.left,right:O.right-$.right+p.right},A=t.modifiersData.offset;if(u===K&&A){var k=A[o];Object.keys(j).forEach(function(D){var S=[W,R].indexOf(D)>=0?1:-1,L=[E,R].indexOf(D)>=0?"y":"x";j[D]+=k[L]*S;});}return j}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=f===void 0?Ee:f,u=te(r),m=u?s?De:De.filter(function(h){return te(h)===u}):G,v=m.filter(function(h){return c.indexOf(h)>=0});v.length===0&&(v=m);var l=v.reduce(function(h,p){return h[p]=ne(t,{placement:p,boundary:o,rootBoundary:i,padding:a})[q(p)],h},{});return Object.keys(l).sort(function(h,p){return l[h]-l[p]})}function Kt(t){if(q(t)===me)return [];var e=be(t);return [lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?true:o,a=n.altAxis,s=a===void 0?true:a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,m=n.rootBoundary,v=n.altBoundary,l=n.flipVariations,h=l===void 0?true:l,p=n.allowedAutoPlacements,g=e.options.placement,x=q(g),y=x===g,$=f||(y||!h?[be(g)]:Kt(g)),d=[g].concat($).reduce(function(z,V){return z.concat(q(V)===me?Jt(e,{placement:V,boundary:u,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:p}):V)},[]),b=e.rects.reference,w=e.rects.popper,O=new Map,j=true,A=d[0],k=0;k<d.length;k++){var D=d[k],S=q(D),L=te(D)===U,re=[E,R].indexOf(S)>=0,oe=re?"width":"height",M=ne(e,{placement:D,boundary:u,rootBoundary:m,altBoundary:v,padding:c}),T=re?L?W:P:L?R:E;b[oe]>w[oe]&&(T=be(T));var pe=be(T),_=[];if(i&&_.push(M[S]<=0),s&&_.push(M[T]<=0,M[pe]<=0),_.every(function(z){return z})){A=D,j=false;break}O.set(D,_);}if(j)for(var ue=h?3:1,xe=function(z){var V=d.find(function(de){var ae=O.get(de);if(ae)return ae.slice(0,z).every(function(Y){return Y})});if(V)return A=V,"break"},ie=ue;ie>0;ie--){var le=xe(ie);if(le==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=true,e.placement=A,e.reset=true);}}var vt={name:"flip",enabled:true,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:false}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return [E,W,R,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ne(e,{elementContext:"reference"}),s=ne(e,{altBoundary:true}),f=gt(a,r),c=gt(s,o,i),u=yt(f),m=yt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":m});}var bt={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(t,e,n){var r=q(t),o=[P,E].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,W].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tn(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ee.reduce(function(u,m){return u[m]=en(m,e.rects,i),u},{}),s=a[e.placement],f=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a;}var wt={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement});}var He={name:"popperOffsets",enabled:true,phase:"read",fn:nn,data:{}};function rn(t){return t==="x"?"y":"x"}function on(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?true:o,a=n.altAxis,s=a===void 0?false:a,f=n.boundary,c=n.rootBoundary,u=n.altBoundary,m=n.padding,v=n.tether,l=v===void 0?true:v,h=n.tetherOffset,p=h===void 0?0:h,g=ne(e,{boundary:f,rootBoundary:c,padding:m,altBoundary:u}),x=q(e.placement),y=te(e.placement),$=!y,d=Le(x),b=rn(d),w=e.modifiersData.popperOffsets,O=e.rects.reference,j=e.rects.popper,A=typeof p=="function"?p(Object.assign({},e.rects,{placement:e.placement})):p,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(w){if(i){var L,re=d==="y"?E:P,oe=d==="y"?R:W,M=d==="y"?"height":"width",T=w[d],pe=T+g[re],_=T-g[oe],ue=l?-j[M]/2:0,xe=y===U?O[M]:j[M],ie=y===U?-j[M]:-O[M],le=e.elements.arrow,z=l&&le?ke(le):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:st(),de=V[re],ae=V[oe],Y=fe(0,O[M],z[M]),jt=$?O[M]/2-ue-Y-de-k.mainAxis:xe-Y-de-k.mainAxis,Dt=$?-O[M]/2+ue+Y+ae+k.mainAxis:ie+Y+ae+k.mainAxis,Oe=e.elements.arrow&&se(e.elements.arrow),Et=Oe?d==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(L=D==null?void 0:D[d])!=null?L:0,Pt=T+jt-Ce-Et,At=T+Dt-Ce,qe=fe(l?ve(pe,Pt):pe,T,l?X(_,At):_);w[d]=qe,S[d]=qe-T;}if(s){var Ve,kt=d==="x"?E:P,Lt=d==="x"?R:W,F=w[b],he=b==="y"?"height":"width",Ne=F+g[kt],Ie=F-g[Lt],$e=[E,P].indexOf(x)!==-1,_e=(Ve=D==null?void 0:D[b])!=null?Ve:0,ze=$e?Ne:F-O[he]-j[he]-_e+k.altAxis,Fe=$e?F+O[he]+j[he]-_e-k.altAxis:Ie,Ue=l&&$e?St(ze,F,Fe):fe(l?ze:Ne,F,l?Fe:Ie);w[b]=Ue,S[b]=Ue-F;}e.modifiersData[r]=S;}}var xt={name:"preventOverflow",enabled:true,phase:"main",fn:on,requiresIfExists:["offset"]};function an(t){return {scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=false);var r=B(e),o=B(e)&&fn(e),i=I(e),a=ee(t,o),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return (r||!r&&!n)&&((C(e)!=="body"||Se(i))&&(s=sn(e)),B(e)?(f=ee(e,true),f.x+=e.clientLeft,f.y+=e.clientTop):i&&(f.x=Be(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i);});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var f=e.get(s);f&&o(f);}}),r.push(i);}return t.forEach(function(i){n.has(i.name)||o(i);}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t());});})),e}}function dn(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return !e.some(function(r){return !(r&&typeof r.getBoundingClientRect=="function")})}function we(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?Ot:o;return function(a,s,f){f===void 0&&(f=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},u=[],m=false,v={state:c,setOptions:function(p){var g=typeof p=="function"?p(c.options):p;h(),c.options=Object.assign({},i,c.options,g),c.scrollParents={reference:Q(a)?ce(a):a.contextElement?ce(a.contextElement):[],popper:ce(s)};var x=un(dn([].concat(r,c.options.modifiers)));return c.orderedModifiers=x.filter(function(y){return y.enabled}),l(),v.update()},forceUpdate:function(){if(!m){var p=c.elements,g=p.reference,x=p.popper;if($t(g,x)){c.rects={reference:cn(g,se(x),c.options.strategy==="fixed"),popper:ke(x)},c.reset=false,c.placement=c.options.placement,c.orderedModifiers.forEach(function(j){return c.modifiersData[j.name]=Object.assign({},j.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===true){c.reset=false,y=-1;continue}var $=c.orderedModifiers[y],d=$.fn,b=$.options,w=b===void 0?{}:b,O=$.name;typeof d=="function"&&(c=d({state:c,options:w,name:O,instance:v})||c);}}}},update:ln(function(){return new Promise(function(p){v.forceUpdate(),p(c);})}),destroy:function(){h(),m=true;}};if(!$t(a,s))return v;v.setOptions(f).then(function(p){!m&&f.onFirstUpdate&&f.onFirstUpdate(p);});function l(){c.orderedModifiers.forEach(function(p){var g=p.name,x=p.options,y=x===void 0?{}:x,$=p.effect;if(typeof $=="function"){var d=$({state:c,name:g,instance:v,options:y}),b=function(){};u.push(d||b);}});}function h(){u.forEach(function(p){return p()}),u=[];}return v}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});
772
849
 
@@ -1009,20 +1086,31 @@ const usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
1009
1086
  instanceRef.value.destroy();
1010
1087
  instanceRef.value = void 0;
1011
1088
  };
1012
- watch(options, (newOptions) => {
1013
- const instance = unref(instanceRef);
1014
- if (instance) {
1015
- instance.setOptions(newOptions);
1089
+ watch(
1090
+ options,
1091
+ (newOptions) => {
1092
+ const instance = unref(instanceRef);
1093
+ if (instance) {
1094
+ instance.setOptions(newOptions);
1095
+ }
1096
+ },
1097
+ {
1098
+ deep: true
1016
1099
  }
1017
- }, {
1018
- deep: true
1019
- });
1020
- watch([referenceElementRef, popperElementRef], ([referenceElement, popperElement]) => {
1021
- destroy();
1022
- if (!referenceElement || !popperElement)
1023
- return;
1024
- instanceRef.value = yn(referenceElement, popperElement, unref(options));
1025
- });
1100
+ );
1101
+ watch(
1102
+ [referenceElementRef, popperElementRef],
1103
+ ([referenceElement, popperElement]) => {
1104
+ destroy();
1105
+ if (!referenceElement || !popperElement)
1106
+ return;
1107
+ instanceRef.value = yn(
1108
+ referenceElement,
1109
+ popperElement,
1110
+ unref(options)
1111
+ );
1112
+ }
1113
+ );
1026
1114
  onBeforeUnmount(() => {
1027
1115
  destroy();
1028
1116
  });
@@ -1046,8 +1134,16 @@ const usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
1046
1134
  };
1047
1135
  function deriveState(state) {
1048
1136
  const elements = Object.keys(state.elements);
1049
- const styles = fromPairs(elements.map((element) => [element, state.styles[element] || {}]));
1050
- const attributes = fromPairs(elements.map((element) => [element, state.attributes[element]]));
1137
+ const styles = fromPairs(
1138
+ elements.map(
1139
+ (element) => [element, state.styles[element] || {}]
1140
+ )
1141
+ );
1142
+ const attributes = fromPairs(
1143
+ elements.map(
1144
+ (element) => [element, state.attributes[element]]
1145
+ )
1146
+ );
1051
1147
  return {
1052
1148
  styles,
1053
1149
  attributes
@@ -1056,7 +1152,10 @@ function deriveState(state) {
1056
1152
 
1057
1153
  const DEFAULT_ARROW_OFFSET = 0;
1058
1154
  const usePopperContent = (props) => {
1059
- const { popperInstanceRef, contentRef, triggerRef, role } = inject(POPPER_INJECTION_KEY, void 0);
1155
+ const { popperInstanceRef, contentRef, triggerRef, role } = inject(
1156
+ POPPER_INJECTION_KEY,
1157
+ void 0
1158
+ );
1060
1159
  const arrowRef = ref();
1061
1160
  const arrowOffset = computed(() => props.arrowOffset);
1062
1161
  const eventListenerModifier = computed(() => {
@@ -1089,18 +1188,23 @@ const usePopperContent = (props) => {
1089
1188
  ])
1090
1189
  };
1091
1190
  });
1092
- const computedReference = computed(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef));
1191
+ const computedReference = computed(
1192
+ () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)
1193
+ );
1093
1194
  const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options);
1094
1195
  watch(instanceRef, (instance) => popperInstanceRef.value = instance, {
1095
1196
  flush: "sync"
1096
1197
  });
1097
1198
  onMounted(() => {
1098
- watch(() => {
1099
- var _a, _b;
1100
- return (_b = (_a = unref(computedReference)) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a);
1101
- }, () => {
1102
- update();
1103
- });
1199
+ watch(
1200
+ () => {
1201
+ var _a, _b;
1202
+ return (_b = (_a = unref(computedReference)) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a);
1203
+ },
1204
+ () => {
1205
+ update();
1206
+ }
1207
+ );
1104
1208
  });
1105
1209
  onBeforeUnmount(() => {
1106
1210
  popperInstanceRef.value = void 0;
@@ -1126,7 +1230,9 @@ const usePopperContentDOM = (props, {
1126
1230
  const { nextZIndex } = useZIndex();
1127
1231
  const ns = useNamespace("popper");
1128
1232
  const contentAttrs = computed(() => unref(attributes).popper);
1129
- const contentZIndex = ref(isNumber(props.zIndex) ? props.zIndex : nextZIndex());
1233
+ const contentZIndex = ref(
1234
+ isNumber(props.zIndex) ? props.zIndex : nextZIndex()
1235
+ );
1130
1236
  const contentClass = computed(() => [
1131
1237
  ns.b(),
1132
1238
  ns.is("pure", props.pure),
@@ -1140,8 +1246,12 @@ const usePopperContentDOM = (props, {
1140
1246
  props.popperStyle || {}
1141
1247
  ];
1142
1248
  });
1143
- const ariaModal = computed(() => role.value === "dialog" ? "false" : void 0);
1144
- const arrowStyle = computed(() => unref(styles).arrow || {});
1249
+ const ariaModal = computed(
1250
+ () => role.value === "dialog" ? "false" : void 0
1251
+ );
1252
+ const arrowStyle = computed(
1253
+ () => unref(styles).arrow || {}
1254
+ );
1145
1255
  const updateZIndex = () => {
1146
1256
  contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex();
1147
1257
  };
@@ -1156,14 +1266,15 @@ const usePopperContentDOM = (props, {
1156
1266
  };
1157
1267
  };
1158
1268
 
1159
- const __default__$3 = defineComponent({
1160
- name: "ElPopperContent"
1161
- });
1162
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1163
- ...__default__$3,
1269
+ const _sfc_main$3 = defineComponent({
1270
+ ...{
1271
+ name: "ElPopperContent"
1272
+ },
1273
+ __name: "content",
1164
1274
  props: popperContentProps,
1165
1275
  emits: popperContentEmits,
1166
- setup(__props, { expose, emit }) {
1276
+ setup(__props, { expose: __expose, emit: __emit }) {
1277
+ const emit = __emit;
1167
1278
  const props = __props;
1168
1279
  const {
1169
1280
  focusStartRef,
@@ -1213,24 +1324,32 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1213
1324
  }
1214
1325
  };
1215
1326
  onMounted(() => {
1216
- watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
1217
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
1218
- triggerTargetAriaStopWatch = void 0;
1219
- const el = unref(triggerTargetEl || contentRef.value);
1220
- const prevEl = unref(prevTriggerTargetEl || contentRef.value);
1221
- if (isElement(el)) {
1222
- triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
1223
- ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
1224
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
1327
+ watch(
1328
+ () => props.triggerTargetEl,
1329
+ (triggerTargetEl, prevTriggerTargetEl) => {
1330
+ triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
1331
+ triggerTargetAriaStopWatch = void 0;
1332
+ const el = unref(triggerTargetEl || contentRef.value);
1333
+ const prevEl = unref(prevTriggerTargetEl || contentRef.value);
1334
+ if (isElement(el)) {
1335
+ triggerTargetAriaStopWatch = watch(
1336
+ [role, () => props.ariaLabel, ariaModal, () => props.id],
1337
+ (watches) => {
1338
+ ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
1339
+ isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
1340
+ });
1341
+ },
1342
+ { immediate: true }
1343
+ );
1344
+ }
1345
+ if (prevEl !== el && isElement(prevEl)) {
1346
+ ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
1347
+ prevEl.removeAttribute(key);
1225
1348
  });
1226
- }, { immediate: true });
1227
- }
1228
- if (prevEl !== el && isElement(prevEl)) {
1229
- ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
1230
- prevEl.removeAttribute(key);
1231
- });
1232
- }
1233
- }, { immediate: true });
1349
+ }
1350
+ },
1351
+ { immediate: true }
1352
+ );
1234
1353
  watch(() => props.visible, togglePopperAlive, { immediate: true });
1235
1354
  });
1236
1355
  onBeforeUnmount(() => {
@@ -1238,45 +1357,50 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1238
1357
  triggerTargetAriaStopWatch = void 0;
1239
1358
  contentRef.value = void 0;
1240
1359
  });
1241
- expose({
1360
+ __expose({
1242
1361
  popperContentRef: contentRef,
1243
1362
  popperInstanceRef: instanceRef,
1244
1363
  updatePopper,
1245
1364
  contentStyle
1246
1365
  });
1247
1366
  return (_ctx, _cache) => {
1248
- return openBlock(), createElementBlock("div", mergeProps({
1249
- ref_key: "contentRef",
1250
- ref: contentRef
1251
- }, unref(contentAttrs), {
1252
- style: unref(contentStyle),
1253
- class: unref(contentClass),
1254
- tabindex: "-1",
1255
- onMouseenter: (e) => _ctx.$emit("mouseenter", e),
1256
- onMouseleave: (e) => _ctx.$emit("mouseleave", e)
1257
- }), [
1258
- createVNode(unref(ElFocusTrap), {
1259
- loop: _ctx.loop,
1260
- trapped: unref(trapped),
1261
- "trap-on-focus-in": true,
1262
- "focus-trap-el": unref(contentRef),
1263
- "focus-start-el": unref(focusStartRef),
1264
- onFocusAfterTrapped: unref(onFocusAfterTrapped),
1265
- onFocusAfterReleased: unref(onFocusAfterReleased),
1266
- onFocusin: unref(onFocusInTrap),
1267
- onFocusoutPrevented: unref(onFocusoutPrevented),
1268
- onReleaseRequested: unref(onReleaseRequested)
1269
- }, {
1270
- default: withCtx(() => [
1271
- renderSlot(_ctx.$slots, "default")
1272
- ]),
1273
- _: 3
1274
- }, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
1275
- ], 16, ["onMouseenter", "onMouseleave"]);
1367
+ return openBlock(), createElementBlock(
1368
+ "div",
1369
+ mergeProps({
1370
+ ref_key: "contentRef",
1371
+ ref: contentRef
1372
+ }, unref(contentAttrs), {
1373
+ style: unref(contentStyle),
1374
+ class: unref(contentClass),
1375
+ tabindex: "-1",
1376
+ onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
1377
+ onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
1378
+ }),
1379
+ [
1380
+ createVNode(unref(ElFocusTrap), {
1381
+ loop: _ctx.loop,
1382
+ trapped: unref(trapped),
1383
+ "trap-on-focus-in": true,
1384
+ "focus-trap-el": unref(contentRef),
1385
+ "focus-start-el": unref(focusStartRef),
1386
+ onFocusAfterTrapped: unref(onFocusAfterTrapped),
1387
+ onFocusAfterReleased: unref(onFocusAfterReleased),
1388
+ onFocusin: unref(onFocusInTrap),
1389
+ onFocusoutPrevented: unref(onFocusoutPrevented),
1390
+ onReleaseRequested: unref(onReleaseRequested)
1391
+ }, {
1392
+ default: withCtx(() => [
1393
+ renderSlot(_ctx.$slots, "default")
1394
+ ]),
1395
+ _: 3
1396
+ }, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
1397
+ ],
1398
+ 16
1399
+ );
1276
1400
  };
1277
1401
  }
1278
1402
  });
1279
- var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "content.vue"]]);
1403
+ var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);
1280
1404
 
1281
1405
  const ElPopper = withInstall(Popper);
1282
1406
 
@@ -1345,14 +1469,6 @@ const useDelayedToggle = ({
1345
1469
  };
1346
1470
  };
1347
1471
 
1348
- const teleportProps = buildProps({
1349
- to: {
1350
- type: definePropType([String, Object]),
1351
- required: true
1352
- },
1353
- disabled: Boolean
1354
- });
1355
-
1356
1472
  const useTooltipContentProps = buildProps({
1357
1473
  ...useDelayedToggleProps,
1358
1474
  ...popperContentProps,
@@ -1418,7 +1534,9 @@ const createModelToggleComposable = (name) => {
1418
1534
  const instance = getCurrentInstance();
1419
1535
  const { emit } = instance;
1420
1536
  const props = instance.props;
1421
- const hasUpdateHandler = computed(() => isFunction(props[updateEventKeyRaw]));
1537
+ const hasUpdateHandler = computed(
1538
+ () => isFunction(props[updateEventKeyRaw])
1539
+ );
1422
1540
  const isModelBindingAbsent = computed(() => props[name] === null);
1423
1541
  const doShow = (event) => {
1424
1542
  if (indicator.value === true) {
@@ -1490,13 +1608,16 @@ const createModelToggleComposable = (name) => {
1490
1608
  };
1491
1609
  watch(() => props[name], onChange);
1492
1610
  if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) {
1493
- watch(() => ({
1494
- ...instance.proxy.$route
1495
- }), () => {
1496
- if (shouldHideWhenRouteChanges.value && indicator.value) {
1497
- hide();
1611
+ watch(
1612
+ () => ({
1613
+ ...instance.proxy.$route
1614
+ }),
1615
+ () => {
1616
+ if (shouldHideWhenRouteChanges.value && indicator.value) {
1617
+ hide();
1618
+ }
1498
1619
  }
1499
- });
1620
+ );
1500
1621
  }
1501
1622
  onMounted(() => {
1502
1623
  onChange(props[name]);
@@ -1553,16 +1674,19 @@ const whenTrigger = (trigger, type, handler) => {
1553
1674
  };
1554
1675
  };
1555
1676
 
1556
- const __default__$2 = defineComponent({
1557
- name: "ElTooltipTrigger"
1558
- });
1559
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1560
- ...__default__$2,
1677
+ const _sfc_main$2 = defineComponent({
1678
+ ...{
1679
+ name: "ElTooltipTrigger"
1680
+ },
1681
+ __name: "trigger",
1561
1682
  props: useTooltipTriggerProps,
1562
- setup(__props, { expose }) {
1683
+ setup(__props, { expose: __expose }) {
1563
1684
  const props = __props;
1564
1685
  const ns = useNamespace("tooltip");
1565
- const { controlled, id, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
1686
+ const { controlled, id, open, onOpen, onClose, onToggle } = inject(
1687
+ TOOLTIP_INJECTION_KEY,
1688
+ void 0
1689
+ );
1566
1690
  const triggerRef = ref(null);
1567
1691
  const stopWhenControlledOrDisabled = () => {
1568
1692
  if (unref(controlled) || props.disabled) {
@@ -1570,34 +1694,55 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1570
1694
  }
1571
1695
  };
1572
1696
  const trigger = toRef(props, "trigger");
1573
- const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", (e) => {
1574
- onOpen(e);
1575
- if (props.focusOnTarget && e.target) {
1576
- nextTick(() => {
1577
- focusElement(e.target, { preventScroll: true });
1578
- });
1579
- }
1580
- }));
1581
- const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
1582
- const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
1583
- if (e.button === 0) {
1584
- onToggle(e);
1585
- }
1586
- }));
1587
- const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
1588
- const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
1589
- const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
1590
- e.preventDefault();
1591
- onToggle(e);
1592
- }));
1593
- const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
1594
- const code = getEventCode(e);
1595
- if (props.triggerKeys.includes(code)) {
1697
+ const onMouseenter = composeEventHandlers(
1698
+ stopWhenControlledOrDisabled,
1699
+ whenTrigger(trigger, "hover", (e) => {
1700
+ onOpen(e);
1701
+ if (props.focusOnTarget && e.target) {
1702
+ nextTick(() => {
1703
+ focusElement(e.target, { preventScroll: true });
1704
+ });
1705
+ }
1706
+ })
1707
+ );
1708
+ const onMouseleave = composeEventHandlers(
1709
+ stopWhenControlledOrDisabled,
1710
+ whenTrigger(trigger, "hover", onClose)
1711
+ );
1712
+ const onClick = composeEventHandlers(
1713
+ stopWhenControlledOrDisabled,
1714
+ whenTrigger(trigger, "click", (e) => {
1715
+ if (e.button === 0) {
1716
+ onToggle(e);
1717
+ }
1718
+ })
1719
+ );
1720
+ const onFocus = composeEventHandlers(
1721
+ stopWhenControlledOrDisabled,
1722
+ whenTrigger(trigger, "focus", onOpen)
1723
+ );
1724
+ const onBlur = composeEventHandlers(
1725
+ stopWhenControlledOrDisabled,
1726
+ whenTrigger(trigger, "focus", onClose)
1727
+ );
1728
+ const onContextMenu = composeEventHandlers(
1729
+ stopWhenControlledOrDisabled,
1730
+ whenTrigger(trigger, "contextmenu", (e) => {
1596
1731
  e.preventDefault();
1597
1732
  onToggle(e);
1733
+ })
1734
+ );
1735
+ const onKeydown = composeEventHandlers(
1736
+ stopWhenControlledOrDisabled,
1737
+ (e) => {
1738
+ const code = getEventCode(e);
1739
+ if (props.triggerKeys.includes(code)) {
1740
+ e.preventDefault();
1741
+ onToggle(e);
1742
+ }
1598
1743
  }
1599
- });
1600
- expose({
1744
+ );
1745
+ __expose({
1601
1746
  triggerRef
1602
1747
  });
1603
1748
  return (_ctx, _cache) => {
@@ -1623,25 +1768,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1623
1768
  };
1624
1769
  }
1625
1770
  });
1626
- var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "trigger.vue"]]);
1627
-
1628
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1629
- __name: "teleport",
1630
- props: teleportProps,
1631
- setup(__props) {
1632
- return (_ctx, _cache) => {
1633
- return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport$1, {
1634
- key: 1,
1635
- to: _ctx.to
1636
- }, [
1637
- renderSlot(_ctx.$slots, "default")
1638
- ], 8, ["to"]));
1639
- };
1640
- }
1641
- });
1642
- var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "teleport.vue"]]);
1643
-
1644
- const ElTeleport = withInstall(Teleport);
1771
+ var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);
1645
1772
 
1646
1773
  const usePopperContainerId = () => {
1647
1774
  const namespace = useGetDerivedNamespace();
@@ -1666,7 +1793,7 @@ const usePopperContainer = () => {
1666
1793
  onBeforeMount(() => {
1667
1794
  if (!isClient)
1668
1795
  return;
1669
- if (typeof process !== "undefined" && process.env.NODE_ENV === "test" || !document.body.querySelector(selector.value)) {
1796
+ if (process.env.NODE_ENV === "test" || !document.body.querySelector(selector.value)) {
1670
1797
  createContainer(id.value);
1671
1798
  }
1672
1799
  });
@@ -1686,14 +1813,14 @@ const castArray = (arr) => {
1686
1813
  return isArray(arr) ? arr : [arr];
1687
1814
  };
1688
1815
 
1689
- const __default__$1 = defineComponent({
1690
- name: "ElTooltipContent",
1691
- inheritAttrs: false
1692
- });
1693
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1694
- ...__default__$1,
1816
+ const _sfc_main$1 = defineComponent({
1817
+ ...{
1818
+ name: "ElTooltipContent",
1819
+ inheritAttrs: false
1820
+ },
1821
+ __name: "content",
1695
1822
  props: useTooltipContentProps,
1696
- setup(__props, { expose }) {
1823
+ setup(__props, { expose: __expose }) {
1697
1824
  const props = __props;
1698
1825
  const { selector } = usePopperContainerId();
1699
1826
  const ns = useNamespace("tooltip");
@@ -1719,8 +1846,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1719
1846
  return props.transition || `${ns.namespace.value}-fade-in-linear`;
1720
1847
  });
1721
1848
  const persistentRef = computed(() => {
1722
- if (typeof process !== "undefined") {
1723
- if (process.env.NODE_ENV === "test" && !process.env.RUN_TEST_WITH_PERSISTENT) {
1849
+ if (process.env.NODE_ENV === "test") {
1850
+ if (!process.env.RUN_TEST_WITH_PERSISTENT) {
1724
1851
  return true;
1725
1852
  }
1726
1853
  }
@@ -1784,43 +1911,54 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1784
1911
  const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement;
1785
1912
  return popperContent == null ? void 0 : popperContent.contains(activeElement);
1786
1913
  };
1787
- watch(() => unref(open), (val) => {
1788
- if (!val) {
1789
- stopHandle == null ? void 0 : stopHandle();
1790
- } else {
1791
- ariaHidden.value = false;
1792
- stopHandle = onClickOutside(popperContentRef, () => {
1793
- if (unref(controlled))
1794
- return;
1795
- const needClose = castArray(unref(trigger)).every((item) => {
1796
- return item !== "hover" && item !== "focus";
1797
- });
1798
- if (needClose) {
1799
- onClose();
1800
- }
1801
- }, { detectIframe: true });
1914
+ watch(
1915
+ () => unref(open),
1916
+ (val) => {
1917
+ if (!val) {
1918
+ stopHandle == null ? void 0 : stopHandle();
1919
+ } else {
1920
+ ariaHidden.value = false;
1921
+ stopHandle = onClickOutside(
1922
+ popperContentRef,
1923
+ () => {
1924
+ if (unref(controlled))
1925
+ return;
1926
+ const needClose = castArray(unref(trigger)).every((item) => {
1927
+ return item !== "hover" && item !== "focus";
1928
+ });
1929
+ if (needClose) {
1930
+ onClose();
1931
+ }
1932
+ },
1933
+ { detectIframe: true }
1934
+ );
1935
+ }
1936
+ },
1937
+ {
1938
+ flush: "post"
1802
1939
  }
1803
- }, {
1804
- flush: "post"
1805
- });
1806
- watch(() => props.content, () => {
1807
- var _a, _b;
1808
- (_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
1809
- });
1810
- expose({
1940
+ );
1941
+ watch(
1942
+ () => props.content,
1943
+ () => {
1944
+ var _a, _b;
1945
+ (_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
1946
+ }
1947
+ );
1948
+ __expose({
1811
1949
  contentRef,
1812
1950
  isFocusInsideContent
1813
1951
  });
1814
1952
  return (_ctx, _cache) => {
1815
1953
  return openBlock(), createBlock(unref(ElTeleport), {
1816
1954
  disabled: !_ctx.teleported,
1817
- to: unref(appendTo)
1955
+ to: appendTo.value
1818
1956
  }, {
1819
1957
  default: withCtx(() => [
1820
- unref(shouldRender) || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
1958
+ shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
1821
1959
  key: 0,
1822
- name: unref(transitionClass),
1823
- appear: !unref(persistentRef),
1960
+ name: transitionClass.value,
1961
+ appear: !persistentRef.value,
1824
1962
  onAfterLeave: onTransitionLeave,
1825
1963
  onBeforeEnter,
1826
1964
  onAfterEnter: onAfterShow,
@@ -1847,10 +1985,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1847
1985
  enterable: _ctx.enterable,
1848
1986
  pure: _ctx.pure,
1849
1987
  "popper-class": _ctx.popperClass,
1850
- "popper-style": [_ctx.popperStyle, unref(contentStyle)],
1988
+ "popper-style": [_ctx.popperStyle, contentStyle.value],
1851
1989
  "reference-el": _ctx.referenceEl,
1852
1990
  "trigger-target-el": _ctx.triggerTargetEl,
1853
- visible: unref(shouldShow),
1991
+ visible: shouldShow.value,
1854
1992
  "z-index": _ctx.zIndex,
1855
1993
  loop: _ctx.loop,
1856
1994
  onMouseenter: unref(onContentEnter),
@@ -1863,7 +2001,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1863
2001
  ]),
1864
2002
  _: 3
1865
2003
  }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "arrow-offset", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "loop", "onMouseenter", "onMouseleave", "onClose"]), [
1866
- [vShow, unref(shouldShow)]
2004
+ [vShow, shouldShow.value]
1867
2005
  ])
1868
2006
  ]),
1869
2007
  _: 3
@@ -1874,17 +2012,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1874
2012
  };
1875
2013
  }
1876
2014
  });
1877
- var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "content.vue"]]);
2015
+ var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
1878
2016
 
1879
- const __default__ = defineComponent({
1880
- name: "ElTooltip"
1881
- });
1882
- const _sfc_main = /* @__PURE__ */ defineComponent({
1883
- ...__default__,
2017
+ const _hoisted_1 = ["innerHTML"];
2018
+ const _hoisted_2 = { key: 1 };
2019
+ const _sfc_main = defineComponent({
2020
+ ...{
2021
+ name: "ElTooltip"
2022
+ },
2023
+ __name: "tooltip",
1884
2024
  props: useTooltipProps,
1885
2025
  emits: tooltipEmits,
1886
- setup(__props, { expose, emit }) {
2026
+ setup(__props, { expose: __expose, emit: __emit }) {
1887
2027
  const props = __props;
2028
+ const emit = __emit;
1888
2029
  usePopperContainer();
1889
2030
  const ns = useNamespace("tooltip");
1890
2031
  const id = useId();
@@ -1910,7 +2051,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1910
2051
  open: show,
1911
2052
  close: hide
1912
2053
  });
1913
- const controlled = computed(() => isBoolean(props.visible) && !hasUpdateHandler.value);
2054
+ const controlled = computed(
2055
+ () => isBoolean(props.visible) && !hasUpdateHandler.value
2056
+ );
1914
2057
  const kls = computed(() => {
1915
2058
  return [ns.b(), props.popperClass];
1916
2059
  });
@@ -1942,11 +2085,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1942
2085
  },
1943
2086
  updatePopper
1944
2087
  });
1945
- watch(() => props.disabled, (disabled) => {
1946
- if (disabled && open.value) {
1947
- open.value = false;
2088
+ watch(
2089
+ () => props.disabled,
2090
+ (disabled) => {
2091
+ if (disabled && open.value) {
2092
+ open.value = false;
2093
+ }
1948
2094
  }
1949
- });
2095
+ );
1950
2096
  const isFocusInsideContent = (event) => {
1951
2097
  var _a;
1952
2098
  return (_a = contentRef.value) == null ? void 0 : _a.isFocusInsideContent(event);
@@ -1955,7 +2101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1955
2101
  onBeforeUnmount(() => {
1956
2102
  toggleReason.value = void 0;
1957
2103
  });
1958
- expose({
2104
+ __expose({
1959
2105
  popperRef,
1960
2106
  contentRef,
1961
2107
  isFocusInsideContent,
@@ -1998,7 +2144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1998
2144
  "gpu-acceleration": _ctx.gpuAcceleration,
1999
2145
  offset: _ctx.offset,
2000
2146
  persistent: _ctx.persistent,
2001
- "popper-class": unref(kls),
2147
+ "popper-class": kls.value,
2002
2148
  "popper-style": _ctx.popperStyle,
2003
2149
  placement: _ctx.placement,
2004
2150
  "popper-options": _ctx.popperOptions,
@@ -2021,7 +2167,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2021
2167
  _ctx.rawContent ? (openBlock(), createElementBlock("span", {
2022
2168
  key: 0,
2023
2169
  innerHTML: _ctx.content
2024
- }, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(_ctx.content), 1))
2170
+ }, null, 8, _hoisted_1)) : (openBlock(), createElementBlock(
2171
+ "span",
2172
+ _hoisted_2,
2173
+ toDisplayString(_ctx.content),
2174
+ 1
2175
+ ))
2025
2176
  ]),
2026
2177
  _ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), { key: 0 })) : createCommentVNode("v-if", true)
2027
2178
  ]),
@@ -2033,7 +2184,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2033
2184
  };
2034
2185
  }
2035
2186
  });
2036
- var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tooltip.vue"]]);
2187
+ var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);
2037
2188
 
2038
2189
  const ElTooltip = withInstall(Tooltip);
2039
2190