revdev-components 0.293.0 → 0.295.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.
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface Props {
3
+ className?: string;
4
+ children?: React.ReactNode;
5
+ }
6
+ export declare const FormActionPanel: React.FC<Props>;
7
+ export {};
@@ -1,7 +1,12 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "src/button/index";
3
- interface Props extends ButtonProps {
4
- rightContent?: React.ReactNode;
2
+ import { ButtonType } from "antd/es/button";
3
+ interface Props {
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ loading?: boolean;
7
+ disabled?: boolean;
8
+ type?: ButtonType;
9
+ buttonRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
5
10
  }
6
11
  export declare const FormButton: React.FC<Props>;
7
12
  export {};
@@ -1,2 +1,3 @@
1
1
  export * from "./formButton";
2
2
  export * from "./formError";
3
+ export * from "./formActionPanel";
package/build/index.js CHANGED
@@ -5713,48 +5713,27 @@ var SwitchButtonField = function (props) {
5713
5713
  React.createElement(SwitchButtonControl, __assign({ buttonStyle: buttonStyle, optionType: optionType }, controlProps))));
5714
5714
  };
5715
5715
 
5716
- var s$u = {"root":"index-module_root__9GQDU"};
5716
+ var s$u = {"root":"index-module_root__60lsV"};
5717
5717
 
5718
- var s$t = {"root":"index-module_root__EQ0II","rounded":"index-module_rounded__4OK03","link":"index-module_link__fptGw"};
5719
-
5720
- var Content = function (_a) {
5721
- var _b;
5722
- var icon = _a.icon, rightIcon = _a.rightIcon, isPrimary = _a.isPrimary, className = _a.className, children = _a.children, href = _a.href, size = _a.size, buttonRef = _a.buttonRef, props = __rest(_a, ["icon", "rightIcon", "isPrimary", "className", "children", "href", "size", "buttonRef"]);
5723
- var style = React.useMemo(function () {
5724
- var result = {};
5725
- if (size === "small") {
5726
- result["--rcButtonSize"] = "20px";
5727
- }
5728
- return result;
5729
- }, [size]);
5730
- return (React.createElement(antd.Button, __assign({ style: style, className: classNames(s$t.root, className, (_b = {}, _b[s$t.rounded] = !children, _b[s$t.link] = href, _b)), type: isPrimary ? "primary" : "default", size: size, ref: buttonRef }, props),
5731
- React.createElement(IconDivision, { icon: icon, rightIcon: rightIcon }, children)));
5732
- };
5733
- var Button = function (_a) {
5734
- var tooltip = _a.tooltip, tooltipPlacement = _a.tooltipPlacement, hoverOpenDelay = _a.hoverOpenDelay, href = _a.href, props = __rest(_a, ["tooltip", "tooltipPlacement", "hoverOpenDelay", "href"]);
5735
- if (href) {
5736
- return (React.createElement(AppLink, { href: href, target: props.target, noneDecoration: true },
5737
- React.createElement(Content, __assign({}, props, { href: href }))));
5738
- }
5739
- return tooltip ? (React.createElement(AppTooltip, { placement: tooltipPlacement, title: tooltip, mouseEnterDelay: hoverOpenDelay },
5740
- React.createElement(Content, __assign({}, props)))) : (React.createElement(Content, __assign({}, props)));
5718
+ var FormActionPanel = function (_a) {
5719
+ var className = _a.className, children = _a.children;
5720
+ return React.createElement("div", { className: classNames(s$u.root, className) }, children);
5741
5721
  };
5742
5722
 
5743
5723
  var FormButton = function (_a) {
5744
- var className = _a.className, _b = _a.children, children = _b === void 0 ? "Save" : _b, _c = _a.type, type = _c === void 0 ? "primary" : _c, rightContent = _a.rightContent, props = __rest(_a, ["className", "children", "type", "rightContent"]);
5745
- return (React.createElement("div", { className: classNames(s$u.root, className) },
5746
- React.createElement(Button, __assign({ htmlType: "submit", type: type }, props), children),
5747
- rightContent));
5724
+ var className = _a.className, _b = _a.children, children = _b === void 0 ? "Save" : _b, loading = _a.loading, disabled = _a.disabled, _c = _a.type, type = _c === void 0 ? "primary" : _c, buttonRef = _a.buttonRef;
5725
+ return (React.createElement(FormActionPanel, { className: className },
5726
+ React.createElement(antd.Button, { ref: buttonRef, htmlType: "submit", type: type, loading: loading, disabled: disabled }, children)));
5748
5727
  };
5749
5728
 
5750
- var s$s = {"root":"index-module_root__C05Ty"};
5729
+ var s$t = {"root":"index-module_root__C05Ty"};
5751
5730
 
5752
5731
  var FormError = function (_a) {
5753
5732
  var children = _a.children, className = _a.className;
5754
- return children ? React.createElement("div", { className: classNames(s$s.root, className) }, children) : null;
5733
+ return children ? React.createElement("div", { className: classNames(s$t.root, className) }, children) : null;
5755
5734
  };
5756
5735
 
5757
- var s$r = {"root":"index-module_root__C7wx2","content":"index-module_content__RsiJT","close":"index-module_close__lBc6p"};
5736
+ var s$s = {"root":"index-module_root__C7wx2","content":"index-module_content__RsiJT","close":"index-module_close__lBc6p"};
5758
5737
 
5759
5738
  var InfoDialog = function (_a) {
5760
5739
  var children = _a.children, className = _a.className, width = _a.width, hideClose = _a.hideClose, onClose = _a.onClose, _b = _a.open, open = _b === void 0 ? true : _b, contentClassName = _a.contentClassName, _c = _a.maskClosable, maskClosable = _c === void 0 ? false : _c;
@@ -5766,23 +5745,23 @@ var InfoDialog = function (_a) {
5766
5745
  }
5767
5746
  return result;
5768
5747
  }, [width]);
5769
- return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$r.root, className), maskClosable: maskClosable, footer: null },
5770
- React.createElement("div", { className: classNames(s$r.content, contentClassName) },
5748
+ return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$s.root, className), maskClosable: maskClosable, footer: null },
5749
+ React.createElement("div", { className: classNames(s$s.content, contentClassName) },
5771
5750
  children,
5772
- hideClose ? null : React.createElement(RegularIcon, { name: "cross", className: s$r.close, onClick: onClose }))));
5751
+ hideClose ? null : React.createElement(RegularIcon, { name: "cross", className: s$s.close, onClick: onClose }))));
5773
5752
  };
5774
5753
 
5775
- var s$q = {"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"};
5754
+ var s$r = {"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"};
5776
5755
 
5777
5756
  var RegularDialog = function (_a) {
5778
5757
  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, cancelHide = _a.cancelHide, 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;
5779
5758
  var close = React.useMemo(function () {
5780
- return React.createElement(RegularIcon, { name: "cross", className: s$q.close, onClick: onClose });
5759
+ return React.createElement(RegularIcon, { name: "cross", className: s$r.close, onClick: onClose });
5781
5760
  }, [onClose]);
5782
5761
  var titleContent = React.useMemo(function () {
5783
5762
  if (typeof title === "string") {
5784
- return (React.createElement("div", { className: s$q.header },
5785
- React.createElement("div", { className: s$q.title },
5763
+ return (React.createElement("div", { className: s$r.header },
5764
+ React.createElement("div", { className: s$r.title },
5786
5765
  titleIcon && React.createElement(RegularIcon, { name: titleIcon }),
5787
5766
  React.createElement("span", null,
5788
5767
  " ",
@@ -5793,7 +5772,7 @@ var RegularDialog = function (_a) {
5793
5772
  return title(close);
5794
5773
  }
5795
5774
  return null;
5796
- }, [s$q, title, titlePrefix, close, titleIcon]);
5775
+ }, [s$r, title, titlePrefix, close, titleIcon]);
5797
5776
  var style = React.useMemo(function () {
5798
5777
  var result = {};
5799
5778
  if (width) {
@@ -5803,15 +5782,15 @@ var RegularDialog = function (_a) {
5803
5782
  return result;
5804
5783
  }, [width]);
5805
5784
  var hideBottom = hideFooter || (cancelHide && okHide);
5806
- return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$q.root, className), maskClosable: maskClosable, footer: null },
5785
+ return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$r.root, className), maskClosable: maskClosable, footer: null },
5807
5786
  titleContent,
5808
- React.createElement("div", { className: classNames(s$q.content, contentClassName) }, children),
5809
- hideBottom ? null : (React.createElement("div", { className: classNames(s$q.footer, footerClassName) },
5787
+ React.createElement("div", { className: classNames(s$r.content, contentClassName) }, children),
5788
+ hideBottom ? null : (React.createElement("div", { className: classNames(s$r.footer, footerClassName) },
5810
5789
  cancelHide ? null : React.createElement(antd.Button, { onClick: onClose }, cancelText || "Cancel"),
5811
5790
  okHide ? null : (React.createElement(antd.Button, { type: "primary", onClick: onOk, disabled: okDisabled, loading: okLoading }, okText || "OK"))))));
5812
5791
  };
5813
5792
 
5814
- var s$p = {"root":"index-module_root__qFuRH"};
5793
+ var s$q = {"root":"index-module_root__qFuRH"};
5815
5794
 
5816
5795
  function isRegular(icon) {
5817
5796
  return RegularIconNameList.includes(icon);
@@ -5821,21 +5800,21 @@ function isSocial(icon) {
5821
5800
  }
5822
5801
  var FlatButton = function (_a) {
5823
5802
  var children = _a.children, className = _a.className, icon = _a.icon, onClick = _a.onClick;
5824
- return (React.createElement("div", { className: classNames(s$p.root, className), onClick: onClick },
5803
+ return (React.createElement("div", { className: classNames(s$q.root, className), onClick: onClick },
5825
5804
  isRegular(icon) ? React.createElement(RegularIcon, { name: icon }) : null,
5826
5805
  isSocial(icon) ? React.createElement(SocialIcon, { name: icon }) : null,
5827
5806
  children ? React.createElement("span", null, children) : null));
5828
5807
  };
5829
5808
 
5830
- var s$o = {"root":"index-module_root__CQ7Qm","title":"index-module_title__Aud2u","title__active":"index-module_title__active__AueKr","title__label":"index-module_title__label__B3vUU","list":"index-module_list__EAf08","list__open":"index-module_list__open__1-0cD"};
5809
+ var s$p = {"root":"index-module_root__CQ7Qm","title":"index-module_title__Aud2u","title__active":"index-module_title__active__AueKr","title__label":"index-module_title__label__B3vUU","list":"index-module_list__EAf08","list__open":"index-module_list__open__1-0cD"};
5831
5810
 
5832
- var s$n = {"root":"index-module_root__AZ9HE","root__active":"index-module_root__active__UqszT"};
5811
+ var s$o = {"root":"index-module_root__AZ9HE","root__active":"index-module_root__active__UqszT"};
5833
5812
 
5834
5813
  var BackSidebarSubMenuItem = function (_a) {
5835
5814
  var _b;
5836
5815
  var isActive = _a.isActive, option = _a.option;
5837
5816
  var icon = option.icon, label = option.label, path = option.href;
5838
- return (React.createElement(AppLink, { className: classNames(s$n.root, (_b = {}, _b[s$n.root__active] = isActive, _b)), href: path },
5817
+ return (React.createElement(AppLink, { className: classNames(s$o.root, (_b = {}, _b[s$o.root__active] = isActive, _b)), href: path },
5839
5818
  icon && React.createElement(RegularIcon, { name: icon }),
5840
5819
  React.createElement("span", null, label)));
5841
5820
  };
@@ -5863,12 +5842,12 @@ var BackSidebarMenuItem = function (_a) {
5863
5842
  var handleClick = React.useCallback(function () {
5864
5843
  setOpen(!open);
5865
5844
  }, [open]);
5866
- return (React.createElement("div", { className: s$o.root },
5867
- React.createElement("div", { className: classNames(s$o.title, (_b = {}, _b[s$o.title__active] = isActive, _b)), onClick: handleClick },
5845
+ return (React.createElement("div", { className: s$p.root },
5846
+ React.createElement("div", { className: classNames(s$p.title, (_b = {}, _b[s$p.title__active] = isActive, _b)), onClick: handleClick },
5868
5847
  icon && React.createElement(RegularIcon, { name: icon }),
5869
- React.createElement("span", { className: s$o.title__label }, label),
5848
+ React.createElement("span", { className: s$p.title__label }, label),
5870
5849
  React.createElement(RegularIcon, { name: open ? "keyboard-arrow-down" : "keyboard-arrow-right" })),
5871
- React.createElement("div", { className: classNames(s$o.list, (_c = {}, _c[s$o.list__open] = open, _c)) }, keys.map(function (x) {
5850
+ React.createElement("div", { className: classNames(s$p.list, (_c = {}, _c[s$p.list__open] = open, _c)) }, keys.map(function (x) {
5872
5851
  var option = mapper[x];
5873
5852
  if (typeof option === "object") {
5874
5853
  return React.createElement(BackSidebarSubMenuItem, { key: x, option: option, isActive: x === activePathKey });
@@ -5876,7 +5855,7 @@ var BackSidebarMenuItem = function (_a) {
5876
5855
  }))));
5877
5856
  };
5878
5857
 
5879
- var s$m = {"root":"index-module_root__yMCtx","list":"index-module_list__Xr6Z5","master":"index-module_master__Eexhz","master__active":"index-module_master__active__j-iWA"};
5858
+ var s$n = {"root":"index-module_root__yMCtx","list":"index-module_list__Xr6Z5","master":"index-module_master__Eexhz","master__active":"index-module_master__active__j-iWA"};
5880
5859
 
5881
5860
  var BackSidebarShortMenuItem = function (_a) {
5882
5861
  var _b;
@@ -5892,9 +5871,9 @@ var BackSidebarShortMenuItem = function (_a) {
5892
5871
  var handleClick = React.useCallback(function () {
5893
5872
  setOpen(!open);
5894
5873
  }, [open]);
5895
- return (React.createElement("div", { className: s$m.root },
5896
- React.createElement("div", { className: classNames(s$m.master, (_b = {}, _b[s$m.master__active] = isActive, _b)), onClick: handleClick }, icon && React.createElement(RegularIcon, { name: icon })),
5897
- React.createElement("div", { className: classNames(s$m.list) }, keys.map(function (x) {
5874
+ return (React.createElement("div", { className: s$n.root },
5875
+ React.createElement("div", { className: classNames(s$n.master, (_b = {}, _b[s$n.master__active] = isActive, _b)), onClick: handleClick }, icon && React.createElement(RegularIcon, { name: icon })),
5876
+ React.createElement("div", { className: classNames(s$n.list) }, keys.map(function (x) {
5898
5877
  var option = mapper[x];
5899
5878
  if (typeof option === "object") {
5900
5879
  return React.createElement(BackSidebarSubMenuItem, { key: x, option: option, isActive: x === activePathKey });
@@ -5902,27 +5881,27 @@ var BackSidebarShortMenuItem = function (_a) {
5902
5881
  }))));
5903
5882
  };
5904
5883
 
5905
- var s$l = {"root":"index-module_root__r4Egx"};
5884
+ var s$m = {"root":"index-module_root__r4Egx"};
5906
5885
 
5907
5886
  /* eslint-disable react/no-array-index-key */
5908
5887
  // https://www.einfosoft.com/templates/admin/spice/source/edit_booking.html#
5909
5888
  var BackSidebar = function (_a) {
5910
5889
  var className = _a.className, options = _a.options, mapper = _a.mapper, top = _a.top, shortMode = _a.shortMode, activePathKey = _a.activePathKey, defaultPathKey = _a.defaultPathKey;
5911
- return (React.createElement("div", { className: classNames(s$l.root, className) },
5912
- top ? React.createElement("div", { className: classNames(s$l.top) }, top) : null,
5913
- React.createElement("div", { className: s$l.menu }, options.map(function (option, i) {
5890
+ return (React.createElement("div", { className: classNames(s$m.root, className) },
5891
+ top ? React.createElement("div", { className: classNames(s$m.top) }, top) : null,
5892
+ React.createElement("div", { className: s$m.menu }, options.map(function (option, i) {
5914
5893
  return shortMode ? (React.createElement(BackSidebarShortMenuItem, { key: i, mapper: mapper, option: option, activePathKey: activePathKey || defaultPathKey })) : (React.createElement(BackSidebarMenuItem, { key: i, mapper: mapper, option: option, activePathKey: activePathKey || defaultPathKey }));
5915
5894
  }))));
5916
5895
  };
5917
5896
 
5918
- var s$k = {"root":"index-module_root__SICCv","root__short":"index-module_root__short__XnXWP","header":"index-module_header__00DV1","sidebar":"index-module_sidebar__o2Obb","sidebar__inner":"index-module_sidebar__inner__N0GdX","content":"index-module_content__D0okO","menu":"index-module_menu__48Uz3","menu__icon":"index-module_menu__icon__BFpAs","loading":"index-module_loading__SpWat"};
5897
+ var s$l = {"root":"index-module_root__SICCv","root__short":"index-module_root__short__XnXWP","header":"index-module_header__00DV1","sidebar":"index-module_sidebar__o2Obb","sidebar__inner":"index-module_sidebar__inner__N0GdX","content":"index-module_content__D0okO","menu":"index-module_menu__48Uz3","menu__icon":"index-module_menu__icon__BFpAs","loading":"index-module_loading__SpWat"};
5919
5898
 
5920
- var s$j = {"root":"index-module_root__Q-TED","loader":"index-module_loader__qxQNC"};
5899
+ var s$k = {"root":"index-module_root__Q-TED","loader":"index-module_loader__qxQNC"};
5921
5900
 
5922
5901
  var LoadingPanel = function (_a) {
5923
5902
  var className = _a.className;
5924
- return (React.createElement("div", { className: classNames(s$j.root, className) },
5925
- React.createElement(antd.Spin, { size: "large", className: s$j.loader })));
5903
+ return (React.createElement("div", { className: classNames(s$k.root, className) },
5904
+ React.createElement(antd.Spin, { size: "large", className: s$k.loader })));
5926
5905
  };
5927
5906
 
5928
5907
  var BackLayout = function (_a) {
@@ -5932,20 +5911,20 @@ var BackLayout = function (_a) {
5932
5911
  var handleMenu = React.useCallback(function () {
5933
5912
  setShort(!short);
5934
5913
  }, [short]);
5935
- return loading ? (React.createElement(LoadingPanel, { className: s$k.loading })) : (React.createElement("div", { className: classNames(s$k.root, className, (_b = {}, _b[s$k.root__short] = short, _b)) },
5936
- React.createElement("div", { className: classNames(s$k.header, headerClassName) }, header),
5937
- React.createElement("div", { className: classNames(s$k.sidebar, sidebarClassName) },
5938
- React.createElement("div", { className: s$k.menu },
5939
- React.createElement(RegularIcon, { className: s$k.menu__icon, name: "menu", onClick: handleMenu }),
5940
- !short && React.createElement("div", { className: s$k.menu__title }, sidebarTitle)),
5941
- React.createElement("div", { className: s$k.sidebar__inner },
5914
+ return loading ? (React.createElement(LoadingPanel, { className: s$l.loading })) : (React.createElement("div", { className: classNames(s$l.root, className, (_b = {}, _b[s$l.root__short] = short, _b)) },
5915
+ React.createElement("div", { className: classNames(s$l.header, headerClassName) }, header),
5916
+ React.createElement("div", { className: classNames(s$l.sidebar, sidebarClassName) },
5917
+ React.createElement("div", { className: s$l.menu },
5918
+ React.createElement(RegularIcon, { className: s$l.menu__icon, name: "menu", onClick: handleMenu }),
5919
+ !short && React.createElement("div", { className: s$l.menu__title }, sidebarTitle)),
5920
+ React.createElement("div", { className: s$l.sidebar__inner },
5942
5921
  React.createElement(BackSidebar, __assign({}, sidebarProps, { shortMode: short })))),
5943
- contentLoading ? React.createElement(LoadingPanel, { className: s$k.content }) : React.createElement("div", { className: classNames(s$k.content, contentClassName) }, children)));
5922
+ contentLoading ? React.createElement(LoadingPanel, { className: s$l.content }) : React.createElement("div", { className: classNames(s$l.content, contentClassName) }, children)));
5944
5923
  };
5945
5924
 
5946
- var s$i = {"root":"index-module_root__Q7VjD","root__shadow":"index-module_root__shadow__OhPad","logo":"index-module_logo__KCA1E","content":"index-module_content__T-JEW","link":"index-module_link__nXsvL","select":"index-module_select__22zW6"};
5925
+ var s$j = {"root":"index-module_root__Q7VjD","root__shadow":"index-module_root__shadow__OhPad","logo":"index-module_logo__KCA1E","content":"index-module_content__T-JEW","link":"index-module_link__nXsvL","select":"index-module_select__22zW6"};
5947
5926
 
5948
- var s$h = {"popover":"index-module_popover__lwzdT","item":"index-module_item__pfayG"};
5927
+ var s$i = {"popover":"index-module_popover__lwzdT","item":"index-module_item__pfayG"};
5949
5928
 
5950
5929
  var PopoverSelect = function (_a) {
5951
5930
  var options = _a.options, value = _a.value, onChange = _a.onChange, icon = _a.icon, renderOption = _a.renderOption, showValue = _a.showValue;
@@ -5963,14 +5942,39 @@ var PopoverSelect = function (_a) {
5963
5942
  var selectedOption = React.useMemo(function () {
5964
5943
  return options.find(function (x) { return x.value === value; });
5965
5944
  }, [options, value]);
5966
- var popoverContent = React.useMemo(function () { return (React.createElement("div", { className: s$h.popover }, options
5945
+ var popoverContent = React.useMemo(function () { return (React.createElement("div", { className: s$i.popover }, options
5967
5946
  .filter(function (x) { return x.value !== value; })
5968
- .map(function (x) { return (React.createElement(React.Fragment, { key: x.value }, renderOption ? (renderOption(x, { className: s$h.item, onClick: function () { return handleChange(x.value); } })) : (React.createElement("div", { className: s$h.item, onClick: function () { return handleChange(x.value); } }, x.label)))); }))); }, [options, value, handleChange, renderOption]);
5947
+ .map(function (x) { return (React.createElement(React.Fragment, { key: x.value }, renderOption ? (renderOption(x, { className: s$i.item, onClick: function () { return handleChange(x.value); } })) : (React.createElement("div", { className: s$i.item, onClick: function () { return handleChange(x.value); } }, x.label)))); }))); }, [options, value, handleChange, renderOption]);
5969
5948
  return (React.createElement(antd.Popover, { content: popoverContent, open: open, onOpenChange: closePopover, placement: "bottomRight" },
5970
5949
  React.createElement("span", null,
5971
5950
  React.createElement(IconDivision, { icon: icon, onClick: handleOpen, rightIcon: open ? "expand-less" : "expand-more" }, showValue ? value : selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label))));
5972
5951
  };
5973
5952
 
5953
+ var s$h = {"root":"index-module_root__EQ0II","rounded":"index-module_rounded__4OK03","link":"index-module_link__fptGw"};
5954
+
5955
+ var Content = function (_a) {
5956
+ var _b;
5957
+ var icon = _a.icon, rightIcon = _a.rightIcon, isPrimary = _a.isPrimary, className = _a.className, children = _a.children, href = _a.href, size = _a.size, buttonRef = _a.buttonRef, props = __rest(_a, ["icon", "rightIcon", "isPrimary", "className", "children", "href", "size", "buttonRef"]);
5958
+ var style = React.useMemo(function () {
5959
+ var result = {};
5960
+ if (size === "small") {
5961
+ result["--rcButtonSize"] = "20px";
5962
+ }
5963
+ return result;
5964
+ }, [size]);
5965
+ return (React.createElement(antd.Button, __assign({ style: style, className: classNames(s$h.root, className, (_b = {}, _b[s$h.rounded] = !children, _b[s$h.link] = href, _b)), type: isPrimary ? "primary" : "default", size: size, ref: buttonRef }, props),
5966
+ React.createElement(IconDivision, { icon: icon, rightIcon: rightIcon }, children)));
5967
+ };
5968
+ var Button = function (_a) {
5969
+ var tooltip = _a.tooltip, tooltipPlacement = _a.tooltipPlacement, hoverOpenDelay = _a.hoverOpenDelay, href = _a.href, props = __rest(_a, ["tooltip", "tooltipPlacement", "hoverOpenDelay", "href"]);
5970
+ if (href) {
5971
+ return (React.createElement(AppLink, { href: href, target: props.target, noneDecoration: true },
5972
+ React.createElement(Content, __assign({}, props, { href: href }))));
5973
+ }
5974
+ return tooltip ? (React.createElement(AppTooltip, { placement: tooltipPlacement, title: tooltip, mouseEnterDelay: hoverOpenDelay },
5975
+ React.createElement(Content, __assign({}, props)))) : (React.createElement(Content, __assign({}, props)));
5976
+ };
5977
+
5974
5978
  var FrontHeader = function (_a) {
5975
5979
  var _b;
5976
5980
  var user = _a.user, children = _a.children, className = _a.className, logoHref = _a.logoHref, logoContent = _a.logoContent, loginHref = _a.loginHref, registerHref = _a.registerHref, language = _a.language, text = _a.text, onMenuClick = _a.onMenuClick, onSearchClick = _a.onSearchClick, menuIcon = _a.menuIcon;
@@ -6007,17 +6011,17 @@ var FrontHeader = function (_a) {
6007
6011
  var className = _b.className;
6008
6012
  return value === "logout" ? (React.createElement("div", { className: className, onClick: user === null || user === void 0 ? void 0 : user.onLogOut }, label)) : (React.createElement(AppLink, { href: value, className: className }, label));
6009
6013
  }, [user]);
6010
- return (React.createElement("div", { className: classNames(s$i.root, (_b = {},
6011
- _b[s$i.root__shadow] = shadow,
6014
+ return (React.createElement("div", { className: classNames(s$j.root, (_b = {},
6015
+ _b[s$j.root__shadow] = shadow,
6012
6016
  _b), className) },
6013
6017
  onMenuClick && React.createElement(Button, { icon: menuIcon || "menu", onClick: onMenuClick }),
6014
- React.createElement(AppLink, { className: s$i.logo, href: logoHref }, logoContent || "AlfaSchool"),
6015
- React.createElement("div", { className: s$i.content }, children),
6018
+ React.createElement(AppLink, { className: s$j.logo, href: logoHref }, logoContent || "AlfaSchool"),
6019
+ React.createElement("div", { className: s$j.content }, children),
6016
6020
  onSearchClick && (React.createElement(Button, { icon: "search", onClick: onSearchClick, size: "middle" }, text.search || "Search")),
6017
- !user && (React.createElement("div", { className: s$i.link },
6021
+ !user && (React.createElement("div", { className: s$j.link },
6018
6022
  React.createElement(AppLink, { href: loginHref }, text.login || "Login"),
6019
6023
  React.createElement(AppLink, { href: registerHref }, text.register || "Register"))),
6020
- React.createElement("div", { className: s$i.select },
6024
+ React.createElement("div", { className: s$j.select },
6021
6025
  user && React.createElement(PopoverSelect, { showValue: true, value: user.username, options: settingsOptions, renderOption: handleSettingRender }),
6022
6026
  React.createElement(PopoverSelect, __assign({ icon: "language" }, language)))));
6023
6027
  };
@@ -6476,6 +6480,7 @@ exports.FillIconNameList = FillIconNameList;
6476
6480
  exports.FlagIcon = FlagIcon;
6477
6481
  exports.FlagIconNameList = FlagIconNameList;
6478
6482
  exports.FlatButton = FlatButton;
6483
+ exports.FormActionPanel = FormActionPanel;
6479
6484
  exports.FormButton = FormButton;
6480
6485
  exports.FormError = FormError;
6481
6486
  exports.FormLine = FormLine;
package/build/styles.css CHANGED
@@ -251,26 +251,14 @@ body {
251
251
  .index-module_title__2P0gT {
252
252
  font-weight: bold;
253
253
  }
254
- .index-module_root__9GQDU {
254
+ .index-module_root__60lsV {
255
255
  padding-top: 16px;
256
256
  display: flex;
257
257
  flex-direction: row;
258
258
  justify-content: center;
259
+ align-items: center;
259
260
  gap: 0.8em;
260
261
  }
261
- .index-module_root__EQ0II {
262
- --rcButtonSize: 32px;
263
- }
264
-
265
- .index-module_rounded__4OK03 {
266
- height: var(--rcButtonSize);
267
- width: var(--rcButtonSize);
268
- border-radius: 50%;
269
- }
270
-
271
- .index-module_link__fptGw {
272
- text-decoration: none;
273
- }
274
262
  .index-module_root__C05Ty {
275
263
  display: block;
276
264
  color: var(--errorColor);
@@ -564,6 +552,19 @@ body {
564
552
  .index-module_item__pfayG:hover {
565
553
  background-color: var(--hoverBackgroundColor);
566
554
  }
555
+ .index-module_root__EQ0II {
556
+ --rcButtonSize: 32px;
557
+ }
558
+
559
+ .index-module_rounded__4OK03 {
560
+ height: var(--rcButtonSize);
561
+ width: var(--rcButtonSize);
562
+ border-radius: 50%;
563
+ }
564
+
565
+ .index-module_link__fptGw {
566
+ text-decoration: none;
567
+ }
567
568
  .index-module_root__Fwjge {
568
569
  display: block;
569
570
  padding-top: var(--frontHeaderHeight);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.293.0",
3
+ "version": "0.295.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {