vft 0.0.412 → 0.0.414
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/dialog/dialog-content.vue.d.ts +1 -10
- package/es/components/dialog/dialog-content.vue2.js +36 -39
- package/es/components/dialog/index.d.ts +3 -3
- package/es/components/dialog/types.d.ts +2 -1
- package/es/components/drawer/drawer.vue2.js +91 -95
- package/es/components/drawer/index.d.ts +3 -3
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/modal/index.d.ts +3 -3
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/dialog/dialog-content.vue.d.ts +1 -10
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/index.d.ts +3 -3
- package/lib/components/dialog/types.d.ts +2 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/drawer/index.d.ts +3 -3
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/modal/index.d.ts +3 -3
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/drawer.scss +0 -12
- package/theme-style/vft-drawer.css +1 -1
- package/web-types.json +1 -1
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keysOf as f } from "@vft/utils";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import { debugWarn as v } from "../../../utils/error.js";
|
|
4
|
-
import { getCurrentInstance as l, computed as i, unref as p, provide as
|
|
4
|
+
import { ref as g, getCurrentInstance as l, computed as i, unref as p, provide as C, inject as x } from "vue";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
7
|
import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
|
|
@@ -9,7 +9,7 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { configProviderContextKey as m } from "../constants.js";
|
|
12
|
-
const a =
|
|
12
|
+
const a = g();
|
|
13
13
|
function d(o, e = void 0) {
|
|
14
14
|
const n = l() ? x(m, a) : a;
|
|
15
15
|
return o ? i(() => n?.value?.[o] ?? e) : n;
|
|
@@ -27,7 +27,7 @@ function B(o) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const S = (o, e, n = !1) => {
|
|
30
|
-
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ?
|
|
30
|
+
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? C : void 0);
|
|
31
31
|
if (!u) {
|
|
32
32
|
v(
|
|
33
33
|
"provideGlobalConfig",
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
center?: boolean;
|
|
3
|
-
alignCenter?: boolean;
|
|
4
|
-
closeIcon?: string;
|
|
5
|
-
customClass?: string;
|
|
6
|
-
draggable?: boolean;
|
|
7
|
-
fullscreen?: boolean;
|
|
8
|
-
showClose?: boolean;
|
|
9
|
-
title?: string;
|
|
10
|
-
}
|
|
1
|
+
import type { DialogContentProps } from './types';
|
|
11
2
|
declare function __VLS_template(): {
|
|
12
3
|
header?(_: {}): any;
|
|
13
4
|
default?(_: {}): any;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as g, inject as m, computed as d, createElementBlock as p, openBlock as s, normalizeStyle as k, normalizeClass as l, unref as e, createElementVNode as r, createCommentVNode as u, renderSlot as a, createBlock as R, toDisplayString as $, mergeProps as v } from "vue";
|
|
2
|
+
import { singleAttrToObj as E } from "@vft/utils";
|
|
3
|
+
import { VftIcon as N } from "../icon/index.js";
|
|
3
4
|
import "../focus-trap/focus-trap.vue2.js";
|
|
4
|
-
import { FOCUS_TRAP_INJECTION_KEY as
|
|
5
|
+
import { FOCUS_TRAP_INJECTION_KEY as S } from "../focus-trap/tokens.js";
|
|
5
6
|
import "../focus-trap/utils.js";
|
|
6
7
|
import "@vueuse/core";
|
|
7
|
-
import "@vft/utils";
|
|
8
8
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
9
|
import "lodash-es";
|
|
10
|
-
import { composeRefs as
|
|
10
|
+
import { composeRefs as T } from "../../utils/vue/refs.js";
|
|
11
11
|
import "../form/index.js";
|
|
12
|
-
import { useDraggable as
|
|
12
|
+
import { useDraggable as j } 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 z } from "./constants.js";
|
|
17
|
+
const D = ["id"], O = g({
|
|
18
18
|
name: "vft-dialog-content"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
19
|
+
}), Z = /* @__PURE__ */ g({
|
|
20
|
+
...O,
|
|
21
21
|
props: {
|
|
22
22
|
center: { type: Boolean, default: !1 },
|
|
23
23
|
alignCenter: { type: Boolean, default: !1 },
|
|
24
|
-
closeIcon: {
|
|
24
|
+
closeIcon: {},
|
|
25
25
|
customClass: {},
|
|
26
26
|
draggable: { type: Boolean, default: !1 },
|
|
27
27
|
fullscreen: { type: Boolean, default: !1 },
|
|
@@ -29,10 +29,14 @@ const V = ["id"], z = p({
|
|
|
29
29
|
title: { default: "" }
|
|
30
30
|
},
|
|
31
31
|
emits: ["close"],
|
|
32
|
-
setup(
|
|
33
|
-
const { dialogRef: i, headerRef: f, bodyId:
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
setup(n) {
|
|
33
|
+
const { dialogRef: i, headerRef: f, bodyId: y, ns: t, style: C } = m(z), { focusTrapRef: b } = m(S), h = T(b, i), B = d(() => n.draggable);
|
|
34
|
+
j(i, f, B);
|
|
35
|
+
const I = d(() => E(n.closeIcon, "icon", {
|
|
36
|
+
icon: "icon-close"
|
|
37
|
+
}));
|
|
38
|
+
return (o, c) => (s(), p("div", {
|
|
39
|
+
ref: e(h),
|
|
36
40
|
class: l([
|
|
37
41
|
e(t).b(),
|
|
38
42
|
e(t).is("fullscreen", o.fullscreen),
|
|
@@ -41,48 +45,41 @@ const V = ["id"], z = p({
|
|
|
41
45
|
{ [e(t).m("center")]: o.center },
|
|
42
46
|
o.customClass
|
|
43
47
|
]),
|
|
44
|
-
style:
|
|
48
|
+
style: k(e(C)),
|
|
45
49
|
tabindex: "-1"
|
|
46
50
|
}, [
|
|
47
|
-
|
|
51
|
+
r("header", {
|
|
48
52
|
ref_key: "headerRef",
|
|
49
53
|
ref: f,
|
|
50
54
|
class: l(e(t).e("header"))
|
|
51
55
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
a(o.$slots, "header", {}, () => [
|
|
57
|
+
r("span", {
|
|
54
58
|
role: "heading",
|
|
55
59
|
class: l(e(t).e("title"))
|
|
56
|
-
},
|
|
60
|
+
}, $(o.title), 3)
|
|
57
61
|
]),
|
|
58
|
-
o.showClose ? (
|
|
62
|
+
o.showClose ? (s(), R(e(N), v({
|
|
59
63
|
key: 0,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
k(e($), {
|
|
65
|
-
class: l(e(t).e("close")),
|
|
66
|
-
icon: o.closeIcon,
|
|
67
|
-
size: "20"
|
|
68
|
-
}, null, 8, ["class", "icon"])
|
|
69
|
-
], 2)) : c("", !0)
|
|
64
|
+
onClick: c[0] || (c[0] = (V) => o.$emit("close")),
|
|
65
|
+
class: e(t).e("close")
|
|
66
|
+
}, I.value, { size: "20" }), null, 16, ["class"])) : u("", !0)
|
|
70
67
|
], 2),
|
|
71
|
-
|
|
72
|
-
id: e(
|
|
68
|
+
r("div", {
|
|
69
|
+
id: e(y),
|
|
73
70
|
class: l(e(t).e("body"))
|
|
74
71
|
}, [
|
|
75
|
-
|
|
76
|
-
], 10,
|
|
77
|
-
o.$slots.footer ? (
|
|
72
|
+
a(o.$slots, "default")
|
|
73
|
+
], 10, D),
|
|
74
|
+
o.$slots.footer ? (s(), p("footer", {
|
|
78
75
|
key: 0,
|
|
79
76
|
class: l(e(t).e("footer"))
|
|
80
77
|
}, [
|
|
81
|
-
|
|
82
|
-
], 2)) :
|
|
78
|
+
a(o.$slots, "footer")
|
|
79
|
+
], 2)) : u("", !0)
|
|
83
80
|
], 6));
|
|
84
81
|
}
|
|
85
82
|
});
|
|
86
83
|
export {
|
|
87
|
-
|
|
84
|
+
Z as default
|
|
88
85
|
};
|
|
@@ -57,7 +57,7 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
57
57
|
type: import("vue").PropType<boolean>;
|
|
58
58
|
};
|
|
59
59
|
closeIcon: {
|
|
60
|
-
type: import("vue").PropType<string>;
|
|
60
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
61
61
|
};
|
|
62
62
|
customClass: {
|
|
63
63
|
type: import("vue").PropType<string>;
|
|
@@ -153,7 +153,7 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
153
153
|
type: import("vue").PropType<boolean>;
|
|
154
154
|
};
|
|
155
155
|
closeIcon: {
|
|
156
|
-
type: import("vue").PropType<string>;
|
|
156
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
157
157
|
};
|
|
158
158
|
customClass: {
|
|
159
159
|
type: import("vue").PropType<string>;
|
|
@@ -238,7 +238,7 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
238
238
|
type: import("vue").PropType<boolean>;
|
|
239
239
|
};
|
|
240
240
|
closeIcon: {
|
|
241
|
-
type: import("vue").PropType<string>;
|
|
241
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
242
242
|
};
|
|
243
243
|
customClass: {
|
|
244
244
|
type: import("vue").PropType<string>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
1
2
|
export interface DialogContentProps {
|
|
2
3
|
center?: boolean;
|
|
3
4
|
alignCenter?: boolean;
|
|
4
|
-
closeIcon?: string;
|
|
5
|
+
closeIcon?: string | IconProps;
|
|
5
6
|
customClass?: string;
|
|
6
7
|
draggable?: boolean;
|
|
7
8
|
fullscreen?: boolean;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isBoolean as U } from "@vft/utils";
|
|
1
|
+
import { defineComponent as A, getCurrentInstance as O, ref as k, computed as m, createBlock as h, openBlock as a, unref as e, withCtx as d, createVNode as y, Transition as N, withDirectives as M, createElementVNode as w, mergeProps as g, withModifiers as P, createElementBlock as n, createCommentVNode as s, normalizeClass as r, renderSlot as i, toDisplayString as q, vShow as H } from "vue";
|
|
2
|
+
import { isBoolean as U, singleAttrToObj as j } from "@vft/utils";
|
|
3
3
|
import "../dialog/index.js";
|
|
4
|
-
import
|
|
4
|
+
import G from "../focus-trap/focus-trap.vue.js";
|
|
5
5
|
import "../focus-trap/utils.js";
|
|
6
|
-
import { VftIcon as
|
|
7
|
-
import { VftOverlay as
|
|
8
|
-
import { UPDATE_MODEL_EVENT as
|
|
6
|
+
import { VftIcon as J } from "../icon/index.js";
|
|
7
|
+
import { VftOverlay as K } from "../overlay/index.js";
|
|
8
|
+
import { UPDATE_MODEL_EVENT as Q } from "../../constants/event.js";
|
|
9
9
|
import "@vueuse/core";
|
|
10
|
-
import { addUnit as
|
|
10
|
+
import { addUnit as W } from "../../utils/helper.js";
|
|
11
11
|
import "lodash-es";
|
|
12
12
|
import "../form/index.js";
|
|
13
|
-
import { useNamespace as
|
|
13
|
+
import { useNamespace as X } from "../../hooks/use-namespace/index.js";
|
|
14
14
|
import "../../hooks/use-model-toggle/index.js";
|
|
15
15
|
import "@popperjs/core";
|
|
16
16
|
import "../../hooks/use-z-index/index.js";
|
|
17
|
-
import { VftTeleport as
|
|
18
|
-
import { useDialog as
|
|
19
|
-
const
|
|
17
|
+
import { VftTeleport as Y } from "../teleport/index.js";
|
|
18
|
+
import { useDialog as Z } from "../dialog/hooks/use-dialog.js";
|
|
19
|
+
const _ = ["aria-label", "aria-labelledby", "aria-describedby"], x = ["id"], ee = ["id"], oe = A({
|
|
20
20
|
name: "vft-drawer"
|
|
21
|
-
}), Re = /* @__PURE__ */
|
|
22
|
-
...
|
|
21
|
+
}), Re = /* @__PURE__ */ A({
|
|
22
|
+
...oe,
|
|
23
23
|
props: {
|
|
24
24
|
direction: { default: "rtl" },
|
|
25
25
|
size: { default: "30%" },
|
|
@@ -50,7 +50,7 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
50
50
|
title: { default: "" }
|
|
51
51
|
},
|
|
52
52
|
emits: {
|
|
53
|
-
[
|
|
53
|
+
[Q]: (l) => U(l),
|
|
54
54
|
open: () => !0,
|
|
55
55
|
opened: () => !0,
|
|
56
56
|
close: () => !0,
|
|
@@ -58,128 +58,124 @@ const Z = ["aria-label", "aria-labelledby", "aria-describedby"], _ = ["id"], x =
|
|
|
58
58
|
openAutoFocus: () => !0,
|
|
59
59
|
closeAutoFocus: () => !0
|
|
60
60
|
},
|
|
61
|
-
setup(
|
|
62
|
-
const t =
|
|
61
|
+
setup(l, { expose: E }) {
|
|
62
|
+
const t = X("drawer"), I = O(), u = k(), {
|
|
63
63
|
afterEnter: z,
|
|
64
|
-
afterLeave:
|
|
65
|
-
beforeLeave:
|
|
66
|
-
handleClose:
|
|
67
|
-
onModalClick:
|
|
68
|
-
close:
|
|
69
|
-
doClose:
|
|
70
|
-
onOpenAutoFocus:
|
|
71
|
-
onCloseAutoFocus:
|
|
72
|
-
onCloseRequested:
|
|
73
|
-
onFocusoutPrevented:
|
|
74
|
-
titleId:
|
|
75
|
-
bodyId:
|
|
76
|
-
closed:
|
|
77
|
-
style:
|
|
78
|
-
overlayDialogStyle:
|
|
79
|
-
rendered:
|
|
80
|
-
visible:
|
|
81
|
-
zIndex:
|
|
82
|
-
} =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
64
|
+
afterLeave: R,
|
|
65
|
+
beforeLeave: V,
|
|
66
|
+
handleClose: f,
|
|
67
|
+
onModalClick: D,
|
|
68
|
+
close: te,
|
|
69
|
+
doClose: le,
|
|
70
|
+
onOpenAutoFocus: ae,
|
|
71
|
+
onCloseAutoFocus: se,
|
|
72
|
+
onCloseRequested: F,
|
|
73
|
+
onFocusoutPrevented: re,
|
|
74
|
+
titleId: c,
|
|
75
|
+
bodyId: v,
|
|
76
|
+
closed: de,
|
|
77
|
+
style: ne,
|
|
78
|
+
overlayDialogStyle: ie,
|
|
79
|
+
rendered: S,
|
|
80
|
+
visible: p,
|
|
81
|
+
zIndex: T
|
|
82
|
+
} = Z(I.props, u), C = k(), $ = m(() => l.direction === "rtl" || l.direction === "ltr"), b = m(() => W(l.size)), L = m(() => j(l.closeIcon, "icon", {
|
|
83
|
+
icon: "icon-close"
|
|
84
|
+
}));
|
|
85
|
+
return E({
|
|
86
|
+
close: f
|
|
87
|
+
}), (o, B) => (a(), h(e(Y), {
|
|
86
88
|
to: "body",
|
|
87
89
|
disabled: !o.appendToBody
|
|
88
90
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
|
|
91
|
+
default: d(() => [
|
|
92
|
+
y(N, {
|
|
91
93
|
name: e(t).b("fade"),
|
|
92
94
|
onAfterEnter: e(z),
|
|
93
|
-
onAfterLeave: e(
|
|
94
|
-
onBeforeLeave: e(
|
|
95
|
+
onAfterLeave: e(R),
|
|
96
|
+
onBeforeLeave: e(V)
|
|
95
97
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
|
|
98
|
+
default: d(() => [
|
|
99
|
+
M(y(e(K), {
|
|
98
100
|
mask: o.modal,
|
|
99
101
|
"overlay-class": o.modalClass,
|
|
100
|
-
"z-index": e(
|
|
101
|
-
onClick: e(
|
|
102
|
+
"z-index": e(T),
|
|
103
|
+
onClick: e(D)
|
|
102
104
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
|
|
105
|
+
default: d(() => [
|
|
106
|
+
y(e(G), {
|
|
105
107
|
loop: "",
|
|
106
|
-
trapped: e(
|
|
107
|
-
"focus-trap-el":
|
|
108
|
-
"focus-start-el":
|
|
109
|
-
onReleaseRequested: e(
|
|
108
|
+
trapped: e(p),
|
|
109
|
+
"focus-trap-el": u.value,
|
|
110
|
+
"focus-start-el": C.value,
|
|
111
|
+
onReleaseRequested: e(F)
|
|
110
112
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
113
|
+
default: d(() => [
|
|
114
|
+
w("div", g({
|
|
113
115
|
ref_key: "drawerRef",
|
|
114
|
-
ref:
|
|
116
|
+
ref: u,
|
|
115
117
|
"aria-modal": "true",
|
|
116
118
|
"aria-label": o.title || void 0,
|
|
117
|
-
"aria-labelledby": o.title ? void 0 : e(
|
|
118
|
-
"aria-describedby": e(
|
|
119
|
+
"aria-labelledby": o.title ? void 0 : e(c),
|
|
120
|
+
"aria-describedby": e(v)
|
|
119
121
|
}, o.$attrs, {
|
|
120
|
-
class: [e(t).b(), o.direction, e(
|
|
121
|
-
style:
|
|
122
|
+
class: [e(t).b(), o.direction, e(p) && "open", o.customClass],
|
|
123
|
+
style: $.value ? "width: " + b.value : "height: " + b.value,
|
|
122
124
|
role: "dialog",
|
|
123
|
-
onClick:
|
|
125
|
+
onClick: B[0] || (B[0] = P(() => {
|
|
124
126
|
}, ["stop"]))
|
|
125
127
|
}), [
|
|
126
|
-
|
|
128
|
+
w("span", {
|
|
127
129
|
ref_key: "focusStartRef",
|
|
128
|
-
ref:
|
|
129
|
-
class:
|
|
130
|
+
ref: C,
|
|
131
|
+
class: r(e(t).e("sr-focus")),
|
|
130
132
|
tabindex: "-1"
|
|
131
133
|
}, null, 2),
|
|
132
|
-
o.withHeader ? (a(),
|
|
134
|
+
o.withHeader ? (a(), n("header", {
|
|
133
135
|
key: 0,
|
|
134
|
-
class:
|
|
136
|
+
class: r(e(t).e("header"))
|
|
135
137
|
}, [
|
|
136
|
-
o.$slots.title ?
|
|
138
|
+
o.$slots.title ? i(o.$slots, "title", { key: 1 }) : i(o.$slots, "header", {
|
|
137
139
|
key: 0,
|
|
138
|
-
close: e(
|
|
139
|
-
titleId: e(
|
|
140
|
+
close: e(f),
|
|
141
|
+
titleId: e(c),
|
|
140
142
|
titleClass: e(t).e("title")
|
|
141
143
|
}, () => [
|
|
142
|
-
o.$slots.title ?
|
|
144
|
+
o.$slots.title ? s("", !0) : (a(), n("span", {
|
|
143
145
|
key: 0,
|
|
144
|
-
id: e(
|
|
146
|
+
id: e(c),
|
|
145
147
|
role: "heading",
|
|
146
|
-
class:
|
|
147
|
-
}, q(o.title), 11,
|
|
148
|
+
class: r(e(t).e("title"))
|
|
149
|
+
}, q(o.title), 11, x))
|
|
148
150
|
]),
|
|
149
|
-
o.showClose ? (a(),
|
|
151
|
+
o.showClose ? (a(), h(e(J), g({
|
|
150
152
|
key: 2,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
icon: "icon-close",
|
|
158
|
-
class: l(e(t).e("close"))
|
|
159
|
-
}, null, 8, ["class"])
|
|
160
|
-
], 2)) : d("", !0)
|
|
161
|
-
], 2)) : d("", !0),
|
|
162
|
-
e(F) ? (a(), r("div", {
|
|
153
|
+
onClick: e(f)
|
|
154
|
+
}, L.value, {
|
|
155
|
+
class: e(t).e("close")
|
|
156
|
+
}), null, 16, ["onClick", "class"])) : s("", !0)
|
|
157
|
+
], 2)) : s("", !0),
|
|
158
|
+
e(S) ? (a(), n("div", {
|
|
163
159
|
key: 1,
|
|
164
|
-
id: e(
|
|
165
|
-
class:
|
|
160
|
+
id: e(v),
|
|
161
|
+
class: r(e(t).e("body"))
|
|
166
162
|
}, [
|
|
167
|
-
|
|
168
|
-
], 10,
|
|
169
|
-
o.$slots.footer ? (a(),
|
|
163
|
+
i(o.$slots, "default")
|
|
164
|
+
], 10, ee)) : s("", !0),
|
|
165
|
+
o.$slots.footer ? (a(), n("div", {
|
|
170
166
|
key: 2,
|
|
171
|
-
class:
|
|
167
|
+
class: r(e(t).e("footer"))
|
|
172
168
|
}, [
|
|
173
|
-
|
|
174
|
-
], 2)) :
|
|
175
|
-
], 16,
|
|
169
|
+
i(o.$slots, "footer")
|
|
170
|
+
], 2)) : s("", !0)
|
|
171
|
+
], 16, _)
|
|
176
172
|
]),
|
|
177
173
|
_: 3
|
|
178
174
|
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
179
175
|
]),
|
|
180
176
|
_: 3
|
|
181
177
|
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
|
|
182
|
-
[H, e(
|
|
178
|
+
[H, e(p)]
|
|
183
179
|
])
|
|
184
180
|
]),
|
|
185
181
|
_: 3
|
|
@@ -65,7 +65,7 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
|
65
65
|
type: import("vue").PropType<boolean>;
|
|
66
66
|
};
|
|
67
67
|
closeIcon: {
|
|
68
|
-
type: import("vue").PropType<string>;
|
|
68
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
69
69
|
};
|
|
70
70
|
customClass: {
|
|
71
71
|
type: import("vue").PropType<string>;
|
|
@@ -172,7 +172,7 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
|
172
172
|
type: import("vue").PropType<boolean>;
|
|
173
173
|
};
|
|
174
174
|
closeIcon: {
|
|
175
|
-
type: import("vue").PropType<string>;
|
|
175
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
176
176
|
};
|
|
177
177
|
customClass: {
|
|
178
178
|
type: import("vue").PropType<string>;
|
|
@@ -268,7 +268,7 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
|
268
268
|
type: import("vue").PropType<boolean>;
|
|
269
269
|
};
|
|
270
270
|
closeIcon: {
|
|
271
|
-
type: import("vue").PropType<string>;
|
|
271
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
272
272
|
};
|
|
273
273
|
customClass: {
|
|
274
274
|
type: import("vue").PropType<string>;
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as ye } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as at, useFormItemInputId as ot } from "../form/hooks/use-form-item.js";
|
|
18
18
|
const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
o.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = at(), { inputId: Y } = ot(xe.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = et(), h = tt(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -50,7 +50,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
52
|
closeIcon: {
|
|
53
|
-
type: import("vue").PropType<string>;
|
|
53
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
54
54
|
};
|
|
55
55
|
appendToBody: {
|
|
56
56
|
type: import("vue").PropType<boolean>;
|
|
@@ -195,7 +195,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
195
195
|
default: boolean;
|
|
196
196
|
};
|
|
197
197
|
closeIcon: {
|
|
198
|
-
type: import("vue").PropType<string>;
|
|
198
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
199
199
|
};
|
|
200
200
|
appendToBody: {
|
|
201
201
|
type: import("vue").PropType<boolean>;
|
|
@@ -337,7 +337,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
337
337
|
default: boolean;
|
|
338
338
|
};
|
|
339
339
|
closeIcon: {
|
|
340
|
-
type: import("vue").PropType<string>;
|
|
340
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
341
341
|
};
|
|
342
342
|
appendToBody: {
|
|
343
343
|
type: import("vue").PropType<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne,
|
|
1
|
+
import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, isVNode as le, createTextVNode as G, resolveComponent as V } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import { getCurrentInstance as i, inject as e, computed as c, unref as
|
|
5
|
+
import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = Z(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isArray as E, hasOwn as m, camelize as N } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
center?: boolean;
|
|
3
|
-
alignCenter?: boolean;
|
|
4
|
-
closeIcon?: string;
|
|
5
|
-
customClass?: string;
|
|
6
|
-
draggable?: boolean;
|
|
7
|
-
fullscreen?: boolean;
|
|
8
|
-
showClose?: boolean;
|
|
9
|
-
title?: string;
|
|
10
|
-
}
|
|
1
|
+
import type { DialogContentProps } from './types';
|
|
11
2
|
declare function __VLS_template(): {
|
|
12
3
|
header?(_: {}): any;
|
|
13
4
|
default?(_: {}): any;
|