mc-plus 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +26 -24
- package/dist/es/mc-divider-DnJ_rBx3.js +6 -0
- package/dist/es/{mc-drawer-DisIn2l4.js → mc-drawer-BnAa3qbE.js} +3 -3
- package/dist/es/{mc-modal-header-DZSXJiOS.js → mc-modal-header-BGIHubPQ.js} +6 -6
- package/dist/es/{mc-tab-BWdnKUwn.js → mc-tab-CGsHEm__.js} +21 -21
- package/dist/es/mc-tag-CfYut-mf.js +33 -0
- package/dist/es/{mc-title-Cxw2nb6C.js → mc-title-7qDFxVvc.js} +2 -2
- package/dist/es/theme/index.css +1 -1
- package/dist/es/theme/mc-divider.css +1 -0
- package/dist/es/theme/mc-tab.css +1 -1
- package/dist/es/theme/mc-tag.css +1 -1
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/mc-divider/index.d.ts +26 -0
- package/dist/types/components/mc-divider/types.d.ts +8 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +3 -3
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-tag-8TA3X0ap.js +0 -33
package/dist/es/index.js
CHANGED
|
@@ -13,33 +13,35 @@ import { a as a2 } from "./mc-message-qDiSEyiP.js";
|
|
|
13
13
|
import { M as n, a as x } from "./mc-radio-TczsTpWI.js";
|
|
14
14
|
import { M as h, a as S, b as T } from "./mc-select-Dze2qYyc.js";
|
|
15
15
|
import { M as k } from "./mc-switch-COmM8JEx.js";
|
|
16
|
-
import { M as
|
|
17
|
-
import { u, c as c2, d } from "./mc-tab-
|
|
18
|
-
import { M as
|
|
19
|
-
import { M as
|
|
16
|
+
import { M as w, a as P, b as q } from "./mc-tab-CGsHEm__.js";
|
|
17
|
+
import { u, c as c2, d } from "./mc-tab-CGsHEm__.js";
|
|
18
|
+
import { M as v } from "./mc-tag-CfYut-mf.js";
|
|
19
|
+
import { M as y } from "./mc-toast-BrmJXXuA.js";
|
|
20
20
|
import { c as c3, t, e, a as a3, b, d as d2 } from "./mc-toast-BrmJXXuA.js";
|
|
21
|
-
import { M as
|
|
22
|
-
import { M as
|
|
23
|
-
import { M as
|
|
24
|
-
import { M as
|
|
25
|
-
import { a as z, b as A } from "./mc-title-
|
|
21
|
+
import { M as C } from "./mc-tooltip-DaScOiNB.js";
|
|
22
|
+
import { M as E } from "./mc-step-B5mjO4hJ.js";
|
|
23
|
+
import { M as I, b as L } from "./mc-form-CZ8r5JMG.js";
|
|
24
|
+
import { M as W } from "./mc-success-icon-BB5f9EEL.js";
|
|
25
|
+
import { a as z, b as A } from "./mc-title-7qDFxVvc.js";
|
|
26
26
|
import { a as B } from "./mc-footer-CqXN9f49.js";
|
|
27
|
-
import { a as D } from "./mc-modal-header-
|
|
28
|
-
import { M as F } from "./mc-drawer-
|
|
27
|
+
import { a as D } from "./mc-modal-header-BGIHubPQ.js";
|
|
28
|
+
import { M as F } from "./mc-drawer-BnAa3qbE.js";
|
|
29
29
|
import { M as G } from "./mc-reset-C2LQOIpe.js";
|
|
30
|
-
|
|
30
|
+
import { M as H } from "./mc-divider-DnJ_rBx3.js";
|
|
31
|
+
const J = [r, p, C, w, k, n, x, h, S, T, i, m, M, g, v, y, E, I, L, j, f, W, z, B, A, D, F, P, q, G, H];
|
|
31
32
|
s();
|
|
32
|
-
const
|
|
33
|
+
const K = o(J);
|
|
33
34
|
export {
|
|
34
35
|
m as McAlert,
|
|
35
36
|
r as McButton,
|
|
36
37
|
i as McCheckbox,
|
|
37
38
|
p as McCollapse,
|
|
38
39
|
a as McCollapseItem,
|
|
40
|
+
H as McDivider,
|
|
39
41
|
F as McDrawer,
|
|
40
42
|
B as McFooter,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
I as McForm,
|
|
44
|
+
L as McFormItem,
|
|
43
45
|
f as McIcon,
|
|
44
46
|
j as McInput,
|
|
45
47
|
M as McLightBox,
|
|
@@ -51,21 +53,21 @@ export {
|
|
|
51
53
|
h as McSelect,
|
|
52
54
|
S as McSelectGroup,
|
|
53
55
|
T as McSelectOption,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
E as McStep,
|
|
57
|
+
W as McSuccessIcon,
|
|
56
58
|
k as McSwitch,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
P as McTab,
|
|
60
|
+
q as McTabItem,
|
|
61
|
+
w as McTable,
|
|
62
|
+
v as McTag,
|
|
61
63
|
z as McTitle,
|
|
62
64
|
A as McTitleToolBar,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
y as McToast,
|
|
66
|
+
C as McTooltip,
|
|
65
67
|
a2 as Message,
|
|
66
68
|
c as createLightbox,
|
|
67
69
|
c3 as createToast,
|
|
68
|
-
|
|
70
|
+
K as default,
|
|
69
71
|
l as lightbox,
|
|
70
72
|
t as toast,
|
|
71
73
|
e as toastError,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { defineComponent as i, createElementBlock as e, openBlock as a, normalizeClass as d } from "vue";
|
|
2
|
+
import { _ as s, w as m } from "./utils-CMUecsjZ.js";
|
|
3
|
+
const r = m(s(i({ name: "McDivider", __name: "mc-divider", props: { size: { default: "small" }, emphasis: { default: "minimal" }, orientation: { default: "horizontal" } }, setup: (i2) => (i3, s2) => (a(), e("div", { class: d(["mc-divider", [`mc-divider-${i3.orientation}`, `mc-divider-${i3.size}`, `mc-divider-${i3.emphasis}`]]) }, null, 2)) }), [["__scopeId", "data-v-6b53d9f6"]]));
|
|
4
|
+
export {
|
|
5
|
+
r as M
|
|
6
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, watch as l, createElementBlock as o, createCommentVNode as a, openBlock as i, createBlock as n, Teleport as
|
|
1
|
+
import { defineComponent as e, ref as t, watch as l, createElementBlock as o, createCommentVNode as a, openBlock as i, createBlock as n, Teleport as d, createVNode as c, Transition as r, withCtx as s, normalizeClass as u, createElementVNode as f, renderSlot as m, createTextVNode as p, toDisplayString as h, nextTick as y } from "vue";
|
|
2
2
|
import { M as v } from "./mc-overlay-DwuQMb48.js";
|
|
3
|
-
import { M as B } from "./mc-modal-header-
|
|
3
|
+
import { M as B } from "./mc-modal-header-BGIHubPQ.js";
|
|
4
4
|
import { M as g } from "./mc-footer-CqXN9f49.js";
|
|
5
5
|
import { M as b } from "./mc-button-BeOONixM.js";
|
|
6
6
|
import { _ as w, w as k } from "./utils-CMUecsjZ.js";
|
|
@@ -20,7 +20,7 @@ const _ = { key: 0, class: "mc-drawer-container" }, x = { class: "mc-drawer-head
|
|
|
20
20
|
}, E = (e3) => {
|
|
21
21
|
e3 && D(e3);
|
|
22
22
|
}, F = t();
|
|
23
|
-
return w2({ ref: F, open: O, close: S }), (e3, t2) => V.value ? (i(), o("div", _, [(i(), n(
|
|
23
|
+
return w2({ ref: F, open: O, close: S }), (e3, t2) => V.value ? (i(), o("div", _, [(i(), n(d, { to: e3.portCssSelector }, [c(r, { name: "mc-drawer-overlay" }, { default: s(() => [c(v, { visible: $.value, fixed: e3.fixed, onClick: q }, { default: s(() => [c(r, { name: "mc-drawer-content" }, { default: s(() => [z.value ? (i(), o("div", { key: 0, class: u(["mc-drawer", [`mc-drawer-${e3.size}`]]), ref_key: "_ref", ref: F }, [f("div", x, [c(B, { title: e3.title, onClose: A }, null, 8, ["title"])]), f("div", C, [f("div", I, [m(e3.$slots, "default", {}, void 0, true)])]), f("div", M, [c(g, null, { left: s(() => [m(e3.$slots, "footer-left", {}, () => {
|
|
24
24
|
var _a, _b, _c, _d;
|
|
25
25
|
return [((_a = e3.leftButton) == null ? void 0 : _a.hidden) ? a("", true) : (i(), n(b, { key: 0, type: "plain", class: "mc-drawer-button", "left-icon": (_b = e3.leftButton) == null ? void 0 : _b.leftIcon, "right-icon": (_c = e3.leftButton) == null ? void 0 : _c.rightIcon, disabled: (_d = e3.leftButton) == null ? void 0 : _d.disable, onClick: t2[0] || (t2[0] = (t3) => {
|
|
26
26
|
var _a2;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as o, openBlock as s, createVNode as t, withCtx as a } from "vue";
|
|
2
2
|
import { M as l } from "./mc-icon-oTgV9pMA.js";
|
|
3
|
-
import { M as m } from "./mc-title-
|
|
4
|
-
import { _ as r, w as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
return (e3, r3) => (s(), o("div",
|
|
8
|
-
} }), [["__scopeId", "data-v-05d35494"]]), n =
|
|
3
|
+
import { M as m } from "./mc-title-7qDFxVvc.js";
|
|
4
|
+
import { _ as r, w as i } from "./utils-CMUecsjZ.js";
|
|
5
|
+
const c = { class: "mc-modal-header" }, d = r(e({ name: "McModalHeader", __name: "mc-modal-header", props: { title: {}, showClose: { type: Boolean, default: true } }, emits: ["close"], setup(e2, { emit: r2 }) {
|
|
6
|
+
const i2 = r2;
|
|
7
|
+
return (e3, r3) => (s(), o("div", c, [t(m, { title: e3.title, "show-border": "", height: "100%", class: "mc-modal-header-title" }, { "tool-bar": a(() => [t(l, { name: "Cross", size: 24, class: "mc-modal-header-close-icon", onClick: r3[0] || (r3[0] = (e4) => i2("close")) })]), _: 1 }, 8, ["title"])]));
|
|
8
|
+
} }), [["__scopeId", "data-v-05d35494"]]), n = i(d);
|
|
9
9
|
export {
|
|
10
10
|
d as M,
|
|
11
11
|
n as a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as a, createElementBlock as l, createCommentVNode as n, openBlock as t, normalizeClass as o, renderSlot as i, Fragment as s, createTextVNode as c, toDisplayString as r, useSlots as u, ref as d, normalizeStyle as p, createElementVNode as g, renderList as m, createVNode as v, unref as
|
|
1
|
+
import { defineComponent as e, computed as a, createElementBlock as l, createCommentVNode as n, openBlock as t, normalizeClass as o, renderSlot as i, Fragment as s, createTextVNode as c, toDisplayString as r, useSlots as u, ref as d, normalizeStyle as p, createElementVNode as g, renderList as m, createVNode as v, unref as h, createBlock as f, createSlots as b, withCtx as _, mergeProps as y, watch as w, withDirectives as k, vModelSelect as x, onMounted as S, nextTick as C, toRefs as I, normalizeProps as z, guardReactiveProps as R, watchEffect as M, h as $, onUnmounted as P, resolveDynamicComponent as H } from "vue";
|
|
2
2
|
import { M as W } from "./mc-checkbox-1v_7vBVm.js";
|
|
3
3
|
import { _ as T, w as B } from "./utils-CMUecsjZ.js";
|
|
4
4
|
import { M as O } from "./mc-icon-oTgV9pMA.js";
|
|
@@ -48,9 +48,9 @@ const K = ["rowspan", "colspan"], N = T(e({ __name: "mc-table-cell", props: { ro
|
|
|
48
48
|
}), z2 = (e3) => !!k2.selectedRows && k2.selectedRows.some((a2) => k2.rowKey ? a2[k2.rowKey] === e3[k2.rowKey] : a2 === e3);
|
|
49
49
|
return c2({ bodyWrapper: C2 }), (e3, a2) => (t(), l("div", { class: "mc-table__body-wrapper", ref_key: "bodyWrapper", ref: C2, style: p(I2.value) }, [g("table", j, [g("colgroup", null, [e3.selectable ? (t(), l("col", E)) : n("", true), (t(true), l(s, null, m(e3.columns, (e4, a3) => (t(), l("col", { key: a3, width: e4.width }, null, 8, F))), 128))]), g("tbody", null, [e3.data && e3.data.length > 0 ? (t(true), l(s, { key: 0 }, m(e3.data, (a3, c3) => (t(), l("tr", { key: e3.rowKey ? a3[e3.rowKey] : c3, class: o(e3.getRowClass ? e3.getRowClass(a3, c3) : []), onClick: (e4) => function(e5, a4) {
|
|
50
50
|
S2("row-click", e5, a4);
|
|
51
|
-
}(a3, c3) }, [e3.selectable ? (t(), l("td", X, [g("div", q, [v(
|
|
51
|
+
}(a3, c3) }, [e3.selectable ? (t(), l("td", X, [g("div", q, [v(h(W), { "model-value": z2(a3), onChange: (e4) => function(e5, a4) {
|
|
52
52
|
S2("select", e5, a4);
|
|
53
|
-
}(a3, e4) }, null, 8, ["model-value", "onChange"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (l2, n2) => (t(),
|
|
53
|
+
}(a3, e4) }, null, 8, ["model-value", "onChange"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (l2, n2) => (t(), f(N, { key: n2, row: a3, column: l2, "row-index": c3, "column-index": n2, "span-method": e3.spanMethod, pagination: e3.pagination }, b({ _: 2 }, [m(Object.keys(e3.$slots), (a4) => ({ name: a4, fn: _((l3) => [i(e3.$slots, a4, y({ ref_for: true }, l3), void 0, true)]) }))]), 1032, ["row", "column", "row-index", "column-index", "span-method", "pagination"]))), 128))], 10, U))), 128)) : (t(), l("tr", G, [g("td", { colspan: e3.selectable ? e3.columns.length + 1 : e3.columns.length, class: "mc-table__empty-cell" }, [h(x2).empty ? i(e3.$slots, "empty", { key: 0 }, void 0, true) : (t(), l("div", Q, r(e3.emptyText), 1))], 8, J)]))])])], 4));
|
|
54
54
|
} }), [["__scopeId", "data-v-94f9cc05"]]), Z = { class: "mc-table__header", cellspacing: "0", cellpadding: "0", border: "0" }, ee = { key: 0, width: "50" }, ae = ["width"], le = { key: 0, class: "mc-table__selection-column" }, ne = { class: "mc-table__header-cell" }, te = ["onClick"], oe = { class: "mc-table__header-cell" }, ie = { class: "mc-table__header-label" }, se = { key: 0, class: "mc-table__sort-caret" }, ce = T(e({ __name: "mc-table-header", props: { columns: {}, showHeader: { type: Boolean, default: true }, getSortOrder: { type: Function, default: () => null }, selectable: { type: Boolean, default: false }, isAllSelected: { type: Boolean, default: false }, isIndeterminate: { type: Boolean, default: false } }, emits: ["header-click", "sort-change", "select-all"], setup(e2, { expose: a2, emit: u2 }) {
|
|
55
55
|
const p2 = e2, b2 = u2, _2 = d(), y2 = (e3) => {
|
|
56
56
|
b2("select-all", e3);
|
|
@@ -58,10 +58,10 @@ const K = ["rowspan", "colspan"], N = T(e({ __name: "mc-table-cell", props: { ro
|
|
|
58
58
|
const a3 = p2.getSortOrder(e3);
|
|
59
59
|
return "asc" === a3 ? "is-sort-asc" : "desc" === a3 ? "is-sort-desc" : "";
|
|
60
60
|
};
|
|
61
|
-
return a2({ headerWrapper: _2 }), (e3, a3) => e3.showHeader ? (t(), l("div", { key: 0, class: "mc-table__header-wrapper", ref_key: "headerWrapper", ref: _2 }, [g("table", Z, [g("colgroup", null, [e3.selectable ? (t(), l("col", ee)) : n("", true), (t(true), l(s, null, m(e3.columns, (e4, a4) => (t(), l("col", { key: a4, width: e4.width }, null, 8, ae))), 128))]), g("thead", null, [g("tr", null, [e3.selectable ? (t(), l("th", le, [g("div", ne, [v(
|
|
61
|
+
return a2({ headerWrapper: _2 }), (e3, a3) => e3.showHeader ? (t(), l("div", { key: 0, class: "mc-table__header-wrapper", ref_key: "headerWrapper", ref: _2 }, [g("table", Z, [g("colgroup", null, [e3.selectable ? (t(), l("col", ee)) : n("", true), (t(true), l(s, null, m(e3.columns, (e4, a4) => (t(), l("col", { key: a4, width: e4.width }, null, 8, ae))), 128))]), g("thead", null, [g("tr", null, [e3.selectable ? (t(), l("th", le, [g("div", ne, [v(h(W), { "model-value": e3.isAllSelected, partial: e3.isIndeterminate, onChange: y2 }, null, 8, ["model-value", "partial"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (a4, s2) => (t(), l("th", { key: s2, class: o([a4.headerClassName, a4.align ? `is-${a4.align}` : "", a4.fixed ? `is-fixed-${"boolean" == typeof a4.fixed ? "left" : a4.fixed}` : "", a4.sortable ? "is-sortable" : "", w2(a4.prop)]), onClick: (e4) => ((e5, a5) => {
|
|
62
62
|
e5.sortable && b2("sort-change", e5), b2("header-click", e5, a5);
|
|
63
|
-
})(a4, e4) }, [g("div", oe, [g("span", ie, [i(e3.$slots, `header-${a4.slot || a4.prop}`, { column: a4, index: s2 }, () => [c(r(a4.label), 1)], true)]), a4.sortable ? (t(), l("span", se, ["asc" === e3.getSortOrder(a4.prop) ? (t(),
|
|
64
|
-
} }), [["__scopeId", "data-v-824d6509"]]), re = { class: "mc-table__loading-content" }, ue = { class: "mc-table__loading-spinner" }, de = { key: 0, class: "mc-table__spinner mc-table__spinner--default" }, pe = { key: 1, class: "mc-table__spinner mc-table__spinner--circle" }, ge = { key: 2, class: "mc-table__spinner mc-table__spinner--pulse" }, me = ["innerHTML"], ve = { key: 0, class: "mc-table__loading-text" },
|
|
63
|
+
})(a4, e4) }, [g("div", oe, [g("span", ie, [i(e3.$slots, `header-${a4.slot || a4.prop}`, { column: a4, index: s2 }, () => [c(r(a4.label), 1)], true)]), a4.sortable ? (t(), l("span", se, ["asc" === e3.getSortOrder(a4.prop) ? (t(), f(O, { key: 0, name: "Up-Chevron02", class: o(["mc-table__sort-icon", { "is-active": "asc" === e3.getSortOrder(a4.prop) }]) }, null, 8, ["class"])) : (t(), f(O, { key: 1, name: "Down-Chevron02", class: o(["mc-table__sort-icon", { "is-active": "desc" === e3.getSortOrder(a4.prop) }]) }, null, 8, ["class"]))])) : n("", true)])], 10, te))), 128))])])])], 512)) : n("", true);
|
|
64
|
+
} }), [["__scopeId", "data-v-824d6509"]]), re = { class: "mc-table__loading-content" }, ue = { class: "mc-table__loading-spinner" }, de = { key: 0, class: "mc-table__spinner mc-table__spinner--default" }, pe = { key: 1, class: "mc-table__spinner mc-table__spinner--circle" }, ge = { key: 2, class: "mc-table__spinner mc-table__spinner--pulse" }, me = ["innerHTML"], ve = { key: 0, class: "mc-table__loading-text" }, he = T(e({ __name: "mc-table-loading", props: { loading: { type: Boolean, default: false }, loadingText: { default: "Loading..." }, loadingConfig: { default: () => ({ spinner: "default" }) } }, setup(e2) {
|
|
65
65
|
const s2 = e2, c2 = a(() => {
|
|
66
66
|
var _a;
|
|
67
67
|
return ((_a = s2.loadingConfig) == null ? void 0 : _a.text) || s2.loadingText;
|
|
@@ -77,9 +77,9 @@ const K = ["rowspan", "colspan"], N = T(e({ __name: "mc-table-cell", props: { ro
|
|
|
77
77
|
return [g("div", ue, [((_a2 = e3.loadingConfig) == null ? void 0 : _a2.spinner) && "default" !== e3.loadingConfig.spinner ? "circle" === e3.loadingConfig.spinner ? (t(), l("div", pe)) : "pulse" === e3.loadingConfig.spinner ? (t(), l("div", ge)) : (t(), l("div", { key: 3, class: "mc-table__spinner mc-table__spinner--custom", innerHTML: e3.loadingConfig.spinner }, null, 8, me)) : (t(), l("div", de, a2[0] || (a2[0] = [g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1)])))]), c2.value ? (t(), l("div", ve, r(c2.value), 1)) : n("", true)];
|
|
78
78
|
}, true)])], 6)) : n("", true);
|
|
79
79
|
};
|
|
80
|
-
} }), [["__scopeId", "data-v-f10577d2"]]),
|
|
80
|
+
} }), [["__scopeId", "data-v-f10577d2"]]), fe = { key: 0, class: "mc-table__pagination" }, be = { class: "mc-table__pagination-info" }, _e = { class: "mc-table__pagination-controls" }, ye = ["onClick"], we = { key: 1, class: "mc-table__pagination-ellipsis" }, ke = { class: "mc-table__pagination-size" }, xe = ["value"], Se = T(e({ __name: "mc-table-pagination", props: { pagination: {} }, emits: ["page-change"], setup(e2, { emit: i2 }) {
|
|
81
81
|
var _a, _b, _c;
|
|
82
|
-
const c2 = e2, u2 = i2, p2 = d(((_a = c2.pagination) == null ? void 0 : _a.currentPage) || 1),
|
|
82
|
+
const c2 = e2, u2 = i2, p2 = d(((_a = c2.pagination) == null ? void 0 : _a.currentPage) || 1), h2 = d(((_b = c2.pagination) == null ? void 0 : _b.pageSize) || 50), f2 = d(((_c = c2.pagination) == null ? void 0 : _c.pageSizes) || [25, 50, 75, 100]);
|
|
83
83
|
w(() => {
|
|
84
84
|
var _a2;
|
|
85
85
|
return (_a2 = c2.pagination) == null ? void 0 : _a2.currentPage;
|
|
@@ -89,11 +89,11 @@ const K = ["rowspan", "colspan"], N = T(e({ __name: "mc-table-cell", props: { ro
|
|
|
89
89
|
var _a2;
|
|
90
90
|
return (_a2 = c2.pagination) == null ? void 0 : _a2.pageSize;
|
|
91
91
|
}, (e3) => {
|
|
92
|
-
void 0 !== e3 && (
|
|
92
|
+
void 0 !== e3 && (h2.value = e3);
|
|
93
93
|
});
|
|
94
|
-
const b2 = a(() => c2.pagination ? Math.ceil(c2.pagination.total /
|
|
94
|
+
const b2 = a(() => c2.pagination ? Math.ceil(c2.pagination.total / h2.value) : 1), _2 = a(() => c2.pagination && 0 !== c2.pagination.total ? (p2.value - 1) * h2.value + 1 : 0), y2 = a(() => {
|
|
95
95
|
if (!c2.pagination) return 0;
|
|
96
|
-
const e3 = p2.value *
|
|
96
|
+
const e3 = p2.value * h2.value;
|
|
97
97
|
return Math.min(e3, c2.pagination.total);
|
|
98
98
|
}), S2 = a(() => {
|
|
99
99
|
const e3 = b2.value, a2 = p2.value, l2 = [];
|
|
@@ -111,11 +111,11 @@ const K = ["rowspan", "colspan"], N = T(e({ __name: "mc-table-cell", props: { ro
|
|
|
111
111
|
}
|
|
112
112
|
return l2;
|
|
113
113
|
}), C2 = (e3) => {
|
|
114
|
-
e3 < 1 || e3 > b2.value || (p2.value = e3, u2("page-change", { pageSize:
|
|
114
|
+
e3 < 1 || e3 > b2.value || (p2.value = e3, u2("page-change", { pageSize: h2.value, pageNum: e3 }));
|
|
115
115
|
}, I2 = () => {
|
|
116
|
-
p2.value = 1, u2("page-change", { pageSize:
|
|
116
|
+
p2.value = 1, u2("page-change", { pageSize: h2.value, pageNum: 1 });
|
|
117
117
|
};
|
|
118
|
-
return (e3, a2) => e3.pagination ? (t(), l("div",
|
|
118
|
+
return (e3, a2) => e3.pagination ? (t(), l("div", fe, [g("div", be, "Showing " + r(_2.value) + "-" + r(y2.value) + " of " + r(e3.pagination.total), 1), g("div", _e, [v(O, { name: "First", class: o({ "mc-table__icon": true, "is-disabled": p2.value <= 1 }), size: 24, onClick: a2[0] || (a2[0] = (e4) => C2(1)) }, null, 8, ["class"]), v(O, { name: "Left-Chevron", class: o({ "mc-table__icon": true, "is-disabled": p2.value <= 1 }), size: 24, onClick: a2[1] || (a2[1] = (e4) => C2(p2.value - 1)) }, null, 8, ["class"]), (t(true), l(s, null, m(S2.value, (e4) => (t(), l(s, { key: e4 }, ["..." !== e4 ? (t(), l("button", { key: 0, class: o(["mc-table__pagination-button mc-table__pagination-button--page", { "is-active": e4 === p2.value }]), onClick: (a3) => "number" == typeof e4 ? C2(e4) : void 0 }, r(e4), 11, ye)) : (t(), l("span", we, "..."))], 64))), 128)), v(O, { name: "Right-Chevron", class: o({ "mc-table__icon": true, "is-disabled": p2.value >= b2.value }), size: 24, onClick: a2[2] || (a2[2] = (e4) => C2(p2.value + 1)) }, null, 8, ["class"]), v(O, { name: "Last", class: o({ "mc-table__icon": true, "is-disabled": p2.value >= b2.value }), size: 24, onClick: a2[3] || (a2[3] = (e4) => C2(b2.value)) }, null, 8, ["class"])]), g("div", ke, [a2[5] || (a2[5] = g("label", { class: "mc-table__pagination-size-label" }, "View per page", -1)), f2.value && f2.value.length > 0 ? k((t(), l("select", { key: 0, class: "mc-table__pagination-select", "onUpdate:modelValue": a2[4] || (a2[4] = (e4) => h2.value = e4), onChange: I2 }, [(t(true), l(s, null, m(f2.value, (e4) => (t(), l("option", { key: e4, value: e4 }, r(e4), 9, xe))), 128))], 544)), [[x, h2.value]]) : n("", true)])])) : n("", true);
|
|
119
119
|
} }), [["__scopeId", "data-v-4043e3c7"]]);
|
|
120
120
|
function Ce(e2, l2) {
|
|
121
121
|
var _a, _b;
|
|
@@ -242,10 +242,10 @@ const Re = B(T(e({ name: "McTable", __name: "mc-table", props: { data: {}, colum
|
|
|
242
242
|
X2.value = [], B2("update:selectedRows", []), B2("selection-change", []);
|
|
243
243
|
}, getSelectedRows: () => [...X2.value] }), (e3, a2) => {
|
|
244
244
|
var _a;
|
|
245
|
-
return t(), l("div", { ref_key: "_ref", ref: O2, class: o(["mc-table", { "mc-table--loading":
|
|
245
|
+
return t(), l("div", { ref_key: "_ref", ref: O2, class: o(["mc-table", { "mc-table--loading": h(k2) }]) }, [v(ce, { ref_key: "headerRef", ref: D2, columns: h(A2), "show-header": e3.showHeader, "get-sort-order": h(N2), selectable: h(H2), "is-all-selected": q2.value, "is-indeterminate": G2.value, onHeaderClick: le2, onSortChange: ne2, onSelectAll: oe2 }, b({ _: 2 }, [m(Object.keys(e3.$slots), (a3) => ({ name: a3, fn: _((l2) => [i(e3.$slots, a3, z(R(l2)), void 0, true)]) }))]), 1032, ["columns", "show-header", "get-sort-order", "selectable", "is-all-selected", "is-indeterminate"]), v(Y, { ref_key: "bodyRef", ref: L2, data: F2.value, columns: h(A2), "row-key": h(P2), "empty-text": e3.emptyText, height: e3.height, "max-height": e3.maxHeight, "span-method": h(y2), pagination: h(g2), "get-row-class": J2, selectable: h(H2), "selected-rows": X2.value, "select-on-row-click": h(T2), onRowClick: ae2, onSelect: te2 }, b({ _: 2 }, [m(Object.keys(e3.$slots), (a3) => ({ name: a3, fn: _((l2) => [i(e3.$slots, a3, z(R(l2)), void 0, true)]) }))]), 1032, ["data", "columns", "row-key", "empty-text", "height", "max-height", "span-method", "pagination", "selectable", "selected-rows", "select-on-row-click"]), h(g2) && ((_a = h(g2)) == null ? void 0 : _a.total) > 0 ? (t(), f(Se, { key: 0, pagination: h(g2), onPageChange: ie2 }, null, 8, ["pagination"])) : n("", true), v(he, { class: "mc-table__loading", loading: h(k2), "loading-text": h(x2), "loading-config": h(S2) }, { loading: _((a3) => [i(e3.$slots, "loading", z(R(a3)), void 0, true)]), _: 3 }, 8, ["loading", "loading-text", "loading-config"])], 2);
|
|
246
246
|
};
|
|
247
|
-
} }), [["__scopeId", "data-v-dc87e5f5"]])), Me = ["onClick"], $e = { key: 0, class: "mc-tab-nav-item-count" }, Pe = T(e({ name: "
|
|
248
|
-
const p2 = e2, v2 = c2,
|
|
247
|
+
} }), [["__scopeId", "data-v-dc87e5f5"]])), Me = ["onClick"], $e = { key: 0, class: "mc-tab-nav-item-count" }, Pe = T(e({ name: "McTab", __name: "mc-tab", props: { modelValue: {}, type: { default: "plain" } }, emits: ["update:modelValue", "change"], setup(e2, { expose: i2, emit: c2 }) {
|
|
248
|
+
const p2 = e2, v2 = c2, h2 = d(), b2 = d(), _2 = d(), y2 = d([]), k2 = u();
|
|
249
249
|
M(() => {
|
|
250
250
|
if (!k2.default) return void (y2.value = []);
|
|
251
251
|
let e3 = k2.default();
|
|
@@ -274,13 +274,13 @@ const Re = B(T(e({ name: "McTable", __name: "mc-table", props: { data: {}, colum
|
|
|
274
274
|
};
|
|
275
275
|
return w(() => p2.modelValue, (e3) => {
|
|
276
276
|
I2(e3);
|
|
277
|
-
}), i2({ ref:
|
|
277
|
+
}), i2({ ref: h2 }), (e3, a2) => {
|
|
278
278
|
var _a;
|
|
279
|
-
return t(), l("div", { class: o(["mc-tab", `mc-tab-${e3.type}`]), ref_key: "_ref", ref:
|
|
279
|
+
return t(), l("div", { class: o(["mc-tab", `mc-tab-${e3.type}`]), ref_key: "_ref", ref: h2 }, [g("div", { class: "mc-tab-nav", ref_key: "tabNavRef", ref: b2 }, [(t(true), l(s, null, m(y2.value, (a3) => (t(), l("div", { class: o(["mc-tab-nav-item", { "mc-tab-nav-item-active": a3.name === e3.modelValue, "mc-tab-nav-item-disabled": a3.disabled }]), key: a3.name, onClick: (e4) => ((e5) => {
|
|
280
280
|
e5.disabled || (v2("update:modelValue", e5.name), v2("change", e5.name));
|
|
281
|
-
})(a3) }, [g("span", null, r(a3.label), 1), a3.count ? (t(), l("span", $e, r(a3.count), 1)) : n("", true)], 10, Me))), 128)), C2.value ? (t(), l("div", { key: 0, class: "mc-tab-line", ref_key: "tabLineRef", ref: _2 }, null, 512)) : n("", true)], 512), ((_a = x2.value) == null ? void 0 : _a._vnode) ? (t(),
|
|
281
|
+
})(a3) }, [g("span", null, r(a3.label), 1), a3.count ? (t(), l("span", $e, r(a3.count), 1)) : n("", true)], 10, Me))), 128)), C2.value ? (t(), l("div", { key: 0, class: "mc-tab-line", ref_key: "tabLineRef", ref: _2 }, null, 512)) : n("", true)], 512), ((_a = x2.value) == null ? void 0 : _a._vnode) ? (t(), f(H(x2.value._vnode), { key: x2.value.name })) : n("", true)], 2);
|
|
282
282
|
};
|
|
283
|
-
} }), [["__scopeId", "data-v-
|
|
283
|
+
} }), [["__scopeId", "data-v-1e5c6675"]]), He = { class: "mc-tab-item" }, We = e({ name: "McTabItem", __name: "mc-tab-item", props: { name: {}, label: {}, disabled: { type: Boolean }, count: {} }, setup: (e2) => (e3, a2) => (t(), l("div", He, [i(e3.$slots, "default")])) }), Te = B(Pe), Be = B(We);
|
|
284
284
|
export {
|
|
285
285
|
Re as M,
|
|
286
286
|
Te as a,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as e, ref as t, toRefs as a, computed as o, createElementBlock as l, createCommentVNode as r, openBlock as s, normalizeStyle as c, normalizeClass as i, unref as u, createBlock as d, renderSlot as n } from "vue";
|
|
2
|
+
import { M as m } from "./mc-icon-oTgV9pMA.js";
|
|
3
|
+
import { _ as f, w as h } from "./utils-CMUecsjZ.js";
|
|
4
|
+
const g = h(f(e({ name: "McTag", __name: "mc-tag", props: { type: { default: "primary" }, size: { default: "medium" }, disabled: { type: Boolean, default: false }, closable: { type: Boolean, default: false }, color: {}, textColor: {}, backgroundColor: {}, selectedTextColor: {}, selectedBackgroundColor: {}, radius: { default: "default" }, height: {}, width: {}, icon: {}, selected: { type: Boolean } }, emits: ["click", "close"], setup(e2, { expose: f2, emit: h2 }) {
|
|
5
|
+
const g2 = t(), v = e2, p = h2, x = t(true), { type: b, size: y, disabled: M, closable: C, color: k, textColor: $, backgroundColor: _, selectedTextColor: z, selectedBackgroundColor: B, radius: w, height: W, width: T, icon: j, selected: I } = a(v), E = { small: 16, medium: 16, large: 24 }, F = o(() => {
|
|
6
|
+
const e3 = {};
|
|
7
|
+
return (T == null ? void 0 : T.value) && (e3.width = T.value), (W == null ? void 0 : W.value) && (e3.height = W.value), (k == null ? void 0 : k.value) ? (e3["--tag-color"] = k.value, e3["--tag-hover-color"] = q(k.value, 0.7), e3["--tag-text-color"] = "#ffffff", e3["--tag-hover-text-color"] = "#ffffff") : (($ == null ? void 0 : $.value) && (e3["--tag-text-color"] = $.value), (_ == null ? void 0 : _.value) && (e3["--tag-color"] = _.value), (z == null ? void 0 : z.value) && (e3["--tag-hover-text-color"] = z.value), (B == null ? void 0 : B.value) && (e3["--tag-hover-color"] = B.value)), e3;
|
|
8
|
+
}), N = (e3) => {
|
|
9
|
+
M.value || p("click", e3);
|
|
10
|
+
}, S = (e3) => {
|
|
11
|
+
M.value || (x.value = false, p("close", e3));
|
|
12
|
+
}, q = (e3, t2 = 0.7) => {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!e3 || "transparent" === e3) return e3;
|
|
15
|
+
if (e3.startsWith("var(--")) return e3;
|
|
16
|
+
if (e3.startsWith("#")) {
|
|
17
|
+
const a3 = e3.slice(1), o3 = parseInt(a3, 16), l2 = o3 >> 16 & 255, r2 = o3 >> 8 & 255, s2 = 255 & o3;
|
|
18
|
+
return `rgb(${Math.max(0, Math.floor(l2 * t2))}, ${Math.max(0, Math.floor(r2 * t2))}, ${Math.max(0, Math.floor(s2 * t2))})`;
|
|
19
|
+
}
|
|
20
|
+
const a2 = document.createElement("div");
|
|
21
|
+
a2.style.color = e3, document.body.appendChild(a2);
|
|
22
|
+
const o2 = getComputedStyle(a2).color;
|
|
23
|
+
if (document.body.removeChild(a2), o2.startsWith("rgb") || o2.startsWith("rgba")) {
|
|
24
|
+
const e4 = ((_a = o2.match(/\d+/g)) == null ? void 0 : _a.map(Number)) || [0, 0, 0], a3 = Math.max(0, Math.floor(e4[0] * t2)), l2 = Math.max(0, Math.floor(e4[1] * t2)), r2 = Math.max(0, Math.floor(e4[2] * t2));
|
|
25
|
+
return o2.includes("a") ? `rgba(${a3}, ${l2}, ${r2}, ${parseFloat(o2.split(",")[3].trim().replace(")", ""))})` : `rgb(${a3}, ${l2}, ${r2})`;
|
|
26
|
+
}
|
|
27
|
+
return e3;
|
|
28
|
+
};
|
|
29
|
+
return f2({ ref: g2 }), (e3, t2) => x.value ? (s(), l("div", { key: 0, ref_key: "_ref", ref: g2, class: i(["mc-tag", ["mc-tag--" + u(b), "mc-tag--" + u(y), "mc-tag-radius--" + u(w), { "is-disabled": u(M), "is-selected": u(I) }]]), style: c(F.value), onClick: N }, [u(j) ? (s(), d(m, { key: 0, class: "mc-tag__icon", name: u(j), size: E[u(y)] }, null, 8, ["name", "size"])) : r("", true), n(e3.$slots, "default", {}, void 0, true), u(C) && !u(M) ? (s(), d(m, { key: 1, name: "Cross", class: "mc-tag__close-icon", size: E[u(y)], onClick: S }, null, 8, ["size"])) : r("", true)], 6)) : r("", true);
|
|
30
|
+
} }), [["__scopeId", "data-v-a6a459ef"]]));
|
|
31
|
+
export {
|
|
32
|
+
g as M
|
|
33
|
+
};
|
|
@@ -14,9 +14,9 @@ const _ = { class: "mc-title-tool-bar-reset" }, b = h(t({ name: "McTitleToolBar"
|
|
|
14
14
|
} }), [["__scopeId", "data-v-2a031f24"]]), w = { class: "mc-title-content" }, y = { class: "mc-title-text" }, B = { class: "mc-title-tool-bar" }, T = h(t({ name: "McTitle", __name: "mc-title", props: { width: { default: "100%" }, height: { default: "auto" }, title: {}, showToolBar: { type: Boolean, default: true }, showBorder: { type: Boolean, default: false } }, emits: ["reset"], setup(t2, { expose: a2, emit: r2 }) {
|
|
15
15
|
const u2 = r2, p2 = e();
|
|
16
16
|
return a2({ ref: p2 }), (t3, e2) => (s(), o("div", { class: m(["mc-title", { "mc-title-border": t3.showBorder }]), ref_key: "_ref", ref: p2, style: i({ width: t3.width, height: t3.height }) }, [l("div", w, [c(t3.$slots, "default", {}, () => [l("h1", y, d(t3.title), 1)], true)]), l("div", B, [c(t3.$slots, "tool-bar", {}, () => [t3.showToolBar ? (s(), n(b, { key: 0, onReset: e2[0] || (e2[0] = (t4) => u2("reset")) })) : f("", true)], true)])], 6));
|
|
17
|
-
} }), [["__scopeId", "data-v-029b5f71"]]),
|
|
17
|
+
} }), [["__scopeId", "data-v-029b5f71"]]), k = v(b), x = v(T);
|
|
18
18
|
export {
|
|
19
19
|
T as M,
|
|
20
20
|
x as a,
|
|
21
|
-
|
|
21
|
+
k as b
|
|
22
22
|
};
|