revdev-components 0.167.0 → 0.169.0
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/build/button/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonProps as AntdButtonProps } from "antd";
|
|
|
3
3
|
import { TooltipPlacement } from "antd/es/tooltip";
|
|
4
4
|
import { RegularIconName } from "../icon";
|
|
5
5
|
interface ButtonContentProps extends Omit<AntdButtonProps, "icon" | "rightIcon"> {
|
|
6
|
-
icon?: RegularIconName;
|
|
6
|
+
icon?: RegularIconName | React.ReactElement;
|
|
7
7
|
rightIcon?: RegularIconName;
|
|
8
8
|
isPrimary?: boolean;
|
|
9
9
|
}
|
package/build/index.js
CHANGED
|
@@ -5180,7 +5180,7 @@ var InfoDialog = function (_a) {
|
|
|
5180
5180
|
var s$i = {"root":"index-module_root__BQI-i","header":"index-module_header__OUCQj","title":"index-module_title__HPbDC","close":"index-module_close__-FN6K","content":"index-module_content__BpXha","footer":"index-module_footer__xqKte"};
|
|
5181
5181
|
|
|
5182
5182
|
var RegularDialog = function (_a) {
|
|
5183
|
-
var titleIcon = _a.titleIcon, titlePrefix = _a.titlePrefix, title = _a.title, children = _a.children, _b = _a.hideFooter, hideFooter = _b === void 0 ? false : _b, className = _a.className, width = _a.width, okText = _a.okText, cancelText = _a.cancelText, footerClassName = _a.footerClassName, contentClassName = _a.contentClassName, okHide = _a.okHide, okDisabled = _a.okDisabled, onOk = _a.onOk, onClose = _a.onClose, _c = _a.open, open = _c === void 0 ? true : _c, _d = _a.maskClosable, maskClosable = _d === void 0 ? false : _d;
|
|
5183
|
+
var titleIcon = _a.titleIcon, titlePrefix = _a.titlePrefix, title = _a.title, children = _a.children, _b = _a.hideFooter, hideFooter = _b === void 0 ? false : _b, className = _a.className, width = _a.width, okText = _a.okText, cancelText = _a.cancelText, footerClassName = _a.footerClassName, contentClassName = _a.contentClassName, okHide = _a.okHide, okDisabled = _a.okDisabled, okLoading = _a.okLoading, onOk = _a.onOk, onClose = _a.onClose, _c = _a.open, open = _c === void 0 ? true : _c, _d = _a.maskClosable, maskClosable = _d === void 0 ? false : _d;
|
|
5184
5184
|
var close = React.useMemo(function () {
|
|
5185
5185
|
return React.createElement(RegularIcon, { name: "cross", className: s$i.close, onClick: onClose });
|
|
5186
5186
|
}, [onClose]);
|
|
@@ -5212,7 +5212,7 @@ var RegularDialog = function (_a) {
|
|
|
5212
5212
|
React.createElement("div", { className: classNames(s$i.content, contentClassName) }, children),
|
|
5213
5213
|
hideFooter ? null : (React.createElement("div", { className: classNames(s$i.footer, footerClassName) },
|
|
5214
5214
|
React.createElement(antd.Button, { onClick: onClose }, cancelText || "Cancel"),
|
|
5215
|
-
okHide ? null : (React.createElement(antd.Button, { type: "primary", onClick: onOk, disabled: okDisabled }, okText || "OK"))))));
|
|
5215
|
+
okHide ? null : (React.createElement(antd.Button, { type: "primary", onClick: onOk, disabled: okDisabled, loading: okLoading }, okText || "OK"))))));
|
|
5216
5216
|
};
|
|
5217
5217
|
|
|
5218
5218
|
var s$h = {"root":"index-module_root__qFuRH"};
|
|
@@ -5494,17 +5494,19 @@ var HeaderActionPanel = function (_a) {
|
|
|
5494
5494
|
var content = action;
|
|
5495
5495
|
var button = action;
|
|
5496
5496
|
var link = action;
|
|
5497
|
+
var _a = action, icon = _a.icon, loading = _a.loading;
|
|
5498
|
+
var iconElement = loading ? React.createElement(antd.Spin, null) : icon;
|
|
5497
5499
|
if (content === null || content === void 0 ? void 0 : content.content) {
|
|
5498
5500
|
return React.createElement(React.Fragment, { key: i }, content === null || content === void 0 ? void 0 : content.content);
|
|
5499
5501
|
}
|
|
5500
5502
|
else if (typeof (button === null || button === void 0 ? void 0 : button.onClick) === "function") {
|
|
5501
|
-
var
|
|
5503
|
+
var label = button.label, tooltip = button.tooltip, confirmText = button.confirmText, onClick = button.onClick;
|
|
5502
5504
|
return confirmText ? (React.createElement(antd.Popconfirm, { key: i, title: confirmText, onConfirm: onClick, okText: "Yes", cancelText: "No" },
|
|
5503
|
-
React.createElement(Button, { key: i, icon:
|
|
5505
|
+
React.createElement(Button, { key: i, icon: iconElement, tooltip: tooltip, className: s$4.button, size: size, disabled: loading }, label))) : (React.createElement(Button, { key: i, icon: iconElement, onClick: onClick, tooltip: tooltip, className: s$4.button, size: size, disabled: loading }, label));
|
|
5504
5506
|
}
|
|
5505
5507
|
else if (typeof (link === null || link === void 0 ? void 0 : link.href) === "string") {
|
|
5506
|
-
var
|
|
5507
|
-
return (React.createElement(Button, { key: i, icon:
|
|
5508
|
+
var label = link.label, tooltip = link.tooltip, href = link.href;
|
|
5509
|
+
return (React.createElement(Button, { key: i, icon: iconElement, tooltip: tooltip, href: href, className: s$4.link, size: size, disabled: loading }, label));
|
|
5508
5510
|
}
|
|
5509
5511
|
}))) : null;
|
|
5510
5512
|
};
|