mc-plus 1.0.12 → 1.0.13

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.
Files changed (62) hide show
  1. package/dist/es/hooks-CxnUJS3d.js +40 -0
  2. package/dist/es/index.js +40 -36
  3. package/dist/es/mc-alert-s4KpYECJ.js +12 -0
  4. package/dist/es/mc-button-BS19BIJW.js +13 -0
  5. package/dist/es/{mc-checkbox-BWUgO6bZ.js → mc-checkbox-DVNDqYj9.js} +4 -4
  6. package/dist/es/{mc-collapse-DOKvMtGg.js → mc-collapse-Po9aR_ne.js} +7 -7
  7. package/dist/es/mc-form-OFkkUeNw.js +106 -0
  8. package/dist/es/{mc-icon-Cmyyx9F-.js → mc-icon-BeM-PhUM.js} +4 -4
  9. package/dist/es/mc-input-D6rFMciN.js +67 -0
  10. package/dist/es/mc-light-box-BOFSLPYP.js +51 -0
  11. package/dist/es/{mc-message-B8vtpZAN.js → mc-message-CzKjhY9t.js} +20 -20
  12. package/dist/es/{mc-radio-CmmnhLCx.js → mc-radio-BqtGdBKj.js} +9 -9
  13. package/dist/es/{mc-select-CCVcLtsG.js → mc-select-zjg-qgVl.js} +21 -21
  14. package/dist/es/{mc-switch-DWDHwuyZ.js → mc-switch-CeO7jQm6.js} +2 -2
  15. package/dist/es/{mc-table-fNqD3Whw.js → mc-table-iUl1p5fd.js} +19 -19
  16. package/dist/es/{mc-tag-DSeAsPjz.js → mc-tag-NIAZfHeJ.js} +12 -12
  17. package/dist/es/{mc-toast-DoPW1V2v.js → mc-toast-CLs2RBL9.js} +18 -18
  18. package/dist/es/{mc-tooltip-DE2U3jQN.js → mc-tooltip-CnA9TYJE.js} +6 -6
  19. package/dist/es/theme/mc-alert.css +1 -1
  20. package/dist/es/theme/mc-button.css +1 -1
  21. package/dist/es/theme/mc-checkbox.css +1 -1
  22. package/dist/es/theme/mc-form.css +1 -1
  23. package/dist/es/theme/mc-icon.css +1 -1
  24. package/dist/es/theme/mc-input.css +1 -1
  25. package/dist/es/theme/mc-light-box.css +1 -0
  26. package/dist/es/theme/mc-message.css +1 -1
  27. package/dist/es/theme/mc-radio.css +1 -1
  28. package/dist/es/theme/mc-select.css +1 -1
  29. package/dist/es/theme/mc-switch.css +1 -1
  30. package/dist/es/theme/mc-table.css +1 -1
  31. package/dist/es/theme/mc-tag.css +1 -1
  32. package/dist/es/theme/mc-toast.css +1 -1
  33. package/dist/es/theme/mc-tooltip.css +1 -1
  34. package/dist/es/{utils-DVTEJanV.js → utils-ylUc-vYY.js} +1 -1
  35. package/dist/es/{vendor-D_cfYEhW.js → vendor-Cxzr_0t9.js} +34 -33
  36. package/dist/index.css +1 -1
  37. package/dist/types/components/index.d.ts +5 -2
  38. package/dist/types/components/mc-checkbox/index.d.ts +5 -5
  39. package/dist/types/components/mc-collapse/index.d.ts +5 -5
  40. package/dist/types/components/mc-form/types.d.ts +1 -1
  41. package/dist/types/components/mc-input/formatter/currency.d.ts +2 -0
  42. package/dist/types/components/mc-input/formatter/index.d.ts +2 -0
  43. package/dist/types/components/mc-input/formatter/number.d.ts +2 -0
  44. package/dist/types/components/mc-input/index.d.ts +8 -8
  45. package/dist/types/components/mc-input/types.d.ts +9 -1
  46. package/dist/types/components/mc-light-box/index.d.ts +79 -0
  47. package/dist/types/components/mc-light-box/lightbox.d.ts +7 -0
  48. package/dist/types/components/mc-light-box/types.d.ts +21 -0
  49. package/dist/types/components/mc-message/index.d.ts +3 -3
  50. package/dist/types/components/mc-radio/index.d.ts +5 -5
  51. package/dist/types/components/mc-select/index.d.ts +5 -5
  52. package/dist/types/components/mc-toast/index.d.ts +6 -6
  53. package/dist/umd/index.css +1 -1
  54. package/dist/umd/index.css.gz +0 -0
  55. package/dist/umd/index.umd.cjs +11 -11
  56. package/dist/umd/index.umd.cjs.gz +0 -0
  57. package/package.json +53 -53
  58. package/dist/es/hooks-2H5zMKHN.js +0 -40
  59. package/dist/es/mc-alert-DoMONzTI.js +0 -12
  60. package/dist/es/mc-button-S7lHmoiV.js +0 -13
  61. package/dist/es/mc-form-BURh4ojx.js +0 -105
  62. package/dist/es/mc-input-B6ijOmWa.js +0 -44
@@ -0,0 +1,40 @@
1
+ import { getCurrentInstance as e, computed as r, isRef as t, watch as n, onMounted as o, onBeforeUnmount as a, unref as u, ref as s } from "vue";
2
+ import { i } from "./vendor-Cxzr_0t9.js";
3
+ function c(t2) {
4
+ const n2 = e();
5
+ if (!n2) throw new Error("useProp must be used within a component");
6
+ return r(() => {
7
+ var _a, _b;
8
+ return (_b = (_a = n2 == null ? void 0 : n2.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[t2];
9
+ });
10
+ }
11
+ function l(e2, r2, s2) {
12
+ t(e2) ? n(e2, (e3, t2) => {
13
+ t2 == null ? void 0 : t2.removeEventListener(r2, s2), e3 == null ? void 0 : e3.addEventListener(r2, s2);
14
+ }) : o(() => e2 == null ? void 0 : e2.addEventListener(r2, s2)), a(() => {
15
+ var _a;
16
+ return (_a = u(e2)) == null ? void 0 : _a.removeEventListener(r2, s2);
17
+ });
18
+ }
19
+ function v(e2, r2) {
20
+ l(document, "click", (t2) => {
21
+ e2.value && t2.target && (e2.value.contains(t2.target) || r2(t2));
22
+ });
23
+ }
24
+ function f(r2, { afterFocus: t2, beforeBlur: n2, afterBlur: o2 } = {}) {
25
+ const a2 = e(), { emit: u2 } = a2, c2 = s(), v2 = s(false);
26
+ return l(c2, "click", () => {
27
+ var _a;
28
+ (_a = r2.value) == null ? void 0 : _a.focus();
29
+ }), { wrapperRef: c2, isFocused: v2, handleFocus: (e2) => {
30
+ v2.value || (v2.value = true, u2("focus", e2), t2 == null ? void 0 : t2());
31
+ }, handleBlur: (e2) => {
32
+ var _a;
33
+ i(n2) && n2(e2) || e2.relatedTarget && ((_a = c2.value) == null ? void 0 : _a.contains(e2.relatedTarget)) || (v2.value = false, u2("blur", e2), o2 == null ? void 0 : o2());
34
+ } };
35
+ }
36
+ export {
37
+ f as a,
38
+ v as b,
39
+ c as u
40
+ };
package/dist/es/index.js CHANGED
@@ -1,48 +1,52 @@
1
- import { p as s, m as o } from "./utils-DVTEJanV.js";
2
- import { M } from "./mc-alert-DoMONzTI.js";
3
- import { M as m } from "./mc-button-S7lHmoiV.js";
4
- import { M as r } from "./mc-collapse-DOKvMtGg.js";
5
- import { a } from "./mc-collapse-DOKvMtGg.js";
6
- import { M as M2, a as a2 } from "./mc-message-B8vtpZAN.js";
7
- import { M as p, a as i } from "./mc-radio-CmmnhLCx.js";
8
- import { M as f, a as l, b as j } from "./mc-select-CCVcLtsG.js";
9
- import { M as n } from "./mc-switch-DWDHwuyZ.js";
1
+ import { p as s, m as o } from "./utils-ylUc-vYY.js";
2
+ import { M } from "./mc-alert-s4KpYECJ.js";
3
+ import { M as m } from "./mc-button-BS19BIJW.js";
4
+ import { M as r } from "./mc-checkbox-DVNDqYj9.js";
5
+ import { M as i } from "./mc-collapse-Po9aR_ne.js";
6
+ import { a } from "./mc-collapse-Po9aR_ne.js";
7
+ import { a as p } from "./mc-icon-BeM-PhUM.js";
8
+ import { M as f } from "./mc-input-D6rFMciN.js";
9
+ import { M as M2, c, l } from "./mc-light-box-BOFSLPYP.js";
10
+ import { M as M3, a as a2 } from "./mc-message-CzKjhY9t.js";
11
+ import { M as j, a as x } from "./mc-radio-BqtGdBKj.js";
12
+ import { M as g, a as n, b as h } from "./mc-select-zjg-qgVl.js";
13
+ import { M as T } from "./mc-switch-CeO7jQm6.js";
10
14
  import "vue";
11
- import { M as g } from "./mc-checkbox-BWUgO6bZ.js";
12
- import { M as M3, u, a as a3, b } from "./mc-table-fNqD3Whw.js";
13
- import { M as x } from "./mc-icon-Cmyyx9F-.js";
14
- import { M as M4 } from "./mc-tag-DSeAsPjz.js";
15
- import { M as M5, c, t, e, a as a4, b as b2, d } from "./mc-toast-DoPW1V2v.js";
16
- import { M as T } from "./mc-tooltip-DE2U3jQN.js";
17
- import { M as h, b as S } from "./mc-form-BURh4ojx.js";
18
- import { M as P } from "./mc-input-B6ijOmWa.js";
19
- const k = [m, r, T, n, p, i, f, l, j, g, h, S, P, x];
15
+ import { M as M4, u, a as a3, b } from "./mc-table-iUl1p5fd.js";
16
+ import { M as M5 } from "./mc-tag-NIAZfHeJ.js";
17
+ import { M as M6, c as c2, t, e, a as a4, b as b2, d } from "./mc-toast-CLs2RBL9.js";
18
+ import { M as S } from "./mc-tooltip-CnA9TYJE.js";
19
+ import { M as L, b as P } from "./mc-form-OFkkUeNw.js";
20
+ const k = [m, i, S, T, j, x, g, n, h, r, L, P, f, p];
20
21
  s();
21
22
  const v = o(k);
22
23
  export {
23
24
  M as McAlert,
24
25
  m as McButton,
25
- g as McCheckbox,
26
- r as McCollapse,
26
+ r as McCheckbox,
27
+ i as McCollapse,
27
28
  a as McCollapseItem,
28
- h as McForm,
29
- S as McFormItem,
30
- x as McIcon,
31
- P as McInput,
32
- M2 as McMessage,
33
- p as McRadio,
34
- i as McRadioGroup,
35
- f as McSelect,
36
- l as McSelectGroup,
37
- j as McSelectOption,
38
- n as McSwitch,
39
- M3 as McTable,
40
- M4 as McTag,
41
- M5 as McToast,
42
- T as McTooltip,
29
+ L as McForm,
30
+ P as McFormItem,
31
+ p as McIcon,
32
+ f as McInput,
33
+ M2 as McLightBox,
34
+ M3 as McMessage,
35
+ j as McRadio,
36
+ x as McRadioGroup,
37
+ g as McSelect,
38
+ n as McSelectGroup,
39
+ h as McSelectOption,
40
+ T as McSwitch,
41
+ M4 as McTable,
42
+ M5 as McTag,
43
+ M6 as McToast,
44
+ S as McTooltip,
43
45
  a2 as Message,
44
- c as createToast,
46
+ c as createLightbox,
47
+ c2 as createToast,
45
48
  v as default,
49
+ l as lightbox,
46
50
  t as toast,
47
51
  e as toastError,
48
52
  a4 as toastPrimary,
@@ -0,0 +1,12 @@
1
+ import { _ as e, w as t } from "./utils-ylUc-vYY.js";
2
+ import { defineComponent as s, ref as l, useAttrs as c, computed as i, createElementBlock as o, createCommentVNode as a, openBlock as r, normalizeClass as n, normalizeStyle as d, createElementVNode as _, createBlock as m, renderSlot as p, toDisplayString as y } from "vue";
3
+ import { M as f } from "./mc-icon-BeM-PhUM.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: true }, showIcon: { type: Boolean, default: true }, height: {}, width: {} }, emits: ["close"], setup(e2, { expose: t2, emit: s2 }) {
5
+ const I2 = e2, b = s2, M = l(), $ = 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
+ $.value = false, b("close", e3);
7
+ };
8
+ return t2({ ref: M }), (e3, t3) => $.value ? (r(), o("div", { key: 0, ref_key: "_ref", ref: M, style: d(x.value), class: n(["mc-alert", [`mc-alert--${e3.type}`]]) }, [_("div", v, [_("div", h, [_("div", u, [e3.showIcon ? (r(), m(f, { key: 0, name: z[e3.type], size: 24, class: "mc-alert__icon" }, null, 8, ["name"])) : a("", true), e3.title ? (r(), o("div", k, y(e3.title), 1)) : p(e3.$slots, "title", { key: 2 }, void 0, true)]), e3.closable ? (r(), m(f, { key: 0, name: "Cross", size: 24, class: "mc-alert__close", onClick: A })) : a("", true)]), e3.description ? (r(), o("div", w, y(e3.description), 1)) : (r(), o("div", g, [p(e3.$slots, "description", {}, void 0, true)]))])], 6)) : a("", true);
9
+ } }), [["__scopeId", "data-v-d14a1bed"]]));
10
+ export {
11
+ I as M
12
+ };
@@ -0,0 +1,13 @@
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, renderSlot as p, createVNode as f } from "vue";
2
+ import { M as v } from "./mc-icon-BeM-PhUM.js";
3
+ import { t as y } from "./vendor-Cxzr_0t9.js";
4
+ import { _ as h, w as b } from "./utils-ylUc-vYY.js";
5
+ const g = ["type", "disabled"], k = { key: 1, class: "loading-icon" }, I = b(h(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: h2, emit: b2 }) {
6
+ const I2 = e2, { loading: _, disabled: w, throttleDuration: B, height: T, width: j } = t(I2), z = b2, M = o(), $ = t(a()), x = i(() => ({ ...l($).style, width: j.value ? j.value : void 0, height: T.value ? T.value : void 0 })), D = (e3) => {
7
+ _.value || w.value || z("click", e3);
8
+ }, C = y(D, B.value, { trailing: false });
9
+ return h2({ ref: M }), (e3, t2) => (s(), n("button", { ref_key: "_ref", ref: M, style: r(x.value), class: u(["mc-button", { [`mc-button--${e3.type}`]: e3.type, [`mc-button--${e3.size}`]: e3.size, "is-loading": d(_), "is-disabled": d(w) }]), type: e3.nativeType, disabled: !(!d(w) && !d(_)) || void 0, onClick: t2[0] || (t2[0] = (t3) => e3.useThrottle ? d(C)(t3) : D(t3)) }, [e3.leftIcon && !d(_) ? (s(), c(v, { key: 0, name: e3.leftIcon }, null, 8, ["name"])) : m("", true), d(_) && !d(w) ? (s(), n("span", k, [f(v, { name: "Loading" })])) : m("", true), p(e3.$slots, "default", {}, void 0, true), e3.rightIcon ? (s(), c(v, { key: 2, name: e3.rightIcon }, null, 8, ["name"])) : m("", true)], 14, g));
10
+ } }), [["__scopeId", "data-v-25ba9053"]]));
11
+ export {
12
+ I as M
13
+ };
@@ -1,11 +1,11 @@
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-DVTEJanV.js";
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 }) {
2
+ import { _ as m, w as d } from "./utils-ylUc-vYY.js";
3
+ const n = ["value", "disabled"], p = { class: "mc-checkbox__wrapper" }, b = { 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));
6
6
  };
7
- return (e3, m3) => (a(), c("div", { class: o(["mc-checkbox", { "mc-checkbox--disabled": e3.disabled }]), style: l({ height: e3.remarks ? "40px" : "24px" }) }, [s("input", { type: "checkbox", class: "mc-checkbox__input", value: e3.modelValue, disabled: e3.disabled }, null, 8, n), s("label", b, [s("span", { class: o(["mc-checkbox__checkbox", { "mc-checkbox__checkbox--checked": e3.modelValue, "mc-checkbox__checkbox--partial": e3.partial }]), onClick: r }, null, 2), s("div", p, [s("span", k, t(e3.content), 1), s("span", h, t(e3.remarks), 1)])])], 6));
8
- } }), [["__scopeId", "data-v-edb5c81c"]]));
7
+ return (e3, m3) => (a(), c("div", { class: o(["mc-checkbox", { "mc-checkbox--disabled": e3.disabled }]), style: l({ height: e3.remarks ? "40px" : "24px" }) }, [s("input", { type: "checkbox", class: "mc-checkbox__input", value: e3.modelValue, disabled: e3.disabled }, null, 8, n), s("label", p, [s("span", { class: o(["mc-checkbox__checkbox", { "mc-checkbox__checkbox--checked": e3.modelValue, "mc-checkbox__checkbox--partial": e3.partial }]), onClick: r }, null, 2), s("div", b, [s("span", k, t(e3.content), 1), s("span", h, t(e3.remarks), 1)])])], 6));
8
+ } }), [["__scopeId", "data-v-53f256a7"]]));
9
9
  export {
10
10
  i as M
11
11
  };
@@ -1,7 +1,7 @@
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-DVTEJanV.js";
3
- import { _ as b } from "./mc-icon-Cmyyx9F-.js";
4
- const g = Symbol("COLLAPSE_CONTEXT"), I = "McCollapse", k = { class: "mc-collapse" }, w = C(e({ name: I, __name: "mc-collapse", props: { modelValue: {}, accordion: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: m2 }) {
2
+ import { d as f, _ as C, w as V } from "./utils-ylUc-vYY.js";
3
+ import { M as b } from "./mc-icon-BeM-PhUM.js";
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(() => {
7
7
  e2.accordion && e2.modelValue.length > 1 && f(I, "accordion is true, modelValue should be a single value.");
@@ -16,16 +16,16 @@ const g = Symbol("COLLAPSE_CONTEXT"), I = "McCollapse", k = { class: "mc-collaps
16
16
  const e3 = l2.indexOf(a2);
17
17
  e3 > -1 ? l2.splice(e3, 1) : l2.push(a2), p2(l2);
18
18
  }
19
- } }), (e3, a2) => (t(), c("div", k, [i(e3.$slots, "default", {}, void 0, true)]));
20
- } }), [["__scopeId", "data-v-bd243735"]]), y = { class: "mc-collapse-item-header" }, M = { class: "mc-collapse-item-title" }, N = { class: "triangle-icon" }, O = { class: "mc-collapse-item-wapper" }, $ = { class: "mc-collapse-item-content" }, j = C(e({ name: "McCollapseItem", __name: "mc-collapse-item", props: { name: {}, title: {}, disabled: { type: Boolean } }, setup(e2) {
19
+ } }), (e3, a2) => (t(), c("div", M, [i(e3.$slots, "default", {}, void 0, true)]));
20
+ } }), [["__scopeId", "data-v-bd243735"]]), w = { class: "mc-collapse-item-header" }, y = { class: "mc-collapse-item-title" }, N = { class: "triangle-icon" }, O = { class: "mc-collapse-item-wapper" }, $ = { class: "mc-collapse-item-content" }, j = C(e({ name: "McCollapseItem", __name: "mc-collapse-item", props: { name: {}, title: {}, disabled: { type: Boolean } }, setup(e2) {
21
21
  const a2 = m(g, void 0), l2 = d(() => {
22
22
  var _a;
23
23
  return (_a = a2 == null ? void 0 : a2.activeNames.value) == null ? void 0 : _a.includes(e2.name);
24
24
  }), s2 = () => {
25
25
  e2.disabled || (a2 == null ? void 0 : a2.handleItemClick(e2.name));
26
26
  };
27
- return (e3, a3) => (t(), c("div", { class: n(["mc-collapse-item", { "mc-collapse-item--active": l2.value }]), onClick: s2 }, [p("div", y, [p("span", M, [i(e3.$slots, "title", {}, () => [r(v(e3.title), 1)], true)]), p("span", N, [_(b, { name: "Down-Chevron" })])]), u(p("div", O, [p("div", $, [i(e3.$slots, "default", {}, void 0, true)])], 512), [[h, l2.value]])], 2));
28
- } }), [["__scopeId", "data-v-8937850f"]]), x = V(w), B = V(j);
27
+ return (e3, a3) => (t(), c("div", { class: n(["mc-collapse-item", { "mc-collapse-item--active": l2.value }]), onClick: s2 }, [p("div", w, [p("span", y, [i(e3.$slots, "title", {}, () => [r(v(e3.title), 1)], true)]), p("span", N, [_(b, { name: "Down-Chevron" })])]), u(p("div", O, [p("div", $, [i(e3.$slots, "default", {}, void 0, true)])], 512), [[h, l2.value]])], 2));
28
+ } }), [["__scopeId", "data-v-8937850f"]]), x = V(k), B = V(j);
29
29
  export {
30
30
  x as M,
31
31
  B as a
@@ -0,0 +1,106 @@
1
+ import { inject as e, computed as r, defineComponent as a, reactive as t, toRefs as s, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as u, ref as n, onMounted as c, onUnmounted as m, createCommentVNode as p, createVNode as v, normalizeClass as f, toDisplayString as _, Transition as b, withCtx as g, nextTick as h } from "vue";
2
+ import { u as y } from "./hooks-CxnUJS3d.js";
3
+ import { s as F, f as j, a as q, k as P, b as w, c as x, m as I, d as k, g as M, e as S, h as V, j as B } from "./vendor-Cxzr_0t9.js";
4
+ import { _ as C, w as $ } from "./utils-ylUc-vYY.js";
5
+ import E from "async-validator";
6
+ const O = Symbol("formContext"), z = Symbol("formItemContext");
7
+ function A() {
8
+ return { form: e(O, void 0), formItem: e(z, void 0) };
9
+ }
10
+ function D() {
11
+ const a2 = e(O, void 0), t2 = e(z, void 0), s2 = y("disabled");
12
+ return r(() => s2.value || (a2 == null ? void 0 : a2.disabled) || (t2 == null ? void 0 : t2.disabled));
13
+ }
14
+ const G = { class: "mc-form" }, H = C(a({ name: "McForm", __name: "mc-form", props: { model: {}, rules: { default: () => ({}) }, disabled: { type: Boolean } }, emits: ["validate"], setup(e2, { expose: r2, emit: a2 }) {
15
+ const n2 = a2, c2 = [], m2 = async (e3 = [], r3) => {
16
+ const a3 = F(e3) ? j(c2, (r4) => w(e3, r4.prop)) : c2;
17
+ try {
18
+ const e4 = await (async (e5 = []) => {
19
+ let r4 = {};
20
+ for (const a4 of e5) try {
21
+ await a4.validate();
22
+ } catch (e6) {
23
+ r4 = { ...r4, ...e6 };
24
+ }
25
+ return !F(P(r4)) || Promise.reject(r4);
26
+ })(a3);
27
+ return true === e4 && (r3 == null ? void 0 : r3(true)), e4;
28
+ } catch (e4) {
29
+ if (e4 instanceof Error) throw e4;
30
+ const a4 = e4;
31
+ return r3 == null ? void 0 : r3(false, a4), Promise.reject(a4);
32
+ }
33
+ }, p2 = (e3, r3) => F(r3) ? j(e3, (e4) => w(r3, e4.prop)) : e3, v2 = t({ ...s(e2), emits: n2, addField: (e3) => {
34
+ e3.prop && c2.push(e3);
35
+ }, removeField: (e3) => {
36
+ e3.prop && c2.splice(c2.indexOf(e3), 1);
37
+ } });
38
+ return o(O, v2), r2({ validate: async (e3) => await m2([], e3), validateField: m2, resetFields: (e3 = []) => {
39
+ q(p2(c2, e3), (e4) => e4.resetField());
40
+ }, clearValidate: (e3 = []) => {
41
+ q(p2(c2, e3), (e4) => e4.clearValidate());
42
+ } }), (e3, r3) => (i(), l("div", G, [d("form", null, [u(e3.$slots, "default", {}, void 0, true)])]));
43
+ } }), [["__scopeId", "data-v-1544ed91"]]), J = { class: "mc-form-item" }, K = { class: "mc-form-item__content" }, L = { key: 0, class: "mc-form-item__error" }, N = C(a({ name: "McFormItem", __name: "mc-form-item", props: { prop: {}, label: {}, disabled: { type: Boolean, default: false }, required: { type: Boolean, default: false }, rules: {} }, setup(a2, { expose: y2 }) {
44
+ const q2 = a2, C2 = e(O), $2 = n("init"), A2 = n(""), D2 = (e2) => e2 && q2.prop && !x(M(e2, q2.prop)) ? M(e2, q2.prop) : null, G2 = r(() => {
45
+ const e2 = C2 == null ? void 0 : C2.model;
46
+ return D2(e2);
47
+ }), H2 = r(() => {
48
+ const e2 = [];
49
+ q2.rules && e2.push(...q2.rules);
50
+ const r2 = C2 == null ? void 0 : C2.rules;
51
+ if (r2 && q2.prop) {
52
+ const a4 = D2(r2);
53
+ a4 && e2.push(...a4);
54
+ }
55
+ const a3 = q2.required;
56
+ if (x(a3)) {
57
+ const r3 = j(I(e2, (e3, r4) => [e3, r4]), (e3) => w(P(e3[0]), "required"));
58
+ if (F(r3)) for (const t2 of r3) {
59
+ const [r4, s2] = t2;
60
+ r4.required !== a3 && (e2[s2] = { ...r4, required: a3 });
61
+ }
62
+ else e2.push({ required: a3 });
63
+ }
64
+ return e2;
65
+ }), N2 = r(() => F(H2.value) > 0), Q2 = r(() => k(H2.value, "required") || q2.required), R2 = r(() => q2.disabled);
66
+ let T = null, U = false;
67
+ const W = (e2, r2) => {
68
+ if (U || !q2.prop || R2.value) return Promise.resolve(true);
69
+ if (!N2.value) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
70
+ const a3 = ((e3) => {
71
+ const r3 = H2.value;
72
+ return r3 ? j(r3, (r4) => !r4.trigger || !e3 || (B(r4.trigger) ? w(r4.trigger, e3) : r4.trigger === e3)).map(({ trigger: e4, ...r4 }) => r4) : [];
73
+ })(e2);
74
+ if (!F(a3)) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
75
+ $2.value = "validating";
76
+ const t2 = ((e3) => {
77
+ const r3 = q2.prop;
78
+ return r3 ? new E({ [r3]: e3 }).validate({ [r3]: G2.value }, { firstFields: true }).then(() => ($2.value = "success", C2 == null ? void 0 : C2.emits("validate", q2, true, ""), A2.value = "", true)).catch((e4) => {
79
+ const { errors: r4 } = e4;
80
+ return $2.value = "error", A2.value = r4 && F(r4) > 0 ? r4[0].message ?? "" : "", C2 == null ? void 0 : C2.emits("validate", q2, false, A2.value), Promise.reject(r4);
81
+ }) : null;
82
+ })(a3);
83
+ return t2 ? t2.then(() => (r2 == null ? void 0 : r2(true), true)).catch((e3) => {
84
+ const { fields: a4 } = e3;
85
+ return r2 == null ? void 0 : r2(false, a4), Promise.reject(a4);
86
+ }) : Promise.reject(false);
87
+ }, X = () => {
88
+ const e2 = C2 == null ? void 0 : C2.model;
89
+ e2 && q2.prop && !x(M(e2, q2.prop)) && (U = true, S(e2, q2.prop, V(T))), h(() => {
90
+ Y();
91
+ });
92
+ }, Y = () => {
93
+ $2.value = "init", A2.value = "", U = false;
94
+ }, Z = t({ ...s(q2), validateStatus: r(() => $2.value), disabled: R2.value, validate: W, resetField: X, clearValidate: Y });
95
+ return o(z, Z), c(() => {
96
+ q2.prop && (C2 == null ? void 0 : C2.addField(Z), T = G2.value);
97
+ }), m(() => {
98
+ q2.prop && (C2 == null ? void 0 : C2.removeField(Z));
99
+ }), y2({ validateMessage: A2, validateStatus: $2, validate: W, resetField: X, clearValidate: Y }), (e2, r2) => (i(), l("div", J, [e2.label ? (i(), l("label", { key: 0, class: f(["mc-form-item__label", { "mc-form-item__label--required": Q2.value }]) }, _(e2.label), 3)) : p("", true), d("div", K, [u(e2.$slots, "default", {}, void 0, true)]), v(b, { name: "mc-form-item-error" }, { default: g(() => [A2.value ? (i(), l("div", L, _(A2.value), 1)) : p("", true)]), _: 1 })]));
100
+ } }), [["__scopeId", "data-v-e94c407a"]]), Q = $(H), R = $(N);
101
+ export {
102
+ Q as M,
103
+ A as a,
104
+ R as b,
105
+ D as u
106
+ };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as e, ref as s, createElementBlock as c, openBlock as i, normalizeStyle as o, createElementVNode as n, normalizeClass as t } from "vue";
2
- import { _ as a, w as m } from "./utils-DVTEJanV.js";
2
+ import { _ as a, w as m } from "./utils-ylUc-vYY.js";
3
3
  const r = a(e({ name: "McIcon", __name: "mc-icon", props: { name: {}, size: { default: 16 }, color: {} }, emits: ["click"], setup(e2, { expose: a2, emit: m2 }) {
4
4
  const r2 = m2, p2 = s();
5
5
  return a2({ ref: p2 }), (e3, s2) => (i(), c("span", { class: "mc-icon", style: o({ fontSize: `${e3.size}px`, width: `${e3.size}px`, height: `${e3.size}px` }) }, [n("i", { ref_key: "_ref", ref: p2, class: t(["mc-iconfont", `mc-icon--${e3.name}`]), onClick: s2[0] || (s2[0] = (e4) => ((e5) => {
6
6
  r2("click", e5);
7
7
  })(e4)) }, null, 2)], 4));
8
- } }), [["__scopeId", "data-v-845d0bf6"]]), p = m(r);
8
+ } }), [["__scopeId", "data-v-7ff4bc11"]]), p = m(r);
9
9
  export {
10
- p as M,
11
- r as _
10
+ r as M,
11
+ p as a
12
12
  };
@@ -0,0 +1,67 @@
1
+ import { defineComponent as e, ref as a, computed as t, onMounted as u, watch as l, createElementBlock as s, openBlock as r, normalizeStyle as c, normalizeClass as o, unref as n, createCommentVNode as i, createElementVNode as p, renderSlot as d, createBlock as m, createVNode as f, Fragment as v, nextTick as y } from "vue";
2
+ import { M as h } from "./mc-icon-BeM-PhUM.js";
3
+ import { u as x, a as _ } from "./mc-form-OFkkUeNw.js";
4
+ import { a as g } from "./hooks-CxnUJS3d.js";
5
+ import { b as w, l as b, c as I, i as k } from "./vendor-Cxzr_0t9.js";
6
+ import { _ as $, w as V } from "./utils-ylUc-vYY.js";
7
+ const j = { key: 0, class: "mc-input__prefix" }, B = ["type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "maxlength"], R = { key: 2, class: "mc-input__password" }, A = { key: 0, class: "mc-input__suffix" }, z = V($(e({ name: "McInput", inheritAttrs: false, __name: "mc-input", props: { modelValue: {}, width: {}, height: {}, type: { default: "text" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please enter" }, readonly: { type: Boolean, default: false }, autocomplete: { default: "off" }, autofocus: { type: Boolean, default: false }, prefixIcon: {}, suffixIcon: {}, maxlength: {}, currencyAccuracy: {}, formatter: {}, parser: {} }, emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"], setup(e2, { expose: $2, emit: V2 }) {
8
+ const z2 = e2, { formatter: F, parser: M } = z2, S = V2, C = a(), H = t(() => I(z2.modelValue) ? "" : b(z2.modelValue)), P = (e3) => ("number" === z2.type ? e3 = ((e4) => e4.replace(/[^\d]/g, ""))(e3) : "currency" === z2.type && (e3 = ((e4, a2 = 8) => {
9
+ e4 = e4.replace(/(?:[^0-9.]+)/g, "");
10
+ const [t2, ...u2] = e4.split(".");
11
+ return u2.length ? `${t2}.${u2.join("").substring(0, a2)}` : t2;
12
+ })(e3, z2.currencyAccuracy)), k(M) && (e3 = M(e3)), e3), q = () => {
13
+ const e3 = C.value, a2 = (t2 = H.value, "number" === z2.type ? t2 = ((e4) => e4.replace(/[^\d]/g, ""))(t2) : "currency" === z2.type && (t2 = ((e4) => {
14
+ e4 = e4.toString();
15
+ const [a3, t3] = e4.toString().split("."), u2 = a3.replace(/(\d)(?=(\d{3})+$)/g, "$1,");
16
+ return w(e4, ".") ? `${u2}.${t3}` : u2;
17
+ })(t2)), k(F) && (t2 = F(t2)), t2);
18
+ var t2;
19
+ e3 && e3.value !== a2 && (e3.value = a2);
20
+ };
21
+ u(() => {
22
+ q();
23
+ });
24
+ const D = a(false), E = x(), G = t(() => "password" === z2.type), { formItem: J } = _(), K = t(() => {
25
+ switch (J == null ? void 0 : J.validateStatus) {
26
+ case "success":
27
+ return "success";
28
+ case "error":
29
+ return "error";
30
+ default:
31
+ return "";
32
+ }
33
+ }), L = t(() => "error" === K.value), N = t(() => "success" === K.value), O = t(() => !E.value && (L.value || N.value)), { wrapperRef: Q, isFocused: T, handleFocus: U, handleBlur: W } = g(C, { afterBlur() {
34
+ J == null ? void 0 : J.validate("blur");
35
+ } });
36
+ l(() => z2.currencyAccuracy, () => {
37
+ S("update:modelValue", P(H.value));
38
+ });
39
+ const X = (e3) => {
40
+ const { value: a2 } = e3.target;
41
+ S("update:modelValue", P(a2)), S("input", P(a2)), q();
42
+ }, Y = (e3) => {
43
+ const { value: a2 } = e3.target;
44
+ S("change", P(a2));
45
+ }, Z = () => {
46
+ E.value || (D.value = !D.value);
47
+ };
48
+ return l(() => E.value, (e3) => {
49
+ e3 && (D.value = false);
50
+ }), l(H, () => {
51
+ q(), J == null ? void 0 : J.validate("change");
52
+ }), $2({ ref: C, focus: async () => {
53
+ var _a;
54
+ await y(), (_a = C.value) == null ? void 0 : _a.focus();
55
+ }, blur: async () => {
56
+ var _a;
57
+ (_a = C.value) == null ? void 0 : _a.blur();
58
+ }, select: () => {
59
+ var _a;
60
+ (_a = C.value) == null ? void 0 : _a.select();
61
+ }, clear: () => {
62
+ S("update:modelValue", ""), S("input", ""), S("change", ""), S("clear"), J == null ? void 0 : J.clearValidate();
63
+ } }), (e3, a2) => (r(), s("div", { class: o(["mc-input", { "mc-input--disabled": n(E), "mc-input--focused": n(T), "mc-input--inputed": e3.modelValue, [`mc-input--${K.value}`]: K.value }]), style: c({ width: e3.width, height: e3.height }), ref_key: "wrapperRef", ref: Q }, [e3.$slots.prefix || e3.prefixIcon ? (r(), s("div", j, [d(e3.$slots, "prefix", {}, () => [e3.prefixIcon ? (r(), m(h, { key: 0, name: e3.prefixIcon, size: 24 }, null, 8, ["name"])) : i("", true)], true)])) : i("", true), p("input", { class: "mc-input__inner", ref_key: "inputRef", ref: C, type: G.value ? D.value ? "text" : "password" : "text", disabled: n(E), readonly: e3.readonly, autocomplete: e3.autocomplete, placeholder: e3.placeholder, autofocus: e3.autofocus, maxlength: e3.maxlength, onInput: X, onChange: Y, onFocus: a2[0] || (a2[0] = (...e4) => n(U) && n(U)(...e4)), onBlur: a2[1] || (a2[1] = (...e4) => n(W) && n(W)(...e4)) }, null, 40, B), O.value ? (r(), s("div", { key: 1, class: o(["mc-input__status", [L.value ? "mc-input__status--error" : "mc-input__status--success"]]) }, [f(h, { name: L.value ? "Reject_02" : "Accept_02", size: 24 }, null, 8, ["name"])], 2)) : i("", true), "password" === e3.type ? (r(), s("div", R, [f(h, { name: D.value ? "Review-Hidden" : "Review", size: 24, onClick: Z }, null, 8, ["name"])])) : (r(), s(v, { key: 3 }, [e3.$slots.suffix || e3.suffixIcon ? (r(), s("div", A, [d(e3.$slots, "suffix", {}, () => [e3.suffixIcon ? (r(), m(h, { key: 0, name: e3.suffixIcon, size: 24 }, null, 8, ["name"])) : i("", true)], true)])) : i("", true)], 64))], 6));
64
+ } }), [["__scopeId", "data-v-aef9c55e"]]));
65
+ export {
66
+ z as M
67
+ };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as e, ref as t, computed as o, watch as l, createBlock as s, openBlock as i, Teleport as n, createVNode as a, Transition as c, withCtx as d, createElementBlock as m, createCommentVNode as u, withModifiers as h, createElementVNode as r, normalizeStyle as p, normalizeClass as y, toDisplayString as g, renderSlot as x, isVNode as f, render as v } from "vue";
2
+ import { _ as b, w as C } from "./utils-ylUc-vYY.js";
3
+ import { M as _ } from "./mc-icon-BeM-PhUM.js";
4
+ const k = { class: "mc-lightbox__header" }, w = { class: "mc-lightbox__header-title" }, z = { key: 0, class: "mc-lightbox__header-title-text" }, V = { class: "mc-lightbox__body" }, B = { class: "mc-lightbox__content" }, T = { key: 0 }, $ = { key: 0, class: "mc-lightbox__footer" }, I = { key: 1, class: "mc-lightbox-footer-placeholder" }, j = b(e({ name: "McLightBox", __name: "mc-light-box", props: { modelValue: { type: Boolean, default: false }, title: { default: "" }, content: { default: "" }, showClose: { type: Boolean, default: true }, size: { default: "medium" }, position: { default: "center" }, maskClosable: { type: Boolean, default: true }, onClose: {}, onConfirm: {} }, emits: ["update:modelValue", "close", "confirm"], setup(e2, { expose: f2, emit: v2 }) {
5
+ const b2 = { small: { width: "430px", height: "512px" }, medium: { width: "800px", height: "512px" }, large: { width: "1024px", height: "700px" } }, C2 = e2, j2 = v2, E2 = t(), M2 = t(false), L2 = t(false), N2 = o(() => {
6
+ const e3 = b2[C2.size];
7
+ return { width: e3.width, height: e3.height };
8
+ }), R2 = () => {
9
+ L2.value = true, setTimeout(() => {
10
+ j2("update:modelValue", false), j2("close"), C2.onClose && C2.onClose(), L2.value = false;
11
+ }, 300);
12
+ }, U2 = () => {
13
+ C2.showClose && C2.maskClosable && R2();
14
+ };
15
+ return l(() => C2.modelValue, (e3) => {
16
+ e3 && (M2.value = true, setTimeout(() => {
17
+ M2.value = false;
18
+ }, 20));
19
+ }), f2({ ref: E2, close: R2 }), (e3, t2) => (i(), s(n, { to: "body" }, [a(c, { name: "mc-lightbox-fade" }, { default: d(() => [e3.modelValue ? (i(), m("div", { key: 0, class: "mc-lightbox-overlay", onClick: h(U2, ["self"]) }, [r("div", { ref_key: "_ref", ref: E2, class: y(["mc-lightbox", [M2.value ? "mc-lightbox--entering" : "", L2.value ? "mc-lightbox--leaving" : "", `mc-lightbox--${e3.size}`, `mc-lightbox--${e3.position}`]]), style: p(N2.value) }, [r("div", k, [r("div", w, [e3.title ? (i(), m("div", z, g(e3.title), 1)) : u("", true)]), e3.showClose ? (i(), s(_, { key: 0, name: "Cross", class: "mc-lightbox__close", size: 32, onClick: R2 })) : u("", true)]), r("div", V, [r("div", B, [e3.content ? (i(), m("div", T, g(e3.content), 1)) : x(e3.$slots, "content", { key: 1 }, void 0, true)])]), e3.$slots.footer ? (i(), m("div", $, [x(e3.$slots, "footer", {}, void 0, true)])) : (i(), m("div", I))], 6)])) : u("", true)]), _: 3 })]));
20
+ } }), [["__scopeId", "data-v-67f1967c"]]);
21
+ let E = null, M = null;
22
+ const L = () => {
23
+ E && (E.style.opacity = "0", setTimeout(() => {
24
+ E && document.body.contains(E) && document.body.removeChild(E), E = null, M = null;
25
+ }, 300));
26
+ }, N = (e2 = {}) => {
27
+ var _a;
28
+ let t2 = {};
29
+ t2 = "string" == typeof e2 ? { content: e2 } : f(e2) ? { content: "" } : { ...e2 }, t2.size = t2.size || "medium", t2.position = t2.position || "center", t2.maskClosable = false !== t2.maskClosable;
30
+ const o2 = E || (E = document.createElement("div"), E.className = "mc-lightbox-overlay", E.style.position = "fixed", E.style.top = "0", E.style.left = "0", E.style.width = "100%", E.style.height = "100%", E.style.backgroundColor = "rgba(0, 0, 0, 0.5)", E.style.zIndex = "9998", E.style.display = "flex", E.style.alignItems = "center", E.style.justifyContent = "center", E.style.transition = "opacity 0.3s ease", E.style.opacity = "0", document.body.appendChild(E), E.getBoundingClientRect(), E.style.opacity = "1", E), l2 = M || (M = document.createElement("div"), M.style.position = "relative", M.style.zIndex = "9999", M);
31
+ o2.appendChild(l2);
32
+ const s2 = document.createElement("div"), i2 = a(j, { ...t2, modelValue: true, onClose: () => {
33
+ L(), t2.onClose && t2.onClose(), setTimeout(() => {
34
+ v(null, s2);
35
+ }, 300);
36
+ }, "onUpdate:modelValue": (e3) => {
37
+ e3 || (L(), setTimeout(() => {
38
+ v(null, s2);
39
+ }, 300));
40
+ } });
41
+ v(i2, s2), l2.appendChild(s2);
42
+ const n2 = (_a = i2.component) == null ? void 0 : _a.exposed;
43
+ return { close: () => {
44
+ n2 == null ? void 0 : n2.close();
45
+ } };
46
+ }, R = N, U = C(j);
47
+ export {
48
+ U as M,
49
+ N as c,
50
+ R as l
51
+ };
@@ -1,8 +1,8 @@
1
- import { _ as e, w as s } from "./utils-DVTEJanV.js";
1
+ import { _ as e, w as s } from "./utils-ylUc-vYY.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 { _ as b } from "./mc-icon-Cmyyx9F-.js";
3
+ import { M as b } from "./mc-icon-BeM-PhUM.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
- const C2 = e2, w2 = o2, k2 = n(), x2 = n(true), A2 = t(a()), B2 = c(() => ({ ...r(A2).style })), M2 = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, j2 = () => {
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;
7
7
  x2.value = false, w2("close"), (_a = C2.onClose) == null ? void 0 : _a.call(C2);
8
8
  };
@@ -10,40 +10,40 @@ const E = { class: "mc-message__content" }, I = { class: "mc-message__title" },
10
10
  C2.duration > 0 && setTimeout(() => {
11
11
  j2();
12
12
  }, C2.duration);
13
- }), s2({ ref: k2, handleClose: j2 }), (e3, s3) => (i(), m(d, { name: "mc-message-fade" }, { default: u(() => [p(f("div", { ref_key: "_ref", ref: k2, class: _(["mc-message", [`mc-message--${e3.type}`]]), style: g(B2.value) }, [f("div", E, [e3.showIcon ? (i(), m(b, { key: 0, name: M2[e3.type], class: "mc-message__icon" }, null, 8, ["name"])) : y("", true), f("div", I, v(e3.message), 1)]), e3.closable ? (i(), m(b, { key: 0, name: "Cross", class: "mc-message__close", onClick: j2 })) : y("", true)], 6), [[h, x2.value]])]), _: 1 }));
14
- } }), [["__scopeId", "data-v-65d094a9"]]), x = s(k);
15
- let A = 1;
16
- const B = [], M = () => {
13
+ }), s2({ ref: k2, handleClose: j2 }), (e3, s3) => (i(), m(d, { name: "mc-message-fade" }, { default: u(() => [p(f("div", { ref_key: "_ref", ref: k2, class: _(["mc-message", [`mc-message--${e3.type}`]]), style: g(A2.value) }, [f("div", E, [e3.showIcon ? (i(), m(b, { key: 0, name: B2[e3.type], class: "mc-message__icon", size: 24 }, null, 8, ["name"])) : y("", true), f("div", I, v(e3.message), 1)]), e3.closable ? (i(), m(b, { key: 0, name: "Cross", class: "mc-message__close", onClick: j2 })) : y("", true)], 6), [[h, x2.value]])]), _: 1 }));
14
+ } }), [["__scopeId", "data-v-8f27043b"]]), x = s(k);
15
+ let M = 1;
16
+ const A = [], B = () => {
17
17
  let e2 = document.getElementById("mc-message-container");
18
18
  return e2 || (e2 = document.createElement("div"), e2.id = "mc-message-container", document.body.appendChild(e2)), e2;
19
- }, j = { info: (e2) => L(e2, "info"), success: (e2) => L(e2, "success"), warning: (e2) => L(e2, "warning"), error: (e2) => L(e2, "error"), close: (e2) => T(e2), closeAll: () => {
20
- [...B].forEach((e2) => {
19
+ }, j = { info: (e2) => z(e2, "info"), success: (e2) => z(e2, "success"), warning: (e2) => z(e2, "warning"), error: (e2) => z(e2, "error"), close: (e2) => L(e2), closeAll: () => {
20
+ [...A].forEach((e2) => {
21
21
  var _a, _b;
22
22
  const s2 = (_a = e2.vm.component) == null ? void 0 : _a.exposed;
23
23
  (_b = s2 == null ? void 0 : s2.handleClose) == null ? void 0 : _b.call(s2);
24
24
  });
25
25
  } };
26
- function L(e2, s2) {
26
+ function z(e2, s2) {
27
27
  "string" == typeof e2 && (e2 = { message: e2 });
28
- const o2 = "message_" + A++, n2 = e2.onClose, t2 = M(), a2 = document.createElement("div");
28
+ const o2 = "message_" + M++, n2 = e2.onClose, t2 = B(), a2 = document.createElement("div");
29
29
  a2.setAttribute("data-message-id", o2), a2.classList.add("mc-message-item");
30
30
  const c2 = { ...e2, type: s2, id: o2, onClose: () => {
31
- n2 == null ? void 0 : n2(), T(o2);
31
+ n2 == null ? void 0 : n2(), L(o2);
32
32
  } };
33
- B.length >= 20 && T(B[0].id);
33
+ A.length >= 20 && L(A[0].id);
34
34
  const r2 = w(k, c2);
35
- return C(r2, a2), t2.appendChild(a2), B.push({ vm: r2, id: o2, wrapper: a2 }), { close: () => {
36
- T(o2);
35
+ return C(r2, a2), t2.appendChild(a2), A.push({ vm: r2, id: o2, wrapper: a2 }), { close: () => {
36
+ L(o2);
37
37
  } };
38
38
  }
39
- function T(e2) {
40
- const s2 = B.findIndex((s3) => s3.id === e2);
39
+ function L(e2) {
40
+ const s2 = A.findIndex((s3) => s3.id === e2);
41
41
  if (-1 === s2) return;
42
- const o2 = B[s2];
42
+ const o2 = A[s2];
43
43
  if (!o2) return;
44
44
  C(null, o2.wrapper);
45
- const n2 = M();
46
- n2.contains(o2.wrapper) && n2.removeChild(o2.wrapper), B.splice(s2, 1), 0 === B.length && document.body.contains(n2) && document.body.removeChild(n2);
45
+ const n2 = B();
46
+ n2.contains(o2.wrapper) && n2.removeChild(o2.wrapper), A.splice(s2, 1), 0 === A.length && document.body.contains(n2) && document.body.removeChild(n2);
47
47
  }
48
48
  export {
49
49
  x as M,
@@ -1,22 +1,22 @@
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-DVTEJanV.js";
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 }) {
2
+ import { _ as u, w as n } from "./utils-ylUc-vYY.js";
3
+ const p = Symbol("selectContext"), v = { class: "mc-radio-group" }, b = 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) => {
6
6
  c2("update:modelValue", a3), c2("change", a3);
7
- } }), (a3, e2) => (s(), d("div", b, [o(a3.$slots, "default", {}, void 0, true)]));
8
- } }), [["__scopeId", "data-v-3a9261c9"]]), _ = ["disabled"], k = { class: "mc-radio-content" }, h = { class: "mc-radio-remark" }, V = u(a({ name: "McRadio", __name: "mc-radio", props: { label: {}, value: {}, disabled: { type: Boolean }, remark: {} }, setup(a2) {
7
+ } }), (a3, e2) => (s(), d("div", v, [o(a3.$slots, "default", {}, void 0, true)]));
8
+ } }), [["__scopeId", "data-v-301a53a1"]]), _ = ["disabled"], k = { class: "mc-radio-content" }, h = { class: "mc-radio-remark" }, V = u(a({ name: "McRadio", __name: "mc-radio", props: { label: {}, value: {}, disabled: { type: Boolean }, remark: {} }, setup(a2) {
9
9
  const e2 = a2, u2 = r(p), n2 = l(() => {
10
10
  var _a;
11
11
  return ((_a = u2 == null ? void 0 : u2.modelValue) == null ? void 0 : _a.value) === e2.value;
12
- }), b2 = l(() => {
12
+ }), v2 = l(() => {
13
13
  var _a;
14
14
  return ((_a = u2 == null ? void 0 : u2.disabled) == null ? void 0 : _a.value) || e2.disabled;
15
- }), v2 = () => {
16
- b2.value || (u2 == null ? void 0 : u2.handleSelect(e2.value));
15
+ }), b2 = () => {
16
+ v2.value || (u2 == null ? void 0 : u2.handleSelect(e2.value));
17
17
  };
18
- return (a3, e3) => (s(), d("div", { class: i(["mc-radio", { "mc-radio-has-remark": !!a3.remark }]) }, [c("label", { class: i(["mc-radio-label", { "mc-radio-checked": n2.value, "mc-radio-disabled": b2.value }]), onClick: v2 }, [c("input", { type: "radio", class: "mc-radio-input", disabled: a3.disabled }, null, 8, _), e3[0] || (e3[0] = c("span", { class: "mc-radio-circle" }, null, -1)), c("div", k, [o(a3.$slots, "default", {}, () => [m(t(a3.label), 1)], true)])], 2), c("div", h, [o(a3.$slots, "remark", {}, () => [m(t(a3.remark), 1)], true)])], 2));
19
- } }), [["__scopeId", "data-v-536bb974"]]), f = n(v), g = n(V);
18
+ return (a3, e3) => (s(), d("div", { class: i(["mc-radio", { "mc-radio-has-remark": !!a3.remark }]) }, [c("label", { class: i(["mc-radio-label", { "mc-radio-checked": n2.value, "mc-radio-disabled": v2.value }]), onClick: b2 }, [c("input", { type: "radio", class: "mc-radio-input", disabled: a3.disabled }, null, 8, _), e3[0] || (e3[0] = c("span", { class: "mc-radio-circle" }, null, -1)), c("div", k, [o(a3.$slots, "default", {}, () => [m(t(a3.label), 1)], true)])], 2), c("div", h, [o(a3.$slots, "remark", {}, () => [m(t(a3.remark), 1)], true)])], 2));
19
+ } }), [["__scopeId", "data-v-1a67d9df"]]), f = n(b), g = n(V);
20
20
  export {
21
21
  g as M,
22
22
  f as a