revdev-components 0.166.0 → 0.168.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.
@@ -15,6 +15,7 @@ export interface RegularDialogProps {
15
15
  contentClassName?: string;
16
16
  okHide?: boolean;
17
17
  okDisabled?: boolean;
18
+ okLoading?: boolean;
18
19
  onOk?: () => void;
19
20
  onClose?: () => void;
20
21
  open?: boolean;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { SizeType } from "antd/es/config-provider/SizeContext";
2
3
  import { RegularIconName } from "src/icon/regular";
3
4
  interface BaseHeaderActionProps {
4
5
  icon: RegularIconName;
@@ -19,6 +20,7 @@ export type HeaderActionProps = ClickHeaderActionProps | LinkHeaderActionProps |
19
20
  export interface HeaderActionPanelProps {
20
21
  className?: string;
21
22
  actions?: HeaderActionProps[];
23
+ size?: SizeType;
22
24
  }
23
25
  export declare const HeaderActionPanel: React.FC<HeaderActionPanelProps>;
24
26
  export {};
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"};
@@ -5489,7 +5489,7 @@ var s$4 = {"root":"index-module_root__OWeNb","link":"index-module_link__H8HcA","
5489
5489
 
5490
5490
  /* eslint-disable react/no-array-index-key */
5491
5491
  var HeaderActionPanel = function (_a) {
5492
- var className = _a.className, actions = _a.actions;
5492
+ var className = _a.className, actions = _a.actions, _b = _a.size, size = _b === void 0 ? "small" : _b;
5493
5493
  return (actions === null || actions === void 0 ? void 0 : actions.length) ? (React.createElement("div", { className: classNames(s$4.root, className) }, actions.map(function (action, i) {
5494
5494
  var content = action;
5495
5495
  var button = action;
@@ -5497,16 +5497,14 @@ var HeaderActionPanel = function (_a) {
5497
5497
  if (content === null || content === void 0 ? void 0 : content.content) {
5498
5498
  return React.createElement(React.Fragment, { key: i }, content === null || content === void 0 ? void 0 : content.content);
5499
5499
  }
5500
- else if (button === null || button === void 0 ? void 0 : button.onClick) {
5501
- var icon = button.icon, label = button.label, tooltip = button.tooltip, confirmText = button.confirmText;
5502
- return confirmText ? (React.createElement(antd.Popconfirm, { key: i, title: confirmText, onConfirm: button.onClick, okText: "Yes", cancelText: "No" },
5503
- React.createElement("div", null,
5504
- React.createElement(IconDivision, { key: i, icon: icon, tooltip: tooltip, className: s$4.button }, label)))) : (React.createElement(IconDivision, { key: i, icon: icon, onClick: button === null || button === void 0 ? void 0 : button.onClick, tooltip: tooltip, className: s$4.button }, label));
5500
+ else if (typeof (button === null || button === void 0 ? void 0 : button.onClick) === "function") {
5501
+ var icon = button.icon, label = button.label, tooltip = button.tooltip, confirmText = button.confirmText, onClick = button.onClick;
5502
+ return confirmText ? (React.createElement(antd.Popconfirm, { key: i, title: confirmText, onConfirm: onClick, okText: "Yes", cancelText: "No" },
5503
+ React.createElement(Button, { key: i, icon: icon, tooltip: tooltip, className: s$4.button, size: size }, label))) : (React.createElement(Button, { key: i, icon: icon, onClick: onClick, tooltip: tooltip, className: s$4.button, size: size }, label));
5505
5504
  }
5506
- else if (link === null || link === void 0 ? void 0 : link.href) {
5507
- var icon = link.icon, label = link.label, tooltip = link.tooltip;
5508
- return (React.createElement(AppLink, { key: i, href: link.href, className: s$4.link },
5509
- React.createElement(IconDivision, { icon: icon, tooltip: tooltip }, label)));
5505
+ else if (typeof (link === null || link === void 0 ? void 0 : link.href) === "string") {
5506
+ var icon = link.icon, label = link.label, tooltip = link.tooltip, href = link.href;
5507
+ return (React.createElement(Button, { key: i, icon: icon, tooltip: tooltip, href: href, className: s$4.link, size: size }, label));
5510
5508
  }
5511
5509
  }))) : null;
5512
5510
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.166.0",
3
+ "version": "0.168.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {