vft 0.0.415 → 0.0.416
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +8 -8
- package/es/components/autocomplete/index.d.ts +24 -24
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +39 -39
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +4 -3
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/dialog/constants.d.ts +1 -0
- package/es/components/dialog/constants.js +2 -1
- package/es/components/dialog/dialog-content.vue.d.ts +4 -1
- package/es/components/dialog/dialog-content.vue2.js +59 -48
- package/es/components/dialog/dialog.vue.d.ts +4 -19
- package/es/components/dialog/dialog.vue2.js +104 -89
- package/es/components/dialog/index.d.ts +70 -3
- package/es/components/dialog/index.js +5 -4
- package/es/components/dialog/types.d.ts +69 -0
- package/es/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
- package/es/components/dialog/use-dialog.js +138 -0
- package/es/components/drawer/composables/useResizable.d.ts +7 -0
- package/es/components/drawer/composables/useResizable.js +53 -0
- package/es/components/drawer/drawer.vue.d.ts +3 -7
- package/es/components/drawer/drawer.vue2.js +122 -97
- package/es/components/drawer/index.d.ts +78 -0
- package/es/components/drawer/types.d.ts +13 -0
- package/es/components/drawer/types.js +1 -0
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +15 -15
- package/es/components/form/index.d.ts +6 -6
- package/es/components/index.js +172 -171
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +1 -1
- package/es/components/link/index.d.ts +3 -3
- package/es/components/md-code-demo/md-code-demo.js +10 -10
- package/es/components/modal/index.d.ts +87 -24
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/modal/modal.vue2.js +24 -17
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +82 -79
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popover/index.d.ts +0 -9
- package/es/components/popover/popover.vue2.js +4 -5
- package/es/components/popover/types.d.ts +23 -1
- package/es/components/search/search.vue2.js +3 -3
- package/es/components/select/index.d.ts +20 -20
- package/es/components/select/select.vue.d.ts +20 -20
- package/es/components/select/useSelect.d.ts +17 -17
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -9
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/types.d.ts +81 -1
- package/es/hooks/use-draggable/index.d.ts +5 -1
- package/es/hooks/use-draggable/index.js +39 -34
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.js +2 -2
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/helper.d.ts +1 -1
- package/es/utils/ns-cover.d.ts +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +8 -8
- package/lib/components/autocomplete/index.d.ts +24 -24
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +39 -39
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/color-picker/composables/use-alpha-slider.d.ts +2 -2
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/dialog/constants.cjs +1 -1
- package/lib/components/dialog/constants.d.ts +1 -0
- package/lib/components/dialog/dialog-content.vue.d.ts +4 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +4 -19
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/dialog/index.cjs +1 -1
- package/lib/components/dialog/index.d.ts +70 -3
- package/lib/components/dialog/types.d.ts +69 -0
- package/lib/components/dialog/use-dialog.cjs +1 -0
- package/lib/components/dialog/{hooks/use-dialog.d.ts → use-dialog.d.ts} +11 -2
- package/lib/components/drawer/composables/useResizable.cjs +1 -0
- package/lib/components/drawer/composables/useResizable.d.ts +7 -0
- package/lib/components/drawer/drawer.vue.d.ts +3 -7
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/drawer/index.d.ts +78 -0
- package/lib/components/drawer/types.cjs +1 -0
- package/lib/components/drawer/types.d.ts +13 -0
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +15 -15
- package/lib/components/form/index.d.ts +6 -6
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +1 -1
- package/lib/components/link/index.d.ts +3 -3
- package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
- package/lib/components/modal/index.d.ts +87 -24
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popover/index.d.ts +0 -9
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popover/types.d.ts +23 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +20 -20
- package/lib/components/select/select.vue.d.ts +20 -20
- package/lib/components/select/useSelect.d.ts +17 -17
- package/lib/components/table/index.d.ts +9 -9
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/types.d.ts +81 -1
- package/lib/hooks/use-draggable/index.cjs +1 -1
- package/lib/hooks/use-draggable/index.d.ts +5 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/helper.d.ts +1 -1
- package/lib/utils/ns-cover.d.ts +1 -1
- package/package.json +3 -3
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/dialog.scss +35 -35
- package/theme-style/src/drawer.scss +118 -21
- package/theme-style/src/md-container.scss +1 -0
- package/theme-style/src/tag.scss +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-drawer.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/web-types.json +1 -1
- package/es/components/dialog/hooks/use-dialog.js +0 -106
- package/lib/components/dialog/hooks/use-dialog.cjs +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { singleAttrToObj as
|
|
3
|
-
import { VftIcon as
|
|
1
|
+
import { defineComponent as y, inject as u, computed as r, createElementBlock as g, openBlock as a, normalizeStyle as E, normalizeClass as s, unref as t, createElementVNode as n, createCommentVNode as p, renderSlot as i, createBlock as N, toDisplayString as P, mergeProps as S } from "vue";
|
|
2
|
+
import { singleAttrToObj as T } from "@vft/utils";
|
|
3
|
+
import { VftIcon as j } from "../icon/index.js";
|
|
4
4
|
import "../focus-trap/focus-trap.vue2.js";
|
|
5
|
-
import { FOCUS_TRAP_INJECTION_KEY as
|
|
5
|
+
import { FOCUS_TRAP_INJECTION_KEY as z } from "../focus-trap/tokens.js";
|
|
6
6
|
import "../focus-trap/utils.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
9
|
import "lodash-es";
|
|
10
|
-
import { composeRefs as
|
|
10
|
+
import { composeRefs as K } from "../../utils/vue/refs.js";
|
|
11
11
|
import "../form/index.js";
|
|
12
|
-
import { useDraggable as
|
|
12
|
+
import { useDraggable as O } from "../../hooks/use-draggable/index.js";
|
|
13
13
|
import "../../hooks/use-model-toggle/index.js";
|
|
14
14
|
import "@popperjs/core";
|
|
15
15
|
import "../../hooks/use-z-index/index.js";
|
|
16
|
-
import { dialogInjectionKey as
|
|
17
|
-
const
|
|
16
|
+
import { dialogInjectionKey as V } from "./constants.js";
|
|
17
|
+
const A = ["id"], F = y({
|
|
18
18
|
name: "vft-dialog-content"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
19
|
+
}), le = /* @__PURE__ */ y({
|
|
20
|
+
...F,
|
|
21
21
|
props: {
|
|
22
22
|
center: { type: Boolean, default: !1 },
|
|
23
23
|
alignCenter: { type: Boolean, default: !1 },
|
|
@@ -26,61 +26,72 @@ const D = ["id"], O = g({
|
|
|
26
26
|
draggable: { type: Boolean, default: !1 },
|
|
27
27
|
fullscreen: { type: Boolean, default: !1 },
|
|
28
28
|
showClose: { type: Boolean, default: !0 },
|
|
29
|
-
title: { default: "" }
|
|
29
|
+
title: { default: "" },
|
|
30
|
+
overflow: { type: Boolean },
|
|
31
|
+
headerClass: {},
|
|
32
|
+
bodyClass: {},
|
|
33
|
+
footerClass: {}
|
|
30
34
|
},
|
|
31
35
|
emits: ["close"],
|
|
32
|
-
setup(
|
|
33
|
-
const { dialogRef:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
setup(l, { expose: C }) {
|
|
37
|
+
const { dialogRef: f, headerRef: d, bodyId: b, ns: e, style: h } = u(V), { focusTrapRef: v } = u(z), B = K(v, f), c = r(() => l.draggable), I = r(() => l.overflow), { resetPosition: k, updatePosition: w, isDragging: R } = O(
|
|
38
|
+
f,
|
|
39
|
+
d,
|
|
40
|
+
c,
|
|
41
|
+
I
|
|
42
|
+
), $ = r(() => [
|
|
43
|
+
e.b(),
|
|
44
|
+
e.is("fullscreen", l.fullscreen),
|
|
45
|
+
e.is("draggable", c.value),
|
|
46
|
+
e.is("dragging", R.value),
|
|
47
|
+
e.is("align-center", l.alignCenter),
|
|
48
|
+
{ [e.m("center")]: l.center }
|
|
49
|
+
]), D = r(() => T(l.closeIcon, "icon", {
|
|
36
50
|
icon: "icon-close",
|
|
37
|
-
pointer: !0
|
|
51
|
+
pointer: !0,
|
|
52
|
+
size: 16
|
|
38
53
|
}));
|
|
39
|
-
return (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{ [e(t).m("center")]: o.center },
|
|
47
|
-
o.customClass
|
|
48
|
-
]),
|
|
49
|
-
style: k(e(C)),
|
|
54
|
+
return C({
|
|
55
|
+
resetPosition: k,
|
|
56
|
+
updatePosition: w
|
|
57
|
+
}), (o, m) => (a(), g("div", {
|
|
58
|
+
ref: t(B),
|
|
59
|
+
class: s($.value),
|
|
60
|
+
style: E(t(h)),
|
|
50
61
|
tabindex: "-1"
|
|
51
62
|
}, [
|
|
52
|
-
|
|
63
|
+
n("header", {
|
|
53
64
|
ref_key: "headerRef",
|
|
54
|
-
ref:
|
|
55
|
-
class:
|
|
65
|
+
ref: d,
|
|
66
|
+
class: s([t(e).e("header"), o.headerClass, { "show-close": o.showClose }])
|
|
56
67
|
}, [
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
i(o.$slots, "header", {}, () => [
|
|
69
|
+
n("span", {
|
|
59
70
|
role: "heading",
|
|
60
|
-
class:
|
|
61
|
-
},
|
|
71
|
+
class: s(t(e).e("title"))
|
|
72
|
+
}, P(o.title), 3)
|
|
62
73
|
]),
|
|
63
|
-
o.showClose ? (
|
|
74
|
+
o.showClose ? (a(), N(t(j), S({
|
|
64
75
|
key: 0,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
76
|
+
class: [t(e).e("headerbtn")],
|
|
77
|
+
onClick: m[0] || (m[0] = (J) => o.$emit("close"))
|
|
78
|
+
}, D.value), null, 16, ["class"])) : p("", !0)
|
|
68
79
|
], 2),
|
|
69
|
-
|
|
70
|
-
id:
|
|
71
|
-
class:
|
|
80
|
+
n("div", {
|
|
81
|
+
id: t(b),
|
|
82
|
+
class: s([t(e).e("body"), o.bodyClass])
|
|
72
83
|
}, [
|
|
73
|
-
|
|
74
|
-
], 10,
|
|
75
|
-
o.$slots.footer ? (
|
|
84
|
+
i(o.$slots, "default")
|
|
85
|
+
], 10, A),
|
|
86
|
+
o.$slots.footer ? (a(), g("footer", {
|
|
76
87
|
key: 0,
|
|
77
|
-
class:
|
|
88
|
+
class: s([t(e).e("footer"), o.footerClass])
|
|
78
89
|
}, [
|
|
79
|
-
|
|
80
|
-
], 2)) :
|
|
90
|
+
i(o.$slots, "footer")
|
|
91
|
+
], 2)) : p("", !0)
|
|
81
92
|
], 6));
|
|
82
93
|
}
|
|
83
94
|
});
|
|
84
95
|
export {
|
|
85
|
-
|
|
96
|
+
le as default
|
|
86
97
|
};
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
type DoneFn = (cancel?: boolean) => void;
|
|
3
|
-
export interface DialogProps extends DialogContentProps {
|
|
4
|
-
appendToBody?: boolean;
|
|
5
|
-
beforeClose?: (done: DoneFn) => void;
|
|
6
|
-
destroyOnClose?: boolean;
|
|
7
|
-
closeOnClickModal?: boolean;
|
|
8
|
-
closeOnPressEscape?: boolean;
|
|
9
|
-
lockScroll?: boolean;
|
|
10
|
-
modal?: boolean;
|
|
11
|
-
openDelay?: number;
|
|
12
|
-
closeDelay?: number;
|
|
13
|
-
top?: string;
|
|
14
|
-
modelValue?: boolean;
|
|
15
|
-
modalClass?: string;
|
|
16
|
-
width?: string | number;
|
|
17
|
-
zIndex?: number;
|
|
18
|
-
trapFocus?: boolean;
|
|
19
|
-
}
|
|
1
|
+
import { type DialogProps } from './types';
|
|
20
2
|
declare function __VLS_template(): {
|
|
21
3
|
header?(_: {
|
|
22
4
|
close: () => void;
|
|
@@ -28,8 +10,11 @@ declare function __VLS_template(): {
|
|
|
28
10
|
footer?(_: {}): any;
|
|
29
11
|
};
|
|
30
12
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DialogProps>>, {
|
|
13
|
+
/** @description whether the dialog is visible */
|
|
31
14
|
visible: import("vue").Ref<boolean, boolean>;
|
|
32
15
|
dialogContentRef: import("vue").Ref<any, any>;
|
|
16
|
+
resetPosition: () => void;
|
|
17
|
+
handleClose: () => void;
|
|
33
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
19
|
"update:modelValue": (value: boolean) => void;
|
|
35
20
|
close: () => void;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as B, ref as
|
|
2
|
-
import
|
|
3
|
-
import X from "../focus-trap/focus-trap.vue.js";
|
|
1
|
+
import { defineComponent as B, ref as p, getCurrentInstance as O, provide as N, computed as q, createBlock as b, openBlock as g, unref as e, withCtx as l, createVNode as m, Transition as j, normalizeProps as K, guardReactiveProps as L, withDirectives as U, createElementVNode as G, normalizeStyle as H, normalizeClass as J, createCommentVNode as Q, mergeProps as W, createSlots as X, renderSlot as d, vShow as Y } from "vue";
|
|
2
|
+
import Z from "../focus-trap/focus-trap.vue.js";
|
|
4
3
|
import "../focus-trap/utils.js";
|
|
5
|
-
import { VftOverlay as
|
|
6
|
-
import {
|
|
4
|
+
import { VftOverlay as _ } from "../overlay/index.js";
|
|
5
|
+
import { VftTeleport as x } from "../teleport/index.js";
|
|
6
|
+
import { UPDATE_MODEL_EVENT as ee } from "../../constants/event.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
|
+
import { isBoolean as oe } from "@vft/utils";
|
|
8
9
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
10
|
import "lodash-es";
|
|
10
11
|
import "../form/index.js";
|
|
11
|
-
import { useNamespace as
|
|
12
|
+
import { useNamespace as le } from "../../hooks/use-namespace/index.js";
|
|
12
13
|
import "../../hooks/use-model-toggle/index.js";
|
|
13
14
|
import "@popperjs/core";
|
|
14
|
-
import { useSameTarget as
|
|
15
|
+
import { useSameTarget as te } from "../../hooks/use-same-target/index.js";
|
|
15
16
|
import "../../hooks/use-z-index/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
|
|
17
|
+
import { dialogInjectionKey as ae } from "./constants.js";
|
|
18
|
+
import se from "./dialog-content.vue2.js";
|
|
19
|
+
import { useDialog as re } from "./use-dialog.js";
|
|
20
|
+
const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
21
21
|
name: "vft-dialog",
|
|
22
22
|
inheritAttrs: !1
|
|
23
|
-
}),
|
|
24
|
-
...
|
|
23
|
+
}), $e = /* @__PURE__ */ B({
|
|
24
|
+
...de,
|
|
25
25
|
props: {
|
|
26
26
|
appendToBody: { type: Boolean, default: !1 },
|
|
27
|
+
appendTo: { default: "body" },
|
|
27
28
|
beforeClose: {},
|
|
28
29
|
destroyOnClose: { type: Boolean, default: !1 },
|
|
29
30
|
closeOnClickModal: { type: Boolean, default: !0 },
|
|
@@ -33,11 +34,14 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
|
|
|
33
34
|
openDelay: { default: 0 },
|
|
34
35
|
closeDelay: { default: 0 },
|
|
35
36
|
top: {},
|
|
37
|
+
modalPenetrable: { type: Boolean },
|
|
36
38
|
modelValue: { type: Boolean, default: !1 },
|
|
37
39
|
modalClass: {},
|
|
38
40
|
width: {},
|
|
39
41
|
zIndex: {},
|
|
40
42
|
trapFocus: { type: Boolean, default: !1 },
|
|
43
|
+
overflow: { type: Boolean },
|
|
44
|
+
transition: {},
|
|
41
45
|
center: { type: Boolean, default: !1 },
|
|
42
46
|
alignCenter: { type: Boolean, default: !1 },
|
|
43
47
|
closeIcon: {},
|
|
@@ -45,10 +49,13 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
|
|
|
45
49
|
draggable: { type: Boolean, default: !1 },
|
|
46
50
|
fullscreen: { type: Boolean, default: !1 },
|
|
47
51
|
showClose: { type: Boolean, default: !0 },
|
|
48
|
-
title: { default: "" }
|
|
52
|
+
title: { default: "" },
|
|
53
|
+
headerClass: {},
|
|
54
|
+
bodyClass: {},
|
|
55
|
+
footerClass: {}
|
|
49
56
|
},
|
|
50
57
|
emits: {
|
|
51
|
-
[
|
|
58
|
+
[ee]: (s) => oe(s),
|
|
52
59
|
open: () => !0,
|
|
53
60
|
opened: () => !0,
|
|
54
61
|
close: () => !0,
|
|
@@ -56,134 +63,142 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = B({
|
|
|
56
63
|
openAutoFocus: () => !0,
|
|
57
64
|
closeAutoFocus: () => !0
|
|
58
65
|
},
|
|
59
|
-
setup(
|
|
60
|
-
const
|
|
66
|
+
setup(s, { expose: k }) {
|
|
67
|
+
const r = le("dialog"), c = p(), w = p(), i = p(), h = O(), {
|
|
61
68
|
visible: u,
|
|
62
|
-
titleId:
|
|
63
|
-
bodyId:
|
|
64
|
-
style:
|
|
65
|
-
overlayDialogStyle:
|
|
69
|
+
titleId: y,
|
|
70
|
+
bodyId: C,
|
|
71
|
+
style: F,
|
|
72
|
+
overlayDialogStyle: P,
|
|
66
73
|
rendered: v,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
transitionConfig: T,
|
|
75
|
+
zIndex: R,
|
|
76
|
+
_draggable: A,
|
|
77
|
+
_alignCenter: $,
|
|
78
|
+
_overflow: I,
|
|
79
|
+
handleClose: f,
|
|
72
80
|
onModalClick: M,
|
|
73
|
-
onOpenAutoFocus:
|
|
74
|
-
onCloseAutoFocus:
|
|
81
|
+
onOpenAutoFocus: V,
|
|
82
|
+
onCloseAutoFocus: z,
|
|
75
83
|
onCloseRequested: D,
|
|
76
|
-
onFocusoutPrevented:
|
|
77
|
-
} =
|
|
78
|
-
|
|
79
|
-
dialogRef:
|
|
80
|
-
headerRef:
|
|
81
|
-
bodyId:
|
|
82
|
-
ns:
|
|
84
|
+
onFocusoutPrevented: E
|
|
85
|
+
} = re(h.props, c);
|
|
86
|
+
N(ae, {
|
|
87
|
+
dialogRef: c,
|
|
88
|
+
headerRef: w,
|
|
89
|
+
bodyId: C,
|
|
90
|
+
ns: r,
|
|
83
91
|
rendered: v,
|
|
84
|
-
style:
|
|
92
|
+
style: F
|
|
85
93
|
});
|
|
86
|
-
const
|
|
94
|
+
const t = te(M), S = q(() => s.modalPenetrable && !s.modal && !s.fullscreen);
|
|
87
95
|
return k({
|
|
96
|
+
/** @description whether the dialog is visible */
|
|
88
97
|
visible: u,
|
|
89
|
-
dialogContentRef:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
dialogContentRef: i,
|
|
99
|
+
resetPosition: () => {
|
|
100
|
+
i.value?.resetPosition();
|
|
101
|
+
},
|
|
102
|
+
handleClose: f
|
|
103
|
+
}), (o, a) => (g(), b(e(x), {
|
|
104
|
+
to: o.appendTo,
|
|
105
|
+
disabled: o.appendTo !== "body" ? !1 : !o.appendToBody
|
|
93
106
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onAfterLeave: e(h),
|
|
99
|
-
onBeforeLeave: e(I)
|
|
100
|
-
}, {
|
|
101
|
-
default: t(() => [
|
|
102
|
-
q(f(e(Y), {
|
|
107
|
+
default: l(() => [
|
|
108
|
+
m(j, K(L(e(T))), {
|
|
109
|
+
default: l(() => [
|
|
110
|
+
U(m(e(_), {
|
|
103
111
|
"custom-mask-event": "",
|
|
104
112
|
mask: o.modal,
|
|
105
|
-
"overlay-class":
|
|
106
|
-
|
|
113
|
+
"overlay-class": [
|
|
114
|
+
o.modalClass ?? "",
|
|
115
|
+
`${e(r).namespace.value}-modal-dialog`,
|
|
116
|
+
e(r).is("penetrable", S.value)
|
|
117
|
+
],
|
|
118
|
+
"z-index": e(R)
|
|
107
119
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
120
|
+
default: l(() => [
|
|
121
|
+
G("div", {
|
|
110
122
|
role: "dialog",
|
|
111
123
|
"aria-modal": "true",
|
|
112
124
|
"aria-label": o.title || void 0,
|
|
113
|
-
"aria-labelledby": o.title ? void 0 : e(
|
|
114
|
-
"aria-describedby": e(
|
|
115
|
-
class:
|
|
116
|
-
style:
|
|
125
|
+
"aria-labelledby": o.title ? void 0 : e(y),
|
|
126
|
+
"aria-describedby": e(C),
|
|
127
|
+
class: J(`${e(r).namespace.value}-overlay-dialog`),
|
|
128
|
+
style: H(e(P)),
|
|
117
129
|
onClick: a[0] || (a[0] = //@ts-ignore
|
|
118
|
-
(...
|
|
130
|
+
(...n) => e(t).onClick && e(t).onClick(...n)),
|
|
119
131
|
onMousedown: a[1] || (a[1] = //@ts-ignore
|
|
120
|
-
(...
|
|
132
|
+
(...n) => e(t).onMousedown && e(t).onMousedown(...n)),
|
|
121
133
|
onMouseup: a[2] || (a[2] = //@ts-ignore
|
|
122
|
-
(...
|
|
134
|
+
(...n) => e(t).onMouseup && e(t).onMouseup(...n))
|
|
123
135
|
}, [
|
|
124
|
-
|
|
136
|
+
m(e(Z), {
|
|
125
137
|
loop: "",
|
|
126
138
|
trapped: e(u),
|
|
127
139
|
"focus-start-el": "container",
|
|
128
|
-
onFocusAfterTrapped: e(
|
|
129
|
-
onFocusAfterReleased: e(
|
|
130
|
-
onFocusoutPrevented: e(
|
|
140
|
+
onFocusAfterTrapped: e(V),
|
|
141
|
+
onFocusAfterReleased: e(z),
|
|
142
|
+
onFocusoutPrevented: e(E),
|
|
131
143
|
onReleaseRequested: e(D)
|
|
132
144
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
e(v) ? (
|
|
145
|
+
default: l(() => [
|
|
146
|
+
e(v) ? (g(), b(se, W({
|
|
135
147
|
key: 0,
|
|
136
148
|
ref_key: "dialogContentRef",
|
|
137
|
-
ref:
|
|
149
|
+
ref: i
|
|
138
150
|
}, o.$attrs, {
|
|
139
|
-
"custom-class": o.customClass,
|
|
140
151
|
center: o.center,
|
|
141
|
-
"align-center":
|
|
152
|
+
"align-center": e($),
|
|
142
153
|
"close-icon": o.closeIcon,
|
|
143
|
-
draggable:
|
|
154
|
+
draggable: e(A),
|
|
155
|
+
overflow: e(I),
|
|
144
156
|
fullscreen: o.fullscreen,
|
|
157
|
+
"header-class": o.headerClass,
|
|
158
|
+
"body-class": o.bodyClass,
|
|
159
|
+
"footer-class": o.footerClass,
|
|
145
160
|
"show-close": o.showClose,
|
|
146
161
|
title: o.title,
|
|
147
|
-
onClose: e(
|
|
148
|
-
}),
|
|
149
|
-
header:
|
|
150
|
-
o.$slots.title ?
|
|
162
|
+
onClose: e(f)
|
|
163
|
+
}), X({
|
|
164
|
+
header: l(() => [
|
|
165
|
+
o.$slots.title ? d(o.$slots, "title", { key: 1 }) : d(o.$slots, "header", {
|
|
151
166
|
key: 0,
|
|
152
|
-
close: e(
|
|
153
|
-
titleId: e(
|
|
154
|
-
titleClass: e(
|
|
167
|
+
close: e(f),
|
|
168
|
+
titleId: e(y),
|
|
169
|
+
titleClass: e(r).e("title")
|
|
155
170
|
})
|
|
156
171
|
]),
|
|
157
|
-
default:
|
|
158
|
-
|
|
172
|
+
default: l(() => [
|
|
173
|
+
d(o.$slots, "default")
|
|
159
174
|
]),
|
|
160
175
|
_: 2
|
|
161
176
|
}, [
|
|
162
177
|
o.$slots.footer ? {
|
|
163
178
|
name: "footer",
|
|
164
|
-
fn:
|
|
165
|
-
|
|
179
|
+
fn: l(() => [
|
|
180
|
+
d(o.$slots, "footer")
|
|
166
181
|
]),
|
|
167
182
|
key: "0"
|
|
168
183
|
} : void 0
|
|
169
|
-
]), 1040, ["
|
|
184
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "onClose"])) : Q("", !0)
|
|
170
185
|
]),
|
|
171
186
|
_: 3
|
|
172
187
|
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
173
|
-
], 46,
|
|
188
|
+
], 46, ne)
|
|
174
189
|
]),
|
|
175
190
|
_: 3
|
|
176
191
|
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
177
|
-
[
|
|
192
|
+
[Y, e(u)]
|
|
178
193
|
])
|
|
179
194
|
]),
|
|
180
195
|
_: 3
|
|
181
|
-
},
|
|
196
|
+
}, 16)
|
|
182
197
|
]),
|
|
183
198
|
_: 3
|
|
184
|
-
}, 8, ["disabled"]));
|
|
199
|
+
}, 8, ["to", "disabled"]));
|
|
185
200
|
}
|
|
186
201
|
});
|
|
187
202
|
export {
|
|
188
|
-
|
|
203
|
+
$e as default
|
|
189
204
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { type DialogProps } from './dialog.vue';
|
|
2
1
|
export * from './constants';
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './use-dialog';
|
|
4
3
|
export * from './types';
|
|
5
|
-
export type { DialogProps };
|
|
6
4
|
export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
7
5
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
8
6
|
appendToBody: {
|
|
9
7
|
type: import("vue").PropType<boolean>;
|
|
10
8
|
};
|
|
9
|
+
appendTo: {
|
|
10
|
+
type: import("vue").PropType<string | HTMLElement>;
|
|
11
|
+
};
|
|
11
12
|
beforeClose: {
|
|
12
13
|
type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
|
|
13
14
|
};
|
|
@@ -35,6 +36,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
35
36
|
top: {
|
|
36
37
|
type: import("vue").PropType<string>;
|
|
37
38
|
};
|
|
39
|
+
modalPenetrable: {
|
|
40
|
+
type: import("vue").PropType<boolean>;
|
|
41
|
+
};
|
|
38
42
|
modelValue: {
|
|
39
43
|
type: import("vue").PropType<boolean>;
|
|
40
44
|
};
|
|
@@ -50,6 +54,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
50
54
|
trapFocus: {
|
|
51
55
|
type: import("vue").PropType<boolean>;
|
|
52
56
|
};
|
|
57
|
+
overflow: {
|
|
58
|
+
type: import("vue").PropType<boolean>;
|
|
59
|
+
};
|
|
60
|
+
transition: {
|
|
61
|
+
type: import("vue").PropType<string | import("vue").TransitionProps>;
|
|
62
|
+
};
|
|
53
63
|
center: {
|
|
54
64
|
type: import("vue").PropType<boolean>;
|
|
55
65
|
};
|
|
@@ -74,6 +84,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
84
|
title: {
|
|
75
85
|
type: import("vue").PropType<string>;
|
|
76
86
|
};
|
|
87
|
+
headerClass: {
|
|
88
|
+
type: import("vue").PropType<string>;
|
|
89
|
+
};
|
|
90
|
+
bodyClass: {
|
|
91
|
+
type: import("vue").PropType<string>;
|
|
92
|
+
};
|
|
93
|
+
footerClass: {
|
|
94
|
+
type: import("vue").PropType<string>;
|
|
95
|
+
};
|
|
77
96
|
}>> & Readonly<{
|
|
78
97
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
79
98
|
onClose?: (() => any) | undefined;
|
|
@@ -85,6 +104,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
85
104
|
}>, {
|
|
86
105
|
visible: import("vue").Ref<boolean, boolean>;
|
|
87
106
|
dialogContentRef: import("vue").Ref<any, any>;
|
|
107
|
+
resetPosition: () => void;
|
|
108
|
+
handleClose: () => void;
|
|
88
109
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
89
110
|
"update:modelValue": (value: boolean) => void;
|
|
90
111
|
close: () => void;
|
|
@@ -104,6 +125,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
104
125
|
appendToBody: {
|
|
105
126
|
type: import("vue").PropType<boolean>;
|
|
106
127
|
};
|
|
128
|
+
appendTo: {
|
|
129
|
+
type: import("vue").PropType<string | HTMLElement>;
|
|
130
|
+
};
|
|
107
131
|
beforeClose: {
|
|
108
132
|
type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
|
|
109
133
|
};
|
|
@@ -131,6 +155,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
131
155
|
top: {
|
|
132
156
|
type: import("vue").PropType<string>;
|
|
133
157
|
};
|
|
158
|
+
modalPenetrable: {
|
|
159
|
+
type: import("vue").PropType<boolean>;
|
|
160
|
+
};
|
|
134
161
|
modelValue: {
|
|
135
162
|
type: import("vue").PropType<boolean>;
|
|
136
163
|
};
|
|
@@ -146,6 +173,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
146
173
|
trapFocus: {
|
|
147
174
|
type: import("vue").PropType<boolean>;
|
|
148
175
|
};
|
|
176
|
+
overflow: {
|
|
177
|
+
type: import("vue").PropType<boolean>;
|
|
178
|
+
};
|
|
179
|
+
transition: {
|
|
180
|
+
type: import("vue").PropType<string | import("vue").TransitionProps>;
|
|
181
|
+
};
|
|
149
182
|
center: {
|
|
150
183
|
type: import("vue").PropType<boolean>;
|
|
151
184
|
};
|
|
@@ -170,6 +203,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
170
203
|
title: {
|
|
171
204
|
type: import("vue").PropType<string>;
|
|
172
205
|
};
|
|
206
|
+
headerClass: {
|
|
207
|
+
type: import("vue").PropType<string>;
|
|
208
|
+
};
|
|
209
|
+
bodyClass: {
|
|
210
|
+
type: import("vue").PropType<string>;
|
|
211
|
+
};
|
|
212
|
+
footerClass: {
|
|
213
|
+
type: import("vue").PropType<string>;
|
|
214
|
+
};
|
|
173
215
|
}>> & Readonly<{
|
|
174
216
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
175
217
|
onClose?: (() => any) | undefined;
|
|
@@ -181,6 +223,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
181
223
|
}>, {
|
|
182
224
|
visible: import("vue").Ref<boolean, boolean>;
|
|
183
225
|
dialogContentRef: import("vue").Ref<any, any>;
|
|
226
|
+
resetPosition: () => void;
|
|
227
|
+
handleClose: () => void;
|
|
184
228
|
}, {}, {}, {}, {}>;
|
|
185
229
|
__isFragment?: never;
|
|
186
230
|
__isTeleport?: never;
|
|
@@ -189,6 +233,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
189
233
|
appendToBody: {
|
|
190
234
|
type: import("vue").PropType<boolean>;
|
|
191
235
|
};
|
|
236
|
+
appendTo: {
|
|
237
|
+
type: import("vue").PropType<string | HTMLElement>;
|
|
238
|
+
};
|
|
192
239
|
beforeClose: {
|
|
193
240
|
type: import("vue").PropType<(done: (cancel?: boolean) => void) => void>;
|
|
194
241
|
};
|
|
@@ -216,6 +263,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
216
263
|
top: {
|
|
217
264
|
type: import("vue").PropType<string>;
|
|
218
265
|
};
|
|
266
|
+
modalPenetrable: {
|
|
267
|
+
type: import("vue").PropType<boolean>;
|
|
268
|
+
};
|
|
219
269
|
modelValue: {
|
|
220
270
|
type: import("vue").PropType<boolean>;
|
|
221
271
|
};
|
|
@@ -231,6 +281,12 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
231
281
|
trapFocus: {
|
|
232
282
|
type: import("vue").PropType<boolean>;
|
|
233
283
|
};
|
|
284
|
+
overflow: {
|
|
285
|
+
type: import("vue").PropType<boolean>;
|
|
286
|
+
};
|
|
287
|
+
transition: {
|
|
288
|
+
type: import("vue").PropType<string | import("vue").TransitionProps>;
|
|
289
|
+
};
|
|
234
290
|
center: {
|
|
235
291
|
type: import("vue").PropType<boolean>;
|
|
236
292
|
};
|
|
@@ -255,6 +311,15 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
255
311
|
title: {
|
|
256
312
|
type: import("vue").PropType<string>;
|
|
257
313
|
};
|
|
314
|
+
headerClass: {
|
|
315
|
+
type: import("vue").PropType<string>;
|
|
316
|
+
};
|
|
317
|
+
bodyClass: {
|
|
318
|
+
type: import("vue").PropType<string>;
|
|
319
|
+
};
|
|
320
|
+
footerClass: {
|
|
321
|
+
type: import("vue").PropType<string>;
|
|
322
|
+
};
|
|
258
323
|
}>> & Readonly<{
|
|
259
324
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
260
325
|
onClose?: (() => any) | undefined;
|
|
@@ -266,6 +331,8 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
266
331
|
}>, {
|
|
267
332
|
visible: import("vue").Ref<boolean, boolean>;
|
|
268
333
|
dialogContentRef: import("vue").Ref<any, any>;
|
|
334
|
+
resetPosition: () => void;
|
|
335
|
+
handleClose: () => void;
|
|
269
336
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
270
337
|
"update:modelValue": (value: boolean) => void;
|
|
271
338
|
close: () => void;
|