@element-plus/nightly 0.0.20240319 → 0.0.20240320
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.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +82 -6
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +6 -82
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +94 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -94
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/arrow.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +82 -6
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +6 -82
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +99 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -99
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/arrow.js +37 -23
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +23 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,100 +1,143 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, inject, ref, provide, onMounted, watch, unref, onBeforeUnmount, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { NOOP } from '@vue/shared';
|
|
3
|
+
import { isNil } from 'lodash-unified';
|
|
4
|
+
import '../../focus-trap/index.mjs';
|
|
5
|
+
import '../../form/index.mjs';
|
|
2
6
|
import '../../../utils/index.mjs';
|
|
3
|
-
import {
|
|
7
|
+
import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
|
|
8
|
+
import { popperContentProps, popperContentEmits } from './content.mjs';
|
|
9
|
+
import './composables/index.mjs';
|
|
10
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
11
|
+
import { usePopperContentFocusTrap } from './composables/use-focus-trap.mjs';
|
|
12
|
+
import { usePopperContent } from './composables/use-content.mjs';
|
|
13
|
+
import { usePopperContentDOM } from './composables/use-content-dom.mjs';
|
|
14
|
+
import { formItemContextKey } from '../../form/src/constants.mjs';
|
|
15
|
+
import { isElement } from '../../../utils/types.mjs';
|
|
16
|
+
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
4
17
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
boundariesPadding: {
|
|
8
|
-
type: Number,
|
|
9
|
-
default: 0
|
|
10
|
-
},
|
|
11
|
-
fallbackPlacements: {
|
|
12
|
-
type: definePropType(Array),
|
|
13
|
-
default: void 0
|
|
14
|
-
},
|
|
15
|
-
gpuAcceleration: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: true
|
|
18
|
-
},
|
|
19
|
-
offset: {
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 12
|
|
22
|
-
},
|
|
23
|
-
placement: {
|
|
24
|
-
type: String,
|
|
25
|
-
values: placements,
|
|
26
|
-
default: "bottom"
|
|
27
|
-
},
|
|
28
|
-
popperOptions: {
|
|
29
|
-
type: definePropType(Object),
|
|
30
|
-
default: () => ({})
|
|
31
|
-
},
|
|
32
|
-
strategy: {
|
|
33
|
-
type: String,
|
|
34
|
-
values: POSITIONING_STRATEGIES,
|
|
35
|
-
default: "absolute"
|
|
36
|
-
}
|
|
18
|
+
const __default__ = defineComponent({
|
|
19
|
+
name: "ElPopperContent"
|
|
37
20
|
});
|
|
38
|
-
const
|
|
39
|
-
...
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
...__default__,
|
|
23
|
+
props: popperContentProps,
|
|
24
|
+
emits: popperContentEmits,
|
|
25
|
+
setup(__props, { expose, emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const {
|
|
28
|
+
focusStartRef,
|
|
29
|
+
trapped,
|
|
30
|
+
onFocusAfterReleased,
|
|
31
|
+
onFocusAfterTrapped,
|
|
32
|
+
onFocusInTrap,
|
|
33
|
+
onFocusoutPrevented,
|
|
34
|
+
onReleaseRequested
|
|
35
|
+
} = usePopperContentFocusTrap(props, emit);
|
|
36
|
+
const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
|
|
37
|
+
const {
|
|
38
|
+
ariaModal,
|
|
39
|
+
arrowStyle,
|
|
40
|
+
contentAttrs,
|
|
41
|
+
contentClass,
|
|
42
|
+
contentStyle,
|
|
43
|
+
updateZIndex
|
|
44
|
+
} = usePopperContentDOM(props, {
|
|
45
|
+
styles,
|
|
46
|
+
attributes,
|
|
47
|
+
role
|
|
48
|
+
});
|
|
49
|
+
const formItemContext = inject(formItemContextKey, void 0);
|
|
50
|
+
const arrowOffset = ref();
|
|
51
|
+
provide(POPPER_CONTENT_INJECTION_KEY, {
|
|
52
|
+
arrowStyle,
|
|
53
|
+
arrowRef,
|
|
54
|
+
arrowOffset
|
|
55
|
+
});
|
|
56
|
+
if (formItemContext && (formItemContext.addInputId || formItemContext.removeInputId)) {
|
|
57
|
+
provide(formItemContextKey, {
|
|
58
|
+
...formItemContext,
|
|
59
|
+
addInputId: NOOP,
|
|
60
|
+
removeInputId: NOOP
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
let triggerTargetAriaStopWatch = void 0;
|
|
64
|
+
const updatePopper = (shouldUpdateZIndex = true) => {
|
|
65
|
+
update();
|
|
66
|
+
shouldUpdateZIndex && updateZIndex();
|
|
67
|
+
};
|
|
68
|
+
const togglePopperAlive = () => {
|
|
69
|
+
updatePopper(false);
|
|
70
|
+
if (props.visible && props.focusOnShow) {
|
|
71
|
+
trapped.value = true;
|
|
72
|
+
} else if (props.visible === false) {
|
|
73
|
+
trapped.value = false;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
onMounted(() => {
|
|
77
|
+
watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
|
|
78
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
|
79
|
+
triggerTargetAriaStopWatch = void 0;
|
|
80
|
+
const el = unref(triggerTargetEl || contentRef.value);
|
|
81
|
+
const prevEl = unref(prevTriggerTargetEl || contentRef.value);
|
|
82
|
+
if (isElement(el)) {
|
|
83
|
+
triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
|
84
|
+
;
|
|
85
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
|
86
|
+
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
87
|
+
});
|
|
88
|
+
}, { immediate: true });
|
|
89
|
+
}
|
|
90
|
+
if (prevEl !== el && isElement(prevEl)) {
|
|
91
|
+
;
|
|
92
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
|
93
|
+
prevEl.removeAttribute(key);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}, { immediate: true });
|
|
97
|
+
watch(() => props.visible, togglePopperAlive, { immediate: true });
|
|
98
|
+
});
|
|
99
|
+
onBeforeUnmount(() => {
|
|
100
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
|
101
|
+
triggerTargetAriaStopWatch = void 0;
|
|
102
|
+
});
|
|
103
|
+
expose({
|
|
104
|
+
popperContentRef: contentRef,
|
|
105
|
+
popperInstanceRef: instanceRef,
|
|
106
|
+
updatePopper,
|
|
107
|
+
contentStyle
|
|
108
|
+
});
|
|
109
|
+
return (_ctx, _cache) => {
|
|
110
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
111
|
+
ref_key: "contentRef",
|
|
112
|
+
ref: contentRef
|
|
113
|
+
}, unref(contentAttrs), {
|
|
114
|
+
style: unref(contentStyle),
|
|
115
|
+
class: unref(contentClass),
|
|
116
|
+
tabindex: "-1",
|
|
117
|
+
onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
|
|
118
|
+
onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
|
|
119
|
+
}), [
|
|
120
|
+
createVNode(unref(ElFocusTrap), {
|
|
121
|
+
trapped: unref(trapped),
|
|
122
|
+
"trap-on-focus-in": true,
|
|
123
|
+
"focus-trap-el": unref(contentRef),
|
|
124
|
+
"focus-start-el": unref(focusStartRef),
|
|
125
|
+
onFocusAfterTrapped: unref(onFocusAfterTrapped),
|
|
126
|
+
onFocusAfterReleased: unref(onFocusAfterReleased),
|
|
127
|
+
onFocusin: unref(onFocusInTrap),
|
|
128
|
+
onFocusoutPrevented: unref(onFocusoutPrevented),
|
|
129
|
+
onReleaseRequested: unref(onReleaseRequested)
|
|
130
|
+
}, {
|
|
131
|
+
default: withCtx(() => [
|
|
132
|
+
renderSlot(_ctx.$slots, "default")
|
|
133
|
+
]),
|
|
134
|
+
_: 3
|
|
135
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
|
136
|
+
], 16);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
87
139
|
});
|
|
88
|
-
|
|
89
|
-
mouseenter: (evt) => evt instanceof MouseEvent,
|
|
90
|
-
mouseleave: (evt) => evt instanceof MouseEvent,
|
|
91
|
-
focus: () => true,
|
|
92
|
-
blur: () => true,
|
|
93
|
-
close: () => true
|
|
94
|
-
};
|
|
95
|
-
const usePopperCoreConfigProps = popperCoreConfigProps;
|
|
96
|
-
const usePopperContentProps = popperContentProps;
|
|
97
|
-
const usePopperContentEmits = popperContentEmits;
|
|
140
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
98
141
|
|
|
99
|
-
export {
|
|
142
|
+
export { ElPopperContent as default };
|
|
100
143
|
//# sourceMappingURL=content2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.
|
|
1
|
+
{"version":3,"file":"content2.mjs","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 { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { isElement } from '@element-plus/utils'\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 (\n formItemContext &&\n (formItemContext.addInputId || formItemContext.removeInputId)\n) {\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":[],"mappings":"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"}
|
|
@@ -3,7 +3,7 @@ import '../../popper/index.mjs';
|
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
5
|
import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
6
|
-
import { popperContentProps } from '../../popper/src/
|
|
6
|
+
import { popperContentProps } from '../../popper/src/content.mjs';
|
|
7
7
|
|
|
8
8
|
const useTooltipContentProps = buildProps({
|
|
9
9
|
...useDelayedToggleProps,
|
|
@@ -9,7 +9,7 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
9
9
|
import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
|
|
10
10
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
11
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
12
|
-
import ElPopperContent from '../../popper/src/
|
|
12
|
+
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
13
13
|
|
|
14
14
|
const __default__ = defineComponent({
|
|
15
15
|
name: "ElTooltipContent",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import TooltipV2 from './src/tooltip2.mjs';
|
|
3
|
-
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/
|
|
3
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/arrow2.mjs';
|
|
4
4
|
export { tooltipV2ContentProps } from './src/content.mjs';
|
|
5
5
|
export { tooltipV2RootProps } from './src/root.mjs';
|
|
6
6
|
export { tooltipV2Props } from './src/tooltip.mjs';
|
|
@@ -1,28 +1,43 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
|
|
2
|
+
import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
|
|
3
|
+
import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
type: Number,
|
|
8
|
-
default: 10
|
|
9
|
-
},
|
|
10
|
-
height: {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 10
|
|
13
|
-
},
|
|
14
|
-
style: {
|
|
15
|
-
type: definePropType(Object),
|
|
16
|
-
default: null
|
|
17
|
-
}
|
|
6
|
+
const __default__ = defineComponent({
|
|
7
|
+
name: "ElTooltipV2Arrow"
|
|
18
8
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...__default__,
|
|
11
|
+
props: {
|
|
12
|
+
...tooltipV2ArrowProps,
|
|
13
|
+
...tooltipV2ArrowSpecialProps
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const { ns } = inject(tooltipV2RootKey);
|
|
18
|
+
const { arrowRef } = inject(tooltipV2ContentKey);
|
|
19
|
+
const arrowStyle = computed(() => {
|
|
20
|
+
const { style, width, height } = props;
|
|
21
|
+
const namespace = ns.namespace.value;
|
|
22
|
+
return {
|
|
23
|
+
[`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
|
|
24
|
+
[`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
|
|
25
|
+
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
|
26
|
+
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
|
27
|
+
...style || {}
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createElementBlock("span", {
|
|
32
|
+
ref_key: "arrowRef",
|
|
33
|
+
ref: arrowRef,
|
|
34
|
+
style: normalizeStyle(unref(arrowStyle)),
|
|
35
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
|
36
|
+
}, null, 6);
|
|
37
|
+
};
|
|
24
38
|
}
|
|
25
39
|
});
|
|
40
|
+
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
|
|
26
41
|
|
|
27
|
-
export {
|
|
42
|
+
export { TooltipV2Arrow as default };
|
|
28
43
|
//# sourceMappingURL=arrow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAOA,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AACtC,IAAM,MAAA,EAAE,QAAa,EAAA,GAAA,MAAA,CAAO,mBAAmB,CAAA,CAAA;AAE/C,IAAM,MAAA,UAAA,GAAa,SAAwB,MAAM;AAC/C,MAAM,MAAA,EAAE,KAAO,EAAA,KAAA,EAAO,MAAW,EAAA,GAAA,KAAA,CAAA;AACjC,MAAM,MAAA,SAAA,GAAY,GAAG,SAAU,CAAA,KAAA,CAAA;AAE/B,MAAO,OAAA;AAAA,QACL,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,uBAAA,CAAA,GAAqC,CAAG,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QAC9C,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,wBAAA,CAAA,GAAsC,CAAG,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QAC/C,CAAC,CAAA,EAAA,EAAK,SAA4C,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAG,KAAQ,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QAC7D,CAAC,CAAA,EAAA,EAAK,SAA2C,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAQ,CAAI,GAAA,CAAA;AAAA,QAC7D,GAAI,SAAS,EAAC;AAAA,OAChB,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
@@ -1,43 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { tooltipV2Sides } from './common.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const tooltipV2ArrowProps = buildProps({
|
|
6
|
+
width: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 10
|
|
9
|
+
},
|
|
10
|
+
height: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 10
|
|
14
13
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
|
26
|
-
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
|
27
|
-
...style || {}
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
return (_ctx, _cache) => {
|
|
31
|
-
return openBlock(), createElementBlock("span", {
|
|
32
|
-
ref_key: "arrowRef",
|
|
33
|
-
ref: arrowRef,
|
|
34
|
-
style: normalizeStyle(unref(arrowStyle)),
|
|
35
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
|
36
|
-
}, null, 6);
|
|
37
|
-
};
|
|
14
|
+
style: {
|
|
15
|
+
type: definePropType(Object),
|
|
16
|
+
default: null
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const tooltipV2ArrowSpecialProps = buildProps({
|
|
20
|
+
side: {
|
|
21
|
+
type: definePropType(String),
|
|
22
|
+
values: tooltipV2Sides,
|
|
23
|
+
required: true
|
|
38
24
|
}
|
|
39
25
|
});
|
|
40
|
-
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
|
|
41
26
|
|
|
42
|
-
export {
|
|
27
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
|
|
43
28
|
//# sourceMappingURL=arrow2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
2
|
import { tooltipV2RootProps } from './root.mjs';
|
|
3
3
|
import { tooltipV2TriggerProps } from './trigger.mjs';
|
|
4
|
-
import { tooltipV2ArrowProps } from './
|
|
4
|
+
import { tooltipV2ArrowProps } from './arrow2.mjs';
|
|
5
5
|
import { tooltipV2ContentProps } from './content.mjs';
|
|
6
6
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, toRefs, reactive, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, renderSlot, Teleport, Transition, createCommentVNode, createElementBlock, Fragment } from 'vue';
|
|
2
2
|
import { pick } from 'lodash-unified';
|
|
3
|
-
import { tooltipV2ArrowProps } from './
|
|
3
|
+
import { tooltipV2ArrowProps } from './arrow2.mjs';
|
|
4
4
|
import { tooltipV2ContentProps } from './content.mjs';
|
|
5
5
|
import { tooltipV2RootProps } from './root.mjs';
|
|
6
6
|
import { tooltipV2Props } from './tooltip.mjs';
|
|
7
7
|
import { tooltipV2TriggerProps } from './trigger.mjs';
|
|
8
8
|
import TooltipV2Root from './root2.mjs';
|
|
9
|
-
import TooltipV2Arrow from './
|
|
9
|
+
import TooltipV2Arrow from './arrow.mjs';
|
|
10
10
|
import TooltipV2Content from './content2.mjs';
|
|
11
11
|
import TooltipV2Trigger from './trigger2.mjs';
|
|
12
12
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -113,12 +113,12 @@ export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/po
|
|
|
113
113
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
|
114
114
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
|
115
115
|
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger.mjs';
|
|
116
|
-
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/
|
|
116
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/content.mjs';
|
|
117
117
|
export { popperArrowProps, usePopperArrowProps } from './components/popper/src/arrow.mjs';
|
|
118
118
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './components/popper/src/constants.mjs';
|
|
119
119
|
export { default as ElPopperArrow } from './components/popper/src/arrow2.mjs';
|
|
120
120
|
export { default as ElPopperTrigger } from './components/popper/src/trigger2.mjs';
|
|
121
|
-
export { default as ElPopperContent } from './components/popper/src/
|
|
121
|
+
export { default as ElPopperContent } from './components/popper/src/content2.mjs';
|
|
122
122
|
export { ElPopper } from './components/popper/index.mjs';
|
|
123
123
|
export { progressProps } from './components/progress/src/progress.mjs';
|
|
124
124
|
export { ElProgress } from './components/progress/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240320";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240320'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var anchor$1 = require('./src/anchor2.js');
|
|
7
|
-
var anchorLink = require('./src/anchor-
|
|
7
|
+
var anchorLink = require('./src/anchor-link.js');
|
|
8
8
|
var anchor = require('./src/anchor.js');
|
|
9
9
|
var install = require('../../utils/vue/install.js');
|
|
10
10
|
|