@oceanbase/design 0.2.13 → 0.2.15
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/design.min.js +1 -1
- package/es/_util/genComponentStyleHook.d.ts +3 -1
- package/es/_util/genComponentStyleHook.js +2 -2
- package/es/alert/index.js +2 -3
- package/es/alert/style/index.js +21 -4
- package/es/button/index.d.ts +1 -1
- package/es/button/index.js +2 -3
- package/es/card/index.js +2 -3
- package/es/card/style/index.js +2 -2
- package/es/config-provider/index.d.ts +12 -3
- package/es/config-provider/index.js +3 -1
- package/es/descriptions/index.js +5 -7
- package/es/form/FormItem.d.ts +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/lottie/index.d.ts +16 -0
- package/es/lottie/index.js +65 -0
- package/es/modal/Modal.d.ts +30 -0
- package/es/modal/Modal.js +50 -0
- package/es/modal/Progress.d.ts +10 -0
- package/es/modal/Progress.js +46 -0
- package/es/modal/index.d.ts +7 -30
- package/es/modal/index.js +4 -52
- package/es/modal/style/index.js +42 -5
- package/es/spin/assets/spin-gray.json +1 -0
- package/es/spin/assets/spin.json +1 -0
- package/es/spin/index.d.ts +11 -0
- package/es/spin/index.js +49 -1
- package/es/spin/style/index.d.ts +13 -0
- package/es/spin/style/index.js +70 -0
- package/es/table/index.d.ts +2 -2
- package/es/table/index.js +8 -4
- package/es/tabs/index.js +5 -4
- package/es/tabs/style/index.d.ts +2 -1
- package/es/theme/index.d.ts +0 -48
- package/es/theme/index.js +5 -3
- package/es/theme/internal.d.ts +1 -0
- package/es/theme/internal.js +1 -0
- package/es/tooltip/MouseTooltip.js +1 -1
- package/es/tooltip/index.d.ts +2 -0
- package/es/tooltip/index.js +70 -7
- package/es/tooltip/style/index.d.ts +9 -0
- package/es/tooltip/style/index.js +29 -0
- package/lib/_util/genComponentStyleHook.d.ts +3 -1
- package/lib/_util/genComponentStyleHook.js +8 -4
- package/lib/alert/index.js +2 -3
- package/lib/alert/style/index.js +20 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +2 -2
- package/lib/card/index.js +2 -3
- package/lib/card/style/index.js +5 -7
- package/lib/config-provider/index.d.ts +12 -3
- package/lib/config-provider/index.js +2 -1
- package/lib/descriptions/index.js +4 -5
- package/lib/form/FormItem.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/lottie/index.d.ts +16 -0
- package/lib/lottie/index.js +79 -0
- package/lib/modal/Modal.d.ts +30 -0
- package/lib/modal/Modal.js +59 -0
- package/lib/modal/Progress.d.ts +10 -0
- package/lib/modal/Progress.js +71 -0
- package/lib/modal/index.d.ts +7 -30
- package/lib/modal/index.js +5 -40
- package/lib/modal/style/index.js +60 -1
- package/lib/spin/assets/spin-gray.json +1 -0
- package/lib/spin/assets/spin.json +1 -0
- package/lib/spin/index.d.ts +11 -0
- package/lib/spin/index.js +63 -1
- package/lib/spin/style/index.d.ts +13 -0
- package/lib/spin/style/index.js +105 -0
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +7 -4
- package/lib/tabs/index.js +2 -2
- package/lib/tabs/style/index.d.ts +2 -1
- package/lib/theme/index.d.ts +0 -48
- package/lib/theme/index.js +3 -4
- package/lib/theme/internal.d.ts +1 -0
- package/lib/theme/internal.js +23 -0
- package/lib/tooltip/MouseTooltip.js +1 -1
- package/lib/tooltip/index.d.ts +2 -0
- package/lib/tooltip/index.js +44 -2
- package/lib/tooltip/style/index.d.ts +9 -0
- package/lib/tooltip/style/index.js +55 -0
- package/package.json +10 -9
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/lottie/index.tsx
|
|
30
|
+
var lottie_exports = {};
|
|
31
|
+
__export(lottie_exports, {
|
|
32
|
+
default: () => lottie_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(lottie_exports);
|
|
35
|
+
var import_lottie_web = __toESM(require("lottie-web"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_ahooks = require("ahooks");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var Lottie = import_react.default.forwardRef(
|
|
40
|
+
({ mode = "default", loop = true, speed = 1, className, style, ...restProps }, ref) => {
|
|
41
|
+
const [animation, setAnimation] = (0, import_react.useState)();
|
|
42
|
+
const containerRef = (0, import_react.useRef)();
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
if (!animation) {
|
|
45
|
+
const newAnimation = import_lottie_web.default.loadAnimation({
|
|
46
|
+
container: containerRef.current,
|
|
47
|
+
renderer: "svg",
|
|
48
|
+
loop,
|
|
49
|
+
...restProps
|
|
50
|
+
});
|
|
51
|
+
setAnimation(newAnimation);
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
(0, import_ahooks.useUpdateEffect)(() => {
|
|
55
|
+
if (animation) {
|
|
56
|
+
animation.setLoop(loop);
|
|
57
|
+
animation.setSpeed(speed);
|
|
58
|
+
}
|
|
59
|
+
}, [loop, speed]);
|
|
60
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
61
|
+
animation
|
|
62
|
+
}));
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref: containerRef,
|
|
67
|
+
className: (0, import_classnames.default)(className, {
|
|
68
|
+
// 图标展示模式,则追加 anticon 类名
|
|
69
|
+
["anticon"]: mode === "icon"
|
|
70
|
+
}),
|
|
71
|
+
style: {
|
|
72
|
+
display: "inline-block",
|
|
73
|
+
...style
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
var lottie_default = Lottie;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ModalProps } from 'antd/es/modal';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const Modal: {
|
|
4
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
5
|
+
info(props: any): {
|
|
6
|
+
destroy: () => void;
|
|
7
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
8
|
+
};
|
|
9
|
+
success(props: any): {
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
12
|
+
};
|
|
13
|
+
error(props: any): {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
warning(props: any): {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
};
|
|
21
|
+
confirm(props: any): {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
+
};
|
|
25
|
+
useModal: typeof import("antd/es/modal/useModal").default;
|
|
26
|
+
destroyAll: () => void;
|
|
27
|
+
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export default Modal;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/modal/Modal.tsx
|
|
30
|
+
var Modal_exports = {};
|
|
31
|
+
__export(Modal_exports, {
|
|
32
|
+
default: () => Modal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Modal_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
|
+
var import_static_function = require("../static-function");
|
|
40
|
+
var import_style = __toESM(require("./style"));
|
|
41
|
+
var Modal = ({ prefixCls: customizePrefixCls, className, ...restProps }) => {
|
|
42
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
43
|
+
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
44
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
45
|
+
const modalCls = (0, import_classnames.default)(className);
|
|
46
|
+
return wrapSSR(/* @__PURE__ */ import_react.default.createElement(import_antd.Modal, { prefixCls: customizePrefixCls, className: modalCls, ...restProps }));
|
|
47
|
+
};
|
|
48
|
+
Modal.info = (props) => import_static_function.modal.info(props);
|
|
49
|
+
Modal.success = (props) => import_static_function.modal.success(props);
|
|
50
|
+
Modal.error = (props) => import_static_function.modal.error(props);
|
|
51
|
+
Modal.warning = (props) => import_static_function.modal.warning(props);
|
|
52
|
+
Modal.confirm = (props) => import_static_function.modal.confirm(props);
|
|
53
|
+
Modal.useModal = import_antd.Modal.useModal;
|
|
54
|
+
Modal.destroyAll = import_antd.Modal.destroyAll;
|
|
55
|
+
Modal.config = import_antd.Modal.config;
|
|
56
|
+
if (process.env.NODE_ENV !== "production") {
|
|
57
|
+
Modal.displayName = import_antd.Modal.displayName;
|
|
58
|
+
}
|
|
59
|
+
var Modal_default = Modal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ModalProps } from 'antd/es/modal';
|
|
3
|
+
import type { ProgressProps } from 'antd/es/progress';
|
|
4
|
+
export interface ModalProgressProps extends ModalProps {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
progress?: ProgressProps;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Progress: ({ prefixCls: customizePrefixCls, className, width, maskClosable, loading, progress, description, footer, ...restProps }: ModalProgressProps) => React.JSX.Element;
|
|
10
|
+
export default Progress;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/modal/Progress.tsx
|
|
30
|
+
var Progress_exports = {};
|
|
31
|
+
__export(Progress_exports, {
|
|
32
|
+
default: () => Progress_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Progress_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
|
+
var import_Modal = __toESM(require("./Modal"));
|
|
40
|
+
var import_icons = require("@oceanbase/icons");
|
|
41
|
+
var Progress = ({
|
|
42
|
+
prefixCls: customizePrefixCls,
|
|
43
|
+
className,
|
|
44
|
+
width = 567,
|
|
45
|
+
maskClosable = false,
|
|
46
|
+
loading,
|
|
47
|
+
progress,
|
|
48
|
+
description,
|
|
49
|
+
footer = null,
|
|
50
|
+
...restProps
|
|
51
|
+
}) => {
|
|
52
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
53
|
+
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
54
|
+
const progressModalCls = (0, import_classnames.default)(`${prefixCls}-progress`, className);
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
56
|
+
import_Modal.default,
|
|
57
|
+
{
|
|
58
|
+
prefixCls: customizePrefixCls,
|
|
59
|
+
className: progressModalCls,
|
|
60
|
+
width,
|
|
61
|
+
maskClosable,
|
|
62
|
+
footer,
|
|
63
|
+
...restProps
|
|
64
|
+
},
|
|
65
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, loading ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, { className: `${prefixCls}-progress-loading` }) : /* @__PURE__ */ import_react.default.createElement(import_antd.Progress, { type: "circle", size: 200, ...progress }), description && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-progress-description` }, description))
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
if (process.env.NODE_ENV !== "production") {
|
|
69
|
+
import_Modal.default.displayName = "Modal.Progress";
|
|
70
|
+
}
|
|
71
|
+
var Progress_default = Progress;
|
package/lib/modal/index.d.ts
CHANGED
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Progress from './Progress';
|
|
2
|
+
import OriginModal from './Modal';
|
|
3
3
|
export * from 'antd/es/modal';
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
info(props: any): {
|
|
8
|
-
destroy: () => void;
|
|
9
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
10
|
-
};
|
|
11
|
-
success(props: any): {
|
|
12
|
-
destroy: () => void;
|
|
13
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
14
|
-
};
|
|
15
|
-
error(props: any): {
|
|
16
|
-
destroy: () => void;
|
|
17
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
18
|
-
};
|
|
19
|
-
warning(props: any): {
|
|
20
|
-
destroy: () => void;
|
|
21
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
22
|
-
};
|
|
23
|
-
confirm(props: any): {
|
|
24
|
-
destroy: () => void;
|
|
25
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
26
|
-
};
|
|
27
|
-
useModal: typeof import("antd/es/modal/useModal").default;
|
|
28
|
-
destroyAll: () => void;
|
|
29
|
-
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
30
|
-
displayName: string;
|
|
4
|
+
export type { ModalProgressProps } from './Progress';
|
|
5
|
+
export type ModalType = typeof OriginModal & {
|
|
6
|
+
Progress: typeof Progress;
|
|
31
7
|
};
|
|
32
|
-
|
|
8
|
+
declare const _default: ModalType;
|
|
9
|
+
export default _default;
|
package/lib/modal/index.js
CHANGED
|
@@ -27,52 +27,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/modal/index.
|
|
30
|
+
// src/modal/index.ts
|
|
31
31
|
var modal_exports = {};
|
|
32
32
|
__export(modal_exports, {
|
|
33
33
|
default: () => modal_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(modal_exports);
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var import_react = __toESM(require("react"));
|
|
39
|
-
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
|
-
var import_static_function = require("../static-function");
|
|
41
|
-
var import_style = __toESM(require("./style"));
|
|
36
|
+
var import_Progress = __toESM(require("./Progress"));
|
|
37
|
+
var import_Modal = __toESM(require("./Modal"));
|
|
42
38
|
__reExport(modal_exports, require("antd/es/modal"), module.exports);
|
|
43
|
-
var Modal =
|
|
44
|
-
|
|
45
|
-
className,
|
|
46
|
-
rootClassName,
|
|
47
|
-
...restProps
|
|
48
|
-
}) => {
|
|
49
|
-
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
50
|
-
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
51
|
-
const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
|
|
52
|
-
const modalCls = (0, import_classnames.default)(className, hashId);
|
|
53
|
-
return wrapSSR(
|
|
54
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
55
|
-
import_antd.Modal,
|
|
56
|
-
{
|
|
57
|
-
prefixCls: customizePrefixCls,
|
|
58
|
-
className: modalCls,
|
|
59
|
-
rootClassName: (0, import_classnames.default)(rootClassName, hashId),
|
|
60
|
-
...restProps
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
};
|
|
65
|
-
Modal.info = (props) => import_static_function.modal.info(props);
|
|
66
|
-
Modal.success = (props) => import_static_function.modal.success(props);
|
|
67
|
-
Modal.error = (props) => import_static_function.modal.error(props);
|
|
68
|
-
Modal.warning = (props) => import_static_function.modal.warning(props);
|
|
69
|
-
Modal.confirm = (props) => import_static_function.modal.confirm(props);
|
|
70
|
-
Modal.useModal = import_antd.Modal.useModal;
|
|
71
|
-
Modal.destroyAll = import_antd.Modal.destroyAll;
|
|
72
|
-
Modal.config = import_antd.Modal.config;
|
|
73
|
-
if (process.env.NODE_ENV !== "production") {
|
|
74
|
-
Modal.displayName = import_antd.Modal.displayName;
|
|
75
|
-
}
|
|
39
|
+
var Modal = import_Modal.default;
|
|
40
|
+
Modal.Progress = import_Progress.default;
|
|
76
41
|
var modal_default = Modal;
|
|
77
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
78
43
|
0 && (module.exports = {
|
package/lib/modal/style/index.js
CHANGED
|
@@ -25,15 +25,74 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genModalStyle = (token) => {
|
|
28
|
-
const {
|
|
28
|
+
const {
|
|
29
|
+
antCls,
|
|
30
|
+
componentCls,
|
|
31
|
+
marginSM,
|
|
32
|
+
marginLG,
|
|
33
|
+
paddingMD,
|
|
34
|
+
borderRadius,
|
|
35
|
+
controlHeight,
|
|
36
|
+
fontSizeHeading5,
|
|
37
|
+
lineHeightHeading5
|
|
38
|
+
} = token;
|
|
39
|
+
const top = 100;
|
|
40
|
+
const bottom = 100;
|
|
41
|
+
const titleHeight = fontSizeHeading5 * lineHeightHeading5;
|
|
29
42
|
return {
|
|
43
|
+
/* Modal */
|
|
30
44
|
[`${componentCls}:not(${componentCls}-confirm)`]: {
|
|
31
45
|
[`${componentCls}-header`]: {
|
|
32
46
|
marginBottom: marginLG
|
|
33
47
|
},
|
|
48
|
+
[`${componentCls}-body`]: {
|
|
49
|
+
maxHeight: `calc(100vh - ${top + bottom}px - ${paddingMD * 2}px - ${marginLG * 2}px - ${titleHeight + controlHeight}px)`,
|
|
50
|
+
overflowY: "auto",
|
|
51
|
+
borderRadius
|
|
52
|
+
},
|
|
34
53
|
[`${componentCls}-footer`]: {
|
|
35
54
|
marginTop: marginLG
|
|
36
55
|
}
|
|
56
|
+
},
|
|
57
|
+
/* Modal.Progress */
|
|
58
|
+
[`${componentCls}${componentCls}-progress`]: {
|
|
59
|
+
[`${componentCls}-content`]: {
|
|
60
|
+
padding: `${token.paddingXL + token.padding}px ${token.paddingLG + token.padding}px`,
|
|
61
|
+
[`${componentCls}-header`]: {
|
|
62
|
+
textAlign: "center",
|
|
63
|
+
marginBottom: token.marginXXL,
|
|
64
|
+
[`${componentCls}-title`]: {
|
|
65
|
+
fontSize: token.fontSizeHeading4
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[`${componentCls}-body`]: {
|
|
69
|
+
textAlign: "center",
|
|
70
|
+
[`${componentCls}-progress-loading`]: {
|
|
71
|
+
fontSize: 200,
|
|
72
|
+
color: token.colorInfo
|
|
73
|
+
},
|
|
74
|
+
[`${componentCls}-progress-description`]: {
|
|
75
|
+
marginTop: token.marginXXL,
|
|
76
|
+
color: token.colorTextTertiary
|
|
77
|
+
},
|
|
78
|
+
// should align to left for Alert
|
|
79
|
+
[`${antCls}-alert`]: {
|
|
80
|
+
textAlign: "left"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
[`${componentCls}-footer`]: {
|
|
84
|
+
textAlign: "center"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
/* Modal.method() */
|
|
89
|
+
[`${componentCls}-confirm`]: {
|
|
90
|
+
[`${componentCls}-body ${componentCls}-confirm-title +${componentCls}-confirm-content`]: {
|
|
91
|
+
marginBlockStart: marginSM
|
|
92
|
+
},
|
|
93
|
+
[`${componentCls}-confirm-btns`]: {
|
|
94
|
+
marginTop: marginLG
|
|
95
|
+
}
|
|
37
96
|
}
|
|
38
97
|
};
|
|
39
98
|
};
|