vft 0.0.61 → 0.0.62
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/component.js +26 -22
- package/es/components/back-top/back-top.vue2.js +4 -2
- package/es/components/color-picker/color-picker.vue.d.ts +3 -1
- package/es/components/color-picker/color-picker.vue2.js +31 -30
- package/es/components/color-picker/index.d.ts +3 -1
- package/es/components/context-menu/context-menu.vue2.js +4 -2
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/dialog/dialog.vue2.js +52 -53
- package/es/components/dialog/index.d.ts +3 -3
- package/es/components/dialog/index.js +1 -1
- package/es/components/dialog/style/css.js +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +5 -5
- package/es/components/dropdown/index.d.ts +5 -5
- package/es/components/icon-text/icon-text.vue.d.ts +10 -4
- package/es/components/icon-text/icon-text.vue2.js +28 -26
- package/es/components/icon-text/index.d.ts +10 -4
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +117 -109
- package/es/components/list-cell/index.d.ts +38 -0
- package/es/components/list-cell/index.js +12 -0
- package/es/components/list-cell/list-cell.vue.d.ts +53 -0
- package/es/components/list-cell/list-cell.vue.js +4 -0
- package/es/components/list-cell/list-cell.vue2.js +68 -0
- package/es/components/list-cell/style/css.d.ts +0 -0
- package/es/components/list-cell/style/css.js +2 -0
- package/es/components/list-cell/style/index.d.ts +0 -0
- package/es/components/list-cell/style/index.js +2 -0
- package/es/components/md-container/md-container.vue2.js +4 -2
- package/es/components/menu/index.d.ts +2 -2
- package/es/components/menu/menu-item.vue2.js +14 -12
- package/es/components/menu/menu.vue.d.ts +2 -2
- package/es/components/menu/sub-menu.vue2.js +4 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +5 -3
- package/es/components/multiple-tabs/tab-content.vue.d.ts +8 -0
- package/es/components/multiple-tabs/tab-content.vue2.js +13 -12
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +12 -12
- package/es/components/result/result.vue2.js +4 -2
- package/es/components/search/search.vue2.js +4 -2
- package/es/components/select-v2/defaults.d.ts +1 -1
- package/es/components/select-v2/index.d.ts +16 -16
- package/es/components/select-v2/select.vue.d.ts +8 -8
- package/es/components/select-v2/useSelect.d.ts +5 -5
- package/es/components/side-menu/index.d.ts +38 -1
- package/es/components/side-menu/side-menu.vue.d.ts +38 -1
- package/es/components/side-menu/side-menu.vue2.js +144 -113
- package/es/components/side-menu/use-drag-line.d.ts +10 -0
- package/es/components/side-menu/use-drag-line.js +51 -0
- package/es/components/switch/index.d.ts +1 -1
- package/es/components/switch/switch.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue2.js +4 -2
- package/es/components/tooltip/index.d.ts +2 -2
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/virtual-list/builders/build-list.d.ts +38 -38
- package/es/components/virtual-list/components/scrollbar.d.ts +1 -1
- package/es/defaults.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +248 -239
- package/es/package.json.js +1 -1
- package/es/utils/index.js +31 -30
- package/es/utils/ns-cover.d.ts +6 -3
- package/es/utils/ns-cover.js +25 -15
- package/global.d.ts +2 -70
- package/lib/component.cjs +1 -1
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue.d.ts +3 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/index.d.ts +3 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/dialog/index.cjs +1 -1
- package/lib/components/dialog/index.d.ts +3 -3
- package/lib/components/dialog/style/css.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +5 -5
- package/lib/components/dropdown/index.d.ts +5 -5
- package/lib/components/icon-text/icon-text.vue.d.ts +10 -4
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/icon-text/index.d.ts +10 -4
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/list-cell/index.cjs +1 -0
- package/lib/components/list-cell/index.d.ts +38 -0
- package/lib/components/list-cell/list-cell.vue.cjs +1 -0
- package/lib/components/list-cell/list-cell.vue.d.ts +53 -0
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -0
- package/lib/components/list-cell/style/css.cjs +1 -0
- package/lib/components/list-cell/style/css.d.ts +0 -0
- package/lib/components/list-cell/style/index.cjs +1 -0
- package/lib/components/list-cell/style/index.d.ts +0 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +2 -2
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue.d.ts +2 -2
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue.d.ts +8 -0
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select-v2/defaults.d.ts +1 -1
- package/lib/components/select-v2/index.d.ts +16 -16
- package/lib/components/select-v2/select.vue.d.ts +8 -8
- package/lib/components/select-v2/useSelect.d.ts +5 -5
- package/lib/components/side-menu/index.d.ts +38 -1
- package/lib/components/side-menu/side-menu.vue.d.ts +38 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.cjs +1 -0
- package/lib/components/side-menu/use-drag-line.d.ts +10 -0
- package/lib/components/switch/index.d.ts +1 -1
- package/lib/components/switch/switch.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +2 -2
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/virtual-list/builders/build-list.d.ts +38 -38
- package/lib/components/virtual-list/components/scrollbar.d.ts +1 -1
- package/lib/defaults.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/ns-cover.cjs +1 -1
- package/lib/utils/ns-cover.d.ts +6 -3
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +13 -2
- package/theme-style/src/dark/var.scss +3 -3
- package/theme-style/src/dialog.scss +6 -4
- package/theme-style/src/footer-layout.scss +1 -0
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/list-cell.scss +55 -0
- package/theme-style/src/loading.scss +1 -1
- package/theme-style/src/md-container.scss +2 -3
- package/theme-style/src/menu.scss +5 -1
- package/theme-style/src/multiple-tabs.scss +1 -1
- package/theme-style/src/pagination.scss +1 -5
- package/theme-style/src/popover.scss +3 -3
- package/theme-style/src/side-menu.scss +21 -5
- package/theme-style/src/var.scss +0 -2
- package/theme-style/vft-back-top.css +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-footer-layout.css +1 -1
- package/theme-style/vft-list-cell.css +1 -0
- package/theme-style/vft-loading.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-popover.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
package/es/component.js
CHANGED
|
@@ -18,17 +18,17 @@ import { VftTag as s } from "./components/tag/index.js";
|
|
|
18
18
|
import { VftQrcode as M } from "./components/qrcode/index.js";
|
|
19
19
|
import { VftOverlay as T } from "./components/overlay/index.js";
|
|
20
20
|
import { VftSideMenu as b } from "./components/side-menu/index.js";
|
|
21
|
-
import { VftClamp as
|
|
22
|
-
import { VftPageWrapper as
|
|
23
|
-
import { VftClampToggle as
|
|
24
|
-
import { VftRouterViewContent as
|
|
25
|
-
import { VftIframeLayout as
|
|
21
|
+
import { VftClamp as g } from "./components/clamp/index.js";
|
|
22
|
+
import { VftPageWrapper as I } from "./components/page-wrapper/index.js";
|
|
23
|
+
import { VftClampToggle as D } from "./components/clamp-toggle/index.js";
|
|
24
|
+
import { VftRouterViewContent as P } from "./components/router-view-content/index.js";
|
|
25
|
+
import { VftIframeLayout as y } from "./components/iframe-layout/index.js";
|
|
26
26
|
import { VftFooterLayout as S } from "./components/footer-layout/index.js";
|
|
27
27
|
import { VftHeaderLayout as k } from "./components/header-layout/index.js";
|
|
28
28
|
import { VftPagination as w } from "./components/pagination/index.js";
|
|
29
|
-
import { VftTabs as x, VftTabPane as
|
|
30
|
-
import { VftForm as
|
|
31
|
-
import { VftDescriptions as
|
|
29
|
+
import { VftTabs as x, VftTabPane as L } from "./components/tabs/index.js";
|
|
30
|
+
import { VftForm as h, VftFormItem as v } from "./components/form/index.js";
|
|
31
|
+
import { VftDescriptions as B, VftDescriptionsItem as R } from "./components/descriptions/index.js";
|
|
32
32
|
import { VftMultipleTabs as F } from "./components/multiple-tabs/index.js";
|
|
33
33
|
import { VftCollapseTransition as G } from "./components/collapse-transition/index.js";
|
|
34
34
|
import { VftMenu as E, VftMenuItem as A, VftMenuItemGroup as H, VftSubMenu as O } from "./components/menu/index.js";
|
|
@@ -45,13 +45,17 @@ import { VftSelectV2 as ro } from "./components/select-v2/index.js";
|
|
|
45
45
|
import { VftVerifyCode as fo } from "./components/verify-code/index.js";
|
|
46
46
|
import { VftTable as mo } from "./components/table/index.js";
|
|
47
47
|
import { VftImageViewer as io } from "./components/image-viewer/index.js";
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
|
|
48
|
+
import { VftListCell as po } from "./components/list-cell/index.js";
|
|
49
|
+
import { VftDialog as Vo } from "./components/dialog/index.js";
|
|
50
|
+
import { VftMdComment as eo } from "./components/md-comment/index.js";
|
|
51
|
+
import { VftMdTabs as ao } from "./components/md-tabs/index.js";
|
|
52
|
+
import { VftMdVuePlayground as no } from "./components/md-vue-playground/index.js";
|
|
53
|
+
import { VftMdCodeDemo as uo } from "./components/md-code-demo/index.js";
|
|
54
|
+
import { VftMdCodeTabs as lo } from "./components/md-code-tabs/index.js";
|
|
55
|
+
import { VftMdContainer as co } from "./components/md-container/index.js";
|
|
56
|
+
const st = [
|
|
57
|
+
co,
|
|
58
|
+
lo,
|
|
55
59
|
uo,
|
|
56
60
|
no,
|
|
57
61
|
ao,
|
|
@@ -76,12 +80,12 @@ const dt = [
|
|
|
76
80
|
K,
|
|
77
81
|
j,
|
|
78
82
|
q,
|
|
83
|
+
h,
|
|
79
84
|
v,
|
|
80
|
-
B,
|
|
81
85
|
W,
|
|
82
|
-
g,
|
|
83
86
|
I,
|
|
84
|
-
|
|
87
|
+
g,
|
|
88
|
+
D,
|
|
85
89
|
M,
|
|
86
90
|
T,
|
|
87
91
|
s,
|
|
@@ -92,12 +96,12 @@ const dt = [
|
|
|
92
96
|
d,
|
|
93
97
|
u,
|
|
94
98
|
l,
|
|
95
|
-
|
|
99
|
+
B,
|
|
96
100
|
R,
|
|
97
101
|
t,
|
|
98
102
|
V,
|
|
103
|
+
P,
|
|
99
104
|
y,
|
|
100
|
-
D,
|
|
101
105
|
S,
|
|
102
106
|
k,
|
|
103
107
|
n,
|
|
@@ -113,12 +117,12 @@ const dt = [
|
|
|
113
117
|
m,
|
|
114
118
|
i,
|
|
115
119
|
x,
|
|
116
|
-
|
|
120
|
+
L,
|
|
117
121
|
p,
|
|
118
122
|
e,
|
|
119
123
|
a,
|
|
120
124
|
Q
|
|
121
125
|
];
|
|
122
126
|
export {
|
|
123
|
-
|
|
127
|
+
st as default
|
|
124
128
|
};
|
|
@@ -57,6 +57,8 @@ import "../select-v2/index.js";
|
|
|
57
57
|
import "../verify-code/index.js";
|
|
58
58
|
import "../table/index.js";
|
|
59
59
|
import "../image-viewer/index.js";
|
|
60
|
+
import "../list-cell/index.js";
|
|
61
|
+
import "../dialog/index.js";
|
|
60
62
|
import "../md-container/index.js";
|
|
61
63
|
import "../md-comment/index.js";
|
|
62
64
|
import "../md-tabs/index.js";
|
|
@@ -78,7 +80,7 @@ const r = (
|
|
|
78
80
|
_("back-top")
|
|
79
81
|
), N = c({
|
|
80
82
|
name: r.b()
|
|
81
|
-
}),
|
|
83
|
+
}), oo = /* @__PURE__ */ c({
|
|
82
84
|
...N,
|
|
83
85
|
props: {
|
|
84
86
|
visibilityHeight: { default: 200 },
|
|
@@ -121,5 +123,5 @@ const r = (
|
|
|
121
123
|
}
|
|
122
124
|
});
|
|
123
125
|
export {
|
|
124
|
-
|
|
126
|
+
oo as default
|
|
125
127
|
};
|
|
@@ -66,7 +66,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
66
66
|
* @description current color object
|
|
67
67
|
*/
|
|
68
68
|
color: Color;
|
|
69
|
-
|
|
69
|
+
showPicker: import("vue").Ref<boolean>;
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "activeChange" | "click-outside")[], "update:modelValue" | "change" | "activeChange" | "click-outside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
71
|
modelValue: {
|
|
71
72
|
type: __PropType<string | undefined>;
|
|
72
73
|
required: false;
|
|
@@ -117,6 +118,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
117
118
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
118
119
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
119
120
|
onActiveChange?: ((...args: any[]) => any) | undefined;
|
|
121
|
+
"onClick-outside"?: ((...args: any[]) => any) | undefined;
|
|
120
122
|
}, {
|
|
121
123
|
validateEvent: boolean | undefined;
|
|
122
124
|
tabindex: string | number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as G, ref as d, reactive as ne, computed as
|
|
1
|
+
import { defineComponent as G, ref as d, reactive as ne, computed as k, onMounted as ie, watch as g, nextTick as y, provide as se, openBlock as f, createBlock as C, unref as e, withCtx as V, withDirectives as L, createElementBlock as H, createElementVNode as p, normalizeClass as t, createVNode as v, createCommentVNode as E, withKeys as M, createTextVNode as O, normalizeStyle as ce, vShow as ue } from "vue";
|
|
2
2
|
import { debounce as de } from "lodash";
|
|
3
3
|
import { VftButton as R } from "../button/index.js";
|
|
4
4
|
import { VftIcon as U } from "../icon/index.js";
|
|
@@ -41,8 +41,8 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
41
41
|
predefine: null,
|
|
42
42
|
validateEvent: { type: Boolean, default: !0 }
|
|
43
43
|
},
|
|
44
|
-
emits: [$, be, "activeChange"],
|
|
45
|
-
setup(i, { expose: W, emit:
|
|
44
|
+
emits: [$, be, "activeChange", "click-outside"],
|
|
45
|
+
setup(i, { expose: W, emit: m }) {
|
|
46
46
|
const a = i, o = ve("color"), { formItem: s } = Ce(), j = Ee(), A = Ae(), { inputId: q, isLabeledByFormItem: B } = Ve(a, {
|
|
47
47
|
formItemContext: s
|
|
48
48
|
}), F = d(), J = d(), N = d(), Q = d();
|
|
@@ -53,7 +53,7 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
53
53
|
format: a.colorFormat || "",
|
|
54
54
|
value: a.modelValue
|
|
55
55
|
})
|
|
56
|
-
),
|
|
56
|
+
), b = d(!1), c = d(!1), h = d(""), X = k(() => !a.modelValue && !c.value ? "transparent" : le(r, a.showAlpha)), S = k(() => !a.modelValue && !c.value ? "" : r.value), Y = k(() => B.value ? void 0 : a.label || "色彩选择器"), Z = k(() => B.value ? s == null ? void 0 : s.labelId : void 0), ee = k(() => [
|
|
57
57
|
o.b("picker"),
|
|
58
58
|
o.is("disabled", A.value),
|
|
59
59
|
o.bm("picker", j.value)
|
|
@@ -65,11 +65,11 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
65
65
|
return n ? `rgba(${u}, ${K}, ${D}, ${l.get("alpha") / 100})` : `rgb(${u}, ${K}, ${D})`;
|
|
66
66
|
}
|
|
67
67
|
function oe(l) {
|
|
68
|
-
|
|
68
|
+
b.value = l;
|
|
69
69
|
}
|
|
70
70
|
const w = de(oe, 100);
|
|
71
|
-
function ae() {
|
|
72
|
-
w(!1), P();
|
|
71
|
+
function ae(l) {
|
|
72
|
+
w(!1), P(), m("click-outside", l);
|
|
73
73
|
}
|
|
74
74
|
function P() {
|
|
75
75
|
y(() => {
|
|
@@ -79,14 +79,14 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
function T() {
|
|
82
|
-
A.value || w(!
|
|
82
|
+
A.value || w(!b.value);
|
|
83
83
|
}
|
|
84
84
|
function I() {
|
|
85
|
-
r.fromString(
|
|
85
|
+
r.fromString(h.value);
|
|
86
86
|
}
|
|
87
87
|
function re() {
|
|
88
88
|
const l = r.value;
|
|
89
|
-
|
|
89
|
+
m($, l), m("change", l), a.validateEvent && (s == null || s.validate("change").catch((n) => _(n))), w(!1), y(() => {
|
|
90
90
|
const n = new z({
|
|
91
91
|
enableAlpha: a.showAlpha,
|
|
92
92
|
format: a.colorFormat || "",
|
|
@@ -96,10 +96,10 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
function te() {
|
|
99
|
-
w(!1),
|
|
99
|
+
w(!1), m($, null), m("change", null), a.modelValue !== null && a.validateEvent && (s == null || s.validate("change").catch((l) => _(l))), P();
|
|
100
100
|
}
|
|
101
101
|
return ie(() => {
|
|
102
|
-
a.modelValue && (
|
|
102
|
+
a.modelValue && (h.value = S.value);
|
|
103
103
|
}), g(
|
|
104
104
|
() => a.modelValue,
|
|
105
105
|
(l) => {
|
|
@@ -108,7 +108,7 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
108
108
|
), g(
|
|
109
109
|
() => S.value,
|
|
110
110
|
(l) => {
|
|
111
|
-
|
|
111
|
+
h.value = l, x && m("activeChange", l), x = !0;
|
|
112
112
|
}
|
|
113
113
|
), g(
|
|
114
114
|
() => r.value,
|
|
@@ -116,7 +116,7 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
116
116
|
!a.modelValue && !c.value && (c.value = !0);
|
|
117
117
|
}
|
|
118
118
|
), g(
|
|
119
|
-
() =>
|
|
119
|
+
() => b.value,
|
|
120
120
|
() => {
|
|
121
121
|
y(() => {
|
|
122
122
|
var l, n, u;
|
|
@@ -129,11 +129,12 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
129
129
|
/**
|
|
130
130
|
* @description current color object
|
|
131
131
|
*/
|
|
132
|
-
color: r
|
|
133
|
-
|
|
132
|
+
color: r,
|
|
133
|
+
showPicker: b
|
|
134
|
+
}), (l, n) => (f(), C(e(me), {
|
|
134
135
|
ref_key: "popper",
|
|
135
136
|
ref: Q,
|
|
136
|
-
visible:
|
|
137
|
+
visible: b.value,
|
|
137
138
|
"show-arrow": !1,
|
|
138
139
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
139
140
|
offset: 0,
|
|
@@ -146,29 +147,29 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
146
147
|
persistent: ""
|
|
147
148
|
}, {
|
|
148
149
|
content: V(() => [
|
|
149
|
-
L((
|
|
150
|
+
L((f(), H("div", null, [
|
|
150
151
|
p("div", {
|
|
151
152
|
class: t(e(o).be("dropdown", "main-wrapper"))
|
|
152
153
|
}, [
|
|
153
|
-
|
|
154
|
+
v(we, {
|
|
154
155
|
ref_key: "hue",
|
|
155
156
|
ref: F,
|
|
156
157
|
class: "hue-slider",
|
|
157
158
|
color: e(r),
|
|
158
159
|
vertical: ""
|
|
159
160
|
}, null, 8, ["color"]),
|
|
160
|
-
|
|
161
|
+
v(ye, {
|
|
161
162
|
ref: "svPanel",
|
|
162
163
|
color: e(r)
|
|
163
164
|
}, null, 8, ["color"])
|
|
164
165
|
], 2),
|
|
165
|
-
i.showAlpha ? (
|
|
166
|
+
i.showAlpha ? (f(), C(he, {
|
|
166
167
|
key: 0,
|
|
167
168
|
ref_key: "alpha",
|
|
168
169
|
ref: N,
|
|
169
170
|
color: e(r)
|
|
170
171
|
}, null, 8, ["color"])) : E("", !0),
|
|
171
|
-
i.predefine ? (
|
|
172
|
+
i.predefine ? (f(), C(ge, {
|
|
172
173
|
key: 1,
|
|
173
174
|
ref: "predefine",
|
|
174
175
|
color: e(r),
|
|
@@ -180,16 +181,16 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
180
181
|
p("span", {
|
|
181
182
|
class: t(e(o).be("dropdown", "value"))
|
|
182
183
|
}, [
|
|
183
|
-
|
|
184
|
-
modelValue:
|
|
185
|
-
"onUpdate:modelValue": n[0] || (n[0] = (u) =>
|
|
184
|
+
v(e(fe), {
|
|
185
|
+
modelValue: h.value,
|
|
186
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => h.value = u),
|
|
186
187
|
"validate-event": !1,
|
|
187
188
|
size: "small",
|
|
188
189
|
onKeyup: M(I, ["enter"]),
|
|
189
190
|
onBlur: I
|
|
190
191
|
}, null, 8, ["modelValue", "onKeyup"])
|
|
191
192
|
], 2),
|
|
192
|
-
|
|
193
|
+
v(e(R), {
|
|
193
194
|
class: t(e(o).be("dropdown", "link-btn")),
|
|
194
195
|
text: "",
|
|
195
196
|
size: "small",
|
|
@@ -200,7 +201,7 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
200
201
|
]),
|
|
201
202
|
_: 1
|
|
202
203
|
}, 8, ["class"]),
|
|
203
|
-
|
|
204
|
+
v(e(R), {
|
|
204
205
|
plain: "",
|
|
205
206
|
size: "small",
|
|
206
207
|
class: t(e(o).be("dropdown", "btn")),
|
|
@@ -227,7 +228,7 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
227
228
|
tabindex: i.tabindex,
|
|
228
229
|
onKeydown: M(T, ["enter"])
|
|
229
230
|
}, [
|
|
230
|
-
e(A) ? (
|
|
231
|
+
e(A) ? (f(), H("div", {
|
|
231
232
|
key: 0,
|
|
232
233
|
class: t(e(o).be("picker", "mask"))
|
|
233
234
|
}, null, 2)) : E("", !0),
|
|
@@ -244,13 +245,13 @@ const xe = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex
|
|
|
244
245
|
backgroundColor: e(X)
|
|
245
246
|
})
|
|
246
247
|
}, [
|
|
247
|
-
L(
|
|
248
|
+
L(v(e(U), {
|
|
248
249
|
icon: "ico-ep:arrow-down",
|
|
249
250
|
class: t([e(o).be("picker", "icon"), e(o).is("icon-arrow-down")])
|
|
250
251
|
}, null, 8, ["class"]), [
|
|
251
252
|
[ue, i.modelValue || c.value]
|
|
252
253
|
]),
|
|
253
|
-
!i.modelValue && !c.value ? (
|
|
254
|
+
!i.modelValue && !c.value ? (f(), C(e(U), {
|
|
254
255
|
key: 0,
|
|
255
256
|
icon: "ico-ep:circle-close",
|
|
256
257
|
class: t([e(o).be("picker", "empty"), e(o).is("icon-close")])
|
|
@@ -47,7 +47,8 @@ export declare const VftColorPicker: import("vft/es/utils").SFCWithInstall<impor
|
|
|
47
47
|
};
|
|
48
48
|
}, {
|
|
49
49
|
color: import("./utils/color").default;
|
|
50
|
-
|
|
50
|
+
showPicker: import("vue").Ref<boolean>;
|
|
51
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "activeChange" | "click-outside")[], "update:modelValue" | "change" | "activeChange" | "click-outside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
52
|
modelValue: {
|
|
52
53
|
type: import("vue").PropType<string | undefined>;
|
|
53
54
|
required: false;
|
|
@@ -98,6 +99,7 @@ export declare const VftColorPicker: import("vft/es/utils").SFCWithInstall<impor
|
|
|
98
99
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
99
100
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
100
101
|
onActiveChange?: ((...args: any[]) => any) | undefined;
|
|
102
|
+
"onClick-outside"?: ((...args: any[]) => any) | undefined;
|
|
101
103
|
}, {
|
|
102
104
|
validateEvent: boolean | undefined;
|
|
103
105
|
tabindex: string | number | undefined;
|
|
@@ -64,6 +64,8 @@ import "../select-v2/index.js";
|
|
|
64
64
|
import "../verify-code/index.js";
|
|
65
65
|
import "../table/index.js";
|
|
66
66
|
import "../image-viewer/index.js";
|
|
67
|
+
import "../list-cell/index.js";
|
|
68
|
+
import "../dialog/index.js";
|
|
67
69
|
import "../md-container/index.js";
|
|
68
70
|
import "../md-comment/index.js";
|
|
69
71
|
import "../md-tabs/index.js";
|
|
@@ -76,7 +78,7 @@ const N = { class: "vft-sub-menu" }, x = (
|
|
|
76
78
|
F("context-menu")
|
|
77
79
|
), R = f({
|
|
78
80
|
name: x.b()
|
|
79
|
-
}),
|
|
81
|
+
}), eo = /* @__PURE__ */ f({
|
|
80
82
|
...R,
|
|
81
83
|
props: {
|
|
82
84
|
axis: null,
|
|
@@ -150,5 +152,5 @@ const N = { class: "vft-sub-menu" }, x = (
|
|
|
150
152
|
}
|
|
151
153
|
});
|
|
152
154
|
export {
|
|
153
|
-
|
|
155
|
+
eo as default
|
|
154
156
|
};
|
|
@@ -153,10 +153,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
153
153
|
required: false;
|
|
154
154
|
};
|
|
155
155
|
}>> & {
|
|
156
|
-
onClose?: (() => any) | undefined;
|
|
157
156
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
158
157
|
onOpen?: (() => any) | undefined;
|
|
159
158
|
onOpened?: (() => any) | undefined;
|
|
159
|
+
onClose?: (() => any) | undefined;
|
|
160
160
|
onClosed?: (() => any) | undefined;
|
|
161
161
|
onOpenAutoFocus?: (() => any) | undefined;
|
|
162
162
|
onCloseAutoFocus?: (() => any) | undefined;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as B,
|
|
2
|
-
import { VftOverlay as
|
|
3
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as B, ref as i, getCurrentInstance as z, provide as O, computed as P, openBlock as v, createBlock as b, Teleport as N, createVNode as f, Transition as q, unref as e, withCtx as n, withDirectives as j, createElementVNode as K, normalizeClass as U, normalizeStyle as x, mergeProps as G, createSlots as H, renderSlot as r, createCommentVNode as J, vShow as Q } from "vue";
|
|
2
|
+
import { VftOverlay as W } from "../overlay/index.js";
|
|
3
|
+
import { useNamespace as X } from "../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "../../hooks/use-z-index/index.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
|
-
import { isBoolean as
|
|
8
|
+
import { isBoolean as Y } from "@vft/utils";
|
|
9
9
|
import "../../utils/ns-cover.js";
|
|
10
10
|
import "@vue/reactivity";
|
|
11
|
-
import { useSameTarget as
|
|
12
|
-
import
|
|
11
|
+
import { useSameTarget as Z } from "../../hooks/use-same-target/index.js";
|
|
12
|
+
import _ from "../focus-trap/focus-trap.vue.js";
|
|
13
13
|
import "../focus-trap/utils.js";
|
|
14
|
-
import
|
|
15
|
-
import { dialogInjectionKey as
|
|
16
|
-
import { useDialog as
|
|
17
|
-
import { UPDATE_MODEL_EVENT as
|
|
18
|
-
const
|
|
14
|
+
import ee from "./dialog-content.vue2.js";
|
|
15
|
+
import { dialogInjectionKey as oe } from "./constants.js";
|
|
16
|
+
import { useDialog as te } from "./hooks/use-dialog.js";
|
|
17
|
+
import { UPDATE_MODEL_EVENT as le } from "../../constants/event.js";
|
|
18
|
+
const ae = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
19
19
|
/* hoist-static*/
|
|
20
|
-
|
|
21
|
-
),
|
|
20
|
+
X("dialog")
|
|
21
|
+
), ne = B({
|
|
22
22
|
name: d.b(),
|
|
23
23
|
inheritAttrs: !1
|
|
24
|
-
}),
|
|
25
|
-
...
|
|
24
|
+
}), Fe = /* @__PURE__ */ B({
|
|
25
|
+
...ne,
|
|
26
26
|
props: {
|
|
27
27
|
center: { type: Boolean, default: !1 },
|
|
28
|
-
alignCenter: { type: Boolean },
|
|
28
|
+
alignCenter: { type: Boolean, default: !1 },
|
|
29
29
|
closeIcon: null,
|
|
30
30
|
customClass: { default: "" },
|
|
31
31
|
draggable: { type: Boolean, default: !1 },
|
|
@@ -34,22 +34,22 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
34
34
|
title: { default: "" },
|
|
35
35
|
appendToBody: { type: Boolean, default: !1 },
|
|
36
36
|
beforeClose: { type: Function },
|
|
37
|
-
destroyOnClose: { type: Boolean },
|
|
38
|
-
closeOnClickModal: { type: Boolean },
|
|
39
|
-
closeOnPressEscape: { type: Boolean },
|
|
40
|
-
lockScroll: { type: Boolean },
|
|
37
|
+
destroyOnClose: { type: Boolean, default: !1 },
|
|
38
|
+
closeOnClickModal: { type: Boolean, default: !0 },
|
|
39
|
+
closeOnPressEscape: { type: Boolean, default: !0 },
|
|
40
|
+
lockScroll: { type: Boolean, default: !0 },
|
|
41
41
|
modal: { type: Boolean, default: !0 },
|
|
42
|
-
openDelay:
|
|
43
|
-
closeDelay:
|
|
42
|
+
openDelay: { default: 0 },
|
|
43
|
+
closeDelay: { default: 0 },
|
|
44
44
|
top: null,
|
|
45
|
-
modelValue: { type: Boolean },
|
|
45
|
+
modelValue: { type: Boolean, default: !1 },
|
|
46
46
|
modalClass: null,
|
|
47
47
|
width: null,
|
|
48
48
|
zIndex: null,
|
|
49
|
-
trapFocus: { type: Boolean }
|
|
49
|
+
trapFocus: { type: Boolean, default: !1 }
|
|
50
50
|
},
|
|
51
51
|
emits: {
|
|
52
|
-
[
|
|
52
|
+
[le]: (o) => Y(o),
|
|
53
53
|
open: () => !0,
|
|
54
54
|
opened: () => !0,
|
|
55
55
|
close: () => !0,
|
|
@@ -58,9 +58,8 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
58
58
|
closeAutoFocus: () => !0
|
|
59
59
|
},
|
|
60
60
|
setup(o, { expose: k }) {
|
|
61
|
-
z()
|
|
62
|
-
|
|
63
|
-
visible: i,
|
|
61
|
+
const c = i(), A = i(), m = i(), F = z(), {
|
|
62
|
+
visible: u,
|
|
64
63
|
titleId: p,
|
|
65
64
|
bodyId: y,
|
|
66
65
|
style: w,
|
|
@@ -73,49 +72,49 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
73
72
|
handleClose: g,
|
|
74
73
|
onModalClick: M,
|
|
75
74
|
onOpenAutoFocus: $,
|
|
76
|
-
onCloseAutoFocus:
|
|
77
|
-
onCloseRequested:
|
|
78
|
-
onFocusoutPrevented:
|
|
79
|
-
} =
|
|
80
|
-
|
|
81
|
-
dialogRef:
|
|
75
|
+
onCloseAutoFocus: D,
|
|
76
|
+
onCloseRequested: L,
|
|
77
|
+
onFocusoutPrevented: S
|
|
78
|
+
} = te(F.props, c);
|
|
79
|
+
O(oe, {
|
|
80
|
+
dialogRef: c,
|
|
82
81
|
headerRef: A,
|
|
83
82
|
bodyId: y,
|
|
84
83
|
ns: d,
|
|
85
84
|
rendered: C,
|
|
86
85
|
style: w
|
|
87
86
|
});
|
|
88
|
-
const l =
|
|
87
|
+
const l = Z(M), V = P(() => o.draggable && !o.fullscreen);
|
|
89
88
|
return k({
|
|
90
89
|
/** @description whether the dialog is visible */
|
|
91
|
-
visible:
|
|
90
|
+
visible: u,
|
|
92
91
|
dialogContentRef: m
|
|
93
|
-
}), (t, a) => (v(), b(
|
|
92
|
+
}), (t, a) => (v(), b(N, {
|
|
94
93
|
to: "body",
|
|
95
94
|
disabled: !o.appendToBody
|
|
96
95
|
}, [
|
|
97
|
-
|
|
96
|
+
f(q, {
|
|
98
97
|
name: "dialog-fade",
|
|
99
98
|
onAfterEnter: e(T),
|
|
100
99
|
onAfterLeave: e(h),
|
|
101
100
|
onBeforeLeave: e(I)
|
|
102
101
|
}, {
|
|
103
102
|
default: n(() => [
|
|
104
|
-
|
|
103
|
+
j(f(e(W), {
|
|
105
104
|
"custom-mask-event": "",
|
|
106
105
|
mask: o.modal,
|
|
107
106
|
"overlay-class": o.modalClass,
|
|
108
107
|
"z-index": e(E)
|
|
109
108
|
}, {
|
|
110
109
|
default: n(() => [
|
|
111
|
-
|
|
110
|
+
K("div", {
|
|
112
111
|
role: "dialog",
|
|
113
112
|
"aria-modal": "true",
|
|
114
113
|
"aria-label": o.title || void 0,
|
|
115
114
|
"aria-labelledby": o.title ? void 0 : e(p),
|
|
116
115
|
"aria-describedby": e(y),
|
|
117
|
-
class:
|
|
118
|
-
style:
|
|
116
|
+
class: U(`${e(d).namespace.value}-overlay-dialog`),
|
|
117
|
+
style: x(e(R)),
|
|
119
118
|
onClick: a[0] || (a[0] = //@ts-ignore
|
|
120
119
|
(...s) => e(l).onClick && e(l).onClick(...s)),
|
|
121
120
|
onMousedown: a[1] || (a[1] = //@ts-ignore
|
|
@@ -123,17 +122,17 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
123
122
|
onMouseup: a[2] || (a[2] = //@ts-ignore
|
|
124
123
|
(...s) => e(l).onMouseup && e(l).onMouseup(...s))
|
|
125
124
|
}, [
|
|
126
|
-
|
|
125
|
+
f(e(_), {
|
|
127
126
|
loop: "",
|
|
128
|
-
trapped: e(
|
|
127
|
+
trapped: e(u),
|
|
129
128
|
"focus-start-el": "container",
|
|
130
129
|
onFocusAfterTrapped: e($),
|
|
131
|
-
onFocusAfterReleased: e(
|
|
132
|
-
onFocusoutPrevented: e(
|
|
133
|
-
onReleaseRequested: e(
|
|
130
|
+
onFocusAfterReleased: e(D),
|
|
131
|
+
onFocusoutPrevented: e(S),
|
|
132
|
+
onReleaseRequested: e(L)
|
|
134
133
|
}, {
|
|
135
134
|
default: n(() => [
|
|
136
|
-
e(C) ? (v(), b(
|
|
135
|
+
e(C) ? (v(), b(ee, G({
|
|
137
136
|
key: 0,
|
|
138
137
|
ref_key: "dialogContentRef",
|
|
139
138
|
ref: m
|
|
@@ -147,7 +146,7 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
147
146
|
"show-close": o.showClose,
|
|
148
147
|
title: o.title,
|
|
149
148
|
onClose: e(g)
|
|
150
|
-
}),
|
|
149
|
+
}), H({
|
|
151
150
|
header: n(() => [
|
|
152
151
|
t.$slots.title ? r(t.$slots, "title", { key: 1 }) : r(t.$slots, "header", {
|
|
153
152
|
key: 0,
|
|
@@ -168,15 +167,15 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
168
167
|
]),
|
|
169
168
|
key: "0"
|
|
170
169
|
} : void 0
|
|
171
|
-
]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) :
|
|
170
|
+
]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) : J("", !0)
|
|
172
171
|
]),
|
|
173
172
|
_: 3
|
|
174
173
|
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
175
|
-
], 46,
|
|
174
|
+
], 46, ae)
|
|
176
175
|
]),
|
|
177
176
|
_: 3
|
|
178
177
|
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
179
|
-
[
|
|
178
|
+
[Q, e(u)]
|
|
180
179
|
])
|
|
181
180
|
]),
|
|
182
181
|
_: 3
|
|
@@ -185,5 +184,5 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], d = (
|
|
|
185
184
|
}
|
|
186
185
|
});
|
|
187
186
|
export {
|
|
188
|
-
|
|
187
|
+
Fe as default
|
|
189
188
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './hooks/use-dialog';
|
|
2
2
|
export * from './types';
|
|
3
3
|
export * from './constants';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const VftDialog: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
5
5
|
appendToBody: {
|
|
6
6
|
type: import("vue").PropType<boolean | undefined>;
|
|
7
7
|
required: false;
|
|
@@ -135,12 +135,12 @@ export declare const WflyDialog: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
135
135
|
required: false;
|
|
136
136
|
};
|
|
137
137
|
}>> & {
|
|
138
|
-
onClose?: (() => any) | undefined;
|
|
139
138
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
140
139
|
onOpen?: (() => any) | undefined;
|
|
141
140
|
onOpened?: (() => any) | undefined;
|
|
141
|
+
onClose?: (() => any) | undefined;
|
|
142
142
|
onClosed?: (() => any) | undefined;
|
|
143
143
|
onOpenAutoFocus?: (() => any) | undefined;
|
|
144
144
|
onCloseAutoFocus?: (() => any) | undefined;
|
|
145
145
|
}, {}>> & Record<string, any>;
|
|
146
|
-
export default
|
|
146
|
+
export default VftDialog;
|