revdev-components 0.165.0 → 0.167.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.
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import { InputProps } from "antd";
3
3
  import { FormLineProps } from "../line";
4
- interface Props extends FormLineProps, Omit<InputProps, "name"> {
4
+ export interface InputFieldProps extends FormLineProps, Omit<InputProps, "name"> {
5
5
  inputRegex?: string | RegExp;
6
6
  }
7
- export declare const InputField: React.FC<Props>;
8
- export {};
7
+ export declare const InputField: React.FC<InputFieldProps>;
@@ -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
@@ -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.165.0",
3
+ "version": "0.167.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {