@v-c/trigger 0.0.1 → 0.0.3
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/Popup/Arrow.cjs +1 -1
- package/dist/Popup/Arrow.js +36 -33
- package/dist/Popup/Mask.cjs +1 -1
- package/dist/Popup/Mask.js +25 -19
- package/dist/Popup/PopupContent.cjs +1 -1
- package/dist/Popup/PopupContent.js +7 -6
- package/dist/Popup/index.cjs +1 -1
- package/dist/Popup/index.js +152 -116
- package/dist/UniqueProvider/UniqueContainer.cjs +1 -1
- package/dist/UniqueProvider/UniqueContainer.js +55 -41
- package/dist/UniqueProvider/index.cjs +1 -1
- package/dist/UniqueProvider/index.js +24 -24
- package/dist/hooks/useAlign.cjs +1 -1
- package/dist/hooks/useAlign.js +125 -118
- package/dist/hooks/useWinClick.cjs +1 -1
- package/dist/hooks/useWinClick.js +14 -14
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +276 -235
- package/package.json +3 -3
- package/dist/portal/dist/Context.cjs +0 -1
- package/dist/portal/dist/Context.js +0 -14
- package/dist/portal/dist/Portal.cjs +0 -1
- package/dist/portal/dist/Portal.js +0 -73
- package/dist/portal/dist/useDom.cjs +0 -1
- package/dist/portal/dist/useDom.js +0 -34
- package/dist/portal/dist/useScrollLocker.cjs +0 -5
- package/dist/portal/dist/useScrollLocker.js +0 -28
- package/dist/portal/dist/util.cjs +0 -1
- package/dist/portal/dist/util.js +0 -6
- package/dist/resize-observer/dist/Collection.cjs +0 -1
- package/dist/resize-observer/dist/Collection.js +0 -32
- package/dist/resize-observer/dist/SingleObserver/DomWrapper.cjs +0 -1
- package/dist/resize-observer/dist/SingleObserver/DomWrapper.js +0 -11
- package/dist/resize-observer/dist/SingleObserver/index.cjs +0 -1
- package/dist/resize-observer/dist/SingleObserver/index.js +0 -81
- package/dist/resize-observer/dist/index.cjs +0 -1
- package/dist/resize-observer/dist/index.js +0 -44
- package/dist/resize-observer/dist/utils/observerUtil.cjs +0 -1
- package/dist/resize-observer/dist/utils/observerUtil.js +0 -21
- package/dist/util/dist/Children/isFragment.cjs +0 -1
- package/dist/util/dist/Children/isFragment.js +0 -7
- package/dist/util/dist/Children/toArray.cjs +0 -1
- package/dist/util/dist/Children/toArray.js +0 -11
- package/dist/util/dist/Dom/canUseDom.cjs +0 -1
- package/dist/util/dist/Dom/canUseDom.js +0 -6
- package/dist/util/dist/Dom/contains.cjs +0 -1
- package/dist/util/dist/Dom/contains.js +0 -16
- package/dist/util/dist/Dom/dynamicCSS.cjs +0 -1
- package/dist/util/dist/Dom/dynamicCSS.js +0 -73
- package/dist/util/dist/Dom/findDOMNode.cjs +0 -1
- package/dist/util/dist/Dom/findDOMNode.js +0 -12
- package/dist/util/dist/Dom/isVisible.cjs +0 -1
- package/dist/util/dist/Dom/isVisible.js +0 -22
- package/dist/util/dist/Dom/shadow.cjs +0 -1
- package/dist/util/dist/Dom/shadow.js +0 -13
- package/dist/util/dist/classnames.cjs +0 -1
- package/dist/util/dist/classnames.js +0 -30
- package/dist/util/dist/getScrollBarSize.cjs +0 -1
- package/dist/util/dist/getScrollBarSize.js +0 -37
- package/dist/util/dist/props-util/index.cjs +0 -1
- package/dist/util/dist/props-util/index.js +0 -21
- package/dist/util/dist/raf.cjs +0 -1
- package/dist/util/dist/raf.js +0 -37
- package/dist/util/dist/utils/transition.cjs +0 -1
- package/dist/util/dist/utils/transition.js +0 -21
- package/dist/util/dist/warning.cjs +0 -1
- package/dist/util/dist/warning.js +0 -48
package/dist/index.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import ge from "
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
return typeof w == "function" || Object.prototype.toString.call(w) === "[object Object]" && !lt(w);
|
|
1
|
+
import { defineComponent as en, computed as u, ref as pe, useId as nn, shallowRef as i, reactive as tn, watch as b, nextTick as F, watchEffect as B, createVNode as S, Fragment as un, mergeDefaults as ln, isVNode as an } from "vue";
|
|
2
|
+
import ge from "@v-c/portal";
|
|
3
|
+
import on from "@v-c/resize-observer";
|
|
4
|
+
import { classNames as ve } from "@v-c/util";
|
|
5
|
+
import { isDOM as x } from "@v-c/util/dist/Dom/findDOMNode";
|
|
6
|
+
import { getShadowRoot as me } from "@v-c/util/dist/Dom/shadow";
|
|
7
|
+
import { filterEmpty as rn } from "@v-c/util/dist/props-util";
|
|
8
|
+
import { useTriggerContext as sn, useUniqueContext as fn, TriggerContextProvider as dn } from "./context.js";
|
|
9
|
+
import cn from "./hooks/useAction.js";
|
|
10
|
+
import pn from "./hooks/useAlign.js";
|
|
11
|
+
import vn from "./hooks/useDelay.js";
|
|
12
|
+
import mn from "./hooks/useWatch.js";
|
|
13
|
+
import gn from "./hooks/useWinClick.js";
|
|
14
|
+
import yn from "./Popup/index.js";
|
|
15
|
+
import { getAlignPopupClassName as hn } from "./util.js";
|
|
16
|
+
import { default as Ln } from "./UniqueProvider/index.js";
|
|
17
|
+
function Pn(q) {
|
|
18
|
+
return typeof q == "function" || Object.prototype.toString.call(q) === "[object Object]" && !an(q);
|
|
20
19
|
}
|
|
21
|
-
const
|
|
20
|
+
const Cn = {
|
|
22
21
|
prefixCls: "vc-trigger-popup",
|
|
23
22
|
action: "hover",
|
|
24
23
|
mouseLeaveDelay: 0.1,
|
|
@@ -27,218 +26,221 @@ const ht = {
|
|
|
27
26
|
popupVisible: void 0,
|
|
28
27
|
defaultPopupVisible: void 0
|
|
29
28
|
};
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
29
|
+
function bn(q = ge) {
|
|
30
|
+
return /* @__PURE__ */ en((n, {
|
|
32
31
|
expose: ye,
|
|
33
32
|
slots: he,
|
|
34
33
|
attrs: $
|
|
35
34
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
registerSubPopup(e,
|
|
38
|
-
|
|
35
|
+
const Pe = u(() => n.autoDestroy ?? !1), j = u(() => n.popupVisible === void 0), J = u(() => !!n.mobile), z = pe({}), D = sn(), Ce = u(() => ({
|
|
36
|
+
registerSubPopup(e, t) {
|
|
37
|
+
t ? z.value[e] = t : delete z.value[e], D?.value.registerSubPopup(e, t);
|
|
39
38
|
}
|
|
40
|
-
})),
|
|
39
|
+
})), p = fn(), _ = nn(), c = i(null), G = i(null), K = (e) => {
|
|
41
40
|
if (!e)
|
|
42
41
|
return null;
|
|
43
42
|
if (x(e))
|
|
44
43
|
return e;
|
|
45
|
-
const
|
|
46
|
-
if (x(
|
|
47
|
-
return
|
|
48
|
-
const
|
|
49
|
-
if (x(
|
|
50
|
-
return
|
|
51
|
-
if (x(
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
const
|
|
55
|
-
if (x(
|
|
56
|
-
return
|
|
44
|
+
const t = e;
|
|
45
|
+
if (x(t?.$el))
|
|
46
|
+
return t.$el;
|
|
47
|
+
const a = t?.nativeElement;
|
|
48
|
+
if (x(a?.value))
|
|
49
|
+
return a.value;
|
|
50
|
+
if (x(a))
|
|
51
|
+
return a;
|
|
52
|
+
if (typeof t?.getElement == "function") {
|
|
53
|
+
const m = t.getElement();
|
|
54
|
+
if (x(m))
|
|
55
|
+
return m;
|
|
57
56
|
}
|
|
58
57
|
return null;
|
|
59
58
|
}, be = (e) => {
|
|
60
|
-
const
|
|
61
|
-
G.value =
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
...
|
|
67
|
-
...
|
|
68
|
-
})),
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
},
|
|
72
|
-
...
|
|
73
|
-
} : null), N =
|
|
74
|
-
|
|
75
|
-
const l =
|
|
59
|
+
const t = K(e);
|
|
60
|
+
G.value = t, c.value !== t && (c.value = t), D?.value?.registerSubPopup(_, t ?? null);
|
|
61
|
+
}, r = i(null), I = i(null), qe = (e) => {
|
|
62
|
+
const t = K(e);
|
|
63
|
+
t && r.value !== t ? (r.value = t, I.value = t) : t || (r.value = null, I.value = null);
|
|
64
|
+
}, g = tn({}), Q = i({}), Z = i({}), we = u(() => ({
|
|
65
|
+
...Q.value,
|
|
66
|
+
...Z.value
|
|
67
|
+
})), ee = (e) => {
|
|
68
|
+
const t = r.value;
|
|
69
|
+
return t?.contains(e) || t && me(t)?.host === e || e === t || c.value?.contains(e) || c.value && me(c.value)?.host === e || e === c.value || Object.values(z.value).some((a) => a?.contains(e) || e === a);
|
|
70
|
+
}, ne = u(() => n.arrow ? {
|
|
71
|
+
...n?.arrow !== !0 ? n?.arrow : {}
|
|
72
|
+
} : null), N = i(n?.defaultPopupVisible ?? !1);
|
|
73
|
+
n.popupVisible !== void 0 && (N.value = n.popupVisible);
|
|
74
|
+
const l = u(() => n?.popupVisible ?? N.value), Ae = (e) => {
|
|
76
75
|
j.value && (N.value = e);
|
|
77
|
-
},
|
|
78
|
-
|
|
76
|
+
}, te = () => l.value;
|
|
77
|
+
b(() => n.popupVisible, async (e) => {
|
|
79
78
|
e !== void 0 && (await F(), N.value = e);
|
|
80
79
|
});
|
|
81
|
-
const
|
|
82
|
-
popup:
|
|
83
|
-
target:
|
|
80
|
+
const ue = (e = 0) => ({
|
|
81
|
+
popup: n.popup,
|
|
82
|
+
target: r.value,
|
|
84
83
|
delay: e,
|
|
85
|
-
prefixCls:
|
|
86
|
-
popupClassName:
|
|
87
|
-
uniqueContainerClassName:
|
|
88
|
-
uniqueContainerStyle:
|
|
89
|
-
popupStyle:
|
|
90
|
-
popupPlacement:
|
|
91
|
-
builtinPlacements:
|
|
92
|
-
popupAlign:
|
|
93
|
-
zIndex:
|
|
94
|
-
mask:
|
|
95
|
-
maskClosable:
|
|
96
|
-
popupMotion:
|
|
97
|
-
maskMotion:
|
|
98
|
-
arrow:
|
|
99
|
-
getPopupContainer:
|
|
100
|
-
getPopupClassNameFromAlign:
|
|
84
|
+
prefixCls: n.prefixCls,
|
|
85
|
+
popupClassName: n.popupClassName,
|
|
86
|
+
uniqueContainerClassName: n.uniqueContainerClassName,
|
|
87
|
+
uniqueContainerStyle: n.uniqueContainerStyle,
|
|
88
|
+
popupStyle: n.popupStyle,
|
|
89
|
+
popupPlacement: n.popupPlacement,
|
|
90
|
+
builtinPlacements: n.builtinPlacements,
|
|
91
|
+
popupAlign: n.popupAlign,
|
|
92
|
+
zIndex: n.zIndex,
|
|
93
|
+
mask: n.mask,
|
|
94
|
+
maskClosable: n.maskClosable,
|
|
95
|
+
popupMotion: n.popupMotion,
|
|
96
|
+
maskMotion: n.maskMotion,
|
|
97
|
+
arrow: ne.value,
|
|
98
|
+
getPopupContainer: n.getPopupContainer,
|
|
99
|
+
getPopupClassNameFromAlign: n.getPopupClassNameFromAlign,
|
|
101
100
|
id: _
|
|
102
101
|
});
|
|
103
|
-
|
|
104
|
-
if (
|
|
102
|
+
b([l, r], () => {
|
|
103
|
+
if (p && n.unique && r.value && !j.value && !D?.value)
|
|
105
104
|
if (l.value) {
|
|
106
|
-
const e =
|
|
107
|
-
|
|
105
|
+
const e = n.mouseEnterDelay ?? 0;
|
|
106
|
+
p?.show(ue(e), te);
|
|
108
107
|
} else
|
|
109
|
-
|
|
108
|
+
p?.hide(n.mouseLeaveDelay || 0);
|
|
110
109
|
});
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
const v = i(l.value), w = i([]);
|
|
111
|
+
w.value = [], B(() => {
|
|
112
|
+
v.value = l.value, l.value || (w.value = []);
|
|
114
113
|
});
|
|
115
114
|
const le = (e) => {
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
if (
|
|
119
|
-
|
|
115
|
+
Ae(e), (w.value[w.value.length - 1] ?? l.value) !== e && (w.value.push(e), n?.onOpenChange?.(e), n?.onPopupVisibleChange?.(e));
|
|
116
|
+
}, ae = vn(), d = (e, t = 0) => {
|
|
117
|
+
if (n.popupVisible !== void 0) {
|
|
118
|
+
ae(() => {
|
|
120
119
|
le(e);
|
|
121
|
-
},
|
|
120
|
+
}, t);
|
|
122
121
|
return;
|
|
123
122
|
}
|
|
124
|
-
if (
|
|
125
|
-
e ?
|
|
123
|
+
if (p && n.unique && j.value && !D?.value) {
|
|
124
|
+
e ? p?.show(ue(t), te) : p.hide(t);
|
|
126
125
|
return;
|
|
127
126
|
}
|
|
128
|
-
|
|
127
|
+
ae(() => {
|
|
129
128
|
le(e);
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
await F(), l.value && (
|
|
129
|
+
}, t);
|
|
130
|
+
}, y = i(!1);
|
|
131
|
+
b(l, async () => {
|
|
132
|
+
await F(), l.value && (y.value = !0);
|
|
134
133
|
});
|
|
135
|
-
const
|
|
134
|
+
const A = i(), T = pe(null), L = (e) => {
|
|
136
135
|
T.value = [e.clientX, e.clientY];
|
|
137
|
-
}, [ke, Se, xe, De, Ne, Te,
|
|
138
|
-
|
|
136
|
+
}, [ke, Me, Se, xe, De, Ne, Te, Re, Ee, H, X] = pn(l, c, u(() => n?.alignPoint && T.value !== null ? T.value : r.value), u(() => n?.popupPlacement), u(() => n?.builtinPlacements), u(() => n?.popupAlign), n?.onPopupAlign, J), [k, h] = cn(u(() => n.action), u(() => n.showAction), u(() => n.hideAction)), oe = u(() => k.value?.has("click")), R = u(() => h.value?.has("click") || h.value?.has("contextmenu")), P = () => {
|
|
137
|
+
y.value || X();
|
|
139
138
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}),
|
|
139
|
+
mn(l, r, c, P, () => {
|
|
140
|
+
v.value && n?.alignPoint && R.value && d(!1);
|
|
141
|
+
}), b([T, () => n.popupPlacement], async () => {
|
|
143
142
|
await F(), P();
|
|
144
|
-
}),
|
|
143
|
+
}), b(() => JSON.stringify(n.popupAlign), async () => {
|
|
145
144
|
await F();
|
|
146
145
|
const {
|
|
147
146
|
builtinPlacements: e,
|
|
148
|
-
popupPlacement:
|
|
149
|
-
} =
|
|
150
|
-
l.value && !e?.[
|
|
147
|
+
popupPlacement: t
|
|
148
|
+
} = n;
|
|
149
|
+
l.value && !e?.[t] && P();
|
|
151
150
|
});
|
|
152
|
-
const
|
|
153
|
-
const e =
|
|
154
|
-
return
|
|
151
|
+
const Oe = u(() => {
|
|
152
|
+
const e = hn(n.builtinPlacements, n.prefixCls, H.value, n.alignPoint);
|
|
153
|
+
return ve(e, n?.getPopupClassNameFromAlign?.(H.value));
|
|
155
154
|
});
|
|
156
155
|
ye({
|
|
157
156
|
nativeElement: I,
|
|
158
157
|
popupElement: G,
|
|
159
158
|
forceAlign: P
|
|
160
159
|
});
|
|
161
|
-
const ie =
|
|
162
|
-
if (
|
|
163
|
-
const e =
|
|
160
|
+
const ie = i(0), re = i(0), se = () => {
|
|
161
|
+
if (n.stretch && r.value) {
|
|
162
|
+
const e = r.value.getBoundingClientRect();
|
|
164
163
|
ie.value = e.width, re.value = e.height;
|
|
165
164
|
}
|
|
166
|
-
},
|
|
165
|
+
}, Ve = () => {
|
|
167
166
|
se(), P();
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
se(),
|
|
167
|
+
}, Fe = (e) => {
|
|
168
|
+
y.value = !1, X(), n?.afterOpenChange?.(e), n?.afterPopupVisibleChange?.(e);
|
|
169
|
+
}, Be = () => new Promise((e) => {
|
|
170
|
+
se(), A.value = e;
|
|
172
171
|
});
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
b([A], () => {
|
|
173
|
+
A.value && (X(), A.value(), A.value = void 0);
|
|
175
174
|
});
|
|
176
|
-
function
|
|
177
|
-
e[
|
|
178
|
-
(!
|
|
175
|
+
function C(e, t, a, m, M, o) {
|
|
176
|
+
e[t] = (f, ...s) => {
|
|
177
|
+
(!o || !o()) && (M?.(f), d(a, m)), g[t]?.(f, ...s);
|
|
179
178
|
};
|
|
180
179
|
}
|
|
181
|
-
const
|
|
180
|
+
const fe = u(() => k.value?.has("touch")), Y = u(() => h.value?.has("touch")), U = i(!1);
|
|
182
181
|
B(() => {
|
|
183
182
|
const e = {};
|
|
184
|
-
(
|
|
185
|
-
U.value = !0,
|
|
186
|
-
}), (
|
|
187
|
-
|
|
188
|
-
}),
|
|
183
|
+
(fe.value || Y.value) && (e.onTouchstart = (...t) => {
|
|
184
|
+
U.value = !0, v.value && Y.value ? d(!1) : !v.value && fe.value && d(!0), g.onTouchstart?.(...t);
|
|
185
|
+
}), (oe.value || R.value) && (e.onClick = (t, ...a) => {
|
|
186
|
+
v.value && R.value ? d(!1) : !v.value && oe.value && (L(t), d(!0)), g?.onClick?.(t, ...a), U.value = !1;
|
|
187
|
+
}), Q.value = e;
|
|
189
188
|
});
|
|
190
|
-
const
|
|
191
|
-
let
|
|
189
|
+
const je = gn(l, u(() => R.value || Y.value), r, c, u(() => n.mask), u(() => n.maskClosable), ee, d), ze = u(() => k.value?.has("hover")), Ie = u(() => h.value?.has("hover"));
|
|
190
|
+
let E, W;
|
|
192
191
|
const O = () => U.value;
|
|
193
192
|
B(() => {
|
|
194
193
|
const {
|
|
195
194
|
mouseEnterDelay: e,
|
|
196
|
-
mouseLeaveDelay:
|
|
197
|
-
alignPoint:
|
|
198
|
-
focusDelay:
|
|
199
|
-
blurDelay:
|
|
200
|
-
} =
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
L(
|
|
195
|
+
mouseLeaveDelay: t,
|
|
196
|
+
alignPoint: a,
|
|
197
|
+
focusDelay: m,
|
|
198
|
+
blurDelay: M
|
|
199
|
+
} = n, o = {};
|
|
200
|
+
if (ze.value) {
|
|
201
|
+
const f = (s) => {
|
|
202
|
+
L(s);
|
|
204
203
|
};
|
|
205
|
-
|
|
206
|
-
(l.value ||
|
|
207
|
-
},
|
|
208
|
-
|
|
204
|
+
C(o, "onMouseenter", !0, e, f, O), C(o, "onPointerenter", !0, e, f, O), E = (s) => {
|
|
205
|
+
(l.value || y.value) && c?.value?.contains(s.target) && d(!0, e);
|
|
206
|
+
}, a && (o.onMouseMove = (s) => {
|
|
207
|
+
g.onMousemove?.(s);
|
|
209
208
|
});
|
|
210
209
|
} else
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
E = void 0;
|
|
211
|
+
Ie.value ? (C(o, "onMouseleave", !1, t, void 0, O), C(o, "onPointerleave", !1, t, void 0, O), W = (f) => {
|
|
212
|
+
const {
|
|
213
|
+
relatedTarget: s
|
|
214
|
+
} = f;
|
|
215
|
+
s && ee(s) || d(!1, t);
|
|
216
|
+
}) : W = void 0, k.value.has("focus") && C(o, "onFocus", !0, m), h.value.has("focus") && C(o, "onBlur", !1, M), k.value.has("contextmenu") && (o.onContextmenu = (f, ...s) => {
|
|
217
|
+
v.value && h.value.has("contextmenu") ? d(!1) : (L(f), d(!0)), f.preventDefault(), g.onContextmenu?.(f, ...s);
|
|
218
|
+
}), Z.value = o;
|
|
217
219
|
});
|
|
218
|
-
const
|
|
220
|
+
const de = i(!1);
|
|
219
221
|
return B(() => {
|
|
220
|
-
|
|
222
|
+
de.value ||= n.forceRender || l.value || y.value;
|
|
221
223
|
}), () => {
|
|
222
|
-
const e = {
|
|
223
|
-
...
|
|
224
|
+
const e = rn(he?.default?.() ?? [])?.[0], t = {
|
|
225
|
+
...g,
|
|
224
226
|
...we.value
|
|
225
|
-
},
|
|
227
|
+
}, a = {};
|
|
226
228
|
["onContextmenu", "onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur"].forEach((V) => {
|
|
227
|
-
$[V] && (
|
|
228
|
-
|
|
229
|
+
$[V] && (a[V] = (...ce) => {
|
|
230
|
+
t[V]?.(...ce), $[V](...ce);
|
|
229
231
|
});
|
|
230
232
|
});
|
|
231
|
-
const
|
|
232
|
-
x:
|
|
233
|
-
y:
|
|
234
|
-
},
|
|
235
|
-
...
|
|
236
|
-
...
|
|
233
|
+
const M = {
|
|
234
|
+
x: Ne.value,
|
|
235
|
+
y: Te.value
|
|
236
|
+
}, o = S(e, {
|
|
237
|
+
...t,
|
|
238
|
+
...a,
|
|
237
239
|
ref: qe
|
|
238
240
|
}), {
|
|
239
|
-
unique:
|
|
240
|
-
prefixCls:
|
|
241
|
-
popup:
|
|
241
|
+
unique: f,
|
|
242
|
+
prefixCls: s,
|
|
243
|
+
popup: Le,
|
|
242
244
|
popupClassName: He,
|
|
243
245
|
popupStyle: Xe,
|
|
244
246
|
zIndex: Ye,
|
|
@@ -251,220 +253,259 @@ function Ct(w = ge) {
|
|
|
251
253
|
getPopupContainer: Ke,
|
|
252
254
|
stretch: Qe,
|
|
253
255
|
mobile: Ze
|
|
254
|
-
} =
|
|
255
|
-
return
|
|
256
|
+
} = n;
|
|
257
|
+
return S(un, null, [S(on, {
|
|
256
258
|
disabled: !l.value,
|
|
257
|
-
onResize:
|
|
258
|
-
},
|
|
259
|
-
default: () => [
|
|
260
|
-
}),
|
|
261
|
-
default: () => [S(
|
|
262
|
-
portal:
|
|
259
|
+
onResize: Ve
|
|
260
|
+
}, Pn(o) ? o : {
|
|
261
|
+
default: () => [o]
|
|
262
|
+
}), de.value && r.value && (!p || !f) && S(dn, Ce.value, {
|
|
263
|
+
default: () => [S(yn, {
|
|
264
|
+
portal: q,
|
|
263
265
|
ref: be,
|
|
264
|
-
prefixCls:
|
|
265
|
-
popup:
|
|
266
|
-
className:
|
|
266
|
+
prefixCls: s,
|
|
267
|
+
popup: Le,
|
|
268
|
+
className: ve(He, !J.value && Oe.value),
|
|
267
269
|
style: Xe,
|
|
268
|
-
target:
|
|
269
|
-
onMouseEnter:
|
|
270
|
+
target: r.value,
|
|
271
|
+
onMouseEnter: E,
|
|
270
272
|
onMouseLeave: W,
|
|
271
|
-
onPointerEnter:
|
|
273
|
+
onPointerEnter: E,
|
|
272
274
|
zIndex: Ye,
|
|
273
275
|
open: l.value,
|
|
274
|
-
keepDom:
|
|
276
|
+
keepDom: y.value,
|
|
275
277
|
fresh: Ue,
|
|
276
278
|
onClick: We,
|
|
277
|
-
onPointerDownCapture:
|
|
279
|
+
onPointerDownCapture: je,
|
|
278
280
|
mask: $e,
|
|
279
281
|
motion: Je,
|
|
280
282
|
maskMotion: _e,
|
|
281
|
-
onVisibleChanged:
|
|
282
|
-
onPrepare:
|
|
283
|
+
onVisibleChanged: Fe,
|
|
284
|
+
onPrepare: Be,
|
|
283
285
|
forceRender: Ge,
|
|
284
|
-
autoDestroy:
|
|
286
|
+
autoDestroy: Pe.value,
|
|
285
287
|
getPopupContainer: Ke,
|
|
286
288
|
align: H.value,
|
|
287
|
-
arrow:
|
|
288
|
-
arrowPos:
|
|
289
|
+
arrow: ne.value,
|
|
290
|
+
arrowPos: M,
|
|
289
291
|
ready: ke.value,
|
|
290
|
-
offsetX:
|
|
291
|
-
offsetY:
|
|
292
|
-
offsetR:
|
|
293
|
-
offsetB:
|
|
292
|
+
offsetX: Me.value,
|
|
293
|
+
offsetY: Se.value,
|
|
294
|
+
offsetR: xe.value,
|
|
295
|
+
offsetB: De.value,
|
|
294
296
|
onAlign: P,
|
|
295
297
|
stretch: Qe,
|
|
296
298
|
targetWidth: ie.value / Re.value,
|
|
297
|
-
targetHeight: re.value /
|
|
299
|
+
targetHeight: re.value / Ee.value,
|
|
298
300
|
mobile: Ze
|
|
299
301
|
}, null)]
|
|
300
302
|
})]);
|
|
301
303
|
};
|
|
302
304
|
}, {
|
|
303
|
-
props: /* @__PURE__ */
|
|
305
|
+
props: /* @__PURE__ */ ln({
|
|
304
306
|
action: {
|
|
305
307
|
type: [String, Array],
|
|
306
|
-
required: !1
|
|
308
|
+
required: !1,
|
|
309
|
+
default: void 0
|
|
307
310
|
},
|
|
308
311
|
showAction: {
|
|
309
312
|
type: Array,
|
|
310
|
-
required: !1
|
|
313
|
+
required: !1,
|
|
314
|
+
default: void 0
|
|
311
315
|
},
|
|
312
316
|
hideAction: {
|
|
313
317
|
type: Array,
|
|
314
|
-
required: !1
|
|
318
|
+
required: !1,
|
|
319
|
+
default: void 0
|
|
315
320
|
},
|
|
316
321
|
prefixCls: {
|
|
317
322
|
type: String,
|
|
318
|
-
required: !1
|
|
323
|
+
required: !1,
|
|
324
|
+
default: void 0
|
|
319
325
|
},
|
|
320
326
|
zIndex: {
|
|
321
327
|
type: Number,
|
|
322
|
-
required: !1
|
|
328
|
+
required: !1,
|
|
329
|
+
default: void 0
|
|
323
330
|
},
|
|
324
331
|
onPopupAlign: {
|
|
325
332
|
type: Function,
|
|
326
|
-
required: !1
|
|
333
|
+
required: !1,
|
|
334
|
+
default: void 0
|
|
327
335
|
},
|
|
328
336
|
stretch: {
|
|
329
337
|
type: String,
|
|
330
|
-
required: !1
|
|
338
|
+
required: !1,
|
|
339
|
+
default: void 0
|
|
331
340
|
},
|
|
332
341
|
popupVisible: {
|
|
333
342
|
type: Boolean,
|
|
334
|
-
required: !1
|
|
343
|
+
required: !1,
|
|
344
|
+
default: void 0
|
|
335
345
|
},
|
|
336
346
|
defaultPopupVisible: {
|
|
337
347
|
type: Boolean,
|
|
338
|
-
required: !1
|
|
348
|
+
required: !1,
|
|
349
|
+
default: void 0
|
|
339
350
|
},
|
|
340
351
|
onOpenChange: {
|
|
341
352
|
type: Function,
|
|
342
|
-
required: !1
|
|
353
|
+
required: !1,
|
|
354
|
+
default: void 0
|
|
343
355
|
},
|
|
344
356
|
afterOpenChange: {
|
|
345
357
|
type: Function,
|
|
346
|
-
required: !1
|
|
358
|
+
required: !1,
|
|
359
|
+
default: void 0
|
|
347
360
|
},
|
|
348
361
|
onPopupVisibleChange: {
|
|
349
362
|
type: Function,
|
|
350
|
-
required: !1
|
|
363
|
+
required: !1,
|
|
364
|
+
default: void 0
|
|
351
365
|
},
|
|
352
366
|
afterPopupVisibleChange: {
|
|
353
367
|
type: Function,
|
|
354
|
-
required: !1
|
|
368
|
+
required: !1,
|
|
369
|
+
default: void 0
|
|
355
370
|
},
|
|
356
371
|
getPopupContainer: {
|
|
357
372
|
type: Function,
|
|
358
|
-
required: !1
|
|
373
|
+
required: !1,
|
|
374
|
+
default: void 0
|
|
359
375
|
},
|
|
360
376
|
forceRender: {
|
|
361
377
|
type: Boolean,
|
|
362
|
-
required: !1
|
|
378
|
+
required: !1,
|
|
379
|
+
default: void 0
|
|
363
380
|
},
|
|
364
381
|
autoDestroy: {
|
|
365
382
|
type: Boolean,
|
|
366
|
-
required: !1
|
|
383
|
+
required: !1,
|
|
384
|
+
default: void 0
|
|
367
385
|
},
|
|
368
386
|
mask: {
|
|
369
387
|
type: Boolean,
|
|
370
|
-
required: !1
|
|
388
|
+
required: !1,
|
|
389
|
+
default: void 0
|
|
371
390
|
},
|
|
372
391
|
maskClosable: {
|
|
373
392
|
type: Boolean,
|
|
374
|
-
required: !1
|
|
393
|
+
required: !1,
|
|
394
|
+
default: void 0
|
|
375
395
|
},
|
|
376
396
|
popupMotion: {
|
|
377
397
|
type: Object,
|
|
378
|
-
required: !1
|
|
398
|
+
required: !1,
|
|
399
|
+
default: void 0
|
|
379
400
|
},
|
|
380
401
|
maskMotion: {
|
|
381
402
|
type: Object,
|
|
382
|
-
required: !1
|
|
403
|
+
required: !1,
|
|
404
|
+
default: void 0
|
|
383
405
|
},
|
|
384
406
|
mouseEnterDelay: {
|
|
385
407
|
type: Number,
|
|
386
|
-
required: !1
|
|
408
|
+
required: !1,
|
|
409
|
+
default: void 0
|
|
387
410
|
},
|
|
388
411
|
mouseLeaveDelay: {
|
|
389
412
|
type: Number,
|
|
390
|
-
required: !1
|
|
413
|
+
required: !1,
|
|
414
|
+
default: void 0
|
|
391
415
|
},
|
|
392
416
|
focusDelay: {
|
|
393
417
|
type: Number,
|
|
394
|
-
required: !1
|
|
418
|
+
required: !1,
|
|
419
|
+
default: void 0
|
|
395
420
|
},
|
|
396
421
|
blurDelay: {
|
|
397
422
|
type: Number,
|
|
398
|
-
required: !1
|
|
423
|
+
required: !1,
|
|
424
|
+
default: void 0
|
|
399
425
|
},
|
|
400
426
|
popup: {
|
|
401
427
|
type: [String, Number, null, Array, Function],
|
|
402
428
|
required: !0,
|
|
403
|
-
skipCheck: !0
|
|
429
|
+
skipCheck: !0,
|
|
430
|
+
default: void 0
|
|
404
431
|
},
|
|
405
432
|
popupPlacement: {
|
|
406
433
|
type: String,
|
|
407
|
-
required: !1
|
|
434
|
+
required: !1,
|
|
435
|
+
default: void 0
|
|
408
436
|
},
|
|
409
437
|
builtinPlacements: {
|
|
410
438
|
type: Object,
|
|
411
|
-
required: !1
|
|
439
|
+
required: !1,
|
|
440
|
+
default: void 0
|
|
412
441
|
},
|
|
413
442
|
popupAlign: {
|
|
414
443
|
type: Object,
|
|
415
|
-
required: !1
|
|
444
|
+
required: !1,
|
|
445
|
+
default: void 0
|
|
416
446
|
},
|
|
417
447
|
popupClassName: {
|
|
418
448
|
type: String,
|
|
419
|
-
required: !1
|
|
449
|
+
required: !1,
|
|
450
|
+
default: void 0
|
|
420
451
|
},
|
|
421
452
|
uniqueContainerClassName: {
|
|
422
453
|
type: String,
|
|
423
|
-
required: !1
|
|
454
|
+
required: !1,
|
|
455
|
+
default: void 0
|
|
424
456
|
},
|
|
425
457
|
uniqueContainerStyle: {
|
|
426
458
|
type: null,
|
|
427
|
-
required: !1
|
|
459
|
+
required: !1,
|
|
460
|
+
default: void 0
|
|
428
461
|
},
|
|
429
462
|
popupStyle: {
|
|
430
463
|
type: null,
|
|
431
|
-
required: !1
|
|
464
|
+
required: !1,
|
|
465
|
+
default: void 0
|
|
432
466
|
},
|
|
433
467
|
getPopupClassNameFromAlign: {
|
|
434
468
|
type: Function,
|
|
435
|
-
required: !1
|
|
469
|
+
required: !1,
|
|
470
|
+
default: void 0
|
|
436
471
|
},
|
|
437
472
|
onPopupClick: {
|
|
438
473
|
type: Function,
|
|
439
|
-
required: !1
|
|
474
|
+
required: !1,
|
|
475
|
+
default: void 0
|
|
440
476
|
},
|
|
441
477
|
alignPoint: {
|
|
442
478
|
type: Boolean,
|
|
443
|
-
required: !1
|
|
479
|
+
required: !1,
|
|
480
|
+
default: void 0
|
|
444
481
|
},
|
|
445
482
|
fresh: {
|
|
446
483
|
type: Boolean,
|
|
447
|
-
required: !1
|
|
484
|
+
required: !1,
|
|
485
|
+
default: void 0
|
|
448
486
|
},
|
|
449
487
|
unique: {
|
|
450
488
|
type: Boolean,
|
|
451
|
-
required: !1
|
|
489
|
+
required: !1,
|
|
490
|
+
default: void 0
|
|
452
491
|
},
|
|
453
492
|
arrow: {
|
|
454
493
|
type: [Boolean, Object],
|
|
455
|
-
required: !1
|
|
494
|
+
required: !1,
|
|
495
|
+
default: void 0
|
|
456
496
|
},
|
|
457
497
|
mobile: {
|
|
458
498
|
type: Object,
|
|
459
|
-
required: !1
|
|
499
|
+
required: !1,
|
|
500
|
+
default: void 0
|
|
460
501
|
}
|
|
461
|
-
},
|
|
502
|
+
}, Cn)
|
|
462
503
|
});
|
|
463
504
|
}
|
|
464
|
-
const
|
|
505
|
+
const jn = bn(ge);
|
|
465
506
|
export {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
507
|
+
jn as Trigger,
|
|
508
|
+
Ln as UniqueProvider,
|
|
509
|
+
jn as default,
|
|
510
|
+
bn as generateTrigger
|
|
470
511
|
};
|