@rabex-kit/rabex-ui 0.2.28 → 0.2.29

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.
@@ -828,7 +828,7 @@ var Breadcrumbs = function Breadcrumbs(props) {
828
828
  return React.createElement(MuiBreadcrumbs, Object.assign({}, props));
829
829
  };
830
830
 
831
- var _excluded$2 = ["size", "isIcon", "children"];
831
+ var _excluded$2 = ["size", "mode", "children"];
832
832
  var typographySizes = {
833
833
  xs: {
834
834
  variant: 'smallButton',
@@ -858,12 +858,7 @@ var iconSizes = {
858
858
  lg: 24,
859
859
  xl: 24
860
860
  };
861
- // Styled button with shouldForwardProp to exclude 'isIcon' from DOM
862
- var StyledButton = /*#__PURE__*/styled(MuiButton, {
863
- shouldForwardProp: function shouldForwardProp(prop) {
864
- return prop !== 'isIcon';
865
- }
866
- })(function (_ref) {
861
+ var StyledButton = /*#__PURE__*/styled(MuiButton, {})(function (_ref) {
867
862
  var size = _ref.size;
868
863
  return {
869
864
  display: 'flex',
@@ -882,14 +877,15 @@ var StyledButton = /*#__PURE__*/styled(MuiButton, {
882
877
  var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
883
878
  var _props$size = props.size,
884
879
  size = _props$size === void 0 ? 'md' : _props$size,
885
- isIcon = props.isIcon,
880
+ _props$mode = props.mode,
881
+ mode = _props$mode === void 0 ? 'button' : _props$mode,
886
882
  children = props.children,
887
883
  rest = _objectWithoutPropertiesLoose(props, _excluded$2);
888
884
  return React.createElement(StyledButton, Object.assign({
889
885
  ref: ref,
890
886
  size: size,
891
- isIcon: isIcon
892
- }, rest), isIcon ? children : React.createElement(Typography, {
887
+ mode: mode
888
+ }, rest), mode === 'icon' ? children : React.createElement(Typography, {
893
889
  variant: typographySizes[size].variant,
894
890
  weight: typographySizes[size].weight
895
891
  }, children));
@@ -898,7 +894,7 @@ Button.defaultProps = {
898
894
  variant: 'contained',
899
895
  size: 'md',
900
896
  color: 'primary',
901
- isIcon: false,
897
+ mode: 'button',
902
898
  disableRipple: true,
903
899
  disableElevation: true,
904
900
  disableFocusRipple: true
@@ -1706,10 +1702,7 @@ var ListSubHeader = function ListSubHeader(props) {
1706
1702
  * @returns
1707
1703
  */
1708
1704
  var LoadingButton = /*#__PURE__*/styled(MuiLoadingButton, {
1709
- name: 'MuiLoadingButton',
1710
- shouldForwardProp: function shouldForwardProp(prop) {
1711
- return !['isIcon'].includes(prop);
1712
- }
1705
+ name: 'MuiLoadingButton'
1713
1706
  })(function () {
1714
1707
  return {};
1715
1708
  });
@@ -1717,7 +1710,6 @@ LoadingButton.defaultProps = {
1717
1710
  variant: 'contained',
1718
1711
  size: 'md',
1719
1712
  color: 'primary',
1720
- isIcon: false,
1721
1713
  disableRipple: true,
1722
1714
  disableElevation: true,
1723
1715
  disableFocusRipple: true
@@ -2774,11 +2766,12 @@ var components = {
2774
2766
  }, {
2775
2767
  props: {
2776
2768
  size: 'xs',
2777
- isIcon: true
2769
+ mode: 'icon'
2778
2770
  },
2779
2771
  style: function style(_ref11) {
2780
2772
  var theme = _ref11.theme;
2781
2773
  return {
2774
+ minWidth: '24px',
2782
2775
  width: '24px',
2783
2776
  height: '24px',
2784
2777
  // padding: theme.spacing(3.5, 3.5),
@@ -2789,11 +2782,12 @@ var components = {
2789
2782
  }, {
2790
2783
  props: {
2791
2784
  size: 'sm',
2792
- isIcon: true
2785
+ mode: 'icon'
2793
2786
  },
2794
2787
  style: function style(_ref12) {
2795
2788
  var theme = _ref12.theme;
2796
2789
  return {
2790
+ minWidth: '32px',
2797
2791
  width: '32px',
2798
2792
  height: '32px',
2799
2793
  // padding: theme.spacing(3.5, 3.5),
@@ -2804,11 +2798,12 @@ var components = {
2804
2798
  }, {
2805
2799
  props: {
2806
2800
  size: 'md',
2807
- isIcon: true
2801
+ mode: 'icon'
2808
2802
  },
2809
2803
  style: function style(_ref13) {
2810
2804
  var theme = _ref13.theme;
2811
2805
  return {
2806
+ minWidth: '40px',
2812
2807
  width: '40px',
2813
2808
  height: '40px',
2814
2809
  // padding: theme.spacing(3.5, 3.5),
@@ -2819,11 +2814,12 @@ var components = {
2819
2814
  }, {
2820
2815
  props: {
2821
2816
  size: 'lg',
2822
- isIcon: true
2817
+ mode: 'icon'
2823
2818
  },
2824
2819
  style: function style(_ref14) {
2825
2820
  var theme = _ref14.theme;
2826
2821
  return {
2822
+ minWidth: '48px',
2827
2823
  width: '48px',
2828
2824
  height: '48px',
2829
2825
  padding: theme.spacing(3),
@@ -2833,11 +2829,12 @@ var components = {
2833
2829
  }, {
2834
2830
  props: {
2835
2831
  size: 'xl',
2836
- isIcon: true
2832
+ mode: 'icon'
2837
2833
  },
2838
2834
  style: function style(_ref15) {
2839
2835
  var theme = _ref15.theme;
2840
2836
  return {
2837
+ minWidth: '56px',
2841
2838
  width: '56px',
2842
2839
  height: '56px',
2843
2840
  padding: theme.spacing(4),
@@ -2888,7 +2885,7 @@ var components = {
2888
2885
  }, {
2889
2886
  props: {
2890
2887
  size: 'medium',
2891
- isIcon: true
2888
+ mode: 'icon'
2892
2889
  },
2893
2890
  style: function style(_ref19) {
2894
2891
  var theme = _ref19.theme;
@@ -2900,7 +2897,7 @@ var components = {
2900
2897
  }, {
2901
2898
  props: {
2902
2899
  size: 'small',
2903
- isIcon: true
2900
+ mode: 'icon'
2904
2901
  },
2905
2902
  style: function style(_ref20) {
2906
2903
  var theme = _ref20.theme;
@@ -2912,7 +2909,7 @@ var components = {
2912
2909
  }, {
2913
2910
  props: {
2914
2911
  size: 'xsmall',
2915
- isIcon: true
2912
+ mode: 'icon'
2916
2913
  },
2917
2914
  style: function style(_ref21) {
2918
2915
  var theme = _ref21.theme;
@@ -5702,7 +5699,7 @@ var ModalContent = function ModalContent(_ref) {
5702
5699
  left: '-10px'
5703
5700
  }, headerSx)
5704
5701
  }, header), React.createElement(Button, Object.assign({
5705
- isIcon: true,
5702
+ mode: "icon",
5706
5703
  color: "secondary",
5707
5704
  variant: 'text',
5708
5705
  size: 'sm'