mc-plus 1.0.21 → 1.0.23
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/es/{hooks-D0n33nb8.js → hooks-CaHRdMVi.js} +12 -12
- package/dist/es/index.js +65 -60
- package/dist/es/mc-alert-Dc8UZwbs.js +12 -0
- package/dist/es/{mc-button-C3M_uIUL.js → mc-button-BzTZwUJY.js} +8 -8
- package/dist/es/{mc-checkbox-1v_7vBVm.js → mc-checkbox-XTu4G8Ql.js} +1 -1
- package/dist/es/{mc-collapse-D4A3D1A7.js → mc-collapse-C68KTHMo.js} +2 -2
- package/dist/es/{mc-divider-DnJ_rBx3.js → mc-divider-CetkEEWs.js} +1 -1
- package/dist/es/{mc-drawer-Dle-4Mf2.js → mc-drawer-B0OqoqTb.js} +5 -5
- package/dist/es/{mc-footer-CnMNnkA8.js → mc-footer-DQYguol3.js} +1 -1
- package/dist/es/mc-form-GD4rKC6G.js +107 -0
- package/dist/es/{mc-icon-oTgV9pMA.js → mc-icon-BCR0XCJl.js} +1 -1
- package/dist/es/{mc-input-DtvjCuAH.js → mc-input-CgkXcWFb.js} +5 -5
- package/dist/es/mc-lightbox-D7RM1TeY.js +35 -0
- package/dist/es/{mc-message-qDiSEyiP.js → mc-message-DhaFb3_V.js} +2 -2
- package/dist/es/{mc-modal-header-BVG3tywa.js → mc-modal-header-0koUQimu.js} +6 -6
- package/dist/es/{mc-overlay-DwuQMb48.js → mc-overlay-BpXL4npx.js} +1 -1
- package/dist/es/mc-popper-DQ5aNdcl.js +34 -0
- package/dist/es/{mc-radio-TczsTpWI.js → mc-radio-DURuKHAH.js} +1 -1
- package/dist/es/{mc-reset-C2LQOIpe.js → mc-reset-ism8Q2uZ.js} +2 -2
- package/dist/es/{mc-select-BpTBi_Ax.js → mc-select-hWzUKAC7.js} +6 -6
- package/dist/es/{mc-step-DPbqaW4a.js → mc-step-DV4B5rZx.js} +6 -6
- package/dist/es/{mc-success-icon-BB5f9EEL.js → mc-success-icon-BBBRzpqR.js} +1 -1
- package/dist/es/{mc-switch-COmM8JEx.js → mc-switch-DfDHgpaw.js} +1 -1
- package/dist/es/{mc-tab-CGsHEm__.js → mc-tab-k42g30rE.js} +22 -22
- package/dist/es/{mc-tag-CfYut-mf.js → mc-tag-BFd8VP2H.js} +2 -2
- package/dist/es/{mc-title-7qDFxVvc.js → mc-title-C0ioHCBh.js} +6 -6
- package/dist/es/{mc-toast-BrmJXXuA.js → mc-toast-BfgI80SY.js} +2 -2
- package/dist/es/mc-tooltip-Dp_lo0jl.js +9 -0
- package/dist/es/mc-upload-CLbFaxUl.js +120 -0
- package/dist/es/theme/mc-alert.css +1 -1
- package/dist/es/theme/mc-button.css +1 -1
- package/dist/es/theme/mc-form.css +1 -1
- package/dist/es/theme/mc-lightbox.css +1 -1
- package/dist/es/theme/mc-popper.css +1 -0
- package/dist/es/theme/mc-tooltip.css +1 -1
- package/dist/es/theme/mc-upload.css +1 -0
- package/dist/es/{utils-CMUecsjZ.js → utils-DVltbcaT.js} +1 -1
- package/dist/es/{vendor-DkZTEfn_.js → vendor-DCLhrjBP.js} +5 -5
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/components/mc-form/index.d.ts +6 -0
- package/dist/types/components/mc-form/types.d.ts +2 -0
- package/dist/types/components/mc-lightbox/index.d.ts +3 -1
- package/dist/types/components/mc-popper/index.d.ts +68 -0
- package/dist/types/components/mc-popper/types.d.ts +21 -0
- package/dist/types/components/mc-tooltip/index.d.ts +16 -44
- package/dist/types/components/mc-tooltip/types.d.ts +7 -16
- package/dist/types/components/mc-upload/constanst.d.ts +11 -0
- package/dist/types/components/mc-upload/index.d.ts +124 -0
- package/dist/types/components/mc-upload/types.d.ts +46 -0
- package/dist/types/components/mc-upload/utils.d.ts +4 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +10 -10
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-alert-BfTDI70R.js +0 -12
- package/dist/es/mc-form-C_zKtVSz.js +0 -106
- package/dist/es/mc-lightbox-BcK5Hqfm.js +0 -26
- package/dist/es/mc-tooltip-XvEaoUdt.js +0 -33
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getCurrentInstance as e, computed as r, isRef as t, watch as n, onMounted as o, onBeforeUnmount as s, unref as u, ref as a, onUnmounted as i } from "vue";
|
|
2
|
-
import { i as v, t as c } from "./vendor-
|
|
2
|
+
import { i as v, t as c } from "./vendor-DCLhrjBP.js";
|
|
3
3
|
function l(t2) {
|
|
4
4
|
const n2 = e();
|
|
5
5
|
if (!n2) throw new Error("useProp must be used within a component");
|
|
@@ -41,25 +41,25 @@ function b(e2) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
function p(e2, r2, t2 = 300) {
|
|
44
|
-
const
|
|
44
|
+
const u2 = new ResizeObserver(c((e3) => {
|
|
45
45
|
for (let t3 of e3) r2(t3.contentRect);
|
|
46
|
-
}, t2)),
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
46
|
+
}, t2)), a2 = (e3) => {
|
|
47
|
+
u2.observe(e3);
|
|
48
|
+
}, i2 = (e3) => {
|
|
49
|
+
u2.unobserve(e3);
|
|
50
50
|
};
|
|
51
51
|
return o(() => {
|
|
52
|
-
e2.value && u2(e2.value);
|
|
53
|
-
}), i(() => {
|
|
54
52
|
e2.value && a2(e2.value);
|
|
53
|
+
}), s(() => {
|
|
54
|
+
e2.value && i2(e2.value);
|
|
55
55
|
}), n(e2, (e3) => {
|
|
56
|
-
e3 &&
|
|
57
|
-
}), { resizeObserver:
|
|
56
|
+
e3 && a2(e3);
|
|
57
|
+
}), { resizeObserver: u2, observe: a2, unobserve: i2 };
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
60
|
l as a,
|
|
61
61
|
m as b,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
b as c,
|
|
63
|
+
f as d,
|
|
64
64
|
p as u
|
|
65
65
|
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,72 +1,77 @@
|
|
|
1
|
-
import { p as s, m } from "./utils-
|
|
2
|
-
import { M as o } from "./mc-alert-
|
|
3
|
-
import { M as r } from "./mc-button-
|
|
4
|
-
import { M as i } from "./mc-checkbox-
|
|
5
|
-
import { M as p } from "./mc-collapse-
|
|
6
|
-
import { a } from "./mc-collapse-
|
|
7
|
-
import {
|
|
8
|
-
import { M
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import { M as
|
|
12
|
-
import { M as
|
|
13
|
-
import { M as T } from "./mc-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { M as q } from "./mc-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { M as y } from "./mc-
|
|
20
|
-
import {
|
|
21
|
-
import { M as
|
|
22
|
-
import {
|
|
23
|
-
import { a as
|
|
24
|
-
import { a as B } from "./mc-
|
|
25
|
-
import {
|
|
26
|
-
import { M as F } from "./mc-
|
|
27
|
-
import { M as G } from "./mc-
|
|
28
|
-
import { M as H } from "./mc-
|
|
29
|
-
import { M as J } from "./mc-
|
|
30
|
-
|
|
1
|
+
import { p as s, m } from "./utils-DVltbcaT.js";
|
|
2
|
+
import { M as o } from "./mc-alert-Dc8UZwbs.js";
|
|
3
|
+
import { M as r } from "./mc-button-BzTZwUJY.js";
|
|
4
|
+
import { M as i } from "./mc-checkbox-XTu4G8Ql.js";
|
|
5
|
+
import { M as p } from "./mc-collapse-C68KTHMo.js";
|
|
6
|
+
import { a } from "./mc-collapse-C68KTHMo.js";
|
|
7
|
+
import { M as f, a as j } from "./mc-input-CgkXcWFb.js";
|
|
8
|
+
import { M } from "./mc-message-DhaFb3_V.js";
|
|
9
|
+
import { a as a2 } from "./mc-message-DhaFb3_V.js";
|
|
10
|
+
import { M as l, a as n } from "./mc-radio-DURuKHAH.js";
|
|
11
|
+
import { M as g, a as x, b as h } from "./mc-select-hWzUKAC7.js";
|
|
12
|
+
import { M as S } from "./mc-switch-DfDHgpaw.js";
|
|
13
|
+
import { M as T, a as k, b as w } from "./mc-tab-k42g30rE.js";
|
|
14
|
+
import { u, c, d } from "./mc-tab-k42g30rE.js";
|
|
15
|
+
import { M as P } from "./mc-tag-BFd8VP2H.js";
|
|
16
|
+
import { M as q } from "./mc-toast-BfgI80SY.js";
|
|
17
|
+
import { c as c2, t, e, a as a3, b, d as d2 } from "./mc-toast-BfgI80SY.js";
|
|
18
|
+
import { M as v } from "./mc-step-DV4B5rZx.js";
|
|
19
|
+
import { M as y, b as C } from "./mc-form-GD4rKC6G.js";
|
|
20
|
+
import { a as E } from "./mc-icon-BCR0XCJl.js";
|
|
21
|
+
import { M as I } from "./mc-success-icon-BBBRzpqR.js";
|
|
22
|
+
import { a as W, b as z } from "./mc-title-C0ioHCBh.js";
|
|
23
|
+
import { a as A } from "./mc-footer-DQYguol3.js";
|
|
24
|
+
import { a as B } from "./mc-modal-header-0koUQimu.js";
|
|
25
|
+
import { M as D } from "./mc-drawer-B0OqoqTb.js";
|
|
26
|
+
import { M as F } from "./mc-reset-ism8Q2uZ.js";
|
|
27
|
+
import { M as G } from "./mc-divider-CetkEEWs.js";
|
|
28
|
+
import { M as H } from "./mc-lightbox-D7RM1TeY.js";
|
|
29
|
+
import { M as J, a as K } from "./mc-upload-CLbFaxUl.js";
|
|
30
|
+
import { M as L } from "./mc-popper-DQ5aNdcl.js";
|
|
31
|
+
import { M as N } from "./mc-tooltip-Dp_lo0jl.js";
|
|
32
|
+
const O = [r, p, T, S, l, n, g, x, h, i, o, M, P, q, v, y, C, f, j, E, I, W, A, z, B, D, k, w, F, G, H, J, K, L, N];
|
|
31
33
|
s();
|
|
32
|
-
const
|
|
34
|
+
const Q = m(O);
|
|
33
35
|
export {
|
|
34
36
|
o as McAlert,
|
|
35
37
|
r as McButton,
|
|
36
38
|
i as McCheckbox,
|
|
37
39
|
p as McCollapse,
|
|
38
40
|
a as McCollapseItem,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
k as
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
G as McDivider,
|
|
42
|
+
D as McDrawer,
|
|
43
|
+
K as McFileList,
|
|
44
|
+
A as McFooter,
|
|
45
|
+
y as McForm,
|
|
46
|
+
C as McFormItem,
|
|
47
|
+
E as McIcon,
|
|
48
|
+
f as McInput,
|
|
49
|
+
j as McInputGroup,
|
|
50
|
+
H as McLightbox,
|
|
51
|
+
M as McMessage,
|
|
52
|
+
B as McModalHeader,
|
|
53
|
+
L as McPopper,
|
|
54
|
+
l as McRadio,
|
|
55
|
+
n as McRadioGroup,
|
|
56
|
+
F as McReset,
|
|
57
|
+
g as McSelect,
|
|
58
|
+
x as McSelectGroup,
|
|
59
|
+
h as McSelectOption,
|
|
60
|
+
v as McStep,
|
|
61
|
+
I as McSuccessIcon,
|
|
62
|
+
S as McSwitch,
|
|
63
|
+
k as McTab,
|
|
64
|
+
w as McTabItem,
|
|
65
|
+
T as McTable,
|
|
66
|
+
P as McTag,
|
|
67
|
+
W as McTitle,
|
|
68
|
+
z as McTitleToolBar,
|
|
69
|
+
q as McToast,
|
|
70
|
+
N as McTooltip,
|
|
71
|
+
J as McUpload,
|
|
67
72
|
a2 as Message,
|
|
68
73
|
c2 as createToast,
|
|
69
|
-
|
|
74
|
+
Q as default,
|
|
70
75
|
t as toast,
|
|
71
76
|
e as toastError,
|
|
72
77
|
a3 as toastPrimary,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _ as e, w as t } from "./utils-DVltbcaT.js";
|
|
2
|
+
import { defineComponent as s, ref as l, useAttrs as c, computed as i, createElementBlock as o, createCommentVNode as r, openBlock as a, normalizeClass as n, normalizeStyle as _, createElementVNode as d, createBlock as m, renderSlot as p, toDisplayString as f } from "vue";
|
|
3
|
+
import { M as y } from "./mc-icon-BCR0XCJl.js";
|
|
4
|
+
const v = { class: "mc-alert__content" }, h = { class: "mc-alert__header" }, u = { class: "mc-alert__header-left" }, k = { key: 1, class: "mc-alert__title" }, w = { key: 0, class: "mc-alert__description" }, g = { key: 1, class: "mc-alert__description" }, I = t(e(s({ name: "McAlert", __name: "mc-alert", props: { type: { default: "info" }, title: {}, description: {}, closable: { type: Boolean, default: false }, showIcon: { type: Boolean, default: true }, height: {}, width: {} }, emits: ["close"], setup(e2, { expose: t2, emit: s2 }) {
|
|
5
|
+
const I2 = e2, M = s2, $ = l(), b = l(true), j = c(), x = i(() => ({ ...j.style || {}, width: I2.width, height: I2.height })), z = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, A = (e3) => {
|
|
6
|
+
b.value = false, M("close", e3);
|
|
7
|
+
};
|
|
8
|
+
return t2({ ref: $ }), (e3, t3) => b.value ? (a(), o("div", { key: 0, ref_key: "_ref", ref: $, style: _(x.value), class: n(["mc-alert", [`mc-alert--${e3.type}`]]) }, [d("div", v, [d("div", h, [d("div", u, [e3.showIcon ? (a(), m(y, { key: 0, name: z[e3.type], size: 24, class: "mc-alert__icon" }, null, 8, ["name"])) : r("", true), e3.title ? (a(), o("div", k, f(e3.title), 1)) : p(e3.$slots, "title", { key: 2 }, void 0, true)]), e3.closable ? (a(), m(y, { key: 0, name: "Cross", size: 24, class: "mc-alert__close", onClick: A })) : r("", true)]), e3.description ? (a(), o("div", w, f(e3.description), 1)) : (a(), o("div", g, [p(e3.$slots, "description", {}, void 0, true)]))])], 6)) : r("", true);
|
|
9
|
+
} }), [["__scopeId", "data-v-fc038f58"]]));
|
|
10
|
+
export {
|
|
11
|
+
I as M
|
|
12
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as e, toRefs as t, ref as o, useAttrs as a, computed as i, toValue as l, createElementBlock as n, openBlock as s, unref as d, normalizeClass as u, normalizeStyle as r, createBlock as c, createCommentVNode as m, createElementVNode as p, createVNode as v, renderSlot as f } from "vue";
|
|
2
|
-
import { M as y } from "./mc-icon-
|
|
3
|
-
import { t as h } from "./vendor-
|
|
4
|
-
import { _ as b, w as g } from "./utils-
|
|
2
|
+
import { M as y } from "./mc-icon-BCR0XCJl.js";
|
|
3
|
+
import { t as h } from "./vendor-DCLhrjBP.js";
|
|
4
|
+
import { _ as b, w as g } from "./utils-DVltbcaT.js";
|
|
5
5
|
const k = ["type", "disabled"], I = { key: 1, class: "loading-icon" }, _ = { class: "mc-button-text" }, w = g(b(e({ name: "McButton", __name: "mc-button", props: { type: { default: "primary" }, nativeType: { default: "button" }, size: { default: "medium" }, disabled: { type: Boolean }, loading: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 }, leftIcon: {}, rightIcon: {}, content: {}, height: {}, width: {} }, emits: ["click"], setup(e2, { expose: b2, emit: g2 }) {
|
|
6
|
-
const w2 = e2, { loading:
|
|
7
|
-
|
|
8
|
-
}, q = h(L,
|
|
9
|
-
return b2({ ref: $ }), (e3, t2) => (s(), n("button", { ref_key: "_ref", ref: $, style: r(C.value), class: u(["mc-button", { [`mc-button--${e3.type}`]: e3.type, [`mc-button--${e3.size}`]: e3.size, "is-loading": d(
|
|
10
|
-
} }), [["__scopeId", "data-v-
|
|
6
|
+
const w2 = e2, { loading: z, disabled: B, throttleDuration: T, height: j, width: x } = t(w2), M = g2, $ = o(), D = t(a()), C = i(() => ({ ...l(D).style, width: x.value ? x.value : void 0, height: j.value ? j.value : void 0 })), L = (e3) => {
|
|
7
|
+
z.value || B.value || M("click", e3);
|
|
8
|
+
}, q = h(L, T.value, { trailing: false });
|
|
9
|
+
return b2({ ref: $ }), (e3, t2) => (s(), n("button", { ref_key: "_ref", ref: $, style: r(C.value), class: u(["mc-button", { [`mc-button--${e3.type}`]: e3.type, [`mc-button--${e3.size}`]: e3.size, "is-loading": d(z), "is-disabled": d(B) }]), type: e3.nativeType, disabled: !(!d(B) && !d(z)) || void 0, onClick: t2[0] || (t2[0] = (t3) => e3.useThrottle ? d(q)(t3) : L(t3)) }, [e3.leftIcon && !d(z) ? (s(), c(y, { key: 0, name: e3.leftIcon }, null, 8, ["name"])) : m("", true), d(z) && !d(B) ? (s(), n("span", I, [v(y, { name: "Loading", size: 16 })])) : m("", true), p("div", _, [f(e3.$slots, "default", {}, void 0, true)]), e3.rightIcon ? (s(), c(y, { key: 2, name: e3.rightIcon }, null, 8, ["name"])) : m("", true)], 14, k));
|
|
10
|
+
} }), [["__scopeId", "data-v-22e63398"]]));
|
|
11
11
|
export {
|
|
12
12
|
w as M
|
|
13
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as c, openBlock as a, normalizeStyle as l, normalizeClass as o, createElementVNode as s, toDisplayString as t } from "vue";
|
|
2
|
-
import { _ as m, w as d } from "./utils-
|
|
2
|
+
import { _ as m, w as d } from "./utils-DVltbcaT.js";
|
|
3
3
|
const n = ["value", "disabled"], b = { class: "mc-checkbox__wrapper" }, p = { class: "mc-checkbox__content" }, k = { class: "mc-checkbox__content-text" }, h = { class: "mc-checkbox__content-remarks" }, i = d(m(e({ name: "McCheckbox", __name: "mc-checkbox", props: { modelValue: { type: Boolean }, disabled: { type: Boolean }, content: {}, remarks: {}, partial: { type: Boolean } }, emits: ["change", "update:modelValue"], setup(e2, { emit: m2 }) {
|
|
4
4
|
const d2 = e2, i2 = m2, r = () => {
|
|
5
5
|
d2.disabled || (i2("update:modelValue", !d2.modelValue), i2("change", !d2.modelValue));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as a, watchEffect as l, watch as s, provide as o, createElementBlock as c, openBlock as t, renderSlot as i, inject as m, computed as d, normalizeClass as n, createElementVNode as p, withDirectives as u, createTextVNode as r, toDisplayString as v, createVNode as _, vShow as h } from "vue";
|
|
2
|
-
import { d as f, _ as C, w as V } from "./utils-
|
|
3
|
-
import { M as b } from "./mc-icon-
|
|
2
|
+
import { d as f, _ as C, w as V } from "./utils-DVltbcaT.js";
|
|
3
|
+
import { M as b } from "./mc-icon-BCR0XCJl.js";
|
|
4
4
|
const g = Symbol("COLLAPSE_CONTEXT"), I = "McCollapse", M = { class: "mc-collapse" }, k = C(e({ name: I, __name: "mc-collapse", props: { modelValue: {}, accordion: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: m2 }) {
|
|
5
5
|
const d2 = a(e2.modelValue), n2 = m2;
|
|
6
6
|
l(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, createElementBlock as e, openBlock as a, normalizeClass as d } from "vue";
|
|
2
|
-
import { _ as s, w as m } from "./utils-
|
|
2
|
+
import { _ as s, w as m } from "./utils-DVltbcaT.js";
|
|
3
3
|
const r = m(s(i({ name: "McDivider", __name: "mc-divider", props: { size: { default: "small" }, emphasis: { default: "minimal" }, orientation: { default: "horizontal" } }, setup: (i2) => (i3, s2) => (a(), e("div", { class: d(["mc-divider", [`mc-divider-${i3.orientation}`, `mc-divider-${i3.size}`, `mc-divider-${i3.emphasis}`]]) }, null, 2)) }), [["__scopeId", "data-v-6b53d9f6"]]));
|
|
4
4
|
export {
|
|
5
5
|
r as M
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e, ref as o, watch as t, createElementBlock as a, createCommentVNode as s, openBlock as l, createBlock as r, Teleport as d, createVNode as i, Transition as m, withCtx as c, normalizeClass as f, createElementVNode as u, renderSlot as n, nextTick as v } from "vue";
|
|
2
|
-
import { M as p } from "./mc-overlay-
|
|
3
|
-
import { M as w } from "./mc-modal-header-
|
|
4
|
-
import { M as y } from "./mc-footer-
|
|
5
|
-
import { u as _ } from "./hooks-
|
|
6
|
-
import { _ as h, w as $ } from "./utils-
|
|
2
|
+
import { M as p } from "./mc-overlay-BpXL4npx.js";
|
|
3
|
+
import { M as w } from "./mc-modal-header-0koUQimu.js";
|
|
4
|
+
import { M as y } from "./mc-footer-DQYguol3.js";
|
|
5
|
+
import { u as _ } from "./hooks-CaHRdMVi.js";
|
|
6
|
+
import { _ as h, w as $ } from "./utils-DVltbcaT.js";
|
|
7
7
|
const b = { key: 0, class: "mc-drawer-container" }, g = { class: "mc-drawer-header" }, k = { class: "mc-drawer-content-wrapper" }, x = { class: "mc-drawer-content" }, C = $(h(e({ name: "McDrawer", __name: "mc-drawer", props: { modelValue: { type: Boolean }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" } }, emits: ["update:modelValue", "close"], setup(e2, { expose: h2, emit: $2 }) {
|
|
8
8
|
const C2 = e2, j = o(false), M = o(false), B = o(false), V = async () => {
|
|
9
9
|
j.value = true, M.value = true, await v(), B.value = true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as t, ref as o, createElementBlock as e, openBlock as s, normalizeStyle as r, normalizeClass as c, createCommentVNode as i, createElementVNode as d, renderSlot as a } from "vue";
|
|
2
|
-
import { _ as l, w as p } from "./utils-
|
|
2
|
+
import { _ as l, w as p } from "./utils-DVltbcaT.js";
|
|
3
3
|
const f = { key: 0, class: "mc-footer-content" }, h = { class: "mc-footer-bottom" }, m = { class: "mc-footer-bottom-content" }, n = { class: "mc-footer-left" }, v = { class: "mc-footer-right" }, w = { class: "mc-footer-right-button-group" }, g = l(t({ name: "McFooter", __name: "mc-footer", props: { width: {}, height: {}, wrapperWidth: {}, showborder: { type: Boolean, default: true } }, setup(t2, { expose: l2 }) {
|
|
4
4
|
const p2 = o();
|
|
5
5
|
return l2({ ref: p2 }), (t3, o2) => (s(), e("section", { class: c(["mc-footer", { "mc-footer-border": t3.showborder }]), style: r({ width: t3.width, height: t3.height }), ref_key: "_ref", ref: p2 }, [t3.$slots.desc ? (s(), e("div", f, [d("div", { class: "mc-footer-wrapper", style: r({ width: t3.wrapperWidth }) }, [a(t3.$slots, "desc", {}, void 0, true)], 4)])) : i("", true), d("div", h, [d("div", { class: "mc-footer-wrapper", style: r({ width: t3.wrapperWidth }) }, [d("div", m, [d("div", n, [a(t3.$slots, "left", {}, void 0, true)]), d("div", v, [a(t3.$slots, "right", {}, () => [d("div", w, [a(t3.$slots, "right-button-group", {}, void 0, true)])], true)])])], 4)])], 6));
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { inject as e, computed as r, defineComponent as t, reactive as s, toRefs as a, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as c, ref as m, onMounted as n, onUnmounted as u, createVNode as p, createCommentVNode as v, normalizeClass as f, toDisplayString as b, createTextVNode as h, Transition as y, withCtx as _, nextTick as g } from "vue";
|
|
2
|
+
import { a as q } from "./hooks-CaHRdMVi.js";
|
|
3
|
+
import { s as F, f as j, a as P, k as $, b as w, c as x, m as k, d as I, g as M, e as S, h as V, j as B } from "./vendor-DCLhrjBP.js";
|
|
4
|
+
import { _ as C, w as z } from "./utils-DVltbcaT.js";
|
|
5
|
+
import E from "async-validator";
|
|
6
|
+
import { _ as O } from "./mc-tooltip-Dp_lo0jl.js";
|
|
7
|
+
const A = Symbol("formContext"), D = Symbol("formItemContext");
|
|
8
|
+
function G() {
|
|
9
|
+
return { form: e(A, void 0), formItem: e(D, void 0) };
|
|
10
|
+
}
|
|
11
|
+
function H() {
|
|
12
|
+
const t2 = e(A, void 0), s2 = e(D, void 0), a2 = q("disabled");
|
|
13
|
+
return r(() => a2.value || (t2 == null ? void 0 : t2.disabled) || (s2 == null ? void 0 : s2.disabled));
|
|
14
|
+
}
|
|
15
|
+
const J = { class: "mc-form" }, K = C(t({ name: "McForm", __name: "mc-form", props: { model: {}, rules: { default: () => ({}) }, disabled: { type: Boolean } }, emits: ["validate"], setup(e2, { expose: r2, emit: t2 }) {
|
|
16
|
+
const m2 = t2, n2 = [], u2 = async (e3 = [], r3) => {
|
|
17
|
+
const t3 = F(e3) ? j(n2, (r4) => w(e3, r4.prop)) : n2;
|
|
18
|
+
try {
|
|
19
|
+
const e4 = await (async (e5 = []) => {
|
|
20
|
+
let r4 = {};
|
|
21
|
+
for (const t4 of e5) try {
|
|
22
|
+
await t4.validate();
|
|
23
|
+
} catch (e6) {
|
|
24
|
+
r4 = { ...r4, ...e6 };
|
|
25
|
+
}
|
|
26
|
+
return !F($(r4)) || Promise.reject(r4);
|
|
27
|
+
})(t3);
|
|
28
|
+
return true === e4 && (r3 == null ? void 0 : r3(true)), e4;
|
|
29
|
+
} catch (e4) {
|
|
30
|
+
if (e4 instanceof Error) throw e4;
|
|
31
|
+
const t4 = e4;
|
|
32
|
+
return r3 == null ? void 0 : r3(false, t4), Promise.reject(t4);
|
|
33
|
+
}
|
|
34
|
+
}, p2 = (e3, r3) => F(r3) ? j(e3, (e4) => w(r3, e4.prop)) : e3, v2 = s({ ...a(e2), emits: m2, addField: (e3) => {
|
|
35
|
+
e3.prop && n2.push(e3);
|
|
36
|
+
}, removeField: (e3) => {
|
|
37
|
+
e3.prop && n2.splice(n2.indexOf(e3), 1);
|
|
38
|
+
} });
|
|
39
|
+
return o(A, v2), r2({ validate: async (e3) => await u2([], e3), validateField: u2, resetFields: (e3 = []) => {
|
|
40
|
+
P(p2(n2, e3), (e4) => e4.resetField());
|
|
41
|
+
}, clearValidate: (e3 = []) => {
|
|
42
|
+
P(p2(n2, e3), (e4) => e4.clearValidate());
|
|
43
|
+
} }), (e3, r3) => (i(), l("div", J, [d("form", null, [c(e3.$slots, "default", {}, void 0, true)])]));
|
|
44
|
+
} }), [["__scopeId", "data-v-867f78c5"]]), L = { class: "mc-form-item" }, N = { class: "mc-form-item-label-wrapper" }, Q = { key: 0, class: "mc-form-item-label" }, R = { key: 0, class: "mc-form-item-help" }, T = { key: 0, class: "mc-form-item-desc" }, U = { class: "mc-form-item__content" }, W = { key: 0, class: "mc-form-item__error" }, X = C(t({ name: "McFormItem", __name: "mc-form-item", props: { prop: {}, label: {}, disabled: { type: Boolean, default: false }, required: { type: Boolean, default: false }, rules: {}, help: {}, desc: {} }, setup(t2, { expose: q2 }) {
|
|
45
|
+
const P2 = t2, C2 = e(A), z2 = m("init"), G2 = m(""), H2 = (e2) => e2 && P2.prop && !x(M(e2, P2.prop)) ? M(e2, P2.prop) : null, J2 = r(() => {
|
|
46
|
+
const e2 = C2 == null ? void 0 : C2.model;
|
|
47
|
+
return H2(e2);
|
|
48
|
+
}), K2 = r(() => {
|
|
49
|
+
const e2 = [];
|
|
50
|
+
P2.required && e2.push({ required: true }), P2.rules && e2.push(...P2.rules);
|
|
51
|
+
const r2 = C2 == null ? void 0 : C2.rules;
|
|
52
|
+
if (r2 && P2.prop) {
|
|
53
|
+
const t4 = H2(r2);
|
|
54
|
+
t4 && e2.push(...t4);
|
|
55
|
+
}
|
|
56
|
+
const t3 = P2.required;
|
|
57
|
+
if (x(t3)) {
|
|
58
|
+
const r3 = j(k(e2, (e3, r4) => [e3, r4]), (e3) => w($(e3[0]), "required"));
|
|
59
|
+
if (F(r3)) for (const s2 of r3) {
|
|
60
|
+
const [r4, a2] = s2;
|
|
61
|
+
r4.required !== t3 && (e2[a2] = { ...r4, required: t3 });
|
|
62
|
+
}
|
|
63
|
+
else e2.push({ required: t3 });
|
|
64
|
+
}
|
|
65
|
+
return e2;
|
|
66
|
+
}), X2 = r(() => F(K2.value) > 0), Y2 = r(() => I(K2.value, "required") || P2.required), Z2 = r(() => P2.disabled);
|
|
67
|
+
let ee = null, re = false;
|
|
68
|
+
const te = (e2, r2) => {
|
|
69
|
+
if (re || !P2.prop || Z2.value) return Promise.resolve(true);
|
|
70
|
+
if (!X2.value) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
|
|
71
|
+
const t3 = ((e3) => {
|
|
72
|
+
const r3 = K2.value;
|
|
73
|
+
return r3 ? j(r3, (r4) => !r4.trigger || !e3 || (B(r4.trigger) ? w(r4.trigger, e3) : r4.trigger === e3)).map(({ trigger: e4, ...r4 }) => r4) : [];
|
|
74
|
+
})(e2);
|
|
75
|
+
if (!F(t3)) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
|
|
76
|
+
z2.value = "validating";
|
|
77
|
+
const s2 = ((e3) => {
|
|
78
|
+
const r3 = P2.prop;
|
|
79
|
+
return r3 ? new E({ [r3]: e3 }).validate({ [r3]: J2.value }, { firstFields: true }).then(() => (z2.value = "success", C2 == null ? void 0 : C2.emits("validate", P2, true, ""), G2.value = "", true)).catch((e4) => {
|
|
80
|
+
const { errors: r4 } = e4;
|
|
81
|
+
return z2.value = "error", G2.value = r4 && F(r4) > 0 ? r4[0].message ?? "" : "", C2 == null ? void 0 : C2.emits("validate", P2, false, G2.value), Promise.reject(e4);
|
|
82
|
+
}) : null;
|
|
83
|
+
})(t3);
|
|
84
|
+
return s2 ? s2.then(() => (r2 == null ? void 0 : r2(true), true)).catch((e3) => {
|
|
85
|
+
const { fields: t4 } = e3;
|
|
86
|
+
return r2 == null ? void 0 : r2(false, t4), Promise.reject(t4);
|
|
87
|
+
}) : Promise.reject(false);
|
|
88
|
+
}, se = () => {
|
|
89
|
+
const e2 = C2 == null ? void 0 : C2.model;
|
|
90
|
+
e2 && P2.prop && !x(M(e2, P2.prop)) && (re = true, S(e2, P2.prop, V(ee))), g(() => {
|
|
91
|
+
ae();
|
|
92
|
+
});
|
|
93
|
+
}, ae = () => {
|
|
94
|
+
z2.value = "init", G2.value = "", re = false;
|
|
95
|
+
}, oe = s({ ...a(P2), validateStatus: r(() => z2.value), disabled: Z2.value, validate: te, resetField: se, clearValidate: ae });
|
|
96
|
+
return o(D, oe), n(() => {
|
|
97
|
+
P2.prop && (C2 == null ? void 0 : C2.addField(oe), ee = J2.value);
|
|
98
|
+
}), u(() => {
|
|
99
|
+
P2.prop && (C2 == null ? void 0 : C2.removeField(oe));
|
|
100
|
+
}), q2({ validateMessage: G2, validateStatus: z2, validate: te, resetField: se, clearValidate: ae }), (e2, r2) => (i(), l("div", L, [c(e2.$slots, "label", { required: Y2.value }, () => [d("div", N, [e2.label ? (i(), l("label", Q, [d("span", { class: f(["mc-form-item-lable-text", { "mc-form-item-label-required": Y2.value }]) }, b(e2.label), 3), e2.help || e2.$slots.help ? (i(), l("div", R, [c(e2.$slots, "help", {}, () => [p(O, { content: e2.help, "icon-size": 20 }, null, 8, ["content"])], true)])) : v("", true)])) : v("", true), c(e2.$slots, "tool", {}, void 0, true)]), e2.desc || e2.$slots.desc ? (i(), l("div", T, [c(e2.$slots, "desc", {}, () => [h(b(e2.desc), 1)], true)])) : v("", true)], true), d("div", U, [c(e2.$slots, "default", {}, void 0, true)]), p(y, { name: "mc-form-item-error" }, { default: _(() => [G2.value ? (i(), l("div", W, b(G2.value), 1)) : v("", true)]), _: 1 })]));
|
|
101
|
+
} }), [["__scopeId", "data-v-ac8f57c1"]]), Y = z(K), Z = z(X);
|
|
102
|
+
export {
|
|
103
|
+
Y as M,
|
|
104
|
+
G as a,
|
|
105
|
+
Z as b,
|
|
106
|
+
H as u
|
|
107
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as o, createElementBlock as c, openBlock as s, normalizeStyle as i, createElementVNode as n, normalizeClass as t } from "vue";
|
|
2
|
-
import { _ as a, w as r } from "./utils-
|
|
2
|
+
import { _ as a, w as r } from "./utils-DVltbcaT.js";
|
|
3
3
|
const m = a(e({ name: "McIcon", __name: "mc-icon", props: { name: {}, size: { default: 24 }, color: {} }, emits: ["click"], setup(e2, { expose: a2, emit: r2 }) {
|
|
4
4
|
const m2 = r2, l2 = o();
|
|
5
5
|
return a2({ ref: l2 }), (e3, o2) => (s(), c("span", { class: "mc-icon", style: i({ fontSize: `${e3.size}px`, width: `${e3.size}px`, height: `${e3.size}px`, color: e3.color }) }, [n("i", { ref_key: "_ref", ref: l2, class: t(["mc-iconfont", `mc-icon--${e3.name}`]), onClick: o2[0] || (o2[0] = (e4) => ((e5) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { inject as e, computed as t, defineComponent as a, ref as u, onMounted as s, watch as l, createElementBlock as n, openBlock as r, normalizeStyle as c, normalizeClass as o, unref as i, createCommentVNode as p, createElementVNode as f, renderSlot as d, createBlock as m, createVNode as v, Fragment as y, nextTick as x, useSlots as h, reactive as _, watchEffect as g, provide as I } from "vue";
|
|
2
|
-
import { M as b } from "./mc-icon-
|
|
3
|
-
import { u as w, a as $ } from "./mc-form-
|
|
4
|
-
import { b as k } from "./hooks-
|
|
5
|
-
import { b as V, l as M, c as S, i as j } from "./vendor-
|
|
6
|
-
import { _ as B, w as R } from "./utils-
|
|
2
|
+
import { M as b } from "./mc-icon-BCR0XCJl.js";
|
|
3
|
+
import { u as w, a as $ } from "./mc-form-GD4rKC6G.js";
|
|
4
|
+
import { b as k } from "./hooks-CaHRdMVi.js";
|
|
5
|
+
import { b as V, l as M, c as S, i as j } from "./vendor-DCLhrjBP.js";
|
|
6
|
+
import { _ as B, w as R } from "./utils-DVltbcaT.js";
|
|
7
7
|
const z = Symbol("InputGroupContext");
|
|
8
8
|
function A(a2 = "input") {
|
|
9
9
|
const u2 = e(z, void 0), s2 = t(() => !!u2 && "prefix" === u2[a2]), l2 = t(() => !!u2 && "suffix" === u2[a2]);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as e, ref as t, watch as o, nextTick as l, createElementBlock as a, createCommentVNode as s, openBlock as i, createBlock as r, Teleport as d, createVNode as f, Transition as u, withCtx as c, normalizeClass as m, createElementVNode as n, renderSlot as v } from "vue";
|
|
2
|
+
import { M as h } from "./mc-overlay-BpXL4npx.js";
|
|
3
|
+
import { M as p } from "./mc-modal-header-0koUQimu.js";
|
|
4
|
+
import { M as g } from "./mc-footer-DQYguol3.js";
|
|
5
|
+
import { c as b, u as x } from "./hooks-CaHRdMVi.js";
|
|
6
|
+
import { _ as y, w as _ } from "./utils-DVltbcaT.js";
|
|
7
|
+
const k = { key: 0, class: "mc-lightbox-container" }, $ = { class: "mc-lightbox-header" }, w = _(y(e({ name: "McLightbox", __name: "mc-lightbox", props: { modelValue: { type: Boolean, default: false }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean, default: true }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" }, hideFooter: { type: Boolean, default: false } }, emits: ["update:modelValue", "close"], setup(e2, { expose: y2, emit: _2 }) {
|
|
8
|
+
const w2 = e2, C = _2, j = t(), B = t(), M = t(), R = t(), V = t(false), H = t(false), z = t(false), F = () => {
|
|
9
|
+
w2.maskClosable && L();
|
|
10
|
+
}, S = () => {
|
|
11
|
+
L();
|
|
12
|
+
}, I = async () => {
|
|
13
|
+
V.value = true, H.value = true, await l(), z.value = true;
|
|
14
|
+
}, L = async () => {
|
|
15
|
+
z.value = false, await l(), H.value = false, await l(), V.value = false, C("close"), C("update:modelValue", false);
|
|
16
|
+
};
|
|
17
|
+
o(() => w2.modelValue, (e3, t2) => {
|
|
18
|
+
!t2 && e3 ? I() : L();
|
|
19
|
+
}, { immediate: true, flush: "post" });
|
|
20
|
+
const q = () => {
|
|
21
|
+
var _a;
|
|
22
|
+
if (!M.value || !B.value) return;
|
|
23
|
+
const e3 = 0.7 * window.innerHeight - 56 - B.value.offsetHeight, t2 = ((_a = R.value) == null ? void 0 : _a.offsetHeight) ?? 40;
|
|
24
|
+
M.value.style.height = `${t2 > e3 ? e3 : t2}px`;
|
|
25
|
+
};
|
|
26
|
+
return b(() => {
|
|
27
|
+
q();
|
|
28
|
+
}), x(B, async ({ height: e3 }) => {
|
|
29
|
+
const t2 = j.value;
|
|
30
|
+
t2 && (t2.style.paddingBottom = `${e3}px`, await l(), q());
|
|
31
|
+
}), y2({ ref: j, open: I, close: L }), (e3, t2) => V.value ? (i(), a("div", k, [(i(), r(d, { to: e3.portCssSelector }, [f(u, { name: "mc-lightbox-overlay" }, { default: c(() => [f(h, { visible: H.value, fixed: e3.fixed, onClick: F }, { default: c(() => [f(u, { name: "mc-lightbox-content" }, { default: c(() => [z.value ? (i(), a("div", { key: 0, class: m(["mc-lightbox", [`mc-lightbox-${e3.size}`]]), ref_key: "lightboxRef", ref: j }, [n("div", $, [v(e3.$slots, "header", {}, () => [f(p, { title: e3.title, onClose: S }, { default: c(() => [v(e3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title"])], true)]), n("div", { class: "mc-lightbox-content-wrapper", ref_key: "wrapperRef", ref: M }, [n("div", { class: "mc-lightbox-content", ref_key: "contentRef", ref: R }, [v(e3.$slots, "default", {}, void 0, true)], 512)], 512), e3.hideFooter ? s("", true) : (i(), a("div", { key: 0, class: "mc-lightbox-footer", ref_key: "footerRef", ref: B }, [v(e3.$slots, "footer", {}, () => [f(g, null, { left: c(() => [v(e3.$slots, "footer-left", {}, void 0, true)]), right: c(() => [v(e3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": c(() => [v(e3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: c(() => [v(e3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)], 512))], 2)) : s("", true)]), _: 3 })]), _: 3 }, 8, ["visible", "fixed"])]), _: 3 })], 8, ["to"]))])) : s("", true);
|
|
32
|
+
} }), [["__scopeId", "data-v-632e7454"]]));
|
|
33
|
+
export {
|
|
34
|
+
w as M
|
|
35
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, w as s } from "./utils-
|
|
1
|
+
import { _ as e, w as s } from "./utils-DVltbcaT.js";
|
|
2
2
|
import { defineComponent as o, ref as n, toRefs as t, useAttrs as a, computed as c, toValue as r, onMounted as l, createBlock as m, openBlock as i, Transition as d, withCtx as u, withDirectives as p, createElementVNode as f, normalizeStyle as g, normalizeClass as _, createCommentVNode as y, toDisplayString as v, vShow as h, render as C, createVNode as w } from "vue";
|
|
3
|
-
import { M as b } from "./mc-icon-
|
|
3
|
+
import { M as b } from "./mc-icon-BCR0XCJl.js";
|
|
4
4
|
const E = { class: "mc-message__content" }, I = { class: "mc-message__title" }, k = e(o({ name: "McMessage", __name: "mc-message", props: { type: { default: "info" }, message: { default: "" }, duration: { default: 3e3 }, showIcon: { type: Boolean, default: true }, closable: { type: Boolean, default: false }, onClose: {} }, emits: ["close"], setup(e2, { expose: s2, emit: o2 }) {
|
|
5
5
|
const C2 = e2, w2 = o2, k2 = n(), x2 = n(true), M2 = t(a()), A2 = c(() => ({ ...r(M2).style })), B2 = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, j2 = () => {
|
|
6
6
|
var _a;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as o, openBlock as s, createVNode as t, withCtx as a, renderSlot as l } from "vue";
|
|
2
|
-
import { M as m } from "./mc-icon-
|
|
3
|
-
import { M as
|
|
4
|
-
import { _ as
|
|
5
|
-
const d = { class: "mc-modal-header" }, n =
|
|
6
|
-
const c2 =
|
|
7
|
-
return (e3,
|
|
2
|
+
import { M as m } from "./mc-icon-BCR0XCJl.js";
|
|
3
|
+
import { M as r } from "./mc-title-C0ioHCBh.js";
|
|
4
|
+
import { _ as i, w as c } from "./utils-DVltbcaT.js";
|
|
5
|
+
const d = { class: "mc-modal-header" }, n = i(e({ name: "McModalHeader", __name: "mc-modal-header", props: { title: {}, showClose: { type: Boolean, default: true } }, emits: ["close"], setup(e2, { emit: i2 }) {
|
|
6
|
+
const c2 = i2;
|
|
7
|
+
return (e3, i3) => (s(), o("div", d, [t(r, { title: e3.title, "show-border": "", height: "100%", class: "mc-modal-header-title" }, { "tool-bar": a(() => [t(m, { name: "Cross", size: 24, class: "mc-modal-header-close-icon", onClick: i3[0] || (i3[0] = (e4) => c2("close")) })]), default: a(() => [l(e3.$slots, "default", {}, void 0, true)]), _: 3 }, 8, ["title"])]));
|
|
8
8
|
} }), [["__scopeId", "data-v-14d8a694"]]), p = c(n);
|
|
9
9
|
export {
|
|
10
10
|
n as M,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as o, createElementBlock as t, createCommentVNode as s, openBlock as i, normalizeStyle as l, renderSlot as a } from "vue";
|
|
2
|
-
import { _ as r } from "./utils-
|
|
2
|
+
import { _ as r } from "./utils-DVltbcaT.js";
|
|
3
3
|
const c = r(e({ name: "McOverlay", __name: "mc-overlay", props: { visible: { type: Boolean }, fixed: { type: Boolean, default: true } }, emits: ["click"], setup(e2, { expose: r2, emit: c2 }) {
|
|
4
4
|
const f = c2, p = o();
|
|
5
5
|
return r2({ ref: p }), (e3, o2) => e3.visible ? (i(), t("div", { key: 0, class: "mc-overlay", ref_key: "_ref", ref: p, onClick: o2[0] || (o2[0] = (e4) => ((e5) => {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as e, ref as o, computed as a, watch as r, onUnmounted as t, watchEffect as s, createElementBlock as l, openBlock as p, mergeProps as i, toHandlers as u, createElementVNode as n, createVNode as c, renderSlot as v, Transition as d, withCtx as m, createCommentVNode as f, createTextVNode as g, toDisplayString as h } from "vue";
|
|
2
|
+
import { createPopper as w } from "@popperjs/core";
|
|
3
|
+
import { d as k } from "./hooks-CaHRdMVi.js";
|
|
4
|
+
import { n as _, o as y, c as b } from "./vendor-DCLhrjBP.js";
|
|
5
|
+
import { _ as N, w as j } from "./utils-DVltbcaT.js";
|
|
6
|
+
const T = { key: 0, id: "arrow", class: "mc-popper-arrow", "data-popper-arrow": "" }, x = N(e({ name: "McPopper", __name: "mc-popper", props: { content: {}, trigger: { default: "hover" }, placement: { default: "top" }, disabled: { type: Boolean }, popperOptions: {}, showTimeout: { default: 0 }, hideTimeout: { default: 300 }, transitionName: { default: "fade" }, showArrow: { type: Boolean, default: true } }, emits: ["visible:change", "click:outside"], setup(e2, { expose: N2, emit: j2 }) {
|
|
7
|
+
const x2 = e2, A2 = j2, B = o({}), M = o({}), O = o({}), $ = o(), I = o(), P = o(), q = o(false), z = (e3) => {
|
|
8
|
+
x2.disabled && (e3 = false), q.value = e3, A2("visible:change", e3);
|
|
9
|
+
}, C = a(() => ({ placement: x2.placement, modifiers: [{ name: "offset", options: { offset: [0, 8] } }], ...x2.popperOptions }));
|
|
10
|
+
let D, E, F;
|
|
11
|
+
r(q, (e3) => {
|
|
12
|
+
e3 && I.value && P.value && (D = w(I.value, P.value, C.value));
|
|
13
|
+
}, { flush: "post" }), t(() => {
|
|
14
|
+
b(D) || (D.destroy(), D = void 0);
|
|
15
|
+
});
|
|
16
|
+
const G = a(() => "hover" === x2.trigger ? x2.showTimeout : 0), H = a(() => "hover" === x2.trigger ? x2.hideTimeout : 0);
|
|
17
|
+
s(() => {
|
|
18
|
+
B.value = {}, M.value = {}, O.value = {}, x2.disabled ? K(false) : "click" === x2.trigger ? B.value.click = () => {
|
|
19
|
+
q.value ? K() : J();
|
|
20
|
+
} : "hover" === x2.trigger && (B.value.mouseenter = () => J(), M.value.mouseleave = () => K(), O.value.mouseenter = () => J()), E = _(y(z, null, true), G.value), F = _(y(z, null, false), H.value);
|
|
21
|
+
});
|
|
22
|
+
const J = (e3 = true) => {
|
|
23
|
+
F == null ? void 0 : F.cancel(), e3 ? E == null ? void 0 : E() : z(false);
|
|
24
|
+
}, K = (e3 = true) => {
|
|
25
|
+
E == null ? void 0 : E.cancel(), e3 ? F == null ? void 0 : F() : z(false);
|
|
26
|
+
};
|
|
27
|
+
return k($, () => {
|
|
28
|
+
A2("click:outside"), "hover" !== x2.trigger && q.value && K(false);
|
|
29
|
+
}), N2({ show: () => J(false), hide: () => K(false) }), (e3, o2) => (p(), l("div", i({ class: "mc-popper", ref_key: "containerNode", ref: $ }, u(M.value, true)), [n("div", i({ class: "mc-popper-trigger", ref_key: "triggerNode", ref: I }, u(B.value, true)), [v(e3.$slots, "default", {}, void 0, true)], 16), c(d, { name: e3.transitionName }, { default: m(() => [q.value ? (p(), l("div", i({ key: 0, class: "mc-popper-popper", ref_key: "popperNode", ref: P }, u(O.value, true)), [v(e3.$slots, "content", {}, () => [g(h(e3.content), 1)], true), e3.showArrow ? (p(), l("div", T)) : f("", true)], 16)) : f("", true)]), _: 3 }, 8, ["name"])], 16));
|
|
30
|
+
} }), [["__scopeId", "data-v-fee1e222"]]), A = j(x);
|
|
31
|
+
export {
|
|
32
|
+
A as M,
|
|
33
|
+
x as _
|
|
34
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as a, provide as e, computed as l, createElementBlock as d, openBlock as s, renderSlot as o, inject as r, normalizeClass as i, createElementVNode as c, createTextVNode as m, toDisplayString as t } from "vue";
|
|
2
|
-
import { _ as u, w as n } from "./utils-
|
|
2
|
+
import { _ as u, w as n } from "./utils-DVltbcaT.js";
|
|
3
3
|
const p = Symbol("selectContext"), b = { class: "mc-radio-group" }, v = u(a({ name: "McRadioGroup", __name: "mc-radio-group", props: { modelValue: {}, disabled: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(a2, { emit: r2 }) {
|
|
4
4
|
const i2 = a2, c2 = r2;
|
|
5
5
|
return e(p, { modelValue: l(() => i2.modelValue), disabled: l(() => i2.disabled), handleSelect: (a3) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as s, openBlock as t, createVNode as r, createElementVNode as a, normalizeClass as o } from "vue";
|
|
2
|
-
import { M as m } from "./mc-icon-
|
|
3
|
-
import { _ as c, w as n } from "./utils-
|
|
2
|
+
import { M as m } from "./mc-icon-BCR0XCJl.js";
|
|
3
|
+
import { _ as c, w as n } from "./utils-DVltbcaT.js";
|
|
4
4
|
const i = c(e({ name: "mc-reset", __name: "mc-reset", props: { rotate: { type: Boolean, default: false } }, emits: ["reset"], setup(e2, { emit: c2 }) {
|
|
5
5
|
const n2 = c2, i2 = () => {
|
|
6
6
|
n2("reset");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as e, ref as l, computed as a, watch as t, provide as s, createElementBlock as c, openBlock as o, normalizeStyle as u, normalizeClass as i, unref as d, createElementVNode as r, createVNode as v, createCommentVNode as n, createBlock as p, resolveDynamicComponent as m, withDirectives as h, vModelText as f, Transition as _, withCtx as g, renderSlot as w, createTextVNode as y, vShow as b, inject as k, useSlots as x, onMounted as S, onBeforeUnmount as V, h as O, toDisplayString as j, toRefs as B, useAttrs as C, toValue as I } from "vue";
|
|
2
|
-
import { M } from "./mc-icon-
|
|
3
|
-
import { b as $,
|
|
4
|
-
import { u as F, a as N } from "./mc-form-
|
|
5
|
-
import { u as G } from "./mc-input-
|
|
6
|
-
import { c as P,
|
|
7
|
-
import { _ as A, w as D } from "./utils-
|
|
2
|
+
import { M } from "./mc-icon-BCR0XCJl.js";
|
|
3
|
+
import { b as $, d as R } from "./hooks-CaHRdMVi.js";
|
|
4
|
+
import { u as F, a as N } from "./mc-form-GD4rKC6G.js";
|
|
5
|
+
import { u as G } from "./mc-input-CgkXcWFb.js";
|
|
6
|
+
import { c as P, p as z } from "./vendor-DCLhrjBP.js";
|
|
7
|
+
import { _ as A, w as D } from "./utils-DVltbcaT.js";
|
|
8
8
|
const T = Symbol("selectContext"), U = Symbol("selectGroupContext"), q = { key: 0, class: "mc-select-selected-content" }, E = { class: "mc-select-input-wrapper" }, H = ["placeholder", "readonly", "disabled"], J = { class: "mc-select-dropdown-wrapper" }, K = { class: "mc-select-dropdown" }, L = { key: 0, class: "mc-select-no-data" }, Q = A(e({ name: "McSelect", __name: "mc-select", props: { modelValue: { default: "" }, placeholder: { default: "Please select" }, disabled: { type: Boolean }, type: { default: "single" }, width: {}, height: {}, search: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: k2 }) {
|
|
9
9
|
const x2 = e2, S2 = k2, V2 = l(), O2 = F(), j2 = l([]), B2 = a(() => P(ce.value) ? j2.value : j2.value.filter((e3) => z(e3.label ?? e3.value).includes(z(ce.value)))), { wrapperRef: C2, isFocused: I2, handleFocus: A2, handleBlur: D2 } = $(V2, { afterBlur() {
|
|
10
10
|
Z2 == null ? void 0 : Z2.validate("blur");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e, computed as s, watch as t, nextTick as c, ref as l, onMounted as n, createElementBlock as a, openBlock as m, normalizeClass as i, createElementVNode as o, Fragment as u, renderList as r, createBlock as p, toDisplayString as d, createCommentVNode as v, Transition as f, withCtx as y, resolveDynamicComponent as g } from "vue";
|
|
2
|
-
import { _ as k } from "./mc-success-icon-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { _ as R, w as S } from "./utils-
|
|
6
|
-
const x = { class: "mc-step-number-container" },
|
|
2
|
+
import { _ as k } from "./mc-success-icon-BBBRzpqR.js";
|
|
3
|
+
import { c as h } from "./hooks-CaHRdMVi.js";
|
|
4
|
+
import { q as _, t as b } from "./vendor-DCLhrjBP.js";
|
|
5
|
+
import { _ as R, w as S } from "./utils-DVltbcaT.js";
|
|
6
|
+
const x = { class: "mc-step-number-container" }, q = { class: "mc-step-item-number" }, B = { key: 0, class: "mc-step-item-number-text" }, C = { class: "mc-step-item-content" }, V = { class: "mc-step-item-label" }, j = { class: "mc-step-item-desc" }, w = { key: 0, class: "mc-step-item-component" }, Y = S(R(e({ name: "McStep", __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: R2, emit: S2 }) {
|
|
7
7
|
const Y2 = e2, $ = s(() => "vertical" === Y2.type), A = S2;
|
|
8
8
|
t(() => Y2.modelValue, async (e3) => {
|
|
9
9
|
var _a;
|
|
@@ -40,7 +40,7 @@ const x = { class: "mc-step-number-container" }, B = { class: "mc-step-item-numb
|
|
|
40
40
|
$.value ? F() : H();
|
|
41
41
|
}), h(b(() => {
|
|
42
42
|
$.value ? F() : (G(), H());
|
|
43
|
-
}, 50)), R2({ ref: L, setSuccessStep: D }), (e3, s2) => (m(), a("div", { class: i(["mc-step", `mc-step-${e3.type}`]), ref_key: "_ref", ref: L }, [(m(true), a(u, null, r(e3.steps, (s3, t2) => (m(), a("div", { class: i(["mc-step-item", { "mc-step-item-active": e3.modelValue === s3.key, "mc-step-item-disabled": s3.disabled, "mc-step-item-success": t2 <= E.value }]), key: s3.key }, [o("div", x, [o("div",
|
|
43
|
+
}, 50)), R2({ ref: L, setSuccessStep: D }), (e3, s2) => (m(), a("div", { class: i(["mc-step", `mc-step-${e3.type}`]), ref_key: "_ref", ref: L }, [(m(true), a(u, null, r(e3.steps, (s3, t2) => (m(), a("div", { class: i(["mc-step-item", { "mc-step-item-active": e3.modelValue === s3.key, "mc-step-item-disabled": s3.disabled, "mc-step-item-success": t2 <= E.value }]), key: s3.key }, [o("div", x, [o("div", q, [t2 > E.value || s3.disabled ? (m(), a("span", B, d(t2 + 1), 1)) : (m(), p(k, { key: 1 }))])]), o("div", C, [o("h3", V, d(s3.label), 1), o("p", j, d(s3.desc), 1), $.value ? (m(), p(f, { key: 0, name: "mc-step-item-component" }, { default: y(() => [s3.component && s3.key === e3.modelValue ? (m(), a("div", w, [(m(), p(g(s3.component)))])) : v("", true)]), _: 2 }, 1024)) : v("", true)])], 2))), 128)), o("div", { ref_key: "unsuccessLineRef", ref: M, class: "mc-step-line mc-step-unsuccess-line" }, [o("div", { ref_key: "successLineRef", ref: X, class: "mc-step-success-line" }, null, 512)], 512)], 2));
|
|
44
44
|
} }), [["__scopeId", "data-v-a540c596"]]));
|
|
45
45
|
export {
|
|
46
46
|
Y as M
|