epic-designer-cjh
Version:
基于vue3的设计器,可视化开发页面表单
975 lines (974 loc) • 29.1 kB
JavaScript
import { i as I } from "./interopRequireDefault-40f894e3.js";
import { r as Z } from "./_vue_commonjs-external-eb7fec7f.js";
import { a as J, r as Q } from "./public_api-1267ff2a.js";
import { m as $e, d as he, b as pe, r as Se, a as xe } from "./useConfigInject-d85d8c62.js";
import { r as _e } from "./KeyCode-5c436a1d.js";
import { r as we } from "./omit-84b99e2b.js";
import { r as Pe } from "./pickAttrs-8a877861.js";
import { r as ge } from "./transition-d16825f8.js";
import { r as De } from "./index-f96a976e.js";
import { c as Me, d as Re } from "./PortalWrapper-9d2c005f.js";
import { r as Be } from "./index-977e4f68.js";
import "vue";
var ie = {}, H = {}, q = {}, W = {}, T = {}, le;
function k() {
if (le)
return T;
le = 1;
var n = I;
Object.defineProperty(T, "__esModule", {
value: !0
}), T.default = void 0, T.dialogPropTypes = s;
var t = n(De());
function s() {
return {
keyboard: {
type: Boolean,
default: void 0
},
mask: {
type: Boolean,
default: void 0
},
afterClose: Function,
closable: {
type: Boolean,
default: void 0
},
maskClosable: {
type: Boolean,
default: void 0
},
visible: {
type: Boolean,
default: void 0
},
destroyOnClose: {
type: Boolean,
default: void 0
},
mousePosition: t.default.shape({
x: Number,
y: Number
}).loose,
title: t.default.any,
footer: t.default.any,
transitionName: String,
maskTransitionName: String,
animation: t.default.any,
maskAnimation: t.default.any,
wrapStyle: {
type: Object,
default: void 0
},
bodyStyle: {
type: Object,
default: void 0
},
maskStyle: {
type: Object,
default: void 0
},
prefixCls: String,
wrapClassName: String,
rootClassName: String,
width: [String, Number],
height: [String, Number],
zIndex: Number,
bodyProps: t.default.any,
maskProps: t.default.any,
wrapProps: t.default.any,
getContainer: t.default.any,
dialogStyle: {
type: Object,
default: void 0
},
dialogClass: String,
closeIcon: t.default.any,
forceRender: {
type: Boolean,
default: void 0
},
getOpenCount: Function,
// https://github.com/ant-design/ant-design/issues/19771
// https://github.com/react-component/dialog/issues/95
focusTriggerAfterClose: {
type: Boolean,
default: void 0
},
onClose: Function,
modalRender: Function
};
}
var u = s;
return T.default = u, T;
}
var N = {}, ne;
function ve() {
if (ne)
return N;
ne = 1, Object.defineProperty(N, "__esModule", {
value: !0
}), N.getMotionName = n, N.getUUID = s, N.offset = v;
function n(y, g, a) {
let p = g;
return !p && a && (p = `${y}-${a}`), p;
}
let t = -1;
function s() {
return t += 1, t;
}
function u(y, g) {
let a = y[`page${g ? "Y" : "X"}Offset`];
const p = `scroll${g ? "Top" : "Left"}`;
if (typeof a != "number") {
const c = y.document;
a = c.documentElement[p], typeof a != "number" && (a = c.body[p]);
}
return a;
}
function v(y) {
const g = y.getBoundingClientRect(), a = {
left: g.left,
top: g.top
}, p = y.ownerDocument, c = p.defaultView || p.parentWindow;
return a.left += u(c), a.top += u(c, !0), a;
}
return N;
}
var de;
function Oe() {
if (de)
return W;
de = 1;
var n = I;
Object.defineProperty(W, "__esModule", {
value: !0
}), W.default = void 0;
var t = Z, s = n(J()), u = n(Q()), v = p(ge()), y = n(k()), g = ve();
function a(l) {
if (typeof WeakMap != "function")
return null;
var e = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
return (a = function(r) {
return r ? o : e;
})(l);
}
function p(l, e) {
if (!e && l && l.__esModule)
return l;
if (l === null || typeof l != "object" && typeof l != "function")
return { default: l };
var o = a(e);
if (o && o.has(l))
return o.get(l);
var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var m in l)
if (m !== "default" && Object.prototype.hasOwnProperty.call(l, m)) {
var S = i ? Object.getOwnPropertyDescriptor(l, m) : null;
S && (S.get || S.set) ? Object.defineProperty(r, m, S) : r[m] = l[m];
}
return r.default = l, o && o.set(l, r), r;
}
const c = {
width: 0,
height: 0,
overflow: "hidden",
outline: "none"
};
var C = (0, t.defineComponent)({
compatConfig: {
MODE: 3
},
name: "DialogContent",
inheritAttrs: !1,
props: (0, u.default)((0, u.default)({}, (0, y.default)()), {
motionName: String,
ariaId: String,
onVisibleChanged: Function,
onMousedown: Function,
onMouseup: Function
}),
setup(l, e) {
let {
expose: o,
slots: r,
attrs: i
} = e;
const m = (0, t.ref)(), S = (0, t.ref)(), P = (0, t.ref)();
o({
focus: () => {
var f;
(f = m.value) === null || f === void 0 || f.focus();
},
changeActive: (f) => {
const {
activeElement: h
} = document;
f && h === S.value ? m.value.focus() : !f && h === m.value && S.value.focus();
}
});
const w = (0, t.ref)(), B = (0, t.computed)(() => {
const {
width: f,
height: h
} = l, x = {};
return f !== void 0 && (x.width = typeof f == "number" ? `${f}px` : f), h !== void 0 && (x.height = typeof h == "number" ? `${h}px` : h), w.value && (x.transformOrigin = w.value), x;
}), D = () => {
(0, t.nextTick)(() => {
if (P.value) {
const f = (0, g.offset)(P.value);
w.value = l.mousePosition ? `${l.mousePosition.x - f.left}px ${l.mousePosition.y - f.top}px` : "";
}
});
}, $ = (f) => {
l.onVisibleChanged(f);
};
return () => {
var f, h, x, M;
const {
prefixCls: _,
footer: F = (f = r.footer) === null || f === void 0 ? void 0 : f.call(r),
title: L = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
ariaId: ee,
closable: te,
closeIcon: d = (x = r.closeIcon) === null || x === void 0 ? void 0 : x.call(r),
onClose: b,
bodyStyle: R,
bodyProps: z,
onMousedown: E,
onMouseup: A,
visible: G,
modalRender: U = r.modalRender,
destroyOnClose: oe,
motionName: re
} = l;
let X;
F && (X = (0, t.createVNode)("div", {
class: `${_}-footer`
}, [F]));
let j;
L && (j = (0, t.createVNode)("div", {
class: `${_}-header`
}, [(0, t.createVNode)("div", {
class: `${_}-title`,
id: ee
}, [L])]));
let K;
te && (K = (0, t.createVNode)("button", {
type: "button",
onClick: b,
"aria-label": "Close",
class: `${_}-close`
}, [d || (0, t.createVNode)("span", {
class: `${_}-close-x`
}, null)]));
const Y = (0, t.createVNode)("div", {
class: `${_}-content`
}, [K, j, (0, t.createVNode)("div", (0, s.default)({
class: `${_}-body`,
style: R
}, z), [(M = r.default) === null || M === void 0 ? void 0 : M.call(r)]), X]), ae = (0, v.getTransitionProps)(re);
return (0, t.createVNode)(v.default, (0, s.default)((0, s.default)({}, ae), {}, {
onBeforeEnter: D,
onAfterEnter: () => $(!0),
onAfterLeave: () => $(!1)
}), {
default: () => [G || !oe ? (0, t.withDirectives)((0, t.createVNode)("div", (0, s.default)((0, s.default)({}, i), {}, {
ref: P,
key: "dialog-element",
role: "document",
style: [B.value, i.style],
class: [_, i.class],
onMousedown: E,
onMouseup: A
}), [(0, t.createVNode)("div", {
tabindex: 0,
ref: m,
style: c,
"aria-hidden": "true"
}, null), U ? U({
originVNode: Y
}) : Y, (0, t.createVNode)("div", {
tabindex: 0,
ref: S,
style: c,
"aria-hidden": "true"
}, null)]), [[t.vShow, G]]) : null]
});
};
}
});
return W.default = C, W;
}
var V = {}, ue;
function Ie() {
if (ue)
return V;
ue = 1;
var n = I;
Object.defineProperty(V, "__esModule", {
value: !0
}), V.default = void 0;
var t = Z, s = n(J()), u = y(ge());
function v(a) {
if (typeof WeakMap != "function")
return null;
var p = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap();
return (v = function(C) {
return C ? c : p;
})(a);
}
function y(a, p) {
if (!p && a && a.__esModule)
return a;
if (a === null || typeof a != "object" && typeof a != "function")
return { default: a };
var c = v(p);
if (c && c.has(a))
return c.get(a);
var C = {}, l = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var e in a)
if (e !== "default" && Object.prototype.hasOwnProperty.call(a, e)) {
var o = l ? Object.getOwnPropertyDescriptor(a, e) : null;
o && (o.get || o.set) ? Object.defineProperty(C, e, o) : C[e] = a[e];
}
return C.default = a, c && c.set(a, C), C;
}
var g = (0, t.defineComponent)({
compatConfig: {
MODE: 3
},
name: "DialogMask",
props: {
prefixCls: String,
visible: Boolean,
motionName: String,
maskProps: Object
},
setup(a, p) {
return () => {
const {
prefixCls: c,
visible: C,
maskProps: l,
motionName: e
} = a, o = (0, u.getTransitionProps)(e);
return (0, t.createVNode)(u.default, o, {
default: () => [(0, t.withDirectives)((0, t.createVNode)("div", (0, s.default)({
class: `${c}-mask`
}, l), null), [[t.vShow, C]])]
});
};
}
});
return V.default = g, V;
}
var se;
function Te() {
if (se)
return q;
se = 1;
var n = I;
Object.defineProperty(q, "__esModule", {
value: !0
}), q.default = void 0;
var t = Z, s = n(J()), u = n(Q()), v = n($e()), y = n(he()), g = n(_e()), a = n(we()), p = n(Pe()), c = pe(), C = n(Oe()), l = n(k()), e = n(Ie()), o = ve(), r = (0, t.defineComponent)({
compatConfig: {
MODE: 3
},
name: "VcDialog",
inheritAttrs: !1,
props: (0, c.initDefaultProps)((0, u.default)((0, u.default)({}, (0, l.default)()), {
getOpenCount: Function,
scrollLocker: Object
}), {
mask: !0,
visible: !1,
keyboard: !0,
closable: !0,
maskClosable: !0,
destroyOnClose: !1,
prefixCls: "rc-dialog",
getOpenCount: () => null,
focusTriggerAfterClose: !0
}),
setup(i, m) {
let {
attrs: S,
slots: P
} = m;
const w = (0, t.shallowRef)(), B = (0, t.shallowRef)(), D = (0, t.shallowRef)(), $ = (0, t.shallowRef)(i.visible), f = (0, t.shallowRef)(`vcDialogTitle${(0, o.getUUID)()}`), h = (d) => {
var b, R;
if (d)
(0, v.default)(B.value, document.activeElement) || (w.value = document.activeElement, (b = D.value) === null || b === void 0 || b.focus());
else {
const z = $.value;
if ($.value = !1, i.mask && w.value && i.focusTriggerAfterClose) {
try {
w.value.focus({
preventScroll: !0
});
} catch {
}
w.value = null;
}
z && ((R = i.afterClose) === null || R === void 0 || R.call(i));
}
}, x = (d) => {
var b;
(b = i.onClose) === null || b === void 0 || b.call(i, d);
}, M = (0, t.shallowRef)(!1), _ = (0, t.shallowRef)(), F = () => {
clearTimeout(_.value), M.value = !0;
}, L = () => {
_.value = setTimeout(() => {
M.value = !1;
});
}, ee = (d) => {
if (!i.maskClosable)
return null;
M.value ? M.value = !1 : B.value === d.target && x(d);
}, te = (d) => {
if (i.keyboard && d.keyCode === g.default.ESC) {
d.stopPropagation(), x(d);
return;
}
i.visible && d.keyCode === g.default.TAB && D.value.changeActive(!d.shiftKey);
};
return (0, t.watch)(() => i.visible, () => {
i.visible && ($.value = !0);
}, {
flush: "post"
}), (0, t.onBeforeUnmount)(() => {
var d;
clearTimeout(_.value), (d = i.scrollLocker) === null || d === void 0 || d.unLock();
}), (0, t.watchEffect)(() => {
var d, b;
(d = i.scrollLocker) === null || d === void 0 || d.unLock(), $.value && ((b = i.scrollLocker) === null || b === void 0 || b.lock());
}), () => {
const {
prefixCls: d,
mask: b,
visible: R,
maskTransitionName: z,
maskAnimation: E,
zIndex: A,
wrapClassName: G,
rootClassName: U,
wrapStyle: oe,
closable: re,
maskProps: X,
maskStyle: j,
transitionName: K,
animation: Y,
wrapProps: ae,
title: ye = P.title
} = i, {
style: Ce,
class: be
} = S;
return (0, t.createVNode)("div", (0, s.default)({
class: [`${d}-root`, U]
}, (0, p.default)(i, {
data: !0
})), [(0, t.createVNode)(e.default, {
prefixCls: d,
visible: b && R,
motionName: (0, o.getMotionName)(d, z, E),
style: (0, u.default)({
zIndex: A
}, j),
maskProps: X
}, null), (0, t.createVNode)("div", (0, s.default)({
tabIndex: -1,
onKeydown: te,
class: (0, y.default)(`${d}-wrap`, G),
ref: B,
onClick: ee,
role: "dialog",
"aria-labelledby": ye ? f.value : null,
style: (0, u.default)((0, u.default)({
zIndex: A
}, oe), {
display: $.value ? null : "none"
})
}, ae), [(0, t.createVNode)(C.default, (0, s.default)((0, s.default)({}, (0, a.default)(i, ["scrollLocker"])), {}, {
style: Ce,
class: be,
onMousedown: F,
onMouseup: L,
ref: D,
closable: re,
ariaId: f.value,
prefixCls: d,
visible: R,
onClose: x,
onVisibleChanged: h,
motionName: (0, o.getMotionName)(d, K, Y)
}), P)])]);
};
}
});
return q.default = r, q;
}
var fe;
function Ne() {
if (fe)
return H;
fe = 1;
var n = I;
Object.defineProperty(H, "__esModule", {
value: !0
}), H.default = void 0;
var t = Z, s = n(J()), u = n(Q()), v = n(Te()), y = n(k()), g = n(Me()), a = Re(), p = pe();
const c = (0, y.default)();
var l = (0, t.defineComponent)({
compatConfig: {
MODE: 3
},
name: "DialogWrap",
inheritAttrs: !1,
props: (0, p.initDefaultProps)(c, {
visible: !1
}),
setup(e, o) {
let {
attrs: r,
slots: i
} = o;
const m = (0, t.ref)(e.visible);
return (0, a.useProvidePortal)({}, {
inTriggerContext: !1
}), (0, t.watch)(() => e.visible, () => {
e.visible && (m.value = !0);
}, {
flush: "post"
}), () => {
const {
visible: S,
getContainer: P,
forceRender: w,
destroyOnClose: B = !1,
afterClose: D
} = e;
let $ = (0, u.default)((0, u.default)((0, u.default)({}, e), r), {
ref: "_component",
key: "dialog"
});
return P === !1 ? (0, t.createVNode)(v.default, (0, s.default)((0, s.default)({}, $), {}, {
getOpenCount: () => 2
}), i) : !w && B && !m.value ? null : (0, t.createVNode)(g.default, {
autoLock: !0,
visible: S,
forceRender: w,
getContainer: P
}, {
default: (f) => ($ = (0, u.default)((0, u.default)((0, u.default)({}, $), f), {
afterClose: () => {
D == null || D(), m.value = !1;
}
}), (0, t.createVNode)(v.default, $, i))
});
};
}
});
return H.default = l, H;
}
var ce;
function je() {
return ce || (ce = 1, function(n) {
var t = I;
Object.defineProperty(n, "__esModule", {
value: !0
}), n.default = void 0, Object.defineProperty(n, "dialogProps", {
enumerable: !0,
get: function() {
return u.default;
}
});
var s = t(Ne()), u = t(k()), v = s.default;
n.default = v;
}(ie)), ie;
}
var O = {}, me;
function Ke() {
if (me)
return O;
me = 1;
var n = I;
Object.defineProperty(O, "__esModule", {
value: !0
}), O.genModalMaskStyle = O.default = void 0;
var t = n(Q()), s = Be(), u = Se(), v = xe();
function y(e) {
return {
position: e,
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0
};
}
const g = (e) => {
const {
componentCls: o
} = e;
return [{
[`${o}-root`]: {
[`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]: {
// reset scale avoid mousePosition bug
transform: "none",
opacity: 0,
animationDuration: e.motionDurationSlow,
// https://github.com/ant-design/ant-design/issues/11777
userSelect: "none"
},
[`${o}${e.antCls}-zoom-leave ${o}-content`]: {
pointerEvents: "none"
},
[`${o}-mask`]: (0, t.default)((0, t.default)({}, y("fixed")), {
zIndex: e.zIndexPopupBase,
height: "100%",
backgroundColor: e.colorBgMask,
[`${o}-hidden`]: {
display: "none"
}
}),
[`${o}-wrap`]: (0, t.default)((0, t.default)({}, y("fixed")), {
overflow: "auto",
outline: 0,
WebkitOverflowScrolling: "touch"
})
}
}, {
[`${o}-root`]: (0, s.initFadeMotion)(e)
}];
};
O.genModalMaskStyle = g;
const a = (e) => {
const {
componentCls: o
} = e;
return [
// ======================== Root =========================
{
[`${o}-root`]: {
[`${o}-wrap`]: {
zIndex: e.zIndexPopupBase,
position: "fixed",
inset: 0,
overflow: "auto",
outline: 0,
WebkitOverflowScrolling: "touch"
},
[`${o}-wrap-rtl`]: {
direction: "rtl"
},
[`${o}-centered`]: {
textAlign: "center",
"&::before": {
display: "inline-block",
width: 0,
height: "100%",
verticalAlign: "middle",
content: '""'
},
[o]: {
top: 0,
display: "inline-block",
paddingBottom: 0,
textAlign: "start",
verticalAlign: "middle"
}
},
[`@media (max-width: ${e.screenSMMax})`]: {
[o]: {
maxWidth: "calc(100vw - 16px)",
margin: `${e.marginXS} auto`
},
[`${o}-centered`]: {
[o]: {
flex: 1
}
}
}
}
},
// ======================== Modal ========================
{
[o]: (0, t.default)((0, t.default)({}, (0, v.resetComponent)(e)), {
pointerEvents: "none",
position: "relative",
top: 100,
width: "auto",
maxWidth: `calc(100vw - ${e.margin * 2}px)`,
margin: "0 auto",
paddingBottom: e.paddingLG,
[`${o}-title`]: {
margin: 0,
color: e.modalHeadingColor,
fontWeight: e.fontWeightStrong,
fontSize: e.modalHeaderTitleFontSize,
lineHeight: e.modalHeaderTitleLineHeight,
wordWrap: "break-word"
},
[`${o}-content`]: {
position: "relative",
backgroundColor: e.modalContentBg,
backgroundClip: "padding-box",
border: 0,
borderRadius: e.borderRadiusLG,
boxShadow: e.boxShadowSecondary,
pointerEvents: "auto",
padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
},
[`${o}-close`]: (0, t.default)({
position: "absolute",
top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
insetInlineEnd: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
zIndex: e.zIndexPopupBase + 10,
padding: 0,
color: e.modalCloseColor,
fontWeight: e.fontWeightStrong,
lineHeight: 1,
textDecoration: "none",
background: "transparent",
borderRadius: e.borderRadiusSM,
width: e.modalConfirmIconSize,
height: e.modalConfirmIconSize,
border: 0,
outline: 0,
cursor: "pointer",
transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
"&-x": {
display: "block",
fontSize: e.fontSizeLG,
fontStyle: "normal",
lineHeight: `${e.modalCloseBtnSize}px`,
textAlign: "center",
textTransform: "none",
textRendering: "auto"
},
"&:hover": {
color: e.modalIconHoverColor,
backgroundColor: e.wireframe ? "transparent" : e.colorFillContent,
textDecoration: "none"
},
"&:active": {
backgroundColor: e.wireframe ? "transparent" : e.colorFillContentHover
}
}, (0, v.genFocusStyle)(e)),
[`${o}-header`]: {
color: e.colorText,
background: e.modalHeaderBg,
borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
marginBottom: e.marginXS
},
[`${o}-body`]: {
fontSize: e.fontSize,
lineHeight: e.lineHeight,
wordWrap: "break-word"
},
[`${o}-footer`]: {
textAlign: "end",
background: e.modalFooterBg,
marginTop: e.marginSM,
[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
marginBottom: 0,
marginInlineStart: e.marginXS
}
},
[`${o}-open`]: {
overflow: "hidden"
}
})
},
// ======================== Pure =========================
{
[`${o}-pure-panel`]: {
top: "auto",
padding: 0,
display: "flex",
flexDirection: "column",
[`${o}-content,
${o}-body,
${o}-confirm-body-wrapper`]: {
display: "flex",
flexDirection: "column",
flex: "auto"
},
[`${o}-confirm-body`]: {
marginBottom: "auto"
}
}
}
];
}, p = (e) => {
const {
componentCls: o
} = e, r = `${o}-confirm`;
return {
[r]: {
"&-rtl": {
direction: "rtl"
},
[`${e.antCls}-modal-header`]: {
display: "none"
},
[`${r}-body-wrapper`]: (0, t.default)({}, (0, v.clearFix)()),
[`${r}-body`]: {
display: "flex",
flexWrap: "wrap",
alignItems: "center",
[`${r}-title`]: {
flex: "0 0 100%",
display: "block",
// create BFC to avoid
// https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
overflow: "hidden",
color: e.colorTextHeading,
fontWeight: e.fontWeightStrong,
fontSize: e.modalHeaderTitleFontSize,
lineHeight: e.modalHeaderTitleLineHeight,
[`+ ${r}-content`]: {
marginBlockStart: e.marginXS,
flexBasis: "100%",
maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
}
},
[`${r}-content`]: {
color: e.colorText,
fontSize: e.fontSize
},
[`> ${e.iconCls}`]: {
flex: "none",
marginInlineEnd: e.marginSM,
fontSize: e.modalConfirmIconSize,
[`+ ${r}-title`]: {
flex: 1
},
// `content` after `icon` should set marginLeft
[`+ ${r}-title + ${r}-content`]: {
marginInlineStart: e.modalConfirmIconSize + e.marginSM
}
}
},
[`${r}-btns`]: {
textAlign: "end",
marginTop: e.marginSM,
[`${e.antCls}-btn + ${e.antCls}-btn`]: {
marginBottom: 0,
marginInlineStart: e.marginXS
}
}
},
[`${r}-error ${r}-body > ${e.iconCls}`]: {
color: e.colorError
},
[`${r}-warning ${r}-body > ${e.iconCls},
${r}-confirm ${r}-body > ${e.iconCls}`]: {
color: e.colorWarning
},
[`${r}-info ${r}-body > ${e.iconCls}`]: {
color: e.colorInfo
},
[`${r}-success ${r}-body > ${e.iconCls}`]: {
color: e.colorSuccess
},
// https://github.com/ant-design/ant-design/issues/37329
[`${o}-zoom-leave ${o}-btns`]: {
pointerEvents: "none"
}
};
}, c = (e) => {
const {
componentCls: o
} = e;
return {
[`${o}-root`]: {
[`${o}-wrap-rtl`]: {
direction: "rtl",
[`${o}-confirm-body`]: {
direction: "rtl"
}
}
}
};
}, C = (e) => {
const {
componentCls: o,
antCls: r
} = e, i = `${o}-confirm`;
return {
[o]: {
[`${o}-content`]: {
padding: 0
},
[`${o}-header`]: {
padding: e.modalHeaderPadding,
borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
marginBottom: 0
},
[`${o}-body`]: {
padding: e.modalBodyPadding
},
[`${o}-footer`]: {
padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
marginTop: 0
}
},
[i]: {
[`${r}-modal-body`]: {
padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
},
[`${i}-body`]: {
[`> ${e.iconCls}`]: {
marginInlineEnd: e.margin,
// `content` after `icon` should set marginLeft
[`+ ${i}-title + ${i}-content`]: {
marginInlineStart: e.modalConfirmIconSize + e.margin
}
}
},
[`${i}-btns`]: {
marginTop: e.marginLG
}
}
};
};
var l = (0, u.genComponentStyleHook)("Modal", (e) => {
const o = e.padding, r = e.fontSizeHeading5, i = e.lineHeightHeading5, m = (0, u.mergeToken)(e, {
modalBodyPadding: e.paddingLG,
modalHeaderBg: e.colorBgElevated,
modalHeaderPadding: `${o}px ${e.paddingLG}px`,
modalHeaderBorderWidth: e.lineWidth,
modalHeaderBorderStyle: e.lineType,
modalHeaderTitleLineHeight: i,
modalHeaderTitleFontSize: r,
modalHeaderBorderColorSplit: e.colorSplit,
modalHeaderCloseSize: i * r + o * 2,
modalContentBg: e.colorBgElevated,
modalHeadingColor: e.colorTextHeading,
modalCloseColor: e.colorTextDescription,
modalFooterBg: "transparent",
modalFooterBorderColorSplit: e.colorSplit,
modalFooterBorderStyle: e.lineType,
modalFooterPaddingVertical: e.paddingXS,
modalFooterPaddingHorizontal: e.padding,
modalFooterBorderWidth: e.lineWidth,
modalConfirmTitleFontSize: e.fontSizeLG,
modalIconHoverColor: e.colorIconHover,
modalConfirmIconSize: e.fontSize * e.lineHeight,
modalCloseBtnSize: e.controlHeightLG * 0.55
});
return [a(m), p(m), c(m), g(m), e.wireframe && C(m), (0, s.initZoomMotion)(m, "zoom")];
});
return O.default = l, O;
}
export {
k as a,
Ke as b,
je as r
};