vue-devui 1.6.13 → 1.6.15
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/auto-complete/index.es.js +20 -39
- package/auto-complete/index.umd.js +10 -10
- package/breadcrumb/index.es.js +25 -39
- package/breadcrumb/index.umd.js +1 -1
- package/category-search/index.es.js +27 -41
- package/category-search/index.umd.js +13 -13
- package/category-search/style.css +1 -1
- package/checkbox/index.es.js +20 -39
- package/checkbox/index.umd.js +11 -11
- package/code-review/index.es.js +20 -39
- package/code-review/index.umd.js +17 -17
- package/data-grid/index.es.js +27 -41
- package/data-grid/index.umd.js +12 -12
- package/date-picker-pro/index.es.js +20 -39
- package/date-picker-pro/index.umd.js +13 -13
- package/dropdown/index.es.js +25 -39
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +20 -39
- package/editable-select/index.umd.js +14 -14
- package/editor-md/index.es.js +27 -41
- package/editor-md/index.umd.js +23 -23
- package/form/index.es.js +20 -39
- package/form/index.umd.js +12 -12
- package/input/index.es.js +20 -39
- package/input/index.umd.js +10 -10
- package/input-number/index.es.js +20 -39
- package/input-number/index.umd.js +18 -18
- package/mention/index.es.js +20 -39
- package/mention/index.umd.js +18 -18
- package/modal/index.es.js +18 -37
- package/modal/index.umd.js +2 -2
- package/overlay/index.es.js +18 -37
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -2
- package/pagination/index.es.js +27 -41
- package/pagination/index.umd.js +13 -13
- package/popover/index.es.js +20 -39
- package/popover/index.umd.js +14 -14
- package/radio/index.es.js +20 -39
- package/radio/index.umd.js +17 -17
- package/search/index.es.js +20 -39
- package/search/index.umd.js +12 -12
- package/select/index.es.js +20 -39
- package/select/index.umd.js +16 -16
- package/splitter/index.es.js +20 -39
- package/splitter/index.umd.js +16 -16
- package/style.css +1 -1
- package/switch/index.es.js +20 -39
- package/switch/index.umd.js +12 -12
- package/table/index.es.js +27 -41
- package/table/index.umd.js +14 -14
- package/textarea/index.es.js +20 -39
- package/textarea/index.umd.js +15 -15
- package/time-picker/index.es.js +20 -39
- package/time-picker/index.umd.js +16 -16
- package/time-select/index.es.js +20 -39
- package/time-select/index.umd.js +10 -10
- package/tooltip/index.es.js +20 -39
- package/tooltip/index.umd.js +17 -17
- package/tree/index.es.js +20 -39
- package/tree/index.umd.js +12 -12
- package/types/dropdown/src/dropdown-types.d.ts +4 -0
- package/types/dropdown/src/dropdown.d.ts +9 -0
- package/types/tooltip/src/tooltip.d.ts +1 -1
- package/vue-devui.es.js +26 -40
- package/vue-devui.umd.js +63 -63
|
@@ -52,6 +52,10 @@ export declare const dropdownProps: {
|
|
|
52
52
|
type: BooleanConstructor;
|
|
53
53
|
default: boolean;
|
|
54
54
|
};
|
|
55
|
+
teleport: {
|
|
56
|
+
type: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
55
59
|
};
|
|
56
60
|
export declare type DropdownProps = ExtractPropTypes<typeof dropdownProps>;
|
|
57
61
|
export interface UseDropdownProps {
|
|
@@ -43,6 +43,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
type: BooleanConstructor;
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
|
+
teleport: {
|
|
47
|
+
type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
46
50
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle"[], "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
51
|
visible: {
|
|
48
52
|
type: BooleanConstructor;
|
|
@@ -87,6 +91,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
91
|
type: BooleanConstructor;
|
|
88
92
|
default: boolean;
|
|
89
93
|
};
|
|
94
|
+
teleport: {
|
|
95
|
+
type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
90
98
|
}>> & {
|
|
91
99
|
onToggle?: ((...args: any[]) => any) | undefined;
|
|
92
100
|
}, {
|
|
@@ -100,5 +108,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
108
|
closeOnMouseLeaveMenu: boolean;
|
|
101
109
|
overlayClass: string;
|
|
102
110
|
destroyOnHide: boolean;
|
|
111
|
+
teleport: string | import("vue").RendererElement | null | undefined;
|
|
103
112
|
}, {}>;
|
|
104
113
|
export default _default;
|
|
@@ -98,8 +98,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
98
|
mouseEnterDelay: number;
|
|
99
99
|
mouseLeaveDelay: number;
|
|
100
100
|
overlayClass: string;
|
|
101
|
+
teleport: string | import("vue").RendererElement | null | undefined;
|
|
101
102
|
enterable: boolean;
|
|
102
103
|
hideAfter: number;
|
|
103
|
-
teleport: string | import("vue").RendererElement | null | undefined;
|
|
104
104
|
}, {}>;
|
|
105
105
|
export default _default;
|
package/vue-devui.es.js
CHANGED
|
@@ -37,7 +37,7 @@ var _a;
|
|
|
37
37
|
import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, ref, reactive, createTextVNode, provide, onMounted, watch, Transition, withDirectives, vShow, nextTick, onUnmounted, unref, withModifiers, Comment as Comment$1, Text, h, cloneVNode, Teleport, onBeforeUnmount, render as render$1, resolveDirective, resolveDynamicComponent, toRef, shallowRef, onBeforeMount, onUpdated, readonly, toRaw, watchEffect, renderSlot, useSlots, createApp, shallowReactive, effect, TransitionGroup } from "vue";
|
|
38
38
|
import { useRoute } from "vue-router";
|
|
39
39
|
import Clipboard from "clipboard";
|
|
40
|
-
import { offset,
|
|
40
|
+
import { offset, flip, arrow, computePosition } from "@floating-ui/dom";
|
|
41
41
|
import { onClickOutside, toRefs as toRefs$1, useResizeObserver } from "@vueuse/core";
|
|
42
42
|
import * as Diff2Html from "diff2html";
|
|
43
43
|
import { Diff2HtmlUI } from "diff2html/lib/ui/js/diff2html-ui";
|
|
@@ -7855,16 +7855,6 @@ const flexibleOverlayProps = {
|
|
|
7855
7855
|
default: false
|
|
7856
7856
|
}
|
|
7857
7857
|
};
|
|
7858
|
-
function getScrollParent(element) {
|
|
7859
|
-
const overflowRegex = /(auto|scroll|hidden)/;
|
|
7860
|
-
for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
|
|
7861
|
-
const style = window.getComputedStyle(parent);
|
|
7862
|
-
if (overflowRegex.test(style.overflow + style.overflowX + style.overflowY)) {
|
|
7863
|
-
return parent;
|
|
7864
|
-
}
|
|
7865
|
-
}
|
|
7866
|
-
return window;
|
|
7867
|
-
}
|
|
7868
7858
|
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
7869
7859
|
let { x, y } = point;
|
|
7870
7860
|
if (!isArrowCenter) {
|
|
@@ -7885,9 +7875,9 @@ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
|
7885
7875
|
return { x, y };
|
|
7886
7876
|
}
|
|
7887
7877
|
function useOverlay(props, emit) {
|
|
7878
|
+
const { position, showArrow } = toRefs(props);
|
|
7888
7879
|
const overlayRef = ref();
|
|
7889
7880
|
const arrowRef = ref();
|
|
7890
|
-
let originParent = null;
|
|
7891
7881
|
const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
|
|
7892
7882
|
const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
|
|
7893
7883
|
const staticSide = {
|
|
@@ -7908,51 +7898,42 @@ function useOverlay(props, emit) {
|
|
|
7908
7898
|
const hostEl = props.origin;
|
|
7909
7899
|
const overlayEl = unref(overlayRef.value);
|
|
7910
7900
|
const arrowEl = unref(arrowRef.value);
|
|
7911
|
-
const
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
})
|
|
7917
|
-
];
|
|
7918
|
-
props.showArrow && middleware.push(arrow({ element: arrowEl }));
|
|
7919
|
-
props.shiftOffset !== void 0 && middleware.push(shift());
|
|
7920
|
-
if (!overlayEl) {
|
|
7921
|
-
return;
|
|
7901
|
+
const [mainPosition, ...fallbackPosition] = position.value;
|
|
7902
|
+
const middleware = [offset(props.offset)];
|
|
7903
|
+
middleware.push(fallbackPosition.length ? flip({ fallbackPlacements: fallbackPosition }) : flip());
|
|
7904
|
+
if (showArrow.value) {
|
|
7905
|
+
middleware.push(arrow({ element: arrowRef.value }));
|
|
7922
7906
|
}
|
|
7923
7907
|
const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
|
|
7924
7908
|
strategy: "fixed",
|
|
7909
|
+
placement: mainPosition,
|
|
7925
7910
|
middleware
|
|
7926
7911
|
});
|
|
7927
7912
|
let applyX = x;
|
|
7928
7913
|
let applyY = y;
|
|
7929
|
-
if (props.shiftOffset !== void 0) {
|
|
7930
|
-
const { x: shiftX, y: shiftY } = middlewareData.shift;
|
|
7931
|
-
shiftX < 0 && (applyX -= props.shiftOffset);
|
|
7932
|
-
shiftX > 0 && (applyX += props.shiftOffset);
|
|
7933
|
-
shiftY < 0 && (applyY -= props.shiftOffset);
|
|
7934
|
-
shiftY > 0 && (applyY += props.shiftOffset);
|
|
7935
|
-
}
|
|
7936
7914
|
emit("positionChange", placement);
|
|
7937
7915
|
Object.assign(overlayEl.style, { top: `${applyY}px`, left: `${applyX}px` });
|
|
7938
7916
|
props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
|
|
7939
7917
|
};
|
|
7918
|
+
const scrollCallback = (e) => {
|
|
7919
|
+
var _a2, _b;
|
|
7920
|
+
const scrollElement = e.target;
|
|
7921
|
+
if (scrollElement == null ? void 0 : scrollElement.contains((_b = (_a2 = props.origin) == null ? void 0 : _a2.$el) != null ? _b : props.origin)) {
|
|
7922
|
+
updatePosition();
|
|
7923
|
+
}
|
|
7924
|
+
};
|
|
7940
7925
|
watch(() => props.modelValue, () => {
|
|
7941
7926
|
if (props.modelValue && props.origin) {
|
|
7942
|
-
originParent = getScrollParent(props.origin);
|
|
7943
7927
|
nextTick(updatePosition);
|
|
7944
|
-
|
|
7945
|
-
originParent !== window && window.addEventListener("scroll", updatePosition);
|
|
7928
|
+
window.addEventListener("scroll", scrollCallback, true);
|
|
7946
7929
|
window.addEventListener("resize", updatePosition);
|
|
7947
7930
|
} else {
|
|
7948
|
-
|
|
7949
|
-
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
7931
|
+
window.removeEventListener("scroll", scrollCallback, true);
|
|
7950
7932
|
window.removeEventListener("resize", updatePosition);
|
|
7951
7933
|
}
|
|
7952
7934
|
});
|
|
7953
7935
|
onUnmounted(() => {
|
|
7954
|
-
|
|
7955
|
-
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
7936
|
+
window.removeEventListener("scroll", scrollCallback, true);
|
|
7956
7937
|
window.removeEventListener("resize", updatePosition);
|
|
7957
7938
|
});
|
|
7958
7939
|
return { arrowRef, overlayRef, updatePosition };
|
|
@@ -11337,6 +11318,10 @@ const dropdownProps$1 = {
|
|
|
11337
11318
|
destroyOnHide: {
|
|
11338
11319
|
type: Boolean,
|
|
11339
11320
|
default: true
|
|
11321
|
+
},
|
|
11322
|
+
teleport: {
|
|
11323
|
+
type: [String, Object],
|
|
11324
|
+
default: "body"
|
|
11340
11325
|
}
|
|
11341
11326
|
};
|
|
11342
11327
|
const dropdownMap = /* @__PURE__ */ new Map();
|
|
@@ -11499,7 +11484,8 @@ var Dropdown$1 = defineComponent({
|
|
|
11499
11484
|
offset: offset2,
|
|
11500
11485
|
destroyOnHide,
|
|
11501
11486
|
shiftOffset,
|
|
11502
|
-
showAnimation
|
|
11487
|
+
showAnimation,
|
|
11488
|
+
teleport
|
|
11503
11489
|
} = toRefs(props);
|
|
11504
11490
|
const origin = ref();
|
|
11505
11491
|
const dropdownRef = ref();
|
|
@@ -11541,7 +11527,7 @@ var Dropdown$1 = defineComponent({
|
|
|
11541
11527
|
return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
|
|
11542
11528
|
}
|
|
11543
11529
|
}), createVNode(Teleport, {
|
|
11544
|
-
"to":
|
|
11530
|
+
"to": teleport.value
|
|
11545
11531
|
}, {
|
|
11546
11532
|
default: () => [createVNode(Transition, {
|
|
11547
11533
|
"name": showAnimation.value ? ns2.m(`fade-${currentPosition.value}`) : ""
|
|
@@ -54370,7 +54356,7 @@ const installs = [
|
|
|
54370
54356
|
VirtualListInstall
|
|
54371
54357
|
];
|
|
54372
54358
|
var vueDevui = {
|
|
54373
|
-
version: "1.6.
|
|
54359
|
+
version: "1.6.15",
|
|
54374
54360
|
install(app) {
|
|
54375
54361
|
installs.forEach((p) => app.use(p));
|
|
54376
54362
|
}
|