mc-plus 1.0.78 → 1.0.79

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 (131) hide show
  1. package/dist/es/index.js +255 -248
  2. package/dist/es/mc-alert-message-CaYxL1Yi.js +32 -0
  3. package/dist/es/mc-button-Bg4Yihn7.js +15 -0
  4. package/dist/es/{mc-checkbox-C-9q1uwS.js → mc-checkbox-Dyzog85d.js} +7 -8
  5. package/dist/es/{mc-checkbox-group-DyPHhILZ.js → mc-checkbox-group-eFq3z6SX.js} +1 -1
  6. package/dist/es/{mc-collapse-item-mEQqZM8m.js → mc-collapse-item-B_qKeVrY.js} +1 -1
  7. package/dist/es/mc-copy-DJncZLxJ.js +19 -0
  8. package/dist/es/mc-divider-BUj2C8z3.js +7 -0
  9. package/dist/es/mc-drawer-DJk754RT.js +29 -0
  10. package/dist/es/mc-file-list-Bjcmtcrs.js +29 -0
  11. package/dist/es/{mc-footer-DUC9ViQu.js → mc-footer-BeEDYFlH.js} +3 -4
  12. package/dist/es/{mc-form-C0bOl2Kn.js → mc-form-B74FOC7S.js} +1 -1
  13. package/dist/es/mc-form-item-CzRuDu0s.js +69 -0
  14. package/dist/es/{mc-icon-4B9i36Sx.js → mc-icon-CmYW61Q0.js} +3 -3
  15. package/dist/es/{mc-icon-plus-DcQPxofD.js → mc-icon-plus-BFYVRrKw.js} +2 -2
  16. package/dist/es/{mc-input-D2BkkJ_Y.js → mc-input-BglWvPMq.js} +5 -5
  17. package/dist/es/{mc-input-group-sjUhcX1J.js → mc-input-group-apXB5iXd.js} +1 -1
  18. package/dist/es/mc-lightbox-DRiJSWar.js +38 -0
  19. package/dist/es/mc-loading-CgQDxms4.js +11 -0
  20. package/dist/es/mc-modal-header-BUvK3-bl.js +12 -0
  21. package/dist/es/mc-multi-tag-CWwyuXAy.js +16 -0
  22. package/dist/es/{mc-otp-C0Xs2nWC.js → mc-otp-CH1yOQy4.js} +4 -4
  23. package/dist/es/{mc-overlay-D2fKzV9J.js → mc-overlay-CHfJL0kY.js} +3 -4
  24. package/dist/es/mc-popper-CbGrFzA5.js +34 -0
  25. package/dist/es/mc-progress-bar-Cexg1qzW.js +29 -0
  26. package/dist/es/{mc-progress-indicator-BLQqSDrY.js → mc-progress-indicator-DhR-rAkD.js} +21 -21
  27. package/dist/es/mc-radio-DeINCfgm.js +22 -0
  28. package/dist/es/{mc-radio-group-BhsM5bEB.js → mc-radio-group-BnDDYkMd.js} +1 -1
  29. package/dist/es/mc-removable-tag-YZpBGZiE.js +13 -0
  30. package/dist/es/mc-reset-CJBlVip8.js +13 -0
  31. package/dist/es/mc-richtext-BQz5KzYG.js +100 -0
  32. package/dist/es/{mc-select-3xlHImKe.js → mc-select-dtLU6api.js} +18 -18
  33. package/dist/es/{mc-select-group-BKEcd7s0.js → mc-select-group-BpZACRnb.js} +1 -1
  34. package/dist/es/{mc-select-group-plus-CPt1eYeR.js → mc-select-group-plus-DTvQr5wB.js} +1 -1
  35. package/dist/es/mc-select-multi-option-0RDwqAwb.js +13 -0
  36. package/dist/es/{mc-select-option-Cptm5wjF.js → mc-select-option-1qz8OodF.js} +10 -10
  37. package/dist/es/{mc-select-option-plus-93vuN2mf.js → mc-select-option-plus-B-UJCqUp.js} +10 -10
  38. package/dist/es/{mc-select-plus-Hdl-shv8.js → mc-select-plus-CjrXhek5.js} +48 -48
  39. package/dist/es/mc-status-BJGdWYD5.js +8 -0
  40. package/dist/es/mc-step-DRDtR0u_.js +52 -0
  41. package/dist/es/{mc-step-plus-CDYpOa42.js → mc-step-plus-dPMVmUi4.js} +17 -17
  42. package/dist/es/mc-step-v2-C1e_kDgg.js +76 -0
  43. package/dist/es/mc-success-icon-BuGz3uNE.js +7 -0
  44. package/dist/es/mc-switch-KStvUyzm.js +15 -0
  45. package/dist/es/{mc-tab-jIIY_s5y.js → mc-tab-BT5bQZPB.js} +22 -22
  46. package/dist/es/{mc-table-COdreKN2.js → mc-table-CBKGzmE9.js} +2 -2
  47. package/dist/es/{mc-table-plus-LFIpN4Og.js → mc-table-plus-mrdERsrX.js} +18 -18
  48. package/dist/es/mc-tag-CeJarQKP.js +15 -0
  49. package/dist/es/{mc-textarea-BBhb212c.js → mc-textarea-D0xe-tcb.js} +1 -1
  50. package/dist/es/mc-title-Bp0U8n05.js +11 -0
  51. package/dist/es/mc-title-tool-bar-DI-TZVG5.js +18 -0
  52. package/dist/es/mc-toast-a1PkHS_u.js +71 -0
  53. package/dist/es/mc-tooltip-BNmrE7e_.js +18 -0
  54. package/dist/es/{mc-upload-CDkkDtlT.js → mc-upload-Ce1xxGu_.js} +23 -23
  55. package/dist/es/theme/mc-alert-message.css +1 -1
  56. package/dist/es/theme/mc-button.css +1 -1
  57. package/dist/es/theme/mc-copy.css +1 -1
  58. package/dist/es/theme/mc-drawer.css +1 -1
  59. package/dist/es/theme/mc-file-list.css +1 -1
  60. package/dist/es/theme/mc-form-item.css +1 -1
  61. package/dist/es/theme/mc-input.css +1 -1
  62. package/dist/es/theme/mc-lightbox.css +1 -1
  63. package/dist/es/theme/mc-loading.css +1 -1
  64. package/dist/es/theme/mc-modal-header.css +1 -1
  65. package/dist/es/theme/mc-multi-tag.css +1 -1
  66. package/dist/es/theme/mc-otp.css +1 -1
  67. package/dist/es/theme/mc-popper.css +1 -1
  68. package/dist/es/theme/mc-progress-indicator.css +1 -1
  69. package/dist/es/theme/mc-radio.css +1 -1
  70. package/dist/es/theme/mc-removable-tag.css +1 -1
  71. package/dist/es/theme/mc-reset.css +1 -1
  72. package/dist/es/theme/mc-richtext.css +1 -0
  73. package/dist/es/theme/mc-select-option-plus.css +1 -1
  74. package/dist/es/theme/mc-select-plus.css +1 -1
  75. package/dist/es/theme/mc-select.css +1 -1
  76. package/dist/es/theme/mc-status.css +1 -1
  77. package/dist/es/theme/mc-step-plus.css +1 -1
  78. package/dist/es/theme/mc-step-v2.css +1 -1
  79. package/dist/es/theme/mc-step.css +1 -1
  80. package/dist/es/theme/mc-switch.css +1 -1
  81. package/dist/es/theme/mc-tab.css +1 -1
  82. package/dist/es/theme/mc-table-plus.css +1 -1
  83. package/dist/es/theme/mc-tag.css +1 -1
  84. package/dist/es/theme/mc-title-tool-bar.css +1 -1
  85. package/dist/es/theme/mc-title.css +1 -1
  86. package/dist/es/theme/mc-toast.css +1 -1
  87. package/dist/es/theme/mc-tooltip.css +1 -1
  88. package/dist/es/theme/mc-upload.css +1 -1
  89. package/dist/index.css +1 -1
  90. package/dist/types/components.d.ts +1 -0
  91. package/dist/types/mc-richtext/index.d.ts +208 -0
  92. package/dist/types/mc-richtext/mc-richtext-tool.vue.d.ts +27 -0
  93. package/dist/types/mc-richtext/mc-richtext.vue.d.ts +178 -0
  94. package/dist/types/mc-table/components/mc-table-header.vue.d.ts +1 -1
  95. package/dist/types/mc-table/index.d.ts +6 -6
  96. package/dist/types/mc-table/mc-table.vue.d.ts +7 -7
  97. package/dist/types/mc-tooltip/index.d.ts +103 -4
  98. package/dist/types/mc-tooltip/mc-tooltip.vue.d.ts +187 -3
  99. package/dist/types/mc-tooltip/types.d.ts +4 -0
  100. package/dist/umd/index.css +1 -1
  101. package/dist/umd/index.css.gz +0 -0
  102. package/dist/umd/index.umd.cjs +152 -13
  103. package/dist/umd/index.umd.cjs.gz +0 -0
  104. package/package.json +4 -2
  105. package/dist/es/mc-alert-message-JvnnHaSr.js +0 -32
  106. package/dist/es/mc-button-Ckv7FHa8.js +0 -16
  107. package/dist/es/mc-copy-DFfZ79nS.js +0 -19
  108. package/dist/es/mc-divider-TCpxn8c3.js +0 -8
  109. package/dist/es/mc-drawer-CjQ47r2y.js +0 -29
  110. package/dist/es/mc-file-list-Cv4OP1Ga.js +0 -30
  111. package/dist/es/mc-form-item-BbAU8Ql1.js +0 -69
  112. package/dist/es/mc-lightbox-GiCDfm0O.js +0 -38
  113. package/dist/es/mc-loading-B_zisNHu.js +0 -12
  114. package/dist/es/mc-modal-header-BgpxusVu.js +0 -13
  115. package/dist/es/mc-multi-tag-BonO5uCY.js +0 -16
  116. package/dist/es/mc-popper-DG8gxW80.js +0 -35
  117. package/dist/es/mc-progress-bar-tWHWi19h.js +0 -30
  118. package/dist/es/mc-radio-CVZardNJ.js +0 -22
  119. package/dist/es/mc-removable-tag-DhIpXh1a.js +0 -14
  120. package/dist/es/mc-reset-BG-p8AiH.js +0 -14
  121. package/dist/es/mc-select-multi-option-Db1LcXm-.js +0 -14
  122. package/dist/es/mc-status-TsoVkCEe.js +0 -8
  123. package/dist/es/mc-step-BopeVqhY.js +0 -52
  124. package/dist/es/mc-step-v2-vjZRSKCY.js +0 -76
  125. package/dist/es/mc-success-icon-CuyL6DXB.js +0 -8
  126. package/dist/es/mc-switch-SVZ-_d9M.js +0 -15
  127. package/dist/es/mc-tag-tK4gRtnS.js +0 -16
  128. package/dist/es/mc-title-RVvmAnbZ.js +0 -12
  129. package/dist/es/mc-title-tool-bar-B0t7WcZL.js +0 -19
  130. package/dist/es/mc-toast-DtnNJULV.js +0 -71
  131. package/dist/es/mc-tooltip-CDYY9-bd.js +0 -13
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mc-plus",
3
- "version": "1.0.78",
3
+ "version": "1.0.79",
4
4
  "description": "Components library for Vue 3.X by Meta Compass",
5
5
  "type": "module",
6
6
  "files": [
@@ -43,10 +43,12 @@
43
43
  "dependencies": {
44
44
  "lodash-es": "^4.17.21",
45
45
  "@popperjs/core": "^2.11.8",
46
+ "async-validator": "^4.2.5",
47
+ "@tiptap/core": "^3.4.6",
48
+ "@tiptap/extension-image": "^3.4.4",
46
49
  "@tiptap/pm": "^3.4.4",
47
50
  "@tiptap/starter-kit": "^3.4.4",
48
51
  "@tiptap/vue-3": "^3.4.4",
49
- "async-validator": "^4.2.5",
50
52
  "@mc-plus/hooks": "^0.0.6"
51
53
  },
52
54
  "peerDependencies": {
@@ -1,32 +0,0 @@
1
- import { _ as e, u as a } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as s, ref as t, useSlots as l, computed as o, createElementBlock as c, openBlock as n, normalizeStyle as r, normalizeClass as i, createElementVNode as m, createCommentVNode as d, renderSlot as u, createVNode as p, createTextVNode as g, toDisplayString as v, createBlock as f, withModifiers as y, Transition as h, withCtx as x } from "vue";
3
- import { M as _ } from "./mc-icon-4B9i36Sx.js";
4
- const k = "mc-alert-message", b = { class: "mc-alert-message-header" }, w = { class: "mc-alert-message-title-container" }, z = { key: 0, class: "mc-alert-message-icon-group" }, B = { class: "mc-alert-message-icon-wrapper" }, C = { class: "mc-alert-message-icon-wrapper" }, I = { key: 0, class: "mc-alert-message-body" }, $ = a(e(s({ name: k, __name: "mc-alert-message", props: { modelValue: { type: Boolean, default: true }, width: {}, height: {}, type: { default: "info" }, message: {}, content: {}, closable: { type: Boolean, default: false }, hideIcon: { type: Boolean, default: false }, expandable: { type: Boolean, default: false } }, emits: ["click", "close", "update:modelValue", "expand"], setup(e2, { expose: a2, emit: s2 }) {
5
- const k2 = e2, $2 = s2, V = t(), j = l(), E = o(() => k2.content || j.content), M = o(() => H.value || j.icon), A = t(false), D = o(() => !k2.expandable || A.value), H = o(() => {
6
- if (!k2.hideIcon) switch (k2.type) {
7
- case "success":
8
- return "Accept_02";
9
- case "error":
10
- return "Error_04";
11
- case "warning":
12
- return "Error_02";
13
- case "info":
14
- return "Info_02";
15
- default:
16
- return;
17
- }
18
- }), L = () => {
19
- $2("update:modelValue", false), $2("close");
20
- }, S = () => {
21
- $2("click"), k2.expandable && (A.value = !A.value, $2("expand", A.value));
22
- };
23
- return a2({ ref: V, close: L, show: () => {
24
- A.value = true;
25
- }, hide: () => {
26
- A.value = false;
27
- } }), (a3, s3) => (n(), c("div", { ref_key: "_ref", ref: V, class: i(["mc-alert-message", [`mc-alert-message-${e2.type}`]]), style: r({ width: e2.width, height: e2.height, cursor: e2.expandable ? "pointer" : "default" }), onClick: S }, [m("div", b, [m("div", w, [M.value ? (n(), c("div", { key: 0, class: "mc-alert-message-icon", style: r({ height: E.value ? "30px" : "24px" }) }, [u(a3.$slots, "icon", {}, () => [p(_, { name: H.value, size: 24 }, null, 8, ["name"])], true)], 4)) : d("", true), m("div", { class: "mc-alert-message-title", style: r({ fontSize: E.value ? "18px" : "16px", fontWeight: E.value ? "600" : "400", lineHeight: E.value ? "30px" : "24px" }) }, [u(a3.$slots, "default", {}, () => [g(v(e2.message), 1)], true)], 4)]), e2.closable || e2.expandable ? (n(), c("div", z, [m("div", B, [e2.expandable ? (n(), f(_, { key: 0, name: "Down-Chevron", size: 24, class: "mc-alert-message-tool-icon mc-alert-message-tool-icon-expand", style: r({ transform: D.value ? "rotate(180deg)" : "rotate(0deg)" }) }, null, 8, ["style"])) : d("", true)]), m("div", C, [e2.closable ? (n(), f(_, { key: 0, name: "Cross", size: 24, class: "mc-alert-message-tool-icon mc-alert-message-tool-icon-close", onClick: y(L, ["stop"]) })) : d("", true)])])) : d("", true)]), E.value ? (n(), c("div", I, [p(h, { name: "mc-alert-message-content-transition" }, { default: x(() => [D.value ? (n(), c("div", { key: 0, class: "mc-alert-message-content", style: r({ paddingLeft: M.value ? "48px" : "16px" }) }, [u(a3.$slots, "content", {}, () => [g(v(e2.content), 1)], true)], 4)) : d("", true)]), _: 3 })])) : d("", true)], 6));
28
- } }), [["__scopeId", "data-v-6198dedc"]]));
29
- export {
30
- $ as M,
31
- k as a
32
- };
@@ -1,16 +0,0 @@
1
- import { _ as t, u as e } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as o, ref as i, createElementBlock as a, openBlock as n, unref as l, normalizeClass as s, normalizeStyle as d, createBlock as m, createCommentVNode as r, createElementVNode as c, createVNode as u, renderSlot as p } from "vue";
3
- import { throttle as f } from "lodash-es";
4
- import { useWidthHeight as h } from "@mc-plus/hooks";
5
- import { M as b } from "./mc-icon-4B9i36Sx.js";
6
- const g = "mc-button", y = ["type", "disabled"], k = { key: 1, class: "loading-icon" }, v = { class: "mc-button-text" }, I = t(o({ name: g, __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(t2, { expose: e2, emit: o2 }) {
7
- const g2 = t2, I2 = o2, _2 = i(), { width: z, height: T } = h(), w = (t3) => {
8
- g2.loading || g2.disabled || I2("click", t3);
9
- }, x = f(w, g2.throttleDuration, { trailing: false });
10
- return e2({ ref: _2 }), (e3, o3) => (n(), a("button", { ref_key: "_ref", ref: _2, style: d({ width: l(z), height: l(T) }), class: s(["mc-button", { [`mc-button--${t2.type}`]: t2.type, [`mc-button--${t2.size}`]: t2.size, "is-loading": t2.loading, "is-disabled": t2.disabled }]), type: t2.nativeType, disabled: !(!t2.disabled && !t2.loading) || void 0, onClick: o3[0] || (o3[0] = (e4) => t2.useThrottle ? l(x)(e4) : w(e4)) }, [t2.leftIcon && !t2.loading ? (n(), m(b, { key: 0, name: t2.leftIcon }, null, 8, ["name"])) : r("", true), t2.loading && !t2.disabled ? (n(), a("span", k, [u(b, { name: "Loading", size: 16 })])) : r("", true), c("div", v, [p(e3.$slots, "default", {}, void 0, true)]), t2.rightIcon ? (n(), m(b, { key: 2, name: t2.rightIcon }, null, 8, ["name"])) : r("", true)], 14, y));
11
- } }), [["__scopeId", "data-v-88576c9a"]]), _ = e(I);
12
- export {
13
- I as M,
14
- _ as a,
15
- g as b
16
- };
@@ -1,19 +0,0 @@
1
- import { _ as t, u as s } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as o, createElementBlock as e, openBlock as c, renderSlot as a, createVNode as r, createElementVNode as p, toDisplayString as m } from "vue";
3
- import { M as l } from "./mc-icon-4B9i36Sx.js";
4
- import { t as i } from "./mc-toast-DtnNJULV.js";
5
- const u = "mc-copy", n = { class: "mc-copy" }, x = { class: "mc-copy-text" }, f = s(t(o({ name: u, __name: "mc-copy", props: { text: {}, showToast: { type: Boolean, default: false }, toastSuccessText: { default: "copy succeed" }, toastErrorText: { default: "copy failed" }, manual: { type: Boolean, default: false } }, emits: ["copy", "success", "error"], setup(t2, { emit: s2 }) {
6
- const o2 = t2, u2 = s2, f2 = async () => {
7
- if (o2.text) if (o2.manual) u2("copy", o2.text);
8
- else try {
9
- await navigator.clipboard.writeText(o2.text), u2("success", o2.text), o2.showToast && i.success(o2.toastSuccessText);
10
- } catch (t3) {
11
- console.error(t3), u2("error", o2.text, t3), o2.showToast && i.error(o2.toastErrorText);
12
- }
13
- };
14
- return (s3, o3) => (c(), e("div", n, [a(s3.$slots, "default", {}, () => [p("span", x, m(t2.text), 1)], true), r(l, { name: "Duplicate", class: "mc-copy-icon", onClick: f2 })]));
15
- } }), [["__scopeId", "data-v-f509c5d3"]]));
16
- export {
17
- f as M,
18
- u as a
19
- };
@@ -1,8 +0,0 @@
1
- import { _ as i, u as e } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as a, createElementBlock as s, openBlock as d, normalizeClass as m } from "vue";
3
- const r = "mc-divider", t = i(a({ name: r, __name: "mc-divider", props: { size: { default: "small" }, emphasis: { default: "minimal" }, orientation: { default: "horizontal" } }, setup: (i2) => (e2, a2) => (d(), s("div", { class: m(["mc-divider", [`mc-divider-${i2.orientation}`, `mc-divider-${i2.size}`, `mc-divider-${i2.emphasis}`]]) }, null, 2)) }), [["__scopeId", "data-v-7527b8b5"]]), o = e(t);
4
- export {
5
- t as M,
6
- o as a,
7
- r as b
8
- };
@@ -1,29 +0,0 @@
1
- import { _ as e, u as o } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as t, ref as a, watch as r, createElementBlock as s, createCommentVNode as l, openBlock as d, createBlock as i, Teleport as m, createVNode as c, Transition as f, withCtx as u, normalizeClass as n, createElementVNode as p, renderSlot as v, nextTick as h } from "vue";
3
- import { useResizeObserver as w } from "@mc-plus/hooks";
4
- import { _ as y } from "./mc-overlay-D2fKzV9J.js";
5
- import { _ } from "./mc-modal-header-BgpxusVu.js";
6
- import { M as $ } from "./mc-footer-DUC9ViQu.js";
7
- const b = "mc-drawer", g = { key: 0, class: "mc-drawer-container" }, k = { class: "mc-drawer-header" }, B = { class: "mc-drawer-content-wrapper" }, x = { class: "mc-drawer-content" }, C = o(e(t({ name: b, __name: "mc-drawer", props: { modelValue: { type: Boolean }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean, default: true }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" }, showBorder: { type: Boolean, default: true }, hideFooter: { type: Boolean, default: false }, position: { default: "right" } }, emits: ["update:modelValue", "close"], setup(e2, { expose: o2, emit: t2 }) {
8
- const b2 = e2, C2 = a(false), j = a(false), V = a(false), z = async () => {
9
- C2.value = true, j.value = true, await h(), V.value = true;
10
- }, F = async () => {
11
- V.value = false, await h(), j.value = false, await h(), C2.value = false, M("close"), M("update:modelValue", false);
12
- };
13
- r(() => b2.modelValue, (e3, o3) => {
14
- !o3 && e3 ? z() : F();
15
- }, { immediate: true, flush: "post" });
16
- const M = t2, S = () => {
17
- b2.maskClosable && F();
18
- }, I = () => {
19
- F();
20
- }, R = a(), q = a();
21
- return w(q, ({ height: e3 }) => {
22
- const o3 = R.value;
23
- o3 && (o3.style.paddingBottom = `${e3}px`);
24
- }), o2({ ref: R, open: z, close: F }), (o3, t3) => C2.value ? (d(), s("div", g, [(d(), i(m, { to: e2.portCssSelector }, [c(f, { name: "mc-drawer-overlay" }, { default: u(() => [c(y, { visible: j.value, fixed: e2.fixed, onClick: S }, { default: u(() => [c(f, { name: `mc-drawer-content-${e2.position}` }, { default: u(() => [V.value ? (d(), s("div", { key: 0, class: n(["mc-drawer", [`mc-drawer-${e2.size}`, `mc-drawer-${e2.position}`]]), ref_key: "_ref", ref: R }, [p("div", k, [v(o3.$slots, "header", {}, () => [c(_, { title: e2.title, "show-border": e2.showBorder, onClose: I }, { default: u(() => [v(o3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title", "show-border"])], true)]), p("div", B, [p("div", x, [v(o3.$slots, "default", {}, void 0, true)])]), e2.hideFooter ? l("", true) : (d(), s("div", { key: 0, class: "mc-drawer-footer", ref_key: "footerRef", ref: q }, [v(o3.$slots, "footer", {}, () => [c($, null, { left: u(() => [v(o3.$slots, "footer-left", {}, void 0, true)]), right: u(() => [v(o3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": u(() => [v(o3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: u(() => [v(o3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)], 512))], 2)) : l("", true)]), _: 3 }, 8, ["name"])]), _: 3 }, 8, ["visible", "fixed"])]), _: 3 })], 8, ["to"]))])) : l("", true);
25
- } }), [["__scopeId", "data-v-f68b87e3"]]));
26
- export {
27
- C as M,
28
- b as a
29
- };
@@ -1,30 +0,0 @@
1
- import { _ as e, u as l } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as i, ref as s, createElementBlock as a, openBlock as t, normalizeClass as m, Fragment as c, renderList as o, createElementVNode as n, createCommentVNode as f, createVNode as d, toDisplayString as p, unref as u, createBlock as r } from "vue";
3
- import { useResizeObserver as v } from "@mc-plus/hooks";
4
- import { M as k } from "./mc-icon-4B9i36Sx.js";
5
- import { M as y } from "./mc-divider-TCpxn8c3.js";
6
- import { M as b } from "./mc-progress-bar-tWHWi19h.js";
7
- import { u as g, g as C, f as _ } from "./mc-upload-CDkkDtlT.js";
8
- const w = "mc-file-list", h = { class: "mc-file-list-item-content" }, M = { class: "mc-file-list-item-file mc-file-list-item-info" }, j = ["onClick"], B = { class: "mc-file-list-item-file-name-text" }, V = { class: "mc-file-list-item-file-desc" }, x = { class: "mc-file-list-item-file-size-text" }, z = { key: 0, class: "mc-file-list-item-file-progress-bar" }, T = { key: 1, class: "mc-file-list-item-file-error" }, D = { class: "mc-file-list-item-info" }, I = { class: "mc-file-list-item-label" }, L = { class: "mc-file-list-item-value" }, R = { class: "mc-file-list-item-info" }, $ = { class: "mc-file-list-item-label" }, q = { class: "mc-file-list-item-value" }, A = { class: "mc-file-list-item-actions" }, E = { class: "mc-file-list-item-compact-content" }, F = { class: "mc-file-list-item-info" }, G = { class: "mc-file-list-item-label" }, H = { class: "mc-file-list-item-value" }, J = { class: "mc-file-list-item-info" }, K = { class: "mc-file-list-item-label" }, N = { class: "mc-file-list-item-value" }, O = e(i({ name: w, __name: "mc-file-list", props: { modelValue: { default: () => [] }, theme: { default: "light" }, lang: { default: "en" }, downloadable: { type: Boolean, default: false }, allowCancel: { type: Boolean, default: false }, deletable: { type: Boolean, default: true } }, emits: ["update:modelValue", "change", "delete", "download", "preview", "cancel"], setup(e2, { emit: l2 }) {
9
- const i2 = e2, w2 = l2, { langMap: O2 } = g(), P2 = s(false), Q = s();
10
- v(Q, ({ width: e3 }) => {
11
- P2.value = e3 <= 600;
12
- });
13
- const S = (e3) => {
14
- w2("update:modelValue", i2.modelValue.filter((l3) => l3.name !== e3.name));
15
- };
16
- return (l3, i3) => (t(), a("ul", { class: m(["mc-file-list", [`mc-file-list-${e2.theme}`, { "mc-file-list-compact": P2.value }]]), ref_key: "fileListRef", ref: Q }, [(t(true), a(c, null, o(e2.modelValue, (l4) => (t(), a("li", { class: "mc-file-list-item", key: l4.name }, [n("div", h, [n("div", M, [n("div", { class: "mc-file-list-item-file-name", onClick: (e3) => ((e4) => {
17
- w2("preview", e4);
18
- })(l4) }, [d(k, { name: "Document" }), n("span", B, p(l4.name), 1)], 8, j), n("div", V, ["failed" !== l4.status ? (t(), a(c, { key: 0 }, [n("span", x, p(l4.size ? u(C)(l4.size) : "--"), 1), "loading" === l4.status ? (t(), a("div", z, [d(b, { percentage: l4.progress, "transition-duration": 1e3 }, null, 8, ["percentage"])])) : f("", true)], 64)) : (t(), a("span", T, p(l4.errorMessage || "failed to upload"), 1))])]), P2.value ? f("", true) : (t(), a(c, { key: 0 }, [n("div", D, [n("span", I, p(u(O2).uploaded_by), 1), n("span", L, p(l4.uploadBy || "--"), 1)]), n("div", R, [n("span", $, p(u(O2).uploaded_on), 1), n("span", q, p(u(_)(l4.uploadTime) || "--"), 1)])], 64)), n("div", A, ["loading" === l4.status ? (t(), a(c, { key: 0 }, [e2.allowCancel ? (t(), r(k, { key: 0, name: "Cross", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
19
- w2("cancel", e4), S(e4);
20
- })(l4) }, null, 8, ["onClick"])) : f("", true)], 64)) : (t(), a(c, { key: 1 }, [e2.downloadable ? (t(), r(k, { key: 0, name: "Download", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
21
- w2("download", e4);
22
- })(l4) }, null, 8, ["onClick"])) : f("", true), e2.deletable ? (t(), r(k, { key: 1, name: "Trash", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
23
- w2("delete", e4), S(e4);
24
- })(l4) }, null, 8, ["onClick"])) : f("", true)], 64))])]), P2.value ? (t(), a(c, { key: 0 }, [d(y), n("div", E, [n("div", F, [n("span", G, p(u(O2).uploaded_by), 1), n("span", H, p(l4.uploadBy || "--"), 1)]), n("div", J, [n("span", K, p(u(O2).uploaded_on), 1), n("span", N, p(u(_)(l4.uploadTime) || "--"), 1)])])], 64)) : f("", true)]))), 128))], 2));
25
- } }), [["__scopeId", "data-v-bfa00e0d"]]), P = l(O);
26
- export {
27
- P as M,
28
- O as _,
29
- w as a
30
- };
@@ -1,69 +0,0 @@
1
- import { _ as e, u as r } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as t, inject as l, ref as o, computed as s, reactive as a, provide as i, onMounted as m, onUnmounted as d, createElementBlock as c, openBlock as u, normalizeClass as n, renderSlot as p, createElementVNode as v, createCommentVNode as f, toDisplayString as h, createVNode as g, createTextVNode as b, Transition as q, withCtx as _, nextTick as y } from "vue";
3
- import { isNil as F, filter as $, map as j, includes as P, keys as k, size as x, some as z, get as S, set as w, cloneDeep as B, isArray as M } from "lodash-es";
4
- import V from "async-validator";
5
- import { _ as I } from "./mc-tooltip-CDYY9-bd.js";
6
- import { F as A } from "./mc-form-C0bOl2Kn.js";
7
- const C = Symbol("mc-form-item-context"), D = "mc-form-item", E = { class: "mc-form-item-label-wrapper" }, G = { key: 0, class: "mc-form-item-label" }, H = { key: 0, class: "mc-form-item-help" }, J = { key: 0, class: "mc-form-item-desc" }, K = { class: "mc-form-item__content" }, L = { key: 0, class: "mc-form-item__error" }, N = r(e(t({ name: D, __name: "mc-form-item", props: { prop: { default: "" }, label: {}, disabled: { type: Boolean, default: false }, required: { type: Boolean, default: false }, rules: {}, help: {}, desc: {} }, setup(e2, { expose: r2 }) {
8
- const t2 = e2, D2 = l(A, void 0), N2 = o("init"), O = o(""), Q = (e3) => e3 && t2.prop && !F(S(e3, t2.prop)) ? S(e3, t2.prop) : null, R = s(() => {
9
- const e3 = D2 == null ? void 0 : D2.model;
10
- return Q(e3);
11
- }), T = s(() => {
12
- const e3 = [];
13
- t2.required && e3.push({ required: true }), t2.rules && e3.push(...t2.rules);
14
- const r3 = D2 == null ? void 0 : D2.rules;
15
- if (r3 && t2.prop) {
16
- const t3 = Q(r3);
17
- t3 && e3.push(...t3);
18
- }
19
- const l2 = t2.required;
20
- if (F(l2)) {
21
- const r4 = $(j(e3, (e4, r5) => [e4, r5]), (e4) => P(k(e4[0]), "required"));
22
- if (x(r4)) for (const t3 of r4) {
23
- const [r5, o2] = t3;
24
- r5.required !== l2 && (e3[o2] = { ...r5, required: l2 });
25
- }
26
- else e3.push({ required: l2 });
27
- }
28
- return e3;
29
- }), U = s(() => x(T.value) > 0), W = s(() => z(T.value, "required") || t2.required), X = s(() => t2.disabled);
30
- let Y = null, Z = false;
31
- const ee = (e3, r3) => {
32
- if (Z || !t2.prop || X.value) return Promise.resolve(true);
33
- if (!U.value) return r3 == null ? void 0 : r3(true), Promise.resolve(true);
34
- const l2 = ((e4) => {
35
- const r4 = T.value;
36
- return r4 ? $(r4, (r5) => !(!r5.trigger && e4 && "change" !== e4) && (!r5.trigger || !e4 || (M(r5.trigger) ? P(r5.trigger, e4) : r5.trigger === e4))).map(({ trigger: e5, ...r5 }) => r5) : [];
37
- })(e3);
38
- if (!x(l2)) return r3 == null ? void 0 : r3(true), Promise.resolve(true);
39
- N2.value = "validating";
40
- const o2 = ((e4) => {
41
- const r4 = t2.prop;
42
- return r4 ? new V({ [r4]: e4 }).validate({ [r4]: R.value }, { firstFields: true }).then(() => (N2.value = "success", D2 == null ? void 0 : D2.emits("validate", t2, true, ""), O.value = "", true)).catch((e5) => {
43
- const { errors: r5 } = e5;
44
- return N2.value = "error", O.value = r5 && x(r5) > 0 ? r5[0].message ?? "" : "", D2 == null ? void 0 : D2.emits("validate", t2, false, O.value), Promise.reject(e5);
45
- }) : null;
46
- })(l2);
47
- return o2 ? o2.then(() => (r3 == null ? void 0 : r3(true), true)).catch((e4) => {
48
- const { fields: t3 } = e4;
49
- return r3 == null ? void 0 : r3(false, t3), Promise.reject(t3);
50
- }) : Promise.reject(false);
51
- }, re = () => {
52
- const e3 = D2 == null ? void 0 : D2.model;
53
- e3 && t2.prop && !F(S(e3, t2.prop)) && (Z = true, w(e3, t2.prop, B(Y))), y(() => {
54
- te();
55
- });
56
- }, te = () => {
57
- N2.value = "init", O.value = "", Z = false;
58
- }, le = a({ id: o(""), prop: s(() => t2.prop ?? ""), validateStatus: s(() => N2.value), disabled: X, validate: ee, resetField: re, clearValidate: te }), oe = s(() => "horizontal" === (D2 == null ? void 0 : D2.direction));
59
- return i(C, le), m(() => {
60
- t2.prop && (D2 == null ? void 0 : D2.addField(le), Y = R.value);
61
- }), d(() => {
62
- t2.prop && (D2 == null ? void 0 : D2.removeField(le));
63
- }), r2({ validateMessage: O, validateStatus: N2, validate: ee, resetField: re, clearValidate: te }), (r3, t3) => (u(), c("div", { class: n(["mc-form-item", { "mc-form-item-horizontal": oe.value }]) }, [p(r3.$slots, "label", { required: W.value }, () => [v("div", null, [v("div", E, [e2.label ? (u(), c("label", G, [v("span", { class: n(["mc-form-item-lable-text", { "mc-form-item-label-required": W.value }]) }, h(e2.label), 3), e2.help || r3.$slots.help ? (u(), c("div", H, [p(r3.$slots, "help", {}, () => [g(I, { content: e2.help, "icon-size": 20 }, null, 8, ["content"])], true)])) : f("", true)])) : f("", true), p(r3.$slots, "tool", {}, void 0, true)]), e2.desc || r3.$slots.desc ? (u(), c("div", J, [p(r3.$slots, "desc", {}, () => [b(h(e2.desc), 1)], true)])) : f("", true)])], true), v("div", K, [p(r3.$slots, "default", {}, void 0, true), g(q, { name: "mc-form-item-error" }, { default: _(() => [O.value ? (u(), c("div", L, h(O.value), 1)) : f("", true)]), _: 1 })])], 2));
64
- } }), [["__scopeId", "data-v-7b5ddbdd"]]));
65
- export {
66
- C as F,
67
- N as M,
68
- D as a
69
- };
@@ -1,38 +0,0 @@
1
- import { _ as e, u as o } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as t, ref as l, watch as a, nextTick as i, createElementBlock as s, createCommentVNode as r, openBlock as d, createBlock as m, Teleport as f, createVNode as u, Transition as n, withCtx as c, normalizeClass as h, createElementVNode as p, renderSlot as v, normalizeStyle as g } from "vue";
3
- import { useWindowResize as b, useResizeObserver as x } from "@mc-plus/hooks";
4
- import { _ as y } from "./mc-overlay-D2fKzV9J.js";
5
- import { _ } from "./mc-modal-header-BgpxusVu.js";
6
- import { M as k } from "./mc-footer-DUC9ViQu.js";
7
- const w = "mc-lightbox", $ = { key: 0, class: "mc-lightbox-container" }, B = { class: "mc-lightbox-header" }, H = { key: 0, class: "mc-lightbox-bottom-padding" }, C = o(e(t({ name: w, __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 }, showBorder: { type: Boolean, default: false }, minHeight: { default: void 0 } }, emits: ["update:modelValue", "open", "close"], setup(e2, { expose: o2, emit: t2 }) {
8
- const w2 = e2, C2 = t2, V = l(), j = l(), R = l(), z = l(), F = l(false), M = l(false), S = l(false), I = () => {
9
- w2.maskClosable && D();
10
- }, q = () => {
11
- D();
12
- }, A = async (e3 = true) => {
13
- F.value = true, M.value = true, await i(), S.value = true, e3 && (C2("open"), C2("update:modelValue", true));
14
- }, D = async (e3 = true) => {
15
- S.value = false, await i(), M.value = false, await i(), F.value = false, e3 && (C2("close"), C2("update:modelValue", false));
16
- };
17
- a(() => w2.modelValue, (e3, o3) => {
18
- !o3 && e3 ? A(false) : o3 && !e3 && D(false);
19
- }, { immediate: true });
20
- const E = () => {
21
- var _a, _b;
22
- if (!R.value) return;
23
- const e3 = ((_a = j.value) == null ? void 0 : _a.offsetHeight) ?? 0, o3 = 0.7 * window.innerHeight - 84 - e3, t3 = ((_b = z.value) == null ? void 0 : _b.offsetHeight) ?? 40;
24
- R.value.style.height = `${t3 > o3 ? o3 : t3}px`;
25
- };
26
- return b(() => {
27
- E();
28
- }), x(j, async ({ height: e3 }) => {
29
- const o3 = V.value;
30
- o3 && (o3.style.paddingBottom = `${e3}px`, await i(), E());
31
- }), x(z, () => {
32
- E();
33
- }), o2({ ref: V, open: A, close: D }), (o3, t3) => F.value ? (d(), s("div", $, [(d(), m(f, { to: e2.portCssSelector }, [u(n, { name: "mc-lightbox-overlay" }, { default: c(() => [u(y, { visible: M.value, fixed: e2.fixed, onClick: I }, { default: c(() => [u(n, { name: "mc-lightbox-content" }, { default: c(() => [S.value ? (d(), s("div", { key: 0, class: h(["mc-lightbox", [`mc-lightbox-${e2.size}`]]), ref_key: "lightboxRef", ref: V }, [p("div", B, [v(o3.$slots, "header", {}, () => [u(_, { title: e2.title, "show-border": e2.showBorder, onClose: q }, { default: c(() => [v(o3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title", "show-border"])], true)]), p("div", { class: "mc-lightbox-content-wrapper", ref_key: "wrapperRef", ref: R }, [p("div", { class: "mc-lightbox-content", style: g({ minHeight: e2.minHeight ? `${e2.minHeight}px` : void 0 }), ref_key: "contentRef", ref: z }, [v(o3.$slots, "default", {}, void 0, true)], 4)], 512), p("div", { class: "mc-lightbox-footer", ref_key: "footerRef", ref: j }, [e2.hideFooter ? (d(), s("div", H)) : v(o3.$slots, "footer", { key: 1 }, () => [u(k, null, { left: c(() => [v(o3.$slots, "footer-left", {}, void 0, true)]), right: c(() => [v(o3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": c(() => [v(o3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: c(() => [v(o3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)], 512)], 2)) : r("", true)]), _: 3 })]), _: 3 }, 8, ["visible", "fixed"])]), _: 3 })], 8, ["to"]))])) : r("", true);
34
- } }), [["__scopeId", "data-v-0a4bb412"]]));
35
- export {
36
- C as M,
37
- w as a
38
- };
@@ -1,12 +0,0 @@
1
- import { _ as l, u as s } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as a, computed as i, createElementBlock as e, openBlock as o, normalizeClass as n, createCommentVNode as d, renderSlot as t, createElementVNode as m, createVNode as c, toDisplayString as p } from "vue";
3
- import { M as u } from "./mc-icon-4B9i36Sx.js";
4
- const g = "mc-loading", r = { key: 0, class: "mc-loading-pulse" }, f = { key: 1, class: "mc-loading-spin" }, v = { class: "mc-loading-text" }, y = l(a({ name: g, __name: "mc-loading", props: { loading: { type: Boolean }, loadingText: {}, size: { default: "medium" }, type: { default: "spin" } }, setup(l2) {
5
- const s2 = l2, a2 = i(() => "small" === s2.size ? 24 : "medium" === s2.size ? 32 : 64);
6
- return (s3, i2) => (o(), e("div", { class: n(["mc-loading", [`mc-loading-${l2.size}`, { "mc-loading-active": l2.loading }]]) }, ["pulse" === l2.type ? (o(), e("div", r, [...i2[0] || (i2[0] = [m("i", { class: "mc-loading-pulse-dot" }, null, -1), m("i", { class: "mc-loading-pulse-dot" }, null, -1), m("i", { class: "mc-loading-pulse-dot" }, null, -1), m("i", { class: "mc-loading-pulse-dot" }, null, -1)])])) : "spin" === l2.type ? (o(), e("div", f, [c(u, { name: "Loading_Line", size: a2.value }, null, 8, ["size"])])) : d("", true), l2.loadingText || s3.$slots.default ? t(s3.$slots, "default", { key: 2 }, () => [m("p", v, p(l2.loadingText), 1)], true) : d("", true)], 2));
7
- } }), [["__scopeId", "data-v-9130fb96"]]), z = s(y);
8
- export {
9
- y as M,
10
- z as a,
11
- g as b
12
- };
@@ -1,13 +0,0 @@
1
- import { _ as e, u as o } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as s, createElementBlock as t, openBlock as a, createVNode as l, withCtx as r, renderSlot as m } from "vue";
3
- import { M as d } from "./mc-icon-4B9i36Sx.js";
4
- import { _ as c } from "./mc-title-RVvmAnbZ.js";
5
- const i = "mc-modal-header", h = { class: "mc-modal-header" }, n = e(s({ name: i, __name: "mc-modal-header", props: { title: {}, showBorder: { type: Boolean, default: true }, showClose: { type: Boolean, default: true } }, emits: ["close"], setup(e2, { emit: o2 }) {
6
- const s2 = o2;
7
- return (o3, i2) => (a(), t("div", h, [l(c, { title: e2.title, "show-border": e2.showBorder, height: "100%", class: "mc-modal-header-title" }, { "tool-bar": r(() => [l(d, { name: "Cross", size: 24, class: "mc-modal-header-close-icon", onClick: i2[0] || (i2[0] = (e3) => s2("close")) })]), default: r(() => [m(o3.$slots, "default", {}, void 0, true)]), _: 3 }, 8, ["title", "show-border"])]));
8
- } }), [["__scopeId", "data-v-4f75e89c"]]), p = o(n);
9
- export {
10
- p as M,
11
- n as _,
12
- i as a
13
- };
@@ -1,16 +0,0 @@
1
- import { _ as l, u as a } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as e, computed as s, createElementBlock as t, openBlock as m, normalizeClass as i, createCommentVNode as o, createElementVNode as d, Fragment as c, createVNode as u, toDisplayString as b, renderList as r, createBlock as n } from "vue";
3
- import { M as g } from "./mc-icon-plus-DcQPxofD.js";
4
- import { _ as p } from "./mc-removable-tag-DhIpXh1a.js";
5
- const v = "mc-multi-tag", f = { class: "mc-multi-tag-label" }, _ = { class: "mc-multi-tag-option-list" }, j = a(l(e({ name: v, __name: "mc-multi-tag", props: { label: {}, tags: { default: () => [] }, disabled: { type: Boolean, default: false }, disableTags: { default: () => [] } }, emits: ["remove:all", "remove:tag"], setup(l2, { emit: a2 }) {
6
- const e2 = l2, v2 = a2, j2 = s(() => e2.disabled || e2.disableTags.length), k = (l3) => !!e2.disabled || !!e2.disableTags.includes(l3), y = (l3) => {
7
- e2.disabled || v2("remove:tag", l3, e2.label);
8
- }, T = () => {
9
- j2.value || v2("remove:all", e2.label);
10
- };
11
- return (a3, e3) => (m(), t("li", { class: i(["mc-multi-tag", { "mc-multi-tag-disabled": l2.disabled }]) }, [j2.value ? o("", true) : (m(), t(c, { key: 0 }, [u(g, { class: "mc-multi-tag-close-all-icon", name: "cross", onClick: T }), e3[0] || (e3[0] = d("i", { class: "mc-multi-tag-divider" }, null, -1))], 64)), d("span", f, b(`${l2.label} :`), 1), d("ul", _, [(m(true), t(c, null, r(l2.tags, (l3) => (m(), n(p, { key: l3, label: l3, disabled: k(l3), onRemove: y }, null, 8, ["label", "disabled"]))), 128))])], 2));
12
- } }), [["__scopeId", "data-v-4c072be0"]]));
13
- export {
14
- j as M,
15
- v as a
16
- };
@@ -1,35 +0,0 @@
1
- import { _ as e, u as o } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as a, ref as r, computed as t, watch as l, onUnmounted as p, watchEffect as s, createElementBlock as i, openBlock as u, mergeProps as c, toHandlers as n, createElementVNode as m, createVNode as d, renderSlot as v, Transition as f, withCtx as g, createCommentVNode as h, createTextVNode as k, toDisplayString as w } from "vue";
3
- import { createPopper as _ } from "@popperjs/core";
4
- import { debounce as y, bind as b, isNil as N } from "lodash-es";
5
- import { useClickOutside as T } from "@mc-plus/hooks";
6
- const j = "mc-popper", x = { key: 0, id: "arrow", class: "mc-popper-arrow", "data-popper-arrow": "" }, A = e(a({ name: j, __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: o2, emit: a2 }) {
7
- const j2 = e2, A2 = a2, B2 = r({}), O = r({}), $ = r({}), I = r(), M = r(), q = r(), z = r(false), C = (e3) => {
8
- j2.disabled && (e3 = false), z.value = e3, A2("visible:change", e3);
9
- }, D = t(() => ({ placement: j2.placement, modifiers: [{ name: "offset", options: { offset: [0, 8] } }], ...j2.popperOptions }));
10
- let E, F, G;
11
- l(z, (e3) => {
12
- e3 && M.value && q.value && (E = _(M.value, q.value, D.value));
13
- }, { flush: "post" }), p(() => {
14
- N(E) || (E.destroy(), E = void 0);
15
- });
16
- const H = t(() => "hover" === j2.trigger ? j2.showTimeout : 0), J = t(() => "hover" === j2.trigger ? j2.hideTimeout : 0);
17
- s(() => {
18
- B2.value = {}, O.value = {}, $.value = {}, j2.disabled ? L(false) : "click" === j2.trigger ? B2.value.click = () => {
19
- z.value ? L() : K();
20
- } : "hover" === j2.trigger && (B2.value.mouseenter = () => K(), O.value.mouseleave = () => L(), $.value.mouseenter = () => K()), F = y(b(C, null, true), H.value), G = y(b(C, null, false), J.value);
21
- });
22
- const K = (e3 = true) => {
23
- G == null ? void 0 : G.cancel(), e3 ? F == null ? void 0 : F() : C(true);
24
- }, L = (e3 = true) => {
25
- F == null ? void 0 : F.cancel(), e3 ? G == null ? void 0 : G() : C(false);
26
- };
27
- return T(I, () => {
28
- A2("click:outside"), "click" === j2.trigger && z.value && L(false);
29
- }), o2({ show: () => K(false), hide: () => L(false) }), (o3, a3) => (u(), i("div", c({ class: "mc-popper", ref_key: "containerNode", ref: I }, n(O.value, true)), [m("div", c({ class: "mc-popper-trigger", ref_key: "triggerNode", ref: M }, n(B2.value, true)), [v(o3.$slots, "default", {}, void 0, true)], 16), d(f, { name: e2.transitionName }, { default: g(() => [z.value ? (u(), i("div", c({ key: 0, class: "mc-popper-popper", ref_key: "popperNode", ref: q }, n($.value, true)), [v(o3.$slots, "content", {}, () => [k(w(e2.content), 1)], true), e2.showArrow ? (u(), i("div", x)) : h("", true)], 16)) : h("", true)]), _: 3 }, 8, ["name"])], 16));
30
- } }), [["__scopeId", "data-v-96fe7118"]]), B = o(A);
31
- export {
32
- A as M,
33
- B as a,
34
- j as b
35
- };
@@ -1,30 +0,0 @@
1
- import { _ as e, u as r } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as s, ref as a, watchEffect as t, computed as o, watch as p, useSlots as m, createElementBlock as l, openBlock as n, normalizeStyle as c, unref as i, createElementVNode as u, createCommentVNode as d, renderSlot as g, toDisplayString as h } from "vue";
3
- import { ceil as f } from "lodash-es";
4
- import { useWidthHeight as v } from "@mc-plus/hooks";
5
- const b = "mc-progress-bar", k = { key: 0, class: "mc-progress-bar-shimmer" }, y = { key: 0, class: "mc-progress-bar-remarks" }, w = e(s({ name: b, __name: "mc-progress-bar", props: { percentage: { default: 0 }, height: { default: "4px" }, width: { default: "100%" }, remarks: {}, showPercentage: { type: Boolean, default: false }, transitionDuration: { default: 300 }, shimmer: { type: Boolean, default: false } }, emits: ["update:percentage", "complete"], setup(e2, { expose: r2, emit: s2 }) {
6
- const b2 = e2, w2 = s2, { width: _2, height: P } = v(), $ = a();
7
- t(() => {
8
- $.value && $.value.style.setProperty("--border-radius", P.value || "auto");
9
- });
10
- const x = o(() => {
11
- const e3 = b2.percentage / 100;
12
- return e3 > 1 ? 1 : e3 < 0 ? 0 : e3;
13
- });
14
- p(() => b2.percentage, (e3) => {
15
- e3 >= 100 && w2("complete");
16
- }, { immediate: true });
17
- const B = m(), D = o(() => b2.showPercentage || !!b2.remarks || !!B.remarks);
18
- return r2({ updatePercentage: (e3) => {
19
- w2("update:percentage", e3);
20
- }, complete: () => {
21
- w2("update:percentage", 100), w2("complete");
22
- }, reset: () => {
23
- w2("update:percentage", 0);
24
- } }), (r3, s3) => (n(), l("div", { class: "mc-progress-bar", style: c({ width: i(_2) }) }, [u("div", { ref_key: "progressBarRef", ref: $, class: "mc-progress-bar-wrapper", style: c({ width: i(_2), height: i(P) }) }, [u("div", { class: "mc-progress-bar-inner", style: c({ transform: `scaleX(${x.value})`, transitionDuration: `${e2.transitionDuration}ms` }) }, null, 4), e2.shimmer ? (n(), l("i", k)) : d("", true)], 4), D.value ? (n(), l("div", y, [g(r3.$slots, "remarks", {}, () => [u("span", null, h(e2.remarks || `${i(f)(100 * x.value)}%`), 1)], true)])) : d("", true)], 4));
25
- } }), [["__scopeId", "data-v-7ebc305e"]]), _ = r(w);
26
- export {
27
- w as M,
28
- _ as a,
29
- b
30
- };
@@ -1,22 +0,0 @@
1
- import { _ as e, u as a } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as r, inject as l, ref as o, computed as s, createElementBlock as i, openBlock as c, normalizeClass as d, createElementVNode as t, withModifiers as m, unref as p, withKeys as n, createCommentVNode as u, renderSlot as f, createTextVNode as v, toDisplayString as b, createVNode as h, nextTick as k } from "vue";
3
- import { useFocus as y } from "@mc-plus/hooks";
4
- import { _ } from "./mc-tooltip-CDYY9-bd.js";
5
- import { M as j } from "./mc-radio-group-BhsM5bEB.js";
6
- import { u as w } from "./mc-form-C0bOl2Kn.js";
7
- const B = "mc-radio", $ = ["disabled", "onKeypress"], D = { class: "mc-radio-wrapper" }, F = { class: "mc-radio-content" }, R = { key: 0, class: "mc-radio-help" }, S = { class: "mc-radio-remark" }, g = a(e(r({ name: B, __name: "mc-radio", props: { label: {}, value: { type: [Number, String, Boolean] }, disabled: { type: Boolean }, remark: {}, help: {} }, emits: ["focus", "blur"], setup(e2) {
8
- const a2 = e2, r2 = l(j, void 0), B2 = o(), { wrapperRef: g2, isFocused: x, handleFocus: I, handleBlur: K } = y(B2), M = s(() => {
9
- var _a;
10
- return ((_a = r2 == null ? void 0 : r2.modelValue) == null ? void 0 : _a.value) === a2.value;
11
- }), { formItem: z, formDisabled: C, validateStyle: N } = w({ externalDisabled: s(() => {
12
- var _a;
13
- return !!((_a = r2 == null ? void 0 : r2.disabled) == null ? void 0 : _a.value);
14
- }) }), V = async () => {
15
- C.value || (r2 == null ? void 0 : r2.handleSelect(a2.value), await k(), z == null ? void 0 : z.validate("input"));
16
- };
17
- return (a3, r3) => (c(), i("div", { ref_key: "wrapperRef", ref: g2, class: d(["mc-radio", { "mc-radio-has-remark": !!e2.remark }]) }, [t("label", { class: d(["mc-radio-label", { "mc-radio-checked": M.value, "mc-radio-disabled": p(C), "mc-radio-focused": p(x), [p(N)]: p(N) }]), onClick: m(V, ["prevent"]) }, [t("input", { ref_key: "inputRef", ref: B2, type: "radio", class: "mc-radio-input", disabled: p(C), onFocus: r3[0] || (r3[0] = (...e3) => p(I) && p(I)(...e3)), onBlur: r3[1] || (r3[1] = (...e3) => p(K) && p(K)(...e3)), onKeypress: n(m(V, ["prevent", "stop"]), ["enter"]) }, null, 40, $), t("div", D, [r3[2] || (r3[2] = t("span", { class: "mc-radio-circle" }, null, -1)), t("div", F, [f(a3.$slots, "default", {}, () => [v(b(e2.label), 1)], true)]), e2.help || a3.$slots.help ? (c(), i("div", R, [f(a3.$slots, "help", {}, () => [h(_, { content: e2.help, "icon-size": 24 }, null, 8, ["content"])], true)])) : u("", true)])], 2), t("div", S, [f(a3.$slots, "remark", {}, () => [v(b(e2.remark), 1)], true)])], 2));
18
- } }), [["__scopeId", "data-v-fef5025c"]]));
19
- export {
20
- g as M,
21
- B as a
22
- };
@@ -1,14 +0,0 @@
1
- import { _ as e, u as a } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as l, createElementBlock as s, openBlock as o, normalizeClass as m, createElementVNode as t, createBlock as r, createCommentVNode as c, renderSlot as b, createTextVNode as d, toDisplayString as i } from "vue";
3
- import { M as n } from "./mc-icon-plus-DcQPxofD.js";
4
- const p = "mc-removable-tag", u = { class: "mc-removable-tag-content" }, v = e(l({ name: p, __name: "mc-removable-tag", props: { label: {}, disabled: { type: Boolean, default: false } }, emits: ["remove"], setup(e2, { emit: a2 }) {
5
- const l2 = e2, p2 = a2, v2 = () => {
6
- l2.disabled || p2("remove", l2.label);
7
- };
8
- return (a3, l3) => (o(), s("li", { class: m(["mc-removable-tag", { "mc-removable-tag-disabled": e2.disabled }]) }, [t("span", u, [b(a3.$slots, "default", { label: e2.label }, () => [d(i(e2.label), 1)], true)]), e2.disabled ? c("", true) : (o(), r(n, { key: 0, class: "mc-removable-tag-close-icon", name: "cross", cursor: e2.disabled ? "not-allowed" : "pointer", onClick: v2 }, null, 8, ["cursor"]))], 2));
9
- } }), [["__scopeId", "data-v-1770ff38"]]), f = a(v);
10
- export {
11
- f as M,
12
- v as _,
13
- p as a
14
- };
@@ -1,14 +0,0 @@
1
- import { defineComponent as e, ref as t, computed as a, createElementBlock as s, openBlock as o, createVNode as r, createElementVNode as l, normalizeClass as u, renderSlot as m, createTextVNode as n } from "vue";
2
- import { p as c, _ as i, u as d } from "./utils-y7s5KtP-.js";
3
- import { M as p } from "./mc-icon-4B9i36Sx.js";
4
- const f = "mc-reset", v = i(e({ name: f, __name: "mc-reset", props: { rotate: { type: Boolean, default: false }, autoRotate: { type: Boolean, default: true }, duration: { default: 300 } }, emits: ["reset"], setup(e2, { emit: i2 }) {
5
- const d2 = e2, f2 = i2, v2 = t(false), _2 = a(() => d2.autoRotate ? v2.value : d2.rotate), R = async () => {
6
- f2("reset"), d2.autoRotate && (v2.value = true, await c(d2.duration), v2.value = false);
7
- };
8
- return (e3, t2) => (o(), s("div", { class: "mc-reset", onClick: R }, [r(p, { name: "Refresh", size: 24, class: u(["mc-reset-icon", { "mc-reset-rotate": _2.value }]) }, null, 8, ["class"]), l("span", null, [m(e3.$slots, "default", {}, () => [t2[0] || (t2[0] = n("Reset", -1))], true)])]));
9
- } }), [["__scopeId", "data-v-dd6a55f3"]]), _ = d(v);
10
- export {
11
- _ as M,
12
- v as _,
13
- f as a
14
- };
@@ -1,14 +0,0 @@
1
- import { u as e } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as l, createElementBlock as o, openBlock as t, createVNode as a } from "vue";
3
- import { M as m } from "./mc-checkbox-C-9q1uwS.js";
4
- const d = "mc-select-multi-option", s = { class: "mc-select-multi-option" }, i = l({ name: d, __name: "mc-select-multi-option", props: { modelValue: { type: Boolean, default: false }, label: {}, disabled: { type: Boolean, default: false } }, emits: ["update:modelValue"], setup(e2, { emit: l2 }) {
5
- const d2 = l2, i2 = (e3) => {
6
- d2("update:modelValue", e3);
7
- };
8
- return (l3, d3) => (t(), o("div", s, [a(m, { "model-value": e2.modelValue, content: e2.label, "disable-validation": "", disabled: e2.disabled, "onUpdate:modelValue": i2 }, null, 8, ["model-value", "content", "disabled"])]));
9
- } }), u = e(i);
10
- export {
11
- u as M,
12
- i as _,
13
- d as a
14
- };
@@ -1,8 +0,0 @@
1
- import { _ as s, u as t } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as a, createElementBlock as c, openBlock as o, normalizeClass as m, createElementVNode as e, createVNode as i, renderSlot as p } from "vue";
3
- import { M as u } from "./mc-icon-4B9i36Sx.js";
4
- const n = "mc-status", r = { class: "mc-status-icon" }, d = { class: "mc-status-content" }, f = t(s(a({ name: n, __name: "mc-status", props: { type: { default: "info" } }, setup: (s2) => (t2, a2) => (o(), c("div", { class: m(["mc-status", [`mc-status-${s2.type}`]]) }, [e("div", r, [i(u, { name: "Indicator", size: 12 })]), e("p", d, [p(t2.$slots, "default", {}, void 0, true)])], 2)) }), [["__scopeId", "data-v-bc58faf1"]]));
5
- export {
6
- f as M,
7
- n as a
8
- };
@@ -1,52 +0,0 @@
1
- import { _ as e, u as t } from "./utils-y7s5KtP-.js";
2
- import { defineComponent as s, computed as l, ref as c, watch as i, onMounted as n, nextTick as m, createElementBlock as a, openBlock as o, normalizeClass as u, createElementVNode as p, createCommentVNode as r, Fragment as d, renderList as v, createBlock as y, toDisplayString as f, resolveDynamicComponent as h } from "vue";
3
- import { findIndex as g, find as k, throttle as b } from "lodash-es";
4
- import { useWindowResize as _ } from "@mc-plus/hooks";
5
- import { M as R } from "./mc-success-icon-CuyL6DXB.js";
6
- const w = "mc-step", x = { class: "mc-step-number-container" }, C = { class: "mc-step-item-number" }, S = { key: 0, class: "mc-step-item-number-text" }, V = { class: "mc-step-item-content" }, B = { key: 0, class: "mc-step-item-content-title" }, q = { class: "mc-step-item-label" }, j = { class: "mc-step-item-desc" }, A = { key: 1, class: "mc-step-item-component" }, L = { key: 0, class: "mc-step-item-component" }, M = t(e(s({ name: w, __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: t2, emit: s2 }) {
7
- const w2 = e2, M2 = l(() => "vertical" === w2.type), $ = s2, z = c(), I = c(), D = c(), E = c(), F = l(() => g(w2.steps, (e3) => e3.key === w2.modelValue)), G = l(() => {
8
- var _a;
9
- return (_a = w2.steps[F.value - 1]) == null ? void 0 : _a.key;
10
- });
11
- i(() => w2.modelValue, (e3) => {
12
- J(), $("change", e3);
13
- }, { flush: "post" });
14
- const H = c(), J = (e3 = G.value) => {
15
- H.value = e3, $("success", e3);
16
- }, K = l(() => g(w2.steps, (e3) => e3.key === H.value));
17
- n(() => {
18
- M2.value ? N() : (O(), P()), J();
19
- });
20
- const N = async () => {
21
- await m();
22
- const e3 = K.value, t3 = E.value;
23
- if (e3 < 0) return void (t3.style.height = "0");
24
- const s3 = I.value, l2 = s3.querySelectorAll(".mc-step-item");
25
- if (e3 + 1 > l2.length - 1) return void (t3.style.height = "100%");
26
- const c2 = l2 == null ? void 0 : l2[e3 + 1], i2 = s3.getBoundingClientRect(), n2 = (c2.getBoundingClientRect().top - i2.top) / (i2.height - 24);
27
- t3.style.height = 100 * n2 + "%";
28
- }, O = () => {
29
- var _a, _b;
30
- const e3 = I.value, t3 = D.value, s3 = e3.querySelectorAll(".mc-step-item"), l2 = (_a = s3 == null ? void 0 : s3[0]) == null ? void 0 : _a.querySelector(".mc-step-item-number"), c2 = (_b = s3 == null ? void 0 : s3[s3.length - 1]) == null ? void 0 : _b.querySelector(".mc-step-item-number");
31
- if (!l2 || !c2) return void (t3.style.width = "0px");
32
- const i2 = e3.getBoundingClientRect(), n2 = l2.getBoundingClientRect(), m2 = c2.getBoundingClientRect();
33
- t3.style.width = m2.left - n2.left - n2.width + "px", t3.style.left = `${n2.left - i2.left + n2.width}px`;
34
- }, P = () => {
35
- const e3 = E.value, t3 = K.value;
36
- if (t3 < 0) return void (e3.style.width = "0");
37
- const s3 = (t3 + 1) / (w2.steps.length - 1), l2 = s3 > 1 ? 1 : s3;
38
- e3.style.width = 100 * l2 + "%";
39
- }, Q = (e3) => M2.value && e3.component && e3.key === w2.modelValue, T = l(() => {
40
- var _a;
41
- return !M2.value && ((_a = k(w2.steps, (e3) => e3.key === w2.modelValue)) == null ? void 0 : _a.component);
42
- });
43
- return i(() => H.value, () => {
44
- M2.value ? N() : P();
45
- }), _(b(() => {
46
- M2.value ? N() : (O(), P());
47
- }, 50)), t2({ ref: z, setSuccessStep: J }), (t3, s3) => (o(), a("div", { class: u(["mc-step", `mc-step-${e2.type}`]), ref_key: "_ref", ref: z }, [p("ul", { class: "mc-step-item-container", ref_key: "stepContainerRef", ref: I }, [(o(true), a(d, null, v(e2.steps, (t4, s4) => (o(), a("li", { class: u(["mc-step-item", { "mc-step-item-active": e2.modelValue === t4.key, "mc-step-item-disabled": t4.disabled, "mc-step-item-success": s4 <= K.value }]), key: t4.key }, [p("div", x, [p("div", C, [s4 > K.value || t4.disabled ? (o(), a("span", S, f(s4 + 1), 1)) : (o(), y(R, { key: 1 }))])]), p("div", V, [t4.label || t4.desc ? (o(), a("div", B, [p("h3", q, f(t4.label), 1), p("p", j, f(t4.desc), 1)])) : r("", true), Q(t4) ? (o(), a("div", A, [(o(), y(h(t4.component)))])) : r("", true)])], 2))), 128)), p("div", { ref_key: "unsuccessLineRef", ref: D, class: "mc-step-line mc-step-unsuccess-line" }, [p("div", { ref_key: "successLineRef", ref: E, class: "mc-step-success-line" }, null, 512)], 512)], 512), T.value ? (o(), a("div", L, [(o(), y(h(T.value)))])) : r("", true)], 2));
48
- } }), [["__scopeId", "data-v-109c5122"]]));
49
- export {
50
- M,
51
- w as a
52
- };