@rabex-kit/rabex-ui 0.2.27 → 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,12 +2766,14 @@ 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 {
2782
- minWidth: 'unset',
2774
+ minWidth: '24px',
2775
+ width: '24px',
2776
+ height: '24px',
2783
2777
  // padding: theme.spacing(3.5, 3.5),
2784
2778
  padding: theme.spacing(1),
2785
2779
  borderRadius: theme.spacing(1)
@@ -2788,12 +2782,14 @@ var components = {
2788
2782
  }, {
2789
2783
  props: {
2790
2784
  size: 'sm',
2791
- isIcon: true
2785
+ mode: 'icon'
2792
2786
  },
2793
2787
  style: function style(_ref12) {
2794
2788
  var theme = _ref12.theme;
2795
2789
  return {
2796
- minWidth: 'unset',
2790
+ minWidth: '32px',
2791
+ width: '32px',
2792
+ height: '32px',
2797
2793
  // padding: theme.spacing(3.5, 3.5),
2798
2794
  padding: theme.spacing(2),
2799
2795
  borderRadius: theme.spacing(2)
@@ -2802,12 +2798,14 @@ var components = {
2802
2798
  }, {
2803
2799
  props: {
2804
2800
  size: 'md',
2805
- isIcon: true
2801
+ mode: 'icon'
2806
2802
  },
2807
2803
  style: function style(_ref13) {
2808
2804
  var theme = _ref13.theme;
2809
2805
  return {
2810
- minWidth: 'unset',
2806
+ minWidth: '40px',
2807
+ width: '40px',
2808
+ height: '40px',
2811
2809
  // padding: theme.spacing(3.5, 3.5),
2812
2810
  padding: theme.spacing(2),
2813
2811
  borderRadius: theme.spacing(2)
@@ -2816,12 +2814,14 @@ var components = {
2816
2814
  }, {
2817
2815
  props: {
2818
2816
  size: 'lg',
2819
- isIcon: true
2817
+ mode: 'icon'
2820
2818
  },
2821
2819
  style: function style(_ref14) {
2822
2820
  var theme = _ref14.theme;
2823
2821
  return {
2824
- minWidth: 'unset',
2822
+ minWidth: '48px',
2823
+ width: '48px',
2824
+ height: '48px',
2825
2825
  padding: theme.spacing(3),
2826
2826
  borderRadius: theme.spacing(2)
2827
2827
  };
@@ -2829,12 +2829,14 @@ var components = {
2829
2829
  }, {
2830
2830
  props: {
2831
2831
  size: 'xl',
2832
- isIcon: true
2832
+ mode: 'icon'
2833
2833
  },
2834
2834
  style: function style(_ref15) {
2835
2835
  var theme = _ref15.theme;
2836
2836
  return {
2837
- minWidth: 'unset',
2837
+ minWidth: '56px',
2838
+ width: '56px',
2839
+ height: '56px',
2838
2840
  padding: theme.spacing(4),
2839
2841
  borderRadius: theme.spacing(2)
2840
2842
  };
@@ -2883,7 +2885,7 @@ var components = {
2883
2885
  }, {
2884
2886
  props: {
2885
2887
  size: 'medium',
2886
- isIcon: true
2888
+ mode: 'icon'
2887
2889
  },
2888
2890
  style: function style(_ref19) {
2889
2891
  var theme = _ref19.theme;
@@ -2895,7 +2897,7 @@ var components = {
2895
2897
  }, {
2896
2898
  props: {
2897
2899
  size: 'small',
2898
- isIcon: true
2900
+ mode: 'icon'
2899
2901
  },
2900
2902
  style: function style(_ref20) {
2901
2903
  var theme = _ref20.theme;
@@ -2907,7 +2909,7 @@ var components = {
2907
2909
  }, {
2908
2910
  props: {
2909
2911
  size: 'xsmall',
2910
- isIcon: true
2912
+ mode: 'icon'
2911
2913
  },
2912
2914
  style: function style(_ref21) {
2913
2915
  var theme = _ref21.theme;
@@ -5697,7 +5699,7 @@ var ModalContent = function ModalContent(_ref) {
5697
5699
  left: '-10px'
5698
5700
  }, headerSx)
5699
5701
  }, header), React.createElement(Button, Object.assign({
5700
- isIcon: true,
5702
+ mode: "icon",
5701
5703
  color: "secondary",
5702
5704
  variant: 'text',
5703
5705
  size: 'sm'