@v-c/trigger 1.0.2 → 1.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 +3 -2
- package/dist/Popup/Mask.cjs +6 -3
- package/dist/Popup/PopupContent.cjs +4 -1
- package/dist/Popup/index.cjs +21 -16
- package/dist/Popup/index.d.ts +2 -0
- package/dist/Popup/index.js +11 -8
- package/dist/UniqueProvider/UniqueContainer.cjs +8 -5
- package/dist/UniqueProvider/index.cjs +18 -14
- package/dist/UniqueProvider/index.js +1 -0
- package/dist/UniqueProvider/useTargetState.cjs +4 -1
- package/dist/context.cjs +1 -0
- package/dist/context.d.ts +2 -0
- package/dist/hooks/useAction.cjs +4 -1
- package/dist/hooks/useAlign.cjs +26 -19
- package/dist/hooks/useAlign.js +18 -14
- package/dist/hooks/useDelay.cjs +4 -1
- package/dist/hooks/useOffsetStyle.cjs +5 -2
- package/dist/hooks/useOffsetStyle.js +1 -1
- package/dist/hooks/useWatch.cjs +4 -1
- package/dist/hooks/useWinClick.cjs +8 -5
- package/dist/index.cjs +31 -39
- package/dist/index.js +14 -24
- package/dist/interface.cjs +1 -0
- package/dist/util.cjs +4 -2
- package/dist/util.js +3 -2
- package/package.json +4 -4
package/dist/Popup/Arrow.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1
2
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
2
3
|
let vue = require("vue");
|
|
3
|
-
let
|
|
4
|
+
let _v_c_util = require("@v-c/util");
|
|
4
5
|
const Arrow = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
5
6
|
props: {
|
|
6
7
|
prefixCls: {
|
|
@@ -50,7 +51,7 @@ const Arrow = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
50
51
|
}
|
|
51
52
|
return (0, vue.createVNode)("div", {
|
|
52
53
|
"ref": arrowRef,
|
|
53
|
-
"class": (0,
|
|
54
|
+
"class": (0, _v_c_util.classNames)(`${prefixCls}-arrow`, className),
|
|
54
55
|
"style": {
|
|
55
56
|
...alignStyle,
|
|
56
57
|
...style
|
package/dist/Popup/Mask.cjs
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
|
-
let
|
|
7
|
+
let _v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
|
|
5
8
|
var Mask = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) => {
|
|
6
9
|
return () => {
|
|
7
10
|
const { prefixCls, open, zIndex, mask, motion, mobile } = props;
|
|
8
11
|
if (!mask) return null;
|
|
9
|
-
return (0, vue.createVNode)(vue.Transition, (0,
|
|
12
|
+
return (0, vue.createVNode)(vue.Transition, (0, _v_c_util_dist_utils_transition.getTransitionProps)(motion?.name, motion), { default: () => [open ? (0, vue.createVNode)("div", {
|
|
10
13
|
"style": { zIndex },
|
|
11
14
|
"class": [
|
|
12
15
|
`${prefixCls}-mask`,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
7
|
var PopupContent = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
package/dist/Popup/index.cjs
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_useOffsetStyle = require("../hooks/useOffsetStyle.cjs");
|
|
4
7
|
const require_Arrow = require("./Arrow.cjs");
|
|
5
8
|
const require_Mask = require("./Mask.cjs");
|
|
6
9
|
const require_PopupContent = require("./PopupContent.cjs");
|
|
7
10
|
let vue = require("vue");
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
let
|
|
12
|
-
let __v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
|
|
11
|
+
let _v_c_resize_observer = require("@v-c/resize-observer");
|
|
12
|
+
let _v_c_util = require("@v-c/util");
|
|
13
|
+
let _v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
|
|
14
|
+
let _v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
|
|
13
15
|
var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, expose }) => {
|
|
14
16
|
const popupContent = (0, vue.computed)(() => typeof props.popup === "function" ? props.popup() : props.popup);
|
|
15
|
-
const { offsetX, offsetR, offsetY, offsetB, open, ready, align } = (0,
|
|
17
|
+
const { offsetX, offsetR, offsetY, offsetB, open, ready, align } = (0, _v_c_util_dist_props_util.toPropsRefs)(props, "offsetX", "offsetB", "offsetY", "offsetR", "ready", "open", "align");
|
|
16
18
|
const isNodeVisible = (0, vue.computed)(() => props.open || props.keepDom);
|
|
17
19
|
const isMobile = (0, vue.computed)(() => !!props.mobile);
|
|
18
20
|
const getPopupContainerNeedParams = props?.getPopupContainer?.length > 0;
|
|
@@ -46,9 +48,10 @@ var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, exp
|
|
|
46
48
|
getElement: () => popupElementRef.value,
|
|
47
49
|
nativeElement: popupElementRef
|
|
48
50
|
});
|
|
51
|
+
(0, _v_c_resize_observer.useResizeObserver)(open, popupElementRef, onInternalResize);
|
|
49
52
|
return () => {
|
|
50
53
|
if (!show.value) return null;
|
|
51
|
-
const { stretch, targetHeight, targetWidth, portal: Portal, forceRender, getPopupContainer, target, autoDestroy, zIndex, prefixCls, arrow, arrowPos, align: align$1, onMouseEnter, onMouseLeave, onPointerEnter, onPointerDownCapture, onClick, fresh, onPrepare, onVisibleChanged } = props;
|
|
54
|
+
const { onEsc, stretch, targetHeight, targetWidth, portal: Portal, forceRender, getPopupContainer, target, autoDestroy, zIndex, prefixCls, arrow, arrowPos, align: align$1, onMouseEnter, onMouseLeave, onPointerEnter, onPointerDownCapture, onClick, fresh, onPrepare, onVisibleChanged } = props;
|
|
52
55
|
const miscStyle = {};
|
|
53
56
|
if (stretch) {
|
|
54
57
|
if (stretch.includes("height") && targetHeight) miscStyle.height = `${targetHeight}px`;
|
|
@@ -59,7 +62,7 @@ var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, exp
|
|
|
59
62
|
if (!open.value) miscStyle.pointerEvents = "none";
|
|
60
63
|
const [mergedMask, mergedMaskMotion, mergedPopupMotion] = mergedProps.value;
|
|
61
64
|
const popupMotionName = mergedPopupMotion?.name ?? mergedPopupMotion?.motionName;
|
|
62
|
-
const baseTransitionProps = popupMotionName ? (0,
|
|
65
|
+
const baseTransitionProps = popupMotionName ? (0, _v_c_util_dist_utils_transition.getTransitionProps)(popupMotionName, mergedPopupMotion) : {
|
|
63
66
|
appear: true,
|
|
64
67
|
...mergedPopupMotion || {}
|
|
65
68
|
};
|
|
@@ -83,11 +86,12 @@ var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, exp
|
|
|
83
86
|
onVisibleChanged?.(false);
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
|
-
const cls = (0,
|
|
89
|
+
const cls = (0, _v_c_util.classNames)(prefixCls, attrs.class, props.className, { [`${prefixCls}-mobile`]: isMobile.value });
|
|
87
90
|
return (0, vue.createVNode)(Portal, {
|
|
88
91
|
"open": forceRender || isNodeVisible.value,
|
|
89
92
|
"getContainer": getPopupContainer && (() => getPopupContainer(target)),
|
|
90
|
-
"autoDestroy": autoDestroy
|
|
93
|
+
"autoDestroy": autoDestroy,
|
|
94
|
+
"onEsc": onEsc
|
|
91
95
|
}, { default: () => [
|
|
92
96
|
(0, vue.createVNode)(require_Mask.default, {
|
|
93
97
|
"prefixCls": prefixCls,
|
|
@@ -97,10 +101,7 @@ var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, exp
|
|
|
97
101
|
"motion": mergedMaskMotion,
|
|
98
102
|
"mobile": isMobile.value
|
|
99
103
|
}, null),
|
|
100
|
-
(0, vue.createVNode)(
|
|
101
|
-
"onResize": onInternalResize,
|
|
102
|
-
"disabled": !open.value
|
|
103
|
-
}, { default: () => [(0, vue.createVNode)(vue.Transition, mergedTransitionProps, { default: () => [(0, vue.withDirectives)((0, vue.createVNode)("div", (0, vue.mergeProps)({
|
|
104
|
+
(0, vue.createVNode)(vue.Transition, mergedTransitionProps, { default: () => [(0, vue.withDirectives)((0, vue.createVNode)("div", (0, vue.mergeProps)({
|
|
104
105
|
"ref": popupElementRef,
|
|
105
106
|
"class": cls,
|
|
106
107
|
"style": [
|
|
@@ -125,11 +126,15 @@ var Popup = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, slots, exp
|
|
|
125
126
|
"arrow": arrow === true ? {} : arrow,
|
|
126
127
|
"arrowPos": arrowPos,
|
|
127
128
|
"align": align$1
|
|
128
|
-
}, null), (0, vue.createVNode)(require_PopupContent.default, { "cache": !open.value && !fresh }, { default: () => [popupContent.value] })]), [[vue.vShow, open.value]])] })
|
|
129
|
+
}, null), (0, vue.createVNode)(require_PopupContent.default, { "cache": !open.value && !fresh }, { default: () => [popupContent.value] })]), [[vue.vShow, open.value]])] }),
|
|
129
130
|
slots?.default?.()
|
|
130
131
|
] });
|
|
131
132
|
};
|
|
132
133
|
}, { props: /* @__PURE__ */ (0, vue.mergeDefaults)({
|
|
134
|
+
onEsc: {
|
|
135
|
+
required: false,
|
|
136
|
+
default: void 0
|
|
137
|
+
},
|
|
133
138
|
prefixCls: {
|
|
134
139
|
type: String,
|
|
135
140
|
required: true,
|
package/dist/Popup/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PortalProps } from '@v-c/portal';
|
|
1
2
|
import { ResizeObserverProps } from '@v-c/resize-observer';
|
|
2
3
|
import { CSSMotionProps } from '@v-c/util/dist/utils/transition';
|
|
3
4
|
import { CSSProperties } from 'vue';
|
|
@@ -11,6 +12,7 @@ export interface MobileConfig {
|
|
|
11
12
|
maskMotion?: CSSMotionProps;
|
|
12
13
|
}
|
|
13
14
|
export interface PopupProps {
|
|
15
|
+
onEsc?: PortalProps['onEsc'];
|
|
14
16
|
prefixCls: string;
|
|
15
17
|
className?: string;
|
|
16
18
|
style?: CSSProperties;
|
package/dist/Popup/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Arrow } from "./Arrow.js";
|
|
|
3
3
|
import Mask_default from "./Mask.js";
|
|
4
4
|
import PopupContent_default from "./PopupContent.js";
|
|
5
5
|
import { Transition, computed, createVNode, defineComponent, mergeDefaults, mergeProps, nextTick, shallowRef, vShow, watchEffect, withDirectives } from "vue";
|
|
6
|
-
import
|
|
6
|
+
import { useResizeObserver } from "@v-c/resize-observer";
|
|
7
7
|
import { classNames } from "@v-c/util";
|
|
8
8
|
import { toPropsRefs } from "@v-c/util/dist/props-util";
|
|
9
9
|
import { getTransitionProps } from "@v-c/util/dist/utils/transition";
|
|
@@ -43,9 +43,10 @@ var Popup_default = /* @__PURE__ */ defineComponent((props, { attrs, slots, expo
|
|
|
43
43
|
getElement: () => popupElementRef.value,
|
|
44
44
|
nativeElement: popupElementRef
|
|
45
45
|
});
|
|
46
|
+
useResizeObserver(open, popupElementRef, onInternalResize);
|
|
46
47
|
return () => {
|
|
47
48
|
if (!show.value) return null;
|
|
48
|
-
const { stretch, targetHeight, targetWidth, portal: Portal, forceRender, getPopupContainer, target, autoDestroy, zIndex, prefixCls, arrow, arrowPos, align: align$1, onMouseEnter, onMouseLeave, onPointerEnter, onPointerDownCapture, onClick, fresh, onPrepare, onVisibleChanged } = props;
|
|
49
|
+
const { onEsc, stretch, targetHeight, targetWidth, portal: Portal, forceRender, getPopupContainer, target, autoDestroy, zIndex, prefixCls, arrow, arrowPos, align: align$1, onMouseEnter, onMouseLeave, onPointerEnter, onPointerDownCapture, onClick, fresh, onPrepare, onVisibleChanged } = props;
|
|
49
50
|
const miscStyle = {};
|
|
50
51
|
if (stretch) {
|
|
51
52
|
if (stretch.includes("height") && targetHeight) miscStyle.height = `${targetHeight}px`;
|
|
@@ -84,7 +85,8 @@ var Popup_default = /* @__PURE__ */ defineComponent((props, { attrs, slots, expo
|
|
|
84
85
|
return createVNode(Portal, {
|
|
85
86
|
"open": forceRender || isNodeVisible.value,
|
|
86
87
|
"getContainer": getPopupContainer && (() => getPopupContainer(target)),
|
|
87
|
-
"autoDestroy": autoDestroy
|
|
88
|
+
"autoDestroy": autoDestroy,
|
|
89
|
+
"onEsc": onEsc
|
|
88
90
|
}, { default: () => [
|
|
89
91
|
createVNode(Mask_default, {
|
|
90
92
|
"prefixCls": prefixCls,
|
|
@@ -94,10 +96,7 @@ var Popup_default = /* @__PURE__ */ defineComponent((props, { attrs, slots, expo
|
|
|
94
96
|
"motion": mergedMaskMotion,
|
|
95
97
|
"mobile": isMobile.value
|
|
96
98
|
}, null),
|
|
97
|
-
createVNode(
|
|
98
|
-
"onResize": onInternalResize,
|
|
99
|
-
"disabled": !open.value
|
|
100
|
-
}, { default: () => [createVNode(Transition, mergedTransitionProps, { default: () => [withDirectives(createVNode("div", mergeProps({
|
|
99
|
+
createVNode(Transition, mergedTransitionProps, { default: () => [withDirectives(createVNode("div", mergeProps({
|
|
101
100
|
"ref": popupElementRef,
|
|
102
101
|
"class": cls,
|
|
103
102
|
"style": [
|
|
@@ -122,11 +121,15 @@ var Popup_default = /* @__PURE__ */ defineComponent((props, { attrs, slots, expo
|
|
|
122
121
|
"arrow": arrow === true ? {} : arrow,
|
|
123
122
|
"arrowPos": arrowPos,
|
|
124
123
|
"align": align$1
|
|
125
|
-
}, null), createVNode(PopupContent_default, { "cache": !open.value && !fresh }, { default: () => [popupContent.value] })]), [[vShow, open.value]])] })
|
|
124
|
+
}, null), createVNode(PopupContent_default, { "cache": !open.value && !fresh }, { default: () => [popupContent.value] })]), [[vShow, open.value]])] }),
|
|
126
125
|
slots?.default?.()
|
|
127
126
|
] });
|
|
128
127
|
};
|
|
129
128
|
}, { props: /* @__PURE__ */ mergeDefaults({
|
|
129
|
+
onEsc: {
|
|
130
|
+
required: false,
|
|
131
|
+
default: void 0
|
|
132
|
+
},
|
|
130
133
|
prefixCls: {
|
|
131
134
|
type: String,
|
|
132
135
|
required: true,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_useOffsetStyle = require("../hooks/useOffsetStyle.cjs");
|
|
4
7
|
let vue = require("vue");
|
|
5
|
-
let
|
|
6
|
-
let
|
|
8
|
+
let _v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
|
|
9
|
+
let _v_c_util_dist_utils_transition = require("@v-c/util/dist/utils/transition");
|
|
7
10
|
var UniqueContainer = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
|
|
8
11
|
const motionVisible = (0, vue.shallowRef)(false);
|
|
9
|
-
const { open, isMobile, align, ready, offsetR, offsetB, offsetX, offsetY } = (0,
|
|
12
|
+
const { open, isMobile, align, ready, offsetR, offsetB, offsetX, offsetY } = (0, _v_c_util_dist_props_util.toPropsRefs)(props, "open", "isMobile", "align", "ready", "offsetR", "offsetB", "offsetX", "offsetY");
|
|
10
13
|
const offsetStyle = require_useOffsetStyle.default(isMobile, ready, open, align, offsetR, offsetB, offsetX, offsetY);
|
|
11
14
|
const cachedOffsetStyleRef = (0, vue.shallowRef)(offsetStyle.value);
|
|
12
15
|
(0, vue.watchEffect)(() => {
|
|
@@ -22,7 +25,7 @@ var UniqueContainer = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
|
|
|
22
25
|
sizeStyle.width = `${popupSize.width}px`;
|
|
23
26
|
sizeStyle.height = `${popupSize.height}px`;
|
|
24
27
|
}
|
|
25
|
-
const baseTransitionProps = (0,
|
|
28
|
+
const baseTransitionProps = (0, _v_c_util_dist_utils_transition.getTransitionProps)(motion?.name, motion);
|
|
26
29
|
const mergedTransitionProps = {
|
|
27
30
|
...baseTransitionProps,
|
|
28
31
|
onBeforeEnter: (element) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_context = require("../context.cjs");
|
|
4
7
|
const require_util = require("../util.cjs");
|
|
@@ -8,10 +11,10 @@ const require_index = require("../Popup/index.cjs");
|
|
|
8
11
|
const require_UniqueContainer = require("./UniqueContainer.cjs");
|
|
9
12
|
const require_useTargetState = require("./useTargetState.cjs");
|
|
10
13
|
let vue = require("vue");
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
let
|
|
14
|
+
let _v_c_portal = require("@v-c/portal");
|
|
15
|
+
_v_c_portal = require_rolldown_runtime.__toESM(_v_c_portal);
|
|
16
|
+
let _v_c_util = require("@v-c/util");
|
|
17
|
+
let _v_c_util_dist_Dom_findDOMNode = require("@v-c/util/dist/Dom/findDOMNode");
|
|
15
18
|
var UniqueProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
16
19
|
const [trigger, open, options, onTargetVisibleChanged] = require_useTargetState.default();
|
|
17
20
|
const mergedOptions = (0, vue.computed)(() => {
|
|
@@ -23,15 +26,15 @@ var UniqueProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots })
|
|
|
23
26
|
const externalPopupRef = (0, vue.shallowRef)(null);
|
|
24
27
|
const resolveToElement = (node) => {
|
|
25
28
|
if (!node) return null;
|
|
26
|
-
if ((0,
|
|
29
|
+
if ((0, _v_c_util_dist_Dom_findDOMNode.isDOM)(node)) return node;
|
|
27
30
|
const exposed = node;
|
|
28
|
-
if ((0,
|
|
31
|
+
if ((0, _v_c_util_dist_Dom_findDOMNode.isDOM)(exposed?.$el)) return exposed.$el;
|
|
29
32
|
const nativeEl = exposed?.nativeElement;
|
|
30
|
-
if ((0,
|
|
31
|
-
if ((0,
|
|
33
|
+
if ((0, _v_c_util_dist_Dom_findDOMNode.isDOM)(nativeEl?.value)) return nativeEl.value;
|
|
34
|
+
if ((0, _v_c_util_dist_Dom_findDOMNode.isDOM)(nativeEl)) return nativeEl;
|
|
32
35
|
if (typeof exposed?.getElement === "function") {
|
|
33
36
|
const el = exposed.getElement();
|
|
34
|
-
if ((0,
|
|
37
|
+
if ((0, _v_c_util_dist_Dom_findDOMNode.isDOM)(el)) return el;
|
|
35
38
|
}
|
|
36
39
|
return null;
|
|
37
40
|
};
|
|
@@ -70,7 +73,7 @@ var UniqueProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots })
|
|
|
70
73
|
};
|
|
71
74
|
const alignedClassName = (0, vue.computed)(() => {
|
|
72
75
|
if (!mergedOptions.value) return "";
|
|
73
|
-
return (0,
|
|
76
|
+
return (0, _v_c_util.classNames)(require_util.getAlignPopupClassName(mergedOptions.value?.builtinPlacements || {}, mergedOptions.value.prefixCls || "", alignInfo.value, false), mergedOptions.value?.getPopupClassNameFromAlign?.(alignInfo.value));
|
|
74
77
|
});
|
|
75
78
|
const contextValue = {
|
|
76
79
|
show,
|
|
@@ -96,10 +99,11 @@ var UniqueProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots })
|
|
|
96
99
|
const prefixCls = mergedOptions?.value?.prefixCls;
|
|
97
100
|
return (0, vue.createVNode)(require_context.UniqueContextProvider, contextValue, { default: () => [slots?.default?.(), !!mergedOptions.value && (0, vue.createVNode)(require_context.TriggerContextProvider, triggerContextValue.value, { default: () => [(0, vue.createVNode)(require_index.default, {
|
|
98
101
|
"ref": setPopupRef,
|
|
99
|
-
"portal":
|
|
102
|
+
"portal": _v_c_portal.default,
|
|
100
103
|
"prefixCls": prefixCls,
|
|
101
104
|
"popup": mergedOptions.value?.popup,
|
|
102
|
-
"
|
|
105
|
+
"onEsc": mergedOptions.value?.onEsc,
|
|
106
|
+
"className": (0, _v_c_util.classNames)(mergedOptions.value?.popupClassName, alignedClassName.value, `${prefixCls}-unique-controlled`),
|
|
103
107
|
"style": mergedOptions.value?.popupStyle,
|
|
104
108
|
"target": mergedOptions.value?.target,
|
|
105
109
|
"open": open.value,
|
|
@@ -147,7 +151,7 @@ var UniqueProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots })
|
|
|
147
151
|
},
|
|
148
152
|
"popupSize": popupSize.value,
|
|
149
153
|
"motion": mergedOptions.value?.popupMotion,
|
|
150
|
-
"uniqueContainerClassName": (0,
|
|
154
|
+
"uniqueContainerClassName": (0, _v_c_util.classNames)(mergedOptions.value?.uniqueContainerClassName, alignedClassName.value),
|
|
151
155
|
"uniqueContainerStyle": mergedOptions?.value?.uniqueContainerStyle
|
|
152
156
|
}, null)] })] })] });
|
|
153
157
|
};
|
|
@@ -96,6 +96,7 @@ var UniqueProvider_default = /* @__PURE__ */ defineComponent((props, { slots })
|
|
|
96
96
|
"portal": Portal,
|
|
97
97
|
"prefixCls": prefixCls,
|
|
98
98
|
"popup": mergedOptions.value?.popup,
|
|
99
|
+
"onEsc": mergedOptions.value?.onEsc,
|
|
99
100
|
"className": classNames(mergedOptions.value?.popupClassName, alignedClassName.value, `${prefixCls}-unique-controlled`),
|
|
100
101
|
"style": mergedOptions.value?.popupStyle,
|
|
101
102
|
"target": mergedOptions.value?.target,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
7
|
function useTargetState() {
|
package/dist/context.cjs
CHANGED
package/dist/context.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PortalProps } from '@v-c/portal';
|
|
1
2
|
import { CSSMotionProps } from '@v-c/util/dist/utils/transition';
|
|
2
3
|
import { CSSProperties, InjectionKey, Ref } from 'vue';
|
|
3
4
|
import { TriggerProps } from './index';
|
|
@@ -32,6 +33,7 @@ export interface UniqueShowOptions {
|
|
|
32
33
|
arrow?: ArrowTypeOuter;
|
|
33
34
|
getPopupContainer?: TriggerProps['getPopupContainer'];
|
|
34
35
|
getPopupClassNameFromAlign?: (align: AlignType) => string;
|
|
36
|
+
onEsc?: PortalProps['onEsc'];
|
|
35
37
|
}
|
|
36
38
|
export interface UniqueContextProps {
|
|
37
39
|
show: (options: UniqueShowOptions, isOpen: () => boolean) => void;
|
package/dist/hooks/useAction.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
7
|
function toArray(val) {
|
package/dist/hooks/useAlign.cjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_util = require("../util.cjs");
|
|
4
7
|
let vue = require("vue");
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
+
let _v_c_util_dist_Dom_findDOMNode = require("@v-c/util/dist/Dom/findDOMNode");
|
|
9
|
+
let _v_c_util_dist_Dom_isVisible = require("@v-c/util/dist/Dom/isVisible");
|
|
10
|
+
_v_c_util_dist_Dom_isVisible = require_rolldown_runtime.__toESM(_v_c_util_dist_Dom_isVisible);
|
|
8
11
|
function getUnitOffset(size, offset = 0) {
|
|
9
12
|
const offsetStr = `${offset}`;
|
|
10
13
|
const cells = offsetStr.match(/^(.*)\%$/);
|
|
@@ -41,10 +44,12 @@ function reversePoints(points, index) {
|
|
|
41
44
|
l: "r",
|
|
42
45
|
r: "l"
|
|
43
46
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
const clone = [...points];
|
|
48
|
+
clone[index] = reverseMap[points[index]] || "c";
|
|
49
|
+
return clone;
|
|
50
|
+
}
|
|
51
|
+
function flatPoints(points) {
|
|
52
|
+
return points.join("");
|
|
48
53
|
}
|
|
49
54
|
function shouldSwitchPlacement(isOverflow, isVisibleFirst, newVisibleArea, originVisibleArea, newRecommendArea, originRecommendArea) {
|
|
50
55
|
if (isOverflow) return newVisibleArea > originVisibleArea || newVisibleArea === originVisibleArea && (!isVisibleFirst || newRecommendArea >= originRecommendArea);
|
|
@@ -167,9 +172,9 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
167
172
|
const popupHeight = popupRect.height;
|
|
168
173
|
const popupWidth = popupRect.width;
|
|
169
174
|
const popupMirrorRect = rawPopupMirrorRect;
|
|
170
|
-
const scaleX$1 = require_util.toNum(Math.
|
|
171
|
-
const scaleY$1 = require_util.toNum(Math.
|
|
172
|
-
if (scaleX$1 === 0 || scaleY$1 === 0 || (0,
|
|
175
|
+
const scaleX$1 = require_util.toNum(Math.floor(popupWidth / parseFloat(width) * 1e3) / 1e3);
|
|
176
|
+
const scaleY$1 = require_util.toNum(Math.floor(popupHeight / parseFloat(height) * 1e3) / 1e3);
|
|
177
|
+
if (scaleX$1 === 0 || scaleY$1 === 0 || (0, _v_c_util_dist_Dom_findDOMNode.isDOM)(target) && !(0, _v_c_util_dist_Dom_isVisible.default)(target)) return;
|
|
173
178
|
const { offset, targetOffset } = placementInfo;
|
|
174
179
|
let [popupOffsetX, popupOffsetY] = getNumberOffset(popupRect, offset);
|
|
175
180
|
const [targetOffsetX, targetOffsetY] = getNumberOffset(targetRect, targetOffset);
|
|
@@ -181,6 +186,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
181
186
|
const targetAlignPoint = getAlignPoint(targetRect, targetPoints);
|
|
182
187
|
const popupAlignPoint = getAlignPoint(popupRect, popupPoints);
|
|
183
188
|
const nextAlignInfo = { ...placementInfo };
|
|
189
|
+
let nextPoints = [popupPoints, targetPoints];
|
|
184
190
|
let nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX;
|
|
185
191
|
let nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY;
|
|
186
192
|
function getIntersectionVisibleArea(offsetX$1, offsetY$1, area = visibleArea) {
|
|
@@ -227,7 +233,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
227
233
|
prevFlipRef.value.bt = true;
|
|
228
234
|
nextOffsetY = tmpNextOffsetY;
|
|
229
235
|
popupOffsetY = -popupOffsetY;
|
|
230
|
-
|
|
236
|
+
nextPoints = [reversePoints(nextPoints[0], 0), reversePoints(nextPoints[1], 0)];
|
|
231
237
|
} else prevFlipRef.value.bt = false;
|
|
232
238
|
}
|
|
233
239
|
const overflowTop = nextPopupY < adjustCheckVisibleArea.top;
|
|
@@ -239,7 +245,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
239
245
|
prevFlipRef.value.tb = true;
|
|
240
246
|
nextOffsetY = tmpNextOffsetY;
|
|
241
247
|
popupOffsetY = -popupOffsetY;
|
|
242
|
-
|
|
248
|
+
nextPoints = [reversePoints(nextPoints[0], 0), reversePoints(nextPoints[1], 0)];
|
|
243
249
|
} else prevFlipRef.value.tb = false;
|
|
244
250
|
}
|
|
245
251
|
const needAdjustX = supportAdjust(adjustX);
|
|
@@ -253,7 +259,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
253
259
|
prevFlipRef.value.rl = true;
|
|
254
260
|
nextOffsetX = tmpNextOffsetX;
|
|
255
261
|
popupOffsetX = -popupOffsetX;
|
|
256
|
-
|
|
262
|
+
nextPoints = [reversePoints(nextPoints[0], 1), reversePoints(nextPoints[1], 1)];
|
|
257
263
|
} else prevFlipRef.value.rl = false;
|
|
258
264
|
}
|
|
259
265
|
const overflowLeft = nextPopupX < adjustCheckVisibleArea.left;
|
|
@@ -265,9 +271,10 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
265
271
|
prevFlipRef.value.lr = true;
|
|
266
272
|
nextOffsetX = tmpNextOffsetX;
|
|
267
273
|
popupOffsetX = -popupOffsetX;
|
|
268
|
-
|
|
274
|
+
nextPoints = [reversePoints(nextPoints[0], 1), reversePoints(nextPoints[1], 1)];
|
|
269
275
|
} else prevFlipRef.value.lr = false;
|
|
270
276
|
}
|
|
277
|
+
nextAlignInfo.points = [flatPoints(nextPoints[0]), flatPoints(nextPoints[1])];
|
|
271
278
|
syncNextPopupPosition();
|
|
272
279
|
const numShiftX = shiftX === true ? 0 : shiftX;
|
|
273
280
|
if (typeof numShiftX === "number") {
|
|
@@ -305,12 +312,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
305
312
|
let offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
306
313
|
let offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
307
314
|
if (scaleX$1 === 1) {
|
|
308
|
-
nextOffsetX = Math.
|
|
309
|
-
offsetX4Right = Math.
|
|
315
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
316
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
310
317
|
}
|
|
311
318
|
if (scaleY$1 === 1) {
|
|
312
|
-
nextOffsetY = Math.
|
|
313
|
-
offsetY4Bottom = Math.
|
|
319
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
320
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
314
321
|
}
|
|
315
322
|
const nextOffsetInfo = {
|
|
316
323
|
ready: true,
|
package/dist/hooks/useAlign.js
CHANGED
|
@@ -38,10 +38,12 @@ function reversePoints(points, index) {
|
|
|
38
38
|
l: "r",
|
|
39
39
|
r: "l"
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const clone = [...points];
|
|
42
|
+
clone[index] = reverseMap[points[index]] || "c";
|
|
43
|
+
return clone;
|
|
44
|
+
}
|
|
45
|
+
function flatPoints(points) {
|
|
46
|
+
return points.join("");
|
|
45
47
|
}
|
|
46
48
|
function shouldSwitchPlacement(isOverflow, isVisibleFirst, newVisibleArea, originVisibleArea, newRecommendArea, originRecommendArea) {
|
|
47
49
|
if (isOverflow) return newVisibleArea > originVisibleArea || newVisibleArea === originVisibleArea && (!isVisibleFirst || newRecommendArea >= originRecommendArea);
|
|
@@ -164,8 +166,8 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
164
166
|
const popupHeight = popupRect.height;
|
|
165
167
|
const popupWidth = popupRect.width;
|
|
166
168
|
const popupMirrorRect = rawPopupMirrorRect;
|
|
167
|
-
const scaleX$1 = toNum(Math.
|
|
168
|
-
const scaleY$1 = toNum(Math.
|
|
169
|
+
const scaleX$1 = toNum(Math.floor(popupWidth / parseFloat(width) * 1e3) / 1e3);
|
|
170
|
+
const scaleY$1 = toNum(Math.floor(popupHeight / parseFloat(height) * 1e3) / 1e3);
|
|
169
171
|
if (scaleX$1 === 0 || scaleY$1 === 0 || isDOM(target) && !isVisible(target)) return;
|
|
170
172
|
const { offset, targetOffset } = placementInfo;
|
|
171
173
|
let [popupOffsetX, popupOffsetY] = getNumberOffset(popupRect, offset);
|
|
@@ -178,6 +180,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
178
180
|
const targetAlignPoint = getAlignPoint(targetRect, targetPoints);
|
|
179
181
|
const popupAlignPoint = getAlignPoint(popupRect, popupPoints);
|
|
180
182
|
const nextAlignInfo = { ...placementInfo };
|
|
183
|
+
let nextPoints = [popupPoints, targetPoints];
|
|
181
184
|
let nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX;
|
|
182
185
|
let nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY;
|
|
183
186
|
function getIntersectionVisibleArea(offsetX$1, offsetY$1, area = visibleArea) {
|
|
@@ -224,7 +227,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
224
227
|
prevFlipRef.value.bt = true;
|
|
225
228
|
nextOffsetY = tmpNextOffsetY;
|
|
226
229
|
popupOffsetY = -popupOffsetY;
|
|
227
|
-
|
|
230
|
+
nextPoints = [reversePoints(nextPoints[0], 0), reversePoints(nextPoints[1], 0)];
|
|
228
231
|
} else prevFlipRef.value.bt = false;
|
|
229
232
|
}
|
|
230
233
|
const overflowTop = nextPopupY < adjustCheckVisibleArea.top;
|
|
@@ -236,7 +239,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
236
239
|
prevFlipRef.value.tb = true;
|
|
237
240
|
nextOffsetY = tmpNextOffsetY;
|
|
238
241
|
popupOffsetY = -popupOffsetY;
|
|
239
|
-
|
|
242
|
+
nextPoints = [reversePoints(nextPoints[0], 0), reversePoints(nextPoints[1], 0)];
|
|
240
243
|
} else prevFlipRef.value.tb = false;
|
|
241
244
|
}
|
|
242
245
|
const needAdjustX = supportAdjust(adjustX);
|
|
@@ -250,7 +253,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
250
253
|
prevFlipRef.value.rl = true;
|
|
251
254
|
nextOffsetX = tmpNextOffsetX;
|
|
252
255
|
popupOffsetX = -popupOffsetX;
|
|
253
|
-
|
|
256
|
+
nextPoints = [reversePoints(nextPoints[0], 1), reversePoints(nextPoints[1], 1)];
|
|
254
257
|
} else prevFlipRef.value.rl = false;
|
|
255
258
|
}
|
|
256
259
|
const overflowLeft = nextPopupX < adjustCheckVisibleArea.left;
|
|
@@ -262,9 +265,10 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
262
265
|
prevFlipRef.value.lr = true;
|
|
263
266
|
nextOffsetX = tmpNextOffsetX;
|
|
264
267
|
popupOffsetX = -popupOffsetX;
|
|
265
|
-
|
|
268
|
+
nextPoints = [reversePoints(nextPoints[0], 1), reversePoints(nextPoints[1], 1)];
|
|
266
269
|
} else prevFlipRef.value.lr = false;
|
|
267
270
|
}
|
|
271
|
+
nextAlignInfo.points = [flatPoints(nextPoints[0]), flatPoints(nextPoints[1])];
|
|
268
272
|
syncNextPopupPosition();
|
|
269
273
|
const numShiftX = shiftX === true ? 0 : shiftX;
|
|
270
274
|
if (typeof numShiftX === "number") {
|
|
@@ -302,12 +306,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
302
306
|
let offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
303
307
|
let offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
304
308
|
if (scaleX$1 === 1) {
|
|
305
|
-
nextOffsetX = Math.
|
|
306
|
-
offsetX4Right = Math.
|
|
309
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
310
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
307
311
|
}
|
|
308
312
|
if (scaleY$1 === 1) {
|
|
309
|
-
nextOffsetY = Math.
|
|
310
|
-
offsetY4Bottom = Math.
|
|
313
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
314
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
311
315
|
}
|
|
312
316
|
const nextOffsetInfo = {
|
|
313
317
|
ready: true,
|
package/dist/hooks/useDelay.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
7
|
function useDelay() {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
let vue = require("vue");
|
|
4
7
|
function useOffsetStyle(isMobile, ready, open, align, offsetR, offsetB, offsetX, offsetY) {
|
|
@@ -10,7 +13,7 @@ function useOffsetStyle(isMobile, ready, open, align, offsetR, offsetB, offsetX,
|
|
|
10
13
|
right: AUTO,
|
|
11
14
|
bottom: AUTO
|
|
12
15
|
};
|
|
13
|
-
if (!
|
|
16
|
+
if (!ready.value && open.value) return {};
|
|
14
17
|
if (!isMobile.value && (ready.value || !open.value)) {
|
|
15
18
|
const { points } = align.value ?? {};
|
|
16
19
|
const dynamicInset = align.value?.dynamicInset || align.value?._experimental?.dynamicInset;
|
|
@@ -8,7 +8,7 @@ function useOffsetStyle(isMobile, ready, open, align, offsetR, offsetB, offsetX,
|
|
|
8
8
|
right: AUTO,
|
|
9
9
|
bottom: AUTO
|
|
10
10
|
};
|
|
11
|
-
if (!
|
|
11
|
+
if (!ready.value && open.value) return {};
|
|
12
12
|
if (!isMobile.value && (ready.value || !open.value)) {
|
|
13
13
|
const { points } = align.value ?? {};
|
|
14
14
|
const dynamicInset = align.value?.dynamicInset || align.value?._experimental?.dynamicInset;
|
package/dist/hooks/useWatch.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_util = require("../util.cjs");
|
|
4
7
|
let vue = require("vue");
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_util = require("../util.cjs");
|
|
4
7
|
let vue = require("vue");
|
|
5
|
-
let
|
|
6
|
-
let
|
|
8
|
+
let _v_c_util = require("@v-c/util");
|
|
9
|
+
let _v_c_util_dist_Dom_shadow = require("@v-c/util/dist/Dom/shadow");
|
|
7
10
|
function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen) {
|
|
8
11
|
const openRef = (0, vue.shallowRef)(open.value);
|
|
9
12
|
(0, vue.watchEffect)(() => {
|
|
@@ -28,7 +31,7 @@ function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable,
|
|
|
28
31
|
win.addEventListener("pointerdown", onPointerDown, true);
|
|
29
32
|
win.addEventListener("mousedown", onTriggerClose, true);
|
|
30
33
|
win.addEventListener("contextmenu", onTriggerClose, true);
|
|
31
|
-
const targetShadowRoot = (0,
|
|
34
|
+
const targetShadowRoot = (0, _v_c_util_dist_Dom_shadow.getShadowRoot)(targetEle$1);
|
|
32
35
|
if (targetShadowRoot) {
|
|
33
36
|
targetShadowRoot.addEventListener("mousedown", onTriggerClose, true);
|
|
34
37
|
targetShadowRoot.addEventListener("contextmenu", onTriggerClose, true);
|
|
@@ -36,7 +39,7 @@ function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable,
|
|
|
36
39
|
if (process.env.NODE_ENV !== "production" && targetEle$1) {
|
|
37
40
|
const targetRoot = targetEle$1.getRootNode?.();
|
|
38
41
|
const popupRoot = popupEle$1.getRootNode?.();
|
|
39
|
-
(0,
|
|
42
|
+
(0, _v_c_util.warning)(targetRoot === popupRoot, `trigger element and popup element should in same shadow root.`);
|
|
40
43
|
}
|
|
41
44
|
onCleanup(() => {
|
|
42
45
|
win.removeEventListener("pointerdown", onPointerDown, true);
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
2
5
|
const require_rolldown_runtime = require("./_virtual/rolldown_runtime.cjs");
|
|
3
6
|
const require_context = require("./context.cjs");
|
|
4
7
|
const require_useAction = require("./hooks/useAction.cjs");
|
|
@@ -10,17 +13,13 @@ const require_useWinClick = require("./hooks/useWinClick.cjs");
|
|
|
10
13
|
const require_index = require("./Popup/index.cjs");
|
|
11
14
|
const require_index$1 = require("./UniqueProvider/index.cjs");
|
|
12
15
|
let vue = require("vue");
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
let
|
|
19
|
-
let
|
|
20
|
-
let __v_c_util_dist_vnode = require("@v-c/util/dist/vnode");
|
|
21
|
-
function _isSlot(s) {
|
|
22
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, vue.isVNode)(s);
|
|
23
|
-
}
|
|
16
|
+
let _v_c_portal = require("@v-c/portal");
|
|
17
|
+
_v_c_portal = require_rolldown_runtime.__toESM(_v_c_portal);
|
|
18
|
+
let _v_c_resize_observer = require("@v-c/resize-observer");
|
|
19
|
+
let _v_c_util = require("@v-c/util");
|
|
20
|
+
let _v_c_util_dist_Dom_shadow = require("@v-c/util/dist/Dom/shadow");
|
|
21
|
+
let _v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
|
|
22
|
+
let _v_c_util_dist_vnode = require("@v-c/util/dist/vnode");
|
|
24
23
|
var defaults = {
|
|
25
24
|
prefixCls: "vc-trigger-popup",
|
|
26
25
|
action: "hover",
|
|
@@ -30,7 +29,7 @@ var defaults = {
|
|
|
30
29
|
popupVisible: void 0,
|
|
31
30
|
defaultPopupVisible: void 0
|
|
32
31
|
};
|
|
33
|
-
function generateTrigger(PortalComponent =
|
|
32
|
+
function generateTrigger(PortalComponent = _v_c_portal.default) {
|
|
34
33
|
return /* @__PURE__ */ (0, vue.defineComponent)((props, { expose, slots, attrs }) => {
|
|
35
34
|
const mergedAutoDestroy = (0, vue.computed)(() => props.autoDestroy ?? false);
|
|
36
35
|
const openUncontrolled = (0, vue.computed)(() => props.popupVisible === void 0);
|
|
@@ -49,20 +48,20 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
49
48
|
const popupEle = (0, vue.shallowRef)(null);
|
|
50
49
|
const externalPopupRef = (0, vue.shallowRef)(null);
|
|
51
50
|
const setPopupRef = (node) => {
|
|
52
|
-
const element = (0,
|
|
51
|
+
const element = (0, _v_c_util_dist_vnode.resolveToElement)(node);
|
|
53
52
|
externalPopupRef.value = element;
|
|
54
53
|
if (popupEle.value !== element) popupEle.value = element;
|
|
55
54
|
parentContext?.value?.registerSubPopup(id, element ?? null);
|
|
56
55
|
};
|
|
57
|
-
const targetEle = (0, vue.shallowRef)(
|
|
56
|
+
const targetEle = (0, vue.shallowRef)();
|
|
58
57
|
const externalForwardRef = (0, vue.shallowRef)(null);
|
|
59
58
|
const setTargetRef = (node) => {
|
|
60
|
-
const element = (0,
|
|
59
|
+
const element = (0, _v_c_util_dist_vnode.resolveToElement)(node);
|
|
61
60
|
if (element && targetEle.value !== element) {
|
|
62
61
|
targetEle.value = element;
|
|
63
62
|
externalForwardRef.value = element;
|
|
64
63
|
} else if (!element) {
|
|
65
|
-
targetEle.value =
|
|
64
|
+
targetEle.value = void 0;
|
|
66
65
|
externalForwardRef.value = null;
|
|
67
66
|
}
|
|
68
67
|
};
|
|
@@ -75,7 +74,7 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
75
74
|
}));
|
|
76
75
|
const inPopupOrChild = (ele) => {
|
|
77
76
|
const childDOM = targetEle.value;
|
|
78
|
-
return childDOM?.contains(ele) || childDOM && (0,
|
|
77
|
+
return childDOM?.contains(ele) || childDOM && (0, _v_c_util_dist_Dom_shadow.getShadowRoot)(childDOM)?.host === ele || ele === childDOM || popupEle.value?.contains(ele) || popupEle.value && (0, _v_c_util_dist_Dom_shadow.getShadowRoot)(popupEle.value)?.host === ele || ele === popupEle.value || Object.values(subPopupElements.value).some((subPopupEle) => subPopupEle?.contains(ele) || ele === subPopupEle);
|
|
79
78
|
};
|
|
80
79
|
const innerArrow = (0, vue.computed)(() => {
|
|
81
80
|
return props.arrow ? { ...props?.arrow !== true ? props?.arrow : {} } : null;
|
|
@@ -85,9 +84,6 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
85
84
|
const mergedOpen = (0, vue.computed)(() => {
|
|
86
85
|
return props?.popupVisible ?? internalOpen.value;
|
|
87
86
|
});
|
|
88
|
-
const setMergedOpen = (nextOpen) => {
|
|
89
|
-
if (openUncontrolled.value) internalOpen.value = nextOpen;
|
|
90
|
-
};
|
|
91
87
|
const isOpen = () => mergedOpen.value;
|
|
92
88
|
(0, vue.watch)(() => props.popupVisible, async (nextVisible) => {
|
|
93
89
|
if (nextVisible !== void 0) {
|
|
@@ -116,7 +112,8 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
116
112
|
arrow: innerArrow.value,
|
|
117
113
|
getPopupContainer: props.getPopupContainer,
|
|
118
114
|
getPopupClassNameFromAlign: props.getPopupClassNameFromAlign,
|
|
119
|
-
id
|
|
115
|
+
id,
|
|
116
|
+
onEsc
|
|
120
117
|
};
|
|
121
118
|
};
|
|
122
119
|
(0, vue.watch)([mergedOpen, targetEle], () => {
|
|
@@ -126,16 +123,9 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
126
123
|
} else uniqueContext?.hide(props.mouseLeaveDelay || 0);
|
|
127
124
|
});
|
|
128
125
|
const openRef = (0, vue.shallowRef)(mergedOpen.value);
|
|
129
|
-
const lastTriggerRef = (0, vue.shallowRef)([]);
|
|
130
|
-
lastTriggerRef.value = [];
|
|
131
|
-
(0, vue.watchEffect)(() => {
|
|
132
|
-
openRef.value = mergedOpen.value;
|
|
133
|
-
if (!mergedOpen.value) lastTriggerRef.value = [];
|
|
134
|
-
});
|
|
135
126
|
const internalTriggerOpen = (nextOpen) => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
lastTriggerRef.value.push(nextOpen);
|
|
127
|
+
if (mergedOpen.value !== nextOpen) {
|
|
128
|
+
internalOpen.value = nextOpen;
|
|
139
129
|
props?.onOpenChange?.(nextOpen);
|
|
140
130
|
props?.onPopupVisibleChange?.(nextOpen);
|
|
141
131
|
}
|
|
@@ -157,6 +147,9 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
157
147
|
internalTriggerOpen(nextOpen);
|
|
158
148
|
}, delay);
|
|
159
149
|
};
|
|
150
|
+
function onEsc({ top }) {
|
|
151
|
+
if (top) triggerOpen(false);
|
|
152
|
+
}
|
|
160
153
|
const inMotion = (0, vue.shallowRef)(false);
|
|
161
154
|
(0, vue.watch)(mergedOpen, () => {
|
|
162
155
|
if (mergedOpen.value) inMotion.value = true;
|
|
@@ -188,7 +181,7 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
188
181
|
if (mergedOpen.value && !builtinPlacements?.[popupPlacement]) triggerAlign();
|
|
189
182
|
});
|
|
190
183
|
const alignedClassName = (0, vue.computed)(() => {
|
|
191
|
-
return (0,
|
|
184
|
+
return (0, _v_c_util.classNames)(require_util.getAlignPopupClassName(props.builtinPlacements, props.prefixCls, alignInfo.value, props.alignPoint), props?.getPopupClassNameFromAlign?.(alignInfo.value));
|
|
192
185
|
});
|
|
193
186
|
expose({
|
|
194
187
|
nativeElement: externalForwardRef,
|
|
@@ -309,8 +302,9 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
309
302
|
(0, vue.watchEffect)(() => {
|
|
310
303
|
rendedRef.value ||= props.forceRender || mergedOpen.value || inMotion.value;
|
|
311
304
|
});
|
|
305
|
+
(0, _v_c_resize_observer.useResizeObserver)(mergedOpen, targetEle, onTargetResize);
|
|
312
306
|
return () => {
|
|
313
|
-
const child = (0,
|
|
307
|
+
const child = (0, _v_c_util_dist_props_util.filterEmpty)(slots?.default?.() ?? [])?.[0];
|
|
314
308
|
const mergedChildrenProps = {
|
|
315
309
|
...originChildProps,
|
|
316
310
|
...cloneProps.value
|
|
@@ -341,15 +335,12 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
341
335
|
ref: setTargetRef
|
|
342
336
|
});
|
|
343
337
|
const { unique, prefixCls, popup, popupClassName, popupStyle, zIndex, fresh, onPopupClick, mask, popupMotion, maskMotion, forceRender, getPopupContainer, stretch, mobile } = props;
|
|
344
|
-
return (0, vue.createVNode)(vue.Fragment, null, [(0, vue.createVNode)(
|
|
345
|
-
"disabled": !mergedOpen.value,
|
|
346
|
-
"onResize": onTargetResize
|
|
347
|
-
}, _isSlot(triggerNode) ? triggerNode : { default: () => [triggerNode] }), rendedRef.value && targetEle.value && (!uniqueContext || !unique) && (0, vue.createVNode)(require_context.TriggerContextProvider, context.value, { default: () => [(0, vue.createVNode)(require_index.default, {
|
|
338
|
+
return (0, vue.createVNode)(vue.Fragment, null, [triggerNode, rendedRef.value && targetEle.value && (!uniqueContext || !unique) && (0, vue.createVNode)(require_context.TriggerContextProvider, context.value, { default: () => [(0, vue.createVNode)(require_index.default, {
|
|
348
339
|
"portal": PortalComponent,
|
|
349
340
|
"ref": setPopupRef,
|
|
350
341
|
"prefixCls": prefixCls,
|
|
351
342
|
"popup": popup,
|
|
352
|
-
"className": (0,
|
|
343
|
+
"className": (0, _v_c_util.classNames)(popupClassName, !isMobile.value && alignedClassName.value),
|
|
353
344
|
"style": popupStyle,
|
|
354
345
|
"target": targetEle.value,
|
|
355
346
|
"onMouseEnter": onPopupMouseEnter,
|
|
@@ -360,6 +351,7 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
360
351
|
"keepDom": inMotion.value,
|
|
361
352
|
"fresh": fresh,
|
|
362
353
|
"onClick": onPopupClick,
|
|
354
|
+
"onEsc": onEsc,
|
|
363
355
|
"onPointerDownCapture": onPopupPointerDown,
|
|
364
356
|
"mask": mask,
|
|
365
357
|
"motion": popupMotion,
|
|
@@ -590,7 +582,7 @@ function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
|
590
582
|
}
|
|
591
583
|
}, defaults) });
|
|
592
584
|
}
|
|
593
|
-
var Trigger = generateTrigger(
|
|
585
|
+
var Trigger = generateTrigger(_v_c_portal.default);
|
|
594
586
|
var src_default = Trigger;
|
|
595
587
|
exports.Trigger = Trigger;
|
|
596
588
|
exports.UniqueProvider = require_index$1.default;
|
package/dist/index.js
CHANGED
|
@@ -7,16 +7,13 @@ import useWatch from "./hooks/useWatch.js";
|
|
|
7
7
|
import useWinClick from "./hooks/useWinClick.js";
|
|
8
8
|
import Popup_default from "./Popup/index.js";
|
|
9
9
|
import UniqueProvider_default from "./UniqueProvider/index.js";
|
|
10
|
-
import { Fragment, computed, createVNode, defineComponent,
|
|
10
|
+
import { Fragment, computed, createVNode, defineComponent, mergeDefaults, nextTick, reactive, ref, shallowRef, useId, watch, watchEffect } from "vue";
|
|
11
11
|
import Portal from "@v-c/portal";
|
|
12
|
-
import
|
|
12
|
+
import { useResizeObserver } from "@v-c/resize-observer";
|
|
13
13
|
import { classNames } from "@v-c/util";
|
|
14
14
|
import { getShadowRoot } from "@v-c/util/dist/Dom/shadow";
|
|
15
15
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
16
16
|
import { resolveToElement } from "@v-c/util/dist/vnode";
|
|
17
|
-
function _isSlot(s) {
|
|
18
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
19
|
-
}
|
|
20
17
|
var defaults = {
|
|
21
18
|
prefixCls: "vc-trigger-popup",
|
|
22
19
|
action: "hover",
|
|
@@ -50,7 +47,7 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
50
47
|
if (popupEle.value !== element) popupEle.value = element;
|
|
51
48
|
parentContext?.value?.registerSubPopup(id, element ?? null);
|
|
52
49
|
};
|
|
53
|
-
const targetEle = shallowRef(
|
|
50
|
+
const targetEle = shallowRef();
|
|
54
51
|
const externalForwardRef = shallowRef(null);
|
|
55
52
|
const setTargetRef = (node) => {
|
|
56
53
|
const element = resolveToElement(node);
|
|
@@ -58,7 +55,7 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
58
55
|
targetEle.value = element;
|
|
59
56
|
externalForwardRef.value = element;
|
|
60
57
|
} else if (!element) {
|
|
61
|
-
targetEle.value =
|
|
58
|
+
targetEle.value = void 0;
|
|
62
59
|
externalForwardRef.value = null;
|
|
63
60
|
}
|
|
64
61
|
};
|
|
@@ -81,9 +78,6 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
81
78
|
const mergedOpen = computed(() => {
|
|
82
79
|
return props?.popupVisible ?? internalOpen.value;
|
|
83
80
|
});
|
|
84
|
-
const setMergedOpen = (nextOpen) => {
|
|
85
|
-
if (openUncontrolled.value) internalOpen.value = nextOpen;
|
|
86
|
-
};
|
|
87
81
|
const isOpen = () => mergedOpen.value;
|
|
88
82
|
watch(() => props.popupVisible, async (nextVisible) => {
|
|
89
83
|
if (nextVisible !== void 0) {
|
|
@@ -112,7 +106,8 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
112
106
|
arrow: innerArrow.value,
|
|
113
107
|
getPopupContainer: props.getPopupContainer,
|
|
114
108
|
getPopupClassNameFromAlign: props.getPopupClassNameFromAlign,
|
|
115
|
-
id
|
|
109
|
+
id,
|
|
110
|
+
onEsc
|
|
116
111
|
};
|
|
117
112
|
};
|
|
118
113
|
watch([mergedOpen, targetEle], () => {
|
|
@@ -122,16 +117,9 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
122
117
|
} else uniqueContext?.hide(props.mouseLeaveDelay || 0);
|
|
123
118
|
});
|
|
124
119
|
const openRef = shallowRef(mergedOpen.value);
|
|
125
|
-
const lastTriggerRef = shallowRef([]);
|
|
126
|
-
lastTriggerRef.value = [];
|
|
127
|
-
watchEffect(() => {
|
|
128
|
-
openRef.value = mergedOpen.value;
|
|
129
|
-
if (!mergedOpen.value) lastTriggerRef.value = [];
|
|
130
|
-
});
|
|
131
120
|
const internalTriggerOpen = (nextOpen) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
lastTriggerRef.value.push(nextOpen);
|
|
121
|
+
if (mergedOpen.value !== nextOpen) {
|
|
122
|
+
internalOpen.value = nextOpen;
|
|
135
123
|
props?.onOpenChange?.(nextOpen);
|
|
136
124
|
props?.onPopupVisibleChange?.(nextOpen);
|
|
137
125
|
}
|
|
@@ -153,6 +141,9 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
153
141
|
internalTriggerOpen(nextOpen);
|
|
154
142
|
}, delay);
|
|
155
143
|
};
|
|
144
|
+
function onEsc({ top }) {
|
|
145
|
+
if (top) triggerOpen(false);
|
|
146
|
+
}
|
|
156
147
|
const inMotion = shallowRef(false);
|
|
157
148
|
watch(mergedOpen, () => {
|
|
158
149
|
if (mergedOpen.value) inMotion.value = true;
|
|
@@ -305,6 +296,7 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
305
296
|
watchEffect(() => {
|
|
306
297
|
rendedRef.value ||= props.forceRender || mergedOpen.value || inMotion.value;
|
|
307
298
|
});
|
|
299
|
+
useResizeObserver(mergedOpen, targetEle, onTargetResize);
|
|
308
300
|
return () => {
|
|
309
301
|
const child = filterEmpty(slots?.default?.() ?? [])?.[0];
|
|
310
302
|
const mergedChildrenProps = {
|
|
@@ -337,10 +329,7 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
337
329
|
ref: setTargetRef
|
|
338
330
|
});
|
|
339
331
|
const { unique, prefixCls, popup, popupClassName, popupStyle, zIndex, fresh, onPopupClick, mask, popupMotion, maskMotion, forceRender, getPopupContainer, stretch, mobile } = props;
|
|
340
|
-
return createVNode(Fragment, null, [createVNode(
|
|
341
|
-
"disabled": !mergedOpen.value,
|
|
342
|
-
"onResize": onTargetResize
|
|
343
|
-
}, _isSlot(triggerNode) ? triggerNode : { default: () => [triggerNode] }), rendedRef.value && targetEle.value && (!uniqueContext || !unique) && createVNode(TriggerContextProvider, context.value, { default: () => [createVNode(Popup_default, {
|
|
332
|
+
return createVNode(Fragment, null, [triggerNode, rendedRef.value && targetEle.value && (!uniqueContext || !unique) && createVNode(TriggerContextProvider, context.value, { default: () => [createVNode(Popup_default, {
|
|
344
333
|
"portal": PortalComponent,
|
|
345
334
|
"ref": setPopupRef,
|
|
346
335
|
"prefixCls": prefixCls,
|
|
@@ -356,6 +345,7 @@ function generateTrigger(PortalComponent = Portal) {
|
|
|
356
345
|
"keepDom": inMotion.value,
|
|
357
346
|
"fresh": fresh,
|
|
358
347
|
"onClick": onPopupClick,
|
|
348
|
+
"onEsc": onEsc,
|
|
359
349
|
"onPointerDownCapture": onPopupPointerDown,
|
|
360
350
|
"mask": mask,
|
|
361
351
|
"motion": popupMotion,
|
package/dist/interface.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
package/dist/util.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1
2
|
function isPointsEq(a1 = [], a2 = [], isAlignPoint) {
|
|
2
|
-
|
|
3
|
-
return a1
|
|
3
|
+
const getVal = (a, index) => a[index] || "";
|
|
4
|
+
if (isAlignPoint) return getVal(a1, 0) === getVal(a2, 0);
|
|
5
|
+
return getVal(a1, 0) === getVal(a2, 0) && getVal(a1, 1) === getVal(a2, 1);
|
|
4
6
|
}
|
|
5
7
|
function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
|
|
6
8
|
const { points } = align;
|
package/dist/util.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function isPointsEq(a1 = [], a2 = [], isAlignPoint) {
|
|
2
|
-
|
|
3
|
-
return a1
|
|
2
|
+
const getVal = (a, index) => a[index] || "";
|
|
3
|
+
if (isAlignPoint) return getVal(a1, 0) === getVal(a2, 0);
|
|
4
|
+
return getVal(a1, 0) === getVal(a2, 0) && getVal(a1, 1) === getVal(a2, 1);
|
|
4
5
|
}
|
|
5
6
|
function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
|
|
6
7
|
const { points } = align;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/trigger",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"vue": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@v-c/portal": "^1.0.
|
|
33
|
-
"@v-c/
|
|
34
|
-
"@v-c/
|
|
32
|
+
"@v-c/portal": "^1.0.3",
|
|
33
|
+
"@v-c/util": "^1.0.8",
|
|
34
|
+
"@v-c/resize-observer": "^1.0.4"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "vite build",
|